更新
This commit is contained in:
+113
@@ -0,0 +1,113 @@
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS Error#" + errCode + " " + "https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for AMD loading
|
||||
*/
|
||||
(function (global) {
|
||||
function unsupportedRequire () {
|
||||
throw Error(errMsg(5, 'AMD require not supported.'));
|
||||
}
|
||||
|
||||
var requireExportsModule = ['require', 'exports', 'module'];
|
||||
|
||||
function createAMDRegister (amdDefineDeps, amdDefineExec) {
|
||||
var exports = {};
|
||||
var module = { exports: exports };
|
||||
var depModules = [];
|
||||
var setters = [];
|
||||
var splice = 0;
|
||||
for (var i = 0; i < amdDefineDeps.length; i++) {
|
||||
var id = amdDefineDeps[i];
|
||||
var index = setters.length;
|
||||
if (id === 'require') {
|
||||
depModules[i] = unsupportedRequire;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'module') {
|
||||
depModules[i] = module;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'exports') {
|
||||
depModules[i] = exports;
|
||||
splice++;
|
||||
}
|
||||
else {
|
||||
createSetter(i);
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps[index] = id;
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps.length -= splice;
|
||||
var amdExec = amdDefineExec;
|
||||
return [amdDefineDeps, function (_export, _context) {
|
||||
_export({ default: exports, __useDefault: true });
|
||||
return {
|
||||
setters: setters,
|
||||
execute: function () {
|
||||
module.uri = _context.meta.url;
|
||||
var amdResult = amdExec.apply(exports, depModules);
|
||||
if (amdResult !== undefined)
|
||||
module.exports = amdResult;
|
||||
_export(module.exports);
|
||||
_export('default', module.exports);
|
||||
}
|
||||
};
|
||||
}];
|
||||
|
||||
// needed to avoid iteration scope issues
|
||||
function createSetter(idx) {
|
||||
setters.push(function (ns) {
|
||||
depModules[idx] = ns.__useDefault ? ns.default : ns;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
global.define = function (arg1, arg2, arg3) {
|
||||
var isNamedRegister = typeof arg1 === 'string';
|
||||
var name = isNamedRegister ? arg1 : null;
|
||||
var depArg = isNamedRegister ? arg2 : arg1;
|
||||
var execArg = isNamedRegister ? arg3 : arg2;
|
||||
|
||||
// The System.register(deps, exec) arguments
|
||||
var deps, exec;
|
||||
|
||||
// define([], function () {})
|
||||
if (Array.isArray(depArg)) {
|
||||
deps = depArg;
|
||||
exec = execArg;
|
||||
}
|
||||
// define({})
|
||||
else if (typeof depArg === 'object') {
|
||||
deps = [];
|
||||
exec = function () { return depArg };
|
||||
}
|
||||
// define(function () {})
|
||||
else if (typeof depArg === 'function') {
|
||||
deps = requireExportsModule;
|
||||
exec = depArg;
|
||||
} else {
|
||||
throw Error(errMsg(9, 'Invalid call to AMD define()'));
|
||||
}
|
||||
|
||||
var amdRegister = createAMDRegister(deps, exec);
|
||||
|
||||
if (isNamedRegister) {
|
||||
if (System.registerRegistry) {
|
||||
System.registerRegistry[name] = amdRegister;
|
||||
System.register(name, amdRegister[0], amdRegister[1]);
|
||||
} else
|
||||
console.warn(errMsg('W6', 'Include named-register.js for full named define support'));
|
||||
// TODO: create new warning number and documentation for using named define without named-register extra
|
||||
System.register(amdRegister[0], amdRegister[1]);
|
||||
} else
|
||||
System.register(amdRegister[0], amdRegister[1]);
|
||||
};
|
||||
global.define.amd = {};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(){function e(e,r){return(r||"")+" (SystemJS Error#"+e+" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#"+e+")"}!function(r){function t(){throw Error(e(5,"AMD require not supported."))}var n=["require","exports","module"];r.define=function(r,o,s){var u,i,f="string"==typeof r,l=f?r:null,a=f?o:r,d=f?s:o;if(Array.isArray(a))u=a,i=d;else if("object"==typeof a)u=[],i=function(){return a};else{if("function"!=typeof a)throw Error(e(9,"Invalid call to AMD define()"));u=n,i=a}var c=function(e,r){function n(e){i.push((function(r){u[e]=r.__useDefault?r.default:r}))}for(var o={},s={exports:o},u=[],i=[],f=0,l=0;l<e.length;l++){var a=e[l],d=i.length;"require"===a?(u[l]=t,f++):"module"===a?(u[l]=s,f++):"exports"===a?(u[l]=o,f++):n(l),f&&(e[d]=a)}f&&(e.length-=f);var c=r;return[e,function(e,r){return e({default:o,__useDefault:!0}),{setters:i,execute:function(){s.uri=r.meta.url;var t=c.apply(o,u);void 0!==t&&(s.exports=t),e(s.exports),e("default",s.exports)}}}]}(u,i);f?(System.registerRegistry?(System.registerRegistry[l]=c,System.register(l,c[0],c[1])):console.warn(e("W6","Include named-register.js for full named define support")),System.register(c[0],c[1])):System.register(c[0],c[1])},r.define.amd={}}("undefined"!=typeof self?self:global)}();
|
||||
//# sourceMappingURL=amd.min.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+20
@@ -0,0 +1,20 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Support for live DOM updating import maps
|
||||
*/
|
||||
new MutationObserver(function (mutations) {
|
||||
for (var i = 0; i < mutations.length; i++) {
|
||||
var mutation = mutations[i];
|
||||
if (mutation.type === 'childList')
|
||||
for (var j = 0; j < mutation.addedNodes.length; j++) {
|
||||
var addedNode = mutation.addedNodes[j];
|
||||
if (addedNode.tagName === 'SCRIPT' && addedNode.type === 'systemjs-importmap' && !addedNode.sp) {
|
||||
System.prepareImport(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}).observe(document, { childList: true, subtree: true });
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
new MutationObserver((function(e){for(var t=0;t<e.length;t++){var r=e[t];if("childList"===r.type)for(var a=0;a<r.addedNodes.length;a++){var s=r.addedNodes[a];if("SCRIPT"===s.tagName&&"systemjs-importmap"===s.type&&!s.sp){System.prepareImport(!0);break}}}})).observe(document,{childList:!0,subtree:!0});
|
||||
//# sourceMappingURL=dynamic-import-maps.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["MutationObserver","mutations","i","length","mutation","type","j","addedNodes","addedNode","tagName","sp","System","prepareImport","observe","document","childList","subtree"],"sources":["dynamic-import-maps.js"],"sourcesContent":["(function () {\n\n /*\r\n * Support for live DOM updating import maps\r\n */\r\n new MutationObserver(function (mutations) {\r\n for (var i = 0; i < mutations.length; i++) {\r\n var mutation = mutations[i];\r\n if (mutation.type === 'childList')\r\n for (var j = 0; j < mutation.addedNodes.length; j++) {\r\n var addedNode = mutation.addedNodes[j];\r\n if (addedNode.tagName === 'SCRIPT' && addedNode.type === 'systemjs-importmap' && !addedNode.sp) {\r\n System.prepareImport(true);\r\n break;\r\n }\r\n }\r\n }\r\n }).observe(document, { childList: true, subtree: true });\n\n})();\n"],"mappings":"AAKE,IAAIA,kBAAiB,SAAUC,GAC7B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAUE,OAAQD,IAAK,CACzC,IAAIE,EAAWH,EAAUC,GACzB,GAAsB,cAAlBE,EAASC,KACb,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAASG,WAAWJ,OAAQG,IAAK,CACnD,IAAIE,EAAYJ,EAASG,WAAWD,GACpC,GAA0B,WAAtBE,EAAUC,SAA2C,uBAAnBD,EAAUH,OAAkCG,EAAUE,GAAI,CAC9FC,OAAOC,eAAc,GACrB,KACF,CACF,CACF,CACF,IAAGC,QAAQC,SAAU,CAAEC,WAAW,EAAMC,SAAS"}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* SystemJS global script loading support
|
||||
* Extra for the s.js build only
|
||||
* (Included by default in system.js build)
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
// safari unpredictably lists some new globals first or second in object order
|
||||
var firstGlobalProp, secondGlobalProp, lastGlobalProp;
|
||||
function getGlobalProp (useFirstGlobalProp) {
|
||||
var cnt = 0;
|
||||
var foundLastProp, result;
|
||||
for (var p in global) {
|
||||
// do not check frames cause it could be removed during import
|
||||
if (shouldSkipProperty(p))
|
||||
continue;
|
||||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)
|
||||
return p;
|
||||
if (foundLastProp) {
|
||||
lastGlobalProp = p;
|
||||
result = useFirstGlobalProp && result || p;
|
||||
}
|
||||
else {
|
||||
foundLastProp = p === lastGlobalProp;
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function noteGlobalProps () {
|
||||
// alternatively Object.keys(global).pop()
|
||||
// but this may be faster (pending benchmarks)
|
||||
firstGlobalProp = secondGlobalProp = undefined;
|
||||
for (var p in global) {
|
||||
// do not check frames cause it could be removed during import
|
||||
if (shouldSkipProperty(p))
|
||||
continue;
|
||||
if (!firstGlobalProp)
|
||||
firstGlobalProp = p;
|
||||
else if (!secondGlobalProp)
|
||||
secondGlobalProp = p;
|
||||
lastGlobalProp = p;
|
||||
}
|
||||
return lastGlobalProp;
|
||||
}
|
||||
|
||||
var impt = systemJSPrototype.import;
|
||||
systemJSPrototype.import = function (id, parentUrl, meta) {
|
||||
noteGlobalProps();
|
||||
return impt.call(this, id, parentUrl, meta);
|
||||
};
|
||||
|
||||
var emptyInstantiation = [[], function () { return {} }];
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var lastRegister = getRegister.call(this);
|
||||
if (lastRegister)
|
||||
return lastRegister;
|
||||
|
||||
// no registration -> attempt a global detection as difference from snapshot
|
||||
// when multiple globals, we take the global value to be the last defined new global object property
|
||||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
|
||||
// note in Edge, deleting and re-adding a global does not change its ordering
|
||||
var globalProp = getGlobalProp(this.firstGlobalProp);
|
||||
if (!globalProp)
|
||||
return emptyInstantiation;
|
||||
|
||||
var globalExport;
|
||||
try {
|
||||
globalExport = global[globalProp];
|
||||
}
|
||||
catch (e) {
|
||||
return emptyInstantiation;
|
||||
}
|
||||
|
||||
return [[], function (_export) {
|
||||
return {
|
||||
execute: function () {
|
||||
_export(globalExport);
|
||||
_export({ default: globalExport, __useDefault: true });
|
||||
}
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
var isIE11 = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Trident') !== -1;
|
||||
|
||||
function shouldSkipProperty(p) {
|
||||
return !global.hasOwnProperty(p)
|
||||
|| !isNaN(p) && p < global.length
|
||||
|| isIE11 && global[p] && typeof window !== 'undefined' && global[p].parent === window;
|
||||
}
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(t){function n(n){return!t.hasOwnProperty(n)||!isNaN(n)&&n<t.length||c&&t[n]&&"undefined"!=typeof window&&t[n].parent===window}var r,e,i,o=t.System.constructor.prototype,u=o.import;o.import=function(o,f,a){return function(){for(var o in r=e=void 0,t)n(o)||(r?e||(e=o):r=o,i=o)}(),u.call(this,o,f,a)};var f=[[],function(){return{}}],a=o.getRegister;o.getRegister=function(){var o=a.call(this);if(o)return o;var u,c=function(o){var u,f,a=0;for(var c in t)if(!n(c)){if(0===a&&c!==r||1===a&&c!==e)return c;u?(i=c,f=o&&f||c):u=c===i,a++}return f}(this.firstGlobalProp);if(!c)return f;try{u=t[c]}catch(s){return f}return[[],function(t){return{execute:function(){t(u),t({default:u,__useDefault:!0})}}}]};var c="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=global.min.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+191
@@ -0,0 +1,191 @@
|
||||
(function () {
|
||||
|
||||
var hasDocument = typeof document !== 'undefined';
|
||||
|
||||
var baseUrl;
|
||||
|
||||
if (hasDocument) {
|
||||
var baseEl = document.querySelector('base[href]');
|
||||
if (baseEl)
|
||||
baseUrl = baseEl.href;
|
||||
}
|
||||
|
||||
if (!baseUrl && typeof location !== 'undefined') {
|
||||
baseUrl = location.href.split('#')[0].split('?')[0];
|
||||
var lastSepIndex = baseUrl.lastIndexOf('/');
|
||||
if (lastSepIndex !== -1)
|
||||
baseUrl = baseUrl.slice(0, lastSepIndex + 1);
|
||||
}
|
||||
|
||||
var backslashRegEx = /\\/g;
|
||||
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
|
||||
if (relUrl.indexOf('\\') !== -1)
|
||||
relUrl = relUrl.replace(backslashRegEx, '/');
|
||||
// protocol-relative
|
||||
if (relUrl[0] === '/' && relUrl[1] === '/') {
|
||||
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
|
||||
}
|
||||
// relative-url
|
||||
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
|
||||
relUrl.length === 1 && (relUrl += '/')) ||
|
||||
relUrl[0] === '/') {
|
||||
var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
|
||||
// Disabled, but these cases will give inconsistent results for deep backtracking
|
||||
//if (parentUrl[parentProtocol.length] !== '/')
|
||||
// throw Error('Cannot resolve');
|
||||
// read pathname from parent URL
|
||||
// pathname taken to be part after leading "/"
|
||||
var pathname;
|
||||
if (parentUrl[parentProtocol.length + 1] === '/') {
|
||||
// resolving to a :// so we need to read out the auth and host
|
||||
if (parentProtocol !== 'file:') {
|
||||
pathname = parentUrl.slice(parentProtocol.length + 2);
|
||||
pathname = pathname.slice(pathname.indexOf('/') + 1);
|
||||
}
|
||||
else {
|
||||
pathname = parentUrl.slice(8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// resolving to :/ so pathname is the /... part
|
||||
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
|
||||
}
|
||||
|
||||
if (relUrl[0] === '/')
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
|
||||
|
||||
// join together and split for removal of .. and . segments
|
||||
// looping the string instead of anything fancy for perf reasons
|
||||
// '../../../../../z' resolved to 'x/y' is just 'z'
|
||||
var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
|
||||
|
||||
var output = [];
|
||||
var segmentIndex = -1;
|
||||
for (var i = 0; i < segmented.length; i++) {
|
||||
// busy reading a segment - only terminate on '/'
|
||||
if (segmentIndex !== -1) {
|
||||
if (segmented[i] === '/') {
|
||||
output.push(segmented.slice(segmentIndex, i + 1));
|
||||
segmentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// new segment - check if it is relative
|
||||
else if (segmented[i] === '.') {
|
||||
// ../ segment
|
||||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
|
||||
output.pop();
|
||||
i += 2;
|
||||
}
|
||||
// ./ segment
|
||||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
|
||||
i += 1;
|
||||
}
|
||||
else {
|
||||
// the start of a new segment as below
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// it is the start of a new segment
|
||||
else {
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// finish reading out the last segment
|
||||
if (segmentIndex !== -1)
|
||||
output.push(segmented.slice(segmentIndex));
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Import maps implementation
|
||||
*
|
||||
* To make lookups fast we pre-resolve the entire import map
|
||||
* and then match based on backtracked hash lookups
|
||||
*
|
||||
*/
|
||||
|
||||
function resolveUrl (relUrl, parentUrl) {
|
||||
return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
|
||||
}
|
||||
|
||||
/*
|
||||
* Loads JSON, CSS, Wasm module types based on file extension
|
||||
* filters and content type verifications
|
||||
*/
|
||||
(function(global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
var moduleTypesRegEx = /^[^#?]+\.(css|html|json|wasm)([?#].*)?$/;
|
||||
var _shouldFetch = systemJSPrototype.shouldFetch.bind(systemJSPrototype);
|
||||
systemJSPrototype.shouldFetch = function (url) {
|
||||
return _shouldFetch(url) || moduleTypesRegEx.test(url);
|
||||
};
|
||||
|
||||
var jsonContentType = /^application\/json(;|$)/;
|
||||
var cssContentType = /^text\/css(;|$)/;
|
||||
var wasmContentType = /^application\/wasm(;|$)/;
|
||||
|
||||
var fetch = systemJSPrototype.fetch;
|
||||
systemJSPrototype.fetch = function (url, options) {
|
||||
return fetch(url, options)
|
||||
.then(function (res) {
|
||||
if (options.passThrough)
|
||||
return res;
|
||||
|
||||
if (!res.ok)
|
||||
return res;
|
||||
var contentType = res.headers.get('content-type');
|
||||
if (jsonContentType.test(contentType))
|
||||
return res.json()
|
||||
.then(function (json) {
|
||||
return new Response(new Blob([
|
||||
'System.register([],function(e){return{execute:function(){e("default",' + JSON.stringify(json) + ')}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
if (cssContentType.test(contentType))
|
||||
return res.text()
|
||||
.then(function (source) {
|
||||
source = source.replace(/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g, function (match, quotes, relUrl1, relUrl2) {
|
||||
return ['url(', quotes, resolveUrl(relUrl1 || relUrl2, url), quotes, ')'].join('');
|
||||
});
|
||||
return new Response(new Blob([
|
||||
'System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync(' + JSON.stringify(source) + ');e("default",s)}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
if (wasmContentType.test(contentType))
|
||||
return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile))
|
||||
.then(function (module) {
|
||||
if (!global.System.wasmModules)
|
||||
global.System.wasmModules = Object.create(null);
|
||||
global.System.wasmModules[url] = module;
|
||||
// we can only set imports if supported (eg early Safari doesnt support)
|
||||
var deps = [];
|
||||
var setterSources = [];
|
||||
if (WebAssembly.Module.imports)
|
||||
WebAssembly.Module.imports(module).forEach(function (impt) {
|
||||
var key = JSON.stringify(impt.module);
|
||||
if (deps.indexOf(key) === -1) {
|
||||
deps.push(key);
|
||||
setterSources.push('function(m){i[' + key + ']=m}');
|
||||
}
|
||||
});
|
||||
return new Response(new Blob([
|
||||
'System.register([' + deps.join(',') + '],function(e){var i={};return{setters:[' + setterSources.join(',') +
|
||||
'],execute:function(){return WebAssembly.instantiate(System.wasmModules[' + JSON.stringify(url) +
|
||||
'],i).then(function(m){e(m.exports)})}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
return res;
|
||||
});
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(){function e(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(i,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,s=t.slice(0,t.indexOf(":")+1);if(n="/"===t[s.length+1]?"file:"!==s?(n=t.slice(s.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(s.length+("/"===t[s.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var r=n.slice(0,n.lastIndexOf("/")+1)+e,l=[],o=-1,c=0;c<r.length;c++)-1!==o?"/"===r[c]&&(l.push(r.slice(o,c+1)),o=-1):"."===r[c]?"."!==r[c+1]||"/"!==r[c+2]&&c+2!==r.length?"/"===r[c+1]||c+1===r.length?c+=1:o=c:(l.pop(),c+=2):o=c;return-1!==o&&l.push(r.slice(o)),t.slice(0,t.length-n.length)+l.join("")}}var t;if("undefined"!=typeof document){var n=document.querySelector("base[href]");n&&(t=n.href)}if(!t&&"undefined"!=typeof location){var s=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==s&&(t=t.slice(0,s+1))}var i=/\\/g;!function(t){var n=t.System.constructor.prototype,s=/^[^#?]+\.(css|html|json|wasm)([?#].*)?$/,i=n.shouldFetch.bind(n);n.shouldFetch=function(e){return i(e)||s.test(e)};var r=/^application\/json(;|$)/,l=/^text\/css(;|$)/,o=/^application\/wasm(;|$)/,c=n.fetch;n.fetch=function(n,s){return c(n,s).then((function(i){if(s.passThrough)return i;if(!i.ok)return i;var c=i.headers.get("content-type");return r.test(c)?i.json().then((function(e){return new Response(new Blob(['System.register([],function(e){return{execute:function(){e("default",'+JSON.stringify(e)+")}}})"],{type:"application/javascript"}))})):l.test(c)?i.text().then((function(t){return t=t.replace(/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g,(function(t,s,i,r){return["url(",s,(l=i||r,o=n,e(l,o)||(-1!==l.indexOf(":")?l:e("./"+l,o))),s,")"].join("");var l,o})),new Response(new Blob(["System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync("+JSON.stringify(t)+');e("default",s)}}})'],{type:"application/javascript"}))})):o.test(c)?(WebAssembly.compileStreaming?WebAssembly.compileStreaming(i):i.arrayBuffer().then(WebAssembly.compile)).then((function(e){t.System.wasmModules||(t.System.wasmModules=Object.create(null)),t.System.wasmModules[n]=e;var s=[],i=[];return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var t=JSON.stringify(e.module);-1===s.indexOf(t)&&(s.push(t),i.push("function(m){i["+t+"]=m}"))})),new Response(new Blob(["System.register(["+s.join(",")+"],function(e){var i={};return{setters:["+i.join(",")+"],execute:function(){return WebAssembly.instantiate(System.wasmModules["+JSON.stringify(n)+"],i).then(function(m){e(m.exports)})}}})"],{type:"application/javascript"}))})):i}))}}("undefined"!=typeof self?self:global)}();
|
||||
//# sourceMappingURL=module-types.min.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+67
@@ -0,0 +1,67 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Named exports support for legacy module formats in SystemJS 2.0
|
||||
*
|
||||
* Note: This extra is deprecated as the behaviour is now the default in core,
|
||||
* so will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
// hook System.register to know the last declaration binding
|
||||
var lastRegisterDeclare;
|
||||
var systemRegister = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (name, deps, declare) {
|
||||
lastRegisterDeclare = typeof name === 'string' ? declare : deps;
|
||||
systemRegister.apply(this, arguments);
|
||||
};
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var register = getRegister.call(this);
|
||||
// if it is an actual System.register call, then its ESM
|
||||
// -> dont add named exports
|
||||
if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)
|
||||
return register;
|
||||
|
||||
// otherwise it was provided by a custom instantiator
|
||||
// -> extend the registration with named exports support
|
||||
var registerDeclare = register[1];
|
||||
register[1] = function (_export, _context) {
|
||||
// hook the _export function to note the default export
|
||||
var defaultExport, hasDefaultExport = false;
|
||||
var declaration = registerDeclare.call(this, function (name, value) {
|
||||
if (typeof name === 'object' && name && name.__useDefault)
|
||||
defaultExport = name.default, hasDefaultExport = true;
|
||||
else if (name === 'default')
|
||||
defaultExport = value;
|
||||
else if (name === '__useDefault')
|
||||
hasDefaultExport = true;
|
||||
_export(name, value);
|
||||
}, _context);
|
||||
// hook the execute function
|
||||
var execute = declaration.execute;
|
||||
if (execute)
|
||||
declaration.execute = function () {
|
||||
execute.call(this);
|
||||
// do a bulk export of the default export object
|
||||
// to export all its names as named exports
|
||||
|
||||
if (hasDefaultExport)
|
||||
for (var exportName in defaultExport) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(defaultExport, exportName) // Check if epoxrt name is not inherited, safe for Object.create(null)
|
||||
&& exportName !== 'default' // default is not a named export
|
||||
) {
|
||||
_export(exportName, defaultExport[exportName]);
|
||||
}
|
||||
}
|
||||
};
|
||||
return declaration;
|
||||
};
|
||||
return register;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(t){var e,r=t.System.constructor.prototype,n=r.register;r.register=function(t,r,f){e="string"==typeof t?f:r,n.apply(this,arguments)};var f=r.getRegister;r.getRegister=function(){var t=f.call(this);if(!t||t[1]===e||0===t[1].length)return t;var r=t[1];return t[1]=function(t,e){var n,f=!1,u=r.call(this,(function(e,r){"object"==typeof e&&e&&e.__useDefault?(n=e.default,f=!0):"default"===e?n=r:"__useDefault"===e&&(f=!0),t(e,r)}),e),i=u.execute;return i&&(u.execute=function(){if(i.call(this),f)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&"default"!==e&&t(e,n[e])}),u},t}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=named-exports.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","lastRegisterDeclare","systemJSPrototype","System","constructor","prototype","systemRegister","register","name","deps","declare","apply","this","arguments","getRegister","call","length","registerDeclare","_export","_context","defaultExport","hasDefaultExport","declaration","value","__useDefault","default","execute","exportName","Object","hasOwnProperty","self"],"sources":["named-exports.js"],"sourcesContent":["(function () {\n\n /*\r\n * Named exports support for legacy module formats in SystemJS 2.0\r\n * \r\n * Note: This extra is deprecated as the behaviour is now the default in core,\r\n * so will be removed in the next major.\r\n */\r\n (function (global) {\r\n var systemJSPrototype = global.System.constructor.prototype;\r\n\r\n // hook System.register to know the last declaration binding\r\n var lastRegisterDeclare;\r\n var systemRegister = systemJSPrototype.register;\r\n systemJSPrototype.register = function (name, deps, declare) {\r\n lastRegisterDeclare = typeof name === 'string' ? declare : deps;\r\n systemRegister.apply(this, arguments);\r\n };\r\n\r\n var getRegister = systemJSPrototype.getRegister;\r\n systemJSPrototype.getRegister = function () {\r\n var register = getRegister.call(this);\r\n // if it is an actual System.register call, then its ESM\r\n // -> dont add named exports\r\n if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)\r\n return register;\r\n\r\n // otherwise it was provided by a custom instantiator\r\n // -> extend the registration with named exports support\r\n var registerDeclare = register[1];\r\n register[1] = function (_export, _context) {\r\n // hook the _export function to note the default export\r\n var defaultExport, hasDefaultExport = false;\r\n var declaration = registerDeclare.call(this, function (name, value) {\r\n if (typeof name === 'object' && name && name.__useDefault)\r\n defaultExport = name.default, hasDefaultExport = true;\r\n else if (name === 'default')\r\n defaultExport = value;\r\n else if (name === '__useDefault')\r\n hasDefaultExport = true;\r\n _export(name, value);\r\n }, _context);\r\n // hook the execute function\r\n var execute = declaration.execute;\r\n if (execute)\r\n declaration.execute = function () {\r\n execute.call(this);\r\n // do a bulk export of the default export object\r\n // to export all its names as named exports\r\n\r\n if (hasDefaultExport)\r\n for (var exportName in defaultExport) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(defaultExport, exportName) // Check if epoxrt name is not inherited, safe for Object.create(null)\r\n && exportName !== 'default' // default is not a named export\r\n ) {\r\n _export(exportName, defaultExport[exportName]);\r\n }\r\n }\r\n };\r\n return declaration;\r\n };\r\n return register;\r\n };\r\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAQE,SAAWA,GACT,IAGIC,EAHAC,EAAoBF,EAAOG,OAAOC,YAAYC,UAI9CC,EAAiBJ,EAAkBK,SACvCL,EAAkBK,SAAW,SAAUC,EAAMC,EAAMC,GACjDT,EAAsC,iBAATO,EAAoBE,EAAUD,EAC3DH,EAAeK,MAAMC,KAAMC,UAC7B,EAEA,IAAIC,EAAcZ,EAAkBY,YACpCZ,EAAkBY,YAAc,WAC9B,IAAIP,EAAWO,EAAYC,KAAKH,MAGhC,IAAKL,GAAYA,EAAS,KAAON,GAA8C,IAAvBM,EAAS,GAAGS,OAClE,OAAOT,EAIT,IAAIU,EAAkBV,EAAS,GAiC/B,OAhCAA,EAAS,GAAK,SAAUW,EAASC,GAE/B,IAAIC,EAAeC,GAAmB,EAClCC,EAAcL,EAAgBF,KAAKH,MAAM,SAAUJ,EAAMe,GACvC,iBAATf,GAAqBA,GAAQA,EAAKgB,cAC3CJ,EAAgBZ,EAAKiB,QAASJ,GAAmB,GACjC,YAATb,EACPY,EAAgBG,EACA,iBAATf,IACPa,GAAmB,GACrBH,EAAQV,EAAMe,EAChB,GAAGJ,GAECO,EAAUJ,EAAYI,QAiB1B,OAhBIA,IACFJ,EAAYI,QAAU,WAKpB,GAJAA,EAAQX,KAAKH,MAITS,EACF,IAAK,IAAIM,KAAcP,EAEnBQ,OAAOvB,UAAUwB,eAAed,KAAKK,EAAgBO,IACnC,YAAfA,GAEHT,EAAQS,EAAYP,EAAcO,GAG1C,GACKL,CACT,EACOf,CACT,CACD,CAxDD,CAwDmB,oBAATuB,KAAuBA,KAAO9B"}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* SystemJS named register extension
|
||||
* Supports System.register('name', [..deps..], function (_export, _context) { ... })
|
||||
*
|
||||
* Names are written to the registry as-is
|
||||
* System.register('x', ...) can be imported as System.import('x')
|
||||
*/
|
||||
(function (global) {
|
||||
var System = global.System;
|
||||
setRegisterRegistry(System);
|
||||
var systemJSPrototype = System.constructor.prototype;
|
||||
var constructor = System.constructor;
|
||||
var SystemJS = function () {
|
||||
constructor.call(this);
|
||||
setRegisterRegistry(this);
|
||||
};
|
||||
SystemJS.prototype = systemJSPrototype;
|
||||
System.constructor = SystemJS;
|
||||
|
||||
var firstNamedDefine, firstName;
|
||||
|
||||
function setRegisterRegistry(systemInstance) {
|
||||
systemInstance.registerRegistry = Object.create(null);
|
||||
systemInstance.namedRegisterAliases = Object.create(null);
|
||||
}
|
||||
|
||||
var register = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (name, deps, declare, metas) {
|
||||
if (typeof name !== 'string')
|
||||
return register.apply(this, arguments);
|
||||
var define = [deps, declare, metas];
|
||||
this.registerRegistry[name] = define;
|
||||
if (!firstNamedDefine) {
|
||||
firstNamedDefine = define;
|
||||
firstName = name;
|
||||
}
|
||||
Promise.resolve().then(function () {
|
||||
firstNamedDefine = null;
|
||||
firstName = null;
|
||||
});
|
||||
return register.apply(this, [deps, declare, metas]);
|
||||
};
|
||||
|
||||
var resolve = systemJSPrototype.resolve;
|
||||
systemJSPrototype.resolve = function (id, parentURL) {
|
||||
try {
|
||||
// Prefer import map (or other existing) resolution over the registerRegistry
|
||||
return resolve.call(this, id, parentURL);
|
||||
} catch (err) {
|
||||
if (id in this.registerRegistry) {
|
||||
return this.namedRegisterAliases[id] || id;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl, meta) {
|
||||
var result = this.registerRegistry[url];
|
||||
if (result) {
|
||||
this.registerRegistry[url] = null;
|
||||
return result;
|
||||
} else {
|
||||
return instantiate.call(this, url, firstParentUrl, meta);
|
||||
}
|
||||
};
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function (url) {
|
||||
// Calling getRegister() because other extras need to know it was called so they can perform side effects
|
||||
var register = getRegister.call(this, url);
|
||||
|
||||
if (firstName && url) {
|
||||
this.namedRegisterAliases[firstName] = url;
|
||||
}
|
||||
var result = firstNamedDefine || register;
|
||||
firstNamedDefine = null;
|
||||
firstName = null;
|
||||
return result;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(t){function e(t){t.registerRegistry=Object.create(null),t.namedRegisterAliases=Object.create(null)}var r=t.System;e(r);var i,s,n=r.constructor.prototype,l=r.constructor,a=function(){l.call(this),e(this)};a.prototype=n,r.constructor=a;var o=n.register;n.register=function(t,e,r,n){if("string"!=typeof t)return o.apply(this,arguments);var l=[e,r,n];return this.registerRegistry[t]=l,i||(i=l,s=t),Promise.resolve().then((function(){i=null,s=null})),o.apply(this,[e,r,n])};var u=n.resolve;n.resolve=function(t,e){try{return u.call(this,t,e)}catch(r){if(t in this.registerRegistry)return this.namedRegisterAliases[t]||t;throw r}};var c=n.instantiate;n.instantiate=function(t,e,r){var i=this.registerRegistry[t];return i?(this.registerRegistry[t]=null,i):c.call(this,t,e,r)};var g=n.getRegister;n.getRegister=function(t){var e=g.call(this,t);s&&t&&(this.namedRegisterAliases[s]=t);var r=i||e;return i=null,s=null,r}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=named-register.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","setRegisterRegistry","systemInstance","registerRegistry","Object","create","namedRegisterAliases","System","firstNamedDefine","firstName","systemJSPrototype","constructor","prototype","SystemJS","call","this","register","name","deps","declare","metas","apply","arguments","define","Promise","resolve","then","id","parentURL","err","instantiate","url","firstParentUrl","meta","result","getRegister","self"],"sources":["named-register.js"],"sourcesContent":["(function () {\n\n /*\r\n * SystemJS named register extension\r\n * Supports System.register('name', [..deps..], function (_export, _context) { ... })\r\n *\r\n * Names are written to the registry as-is\r\n * System.register('x', ...) can be imported as System.import('x')\r\n */\r\n (function (global) {\r\n var System = global.System;\r\n setRegisterRegistry(System);\r\n var systemJSPrototype = System.constructor.prototype;\r\n var constructor = System.constructor;\r\n var SystemJS = function () {\r\n constructor.call(this);\r\n setRegisterRegistry(this);\r\n };\r\n SystemJS.prototype = systemJSPrototype;\r\n System.constructor = SystemJS;\r\n\r\n var firstNamedDefine, firstName;\r\n\r\n function setRegisterRegistry(systemInstance) {\r\n systemInstance.registerRegistry = Object.create(null);\r\n systemInstance.namedRegisterAliases = Object.create(null);\r\n }\r\n\r\n var register = systemJSPrototype.register;\r\n systemJSPrototype.register = function (name, deps, declare, metas) {\r\n if (typeof name !== 'string')\r\n return register.apply(this, arguments);\r\n var define = [deps, declare, metas];\r\n this.registerRegistry[name] = define;\r\n if (!firstNamedDefine) {\r\n firstNamedDefine = define;\r\n firstName = name;\r\n }\r\n Promise.resolve().then(function () {\r\n firstNamedDefine = null;\r\n firstName = null;\r\n });\r\n return register.apply(this, [deps, declare, metas]);\r\n };\r\n\r\n var resolve = systemJSPrototype.resolve;\r\n systemJSPrototype.resolve = function (id, parentURL) {\r\n try {\r\n // Prefer import map (or other existing) resolution over the registerRegistry\r\n return resolve.call(this, id, parentURL);\r\n } catch (err) {\r\n if (id in this.registerRegistry) {\r\n return this.namedRegisterAliases[id] || id;\r\n }\r\n throw err;\r\n }\r\n };\r\n\r\n var instantiate = systemJSPrototype.instantiate;\r\n systemJSPrototype.instantiate = function (url, firstParentUrl, meta) {\r\n var result = this.registerRegistry[url];\r\n if (result) {\r\n this.registerRegistry[url] = null;\r\n return result;\r\n } else {\r\n return instantiate.call(this, url, firstParentUrl, meta);\r\n }\r\n };\r\n\r\n var getRegister = systemJSPrototype.getRegister;\r\n systemJSPrototype.getRegister = function (url) {\r\n // Calling getRegister() because other extras need to know it was called so they can perform side effects\r\n var register = getRegister.call(this, url);\r\n\r\n if (firstName && url) {\r\n this.namedRegisterAliases[firstName] = url;\r\n }\r\n var result = firstNamedDefine || register;\r\n firstNamedDefine = null;\r\n firstName = null;\r\n return result;\r\n };\r\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CASE,SAAWA,GAcT,SAASC,EAAoBC,GAC3BA,EAAeC,iBAAmBC,OAAOC,OAAO,MAChDH,EAAeI,qBAAuBF,OAAOC,OAAO,KACtD,CAhBA,IAAIE,EAASP,EAAOO,OACpBN,EAAoBM,GACpB,IASIC,EAAkBC,EATlBC,EAAoBH,EAAOI,YAAYC,UACvCD,EAAcJ,EAAOI,YACrBE,EAAW,WACbF,EAAYG,KAAKC,MACjBd,EAAoBc,KACtB,EACAF,EAASD,UAAYF,EACrBH,EAAOI,YAAcE,EASrB,IAAIG,EAAWN,EAAkBM,SACjCN,EAAkBM,SAAW,SAAUC,EAAMC,EAAMC,EAASC,GAC1D,GAAoB,iBAATH,EACT,OAAOD,EAASK,MAAMN,KAAMO,WAC9B,IAAIC,EAAS,CAACL,EAAMC,EAASC,GAU7B,OATAL,KAAKZ,iBAAiBc,GAAQM,EACzBf,IACHA,EAAmBe,EACnBd,EAAYQ,GAEdO,QAAQC,UAAUC,MAAK,WACrBlB,EAAmB,KACnBC,EAAY,IACd,IACOO,EAASK,MAAMN,KAAM,CAACG,EAAMC,EAASC,GAC9C,EAEA,IAAIK,EAAUf,EAAkBe,QAChCf,EAAkBe,QAAU,SAAUE,EAAIC,GACxC,IAEE,OAAOH,EAAQX,KAAKC,KAAMY,EAAIC,EAMhC,CALE,MAAOC,GACP,GAAIF,KAAMZ,KAAKZ,iBACb,OAAOY,KAAKT,qBAAqBqB,IAAOA,EAE1C,MAAME,CACR,CACF,EAEA,IAAIC,EAAcpB,EAAkBoB,YACpCpB,EAAkBoB,YAAc,SAAUC,EAAKC,EAAgBC,GAC7D,IAAIC,EAASnB,KAAKZ,iBAAiB4B,GACnC,OAAIG,GACFnB,KAAKZ,iBAAiB4B,GAAO,KACtBG,GAEAJ,EAAYhB,KAAKC,KAAMgB,EAAKC,EAAgBC,EAEvD,EAEA,IAAIE,EAAczB,EAAkByB,YACpCzB,EAAkByB,YAAc,SAAUJ,GAExC,IAAIf,EAAWmB,EAAYrB,KAAKC,KAAMgB,GAElCtB,GAAasB,IACfhB,KAAKT,qBAAqBG,GAAasB,GAEzC,IAAIG,EAAS1B,GAAoBQ,EAGjC,OAFAR,EAAmB,KACnBC,EAAY,KACLyB,CACT,CACD,CAzED,CAyEmB,oBAATE,KAAuBA,KAAOpC"}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS Error#" + errCode + " " + "https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for a "transform" loader interface
|
||||
*
|
||||
* Note: This extra is deprecated and will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, parent, meta) {
|
||||
if (url.slice(-5) === '.wasm')
|
||||
return instantiate.call(this, url, parent, meta);
|
||||
|
||||
var loader = this;
|
||||
return fetch(url, { credentials: 'same-origin' })
|
||||
.then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(errMsg(7, 'Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : '')));
|
||||
return res.text();
|
||||
})
|
||||
.then(function (source) {
|
||||
return loader.transform.call(this, url, source);
|
||||
})
|
||||
.then(function (source) {
|
||||
(0, eval)(source + '\n//# sourceURL=' + url);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
};
|
||||
|
||||
// Hookable transform function!
|
||||
systemJSPrototype.transform = function (_id, source) {
|
||||
return source;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(t){var r=t.System.constructor.prototype,e=r.instantiate;r.instantiate=function(t,r,n){if(".wasm"===t.slice(-5))return e.call(this,t,r,n);var s=this;return fetch(t,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw Error(("Fetch error: "+t.status+" "+t.statusText+(r?" loading from "+r:"")||"")+" (SystemJS Error#"+7+" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#7)");return t.text()})).then((function(r){return s.transform.call(this,t,r)})).then((function(r){return(0,eval)(r+"\n//# sourceURL="+t),s.getRegister(t)}))},r.transform=function(t,r){return r}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=transform.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","systemJSPrototype","System","constructor","prototype","instantiate","url","parent","meta","slice","call","this","loader","fetch","credentials","then","res","ok","Error","status","statusText","text","source","transform","eval","getRegister","_id","self"],"sources":["transform.js"],"sourcesContent":["(function () {\n\n function errMsg(errCode, msg) {\r\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://github.com/systemjs/systemjs/blob/main/docs/errors.md#\" + errCode + \")\";\r\n }\n\n /*\r\n * Support for a \"transform\" loader interface\r\n *\r\n * Note: This extra is deprecated and will be removed in the next major.\r\n */\r\n (function (global) {\r\n var systemJSPrototype = global.System.constructor.prototype;\r\n\r\n var instantiate = systemJSPrototype.instantiate;\r\n systemJSPrototype.instantiate = function (url, parent, meta) {\r\n if (url.slice(-5) === '.wasm')\r\n return instantiate.call(this, url, parent, meta);\r\n\r\n var loader = this;\r\n return fetch(url, { credentials: 'same-origin' })\r\n .then(function (res) {\r\n if (!res.ok)\r\n throw Error(errMsg(7, 'Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : '')));\r\n return res.text();\r\n })\r\n .then(function (source) {\r\n return loader.transform.call(this, url, source);\r\n })\r\n .then(function (source) {\r\n (0, eval)(source + '\\n//# sourceURL=' + url);\r\n return loader.getRegister(url);\r\n });\r\n };\r\n\r\n // Hookable transform function!\r\n systemJSPrototype.transform = function (_id, source) {\r\n return source;\r\n };\r\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAWE,SAAWA,GACT,IAAIC,EAAoBD,EAAOE,OAAOC,YAAYC,UAE9CC,EAAcJ,EAAkBI,YACpCJ,EAAkBI,YAAc,SAAUC,EAAKC,EAAQC,GACrD,GAAsB,UAAlBF,EAAIG,OAAO,GACb,OAAOJ,EAAYK,KAAKC,KAAML,EAAKC,EAAQC,GAE7C,IAAII,EAASD,KACb,OAAOE,MAAMP,EAAK,CAAEQ,YAAa,gBAChCC,MAAK,SAAUC,GACd,IAAKA,EAAIC,GACP,MAAMC,OAAgB,gBAAkBF,EAAIG,OAAS,IAAMH,EAAII,YAAcb,EAAS,iBAAmBA,EAAS,KApBzG,IAAM,oBAoBI,EApBlB,qEAqBH,OAAOS,EAAIK,MACb,IACCN,MAAK,SAAUO,GACd,OAAOV,EAAOW,UAAUb,KAAKC,KAAML,EAAKgB,EAC1C,IACCP,MAAK,SAAUO,GAEd,OADA,EAAIE,MAAMF,EAAS,mBAAqBhB,GACjCM,EAAOa,YAAYnB,EAC5B,GACF,EAGAL,EAAkBsB,UAAY,SAAUG,EAAKJ,GAC3C,OAAOA,CACT,CACD,CA5BD,CA4BmB,oBAATK,KAAuBA,KAAO3B"}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Interop for AMD modules to return the direct AMD binding instead of a
|
||||
* `{ default: amdModule }` object from `System.import`
|
||||
*
|
||||
* Note: This extra is deprecated and will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
var originalImport = systemJSPrototype.import;
|
||||
|
||||
systemJSPrototype.import = function () {
|
||||
return originalImport.apply(this, arguments).then(function (ns) {
|
||||
return ns.__useDefault ? ns.default : ns;
|
||||
});
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(t){var e=t.System.constructor.prototype,n=e.import;e.import=function(){return n.apply(this,arguments).then((function(t){return t.__useDefault?t.default:t}))}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=use-default.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","systemJSPrototype","System","constructor","prototype","originalImport","import","apply","this","arguments","then","ns","__useDefault","default","self"],"sources":["use-default.js"],"sourcesContent":["(function () {\n\n /*\r\n * Interop for AMD modules to return the direct AMD binding instead of a\r\n * `{ default: amdModule }` object from `System.import`\r\n * \r\n * Note: This extra is deprecated and will be removed in the next major.\r\n */\r\n (function (global) {\r\n var systemJSPrototype = global.System.constructor.prototype;\r\n var originalImport = systemJSPrototype.import;\r\n\r\n systemJSPrototype.import = function () {\r\n return originalImport.apply(this, arguments).then(function (ns) {\r\n return ns.__useDefault ? ns.default : ns;\r\n });\r\n };\r\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAQE,SAAWA,GACT,IAAIC,EAAoBD,EAAOE,OAAOC,YAAYC,UAC9CC,EAAiBJ,EAAkBK,OAEvCL,EAAkBK,OAAS,WACzB,OAAOD,EAAeE,MAAMC,KAAMC,WAAWC,MAAK,SAAUC,GAC1D,OAAOA,EAAGC,aAAeD,EAAGE,QAAUF,CACxC,GACF,CACD,CATD,CASmB,oBAATG,KAAuBA,KAAOd"}
|
||||
+744
@@ -0,0 +1,744 @@
|
||||
/*!
|
||||
* SJS 6.15.1
|
||||
*/
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
var hasSymbol = typeof Symbol !== 'undefined';
|
||||
var hasSelf = typeof self !== 'undefined';
|
||||
var hasDocument = typeof document !== 'undefined';
|
||||
|
||||
var envGlobal = hasSelf ? self : global;
|
||||
|
||||
var baseUrl;
|
||||
|
||||
if (hasDocument) {
|
||||
var baseEl = document.querySelector('base[href]');
|
||||
if (baseEl)
|
||||
baseUrl = baseEl.href;
|
||||
}
|
||||
|
||||
if (!baseUrl && typeof location !== 'undefined') {
|
||||
baseUrl = location.href.split('#')[0].split('?')[0];
|
||||
var lastSepIndex = baseUrl.lastIndexOf('/');
|
||||
if (lastSepIndex !== -1)
|
||||
baseUrl = baseUrl.slice(0, lastSepIndex + 1);
|
||||
}
|
||||
|
||||
var backslashRegEx = /\\/g;
|
||||
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
|
||||
if (relUrl.indexOf('\\') !== -1)
|
||||
relUrl = relUrl.replace(backslashRegEx, '/');
|
||||
// protocol-relative
|
||||
if (relUrl[0] === '/' && relUrl[1] === '/') {
|
||||
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
|
||||
}
|
||||
// relative-url
|
||||
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
|
||||
relUrl.length === 1 && (relUrl += '/')) ||
|
||||
relUrl[0] === '/') {
|
||||
var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
|
||||
// Disabled, but these cases will give inconsistent results for deep backtracking
|
||||
//if (parentUrl[parentProtocol.length] !== '/')
|
||||
// throw Error('Cannot resolve');
|
||||
// read pathname from parent URL
|
||||
// pathname taken to be part after leading "/"
|
||||
var pathname;
|
||||
if (parentUrl[parentProtocol.length + 1] === '/') {
|
||||
// resolving to a :// so we need to read out the auth and host
|
||||
if (parentProtocol !== 'file:') {
|
||||
pathname = parentUrl.slice(parentProtocol.length + 2);
|
||||
pathname = pathname.slice(pathname.indexOf('/') + 1);
|
||||
}
|
||||
else {
|
||||
pathname = parentUrl.slice(8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// resolving to :/ so pathname is the /... part
|
||||
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
|
||||
}
|
||||
|
||||
if (relUrl[0] === '/')
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
|
||||
|
||||
// join together and split for removal of .. and . segments
|
||||
// looping the string instead of anything fancy for perf reasons
|
||||
// '../../../../../z' resolved to 'x/y' is just 'z'
|
||||
var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
|
||||
|
||||
var output = [];
|
||||
var segmentIndex = -1;
|
||||
for (var i = 0; i < segmented.length; i++) {
|
||||
// busy reading a segment - only terminate on '/'
|
||||
if (segmentIndex !== -1) {
|
||||
if (segmented[i] === '/') {
|
||||
output.push(segmented.slice(segmentIndex, i + 1));
|
||||
segmentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// new segment - check if it is relative
|
||||
else if (segmented[i] === '.') {
|
||||
// ../ segment
|
||||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
|
||||
output.pop();
|
||||
i += 2;
|
||||
}
|
||||
// ./ segment
|
||||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
|
||||
i += 1;
|
||||
}
|
||||
else {
|
||||
// the start of a new segment as below
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// it is the start of a new segment
|
||||
else {
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// finish reading out the last segment
|
||||
if (segmentIndex !== -1)
|
||||
output.push(segmented.slice(segmentIndex));
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Import maps implementation
|
||||
*
|
||||
* To make lookups fast we pre-resolve the entire import map
|
||||
* and then match based on backtracked hash lookups
|
||||
*
|
||||
*/
|
||||
|
||||
function resolveUrl (relUrl, parentUrl) {
|
||||
return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
|
||||
}
|
||||
|
||||
function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {
|
||||
for (var p in packages) {
|
||||
var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;
|
||||
var rhs = packages[p];
|
||||
// package fallbacks not currently supported
|
||||
if (typeof rhs !== 'string')
|
||||
continue;
|
||||
var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);
|
||||
if (!mapped) {
|
||||
targetWarning('W1', p, rhs);
|
||||
}
|
||||
else
|
||||
outPackages[resolvedLhs] = mapped;
|
||||
}
|
||||
}
|
||||
|
||||
function resolveAndComposeImportMap (json, baseUrl, outMap) {
|
||||
if (json.imports)
|
||||
resolveAndComposePackages(json.imports, outMap.imports, baseUrl, outMap, null);
|
||||
|
||||
var u;
|
||||
for (u in json.scopes || {}) {
|
||||
var resolvedScope = resolveUrl(u, baseUrl);
|
||||
resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, outMap, resolvedScope);
|
||||
}
|
||||
|
||||
for (u in json.depcache || {})
|
||||
outMap.depcache[resolveUrl(u, baseUrl)] = json.depcache[u];
|
||||
|
||||
for (u in json.integrity || {})
|
||||
outMap.integrity[resolveUrl(u, baseUrl)] = json.integrity[u];
|
||||
}
|
||||
|
||||
function getMatch (path, matchObj) {
|
||||
if (matchObj[path])
|
||||
return path;
|
||||
var sepIndex = path.length;
|
||||
do {
|
||||
var segment = path.slice(0, sepIndex + 1);
|
||||
if (segment in matchObj)
|
||||
return segment;
|
||||
} while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)
|
||||
}
|
||||
|
||||
function applyPackages (id, packages) {
|
||||
var pkgName = getMatch(id, packages);
|
||||
if (pkgName) {
|
||||
var pkg = packages[pkgName];
|
||||
if (pkg === null) return;
|
||||
if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/') {
|
||||
targetWarning('W2', pkgName, pkg);
|
||||
}
|
||||
else
|
||||
return pkg + id.slice(pkgName.length);
|
||||
}
|
||||
}
|
||||
|
||||
function targetWarning (code, match, target, msg) {
|
||||
console.warn(errMsg(code, [target, match].join(', ') ));
|
||||
}
|
||||
|
||||
function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {
|
||||
var scopes = importMap.scopes;
|
||||
var scopeUrl = parentUrl && getMatch(parentUrl, scopes);
|
||||
while (scopeUrl) {
|
||||
var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);
|
||||
if (packageResolution)
|
||||
return packageResolution;
|
||||
scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), scopes);
|
||||
}
|
||||
return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;
|
||||
}
|
||||
|
||||
/*
|
||||
* SystemJS Core
|
||||
*
|
||||
* Provides
|
||||
* - System.import
|
||||
* - System.register support for
|
||||
* live bindings, function hoisting through circular references,
|
||||
* reexports, dynamic import, import.meta.url, top-level await
|
||||
* - System.getRegister to get the registration
|
||||
* - Symbol.toStringTag support in Module objects
|
||||
* - Hookable System.createContext to customize import.meta
|
||||
* - System.onload(err, id, deps) handler for tracing / hot-reloading
|
||||
*
|
||||
* Core comes with no System.prototype.resolve or
|
||||
* System.prototype.instantiate implementations
|
||||
*/
|
||||
|
||||
var toStringTag = hasSymbol && Symbol.toStringTag;
|
||||
var REGISTRY = hasSymbol ? Symbol() : '@';
|
||||
|
||||
function SystemJS () {
|
||||
this[REGISTRY] = {};
|
||||
}
|
||||
|
||||
var systemJSPrototype = SystemJS.prototype;
|
||||
|
||||
systemJSPrototype.import = function (id, parentUrl, meta) {
|
||||
var loader = this;
|
||||
(parentUrl && typeof parentUrl === 'object') && (meta = parentUrl, parentUrl = undefined);
|
||||
return Promise.resolve(loader.prepareImport())
|
||||
.then(function() {
|
||||
return loader.resolve(id, parentUrl, meta);
|
||||
})
|
||||
.then(function (id) {
|
||||
var load = getOrCreateLoad(loader, id, undefined, meta);
|
||||
return load.C || topLevelLoad(loader, load);
|
||||
});
|
||||
};
|
||||
|
||||
// Hookable createContext function -> allowing eg custom import meta
|
||||
systemJSPrototype.createContext = function (parentId) {
|
||||
var loader = this;
|
||||
return {
|
||||
url: parentId,
|
||||
resolve: function (id, parentUrl) {
|
||||
return Promise.resolve(loader.resolve(id, parentUrl || parentId));
|
||||
}
|
||||
};
|
||||
};
|
||||
function loadToId (load) {
|
||||
return load.id;
|
||||
}
|
||||
function triggerOnload (loader, load, err, isErrSource) {
|
||||
loader.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);
|
||||
if (err)
|
||||
throw err;
|
||||
}
|
||||
|
||||
var lastRegister;
|
||||
systemJSPrototype.register = function (deps, declare, metas) {
|
||||
lastRegister = [deps, declare, metas];
|
||||
};
|
||||
|
||||
/*
|
||||
* getRegister provides the last anonymous System.register call
|
||||
*/
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var _lastRegister = lastRegister;
|
||||
lastRegister = undefined;
|
||||
return _lastRegister;
|
||||
};
|
||||
|
||||
function getOrCreateLoad (loader, id, firstParentUrl, meta) {
|
||||
var load = loader[REGISTRY][id];
|
||||
if (load)
|
||||
return load;
|
||||
|
||||
var importerSetters = [];
|
||||
var ns = Object.create(null);
|
||||
if (toStringTag)
|
||||
Object.defineProperty(ns, toStringTag, { value: 'Module' });
|
||||
|
||||
var instantiatePromise = Promise.resolve()
|
||||
.then(function () {
|
||||
return loader.instantiate(id, firstParentUrl, meta);
|
||||
})
|
||||
.then(function (registration) {
|
||||
if (!registration)
|
||||
throw Error(errMsg(2, id ));
|
||||
function _export (name, value) {
|
||||
// note if we have hoisted exports (including reexports)
|
||||
load.h = true;
|
||||
var changed = false;
|
||||
if (typeof name === 'string') {
|
||||
if (!(name in ns) || ns[name] !== value) {
|
||||
ns[name] = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var p in name) {
|
||||
var value = name[p];
|
||||
if (!(p in ns) || ns[p] !== value) {
|
||||
ns[p] = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (name && name.__esModule) {
|
||||
ns.__esModule = name.__esModule;
|
||||
}
|
||||
}
|
||||
if (changed)
|
||||
for (var i = 0; i < importerSetters.length; i++) {
|
||||
var setter = importerSetters[i];
|
||||
if (setter) setter(ns);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
var declared = registration[1](_export, registration[1].length === 2 ? {
|
||||
import: function (importId, meta) {
|
||||
return loader.import(importId, id, meta);
|
||||
},
|
||||
meta: loader.createContext(id)
|
||||
} : undefined);
|
||||
load.e = declared.execute || function () {};
|
||||
return [registration[0], declared.setters || [], registration[2] || []];
|
||||
}, function (err) {
|
||||
load.e = null;
|
||||
load.er = err;
|
||||
throw err;
|
||||
});
|
||||
|
||||
var linkPromise = instantiatePromise
|
||||
.then(function (instantiation) {
|
||||
return Promise.all(instantiation[0].map(function (dep, i) {
|
||||
var setter = instantiation[1][i];
|
||||
var meta = instantiation[2][i];
|
||||
return Promise.resolve(loader.resolve(dep, id))
|
||||
.then(function (depId) {
|
||||
var depLoad = getOrCreateLoad(loader, depId, id, meta);
|
||||
// depLoad.I may be undefined for already-evaluated
|
||||
return Promise.resolve(depLoad.I)
|
||||
.then(function () {
|
||||
if (setter) {
|
||||
depLoad.i.push(setter);
|
||||
// only run early setters when there are hoisted exports of that module
|
||||
// the timing works here as pending hoisted export calls will trigger through importerSetters
|
||||
if (depLoad.h || !depLoad.I)
|
||||
setter(depLoad.n);
|
||||
}
|
||||
return depLoad;
|
||||
});
|
||||
});
|
||||
}))
|
||||
.then(function (depLoads) {
|
||||
load.d = depLoads;
|
||||
});
|
||||
});
|
||||
|
||||
// Capital letter = a promise function
|
||||
return load = loader[REGISTRY][id] = {
|
||||
id: id,
|
||||
// importerSetters, the setters functions registered to this dependency
|
||||
// we retain this to add more later
|
||||
i: importerSetters,
|
||||
// module namespace object
|
||||
n: ns,
|
||||
// extra module information for import assertion
|
||||
// shape like: { assert: { type: 'xyz' } }
|
||||
m: meta,
|
||||
|
||||
// instantiate
|
||||
I: instantiatePromise,
|
||||
// link
|
||||
L: linkPromise,
|
||||
// whether it has hoisted exports
|
||||
h: false,
|
||||
|
||||
// On instantiate completion we have populated:
|
||||
// dependency load records
|
||||
d: undefined,
|
||||
// execution function
|
||||
e: undefined,
|
||||
|
||||
// On execution we have populated:
|
||||
// the execution error if any
|
||||
er: undefined,
|
||||
// in the case of TLA, the execution promise
|
||||
E: undefined,
|
||||
|
||||
// On execution, L, I, E cleared
|
||||
|
||||
// Promise for top-level completion
|
||||
C: undefined,
|
||||
|
||||
// parent instantiator / executor
|
||||
p: undefined
|
||||
};
|
||||
}
|
||||
|
||||
function instantiateAll (loader, load, parent, loaded) {
|
||||
if (!loaded[load.id]) {
|
||||
loaded[load.id] = true;
|
||||
// load.L may be undefined for already-instantiated
|
||||
return Promise.resolve(load.L)
|
||||
.then(function () {
|
||||
if (!load.p || load.p.e === null)
|
||||
load.p = parent;
|
||||
return Promise.all(load.d.map(function (dep) {
|
||||
return instantiateAll(loader, dep, parent, loaded);
|
||||
}));
|
||||
})
|
||||
.catch(function (err) {
|
||||
if (load.er)
|
||||
throw err;
|
||||
load.e = null;
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function topLevelLoad (loader, load) {
|
||||
return load.C = instantiateAll(loader, load, load, {})
|
||||
.then(function () {
|
||||
return postOrderExec(loader, load, {});
|
||||
})
|
||||
.then(function () {
|
||||
return load.n;
|
||||
});
|
||||
}
|
||||
|
||||
// the closest we can get to call(undefined)
|
||||
var nullContext = Object.freeze(Object.create(null));
|
||||
|
||||
// returns a promise if and only if a top-level await subgraph
|
||||
// throws on sync errors
|
||||
function postOrderExec (loader, load, seen) {
|
||||
if (seen[load.id])
|
||||
return;
|
||||
seen[load.id] = true;
|
||||
|
||||
if (!load.e) {
|
||||
if (load.er)
|
||||
throw load.er;
|
||||
if (load.E)
|
||||
return load.E;
|
||||
return;
|
||||
}
|
||||
|
||||
// From here we're about to execute the load.
|
||||
// Because the execution may be async, we pop the `load.e` first.
|
||||
// So `load.e === null` always means the load has been executed or is executing.
|
||||
// To inspect the state:
|
||||
// - If `load.er` is truthy, the execution has threw or has been rejected;
|
||||
// - otherwise, either the `load.E` is a promise, means it's under async execution, or
|
||||
// - the `load.E` is null, means the load has completed the execution or has been async resolved.
|
||||
var exec = load.e;
|
||||
load.e = null;
|
||||
|
||||
// deps execute first, unless circular
|
||||
var depLoadPromises;
|
||||
load.d.forEach(function (depLoad) {
|
||||
try {
|
||||
var depLoadPromise = postOrderExec(loader, depLoad, seen);
|
||||
if (depLoadPromise)
|
||||
(depLoadPromises = depLoadPromises || []).push(depLoadPromise);
|
||||
}
|
||||
catch (err) {
|
||||
load.er = err;
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
if (depLoadPromises)
|
||||
return Promise.all(depLoadPromises).then(doExec);
|
||||
|
||||
return doExec();
|
||||
|
||||
function doExec () {
|
||||
try {
|
||||
var execPromise = exec.call(nullContext);
|
||||
if (execPromise) {
|
||||
execPromise = execPromise.then(function () {
|
||||
load.C = load.n;
|
||||
load.E = null; // indicates completion
|
||||
if (!true) ;
|
||||
}, function (err) {
|
||||
load.er = err;
|
||||
load.E = null;
|
||||
if (!true) ;
|
||||
throw err;
|
||||
});
|
||||
return load.E = execPromise;
|
||||
}
|
||||
// (should be a promise, but a minify optimization to leave out Promise.resolve)
|
||||
load.C = load.n;
|
||||
load.L = load.I = undefined;
|
||||
}
|
||||
catch (err) {
|
||||
load.er = err;
|
||||
throw err;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
envGlobal.System = new SystemJS();
|
||||
|
||||
/*
|
||||
* SystemJS browser attachments for script and import map processing
|
||||
*/
|
||||
|
||||
var importMapPromise = Promise.resolve();
|
||||
var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };
|
||||
|
||||
// Scripts are processed immediately, on the first System.import, and on DOMReady.
|
||||
// Import map scripts are processed only once (by being marked) and in order for each phase.
|
||||
// This is to avoid using DOM mutation observers in core, although that would be an alternative.
|
||||
var processFirst = hasDocument;
|
||||
systemJSPrototype.prepareImport = function (doProcessScripts) {
|
||||
if (processFirst || doProcessScripts) {
|
||||
processScripts();
|
||||
processFirst = false;
|
||||
}
|
||||
return importMapPromise;
|
||||
};
|
||||
|
||||
systemJSPrototype.getImportMap = function () {
|
||||
return JSON.parse(JSON.stringify(importMap));
|
||||
};
|
||||
|
||||
if (hasDocument) {
|
||||
processScripts();
|
||||
window.addEventListener('DOMContentLoaded', processScripts);
|
||||
}
|
||||
systemJSPrototype.addImportMap = function (newMap, mapBase) {
|
||||
resolveAndComposeImportMap(newMap, mapBase || baseUrl, importMap);
|
||||
};
|
||||
|
||||
function processScripts () {
|
||||
[].forEach.call(document.querySelectorAll('script'), function (script) {
|
||||
if (script.sp) // sp marker = systemjs processed
|
||||
return;
|
||||
// TODO: deprecate systemjs-module in next major now that we have auto import
|
||||
if (script.type === 'systemjs-module') {
|
||||
script.sp = true;
|
||||
if (!script.src)
|
||||
return;
|
||||
System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function (e) {
|
||||
// if there is a script load error, dispatch an "error" event
|
||||
// on the script tag.
|
||||
if (e.message.indexOf('https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3') > -1) {
|
||||
var event = document.createEvent('Event');
|
||||
event.initEvent('error', false, false);
|
||||
script.dispatchEvent(event);
|
||||
}
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
else if (script.type === 'systemjs-importmap') {
|
||||
script.sp = true;
|
||||
// The passThrough property is for letting the module types fetch implementation know that this is not a SystemJS module.
|
||||
var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, priority: script.fetchPriority, passThrough: true }).then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(res.status );
|
||||
return res.text();
|
||||
}).catch(function (err) {
|
||||
err.message = errMsg('W4', script.src ) + '\n' + err.message;
|
||||
console.warn(err);
|
||||
if (typeof script.onerror === 'function') {
|
||||
script.onerror();
|
||||
}
|
||||
return '{}';
|
||||
}) : script.innerHTML;
|
||||
importMapPromise = importMapPromise.then(function () {
|
||||
return fetchPromise;
|
||||
}).then(function (text) {
|
||||
extendImportMap(importMap, text, script.src || baseUrl);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function extendImportMap (importMap, newMapText, newMapUrl) {
|
||||
var newMap = {};
|
||||
try {
|
||||
newMap = JSON.parse(newMapText);
|
||||
} catch (err) {
|
||||
console.warn(Error((errMsg('W5') )));
|
||||
}
|
||||
resolveAndComposeImportMap(newMap, newMapUrl, importMap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Script instantiation loading
|
||||
*/
|
||||
|
||||
if (hasDocument) {
|
||||
window.addEventListener('error', function (evt) {
|
||||
lastWindowErrorUrl = evt.filename;
|
||||
lastWindowError = evt.error;
|
||||
});
|
||||
var baseOrigin = location.origin;
|
||||
}
|
||||
|
||||
systemJSPrototype.createScript = function (url) {
|
||||
var script = document.createElement('script');
|
||||
script.async = true;
|
||||
// Only add cross origin for actual cross origin
|
||||
// this is because Safari triggers for all
|
||||
// - https://bugs.webkit.org/show_bug.cgi?id=171566
|
||||
if (url.indexOf(baseOrigin + '/'))
|
||||
script.crossOrigin = 'anonymous';
|
||||
var integrity = importMap.integrity[url];
|
||||
if (integrity)
|
||||
script.integrity = integrity;
|
||||
script.src = url;
|
||||
return script;
|
||||
};
|
||||
|
||||
// Auto imports -> script tags can be inlined directly for load phase
|
||||
var lastAutoImportDeps, lastAutoImportTimeout;
|
||||
var autoImportCandidates = {};
|
||||
var systemRegister = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (deps, declare) {
|
||||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
|
||||
var scripts = document.querySelectorAll('script[src]');
|
||||
var lastScript = scripts[scripts.length - 1];
|
||||
if (lastScript) {
|
||||
lastScript.src;
|
||||
lastAutoImportDeps = deps;
|
||||
// if this is already a System load, then the instantiate has already begun
|
||||
// so this re-import has no consequence
|
||||
var loader = this;
|
||||
lastAutoImportTimeout = setTimeout(function () {
|
||||
autoImportCandidates[lastScript.src] = [deps, declare];
|
||||
loader.import(lastScript.src);
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
lastAutoImportDeps = undefined;
|
||||
}
|
||||
return systemRegister.call(this, deps, declare);
|
||||
};
|
||||
|
||||
var lastWindowErrorUrl, lastWindowError;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl) {
|
||||
var autoImportRegistration = autoImportCandidates[url];
|
||||
if (autoImportRegistration) {
|
||||
delete autoImportCandidates[url];
|
||||
return autoImportRegistration;
|
||||
}
|
||||
var loader = this;
|
||||
return Promise.resolve(systemJSPrototype.createScript(url)).then(function (script) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
script.addEventListener('error', function () {
|
||||
reject(Error(errMsg(3, [url, firstParentUrl].join(', ') )));
|
||||
});
|
||||
script.addEventListener('load', function () {
|
||||
document.head.removeChild(script);
|
||||
// Note that if an error occurs that isn't caught by this if statement,
|
||||
// that getRegister will return null and a "did not instantiate" error will be thrown.
|
||||
if (lastWindowErrorUrl === url) {
|
||||
reject(lastWindowError);
|
||||
}
|
||||
else {
|
||||
var register = loader.getRegister(url);
|
||||
// Clear any auto import registration for dynamic import scripts during load
|
||||
if (register && register[0] === lastAutoImportDeps)
|
||||
clearTimeout(lastAutoImportTimeout);
|
||||
resolve(register);
|
||||
}
|
||||
});
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Fetch loader, sets up shouldFetch and fetch hooks
|
||||
*/
|
||||
systemJSPrototype.shouldFetch = function () {
|
||||
return false;
|
||||
};
|
||||
if (typeof fetch !== 'undefined')
|
||||
systemJSPrototype.fetch = fetch;
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
var jsContentTypeRegEx = /^(text|application)\/(x-)?javascript(;|$)/;
|
||||
systemJSPrototype.instantiate = function (url, parent, meta) {
|
||||
var loader = this;
|
||||
if (!this.shouldFetch(url, parent, meta))
|
||||
return instantiate.apply(this, arguments);
|
||||
return this.fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
integrity: importMap.integrity[url],
|
||||
meta: meta,
|
||||
})
|
||||
.then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(errMsg(7, [res.status, res.statusText, url, parent].join(', ') ));
|
||||
var contentType = res.headers.get('content-type');
|
||||
if (!contentType || !jsContentTypeRegEx.test(contentType))
|
||||
throw Error(errMsg(4, contentType ));
|
||||
return res.text().then(function (source) {
|
||||
if (source.indexOf('//# sourceURL=') < 0)
|
||||
source += '\n//# sourceURL=' + url;
|
||||
(0, eval)(source);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
systemJSPrototype.resolve = function (id, parentUrl) {
|
||||
parentUrl = parentUrl || !true || baseUrl;
|
||||
return resolveImportMap((importMap), resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);
|
||||
};
|
||||
|
||||
function throwUnresolved (id, parentUrl) {
|
||||
throw Error(errMsg(8, [id, parentUrl].join(', ') ));
|
||||
}
|
||||
|
||||
var systemInstantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl, meta) {
|
||||
var preloads = (importMap).depcache[url];
|
||||
if (preloads) {
|
||||
for (var i = 0; i < preloads.length; i++)
|
||||
getOrCreateLoad(this, this.resolve(preloads[i], url), url);
|
||||
}
|
||||
return systemInstantiate.call(this, url, firstParentUrl, meta);
|
||||
};
|
||||
|
||||
/*
|
||||
* Supports loading System.register in workers
|
||||
*/
|
||||
|
||||
if (hasSelf && typeof importScripts === 'function')
|
||||
systemJSPrototype.instantiate = function (url) {
|
||||
var loader = this;
|
||||
return Promise.resolve().then(function () {
|
||||
importScripts(url);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
+5
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+8946
File diff suppressed because one or more lines are too long
+1040
File diff suppressed because it is too large
Load Diff
+5
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user