mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from dev
This commit is contained in:
parent
1c8f02ce0f
commit
33b01d778c
911 changed files with 34157 additions and 57125 deletions
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.14
|
||||
// @version 0.7.19
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
@ -45,6 +45,9 @@ if (typeof WeakMap === "undefined") {
|
|||
}
|
||||
|
||||
(function(global) {
|
||||
if (global.JsMutationObserver) {
|
||||
return;
|
||||
}
|
||||
var registrationsTable = new WeakMap();
|
||||
var setImmediate;
|
||||
if (/Trident|Edge/.test(navigator.userAgent)) {
|
||||
|
@ -340,9 +343,84 @@ if (typeof WeakMap === "undefined") {
|
|||
}
|
||||
};
|
||||
global.JsMutationObserver = JsMutationObserver;
|
||||
if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
|
||||
if (!global.MutationObserver) {
|
||||
global.MutationObserver = JsMutationObserver;
|
||||
JsMutationObserver._isPolyfilled = true;
|
||||
}
|
||||
})(self);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
var workingDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("foo", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!workingDefaultPrevented) {
|
||||
var origPreventDefault = Event.prototype.preventDefault;
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) {
|
||||
return;
|
||||
}
|
||||
origPreventDefault.call(this);
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
};
|
||||
}
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (!window.Event || isIE && typeof window.Event !== "function") {
|
||||
var origEvent = window.Event;
|
||||
window.Event = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
||||
return e;
|
||||
};
|
||||
window.Event.prototype = origEvent.prototype;
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
window.CustomElements = window.CustomElements || {
|
||||
flags: {}
|
||||
};
|
||||
|
@ -442,8 +520,9 @@ window.CustomElements.addModule(function(scope) {
|
|||
}
|
||||
});
|
||||
}
|
||||
var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
|
||||
scope.hasPolyfillMutations = hasPolyfillMutations;
|
||||
var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
|
||||
scope.hasPolyfillMutations = hasThrottledAttached;
|
||||
scope.hasThrottledAttached = hasThrottledAttached;
|
||||
var isPendingMutations = false;
|
||||
var pendingMutations = [];
|
||||
function deferMutation(fn) {
|
||||
|
@ -462,7 +541,7 @@ window.CustomElements.addModule(function(scope) {
|
|||
pendingMutations = [];
|
||||
}
|
||||
function attached(element) {
|
||||
if (hasPolyfillMutations) {
|
||||
if (hasThrottledAttached) {
|
||||
deferMutation(function() {
|
||||
_attached(element);
|
||||
});
|
||||
|
@ -485,7 +564,7 @@ window.CustomElements.addModule(function(scope) {
|
|||
});
|
||||
}
|
||||
function detached(element) {
|
||||
if (hasPolyfillMutations) {
|
||||
if (hasThrottledAttached) {
|
||||
deferMutation(function() {
|
||||
_detached(element);
|
||||
});
|
||||
|
@ -612,6 +691,11 @@ window.CustomElements.addModule(function(scope) {
|
|||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
function upgrade(node, isAttached) {
|
||||
if (node.localName === "template") {
|
||||
if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
|
||||
HTMLTemplateElement.decorate(node);
|
||||
}
|
||||
}
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
var is = node.getAttribute("is");
|
||||
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
|
||||
|
@ -946,22 +1030,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
});
|
||||
});
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (document.readyState === "complete" || scope.flags.eager) {
|
||||
bootstrap();
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue