正在加载此比较的其余部分。

vite polyfill comparsion

创建于 差异永不过期
5 删除
757 行
1 添加
754 行
(function polyfill() {
(function polyfill() {
const relList = document.createElement("link").relList;
const relList = document.createElement("link").relList;
if (relList && relList.supports && relList.supports("modulepreload")) {
if (relList && relList.supports && relList.supports("modulepreload")) {
return;
return;
}
}
for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
processPreload(link);
processPreload(link);
}
}
new MutationObserver((mutations) => {
new MutationObserver((mutations) => {
for (const mutation of mutations) {
for (const mutation of mutations) {
if (mutation.type !== "childList") {
if (mutation.type !== "childList") {
continue;
continue;
}
}
for (const node of mutation.addedNodes) {
for (const node of mutation.addedNodes) {
if (node.tagName === "LINK" && node.rel === "modulepreload")
if (node.tagName === "LINK" && node.rel === "modulepreload")
processPreload(node);
processPreload(node);
}
}
}
}
}).observe(document, { childList: true, subtree: true });
}).observe(document, { childList: true, subtree: true });
function getFetchOpts(link) {
function getFetchOpts(link) {
const fetchOpts = {};
const fetchOpts = {};
if (link.integrity)
if (link.integrity)
fetchOpts.integrity = link.integrity;
fetchOpts.integrity = link.integrity;
if (link.referrerPolicy)
if (link.referrerPolicy)
fetchOpts.referrerPolicy = link.referrerPolicy;
fetchOpts.referrerPolicy = link.referrerPolicy;
if (link.crossOrigin === "use-credentials")
if (link.crossOrigin === "use-credentials")
fetchOpts.credentials = "include";
fetchOpts.credentials = "include";
else if (link.crossOrigin === "anonymous")
else if (link.crossOrigin === "anonymous")
fetchOpts.credentials = "omit";
fetchOpts.credentials = "omit";
else
else
fetchOpts.credentials = "same-origin";
fetchOpts.credentials = "same-origin";
return fetchOpts;
return fetchOpts;
}
}
function processPreload(link) {
function processPreload(link) {
if (link.ep)
if (link.ep)
return;
return;
link.ep = true;
link.ep = true;
const fetchOpts = getFetchOpts(link);
const fetchOpts = getFetchOpts(link);
fetch(link.href, fetchOpts);
fetch(link.href, fetchOpts);
}
}
})();
})();
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x2) {
function getDefaultExportFromCjs(x2) {
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
}
}
var jsxRuntime = { exports: {} };
var jsxRuntime = { exports: {} };
var reactJsxRuntime_production_min = {};
var reactJsxRuntime_production_min = {};
var react = { exports: {} };
var react = { exports: {} };
var react_production_min = {};
var react_production_min = {};
/**
/**
* @license React
* @license React
* react.production.min.js
* react.production.min.js
*
*
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Facebook, Inc. and its affiliates.
*
*
* This source code is licensed under the MIT license found in the
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* LICENSE file in the root directory of this source tree.
*/
*/
var l$1 = Symbol.for("react.element"), n$1 = Symbol.for("react.portal"), p$2 = Symbol.for("react.fragment"), q$1 = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v$1 = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z$1 = Symbol.iterator;
var l$1 = Symbol.for("react.element"), n$1 = Symbol.for("react.portal"), p$2 = Symbol.for("react.fragment"), q$1 = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v$1 = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z$1 = Symbol.iterator;
function A$1(a) {
function A$1(a) {
if (null === a || "object" !== typeof a)
if (null === a || "object" !== typeof a)
return null;
return null;
a = z$1 && a[z$1] || a["@@iterator"];
a = z$1 && a[z$1] || a["@@iterator"];
return "function" === typeof a ? a : null;
return "function" === typeof a ? a : null;
}
}
var B$1 = { isMounted: function() {
var B$1 = { isMounted: function() {
return false;
return false;
}, enqueueForceUpdate: function() {
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
}, enqueueSetState: function() {
} }, C$1 = Object.assign, D$1 = {};
} }, C$1 = Object.assign, D$1 = {};
function E$1(a, b, e) {
function E$1(a, b, e) {
this.props = a;
this.props = a;
this.context = b;
this.context = b;
this.refs = D$1;
this.refs = D$1;
this.updater = e || B$1;
this.updater = e || B$1;
}
}
E$1.prototype.isReactComponent = {};
E$1.prototype.isReactComponent = {};
E$1.prototype.setState = function(a, b) {
E$1.prototype.setState = function(a, b) {
if ("object" !== typeof a && "function" !== typeof a && null != a)
if ("object" !== typeof a && "function" !== typeof a && null != a)
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, a, b, "setState");
this.updater.enqueueSetState(this, a, b, "setState");
};
};
E$1.prototype.forceUpdate = function(a) {
E$1.prototype.forceUpdate = function(a) {
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
};
};
function F() {
function F() {
}
}
F.prototype = E$1.prototype;
F.prototype = E$1.prototype;
function G$1(a, b, e) {
function G$1(a, b, e) {
this.props = a;
this.props = a;
this.context = b;
this.context = b;
this.refs = D$1;
this.refs = D$1;
this.updater = e || B$1;
this.updater = e || B$1;
}
}
var H$1 = G$1.prototype = new F();
var H$1 = G$1.prototype = new F();
H$1.constructor = G$1;
H$1.constructor = G$1;
C$1(H$1, E$1.prototype);
C$1(H$1, E$1.prototype);
H$1.isPureReactComponent = true;
H$1.isPureReactComponent = true;
var I$1 = Array.isArray, J = Object.prototype.hasOwnProperty, K$1 = { current: null }, L$1 = { key: true, ref: true, __self: true, __source: true };
var I$1 = Array.isArray, J = Object.prototype.hasOwnProperty, K$1 = { current: null }, L$1 = { key: true, ref: true, __self: true, __source: true };