|
1 | | -/* ES Module Shims 1.3.0 */ |
| 1 | +/* ES Module Shims 1.3.2 */ |
2 | 2 | (function () { |
3 | 3 |
|
4 | 4 | const edge = navigator.userAgent.match(/Edge\/\d\d\.\d+$/); |
|
211 | 211 | if (!nonce) { |
212 | 212 | const nonceElement = document.querySelector('script[nonce]'); |
213 | 213 | if (nonceElement) |
214 | | - nonce = nonceElement.getAttribute('nonce'); |
| 214 | + nonce = nonceElement.nonce || nonceElement.getAttribute('nonce'); |
215 | 215 | } |
216 | 216 |
|
217 | 217 | const onerror = globalHook(esmsInitOptions$1.onerror || noop); |
|
404 | 404 | if (revokeBlobURLs) revokeObjectURLs(Object.keys(seen)); |
405 | 405 | return module; |
406 | 406 | } |
407 | | - const module = await dynamicImport((shimMode || load.n) ? load.b : load.u, { errUrl: load.u }); |
| 407 | + const module = await dynamicImport(!shimMode && !load.n && nativelyLoaded ? load.u : load.b, { errUrl: load.u }); |
408 | 408 | // if the top-level load is a shell, run its update function |
409 | 409 | if (load.s) |
410 | 410 | (await dynamicImport(load.s)).u$_(module); |
|
530 | 530 | resolvedSource += source.slice(lastIndex); |
531 | 531 | } |
532 | 532 |
|
533 | | - resolvedSource = resolvedSource.replace(/\/\/# sourceMappingURL=(.*)\s*$/, (match, url) => match.replace(url, () => new URL(url, load.r))); |
| 533 | + resolvedSource = resolvedSource.replace(/\n\/\/# sourceMappingURL=([^\n]+)\s*$/, (match, url) => match.replace(url, () => new URL(url, load.r))); |
534 | 534 | let hasSourceURL = false; |
535 | | - resolvedSource = resolvedSource.replace(/\/\/# sourceURL=(.*)\s*$/, (match, url) => (hasSourceURL = true, match.replace(url, () => new URL(url, load.r)))); |
| 535 | + resolvedSource = resolvedSource.replace(/\n\/\/# sourceURL=([^\n]+)\s*$/, (match, url) => (hasSourceURL = true, match.replace(url, () => new URL(url, load.r)))); |
536 | 536 | if (!hasSourceURL) |
537 | 537 | resolvedSource += '\n//# sourceURL=' + load.r; |
538 | 538 |
|
|
760 | 760 | const isDomContentLoadedScript = domContentLoadedCnt > 0; |
761 | 761 | if (isReadyScript) readyStateCompleteCnt++; |
762 | 762 | if (isDomContentLoadedScript) domContentLoadedCnt++; |
763 | | - const loadPromise = topLevelLoad(script.src || `${baseUrl}?${id++}`, getFetchOpts(script), !script.src && script.innerHTML, !shimMode, isReadyScript && lastStaticLoadPromise).catch(e => { |
| 763 | + const blocks = script.getAttribute('async') === null && isReadyScript; |
| 764 | + const loadPromise = topLevelLoad(script.src || `${baseUrl}?${id++}`, getFetchOpts(script), !script.src && script.innerHTML, !shimMode, blocks && lastStaticLoadPromise).catch(e => { |
764 | 765 | setTimeout(() => { throw e }); |
765 | 766 | onerror(e); |
766 | 767 | }); |
767 | | - if (isReadyScript) |
| 768 | + if (blocks) |
768 | 769 | lastStaticLoadPromise = loadPromise.then(readyStateCompleteCheck); |
769 | 770 | if (isDomContentLoadedScript) |
770 | 771 | loadPromise.then(domContentLoadedCheck); |
|
0 commit comments