diff --git a/README.md b/README.md index 3da01d7360..01edbc3a8c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ -

Jellyfin Web UI

+

Jellyfin Web

The Free Software Media System

+--- +

-Jellyfin is a free software media system that puts you in control of managing and streaming your media. +Logo Banner +

+GPL 2.0 License +Current Release

+--- + +Jellyfin is a free software media system that puts you in control of managing and streaming your media. diff --git a/package.json b/package.json index 6f8ad1f0b1..51b90f4ee8 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,12 @@ }, "dependencies": { "jstree": "^3.3.7", - "hls.js": "^0.12.4" + "jquery": "^3.4.1", + "hls.js": "^0.12.4", + "howler": "^2.1.2", + "swiper": "^4.5.0", + "sortablejs": "^1.9.0", + "libjass": "^0.11.0" }, "scripts": { "dev": "webpack --mode development", diff --git a/src/bower_components/Sortable/Sortable.html b/src/bower_components/Sortable/Sortable.html deleted file mode 100644 index dc93d654c4..0000000000 --- a/src/bower_components/Sortable/Sortable.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - diff --git a/src/bower_components/Sortable/Sortable.min.js b/src/bower_components/Sortable/Sortable.min.js deleted file mode 100644 index d5e2b5f37a..0000000000 --- a/src/bower_components/Sortable/Sortable.min.js +++ /dev/null @@ -1,393 +0,0 @@ -/*! Sortable 1.4.2 - MIT | git://github.com/rubaxa/Sortable.git */ ! function(a) { - "use strict"; - "function" == typeof define && define.amd ? define(a) : "undefined" != typeof module && "undefined" != typeof module.exports ? module.exports = a() : "undefined" != typeof Package ? Sortable = a() : window.Sortable = a() -}(function() { - "use strict"; - - function a(a, b) { - if (!a || !a.nodeType || 1 !== a.nodeType) throw "Sortable: `el` must be HTMLElement, and not " + {}.toString.call(a); - this.el = a, this.options = b = r({}, b), a[L] = this; - var c = { - group: Math.random(), - sort: !0, - disabled: !1, - store: null, - handle: null, - scroll: !0, - scrollSensitivity: 30, - scrollSpeed: 10, - draggable: /[uo]l/i.test(a.nodeName) ? "li" : ">*", - ghostClass: "sortable-ghost", - chosenClass: "sortable-chosen", - ignore: "a, img", - filter: null, - animation: 0, - setData: function(a, b) { - a.setData("Text", b.textContent) - }, - dropBubble: !1, - dragoverBubble: !1, - dataIdAttr: "data-id", - delay: 0, - forceFallback: !1, - fallbackClass: "sortable-fallback", - fallbackOnBody: !1 - }; - for (var d in c) !(d in b) && (b[d] = c[d]); - V(b); - for (var f in this) "_" === f.charAt(0) && (this[f] = this[f].bind(this)); - this.nativeDraggable = b.forceFallback ? !1 : P, e(a, "mousedown", this._onTapStart), e(a, "touchstart", this._onTapStart), this.nativeDraggable && (e(a, "dragover", this), e(a, "dragenter", this)), T.push(this._onDragOver), b.store && this.sort(b.store.get(this)) - } - - function b(a) { - v && v.state !== a && (h(v, "display", a ? "none" : ""), !a && v.state && w.insertBefore(v, s), v.state = a) - } - - function c(a, b, c) { - if (a) { - c = c || N, b = b.split("."); - var d = b.shift().toUpperCase(), - e = new RegExp("\\s(" + b.join("|") + ")(?=\\s)", "g"); - do - if (">*" === d && a.parentNode === c || ("" === d || a.nodeName.toUpperCase() == d) && (!b.length || ((" " + a.className + " ").match(e) || []).length == b.length)) return a; while (a !== c && (a = a.parentNode)) - } - return null - } - - function d(a) { - a.dataTransfer && (a.dataTransfer.dropEffect = "move"), a.preventDefault() - } - - function e(a, b, c) { - a.addEventListener(b, c, !1) - } - - function f(a, b, c) { - a.removeEventListener(b, c, !1) - } - - function g(a, b, c) { - if (a) - if (a.classList) a.classList[c ? "add" : "remove"](b); - else { - var d = (" " + a.className + " ").replace(K, " ").replace(" " + b + " ", " "); - a.className = (d + (c ? " " + b : "")).replace(K, " ") - } - } - - function h(a, b, c) { - var d = a && a.style; - if (d) { - if (void 0 === c) return N.defaultView && N.defaultView.getComputedStyle ? c = N.defaultView.getComputedStyle(a, "") : a.currentStyle && (c = a.currentStyle), void 0 === b ? c : c[b]; - b in d || (b = "-webkit-" + b), d[b] = c + ("string" == typeof c ? "" : "px") - } - } - - function i(a, b, c) { - if (a) { - var d = a.getElementsByTagName(b), - e = 0, - f = d.length; - if (c) - for (; f > e; e++) c(d[e], e); - return d - } - return [] - } - - function j(a, b, c, d, e, f, g) { - var h = N.createEvent("Event"), - i = (a || b[L]).options, - j = "on" + c.charAt(0).toUpperCase() + c.substr(1); - h.initEvent(c, !0, !0), h.to = b, h.from = e || b, h.item = d || b, h.clone = v, h.oldIndex = f, h.newIndex = g, b.dispatchEvent(h), i[j] && i[j].call(a, h) - } - - function k(a, b, c, d, e, f) { - var g, h, i = a[L], - j = i.options.onMove; - return g = N.createEvent("Event"), g.initEvent("move", !0, !0), g.to = b, g.from = a, g.dragged = c, g.draggedRect = d, g.related = e || b, g.relatedRect = f || b.getBoundingClientRect(), a.dispatchEvent(g), j && (h = j.call(i, g)), h - } - - function l(a) { - a.draggable = !1 - } - - function m() { - R = !1 - } - - function n(a, b) { - var c = a.lastElementChild, - d = c.getBoundingClientRect(); - return (b.clientY - (d.top + d.height) > 5 || b.clientX - (d.right + d.width) > 5) && c - } - - function o(a) { - for (var b = a.tagName + a.className + a.src + a.href + a.textContent, c = b.length, d = 0; c--;) d += b.charCodeAt(c); - return d.toString(36) - } - - function p(a) { - var b = 0; - if (!a || !a.parentNode) return -1; - for (; a && (a = a.previousElementSibling);) "TEMPLATE" !== a.nodeName.toUpperCase() && b++; - return b - } - - function q(a, b) { - var c, d; - return function() { - void 0 === c && (c = arguments, d = this, setTimeout(function() { - 1 === c.length ? a.call(d, c[0]) : a.apply(d, c), c = void 0 - }, b)) - } - } - - function r(a, b) { - if (a && b) - for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - var s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J = {}, - K = /\s+/g, - L = "Sortable" + (new Date).getTime(), - M = window, - N = M.document, - O = M.parseInt, - P = !!("draggable" in N.createElement("div")), - Q = function(a) { - return a = N.createElement("x"), a.style.cssText = "pointer-events:auto", "auto" === a.style.pointerEvents - }(), - R = !1, - S = Math.abs, - T = ([].slice, []), - U = q(function(a, b, c) { - if (c && b.scroll) { - var d, e, f, g, h = b.scrollSensitivity, - i = b.scrollSpeed, - j = a.clientX, - k = a.clientY, - l = window.innerWidth, - m = window.innerHeight; - if (z !== c && (y = b.scroll, z = c, y === !0)) { - y = c; - do - if (y.offsetWidth < y.scrollWidth || y.offsetHeight < y.scrollHeight) break; while (y = y.parentNode) - } - y && (d = y, e = y.getBoundingClientRect(), f = (S(e.right - j) <= h) - (S(e.left - j) <= h), g = (S(e.bottom - k) <= h) - (S(e.top - k) <= h)), f || g || (f = (h >= l - j) - (h >= j), g = (h >= m - k) - (h >= k), (f || g) && (d = M)), (J.vx !== f || J.vy !== g || J.el !== d) && (J.el = d, J.vx = f, J.vy = g, clearInterval(J.pid), d && (J.pid = setInterval(function() { - d === M ? M.scrollTo(M.pageXOffset + f * i, M.pageYOffset + g * i) : (g && (d.scrollTop += g * i), f && (d.scrollLeft += f * i)) - }, 24))) - } - }, 30), - V = function(a) { - var b = a.group; - b && "object" == typeof b || (b = a.group = { - name: b - }), ["pull", "put"].forEach(function(a) { - a in b || (b[a] = !0) - }), a.groups = " " + b.name + (b.put.join ? " " + b.put.join(" ") : "") + " " - }; - return a.prototype = { - constructor: a, - _onTapStart: function(a) { - var b = this, - d = this.el, - e = this.options, - f = a.type, - g = a.touches && a.touches[0], - h = (g || a).target, - i = h, - k = e.filter; - if (!("mousedown" === f && 0 !== a.button || e.disabled) && (h = c(h, e.draggable, d))) { - if (D = p(h), "function" == typeof k) { - if (k.call(this, a, h, this)) return j(b, i, "filter", h, d, D), void a.preventDefault() - } else if (k && (k = k.split(",").some(function(a) { - return a = c(i, a.trim(), d), a ? (j(b, a, "filter", h, d, D), !0) : void 0 - }))) return void a.preventDefault(); - (!e.handle || c(i, e.handle, d)) && this._prepareDragStart(a, g, h) - } - }, - _prepareDragStart: function(a, b, c) { - var d, f = this, - h = f.el, - j = f.options, - k = h.ownerDocument; - c && !s && c.parentNode === h && (G = a, w = h, s = c, t = s.parentNode, x = s.nextSibling, F = j.group, d = function() { - f._disableDelayedDrag(), s.draggable = !0, g(s, f.options.chosenClass, !0), f._triggerDragStart(b) - }, j.ignore.split(",").forEach(function(a) { - i(s, a.trim(), l) - }), e(k, "mouseup", f._onDrop), e(k, "touchend", f._onDrop), e(k, "touchcancel", f._onDrop), j.delay ? (e(k, "mouseup", f._disableDelayedDrag), e(k, "touchend", f._disableDelayedDrag), e(k, "touchcancel", f._disableDelayedDrag), e(k, "mousemove", f._disableDelayedDrag), e(k, "touchmove", f._disableDelayedDrag), f._dragStartTimer = setTimeout(d, j.delay)) : d()) - }, - _disableDelayedDrag: function() { - var a = this.el.ownerDocument; - clearTimeout(this._dragStartTimer), f(a, "mouseup", this._disableDelayedDrag), f(a, "touchend", this._disableDelayedDrag), f(a, "touchcancel", this._disableDelayedDrag), f(a, "mousemove", this._disableDelayedDrag), f(a, "touchmove", this._disableDelayedDrag) - }, - _triggerDragStart: function(a) { - a ? (G = { - target: s, - clientX: a.clientX, - clientY: a.clientY - }, this._onDragStart(G, "touch")) : this.nativeDraggable ? (e(s, "dragend", this), e(w, "dragstart", this._onDragStart)) : this._onDragStart(G, !0); - try { - N.selection ? N.selection.empty() : window.getSelection().removeAllRanges() - } catch (b) {} - }, - _dragStarted: function() { - w && s && (g(s, this.options.ghostClass, !0), a.active = this, j(this, w, "start", s, w, D)) - }, - _emulateDragOver: function() { - if (H) { - if (this._lastX === H.clientX && this._lastY === H.clientY) return; - this._lastX = H.clientX, this._lastY = H.clientY, Q || h(u, "display", "none"); - var a = N.elementFromPoint(H.clientX, H.clientY), - b = a, - c = " " + this.options.group.name, - d = T.length; - if (b) - do { - if (b[L] && b[L].options.groups.indexOf(c) > -1) { - for (; d--;) T[d]({ - clientX: H.clientX, - clientY: H.clientY, - target: a, - rootEl: b - }); - break - } - a = b - } while (b = b.parentNode); - Q || h(u, "display", "") - } - }, - _onTouchMove: function(b) { - if (G) { - a.active || this._dragStarted(), this._appendGhost(); - var c = b.touches ? b.touches[0] : b, - d = c.clientX - G.clientX, - e = c.clientY - G.clientY, - f = b.touches ? "translate3d(" + d + "px," + e + "px,0)" : "translate(" + d + "px," + e + "px)"; - I = !0, H = c, h(u, "webkitTransform", f), h(u, "mozTransform", f), h(u, "msTransform", f), h(u, "transform", f), b.preventDefault() - } - }, - _appendGhost: function() { - if (!u) { - var a, b = s.getBoundingClientRect(), - c = h(s), - d = this.options; - u = s.cloneNode(!0), g(u, d.ghostClass, !1), g(u, d.fallbackClass, !0), h(u, "top", b.top - O(c.marginTop, 10)), h(u, "left", b.left - O(c.marginLeft, 10)), h(u, "width", b.width), h(u, "height", b.height), h(u, "opacity", "0.8"), h(u, "position", "fixed"), h(u, "zIndex", "100000"), h(u, "pointerEvents", "none"), d.fallbackOnBody && N.body.appendChild(u) || w.appendChild(u), a = u.getBoundingClientRect(), h(u, "width", 2 * b.width - a.width), h(u, "height", 2 * b.height - a.height) - } - }, - _onDragStart: function(a, b) { - var c = a.dataTransfer, - d = this.options; - this._offUpEvents(), "clone" == F.pull && (v = s.cloneNode(!0), h(v, "display", "none"), w.insertBefore(v, s)), b ? ("touch" === b ? (e(N, "touchmove", this._onTouchMove), e(N, "touchend", this._onDrop), e(N, "touchcancel", this._onDrop)) : (e(N, "mousemove", this._onTouchMove), e(N, "mouseup", this._onDrop)), this._loopId = setInterval(this._emulateDragOver, 50)) : (c && (c.effectAllowed = "move", d.setData && d.setData.call(this, c, s)), e(N, "drop", this), setTimeout(this._dragStarted, 0)) - }, - _onDragOver: function(a) { - var d, e, f, g = this.el, - i = this.options, - j = i.group, - l = j.put, - o = F === j, - p = i.sort; - if (void 0 !== a.preventDefault && (a.preventDefault(), !i.dragoverBubble && a.stopPropagation()), I = !0, F && !i.disabled && (o ? p || (f = !w.contains(s)) : F.pull && l && (F.name === j.name || l.indexOf && ~l.indexOf(F.name))) && (void 0 === a.rootEl || a.rootEl === this.el)) { - if (U(a, i, this.el), R) return; - if (d = c(a.target, i.draggable, g), e = s.getBoundingClientRect(), f) return b(!0), void(v || x ? w.insertBefore(s, v || x) : p || w.appendChild(s)); - if (0 === g.children.length || g.children[0] === u || g === a.target && (d = n(g, a))) { - if (d) { - if (d.animated) return; - r = d.getBoundingClientRect() - } - b(o), k(w, g, s, e, d, r) !== !1 && (s.contains(g) || (g.appendChild(s), t = g), this._animate(e, s), d && this._animate(r, d)) - } else if (d && !d.animated && d !== s && void 0 !== d.parentNode[L]) { - A !== d && (A = d, B = h(d), C = h(d.parentNode)); - var q, r = d.getBoundingClientRect(), - y = r.right - r.left, - z = r.bottom - r.top, - D = /left|right|inline/.test(B.cssFloat + B.display) || "flex" == C.display && 0 === C["flex-direction"].indexOf("row"), - E = d.offsetWidth > s.offsetWidth, - G = d.offsetHeight > s.offsetHeight, - H = (D ? (a.clientX - r.left) / y : (a.clientY - r.top) / z) > .5, - J = d.nextElementSibling, - K = k(w, g, s, e, d, r); - if (K !== !1) { - if (R = !0, setTimeout(m, 30), b(o), 1 === K || -1 === K) q = 1 === K; - else if (D) { - var M = s.offsetTop, - N = d.offsetTop; - q = M === N ? d.previousElementSibling === s && !E || H && E : N > M - } else q = J !== s && !G || H && G; - s.contains(g) || (q && !J ? g.appendChild(s) : d.parentNode.insertBefore(s, q ? J : d)), t = s.parentNode, this._animate(e, s), this._animate(r, d) - } - } - } - }, - _animate: function(a, b) { - var c = this.options.animation; - if (c) { - var d = b.getBoundingClientRect(); - h(b, "transition", "none"), h(b, "transform", "translate3d(" + (a.left - d.left) + "px," + (a.top - d.top) + "px,0)"), b.offsetWidth, h(b, "transition", "all " + c + "ms"), h(b, "transform", "translate3d(0,0,0)"), clearTimeout(b.animated), b.animated = setTimeout(function() { - h(b, "transition", ""), h(b, "transform", ""), b.animated = !1 - }, c) - } - }, - _offUpEvents: function() { - var a = this.el.ownerDocument; - f(N, "touchmove", this._onTouchMove), f(a, "mouseup", this._onDrop), f(a, "touchend", this._onDrop), f(a, "touchcancel", this._onDrop) - }, - _onDrop: function(b) { - var c = this.el, - d = this.options; - clearInterval(this._loopId), clearInterval(J.pid), clearTimeout(this._dragStartTimer), f(N, "mousemove", this._onTouchMove), this.nativeDraggable && (f(N, "drop", this), f(c, "dragstart", this._onDragStart)), this._offUpEvents(), b && (I && (b.preventDefault(), !d.dropBubble && b.stopPropagation()), u && u.parentNode.removeChild(u), s && (this.nativeDraggable && f(s, "dragend", this), l(s), g(s, this.options.ghostClass, !1), g(s, this.options.chosenClass, !1), w !== t ? (E = p(s), E >= 0 && (j(null, t, "sort", s, w, D, E), j(this, w, "sort", s, w, D, E), j(null, t, "add", s, w, D, E), j(this, w, "remove", s, w, D, E))) : (v && v.parentNode.removeChild(v), s.nextSibling !== x && (E = p(s), E >= 0 && (j(this, w, "update", s, w, D, E), j(this, w, "sort", s, w, D, E)))), a.active && ((null === E || -1 === E) && (E = D), j(this, w, "end", s, w, D, E), this.save())), w = s = t = u = x = v = y = z = G = H = I = E = A = B = F = a.active = null) - }, - handleEvent: function(a) { - var b = a.type; - "dragover" === b || "dragenter" === b ? s && (this._onDragOver(a), d(a)) : ("drop" === b || "dragend" === b) && this._onDrop(a) - }, - toArray: function() { - for (var a, b = [], d = this.el.children, e = 0, f = d.length, g = this.options; f > e; e++) a = d[e], c(a, g.draggable, this.el) && b.push(a.getAttribute(g.dataIdAttr) || o(a)); - return b - }, - sort: function(a) { - var b = {}, - d = this.el; - this.toArray().forEach(function(a, e) { - var f = d.children[e]; - c(f, this.options.draggable, d) && (b[a] = f) - }, this), a.forEach(function(a) { - b[a] && (d.removeChild(b[a]), d.appendChild(b[a])) - }) - }, - save: function() { - var a = this.options.store; - a && a.set(this) - }, - closest: function(a, b) { - return c(a, b || this.options.draggable, this.el) - }, - option: function(a, b) { - var c = this.options; - return void 0 === b ? c[a] : (c[a] = b, void("group" === a && V(c))) - }, - destroy: function() { - var a = this.el; - a[L] = null, f(a, "mousedown", this._onTapStart), f(a, "touchstart", this._onTapStart), this.nativeDraggable && (f(a, "dragover", this), f(a, "dragenter", this)), Array.prototype.forEach.call(a.querySelectorAll("[draggable]"), function(a) { - a.removeAttribute("draggable") - }), T.splice(T.indexOf(this._onDragOver), 1), this._onDrop(), this.el = a = null - } - }, a.utils = { - on: e, - off: f, - css: h, - find: i, - is: function(a, b) { - return !!c(a, b, a) - }, - extend: r, - throttle: q, - closest: c, - toggleClass: g, - index: p - }, a.create = function(b, c) { - return new a(b, c) - }, a.version = "1.4.2", a -}); \ No newline at end of file diff --git a/src/bower_components/Sortable/index.html b/src/bower_components/Sortable/index.html deleted file mode 100644 index c7064436e3..0000000000 --- a/src/bower_components/Sortable/index.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - Sortable. No jQuery. - - - - - - - - - - - - - Fork me on GitHub - -
-
- -

The JavaScript library for modern browsers and touch devices. No jQuery.

-
-
- - - -
-
-
List A
- -
- -
-
List B
- -
-
- - - - -
-
-
Multi
- -
-
Group A
-
- -
-
- -
-
Group B
-
- -
-
- -
-
Group C
-
- -
-
- -
-
- - - - -
-
-
Editable list
- -
-
    -
  • Оля
  • -
  • Владимир
  • -
  • Алина
  • -
- - -
-
-
- - - - -
-
-
Advanced groups
- -
-
pull & put
-
    -
  • Meat
  • -
  • Potato
  • -
  • Tea
  • -
-
- -
-
only pull (clone) no reordering
-
    -
  • Sex
  • -
  • Drugs
  • -
  • Rock'n'roll
  • -
-
- -
-
only put
-
    -
  • Money
  • -
  • Force
  • -
  • Agility
  • -
-
- -
-
-
- - - - -
-
-
Drag handle and selectable text
- -
-
    -
  • Select text freely
  • -
  • Drag my handle
  • -
  • Best of both worlds
  • -
-
- -
-
-
- - - - -
-
-
AngularJS / ng-sortable
- -
-
- {{remaining()}} of {{todos.length}} remaining - [ archive ] -
    -
  • - - {{todo.text}} -
  • -
-
- -
-
-
- - -
-
- {{remaining()}} of {{todos.length}} remaining -
    -
  • - - {{todo.text}} -
  • -
-
-
- -
-
-
- - - - -
-
-
Code example
-
// Simple list
-var list = document.getElementById("my-ui-list");
-Sortable.create(list); // That's all.
-
-
-// Grouping
-var foo = document.getElementById("foo");
-Sortable.create(foo, { group: "omega" });
-
-var bar = document.getElementById("bar");
-Sortable.create(bar, { group: "omega" });
-
-
-// Or
-var container = document.getElementById("multi");
-var sort = Sortable.create(container, {
-  animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
-  handle: ".tile__title", // Restricts sort start click/touch to the specified element
-  draggable: ".tile", // Specifies which items inside the element should be sortable
-  onUpdate: function (evt/**Event*/){
-     var item = evt.item; // the current dragged HTMLElement
-  }
-});
-
-// ..
-sort.destroy();
-
-
-// Editable list
-var editableList = Sortable.create(editable, {
-  filter: '.js-remove',
-  onFilter: function (evt) {
-    var el = editableList.closest(evt.item); // get dragged item
-    el && el.parentNode.removeChild(el);
-  }
-});
-
-
- -
-
-
See also
-
Loading…
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - diff --git a/src/bower_components/Sortable/jquery.binding.js b/src/bower_components/Sortable/jquery.binding.js deleted file mode 100644 index 95970ca2a3..0000000000 --- a/src/bower_components/Sortable/jquery.binding.js +++ /dev/null @@ -1,17 +0,0 @@ -! function(factory) { - "use strict"; - "function" == typeof define && define.amd ? define(["jquery"], factory) : factory(jQuery) -}(function($) { - "use strict"; - $.fn.sortable = function(options) { - var retVal, args = arguments; - return this.each(function() { - var $el = $(this), - sortable = $el.data("sortable"); - if (sortable || !(options instanceof Object) && options || (sortable = new Sortable(this, options), $el.data("sortable", sortable)), sortable) { - if ("widget" === options) return sortable; - "destroy" === options ? (sortable.destroy(), $el.removeData("sortable")) : "function" == typeof sortable[options] ? retVal = sortable[options].apply(sortable, [].slice.call(args, 1)) : options in sortable.options && (retVal = sortable.option.apply(sortable, args)) - } - }), void 0 === retVal ? this : retVal - } -}); \ No newline at end of file diff --git a/src/bower_components/Sortable/knockout-sortable.js b/src/bower_components/Sortable/knockout-sortable.js deleted file mode 100644 index 75b23527f8..0000000000 --- a/src/bower_components/Sortable/knockout-sortable.js +++ /dev/null @@ -1,97 +0,0 @@ -! function(factory) { - "use strict"; - if ("function" == typeof define && define.amd) define(["knockout"], factory); - else if ("function" == typeof require && "object" == typeof exports && "object" == typeof module) { - var ko = require("knockout"); - factory(ko) - } else factory(window.ko) -}(function(ko) { - "use strict"; - var init = function(element, valueAccessor, allBindings, viewModel, bindingContext, sortableOptions) { - var options = buildOptions(valueAccessor, sortableOptions); - ["onStart", "onEnd", "onRemove", "onAdd", "onUpdate", "onSort", "onFilter"].forEach(function(e) { - (options[e] || eventHandlers[e]) && (options[e] = function(eventType, parentVM, parentBindings, handler, e) { - var itemVM = ko.dataFor(e.item), - bindings = ko.utils.peekObservable(parentBindings()), - bindingHandlerBinding = bindings.sortable || bindings.draggable, - collection = bindingHandlerBinding.collection || bindingHandlerBinding.foreach; - handler && handler(e, itemVM, parentVM, collection, bindings), eventHandlers[eventType] && eventHandlers[eventType](e, itemVM, parentVM, collection, bindings) - }.bind(void 0, e, viewModel, allBindings, options[e])) - }); - var sortableElement = Sortable.create(element, options); - return ko.utils.domNodeDisposal.addDisposeCallback(element, function() { - sortableElement.destroy() - }), ko.bindingHandlers.template.init(element, valueAccessor) - }, - update = function(element, valueAccessor, allBindings, viewModel, bindingContext, sortableOptions) { - return ko.bindingHandlers.template.update(element, valueAccessor, allBindings, viewModel, bindingContext) - }, - eventHandlers = function(handlers) { - var moveOperations = [], - tryMoveOperation = function(e, itemVM, parentVM, collection, parentBindings) { - var currentOperation = { - event: e, - itemVM: itemVM, - parentVM: parentVM, - collection: collection, - parentBindings: parentBindings - }, - existingOperation = moveOperations.filter(function(op) { - return op.itemVM === currentOperation.itemVM - })[0]; - if (existingOperation) { - moveOperations.splice(moveOperations.indexOf(existingOperation), 1); - var removeOperation = "remove" === currentOperation.event.type ? currentOperation : existingOperation, - addOperation = "add" === currentOperation.event.type ? currentOperation : existingOperation; - moveItem(itemVM, removeOperation.collection, addOperation.collection, addOperation.event.clone, addOperation.event) - } else moveOperations.push(currentOperation) - }, - moveItem = function(itemVM, from, to, clone, e) { - var fromArray = from(), - originalIndex = fromArray.indexOf(itemVM), - newIndex = e.newIndex; - e.item.previousElementSibling && (newIndex = fromArray.indexOf(ko.dataFor(e.item.previousElementSibling)), originalIndex > newIndex && (newIndex += 1)), e.item.parentNode.removeChild(e.item), fromArray.splice(originalIndex, 1), from.valueHasMutated(), clone && from !== to && (fromArray.splice(originalIndex, 0, itemVM), from.valueHasMutated()), to().splice(newIndex, 0, itemVM), to.valueHasMutated() - }; - return handlers.onRemove = tryMoveOperation, handlers.onAdd = tryMoveOperation, handlers.onUpdate = function(e, itemVM, parentVM, collection, parentBindings) { - moveItem(itemVM, collection, collection, !1, e) - }, handlers - }({}), - buildOptions = function(bindingOptions, options) { - var merge = function(into, from) { - for (var prop in from) "[object Object]" === Object.prototype.toString.call(from[prop]) ? ("[object Object]" !== Object.prototype.toString.call(into[prop]) && (into[prop] = {}), into[prop] = merge(into[prop], from[prop])) : into[prop] = from[prop]; - return into - }, - unwrappedOptions = ko.utils.peekObservable(bindingOptions()).options || {}; - return options = merge({}, options), unwrappedOptions.group && "[object Object]" !== Object.prototype.toString.call(unwrappedOptions.group) && (unwrappedOptions.group = { - name: unwrappedOptions.group - }), merge(options, unwrappedOptions) - }; - ko.bindingHandlers.draggable = { - sortableOptions: { - group: { - pull: "clone", - put: !1 - }, - sort: !1 - }, - init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { - return init(element, valueAccessor, allBindings, viewModel, 0, ko.bindingHandlers.draggable.sortableOptions) - }, - update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { - return update(element, valueAccessor, allBindings, viewModel, bindingContext, ko.bindingHandlers.draggable.sortableOptions) - } - }, ko.bindingHandlers.sortable = { - sortableOptions: { - group: { - pull: !0, - put: !0 - } - }, - init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { - return init(element, valueAccessor, allBindings, viewModel, 0, ko.bindingHandlers.sortable.sortableOptions) - }, - update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { - return update(element, valueAccessor, allBindings, viewModel, bindingContext, ko.bindingHandlers.sortable.sortableOptions) - } - } -}); \ No newline at end of file diff --git a/src/bower_components/Sortable/ng-sortable.js b/src/bower_components/Sortable/ng-sortable.js deleted file mode 100644 index fe92b33453..0000000000 --- a/src/bower_components/Sortable/ng-sortable.js +++ /dev/null @@ -1,87 +0,0 @@ -! function(factory) { - "use strict"; - "function" == typeof define && define.amd ? define(["angular", "./Sortable"], factory) : "function" == typeof require && "object" == typeof exports && "object" == typeof module ? (require("angular"), factory(angular, require("./Sortable")), module.exports = "ng-sortable") : window.angular && window.Sortable && factory(angular, Sortable) -}(function(angular, Sortable) { - "use strict"; - var expando = "Sortable:ng-sortable"; - angular.module("ng-sortable", []).constant("ngSortableVersion", "0.4.0").constant("ngSortableConfig", {}).directive("ngSortable", ["$parse", "ngSortableConfig", function($parse, ngSortableConfig) { - var removed, nextSibling, getSourceFactory = function(el, scope) { - var ngRepeat = [].filter.call(el.childNodes, function(node) { - return 8 === node.nodeType && -1 !== node.nodeValue.indexOf("ngRepeat:") - })[0]; - if (!ngRepeat) return function() { - return null - }; - ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/); - var itemsExpr = $parse(ngRepeat[2]); - return function() { - return itemsExpr(scope.$parent) || [] - } - }; - return { - restrict: "AC", - scope: { - ngSortable: "=?" - }, - link: function(scope, $el) { - function _emitEvent(evt, item) { - var name = "on" + evt.type.charAt(0).toUpperCase() + evt.type.substr(1), - source = getSource(); - options[name] && options[name]({ - model: item || source[evt.newIndex], - models: source, - oldIndex: evt.oldIndex, - newIndex: evt.newIndex - }) - } - - function _sync(evt) { - var items = getSource(); - if (items) { - var oldIndex = evt.oldIndex, - newIndex = evt.newIndex; - if (el !== evt.from) { - var prevItems = evt.from[expando](); - removed = prevItems[oldIndex], evt.clone ? (removed = angular.copy(removed), prevItems.splice(Sortable.utils.index(evt.clone), 0, prevItems.splice(oldIndex, 1)[0]), evt.from.removeChild(evt.clone)) : prevItems.splice(oldIndex, 1), items.splice(newIndex, 0, removed), evt.from.insertBefore(evt.item, nextSibling) - } else items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]); - scope.$apply() - } - } - var sortable, el = $el[0], - options = angular.extend(scope.ngSortable || {}, ngSortableConfig), - watchers = [], - getSource = getSourceFactory(el, scope); - el[expando] = getSource, sortable = Sortable.create(el, Object.keys(options).reduce(function(opts, name) { - return opts[name] = opts[name] || options[name], opts - }, { - onStart: function(evt) { - nextSibling = evt.item.nextSibling, _emitEvent(evt), scope.$apply() - }, - onEnd: function(evt) { - _emitEvent(evt, removed), scope.$apply() - }, - onAdd: function(evt) { - _sync(evt), _emitEvent(evt, removed), scope.$apply() - }, - onUpdate: function(evt) { - _sync(evt), _emitEvent(evt) - }, - onRemove: function(evt) { - _emitEvent(evt, removed) - }, - onSort: function(evt) { - _emitEvent(evt) - } - })), $el.on("$destroy", function() { - angular.forEach(watchers, function(unwatch) { - unwatch() - }), sortable.destroy(), el[expando] = null, el = null, watchers = null, sortable = null, nextSibling = null - }), angular.forEach(["sort", "disabled", "draggable", "handle", "animation", "group", "ghostClass", "filter", "onStart", "onEnd", "onAdd", "onUpdate", "onRemove", "onSort"], function(name) { - watchers.push(scope.$watch("ngSortable." + name, function(value) { - void 0 !== value && (options[name] = value, /^on[A-Z]/.test(name) || sortable.option(name, value)) - })) - }) - } - } - }]) -}); \ No newline at end of file diff --git a/src/bower_components/Sortable/react-sortable-mixin.js b/src/bower_components/Sortable/react-sortable-mixin.js deleted file mode 100644 index 27c20c1f05..0000000000 --- a/src/bower_components/Sortable/react-sortable-mixin.js +++ /dev/null @@ -1,71 +0,0 @@ -! function(factory) { - "use strict"; - "undefined" != typeof module && void 0 !== module.exports ? module.exports = factory(require("./Sortable")) : "function" == typeof define && define.amd ? define(["./Sortable"], factory) : window.SortableMixin = factory(Sortable) -}(function(Sortable) { - "use strict"; - - function _getModelName(component) { - return component.sortableOptions && component.sortableOptions.model || _defaultOptions.model - } - - function _getModelItems(component) { - var name = _getModelName(component); - return (component.state && component.state[name] || component.props[name]).slice() - } - - function _extend(dst, src) { - for (var key in src) src.hasOwnProperty(key) && (dst[key] = src[key]); - return dst - } - var _nextSibling, _activeComponent, _defaultOptions = { - ref: "list", - model: "items", - animation: 100, - onStart: "handleStart", - onEnd: "handleEnd", - onAdd: "handleAdd", - onUpdate: "handleUpdate", - onRemove: "handleRemove", - onSort: "handleSort", - onFilter: "handleFilter", - onMove: "handleMove" - }; - return { - sortableMixinVersion: "0.1.1", - _sortableInstance: null, - componentDidMount: function() { - var DOMNode, options = _extend(_extend({}, _defaultOptions), this.sortableOptions || {}), - copyOptions = _extend({}, options), - emitEvent = function(type, evt) { - var method = this[options[type]]; - method && method.call(this, evt, this._sortableInstance) - }.bind(this); - "onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(name) { - copyOptions[name] = function(evt) { - if ("onStart" === name) _nextSibling = evt.item.nextElementSibling, _activeComponent = this; - else if ("onAdd" === name || "onUpdate" === name) { - evt.from.insertBefore(evt.item, _nextSibling); - var remoteItems, item, newState = {}, - remoteState = {}, - oldIndex = evt.oldIndex, - newIndex = evt.newIndex, - items = _getModelItems(this); - "onAdd" === name ? (remoteItems = _getModelItems(_activeComponent), item = remoteItems.splice(oldIndex, 1)[0], items.splice(newIndex, 0, item), remoteState[_getModelName(_activeComponent)] = remoteItems) : items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]), newState[_getModelName(this)] = items, copyOptions.stateHandler ? this[copyOptions.stateHandler](newState) : this.setState(newState), this !== _activeComponent && _activeComponent.setState(remoteState) - } - setTimeout(function() { - emitEvent(name, evt) - }, 0) - }.bind(this) - }, this), DOMNode = this.getDOMNode() ? (this.refs[options.ref] || this).getDOMNode() : this.refs[options.ref] || this, this._sortableInstance = Sortable.create(DOMNode, copyOptions) - }, - componentWillReceiveProps: function(nextProps) { - var newState = {}, - modelName = _getModelName(this), - items = nextProps[modelName]; - items && (newState[modelName] = items, this.setState(newState)) - }, - componentWillUnmount: function() { - this._sortableInstance.destroy(), this._sortableInstance = null - } - } -}); \ No newline at end of file diff --git a/src/bower_components/Swiper/dist/css/swiper.min.css b/src/bower_components/Swiper/dist/css/swiper.min.css deleted file mode 100644 index ed26a82129..0000000000 --- a/src/bower_components/Swiper/dist/css/swiper.min.css +++ /dev/null @@ -1,582 +0,0 @@ -/** - * Swiper 3.3.1 - * Most modern mobile touch slider and framework with hardware accelerated transitions - * - * http://www.idangero.us/swiper/ - * - * Copyright 2016, Vladimir Kharlampidi - * The iDangero.us - * http://www.idangero.us/ - * - * Licensed under MIT - * - * Released on: February 7, 2016 - */ -.swiper-container { - margin: 0 auto; - position: relative; - overflow: hidden; - z-index: 1 -} - -.swiper-container-no-flexbox .swiper-slide { - float: left -} - -.swiper-container-vertical>.swiper-wrapper { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -ms-flex-direction: column; - -webkit-flex-direction: column; - flex-direction: column -} - -.swiper-wrapper { - position: relative; - width: 100%; - height: 100%; - z-index: 1; - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-transition-property: -webkit-transform; - -moz-transition-property: -moz-transform; - -o-transition-property: -o-transform; - -ms-transition-property: -ms-transform; - transition-property: transform; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box -} - -.swiper-container-android .swiper-slide, -.swiper-wrapper { - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0) -} - -.swiper-container-multirow>.swiper-wrapper { - -webkit-box-lines: multiple; - -moz-box-lines: multiple; - -ms-flex-wrap: wrap; - -webkit-flex-wrap: wrap; - flex-wrap: wrap -} - -.swiper-container-free-mode>.swiper-wrapper { - -webkit-transition-timing-function: ease-out; - -moz-transition-timing-function: ease-out; - -ms-transition-timing-function: ease-out; - -o-transition-timing-function: ease-out; - transition-timing-function: ease-out; - margin: 0 auto -} - -.swiper-slide { - -webkit-flex-shrink: 0; - -ms-flex: 0 0 auto; - flex-shrink: 0; - width: 100%; - height: 100%; - position: relative -} - -.swiper-container-autoheight, -.swiper-container-autoheight .swiper-slide { - height: auto -} - -.swiper-container-autoheight .swiper-wrapper { - -webkit-box-align: start; - -ms-flex-align: start; - -webkit-align-items: flex-start; - align-items: flex-start; - -webkit-transition-property: -webkit-transform, height; - -moz-transition-property: -moz-transform; - -o-transition-property: -o-transform; - -ms-transition-property: -ms-transform; - transition-property: transform, height -} - -.swiper-container .swiper-notification { - position: absolute; - left: 0; - top: 0; - pointer-events: none; - opacity: 0; - z-index: -1000 -} - -.swiper-wp8-horizontal { - -ms-touch-action: pan-y; - touch-action: pan-y -} - -.swiper-wp8-vertical { - -ms-touch-action: pan-x; - touch-action: pan-x -} - -.swiper-button-next, -.swiper-button-prev { - position: absolute; - top: 50%; - width: 27px; - height: 44px; - margin-top: -22px; - z-index: 10; - cursor: pointer; - -moz-background-size: 27px 44px; - -webkit-background-size: 27px 44px; - background-size: 27px 44px; - background-position: center; - background-repeat: no-repeat -} - -.swiper-button-next.swiper-button-disabled, -.swiper-button-prev.swiper-button-disabled { - opacity: .35; - cursor: auto; - pointer-events: none -} - -.swiper-button-prev, -.swiper-container-rtl .swiper-button-next { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); - left: 10px; - right: auto -} - -.swiper-button-prev.swiper-button-black, -.swiper-container-rtl .swiper-button-next.swiper-button-black { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E") -} - -.swiper-button-prev.swiper-button-white, -.swiper-container-rtl .swiper-button-next.swiper-button-white { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E") -} - -.swiper-button-next, -.swiper-container-rtl .swiper-button-prev { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); - right: 10px; - left: auto -} - -.swiper-button-next.swiper-button-black, -.swiper-container-rtl .swiper-button-prev.swiper-button-black { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E") -} - -.swiper-button-next.swiper-button-white, -.swiper-container-rtl .swiper-button-prev.swiper-button-white { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E") -} - -.swiper-pagination { - position: absolute; - text-align: center; - -webkit-transition: .3s; - -moz-transition: .3s; - -o-transition: .3s; - transition: .3s; - -webkit-transform: translate3d(0, 0, 0); - -ms-transform: translate3d(0, 0, 0); - -o-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - z-index: 10 -} - -.swiper-pagination.swiper-pagination-hidden { - opacity: 0 -} - -.swiper-container-horizontal>.swiper-pagination-bullets, -.swiper-pagination-custom, -.swiper-pagination-fraction { - bottom: 10px; - left: 0; - width: 100% -} - -.swiper-pagination-bullet { - width: 8px; - height: 8px; - display: inline-block; - border-radius: 100%; - background: #000; - opacity: .2 -} - -button.swiper-pagination-bullet { - border: none; - margin: 0; - padding: 0; - box-shadow: none; - -moz-appearance: none; - -ms-appearance: none; - -webkit-appearance: none; - appearance: none -} - -.swiper-pagination-clickable .swiper-pagination-bullet { - cursor: pointer -} - -.swiper-pagination-white .swiper-pagination-bullet { - background: #fff -} - -.swiper-pagination-bullet-active { - opacity: 1; - background: #007aff -} - -.swiper-pagination-white .swiper-pagination-bullet-active { - background: #fff -} - -.swiper-pagination-black .swiper-pagination-bullet-active { - background: #000 -} - -.swiper-container-vertical>.swiper-pagination-bullets { - right: 10px; - top: 50%; - -webkit-transform: translate3d(0, -50%, 0); - -moz-transform: translate3d(0, -50%, 0); - -o-transform: translate(0, -50%); - -ms-transform: translate3d(0, -50%, 0); - transform: translate3d(0, -50%, 0) -} - -.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet { - margin: 5px 0; - display: block -} - -.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet { - margin: 0 5px -} - -.swiper-pagination-progress { - background: rgba(0, 0, 0, .25); - position: absolute -} - -.swiper-pagination-progress .swiper-pagination-progressbar { - background: #007aff; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - -webkit-transform: scale(0); - -ms-transform: scale(0); - -o-transform: scale(0); - transform: scale(0); - -webkit-transform-origin: left top; - -moz-transform-origin: left top; - -ms-transform-origin: left top; - -o-transform-origin: left top; - transform-origin: left top -} - -.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar { - -webkit-transform-origin: right top; - -moz-transform-origin: right top; - -ms-transform-origin: right top; - -o-transform-origin: right top; - transform-origin: right top -} - -.swiper-container-horizontal>.swiper-pagination-progress { - width: 100%; - height: 4px; - left: 0; - top: 0 -} - -.swiper-container-vertical>.swiper-pagination-progress { - width: 4px; - height: 100%; - left: 0; - top: 0 -} - -.swiper-pagination-progress.swiper-pagination-white { - background: rgba(255, 255, 255, .5) -} - -.swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar { - background: #fff -} - -.swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar { - background: #000 -} - -.swiper-container-3d { - -webkit-perspective: 1200px; - -moz-perspective: 1200px; - -o-perspective: 1200px; - perspective: 1200px -} - -.swiper-container-3d .swiper-cube-shadow, -.swiper-container-3d .swiper-slide, -.swiper-container-3d .swiper-slide-shadow-bottom, -.swiper-container-3d .swiper-slide-shadow-left, -.swiper-container-3d .swiper-slide-shadow-right, -.swiper-container-3d .swiper-slide-shadow-top, -.swiper-container-3d .swiper-wrapper { - -webkit-transform-style: preserve-3d; - -moz-transform-style: preserve-3d; - -ms-transform-style: preserve-3d; - transform-style: preserve-3d -} - -.swiper-container-3d .swiper-slide-shadow-bottom, -.swiper-container-3d .swiper-slide-shadow-left, -.swiper-container-3d .swiper-slide-shadow-right, -.swiper-container-3d .swiper-slide-shadow-top { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: 10 -} - -.swiper-container-3d .swiper-slide-shadow-left { - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))); - background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -moz-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -o-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: linear-gradient(to left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) -} - -.swiper-container-3d .swiper-slide-shadow-right { - background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))); - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -moz-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) -} - -.swiper-container-3d .swiper-slide-shadow-top { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))); - background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) -} - -.swiper-container-3d .swiper-slide-shadow-bottom { - background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))); - background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -moz-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: -o-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); - background-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) -} - -.swiper-container-coverflow .swiper-wrapper, -.swiper-container-flip .swiper-wrapper { - -ms-perspective: 1200px -} - -.swiper-container-cube, -.swiper-container-flip { - overflow: visible -} - -.swiper-container-cube .swiper-slide, -.swiper-container-flip .swiper-slide { - pointer-events: none; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - backface-visibility: hidden; - z-index: 1 -} - -.swiper-container-cube .swiper-slide .swiper-slide, -.swiper-container-flip .swiper-slide .swiper-slide { - pointer-events: none -} - -.swiper-container-cube .swiper-slide-active, -.swiper-container-cube .swiper-slide-active .swiper-slide-active, -.swiper-container-flip .swiper-slide-active, -.swiper-container-flip .swiper-slide-active .swiper-slide-active { - pointer-events: auto -} - -.swiper-container-cube .swiper-slide-shadow-bottom, -.swiper-container-cube .swiper-slide-shadow-left, -.swiper-container-cube .swiper-slide-shadow-right, -.swiper-container-cube .swiper-slide-shadow-top, -.swiper-container-flip .swiper-slide-shadow-bottom, -.swiper-container-flip .swiper-slide-shadow-left, -.swiper-container-flip .swiper-slide-shadow-right, -.swiper-container-flip .swiper-slide-shadow-top { - z-index: 0; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - backface-visibility: hidden -} - -.swiper-container-cube .swiper-slide { - visibility: hidden; - -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - width: 100%; - height: 100% -} - -.swiper-container-cube.swiper-container-rtl .swiper-slide { - -webkit-transform-origin: 100% 0; - -moz-transform-origin: 100% 0; - -ms-transform-origin: 100% 0; - transform-origin: 100% 0 -} - -.swiper-container-cube .swiper-slide-active, -.swiper-container-cube .swiper-slide-next, -.swiper-container-cube .swiper-slide-next+.swiper-slide, -.swiper-container-cube .swiper-slide-prev { - pointer-events: auto; - visibility: visible -} - -.swiper-container-cube .swiper-cube-shadow { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 100%; - background: #000; - opacity: .6; - -webkit-filter: blur(50px); - filter: blur(50px); - z-index: 0 -} - -.swiper-container-fade.swiper-container-free-mode .swiper-slide { - -webkit-transition-timing-function: ease-out; - -moz-transition-timing-function: ease-out; - -ms-transition-timing-function: ease-out; - -o-transition-timing-function: ease-out; - transition-timing-function: ease-out -} - -.swiper-container-fade .swiper-slide { - pointer-events: none; - -webkit-transition-property: opacity; - -moz-transition-property: opacity; - -o-transition-property: opacity; - transition-property: opacity -} - -.swiper-container-fade .swiper-slide .swiper-slide { - pointer-events: none -} - -.swiper-container-fade .swiper-slide-active, -.swiper-container-fade .swiper-slide-active .swiper-slide-active { - pointer-events: auto -} - -.swiper-scrollbar { - border-radius: 10px; - position: relative; - -ms-touch-action: none; - background: rgba(0, 0, 0, .1) -} - -.swiper-container-horizontal>.swiper-scrollbar { - position: absolute; - left: 1%; - bottom: 3px; - z-index: 50; - height: 5px; - width: 98% -} - -.swiper-container-vertical>.swiper-scrollbar { - position: absolute; - right: 3px; - top: 1%; - z-index: 50; - width: 5px; - height: 98% -} - -.swiper-scrollbar-drag { - height: 100%; - width: 100%; - position: relative; - background: rgba(0, 0, 0, .5); - border-radius: 10px; - left: 0; - top: 0 -} - -.swiper-scrollbar-cursor-drag { - cursor: move -} - -.swiper-lazy-preloader { - width: 42px; - height: 42px; - position: absolute; - left: 50%; - top: 50%; - margin-left: -21px; - margin-top: -21px; - z-index: 10; - -webkit-transform-origin: 50%; - -moz-transform-origin: 50%; - transform-origin: 50%; - -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite; - -moz-animation: swiper-preloader-spin 1s steps(12, end) infinite; - animation: swiper-preloader-spin 1s steps(12, end) infinite -} - -.swiper-lazy-preloader:after { - display: block; - content: ""; - width: 100%; - height: 100%; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); - background-position: 50%; - -webkit-background-size: 100%; - background-size: 100%; - background-repeat: no-repeat -} - -.swiper-lazy-preloader-white:after { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") -} - -@-webkit-keyframes swiper-preloader-spin { - 100% { - -webkit-transform: rotate(360deg) - } -} - -@keyframes swiper-preloader-spin { - 100% { - transform: rotate(360deg) - } -} \ No newline at end of file diff --git a/src/bower_components/Swiper/dist/js/swiper.min.js b/src/bower_components/Swiper/dist/js/swiper.min.js deleted file mode 100644 index 7e1956e15a..0000000000 --- a/src/bower_components/Swiper/dist/js/swiper.min.js +++ /dev/null @@ -1,1606 +0,0 @@ -/** - * Swiper 3.3.1 - * Most modern mobile touch slider and framework with hardware accelerated transitions - * - * http://www.idangero.us/swiper/ - * - * Copyright 2016, Vladimir Kharlampidi - * The iDangero.us - * http://www.idangero.us/ - * - * Licensed under MIT - * - * Released on: February 7, 2016 - */ -! function() { - "use strict"; - - function e(e) { - e.fn.swiper = function(a) { - var r; - return e(this).each(function() { - var e = new t(this, a); - r || (r = e) - }), r - } - } - var a, t = function(e, i) { - function s(e) { - return Math.floor(e) - } - - function n() { - b.autoplayTimeoutId = setTimeout(function() { - b.params.loop ? (b.fixLoop(), b._slideNext(), b.emit("onAutoplay", b)) : b.isEnd ? i.autoplayStopOnLast ? b.stopAutoplay() : (b._slideTo(0), b.emit("onAutoplay", b)) : (b._slideNext(), b.emit("onAutoplay", b)) - }, b.params.autoplay) - } - - function o(e, t) { - var r = a(e.target); - if (!r.is(t)) - if ("string" == typeof t) r = r.parents(t); - else if (t.nodeType) { - var i; - return r.parents().each(function(e, a) { - a === t && (i = t) - }), i ? t : void 0 - } - if (0 !== r.length) return r[0] - } - - function l(e, a) { - a = a || {}; - var t = window.MutationObserver || window.WebkitMutationObserver, - r = new t(function(e) { - e.forEach(function(e) { - b.onResize(!0), b.emit("onObserverUpdate", b, e) - }) - }); - r.observe(e, { - attributes: "undefined" == typeof a.attributes ? !0 : a.attributes, - childList: "undefined" == typeof a.childList ? !0 : a.childList, - characterData: "undefined" == typeof a.characterData ? !0 : a.characterData - }), b.observers.push(r) - } - - function p(e) { - e.originalEvent && (e = e.originalEvent); - var a = e.keyCode || e.charCode; - if (!b.params.allowSwipeToNext && (b.isHorizontal() && 39 === a || !b.isHorizontal() && 40 === a)) return !1; - if (!b.params.allowSwipeToPrev && (b.isHorizontal() && 37 === a || !b.isHorizontal() && 38 === a)) return !1; - if (!(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || document.activeElement && document.activeElement.nodeName && ("input" === document.activeElement.nodeName.toLowerCase() || "textarea" === document.activeElement.nodeName.toLowerCase()))) { - if (37 === a || 39 === a || 38 === a || 40 === a) { - var t = !1; - if (b.container.parents(".swiper-slide").length > 0 && 0 === b.container.parents(".swiper-slide-active").length) return; - var r = { - left: window.pageXOffset, - top: window.pageYOffset - }, - i = window.innerWidth, - s = window.innerHeight, - n = b.container.offset(); - b.rtl && (n.left = n.left - b.container[0].scrollLeft); - for (var o = [ - [n.left, n.top], - [n.left + b.width, n.top], - [n.left, n.top + b.height], - [n.left + b.width, n.top + b.height] - ], l = 0; l < o.length; l++) { - var p = o[l]; - p[0] >= r.left && p[0] <= r.left + i && p[1] >= r.top && p[1] <= r.top + s && (t = !0) - } - if (!t) return - } - b.isHorizontal() ? ((37 === a || 39 === a) && (e.preventDefault ? e.preventDefault() : e.returnValue = !1), (39 === a && !b.rtl || 37 === a && b.rtl) && b.slideNext(), (37 === a && !b.rtl || 39 === a && b.rtl) && b.slidePrev()) : ((38 === a || 40 === a) && (e.preventDefault ? e.preventDefault() : e.returnValue = !1), 40 === a && b.slideNext(), 38 === a && b.slidePrev()) - } - } - - function d(e) { - e.originalEvent && (e = e.originalEvent); - var a = b.mousewheel.event, - t = 0, - r = b.rtl ? -1 : 1; - if ("mousewheel" === a) - if (b.params.mousewheelForceToAxis) - if (b.isHorizontal()) { - if (!(Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY))) return; - t = e.wheelDeltaX * r - } else { - if (!(Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX))) return; - t = e.wheelDeltaY - } - else t = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? -e.wheelDeltaX * r : -e.wheelDeltaY; - else if ("DOMMouseScroll" === a) t = -e.detail; - else if ("wheel" === a) - if (b.params.mousewheelForceToAxis) - if (b.isHorizontal()) { - if (!(Math.abs(e.deltaX) > Math.abs(e.deltaY))) return; - t = -e.deltaX * r - } else { - if (!(Math.abs(e.deltaY) > Math.abs(e.deltaX))) return; - t = -e.deltaY - } - else t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? -e.deltaX * r : -e.deltaY; - if (0 !== t) { - if (b.params.mousewheelInvert && (t = -t), b.params.freeMode) { - var i = b.getWrapperTranslate() + t * b.params.mousewheelSensitivity, - s = b.isBeginning, - n = b.isEnd; - if (i >= b.minTranslate() && (i = b.minTranslate()), i <= b.maxTranslate() && (i = b.maxTranslate()), b.setWrapperTransition(0), b.setWrapperTranslate(i), b.updateProgress(), b.updateActiveIndex(), (!s && b.isBeginning || !n && b.isEnd) && b.updateClasses(), b.params.freeModeSticky ? (clearTimeout(b.mousewheel.timeout), b.mousewheel.timeout = setTimeout(function() { - b.slideReset() - }, 300)) : b.params.lazyLoading && b.lazy && b.lazy.load(), 0 === i || i === b.maxTranslate()) return - } else { - if ((new window.Date).getTime() - b.mousewheel.lastScrollTime > 60) - if (0 > t) - if (b.isEnd && !b.params.loop || b.animating) { - if (b.params.mousewheelReleaseOnEdges) return !0 - } else b.slideNext(); - else if (b.isBeginning && !b.params.loop || b.animating) { - if (b.params.mousewheelReleaseOnEdges) return !0 - } else b.slidePrev(); - b.mousewheel.lastScrollTime = (new window.Date).getTime() - } - return b.params.autoplay && b.stopAutoplay(), e.preventDefault ? e.preventDefault() : e.returnValue = !1, !1 - } - } - - function u(e, t) { - e = a(e); - var r, i, s, n = b.rtl ? -1 : 1; - r = e.attr("data-swiper-parallax") || "0", i = e.attr("data-swiper-parallax-x"), s = e.attr("data-swiper-parallax-y"), i || s ? (i = i || "0", s = s || "0") : b.isHorizontal() ? (i = r, s = "0") : (s = r, i = "0"), i = i.indexOf("%") >= 0 ? parseInt(i, 10) * t * n + "%" : i * t * n + "px", s = s.indexOf("%") >= 0 ? parseInt(s, 10) * t + "%" : s * t + "px", e.transform("translate3d(" + i + ", " + s + ",0px)") - } - - function c(e) { - return 0 !== e.indexOf("on") && (e = e[0] !== e[0].toUpperCase() ? "on" + e[0].toUpperCase() + e.substring(1) : "on" + e), e - } - if (!(this instanceof t)) return new t(e, i); - var m = { - direction: "horizontal", - touchEventsTarget: "container", - initialSlide: 0, - speed: 300, - autoplay: !1, - autoplayDisableOnInteraction: !0, - autoplayStopOnLast: !1, - iOSEdgeSwipeDetection: !1, - iOSEdgeSwipeThreshold: 20, - freeMode: !1, - freeModeMomentum: !0, - freeModeMomentumRatio: 1, - freeModeMomentumBounce: !0, - freeModeMomentumBounceRatio: 1, - freeModeSticky: !1, - freeModeMinimumVelocity: .02, - autoHeight: !1, - setWrapperSize: !1, - virtualTranslate: !1, - effect: "slide", - coverflow: { - rotate: 50, - stretch: 0, - depth: 100, - modifier: 1, - slideShadows: !0 - }, - flip: { - slideShadows: !0, - limitRotation: !0 - }, - cube: { - slideShadows: !0, - shadow: !0, - shadowOffset: 20, - shadowScale: .94 - }, - fade: { - crossFade: !1 - }, - parallax: !1, - scrollbar: null, - scrollbarHide: !0, - scrollbarDraggable: !1, - scrollbarSnapOnRelease: !1, - keyboardControl: !1, - mousewheelControl: !1, - mousewheelReleaseOnEdges: !1, - mousewheelInvert: !1, - mousewheelForceToAxis: !1, - mousewheelSensitivity: 1, - hashnav: !1, - breakpoints: void 0, - spaceBetween: 0, - slidesPerView: 1, - slidesPerColumn: 1, - slidesPerColumnFill: "column", - slidesPerGroup: 1, - centeredSlides: !1, - slidesOffsetBefore: 0, - slidesOffsetAfter: 0, - roundLengths: !1, - touchRatio: 1, - touchAngle: 45, - simulateTouch: !0, - shortSwipes: !0, - longSwipes: !0, - longSwipesRatio: .5, - longSwipesMs: 300, - followFinger: !0, - onlyExternal: !1, - threshold: 0, - touchMoveStopPropagation: !0, - uniqueNavElements: !0, - pagination: null, - paginationElement: "span", - paginationClickable: !1, - paginationHide: !1, - paginationBulletRender: null, - paginationProgressRender: null, - paginationFractionRender: null, - paginationCustomRender: null, - paginationType: "bullets", - resistance: !0, - resistanceRatio: .85, - nextButton: null, - prevButton: null, - watchSlidesProgress: !1, - watchSlidesVisibility: !1, - grabCursor: !1, - preventClicks: !0, - preventClicksPropagation: !0, - slideToClickedSlide: !1, - lazyLoading: !1, - lazyLoadingInPrevNext: !1, - lazyLoadingInPrevNextAmount: 1, - lazyLoadingOnTransitionStart: !1, - preloadImages: !0, - updateOnImagesReady: !0, - loop: !1, - loopAdditionalSlides: 0, - loopedSlides: null, - control: void 0, - controlInverse: !1, - controlBy: "slide", - allowSwipeToPrev: !0, - allowSwipeToNext: !0, - swipeHandler: null, - noSwiping: !0, - noSwipingClass: "swiper-no-swiping", - slideClass: "swiper-slide", - slideActiveClass: "swiper-slide-active", - slideVisibleClass: "swiper-slide-visible", - slideDuplicateClass: "swiper-slide-duplicate", - slideNextClass: "swiper-slide-next", - slidePrevClass: "swiper-slide-prev", - wrapperClass: "swiper-wrapper", - bulletClass: "swiper-pagination-bullet", - bulletActiveClass: "swiper-pagination-bullet-active", - buttonDisabledClass: "swiper-button-disabled", - paginationCurrentClass: "swiper-pagination-current", - paginationTotalClass: "swiper-pagination-total", - paginationHiddenClass: "swiper-pagination-hidden", - paginationProgressbarClass: "swiper-pagination-progressbar", - observer: !1, - observeParents: !1, - a11y: !1, - prevSlideMessage: "Previous slide", - nextSlideMessage: "Next slide", - firstSlideMessage: "This is the first slide", - lastSlideMessage: "This is the last slide", - paginationBulletMessage: "Go to slide {{index}}", - runCallbacksOnInit: !0 - }, - h = i && i.virtualTranslate; - i = i || {}; - var f = {}; - for (var g in i) - if ("object" != typeof i[g] || null === i[g] || (i[g].nodeType || i[g] === window || i[g] === document || "undefined" != typeof r && i[g] instanceof r || "undefined" != typeof jQuery && i[g] instanceof jQuery)) f[g] = i[g]; - else { - f[g] = {}; - for (var v in i[g]) f[g][v] = i[g][v] - } for (var w in m) - if ("undefined" == typeof i[w]) i[w] = m[w]; - else if ("object" == typeof i[w]) - for (var y in m[w]) "undefined" == typeof i[w][y] && (i[w][y] = m[w][y]); - var b = this; - if (b.params = i, b.originalParams = f, b.classNames = [], "undefined" != typeof a && "undefined" != typeof r && (a = r), ("undefined" != typeof a || (a = "undefined" == typeof r ? window.Dom7 || window.Zepto || window.jQuery : r)) && (b.$ = a, b.currentBreakpoint = void 0, b.getActiveBreakpoint = function() { - if (!b.params.breakpoints) return !1; - var e, a = !1, - t = []; - for (e in b.params.breakpoints) b.params.breakpoints.hasOwnProperty(e) && t.push(e); - t.sort(function(e, a) { - return parseInt(e, 10) > parseInt(a, 10) - }); - for (var r = 0; r < t.length; r++) e = t[r], e >= window.innerWidth && !a && (a = e); - return a || "max" - }, b.setBreakpoint = function() { - var e = b.getActiveBreakpoint(); - if (e && b.currentBreakpoint !== e) { - var a = e in b.params.breakpoints ? b.params.breakpoints[e] : b.originalParams, - t = b.params.loop && a.slidesPerView !== b.params.slidesPerView; - for (var r in a) b.params[r] = a[r]; - b.currentBreakpoint = e, t && b.destroyLoop && b.reLoop(!0) - } - }, b.params.breakpoints && b.setBreakpoint(), b.container = a(e), 0 !== b.container.length)) { - if (b.container.length > 1) { - var x = []; - return b.container.each(function() { - x.push(new t(this, i)) - }), x - } - b.container[0].swiper = b, b.container.data("swiper", b), b.classNames.push("swiper-container-" + b.params.direction), b.params.freeMode && b.classNames.push("swiper-container-free-mode"), b.support.flexbox || (b.classNames.push("swiper-container-no-flexbox"), b.params.slidesPerColumn = 1), b.params.autoHeight && b.classNames.push("swiper-container-autoheight"), (b.params.parallax || b.params.watchSlidesVisibility) && (b.params.watchSlidesProgress = !0), ["cube", "coverflow", "flip"].indexOf(b.params.effect) >= 0 && (b.support.transforms3d ? (b.params.watchSlidesProgress = !0, b.classNames.push("swiper-container-3d")) : b.params.effect = "slide"), "slide" !== b.params.effect && b.classNames.push("swiper-container-" + b.params.effect), "cube" === b.params.effect && (b.params.resistanceRatio = 0, b.params.slidesPerView = 1, b.params.slidesPerColumn = 1, b.params.slidesPerGroup = 1, b.params.centeredSlides = !1, b.params.spaceBetween = 0, b.params.virtualTranslate = !0, b.params.setWrapperSize = !1), ("fade" === b.params.effect || "flip" === b.params.effect) && (b.params.slidesPerView = 1, b.params.slidesPerColumn = 1, b.params.slidesPerGroup = 1, b.params.watchSlidesProgress = !0, b.params.spaceBetween = 0, b.params.setWrapperSize = !1, "undefined" == typeof h && (b.params.virtualTranslate = !0)), b.params.grabCursor && b.support.touch && (b.params.grabCursor = !1), b.wrapper = b.container.children("." + b.params.wrapperClass), b.params.pagination && (b.paginationContainer = a(b.params.pagination), b.params.uniqueNavElements && "string" == typeof b.params.pagination && b.paginationContainer.length > 1 && 1 === b.container.find(b.params.pagination).length && (b.paginationContainer = b.container.find(b.params.pagination)), "bullets" === b.params.paginationType && b.params.paginationClickable ? b.paginationContainer.addClass("swiper-pagination-clickable") : b.params.paginationClickable = !1, b.paginationContainer.addClass("swiper-pagination-" + b.params.paginationType)), (b.params.nextButton || b.params.prevButton) && (b.params.nextButton && (b.nextButton = a(b.params.nextButton), b.params.uniqueNavElements && "string" == typeof b.params.nextButton && b.nextButton.length > 1 && 1 === b.container.find(b.params.nextButton).length && (b.nextButton = b.container.find(b.params.nextButton))), b.params.prevButton && (b.prevButton = a(b.params.prevButton), b.params.uniqueNavElements && "string" == typeof b.params.prevButton && b.prevButton.length > 1 && 1 === b.container.find(b.params.prevButton).length && (b.prevButton = b.container.find(b.params.prevButton)))), b.isHorizontal = function() { - return "horizontal" === b.params.direction - }, b.rtl = b.isHorizontal() && ("rtl" === b.container[0].dir.toLowerCase() || "rtl" === b.container.css("direction")), b.rtl && b.classNames.push("swiper-container-rtl"), b.rtl && (b.wrongRTL = "-webkit-box" === b.wrapper.css("display")), b.params.slidesPerColumn > 1 && b.classNames.push("swiper-container-multirow"), b.device.android && b.classNames.push("swiper-container-android"), b.container.addClass(b.classNames.join(" ")), b.translate = 0, b.progress = 0, b.velocity = 0, b.lockSwipeToNext = function() { - b.params.allowSwipeToNext = !1 - }, b.lockSwipeToPrev = function() { - b.params.allowSwipeToPrev = !1 - }, b.lockSwipes = function() { - b.params.allowSwipeToNext = b.params.allowSwipeToPrev = !1 - }, b.unlockSwipeToNext = function() { - b.params.allowSwipeToNext = !0 - }, b.unlockSwipeToPrev = function() { - b.params.allowSwipeToPrev = !0 - }, b.unlockSwipes = function() { - b.params.allowSwipeToNext = b.params.allowSwipeToPrev = !0 - }, b.params.grabCursor && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grab", b.container[0].style.cursor = "-moz-grab", b.container[0].style.cursor = "grab"), b.imagesToLoad = [], b.imagesLoaded = 0, b.loadImage = function(e, a, t, r, i) { - function s() { - i && i() - } - var n; - e.complete && r ? s() : a ? (n = new window.Image, n.onload = s, n.onerror = s, t && (n.srcset = t), a && (n.src = a)) : s() - }, b.preloadImages = function() { - function e() { - "undefined" != typeof b && null !== b && (void 0 !== b.imagesLoaded && b.imagesLoaded++, b.imagesLoaded === b.imagesToLoad.length && (b.params.updateOnImagesReady && b.update(), b.emit("onImagesReady", b))) - } - b.imagesToLoad = b.container.find("img"); - for (var a = 0; a < b.imagesToLoad.length; a++) b.loadImage(b.imagesToLoad[a], b.imagesToLoad[a].currentSrc || b.imagesToLoad[a].getAttribute("src"), b.imagesToLoad[a].srcset || b.imagesToLoad[a].getAttribute("srcset"), !0, e) - }, b.autoplayTimeoutId = void 0, b.autoplaying = !1, b.autoplayPaused = !1, b.startAutoplay = function() { - return "undefined" != typeof b.autoplayTimeoutId ? !1 : b.params.autoplay ? b.autoplaying ? !1 : (b.autoplaying = !0, b.emit("onAutoplayStart", b), void n()) : !1 - }, b.stopAutoplay = function(e) { - b.autoplayTimeoutId && (b.autoplayTimeoutId && clearTimeout(b.autoplayTimeoutId), b.autoplaying = !1, b.autoplayTimeoutId = void 0, b.emit("onAutoplayStop", b)) - }, b.pauseAutoplay = function(e) { - b.autoplayPaused || (b.autoplayTimeoutId && clearTimeout(b.autoplayTimeoutId), b.autoplayPaused = !0, 0 === e ? (b.autoplayPaused = !1, n()) : b.wrapper.transitionEnd(function() { - b && (b.autoplayPaused = !1, b.autoplaying ? n() : b.stopAutoplay()) - })) - }, b.minTranslate = function() { - return -b.snapGrid[0] - }, b.maxTranslate = function() { - return -b.snapGrid[b.snapGrid.length - 1] - }, b.updateAutoHeight = function() { - var e = b.slides.eq(b.activeIndex)[0]; - if ("undefined" != typeof e) { - var a = e.offsetHeight; - a && b.wrapper.css("height", a + "px") - } - }, b.updateContainerSize = function() { - var e, a; - e = "undefined" != typeof b.params.width ? b.params.width : b.container[0].clientWidth, a = "undefined" != typeof b.params.height ? b.params.height : b.container[0].clientHeight, 0 === e && b.isHorizontal() || 0 === a && !b.isHorizontal() || (e = e - parseInt(b.container.css("padding-left"), 10) - parseInt(b.container.css("padding-right"), 10), a = a - parseInt(b.container.css("padding-top"), 10) - parseInt(b.container.css("padding-bottom"), 10), b.width = e, b.height = a, b.size = b.isHorizontal() ? b.width : b.height) - }, b.updateSlidesSize = function() { - b.slides = b.wrapper.children("." + b.params.slideClass), b.snapGrid = [], b.slidesGrid = [], b.slidesSizesGrid = []; - var e, a = b.params.spaceBetween, - t = -b.params.slidesOffsetBefore, - r = 0, - i = 0; - if ("undefined" != typeof b.size) { - "string" == typeof a && a.indexOf("%") >= 0 && (a = parseFloat(a.replace("%", "")) / 100 * b.size), b.virtualSize = -a, b.rtl ? b.slides.css({ - marginLeft: "", - marginTop: "" - }) : b.slides.css({ - marginRight: "", - marginBottom: "" - }); - var n; - b.params.slidesPerColumn > 1 && (n = Math.floor(b.slides.length / b.params.slidesPerColumn) === b.slides.length / b.params.slidesPerColumn ? b.slides.length : Math.ceil(b.slides.length / b.params.slidesPerColumn) * b.params.slidesPerColumn, "auto" !== b.params.slidesPerView && "row" === b.params.slidesPerColumnFill && (n = Math.max(n, b.params.slidesPerView * b.params.slidesPerColumn))); - var o, l = b.params.slidesPerColumn, - p = n / l, - d = p - (b.params.slidesPerColumn * p - b.slides.length); - for (e = 0; e < b.slides.length; e++) { - o = 0; - var u = b.slides.eq(e); - if (b.params.slidesPerColumn > 1) { - var c, m, h; - "column" === b.params.slidesPerColumnFill ? (m = Math.floor(e / l), h = e - m * l, (m > d || m === d && h === l - 1) && ++h >= l && (h = 0, m++), c = m + h * n / l, u.css({ - "-webkit-box-ordinal-group": c, - "-moz-box-ordinal-group": c, - "-ms-flex-order": c, - "-webkit-order": c, - order: c - })) : (h = Math.floor(e / p), m = e - h * p), u.css({ - "margin-top": 0 !== h && b.params.spaceBetween && b.params.spaceBetween + "px" - }).attr("data-swiper-column", m).attr("data-swiper-row", h) - } - "none" !== u.css("display") && ("auto" === b.params.slidesPerView ? (o = b.isHorizontal() ? u.outerWidth(!0) : u.outerHeight(!0), b.params.roundLengths && (o = s(o))) : (o = (b.size - (b.params.slidesPerView - 1) * a) / b.params.slidesPerView, b.params.roundLengths && (o = s(o)), b.isHorizontal() ? b.slides[e].style.width = o + "px" : b.slides[e].style.height = o + "px"), b.slides[e].swiperSlideSize = o, b.slidesSizesGrid.push(o), b.params.centeredSlides ? (t = t + o / 2 + r / 2 + a, 0 === e && (t = t - b.size / 2 - a), Math.abs(t) < .001 && (t = 0), i % b.params.slidesPerGroup === 0 && b.snapGrid.push(t), b.slidesGrid.push(t)) : (i % b.params.slidesPerGroup === 0 && b.snapGrid.push(t), b.slidesGrid.push(t), t = t + o + a), b.virtualSize += o + a, r = o, i++) - } - b.virtualSize = Math.max(b.virtualSize, b.size) + b.params.slidesOffsetAfter; - var f; - if (b.rtl && b.wrongRTL && ("slide" === b.params.effect || "coverflow" === b.params.effect) && b.wrapper.css({ - width: b.virtualSize + b.params.spaceBetween + "px" - }), (!b.support.flexbox || b.params.setWrapperSize) && (b.isHorizontal() ? b.wrapper.css({ - width: b.virtualSize + b.params.spaceBetween + "px" - }) : b.wrapper.css({ - height: b.virtualSize + b.params.spaceBetween + "px" - })), b.params.slidesPerColumn > 1 && (b.virtualSize = (o + b.params.spaceBetween) * n, b.virtualSize = Math.ceil(b.virtualSize / b.params.slidesPerColumn) - b.params.spaceBetween, b.wrapper.css({ - width: b.virtualSize + b.params.spaceBetween + "px" - }), b.params.centeredSlides)) { - for (f = [], e = 0; e < b.snapGrid.length; e++) b.snapGrid[e] < b.virtualSize + b.snapGrid[0] && f.push(b.snapGrid[e]); - b.snapGrid = f - } - if (!b.params.centeredSlides) { - for (f = [], e = 0; e < b.snapGrid.length; e++) b.snapGrid[e] <= b.virtualSize - b.size && f.push(b.snapGrid[e]); - b.snapGrid = f, Math.floor(b.virtualSize - b.size) - Math.floor(b.snapGrid[b.snapGrid.length - 1]) > 1 && b.snapGrid.push(b.virtualSize - b.size) - } - 0 === b.snapGrid.length && (b.snapGrid = [0]), 0 !== b.params.spaceBetween && (b.isHorizontal() ? b.rtl ? b.slides.css({ - marginLeft: a + "px" - }) : b.slides.css({ - marginRight: a + "px" - }) : b.slides.css({ - marginBottom: a + "px" - })), b.params.watchSlidesProgress && b.updateSlidesOffset() - } - }, b.updateSlidesOffset = function() { - for (var e = 0; e < b.slides.length; e++) b.slides[e].swiperSlideOffset = b.isHorizontal() ? b.slides[e].offsetLeft : b.slides[e].offsetTop - }, b.updateSlidesProgress = function(e) { - if ("undefined" == typeof e && (e = b.translate || 0), 0 !== b.slides.length) { - "undefined" == typeof b.slides[0].swiperSlideOffset && b.updateSlidesOffset(); - var a = -e; - b.rtl && (a = e), b.slides.removeClass(b.params.slideVisibleClass); - for (var t = 0; t < b.slides.length; t++) { - var r = b.slides[t], - i = (a - r.swiperSlideOffset) / (r.swiperSlideSize + b.params.spaceBetween); - if (b.params.watchSlidesVisibility) { - var s = -(a - r.swiperSlideOffset), - n = s + b.slidesSizesGrid[t], - o = s >= 0 && s < b.size || n > 0 && n <= b.size || 0 >= s && n >= b.size; - o && b.slides.eq(t).addClass(b.params.slideVisibleClass) - } - r.progress = b.rtl ? -i : i - } - } - }, b.updateProgress = function(e) { - "undefined" == typeof e && (e = b.translate || 0); - var a = b.maxTranslate() - b.minTranslate(), - t = b.isBeginning, - r = b.isEnd; - 0 === a ? (b.progress = 0, b.isBeginning = b.isEnd = !0) : (b.progress = (e - b.minTranslate()) / a, b.isBeginning = b.progress <= 0, b.isEnd = b.progress >= 1), b.isBeginning && !t && b.emit("onReachBeginning", b), b.isEnd && !r && b.emit("onReachEnd", b), b.params.watchSlidesProgress && b.updateSlidesProgress(e), b.emit("onProgress", b, b.progress) - }, b.updateActiveIndex = function() { - var e, a, t, r = b.rtl ? b.translate : -b.translate; - for (a = 0; a < b.slidesGrid.length; a++) "undefined" != typeof b.slidesGrid[a + 1] ? r >= b.slidesGrid[a] && r < b.slidesGrid[a + 1] - (b.slidesGrid[a + 1] - b.slidesGrid[a]) / 2 ? e = a : r >= b.slidesGrid[a] && r < b.slidesGrid[a + 1] && (e = a + 1) : r >= b.slidesGrid[a] && (e = a); - (0 > e || "undefined" == typeof e) && (e = 0), t = Math.floor(e / b.params.slidesPerGroup), t >= b.snapGrid.length && (t = b.snapGrid.length - 1), e !== b.activeIndex && (b.snapIndex = t, b.previousIndex = b.activeIndex, b.activeIndex = e, b.updateClasses()) - }, b.updateClasses = function() { - b.slides.removeClass(b.params.slideActiveClass + " " + b.params.slideNextClass + " " + b.params.slidePrevClass); - var e = b.slides.eq(b.activeIndex); - e.addClass(b.params.slideActiveClass); - var t = e.next("." + b.params.slideClass).addClass(b.params.slideNextClass); - b.params.loop && 0 === t.length && b.slides.eq(0).addClass(b.params.slideNextClass); - var r = e.prev("." + b.params.slideClass).addClass(b.params.slidePrevClass); - if (b.params.loop && 0 === r.length && b.slides.eq(-1).addClass(b.params.slidePrevClass), b.paginationContainer && b.paginationContainer.length > 0) { - var i, s = b.params.loop ? Math.ceil((b.slides.length - 2 * b.loopedSlides) / b.params.slidesPerGroup) : b.snapGrid.length; - if (b.params.loop ? (i = Math.ceil((b.activeIndex - b.loopedSlides) / b.params.slidesPerGroup), i > b.slides.length - 1 - 2 * b.loopedSlides && (i -= b.slides.length - 2 * b.loopedSlides), i > s - 1 && (i -= s), 0 > i && "bullets" !== b.params.paginationType && (i = s + i)) : i = "undefined" != typeof b.snapIndex ? b.snapIndex : b.activeIndex || 0, "bullets" === b.params.paginationType && b.bullets && b.bullets.length > 0 && (b.bullets.removeClass(b.params.bulletActiveClass), b.paginationContainer.length > 1 ? b.bullets.each(function() { - a(this).index() === i && a(this).addClass(b.params.bulletActiveClass) - }) : b.bullets.eq(i).addClass(b.params.bulletActiveClass)), "fraction" === b.params.paginationType && (b.paginationContainer.find("." + b.params.paginationCurrentClass).text(i + 1), b.paginationContainer.find("." + b.params.paginationTotalClass).text(s)), "progress" === b.params.paginationType) { - var n = (i + 1) / s, - o = n, - l = 1; - b.isHorizontal() || (l = n, o = 1), b.paginationContainer.find("." + b.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX(" + o + ") scaleY(" + l + ")").transition(b.params.speed) - } - "custom" === b.params.paginationType && b.params.paginationCustomRender && (b.paginationContainer.html(b.params.paginationCustomRender(b, i + 1, s)), b.emit("onPaginationRendered", b, b.paginationContainer[0])) - } - b.params.loop || (b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.isBeginning ? (b.prevButton.addClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.disable(b.prevButton)) : (b.prevButton.removeClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.enable(b.prevButton))), b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.isEnd ? (b.nextButton.addClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.disable(b.nextButton)) : (b.nextButton.removeClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.enable(b.nextButton)))) - }, b.updatePagination = function() { - if (b.params.pagination && b.paginationContainer && b.paginationContainer.length > 0) { - var e = ""; - if ("bullets" === b.params.paginationType) { - for (var a = b.params.loop ? Math.ceil((b.slides.length - 2 * b.loopedSlides) / b.params.slidesPerGroup) : b.snapGrid.length, t = 0; a > t; t++) e += b.params.paginationBulletRender ? b.params.paginationBulletRender(t, b.params.bulletClass) : "<" + b.params.paginationElement + ' class="' + b.params.bulletClass + '">"; - b.paginationContainer.html(e), b.bullets = b.paginationContainer.find("." + b.params.bulletClass), b.params.paginationClickable && b.params.a11y && b.a11y && b.a11y.initPagination() - } - "fraction" === b.params.paginationType && (e = b.params.paginationFractionRender ? b.params.paginationFractionRender(b, b.params.paginationCurrentClass, b.params.paginationTotalClass) : ' / ', b.paginationContainer.html(e)), "progress" === b.params.paginationType && (e = b.params.paginationProgressRender ? b.params.paginationProgressRender(b, b.params.paginationProgressbarClass) : '', b.paginationContainer.html(e)), "custom" !== b.params.paginationType && b.emit("onPaginationRendered", b, b.paginationContainer[0]) - } - }, b.update = function(e) { - function a() { - r = Math.min(Math.max(b.translate, b.maxTranslate()), b.minTranslate()), b.setWrapperTranslate(r), b.updateActiveIndex(), b.updateClasses() - } - if (b.updateContainerSize(), b.updateSlidesSize(), b.updateProgress(), b.updatePagination(), b.updateClasses(), b.params.scrollbar && b.scrollbar && b.scrollbar.set(), e) { - var t, r; - b.controller && b.controller.spline && (b.controller.spline = void 0), b.params.freeMode ? (a(), b.params.autoHeight && b.updateAutoHeight()) : (t = ("auto" === b.params.slidesPerView || b.params.slidesPerView > 1) && b.isEnd && !b.params.centeredSlides ? b.slideTo(b.slides.length - 1, 0, !1, !0) : b.slideTo(b.activeIndex, 0, !1, !0), t || a()) - } else b.params.autoHeight && b.updateAutoHeight() - }, b.onResize = function(e) { - b.params.breakpoints && b.setBreakpoint(); - var a = b.params.allowSwipeToPrev, - t = b.params.allowSwipeToNext; - b.params.allowSwipeToPrev = b.params.allowSwipeToNext = !0, b.updateContainerSize(), b.updateSlidesSize(), ("auto" === b.params.slidesPerView || b.params.freeMode || e) && b.updatePagination(), b.params.scrollbar && b.scrollbar && b.scrollbar.set(), b.controller && b.controller.spline && (b.controller.spline = void 0); - var r = !1; - if (b.params.freeMode) { - var i = Math.min(Math.max(b.translate, b.maxTranslate()), b.minTranslate()); - b.setWrapperTranslate(i), b.updateActiveIndex(), b.updateClasses(), b.params.autoHeight && b.updateAutoHeight() - } else b.updateClasses(), r = ("auto" === b.params.slidesPerView || b.params.slidesPerView > 1) && b.isEnd && !b.params.centeredSlides ? b.slideTo(b.slides.length - 1, 0, !1, !0) : b.slideTo(b.activeIndex, 0, !1, !0); - b.params.lazyLoading && !r && b.lazy && b.lazy.load(), b.params.allowSwipeToPrev = a, b.params.allowSwipeToNext = t - }; - var T = ["mousedown", "mousemove", "mouseup"]; - window.navigator.pointerEnabled ? T = ["pointerdown", "pointermove", "pointerup"] : window.navigator.msPointerEnabled && (T = ["MSPointerDown", "MSPointerMove", "MSPointerUp"]), b.touchEvents = { - start: b.support.touch || !b.params.simulateTouch ? "touchstart" : T[0], - move: b.support.touch || !b.params.simulateTouch ? "touchmove" : T[1], - end: b.support.touch || !b.params.simulateTouch ? "touchend" : T[2] - }, (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && ("container" === b.params.touchEventsTarget ? b.container : b.wrapper).addClass("swiper-wp8-" + b.params.direction), b.initEvents = function(e) { - var a = e ? "off" : "on", - t = e ? "removeEventListener" : "addEventListener", - r = "container" === b.params.touchEventsTarget ? b.container[0] : b.wrapper[0], - s = b.support.touch ? r : document, - n = b.params.nested ? !0 : !1; - b.browser.ie ? (r[t](b.touchEvents.start, b.onTouchStart, !1), s[t](b.touchEvents.move, b.onTouchMove, n), s[t](b.touchEvents.end, b.onTouchEnd, !1)) : (b.support.touch && (r[t](b.touchEvents.start, b.onTouchStart, !1), r[t](b.touchEvents.move, b.onTouchMove, n), r[t](b.touchEvents.end, b.onTouchEnd, !1)), !i.simulateTouch || b.device.ios || b.device.android || (r[t]("mousedown", b.onTouchStart, !1), document[t]("mousemove", b.onTouchMove, n), document[t]("mouseup", b.onTouchEnd, !1))), window[t]("resize", b.onResize), b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.nextButton[a]("click", b.onClickNext), b.params.a11y && b.a11y && b.nextButton[a]("keydown", b.a11y.onEnterKey)), b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.prevButton[a]("click", b.onClickPrev), b.params.a11y && b.a11y && b.prevButton[a]("keydown", b.a11y.onEnterKey)), b.params.pagination && b.params.paginationClickable && (b.paginationContainer[a]("click", "." + b.params.bulletClass, b.onClickIndex), b.params.a11y && b.a11y && b.paginationContainer[a]("keydown", "." + b.params.bulletClass, b.a11y.onEnterKey)), (b.params.preventClicks || b.params.preventClicksPropagation) && r[t]("click", b.preventClicks, !0) - }, b.attachEvents = function() { - b.initEvents() - }, b.detachEvents = function() { - b.initEvents(!0) - }, b.allowClick = !0, b.preventClicks = function(e) { - b.allowClick || (b.params.preventClicks && e.preventDefault(), b.params.preventClicksPropagation && b.animating && (e.stopPropagation(), e.stopImmediatePropagation())) - }, b.onClickNext = function(e) { - e.preventDefault(), (!b.isEnd || b.params.loop) && b.slideNext() - }, b.onClickPrev = function(e) { - e.preventDefault(), (!b.isBeginning || b.params.loop) && b.slidePrev() - }, b.onClickIndex = function(e) { - e.preventDefault(); - var t = a(this).index() * b.params.slidesPerGroup; - b.params.loop && (t += b.loopedSlides), b.slideTo(t) - }, b.updateClickedSlide = function(e) { - var t = o(e, "." + b.params.slideClass), - r = !1; - if (t) - for (var i = 0; i < b.slides.length; i++) b.slides[i] === t && (r = !0); - if (!t || !r) return b.clickedSlide = void 0, void(b.clickedIndex = void 0); - if (b.clickedSlide = t, b.clickedIndex = a(t).index(), b.params.slideToClickedSlide && void 0 !== b.clickedIndex && b.clickedIndex !== b.activeIndex) { - var s, n = b.clickedIndex; - if (b.params.loop) { - if (b.animating) return; - s = a(b.clickedSlide).attr("data-swiper-slide-index"), b.params.centeredSlides ? n < b.loopedSlides - b.params.slidesPerView / 2 || n > b.slides.length - b.loopedSlides + b.params.slidesPerView / 2 ? (b.fixLoop(), n = b.wrapper.children("." + b.params.slideClass + '[data-swiper-slide-index="' + s + '"]:not(.swiper-slide-duplicate)').eq(0).index(), setTimeout(function() { - b.slideTo(n) - }, 0)) : b.slideTo(n) : n > b.slides.length - b.params.slidesPerView ? (b.fixLoop(), n = b.wrapper.children("." + b.params.slideClass + '[data-swiper-slide-index="' + s + '"]:not(.swiper-slide-duplicate)').eq(0).index(), setTimeout(function() { - b.slideTo(n) - }, 0)) : b.slideTo(n) - } else b.slideTo(n) - } - }; - var S, C, z, M, E, P, k, I, L, B, D = "input, select, textarea, button", - H = Date.now(), - A = []; - b.animating = !1, b.touches = { - startX: 0, - startY: 0, - currentX: 0, - currentY: 0, - diff: 0 - }; - var G, O; - if (b.onTouchStart = function(e) { - if (e.originalEvent && (e = e.originalEvent), G = "touchstart" === e.type, G || !("which" in e) || 3 !== e.which) { - if (b.params.noSwiping && o(e, "." + b.params.noSwipingClass)) return void(b.allowClick = !0); - if (!b.params.swipeHandler || o(e, b.params.swipeHandler)) { - var t = b.touches.currentX = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX, - r = b.touches.currentY = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY; - if (!(b.device.ios && b.params.iOSEdgeSwipeDetection && t <= b.params.iOSEdgeSwipeThreshold)) { - if (S = !0, C = !1, z = !0, E = void 0, O = void 0, b.touches.startX = t, b.touches.startY = r, M = Date.now(), b.allowClick = !0, b.updateContainerSize(), b.swipeDirection = void 0, b.params.threshold > 0 && (I = !1), "touchstart" !== e.type) { - var i = !0; - a(e.target).is(D) && (i = !1), document.activeElement && a(document.activeElement).is(D) && document.activeElement.blur(), i && e.preventDefault() - } - b.emit("onTouchStart", b, e) - } - } - } - }, b.onTouchMove = function(e) { - if (e.originalEvent && (e = e.originalEvent), !G || "mousemove" !== e.type) { - if (e.preventedByNestedSwiper) return b.touches.startX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, void(b.touches.startY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY); - if (b.params.onlyExternal) return b.allowClick = !1, void(S && (b.touches.startX = b.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, b.touches.startY = b.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, M = Date.now())); - if (G && document.activeElement && e.target === document.activeElement && a(e.target).is(D)) return C = !0, void(b.allowClick = !1); - if (z && b.emit("onTouchMove", b, e), !(e.targetTouches && e.targetTouches.length > 1)) { - if (b.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, b.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, "undefined" == typeof E) { - var t = 180 * Math.atan2(Math.abs(b.touches.currentY - b.touches.startY), Math.abs(b.touches.currentX - b.touches.startX)) / Math.PI; - E = b.isHorizontal() ? t > b.params.touchAngle : 90 - t > b.params.touchAngle - } - if (E && b.emit("onTouchMoveOpposite", b, e), "undefined" == typeof O && b.browser.ieTouch && (b.touches.currentX !== b.touches.startX || b.touches.currentY !== b.touches.startY) && (O = !0), S) { - if (E) return void(S = !1); - if (O || !b.browser.ieTouch) { - b.allowClick = !1, b.emit("onSliderMove", b, e), e.preventDefault(), b.params.touchMoveStopPropagation && !b.params.nested && e.stopPropagation(), C || (i.loop && b.fixLoop(), k = b.getWrapperTranslate(), b.setWrapperTransition(0), b.animating && b.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"), b.params.autoplay && b.autoplaying && (b.params.autoplayDisableOnInteraction ? b.stopAutoplay() : b.pauseAutoplay()), B = !1, b.params.grabCursor && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grabbing", b.container[0].style.cursor = "-moz-grabbin", b.container[0].style.cursor = "grabbing")), C = !0; - var r = b.touches.diff = b.isHorizontal() ? b.touches.currentX - b.touches.startX : b.touches.currentY - b.touches.startY; - r *= b.params.touchRatio, b.rtl && (r = -r), b.swipeDirection = r > 0 ? "prev" : "next", P = r + k; - var s = !0; - if (r > 0 && P > b.minTranslate() ? (s = !1, b.params.resistance && (P = b.minTranslate() - 1 + Math.pow(-b.minTranslate() + k + r, b.params.resistanceRatio))) : 0 > r && P < b.maxTranslate() && (s = !1, b.params.resistance && (P = b.maxTranslate() + 1 - Math.pow(b.maxTranslate() - k - r, b.params.resistanceRatio))), - s && (e.preventedByNestedSwiper = !0), !b.params.allowSwipeToNext && "next" === b.swipeDirection && k > P && (P = k), !b.params.allowSwipeToPrev && "prev" === b.swipeDirection && P > k && (P = k), b.params.followFinger) { - if (b.params.threshold > 0) { - if (!(Math.abs(r) > b.params.threshold || I)) return void(P = k); - if (!I) return I = !0, b.touches.startX = b.touches.currentX, b.touches.startY = b.touches.currentY, P = k, void(b.touches.diff = b.isHorizontal() ? b.touches.currentX - b.touches.startX : b.touches.currentY - b.touches.startY) - }(b.params.freeMode || b.params.watchSlidesProgress) && b.updateActiveIndex(), b.params.freeMode && (0 === A.length && A.push({ - position: b.touches[b.isHorizontal() ? "startX" : "startY"], - time: M - }), A.push({ - position: b.touches[b.isHorizontal() ? "currentX" : "currentY"], - time: (new window.Date).getTime() - })), b.updateProgress(P), b.setWrapperTranslate(P) - } - } - } - } - } - }, b.onTouchEnd = function(e) { - if (e.originalEvent && (e = e.originalEvent), z && b.emit("onTouchEnd", b, e), z = !1, S) { - b.params.grabCursor && C && S && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grab", b.container[0].style.cursor = "-moz-grab", b.container[0].style.cursor = "grab"); - var t = Date.now(), - r = t - M; - if (b.allowClick && (b.updateClickedSlide(e), b.emit("onTap", b, e), 300 > r && t - H > 300 && (L && clearTimeout(L), L = setTimeout(function() { - b && (b.params.paginationHide && b.paginationContainer.length > 0 && !a(e.target).hasClass(b.params.bulletClass) && b.paginationContainer.toggleClass(b.params.paginationHiddenClass), b.emit("onClick", b, e)) - }, 300)), 300 > r && 300 > t - H && (L && clearTimeout(L), b.emit("onDoubleTap", b, e))), H = Date.now(), setTimeout(function() { - b && (b.allowClick = !0) - }, 0), !S || !C || !b.swipeDirection || 0 === b.touches.diff || P === k) return void(S = C = !1); - S = C = !1; - var i; - if (i = b.params.followFinger ? b.rtl ? b.translate : -b.translate : -P, b.params.freeMode) { - if (i < -b.minTranslate()) return void b.slideTo(b.activeIndex); - if (i > -b.maxTranslate()) return void(b.slides.length < b.snapGrid.length ? b.slideTo(b.snapGrid.length - 1) : b.slideTo(b.slides.length - 1)); - if (b.params.freeModeMomentum) { - if (A.length > 1) { - var s = A.pop(), - n = A.pop(), - o = s.position - n.position, - l = s.time - n.time; - b.velocity = o / l, b.velocity = b.velocity / 2, Math.abs(b.velocity) < b.params.freeModeMinimumVelocity && (b.velocity = 0), (l > 150 || (new window.Date).getTime() - s.time > 300) && (b.velocity = 0) - } else b.velocity = 0; - A.length = 0; - var p = 1e3 * b.params.freeModeMomentumRatio, - d = b.velocity * p, - u = b.translate + d; - b.rtl && (u = -u); - var c, m = !1, - h = 20 * Math.abs(b.velocity) * b.params.freeModeMomentumBounceRatio; - if (u < b.maxTranslate()) b.params.freeModeMomentumBounce ? (u + b.maxTranslate() < -h && (u = b.maxTranslate() - h), c = b.maxTranslate(), m = !0, B = !0) : u = b.maxTranslate(); - else if (u > b.minTranslate()) b.params.freeModeMomentumBounce ? (u - b.minTranslate() > h && (u = b.minTranslate() + h), c = b.minTranslate(), m = !0, B = !0) : u = b.minTranslate(); - else if (b.params.freeModeSticky) { - var f, g = 0; - for (g = 0; g < b.snapGrid.length; g += 1) - if (b.snapGrid[g] > -u) { - f = g; - break - } u = Math.abs(b.snapGrid[f] - u) < Math.abs(b.snapGrid[f - 1] - u) || "next" === b.swipeDirection ? b.snapGrid[f] : b.snapGrid[f - 1], b.rtl || (u = -u) - } - if (0 !== b.velocity) p = b.rtl ? Math.abs((-u - b.translate) / b.velocity) : Math.abs((u - b.translate) / b.velocity); - else if (b.params.freeModeSticky) return void b.slideReset(); - b.params.freeModeMomentumBounce && m ? (b.updateProgress(c), b.setWrapperTransition(p), b.setWrapperTranslate(u), b.onTransitionStart(), b.animating = !0, b.wrapper.transitionEnd(function() { - b && B && (b.emit("onMomentumBounce", b), b.setWrapperTransition(b.params.speed), b.setWrapperTranslate(c), b.wrapper.transitionEnd(function() { - b && b.onTransitionEnd() - })) - })) : b.velocity ? (b.updateProgress(u), b.setWrapperTransition(p), b.setWrapperTranslate(u), b.onTransitionStart(), b.animating || (b.animating = !0, b.wrapper.transitionEnd(function() { - b && b.onTransitionEnd() - }))) : b.updateProgress(u), b.updateActiveIndex() - } - return void((!b.params.freeModeMomentum || r >= b.params.longSwipesMs) && (b.updateProgress(), b.updateActiveIndex())) - } - var v, w = 0, - y = b.slidesSizesGrid[0]; - for (v = 0; v < b.slidesGrid.length; v += b.params.slidesPerGroup) "undefined" != typeof b.slidesGrid[v + b.params.slidesPerGroup] ? i >= b.slidesGrid[v] && i < b.slidesGrid[v + b.params.slidesPerGroup] && (w = v, y = b.slidesGrid[v + b.params.slidesPerGroup] - b.slidesGrid[v]) : i >= b.slidesGrid[v] && (w = v, y = b.slidesGrid[b.slidesGrid.length - 1] - b.slidesGrid[b.slidesGrid.length - 2]); - var x = (i - b.slidesGrid[w]) / y; - if (r > b.params.longSwipesMs) { - if (!b.params.longSwipes) return void b.slideTo(b.activeIndex); - "next" === b.swipeDirection && (x >= b.params.longSwipesRatio ? b.slideTo(w + b.params.slidesPerGroup) : b.slideTo(w)), "prev" === b.swipeDirection && (x > 1 - b.params.longSwipesRatio ? b.slideTo(w + b.params.slidesPerGroup) : b.slideTo(w)) - } else { - if (!b.params.shortSwipes) return void b.slideTo(b.activeIndex); - "next" === b.swipeDirection && b.slideTo(w + b.params.slidesPerGroup), "prev" === b.swipeDirection && b.slideTo(w) - } - } - }, b._slideTo = function(e, a) { - return b.slideTo(e, a, !0, !0) - }, b.slideTo = function(e, a, t, r) { - "undefined" == typeof t && (t = !0), "undefined" == typeof e && (e = 0), 0 > e && (e = 0), b.snapIndex = Math.floor(e / b.params.slidesPerGroup), b.snapIndex >= b.snapGrid.length && (b.snapIndex = b.snapGrid.length - 1); - var i = -b.snapGrid[b.snapIndex]; - b.params.autoplay && b.autoplaying && (r || !b.params.autoplayDisableOnInteraction ? b.pauseAutoplay(a) : b.stopAutoplay()), b.updateProgress(i); - for (var s = 0; s < b.slidesGrid.length; s++) - Math.floor(100 * i) >= Math.floor(100 * b.slidesGrid[s]) && (e = s); - return !b.params.allowSwipeToNext && i < b.translate && i < b.minTranslate() ? !1 : !b.params.allowSwipeToPrev && i > b.translate && i > b.maxTranslate() && (b.activeIndex || 0) !== e ? !1 : ("undefined" == typeof a && (a = b.params.speed), b.previousIndex = b.activeIndex || 0, b.activeIndex = e, b.rtl && -i === b.translate || !b.rtl && i === b.translate ? (b.params.autoHeight && b.updateAutoHeight(), b.updateClasses(), "slide" !== b.params.effect && b.setWrapperTranslate(i), !1) : (b.updateClasses(), b.onTransitionStart(t), 0 === a ? (b.setWrapperTranslate(i), b.setWrapperTransition(0), b.onTransitionEnd(t)) : (b.setWrapperTranslate(i), b.setWrapperTransition(a), b.animating || (b.animating = !0, b.wrapper.transitionEnd(function() { - b && b.onTransitionEnd(t) - }))), !0)) - }, b.onTransitionStart = function(e) { - "undefined" == typeof e && (e = !0), b.params.autoHeight && b.updateAutoHeight(), b.lazy && b.lazy.onTransitionStart(), e && (b.emit("onTransitionStart", b), b.activeIndex !== b.previousIndex && (b.emit("onSlideChangeStart", b), b.activeIndex > b.previousIndex ? b.emit("onSlideNextStart", b) : b.emit("onSlidePrevStart", b))) - }, b.onTransitionEnd = function(e) { - b.animating = !1, b.setWrapperTransition(0), "undefined" == typeof e && (e = !0), b.lazy && b.lazy.onTransitionEnd(), e && (b.emit("onTransitionEnd", b), b.activeIndex !== b.previousIndex && (b.emit("onSlideChangeEnd", b), b.activeIndex > b.previousIndex ? b.emit("onSlideNextEnd", b) : b.emit("onSlidePrevEnd", b))), b.params.hashnav && b.hashnav && b.hashnav.setHash() - }, b.slideNext = function(e, a, t) { - if (b.params.loop) { - if (b.animating) return !1; - b.fixLoop(); - b.container[0].clientLeft; - return b.slideTo(b.activeIndex + b.params.slidesPerGroup, a, e, t) - } - return b.slideTo(b.activeIndex + b.params.slidesPerGroup, a, e, t) - }, b._slideNext = function(e) { - return b.slideNext(!0, e, !0) - }, b.slidePrev = function(e, a, t) { - if (b.params.loop) { - if (b.animating) return !1; - b.fixLoop(); - b.container[0].clientLeft; - return b.slideTo(b.activeIndex - 1, a, e, t) - } - return b.slideTo(b.activeIndex - 1, a, e, t) - }, b._slidePrev = function(e) { - return b.slidePrev(!0, e, !0) - }, b.slideReset = function(e, a, t) { - return b.slideTo(b.activeIndex, a, e) - }, b.setWrapperTransition = function(e, a) { - b.wrapper.transition(e), "slide" !== b.params.effect && b.effects[b.params.effect] && b.effects[b.params.effect].setTransition(e), b.params.parallax && b.parallax && b.parallax.setTransition(e), b.params.scrollbar && b.scrollbar && b.scrollbar.setTransition(e), b.params.control && b.controller && b.controller.setTransition(e, a), b.emit("onSetTransition", b, e) - }, b.setWrapperTranslate = function(e, a, t) { - var r = 0, - i = 0, - n = 0; - b.isHorizontal() ? r = b.rtl ? -e : e : i = e, b.params.roundLengths && (r = s(r), i = s(i)), b.params.virtualTranslate || (b.support.transforms3d ? b.wrapper.transform("translate3d(" + r + "px, " + i + "px, " + n + "px)") : b.wrapper.transform("translate(" + r + "px, " + i + "px)")), b.translate = b.isHorizontal() ? r : i; - var o, l = b.maxTranslate() - b.minTranslate(); - o = 0 === l ? 0 : (e - b.minTranslate()) / l, o !== b.progress && b.updateProgress(e), a && b.updateActiveIndex(), "slide" !== b.params.effect && b.effects[b.params.effect] && b.effects[b.params.effect].setTranslate(b.translate), b.params.parallax && b.parallax && b.parallax.setTranslate(b.translate), b.params.scrollbar && b.scrollbar && b.scrollbar.setTranslate(b.translate), b.params.control && b.controller && b.controller.setTranslate(b.translate, t), b.emit("onSetTranslate", b, b.translate) - }, b.getTranslate = function(e, a) { - var t, r, i, s; - return "undefined" == typeof a && (a = "x"), b.params.virtualTranslate ? b.rtl ? -b.translate : b.translate : (i = window.getComputedStyle(e, null), window.WebKitCSSMatrix ? (r = i.transform || i.webkitTransform, r.split(",").length > 6 && (r = r.split(", ").map(function(e) { - return e.replace(",", ".") - }).join(", ")), s = new window.WebKitCSSMatrix("none" === r ? "" : r)) : (s = i.MozTransform || i.OTransform || i.MsTransform || i.msTransform || i.transform || i.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), t = s.toString().split(",")), "x" === a && (r = window.WebKitCSSMatrix ? s.m41 : 16 === t.length ? parseFloat(t[12]) : parseFloat(t[4])), "y" === a && (r = window.WebKitCSSMatrix ? s.m42 : 16 === t.length ? parseFloat(t[13]) : parseFloat(t[5])), b.rtl && r && (r = -r), r || 0) - }, b.getWrapperTranslate = function(e) { - return "undefined" == typeof e && (e = b.isHorizontal() ? "x" : "y"), b.getTranslate(b.wrapper[0], e) - }, b.observers = [], b.initObservers = function() { - if (b.params.observeParents) - for (var e = b.container.parents(), a = 0; a < e.length; a++) l(e[a]); - l(b.container[0], { - childList: !1 - }), l(b.wrapper[0], { - attributes: !1 - }) - }, b.disconnectObservers = function() { - for (var e = 0; e < b.observers.length; e++) b.observers[e].disconnect(); - b.observers = [] - }, b.createLoop = function() { - b.wrapper.children("." + b.params.slideClass + "." + b.params.slideDuplicateClass).remove(); - var e = b.wrapper.children("." + b.params.slideClass); - "auto" !== b.params.slidesPerView || b.params.loopedSlides || (b.params.loopedSlides = e.length), b.loopedSlides = parseInt(b.params.loopedSlides || b.params.slidesPerView, 10), b.loopedSlides = b.loopedSlides + b.params.loopAdditionalSlides, b.loopedSlides > e.length && (b.loopedSlides = e.length); - var t, r = [], - i = []; - for (e.each(function(t, s) { - var n = a(this); - t < b.loopedSlides && i.push(s), t < e.length && t >= e.length - b.loopedSlides && r.push(s), n.attr("data-swiper-slide-index", t) - }), t = 0; t < i.length; t++) b.wrapper.append(a(i[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass)); - for (t = r.length - 1; t >= 0; t--) b.wrapper.prepend(a(r[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass)) - }, b.destroyLoop = function() { - b.wrapper.children("." + b.params.slideClass + "." + b.params.slideDuplicateClass).remove(), b.slides.removeAttr("data-swiper-slide-index") - }, b.reLoop = function(e) { - var a = b.activeIndex - b.loopedSlides; - b.destroyLoop(), b.createLoop(), b.updateSlidesSize(), e && b.slideTo(a + b.loopedSlides, 0, !1) - }, b.fixLoop = function() { - var e; - b.activeIndex < b.loopedSlides ? (e = b.slides.length - 3 * b.loopedSlides + b.activeIndex, e += b.loopedSlides, b.slideTo(e, 0, !1, !0)) : ("auto" === b.params.slidesPerView && b.activeIndex >= 2 * b.loopedSlides || b.activeIndex > b.slides.length - 2 * b.params.slidesPerView) && (e = -b.slides.length + b.activeIndex + b.loopedSlides, e += b.loopedSlides, b.slideTo(e, 0, !1, !0)) - }, b.appendSlide = function(e) { - if (b.params.loop && b.destroyLoop(), "object" == typeof e && e.length) - for (var a = 0; a < e.length; a++) e[a] && b.wrapper.append(e[a]); - else b.wrapper.append(e); - b.params.loop && b.createLoop(), b.params.observer && b.support.observer || b.update(!0) - }, b.prependSlide = function(e) { - b.params.loop && b.destroyLoop(); - var a = b.activeIndex + 1; - if ("object" == typeof e && e.length) { - for (var t = 0; t < e.length; t++) e[t] && b.wrapper.prepend(e[t]); - a = b.activeIndex + e.length - } else b.wrapper.prepend(e); - b.params.loop && b.createLoop(), b.params.observer && b.support.observer || b.update(!0), b.slideTo(a, 0, !1) - }, b.removeSlide = function(e) { - b.params.loop && (b.destroyLoop(), b.slides = b.wrapper.children("." + b.params.slideClass)); - var a, t = b.activeIndex; - if ("object" == typeof e && e.length) { - for (var r = 0; r < e.length; r++) a = e[r], b.slides[a] && b.slides.eq(a).remove(), t > a && t--; - t = Math.max(t, 0) - } else a = e, b.slides[a] && b.slides.eq(a).remove(), t > a && t--, t = Math.max(t, 0); - b.params.loop && b.createLoop(), b.params.observer && b.support.observer || b.update(!0), b.params.loop ? b.slideTo(t + b.loopedSlides, 0, !1) : b.slideTo(t, 0, !1) - }, b.removeAllSlides = function() { - for (var e = [], a = 0; a < b.slides.length; a++) e.push(a); - b.removeSlide(e) - }, b.effects = { - fade: { - setTranslate: function() { - for (var e = 0; e < b.slides.length; e++) { - var a = b.slides.eq(e), - t = a[0].swiperSlideOffset, - r = -t; - b.params.virtualTranslate || (r -= b.translate); - var i = 0; - b.isHorizontal() || (i = r, r = 0); - var s = b.params.fade.crossFade ? Math.max(1 - Math.abs(a[0].progress), 0) : 1 + Math.min(Math.max(a[0].progress, -1), 0); - a.css({ - opacity: s - }).transform("translate3d(" + r + "px, " + i + "px, 0px)") - } - }, - setTransition: function(e) { - if (b.slides.transition(e), b.params.virtualTranslate && 0 !== e) { - var a = !1; - b.slides.transitionEnd(function() { - if (!a && b) { - a = !0, b.animating = !1; - for (var e = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], t = 0; t < e.length; t++) b.wrapper.trigger(e[t]) - } - }) - } - } - }, - flip: { - setTranslate: function() { - for (var e = 0; e < b.slides.length; e++) { - var t = b.slides.eq(e), - r = t[0].progress; - b.params.flip.limitRotation && (r = Math.max(Math.min(t[0].progress, 1), -1)); - var i = t[0].swiperSlideOffset, - s = -180 * r, - n = s, - o = 0, - l = -i, - p = 0; - if (b.isHorizontal() ? b.rtl && (n = -n) : (p = l, l = 0, o = -n, n = 0), t[0].style.zIndex = -Math.abs(Math.round(r)) + b.slides.length, b.params.flip.slideShadows) { - var d = b.isHorizontal() ? t.find(".swiper-slide-shadow-left") : t.find(".swiper-slide-shadow-top"), - u = b.isHorizontal() ? t.find(".swiper-slide-shadow-right") : t.find(".swiper-slide-shadow-bottom"); - 0 === d.length && (d = a('
'), t.append(d)), 0 === u.length && (u = a('
'), t.append(u)), d.length && (d[0].style.opacity = Math.max(-r, 0)), u.length && (u[0].style.opacity = Math.max(r, 0)) - } - t.transform("translate3d(" + l + "px, " + p + "px, 0px) rotateX(" + o + "deg) rotateY(" + n + "deg)") - } - }, - setTransition: function(e) { - if (b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), b.params.virtualTranslate && 0 !== e) { - var t = !1; - b.slides.eq(b.activeIndex).transitionEnd(function() { - if (!t && b && a(this).hasClass(b.params.slideActiveClass)) { - t = !0, b.animating = !1; - for (var e = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], r = 0; r < e.length; r++) b.wrapper.trigger(e[r]) - } - }) - } - } - }, - cube: { - setTranslate: function() { - var e, t = 0; - b.params.cube.shadow && (b.isHorizontal() ? (e = b.wrapper.find(".swiper-cube-shadow"), 0 === e.length && (e = a('
'), b.wrapper.append(e)), e.css({ - height: b.width + "px" - })) : (e = b.container.find(".swiper-cube-shadow"), 0 === e.length && (e = a('
'), b.container.append(e)))); - for (var r = 0; r < b.slides.length; r++) { - var i = b.slides.eq(r), - s = 90 * r, - n = Math.floor(s / 360); - b.rtl && (s = -s, n = Math.floor(-s / 360)); - var o = Math.max(Math.min(i[0].progress, 1), -1), - l = 0, - p = 0, - d = 0; - r % 4 === 0 ? (l = 4 * -n * b.size, d = 0) : (r - 1) % 4 === 0 ? (l = 0, d = 4 * -n * b.size) : (r - 2) % 4 === 0 ? (l = b.size + 4 * n * b.size, d = b.size) : (r - 3) % 4 === 0 && (l = -b.size, d = 3 * b.size + 4 * b.size * n), b.rtl && (l = -l), b.isHorizontal() || (p = l, l = 0); - var u = "rotateX(" + (b.isHorizontal() ? 0 : -s) + "deg) rotateY(" + (b.isHorizontal() ? s : 0) + "deg) translate3d(" + l + "px, " + p + "px, " + d + "px)"; - if (1 >= o && o > -1 && (t = 90 * r + 90 * o, b.rtl && (t = 90 * -r - 90 * o)), i.transform(u), b.params.cube.slideShadows) { - var c = b.isHorizontal() ? i.find(".swiper-slide-shadow-left") : i.find(".swiper-slide-shadow-top"), - m = b.isHorizontal() ? i.find(".swiper-slide-shadow-right") : i.find(".swiper-slide-shadow-bottom"); - 0 === c.length && (c = a('
'), i.append(c)), 0 === m.length && (m = a('
'), i.append(m)), c.length && (c[0].style.opacity = Math.max(-o, 0)), m.length && (m[0].style.opacity = Math.max(o, 0)) - } - } - if (b.wrapper.css({ - "-webkit-transform-origin": "50% 50% -" + b.size / 2 + "px", - "-moz-transform-origin": "50% 50% -" + b.size / 2 + "px", - "-ms-transform-origin": "50% 50% -" + b.size / 2 + "px", - "transform-origin": "50% 50% -" + b.size / 2 + "px" - }), b.params.cube.shadow) - if (b.isHorizontal()) e.transform("translate3d(0px, " + (b.width / 2 + b.params.cube.shadowOffset) + "px, " + -b.width / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + b.params.cube.shadowScale + ")"); - else { - var h = Math.abs(t) - 90 * Math.floor(Math.abs(t) / 90), - f = 1.5 - (Math.sin(2 * h * Math.PI / 360) / 2 + Math.cos(2 * h * Math.PI / 360) / 2), - g = b.params.cube.shadowScale, - v = b.params.cube.shadowScale / f, - w = b.params.cube.shadowOffset; - e.transform("scale3d(" + g + ", 1, " + v + ") translate3d(0px, " + (b.height / 2 + w) + "px, " + -b.height / 2 / v + "px) rotateX(-90deg)") - } var y = b.isSafari || b.isUiWebView ? -b.size / 2 : 0; - b.wrapper.transform("translate3d(0px,0," + y + "px) rotateX(" + (b.isHorizontal() ? 0 : t) + "deg) rotateY(" + (b.isHorizontal() ? -t : 0) + "deg)") - }, - setTransition: function(e) { - b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), b.params.cube.shadow && !b.isHorizontal() && b.container.find(".swiper-cube-shadow").transition(e) - } - }, - coverflow: { - setTranslate: function() { - for (var e = b.translate, t = b.isHorizontal() ? -e + b.width / 2 : -e + b.height / 2, r = b.isHorizontal() ? b.params.coverflow.rotate : -b.params.coverflow.rotate, i = b.params.coverflow.depth, s = 0, n = b.slides.length; n > s; s++) { - var o = b.slides.eq(s), - l = b.slidesSizesGrid[s], - p = o[0].swiperSlideOffset, - d = (t - p - l / 2) / l * b.params.coverflow.modifier, - u = b.isHorizontal() ? r * d : 0, - c = b.isHorizontal() ? 0 : r * d, - m = -i * Math.abs(d), - h = b.isHorizontal() ? 0 : b.params.coverflow.stretch * d, - f = b.isHorizontal() ? b.params.coverflow.stretch * d : 0; - Math.abs(f) < .001 && (f = 0), Math.abs(h) < .001 && (h = 0), Math.abs(m) < .001 && (m = 0), Math.abs(u) < .001 && (u = 0), Math.abs(c) < .001 && (c = 0); - var g = "translate3d(" + f + "px," + h + "px," + m + "px) rotateX(" + c + "deg) rotateY(" + u + "deg)"; - if (o.transform(g), o[0].style.zIndex = -Math.abs(Math.round(d)) + 1, b.params.coverflow.slideShadows) { - var v = b.isHorizontal() ? o.find(".swiper-slide-shadow-left") : o.find(".swiper-slide-shadow-top"), - w = b.isHorizontal() ? o.find(".swiper-slide-shadow-right") : o.find(".swiper-slide-shadow-bottom"); - 0 === v.length && (v = a('
'), o.append(v)), 0 === w.length && (w = a('
'), o.append(w)), v.length && (v[0].style.opacity = d > 0 ? d : 0), w.length && (w[0].style.opacity = -d > 0 ? -d : 0) - } - } - if (b.browser.ie) { - var y = b.wrapper[0].style; - y.perspectiveOrigin = t + "px 50%" - } - }, - setTransition: function(e) { - b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) - } - } - }, b.lazy = { - initialImageLoaded: !1, - loadImageInSlide: function(e, t) { - if ("undefined" != typeof e && ("undefined" == typeof t && (t = !0), 0 !== b.slides.length)) { - var r = b.slides.eq(e), - i = r.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)"); - !r.hasClass("swiper-lazy") || r.hasClass("swiper-lazy-loaded") || r.hasClass("swiper-lazy-loading") || (i = i.add(r[0])), 0 !== i.length && i.each(function() { - var e = a(this); - e.addClass("swiper-lazy-loading"); - var i = e.attr("data-background"), - s = e.attr("data-src"), - n = e.attr("data-srcset"); - b.loadImage(e[0], s || i, n, !1, function() { - if (i ? (e.css("background-image", 'url("' + i + '")'), e.removeAttr("data-background")) : (n && (e.attr("srcset", n), e.removeAttr("data-srcset")), s && (e.attr("src", s), e.removeAttr("data-src"))), e.addClass("swiper-lazy-loaded").removeClass("swiper-lazy-loading"), r.find(".swiper-lazy-preloader, .preloader").remove(), b.params.loop && t) { - var a = r.attr("data-swiper-slide-index"); - if (r.hasClass(b.params.slideDuplicateClass)) { - var o = b.wrapper.children('[data-swiper-slide-index="' + a + '"]:not(.' + b.params.slideDuplicateClass + ")"); - b.lazy.loadImageInSlide(o.index(), !1) - } else { - var l = b.wrapper.children("." + b.params.slideDuplicateClass + '[data-swiper-slide-index="' + a + '"]'); - b.lazy.loadImageInSlide(l.index(), !1) - } - } - b.emit("onLazyImageReady", b, r[0], e[0]) - }), b.emit("onLazyImageLoad", b, r[0], e[0]) - }) - } - }, - load: function() { - var e; - if (b.params.watchSlidesVisibility) b.wrapper.children("." + b.params.slideVisibleClass).each(function() { - b.lazy.loadImageInSlide(a(this).index()) - }); - else if (b.params.slidesPerView > 1) - for (e = b.activeIndex; e < b.activeIndex + b.params.slidesPerView; e++) b.slides[e] && b.lazy.loadImageInSlide(e); - else b.lazy.loadImageInSlide(b.activeIndex); - if (b.params.lazyLoadingInPrevNext) - if (b.params.slidesPerView > 1 || b.params.lazyLoadingInPrevNextAmount && b.params.lazyLoadingInPrevNextAmount > 1) { - var t = b.params.lazyLoadingInPrevNextAmount, - r = b.params.slidesPerView, - i = Math.min(b.activeIndex + r + Math.max(t, r), b.slides.length), - s = Math.max(b.activeIndex - Math.max(r, t), 0); - for (e = b.activeIndex + b.params.slidesPerView; i > e; e++) b.slides[e] && b.lazy.loadImageInSlide(e); - for (e = s; e < b.activeIndex; e++) b.slides[e] && b.lazy.loadImageInSlide(e) - } else { - var n = b.wrapper.children("." + b.params.slideNextClass); - n.length > 0 && b.lazy.loadImageInSlide(n.index()); - var o = b.wrapper.children("." + b.params.slidePrevClass); - o.length > 0 && b.lazy.loadImageInSlide(o.index()) - } - }, - onTransitionStart: function() { - b.params.lazyLoading && (b.params.lazyLoadingOnTransitionStart || !b.params.lazyLoadingOnTransitionStart && !b.lazy.initialImageLoaded) && b.lazy.load() - }, - onTransitionEnd: function() { - b.params.lazyLoading && !b.params.lazyLoadingOnTransitionStart && b.lazy.load() - } - }, b.scrollbar = { - isTouched: !1, - setDragPosition: function(e) { - var a = b.scrollbar, - t = b.isHorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX || e.clientX : "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY || e.clientY, - r = t - a.track.offset()[b.isHorizontal() ? "left" : "top"] - a.dragSize / 2, - i = -b.minTranslate() * a.moveDivider, - s = -b.maxTranslate() * a.moveDivider; - i > r ? r = i : r > s && (r = s), r = -r / a.moveDivider, b.updateProgress(r), b.setWrapperTranslate(r, !0) - }, - dragStart: function(e) { - var a = b.scrollbar; - a.isTouched = !0, e.preventDefault(), e.stopPropagation(), a.setDragPosition(e), clearTimeout(a.dragTimeout), a.track.transition(0), b.params.scrollbarHide && a.track.css("opacity", 1), b.wrapper.transition(100), a.drag.transition(100), b.emit("onScrollbarDragStart", b) - }, - dragMove: function(e) { - var a = b.scrollbar; - a.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, a.setDragPosition(e), b.wrapper.transition(0), a.track.transition(0), a.drag.transition(0), b.emit("onScrollbarDragMove", b)) - }, - dragEnd: function(e) { - var a = b.scrollbar; - a.isTouched && (a.isTouched = !1, b.params.scrollbarHide && (clearTimeout(a.dragTimeout), a.dragTimeout = setTimeout(function() { - a.track.css("opacity", 0), a.track.transition(400) - }, 1e3)), b.emit("onScrollbarDragEnd", b), b.params.scrollbarSnapOnRelease && b.slideReset()) - }, - enableDraggable: function() { - var e = b.scrollbar, - t = b.support.touch ? e.track : document; - a(e.track).on(b.touchEvents.start, e.dragStart), a(t).on(b.touchEvents.move, e.dragMove), a(t).on(b.touchEvents.end, e.dragEnd) - }, - disableDraggable: function() { - var e = b.scrollbar, - t = b.support.touch ? e.track : document; - a(e.track).off(b.touchEvents.start, e.dragStart), a(t).off(b.touchEvents.move, e.dragMove), a(t).off(b.touchEvents.end, e.dragEnd) - }, - set: function() { - if (b.params.scrollbar) { - var e = b.scrollbar; - e.track = a(b.params.scrollbar), b.params.uniqueNavElements && "string" == typeof b.params.scrollbar && e.track.length > 1 && 1 === b.container.find(b.params.scrollbar).length && (e.track = b.container.find(b.params.scrollbar)), e.drag = e.track.find(".swiper-scrollbar-drag"), 0 === e.drag.length && (e.drag = a('
'), e.track.append(e.drag)), e.drag[0].style.width = "", e.drag[0].style.height = "", e.trackSize = b.isHorizontal() ? e.track[0].offsetWidth : e.track[0].offsetHeight, e.divider = b.size / b.virtualSize, e.moveDivider = e.divider * (e.trackSize / b.size), e.dragSize = e.trackSize * e.divider, b.isHorizontal() ? e.drag[0].style.width = e.dragSize + "px" : e.drag[0].style.height = e.dragSize + "px", e.divider >= 1 ? e.track[0].style.display = "none" : e.track[0].style.display = "", b.params.scrollbarHide && (e.track[0].style.opacity = 0) - } - }, - setTranslate: function() { - if (b.params.scrollbar) { - var e, a = b.scrollbar, - t = (b.translate || 0, a.dragSize); - e = (a.trackSize - a.dragSize) * b.progress, b.rtl && b.isHorizontal() ? (e = -e, e > 0 ? (t = a.dragSize - e, e = 0) : -e + a.dragSize > a.trackSize && (t = a.trackSize + e)) : 0 > e ? (t = a.dragSize + e, e = 0) : e + a.dragSize > a.trackSize && (t = a.trackSize - e), b.isHorizontal() ? (b.support.transforms3d ? a.drag.transform("translate3d(" + e + "px, 0, 0)") : a.drag.transform("translateX(" + e + "px)"), a.drag[0].style.width = t + "px") : (b.support.transforms3d ? a.drag.transform("translate3d(0px, " + e + "px, 0)") : a.drag.transform("translateY(" + e + "px)"), a.drag[0].style.height = t + "px"), b.params.scrollbarHide && (clearTimeout(a.timeout), a.track[0].style.opacity = 1, a.timeout = setTimeout(function() { - a.track[0].style.opacity = 0, a.track.transition(400) - }, 1e3)) - } - }, - setTransition: function(e) { - b.params.scrollbar && b.scrollbar.drag.transition(e) - } - }, b.controller = { - LinearSpline: function(e, a) { - this.x = e, this.y = a, this.lastIndex = e.length - 1; - var t, r; - this.x.length; - this.interpolate = function(e) { - return e ? (r = i(this.x, e), t = r - 1, (e - this.x[t]) * (this.y[r] - this.y[t]) / (this.x[r] - this.x[t]) + this.y[t]) : 0 - }; - var i = function() { - var e, a, t; - return function(r, i) { - for (a = -1, e = r.length; e - a > 1;) r[t = e + a >> 1] <= i ? a = t : e = t; - return e - } - }() - }, - getInterpolateFunction: function(e) { - b.controller.spline || (b.controller.spline = b.params.loop ? new b.controller.LinearSpline(b.slidesGrid, e.slidesGrid) : new b.controller.LinearSpline(b.snapGrid, e.snapGrid)) - }, - setTranslate: function(e, a) { - function r(a) { - e = a.rtl && "horizontal" === a.params.direction ? -b.translate : b.translate, "slide" === b.params.controlBy && (b.controller.getInterpolateFunction(a), s = -b.controller.spline.interpolate(-e)), s && "container" !== b.params.controlBy || (i = (a.maxTranslate() - a.minTranslate()) / (b.maxTranslate() - b.minTranslate()), s = (e - b.minTranslate()) * i + a.minTranslate()), b.params.controlInverse && (s = a.maxTranslate() - s), a.updateProgress(s), a.setWrapperTranslate(s, !1, b), a.updateActiveIndex() - } - var i, s, n = b.params.control; - if (b.isArray(n)) - for (var o = 0; o < n.length; o++) n[o] !== a && n[o] instanceof t && r(n[o]); - else n instanceof t && a !== n && r(n) - }, - setTransition: function(e, a) { - function r(a) { - a.setWrapperTransition(e, b), 0 !== e && (a.onTransitionStart(), a.wrapper.transitionEnd(function() { - s && (a.params.loop && "slide" === b.params.controlBy && a.fixLoop(), a.onTransitionEnd()) - })) - } - var i, s = b.params.control; - if (b.isArray(s)) - for (i = 0; i < s.length; i++) s[i] !== a && s[i] instanceof t && r(s[i]); - else s instanceof t && a !== s && r(s) - } - }, b.hashnav = { - init: function() { - if (b.params.hashnav) { - b.hashnav.initialized = !0; - var e = document.location.hash.replace("#", ""); - if (e) - for (var a = 0, t = 0, r = b.slides.length; r > t; t++) { - var i = b.slides.eq(t), - s = i.attr("data-hash"); - if (s === e && !i.hasClass(b.params.slideDuplicateClass)) { - var n = i.index(); - b.slideTo(n, a, b.params.runCallbacksOnInit, !0) - } - } - } - }, - setHash: function() { - b.hashnav.initialized && b.params.hashnav && (document.location.hash = b.slides.eq(b.activeIndex).attr("data-hash") || "") - } - }, b.disableKeyboardControl = function() { - b.params.keyboardControl = !1, a(document).off("keydown", p) - }, b.enableKeyboardControl = function() { - b.params.keyboardControl = !0, a(document).on("keydown", p) - }, b.mousewheel = { - event: !1, - lastScrollTime: (new window.Date).getTime() - }, b.params.mousewheelControl) { - try { - new window.WheelEvent("wheel"), b.mousewheel.event = "wheel" - } catch (N) { - (window.WheelEvent || b.container[0] && "wheel" in b.container[0]) && (b.mousewheel.event = "wheel") - }!b.mousewheel.event && window.WheelEvent, b.mousewheel.event || void 0 === document.onmousewheel || (b.mousewheel.event = "mousewheel"), b.mousewheel.event || (b.mousewheel.event = "DOMMouseScroll") - } - b.disableMousewheelControl = function() { - return b.mousewheel.event ? (b.container.off(b.mousewheel.event, d), !0) : !1 - }, b.enableMousewheelControl = function() { - return b.mousewheel.event ? (b.container.on(b.mousewheel.event, d), !0) : !1 - }, b.parallax = { - setTranslate: function() { - b.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { - u(this, b.progress) - }), b.slides.each(function() { - var e = a(this); - e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { - var a = Math.min(Math.max(e[0].progress, -1), 1); - u(this, a) - }) - }) - }, - setTransition: function(e) { - "undefined" == typeof e && (e = b.params.speed), b.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { - var t = a(this), - r = parseInt(t.attr("data-swiper-parallax-duration"), 10) || e; - 0 === e && (r = 0), t.transition(r) - }) - } - }, b._plugins = []; - for (var R in b.plugins) { - var W = b.plugins[R](b, b.params[R]); - W && b._plugins.push(W) - } - return b.callPlugins = function(e) { - for (var a = 0; a < b._plugins.length; a++) e in b._plugins[a] && b._plugins[a][e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) - }, b.emitterEventListeners = {}, b.emit = function(e) { - b.params[e] && b.params[e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); - var a; - if (b.emitterEventListeners[e]) - for (a = 0; a < b.emitterEventListeners[e].length; a++) b.emitterEventListeners[e][a](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); - b.callPlugins && b.callPlugins(e, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) - }, b.on = function(e, a) { - return e = c(e), b.emitterEventListeners[e] || (b.emitterEventListeners[e] = []), b.emitterEventListeners[e].push(a), b - }, b.off = function(e, a) { - var t; - if (e = c(e), "undefined" == typeof a) return b.emitterEventListeners[e] = [], b; - if (b.emitterEventListeners[e] && 0 !== b.emitterEventListeners[e].length) { - for (t = 0; t < b.emitterEventListeners[e].length; t++) b.emitterEventListeners[e][t] === a && b.emitterEventListeners[e].splice(t, 1); - return b - } - }, b.once = function(e, a) { - e = c(e); - var t = function() { - a(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]), b.off(e, t) - }; - return b.on(e, t), b - }, b.a11y = { - makeFocusable: function(e) { - return e.attr("tabIndex", "0"), e - }, - addRole: function(e, a) { - return e.attr("role", a), e - }, - addLabel: function(e, a) { - return e.attr("aria-label", a), e - }, - disable: function(e) { - return e.attr("aria-disabled", !0), e - }, - enable: function(e) { - return e.attr("aria-disabled", !1), e - }, - onEnterKey: function(e) { - 13 === e.keyCode && (a(e.target).is(b.params.nextButton) ? (b.onClickNext(e), b.isEnd ? b.a11y.notify(b.params.lastSlideMessage) : b.a11y.notify(b.params.nextSlideMessage)) : a(e.target).is(b.params.prevButton) && (b.onClickPrev(e), b.isBeginning ? b.a11y.notify(b.params.firstSlideMessage) : b.a11y.notify(b.params.prevSlideMessage)), a(e.target).is("." + b.params.bulletClass) && a(e.target)[0].click()) - }, - liveRegion: a(''), - notify: function(e) { - var a = b.a11y.liveRegion; - 0 !== a.length && (a.html(""), a.html(e)) - }, - init: function() { - b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.a11y.makeFocusable(b.nextButton), b.a11y.addRole(b.nextButton, "button"), b.a11y.addLabel(b.nextButton, b.params.nextSlideMessage)), b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.a11y.makeFocusable(b.prevButton), b.a11y.addRole(b.prevButton, "button"), b.a11y.addLabel(b.prevButton, b.params.prevSlideMessage)), a(b.container).append(b.a11y.liveRegion) - }, - initPagination: function() { - b.params.pagination && b.params.paginationClickable && b.bullets && b.bullets.length && b.bullets.each(function() { - var e = a(this); - b.a11y.makeFocusable(e), b.a11y.addRole(e, "button"), b.a11y.addLabel(e, b.params.paginationBulletMessage.replace(/{{index}}/, e.index() + 1)) - }) - }, - destroy: function() { - b.a11y.liveRegion && b.a11y.liveRegion.length > 0 && b.a11y.liveRegion.remove() - } - }, b.init = function() { - b.params.loop && b.createLoop(), b.updateContainerSize(), b.updateSlidesSize(), b.updatePagination(), b.params.scrollbar && b.scrollbar && (b.scrollbar.set(), b.params.scrollbarDraggable && b.scrollbar.enableDraggable()), "slide" !== b.params.effect && b.effects[b.params.effect] && (b.params.loop || b.updateProgress(), b.effects[b.params.effect].setTranslate()), b.params.loop ? b.slideTo(b.params.initialSlide + b.loopedSlides, 0, b.params.runCallbacksOnInit) : (b.slideTo(b.params.initialSlide, 0, b.params.runCallbacksOnInit), 0 === b.params.initialSlide && (b.parallax && b.params.parallax && b.parallax.setTranslate(), b.lazy && b.params.lazyLoading && (b.lazy.load(), b.lazy.initialImageLoaded = !0))), b.attachEvents(), b.params.observer && b.support.observer && b.initObservers(), b.params.preloadImages && !b.params.lazyLoading && b.preloadImages(), b.params.autoplay && b.startAutoplay(), b.params.keyboardControl && b.enableKeyboardControl && b.enableKeyboardControl(), b.params.mousewheelControl && b.enableMousewheelControl && b.enableMousewheelControl(), - b.params.hashnav && b.hashnav && b.hashnav.init(), b.params.a11y && b.a11y && b.a11y.init(), b.emit("onInit", b) - }, b.cleanupStyles = function() { - b.container.removeClass(b.classNames.join(" ")).removeAttr("style"), b.wrapper.removeAttr("style"), b.slides && b.slides.length && b.slides.removeClass([b.params.slideVisibleClass, b.params.slideActiveClass, b.params.slideNextClass, b.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"), b.paginationContainer && b.paginationContainer.length && b.paginationContainer.removeClass(b.params.paginationHiddenClass), b.bullets && b.bullets.length && b.bullets.removeClass(b.params.bulletActiveClass), b.params.prevButton && a(b.params.prevButton).removeClass(b.params.buttonDisabledClass), b.params.nextButton && a(b.params.nextButton).removeClass(b.params.buttonDisabledClass), b.params.scrollbar && b.scrollbar && (b.scrollbar.track && b.scrollbar.track.length && b.scrollbar.track.removeAttr("style"), b.scrollbar.drag && b.scrollbar.drag.length && b.scrollbar.drag.removeAttr("style")) - }, b.destroy = function(e, a) { - b.detachEvents(), b.stopAutoplay(), b.params.scrollbar && b.scrollbar && b.params.scrollbarDraggable && b.scrollbar.disableDraggable(), b.params.loop && b.destroyLoop(), a && b.cleanupStyles(), b.disconnectObservers(), b.params.keyboardControl && b.disableKeyboardControl && b.disableKeyboardControl(), b.params.mousewheelControl && b.disableMousewheelControl && b.disableMousewheelControl(), b.params.a11y && b.a11y && b.a11y.destroy(), b.emit("onDestroy"), e !== !1 && (b = null) - }, b.init(), b - } - }; - t.prototype = { - isSafari: function() { - var e = navigator.userAgent.toLowerCase(); - return e.indexOf("safari") >= 0 && e.indexOf("chrome") < 0 && e.indexOf("android") < 0 - }(), - isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent), - isArray: function(e) { - return "[object Array]" === Object.prototype.toString.apply(e) - }, - browser: { - ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled, - ieTouch: window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1 - }, - device: function() { - var e = navigator.userAgent, - a = e.match(/(Android);?[\s\/]+([\d.]+)?/), - t = e.match(/(iPad).*OS\s([\d_]+)/), - r = e.match(/(iPod)(.*OS\s([\d_]+))?/), - i = !t && e.match(/(iPhone\sOS)\s([\d_]+)/); - return { - ios: t || i || r, - android: a - } - }(), - support: { - touch: window.Modernizr && Modernizr.touch === !0 || function() { - return !!("ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch) - }(), - transforms3d: window.Modernizr && Modernizr.csstransforms3d === !0 || function() { - var e = document.createElement("div").style; - return "webkitPerspective" in e || "MozPerspective" in e || "OPerspective" in e || "MsPerspective" in e || "perspective" in e - }(), - flexbox: function() { - for (var e = document.createElement("div").style, a = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), t = 0; t < a.length; t++) - if (a[t] in e) return !0 - }(), - observer: function() { - return "MutationObserver" in window || "WebkitMutationObserver" in window - }() - }, - plugins: {} - }; - for (var r = (function() { - var e = function(e) { - var a = this, - t = 0; - for (t = 0; t < e.length; t++) a[t] = e[t]; - return a.length = e.length, this - }, - a = function(a, t) { - var r = [], - i = 0; - if (a && !t && a instanceof e) return a; - if (a) - if ("string" == typeof a) { - var s, n, o = a.trim(); - if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) { - var l = "div"; - for (0 === o.indexOf(":~]/) ? (t || document).querySelectorAll(a) : [document.getElementById(a.split("#")[1])], i = 0; i < s.length; i++) s[i] && r.push(s[i]) - } else if (a.nodeType || a === window || a === document) r.push(a); - else if (a.length > 0 && a[0].nodeType) - for (i = 0; i < a.length; i++) r.push(a[i]); - return new e(r) - }; - return e.prototype = { - addClass: function(e) { - if ("undefined" == typeof e) return this; - for (var a = e.split(" "), t = 0; t < a.length; t++) - for (var r = 0; r < this.length; r++) this[r].classList.add(a[t]); - return this - }, - removeClass: function(e) { - for (var a = e.split(" "), t = 0; t < a.length; t++) - for (var r = 0; r < this.length; r++) this[r].classList.remove(a[t]); - return this - }, - hasClass: function(e) { - return this[0] ? this[0].classList.contains(e) : !1 - }, - toggleClass: function(e) { - for (var a = e.split(" "), t = 0; t < a.length; t++) - for (var r = 0; r < this.length; r++) this[r].classList.toggle(a[t]); - return this - }, - attr: function(e, a) { - if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; - for (var t = 0; t < this.length; t++) - if (2 === arguments.length) this[t].setAttribute(e, a); - else - for (var r in e) this[t][r] = e[r], this[t].setAttribute(r, e[r]); - return this - }, - removeAttr: function(e) { - for (var a = 0; a < this.length; a++) this[a].removeAttribute(e); - return this - }, - data: function(e, a) { - if ("undefined" != typeof a) { - for (var t = 0; t < this.length; t++) { - var r = this[t]; - r.dom7ElementDataStorage || (r.dom7ElementDataStorage = {}), r.dom7ElementDataStorage[e] = a - } - return this - } - if (this[0]) { - var i = this[0].getAttribute("data-" + e); - return i ? i : this[0].dom7ElementDataStorage && e in this[0].dom7ElementDataStorage ? this[0].dom7ElementDataStorage[e] : void 0 - } - }, - transform: function(e) { - for (var a = 0; a < this.length; a++) { - var t = this[a].style; - t.webkitTransform = t.MsTransform = t.msTransform = t.MozTransform = t.OTransform = t.transform = e - } - return this - }, - transition: function(e) { - "string" != typeof e && (e += "ms"); - for (var a = 0; a < this.length; a++) { - var t = this[a].style; - t.webkitTransitionDuration = t.MsTransitionDuration = t.msTransitionDuration = t.MozTransitionDuration = t.OTransitionDuration = t.transitionDuration = e - } - return this - }, - on: function(e, t, r, i) { - function s(e) { - var i = e.target; - if (a(i).is(t)) r.call(i, e); - else - for (var s = a(i).parents(), n = 0; n < s.length; n++) a(s[n]).is(t) && r.call(s[n], e) - } - var n, o, l = e.split(" "); - for (n = 0; n < this.length; n++) - if ("function" == typeof t || t === !1) - for ("function" == typeof t && (r = arguments[1], i = arguments[2] || !1), o = 0; o < l.length; o++) this[n].addEventListener(l[o], r, i); - else - for (o = 0; o < l.length; o++) this[n].dom7LiveListeners || (this[n].dom7LiveListeners = []), this[n].dom7LiveListeners.push({ - listener: r, - liveListener: s - }), this[n].addEventListener(l[o], s, i); - return this - }, - off: function(e, a, t, r) { - for (var i = e.split(" "), s = 0; s < i.length; s++) - for (var n = 0; n < this.length; n++) - if ("function" == typeof a || a === !1) "function" == typeof a && (t = arguments[1], r = arguments[2] || !1), this[n].removeEventListener(i[s], t, r); - else if (this[n].dom7LiveListeners) - for (var o = 0; o < this[n].dom7LiveListeners.length; o++) this[n].dom7LiveListeners[o].listener === t && this[n].removeEventListener(i[s], this[n].dom7LiveListeners[o].liveListener, r); - return this - }, - once: function(e, a, t, r) { - function i(n) { - t(n), s.off(e, a, i, r) - } - var s = this; - "function" == typeof a && (a = !1, t = arguments[1], r = arguments[2]), s.on(e, a, i, r) - }, - trigger: function(e, a) { - for (var t = 0; t < this.length; t++) { - var r; - try { - r = new window.CustomEvent(e, { - detail: a, - bubbles: !0, - cancelable: !0 - }) - } catch (i) { - r = document.createEvent("Event"), r.initEvent(e, !0, !0), r.detail = a - } - this[t].dispatchEvent(r) - } - return this - }, - transitionEnd: function(e) { - function a(s) { - if (s.target === this) - for (e.call(this, s), t = 0; t < r.length; t++) i.off(r[t], a) - } - var t, r = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], - i = this; - if (e) - for (t = 0; t < r.length; t++) i.on(r[t], a); - return this - }, - width: function() { - return this[0] === window ? window.innerWidth : this.length > 0 ? parseFloat(this.css("width")) : null - }, - outerWidth: function(e) { - return this.length > 0 ? e ? this[0].offsetWidth + parseFloat(this.css("margin-right")) + parseFloat(this.css("margin-left")) : this[0].offsetWidth : null - }, - height: function() { - return this[0] === window ? window.innerHeight : this.length > 0 ? parseFloat(this.css("height")) : null - }, - outerHeight: function(e) { - return this.length > 0 ? e ? this[0].offsetHeight + parseFloat(this.css("margin-top")) + parseFloat(this.css("margin-bottom")) : this[0].offsetHeight : null - }, - offset: function() { - if (this.length > 0) { - var e = this[0], - a = e.getBoundingClientRect(), - t = document.body, - r = e.clientTop || t.clientTop || 0, - i = e.clientLeft || t.clientLeft || 0, - s = window.pageYOffset || e.scrollTop, - n = window.pageXOffset || e.scrollLeft; - return { - top: a.top + s - r, - left: a.left + n - i - } - } - return null - }, - css: function(e, a) { - var t; - if (1 === arguments.length) { - if ("string" != typeof e) { - for (t = 0; t < this.length; t++) - for (var r in e) this[t].style[r] = e[r]; - return this - } - if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(e) - } - if (2 === arguments.length && "string" == typeof e) { - for (t = 0; t < this.length; t++) this[t].style[e] = a; - return this - } - return this - }, - each: function(e) { - for (var a = 0; a < this.length; a++) e.call(this[a], a, this[a]); - return this - }, - html: function(e) { - if ("undefined" == typeof e) return this[0] ? this[0].innerHTML : void 0; - for (var a = 0; a < this.length; a++) this[a].innerHTML = e; - return this - }, - text: function(e) { - if ("undefined" == typeof e) return this[0] ? this[0].textContent.trim() : null; - for (var a = 0; a < this.length; a++) this[a].textContent = e; - return this - }, - is: function(t) { - if (!this[0]) return !1; - var r, i; - if ("string" == typeof t) { - var s = this[0]; - if (s === document) return t === document; - if (s === window) return t === window; - if (s.matches) return s.matches(t); - if (s.webkitMatchesSelector) return s.webkitMatchesSelector(t); - if (s.mozMatchesSelector) return s.mozMatchesSelector(t); - if (s.msMatchesSelector) return s.msMatchesSelector(t); - for (r = a(t), i = 0; i < r.length; i++) - if (r[i] === this[0]) return !0; - return !1 - } - if (t === document) return this[0] === document; - if (t === window) return this[0] === window; - if (t.nodeType || t instanceof e) { - for (r = t.nodeType ? [t] : t, i = 0; i < r.length; i++) - if (r[i] === this[0]) return !0; - return !1 - } - return !1 - }, - index: function() { - if (this[0]) { - for (var e = this[0], a = 0; null !== (e = e.previousSibling);) 1 === e.nodeType && a++; - return a - } - }, - eq: function(a) { - if ("undefined" == typeof a) return this; - var t, r = this.length; - return a > r - 1 ? new e([]) : 0 > a ? (t = r + a, new e(0 > t ? [] : [this[t]])) : new e([this[a]]) - }, - append: function(a) { - var t, r; - for (t = 0; t < this.length; t++) - if ("string" == typeof a) { - var i = document.createElement("div"); - for (i.innerHTML = a; i.firstChild;) this[t].appendChild(i.firstChild) - } else if (a instanceof e) - for (r = 0; r < a.length; r++) this[t].appendChild(a[r]); - else this[t].appendChild(a); - return this - }, - prepend: function(a) { - var t, r; - for (t = 0; t < this.length; t++) - if ("string" == typeof a) { - var i = document.createElement("div"); - for (i.innerHTML = a, r = i.childNodes.length - 1; r >= 0; r--) this[t].insertBefore(i.childNodes[r], this[t].childNodes[0]) - } else if (a instanceof e) - for (r = 0; r < a.length; r++) this[t].insertBefore(a[r], this[t].childNodes[0]); - else this[t].insertBefore(a, this[t].childNodes[0]); - return this - }, - insertBefore: function(e) { - for (var t = a(e), r = 0; r < this.length; r++) - if (1 === t.length) t[0].parentNode.insertBefore(this[r], t[0]); - else if (t.length > 1) - for (var i = 0; i < t.length; i++) t[i].parentNode.insertBefore(this[r].cloneNode(!0), t[i]) - }, - insertAfter: function(e) { - for (var t = a(e), r = 0; r < this.length; r++) - if (1 === t.length) t[0].parentNode.insertBefore(this[r], t[0].nextSibling); - else if (t.length > 1) - for (var i = 0; i < t.length; i++) t[i].parentNode.insertBefore(this[r].cloneNode(!0), t[i].nextSibling) - }, - next: function(t) { - return new e(this.length > 0 ? t ? this[0].nextElementSibling && a(this[0].nextElementSibling).is(t) ? [this[0].nextElementSibling] : [] : this[0].nextElementSibling ? [this[0].nextElementSibling] : [] : []) - }, - nextAll: function(t) { - var r = [], - i = this[0]; - if (!i) return new e([]); - for (; i.nextElementSibling;) { - var s = i.nextElementSibling; - t ? a(s).is(t) && r.push(s) : r.push(s), i = s - } - return new e(r) - }, - prev: function(t) { - return new e(this.length > 0 ? t ? this[0].previousElementSibling && a(this[0].previousElementSibling).is(t) ? [this[0].previousElementSibling] : [] : this[0].previousElementSibling ? [this[0].previousElementSibling] : [] : []) - }, - prevAll: function(t) { - var r = [], - i = this[0]; - if (!i) return new e([]); - for (; i.previousElementSibling;) { - var s = i.previousElementSibling; - t ? a(s).is(t) && r.push(s) : r.push(s), i = s - } - return new e(r) - }, - parent: function(e) { - for (var t = [], r = 0; r < this.length; r++) e ? a(this[r].parentNode).is(e) && t.push(this[r].parentNode) : t.push(this[r].parentNode); - return a(a.unique(t)) - }, - parents: function(e) { - for (var t = [], r = 0; r < this.length; r++) - for (var i = this[r].parentNode; i;) e ? a(i).is(e) && t.push(i) : t.push(i), i = i.parentNode; - return a(a.unique(t)) - }, - find: function(a) { - for (var t = [], r = 0; r < this.length; r++) - for (var i = this[r].querySelectorAll(a), s = 0; s < i.length; s++) t.push(i[s]); - return new e(t) - }, - children: function(t) { - for (var r = [], i = 0; i < this.length; i++) - for (var s = this[i].childNodes, n = 0; n < s.length; n++) t ? 1 === s[n].nodeType && a(s[n]).is(t) && r.push(s[n]) : 1 === s[n].nodeType && r.push(s[n]); - return new e(a.unique(r)) - }, - remove: function() { - for (var e = 0; e < this.length; e++) this[e].parentNode && this[e].parentNode.removeChild(this[e]); - return this - }, - add: function() { - var e, t, r = this; - for (e = 0; e < arguments.length; e++) { - var i = a(arguments[e]); - for (t = 0; t < i.length; t++) r[r.length] = i[t], r.length++ - } - return r - } - }, a.fn = e.prototype, a.unique = function(e) { - for (var a = [], t = 0; t < e.length; t++) - 1 === a.indexOf(e[t]) && a.push(e[t]); - return a - }, a - }()), i = ["jQuery", "Zepto", "Dom7"], s = 0; s < i.length; s++) window[i[s]] && e(window[i[s]]); - var n; - n = "undefined" == typeof r ? window.Dom7 || window.Zepto || window.jQuery : r, n && ("transitionEnd" in n.fn || (n.fn.transitionEnd = function(e) { - function a(s) { - if (s.target === this) - for (e.call(this, s), t = 0; t < r.length; t++) i.off(r[t], a) - } - var t, r = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], - i = this; - if (e) - for (t = 0; t < r.length; t++) i.on(r[t], a); - return this - }), "transform" in n.fn || (n.fn.transform = function(e) { - for (var a = 0; a < this.length; a++) { - var t = this[a].style; - t.webkitTransform = t.MsTransform = t.msTransform = t.MozTransform = t.OTransform = t.transform = e - } - return this - }), "transition" in n.fn || (n.fn.transition = function(e) { - "string" != typeof e && (e += "ms"); - for (var a = 0; a < this.length; a++) { - var t = this[a].style; - t.webkitTransitionDuration = t.MsTransitionDuration = t.msTransitionDuration = t.MozTransitionDuration = t.OTransitionDuration = t.transitionDuration = e - } - return this - })), window.Swiper = t -}(), "undefined" != typeof module ? module.exports = window.Swiper : "function" == typeof define && define.amd && define([], function() { - "use strict"; - return window.Swiper -}); -//# sourceMappingURL=maps/swiper.min.js.map \ No newline at end of file diff --git a/src/bower_components/Swiper/package.js b/src/bower_components/Swiper/package.js deleted file mode 100644 index 75fb0ca24d..0000000000 --- a/src/bower_components/Swiper/package.js +++ /dev/null @@ -1,9 +0,0 @@ -var version = "3.3.1"; -Package.describe({ - name: "nolimits4web:swiper", - summary: "iDangero.us Swiper - mobile touch slider with hardware accelerated transitions and native behavior", - version: version, - git: "https://github.com/nolimits4web/Swiper" -}), Package.onUse(function(api) { - api.versionsFrom("1.1.0.2"), api.addFiles(["dist/css/swiper.min.css", "dist/js/swiper.js"], ["client"]) -}), Package.onTest(function(api) {}); \ No newline at end of file diff --git a/src/bower_components/howlerjs/dist/howler.min.js b/src/bower_components/howlerjs/dist/howler.min.js deleted file mode 100644 index 4896ac8ece..0000000000 --- a/src/bower_components/howlerjs/dist/howler.min.js +++ /dev/null @@ -1,853 +0,0 @@ -/*! howler.js v2.0.14 | (c) 2013-2018, James Simpson of GoldFire Studios | MIT License | howlerjs.com */ ! function() { - "use strict"; - var e = function() { - this.init() - }; - e.prototype = { - init: function() { - var e = this || n; - return e._counter = 1e3, e._codecs = {}, e._howls = [], e._muted = !1, e._volume = 1, e._canPlayEvent = "canplaythrough", e._navigator = "undefined" != typeof window && window.navigator ? window.navigator : null, e.masterGain = null, e.noAudio = !1, e.usingWebAudio = !0, e.autoSuspend = !0, e.ctx = null, e.mobileAutoEnable = !0, e._setup(), e - }, - volume: function(e) { - var o = this || n; - if (e = parseFloat(e), o.ctx || _(), void 0 !== e && e >= 0 && e <= 1) { - if (o._volume = e, o._muted) return o; - o.usingWebAudio && o.masterGain.gain.setValueAtTime(e, n.ctx.currentTime); - for (var t = 0; t < o._howls.length; t++) - if (!o._howls[t]._webAudio) - for (var r = o._howls[t]._getSoundIds(), a = 0; a < r.length; a++) { - var u = o._howls[t]._soundById(r[a]); - u && u._node && (u._node.volume = u._volume * e) - } - return o - } - return o._volume - }, - mute: function(e) { - var o = this || n; - o.ctx || _(), o._muted = e, o.usingWebAudio && o.masterGain.gain.setValueAtTime(e ? 0 : o._volume, n.ctx.currentTime); - for (var t = 0; t < o._howls.length; t++) - if (!o._howls[t]._webAudio) - for (var r = o._howls[t]._getSoundIds(), a = 0; a < r.length; a++) { - var u = o._howls[t]._soundById(r[a]); - u && u._node && (u._node.muted = !!e || u._muted) - } - return o - }, - unload: function() { - for (var e = this || n, o = e._howls.length - 1; o >= 0; o--) e._howls[o].unload(); - return e.usingWebAudio && e.ctx && void 0 !== e.ctx.close && (e.ctx.close(), e.ctx = null, _()), e - }, - codecs: function(e) { - return (this || n)._codecs[e.replace(/^x-/, "")] - }, - _setup: function() { - var e = this || n; - if (e.state = e.ctx ? e.ctx.state || "running" : "running", e._autoSuspend(), !e.usingWebAudio) - if ("undefined" != typeof Audio) try { - var o = new Audio; - void 0 === o.oncanplaythrough && (e._canPlayEvent = "canplay") - } catch (n) { - e.noAudio = !0 - } else e.noAudio = !0; - try { - var o = new Audio; - o.muted && (e.noAudio = !0) - } catch (e) {} - return e.noAudio || e._setupCodecs(), e - }, - _setupCodecs: function() { - var e = this || n, - o = null; - try { - o = "undefined" != typeof Audio ? new Audio : null - } catch (n) { - return e - } - if (!o || "function" != typeof o.canPlayType) return e; - var t = o.canPlayType("audio/mpeg;").replace(/^no$/, ""), - r = e._navigator && e._navigator.userAgent.match(/OPR\/([0-6].)/g), - a = r && parseInt(r[0].split("/")[1], 10) < 33; - return e._codecs = { - mp3: !(a || !t && !o.canPlayType("audio/mp3;").replace(/^no$/, "")), - mpeg: !!t, - opus: !!o.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""), - ogg: !!o.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), - oga: !!o.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), - wav: !!o.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), - aac: !!o.canPlayType("audio/aac;").replace(/^no$/, ""), - caf: !!o.canPlayType("audio/x-caf;").replace(/^no$/, ""), - m4a: !!(o.canPlayType("audio/x-m4a;") || o.canPlayType("audio/m4a;") || o.canPlayType("audio/aac;")).replace(/^no$/, ""), - mp4: !!(o.canPlayType("audio/x-mp4;") || o.canPlayType("audio/mp4;") || o.canPlayType("audio/aac;")).replace(/^no$/, ""), - weba: !!o.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""), - webm: !!o.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""), - dolby: !!o.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""), - flac: !!(o.canPlayType("audio/x-flac;") || o.canPlayType("audio/flac;")).replace(/^no$/, "") - }, e - }, - _enableMobileAudio: function() { - var e = this || n, - o = /iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome/i.test(e._navigator && e._navigator.userAgent); - if (!e._mobileEnabled && e.ctx && o) { - e._mobileEnabled = !1, e.mobileAutoEnable = !1, e._mobileUnloaded || 44100 === e.ctx.sampleRate || (e._mobileUnloaded = !0, e.unload()), e._scratchBuffer = e.ctx.createBuffer(1, 1, 22050); - var t = function(o) { - o.preventDefault(), n._autoResume(); - var r = e.ctx.createBufferSource(); - r.buffer = e._scratchBuffer, r.connect(e.ctx.destination), void 0 === r.start ? r.noteOn(0) : r.start(0), "function" == typeof e.ctx.resume && e.ctx.resume(), r.onended = function() { - r.disconnect(0), e._mobileEnabled = !0, document.removeEventListener("touchstart", t, !0), document.removeEventListener("touchend", t, !0), document.removeEventListener("click", t, !0); - for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("unlock") - } - }; - return document.addEventListener("touchstart", t, !0), document.addEventListener("touchend", t, !0), document.addEventListener("click", t, !0), e - } - }, - _autoSuspend: function() { - var e = this; - if (e.autoSuspend && e.ctx && void 0 !== e.ctx.suspend && n.usingWebAudio) { - for (var o = 0; o < e._howls.length; o++) - if (e._howls[o]._webAudio) - for (var t = 0; t < e._howls[o]._sounds.length; t++) - if (!e._howls[o]._sounds[t]._paused) return e; - return e._suspendTimer && clearTimeout(e._suspendTimer), e._suspendTimer = setTimeout(function() { - e.autoSuspend && (e._suspendTimer = null, e.state = "suspending", e.ctx.suspend().then(function() { - e.state = "suspended", e._resumeAfterSuspend && (delete e._resumeAfterSuspend, e._autoResume()) - })) - }, 3e4), e - } - }, - _autoResume: function() { - var e = this; - if (e.ctx && void 0 !== e.ctx.resume && n.usingWebAudio) return "running" === e.state && e._suspendTimer ? (clearTimeout(e._suspendTimer), e._suspendTimer = null) : "suspended" === e.state ? (e.ctx.resume().then(function() { - e.state = "running"; - for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("resume") - }), e._suspendTimer && (clearTimeout(e._suspendTimer), e._suspendTimer = null)) : "suspending" === e.state && (e._resumeAfterSuspend = !0), e - } - }; - var n = new e, - o = function(e) { - var n = this; - if (!e.src || 0 === e.src.length) return void console.error("An array of source files must be passed with any new Howl."); - n.init(e) - }; - o.prototype = { - init: function(e) { - var o = this; - return n.ctx || _(), o._autoplay = e.autoplay || !1, o._format = "string" != typeof e.format ? e.format : [e.format], o._html5 = e.html5 || !1, o._muted = e.mute || !1, o._loop = e.loop || !1, o._pool = e.pool || 5, o._preload = "boolean" != typeof e.preload || e.preload, o._rate = e.rate || 1, o._sprite = e.sprite || {}, o._src = "string" != typeof e.src ? e.src : [e.src], o._volume = void 0 !== e.volume ? e.volume : 1, o._xhrWithCredentials = e.xhrWithCredentials || !1, o._duration = 0, o._state = "unloaded", o._sounds = [], o._endTimers = {}, o._queue = [], o._playLock = !1, o._onend = e.onend ? [{ - fn: e.onend - }] : [], o._onfade = e.onfade ? [{ - fn: e.onfade - }] : [], o._onload = e.onload ? [{ - fn: e.onload - }] : [], o._onloaderror = e.onloaderror ? [{ - fn: e.onloaderror - }] : [], o._onplayerror = e.onplayerror ? [{ - fn: e.onplayerror - }] : [], o._onpause = e.onpause ? [{ - fn: e.onpause - }] : [], o._onplay = e.onplay ? [{ - fn: e.onplay - }] : [], o._onstop = e.onstop ? [{ - fn: e.onstop - }] : [], o._onmute = e.onmute ? [{ - fn: e.onmute - }] : [], o._onvolume = e.onvolume ? [{ - fn: e.onvolume - }] : [], o._onrate = e.onrate ? [{ - fn: e.onrate - }] : [], o._onseek = e.onseek ? [{ - fn: e.onseek - }] : [], o._onunlock = e.onunlock ? [{ - fn: e.onunlock - }] : [], o._onresume = [], o._webAudio = n.usingWebAudio && !o._html5, void 0 !== n.ctx && n.ctx && n.mobileAutoEnable && n._enableMobileAudio(), n._howls.push(o), o._autoplay && o._queue.push({ - event: "play", - action: function() { - o.play() - } - }), o._preload && o.load(), o - }, - load: function() { - var e = this, - o = null; - if (n.noAudio) return void e._emit("loaderror", null, "No audio support."); - "string" == typeof e._src && (e._src = [e._src]); - for (var r = 0; r < e._src.length; r++) { - var u, i; - if (e._format && e._format[r]) u = e._format[r]; - else { - if ("string" != typeof(i = e._src[r])) { - e._emit("loaderror", null, "Non-string found in selected audio sources - ignoring."); - continue - } - u = /^data:audio\/([^;,]+);/i.exec(i), u || (u = /\.([^.]+)$/.exec(i.split("?", 1)[0])), u && (u = u[1].toLowerCase()) - } - if (u || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), u && n.codecs(u)) { - o = e._src[r]; - break - } - } - return o ? (e._src = o, e._state = "loading", "https:" === window.location.protocol && "http:" === o.slice(0, 5) && (e._html5 = !0, e._webAudio = !1), new t(e), e._webAudio && a(e), e) : void e._emit("loaderror", null, "No codec support for selected audio sources.") - }, - play: function(e, o) { - var t = this, - r = null; - if ("number" == typeof e) r = e, e = null; - else { - if ("string" == typeof e && "loaded" === t._state && !t._sprite[e]) return null; - if (void 0 === e) { - e = "__default"; - for (var a = 0, u = 0; u < t._sounds.length; u++) t._sounds[u]._paused && !t._sounds[u]._ended && (a++, r = t._sounds[u]._id); - 1 === a ? e = null : r = null - } - } - var i = r ? t._soundById(r) : t._inactiveSound(); - if (!i) return null; - if (r && !e && (e = i._sprite || "__default"), "loaded" !== t._state) { - i._sprite = e, i._ended = !1; - var d = i._id; - return t._queue.push({ - event: "play", - action: function() { - t.play(d) - } - }), d - } - if (r && !i._paused) return o || t._loadQueue("play"), i._id; - t._webAudio && n._autoResume(); - var _ = Math.max(0, i._seek > 0 ? i._seek : t._sprite[e][0] / 1e3), - s = Math.max(0, (t._sprite[e][0] + t._sprite[e][1]) / 1e3 - _), - l = 1e3 * s / Math.abs(i._rate); - if (i._paused = !1, i._ended = !1, i._sprite = e, i._seek = _, i._start = t._sprite[e][0] / 1e3, i._stop = (t._sprite[e][0] + t._sprite[e][1]) / 1e3, i._loop = !(!i._loop && !t._sprite[e][2]), i._seek >= i._stop) return void t._ended(i); - var c = i._node; - if (t._webAudio) { - var f = function() { - t._refreshBuffer(i); - var e = i._muted || t._muted ? 0 : i._volume; - c.gain.setValueAtTime(e, n.ctx.currentTime), i._playStart = n.ctx.currentTime, void 0 === c.bufferSource.start ? i._loop ? c.bufferSource.noteGrainOn(0, _, 86400) : c.bufferSource.noteGrainOn(0, _, s) : i._loop ? c.bufferSource.start(0, _, 86400) : c.bufferSource.start(0, _, s), l !== 1 / 0 && (t._endTimers[i._id] = setTimeout(t._ended.bind(t, i), l)), o || setTimeout(function() { - t._emit("play", i._id) - }, 0) - }; - "running" === n.state ? f() : (t.once("resume", f), t._clearTimer(i._id)) - } else { - var p = function() { - c.currentTime = _, c.muted = i._muted || t._muted || n._muted || c.muted, c.volume = i._volume * n.volume(), c.playbackRate = i._rate; - try { - var r = c.play(); - if ("undefined" != typeof Promise && (r instanceof Promise || "function" == typeof r.then) ? (t._playLock = !0, r.then(function() { - t._playLock = !1, o || t._emit("play", i._id) - }).catch(function() { - t._playLock = !1, t._emit("playerror", i._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.") - })) : o || t._emit("play", i._id), c.playbackRate = i._rate, c.paused) return void t._emit("playerror", i._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."); - "__default" !== e || i._loop ? t._endTimers[i._id] = setTimeout(t._ended.bind(t, i), l) : (t._endTimers[i._id] = function() { - t._ended(i), c.removeEventListener("ended", t._endTimers[i._id], !1) - }, c.addEventListener("ended", t._endTimers[i._id], !1)) - } catch (e) { - t._emit("playerror", i._id, e) - } - }, - m = window && window.ejecta || !c.readyState && n._navigator.isCocoonJS; - if (c.readyState >= 3 || m) p(); - else { - var v = function() { - p(), c.removeEventListener(n._canPlayEvent, v, !1) - }; - c.addEventListener(n._canPlayEvent, v, !1), t._clearTimer(i._id) - } - } - return i._id - }, - pause: function(e) { - var n = this; - if ("loaded" !== n._state || n._playLock) return n._queue.push({ - event: "pause", - action: function() { - n.pause(e) - } - }), n; - for (var o = n._getSoundIds(e), t = 0; t < o.length; t++) { - n._clearTimer(o[t]); - var r = n._soundById(o[t]); - if (r && !r._paused && (r._seek = n.seek(o[t]), r._rateSeek = 0, r._paused = !0, n._stopFade(o[t]), r._node)) - if (n._webAudio) { - if (!r._node.bufferSource) continue; - void 0 === r._node.bufferSource.stop ? r._node.bufferSource.noteOff(0) : r._node.bufferSource.stop(0), n._cleanBuffer(r._node) - } else isNaN(r._node.duration) && r._node.duration !== 1 / 0 || r._node.pause(); - arguments[1] || n._emit("pause", r ? r._id : null) - } - return n - }, - stop: function(e, n) { - var o = this; - if ("loaded" !== o._state || o._playLock) return o._queue.push({ - event: "stop", - action: function() { - o.stop(e) - } - }), o; - for (var t = o._getSoundIds(e), r = 0; r < t.length; r++) { - o._clearTimer(t[r]); - var a = o._soundById(t[r]); - a && (a._seek = a._start || 0, a._rateSeek = 0, a._paused = !0, a._ended = !0, o._stopFade(t[r]), a._node && (o._webAudio ? a._node.bufferSource && (void 0 === a._node.bufferSource.stop ? a._node.bufferSource.noteOff(0) : a._node.bufferSource.stop(0), o._cleanBuffer(a._node)) : isNaN(a._node.duration) && a._node.duration !== 1 / 0 || (a._node.currentTime = a._start || 0, a._node.pause())), n || o._emit("stop", a._id)) - } - return o - }, - mute: function(e, o) { - var t = this; - if ("loaded" !== t._state || t._playLock) return t._queue.push({ - event: "mute", - action: function() { - t.mute(e, o) - } - }), t; - if (void 0 === o) { - if ("boolean" != typeof e) return t._muted; - t._muted = e - } - for (var r = t._getSoundIds(o), a = 0; a < r.length; a++) { - var u = t._soundById(r[a]); - u && (u._muted = e, u._interval && t._stopFade(u._id), t._webAudio && u._node ? u._node.gain.setValueAtTime(e ? 0 : u._volume, n.ctx.currentTime) : u._node && (u._node.muted = !!n._muted || e), t._emit("mute", u._id)) - } - return t - }, - volume: function() { - var e, o, t = this, - r = arguments; - if (0 === r.length) return t._volume; - if (1 === r.length || 2 === r.length && void 0 === r[1]) { - t._getSoundIds().indexOf(r[0]) >= 0 ? o = parseInt(r[0], 10) : e = parseFloat(r[0]) - } else r.length >= 2 && (e = parseFloat(r[0]), o = parseInt(r[1], 10)); - var a; - if (!(void 0 !== e && e >= 0 && e <= 1)) return a = o ? t._soundById(o) : t._sounds[0], a ? a._volume : 0; - if ("loaded" !== t._state || t._playLock) return t._queue.push({ - event: "volume", - action: function() { - t.volume.apply(t, r) - } - }), t; - void 0 === o && (t._volume = e), o = t._getSoundIds(o); - for (var u = 0; u < o.length; u++)(a = t._soundById(o[u])) && (a._volume = e, r[2] || t._stopFade(o[u]), t._webAudio && a._node && !a._muted ? a._node.gain.setValueAtTime(e, n.ctx.currentTime) : a._node && !a._muted && (a._node.volume = e * n.volume()), t._emit("volume", a._id)); - return t - }, - fade: function(e, o, t, r) { - var a = this; - if ("loaded" !== a._state || a._playLock) return a._queue.push({ - event: "fade", - action: function() { - a.fade(e, o, t, r) - } - }), a; - a.volume(e, r); - for (var u = a._getSoundIds(r), i = 0; i < u.length; i++) { - var d = a._soundById(u[i]); - if (d) { - if (r || a._stopFade(u[i]), a._webAudio && !d._muted) { - var _ = n.ctx.currentTime, - s = _ + t / 1e3; - d._volume = e, d._node.gain.setValueAtTime(e, _), d._node.gain.linearRampToValueAtTime(o, s) - } - a._startFadeInterval(d, e, o, t, u[i], void 0 === r) - } - } - return a - }, - _startFadeInterval: function(e, n, o, t, r, a) { - var u = this, - i = n, - d = o - n, - _ = Math.abs(d / .01), - s = Math.max(4, _ > 0 ? t / _ : t), - l = Date.now(); - e._fadeTo = o, e._interval = setInterval(function() { - var r = (Date.now() - l) / t; - l = Date.now(), i += d * r, i = Math.max(0, i), i = Math.min(1, i), i = Math.round(100 * i) / 100, u._webAudio ? e._volume = i : u.volume(i, e._id, !0), a && (u._volume = i), (o < n && i <= o || o > n && i >= o) && (clearInterval(e._interval), e._interval = null, e._fadeTo = null, u.volume(o, e._id), u._emit("fade", e._id)) - }, s) - }, - _stopFade: function(e) { - var o = this, - t = o._soundById(e); - return t && t._interval && (o._webAudio && t._node.gain.cancelScheduledValues(n.ctx.currentTime), clearInterval(t._interval), t._interval = null, o.volume(t._fadeTo, e), t._fadeTo = null, o._emit("fade", e)), o - }, - loop: function() { - var e, n, o, t = this, - r = arguments; - if (0 === r.length) return t._loop; - if (1 === r.length) { - if ("boolean" != typeof r[0]) return !!(o = t._soundById(parseInt(r[0], 10))) && o._loop; - e = r[0], t._loop = e - } else 2 === r.length && (e = r[0], n = parseInt(r[1], 10)); - for (var a = t._getSoundIds(n), u = 0; u < a.length; u++)(o = t._soundById(a[u])) && (o._loop = e, t._webAudio && o._node && o._node.bufferSource && (o._node.bufferSource.loop = e, e && (o._node.bufferSource.loopStart = o._start || 0, o._node.bufferSource.loopEnd = o._stop))); - return t - }, - rate: function() { - var e, o, t = this, - r = arguments; - if (0 === r.length) o = t._sounds[0]._id; - else if (1 === r.length) { - var a = t._getSoundIds(), - u = a.indexOf(r[0]); - u >= 0 ? o = parseInt(r[0], 10) : e = parseFloat(r[0]) - } else 2 === r.length && (e = parseFloat(r[0]), o = parseInt(r[1], 10)); - var i; - if ("number" != typeof e) return i = t._soundById(o), i ? i._rate : t._rate; - if ("loaded" !== t._state || t._playLock) return t._queue.push({ - event: "rate", - action: function() { - t.rate.apply(t, r) - } - }), t; - void 0 === o && (t._rate = e), o = t._getSoundIds(o); - for (var d = 0; d < o.length; d++) - if (i = t._soundById(o[d])) { - i._rateSeek = t.seek(o[d]), i._playStart = t._webAudio ? n.ctx.currentTime : i._playStart, i._rate = e, t._webAudio && i._node && i._node.bufferSource ? i._node.bufferSource.playbackRate.setValueAtTime(e, n.ctx.currentTime) : i._node && (i._node.playbackRate = e); - var _ = t.seek(o[d]), - s = (t._sprite[i._sprite][0] + t._sprite[i._sprite][1]) / 1e3 - _, - l = 1e3 * s / Math.abs(i._rate); - !t._endTimers[o[d]] && i._paused || (t._clearTimer(o[d]), t._endTimers[o[d]] = setTimeout(t._ended.bind(t, i), l)), t._emit("rate", i._id) - } return t - }, - seek: function() { - var e, o, t = this, - r = arguments; - if (0 === r.length) o = t._sounds[0]._id; - else if (1 === r.length) { - var a = t._getSoundIds(), - u = a.indexOf(r[0]); - u >= 0 ? o = parseInt(r[0], 10) : t._sounds.length && (o = t._sounds[0]._id, e = parseFloat(r[0])) - } else 2 === r.length && (e = parseFloat(r[0]), o = parseInt(r[1], 10)); - if (void 0 === o) return t; - if ("loaded" !== t._state || t._playLock) return t._queue.push({ - event: "seek", - action: function() { - t.seek.apply(t, r) - } - }), t; - var i = t._soundById(o); - if (i) { - if (!("number" == typeof e && e >= 0)) { - if (t._webAudio) { - var d = t.playing(o) ? n.ctx.currentTime - i._playStart : 0, - _ = i._rateSeek ? i._rateSeek - i._seek : 0; - return i._seek + (_ + d * Math.abs(i._rate)) - } - return i._node.currentTime - } - var s = t.playing(o); - s && t.pause(o, !0), i._seek = e, i._ended = !1, t._clearTimer(o), !t._webAudio && i._node && (i._node.currentTime = e); - var l = function() { - t._emit("seek", o), s && t.play(o, !0) - }; - if (s && !t._webAudio) { - var c = function() { - t._playLock ? setTimeout(c, 0) : l() - }; - setTimeout(c, 0) - } else l() - } - return t - }, - playing: function(e) { - var n = this; - if ("number" == typeof e) { - var o = n._soundById(e); - return !!o && !o._paused - } - for (var t = 0; t < n._sounds.length; t++) - if (!n._sounds[t]._paused) return !0; - return !1 - }, - duration: function(e) { - var n = this, - o = n._duration, - t = n._soundById(e); - return t && (o = n._sprite[t._sprite][1] / 1e3), o - }, - state: function() { - return this._state - }, - unload: function() { - for (var e = this, o = e._sounds, t = 0; t < o.length; t++) { - if (o[t]._paused || e.stop(o[t]._id), !e._webAudio) { - /MSIE |Trident\//.test(n._navigator && n._navigator.userAgent) || (o[t]._node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"), o[t]._node.removeEventListener("error", o[t]._errorFn, !1), o[t]._node.removeEventListener(n._canPlayEvent, o[t]._loadFn, !1) - } - delete o[t]._node, e._clearTimer(o[t]._id) - } - var a = n._howls.indexOf(e); - a >= 0 && n._howls.splice(a, 1); - var u = !0; - for (t = 0; t < n._howls.length; t++) - if (n._howls[t]._src === e._src) { - u = !1; - break - } return r && u && delete r[e._src], n.noAudio = !1, e._state = "unloaded", e._sounds = [], e = null, null - }, - on: function(e, n, o, t) { - var r = this, - a = r["_on" + e]; - return "function" == typeof n && a.push(t ? { - id: o, - fn: n, - once: t - } : { - id: o, - fn: n - }), r - }, - off: function(e, n, o) { - var t = this, - r = t["_on" + e], - a = 0; - if ("number" == typeof n && (o = n, n = null), n || o) - for (a = 0; a < r.length; a++) { - var u = o === r[a].id; - if (n === r[a].fn && u || !n && u) { - r.splice(a, 1); - break - } - } else if (e) t["_on" + e] = []; - else { - var i = Object.keys(t); - for (a = 0; a < i.length; a++) 0 === i[a].indexOf("_on") && Array.isArray(t[i[a]]) && (t[i[a]] = []) - } return t - }, - once: function(e, n, o) { - var t = this; - return t.on(e, n, o, 1), t - }, - _emit: function(e, n, o) { - for (var t = this, r = t["_on" + e], a = r.length - 1; a >= 0; a--) r[a].id && r[a].id !== n && "load" !== e || (setTimeout(function(e) { - e.call(this, n, o) - }.bind(t, r[a].fn), 0), r[a].once && t.off(e, r[a].fn, r[a].id)); - return t._loadQueue(e), t - }, - _loadQueue: function(e) { - var n = this; - if (n._queue.length > 0) { - var o = n._queue[0]; - o.event === e && (n._queue.shift(), n._loadQueue()), e || o.action() - } - return n - }, - _ended: function(e) { - var o = this, - t = e._sprite; - if (!o._webAudio && e._node && !e._node.paused && !e._node.ended && e._node.currentTime < e._stop) return setTimeout(o._ended.bind(o, e), 100), o; - var r = !(!e._loop && !o._sprite[t][2]); - if (o._emit("end", e._id), !o._webAudio && r && o.stop(e._id, !0).play(e._id), o._webAudio && r) { - o._emit("play", e._id), e._seek = e._start || 0, e._rateSeek = 0, e._playStart = n.ctx.currentTime; - var a = 1e3 * (e._stop - e._start) / Math.abs(e._rate); - o._endTimers[e._id] = setTimeout(o._ended.bind(o, e), a) - } - return o._webAudio && !r && (e._paused = !0, e._ended = !0, e._seek = e._start || 0, e._rateSeek = 0, o._clearTimer(e._id), o._cleanBuffer(e._node), n._autoSuspend()), o._webAudio || r || o.stop(e._id, !0), o - }, - _clearTimer: function(e) { - var n = this; - if (n._endTimers[e]) { - if ("function" != typeof n._endTimers[e]) clearTimeout(n._endTimers[e]); - else { - var o = n._soundById(e); - o && o._node && o._node.removeEventListener("ended", n._endTimers[e], !1) - } - delete n._endTimers[e] - } - return n - }, - _soundById: function(e) { - for (var n = this, o = 0; o < n._sounds.length; o++) - if (e === n._sounds[o]._id) return n._sounds[o]; - return null - }, - _inactiveSound: function() { - var e = this; - e._drain(); - for (var n = 0; n < e._sounds.length; n++) - if (e._sounds[n]._ended) return e._sounds[n].reset(); - return new t(e) - }, - _drain: function() { - var e = this, - n = e._pool, - o = 0, - t = 0; - if (!(e._sounds.length < n)) { - for (t = 0; t < e._sounds.length; t++) e._sounds[t]._ended && o++; - for (t = e._sounds.length - 1; t >= 0; t--) { - if (o <= n) return; - e._sounds[t]._ended && (e._webAudio && e._sounds[t]._node && e._sounds[t]._node.disconnect(0), e._sounds.splice(t, 1), o--) - } - } - }, - _getSoundIds: function(e) { - var n = this; - if (void 0 === e) { - for (var o = [], t = 0; t < n._sounds.length; t++) o.push(n._sounds[t]._id); - return o - } - return [e] - }, - _refreshBuffer: function(e) { - var o = this; - return e._node.bufferSource = n.ctx.createBufferSource(), e._node.bufferSource.buffer = r[o._src], e._panner ? e._node.bufferSource.connect(e._panner) : e._node.bufferSource.connect(e._node), e._node.bufferSource.loop = e._loop, e._loop && (e._node.bufferSource.loopStart = e._start || 0, e._node.bufferSource.loopEnd = e._stop || 0), e._node.bufferSource.playbackRate.setValueAtTime(e._rate, n.ctx.currentTime), o - }, - _cleanBuffer: function(e) { - var o = this; - if (n._scratchBuffer && e.bufferSource) { - e.bufferSource.onended = null, e.bufferSource.disconnect(0); - try { - e.bufferSource.buffer = n._scratchBuffer - } catch (e) {} - } - return e.bufferSource = null, o - } - }; - var t = function(e) { - this._parent = e, this.init() - }; - t.prototype = { - init: function() { - var e = this, - o = e._parent; - return e._muted = o._muted, e._loop = o._loop, e._volume = o._volume, e._rate = o._rate, e._seek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, o._sounds.push(e), e.create(), e - }, - create: function() { - var e = this, - o = e._parent, - t = n._muted || e._muted || e._parent._muted ? 0 : e._volume; - return o._webAudio ? (e._node = void 0 === n.ctx.createGain ? n.ctx.createGainNode() : n.ctx.createGain(), e._node.gain.setValueAtTime(t, n.ctx.currentTime), e._node.paused = !0, e._node.connect(n.masterGain)) : (e._node = new Audio, e._errorFn = e._errorListener.bind(e), e._node.addEventListener("error", e._errorFn, !1), e._loadFn = e._loadListener.bind(e), e._node.addEventListener(n._canPlayEvent, e._loadFn, !1), e._node.src = o._src, e._node.preload = "auto", e._node.volume = t * n.volume(), e._node.load()), e - }, - reset: function() { - var e = this, - o = e._parent; - return e._muted = o._muted, e._loop = o._loop, e._volume = o._volume, e._rate = o._rate, e._seek = 0, e._rateSeek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, e - }, - _errorListener: function() { - var e = this; - e._parent._emit("loaderror", e._id, e._node.error ? e._node.error.code : 0), e._node.removeEventListener("error", e._errorFn, !1) - }, - _loadListener: function() { - var e = this, - o = e._parent; - o._duration = Math.ceil(10 * e._node.duration) / 10, 0 === Object.keys(o._sprite).length && (o._sprite = { - __default: [0, 1e3 * o._duration] - }), "loaded" !== o._state && (o._state = "loaded", o._emit("load"), o._loadQueue()), e._node.removeEventListener(n._canPlayEvent, e._loadFn, !1) - } - }; - var r = {}, - a = function(e) { - var n = e._src; - if (r[n]) return e._duration = r[n].duration, void d(e); - if (/^data:[^;]+;base64,/.test(n)) { - for (var o = atob(n.split(",")[1]), t = new Uint8Array(o.length), a = 0; a < o.length; ++a) t[a] = o.charCodeAt(a); - i(t.buffer, e) - } else { - var _ = new XMLHttpRequest; - _.open("GET", n, !0), _.withCredentials = e._xhrWithCredentials, _.responseType = "arraybuffer", _.onload = function() { - var n = (_.status + "")[0]; - if ("0" !== n && "2" !== n && "3" !== n) return void e._emit("loaderror", null, "Failed loading audio file with status: " + _.status + "."); - i(_.response, e) - }, _.onerror = function() { - e._webAudio && (e._html5 = !0, e._webAudio = !1, e._sounds = [], delete r[n], e.load()) - }, u(_) - } - }, - u = function(e) { - try { - e.send() - } catch (n) { - e.onerror() - } - }, - i = function(e, o) { - var t = function(e) { - e && o._sounds.length > 0 ? (r[o._src] = e, d(o, e)) : onError() - }, - a = function() { - o._emit("loaderror", null, "Decoding audio data failed.") - }; - "undefined" != typeof Promise && 1 === n.ctx.decodeAudioData.length ? n.ctx.decodeAudioData(e).then(t).catch(a) : n.ctx.decodeAudioData(e, t, a) - }, - d = function(e, n) { - n && !e._duration && (e._duration = n.duration), 0 === Object.keys(e._sprite).length && (e._sprite = { - __default: [0, 1e3 * e._duration] - }), "loaded" !== e._state && (e._state = "loaded", e._emit("load"), e._loadQueue()) - }, - _ = function() { - try { - "undefined" != typeof AudioContext ? n.ctx = new AudioContext : "undefined" != typeof webkitAudioContext ? n.ctx = new webkitAudioContext : n.usingWebAudio = !1 - } catch (e) { - n.usingWebAudio = !1 - } - var e = /iP(hone|od|ad)/.test(n._navigator && n._navigator.platform), - o = n._navigator && n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), - t = o ? parseInt(o[1], 10) : null; - if (e && t && t < 9) { - var r = /safari/.test(n._navigator && n._navigator.userAgent.toLowerCase()); - (n._navigator && n._navigator.standalone && !r || n._navigator && !n._navigator.standalone && !r) && (n.usingWebAudio = !1) - } - n.usingWebAudio && (n.masterGain = void 0 === n.ctx.createGain ? n.ctx.createGainNode() : n.ctx.createGain(), n.masterGain.gain.setValueAtTime(n._muted ? 0 : 1, n.ctx.currentTime), n.masterGain.connect(n.ctx.destination)), n._setup() - }; - "function" == typeof define && define.amd && define([], function() { - return { - Howler: n, - Howl: o - } - }), "undefined" != typeof exports && (exports.Howler = n, exports.Howl = o), "undefined" != typeof window ? (window.HowlerGlobal = e, window.Howler = n, window.Howl = o, window.Sound = t) : "undefined" != typeof global && (global.HowlerGlobal = e, global.Howler = n, global.Howl = o, global.Sound = t) -}(); -/*! Spatial Plugin */ -! function() { - "use strict"; - HowlerGlobal.prototype._pos = [0, 0, 0], HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0], HowlerGlobal.prototype.stereo = function(e) { - var n = this; - if (!n.ctx || !n.ctx.listener) return n; - for (var t = n._howls.length - 1; t >= 0; t--) n._howls[t].stereo(e); - return n - }, HowlerGlobal.prototype.pos = function(e, n, t) { - var r = this; - return r.ctx && r.ctx.listener ? (n = "number" != typeof n ? r._pos[1] : n, t = "number" != typeof t ? r._pos[2] : t, "number" != typeof e ? r._pos : (r._pos = [e, n, t], void 0 !== r.ctx.listener.positionX ? (r.ctx.listener.positionX.setTargetAtTime(r._pos[0], Howler.ctx.currentTime, .1), r.ctx.listener.positionY.setTargetAtTime(r._pos[1], Howler.ctx.currentTime, .1), r.ctx.listener.positionZ.setTargetAtTime(r._pos[2], Howler.ctx.currentTime, .1)) : r.ctx.listener.setPosition(r._pos[0], r._pos[1], r._pos[2]), r)) : r - }, HowlerGlobal.prototype.orientation = function(e, n, t, r, o, i) { - var a = this; - if (!a.ctx || !a.ctx.listener) return a; - var p = a._orientation; - return n = "number" != typeof n ? p[1] : n, t = "number" != typeof t ? p[2] : t, r = "number" != typeof r ? p[3] : r, o = "number" != typeof o ? p[4] : o, i = "number" != typeof i ? p[5] : i, "number" != typeof e ? p : (a._orientation = [e, n, t, r, o, i], void 0 !== a.ctx.listener.forwardX ? (a.ctx.listener.forwardX.setTargetAtTime(e, Howler.ctx.currentTime, .1), a.ctx.listener.forwardY.setTargetAtTime(n, Howler.ctx.currentTime, .1), a.ctx.listener.forwardZ.setTargetAtTime(t, Howler.ctx.currentTime, .1), a.ctx.listener.upX.setTargetAtTime(e, Howler.ctx.currentTime, .1), a.ctx.listener.upY.setTargetAtTime(n, Howler.ctx.currentTime, .1), a.ctx.listener.upZ.setTargetAtTime(t, Howler.ctx.currentTime, .1)) : a.ctx.listener.setOrientation(e, n, t, r, o, i), a) - }, Howl.prototype.init = function(e) { - return function(n) { - var t = this; - return t._orientation = n.orientation || [1, 0, 0], t._stereo = n.stereo || null, t._pos = n.pos || null, t._pannerAttr = { - coneInnerAngle: void 0 !== n.coneInnerAngle ? n.coneInnerAngle : 360, - coneOuterAngle: void 0 !== n.coneOuterAngle ? n.coneOuterAngle : 360, - coneOuterGain: void 0 !== n.coneOuterGain ? n.coneOuterGain : 0, - distanceModel: void 0 !== n.distanceModel ? n.distanceModel : "inverse", - maxDistance: void 0 !== n.maxDistance ? n.maxDistance : 1e4, - panningModel: void 0 !== n.panningModel ? n.panningModel : "HRTF", - refDistance: void 0 !== n.refDistance ? n.refDistance : 1, - rolloffFactor: void 0 !== n.rolloffFactor ? n.rolloffFactor : 1 - }, t._onstereo = n.onstereo ? [{ - fn: n.onstereo - }] : [], t._onpos = n.onpos ? [{ - fn: n.onpos - }] : [], t._onorientation = n.onorientation ? [{ - fn: n.onorientation - }] : [], e.call(this, n) - } - }(Howl.prototype.init), Howl.prototype.stereo = function(n, t) { - var r = this; - if (!r._webAudio) return r; - if ("loaded" !== r._state) return r._queue.push({ - event: "stereo", - action: function() { - r.stereo(n, t) - } - }), r; - var o = void 0 === Howler.ctx.createStereoPanner ? "spatial" : "stereo"; - if (void 0 === t) { - if ("number" != typeof n) return r._stereo; - r._stereo = n, r._pos = [n, 0, 0] - } - for (var i = r._getSoundIds(t), a = 0; a < i.length; a++) { - var p = r._soundById(i[a]); - if (p) { - if ("number" != typeof n) return p._stereo; - p._stereo = n, p._pos = [n, 0, 0], p._node && (p._pannerAttr.panningModel = "equalpower", p._panner && p._panner.pan || e(p, o), "spatial" === o ? void 0 !== p._panner.positionX ? (p._panner.positionX.setValueAtTime(n, Howler.ctx.currentTime), p._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime), p._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime)) : p._panner.setPosition(n, 0, 0) : p._panner.pan.setValueAtTime(n, Howler.ctx.currentTime)), r._emit("stereo", p._id) - } - } - return r - }, Howl.prototype.pos = function(n, t, r, o) { - var i = this; - if (!i._webAudio) return i; - if ("loaded" !== i._state) return i._queue.push({ - event: "pos", - action: function() { - i.pos(n, t, r, o) - } - }), i; - if (t = "number" != typeof t ? 0 : t, r = "number" != typeof r ? -.5 : r, void 0 === o) { - if ("number" != typeof n) return i._pos; - i._pos = [n, t, r] - } - for (var a = i._getSoundIds(o), p = 0; p < a.length; p++) { - var s = i._soundById(a[p]); - if (s) { - if ("number" != typeof n) return s._pos; - s._pos = [n, t, r], s._node && (s._panner && !s._panner.pan || e(s, "spatial"), void 0 !== s._panner.positionX ? (s._panner.positionX.setValueAtTime(n, Howler.ctx.currentTime), s._panner.positionY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.positionZ.setValueAtTime(r, Howler.ctx.currentTime)) : s._panner.setOrientation(n, t, r)), i._emit("pos", s._id) - } - } - return i - }, Howl.prototype.orientation = function(n, t, r, o) { - var i = this; - if (!i._webAudio) return i; - if ("loaded" !== i._state) return i._queue.push({ - event: "orientation", - action: function() { - i.orientation(n, t, r, o) - } - }), i; - if (t = "number" != typeof t ? i._orientation[1] : t, r = "number" != typeof r ? i._orientation[2] : r, void 0 === o) { - if ("number" != typeof n) return i._orientation; - i._orientation = [n, t, r] - } - for (var a = i._getSoundIds(o), p = 0; p < a.length; p++) { - var s = i._soundById(a[p]); - if (s) { - if ("number" != typeof n) return s._orientation; - s._orientation = [n, t, r], s._node && (s._panner || (s._pos || (s._pos = i._pos || [0, 0, -.5]), e(s, "spatial")), void 0 !== s._panner.orientationX ? (s._panner.orientationX.setValueAtTime(n, Howler.ctx.currentTime), s._panner.orientationY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.orientationZ.setValueAtTime(r, Howler.ctx.currentTime)) : s._panner.setOrientation(n, t, r)), i._emit("orientation", s._id) - } - } - return i - }, Howl.prototype.pannerAttr = function() { - var n, t, r, o = this, - i = arguments; - if (!o._webAudio) return o; - if (0 === i.length) return o._pannerAttr; - if (1 === i.length) { - if ("object" != typeof i[0]) return r = o._soundById(parseInt(i[0], 10)), r ? r._pannerAttr : o._pannerAttr; - n = i[0], void 0 === t && (n.pannerAttr || (n.pannerAttr = { - coneInnerAngle: n.coneInnerAngle, - coneOuterAngle: n.coneOuterAngle, - coneOuterGain: n.coneOuterGain, - distanceModel: n.distanceModel, - maxDistance: n.maxDistance, - refDistance: n.refDistance, - rolloffFactor: n.rolloffFactor, - panningModel: n.panningModel - }), o._pannerAttr = { - coneInnerAngle: void 0 !== n.pannerAttr.coneInnerAngle ? n.pannerAttr.coneInnerAngle : o._coneInnerAngle, - coneOuterAngle: void 0 !== n.pannerAttr.coneOuterAngle ? n.pannerAttr.coneOuterAngle : o._coneOuterAngle, - coneOuterGain: void 0 !== n.pannerAttr.coneOuterGain ? n.pannerAttr.coneOuterGain : o._coneOuterGain, - distanceModel: void 0 !== n.pannerAttr.distanceModel ? n.pannerAttr.distanceModel : o._distanceModel, - maxDistance: void 0 !== n.pannerAttr.maxDistance ? n.pannerAttr.maxDistance : o._maxDistance, - refDistance: void 0 !== n.pannerAttr.refDistance ? n.pannerAttr.refDistance : o._refDistance, - rolloffFactor: void 0 !== n.pannerAttr.rolloffFactor ? n.pannerAttr.rolloffFactor : o._rolloffFactor, - panningModel: void 0 !== n.pannerAttr.panningModel ? n.pannerAttr.panningModel : o._panningModel - }) - } else 2 === i.length && (n = i[0], t = parseInt(i[1], 10)); - for (var a = o._getSoundIds(t), p = 0; p < a.length; p++) - if (r = o._soundById(a[p])) { - var s = r._pannerAttr; - s = { - coneInnerAngle: void 0 !== n.coneInnerAngle ? n.coneInnerAngle : s.coneInnerAngle, - coneOuterAngle: void 0 !== n.coneOuterAngle ? n.coneOuterAngle : s.coneOuterAngle, - coneOuterGain: void 0 !== n.coneOuterGain ? n.coneOuterGain : s.coneOuterGain, - distanceModel: void 0 !== n.distanceModel ? n.distanceModel : s.distanceModel, - maxDistance: void 0 !== n.maxDistance ? n.maxDistance : s.maxDistance, - refDistance: void 0 !== n.refDistance ? n.refDistance : s.refDistance, - rolloffFactor: void 0 !== n.rolloffFactor ? n.rolloffFactor : s.rolloffFactor, - panningModel: void 0 !== n.panningModel ? n.panningModel : s.panningModel - }; - var c = r._panner; - c ? (c.coneInnerAngle = s.coneInnerAngle, c.coneOuterAngle = s.coneOuterAngle, c.coneOuterGain = s.coneOuterGain, c.distanceModel = s.distanceModel, c.maxDistance = s.maxDistance, c.refDistance = s.refDistance, c.rolloffFactor = s.rolloffFactor, c.panningModel = s.panningModel) : (r._pos || (r._pos = o._pos || [0, 0, -.5]), e(r, "spatial")) - } return o - }, Sound.prototype.init = function(e) { - return function() { - var n = this, - t = n._parent; - n._orientation = t._orientation, n._stereo = t._stereo, n._pos = t._pos, n._pannerAttr = t._pannerAttr, e.call(this), n._stereo ? t.stereo(n._stereo) : n._pos && t.pos(n._pos[0], n._pos[1], n._pos[2], n._id) - } - }(Sound.prototype.init), Sound.prototype.reset = function(e) { - return function() { - var n = this, - t = n._parent; - return n._orientation = t._orientation, n._stereo = t._stereo, n._pos = t._pos, n._pannerAttr = t._pannerAttr, n._stereo ? t.stereo(n._stereo) : n._pos ? t.pos(n._pos[0], n._pos[1], n._pos[2], n._id) : n._panner && (n._panner.disconnect(0), n._panner = void 0, t._refreshBuffer(n)), e.call(this) - } - }(Sound.prototype.reset); - var e = function(e, n) { - n = n || "spatial", "spatial" === n ? (e._panner = Howler.ctx.createPanner(), e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle, e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle, e._panner.coneOuterGain = e._pannerAttr.coneOuterGain, e._panner.distanceModel = e._pannerAttr.distanceModel, e._panner.maxDistance = e._pannerAttr.maxDistance, e._panner.refDistance = e._pannerAttr.refDistance, e._panner.rolloffFactor = e._pannerAttr.rolloffFactor, e._panner.panningModel = e._pannerAttr.panningModel, void 0 !== e._panner.positionX ? (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)) : e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]), void 0 !== e._panner.orientationX ? (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime)) : e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2])) : (e._panner = Howler.ctx.createStereoPanner(), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0) - } -}(); \ No newline at end of file diff --git a/src/bower_components/jquery/dist/jquery.slim.min.js b/src/bower_components/jquery/dist/jquery.slim.min.js deleted file mode 100644 index f1e8170650..0000000000 --- a/src/bower_components/jquery/dist/jquery.slim.min.js +++ /dev/null @@ -1,2607 +0,0 @@ -/*! jQuery v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */ ! function(e, t) { - "use strict"; - "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) { - if (!e.document) throw new Error("jQuery requires a window with a document"); - return t(e) - } : t(e) -}("undefined" != typeof window ? window : this, function(e, t) { - "use strict"; - var n = [], - r = e.document, - i = Object.getPrototypeOf, - o = n.slice, - a = n.concat, - u = n.push, - s = n.indexOf, - l = {}, - c = l.toString, - f = l.hasOwnProperty, - d = f.toString, - p = d.call(Object), - h = {}, - g = function e(t) { - return "function" == typeof t && "number" != typeof t.nodeType - }, - v = function e(t) { - return null != t && t === t.window - }, - y = { - type: !0, - src: !0, - noModule: !0 - }; - - function m(e, t, n) { - var i, o = (t = t || r).createElement("script"); - if (o.text = e, n) - for (i in y) n[i] && (o[i] = n[i]); - t.head.appendChild(o).parentNode.removeChild(o) - } - - function b(e) { - return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? l[c.call(e)] || "object" : typeof e - } - var x = "3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector", - w = function(e, t) { - return new w.fn.init(e, t) - }, - C = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - w.fn = w.prototype = { - jquery: x, - constructor: w, - length: 0, - toArray: function() { - return o.call(this) - }, - get: function(e) { - return null == e ? o.call(this) : e < 0 ? this[e + this.length] : this[e] - }, - pushStack: function(e) { - var t = w.merge(this.constructor(), e); - return t.prevObject = this, t - }, - each: function(e) { - return w.each(this, e) - }, - map: function(e) { - return this.pushStack(w.map(this, function(t, n) { - return e.call(t, n, t) - })) - }, - slice: function() { - return this.pushStack(o.apply(this, arguments)) - }, - first: function() { - return this.eq(0) - }, - last: function() { - return this.eq(-1) - }, - eq: function(e) { - var t = this.length, - n = +e + (e < 0 ? t : 0); - return this.pushStack(n >= 0 && n < t ? [this[n]] : []) - }, - end: function() { - return this.prevObject || this.constructor() - }, - push: u, - sort: n.sort, - splice: n.splice - }, w.extend = w.fn.extend = function() { - var e, t, n, r, i, o, a = arguments[0] || {}, - u = 1, - s = arguments.length, - l = !1; - for ("boolean" == typeof a && (l = a, a = arguments[u] || {}, u++), "object" == typeof a || g(a) || (a = {}), u === s && (a = this, u--); u < s; u++) - if (null != (e = arguments[u])) - for (t in e) n = a[t], a !== (r = e[t]) && (l && r && (w.isPlainObject(r) || (i = Array.isArray(r))) ? (i ? (i = !1, o = n && Array.isArray(n) ? n : []) : o = n && w.isPlainObject(n) ? n : {}, a[t] = w.extend(l, o, r)) : void 0 !== r && (a[t] = r)); - return a - }, w.extend({ - expando: "jQuery" + (x + Math.random()).replace(/\D/g, ""), - isReady: !0, - error: function(e) { - throw new Error(e) - }, - noop: function() {}, - isPlainObject: function(e) { - var t, n; - return !(!e || "[object Object]" !== c.call(e)) && (!(t = i(e)) || "function" == typeof(n = f.call(t, "constructor") && t.constructor) && d.call(n) === p) - }, - isEmptyObject: function(e) { - var t; - for (t in e) return !1; - return !0 - }, - globalEval: function(e) { - m(e) - }, - each: function(e, t) { - var n, r = 0; - if (T(e)) { - for (n = e.length; r < n; r++) - if (!1 === t.call(e[r], r, e[r])) break - } else - for (r in e) - if (!1 === t.call(e[r], r, e[r])) break; - return e - }, - trim: function(e) { - return null == e ? "" : (e + "").replace(C, "") - }, - makeArray: function(e, t) { - var n = t || []; - return null != e && (T(Object(e)) ? w.merge(n, "string" == typeof e ? [e] : e) : u.call(n, e)), n - }, - inArray: function(e, t, n) { - return null == t ? -1 : s.call(t, e, n) - }, - merge: function(e, t) { - for (var n = +t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r]; - return e.length = i, e - }, - grep: function(e, t, n) { - for (var r, i = [], o = 0, a = e.length, u = !n; o < a; o++)(r = !t(e[o], o)) !== u && i.push(e[o]); - return i - }, - map: function(e, t, n) { - var r, i, o = 0, - u = []; - if (T(e)) - for (r = e.length; o < r; o++) null != (i = t(e[o], o, n)) && u.push(i); - else - for (o in e) null != (i = t(e[o], o, n)) && u.push(i); - return a.apply([], u) - }, - guid: 1, - support: h - }), "function" == typeof Symbol && (w.fn[Symbol.iterator] = n[Symbol.iterator]), w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(e, t) { - l["[object " + t + "]"] = t.toLowerCase() - }); - - function T(e) { - var t = !!e && "length" in e && e.length, - n = b(e); - return !g(e) && !v(e) && ("array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e) - } - var E = function(e) { - var t, n, r, i, o, a, u, s, l, c, f, d, p, h, g, v, y, m, b, x = "sizzle" + 1 * new Date, - w = e.document, - C = 0, - T = 0, - E = ae(), - N = ae(), - k = ae(), - A = function(e, t) { - return e === t && (f = !0), 0 - }, - D = {}.hasOwnProperty, - S = [], - L = S.pop, - j = S.push, - q = S.push, - O = S.slice, - P = function(e, t) { - for (var n = 0, r = e.length; n < r; n++) - if (e[n] === t) return n; - return -1 - }, - H = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - I = "[\\x20\\t\\r\\n\\f]", - R = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - B = "\\[" + I + "*(" + R + ")(?:" + I + "*([*^$|!~]?=)" + I + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + R + "))|)" + I + "*\\]", - M = ":(" + R + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + B + ")*)|.*)\\)|)", - W = new RegExp(I + "+", "g"), - $ = new RegExp("^" + I + "+|((?:^|[^\\\\])(?:\\\\.)*)" + I + "+$", "g"), - F = new RegExp("^" + I + "*," + I + "*"), - z = new RegExp("^" + I + "*([>+~]|" + I + ")" + I + "*"), - _ = new RegExp("=" + I + "*([^\\]'\"]*?)" + I + "*\\]", "g"), - U = new RegExp(M), - V = new RegExp("^" + R + "$"), - X = { - ID: new RegExp("^#(" + R + ")"), - CLASS: new RegExp("^\\.(" + R + ")"), - TAG: new RegExp("^(" + R + "|[*])"), - ATTR: new RegExp("^" + B), - PSEUDO: new RegExp("^" + M), - CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + I + "*(even|odd|(([+-]|)(\\d*)n|)" + I + "*(?:([+-]|)" + I + "*(\\d+)|))" + I + "*\\)|)", "i"), - bool: new RegExp("^(?:" + H + ")$", "i"), - needsContext: new RegExp("^" + I + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + I + "*((?:-\\d)?\\d*)" + I + "*\\)|)(?=[^-]|$)", "i") - }, - Q = /^(?:input|select|textarea|button)$/i, - Y = /^h\d$/i, - G = /^[^{]+\{\s*\[native \w/, - K = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - J = /[+~]/, - Z = new RegExp("\\\\([\\da-f]{1,6}" + I + "?|(" + I + ")|.)", "ig"), - ee = function(e, t, n) { - var r = "0x" + t - 65536; - return r !== r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320) - }, - te = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - ne = function(e, t) { - return t ? "\0" === e ? "\ufffd" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e - }, - re = function() { - d() - }, - ie = me(function(e) { - return !0 === e.disabled && ("form" in e || "label" in e) - }, { - dir: "parentNode", - next: "legend" - }); - try { - q.apply(S = O.call(w.childNodes), w.childNodes), S[w.childNodes.length].nodeType - } catch (e) { - q = { - apply: S.length ? function(e, t) { - j.apply(e, O.call(t)) - } : function(e, t) { - var n = e.length, - r = 0; - while (e[n++] = t[r++]); - e.length = n - 1 - } - } - } - - function oe(e, t, r, i) { - var o, u, l, c, f, h, y, m = t && t.ownerDocument, - C = t ? t.nodeType : 9; - if (r = r || [], "string" != typeof e || !e || 1 !== C && 9 !== C && 11 !== C) return r; - if (!i && ((t ? t.ownerDocument || t : w) !== p && d(t), t = t || p, g)) { - if (11 !== C && (f = K.exec(e))) - if (o = f[1]) { - if (9 === C) { - if (!(l = t.getElementById(o))) return r; - if (l.id === o) return r.push(l), r - } else if (m && (l = m.getElementById(o)) && b(t, l) && l.id === o) return r.push(l), r - } else { - if (f[2]) return q.apply(r, t.getElementsByTagName(e)), r; - if ((o = f[3]) && n.getElementsByClassName && t.getElementsByClassName) return q.apply(r, t.getElementsByClassName(o)), r - } if (n.qsa && !k[e + " "] && (!v || !v.test(e))) { - if (1 !== C) m = t, y = e; - else if ("object" !== t.nodeName.toLowerCase()) { - (c = t.getAttribute("id")) ? c = c.replace(te, ne): t.setAttribute("id", c = x), u = (h = a(e)).length; - while (u--) h[u] = "#" + c + " " + ye(h[u]); - y = h.join(","), m = J.test(e) && ge(t.parentNode) || t - } - if (y) try { - return q.apply(r, m.querySelectorAll(y)), r - } catch (e) {} finally { - c === x && t.removeAttribute("id") - } - } - } - return s(e.replace($, "$1"), t, r, i) - } - - function ae() { - var e = []; - - function t(n, i) { - return e.push(n + " ") > r.cacheLength && delete t[e.shift()], t[n + " "] = i - } - return t - } - - function ue(e) { - return e[x] = !0, e - } - - function se(e) { - var t = p.createElement("fieldset"); - try { - return !!e(t) - } catch (e) { - return !1 - } finally { - t.parentNode && t.parentNode.removeChild(t), t = null - } - } - - function le(e, t) { - var n = e.split("|"), - i = n.length; - while (i--) r.attrHandle[n[i]] = t - } - - function ce(e, t) { - var n = t && e, - r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; - if (r) return r; - if (n) - while (n = n.nextSibling) - if (n === t) return -1; - return e ? 1 : -1 - } - - function fe(e) { - return function(t) { - return "input" === t.nodeName.toLowerCase() && t.type === e - } - } - - function de(e) { - return function(t) { - var n = t.nodeName.toLowerCase(); - return ("input" === n || "button" === n) && t.type === e - } - } - - function pe(e) { - return function(t) { - return "form" in t ? t.parentNode && !1 === t.disabled ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || t.isDisabled !== !e && ie(t) === e : t.disabled === e : "label" in t && t.disabled === e - } - } - - function he(e) { - return ue(function(t) { - return t = +t, ue(function(n, r) { - var i, o = e([], n.length, t), - a = o.length; - while (a--) n[i = o[a]] && (n[i] = !(r[i] = n[i])) - }) - }) - } - - function ge(e) { - return e && "undefined" != typeof e.getElementsByTagName && e - } - n = oe.support = {}, o = oe.isXML = function(e) { - var t = e && (e.ownerDocument || e).documentElement; - return !!t && "HTML" !== t.nodeName - }, d = oe.setDocument = function(e) { - var t, i, a = e ? e.ownerDocument || e : w; - return a !== p && 9 === a.nodeType && a.documentElement ? (p = a, h = p.documentElement, g = !o(p), w !== p && (i = p.defaultView) && i.top !== i && (i.addEventListener ? i.addEventListener("unload", re, !1) : i.attachEvent && i.attachEvent("onunload", re)), n.attributes = se(function(e) { - return e.className = "i", !e.getAttribute("className") - }), n.getElementsByTagName = se(function(e) { - return e.appendChild(p.createComment("")), !e.getElementsByTagName("*").length - }), n.getElementsByClassName = G.test(p.getElementsByClassName), n.getById = se(function(e) { - return h.appendChild(e).id = x, !p.getElementsByName || !p.getElementsByName(x).length - }), n.getById ? (r.filter.ID = function(e) { - var t = e.replace(Z, ee); - return function(e) { - return e.getAttribute("id") === t - } - }, r.find.ID = function(e, t) { - if ("undefined" != typeof t.getElementById && g) { - var n = t.getElementById(e); - return n ? [n] : [] - } - }) : (r.filter.ID = function(e) { - var t = e.replace(Z, ee); - return function(e) { - var n = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id"); - return n && n.value === t - } - }, r.find.ID = function(e, t) { - if ("undefined" != typeof t.getElementById && g) { - var n, r, i, o = t.getElementById(e); - if (o) { - if ((n = o.getAttributeNode("id")) && n.value === e) return [o]; - i = t.getElementsByName(e), r = 0; - while (o = i[r++]) - if ((n = o.getAttributeNode("id")) && n.value === e) return [o] - } - return [] - } - }), r.find.TAG = n.getElementsByTagName ? function(e, t) { - return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : n.qsa ? t.querySelectorAll(e) : void 0 - } : function(e, t) { - var n, r = [], - i = 0, - o = t.getElementsByTagName(e); - if ("*" === e) { - while (n = o[i++]) 1 === n.nodeType && r.push(n); - return r - } - return o - }, r.find.CLASS = n.getElementsByClassName && function(e, t) { - if ("undefined" != typeof t.getElementsByClassName && g) return t.getElementsByClassName(e) - }, y = [], v = [], (n.qsa = G.test(p.querySelectorAll)) && (se(function(e) { - h.appendChild(e).innerHTML = "", e.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + I + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || v.push("\\[" + I + "*(?:value|" + H + ")"), e.querySelectorAll("[id~=" + x + "-]").length || v.push("~="), e.querySelectorAll(":checked").length || v.push(":checked"), e.querySelectorAll("a#" + x + "+*").length || v.push(".#.+[+~]") - }), se(function(e) { - e.innerHTML = ""; - var t = p.createElement("input"); - t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && v.push("name" + I + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && v.push(":enabled", ":disabled"), h.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && v.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), v.push(",.*:") - })), (n.matchesSelector = G.test(m = h.matches || h.webkitMatchesSelector || h.mozMatchesSelector || h.oMatchesSelector || h.msMatchesSelector)) && se(function(e) { - n.disconnectedMatch = m.call(e, "*"), m.call(e, "[s!='']:x"), y.push("!=", M) - }), v = v.length && new RegExp(v.join("|")), y = y.length && new RegExp(y.join("|")), t = G.test(h.compareDocumentPosition), b = t || G.test(h.contains) ? function(e, t) { - var n = 9 === e.nodeType ? e.documentElement : e, - r = t && t.parentNode; - return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) - } : function(e, t) { - if (t) - while (t = t.parentNode) - if (t === e) return !0; - return !1 - }, A = t ? function(e, t) { - if (e === t) return f = !0, 0; - var r = !e.compareDocumentPosition - !t.compareDocumentPosition; - return r || (1 & (r = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !n.sortDetached && t.compareDocumentPosition(e) === r ? e === p || e.ownerDocument === w && b(w, e) ? -1 : t === p || t.ownerDocument === w && b(w, t) ? 1 : c ? P(c, e) - P(c, t) : 0 : 4 & r ? -1 : 1) - } : function(e, t) { - if (e === t) return f = !0, 0; - var n, r = 0, - i = e.parentNode, - o = t.parentNode, - a = [e], - u = [t]; - if (!i || !o) return e === p ? -1 : t === p ? 1 : i ? -1 : o ? 1 : c ? P(c, e) - P(c, t) : 0; - if (i === o) return ce(e, t); - n = e; - while (n = n.parentNode) a.unshift(n); - n = t; - while (n = n.parentNode) u.unshift(n); - while (a[r] === u[r]) r++; - return r ? ce(a[r], u[r]) : a[r] === w ? -1 : u[r] === w ? 1 : 0 - }, p) : p - }, oe.matches = function(e, t) { - return oe(e, null, null, t) - }, oe.matchesSelector = function(e, t) { - if ((e.ownerDocument || e) !== p && d(e), t = t.replace(_, "='$1']"), n.matchesSelector && g && !k[t + " "] && (!y || !y.test(t)) && (!v || !v.test(t))) try { - var r = m.call(e, t); - if (r || n.disconnectedMatch || e.document && 11 !== e.document.nodeType) return r - } catch (e) {} - return oe(t, p, null, [e]).length > 0 - }, oe.contains = function(e, t) { - return (e.ownerDocument || e) !== p && d(e), b(e, t) - }, oe.attr = function(e, t) { - (e.ownerDocument || e) !== p && d(e); - var i = r.attrHandle[t.toLowerCase()], - o = i && D.call(r.attrHandle, t.toLowerCase()) ? i(e, t, !g) : void 0; - return void 0 !== o ? o : n.attributes || !g ? e.getAttribute(t) : (o = e.getAttributeNode(t)) && o.specified ? o.value : null - }, oe.escape = function(e) { - return (e + "").replace(te, ne) - }, oe.error = function(e) { - throw new Error("Syntax error, unrecognized expression: " + e) - }, oe.uniqueSort = function(e) { - var t, r = [], - i = 0, - o = 0; - if (f = !n.detectDuplicates, c = !n.sortStable && e.slice(0), e.sort(A), f) { - while (t = e[o++]) t === e[o] && (i = r.push(o)); - while (i--) e.splice(r[i], 1) - } - return c = null, e - }, i = oe.getText = function(e) { - var t, n = "", - r = 0, - o = e.nodeType; - if (o) { - if (1 === o || 9 === o || 11 === o) { - if ("string" == typeof e.textContent) return e.textContent; - for (e = e.firstChild; e; e = e.nextSibling) n += i(e) - } else if (3 === o || 4 === o) return e.nodeValue - } else - while (t = e[r++]) n += i(t); - return n - }, (r = oe.selectors = { - cacheLength: 50, - createPseudo: ue, - match: X, - attrHandle: {}, - find: {}, - relative: { - ">": { - dir: "parentNode", - first: !0 - }, - " ": { - dir: "parentNode" - }, - "+": { - dir: "previousSibling", - first: !0 - }, - "~": { - dir: "previousSibling" - } - }, - preFilter: { - ATTR: function(e) { - return e[1] = e[1].replace(Z, ee), e[3] = (e[3] || e[4] || e[5] || "").replace(Z, ee), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) - }, - CHILD: function(e) { - return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || oe.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && oe.error(e[0]), e - }, - PSEUDO: function(e) { - var t, n = !e[6] && e[2]; - return X.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && U.test(n) && (t = a(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) - } - }, - filter: { - TAG: function(e) { - var t = e.replace(Z, ee).toLowerCase(); - return "*" === e ? function() { - return !0 - } : function(e) { - return e.nodeName && e.nodeName.toLowerCase() === t - } - }, - CLASS: function(e) { - var t = E[e + " "]; - return t || (t = new RegExp("(^|" + I + ")" + e + "(" + I + "|$)")) && E(e, function(e) { - return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "") - }) - }, - ATTR: function(e, t, n) { - return function(r) { - var i = oe.attr(r, e); - return null == i ? "!=" === t : !t || (i += "", "=" === t ? i === n : "!=" === t ? i !== n : "^=" === t ? n && 0 === i.indexOf(n) : "*=" === t ? n && i.indexOf(n) > -1 : "$=" === t ? n && i.slice(-n.length) === n : "~=" === t ? (" " + i.replace(W, " ") + " ").indexOf(n) > -1 : "|=" === t && (i === n || i.slice(0, n.length + 1) === n + "-")) - } - }, - CHILD: function(e, t, n, r, i) { - var o = "nth" !== e.slice(0, 3), - a = "last" !== e.slice(-4), - u = "of-type" === t; - return 1 === r && 0 === i ? function(e) { - return !!e.parentNode - } : function(t, n, s) { - var l, c, f, d, p, h, g = o !== a ? "nextSibling" : "previousSibling", - v = t.parentNode, - y = u && t.nodeName.toLowerCase(), - m = !s && !u, - b = !1; - if (v) { - if (o) { - while (g) { - d = t; - while (d = d[g]) - if (u ? d.nodeName.toLowerCase() === y : 1 === d.nodeType) return !1; - h = g = "only" === e && !h && "nextSibling" - } - return !0 - } - if (h = [a ? v.firstChild : v.lastChild], a && m) { - b = (p = (l = (c = (f = (d = v)[x] || (d[x] = {}))[d.uniqueID] || (f[d.uniqueID] = {}))[e] || [])[0] === C && l[1]) && l[2], d = p && v.childNodes[p]; - while (d = ++p && d && d[g] || (b = p = 0) || h.pop()) - if (1 === d.nodeType && ++b && d === t) { - c[e] = [C, p, b]; - break - } - } else if (m && (b = p = (l = (c = (f = (d = t)[x] || (d[x] = {}))[d.uniqueID] || (f[d.uniqueID] = {}))[e] || [])[0] === C && l[1]), !1 === b) - while (d = ++p && d && d[g] || (b = p = 0) || h.pop()) - if ((u ? d.nodeName.toLowerCase() === y : 1 === d.nodeType) && ++b && (m && ((c = (f = d[x] || (d[x] = {}))[d.uniqueID] || (f[d.uniqueID] = {}))[e] = [C, b]), d === t)) break; - return (b -= i) === r || b % r == 0 && b / r >= 0 - } - } - }, - PSEUDO: function(e, t) { - var n, i = r.pseudos[e] || r.setFilters[e.toLowerCase()] || oe.error("unsupported pseudo: " + e); - return i[x] ? i(t) : i.length > 1 ? (n = [e, e, "", t], r.setFilters.hasOwnProperty(e.toLowerCase()) ? ue(function(e, n) { - var r, o = i(e, t), - a = o.length; - while (a--) e[r = P(e, o[a])] = !(n[r] = o[a]) - }) : function(e) { - return i(e, 0, n) - }) : i - } - }, - pseudos: { - not: ue(function(e) { - var t = [], - n = [], - r = u(e.replace($, "$1")); - return r[x] ? ue(function(e, t, n, i) { - var o, a = r(e, null, i, []), - u = e.length; - while (u--)(o = a[u]) && (e[u] = !(t[u] = o)) - }) : function(e, i, o) { - return t[0] = e, r(t, null, o, n), t[0] = null, !n.pop() - } - }), - has: ue(function(e) { - return function(t) { - return oe(e, t).length > 0 - } - }), - contains: ue(function(e) { - return e = e.replace(Z, ee), - function(t) { - return (t.textContent || t.innerText || i(t)).indexOf(e) > -1 - } - }), - lang: ue(function(e) { - return V.test(e || "") || oe.error("unsupported lang: " + e), e = e.replace(Z, ee).toLowerCase(), - function(t) { - var n; - do { - if (n = g ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (n = n.toLowerCase()) === e || 0 === n.indexOf(e + "-") - } while ((t = t.parentNode) && 1 === t.nodeType); - return !1 - } - }), - target: function(t) { - var n = e.location && e.location.hash; - return n && n.slice(1) === t.id - }, - root: function(e) { - return e === h - }, - focus: function(e) { - return e === p.activeElement && (!p.hasFocus || p.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) - }, - enabled: pe(!1), - disabled: pe(!0), - checked: function(e) { - var t = e.nodeName.toLowerCase(); - return "input" === t && !!e.checked || "option" === t && !!e.selected - }, - selected: function(e) { - return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected - }, - empty: function(e) { - for (e = e.firstChild; e; e = e.nextSibling) - if (e.nodeType < 6) return !1; - return !0 - }, - parent: function(e) { - return !r.pseudos.empty(e) - }, - header: function(e) { - return Y.test(e.nodeName) - }, - input: function(e) { - return Q.test(e.nodeName) - }, - button: function(e) { - var t = e.nodeName.toLowerCase(); - return "input" === t && "button" === e.type || "button" === t - }, - text: function(e) { - var t; - return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) - }, - first: he(function() { - return [0] - }), - last: he(function(e, t) { - return [t - 1] - }), - eq: he(function(e, t, n) { - return [n < 0 ? n + t : n] - }), - even: he(function(e, t) { - for (var n = 0; n < t; n += 2) e.push(n); - return e - }), - odd: he(function(e, t) { - for (var n = 1; n < t; n += 2) e.push(n); - return e - }), - lt: he(function(e, t, n) { - for (var r = n < 0 ? n + t : n; --r >= 0;) e.push(r); - return e - }), - gt: he(function(e, t, n) { - for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r); - return e - }) - } - }).pseudos.nth = r.pseudos.eq; - for (t in { - radio: !0, - checkbox: !0, - file: !0, - password: !0, - image: !0 - }) r.pseudos[t] = fe(t); - for (t in { - submit: !0, - reset: !0 - }) r.pseudos[t] = de(t); - - function ve() {} - ve.prototype = r.filters = r.pseudos, r.setFilters = new ve, a = oe.tokenize = function(e, t) { - var n, i, o, a, u, s, l, c = N[e + " "]; - if (c) return t ? 0 : c.slice(0); - u = e, s = [], l = r.preFilter; - while (u) { - n && !(i = F.exec(u)) || (i && (u = u.slice(i[0].length) || u), s.push(o = [])), n = !1, (i = z.exec(u)) && (n = i.shift(), o.push({ - value: n, - type: i[0].replace($, " ") - }), u = u.slice(n.length)); - for (a in r.filter) !(i = X[a].exec(u)) || l[a] && !(i = l[a](i)) || (n = i.shift(), o.push({ - value: n, - type: a, - matches: i - }), u = u.slice(n.length)); - if (!n) break - } - return t ? u.length : u ? oe.error(e) : N(e, s).slice(0) - }; - - function ye(e) { - for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value; - return r - } - - function me(e, t, n) { - var r = t.dir, - i = t.next, - o = i || r, - a = n && "parentNode" === o, - u = T++; - return t.first ? function(t, n, i) { - while (t = t[r]) - if (1 === t.nodeType || a) return e(t, n, i); - return !1 - } : function(t, n, s) { - var l, c, f, d = [C, u]; - if (s) { - while (t = t[r]) - if ((1 === t.nodeType || a) && e(t, n, s)) return !0 - } else - while (t = t[r]) - if (1 === t.nodeType || a) - if (f = t[x] || (t[x] = {}), c = f[t.uniqueID] || (f[t.uniqueID] = {}), i && i === t.nodeName.toLowerCase()) t = t[r] || t; - else { - if ((l = c[o]) && l[0] === C && l[1] === u) return d[2] = l[2]; - if (c[o] = d, d[2] = e(t, n, s)) return !0 - } return !1 - } - } - - function be(e) { - return e.length > 1 ? function(t, n, r) { - var i = e.length; - while (i--) - if (!e[i](t, n, r)) return !1; - return !0 - } : e[0] - } - - function xe(e, t, n) { - for (var r = 0, i = t.length; r < i; r++) oe(e, t[r], n); - return n - } - - function we(e, t, n, r, i) { - for (var o, a = [], u = 0, s = e.length, l = null != t; u < s; u++)(o = e[u]) && (n && !n(o, r, i) || (a.push(o), l && t.push(u))); - return a - } - - function Ce(e, t, n, r, i, o) { - return r && !r[x] && (r = Ce(r)), i && !i[x] && (i = Ce(i, o)), ue(function(o, a, u, s) { - var l, c, f, d = [], - p = [], - h = a.length, - g = o || xe(t || "*", u.nodeType ? [u] : u, []), - v = !e || !o && t ? g : we(g, d, e, u, s), - y = n ? i || (o ? e : h || r) ? [] : a : v; - if (n && n(v, y, u, s), r) { - l = we(y, p), r(l, [], u, s), c = l.length; - while (c--)(f = l[c]) && (y[p[c]] = !(v[p[c]] = f)) - } - if (o) { - if (i || e) { - if (i) { - l = [], c = y.length; - while (c--)(f = y[c]) && l.push(v[c] = f); - i(null, y = [], l, s) - } - c = y.length; - while (c--)(f = y[c]) && (l = i ? P(o, f) : d[c]) > -1 && (o[l] = !(a[l] = f)) - } - } else y = we(y === a ? y.splice(h, y.length) : y), i ? i(null, a, y, s) : q.apply(a, y) - }) - } - - function Te(e) { - for (var t, n, i, o = e.length, a = r.relative[e[0].type], u = a || r.relative[" "], s = a ? 1 : 0, c = me(function(e) { - return e === t - }, u, !0), f = me(function(e) { - return P(t, e) > -1 - }, u, !0), d = [function(e, n, r) { - var i = !a && (r || n !== l) || ((t = n).nodeType ? c(e, n, r) : f(e, n, r)); - return t = null, i - }]; s < o; s++) - if (n = r.relative[e[s].type]) d = [me(be(d), n)]; - else { - if ((n = r.filter[e[s].type].apply(null, e[s].matches))[x]) { - for (i = ++s; i < o; i++) - if (r.relative[e[i].type]) break; - return Ce(s > 1 && be(d), s > 1 && ye(e.slice(0, s - 1).concat({ - value: " " === e[s - 2].type ? "*" : "" - })).replace($, "$1"), n, s < i && Te(e.slice(s, i)), i < o && Te(e = e.slice(i)), i < o && ye(e)) - } - d.push(n) - } return be(d) - } - - function Ee(e, t) { - var n = t.length > 0, - i = e.length > 0, - o = function(o, a, u, s, c) { - var f, h, v, y = 0, - m = "0", - b = o && [], - x = [], - w = l, - T = o || i && r.find.TAG("*", c), - E = C += null == w ? 1 : Math.random() || .1, - N = T.length; - for (c && (l = a === p || a || c); m !== N && null != (f = T[m]); m++) { - if (i && f) { - h = 0, a || f.ownerDocument === p || (d(f), u = !g); - while (v = e[h++]) - if (v(f, a || p, u)) { - s.push(f); - break - } c && (C = E) - } - n && ((f = !v && f) && y--, o && b.push(f)) - } - if (y += m, n && m !== y) { - h = 0; - while (v = t[h++]) v(b, x, a, u); - if (o) { - if (y > 0) - while (m--) b[m] || x[m] || (x[m] = L.call(s)); - x = we(x) - } - q.apply(s, x), c && !o && x.length > 0 && y + t.length > 1 && oe.uniqueSort(s) - } - return c && (C = E, l = w), b - }; - return n ? ue(o) : o - } - return u = oe.compile = function(e, t) { - var n, r = [], - i = [], - o = k[e + " "]; - if (!o) { - t || (t = a(e)), n = t.length; - while (n--)(o = Te(t[n]))[x] ? r.push(o) : i.push(o); - (o = k(e, Ee(i, r))).selector = e - } - return o - }, s = oe.select = function(e, t, n, i) { - var o, s, l, c, f, d = "function" == typeof e && e, - p = !i && a(e = d.selector || e); - if (n = n || [], 1 === p.length) { - if ((s = p[0] = p[0].slice(0)).length > 2 && "ID" === (l = s[0]).type && 9 === t.nodeType && g && r.relative[s[1].type]) { - if (!(t = (r.find.ID(l.matches[0].replace(Z, ee), t) || [])[0])) return n; - d && (t = t.parentNode), e = e.slice(s.shift().value.length) - } - o = X.needsContext.test(e) ? 0 : s.length; - while (o--) { - if (l = s[o], r.relative[c = l.type]) break; - if ((f = r.find[c]) && (i = f(l.matches[0].replace(Z, ee), J.test(s[0].type) && ge(t.parentNode) || t))) { - if (s.splice(o, 1), !(e = i.length && ye(s))) return q.apply(n, i), n; - break - } - } - } - return (d || u(e, p))(i, t, !g, n, !t || J.test(e) && ge(t.parentNode) || t), n - }, n.sortStable = x.split("").sort(A).join("") === x, n.detectDuplicates = !!f, d(), n.sortDetached = se(function(e) { - return 1 & e.compareDocumentPosition(p.createElement("fieldset")) - }), se(function(e) { - return e.innerHTML = "", "#" === e.firstChild.getAttribute("href") - }) || le("type|href|height|width", function(e, t, n) { - if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) - }), n.attributes && se(function(e) { - return e.innerHTML = "", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") - }) || le("value", function(e, t, n) { - if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue - }), se(function(e) { - return null == e.getAttribute("disabled") - }) || le(H, function(e, t, n) { - var r; - if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null - }), oe - }(e); - w.find = E, w.expr = E.selectors, w.expr[":"] = w.expr.pseudos, w.uniqueSort = w.unique = E.uniqueSort, w.text = E.getText, w.isXMLDoc = E.isXML, w.contains = E.contains, w.escapeSelector = E.escape; - var N = function(e, t, n) { - var r = [], - i = void 0 !== n; - while ((e = e[t]) && 9 !== e.nodeType) - if (1 === e.nodeType) { - if (i && w(e).is(n)) break; - r.push(e) - } return r - }, - k = function(e, t) { - for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); - return n - }, - A = w.expr.match.needsContext; - - function D(e, t) { - return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() - } - var S = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; - - function L(e, t, n) { - return g(t) ? w.grep(e, function(e, r) { - return !!t.call(e, r, e) !== n - }) : t.nodeType ? w.grep(e, function(e) { - return e === t !== n - }) : "string" != typeof t ? w.grep(e, function(e) { - return s.call(t, e) > -1 !== n - }) : w.filter(t, e, n) - } - w.filter = function(e, t, n) { - var r = t[0]; - return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? w.find.matchesSelector(r, e) ? [r] : [] : w.find.matches(e, w.grep(t, function(e) { - return 1 === e.nodeType - })) - }, w.fn.extend({ - find: function(e) { - var t, n, r = this.length, - i = this; - if ("string" != typeof e) return this.pushStack(w(e).filter(function() { - for (t = 0; t < r; t++) - if (w.contains(i[t], this)) return !0 - })); - for (n = this.pushStack([]), t = 0; t < r; t++) w.find(e, i[t], n); - return r > 1 ? w.uniqueSort(n) : n - }, - filter: function(e) { - return this.pushStack(L(this, e || [], !1)) - }, - not: function(e) { - return this.pushStack(L(this, e || [], !0)) - }, - is: function(e) { - return !!L(this, "string" == typeof e && A.test(e) ? w(e) : e || [], !1).length - } - }); - var j, q = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; - (w.fn.init = function(e, t, n) { - var i, o; - if (!e) return this; - if (n = n || j, "string" == typeof e) { - if (!(i = "<" === e[0] && ">" === e[e.length - 1] && e.length >= 3 ? [null, e, null] : q.exec(e)) || !i[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); - if (i[1]) { - if (t = t instanceof w ? t[0] : t, w.merge(this, w.parseHTML(i[1], t && t.nodeType ? t.ownerDocument || t : r, !0)), S.test(i[1]) && w.isPlainObject(t)) - for (i in t) g(this[i]) ? this[i](t[i]) : this.attr(i, t[i]); - return this - } - return (o = r.getElementById(i[2])) && (this[0] = o, this.length = 1), this - } - return e.nodeType ? (this[0] = e, this.length = 1, this) : g(e) ? void 0 !== n.ready ? n.ready(e) : e(w) : w.makeArray(e, this) - }).prototype = w.fn, j = w(r); - var O = /^(?:parents|prev(?:Until|All))/, - P = { - children: !0, - contents: !0, - next: !0, - prev: !0 - }; - w.fn.extend({ - has: function(e) { - var t = w(e, this), - n = t.length; - return this.filter(function() { - for (var e = 0; e < n; e++) - if (w.contains(this, t[e])) return !0 - }) - }, - closest: function(e, t) { - var n, r = 0, - i = this.length, - o = [], - a = "string" != typeof e && w(e); - if (!A.test(e)) - for (; r < i; r++) - for (n = this[r]; n && n !== t; n = n.parentNode) - if (n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && w.find.matchesSelector(n, e))) { - o.push(n); - break - } return this.pushStack(o.length > 1 ? w.uniqueSort(o) : o) - }, - index: function(e) { - return e ? "string" == typeof e ? s.call(w(e), this[0]) : s.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 - }, - add: function(e, t) { - return this.pushStack(w.uniqueSort(w.merge(this.get(), w(e, t)))) - }, - addBack: function(e) { - return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) - } - }); - - function H(e, t) { - while ((e = e[t]) && 1 !== e.nodeType); - return e - } - w.each({ - parent: function(e) { - var t = e.parentNode; - return t && 11 !== t.nodeType ? t : null - }, - parents: function(e) { - return N(e, "parentNode") - }, - parentsUntil: function(e, t, n) { - return N(e, "parentNode", n) - }, - next: function(e) { - return H(e, "nextSibling") - }, - prev: function(e) { - return H(e, "previousSibling") - }, - nextAll: function(e) { - return N(e, "nextSibling") - }, - prevAll: function(e) { - return N(e, "previousSibling") - }, - nextUntil: function(e, t, n) { - return N(e, "nextSibling", n) - }, - prevUntil: function(e, t, n) { - return N(e, "previousSibling", n) - }, - siblings: function(e) { - return k((e.parentNode || {}).firstChild, e) - }, - children: function(e) { - return k(e.firstChild) - }, - contents: function(e) { - return D(e, "iframe") ? e.contentDocument : (D(e, "template") && (e = e.content || e), w.merge([], e.childNodes)) - } - }, function(e, t) { - w.fn[e] = function(n, r) { - var i = w.map(this, t, n); - return "Until" !== e.slice(-5) && (r = n), r && "string" == typeof r && (i = w.filter(r, i)), this.length > 1 && (P[e] || w.uniqueSort(i), O.test(e) && i.reverse()), this.pushStack(i) - } - }); - var I = /[^\x20\t\r\n\f]+/g; - - function R(e) { - var t = {}; - return w.each(e.match(I) || [], function(e, n) { - t[n] = !0 - }), t - } - w.Callbacks = function(e) { - e = "string" == typeof e ? R(e) : w.extend({}, e); - var t, n, r, i, o = [], - a = [], - u = -1, - s = function() { - for (i = i || e.once, r = t = !0; a.length; u = -1) { - n = a.shift(); - while (++u < o.length) !1 === o[u].apply(n[0], n[1]) && e.stopOnFalse && (u = o.length, n = !1) - } - e.memory || (n = !1), t = !1, i && (o = n ? [] : "") - }, - l = { - add: function() { - return o && (n && !t && (u = o.length - 1, a.push(n)), function t(n) { - w.each(n, function(n, r) { - g(r) ? e.unique && l.has(r) || o.push(r) : r && r.length && "string" !== b(r) && t(r) - }) - }(arguments), n && !t && s()), this - }, - remove: function() { - return w.each(arguments, function(e, t) { - var n; - while ((n = w.inArray(t, o, n)) > -1) o.splice(n, 1), n <= u && u-- - }), this - }, - has: function(e) { - return e ? w.inArray(e, o) > -1 : o.length > 0 - }, - empty: function() { - return o && (o = []), this - }, - disable: function() { - return i = a = [], o = n = "", this - }, - disabled: function() { - return !o - }, - lock: function() { - return i = a = [], n || t || (o = n = ""), this - }, - locked: function() { - return !!i - }, - fireWith: function(e, n) { - return i || (n = [e, (n = n || []).slice ? n.slice() : n], a.push(n), t || s()), this - }, - fire: function() { - return l.fireWith(this, arguments), this - }, - fired: function() { - return !!r - } - }; - return l - }; - - function B(e) { - return e - } - - function M(e) { - throw e - } - - function W(e, t, n, r) { - var i; - try { - e && g(i = e.promise) ? i.call(e).done(t).fail(n) : e && g(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [e].slice(r)) - } catch (e) { - n.apply(void 0, [e]) - } - } - w.extend({ - Deferred: function(t) { - var n = [ - ["notify", "progress", w.Callbacks("memory"), w.Callbacks("memory"), 2], - ["resolve", "done", w.Callbacks("once memory"), w.Callbacks("once memory"), 0, "resolved"], - ["reject", "fail", w.Callbacks("once memory"), w.Callbacks("once memory"), 1, "rejected"] - ], - r = "pending", - i = { - state: function() { - return r - }, - always: function() { - return o.done(arguments).fail(arguments), this - }, - "catch": function(e) { - return i.then(null, e) - }, - pipe: function() { - var e = arguments; - return w.Deferred(function(t) { - w.each(n, function(n, r) { - var i = g(e[r[4]]) && e[r[4]]; - o[r[1]](function() { - var e = i && i.apply(this, arguments); - e && g(e.promise) ? e.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[r[0] + "With"](this, i ? [e] : arguments) - }) - }), e = null - }).promise() - }, - then: function(t, r, i) { - var o = 0; - - function a(t, n, r, i) { - return function() { - var u = this, - s = arguments, - l = function() { - var e, l; - if (!(t < o)) { - if ((e = r.apply(u, s)) === n.promise()) throw new TypeError("Thenable self-resolution"); - l = e && ("object" == typeof e || "function" == typeof e) && e.then, g(l) ? i ? l.call(e, a(o, n, B, i), a(o, n, M, i)) : (o++, l.call(e, a(o, n, B, i), a(o, n, M, i), a(o, n, B, n.notifyWith))) : (r !== B && (u = void 0, s = [e]), (i || n.resolveWith)(u, s)) - } - }, - c = i ? l : function() { - try { - l() - } catch (e) { - w.Deferred.exceptionHook && w.Deferred.exceptionHook(e, c.stackTrace), t + 1 >= o && (r !== M && (u = void 0, s = [e]), n.rejectWith(u, s)) - } - }; - t ? c() : (w.Deferred.getStackHook && (c.stackTrace = w.Deferred.getStackHook()), e.setTimeout(c)) - } - } - return w.Deferred(function(e) { - n[0][3].add(a(0, e, g(i) ? i : B, e.notifyWith)), n[1][3].add(a(0, e, g(t) ? t : B)), n[2][3].add(a(0, e, g(r) ? r : M)) - }).promise() - }, - promise: function(e) { - return null != e ? w.extend(e, i) : i - } - }, - o = {}; - return w.each(n, function(e, t) { - var a = t[2], - u = t[5]; - i[t[1]] = a.add, u && a.add(function() { - r = u - }, n[3 - e][2].disable, n[3 - e][3].disable, n[0][2].lock, n[0][3].lock), a.add(t[3].fire), o[t[0]] = function() { - return o[t[0] + "With"](this === o ? void 0 : this, arguments), this - }, o[t[0] + "With"] = a.fireWith - }), i.promise(o), t && t.call(o, o), o - }, - when: function(e) { - var t = arguments.length, - n = t, - r = Array(n), - i = o.call(arguments), - a = w.Deferred(), - u = function(e) { - return function(n) { - r[e] = this, i[e] = arguments.length > 1 ? o.call(arguments) : n, --t || a.resolveWith(r, i) - } - }; - if (t <= 1 && (W(e, a.done(u(n)).resolve, a.reject, !t), "pending" === a.state() || g(i[n] && i[n].then))) return a.then(); - while (n--) W(i[n], u(n), a.reject); - return a.promise() - } - }); - var $ = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - w.Deferred.exceptionHook = function(t, n) { - e.console && e.console.warn && t && $.test(t.name) && e.console.warn("jQuery.Deferred exception: " + t.message, t.stack, n) - }, w.readyException = function(t) { - e.setTimeout(function() { - throw t - }) - }; - var F = w.Deferred(); - w.fn.ready = function(e) { - return F.then(e)["catch"](function(e) { - w.readyException(e) - }), this - }, w.extend({ - isReady: !1, - readyWait: 1, - ready: function(e) { - (!0 === e ? --w.readyWait : w.isReady) || (w.isReady = !0, !0 !== e && --w.readyWait > 0 || F.resolveWith(r, [w])) - } - }), w.ready.then = F.then; - - function z() { - r.removeEventListener("DOMContentLoaded", z), e.removeEventListener("load", z), w.ready() - } - "complete" === r.readyState || "loading" !== r.readyState && !r.documentElement.doScroll ? e.setTimeout(w.ready) : (r.addEventListener("DOMContentLoaded", z), e.addEventListener("load", z)); - var _ = function(e, t, n, r, i, o, a) { - var u = 0, - s = e.length, - l = null == n; - if ("object" === b(n)) { - i = !0; - for (u in n) _(e, t, u, n[u], !0, o, a) - } else if (void 0 !== r && (i = !0, g(r) || (a = !0), l && (a ? (t.call(e, r), t = null) : (l = t, t = function(e, t, n) { - return l.call(w(e), n) - })), t)) - for (; u < s; u++) t(e[u], n, a ? r : r.call(e[u], u, t(e[u], n))); - return i ? e : l ? t.call(e) : s ? t(e[0], n) : o - }, - U = /^-ms-/, - V = /-([a-z])/g; - - function X(e, t) { - return t.toUpperCase() - } - - function Q(e) { - return e.replace(U, "ms-").replace(V, X) - } - var Y = function(e) { - return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType - }; - - function G() { - this.expando = w.expando + G.uid++ - } - G.uid = 1, G.prototype = { - cache: function(e) { - var t = e[this.expando]; - return t || (t = {}, Y(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { - value: t, - configurable: !0 - }))), t - }, - set: function(e, t, n) { - var r, i = this.cache(e); - if ("string" == typeof t) i[Q(t)] = n; - else - for (r in t) i[Q(r)] = t[r]; - return i - }, - get: function(e, t) { - return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][Q(t)] - }, - access: function(e, t, n) { - return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) - }, - remove: function(e, t) { - var n, r = e[this.expando]; - if (void 0 !== r) { - if (void 0 !== t) { - n = (t = Array.isArray(t) ? t.map(Q) : (t = Q(t)) in r ? [t] : t.match(I) || []).length; - while (n--) delete r[t[n]] - }(void 0 === t || w.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) - } - }, - hasData: function(e) { - var t = e[this.expando]; - return void 0 !== t && !w.isEmptyObject(t) - } - }; - var K = new G, - J = new G, - Z = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - ee = /[A-Z]/g; - - function te(e) { - return "true" === e || "false" !== e && ("null" === e ? null : e === +e + "" ? +e : Z.test(e) ? JSON.parse(e) : e) - } - - function ne(e, t, n) { - var r; - if (void 0 === n && 1 === e.nodeType) - if (r = "data-" + t.replace(ee, "-$&").toLowerCase(), "string" == typeof(n = e.getAttribute(r))) { - try { - n = te(n) - } catch (e) {} - J.set(e, t, n) - } else n = void 0; - return n - } - w.extend({ - hasData: function(e) { - return J.hasData(e) || K.hasData(e) - }, - data: function(e, t, n) { - return J.access(e, t, n) - }, - removeData: function(e, t) { - J.remove(e, t) - }, - _data: function(e, t, n) { - return K.access(e, t, n) - }, - _removeData: function(e, t) { - K.remove(e, t) - } - }), w.fn.extend({ - data: function(e, t) { - var n, r, i, o = this[0], - a = o && o.attributes; - if (void 0 === e) { - if (this.length && (i = J.get(o), 1 === o.nodeType && !K.get(o, "hasDataAttrs"))) { - n = a.length; - while (n--) a[n] && 0 === (r = a[n].name).indexOf("data-") && (r = Q(r.slice(5)), ne(o, r, i[r])); - K.set(o, "hasDataAttrs", !0) - } - return i - } - return "object" == typeof e ? this.each(function() { - J.set(this, e) - }) : _(this, function(t) { - var n; - if (o && void 0 === t) { - if (void 0 !== (n = J.get(o, e))) return n; - if (void 0 !== (n = ne(o, e))) return n - } else this.each(function() { - J.set(this, e, t) - }) - }, null, t, arguments.length > 1, null, !0) - }, - removeData: function(e) { - return this.each(function() { - J.remove(this, e) - }) - } - }), w.extend({ - queue: function(e, t, n) { - var r; - if (e) return t = (t || "fx") + "queue", r = K.get(e, t), n && (!r || Array.isArray(n) ? r = K.access(e, t, w.makeArray(n)) : r.push(n)), r || [] - }, - dequeue: function(e, t) { - t = t || "fx"; - var n = w.queue(e, t), - r = n.length, - i = n.shift(), - o = w._queueHooks(e, t), - a = function() { - w.dequeue(e, t) - }; - "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, a, o)), !r && o && o.empty.fire() - }, - _queueHooks: function(e, t) { - var n = t + "queueHooks"; - return K.get(e, n) || K.access(e, n, { - empty: w.Callbacks("once memory").add(function() { - K.remove(e, [t + "queue", n]) - }) - }) - } - }), w.fn.extend({ - queue: function(e, t) { - var n = 2; - return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? w.queue(this[0], e) : void 0 === t ? this : this.each(function() { - var n = w.queue(this, e, t); - w._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && w.dequeue(this, e) - }) - }, - dequeue: function(e) { - return this.each(function() { - w.dequeue(this, e) - }) - }, - clearQueue: function(e) { - return this.queue(e || "fx", []) - }, - promise: function(e, t) { - var n, r = 1, - i = w.Deferred(), - o = this, - a = this.length, - u = function() { - --r || i.resolveWith(o, [o]) - }; - "string" != typeof e && (t = e, e = void 0), e = e || "fx"; - while (a--)(n = K.get(o[a], e + "queueHooks")) && n.empty && (r++, n.empty.add(u)); - return u(), i.promise(t) - } - }); - var re = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - ie = new RegExp("^(?:([+-])=|)(" + re + ")([a-z%]*)$", "i"), - oe = ["Top", "Right", "Bottom", "Left"], - ae = function(e, t) { - return "none" === (e = t || e).style.display || "" === e.style.display && w.contains(e.ownerDocument, e) && "none" === w.css(e, "display") - }, - ue = function(e, t, n, r) { - var i, o, a = {}; - for (o in t) a[o] = e.style[o], e.style[o] = t[o]; - i = n.apply(e, r || []); - for (o in t) e.style[o] = a[o]; - return i - }; - - function se(e, t, n, r) { - var i, o, a = 20, - u = r ? function() { - return r.cur() - } : function() { - return w.css(e, t, "") - }, - s = u(), - l = n && n[3] || (w.cssNumber[t] ? "" : "px"), - c = (w.cssNumber[t] || "px" !== l && +s) && ie.exec(w.css(e, t)); - if (c && c[3] !== l) { - s /= 2, l = l || c[3], c = +s || 1; - while (a--) w.style(e, t, c + l), (1 - o) * (1 - (o = u() / s || .5)) <= 0 && (a = 0), c /= o; - c *= 2, w.style(e, t, c + l), n = n || [] - } - return n && (c = +c || +s || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i - } - var le = {}; - - function ce(e) { - var t, n = e.ownerDocument, - r = e.nodeName, - i = le[r]; - return i || (t = n.body.appendChild(n.createElement(r)), i = w.css(t, "display"), t.parentNode.removeChild(t), "none" === i && (i = "block"), le[r] = i, i) - } - - function fe(e, t) { - for (var n, r, i = [], o = 0, a = e.length; o < a; o++)(r = e[o]).style && (n = r.style.display, t ? ("none" === n && (i[o] = K.get(r, "display") || null, i[o] || (r.style.display = "")), "" === r.style.display && ae(r) && (i[o] = ce(r))) : "none" !== n && (i[o] = "none", K.set(r, "display", n))); - for (o = 0; o < a; o++) null != i[o] && (e[o].style.display = i[o]); - return e - } - w.fn.extend({ - show: function() { - return fe(this, !0) - }, - hide: function() { - return fe(this) - }, - toggle: function(e) { - return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() { - ae(this) ? w(this).show() : w(this).hide() - }) - } - }); - var de = /^(?:checkbox|radio)$/i, - pe = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, - he = /^$|^module$|\/(?:java|ecma)script/i, - ge = { - option: [1, ""], - thead: [1, "", "
"], - col: [2, "", "
"], - tr: [2, "", "
"], - td: [3, "", "
"], - _default: [0, "", ""] - }; - ge.optgroup = ge.option, ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead, ge.th = ge.td; - - function ve(e, t) { - var n; - return n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && D(e, t) ? w.merge([e], n) : n - } - - function ye(e, t) { - for (var n = 0, r = e.length; n < r; n++) K.set(e[n], "globalEval", !t || K.get(t[n], "globalEval")) - } - var me = /<|&#?\w+;/; - - function be(e, t, n, r, i) { - for (var o, a, u, s, l, c, f = t.createDocumentFragment(), d = [], p = 0, h = e.length; p < h; p++) - if ((o = e[p]) || 0 === o) - if ("object" === b(o)) w.merge(d, o.nodeType ? [o] : o); - else if (me.test(o)) { - a = a || f.appendChild(t.createElement("div")), u = (pe.exec(o) || ["", ""])[1].toLowerCase(), s = ge[u] || ge._default, a.innerHTML = s[1] + w.htmlPrefilter(o) + s[2], c = s[0]; - while (c--) a = a.lastChild; - w.merge(d, a.childNodes), (a = f.firstChild).textContent = "" - } else d.push(t.createTextNode(o)); - f.textContent = "", p = 0; - while (o = d[p++]) - if (r && w.inArray(o, r) > -1) i && i.push(o); - else if (l = w.contains(o.ownerDocument, o), a = ve(f.appendChild(o), "script"), l && ye(a), n) { - c = 0; - while (o = a[c++]) he.test(o.type || "") && n.push(o) - } - return f - }! function() { - var e = r.createDocumentFragment().appendChild(r.createElement("div")), - t = r.createElement("input"); - t.setAttribute("type", "radio"), t.setAttribute("checked", "checked"), t.setAttribute("name", "t"), e.appendChild(t), h.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked, e.innerHTML = "", h.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue - }(); - var xe = r.documentElement, - we = /^key/, - Ce = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - Te = /^([^.]*)(?:\.(.+)|)/; - - function Ee() { - return !0 - } - - function Ne() { - return !1 - } - - function ke() { - try { - return r.activeElement - } catch (e) {} - } - - function Ae(e, t, n, r, i, o) { - var a, u; - if ("object" == typeof t) { - "string" != typeof n && (r = r || n, n = void 0); - for (u in t) Ae(e, u, n, r, t[u], o); - return e - } - if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = Ne; - else if (!i) return e; - return 1 === o && (a = i, (i = function(e) { - return w().off(e), a.apply(this, arguments) - }).guid = a.guid || (a.guid = w.guid++)), e.each(function() { - w.event.add(this, t, i, r, n) - }) - } - w.event = { - global: {}, - add: function(e, t, n, r, i) { - var o, a, u, s, l, c, f, d, p, h, g, v = K.get(e); - if (v) { - n.handler && (n = (o = n).handler, i = o.selector), i && w.find.matchesSelector(xe, i), n.guid || (n.guid = w.guid++), (s = v.events) || (s = v.events = {}), (a = v.handle) || (a = v.handle = function(t) { - return "undefined" != typeof w && w.event.triggered !== t.type ? w.event.dispatch.apply(e, arguments) : void 0 - }), l = (t = (t || "").match(I) || [""]).length; - while (l--) p = g = (u = Te.exec(t[l]) || [])[1], h = (u[2] || "").split(".").sort(), p && (f = w.event.special[p] || {}, p = (i ? f.delegateType : f.bindType) || p, f = w.event.special[p] || {}, c = w.extend({ - type: p, - origType: g, - data: r, - handler: n, - guid: n.guid, - selector: i, - needsContext: i && w.expr.match.needsContext.test(i), - namespace: h.join(".") - }, o), (d = s[p]) || ((d = s[p] = []).delegateCount = 0, f.setup && !1 !== f.setup.call(e, r, h, a) || e.addEventListener && e.addEventListener(p, a)), f.add && (f.add.call(e, c), c.handler.guid || (c.handler.guid = n.guid)), i ? d.splice(d.delegateCount++, 0, c) : d.push(c), w.event.global[p] = !0) - } - }, - remove: function(e, t, n, r, i) { - var o, a, u, s, l, c, f, d, p, h, g, v = K.hasData(e) && K.get(e); - if (v && (s = v.events)) { - l = (t = (t || "").match(I) || [""]).length; - while (l--) - if (u = Te.exec(t[l]) || [], p = g = u[1], h = (u[2] || "").split(".").sort(), p) { - f = w.event.special[p] || {}, d = s[p = (r ? f.delegateType : f.bindType) || p] || [], u = u[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = d.length; - while (o--) c = d[o], !i && g !== c.origType || n && n.guid !== c.guid || u && !u.test(c.namespace) || r && r !== c.selector && ("**" !== r || !c.selector) || (d.splice(o, 1), c.selector && d.delegateCount--, f.remove && f.remove.call(e, c)); - a && !d.length && (f.teardown && !1 !== f.teardown.call(e, h, v.handle) || w.removeEvent(e, p, v.handle), delete s[p]) - } else - for (p in s) w.event.remove(e, p + t[l], n, r, !0); - w.isEmptyObject(s) && K.remove(e, "handle events") - } - }, - dispatch: function(e) { - var t = w.event.fix(e), - n, r, i, o, a, u, s = new Array(arguments.length), - l = (K.get(this, "events") || {})[t.type] || [], - c = w.event.special[t.type] || {}; - for (s[0] = t, n = 1; n < arguments.length; n++) s[n] = arguments[n]; - if (t.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, t)) { - u = w.event.handlers.call(this, t, l), n = 0; - while ((o = u[n++]) && !t.isPropagationStopped()) { - t.currentTarget = o.elem, r = 0; - while ((a = o.handlers[r++]) && !t.isImmediatePropagationStopped()) t.rnamespace && !t.rnamespace.test(a.namespace) || (t.handleObj = a, t.data = a.data, void 0 !== (i = ((w.event.special[a.origType] || {}).handle || a.handler).apply(o.elem, s)) && !1 === (t.result = i) && (t.preventDefault(), t.stopPropagation())) - } - return c.postDispatch && c.postDispatch.call(this, t), t.result - } - }, - handlers: function(e, t) { - var n, r, i, o, a, u = [], - s = t.delegateCount, - l = e.target; - if (s && l.nodeType && !("click" === e.type && e.button >= 1)) - for (; l !== this; l = l.parentNode || this) - if (1 === l.nodeType && ("click" !== e.type || !0 !== l.disabled)) { - for (o = [], a = {}, n = 0; n < s; n++) void 0 === a[i = (r = t[n]).selector + " "] && (a[i] = r.needsContext ? w(i, this).index(l) > -1 : w.find(i, this, null, [l]).length), a[i] && o.push(r); - o.length && u.push({ - elem: l, - handlers: o - }) - } return l = this, s < t.length && u.push({ - elem: l, - handlers: t.slice(s) - }), u - }, - addProp: function(e, t) { - Object.defineProperty(w.Event.prototype, e, { - enumerable: !0, - configurable: !0, - get: g(t) ? function() { - if (this.originalEvent) return t(this.originalEvent) - } : function() { - if (this.originalEvent) return this.originalEvent[e] - }, - set: function(t) { - Object.defineProperty(this, e, { - enumerable: !0, - configurable: !0, - writable: !0, - value: t - }) - } - }) - }, - fix: function(e) { - return e[w.expando] ? e : new w.Event(e) - }, - special: { - load: { - noBubble: !0 - }, - focus: { - trigger: function() { - if (this !== ke() && this.focus) return this.focus(), !1 - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if (this === ke() && this.blur) return this.blur(), !1 - }, - delegateType: "focusout" - }, - click: { - trigger: function() { - if ("checkbox" === this.type && this.click && D(this, "input")) return this.click(), !1 - }, - _default: function(e) { - return D(e.target, "a") - } - }, - beforeunload: { - postDispatch: function(e) { - void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) - } - } - } - }, w.removeEvent = function(e, t, n) { - e.removeEventListener && e.removeEventListener(t, n) - }, w.Event = function(e, t) { - if (!(this instanceof w.Event)) return new w.Event(e, t); - e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? Ee : Ne, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && w.extend(this, t), this.timeStamp = e && e.timeStamp || Date.now(), this[w.expando] = !0 - }, w.Event.prototype = { - constructor: w.Event, - isDefaultPrevented: Ne, - isPropagationStopped: Ne, - isImmediatePropagationStopped: Ne, - isSimulated: !1, - preventDefault: function() { - var e = this.originalEvent; - this.isDefaultPrevented = Ee, e && !this.isSimulated && e.preventDefault() - }, - stopPropagation: function() { - var e = this.originalEvent; - this.isPropagationStopped = Ee, e && !this.isSimulated && e.stopPropagation() - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - this.isImmediatePropagationStopped = Ee, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() - } - }, w.each({ - altKey: !0, - bubbles: !0, - cancelable: !0, - changedTouches: !0, - ctrlKey: !0, - detail: !0, - eventPhase: !0, - metaKey: !0, - pageX: !0, - pageY: !0, - shiftKey: !0, - view: !0, - "char": !0, - charCode: !0, - key: !0, - keyCode: !0, - button: !0, - buttons: !0, - clientX: !0, - clientY: !0, - offsetX: !0, - offsetY: !0, - pointerId: !0, - pointerType: !0, - screenX: !0, - screenY: !0, - targetTouches: !0, - toElement: !0, - touches: !0, - which: function(e) { - var t = e.button; - return null == e.which && we.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && Ce.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which - } - }, w.event.addProp), w.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" - }, function(e, t) { - w.event.special[e] = { - delegateType: t, - bindType: t, - handle: function(e) { - var n, r = this, - i = e.relatedTarget, - o = e.handleObj; - return i && (i === r || w.contains(r, i)) || (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n - } - } - }), w.fn.extend({ - on: function(e, t, n, r) { - return Ae(this, e, t, n, r) - }, - one: function(e, t, n, r) { - return Ae(this, e, t, n, r, 1) - }, - off: function(e, t, n) { - var r, i; - if (e && e.preventDefault && e.handleObj) return r = e.handleObj, w(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this; - if ("object" == typeof e) { - for (i in e) this.off(i, t, e[i]); - return this - } - return !1 !== t && "function" != typeof t || (n = t, t = void 0), !1 === n && (n = Ne), this.each(function() { - w.event.remove(this, e, n, t) - }) - } - }); - var De = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - Se = /\s*$/g; - - function qe(e, t) { - return D(e, "table") && D(11 !== t.nodeType ? t : t.firstChild, "tr") ? w(e).children("tbody")[0] || e : e - } - - function Oe(e) { - return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e - } - - function Pe(e) { - return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e - } - - function He(e, t) { - var n, r, i, o, a, u, s, l; - if (1 === t.nodeType) { - if (K.hasData(e) && (o = K.access(e), a = K.set(t, o), l = o.events)) { - delete a.handle, a.events = {}; - for (i in l) - for (n = 0, r = l[i].length; n < r; n++) w.event.add(t, i, l[i][n]) - } - J.hasData(e) && (u = J.access(e), s = w.extend({}, u), J.set(t, s)) - } - } - - function Ie(e, t) { - var n = t.nodeName.toLowerCase(); - "input" === n && de.test(e.type) ? t.checked = e.checked : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue) - } - - function Re(e, t, n, r) { - t = a.apply([], t); - var i, o, u, s, l, c, f = 0, - d = e.length, - p = d - 1, - v = t[0], - y = g(v); - if (y || d > 1 && "string" == typeof v && !h.checkClone && Le.test(v)) return e.each(function(i) { - var o = e.eq(i); - y && (t[0] = v.call(this, i, o.html())), Re(o, t, n, r) - }); - if (d && (i = be(t, e[0].ownerDocument, !1, e, r), o = i.firstChild, 1 === i.childNodes.length && (i = o), o || r)) { - for (s = (u = w.map(ve(i, "script"), Oe)).length; f < d; f++) l = i, f !== p && (l = w.clone(l, !0, !0), s && w.merge(u, ve(l, "script"))), n.call(e[f], l, f); - if (s) - for (c = u[u.length - 1].ownerDocument, w.map(u, Pe), f = 0; f < s; f++) l = u[f], he.test(l.type || "") && !K.access(l, "globalEval") && w.contains(c, l) && (l.src && "module" !== (l.type || "").toLowerCase() ? w._evalUrl && w._evalUrl(l.src) : m(l.textContent.replace(je, ""), c, l)) - } - return e - } - - function Be(e, t, n) { - for (var r, i = t ? w.filter(t, e) : e, o = 0; null != (r = i[o]); o++) n || 1 !== r.nodeType || w.cleanData(ve(r)), r.parentNode && (n && w.contains(r.ownerDocument, r) && ye(ve(r, "script")), r.parentNode.removeChild(r)); - return e - } - w.extend({ - htmlPrefilter: function(e) { - return e.replace(De, "<$1>") - }, - clone: function(e, t, n) { - var r, i, o, a, u = e.cloneNode(!0), - s = w.contains(e.ownerDocument, e); - if (!(h.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || w.isXMLDoc(e))) - for (a = ve(u), r = 0, i = (o = ve(e)).length; r < i; r++) Ie(o[r], a[r]); - if (t) - if (n) - for (o = o || ve(e), a = a || ve(u), r = 0, i = o.length; r < i; r++) He(o[r], a[r]); - else He(e, u); - return (a = ve(u, "script")).length > 0 && ye(a, !s && ve(e, "script")), u - }, - cleanData: function(e) { - for (var t, n, r, i = w.event.special, o = 0; void 0 !== (n = e[o]); o++) - if (Y(n)) { - if (t = n[K.expando]) { - if (t.events) - for (r in t.events) i[r] ? w.event.remove(n, r) : w.removeEvent(n, r, t.handle); - n[K.expando] = void 0 - } - n[J.expando] && (n[J.expando] = void 0) - } - } - }), w.fn.extend({ - detach: function(e) { - return Be(this, e, !0) - }, - remove: function(e) { - return Be(this, e) - }, - text: function(e) { - return _(this, function(e) { - return void 0 === e ? w.text(this) : this.empty().each(function() { - 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) - }) - }, null, e, arguments.length) - }, - append: function() { - return Re(this, arguments, function(e) { - 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || qe(this, e).appendChild(e) - }) - }, - prepend: function() { - return Re(this, arguments, function(e) { - if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { - var t = qe(this, e); - t.insertBefore(e, t.firstChild) - } - }) - }, - before: function() { - return Re(this, arguments, function(e) { - this.parentNode && this.parentNode.insertBefore(e, this) - }) - }, - after: function() { - return Re(this, arguments, function(e) { - this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) - }) - }, - empty: function() { - for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (w.cleanData(ve(e, !1)), e.textContent = ""); - return this - }, - clone: function(e, t) { - return e = null != e && e, t = null == t ? e : t, this.map(function() { - return w.clone(this, e, t) - }) - }, - html: function(e) { - return _(this, function(e) { - var t = this[0] || {}, - n = 0, - r = this.length; - if (void 0 === e && 1 === t.nodeType) return t.innerHTML; - if ("string" == typeof e && !Se.test(e) && !ge[(pe.exec(e) || ["", ""])[1].toLowerCase()]) { - e = w.htmlPrefilter(e); - try { - for (; n < r; n++) 1 === (t = this[n] || {}).nodeType && (w.cleanData(ve(t, !1)), t.innerHTML = e); - t = 0 - } catch (e) {} - } - t && this.empty().append(e) - }, null, e, arguments.length) - }, - replaceWith: function() { - var e = []; - return Re(this, arguments, function(t) { - var n = this.parentNode; - w.inArray(this, e) < 0 && (w.cleanData(ve(this)), n && n.replaceChild(t, this)) - }, e) - } - }), w.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" - }, function(e, t) { - w.fn[e] = function(e) { - for (var n, r = [], i = w(e), o = i.length - 1, a = 0; a <= o; a++) n = a === o ? this : this.clone(!0), w(i[a])[t](n), u.apply(r, n.get()); - return this.pushStack(r) - } - }); - var Me = new RegExp("^(" + re + ")(?!px)[a-z%]+$", "i"), - We = function(t) { - var n = t.ownerDocument.defaultView; - return n && n.opener || (n = e), n.getComputedStyle(t) - }, - $e = new RegExp(oe.join("|"), "i"); - ! function() { - function t() { - if (c) { - l.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0", c.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%", xe.appendChild(l).appendChild(c); - var t = e.getComputedStyle(c); - i = "1%" !== t.top, s = 12 === n(t.marginLeft), c.style.right = "60%", u = 36 === n(t.right), o = 36 === n(t.width), c.style.position = "absolute", a = 36 === c.offsetWidth || "absolute", xe.removeChild(l), c = null - } - } - - function n(e) { - return Math.round(parseFloat(e)) - } - var i, o, a, u, s, l = r.createElement("div"), - c = r.createElement("div"); - c.style && (c.style.backgroundClip = "content-box", c.cloneNode(!0).style.backgroundClip = "", h.clearCloneStyle = "content-box" === c.style.backgroundClip, w.extend(h, { - boxSizingReliable: function() { - return t(), o - }, - pixelBoxStyles: function() { - return t(), u - }, - pixelPosition: function() { - return t(), i - }, - reliableMarginLeft: function() { - return t(), s - }, - scrollboxSize: function() { - return t(), a - } - })) - }(); - - function Fe(e, t, n) { - var r, i, o, a, u = e.style; - return (n = n || We(e)) && ("" !== (a = n.getPropertyValue(t) || n[t]) || w.contains(e.ownerDocument, e) || (a = w.style(e, t)), !h.pixelBoxStyles() && Me.test(a) && $e.test(t) && (r = u.width, i = u.minWidth, o = u.maxWidth, u.minWidth = u.maxWidth = u.width = a, a = n.width, u.width = r, u.minWidth = i, u.maxWidth = o)), void 0 !== a ? a + "" : a - } - - function ze(e, t) { - return { - get: function() { - if (!e()) return (this.get = t).apply(this, arguments); - delete this.get - } - } - } - var _e = /^(none|table(?!-c[ea]).+)/, - Ue = /^--/, - Ve = { - position: "absolute", - visibility: "hidden", - display: "block" - }, - Xe = { - letterSpacing: "0", - fontWeight: "400" - }, - Qe = ["Webkit", "Moz", "ms"], - Ye = r.createElement("div").style; - - function Ge(e) { - if (e in Ye) return e; - var t = e[0].toUpperCase() + e.slice(1), - n = Qe.length; - while (n--) - if ((e = Qe[n] + t) in Ye) return e - } - - function Ke(e) { - var t = w.cssProps[e]; - return t || (t = w.cssProps[e] = Ge(e) || e), t - } - - function Je(e, t, n) { - var r = ie.exec(t); - return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t - } - - function Ze(e, t, n, r, i, o) { - var a = "width" === t ? 1 : 0, - u = 0, - s = 0; - if (n === (r ? "border" : "content")) return 0; - for (; a < 4; a += 2) "margin" === n && (s += w.css(e, n + oe[a], !0, i)), r ? ("content" === n && (s -= w.css(e, "padding" + oe[a], !0, i)), "margin" !== n && (s -= w.css(e, "border" + oe[a] + "Width", !0, i))) : (s += w.css(e, "padding" + oe[a], !0, i), "padding" !== n ? s += w.css(e, "border" + oe[a] + "Width", !0, i) : u += w.css(e, "border" + oe[a] + "Width", !0, i)); - return !r && o >= 0 && (s += Math.max(0, Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - o - s - u - .5))), s - } - - function et(e, t, n) { - var r = We(e), - i = Fe(e, t, r), - o = "border-box" === w.css(e, "boxSizing", !1, r), - a = o; - if (Me.test(i)) { - if (!n) return i; - i = "auto" - } - return a = a && (h.boxSizingReliable() || i === e.style[t]), ("auto" === i || !parseFloat(i) && "inline" === w.css(e, "display", !1, r)) && (i = e["offset" + t[0].toUpperCase() + t.slice(1)], a = !0), (i = parseFloat(i) || 0) + Ze(e, t, n || (o ? "border" : "content"), a, r, i) + "px" - } - w.extend({ - cssHooks: { - opacity: { - get: function(e, t) { - if (t) { - var n = Fe(e, "opacity"); - return "" === n ? "1" : n - } - } - } - }, - cssNumber: { - animationIterationCount: !0, - columnCount: !0, - fillOpacity: !0, - flexGrow: !0, - flexShrink: !0, - fontWeight: !0, - lineHeight: !0, - opacity: !0, - order: !0, - orphans: !0, - widows: !0, - zIndex: !0, - zoom: !0 - }, - cssProps: {}, - style: function(e, t, n, r) { - if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { - var i, o, a, u = Q(t), - s = Ue.test(t), - l = e.style; - if (s || (t = Ke(u)), a = w.cssHooks[t] || w.cssHooks[u], void 0 === n) return a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : l[t]; - "string" == (o = typeof n) && (i = ie.exec(n)) && i[1] && (n = se(e, t, i), o = "number"), null != n && n === n && ("number" === o && (n += i && i[3] || (w.cssNumber[u] ? "" : "px")), h.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), a && "set" in a && void 0 === (n = a.set(e, n, r)) || (s ? l.setProperty(t, n) : l[t] = n)) - } - }, - css: function(e, t, n, r) { - var i, o, a, u = Q(t); - return Ue.test(t) || (t = Ke(u)), (a = w.cssHooks[t] || w.cssHooks[u]) && "get" in a && (i = a.get(e, !0, n)), void 0 === i && (i = Fe(e, t, r)), "normal" === i && t in Xe && (i = Xe[t]), "" === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i - } - }), w.each(["height", "width"], function(e, t) { - w.cssHooks[t] = { - get: function(e, n, r) { - if (n) return !_e.test(w.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? et(e, t, r) : ue(e, Ve, function() { - return et(e, t, r) - }) - }, - set: function(e, n, r) { - var i, o = We(e), - a = "border-box" === w.css(e, "boxSizing", !1, o), - u = r && Ze(e, t, r, a, o); - return a && h.scrollboxSize() === o.position && (u -= Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - parseFloat(o[t]) - Ze(e, t, "border", !1, o) - .5)), u && (i = ie.exec(n)) && "px" !== (i[3] || "px") && (e.style[t] = n, n = w.css(e, t)), Je(e, n, u) - } - } - }), w.cssHooks.marginLeft = ze(h.reliableMarginLeft, function(e, t) { - if (t) return (parseFloat(Fe(e, "marginLeft")) || e.getBoundingClientRect().left - ue(e, { - marginLeft: 0 - }, function() { - return e.getBoundingClientRect().left - })) + "px" - }), w.each({ - margin: "", - padding: "", - border: "Width" - }, function(e, t) { - w.cssHooks[e + t] = { - expand: function(n) { - for (var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n]; r < 4; r++) i[e + oe[r] + t] = o[r] || o[r - 2] || o[0]; - return i - } - }, "margin" !== e && (w.cssHooks[e + t].set = Je) - }), w.fn.extend({ - css: function(e, t) { - return _(this, function(e, t, n) { - var r, i, o = {}, - a = 0; - if (Array.isArray(t)) { - for (r = We(e), i = t.length; a < i; a++) o[t[a]] = w.css(e, t[a], !1, r); - return o - } - return void 0 !== n ? w.style(e, t, n) : w.css(e, t) - }, e, t, arguments.length > 1) - } - }), w.fn.delay = function(t, n) { - return t = w.fx ? w.fx.speeds[t] || t : t, n = n || "fx", this.queue(n, function(n, r) { - var i = e.setTimeout(n, t); - r.stop = function() { - e.clearTimeout(i) - } - }) - }, - function() { - var e = r.createElement("input"), - t = r.createElement("select").appendChild(r.createElement("option")); - e.type = "checkbox", h.checkOn = "" !== e.value, h.optSelected = t.selected, (e = r.createElement("input")).value = "t", e.type = "radio", h.radioValue = "t" === e.value - }(); - var tt, nt = w.expr.attrHandle; - w.fn.extend({ - attr: function(e, t) { - return _(this, w.attr, e, t, arguments.length > 1) - }, - removeAttr: function(e) { - return this.each(function() { - w.removeAttr(this, e) - }) - } - }), w.extend({ - attr: function(e, t, n) { - var r, i, o = e.nodeType; - if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? w.prop(e, t, n) : (1 === o && w.isXMLDoc(e) || (i = w.attrHooks[t.toLowerCase()] || (w.expr.match.bool.test(t) ? tt : void 0)), void 0 !== n ? null === n ? void w.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : null == (r = w.find.attr(e, t)) ? void 0 : r) - }, - attrHooks: { - type: { - set: function(e, t) { - if (!h.radioValue && "radio" === t && D(e, "input")) { - var n = e.value; - return e.setAttribute("type", t), n && (e.value = n), t - } - } - } - }, - removeAttr: function(e, t) { - var n, r = 0, - i = t && t.match(I); - if (i && 1 === e.nodeType) - while (n = i[r++]) e.removeAttribute(n) - } - }), tt = { - set: function(e, t, n) { - return !1 === t ? w.removeAttr(e, n) : e.setAttribute(n, n), n - } - }, w.each(w.expr.match.bool.source.match(/\w+/g), function(e, t) { - var n = nt[t] || w.find.attr; - nt[t] = function(e, t, r) { - var i, o, a = t.toLowerCase(); - return r || (o = nt[a], nt[a] = i, i = null != n(e, t, r) ? a : null, nt[a] = o), i - } - }); - var rt = /^(?:input|select|textarea|button)$/i, - it = /^(?:a|area)$/i; - w.fn.extend({ - prop: function(e, t) { - return _(this, w.prop, e, t, arguments.length > 1) - }, - removeProp: function(e) { - return this.each(function() { - delete this[w.propFix[e] || e] - }) - } - }), w.extend({ - prop: function(e, t, n) { - var r, i, o = e.nodeType; - if (3 !== o && 8 !== o && 2 !== o) return 1 === o && w.isXMLDoc(e) || (t = w.propFix[t] || t, i = w.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t] - }, - propHooks: { - tabIndex: { - get: function(e) { - var t = w.find.attr(e, "tabindex"); - return t ? parseInt(t, 10) : rt.test(e.nodeName) || it.test(e.nodeName) && e.href ? 0 : -1 - } - } - }, - propFix: { - "for": "htmlFor", - "class": "className" - } - }), h.optSelected || (w.propHooks.selected = { - get: function(e) { - var t = e.parentNode; - return t && t.parentNode && t.parentNode.selectedIndex, null - }, - set: function(e) { - var t = e.parentNode; - t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) - } - }), w.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() { - w.propFix[this.toLowerCase()] = this - }); - - function ot(e) { - return (e.match(I) || []).join(" ") - } - - function at(e) { - return e.getAttribute && e.getAttribute("class") || "" - } - - function ut(e) { - return Array.isArray(e) ? e : "string" == typeof e ? e.match(I) || [] : [] - } - w.fn.extend({ - addClass: function(e) { - var t, n, r, i, o, a, u, s = 0; - if (g(e)) return this.each(function(t) { - w(this).addClass(e.call(this, t, at(this))) - }); - if ((t = ut(e)).length) - while (n = this[s++]) - if (i = at(n), r = 1 === n.nodeType && " " + ot(i) + " ") { - a = 0; - while (o = t[a++]) r.indexOf(" " + o + " ") < 0 && (r += o + " "); - i !== (u = ot(r)) && n.setAttribute("class", u) - } return this - }, - removeClass: function(e) { - var t, n, r, i, o, a, u, s = 0; - if (g(e)) return this.each(function(t) { - w(this).removeClass(e.call(this, t, at(this))) - }); - if (!arguments.length) return this.attr("class", ""); - if ((t = ut(e)).length) - while (n = this[s++]) - if (i = at(n), r = 1 === n.nodeType && " " + ot(i) + " ") { - a = 0; - while (o = t[a++]) - while (r.indexOf(" " + o + " ") > -1) r = r.replace(" " + o + " ", " "); - i !== (u = ot(r)) && n.setAttribute("class", u) - } return this - }, - toggleClass: function(e, t) { - var n = typeof e, - r = "string" === n || Array.isArray(e); - return "boolean" == typeof t && r ? t ? this.addClass(e) : this.removeClass(e) : g(e) ? this.each(function(n) { - w(this).toggleClass(e.call(this, n, at(this), t), t) - }) : this.each(function() { - var t, i, o, a; - if (r) { - i = 0, o = w(this), a = ut(e); - while (t = a[i++]) o.hasClass(t) ? o.removeClass(t) : o.addClass(t) - } else void 0 !== e && "boolean" !== n || ((t = at(this)) && K.set(this, "__className__", t), this.setAttribute && this.setAttribute("class", t || !1 === e ? "" : K.get(this, "__className__") || "")) - }) - }, - hasClass: function(e) { - var t, n, r = 0; - t = " " + e + " "; - while (n = this[r++]) - if (1 === n.nodeType && (" " + ot(at(n)) + " ").indexOf(t) > -1) return !0; - return !1 - } - }); - var st = /\r/g; - w.fn.extend({ - val: function(e) { - var t, n, r, i = this[0]; { - if (arguments.length) return r = g(e), this.each(function(n) { - var i; - 1 === this.nodeType && (null == (i = r ? e.call(this, n, w(this).val()) : e) ? i = "" : "number" == typeof i ? i += "" : Array.isArray(i) && (i = w.map(i, function(e) { - return null == e ? "" : e + "" - })), (t = w.valHooks[this.type] || w.valHooks[this.nodeName.toLowerCase()]) && "set" in t && void 0 !== t.set(this, i, "value") || (this.value = i)) - }); - if (i) return (t = w.valHooks[i.type] || w.valHooks[i.nodeName.toLowerCase()]) && "get" in t && void 0 !== (n = t.get(i, "value")) ? n : "string" == typeof(n = i.value) ? n.replace(st, "") : null == n ? "" : n - } - } - }), w.extend({ - valHooks: { - option: { - get: function(e) { - var t = w.find.attr(e, "value"); - return null != t ? t : ot(w.text(e)) - } - }, - select: { - get: function(e) { - var t, n, r, i = e.options, - o = e.selectedIndex, - a = "select-one" === e.type, - u = a ? null : [], - s = a ? o + 1 : i.length; - for (r = o < 0 ? s : a ? o : 0; r < s; r++) - if (((n = i[r]).selected || r === o) && !n.disabled && (!n.parentNode.disabled || !D(n.parentNode, "optgroup"))) { - if (t = w(n).val(), a) return t; - u.push(t) - } return u - }, - set: function(e, t) { - var n, r, i = e.options, - o = w.makeArray(t), - a = i.length; - while (a--)((r = i[a]).selected = w.inArray(w.valHooks.option.get(r), o) > -1) && (n = !0); - return n || (e.selectedIndex = -1), o - } - } - } - }), w.each(["radio", "checkbox"], function() { - w.valHooks[this] = { - set: function(e, t) { - if (Array.isArray(t)) return e.checked = w.inArray(w(e).val(), t) > -1 - } - }, h.checkOn || (w.valHooks[this].get = function(e) { - return null === e.getAttribute("value") ? "on" : e.value - }) - }), h.focusin = "onfocusin" in e; - var lt = /^(?:focusinfocus|focusoutblur)$/, - ct = function(e) { - e.stopPropagation() - }; - w.extend(w.event, { - trigger: function(t, n, i, o) { - var a, u, s, l, c, d, p, h, y = [i || r], - m = f.call(t, "type") ? t.type : t, - b = f.call(t, "namespace") ? t.namespace.split(".") : []; - if (u = h = s = i = i || r, 3 !== i.nodeType && 8 !== i.nodeType && !lt.test(m + w.event.triggered) && (m.indexOf(".") > -1 && (m = (b = m.split(".")).shift(), b.sort()), c = m.indexOf(":") < 0 && "on" + m, t = t[w.expando] ? t : new w.Event(m, "object" == typeof t && t), t.isTrigger = o ? 2 : 3, t.namespace = b.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = i), n = null == n ? [t] : w.makeArray(n, [t]), p = w.event.special[m] || {}, o || !p.trigger || !1 !== p.trigger.apply(i, n))) { - if (!o && !p.noBubble && !v(i)) { - for (l = p.delegateType || m, lt.test(l + m) || (u = u.parentNode); u; u = u.parentNode) y.push(u), s = u; - s === (i.ownerDocument || r) && y.push(s.defaultView || s.parentWindow || e) - } - a = 0; - while ((u = y[a++]) && !t.isPropagationStopped()) h = u, t.type = a > 1 ? l : p.bindType || m, (d = (K.get(u, "events") || {})[t.type] && K.get(u, "handle")) && d.apply(u, n), (d = c && u[c]) && d.apply && Y(u) && (t.result = d.apply(u, n), !1 === t.result && t.preventDefault()); - return t.type = m, o || t.isDefaultPrevented() || p._default && !1 !== p._default.apply(y.pop(), n) || !Y(i) || c && g(i[m]) && !v(i) && ((s = i[c]) && (i[c] = null), w.event.triggered = m, t.isPropagationStopped() && h.addEventListener(m, ct), i[m](), t.isPropagationStopped() && h.removeEventListener(m, ct), w.event.triggered = void 0, s && (i[c] = s)), t.result - } - }, - simulate: function(e, t, n) { - var r = w.extend(new w.Event, n, { - type: e, - isSimulated: !0 - }); - w.event.trigger(r, null, t) - } - }), w.fn.extend({ - trigger: function(e, t) { - return this.each(function() { - w.event.trigger(e, t, this) - }) - }, - triggerHandler: function(e, t) { - var n = this[0]; - if (n) return w.event.trigger(e, t, n, !0) - } - }), h.focusin || w.each({ - focus: "focusin", - blur: "focusout" - }, function(e, t) { - var n = function(e) { - w.event.simulate(t, e.target, w.event.fix(e)) - }; - w.event.special[t] = { - setup: function() { - var r = this.ownerDocument || this, - i = K.access(r, t); - i || r.addEventListener(e, n, !0), K.access(r, t, (i || 0) + 1) - }, - teardown: function() { - var r = this.ownerDocument || this, - i = K.access(r, t) - 1; - i ? K.access(r, t, i) : (r.removeEventListener(e, n, !0), K.remove(r, t)) - } - } - }); - var ft = /\[\]$/, - dt = /\r?\n/g, - pt = /^(?:submit|button|image|reset|file)$/i, - ht = /^(?:input|select|textarea|keygen)/i; - - function gt(e, t, n, r) { - var i; - if (Array.isArray(t)) w.each(t, function(t, i) { - n || ft.test(e) ? r(e, i) : gt(e + "[" + ("object" == typeof i && null != i ? t : "") + "]", i, n, r) - }); - else if (n || "object" !== b(t)) r(e, t); - else - for (i in t) gt(e + "[" + i + "]", t[i], n, r) - } - w.param = function(e, t) { - var n, r = [], - i = function(e, t) { - var n = g(t) ? t() : t; - r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n) - }; - if (Array.isArray(e) || e.jquery && !w.isPlainObject(e)) w.each(e, function() { - i(this.name, this.value) - }); - else - for (n in e) gt(n, e[n], t, i); - return r.join("&") - }, w.fn.extend({ - serialize: function() { - return w.param(this.serializeArray()) - }, - serializeArray: function() { - return this.map(function() { - var e = w.prop(this, "elements"); - return e ? w.makeArray(e) : this - }).filter(function() { - var e = this.type; - return this.name && !w(this).is(":disabled") && ht.test(this.nodeName) && !pt.test(e) && (this.checked || !de.test(e)) - }).map(function(e, t) { - var n = w(this).val(); - return null == n ? null : Array.isArray(n) ? w.map(n, function(e) { - return { - name: t.name, - value: e.replace(dt, "\r\n") - } - }) : { - name: t.name, - value: n.replace(dt, "\r\n") - } - }).get() - } - }), w.fn.extend({ - wrapAll: function(e) { - var t; - return this[0] && (g(e) && (e = e.call(this[0])), t = w(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() { - var e = this; - while (e.firstElementChild) e = e.firstElementChild; - return e - }).append(this)), this - }, - wrapInner: function(e) { - return g(e) ? this.each(function(t) { - w(this).wrapInner(e.call(this, t)) - }) : this.each(function() { - var t = w(this), - n = t.contents(); - n.length ? n.wrapAll(e) : t.append(e) - }) - }, - wrap: function(e) { - var t = g(e); - return this.each(function(n) { - w(this).wrapAll(t ? e.call(this, n) : e) - }) - }, - unwrap: function(e) { - return this.parent(e).not("body").each(function() { - w(this).replaceWith(this.childNodes) - }), this - } - }), w.expr.pseudos.hidden = function(e) { - return !w.expr.pseudos.visible(e) - }, w.expr.pseudos.visible = function(e) { - return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) - }, h.createHTMLDocument = function() { - var e = r.implementation.createHTMLDocument("").body; - return e.innerHTML = "
", 2 === e.childNodes.length - }(), w.parseHTML = function(e, t, n) { - if ("string" != typeof e) return []; - "boolean" == typeof t && (n = t, t = !1); - var i, o, a; - return t || (h.createHTMLDocument ? ((i = (t = r.implementation.createHTMLDocument("")).createElement("base")).href = r.location.href, t.head.appendChild(i)) : t = r), o = S.exec(e), a = !n && [], o ? [t.createElement(o[1])] : (o = be([e], t, a), a && a.length && w(a).remove(), w.merge([], o.childNodes)) - }, w.offset = { - setOffset: function(e, t, n) { - var r, i, o, a, u, s, l, c = w.css(e, "position"), - f = w(e), - d = {}; - "static" === c && (e.style.position = "relative"), u = f.offset(), o = w.css(e, "top"), s = w.css(e, "left"), (l = ("absolute" === c || "fixed" === c) && (o + s).indexOf("auto") > -1) ? (a = (r = f.position()).top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(s) || 0), g(t) && (t = t.call(e, n, w.extend({}, u))), null != t.top && (d.top = t.top - u.top + a), null != t.left && (d.left = t.left - u.left + i), "using" in t ? t.using.call(e, d) : f.css(d) - } - }, w.fn.extend({ - offset: function(e) { - if (arguments.length) return void 0 === e ? this : this.each(function(t) { - w.offset.setOffset(this, e, t) - }); - var t, n, r = this[0]; - if (r) return r.getClientRects().length ? (t = r.getBoundingClientRect(), n = r.ownerDocument.defaultView, { - top: t.top + n.pageYOffset, - left: t.left + n.pageXOffset - }) : { - top: 0, - left: 0 - } - }, - position: function() { - if (this[0]) { - var e, t, n, r = this[0], - i = { - top: 0, - left: 0 - }; - if ("fixed" === w.css(r, "position")) t = r.getBoundingClientRect(); - else { - t = this.offset(), n = r.ownerDocument, e = r.offsetParent || n.documentElement; - while (e && (e === n.body || e === n.documentElement) && "static" === w.css(e, "position")) e = e.parentNode; - e && e !== r && 1 === e.nodeType && ((i = w(e).offset()).top += w.css(e, "borderTopWidth", !0), i.left += w.css(e, "borderLeftWidth", !0)) - } - return { - top: t.top - i.top - w.css(r, "marginTop", !0), - left: t.left - i.left - w.css(r, "marginLeft", !0) - } - } - }, - offsetParent: function() { - return this.map(function() { - var e = this.offsetParent; - while (e && "static" === w.css(e, "position")) e = e.offsetParent; - return e || xe - }) - } - }), w.each({ - scrollLeft: "pageXOffset", - scrollTop: "pageYOffset" - }, function(e, t) { - var n = "pageYOffset" === t; - w.fn[e] = function(r) { - return _(this, function(e, r, i) { - var o; - if (v(e) ? o = e : 9 === e.nodeType && (o = e.defaultView), void 0 === i) return o ? o[t] : e[r]; - o ? o.scrollTo(n ? o.pageXOffset : i, n ? i : o.pageYOffset) : e[r] = i - }, e, r, arguments.length) - } - }), w.each(["top", "left"], function(e, t) { - w.cssHooks[t] = ze(h.pixelPosition, function(e, n) { - if (n) return n = Fe(e, t), Me.test(n) ? w(e).position()[t] + "px" : n - }) - }), w.each({ - Height: "height", - Width: "width" - }, function(e, t) { - w.each({ - padding: "inner" + e, - content: t, - "": "outer" + e - }, function(n, r) { - w.fn[r] = function(i, o) { - var a = arguments.length && (n || "boolean" != typeof i), - u = n || (!0 === i || !0 === o ? "margin" : "border"); - return _(this, function(t, n, i) { - var o; - return v(t) ? 0 === r.indexOf("outer") ? t["inner" + e] : t.document.documentElement["client" + e] : 9 === t.nodeType ? (o = t.documentElement, Math.max(t.body["scroll" + e], o["scroll" + e], t.body["offset" + e], o["offset" + e], o["client" + e])) : void 0 === i ? w.css(t, n, u) : w.style(t, n, i, u) - }, t, a ? i : void 0, a) - } - }) - }), w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(e, t) { - w.fn[t] = function(e, n) { - return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) - } - }), w.fn.extend({ - hover: function(e, t) { - return this.mouseenter(e).mouseleave(t || e) - } - }), w.fn.extend({ - bind: function(e, t, n) { - return this.on(e, null, t, n) - }, - unbind: function(e, t) { - return this.off(e, null, t) - }, - delegate: function(e, t, n, r) { - return this.on(t, e, n, r) - }, - undelegate: function(e, t, n) { - return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) - } - }), w.proxy = function(e, t) { - var n, r, i; - if ("string" == typeof t && (n = e[t], t = e, e = n), g(e)) return r = o.call(arguments, 2), i = function() { - return e.apply(t || this, r.concat(o.call(arguments))) - }, i.guid = e.guid = e.guid || w.guid++, i - }, w.holdReady = function(e) { - e ? w.readyWait++ : w.ready(!0) - }, w.isArray = Array.isArray, w.parseJSON = JSON.parse, w.nodeName = D, w.isFunction = g, w.isWindow = v, w.camelCase = Q, w.type = b, w.now = Date.now, w.isNumeric = function(e) { - var t = w.type(e); - return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e)) - }, "function" == typeof define && define.amd && define("jquery", [], function() { - return w - }); - var vt = e.jQuery, - yt = e.$; - return w.noConflict = function(t) { - return e.$ === w && (e.$ = yt), t && e.jQuery === w && (e.jQuery = vt), w - }, t || (e.jQuery = e.$ = w), w -}); \ No newline at end of file diff --git a/src/bower_components/libjass/libjass.css b/src/bower_components/libjass/libjass.css deleted file mode 100644 index 73915706e8..0000000000 --- a/src/bower_components/libjass/libjass.css +++ /dev/null @@ -1,91 +0,0 @@ -.libjass-wrapper { - position: relative; - overflow: hidden -} - -.libjass-subs, -.libjass-subs .an { - position: absolute -} - -.libjass-subs { - overflow: hidden; - line-height: 0 -} - -.libjass-subs, -.libjass-subs * { - pointer-events: none; - -webkit-animation-fill-mode: both !important; - animation-fill-mode: both !important -} - -.libjass-subs.paused * { - -webkit-animation-play-state: paused !important; - animation-play-state: paused !important -} - -.libjass-subs .an1, -.libjass-subs .an2, -.libjass-subs .an3 { - bottom: 0 -} - -.libjass-subs .an4, -.libjass-subs .an5, -.libjass-subs .an6 { - display: table; - width: 100%; - height: 100% -} - -.libjass-subs .an4>*, -.libjass-subs .an5>*, -.libjass-subs .an6>* { - display: table-cell; - vertical-align: middle -} - -.libjass-subs .an7, -.libjass-subs .an8, -.libjass-subs .an9 { - top: 0 -} - -.libjass-subs .an1, -.libjass-subs .an4, -.libjass-subs .an7 { - text-align: left -} - -.libjass-subs .an2, -.libjass-subs .an5, -.libjass-subs .an8 { - text-align: center -} - -.libjass-subs .an3, -.libjass-subs .an6, -.libjass-subs .an9 { - text-align: right -} - -.libjass-subs div[data-dialogue-id]>span { - -webkit-perspective-origin: center; - perspective-origin: center; - -webkit-perspective: 400px; - perspective: 400px -} - -.libjass-font-measure { - position: absolute; - visibility: hidden; - border: 0; - margin: 0; - padding: 0; - line-height: normal -} - -.libjass-filters { - display: block -} \ No newline at end of file diff --git a/src/bower_components/libjass/libjass.min.js b/src/bower_components/libjass/libjass.min.js deleted file mode 100644 index 91852a830a..0000000000 --- a/src/bower_components/libjass/libjass.min.js +++ /dev/null @@ -1,4185 +0,0 @@ -/** - * libjass - * - * https://github.com/Arnavion/libjass - * - * Copyright 2013 Arnav Singh - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -! function(e, t) { - var r = this; - "function" == typeof define && define.amd ? define([], function() { - return t(r) - }) : "object" == typeof exports && "object" == typeof module ? module.exports = t(r) : "object" == typeof exports ? exports.libjass = t(r) : e.libjass = t(r) -}(this, function(e) { - "use strict"; - return function(e) { - function t(n) { - if (r[n]) return r[n]; - var i = r[n] = Object.create(null); - return e[n](i, t), i - } - var r = Object.create(null); - return t(0) - }([function(e, t) { - var r = t(23), - n = t(23); - e.debugMode = n.debugMode, e.verboseMode = n.verboseMode; - var i = t(33), - o = t(33); - e.Set = o.Set; - var a = t(30), - l = t(30); - e.Map = l.Map; - var s = t(32), - u = t(32); - e.Promise = u.Promise, e.DeferredPromise = u.DeferredPromise; - var p = t(37); - e.webworker = p; - var c = t(8); - e.parts = c; - var h = t(1); - e.parser = h; - var f = t(14); - e.renderers = f; - var d = t(24); - e.ASS = d.ASS; - var _ = t(25); - e.Attachment = _.Attachment, e.AttachmentType = _.AttachmentType; - var g = t(26); - e.Dialogue = g.Dialogue; - var v = t(28); - e.ScriptProperties = v.ScriptProperties; - var y = t(29); - e.Style = y.Style; - var m = t(27); - e.BorderStyle = m.BorderStyle, e.Format = m.Format, e.WrappingStyle = m.WrappingStyle, Object.defineProperties(e, { - debugMode: { - get: function() { - return r.debugMode - }, - set: r.setDebugMode - }, - verboseMode: { - get: function() { - return r.verboseMode - }, - set: r.setVerboseMode - }, - Set: { - get: function() { - return i.Set - }, - set: i.setImplementation - }, - Map: { - get: function() { - return a.Map - }, - set: a.setImplementation - }, - Promise: { - get: function() { - return s.Promise - }, - set: s.setImplementation - } - }) - }, function(e, t) { - var r = t(3); - e.parse = r.parse; - var n = t(5); - e.BrowserReadableStream = n.BrowserReadableStream, e.StringStream = n.StringStream, e.XhrStream = n.XhrStream; - var i = t(4); - e.StreamParser = i.StreamParser, e.SrtStreamParser = i.SrtStreamParser - }, function(e, t) { - function r(e) { - var t = e.indexOf(":"); - if (-1 === t) return null; - var r = e.substr(0, t), - n = e.substr(t + 1).replace(/^\s+/, ""); - return { - name: r, - value: n - } - } - - function n(e, t) { - var n = r(e); - if (null === n) return null; - var o = n.value.split(","); - o.length > t.length && (o[t.length - 1] = o.slice(t.length - 1).join(",")); - var a = new i.Map; - return t.forEach(function(e, t) { - a.set(e, o[t]) - }), { - type: n.name, - template: a - } - } - var i = t(30); - e.parseLineIntoProperty = r, e.parseLineIntoTypedTemplate = n - }, function(e, t) { - function r(e, t) { - var r = new s(e, t); - if (null === r.result || r.result.end !== e.length) throw o.debugMode && console.error("Parse failed. %s %s %o", t, e, r.result), new Error("Parse failed."); - return r.result.value - } - - function n(e, t, r, n) { - s.prototype["parse_tag_" + e] = function(i) { - var o = this, - a = new h(i); - if (null === o.read(a, e)) return i.pop(), null; - var l = r.call(o, a); - if (null !== l) a.value = new t(l.value); - else { - if (n) return i.pop(), null; - a.value = new t(null) - } - return a - } - } - var i = t(8), - o = t(23), - a = t(30), - l = new a.Map; - e.parse = r; - var s = function() { - function e(e, t) { - this.e = e, this.t = new h(null), this.r = l.get(t).call(this, this.t) - } - return Object.defineProperty(e.prototype, "result", { - get: function() { - return this.r - }, - enumerable: !0, - configurable: !0 - }), e.prototype.parse_dialogueParts = function(e) { - var t, n = new h(e); - for (n.value = []; this.n();) { - var o = this.parse_enclosedTags(n); - if (null !== o)(t = n.value).push.apply(t, o.value); - else { - var a = this.parse_newline(n) || this.parse_hardspace(n) || this.parse_text(n); - if (null === a) return e.pop(), null; - if (a.value instanceof i.Text && n.value[n.value.length - 1] instanceof i.Text) { - var l = n.value[n.value.length - 1]; - n.value[n.value.length - 1] = new i.Text(l.value + a.value.value) - } else n.value.push(a.value) - } - } - var s = !1; - return n.value.forEach(function(e, t) { - e instanceof i.DrawingMode ? s = 0 !== e.scale : e instanceof i.Text && s && (n.value[t] = new i.DrawingInstructions(r(e.value, "drawingInstructions"))) - }), n - }, e.prototype.parse_enclosedTags = function(e) { - var t = new h(e); - if (t.value = [], null === this.read(t, "{")) return e.pop(), null; - for (var r = this.i(); this.n() && "}" !== r; r = this.i()) { - var n = null; - if (null !== this.read(t, "\\") && (n = this.parse_tag_alpha(t) || this.parse_tag_iclip(t) || this.parse_tag_xbord(t) || this.parse_tag_ybord(t) || this.parse_tag_xshad(t) || this.parse_tag_yshad(t) || this.parse_tag_blur(t) || this.parse_tag_bord(t) || this.parse_tag_clip(t) || this.parse_tag_fade(t) || this.parse_tag_fscx(t) || this.parse_tag_fscy(t) || this.parse_tag_move(t) || this.parse_tag_shad(t) || this.parse_tag_fad(t) || this.parse_tag_fax(t) || this.parse_tag_fay(t) || this.parse_tag_frx(t) || this.parse_tag_fry(t) || this.parse_tag_frz(t) || this.parse_tag_fsp(t) || this.parse_tag_fsplus(t) || this.parse_tag_fsminus(t) || this.parse_tag_org(t) || this.parse_tag_pbo(t) || this.parse_tag_pos(t) || this.parse_tag_an(t) || this.parse_tag_be(t) || this.parse_tag_fn(t) || this.parse_tag_fr(t) || this.parse_tag_fs(t) || this.parse_tag_kf(t) || this.parse_tag_ko(t) || this.parse_tag_1a(t) || this.parse_tag_1c(t) || this.parse_tag_2a(t) || this.parse_tag_2c(t) || this.parse_tag_3a(t) || this.parse_tag_3c(t) || this.parse_tag_4a(t) || this.parse_tag_4c(t) || this.parse_tag_a(t) || this.parse_tag_b(t) || this.parse_tag_c(t) || this.parse_tag_i(t) || this.parse_tag_k(t) || this.parse_tag_K(t) || this.parse_tag_p(t) || this.parse_tag_q(t) || this.parse_tag_r(t) || this.parse_tag_s(t) || this.parse_tag_t(t) || this.parse_tag_u(t), null === n && t.pop()), null === n && (n = this.parse_comment(t)), null === n) return e.pop(), null; - n.value instanceof i.Comment && t.value[t.value.length - 1] instanceof i.Comment ? t.value[t.value.length - 1] = new i.Comment(t.value[t.value.length - 1].value + n.value.value) : t.value.push(n.value) - } - return null === this.read(t, "}") ? (e.pop(), null) : t - }, e.prototype.parse_newline = function(e) { - var t = new h(e); - return null === this.read(t, "\\N") ? (e.pop(), null) : (t.value = new i.NewLine, t) - }, e.prototype.parse_hardspace = function(e) { - var t = new h(e); - return null === this.read(t, "\\h") ? (e.pop(), null) : (t.value = new i.Text(" "), t) - }, e.prototype.parse_text = function(e) { - var t = this.i(), - r = new h(e), - n = new h(r, t); - return r.value = new i.Text(n.value), r - }, e.prototype.parse_comment = function(e) { - var t = this.i(), - r = new h(e), - n = new h(r, t); - return r.value = new i.Comment(n.value), r - }, e.prototype.parse_tag_a = function(e) { - var t = new h(e); - if (null === this.read(t, "a")) return e.pop(), null; - var r = this.i(); - switch (r) { - case "1": - var n = this.i(2); - switch (n) { - case "10": - case "11": - r = n - } - break; - case "2": - case "3": - case "5": - case "6": - case "7": - case "9": - break; - default: - return e.pop(), null - } - var o = new h(t, r), - a = null; - switch (o.value) { - case "1": - a = 1; - break; - case "2": - a = 2; - break; - case "3": - a = 3; - break; - case "5": - a = 7; - break; - case "6": - a = 8; - break; - case "7": - a = 9; - break; - case "9": - a = 4; - break; - case "10": - a = 5; - break; - case "11": - a = 6 - } - return t.value = new i.Alignment(a), t - }, e.prototype.parse_tag_alpha = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_an = function(e) { - var t = new h(e); - if (null === this.read(t, "an")) return e.pop(), null; - var r = this.i(); - if ("1" > r || r > "9") return e.pop(), null; - var n = new h(t, r); - return t.value = new i.Alignment(parseInt(n.value)), t - }, e.prototype.parse_tag_b = function(e) { - var t = new h(e); - if (null === this.read(t, "b")) return e.pop(), null; - var r = null, - n = this.i(); - return n >= "1" && "9" >= n && (n = this.i(3), "00" === n.substr(1) && (r = new h(t, n), r.value = parseInt(r.value))), null === r && (r = this.parse_enableDisable(t)), null !== r ? t.value = new i.Bold(r.value) : t.value = new i.Bold(null), t - }, e.prototype.parse_tag_be = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_blur = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_bord = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_c = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_clip = function(e) { - return this.o("clip", e) - }, e.prototype.parse_tag_fad = function(e) { - var t = new h(e); - if (null === this.read(t, "fad")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = this.parse_decimal(t); - if (null === r) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var n = this.parse_decimal(t); - return null === n ? (e.pop(), null) : null === this.read(t, ")") ? (e.pop(), null) : (t.value = new i.Fade(r.value / 1e3, n.value / 1e3), t) - }, e.prototype.parse_tag_fade = function(e) { - var t = new h(e); - if (null === this.read(t, "fade")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = this.parse_decimal(t); - if (null === r) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var n = this.parse_decimal(t); - if (null === n) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var o = this.parse_decimal(t); - if (null === o) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var a = this.parse_decimal(t); - if (null === a) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var l = this.parse_decimal(t); - if (null === l) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var s = this.parse_decimal(t); - if (null === s) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var u = this.parse_decimal(t); - return null === u ? (e.pop(), null) : null === this.read(t, ")") ? (e.pop(), null) : (t.value = new i.ComplexFade(1 - r.value / 255, 1 - n.value / 255, 1 - o.value / 255, a.value / 1e3, l.value / 1e3, s.value / 1e3, u.value / 1e3), t) - }, e.prototype.parse_tag_fax = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_fay = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_fn = function(e) { - var t = new h(e); - if (null === this.read(t, "fn")) return e.pop(), null; - for (var r = new h(t, ""), n = this.i(); this.n() && "\\" !== n && "}" !== n; n = this.i()) r.value += n; - return r.value.length > 0 ? t.value = new i.FontName(r.value) : t.value = new i.FontName(null), t - }, e.prototype.parse_tag_fr = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_frx = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_fry = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_frz = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_fs = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_fsplus = function(e) { - var t = new h(e); - if (null === this.read(t, "fs+")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.FontSizePlus(r.value), t) - }, e.prototype.parse_tag_fsminus = function(e) { - var t = new h(e); - if (null === this.read(t, "fs-")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.FontSizeMinus(r.value), t) - }, e.prototype.parse_tag_fscx = function(e) { - var t = new h(e); - if (null === this.read(t, "fscx")) return e.pop(), null; - var r = this.parse_decimal(t); - return null !== r ? t.value = new i.FontScaleX(r.value / 100) : t.value = new i.FontScaleX(null), t - }, e.prototype.parse_tag_fscy = function(e) { - var t = new h(e); - if (null === this.read(t, "fscy")) return e.pop(), null; - var r = this.parse_decimal(t); - return null !== r ? t.value = new i.FontScaleY(r.value / 100) : t.value = new i.FontScaleY(null), t - }, e.prototype.parse_tag_fsp = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_i = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_iclip = function(e) { - return this.o("iclip", e) - }, e.prototype.parse_tag_k = function(e) { - var t = new h(e); - if (null === this.read(t, "k")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.ColorKaraoke(r.value / 100), t) - }, e.prototype.parse_tag_K = function(e) { - var t = new h(e); - if (null === this.read(t, "K")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.SweepingColorKaraoke(r.value / 100), t) - }, e.prototype.parse_tag_kf = function(e) { - var t = new h(e); - if (null === this.read(t, "kf")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.SweepingColorKaraoke(r.value / 100), t) - }, e.prototype.parse_tag_ko = function(e) { - var t = new h(e); - if (null === this.read(t, "ko")) return e.pop(), null; - var r = this.parse_decimal(t); - return null === r ? (e.pop(), null) : (t.value = new i.OutlineKaraoke(r.value / 100), t) - }, e.prototype.parse_tag_move = function(e) { - var t = new h(e); - if (null === this.read(t, "move")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = this.parse_decimal(t); - if (null === r) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var n = this.parse_decimal(t); - if (null === n) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var o = this.parse_decimal(t); - if (null === o) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var a = this.parse_decimal(t); - if (null === a) return e.pop(), null; - var l = null, - s = null; - if (null !== this.read(t, ",")) { - if (l = this.parse_decimal(t), null === l) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - if (s = this.parse_decimal(t), null === s) return e.pop(), null - } - return null === this.read(t, ")") ? (e.pop(), null) : (t.value = new i.Move(r.value, n.value, o.value, a.value, null !== l ? l.value / 1e3 : null, null !== s ? s.value / 1e3 : null), t) - }, e.prototype.parse_tag_org = function(e) { - var t = new h(e); - if (null === this.read(t, "org")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = this.parse_decimal(t); - if (null === r) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var n = this.parse_decimal(t); - return null === n ? (e.pop(), null) : null === this.read(t, ")") ? (e.pop(), null) : (t.value = new i.RotationOrigin(r.value, n.value), t) - }, e.prototype.parse_tag_p = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_pbo = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_pos = function(e) { - var t = new h(e); - if (null === this.read(t, "pos")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = this.parse_decimal(t); - if (null === r) return e.pop(), null; - if (null === this.read(t, ",")) return e.pop(), null; - var n = this.parse_decimal(t); - return null === n ? (e.pop(), null) : null === this.read(t, ")") ? (e.pop(), null) : (t.value = new i.Position(r.value, n.value), t) - }, e.prototype.parse_tag_q = function(e) { - var t = new h(e); - if (null === this.read(t, "q")) return e.pop(), null; - var r = this.i(); - if ("0" > r || r > "3") return e.pop(), null; - var n = new h(t, r); - return t.value = new i.WrappingStyle(parseInt(n.value)), t - }, e.prototype.parse_tag_r = function(e) { - var t = new h(e); - if (null === this.read(t, "r")) return e.pop(), null; - for (var r = new h(t, ""), n = this.i(); this.n() && "\\" !== n && "}" !== n; n = this.i()) r.value += n; - return r.value.length > 0 ? t.value = new i.Reset(r.value) : t.value = new i.Reset(null), t - }, e.prototype.parse_tag_s = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_shad = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_t = function(e) { - var t = new h(e); - if (null === this.read(t, "t")) return e.pop(), null; - if (null === this.read(t, "(")) return e.pop(), null; - var r = null, - n = null, - o = null, - a = this.parse_decimal(t); - if (null !== a) { - if (null === this.read(t, ",")) return e.pop(), null; - var l = this.parse_decimal(t); - if (null !== l) { - if (r = a, n = l, null === this.read(t, ",")) return e.pop(), null; - var s = this.parse_decimal(t); - if (null !== s && (o = s, null === this.read(t, ","))) return e.pop(), null - } else if (o = a, null === this.read(t, ",")) return e.pop(), null - } - for (var u = [], p = this.i(); this.n() && ")" !== p && "}" !== p; p = this.i()) { - var c = null; - if (null !== this.read(t, "\\") && (c = this.parse_tag_alpha(t) || this.parse_tag_iclip(t) || this.parse_tag_xbord(t) || this.parse_tag_ybord(t) || this.parse_tag_xshad(t) || this.parse_tag_yshad(t) || this.parse_tag_blur(t) || this.parse_tag_bord(t) || this.parse_tag_clip(t) || this.parse_tag_fscx(t) || this.parse_tag_fscy(t) || this.parse_tag_shad(t) || this.parse_tag_fax(t) || this.parse_tag_fay(t) || this.parse_tag_frx(t) || this.parse_tag_fry(t) || this.parse_tag_frz(t) || this.parse_tag_fsp(t) || this.parse_tag_fsplus(t) || this.parse_tag_fsminus(t) || this.parse_tag_be(t) || this.parse_tag_fr(t) || this.parse_tag_fs(t) || this.parse_tag_1a(t) || this.parse_tag_1c(t) || this.parse_tag_2a(t) || this.parse_tag_2c(t) || this.parse_tag_3a(t) || this.parse_tag_3c(t) || this.parse_tag_4a(t) || this.parse_tag_4c(t) || this.parse_tag_c(t), null === c && t.pop()), null === c && (c = this.parse_comment(t)), null === c) return e.pop(), null; - c.value instanceof i.Comment && u[u.length - 1] instanceof i.Comment ? u[u.length - 1] = new i.Comment(u[u.length - 1].value + c.value.value) : u.push(c.value) - } - return this.read(t, ")"), t.value = new i.Transform(null !== r ? r.value / 1e3 : null, null !== n ? n.value / 1e3 : null, null !== o ? o.value / 1e3 : null, u), t - }, e.prototype.parse_tag_u = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_xbord = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_xshad = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_ybord = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_yshad = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_1a = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_1c = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_2a = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_2c = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_3a = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_3c = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_4a = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_tag_4c = function() { - throw new Error("Method not implemented.") - }, e.prototype.parse_drawingInstructions = function(e) { - var t = new h(e), - r = null, - n = []; - for (t.value = []; this.n();) { - for (; null !== this.read(t, " ");); - if (!this.n()) break; - if (null !== r) { - var o = this.parse_decimal(t); - if (null !== o) { - n.push(o), "m" === r && 2 === n.length ? (t.value.push(new i.drawing.MoveInstruction(n[0].value, n[1].value)), n.splice(0, n.length)) : "l" === r && 2 === n.length ? (t.value.push(new i.drawing.LineInstruction(n[0].value, n[1].value)), n.splice(0, n.length)) : "b" === r && 6 === n.length && (t.value.push(new i.drawing.CubicBezierCurveInstruction(n[0].value, n[1].value, n[2].value, n[3].value, n[4].value, n[5].value)), n.splice(0, n.length)); - continue - } - } - var a = this.parse_text(t); - if (null === a) break; - var l = a.value.value; - switch (l) { - case "m": - case "l": - case "b": - r = l, n.splice(0, n.length) - } - } - for (; null !== this.read(t, " ");); - return t - }, e.prototype.parse_decimalInt32 = function(e) { - for (var t = new h(e), r = null !== this.read(t, "-"), n = new h(t, ""), i = this.i(); this.n() && i >= "0" && "9" >= i; i = this.i()) n.value += i; - if (0 === n.value.length) return e.pop(), null; - var o = parseInt(n.value); - return o >= 4294967295 ? o = 4294967295 : r && (o = -o), t.value = o, t - }, e.prototype.parse_hexInt32 = function(e) { - for (var t = new h(e), r = null !== this.read(t, "-"), n = new h(t, ""), i = this.i(); this.n() && (i >= "0" && "9" >= i || i >= "a" && "f" >= i || i >= "A" && "F" >= i); i = this.i()) n.value += i; - if (0 === n.value.length) return e.pop(), null; - var o = parseInt(n.value, 16); - return o >= 4294967295 ? o = 4294967295 : r && (o = -o), t.value = o, t - }, e.prototype.parse_decimalOrHexInt32 = function(e) { - var t = new h(e), - r = null !== this.read(t, "&H") || null !== this.read(t, "&h") ? this.parse_hexInt32(t) : this.parse_decimalInt32(t); - return null === r ? (e.pop(), null) : (t.value = r.value, t) - }, e.prototype.parse_decimal = function(e) { - var t = new h(e), - r = null !== this.read(t, "-"), - n = this.parse_unsignedDecimal(t); - return null === n ? (e.pop(), null) : (t.value = n.value, r && (t.value = -t.value), t) - }, e.prototype.parse_unsignedDecimal = function(e) { - for (var t = new h(e), r = new h(t, ""), n = null, i = this.i(); this.n() && i >= "0" && "9" >= i; i = this.i()) r.value += i; - if (0 === r.value.length) return e.pop(), null; - if (null !== this.read(t, ".")) { - n = new h(t, ""); - for (var i = this.i(); this.n() && i >= "0" && "9" >= i; i = this.i()) n.value += i; - if (0 === n.value.length) return e.pop(), null - } - return t.value = parseFloat(r.value + (null !== n ? "." + n.value : "")), t - }, e.prototype.parse_enableDisable = function(e) { - var t = this.i(); - if ("0" === t || "1" === t) { - var r = new h(e, t); - return r.value = "1" === r.value, r - } - return null - }, e.prototype.parse_color = function(e) { - for (var t = new h(e); null !== this.read(t, "&") || null !== this.read(t, "H");); - var r = this.parse_hexInt32(t); - if (null === r) return e.pop(), null; - var n = r.value; - for (t.value = new i.Color(255 & n, n >> 8 & 255, n >> 16 & 255); null !== this.read(t, "&") || null !== this.read(t, "H");); - return t - }, e.prototype.parse_alpha = function(e) { - for (var t = new h(e); null !== this.read(t, "&") || null !== this.read(t, "H");); - var r = this.parse_hexInt32(t); - if (null === r) return e.pop(), null; - var n = r.value; - for (t.value = 1 - (255 & n) / 255; null !== this.read(t, "&") || null !== this.read(t, "H");); - return t - }, e.prototype.parse_colorWithAlpha = function(e) { - var t = new h(e), - r = this.parse_decimalOrHexInt32(t); - if (null === r) return e.pop(), null; - var n = r.value; - return t.value = new i.Color(255 & n, n >> 8 & 255, n >> 16 & 255, 1 - (n >> 24 & 255) / 255), t - }, e.prototype.read = function(e, t) { - return this.i(t.length) !== t ? null : new h(e, t) - }, e.prototype.i = function(e) { - return void 0 === e && (e = 1), 1 === e ? this.e[this.t.end] : this.e.substr(this.t.end, e) - }, e.prototype.n = function() { - return this.t.end < this.e.length - }, e.prototype.o = function(e, t) { - var n = new h(t); - if (null === this.read(n, e)) return t.pop(), null; - if (null === this.read(n, "(")) return t.pop(), null; - var o = null, - a = null, - l = null, - s = null, - u = null, - p = null, - c = this.parse_decimal(n); - if (null !== c) { - if (null === this.read(n, ",")) return t.pop(), null; - var f = this.parse_decimal(n); - null !== f ? (o = c, l = f) : u = c - } - if (null !== o && null !== l) { - if (null === this.read(n, ",")) return t.pop(), null; - if (a = this.parse_decimal(n), null === this.read(n, ",")) return t.pop(), null; - s = this.parse_decimal(n), n.value = new i.RectangularClip(o.value, l.value, a.value, s.value, "clip" === e) - } else { - p = new h(n, ""); - for (var d = this.i(); this.n() && ")" !== d && "}" !== d; d = this.i()) p.value += d; - n.value = new i.VectorClip(null !== u ? u.value : 1, r(p.value, "drawingInstructions"), "clip" === e) - } - return null === this.read(n, ")") ? (t.pop(), null) : n - }, e - }(); - n("alpha", i.Alpha, s.prototype.parse_alpha, !1), n("be", i.Blur, s.prototype.parse_decimal, !1), n("blur", i.GaussianBlur, s.prototype.parse_decimal, !1), n("bord", i.Border, s.prototype.parse_decimal, !1), n("c", i.PrimaryColor, s.prototype.parse_color, !1), n("fax", i.SkewX, s.prototype.parse_decimal, !1), n("fay", i.SkewY, s.prototype.parse_decimal, !1), n("fr", i.RotateZ, s.prototype.parse_decimal, !1), n("frx", i.RotateX, s.prototype.parse_decimal, !1), n("fry", i.RotateY, s.prototype.parse_decimal, !1), n("frz", i.RotateZ, s.prototype.parse_decimal, !1), n("fs", i.FontSize, s.prototype.parse_decimal, !1), n("fsp", i.LetterSpacing, s.prototype.parse_decimal, !1), n("i", i.Italic, s.prototype.parse_enableDisable, !1), n("p", i.DrawingMode, s.prototype.parse_decimal, !0), n("pbo", i.DrawingBaselineOffset, s.prototype.parse_decimal, !0), n("s", i.StrikeThrough, s.prototype.parse_enableDisable, !1), n("shad", i.Shadow, s.prototype.parse_decimal, !1), n("u", i.Underline, s.prototype.parse_enableDisable, !1), n("xbord", i.BorderX, s.prototype.parse_decimal, !1), n("xshad", i.ShadowX, s.prototype.parse_decimal, !1), n("ybord", i.BorderY, s.prototype.parse_decimal, !1), n("yshad", i.ShadowY, s.prototype.parse_decimal, !1), n("1a", i.PrimaryAlpha, s.prototype.parse_alpha, !1), n("1c", i.PrimaryColor, s.prototype.parse_color, !1), n("2a", i.SecondaryAlpha, s.prototype.parse_alpha, !1), n("2c", i.SecondaryColor, s.prototype.parse_color, !1), n("3a", i.OutlineAlpha, s.prototype.parse_alpha, !1), n("3c", i.OutlineColor, s.prototype.parse_color, !1), n("4a", i.ShadowAlpha, s.prototype.parse_alpha, !1), n("4c", i.ShadowColor, s.prototype.parse_color, !1); - for (var u = 0, p = Object.keys(s.prototype); u < p.length; u++) { - var c = p[u]; - 0 === c.indexOf("parse_") && "function" == typeof s.prototype[c] && l.set(c.substr("parse_".length), s.prototype[c]) - } - var h = function() { - function e(e, t) { - void 0 === t && (t = null), this.a = e, this.l = [], null !== e && e.children.push(this), this.s = null !== e ? e.end : 0, this.u = this.s, this.value = t - } - return Object.defineProperty(e.prototype, "start", { - get: function() { - return this.s - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "end", { - get: function() { - return this.u - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "parent", { - get: function() { - return this.a - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "children", { - get: function() { - return this.l - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - set: function(e) { - this.p = e, null !== this.p && this.p.constructor === String && 0 === this.l.length && this.c(this.s + this.p.length) - }, - enumerable: !0, - configurable: !0 - }), e.prototype.pop = function() { - this.l.splice(this.l.length - 1, 1), this.l.length > 0 ? this.c(this.l[this.l.length - 1].end) : this.c(this.start) - }, e.prototype.c = function(e) { - this.u = e, null !== this.a && this.a.end !== this.u && this.a.c(this.u) - }, e - }(), - f = t(32), - d = t(36), - _ = t(38); - _.registerWorkerCommand(d.WorkerCommands.Parse, function(e) { - return new f.Promise(function(t) { - t(r(e.input, e.rule)) - }) - }) - }, function(e, t) { - function r(e) { - for (var t = "", r = 0; r < e.length; r++) { - var n = e.charCodeAt(r) - 33; - if (0 > n || n > 63) throw new Error("Out-of-range character code " + n + " at index " + r + " in string " + e); - t += 26 > n ? String.fromCharCode("A".charCodeAt(0) + n) : 52 > n ? String.fromCharCode("a".charCodeAt(0) + n - 26) : 62 > n ? String.fromCharCode("0".charCodeAt(0) + n - 52) : 62 === n ? "+" : "/" - } - return t - } - var n, i = t(23), - o = t(24), - a = t(29), - l = t(26), - s = t(25), - u = t(30), - p = t(32), - c = t(2); - ! function(e) { - e[e.ScriptInfo = 0] = "ScriptInfo", e[e.Styles = 1] = "Styles", e[e.Events = 2] = "Events", e[e.Fonts = 3] = "Fonts", e[e.Graphics = 4] = "Graphics", e[e.Other = 5] = "Other", e[e.EOF = 6] = "EOF" - }(n || (n = {})); - var h = function() { - function e(e) { - var t = this; - this.h = e, this.f = new o.ASS, this.d = new p.DeferredPromise, this._ = new p.DeferredPromise, this.g = !0, this.v = n.ScriptInfo, this.y = null, this.h.nextLine().then(function(e) { - return t.m(e) - }, function(e) { - t.d.reject(e), t._.reject(e) - }) - } - return Object.defineProperty(e.prototype, "minimalASS", { - get: function() { - return this.d.promise - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "ass", { - get: function() { - return this._.promise - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "currentSection", { - get: function() { - return this.v - }, - set: function(e) { - if (null !== this.y && (this.f.addAttachment(this.y), this.y = null), this.v === n.ScriptInfo && e !== n.ScriptInfo && this.d.resolve(this.f), e === n.EOF) { - var t = this.f.properties; - void 0 === t.resolutionX || void 0 === t.resolutionY ? (this.d.reject("Malformed ASS script."), this._.reject("Malformed ASS script.")) : (this.d.resolve(this.f), this._.resolve(this.f)) - } - this.v = e - }, - enumerable: !0, - configurable: !0 - }), e.prototype.m = function(e) { - var t = this; - if (null === e) return void(this.currentSection = n.EOF); - if ("\r" === e[e.length - 1] && (e = e.substr(0, e.length - 1)), 65279 === e.charCodeAt(0) && this.g && (e = e.substr(1)), this.g = !1, "" === e); - else if (";" === e[0] && null === this.y); - else if ("[Script Info]" === e) this.currentSection = n.ScriptInfo; - else if ("[V4+ Styles]" === e || "[V4 Styles]" === e) this.currentSection = n.Styles; - else if ("[Events]" === e) this.currentSection = n.Events; - else if ("[Fonts]" === e) this.currentSection = n.Fonts; - else if ("[Graphics]" === e) this.currentSection = n.Graphics; - else switch (null === this.y && "[" === e[0] && "]" === e[e.length - 1] && (this.currentSection = n.Other), this.currentSection) { - case n.ScriptInfo: - var o = c.parseLineIntoProperty(e); - if (null !== o) switch (o.name) { - case "PlayResX": - this.f.properties.resolutionX = parseInt(o.value); - break; - case "PlayResY": - this.f.properties.resolutionY = parseInt(o.value); - break; - case "WrapStyle": - this.f.properties.wrappingStyle = parseInt(o.value); - break; - case "ScaledBorderAndShadow": - this.f.properties.scaleBorderAndShadow = "yes" === o.value - } - break; - case n.Styles: - if (null === this.f.stylesFormatSpecifier) { - var a = c.parseLineIntoProperty(e); - null !== a && "Format" === a.name && (this.f.stylesFormatSpecifier = a.value.split(",").map(function(e) { - return e.trim() - })) - } else try { - this.f.addStyle(e) - } catch (t) { - i.debugMode && console.error("Could not parse style from line " + e + " - " + (t.stack || t)) - } - break; - case n.Events: - if (null === this.f.dialoguesFormatSpecifier) { - var l = c.parseLineIntoProperty(e); - null !== l && "Format" === l.name && (this.f.dialoguesFormatSpecifier = l.value.split(",").map(function(e) { - return e.trim() - })) - } else try { - this.f.addEvent(e) - } catch (t) { - i.debugMode && console.error("Could not parse event from line " + e + " - " + (t.stack || t)) - } - break; - case n.Fonts: - case n.Graphics: - var u = this.currentSection === n.Fonts ? /^fontname:(.+)/ : /^filename:(.+)/, - p = u.exec(e); - if (null !== p) null !== this.y && (this.f.addAttachment(this.y), this.y = null), this.y = new s.Attachment(p[1].trim(), this.currentSection === n.Fonts ? s.AttachmentType.Font : s.AttachmentType.Graphic); - else if (null !== this.y) try { - this.y.contents += r(e) - } catch (e) { - i.debugMode && console.error("Encountered error while reading font " + this.y.filename + ": %o", e), this.y = null - } - break; - case n.Other: - break; - default: - throw new Error("Unhandled state " + this.currentSection) - } - this.h.nextLine().then(function(e) { - return t.m(e) - }, function(e) { - t.d.reject(e), t._.reject(e) - }) - }, e - }(); - e.StreamParser = h; - var f = function() { - function e(e) { - var t = this; - this.h = e, this.f = new o.ASS, this._ = new p.DeferredPromise, this.g = !0, this.b = null, this.w = null, this.S = null, this.O = null, this.h.nextLine().then(function(e) { - return t.m(e) - }, function(e) { - t._.reject(e) - }), this.f.properties.resolutionX = 1280, this.f.properties.resolutionY = 720, this.f.properties.wrappingStyle = 1, this.f.properties.scaleBorderAndShadow = !0; - var r = new a.Style(new u.Map([ - ["Name", "Default"], - ["FontSize", "36"] - ])); - this.f.styles.set(r.name, r) - } - return Object.defineProperty(e.prototype, "ass", { - get: function() { - return this._.promise - }, - enumerable: !0, - configurable: !0 - }), e.prototype.m = function(e) { - var t = this; - if (null === e) return null !== this.b && null !== this.w && null !== this.S && null !== this.O && this.f.dialogues.push(new l.Dialogue(new u.Map([ - ["Style", "Default"], - ["Start", this.w], - ["End", this.S], - ["Text", this.O] - ]), this.f)), void this._.resolve(this.f); - if ("\r" === e[e.length - 1] && (e = e.substr(0, e.length - 1)), 65279 === e.charCodeAt(0) && this.g && (e = e.substr(1)), this.g = !1, "" === e) null !== this.b && null !== this.w && null !== this.S && null !== this.O && this.f.dialogues.push(new l.Dialogue(new u.Map([ - ["Style", "Default"], - ["Start", this.w], - ["End", this.S], - ["Text", this.O] - ]), this.f)), this.b = this.w = this.S = this.O = null; - else if (null === this.b) /^\d+$/.test(e) && (this.b = e); - else if (null === this.w && null === this.S) { - var r = /^(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)/.exec(e); - null !== r && (this.w = r[1].replace(",", "."), this.S = r[2].replace(",", ".")) - } else e = e.replace(//g, "{\\b1}").replace(/\{b\}/g, "{\\b1}").replace(/<\/b>/g, "{\\b0}").replace(/\{\/b\}/g, "{\\b0}").replace(//g, "{\\i1}").replace(/\{i\}/g, "{\\i1}").replace(/<\/i>/g, "{\\i0}").replace(/\{\/i\}/g, "{\\i0}").replace(//g, "{\\u1}").replace(/\{u\}/g, "{\\u1}").replace(/<\/u>/g, "{\\u0}").replace(/\{\/u\}/g, "{\\u0}").replace(//g, function(e, t, r, n) { - return "{c&H" + n + r + t + "&}" - }).replace(/<\/font>/g, "{\\c}"), null !== this.O ? this.O += "\\N" + e : this.O = e; - this.h.nextLine().then(function(e) { - return t.m(e) - }, function(e) { - t._.reject(e) - }) - }, e - }(); - e.SrtStreamParser = f - }, function(t, r) { - var n = r(32), - i = function() { - function e(e) { - this.P = e, this.C = 0 - } - return e.prototype.nextLine = function() { - var e = null; - if (this.C < this.P.length) { - var t = this.P.indexOf("\n", this.C); - 1 !== t ? (e = n.Promise.resolve(this.P.substring(this.C, t)), this.C = t + 1) : (e = n.Promise.resolve(this.P.substr(this.C)), this.C = this.P.length) - } else e = n.Promise.resolve(null); - return e - }, e - }(); - t.StringStream = i; - var o = function() { - function e(e) { - var t = this; - this.k = e, this.C = 0, this.x = null, this.j = null, e.addEventListener("progress", function() { - return t.A() - }, !1), e.addEventListener("load", function() { - return t.T() - }, !1), e.addEventListener("error", function(e) { - return t.D(e) - }, !1) - } - return e.prototype.nextLine = function() { - if (null !== this.x) throw new Error("XhrStream only supports one pending unfulfilled read at a time."); - var e = this.x = new n.DeferredPromise; - return this.F(), e.promise - }, e.prototype.A = function() { - null !== this.x && this.k.readyState !== XMLHttpRequest.DONE && this.F() - }, e.prototype.T = function() { - null !== this.x && this.F() - }, e.prototype.D = function(e) { - this.j = e, null !== this.x && this.F() - }, e.prototype.F = function() { - if (null !== this.j) return void this.x.reject(this.j); - var e = this.k.responseText, - t = e.indexOf("\n", this.C); - 1 !== t ? (this.x.resolve(e.substring(this.C, t)), this.C = t + 1, this.x = null) : this.k.readyState === XMLHttpRequest.DONE && (null !== this.j ? this.x.reject(this.j) : this.C < e.length ? (this.x.resolve(e.substr(this.C)), this.C = e.length) : this.x.resolve(null), this.x = null) - }, e - }(); - t.XhrStream = o; - var a = function() { - function t(t, r) { - this.M = "", this.x = null, this.R = t.getReader(), this.N = new e.TextDecoder(r, { - ignoreBOM: !0 - }) - } - return t.prototype.nextLine = function() { - if (null !== this.x) throw new Error("BrowserReadableStream only supports one pending unfulfilled read at a time."); - var e = this.x = new n.DeferredPromise; - return this.F(), e.promise - }, t.prototype.F = function() { - var e = this, - t = this.M.indexOf("\n"); - 1 !== t ? (this.x.resolve(this.M.substr(0, t)), this.M = this.M.substr(t + 1), this.x = null) : this.R.read().then(function(t) { - var r = t.value, - n = t.done; - n ? (0 === e.M.length ? e.x.resolve(null) : (e.x.resolve(e.M), e.M = ""), e.x = null) : (e.M += e.N.decode(r, { - stream: !0 - }), e.F()) - }) - }, t - }(); - t.BrowserReadableStream = a - }, function(e, t) { - function r(e) { - for (var t = atob(e.contents), r = new Uint8Array(new ArrayBuffer(t.length)), n = 0; n < t.length; n++) r[n] = t.charCodeAt(n); - for (var i = { - dataView: new DataView(r.buffer), - position: 0 - }, o = p.read(i), a = null, n = 0; n < o.numTables; n++) { - var l = c.read(i); - if (l.c1 + l.c2 + l.c3 + l.c4 === "name") { - a = l; - break - } - } - i.position = a.offset; - for (var u = h.read(i), d = new s.Set, n = 0; n < u.count; n++) { - var _ = f.read(i); - switch (_.nameId) { - case 1: - case 4: - case 6: - var g = a.offset + u.stringOffset + _.offset, - v = r.subarray(g, g + _.length); - switch (_.platformId) { - case 1: - for (var y = "", m = 0; m < v.length; m++) y += String.fromCharCode(v[m]); - d.add(y); - break; - case 3: - for (var b = "", m = 0; m < v.length; m += 2) b += String.fromCharCode((v[m] << 8) + v[m + 1]); - d.add(b) - } - } - } - return d - } - - function n(e) { - var t = e.W; - return e.read = function(r) { - for (var n = new e, i = 0; i < t.length; i++) { - var a = t[i], - l = void 0; - switch (a.type) { - case o.Char: - l = String.fromCharCode(r.dataView.getInt8(r.position)), r.position += 1; - break; - case o.Uint16: - l = r.dataView.getUint16(r.position), r.position += 2; - break; - case o.Uint32: - l = r.dataView.getUint32(r.position), r.position += 4 - } - n[a.field] = l - } - return n - }, e - } - - function i(e) { - var t = u.get(e); - return void 0 === t && (t = function(t, r) { - var n = t.constructor; - void 0 === n.W && (n.W = []), n.W.push({ - type: e, - field: r - }) - }, u.set(e, t)), t - } - var o, a = t(34).L, - l = t(30), - s = t(33); - ! function(e) { - e[e.Char = 0] = "Char", e[e.Uint16 = 1] = "Uint16", e[e.Uint32 = 2] = "Uint32" - }(o || (o = {})); - var u = new l.Map, - p = function() { - function e() {} - return a([i(o.Uint16)], e.prototype, "majorVersion", void 0), a([i(o.Uint16)], e.prototype, "minorVersion", void 0), a([i(o.Uint16)], e.prototype, "numTables", void 0), a([i(o.Uint16)], e.prototype, "searchRange", void 0), a([i(o.Uint16)], e.prototype, "entrySelector", void 0), a([i(o.Uint16)], e.prototype, "rangeShift", void 0), e = a([n], e) - }(), - c = function() { - function e() {} - return a([i(o.Char)], e.prototype, "c1", void 0), a([i(o.Char)], e.prototype, "c2", void 0), a([i(o.Char)], e.prototype, "c3", void 0), a([i(o.Char)], e.prototype, "c4", void 0), a([i(o.Uint32)], e.prototype, "checksum", void 0), a([i(o.Uint32)], e.prototype, "offset", void 0), a([i(o.Uint32)], e.prototype, "length", void 0), e = a([n], e) - }(), - h = function() { - function e() {} - return a([i(o.Uint16)], e.prototype, "formatSelector", void 0), a([i(o.Uint16)], e.prototype, "count", void 0), a([i(o.Uint16)], e.prototype, "stringOffset", void 0), e = a([n], e) - }(), - f = function() { - function e() {} - return a([i(o.Uint16)], e.prototype, "platformId", void 0), a([i(o.Uint16)], e.prototype, "encodingId", void 0), a([i(o.Uint16)], e.prototype, "languageId", void 0), a([i(o.Uint16)], e.prototype, "nameId", void 0), a([i(o.Uint16)], e.prototype, "length", void 0), a([i(o.Uint16)], e.prototype, "offset", void 0), e = a([n], e) - }(); - e.getTtfNames = r - }, function(e) { - var t = function() { - function e(e, t) { - this.I = e, this.X = t - } - return Object.defineProperty(e.prototype, "x", { - get: function() { - return this.I - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y", { - get: function() { - return this.X - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.MoveInstruction = t; - var r = function() { - function e(e, t) { - this.I = e, this.X = t - } - return Object.defineProperty(e.prototype, "x", { - get: function() { - return this.I - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y", { - get: function() { - return this.X - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.LineInstruction = r; - var n = function() { - function e(e, t, r, n, i, o) { - this.Y = e, this.V = t, this.B = r, this.z = n, this.G = i, this.q = o - } - return Object.defineProperty(e.prototype, "x1", { - get: function() { - return this.Y - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y1", { - get: function() { - return this.V - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "x2", { - get: function() { - return this.B - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y2", { - get: function() { - return this.z - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "x3", { - get: function() { - return this.G - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y3", { - get: function() { - return this.q - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.CubicBezierCurveInstruction = n - }, function(e, t) { - var r = t(7); - e.drawing = r; - var n = function() { - function e(e, t, r, n) { - void 0 === n && (n = 1), this.U = e, this.H = t, this.K = r, this.Z = n - } - return Object.defineProperty(e.prototype, "red", { - get: function() { - return this.U - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "green", { - get: function() { - return this.H - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "blue", { - get: function() { - return this.K - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "alpha", { - get: function() { - return this.Z - }, - enumerable: !0, - configurable: !0 - }), e.prototype.withAlpha = function(t) { - return null !== t ? new e(this.U, this.H, this.K, t) : this - }, e.prototype.toString = function() { - return "rgba(" + this.U + ", " + this.H + ", " + this.K + ", " + this.Z.toFixed(3) + ")" - }, e.prototype.interpolate = function(t, r) { - return new e(this.U + r * (t.red - this.U), this.H + r * (t.green - this.H), this.K + r * (t.blue - this.K), this.Z + r * (t.alpha - this.Z)) - }, e - }(); - e.Color = n; - var i = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Comment = i; - var o = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e.prototype.toString = function() { - return "Text { value: " + this.p.replace(/\u00A0/g, "\\h") + " }" - }, e - }(); - e.Text = o; - var a = function() { - function e() {} - return e - }(); - e.NewLine = a; - var l = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Italic = l; - var s = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Bold = s; - var u = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Underline = u; - var p = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.StrikeThrough = p; - var c = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Border = c; - var h = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.BorderX = h; - var f = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.BorderY = f; - var d = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Shadow = d; - var _ = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ShadowX = _; - var g = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ShadowY = g; - var v = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Blur = v; - var y = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.GaussianBlur = y; - var m = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontName = m; - var b = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontSize = b; - var w = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontSizePlus = w; - var S = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontSizeMinus = S; - var O = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontScaleX = O; - var P = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.FontScaleY = P; - var C = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.LetterSpacing = C; - var k = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.RotateX = k; - var E = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.RotateY = E; - var x = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.RotateZ = x; - var j = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.SkewX = j; - var A = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.SkewY = A; - var T = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.PrimaryColor = T; - var D = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.SecondaryColor = D; - var F = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.OutlineColor = F; - var M = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ShadowColor = M; - var R = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Alpha = R; - var N = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.PrimaryAlpha = N; - var W = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.SecondaryAlpha = W; - var L = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.OutlineAlpha = L; - var I = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ShadowAlpha = I; - var X = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Alignment = X; - var Y = function() { - function e(e) { - this.J = e - } - return Object.defineProperty(e.prototype, "duration", { - get: function() { - return this.J - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ColorKaraoke = Y; - var V = function() { - function e(e) { - this.J = e - } - return Object.defineProperty(e.prototype, "duration", { - get: function() { - return this.J - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.SweepingColorKaraoke = V; - var B = function() { - function e(e) { - this.J = e - } - return Object.defineProperty(e.prototype, "duration", { - get: function() { - return this.J - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.OutlineKaraoke = B; - var z = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.WrappingStyle = z; - var G = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Reset = G; - var q = function() { - function e(e, t) { - this.I = e, this.X = t - } - return Object.defineProperty(e.prototype, "x", { - get: function() { - return this.I - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y", { - get: function() { - return this.X - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Position = q; - var U = function() { - function e(e, t, r, n, i, o) { - this.Y = e, this.V = t, this.B = r, this.z = n, this.$ = i, this.Q = o - } - return Object.defineProperty(e.prototype, "x1", { - get: function() { - return this.Y - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y1", { - get: function() { - return this.V - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "x2", { - get: function() { - return this.B - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y2", { - get: function() { - return this.z - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t1", { - get: function() { - return this.$ - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t2", { - get: function() { - return this.Q - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Move = U; - var H = function() { - function e(e, t) { - this.I = e, this.X = t - } - return Object.defineProperty(e.prototype, "x", { - get: function() { - return this.I - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y", { - get: function() { - return this.X - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.RotationOrigin = H; - var K = function() { - function e(e, t) { - this.s = e, this.u = t - } - return Object.defineProperty(e.prototype, "start", { - get: function() { - return this.s - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "end", { - get: function() { - return this.u - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Fade = K; - var Z = function() { - function e(e, t, r, n, i, o, a) { - this.ee = e, this.te = t, this.re = r, this.$ = n, this.Q = i, this.ne = o, this.ie = a - } - return Object.defineProperty(e.prototype, "a1", { - get: function() { - return this.ee - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "a2", { - get: function() { - return this.te - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "a3", { - get: function() { - return this.re - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t1", { - get: function() { - return this.$ - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t2", { - get: function() { - return this.Q - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t3", { - get: function() { - return this.ne - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "t4", { - get: function() { - return this.ie - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ComplexFade = Z; - var J = function() { - function e(e, t, r, n) { - this.s = e, this.u = t, this.oe = r, this.ae = n - } - return Object.defineProperty(e.prototype, "start", { - get: function() { - return this.s - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "end", { - get: function() { - return this.u - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "accel", { - get: function() { - return this.oe - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "tags", { - get: function() { - return this.ae - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Transform = J; - var $ = function() { - function e(e, t, r, n, i) { - this.Y = e, this.V = t, this.B = r, this.z = n, this.le = i - } - return Object.defineProperty(e.prototype, "x1", { - get: function() { - return this.Y - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y1", { - get: function() { - return this.V - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "x2", { - get: function() { - return this.B - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "y2", { - get: function() { - return this.z - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "inside", { - get: function() { - return this.le - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.RectangularClip = $; - var Q = function() { - function e(e, t, r) { - this.se = e, this.ue = t, this.le = r - } - return Object.defineProperty(e.prototype, "scale", { - get: function() { - return this.se - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "instructions", { - get: function() { - return this.ue - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "inside", { - get: function() { - return this.le - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.VectorClip = Q; - var ee = function() { - function e(e) { - this.se = e - } - return Object.defineProperty(e.prototype, "scale", { - get: function() { - return this.se - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.DrawingMode = ee; - var te = function() { - function e(e) { - this.p = e - } - return Object.defineProperty(e.prototype, "value", { - get: function() { - return this.p - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.DrawingBaselineOffset = te; - var re = function() { - function e(e) { - this.ue = e - } - return Object.defineProperty(e.prototype, "instructions", { - get: function() { - return this.ue - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.DrawingInstructions = re; - for (var ne = function(e, t) { - if (!e.prototype.hasOwnProperty("toString")) { - var r = Object.getOwnPropertyNames(e.prototype).filter(function(e) { - return "constructor" !== e - }); - e.prototype.toString = function() { - var e = this; - return t + " { " + r.map(function(t) { - return t + ": " + e[t] - }).join(", ") + (r.length > 0 ? " " : "") + "}" - } - } - }, ie = t(38), oe = 0, ae = Object.keys(e); oe < ae.length; oe++) { - var le = ae[oe], - se = e[le]; - se instanceof Function && (ne(se, le), ie.registerClassPrototype(se.prototype)) - } - for (var ue = 0, pe = Object.keys(r); ue < pe.length; ue++) { - var le = pe[ue], - se = r[le]; - se instanceof Function && (ne(se, "Drawing" + le), ie.registerClassPrototype(se.prototype)) - } - }, function(e, t) { - var r = t(23), - n = t(11), - i = function() { - function e(e, t) { - this.pe = e, this.ce = t, this.he = new n.ManualClock, this.fe = null, this.de = null, this._e = null - } - return e.prototype.play = function() { - this.he.enabled && (this.ge(), this.he.play()) - }, e.prototype.pause = function() { - if (this.he.enabled) { - if (null === this.fe) return void(r.debugMode && console.warn("AutoClock.pause: Abnormal state detected. AutoClock._nextAnimationFrameRequestId should not have been null.")); - this.ve(), this.he.pause() - } - }, e.prototype.seeking = function() { - this.he.seek(this.pe()) - }, Object.defineProperty(e.prototype, "currentTime", { - get: function() { - return this.he.currentTime - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "enabled", { - get: function() { - return this.he.enabled - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "paused", { - get: function() { - return this.he.paused - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rate", { - get: function() { - return this.he.rate - }, - enumerable: !0, - configurable: !0 - }), e.prototype.setRate = function(e) { - this.he.setRate(e) - }, e.prototype.enable = function() { - return this.he.enable() ? (this.ge(), !0) : !1 - }, e.prototype.disable = function() { - return this.he.disable() ? (this.ve(), !0) : !1 - }, e.prototype.toggle = function() { - this.he.enabled ? this.disable() : this.enable() - }, e.prototype.setEnabled = function(e) { - return e ? this.enable() : this.disable() - }, e.prototype.addEventListener = function(e, t) { - this.he.addEventListener(e, t) - }, e.prototype.ye = function(e) { - var t = this; - if (!this.he.enabled) return void(r.debugMode && console.warn("AutoClock._onTimerTick: Called when disabled.")); - var n = this.he.currentTime, - i = this.pe(); - this.he.paused ? n !== i && (this.de = i, this._e = e, this.he.tick(i)) : null !== this.de && i === this.de ? e - this._e > this.ce ? (this._e = null, this.he.pause()) : this.he.tick((e - this._e) / 1e3 * this.he.rate + this.de) : (this.de = i, this._e = e, this.he.tick(i)), this.fe = requestAnimationFrame(function(e) { - return t.ye(e) - }) - }, e.prototype.ge = function() { - var e = this; - null === this.fe && (this.fe = requestAnimationFrame(function(t) { - return e.ye(t) - })) - }, e.prototype.ve = function() { - null !== this.fe && (cancelAnimationFrame(this.fe), this.fe = null) - }, e - }(); - e.AutoClock = i - }, function(e) { - var t = function() { - function e() {} - return e.prototype.addEventListener = function(e, t) { - var r = this.me.get(e); - void 0 === r && this.me.set(e, r = []), r.push(t) - }, e.prototype.be = function(e, t) { - var r = this.me.get(e); - if (void 0 !== r) - for (var n = 0; n < r.length; n++) { - var i = r[n]; - i.apply(this, t) - } - }, e - }(); - e.EventSource = t, - function(e) { - e[e.Play = 0] = "Play", e[e.Tick = 1] = "Tick", e[e.Pause = 2] = "Pause", e[e.Stop = 3] = "Stop", e[e.RateChange = 4] = "RateChange" - }(e.ClockEvent || (e.ClockEvent = {})) - }, function(e, t) { - var r = t(31), - n = t(30), - i = t(10), - o = function() { - function e() { - this.we = -1, this.Se = 1, this.Oe = !0, this.Pe = !0, this.me = new n.Map - } - return e.prototype.play = function() { - this.Oe && this.Pe && (this.Pe = !1, this.be(i.ClockEvent.Play, [])) - }, e.prototype.tick = function(e) { - this.Oe && this.we !== e && (this.play(), this.we = e, this.be(i.ClockEvent.Tick, [])) - }, e.prototype.seek = function(e) { - this.Oe && (this.pause(), this.we !== e && (this.stop(), this.tick(e), this.pause())) - }, e.prototype.pause = function() { - this.Oe && (this.Pe || (this.Pe = !0, this.be(i.ClockEvent.Pause, []))) - }, e.prototype.stop = function() { - this.be(i.ClockEvent.Stop, []) - }, Object.defineProperty(e.prototype, "currentTime", { - get: function() { - return this.we - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "enabled", { - get: function() { - return this.Oe - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "paused", { - get: function() { - return this.Pe - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rate", { - get: function() { - return this.Se - }, - enumerable: !0, - configurable: !0 - }), e.prototype.setRate = function(e) { - this.Se !== e && (this.Se = e, this.be(i.ClockEvent.RateChange, [])) - }, e.prototype.enable = function() { - return this.Oe ? !1 : (this.Oe = !0, !0) - }, e.prototype.disable = function() { - return this.Oe ? (this.pause(), this.stop(), this.Oe = !1, !0) : !1 - }, e.prototype.toggle = function() { - this.Oe ? this.disable() : this.enable() - }, e.prototype.setEnabled = function(e) { - return e ? this.enable() : this.disable() - }, e - }(); - e.ManualClock = o, r.mixin(o, [i.EventSource]) - }, function(e, t) { - var r = t(9), - n = function() { - function e(e) { - var t = this; - this.Ce = new r.AutoClock(function() { - return e.currentTime - }, 100), e.addEventListener("playing", function() { - return t.Ce.play() - }, !1), e.addEventListener("pause", function() { - return t.Ce.pause() - }, !1), e.addEventListener("seeking", function() { - return t.Ce.seeking() - }, !1), e.addEventListener("ratechange", function() { - return t.Ce.setRate(e.playbackRate) - }, !1) - } - return Object.defineProperty(e.prototype, "currentTime", { - get: function() { - return this.Ce.currentTime - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "enabled", { - get: function() { - return this.Ce.enabled - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "paused", { - get: function() { - return this.Ce.paused - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rate", { - get: function() { - return this.Ce.rate - }, - enumerable: !0, - configurable: !0 - }), e.prototype.enable = function() { - return this.Ce.enable() - }, e.prototype.disable = function() { - return this.Ce.disable() - }, e.prototype.toggle = function() { - this.Ce.enabled ? this.disable() : this.enable() - }, e.prototype.setEnabled = function(e) { - return e ? this.enable() : this.disable() - }, e.prototype.addEventListener = function(e, t) { - this.Ce.addEventListener(e, t) - }, e - }(); - e.VideoClock = n - }, function(e, t) { - var r = t(34).ke, - n = t(12), - i = t(21), - o = function(e) { - function t(t, r, i) { - e.call(this, r, new n.VideoClock(t), document.createElement("div"), i), this.Ee = t, this.Ee.parentElement.replaceChild(this.libjassSubsWrapper, this.Ee), this.libjassSubsWrapper.insertBefore(this.Ee, this.libjassSubsWrapper.firstElementChild) - } - return r(t, e), t.prototype.resize = function() { - var t = this.Ee.videoWidth, - r = this.Ee.videoHeight, - n = this.Ee.offsetWidth, - i = this.Ee.offsetHeight, - o = Math.min(n / t, i / r), - a = t * o, - l = r * o, - s = (n - a) / 2, - u = (i - l) / 2; - e.prototype.resize.call(this, a, l, s, u) - }, t.prototype.resizeVideo = function() { - console.warn("`DefaultRenderer.resizeVideo(width, height)` has been deprecated. Use `DefaultRenderer.resize()` instead."), this.resize() - }, t.prototype.xe = function() { - this.resize(), e.prototype.xe.call(this) - }, t - }(i.WebRenderer); - e.DefaultRenderer = o - }, function(e, t) { - var r = t(10); - e.ClockEvent = r.ClockEvent, e.EventSource = r.EventSource; - var n = t(9); - e.AutoClock = n.AutoClock; - var i = t(11); - e.ManualClock = i.ManualClock; - var o = t(12); - e.VideoClock = o.VideoClock; - var a = t(13); - e.DefaultRenderer = a.DefaultRenderer; - var l = t(15); - e.NullRenderer = l.NullRenderer; - var s = t(21); - e.WebRenderer = s.WebRenderer; - var u = t(16); - e.RendererSettings = u.RendererSettings - }, function(e, t) { - var r = t(10), - n = t(16), - i = t(23), - o = function() { - function e(t, i, o) { - var a = this; - this.f = t, this.je = i, this.Ae = ++e.Te, this.De = n.RendererSettings.from(o), this.je.addEventListener(r.ClockEvent.Play, function() { - return a.Fe() - }), this.je.addEventListener(r.ClockEvent.Tick, function() { - return a.Me() - }), this.je.addEventListener(r.ClockEvent.Pause, function() { - return a.Re() - }), this.je.addEventListener(r.ClockEvent.Stop, function() { - return a.Ne() - }), this.je.addEventListener(r.ClockEvent.RateChange, function() { - return a.We() - }) - } - return Object.defineProperty(e.prototype, "id", { - get: function() { - return this.Ae - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "ass", { - get: function() { - return this.f - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "clock", { - get: function() { - return this.je - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "settings", { - get: function() { - return this.De - }, - enumerable: !0, - configurable: !0 - }), e.prototype.preRender = function() {}, e.prototype.draw = function() {}, e.prototype.enable = function() { - return this.je.enable() - }, e.prototype.disable = function() { - return this.je.disable() - }, e.prototype.toggle = function() { - this.je.toggle() - }, e.prototype.setEnabled = function(e) { - return this.je.setEnabled(e) - }, Object.defineProperty(e.prototype, "enabled", { - get: function() { - return this.je.enabled - }, - enumerable: !0, - configurable: !0 - }), e.prototype.Fe = function() { - i.verboseMode && console.log("NullRenderer._onClockPlay") - }, e.prototype.Me = function() { - var e = this.je.currentTime; - i.verboseMode && console.log("NullRenderer._onClockTick: currentTime = " + e); - for (var t = 0, r = this.f.dialogues; t < r.length; t++) { - var n = r[t]; - n.end > e && (n.start <= e ? this.draw(n) : n.start <= e + this.De.preRenderTime && this.preRender(n)) - } - }, e.prototype.Re = function() { - i.verboseMode && console.log("NullRenderer._onClockPause") - }, e.prototype.Ne = function() { - i.verboseMode && console.log("NullRenderer._onClockStop") - }, e.prototype.We = function() { - i.verboseMode && console.log("NullRenderer._onClockRateChange") - }, e.Te = -1, e - }(); - e.NullRenderer = o - }, function(e, t) { - function r(e) { - return e.type === CSSRule.FONT_FACE_RULE - } - var n = t(30), - i = function() { - function e() {} - return e.makeFontMapFromStyleElement = function(e) { - for (var t = new n.Map, i = e.sheet, o = 0; o < i.cssRules.length; o++) { - var a = i.cssRules[o]; - if (r(a)) { - var l = a.style.getPropertyValue("font-family").match(/^["']?(.*?)["']?$/)[1], - s = a.style.getPropertyValue("src"); - s || (s = a.cssText.split("\n").map(function(e) { - return e.match(/src:\s*([^;]+?)\s*;/) - }).filter(function(e) { - return null !== e - }).map(function(e) { - return e[1] - })[0]), t.set(l, s) - } - } - return t - }, e.from = function(t) { - (void 0 === t || null === t) && (t = {}); - var r = t, - n = r.fontMap, - i = void 0 === n ? null : n, - o = r.preRenderTime, - a = void 0 === o ? 5 : o, - l = r.preciseOutlines, - s = void 0 === l ? !1 : l, - u = r.enableSvg, - p = void 0 === u ? !0 : u, - c = r.fallbackFonts, - h = void 0 === c ? 'Arial, Helvetica, sans-serif, "Segoe UI Symbol"' : c, - f = r.useAttachedFonts, - d = void 0 === f ? !1 : f, - _ = new e; - return _.fontMap = i, _.preRenderTime = a, _.preciseOutlines = s, _.enableSvg = p, _.fallbackFonts = h, _.useAttachedFonts = d, _ - }, e - }(); - e.RendererSettings = i - }, function(e, t) { - var r = t(30), - n = function() { - function e(t, n) { - this.Le = n, this.Ie = "", this.Xe = new r.Map, this.Ye = 0, this.Ae = t.id + "-" + e.Ve++, this.Se = t.clock.rate - } - return Object.defineProperty(e.prototype, "animationStyle", { - get: function() { - return this.Ie - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "animationDelays", { - get: function() { - return this.Xe - }, - enumerable: !0, - configurable: !0 - }), e.prototype.add = function(e, t) { - for (var r = null, n = null, i = 0; i < t.length; i++) { - var o = t[i]; - null === r && (r = o.time), n = o.time - } - for (var a = "", l = 0; l < t.length; l++) { - var o = t[l]; - a += " " + (100 * (n - r === 0 ? 1 : (o.time - r) / (n - r))).toFixed(3) + "% {\n", o.properties.forEach(function(e, t) { - a += " " + t + ": " + e + ";\n" - }), a += " }\n" - } - var s = "animation-" + this.Ae + "-" + this.Ye++; - this.Le.appendChild(document.createTextNode("@-webkit-keyframes " + s + " {\n" + a + "\n}")), this.Le.appendChild(document.createTextNode("@keyframes " + s + " {\n" + a + "\n}")), "" !== this.Ie && (this.Ie += ","), this.Ie += s + " " + ((n - r) / this.Se).toFixed(3) + "s " + e, this.Xe.set(s, r) - }, e.Ve = 0, e - }(); - e.AnimationCollection = n - }, function(e, t) { - var r = t(8), - n = function() { - function e(e, t) { - this.Be = e, this.ze = t, this.se = 1, this.Ge = 0 - } - return Object.defineProperty(e.prototype, "scale", { - set: function(e) { - this.se = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "baselineOffset", { - set: function(e) { - this.Ge = e - }, - enumerable: !0, - configurable: !0 - }), e.prototype.toSVG = function(e, t) { - for (var n = Math.pow(2, this.se - 1), i = this.Be / n, o = this.ze / n, a = document.createElementNS("http://www.w3.org/2000/svg", "path"), l = 0, s = 0, u = 0, p = e.instructions; u < p.length; u++) { - var c = p[u]; - c instanceof r.drawing.MoveInstruction ? (a.pathSegList.appendItem(a.createSVGPathSegMovetoAbs(c.x, c.y + this.Ge)), l = Math.max(l, c.x), s = Math.max(s, c.y + this.Ge)) : c instanceof r.drawing.LineInstruction ? (a.pathSegList.appendItem(a.createSVGPathSegLinetoAbs(c.x, c.y + this.Ge)), l = Math.max(l, c.x), s = Math.max(s, c.y + this.Ge)) : c instanceof r.drawing.CubicBezierCurveInstruction && (a.pathSegList.appendItem(a.createSVGPathSegCurvetoCubicAbs(c.x3, c.y3 + this.Ge, c.x1, c.y1 + this.Ge, c.x2, c.y2 + this.Ge)), l = Math.max(l, c.x1, c.x2, c.x3), s = Math.max(s, c.y1 + this.Ge, c.y2 + this.Ge, c.y3 + this.Ge)) - } - var h = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - h.setAttribute("version", "1.1"), h.width.baseVal.valueAsString = (l * i).toFixed(3) + "px", h.height.baseVal.valueAsString = (s * o).toFixed(3) + "px"; - var f = document.createElementNS("http://www.w3.org/2000/svg", "g"); - return h.appendChild(f), f.setAttribute("transform", "scale(" + i.toFixed(3) + " " + o.toFixed(3) + ")"), f.appendChild(a), a.setAttribute("fill", t.toString()), h - }, e - }(); - e.DrawingStyles = n - }, function(e, t) { - function r(e, t, r, n) { - var i = '"' + e + '"'; - "" !== r && (i += ", " + r), n.style.fontFamily = i, n.style.fontSize = t + "px" - } - - function n(e, t, n, i) { - return r(e, t, n, i), new u.Promise(function(e) { - return setTimeout(function() { - return e(i.offsetHeight) - }, 1e3) - }) - } - - function i(e, t, n, i) { - return r(e, t, n, i), i.offsetHeight - } - - function o(e, t) { - return [e, 180 / (t - e)] - } - - function a(e, t, r) { - return n(e, 180, t, r).then(function(i) { - return n(e, 360, t, r).then(function(e) { - return o(i, e) - }) - }) - } - - function l(e, t, r) { - return 180 + (e - t) * r - } - - function s(e, t, r, n, a) { - var s = a.get(e); - if (void 0 === s) { - var u = i(e, 180, r, n), - p = i(e, 360, r, n); - a.set(e, s = o(u, p)) - } - var c = s[0], - h = s[1]; - return l(t, c, h) - } - var u = t(32); - e.calculateFontMetrics = a, e.fontSizeForLineHeight = s - }, function(e) { - var t = function() { - function e(e, t) { - this.qe = e, this.Ue = t - } - return Object.defineProperty(e.prototype, "time", { - get: function() { - return this.qe - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "properties", { - get: function() { - return this.Ue - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Keyframe = t - }, function(t, r) { - var n = r(34).ke, - i = r(17), - o = r(18), - a = r(19), - l = r(20), - s = r(22), - u = r(10), - p = r(15), - c = r(6), - h = r(8), - f = r(23), - d = r(25), - _ = r(27), - g = r(31), - v = r(30), - y = r(32), - m = /^(url|local)\(["']?(.+?)["']?\)$/, - b = function(t) { - function r(r, n, i, o) { - var a = this; - t.call(this, r, n, function() { - if (!(i instanceof HTMLDivElement)) { - var e = o; - o = i, i = e, console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.") - } - return o - }()), this.He = i, this.Ke = [], this.Ze = [], this.Je = new v.Map, this.$e = new v.Map, this.Qe = new v.Map, this.me = new v.Map, this.He.classList.add("libjass-wrapper"), this.et = document.createElement("div"), this.He.appendChild(this.et), this.et.className = "libjass-subs", this.tt = document.createElement("div"), this.He.appendChild(this.tt), this.tt.className = "libjass-font-measure", this.tt.appendChild(document.createTextNode("M")), f.debugMode && console.log("Preloading fonts..."); - var l = [], - s = new v.Map, - u = null === this.settings.fontMap ? new v.Map : this.settings.fontMap, - p = new v.Map; - this.settings.useAttachedFonts && r.attachments.forEach(function(e) { - if (e.type === d.AttachmentType.Font) { - var t = null; - try { - t = c.getTtfNames(e) - } catch (e) { - return void console.error(e) - } - var r = "data:application/x-font-ttf;base64," + e.contents; - t.forEach(function(e) { - var t = u.get(e); - if (void 0 !== t) - if ("string" != typeof t) t.push(r); - else { - var n = p.get(e); - void 0 === n && p.set(e, n = []), n.push(r) - } - else u.set(e, [r]) - }) - } - }), u.forEach(function(t, r) { - var n; - if (e.document.fonts && e.document.fonts.add) { - var i = "string" == typeof t ? t : t.map(function(e) { - return null !== e.match(m) ? e : 'url("' + e + '")' - }).join(", "), - o = p.get(r); - if (void 0 !== o) - for (var u = 0; u < o.length; u++) { - var c = o[u]; - i += ', url("' + c + '")' - } - var h = []; - e.document.fonts.forEach(function(e) { - (e.family === r || e.family === '"' + r + '"') && h.push(e) - }); - var d; - if (0 === h.length) { - var _ = new FontFace(r, i), - g = new FontFace('"' + r + '"', i); - e.document.fonts.add(_), e.document.fonts.add(g), d = y.any([_.load(), g.load()]) - } else d = y.any(h.map(function(e) { - return e.load() - })); - n = a.rt(r, d.catch(function(e) { - return console.warn("Fetching fonts for " + r + " at " + i + " failed: %o", e), null - })) - } else { - var v = ("string" == typeof t ? t.split(/,/) : t).map(function(e) { - return e.trim() - }).map(function(e) { - var t = e.match(m); - return null === t ? e : "local" === t[1] ? null : t[2]; - }).filter(function(e) { - return null !== e - }), - o = p.get(r); - void 0 !== o && (v = v.concat(o)); - var b = v.map(function(e) { - var t = s.get(e); - return void 0 === t && (t = new y.Promise(function(t, r) { - var n = new XMLHttpRequest; - n.addEventListener("load", function() { - f.debugMode && console.log("Preloaded " + e + "."), t(null) - }), n.addEventListener("error", function(e) { - r(e) - }), n.open("GET", e, !0), n.send() - }), s.set(e, t)), t - }), - w = 0 === b.length ? y.Promise.resolve(null) : y.first(b).catch(function(e) { - return console.warn("Fetching fonts for " + r + " at " + v.join(", ") + " failed: %o", e), null - }); - n = a.rt(r, w) - } - l.push(n.then(function(e) { - return a.Je.set(r, e) - })) - }), y.Promise.all(l).then(function() { - f.debugMode && console.log("All fonts have been preloaded."), a.xe() - }) - } - return n(r, t), Object.defineProperty(r.prototype, "libjassSubsWrapper", { - get: function() { - return this.He - }, - enumerable: !0, - configurable: !0 - }), r.prototype.resize = function(e, t, r, n) { - void 0 === r && (r = 0), void 0 === n && (n = 0), this.nt(), this.et.style.width = e.toFixed(3) + "px", this.et.style.height = t.toFixed(3) + "px", this.et.style.left = r.toFixed(3) + "px", this.et.style.top = n.toFixed(3) + "px", this.it = e, this.ot = e / this.ass.properties.resolutionX, this.at = t / this.ass.properties.resolutionY, this.Qe.clear(), -1 !== this.clock.currentTime && this.Me() - }, r.prototype.preRender = function(e) { - var t = this, - n = this.Qe.get(e.id); - if (n) return n; - var a = this.clock.currentTime - e.start; - if (e.containsTransformTag && 0 > a) return null; - var u = document.createElement("div"); - u.style.marginLeft = (this.ot * e.style.marginLeft).toFixed(3) + "px", u.style.marginRight = (this.ot * e.style.marginRight).toFixed(3) + "px", u.style.marginTop = u.style.marginBottom = (this.at * e.style.marginVertical).toFixed(3) + "px", u.style.minWidth = (this.it - this.ot * (e.style.marginLeft + e.style.marginRight)).toFixed(3) + "px"; - var p = document.createElement("style"); - p.id = "libjass-animation-styles-" + this.id + "-" + e.id, p.type = "text/css"; - var c = new i.AnimationCollection(this, p), - d = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - d.setAttribute("version", "1.1"), d.setAttribute("class", "libjass-filters"), d.width.baseVal.valueAsString = "0", d.height.baseVal.valueAsString = "0"; - var g = document.createElementNS("http://www.w3.org/2000/svg", "defs"); - d.appendChild(g); - var y = null, - m = new s.SpanStyles(this, e, this.ot, this.at, this.settings, this.tt, g, this.Je), - b = null, - w = !1, - S = function(e) { - null !== y && y.hasChildNodes() && u.appendChild(m.setStylesOnSpan(y, b)), null !== b && b.animationDelays.forEach(function(e, t) { - return c.animationDelays.set(t, e) - }), e && (w ? u.appendChild(m.makeNewLine()) : u.appendChild(document.createElement("br"))), y = document.createElement("span"), b = new i.AnimationCollection(t, p), w = e - }; - S(!1); - for (var O = new o.DrawingStyles(this.ot, this.at), P = this.ass.properties.wrappingStyle, C = 0, k = 0, E = e.parts; k < E.length; k++) { - var x = E[k]; - if (x instanceof h.Italic) m.italic = x.value; - else if (x instanceof h.Bold) m.bold = x.value; - else if (x instanceof h.Underline) m.underline = x.value; - else if (x instanceof h.StrikeThrough) m.strikeThrough = x.value; - else if (x instanceof h.Border) m.outlineWidth = x.value, m.outlineHeight = x.value; - else if (x instanceof h.BorderX) m.outlineWidth = x.value; - else if (x instanceof h.BorderY) m.outlineHeight = x.value; - else if (x instanceof h.Shadow) m.shadowDepthX = x.value, m.shadowDepthY = x.value; - else if (x instanceof h.ShadowX) m.shadowDepthX = x.value; - else if (x instanceof h.ShadowY) m.shadowDepthY = x.value; - else if (x instanceof h.Blur) m.blur = x.value; - else if (x instanceof h.GaussianBlur) m.gaussianBlur = x.value; - else if (x instanceof h.FontName) m.fontName = x.value; - else if (x instanceof h.FontSize) m.fontSize = x.value; - else if (x instanceof h.FontSizePlus) m.fontSize += x.value; - else if (x instanceof h.FontSizeMinus) m.fontSize -= x.value; - else if (x instanceof h.FontScaleX) m.fontScaleX = x.value; - else if (x instanceof h.FontScaleY) m.fontScaleY = x.value; - else if (x instanceof h.LetterSpacing) m.letterSpacing = x.value; - else if (x instanceof h.RotateX) m.rotationX = x.value; - else if (x instanceof h.RotateY) m.rotationY = x.value; - else if (x instanceof h.RotateZ) m.rotationZ = x.value; - else if (x instanceof h.SkewX) m.skewX = x.value; - else if (x instanceof h.SkewY) m.skewY = x.value; - else if (x instanceof h.PrimaryColor) m.primaryColor = x.value; - else if (x instanceof h.SecondaryColor) m.secondaryColor = x.value; - else if (x instanceof h.OutlineColor) m.outlineColor = x.value; - else if (x instanceof h.ShadowColor) m.shadowColor = x.value; - else if (x instanceof h.Alpha) m.primaryAlpha = x.value, m.secondaryAlpha = x.value, m.outlineAlpha = x.value, m.shadowAlpha = x.value; - else if (x instanceof h.PrimaryAlpha) m.primaryAlpha = x.value; - else if (x instanceof h.SecondaryAlpha) m.secondaryAlpha = x.value; - else if (x instanceof h.OutlineAlpha) m.outlineAlpha = x.value; - else if (x instanceof h.ShadowAlpha) m.shadowAlpha = x.value; - else if (x instanceof h.Alignment); - else if (x instanceof h.ColorKaraoke) S(!1), b.add("step-end", [new l.Keyframe(0, new v.Map([ - ["color", m.secondaryColor.withAlpha(m.secondaryAlpha).toString()] - ])), new l.Keyframe(C, new v.Map([ - ["color", m.primaryColor.withAlpha(m.primaryAlpha).toString()] - ]))]), C += x.duration; - else if (x instanceof h.WrappingStyle) P = x.value; - else if (x instanceof h.Reset) m.reset(this.ass.styles.get(x.value)); - else if (x instanceof h.Position) u.style.position = "absolute", u.style.left = (this.ot * x.x).toFixed(3) + "px", u.style.top = (this.at * x.y).toFixed(3) + "px"; - else if (x instanceof h.Move) u.style.position = "absolute", c.add("linear", [new l.Keyframe(0, new v.Map([ - ["left", (this.ot * x.x1).toFixed(3) + "px"], - ["top", (this.at * x.y1).toFixed(3) + "px"] - ])), new l.Keyframe(x.t1, new v.Map([ - ["left", (this.ot * x.x1).toFixed(3) + "px"], - ["top", (this.at * x.y1).toFixed(3) + "px"] - ])), new l.Keyframe(x.t2, new v.Map([ - ["left", (this.ot * x.x2).toFixed(3) + "px"], - ["top", (this.at * x.y2).toFixed(3) + "px"] - ])), new l.Keyframe(e.end - e.start, new v.Map([ - ["left", (this.ot * x.x2).toFixed(3) + "px"], - ["top", (this.at * x.y2).toFixed(3) + "px"] - ]))]); - else if (x instanceof h.Fade) c.add("linear", [new l.Keyframe(0, new v.Map([ - ["opacity", "0"] - ])), new l.Keyframe(x.start, new v.Map([ - ["opacity", "1"] - ])), new l.Keyframe(e.end - e.start - x.end, new v.Map([ - ["opacity", "1"] - ])), new l.Keyframe(e.end - e.start, new v.Map([ - ["opacity", "0"] - ]))]); - else if (x instanceof h.ComplexFade) c.add("linear", [new l.Keyframe(0, new v.Map([ - ["opacity", x.a1.toFixed(3)] - ])), new l.Keyframe(x.t1, new v.Map([ - ["opacity", x.a1.toFixed(3)] - ])), new l.Keyframe(x.t2, new v.Map([ - ["opacity", x.a2.toFixed(3)] - ])), new l.Keyframe(x.t3, new v.Map([ - ["opacity", x.a2.toFixed(3)] - ])), new l.Keyframe(x.t4, new v.Map([ - ["opacity", x.a3.toFixed(3)] - ])), new l.Keyframe(e.end - e.start, new v.Map([ - ["opacity", x.a3.toFixed(3)] - ]))]); - else if (x instanceof h.Transform) - for (var j = a <= x.start ? 0 : a >= x.end ? 1 : Math.pow((a - x.start) / (x.end - x.start), x.accel), A = 0, T = x.tags; A < T.length; A++) { - var D = T[A]; - D instanceof h.Border ? (m.outlineWidth += j * (D.value - m.outlineWidth), m.outlineHeight += j * (D.value - m.outlineHeight)) : D instanceof h.BorderX ? m.outlineWidth += j * (D.value - m.outlineWidth) : D instanceof h.BorderY ? m.outlineHeight += j * (D.value - m.outlineHeight) : D instanceof h.Shadow ? (m.shadowDepthX += j * (D.value - m.shadowDepthX), m.shadowDepthY += j * (D.value - m.shadowDepthY)) : D instanceof h.ShadowX ? m.shadowDepthX += j * (D.value - m.shadowDepthX) : D instanceof h.ShadowY ? m.shadowDepthY += j * (D.value - m.shadowDepthY) : D instanceof h.Blur ? m.blur += j * (D.value - m.blur) : D instanceof h.GaussianBlur ? m.gaussianBlur += j * (D.value - m.gaussianBlur) : D instanceof h.FontSize ? m.fontSize += j * (D.value - m.fontSize) : D instanceof h.FontSizePlus ? m.fontSize += j * D.value : D instanceof h.FontSizeMinus ? m.fontSize -= j * D.value : D instanceof h.FontScaleX ? m.fontScaleX += j * (D.value - m.fontScaleX) : D instanceof h.FontScaleY ? m.fontScaleY += j * (D.value - m.fontScaleY) : D instanceof h.LetterSpacing ? m.letterSpacing += j * (D.value - m.letterSpacing) : D instanceof h.RotateX ? m.rotationX += j * (D.value - m.rotationX) : D instanceof h.RotateY ? m.rotationY += j * (D.value - m.rotationY) : D instanceof h.RotateZ ? m.rotationZ += j * (D.value - m.rotationZ) : D instanceof h.SkewX ? m.skewX += j * (D.value - m.skewX) : D instanceof h.SkewY ? m.skewY += j * (D.value - m.skewY) : D instanceof h.PrimaryColor ? m.primaryColor = m.primaryColor.interpolate(D.value, j) : D instanceof h.SecondaryColor ? m.secondaryColor = m.secondaryColor.interpolate(D.value, j) : D instanceof h.OutlineColor ? m.outlineColor = m.outlineColor.interpolate(D.value, j) : D instanceof h.ShadowColor ? m.shadowColor = m.shadowColor.interpolate(D.value, j) : D instanceof h.Alpha ? (m.primaryAlpha += j * (D.value - m.primaryAlpha), m.secondaryAlpha += j * (D.value - m.secondaryAlpha), m.outlineAlpha += j * (D.value - m.outlineAlpha), m.shadowAlpha += j * (D.value - m.shadowAlpha)) : D instanceof h.PrimaryAlpha ? m.primaryAlpha += j * (D.value - m.primaryAlpha) : D instanceof h.SecondaryAlpha ? m.secondaryAlpha += j * (D.value - m.secondaryAlpha) : D instanceof h.OutlineAlpha ? m.outlineAlpha += j * (D.value - m.outlineAlpha) : D instanceof h.ShadowAlpha && (m.shadowAlpha += j * (D.value - m.shadowAlpha)) - } else x instanceof h.DrawingMode ? 0 !== x.scale && (O.scale = x.scale) : x instanceof h.DrawingBaselineOffset ? O.baselineOffset = x.value : x instanceof h.DrawingInstructions ? (y.appendChild(O.toSVG(x, m.primaryColor.withAlpha(m.primaryAlpha))), S(!1)) : x instanceof h.Text ? (y.appendChild(document.createTextNode(x.value + "‌")), S(!1)) : f.debugMode && x instanceof h.Comment ? (y.appendChild(document.createTextNode(x.value)), S(!1)) : x instanceof h.NewLine && S(!0) - } - for (var F = 0, M = e.parts; F < M.length; F++) { - var x = M[F]; - if (x instanceof h.Position || x instanceof h.Move) { - var R = r.lt[e.alignment], - N = "translate(" + -R[0] + "%, " + -R[1] + "%) translate(-" + u.style.marginLeft + ", -" + u.style.marginTop + ")", - W = R[0] + "% " + R[1] + "%"; - u.style.webkitTransform = N, u.style.webkitTransformOrigin = W, u.style.transform = N, u.style.transformOrigin = W; - break - } - } - switch (P) { - case _.WrappingStyle.EndOfLineWrapping: - u.style.whiteSpace = "pre-wrap"; - break; - case _.WrappingStyle.NoLineWrapping: - u.style.whiteSpace = "pre"; - break; - case _.WrappingStyle.SmartWrappingWithWiderTopLine: - case _.WrappingStyle.SmartWrappingWithWiderBottomLine: - u.style.whiteSpace = "pre-wrap" - } - if ("" !== u.style.position) switch (e.alignment) { - case 1: - case 4: - case 7: - u.style.textAlign = "left"; - break; - case 2: - case 5: - case 8: - u.style.textAlign = "center"; - break; - case 3: - case 6: - case 9: - u.style.textAlign = "right" - } - u.style.webkitAnimation = c.animationStyle, u.style.animation = c.animationStyle, u.setAttribute("data-dialogue-id", this.id + "-" + e.id), "" !== p.textContent && u.appendChild(p), g.hasChildNodes() && u.appendChild(d); - var L = { - sub: u, - animationDelays: c.animationDelays - }; - return e.containsTransformTag || this.Qe.set(e.id, L), L - }, r.prototype.draw = function(e) { - var t = this; - if (!this.$e.has(e) || e.containsTransformTag) { - f.debugMode && console.log(e.toString()); - var r = this.Qe.get(e.id); - void 0 === r && (r = this.preRender(e), f.debugMode && console.log(e.toString())); - var n = r.sub.cloneNode(!0), - i = function(n) { - var i = n.style.animationName || n.style.webkitAnimationName; - if (void 0 !== i && "" !== i) { - var o = i.split(",").map(function(n) { - n = n.trim(); - var i = r.animationDelays.get(n); - return ((i + e.start - t.clock.currentTime) / t.clock.rate).toFixed(3) + "s" - }).join(", "); - n.style.webkitAnimationDelay = o, n.style.animationDelay = o - } - }; - i(n); - for (var o = n.querySelectorAll('[style*="animation:"]'), a = 0; a < o.length; a++) i(o[a]); - var l = e.layer, - s = "absolute" === n.style.position ? 0 : e.alignment; - if (void 0 === this.Ke[l]) { - var u = document.createElement("div"); - u.className = "layer layer" + l; - for (var p = null, c = l + 1; c < this.Ke.length && null === p; c++) void 0 !== this.Ke[c] && (p = this.Ke[c]); - this.et.insertBefore(u, p), this.Ke[l] = u, this.Ze[l] = [] - } - if (void 0 === this.Ze[l][s]) { - var h = document.createElement("div"); - h.className = "an an" + s; - for (var u = this.Ke[l], p = null, d = s + 1; d < this.Ze[l].length && null === p; d++) void 0 !== this.Ze[l][d] && (p = this.Ze[l][d]); - u.insertBefore(h, p), this.Ze[l][s] = h - } - this.Ze[l][s].appendChild(n); - var _ = n.getElementsByTagName("style")[0]; - if (void 0 !== _) { - var g = _.sheet; - 0 === g.cssRules.length && (g.cssText = _.textContent) - } - this.$e.set(e, n) - } - }, r.prototype.Fe = function() { - t.prototype.Fe.call(this), this.nt(), this.et.style.display = "", this.et.classList.remove("paused") - }, r.prototype.Me = function() { - var e = this, - r = this.clock.currentTime; - this.$e.forEach(function(t, n) { - (n.start > r || n.end < r || n.containsTransformTag) && (e.$e.delete(n), e.st(t)) - }), t.prototype.Me.call(this) - }, r.prototype.Re = function() { - t.prototype.Re.call(this), this.et.classList.add("paused") - }, r.prototype.Ne = function() { - t.prototype.Ne.call(this), this.et.style.display = "none" - }, r.prototype.We = function() { - t.prototype.We.call(this), this.Qe.clear() - }, r.prototype.xe = function() { - this.be("ready", []) - }, r.prototype.rt = function(e, t) { - var r = this; - return t.then(function() { - var t = r.tt.cloneNode(!0); - return r.He.appendChild(t), y.lastly(a.calculateFontMetrics(e, r.settings.fallbackFonts, t), function() { - r.He.removeChild(t) - }) - }) - }, r.prototype.st = function(e) { - e.parentNode.removeChild(e) - }, r.prototype.nt = function() { - var e = this; - this.$e.forEach(function(t) { - return e.st(t) - }), this.$e.clear() - }, r.lt = [null, [0, 100], - [50, 100], - [100, 100], - [0, 50], - [50, 50], - [100, 50], - [0, 0], - [50, 0], - [100, 0] - ], r - }(p.NullRenderer); - t.WebRenderer = b, g.mixin(b, [u.EventSource]) - }, function(e, t) { - var r = t(19), - n = function() { - function e(e, t, r, n, i, o, a, l) { - this.ot = r, this.at = n, this.De = i, this.tt = o, this.ut = a, this.Je = l, this.pt = 0, this.Ae = e.id + "-" + t.id, this.ct = t.style, this.reset(null) - } - return e.prototype.reset = function(e) { - (void 0 === e || null === e) && (e = this.ct), this.italic = e.italic, this.bold = e.bold, this.underline = e.underline, this.strikeThrough = e.strikeThrough, this.outlineWidth = e.outlineThickness, this.outlineHeight = e.outlineThickness, this.shadowDepthX = e.shadowDepth, this.shadowDepthY = e.shadowDepth, this.fontName = e.fontName, this.fontSize = e.fontSize, this.fontScaleX = e.fontScaleX, this.fontScaleY = e.fontScaleY, this.letterSpacing = e.letterSpacing, this.ht = null, this.ft = null, this.dt = e.rotationZ, this._t = null, this.gt = null, this.primaryColor = e.primaryColor, this.secondaryColor = e.secondaryColor, this.outlineColor = e.outlineColor, this.shadowColor = e.shadowColor, this.primaryAlpha = e.primaryColor.alpha, this.secondaryAlpha = e.secondaryColor.alpha, this.outlineAlpha = e.outlineColor.alpha, this.shadowAlpha = e.shadowColor.alpha, this.blur = null, this.gaussianBlur = null - }, e.prototype.setStylesOnSpan = function(t, n) { - var i = t.childNodes[0] instanceof Text, - o = ""; - this.vt && (o += "italic "), this.yt === !0 ? o += "bold " : this.yt !== !1 && (o += this.yt + " "); - var a = (this.at * r.fontSizeForLineHeight(this.mt, this.bt * (i ? this.wt : 1), this.De.fallbackFonts, this.tt, this.Je)).toFixed(3), - l = (this.at * this.bt).toFixed(3), - s = this.mt; - switch (s) { - case "cursive": - case "fantasy": - case "monospace": - case "sans-serif": - case "serif": - break; - default: - s = '"' + s + '"' - } - "" !== this.De.fallbackFonts && (s += ", " + this.De.fallbackFonts), t.style.font = "" + o + a + "px/" + l + "px " + s; - var u = ""; - this.St && (u = "underline"), this.Ot && (u += " line-through"), t.style.textDecoration = u.trim(); - var p = ""; - if (i ? this.Pt !== this.wt && (p += "scaleY(" + (this.Pt / this.wt).toFixed(3) + ") ") : (1 !== this.wt && (p += "scaleX(" + this.wt + ") "), 1 !== this.Pt && (p += "scaleY(" + this.Pt + ") ")), null !== this.ft && (p += "rotateY(" + this.ft + "deg) "), null !== this.ht && (p += "rotateX(" + this.ht + "deg) "), 0 !== this.dt && (p += "rotateZ(" + -1 * this.dt + "deg) "), null !== this._t || null !== this.gt) { - var c = e.Ct(this._t, 0), - h = e.Ct(this.gt, 0); - p += "matrix(1, " + h + ", " + c + ", 1, 0, 0) " - } - "" !== p && (t.style.webkitTransform = p, t.style.webkitTransformOrigin = "50% 50%", t.style.transform = p, t.style.transformOrigin = "50% 50%", t.style.display = "inline-block"), t.style.letterSpacing = (this.ot * this.kt).toFixed(3) + "px"; - var f = this.ot * this.Et, - d = this.at * this.xt, - _ = document.createElement("span"); - _.appendChild(t); - var g = this.jt.withAlpha(this.At), - v = this.Tt.withAlpha(this.Dt), - y = this.Ft.withAlpha(this.Mt); - if (this.De.enableSvg || (0 !== f || 0 !== d) && v.alpha !== g.alpha || (0 !== this.Rt || 0 !== this.Nt) && y.alpha !== g.alpha || (g = this.jt.withAlpha(1), v = this.Tt.withAlpha(1), y = this.Ft.withAlpha(1), t.style.opacity = this.At.toFixed(3)), t.style.color = g.toString(), this.De.enableSvg ? this.Wt(_, f, d, v, this.At) : this.Lt(t, f, d, v), 0 !== this.Rt || 0 !== this.Nt) { - var m = y.toString() + " " + (this.Rt * this.ot).toFixed(3) + "px " + (this.Nt * this.at).toFixed(3) + "px 0px"; - "" === t.style.textShadow ? t.style.textShadow = m : t.style.textShadow += ", " + m - } - return (0 !== this.ht || 0 !== this.ft) && (_.style.display = "inline-block"), t.style.webkitAnimation = n.animationStyle, t.style.animation = n.animationStyle, _ - }, e.prototype.Wt = function(e, t, r, n, i) { - var o = "svg-filter-" + this.Ae + "-" + this.pt++, - a = document.createElementNS("http://www.w3.org/2000/svg", "filter"); - if (a.id = o, a.x.baseVal.valueAsString = "-50%", a.width.baseVal.valueAsString = "200%", a.y.baseVal.valueAsString = "-50%", a.height.baseVal.valueAsString = "200%", t > 0 || r > 0) { - var l = 0, - s = !this.De.preciseOutlines && this.It > 0 ? this.It : 1; - ! function(e) { - if (r >= t) - if (t > 0) { - var n; - for (n = 0; t >= n; n += s) e(n, r / t * Math.sqrt(t * t - n * n)); - n !== t + s && e(t, 0) - } else e(0, r); - else if (r > 0) { - var i; - for (i = 0; r >= i; i += s) e(t / r * Math.sqrt(r * r - i * i), i); - i !== r + s && e(0, r) - } else e(t, 0) - }(function(e, t) { - var r = document.createElementNS("http://www.w3.org/2000/svg", "feMorphology"); - a.appendChild(r), r.in1.baseVal = "source", r.operator.baseVal = SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE, r.radiusX.baseVal = e, r.radiusY.baseVal = t, r.result.baseVal = "outline" + l, l++ - }); - var u = document.createElementNS("http://www.w3.org/2000/svg", "feComponentTransfer"); - a.insertBefore(u, a.firstElementChild), u.in1.baseVal = "SourceAlpha", u.result.baseVal = "source"; - var p = document.createElementNS("http://www.w3.org/2000/svg", "feFuncA"); - u.appendChild(p), p.type.baseVal = SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR, p.slope.baseVal = 0 === i ? 1 : 1 / i, p.intercept.baseVal = 0; - var c = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"); - a.appendChild(c); - for (var h = 0; l > h; h++) { - var f = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); - c.appendChild(f), f.in1.baseVal = "outline" + h - } - var d = document.createElementNS("http://www.w3.org/2000/svg", "feComponentTransfer"); - a.appendChild(d), d.setAttribute("color-interpolation-filters", "sRGB"); - var _ = document.createElementNS("http://www.w3.org/2000/svg", "feFuncR"); - d.appendChild(_), _.type.baseVal = SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR, _.slope.baseVal = 0, _.intercept.baseVal = n.red / 255 * n.alpha; - var g = document.createElementNS("http://www.w3.org/2000/svg", "feFuncG"); - d.appendChild(g), g.type.baseVal = SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR, g.slope.baseVal = 0, g.intercept.baseVal = n.green / 255 * n.alpha; - var v = document.createElementNS("http://www.w3.org/2000/svg", "feFuncB"); - d.appendChild(v), v.type.baseVal = SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR, v.slope.baseVal = 0, v.intercept.baseVal = n.blue / 255 * n.alpha; - var y = document.createElementNS("http://www.w3.org/2000/svg", "feFuncA"); - if (d.appendChild(y), y.type.baseVal = SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR, y.slope.baseVal = n.alpha, y.intercept.baseVal = 0, this.It > 0) { - var m = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); - a.appendChild(m), m.stdDeviationX.baseVal = this.It, m.stdDeviationY.baseVal = this.It - } - for (var h = 0; h < this.Xt; h++) { - var b = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix"); - a.appendChild(b), b.setAttribute("kernelMatrix", "1 2 1 2 4 2 1 2 1"), b.edgeMode.baseVal = SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE - } - var w = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); - a.appendChild(w), w.in2.baseVal = "source", w.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT; - var S = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"); - a.appendChild(S); - var O = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); - S.appendChild(O); - var P = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); - S.appendChild(P), P.in1.baseVal = "SourceGraphic" - } else { - if (this.It > 0) { - var m = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); - a.appendChild(m), m.stdDeviationX.baseVal = this.It, m.stdDeviationY.baseVal = this.It - } - for (var h = 0; h < this.Xt; h++) { - var b = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix"); - a.appendChild(b), b.setAttribute("kernelMatrix", "1 2 1 2 4 2 1 2 1"), b.edgeMode.baseVal = SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE - } - } - a.childElementCount > 0 && (this.ut.appendChild(a), e.style.webkitFilter = 'url("#' + o + '")', e.style.filter = 'url("#' + o + '")') - }, e.prototype.Lt = function(e, t, r, n) { - var i = this; - if (t > 0 || r > 0) { - var o = ""; - ! function(e) { - for (var n = 0; t >= n; n++) - for (var i = 0 === t ? r : r * Math.sqrt(1 - n * n / (t * t)), o = 0; i >= o; o++) e(n, o), 0 !== n && e(-n, o), 0 !== o && e(n, -o), 0 !== n && 0 !== o && e(-n, -o) - }(function(e, t) { - o += ", " + n.toString() + " " + e + "px " + t + "px " + i.It.toFixed(3) + "px" - }), e.style.textShadow = o.substr(", ".length) - } - }, e.prototype.makeNewLine = function() { - var e = document.createElement("br"); - return e.style.lineHeight = (this.at * this.bt).toFixed(3) + "px", e - }, Object.defineProperty(e.prototype, "italic", { - set: function(t) { - this.vt = e.Ct(t, this.ct.italic) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "bold", { - set: function(t) { - this.yt = e.Ct(t, this.ct.bold) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "underline", { - set: function(t) { - this.St = e.Ct(t, this.ct.underline) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "strikeThrough", { - set: function(t) { - this.Ot = e.Ct(t, this.ct.strikeThrough) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineWidth", { - get: function() { - return this.Et - }, - set: function(t) { - this.Et = e.Ct(t, this.ct.outlineThickness) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineHeight", { - get: function() { - return this.Et - }, - set: function(t) { - this.xt = e.Ct(t, this.ct.outlineThickness) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowDepthX", { - get: function() { - return this.Rt - }, - set: function(t) { - this.Rt = e.Ct(t, this.ct.shadowDepth) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowDepthY", { - get: function() { - return this.Nt - }, - set: function(t) { - this.Nt = e.Ct(t, this.ct.shadowDepth) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "blur", { - get: function() { - return this.Xt - }, - set: function(t) { - this.Xt = e.Ct(t, 0) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "gaussianBlur", { - get: function() { - return this.It - }, - set: function(t) { - this.It = e.Ct(t, 0) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontName", { - set: function(t) { - this.mt = e.Ct(t, this.ct.fontName) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontSize", { - get: function() { - return this.bt - }, - set: function(t) { - this.bt = e.Ct(t, this.ct.fontSize) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontScaleX", { - get: function() { - return this.wt - }, - set: function(t) { - this.wt = e.Ct(t, this.ct.fontScaleX) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontScaleY", { - get: function() { - return this.Pt - }, - set: function(t) { - this.Pt = e.Ct(t, this.ct.fontScaleY) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "letterSpacing", { - get: function() { - return this.kt - }, - set: function(t) { - this.kt = e.Ct(t, this.ct.letterSpacing) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rotationX", { - get: function() { - return this.ht - }, - set: function(e) { - this.ht = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rotationY", { - get: function() { - return this.ft - }, - set: function(e) { - this.ft = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rotationZ", { - get: function() { - return this.dt - }, - set: function(t) { - this.dt = e.Ct(t, this.ct.rotationZ) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "skewX", { - get: function() { - return this._t - }, - set: function(e) { - this._t = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "skewY", { - get: function() { - return this.gt - }, - set: function(e) { - this.gt = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "primaryColor", { - get: function() { - return this.jt - }, - set: function(t) { - this.jt = e.Ct(t, this.ct.primaryColor) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "secondaryColor", { - get: function() { - return this.Yt - }, - set: function(t) { - this.Yt = e.Ct(t, this.ct.secondaryColor) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineColor", { - get: function() { - return this.Tt - }, - set: function(t) { - this.Tt = e.Ct(t, this.ct.outlineColor) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowColor", { - get: function() { - return this.Ft - }, - set: function(t) { - this.Ft = e.Ct(t, this.ct.shadowColor) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "primaryAlpha", { - get: function() { - return this.At - }, - set: function(t) { - this.At = e.Ct(t, this.ct.primaryColor.alpha) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "secondaryAlpha", { - get: function() { - return this.Vt - }, - set: function(t) { - this.Vt = e.Ct(t, this.ct.secondaryColor.alpha) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineAlpha", { - get: function() { - return this.Dt - }, - set: function(t) { - this.Dt = e.Ct(t, this.ct.outlineColor.alpha) - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowAlpha", { - get: function() { - return this.Mt - }, - set: function(t) { - this.Mt = e.Ct(t, this.ct.shadowColor.alpha) - }, - enumerable: !0, - configurable: !0 - }), e.Ct = function(e, t) { - return null !== e ? e : t - }, e - }(); - e.SpanStyles = n - }, function(e) { - function t(t) { - e.debugMode = t - } - - function r(t) { - e.verboseMode = t - } - e.debugMode = !1, e.verboseMode = !1, e.setDebugMode = t, e.setVerboseMode = r - }, function(t, r) { - var n = r(26), - i = r(29), - o = r(28), - a = r(27), - l = r(23), - s = r(1), - u = r(2), - p = r(30), - c = r(32), - h = function() { - function t() { - if (this.Ue = new o.ScriptProperties, this.Bt = new p.Map, this.zt = [], this.Gt = [], this.qt = null, this.Ut = null, 1 === arguments.length) throw new Error("Constructor `new ASS(rawASS)` has been deprecated. Use `ASS.fromString(rawASS)` instead."); - this.Bt.set("Default", new i.Style(new p.Map([ - ["Name", "Default"] - ]))) - } - return Object.defineProperty(t.prototype, "properties", { - get: function() { - return this.Ue - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(t.prototype, "styles", { - get: function() { - return this.Bt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(t.prototype, "dialogues", { - get: function() { - return this.zt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(t.prototype, "attachments", { - get: function() { - return this.Gt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(t.prototype, "stylesFormatSpecifier", { - get: function() { - return this.qt - }, - set: function(e) { - this.qt = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(t.prototype, "dialoguesFormatSpecifier", { - get: function() { - return this.Ut - }, - set: function(e) { - this.Ut = e - }, - enumerable: !0, - configurable: !0 - }), t.prototype.addStyle = function(e) { - var t = u.parseLineIntoTypedTemplate(e, this.qt); - if (null !== t && "Style" === t.type) { - var r = t.template; - if (l.verboseMode) { - var n = ""; - r.forEach(function(e, t) { - return n += t + " = " + e + ", " - }), console.log("Read style: " + n) - } - var o = new i.Style(r); - this.Bt.set(o.name, o) - } - }, t.prototype.addEvent = function(e) { - var t = u.parseLineIntoTypedTemplate(e, this.Ut); - if (null !== t && "Dialogue" === t.type) { - var r = t.template; - if (l.verboseMode) { - var i = ""; - r.forEach(function(e, t) { - return i += t + " = " + e + ", " - }), console.log("Read dialogue: " + i) - } - this.dialogues.push(new n.Dialogue(r, this)) - } - }, t.prototype.addAttachment = function(e) { - this.Gt.push(e) - }, t.fromString = function(e, r) { - return void 0 === r && (r = a.Format.ASS), t.fromStream(new s.StringStream(e), r) - }, t.fromStream = function(e, t) { - switch (void 0 === t && (t = a.Format.ASS), t) { - case a.Format.ASS: - return new s.StreamParser(e).ass; - case a.Format.SRT: - return new s.SrtStreamParser(e).ass; - default: - throw new Error("Illegal value of type: " + t) - } - }, t.fromUrl = function(r, n) { - void 0 === n && (n = a.Format.ASS); - var i; - return i = "function" == typeof e.fetch && "function" == typeof e.ReadableStream && "function" == typeof e.ReadableStream.prototype.getReader && "function" == typeof e.TextDecoder ? e.fetch(r).then(function(e) { - if (e.ok === !1 || void 0 === e.ok && (e.status < 200 || e.status > 299)) throw new Error("HTTP request for " + r + " failed with status code " + e.status); - return t.fromReadableStream(e.body, "utf-8", n) - }) : c.Promise.reject(new Error("Not supported.")), i.catch(function(e) { - console.warn("fetch() failed, falling back to XHR: %o", e); - var i = new XMLHttpRequest, - o = t.fromStream(new s.XhrStream(i), n); - return i.open("GET", r, !0), i.send(), o - }) - }, t.fromReadableStream = function(e, r, n) { - return void 0 === r && (r = "utf-8"), void 0 === n && (n = a.Format.ASS), t.fromStream(new s.BrowserReadableStream(e, r), n) - }, t - }(); - t.ASS = h - }, function(e) { - ! function(e) { - e[e.Font = 0] = "Font", e[e.Graphic = 1] = "Graphic" - }(e.AttachmentType || (e.AttachmentType = {})); - var t = function() { - function e(e, t) { - this.Ht = e, this.Kt = t, this.Zt = "" - } - return Object.defineProperty(e.prototype, "filename", { - get: function() { - return this.Ht - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "type", { - get: function() { - return this.Kt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "contents", { - get: function() { - return this.Zt - }, - set: function(e) { - this.Zt = e - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Attachment = t - }, function(e, t) { - var r = t(27), - n = t(3), - i = t(8), - o = t(23), - a = t(30), - l = function() { - function e(t, n) { - this.Jt = null, this.$t = !1; - var i = new a.Map; - t.forEach(function(e, t) { - i.set(t.toLowerCase(), e) - }), t = i, this.Ae = ++e.Qt; - var l = t.get("style"); - if (void 0 !== l && null !== l && l.constructor === String && (l = l.replace(/^\*+/, ""), null !== l.match(/^Default$/i) && (l = "Default")), this.Le = n.styles.get(l), void 0 === this.Le && (o.debugMode && console.warn("Unrecognized style " + l + '. Falling back to "Default"'), this.Le = n.styles.get("Default")), void 0 === this.Le) throw new Error("Unrecognized style " + l); - if (this.s = e.er(t.get("start")), this.u = e.er(t.get("end")), this.tr = Math.max(r.valueOrDefault(t, "layer", parseInt, function(e) { - return !isNaN(e) - }, "0"), 0), this.rr = t.get("text"), void 0 === this.rr || null === this.rr || this.rr.constructor !== String) throw new Error("Dialogue doesn't have any text.") - } - return Object.defineProperty(e.prototype, "id", { - get: function() { - return this.Ae - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "start", { - get: function() { - return this.s - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "end", { - get: function() { - return this.u - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "style", { - get: function() { - return this.Le - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "alignment", { - get: function() { - return null === this.Jt && this.nr(), this.ir - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "layer", { - get: function() { - return this.tr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "parts", { - get: function() { - return null === this.Jt && this.nr(), this.Jt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "containsTransformTag", { - get: function() { - return null === this.Jt && this.nr(), this.$t - }, - enumerable: !0, - configurable: !0 - }), e.prototype.toString = function() { - return "#" + this.Ae + " [" + this.s.toFixed(3) + "-" + this.u.toFixed(3) + "] " + (null !== this.Jt ? this.Jt.join(", ") : this.rr) - }, e.prototype.nr = function() { - var e = this; - if (this.Jt = n.parse(this.rr, "dialogueParts"), this.ir = this.Le.alignment, this.Jt.forEach(function(t, r) { - t instanceof i.Alignment ? e.ir = t.value : t instanceof i.Move ? (null === t.t1 || null === t.t2) && (e.Jt[r] = new i.Move(t.x1, t.y1, t.x2, t.y2, 0, e.u - e.s)) : t instanceof i.Transform && ((null === t.start || null === t.end || null === t.accel) && (e.Jt[r] = new i.Transform(null === t.start ? 0 : t.start, null === t.end ? e.u - e.s : t.end, null === t.accel ? 1 : t.accel, t.tags)), e.$t = !0) - }), o.debugMode) { - var t = this.Jt.filter(function(e) { - return e instanceof i.Comment && -1 !== e.value.indexOf("\\") - }); - t.length > 0 && console.warn("Possible incorrect parse:\n" + this.rr + "\nwas parsed as\n" + this.toString() + "\nThe possibly incorrect parses are:\n" + t.join("\n")) - } - }, e.er = function(e) { - return e.split(":").reduce(function(e, t) { - return 60 * e + parseFloat(t) - }, 0) - }, e.Qt = -1, e - }(); - e.Dialogue = l - }, function(e) { - function t(e, t, r, n, i) { - var o = e.get(t); - if (void 0 === o) return r(i); - try { - var a = r(o); - if (null !== n && !n(a)) throw new Error("Validation failed."); - return a - } catch (e) { - throw new Error("Property " + t + " has invalid value " + o + " - " + e.stack) - } - }! function(e) { - e[e.ASS = 0] = "ASS", e[e.SRT = 1] = "SRT" - }(e.Format || (e.Format = {})), - function(e) { - e[e.SmartWrappingWithWiderTopLine = 0] = "SmartWrappingWithWiderTopLine", e[e.SmartWrappingWithWiderBottomLine = 3] = "SmartWrappingWithWiderBottomLine", e[e.EndOfLineWrapping = 1] = "EndOfLineWrapping", e[e.NoLineWrapping = 2] = "NoLineWrapping" - }(e.WrappingStyle || (e.WrappingStyle = {})), - function(e) { - e[e.Outline = 1] = "Outline", e[e.OpaqueBox = 3] = "OpaqueBox" - }(e.BorderStyle || (e.BorderStyle = {})), e.valueOrDefault = t - }, function(e) { - var t = function() { - function e() {} - return Object.defineProperty(e.prototype, "resolutionX", { - get: function() { - return this.or - }, - set: function(e) { - this.or = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "resolutionY", { - get: function() { - return this.ar - }, - set: function(e) { - this.ar = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "wrappingStyle", { - get: function() { - return this.lr - }, - set: function(e) { - this.lr = e - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "scaleBorderAndShadow", { - get: function() { - return this.sr - }, - set: function(e) { - this.sr = e - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.ScriptProperties = t - }, function(e, t) { - var r = t(27), - n = t(3), - i = t(30), - o = function() { - function e(e) { - var t = new i.Map; - if (e.forEach(function(e, r) { - t.set(r.toLowerCase(), e) - }), e = t, this.ur = e.get("name"), void 0 === this.ur || null === this.ur || this.ur.constructor !== String) throw new Error("Style doesn't have a name."); - this.ur = this.ur.replace(/^\*+/, ""), this.vt = !!r.valueOrDefault(e, "italic", parseFloat, function(e) { - return !isNaN(e) - }, "0"), this.yt = !!r.valueOrDefault(e, "bold", parseFloat, function(e) { - return !isNaN(e) - }, "0"), this.St = !!r.valueOrDefault(e, "underline", parseFloat, function(e) { - return !isNaN(e) - }, "0"), this.Ot = !!r.valueOrDefault(e, "strikeout", parseFloat, function(e) { - return !isNaN(e) - }, "0"), this.mt = r.valueOrDefault(e, "fontname", function(e) { - return e - }, function(e) { - return e.constructor === String - }, "sans-serif"), this.bt = r.valueOrDefault(e, "fontsize", parseFloat, function(e) { - return !isNaN(e) - }, "18"), this.wt = r.valueOrDefault(e, "scalex", parseFloat, function(e) { - return e >= 0 - }, "100") / 100, this.Pt = r.valueOrDefault(e, "scaley", parseFloat, function(e) { - return e >= 0 - }, "100") / 100, this.kt = r.valueOrDefault(e, "spacing", parseFloat, function(e) { - return e >= 0 - }, "0"), this.dt = r.valueOrDefault(e, "angle", parseFloat, function(e) { - return !isNaN(e) - }, "0"), this.jt = r.valueOrDefault(e, "primarycolour", function(e) { - return n.parse(e, "colorWithAlpha") - }, null, "&H00FFFFFF"), this.Yt = r.valueOrDefault(e, "secondarycolour", function(e) { - return n.parse(e, "colorWithAlpha") - }, null, "&H00FFFF00"), this.Tt = r.valueOrDefault(e, "outlinecolour", function(e) { - return n.parse(e, "colorWithAlpha") - }, null, "&H00000000"), this.Ft = r.valueOrDefault(e, "backcolour", function(e) { - return n.parse(e, "colorWithAlpha") - }, null, "&H80000000"), this.pr = r.valueOrDefault(e, "outline", parseFloat, function(e) { - return e >= 0 - }, "2"), this.cr = r.valueOrDefault(e, "borderstyle", parseInt, function(e) { - return r.BorderStyle[r.BorderStyle[e]] === e - }, "1"), this.hr = r.valueOrDefault(e, "shadow", parseFloat, function(e) { - return e >= 0 - }, "3"), this.ir = r.valueOrDefault(e, "alignment", parseInt, function(e) { - return e >= 1 && 9 >= e - }, "2"), this.fr = r.valueOrDefault(e, "marginl", parseFloat, function(e) { - return !isNaN(e) - }, "20"), this.dr = r.valueOrDefault(e, "marginr", parseFloat, function(e) { - return !isNaN(e) - }, "20"), this._r = r.valueOrDefault(e, "marginv", parseFloat, function(e) { - return !isNaN(e) - }, "20") - } - return Object.defineProperty(e.prototype, "name", { - get: function() { - return this.ur - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "italic", { - get: function() { - return this.vt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "bold", { - get: function() { - return this.yt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "underline", { - get: function() { - return this.St - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "strikeThrough", { - get: function() { - return this.Ot - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontName", { - get: function() { - return this.mt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontSize", { - get: function() { - return this.bt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontScaleX", { - get: function() { - return this.wt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "fontScaleY", { - get: function() { - return this.Pt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "letterSpacing", { - get: function() { - return this.kt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "rotationZ", { - get: function() { - return this.dt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "primaryColor", { - get: function() { - return this.jt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "secondaryColor", { - get: function() { - return this.Yt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineColor", { - get: function() { - return this.Tt - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowColor", { - get: function() { - return this.Ft - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "outlineThickness", { - get: function() { - return this.pr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "borderStyle", { - get: function() { - return this.cr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "shadowDepth", { - get: function() { - return this.hr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "alignment", { - get: function() { - return this.ir - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "marginLeft", { - get: function() { - return this.fr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "marginRight", { - get: function() { - return this.dr - }, - enumerable: !0, - configurable: !0 - }), Object.defineProperty(e.prototype, "marginVertical", { - get: function() { - return this._r - }, - enumerable: !0, - configurable: !0 - }), e - }(); - e.Style = o - }, function(t) { - function r(e) { - null !== e ? t.Map = e : t.Map = n - } - t.Map = e.Map; - var n = function() { - function e(e) { - if (this.clear(), void 0 !== e) { - if (!Array.isArray(e)) throw new Error("Non-array iterables are not supported by the SimpleMap constructor."); - for (var t = 0; t < e.length; t++) { - var r = e[t]; - this.set(r[0], r[1]) - } - } - } - return e.prototype.get = function(e) { - var t = this.gr(e); - if (null !== t) return this.vr[t] - }, e.prototype.has = function(e) { - var t = this.gr(e); - return null === t ? !1 : t in this.yr - }, e.prototype.set = function(e, t) { - var r = this.gr(e); - if (null === r) throw new Error("This Map implementation only supports Number and String keys, or keys with an id property."); - return r in this.yr || this.mr++, this.yr[r] = e, this.vr[r] = t, this - }, e.prototype.delete = function(e) { - var t = this.gr(e); - if (null === t) return !1; - var r = t in this.yr; - return r && (delete this.yr[t], delete this.vr[t], this.mr--), r - }, e.prototype.clear = function() { - this.yr = Object.create(null), this.vr = Object.create(null), this.mr = 0 - }, e.prototype.forEach = function(e, t) { - for (var r = 0, n = Object.keys(this.yr); r < n.length; r++) { - var i = n[r]; - e.call(t, this.vr[i], this.yr[i], this) - } - }, Object.defineProperty(e.prototype, "size", { - get: function() { - return this.mr - }, - enumerable: !0, - configurable: !0 - }), e.prototype.gr = function(e) { - return "number" == typeof e ? "#" + e : "string" == typeof e ? "'" + e : void 0 !== e.id ? "!" + e.id : null - }, e - }(); - (void 0 === t.Map || "function" != typeof t.Map.prototype.forEach || function() { - try { - return 2 !== new t.Map([ - [1, "foo"], - [2, "bar"] - ]).size - } catch (e) { - return !0 - } - }()) && (t.Map = n), t.setImplementation = r - }, function(e) { - function t(e, t) { - for (var r = 0; r < t.length; r++) - for (var n = t[r], i = 0, o = Object.getOwnPropertyNames(n.prototype); i < o.length; i++) { - var a = o[i]; - e.prototype[a] = n.prototype[a] - } - } - e.mixin = t - }, function(t) { - function r(e) { - null !== e ? t.Promise = e : t.Promise = s - } - - function n(e) { - return i(e, []) - } - - function i(e, r) { - if (0 === e.length) return t.Promise.reject(r); - var n = e[0], - o = e.slice(1); - return n.catch(function(e) { - return i(o, r.concat(e)) - }) - } - - function o(e) { - return new t.Promise(function(r, n) { - return t.Promise.all(e.map(function(e) { - return e.then(r, function(e) { - return e - }) - })).then(n) - }) - } - - function a(e, t) { - return e.then(function(e) { - return t(), e - }, function(e) { - throw t(), e - }) - } - t.Promise = e.Promise; - var l = function() { - var t = e.MutationObserver || e.WebkitMutationObserver; - if (void 0 !== e.process && "function" == typeof e.process.nextTick) return function(t) { - e.process.nextTick(t) - }; - if (void 0 !== t) { - var r = [], - n = !1, - i = document.createElement("div"), - o = new t(function() { - for (var e = r.splice(0, r.length), t = 0; t < e.length; t++) { - var o = e[t]; - o() - } - n = !1, r.length > 0 && (i.classList.toggle("foo"), n = !0) - }); - return o.observe(i, { - attributes: !0 - }), - function(e) { - r.push(e), n || (i.classList.toggle("foo"), n = !0) - } - } - return function(e) { - return setTimeout(e, 0) - } - }(), - s = function() { - function e(e) { - if (this.br = u.PENDING, this.wr = [], this.Sr = [], this.Or = null, this.Pr = null, "function" != typeof e) throw new TypeError('typeof executor !== "function"'); - var t = this.Cr(), - r = t.resolve, - n = t.reject; - try { - e(r, n) - } catch (e) { - n(e) - } - } - return e.prototype.then = function(e, t) { - var r = new p; - "function" != typeof e && (e = function(e) { - return e - }), "function" != typeof t && (t = function(e) { - throw e - }); - var n = { - capabilities: r, - handler: e - }, - i = { - capabilities: r, - handler: t - }; - switch (this.br) { - case u.PENDING: - this.wr.push(n), this.Sr.push(i); - break; - case u.FULFILLED: - this.kr(n, this.Or); - break; - case u.REJECTED: - this.Er(i, this.Pr) - } - return r.promise - }, e.prototype.catch = function(e) { - return this.then(null, e) - }, e.resolve = function(r) { - return r instanceof e ? r : new t.Promise(function(e) { - return e(r) - }) - }, e.reject = function(e) { - return new t.Promise(function(t, r) { - return r(e) - }) - }, e.all = function(e) { - return new t.Promise(function(r, n) { - var i = [], - o = e.length; - return 0 === o ? void r(i) : void e.forEach(function(e, a) { - return t.Promise.resolve(e).then(function(e) { - i[a] = e, o--, 0 === o && r(i) - }, n) - }) - }) - }, e.race = function(e) { - return new t.Promise(function(r, n) { - for (var i = 0; i < e.length; i++) { - var o = e[i]; - t.Promise.resolve(o).then(r, n) - } - }) - }, e.prototype.Cr = function() { - var e = this, - t = !1, - r = function(r) { - if (!t) { - if (t = !0, r === e) return void e.xr(new TypeError("resolution === this")); - if (null === r || "object" != typeof r && "function" != typeof r) return void e.jr(r); - try { - var n = r.then - } catch (t) { - return void e.xr(t) - } - return "function" != typeof n ? void e.jr(r) : void l(function() { - return e.Ar(r, n) - }) - } - }, - n = function(r) { - t || (t = !0, e.xr(r)) - }; - return { - resolve: r, - reject: n - } - }, e.prototype.Ar = function(e, t) { - var r = this.Cr(), - n = r.resolve, - i = r.reject; - try { - t.call(e, n, i) - } catch (e) { - i(e) - } - }, e.prototype.jr = function(e) { - var t = this.wr; - this.Or = e, this.wr = void 0, this.Sr = void 0, this.br = u.FULFILLED; - for (var r = 0; r < t.length; r++) { - var n = t[r]; - this.kr(n, e) - } - }, e.prototype.xr = function(e) { - var t = this.Sr; - this.Pr = e, this.wr = void 0, this.Sr = void 0, this.br = u.REJECTED; - for (var r = 0; r < t.length; r++) { - var n = t[r]; - this.Er(n, e) - } - }, e.prototype.kr = function(e, t) { - l(function() { - var r, n = e.capabilities, - i = n.resolve, - o = n.reject, - a = e.handler; - try { - r = a(t) - } catch (e) { - return void o(e) - } - i(r) - }) - }, e.prototype.Er = function(e, t) { - l(function() { - var r, n = e.capabilities, - i = n.resolve, - o = n.reject, - a = e.handler; - try { - r = a(t) - } catch (e) { - return void o(e) - } - i(r) - }) - }, e - }(); - void 0 === t.Promise && (t.Promise = s); - var u; - ! function(e) { - e[e.PENDING = 0] = "PENDING", e[e.FULFILLED = 1] = "FULFILLED", e[e.REJECTED = 2] = "REJECTED" - }(u || (u = {})), t.setImplementation = r; - var p = function() { - function e() { - var e = this; - this.Tr = new t.Promise(function(t, r) { - Object.defineProperties(e, { - resolve: { - value: t, - enumerable: !0 - }, - reject: { - value: r, - enumerable: !0 - } - }) - }) - } - return Object.defineProperty(e.prototype, "promise", { - get: function() { - return this.Tr - }, - enumerable: !0, - configurable: !0 - }), e - }(); - t.DeferredPromise = p, t.first = n, t.any = o, t.lastly = a - }, function(t) { - function r(e) { - null !== e ? t.Set = e : t.Set = n - } - t.Set = e.Set; - var n = function() { - function e(e) { - if (this.clear(), void 0 !== e) { - if (!Array.isArray(e)) throw new Error("Non-array iterables are not supported by the SimpleSet constructor."); - for (var t = 0; t < e.length; t++) { - var r = e[t]; - this.add(r) - } - } - } - return e.prototype.add = function(e) { - var t = this.Dr(e); - if (null === t) throw new Error("This Set implementation only supports Number and String values."); - return t in this.Fr || this.mr++, this.Fr[t] = e, this - }, e.prototype.clear = function() { - this.Fr = Object.create(null), this.mr = 0 - }, e.prototype.has = function(e) { - var t = this.Dr(e); - return null === t ? !1 : t in this.Fr - }, e.prototype.forEach = function(e, t) { - for (var r = 0, n = Object.keys(this.Fr); r < n.length; r++) { - var i = n[r], - o = this.Fr[i]; - e.call(t, o, o, this) - } - }, Object.defineProperty(e.prototype, "size", { - get: function() { - return this.mr - }, - enumerable: !0, - configurable: !0 - }), e.prototype.Dr = function(e) { - return "number" == typeof e ? "#" + e : "string" == typeof e ? "'" + e : null - }, e - }(); - (void 0 === t.Set || "function" != typeof t.Set.prototype.forEach || function() { - try { - return 2 !== new t.Set([1, 2]).size - } catch (e) { - return !0 - } - }()) && (t.Set = n), t.setImplementation = r - }, function(e) { - function t(e, t) { - function r() { - this.constructor = e - } - for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); - r.prototype = t.prototype, e.prototype = new r - } - - function r(e, t, r) { - return arguments.length < 3 ? n(e.reverse(), t) : void i(e.reverse(), t, r) - } - - function n(e, t) { - for (var r = 0; r < e.length; r++) { - var n = e[r]; - t = n(t) || t - } - return t - } - - function i(e, t, r) { - for (var n = 0; n < e.length; n++) { - var i = e[n]; - i(t, r) - } - } - e.ke = t, e.L = r - }, function(e, t) { - var r = t(30), - n = t(32), - i = t(36), - o = t(38), - a = function() { - function e(e) { - var t = this; - this.Mr = e, this.Rr = new r.Map, this.Mr.addEventListener("message", function(e) { - return t.Nr(e.data) - }, !1) - } - return e.prototype.request = function(t, r) { - var i = new n.DeferredPromise, - a = ++e.Wr; - this.Rr.set(a, i); - var l = { - requestId: a, - command: t, - parameters: r - }; - return this.Mr.postMessage(o.serialize(l)), i.promise - }, e.prototype.cancelRequest = function(e) { - var t = this.Rr.get(e); - void 0 !== t && (this.Rr.delete(e), t.reject(new Error("Cancelled."))) - }, e.prototype.Lr = function(e) { - var t = e.requestId, - r = e.error, - n = e.result; - r instanceof Error && (r = { - message: r.message, - stack: r.stack - }), this.Mr.postMessage(o.serialize({ - command: i.WorkerCommands.Response, - requestId: t, - error: r, - result: n - })) - }, e.prototype.Nr = function(e) { - var t = this, - r = o.deserialize(e); - if (r.command === i.WorkerCommands.Response) { - var n = r, - a = this.Rr.get(n.requestId); - void 0 !== a && (this.Rr.delete(n.requestId), null === n.error ? a.resolve(n.result) : a.reject(n.error)) - } else { - var l = r, - s = l.requestId, - u = o.getWorkerCommandHandler(l.command); - if (void 0 === u) return void this.Lr({ - requestId: s, - error: new Error("No handler registered for command " + l.command), - result: null - }); - u(l.parameters).then(function(e) { - return { - requestId: s, - error: null, - result: e - } - }, function(e) { - return { - requestId: s, - error: e, - result: null - } - }).then(function(e) { - return t.Lr(e) - }) - } - }, e.Wr = -1, e - }(); - e.WorkerChannelImpl = a, o.registerWorkerCommand(i.WorkerCommands.Ping, function() { - return new n.Promise(function(e) { - return e(null) - }) - }) - }, function(e) { - ! function(e) { - e[e.Response = 0] = "Response", e[e.Parse = 1] = "Parse", e[e.Ping = 2] = "Ping" - }(e.WorkerCommands || (e.WorkerCommands = {})) - }, function(t, r) { - function n(e) { - return void 0 === e && (e = a.src), new i.WorkerChannelImpl(new Worker(e)) - } - var i = r(35), - o = r(36); - t.WorkerCommands = o.WorkerCommands, t.supported = "undefined" != typeof Worker; - var a = "undefined" != typeof document && void 0 !== document.currentScript ? document.currentScript : null; - t.createWorker = n, "undefined" != typeof WorkerGlobalScope && e instanceof WorkerGlobalScope && new i.WorkerChannelImpl(e) - }, function(e, t) { - function r(e, t) { - s.set(e, t) - } - - function n(e) { - return s.get(e) - } - - function i(e) { - e.Ir = u.size, u.set(e.Ir, e) - } - - function o(e) { - return JSON.stringify(e, function(e, t) { - return t && void 0 !== t.Ir && (t.Ir = t.Ir), t - }) - } - - function a(e) { - return JSON.parse(e, function(e, t) { - if (t && void 0 !== t.Ir) { - for (var r = Object.create(u.get(t.Ir)), n = 0, i = Object.keys(t); n < i.length; n++) { - var o = i[n]; - "_classTag" !== o && (r[o] = t[o]) - } - t = r - } - return t - }) - } - var l = t(30), - s = new l.Map, - u = new l.Map; - e.registerWorkerCommand = r, e.getWorkerCommandHandler = n, e.registerClassPrototype = i, e.serialize = o, e.deserialize = a - }]) -}); -//# sourceMappingURL=libjass.min.js.map \ No newline at end of file diff --git a/src/bundle.js b/src/bundle.js index 3e33a4a1ec..601baeba80 100644 --- a/src/bundle.js +++ b/src/bundle.js @@ -7,8 +7,30 @@ var _define = window.define; // jstree var jstree = require("jstree"); require("jstree/dist/themes/default/style.css"); -_define("jstree", ["jQuery"], function() { return jstree; }); +_define("jstree", function() { return jstree; }); + +// jquery +var jquery = require("jquery"); +_define("jQuery", function() { return jquery; }); // hlsjs var hlsjs = require("hls.js"); _define("hlsjs", function() { return hlsjs; }); + +// howler +var howler = require("howler"); +_define("howler", function() { return howler; }); + +// swiper +var swiper = require("swiper"); +require("swiper/dist/css/swiper.min.css"); +_define("swiper", function() { return swiper; }); + +// sortable +var sortable = require("sortablejs"); +_define("sortable", function() { return sortable; }); + +// libjass +var libjass = require("libjass"); +require("libjass/libjass.css"); +_define("libjass", function() { return libjass; }); diff --git a/src/components/humanedate.js b/src/components/humanedate.js index ac7cff1ef6..9abaa952c2 100644 --- a/src/components/humanedate.js +++ b/src/components/humanedate.js @@ -1,7 +1,7 @@ define(["datetime"], function(datetime) { "use strict"; - function humane_date(date_str) { + function humaneDate(date_str) { var format, time_formats = [ [90, "a minute"], [3600, "minutes", 60], @@ -24,5 +24,37 @@ define(["datetime"], function(datetime) { if (seconds < format[0]) return 2 == format.length ? format[1] + " ago" : Math.round(seconds / format[2]) + " " + format[1] + " ago"; return seconds > 47304e5 ? Math.round(seconds / 47304e5) + " centuries ago" : date_str } - return window.humane_date = humane_date, humane_date + + function humaneElapsed(firstDateStr, secondDateStr) { + // TODO replace this whole script with a library or something + var dateOne = new Date(firstDateStr); + var dateTwo = new Date(secondDateStr); + var delta = (dateTwo.getTime() - dateOne.getTime()) / 1e3; + + var days = Math.floor(delta % 31536e3 / 86400); + var hours = Math.floor(delta % 31536e3 % 86400 / 3600); + var minutes = Math.floor(delta % 31536e3 % 86400 % 3600 / 60); + var seconds = Math.round(delta % 31536e3 % 86400 % 3600 % 60); + + var elapsed = ""; + elapsed += 1 == days ? days + " day " : ""; + elapsed += days > 1 ? days + " days " : ""; + elapsed += 1 == hours ? hours + " hour " : ""; + elapsed += hours > 1 ? hours + " hours " : ""; + elapsed += 1 == minutes ? minutes + " minute " : ""; + elapsed += minutes > 1 ? minutes + " minutes " : ""; + elapsed += elapsed.length > 0 ? "and " : ""; + elapsed += 1 == seconds ? seconds + " second" : ""; + elapsed += 0 == seconds || seconds > 1 ? seconds + " seconds" : ""; + + return elapsed; + } + + window.humaneDate = humaneDate; + window.humaneElapsed = humaneElapsed; + + return { + humaneDate: humaneDate, + humaneElapsed: humaneElapsed + } }); \ No newline at end of file diff --git a/src/components/inputManager.js b/src/components/inputManager.js index f79eaa58da..634b5e1b30 100644 --- a/src/components/inputManager.js +++ b/src/components/inputManager.js @@ -5,7 +5,6 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba function notify() { lastInputTime = new Date().getTime(); - handleCommand('unknown'); } @@ -18,27 +17,22 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba } function select(sourceElement) { - sourceElement.click(); } var eventListenerCount = 0; function on(scope, fn) { - eventListenerCount++; - dom.addEventListener(scope, 'command', fn, { - - }); + if (eventListenerCount) { + eventListenerCount++; + } + dom.addEventListener(scope, 'command', fn, {}); } function off(scope, fn) { - if (eventListenerCount) { eventListenerCount--; } - - dom.removeEventListener(scope, 'command', fn, { - - }); + dom.removeEventListener(scope, 'command', fn, {}); } var commandTimes = {}; @@ -85,7 +79,6 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba } switch (name) { - case 'up': focusManager.moveUp(sourceElement); break; @@ -119,6 +112,7 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba case 'end': break; case 'menu': + break; case 'info': break; case 'nextchapter': @@ -214,53 +208,9 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba case 'toggledisplaymirror': playbackManager.toggleDisplayMirroring(); break; - case 'togglestats': - //playbackManager.toggleStats(); - break; - case 'movies': - // TODO - appRouter.goHome(); - break; - case 'music': - // TODO - appRouter.goHome(); - break; - case 'tv': - // TODO - appRouter.goHome(); - break; case 'nowplaying': appRouter.showNowPlaying(); break; - case 'save': - break; - case 'screensaver': - // TODO - break; - case 'refresh': - // TODO - break; - case 'changebrightness': - // TODO - break; - case 'red': - // TODO - break; - case 'green': - // TODO - break; - case 'yellow': - // TODO - break; - case 'blue': - // TODO - break; - case 'grey': - // TODO - break; - case 'brown': - // TODO - break; case 'repeatnone': playbackManager.setRepeatMode('RepeatNone'); break; @@ -288,4 +238,4 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba on: on, off: off }; -}); \ No newline at end of file +}); diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index ada0c019fc..04fb89b3d1 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -3846,7 +3846,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla player = player || this._currentPlayer || { isLocalPlayer: true }; if (player.isLocalPlayer) { - // https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs var list = [ "GoHome", "GoToSettings", @@ -3974,7 +3973,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla }; PlaybackManager.prototype.sendCommand = function (cmd, player) { - // https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs console.log('MediaController received command: ' + cmd.Name); switch (cmd.Name) { case 'SetRepeatMode': diff --git a/src/css/nowplaying.css b/src/components/remotecontrol/remotecontrol.css similarity index 98% rename from src/css/nowplaying.css rename to src/components/remotecontrol/remotecontrol.css index 9bedb33c83..5d375d01dd 100644 --- a/src/css/nowplaying.css +++ b/src/components/remotecontrol/remotecontrol.css @@ -178,7 +178,7 @@ .playlistIndexIndicatorImage { -webkit-background-size: initial initial !important; background-size: initial !important; - background-image: url(../img/equalizer.gif) !important + background-image: url(../../img/equalizer.gif) !important; } .hideVideoButtons .videoButton { @@ -202,7 +202,6 @@ } @media all and (max-width:34em) { - .nowPlayingInfoButtons .btnNowPlayingFastForward, .nowPlayingInfoButtons .btnNowPlayingRewind, .nowPlayingInfoButtons .playlist .listItemMediaInfo { diff --git a/src/components/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js similarity index 98% rename from src/components/remotecontrol.js rename to src/components/remotecontrol/remotecontrol.js index 76f0d673d0..dae9f702e7 100644 --- a/src/components/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -1,4 +1,4 @@ -define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "cardStyle", "emby-itemscontainer", "css!css/nowplaying.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize) { +define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "cardStyle", "emby-itemscontainer", "css!./remotecontrol.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize) { "use strict"; function showAudioMenu(context, player, button, item) { @@ -156,10 +156,6 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL } } - function buttonEnabled(btn, enabled) { - btn.disabled = !enabled; - } - function buttonVisible(btn, enabled) { if (enabled) { btn.classList.remove("hide"); @@ -172,7 +168,8 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL var all = context.querySelectorAll(".btnCommand"); for (var i = 0, length = all.length; i < length; i++) { - buttonEnabled(all[i], -1 != commands.indexOf(all[i].getAttribute("data-command"))); + var enableButton = -1 !== commands.indexOf(all[i].getAttribute("data-command")); + all[i].disabled = !enableButton; } } diff --git a/src/components/serverNotifications/serverNotifications.js b/src/components/serverNotifications/serverNotifications.js index 2537723b68..74c65cd473 100644 --- a/src/components/serverNotifications/serverNotifications.js +++ b/src/components/serverNotifications/serverNotifications.js @@ -39,7 +39,6 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus } function processGeneralCommand(cmd, apiClient) { - // https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs console.log('Received command: ' + cmd.Name); switch (cmd.Name) { case 'Select': diff --git a/src/controllers/dashboardpage.js b/src/controllers/dashboardpage.js index 339145ca4f..450742af30 100644 --- a/src/controllers/dashboardpage.js +++ b/src/controllers/dashboardpage.js @@ -1,15 +1,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globalize", "loading", "connectionManager", "playMethodHelper", "cardBuilder", "imageLoader", "components/activitylog", "scripts/imagehelper", "indicators", "humanedate", "listViewStyle", "emby-button", "flexStyles", "emby-button", "emby-itemscontainer"], function (datetime, events, itemHelper, serverNotifications, dom, globalize, loading, connectionManager, playMethodHelper, cardBuilder, imageLoader, ActivityLog, imageHelper, indicators) { "use strict"; - function buttonEnabled(elem, enabled) { - if (enabled) { - elem.setAttribute("disabled", ""); - elem.removeAttribute("disabled"); - } else { - elem.setAttribute("disabled", "disabled"); - } - } - function showPlaybackInfo(btn, session) { require(["alert"], function (alert) { var title; @@ -455,7 +446,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (!nowPlayingItem) { return { - html: "Last seen " + humane_date(session.LastActivityDate), + html: "Last seen " + humaneDate(session.LastActivityDate), image: imgUrl }; } @@ -700,8 +691,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa primary: "delete" }).then(function () { var page = dom.parentWithClass(btn, "page"); - buttonEnabled(page.querySelector("#btnRestartServer"), false); - buttonEnabled(page.querySelector("#btnShutdown"), false); + page.querySelector("#btnRestartServer").disabled = true; + page.querySelector("#btnShutdown").disabled = true; ApiClient.restartServer(); }); }); @@ -715,8 +706,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa primary: "delete" }).then(function () { var page = dom.parentWithClass(btn, "page"); - buttonEnabled(page.querySelector("#btnRestartServer"), false); - buttonEnabled(page.querySelector("#btnShutdown"), false); + page.querySelector("#btnRestartServer").disabled = true; + page.querySelector("#btnShutdown").disabled = true; ApiClient.shutdownServer(); }); }); diff --git a/src/controllers/devices.js b/src/controllers/devices.js index d50f9ce7e5..94d7eb70ea 100644 --- a/src/controllers/devices.js +++ b/src/controllers/devices.js @@ -86,7 +86,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu deviceHtml += "
"; if (device.LastUserName) { deviceHtml += device.LastUserName; - deviceHtml += ", " + humane_date(device.DateLastActivity); + deviceHtml += ", " + humaneDate(device.DateLastActivity); } deviceHtml += " "; deviceHtml += "
"; diff --git a/src/controllers/medialibrarypage.js b/src/controllers/medialibrarypage.js index 6ce5f7fac7..a69ed8c645 100644 --- a/src/controllers/medialibrarypage.js +++ b/src/controllers/medialibrarypage.js @@ -217,7 +217,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl }, { name: globalize.translate("FolderTypeMusic"), value: "music", - message: getLink("MovieLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/music/") + message: getLink("MusicLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/music/") }, { name: globalize.translate("FolderTypeTvShows"), value: "tvshows", @@ -225,7 +225,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl }, { name: globalize.translate("FolderTypeBooks"), value: "books", - message: getLink("BookLibraryHelp", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Book-naming") + message: getLink("BookLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/books/") }, { name: globalize.translate("OptionHomeVideos"), value: "homevideos" diff --git a/src/controllers/nowplayingpage.js b/src/controllers/nowplayingpage.js index 77eb7c221c..7f1b9b3f11 100644 --- a/src/controllers/nowplayingpage.js +++ b/src/controllers/nowplayingpage.js @@ -1,4 +1,4 @@ -define(["components/remotecontrol", "libraryMenu", "emby-button"], function(remotecontrolFactory, libraryMenu) { +define(["components/remotecontrol/remotecontrol", "libraryMenu", "emby-button"], function(remotecontrolFactory, libraryMenu) { "use strict"; return function(view, params) { var remoteControl = new remotecontrolFactory; diff --git a/src/controllers/scheduledtaskspage.js b/src/controllers/scheduledtaskspage.js index 4ca89b92de..acb88d53e2 100644 --- a/src/controllers/scheduledtaskspage.js +++ b/src/controllers/scheduledtaskspage.js @@ -62,23 +62,11 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma page.querySelector(".divScheduledTasks").innerHTML = html; } - function humane_elapsed(firstDateStr, secondDateStr) { - var dt1 = new Date(firstDateStr), - dt2 = new Date(secondDateStr), - seconds = (dt2.getTime() - dt1.getTime()) / 1e3, - numdays = Math.floor(seconds % 31536e3 / 86400), - numhours = Math.floor(seconds % 31536e3 % 86400 / 3600), - numminutes = Math.floor(seconds % 31536e3 % 86400 % 3600 / 60), - numseconds = Math.round(seconds % 31536e3 % 86400 % 3600 % 60), - elapsedStr = ""; - return elapsedStr += 1 == numdays ? numdays + " day " : "", elapsedStr += numdays > 1 ? numdays + " days " : "", elapsedStr += 1 == numhours ? numhours + " hour " : "", elapsedStr += numhours > 1 ? numhours + " hours " : "", elapsedStr += 1 == numminutes ? numminutes + " minute " : "", elapsedStr += numminutes > 1 ? numminutes + " minutes " : "", elapsedStr += elapsedStr.length > 0 ? "and " : "", elapsedStr += 1 == numseconds ? numseconds + " second" : "", elapsedStr += 0 == numseconds || numseconds > 1 ? numseconds + " seconds" : "" - } - function getTaskProgressHtml(task) { var html = ""; if (task.State === "Idle") { if (task.LastExecutionResult) { - html += globalize.translate("LabelScheduledTaskLastRan").replace("{0}", humane_date(task.LastExecutionResult.EndTimeUtc)).replace("{1}", humane_elapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc)); + html += globalize.translate("LabelScheduledTaskLastRan").replace("{0}", humaneDate(task.LastExecutionResult.EndTimeUtc)).replace("{1}", humaneElapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc)); if (task.LastExecutionResult.Status === "Failed") { html += " (" + globalize.translate("LabelFailed") + ")"; } else if (task.LastExecutionResult.Status === "Cancelled") { diff --git a/src/controllers/userprofilespage.js b/src/controllers/userprofilespage.js index f76bb35e6a..3c22ff3cbf 100644 --- a/src/controllers/userprofilespage.js +++ b/src/controllers/userprofilespage.js @@ -128,7 +128,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light", function getLastSeenText(lastActivityDate) { if (lastActivityDate) { - return "Last seen " + humane_date(lastActivityDate); + return "Last seen " + humaneDate(lastActivityDate); } return ""; diff --git a/src/legacy/buttonenabled.js b/src/legacy/buttonenabled.js deleted file mode 100644 index 6c2f3b1e94..0000000000 --- a/src/legacy/buttonenabled.js +++ /dev/null @@ -1,6 +0,0 @@ -define(["jQuery"], function($) { - "use strict"; - $.fn.buttonEnabled = function(enabled) { - return enabled ? this.attr("disabled", "").removeAttr("disabled") : this.attr("disabled", "disabled") - } -}); \ No newline at end of file diff --git a/src/scripts/editorsidebar.js b/src/scripts/editorsidebar.js index f4126a7d9b..90d5ecdaba 100644 --- a/src/scripts/editorsidebar.js +++ b/src/scripts/editorsidebar.js @@ -241,8 +241,6 @@ define(["datetime", "jQuery", "material-icons"], function (datetime, $) { $(".libraryTree", page).jstree({ "plugins": ["wholerow"], core: { - // Disable animations because jQuery slim does not support them - animation: false, check_callback: true, data: function (node, callback) { loadNode(page, this, node, openItems, selectedId, currentUser, callback); diff --git a/src/scripts/site.js b/src/scripts/site.js index 9c8f79bdaf..c211020207 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -227,12 +227,6 @@ var AppInfo = {}; !function () { "use strict"; - function onApiClientCreated(e, newApiClient) { - if (window.$) { - $.ajax = newApiClient.ajax; - } - } - function defineConnectionManager(connectionManager) { window.ConnectionManager = connectionManager; define("connectionManager", [], function () { @@ -242,7 +236,6 @@ var AppInfo = {}; function bindConnectionManagerEvents(connectionManager, events, userSettings) { window.Events = events; - events.on(ConnectionManager, "apiclientcreated", onApiClientCreated); connectionManager.currentApiClient = function () { if (!localApiClient) { @@ -312,10 +305,6 @@ var AppInfo = {}; return obj; } - function getSettingsBuilder(UserSettings, layoutManager, browser) { - return UserSettings; - } - function getBowerPath() { return "bower_components"; } @@ -411,7 +400,7 @@ var AppInfo = {}; define("shell", [componentsPath + "/shell"], returnFirstDependency); - define("apiclient", ["bower_components/apiclient/apiclient"], returnFirstDependency); + define("apiclient", [apiClientBowerPath + "/apiclient"], returnFirstDependency); if ("registerElement" in document) { define("registerElement", []); @@ -461,9 +450,8 @@ var AppInfo = {}; function init() { define("livetvcss", ["css!css/livetv.css"], returnFirstDependency); define("detailtablecss", ["css!css/detailtable.css"], returnFirstDependency); - define("buttonenabled", ["legacy/buttonenabled"], returnFirstDependency); - var promises = []; + var promises = []; if (!window.fetch) { promises.push(require(["fetch"])); } @@ -679,18 +667,11 @@ var AppInfo = {}; var apiClientBowerPath = bowerPath + "/apiclient"; var componentsPath = "components"; var paths = { - velocity: bowerPath + "/velocity/velocity.min", - ironCardList: "components/ironcardlist/ironcardlist", - scrollThreshold: "components/scrollthreshold", - playlisteditor: "components/playlisteditor/playlisteditor", - medialibrarycreator: "components/medialibrarycreator/medialibrarycreator", - medialibraryeditor: "components/medialibraryeditor/medialibraryeditor", - imageoptionseditor: "components/imageoptionseditor/imageoptionseditor", - howler: bowerPath + "/howlerjs/dist/howler.min", - sortable: bowerPath + "/Sortable/Sortable.min", - isMobile: bowerPath + "/isMobile/isMobile.min", - masonry: bowerPath + "/masonry/dist/masonry.pkgd.min", - humanedate: "components/humanedate", + playlisteditor: componentsPath + "/playlisteditor/playlisteditor", + medialibrarycreator: componentsPath + "/medialibrarycreator/medialibrarycreator", + medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor", + imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor", + humanedate: componentsPath + "/humanedate", libraryBrowser: "scripts/librarybrowser", events: apiClientBowerPath + "/events", credentialprovider: apiClientBowerPath + "/credentialprovider", @@ -700,7 +681,6 @@ var AppInfo = {}; browser: componentsPath + "/browser", inputManager: componentsPath + "/inputManager", qualityoptions: componentsPath + "/qualityoptions", - hammer: bowerPath + "/hammerjs/hammer.min", page: "thirdparty/page", focusManager: componentsPath + "/focusManager", datetime: componentsPath + "/datetime", @@ -718,12 +698,11 @@ var AppInfo = {}; define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency); define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency); define("actionsheet", [componentsPath + "/actionsheet/actionsheet"], returnFirstDependency); - define("libjass", [bowerPath + "/libjass/libjass.min", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency); - define("tunerPicker", ["components/tunerpicker"], returnFirstDependency); + define("tunerPicker", [componentsPath + "/tunerpicker"], returnFirstDependency); define("mainTabsManager", [componentsPath + "/maintabsmanager"], returnFirstDependency); define("imageLoader", [componentsPath + "/images/imageLoader"], returnFirstDependency); define("appFooter", [componentsPath + "/appfooter/appfooter"], returnFirstDependency); - define("directorybrowser", ["components/directorybrowser/directorybrowser"], returnFirstDependency); + define("directorybrowser", [componentsPath + "/directorybrowser/directorybrowser"], returnFirstDependency); define("metadataEditor", [componentsPath + "/metadataeditor/metadataeditor"], returnFirstDependency); define("personEditor", [componentsPath + "/metadataeditor/personeditor"], returnFirstDependency); define("playerSelectionMenu", [componentsPath + "/playback/playerSelectionMenu"], returnFirstDependency); @@ -805,7 +784,7 @@ var AppInfo = {}; return viewManager; }); - paths.apphost = "components/apphost"; + paths.apphost = componentsPath + "/apphost"; define('appStorage', [apiClientBowerPath + '/appStorage'], returnFirstDependency); requirejs.config({ @@ -817,7 +796,7 @@ var AppInfo = {}; } }, bundles: { - bundle: ["jstree", "hlsjs"] + bundle: ["jstree", "jQuery", "hlsjs", "howler", "swiper", "sortable", "libjass"] }, urlArgs: urlArgs, paths: paths, @@ -847,32 +826,24 @@ var AppInfo = {}; define("sanitizefilename", [componentsPath + "/sanitizefilename"], returnFirstDependency); define("itemrepository", [apiClientBowerPath + "/sync/itemrepository"], returnFirstDependency); define("useractionrepository", [apiClientBowerPath + "/sync/useractionrepository"], returnFirstDependency); - define("swiper", [bowerPath + "/Swiper/dist/js/swiper.min", "css!" + bowerPath + "/Swiper/dist/css/swiper.min"], returnFirstDependency); define("scroller", [componentsPath + "/scroller"], returnFirstDependency); define("toast", [componentsPath + "/toast/toast"], returnFirstDependency); define("scrollHelper", [componentsPath + "/scrollhelper"], returnFirstDependency); define("touchHelper", [componentsPath + "/touchhelper"], returnFirstDependency); define("appSettings", [componentsPath + "/appSettings"], returnFirstDependency); define("userSettings", [componentsPath + "/usersettings/usersettings"], returnFirstDependency); - define("userSettingsBuilder", [componentsPath + "/usersettings/usersettingsbuilder", "layoutManager", "browser"], getSettingsBuilder); + define("userSettingsBuilder", [componentsPath + "/usersettings/usersettingsbuilder", "layoutManager", "browser"], returnFirstDependency); define("material-icons", ["css!css/material-icons/style"], returnFirstDependency); define("systemFontsCss", ["css!css/fonts"], returnFirstDependency); define("systemFontsSizedCss", ["css!css/fonts.sized"], returnFirstDependency); define("scrollStyles", ["css!" + componentsPath + "/scrollstyles"], returnFirstDependency); define("imageUploader", [componentsPath + "/imageuploader/imageuploader"], returnFirstDependency); - define("navdrawer", ["components/navdrawer/navdrawer"], returnFirstDependency); + define("navdrawer", [componentsPath + "/navdrawer/navdrawer"], returnFirstDependency); define("htmlMediaHelper", [componentsPath + "/htmlMediaHelper"], returnFirstDependency); - define("viewContainer", ["components/viewContainer"], returnFirstDependency); + define("viewContainer", [componentsPath + "/viewContainer"], returnFirstDependency); define("queryString", [bowerPath + "/query-string/index"], function () { return queryString; }); - define("jQuery", [bowerPath + "/jquery/dist/jquery.slim.min"], function () { - if (window.ApiClient) { - jQuery.ajax = ApiClient.ajax; - } - - return jQuery; - }); define("fnchecked", ["legacy/fnchecked"], returnFirstDependency); define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency); define("inputmanager", ["inputManager"], returnFirstDependency); @@ -1017,7 +988,7 @@ var AppInfo = {}; if ("livetv" === item) { if ("programs" === options.section) { return "livetv.html?tab=0&serverId=" + options.serverId; - } + } if ("guide" === options.section) { return "livetv.html?tab=1&serverId=" + options.serverId; } diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 98fe5ea14d..9051164edd 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -49,7 +49,7 @@ "BirthLocation": "Birth location", "BirthPlaceValue": "Birth place: {0}", "Blacklist": "Blacklist", - "BookLibraryHelp": "Audio and text books are supported. Review the {0}Jellyfin Book naming guide{1}.", + "BookLibraryHelp": "Audio and text books are supported. Review the {0}book naming guide{1}.", "Books": "Books", "Box": "Box", "BoxRear": "Box (rear)", @@ -237,7 +237,7 @@ "ErrorAddingTunerDevice": "There was an error adding the tuner device. Please ensure it is accessible and try again.", "ErrorAddingXmlTvFile": "There was an error accessing the XmlTV file. Please ensure the file exists and try again.", "ErrorDeletingItem": "There was an error deleting the item from Jellyfin Server. Please check that Jellyfin Server has write access to the media folder and try again.", - "ErrorGettingTvLineups": "There was an error downloading tv lineups. Please ensure your information is correct and try again.", + "ErrorGettingTvLineups": "There was an error downloading TV lineups. Please ensure your information is correct and try again.", "ErrorMessageStartHourGreaterThanEnd": "End time must be greater than the start time.", "ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.", "ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.", @@ -962,7 +962,7 @@ "MessageConfirmRemoveMediaLocation": "Are you sure you wish to remove this location?", "MessageConfirmRestart": "Are you sure you wish to restart Jellyfin Server?", "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this api key? The application's connection to Jellyfin Server will be abruptly terminated.", - "MessageConfirmShutdown": "Are you sure you wish to shutdown Jellyfin Server?", + "MessageConfirmShutdown": "Are you sure you wish to shutdown the server?", "MessageContactAdminToResetPassword": "Please contact your system administrator to reset your password.", "MessageCreateAccountAt": "Create an account at {0}", "MessageDeleteTaskTrigger": "Are you sure you wish to delete this task trigger?", @@ -1013,10 +1013,11 @@ "MoreMediaInfo": "Media Info", "MoveLeft": "Move left", "MoveRight": "Move right", - "MovieLibraryHelp": "Review the {0}Jellyfin movie naming guide{1}.", + "MovieLibraryHelp": "Review the {0}movie naming guide{1}.", "Movies": "Movies", "MusicAlbum": "Music Album", "MusicArtist": "Music Artist", + "MusicLibraryHelp": "Review the {0}music naming guide{1}.", "MusicVideo": "Music Video", "Mute": "Mute", "MySubtitles": "My Subtitles", @@ -1060,7 +1061,7 @@ "OptionAllowMediaPlaybackTranscodingHelp": "Restricting access to transcoding may cause playback failures in Jellyfin apps due to unsupported media formats.", "OptionAllowRemoteControlOthers": "Allow remote control of other users", "OptionAllowRemoteSharedDevices": "Allow remote control of shared devices", - "OptionAllowRemoteSharedDevicesHelp": "Dlna devices are considered shared until a user begins controlling it.", + "OptionAllowRemoteSharedDevicesHelp": "DLNA devices are considered shared until a user begins controlling them.", "OptionAllowSyncTranscoding": "Allow media downloading and syncing that requires transcoding", "OptionAllowUserToManageServer": "Allow this user to manage the server", "OptionAllowVideoPlaybackRemuxing": "Allow video playback that requires conversion without re-encoding", @@ -1408,7 +1409,7 @@ "Trailers": "Trailers", "Transcoding": "Transcoding", "Tuesday": "Tuesday", - "TvLibraryHelp": "Review the {0}Jellyfin TV naming guide{1}.", + "TvLibraryHelp": "Review the {0}TV naming guide{1}.", "Uniform": "Uniform", "UninstallPluginConfirmation": "Are you sure you wish to uninstall {0}?", "UninstallPluginHeader": "Uninstall Plugin", @@ -1417,8 +1418,8 @@ "Unrated": "Unrated", "Up": "Up", "Upload": "Upload", - "UserAgentHelp": "Supply a custom user-agent http header, if necessary.", - "UserProfilesIntro": "Jellyfin includes built-in support for user profiles, enabling each user to have their own display settings, playstate and parental controls.", + "UserAgentHelp": "Supply a custom user-agent HTTP header.", + "UserProfilesIntro": "Jellyfin includes support for user profiles with granular display settings, play state, and parental controls.", "ValueAlbumCount": "{0} albums", "ValueAudioCodec": "Audio Codec: {0}", "ValueCodec": "Codec: {0}", @@ -1451,13 +1452,13 @@ "Wednesday": "Wednesday", "WelcomeToProject": "Welcome to Jellyfin!", "Whitelist": "Whitelist", - "WizardCompleted": "That's all we need for now. Jellyfin has begun collecting information about your media library. Check out some of our apps, and then click Finish to view the Server Dashboard.", + "WizardCompleted": "That's all we need for now. Jellyfin has begun collecting information about your media library. Check out some of our apps, and then click Finish to view the Dashboard.", "Writer": "Writer", - "XmlDocumentAttributeListHelp": "These attributes are applied to the root element of every xml response.", + "XmlDocumentAttributeListHelp": "These attributes are applied to the root element of every XML response.", "XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.", "XmlTvMovieCategoriesHelp": "Programs with these categories will be displayed as movies. Separate multiple with '|'.", "XmlTvNewsCategoriesHelp": "Programs with these categories will be displayed as news programs. Separate multiple with '|'.", - "XmlTvPathHelp": "A path to an xml tv file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.", + "XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.", "XmlTvSportsCategoriesHelp": "Programs with these categories will be displayed as sports programs. Separate multiple with '|'.", "Yes": "Yes", "Yesterday": "Yesterday" diff --git a/webpack.config.js b/webpack.config.js index c99ad3df1c..9ce0a85b7a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,19 +9,11 @@ module.exports = { path: path.resolve(__dirname, 'dist'), libraryTarget: 'amd-require' }, - - externals: [{ - jquery: { - amd: "jQuery" - } - }], - resolve: { modules: [ path.resolve(__dirname, 'node_modules') ] }, - module: { rules: [ { @@ -34,7 +26,6 @@ module.exports = { } ] }, - plugins: [ new CopyPlugin([{ from: '**/*',