@jsenv/core 29.1.19 → 29.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +3 -16
- package/dist/babel_helpers/applyDecoratorDescriptor/applyDecoratorDescriptor.js +0 -5
- package/dist/babel_helpers/applyDecs/applyDecs.js +54 -241
- package/dist/babel_helpers/applyDecs2023/applyDecs2023.js +47 -195
- package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +0 -2
- package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +2 -1
- package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +0 -1
- package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +4 -14
- package/dist/babel_helpers/asyncIterator/asyncIterator.js +5 -20
- package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +2 -8
- package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +1 -3
- package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +0 -4
- package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +0 -1
- package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +0 -1
- package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +0 -1
- package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +0 -1
- package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +0 -1
- package/dist/babel_helpers/construct/construct.js +5 -5
- package/dist/babel_helpers/createClass/createClass.js +0 -1
- package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +5 -9
- package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +2 -3
- package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +2 -8
- package/dist/babel_helpers/createSuper/createSuper.js +2 -4
- package/dist/babel_helpers/decorate/decorate.js +60 -311
- package/dist/babel_helpers/defaults/defaults.js +0 -3
- package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +2 -5
- package/dist/babel_helpers/defineProperty/defineProperty.js +0 -1
- package/dist/babel_helpers/extends/extends.js +0 -3
- package/dist/babel_helpers/get/get.js +0 -3
- package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +2 -1
- package/dist/babel_helpers/inherits/inherits.js +2 -3
- package/dist/babel_helpers/instanceof/instanceof.js +0 -1
- package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +0 -10
- package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +6 -6
- package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +0 -5
- package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +2 -5
- package/dist/babel_helpers/jsx/jsx.js +2 -8
- package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +2 -3
- package/dist/babel_helpers/objectSpread/objectSpread.js +4 -6
- package/dist/babel_helpers/objectSpread2/objectSpread2.js +3 -8
- package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +0 -3
- package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +0 -2
- package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +0 -1
- package/dist/babel_helpers/set/set.js +2 -12
- package/dist/babel_helpers/superPropBase/superPropBase.js +0 -1
- package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +0 -1
- package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +0 -1
- package/dist/babel_helpers/toPrimitive/toPrimitive.js +1 -5
- package/dist/babel_helpers/typeof/typeof.js +0 -2
- package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +0 -7
- package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +5 -19
- package/dist/controllable_child_process.mjs +17 -27
- package/dist/controllable_worker_thread.mjs +4 -16
- package/dist/js/autoreload.js +13 -56
- package/dist/js/execute_using_dynamic_import.js +40 -164
- package/dist/js/global_this.js +2 -10
- package/dist/js/import_meta_hot.js +3 -9
- package/dist/js/new_stylesheet.js +0 -59
- package/dist/js/regenerator_runtime.js +80 -156
- package/dist/js/s.js +25 -113
- package/dist/js/s.js.map +10 -10
- package/dist/js/script_type_module_supervisor.js +4 -13
- package/dist/js/server_events_client.js +10 -38
- package/dist/js/supervisor.js +25 -167
- package/dist/js/v8_coverage.js +29 -92
- package/dist/js/ws.js +226 -704
- package/dist/main.js +761 -4155
- package/package.json +2 -2
- package/src/plugins/import_meta_url/client/import_meta_url_browser.js +1 -2
- package/src/plugins/import_meta_url/client/import_meta_url_commonjs.mjs +1 -1
- package/src/plugins/plugins.js +1 -1
- package/src/plugins/transpilation/as_js_classic/helpers-string.js +1 -0
- package/src/plugins/transpilation/babel/global_this/client/global_this.js +0 -2
package/dist/js/s.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
|
|
2
|
-
|
|
3
2
|
(function (global, factory) {
|
|
4
3
|
if (typeof define === "function" && define.amd) {
|
|
5
4
|
define([], factory);
|
|
@@ -13,12 +12,12 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
13
12
|
global.s = mod.exports;
|
|
14
13
|
}
|
|
15
14
|
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function () {
|
|
16
|
-
"use strict";
|
|
15
|
+
"use strict";
|
|
17
16
|
|
|
17
|
+
// eslint-disable-next-line consistent-return
|
|
18
18
|
var arrayWithHoles = function arrayWithHoles(arr) {
|
|
19
19
|
if (Array.isArray(arr)) return arr;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
21
|
function _iterableToArrayLimit(arr, i) {
|
|
23
22
|
// this is an expanded form of \`for...of\` that properly supports abrupt completions of
|
|
24
23
|
// iterators etc. variable names have been minimised to reduce the size of this massive
|
|
@@ -30,18 +29,14 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
30
29
|
// _i = _iterator
|
|
31
30
|
// _s = _step
|
|
32
31
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
33
|
-
|
|
34
32
|
if (_i == null) return;
|
|
35
33
|
var _arr = [];
|
|
36
34
|
var _n = true;
|
|
37
35
|
var _d = false;
|
|
38
|
-
|
|
39
36
|
var _s, _e;
|
|
40
|
-
|
|
41
37
|
try {
|
|
42
38
|
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
43
39
|
_arr.push(_s.value);
|
|
44
|
-
|
|
45
40
|
if (i && _arr.length === i) break;
|
|
46
41
|
}
|
|
47
42
|
} catch (err) {
|
|
@@ -54,25 +49,20 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
54
49
|
if (_d) throw _e;
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
|
-
|
|
58
52
|
return _arr;
|
|
59
53
|
}
|
|
60
|
-
/* eslint-disable no-eq-null, eqeqeq */
|
|
61
|
-
|
|
62
54
|
|
|
55
|
+
/* eslint-disable no-eq-null, eqeqeq */
|
|
63
56
|
function arrayLikeToArray(arr, len) {
|
|
64
57
|
if (len == null || len > arr.length) len = arr.length;
|
|
65
58
|
var arr2 = new Array(len);
|
|
66
|
-
|
|
67
59
|
for (var i = 0; i < len; i++) {
|
|
68
60
|
arr2[i] = arr[i];
|
|
69
61
|
}
|
|
70
|
-
|
|
71
62
|
return arr2;
|
|
72
63
|
}
|
|
73
|
-
/* eslint-disable consistent-return */
|
|
74
|
-
|
|
75
64
|
|
|
65
|
+
/* eslint-disable consistent-return */
|
|
76
66
|
function unsupportedIterableToArray(o, minLen) {
|
|
77
67
|
if (!o) return;
|
|
78
68
|
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
@@ -81,24 +71,20 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
81
71
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
82
72
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
83
73
|
}
|
|
84
|
-
|
|
85
74
|
var nonIterableRest = function nonIterableRest() {
|
|
86
75
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
87
76
|
};
|
|
88
|
-
|
|
89
77
|
var _slicedToArray = function _slicedToArray(arr, i) {
|
|
90
78
|
return arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
91
79
|
};
|
|
92
|
-
|
|
93
80
|
var nativeTypeOf = function nativeTypeOf(obj) {
|
|
94
81
|
return _typeof2(obj);
|
|
95
82
|
};
|
|
96
|
-
|
|
97
83
|
var customTypeOf = function customTypeOf(obj) {
|
|
98
84
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
99
85
|
};
|
|
100
|
-
|
|
101
86
|
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? nativeTypeOf : customTypeOf;
|
|
87
|
+
|
|
102
88
|
/*
|
|
103
89
|
* This file is a modified version of https://github.com/systemjs/systemjs/blob/main/dist/s.js
|
|
104
90
|
* with the following changes:
|
|
@@ -111,25 +97,20 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
111
97
|
* - no support for importmap because jsenv don't need it
|
|
112
98
|
*/
|
|
113
99
|
|
|
114
|
-
|
|
115
100
|
function _await(value, then, direct) {
|
|
116
101
|
if (direct) {
|
|
117
102
|
return then ? then(value) : value;
|
|
118
103
|
}
|
|
119
|
-
|
|
120
104
|
if (!value || !value.then) {
|
|
121
105
|
value = Promise.resolve(value);
|
|
122
106
|
}
|
|
123
|
-
|
|
124
107
|
return then ? value.then(then) : value;
|
|
125
108
|
}
|
|
126
|
-
|
|
127
109
|
function _async(f) {
|
|
128
110
|
return function () {
|
|
129
111
|
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
130
112
|
args[i] = arguments[i];
|
|
131
113
|
}
|
|
132
|
-
|
|
133
114
|
try {
|
|
134
115
|
return Promise.resolve(f.apply(this, args));
|
|
135
116
|
} catch (e) {
|
|
@@ -137,43 +118,34 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
137
118
|
}
|
|
138
119
|
};
|
|
139
120
|
}
|
|
140
|
-
|
|
141
121
|
function _empty() {}
|
|
142
|
-
|
|
143
122
|
function _awaitIgnored(value, direct) {
|
|
144
123
|
if (!direct) {
|
|
145
124
|
return value && value.then ? value.then(_empty) : Promise.resolve();
|
|
146
125
|
}
|
|
147
126
|
}
|
|
148
|
-
|
|
149
127
|
function _invoke(body, then) {
|
|
150
128
|
var result = body();
|
|
151
|
-
|
|
152
129
|
if (result && result.then) {
|
|
153
130
|
return result.then(then);
|
|
154
131
|
}
|
|
155
|
-
|
|
156
132
|
return then(result);
|
|
157
133
|
}
|
|
158
|
-
|
|
159
134
|
function _catch(body, recover) {
|
|
160
135
|
try {
|
|
161
136
|
var result = body();
|
|
162
137
|
} catch (e) {
|
|
163
138
|
return recover(e);
|
|
164
139
|
}
|
|
165
|
-
|
|
166
140
|
if (result && result.then) {
|
|
167
141
|
return result.then(void 0, recover);
|
|
168
142
|
}
|
|
169
|
-
|
|
170
143
|
return result;
|
|
171
144
|
}
|
|
172
|
-
|
|
173
145
|
(function () {
|
|
174
146
|
/* eslint-env browser */
|
|
175
|
-
|
|
176
147
|
/* globals self */
|
|
148
|
+
|
|
177
149
|
var loadRegistry = Object.create(null);
|
|
178
150
|
var registerRegistry = Object.create(null);
|
|
179
151
|
var inlineScriptCount = 0;
|
|
@@ -185,48 +157,38 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
185
157
|
envGlobal.System = System;
|
|
186
158
|
var baseUrl = envGlobal.location.href.split("#")[0].split("?")[0];
|
|
187
159
|
var lastSlashIndex = baseUrl.lastIndexOf("/");
|
|
188
|
-
|
|
189
160
|
if (lastSlashIndex !== -1) {
|
|
190
161
|
baseUrl = baseUrl.slice(0, lastSlashIndex + 1);
|
|
191
162
|
}
|
|
192
|
-
|
|
193
163
|
var resolveUrl = function resolveUrl(specifier, baseUrl) {
|
|
194
164
|
return new URL(specifier, baseUrl).href;
|
|
195
165
|
};
|
|
196
|
-
|
|
197
166
|
if (hasDocument) {
|
|
198
167
|
var baseElement = document.querySelector("base[href]");
|
|
199
|
-
|
|
200
168
|
if (baseElement) {
|
|
201
169
|
baseUrl = baseElement.href;
|
|
202
170
|
}
|
|
203
|
-
|
|
204
171
|
System.register = function (deps, declare) {
|
|
205
172
|
if (!document.currentScript) {
|
|
206
173
|
throw new Error("unexpected call to System.register (document.currentScript is undefined)");
|
|
207
174
|
}
|
|
208
|
-
|
|
209
175
|
if (document.currentScript.__s__) {
|
|
210
176
|
registerRegistry[document.currentScript.src] = [deps, declare];
|
|
211
177
|
return null;
|
|
212
178
|
}
|
|
213
|
-
|
|
214
179
|
var url = document.currentScript.src || "".concat(window.location.href, "__inline_script__").concat(++inlineScriptCount);
|
|
215
180
|
registerRegistry[url] = [deps, declare];
|
|
216
181
|
return _import2(url);
|
|
217
182
|
};
|
|
218
|
-
|
|
219
183
|
System.instantiate = function (url) {
|
|
220
184
|
var script = createScript(url);
|
|
221
185
|
return new Promise(function (resolve, reject) {
|
|
222
186
|
var lastWindowErrorUrl;
|
|
223
187
|
var lastWindowError;
|
|
224
|
-
|
|
225
188
|
var windowErrorCallback = function windowErrorCallback(event) {
|
|
226
189
|
lastWindowErrorUrl = event.filename;
|
|
227
190
|
lastWindowError = event.error;
|
|
228
191
|
};
|
|
229
|
-
|
|
230
192
|
window.addEventListener("error", windowErrorCallback);
|
|
231
193
|
script.addEventListener("error", function () {
|
|
232
194
|
window.removeEventListener("error", windowErrorCallback);
|
|
@@ -234,9 +196,9 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
234
196
|
});
|
|
235
197
|
script.addEventListener("load", function () {
|
|
236
198
|
window.removeEventListener("error", windowErrorCallback);
|
|
237
|
-
document.head.removeChild(script);
|
|
199
|
+
document.head.removeChild(script);
|
|
200
|
+
// Note that if an error occurs that isn't caught by this if statement,
|
|
238
201
|
// that getRegister will return null and a "did not instantiate" error will be thrown.
|
|
239
|
-
|
|
240
202
|
if (lastWindowErrorUrl === url) {
|
|
241
203
|
reject(lastWindowError);
|
|
242
204
|
} else {
|
|
@@ -246,23 +208,20 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
246
208
|
document.head.appendChild(script);
|
|
247
209
|
});
|
|
248
210
|
};
|
|
249
|
-
|
|
250
211
|
var createScript = function createScript(url) {
|
|
251
212
|
var script = document.createElement("script");
|
|
252
|
-
script.async = true;
|
|
213
|
+
script.async = true;
|
|
214
|
+
// Only add cross origin for actual cross origin
|
|
253
215
|
// this is because Safari triggers for all
|
|
254
216
|
// - https://bugs.webkit.org/show_bug.cgi?id=171566
|
|
255
|
-
|
|
256
217
|
if (url.indexOf("".concat(self.location.origin, "/"))) {
|
|
257
218
|
script.crossOrigin = "anonymous";
|
|
258
219
|
}
|
|
259
|
-
|
|
260
220
|
script.__s__ = true;
|
|
261
221
|
script.src = url;
|
|
262
222
|
return script;
|
|
263
223
|
};
|
|
264
224
|
}
|
|
265
|
-
|
|
266
225
|
if (isWorker) {
|
|
267
226
|
/*
|
|
268
227
|
* SystemJs loads X files before executing the worker/service worker main file
|
|
@@ -273,7 +232,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
273
232
|
* once the worker file is executed (the listeners are installed)
|
|
274
233
|
*/
|
|
275
234
|
var firstImportCallbacks = [];
|
|
276
|
-
|
|
277
235
|
if (isServiceWorker) {
|
|
278
236
|
// for service worker there is more events to listen
|
|
279
237
|
// and, to get rid of the warning, we override self.addEventListener
|
|
@@ -284,10 +242,8 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
284
242
|
});
|
|
285
243
|
eventsToCatch.forEach(function (eventName) {
|
|
286
244
|
var eventsToDispatch = [];
|
|
287
|
-
|
|
288
245
|
var eventCallback = function eventCallback(event) {
|
|
289
246
|
var eventCallbackProxy = eventCallbackProxies[event.type];
|
|
290
|
-
|
|
291
247
|
if (eventCallbackProxy) {
|
|
292
248
|
eventCallbackProxy(event);
|
|
293
249
|
} else {
|
|
@@ -295,42 +251,34 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
295
251
|
event.waitUntil(firstImportPromise);
|
|
296
252
|
}
|
|
297
253
|
};
|
|
298
|
-
|
|
299
254
|
self.addEventListener(eventName, eventCallback);
|
|
300
255
|
firstImportCallbacks.push(function () {
|
|
301
256
|
if (eventsToDispatch.length) {
|
|
302
257
|
var eventCallbackProxy = eventCallbackProxies[eventsToDispatch[0].type];
|
|
303
|
-
|
|
304
258
|
if (eventCallbackProxy) {
|
|
305
259
|
eventsToDispatch.forEach(function (event) {
|
|
306
260
|
eventCallbackProxy(event);
|
|
307
261
|
});
|
|
308
262
|
}
|
|
309
|
-
|
|
310
263
|
eventsToDispatch.length = 0;
|
|
311
264
|
}
|
|
312
265
|
});
|
|
313
266
|
});
|
|
314
267
|
var addEventListener = self.addEventListener;
|
|
315
|
-
|
|
316
268
|
self.addEventListener = function (eventName, callback, options) {
|
|
317
269
|
if (eventsToCatch.indexOf(eventName) > -1) {
|
|
318
270
|
eventCallbackProxies[eventName] = callback;
|
|
319
271
|
return null;
|
|
320
272
|
}
|
|
321
|
-
|
|
322
273
|
return addEventListener.call(self, eventName, callback, options);
|
|
323
274
|
};
|
|
324
275
|
} else {
|
|
325
276
|
var _eventsToCatch = ["message"];
|
|
326
|
-
|
|
327
277
|
_eventsToCatch.forEach(function (eventName) {
|
|
328
278
|
var eventQueue = [];
|
|
329
|
-
|
|
330
279
|
var eventCallback = function eventCallback(event) {
|
|
331
280
|
eventQueue.push(event);
|
|
332
281
|
};
|
|
333
|
-
|
|
334
282
|
self.addEventListener(eventName, eventCallback);
|
|
335
283
|
firstImportCallbacks.push(function () {
|
|
336
284
|
self.removeEventListener(eventName, eventCallback);
|
|
@@ -341,12 +289,10 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
341
289
|
});
|
|
342
290
|
});
|
|
343
291
|
}
|
|
344
|
-
|
|
345
292
|
System.register = _async(function (deps, declare) {
|
|
346
293
|
System.register = function () {
|
|
347
294
|
throw new Error("unexpected call to System.register (called outside url instantiation)");
|
|
348
295
|
};
|
|
349
|
-
|
|
350
296
|
var url = self.location.href;
|
|
351
297
|
registerRegistry[url] = [deps, declare];
|
|
352
298
|
return _await(_import2(url), function (namespace) {
|
|
@@ -364,38 +310,30 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
364
310
|
if (!response.ok) {
|
|
365
311
|
throw Error("Failed to fetch module at ".concat(url));
|
|
366
312
|
}
|
|
367
|
-
|
|
368
313
|
return _await(response.text(), function (source) {
|
|
369
314
|
if (source.indexOf("//# sourceURL=") < 0) {
|
|
370
315
|
source += "\n//# sourceURL=".concat(url);
|
|
371
316
|
}
|
|
372
|
-
|
|
373
317
|
var register = System.register;
|
|
374
|
-
|
|
375
318
|
System.register = function (deps, declare) {
|
|
376
319
|
registerRegistry[url] = [deps, declare];
|
|
377
320
|
};
|
|
378
|
-
|
|
379
321
|
(0, self.eval)(source);
|
|
380
322
|
System.register = register;
|
|
381
323
|
});
|
|
382
324
|
});
|
|
383
325
|
});
|
|
384
326
|
}
|
|
385
|
-
|
|
386
327
|
var _import2 = function _import(specifier, parentUrl) {
|
|
387
328
|
var url = resolveUrl(specifier, parentUrl);
|
|
388
329
|
var load = getOrCreateLoad(url, parentUrl);
|
|
389
330
|
return load.completionPromise || startExecution(load, parentUrl);
|
|
390
331
|
};
|
|
391
|
-
|
|
392
332
|
var getOrCreateLoad = function getOrCreateLoad(url, firstParentUrl) {
|
|
393
333
|
var existingLoad = loadRegistry[url];
|
|
394
|
-
|
|
395
334
|
if (existingLoad) {
|
|
396
335
|
return existingLoad;
|
|
397
336
|
}
|
|
398
|
-
|
|
399
337
|
var namespace = createNamespace();
|
|
400
338
|
var load = {
|
|
401
339
|
url: url,
|
|
@@ -431,15 +369,12 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
431
369
|
if (!registration) {
|
|
432
370
|
throw new Error("System.register() not called after executing ".concat(url));
|
|
433
371
|
}
|
|
434
|
-
|
|
435
372
|
var _export = function _export(firstArg, secondArg) {
|
|
436
373
|
load.hoistedExports = true;
|
|
437
374
|
var changed = false;
|
|
438
|
-
|
|
439
375
|
if (typeof firstArg === "string") {
|
|
440
376
|
var name = firstArg;
|
|
441
377
|
var value = secondArg;
|
|
442
|
-
|
|
443
378
|
if (!(name in namespace) || namespace[name] !== value) {
|
|
444
379
|
namespace[name] = value;
|
|
445
380
|
changed = true;
|
|
@@ -447,18 +382,15 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
447
382
|
} else {
|
|
448
383
|
Object.keys(firstArg).forEach(function (name) {
|
|
449
384
|
var value = firstArg[name];
|
|
450
|
-
|
|
451
385
|
if (!(name in namespace) || namespace[name] !== value) {
|
|
452
386
|
namespace[name] = value;
|
|
453
387
|
changed = true;
|
|
454
388
|
}
|
|
455
389
|
});
|
|
456
|
-
|
|
457
390
|
if (firstArg && firstArg.__esModule) {
|
|
458
391
|
namespace.__esModule = firstArg.__esModule;
|
|
459
392
|
}
|
|
460
393
|
}
|
|
461
|
-
|
|
462
394
|
if (changed) {
|
|
463
395
|
load.importerSetters.forEach(function (importerSetter) {
|
|
464
396
|
if (importerSetter) {
|
|
@@ -466,25 +398,21 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
466
398
|
}
|
|
467
399
|
});
|
|
468
400
|
}
|
|
469
|
-
|
|
470
401
|
return secondArg;
|
|
471
402
|
};
|
|
472
|
-
|
|
473
403
|
var _registration = registration,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
404
|
+
_registration2 = _slicedToArray(_registration, 2),
|
|
405
|
+
deps = _registration2[0],
|
|
406
|
+
declare = _registration2[1];
|
|
478
407
|
var _declare = declare(_export, {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
408
|
+
import: function _import(importId) {
|
|
409
|
+
return _import2(importId, url);
|
|
410
|
+
},
|
|
411
|
+
meta: createMeta(url)
|
|
412
|
+
}),
|
|
413
|
+
setters = _declare.setters,
|
|
414
|
+
_declare$execute = _declare.execute,
|
|
415
|
+
execute = _declare$execute === void 0 ? function () {} : _declare$execute;
|
|
488
416
|
load.deps = deps;
|
|
489
417
|
load.setters = setters;
|
|
490
418
|
load.execute = execute;
|
|
@@ -507,12 +435,10 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
507
435
|
}, function () {
|
|
508
436
|
if (setter) {
|
|
509
437
|
dependencyLoad.importerSetters.push(setter);
|
|
510
|
-
|
|
511
438
|
if (dependencyLoad.hoistedExports || !dependencyLoad.instantiatePromise) {
|
|
512
439
|
setter(dependencyLoad.namespace);
|
|
513
440
|
}
|
|
514
441
|
}
|
|
515
|
-
|
|
516
442
|
return dependencyLoad;
|
|
517
443
|
});
|
|
518
444
|
}))), function (dependencyLoads) {
|
|
@@ -522,7 +448,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
522
448
|
})();
|
|
523
449
|
return load;
|
|
524
450
|
};
|
|
525
|
-
|
|
526
451
|
var startExecution = _async(function (load, importerUrl) {
|
|
527
452
|
load.completionPromise = function () {
|
|
528
453
|
return _await(instantiateAll(load, load, {}), function () {
|
|
@@ -531,15 +456,12 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
531
456
|
});
|
|
532
457
|
});
|
|
533
458
|
}();
|
|
534
|
-
|
|
535
459
|
return load.completionPromise;
|
|
536
460
|
});
|
|
537
|
-
|
|
538
461
|
var instantiateAll = _async(function (load, parent, loaded) {
|
|
539
462
|
if (loaded[load.url]) {
|
|
540
463
|
return;
|
|
541
464
|
}
|
|
542
|
-
|
|
543
465
|
loaded[load.url] = true;
|
|
544
466
|
return _catch(function () {
|
|
545
467
|
return _invoke(function () {
|
|
@@ -556,30 +478,25 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
556
478
|
if (load.error) {
|
|
557
479
|
throw error;
|
|
558
480
|
}
|
|
559
|
-
|
|
560
481
|
load.execute = null;
|
|
561
482
|
throw error;
|
|
562
483
|
});
|
|
563
484
|
});
|
|
564
|
-
|
|
565
485
|
var postOrderExec = function postOrderExec(load, importStack) {
|
|
566
486
|
if (importStack.indexOf(load.url) > -1) {
|
|
567
487
|
return undefined;
|
|
568
488
|
}
|
|
569
|
-
|
|
570
489
|
if (!load.execute) {
|
|
571
490
|
if (load.error) {
|
|
572
491
|
throw load.error;
|
|
573
492
|
}
|
|
574
|
-
|
|
575
493
|
if (load.executePromise) {
|
|
576
494
|
return load.executePromise;
|
|
577
495
|
}
|
|
578
|
-
|
|
579
496
|
return undefined;
|
|
580
|
-
}
|
|
581
|
-
|
|
497
|
+
}
|
|
582
498
|
|
|
499
|
+
// deps execute first, unless circular
|
|
583
500
|
var execute = load.execute;
|
|
584
501
|
load.execute = null;
|
|
585
502
|
var depLoadPromises = [];
|
|
@@ -588,7 +505,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
588
505
|
var depImportStack = importStack.slice();
|
|
589
506
|
depImportStack.push(load.url);
|
|
590
507
|
var depLoadPromise = postOrderExec(dependencyLoad, depImportStack);
|
|
591
|
-
|
|
592
508
|
if (depLoadPromise) {
|
|
593
509
|
depLoadPromises.push(depLoadPromise);
|
|
594
510
|
}
|
|
@@ -606,7 +522,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
606
522
|
}, function () {
|
|
607
523
|
try {
|
|
608
524
|
var executeReturnValue = execute.call(nullContext);
|
|
609
|
-
|
|
610
525
|
if (executeReturnValue) {
|
|
611
526
|
load.executePromise = executeReturnValue.then(function () {
|
|
612
527
|
load.executePromise = null;
|
|
@@ -618,7 +533,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
618
533
|
});
|
|
619
534
|
return;
|
|
620
535
|
}
|
|
621
|
-
|
|
622
536
|
load.instantiatePromise = null;
|
|
623
537
|
load.linkPromise = null;
|
|
624
538
|
load.completionPromise = load.namespace;
|
|
@@ -630,11 +544,10 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
630
544
|
}
|
|
631
545
|
});
|
|
632
546
|
})();
|
|
633
|
-
};
|
|
634
|
-
|
|
547
|
+
};
|
|
635
548
|
|
|
549
|
+
// the closest we can get to call(undefined)
|
|
636
550
|
var nullContext = Object.freeze(Object.create(null));
|
|
637
|
-
|
|
638
551
|
var createMeta = function createMeta(url) {
|
|
639
552
|
return {
|
|
640
553
|
url: url,
|
|
@@ -643,7 +556,6 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
|
|
|
643
556
|
}
|
|
644
557
|
};
|
|
645
558
|
};
|
|
646
|
-
|
|
647
559
|
var createNamespace = typeof Symbol !== "undefined" && Symbol.toStringTag ? function () {
|
|
648
560
|
var namespace = Object.create(null);
|
|
649
561
|
Object.defineProperty(namespace, Symbol.toStringTag, {
|