proto-ikons-wc 0.0.82 → 0.0.84
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/cjs/acura-ikon_119.cjs.entry.js +1 -1
- package/dist/cjs/{index-70c493e0.js → index-5d33f0ae.js} +32 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/proto-ikons-wc.cjs.js +6 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +1 -1
- package/dist/esm/acura-ikon_119.entry.js +1 -1
- package/dist/esm/{index-08330180.js → index-c27f5881.js} +32 -2
- package/dist/esm/loader.js +3 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/proto-ikons-wc.js +3 -2
- package/dist/proto-ikons-wc/{p-58c3720b.entry.js → p-83fbc649.entry.js} +1 -1
- package/dist/proto-ikons-wc/p-f7e8a1cb.js +2 -0
- package/dist/proto-ikons-wc/proto-ikons-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +48 -3
- package/loader/index.d.ts +9 -0
- package/package.json +2 -2
- package/dist/proto-ikons-wc/p-db0404e3.js +0 -2
|
@@ -66,6 +66,18 @@ const isComplexType = (o) => {
|
|
|
66
66
|
o = typeof o;
|
|
67
67
|
return o === 'object' || o === 'function';
|
|
68
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
71
|
+
* out of a DOM's head.
|
|
72
|
+
*
|
|
73
|
+
* @param doc The DOM containing the `head` to query against
|
|
74
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
75
|
+
* exists or the tag has no content.
|
|
76
|
+
*/
|
|
77
|
+
function queryNonceMetaTagContent(doc) {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
80
|
+
}
|
|
69
81
|
/**
|
|
70
82
|
* Production h() function based on Preact by
|
|
71
83
|
* Jason Miller (@developit)
|
|
@@ -74,7 +86,6 @@ const isComplexType = (o) => {
|
|
|
74
86
|
*
|
|
75
87
|
* Modified for Stencil's compiler and vdom
|
|
76
88
|
*/
|
|
77
|
-
// const stack: any[] = [];
|
|
78
89
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
79
90
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
80
91
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -217,6 +228,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
217
228
|
styles.set(scopeId, style);
|
|
218
229
|
};
|
|
219
230
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
231
|
+
var _a;
|
|
220
232
|
let scopeId = getScopeId(cmpMeta);
|
|
221
233
|
const style = styles.get(scopeId);
|
|
222
234
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -236,6 +248,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
236
248
|
styleElm = doc.createElement('style');
|
|
237
249
|
styleElm.innerHTML = style;
|
|
238
250
|
}
|
|
251
|
+
// Apply CSP nonce to the style tag if it exists
|
|
252
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
253
|
+
if (nonce != null) {
|
|
254
|
+
styleElm.setAttribute('nonce', nonce);
|
|
255
|
+
}
|
|
239
256
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
240
257
|
}
|
|
241
258
|
if (appliedStyles) {
|
|
@@ -1079,6 +1096,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1079
1096
|
}
|
|
1080
1097
|
};
|
|
1081
1098
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1099
|
+
var _a;
|
|
1082
1100
|
const endBootstrap = createTime();
|
|
1083
1101
|
const cmpTags = [];
|
|
1084
1102
|
const exclude = options.exclude || [];
|
|
@@ -1141,6 +1159,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1141
1159
|
{
|
|
1142
1160
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1143
1161
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1162
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1163
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1164
|
+
if (nonce != null) {
|
|
1165
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1166
|
+
}
|
|
1144
1167
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1145
1168
|
}
|
|
1146
1169
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1156,6 +1179,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1156
1179
|
// Fallback appLoad event
|
|
1157
1180
|
endBootstrap();
|
|
1158
1181
|
};
|
|
1182
|
+
/**
|
|
1183
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1184
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1185
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1186
|
+
* @returns void
|
|
1187
|
+
*/
|
|
1188
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1159
1189
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1160
1190
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1161
1191
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1266,3 +1296,4 @@ exports.bootstrapLazy = bootstrapLazy;
|
|
|
1266
1296
|
exports.h = h;
|
|
1267
1297
|
exports.promiseResolve = promiseResolve;
|
|
1268
1298
|
exports.registerInstance = registerInstance;
|
|
1299
|
+
exports.setNonce = setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5d33f0ae.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -18,4 +18,5 @@ const defineCustomElements = (win, options) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
21
22
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-5d33f0ae.js');
|
|
4
6
|
|
|
5
7
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
8
|
+
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
7
9
|
*/
|
|
8
10
|
const patchBrowser = () => {
|
|
9
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-ikons-wc.cjs.js', document.baseURI).href));
|
|
@@ -17,3 +19,5 @@ const patchBrowser = () => {
|
|
|
17
19
|
patchBrowser().then(options => {
|
|
18
20
|
return index.bootstrapLazy([["acura-ikon_119.cjs",[[0,"acura-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"alfa-romeo-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"alfa-romeo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"alien-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"am-general-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"asterisk-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"aston-martin-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"aston-martin-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"audi-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"barcode-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"barcode-scan-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"bash-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"beaker-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"bently-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"bmw-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"bugatti-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"buick-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"cadillac-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"chart-bar-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-bubble-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-donut-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-donuts-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"check-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chevrolet-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"chevron-double-left-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chrysler-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"circular-saw-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"citroen-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"close-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"daewoo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"dodge-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"eagle-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"ferrari-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"fiat-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fiat-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"fingerprint-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fire-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fisker-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"flask-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ford-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"genesis-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"geo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"git-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"gmc-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"honda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"hummer-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"hyundai-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"infiniti-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"isuzu-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"jaguar-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jaguar-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"java-script-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jeep-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jeep-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"kia-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lamborghini-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"lamborghini-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"land-rover-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lexus-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lincoln-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lotus-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"lotus-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"maserati-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"maybach-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mazda-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mazda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mclaren-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mclaren-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mercedes-benz-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mercedes-benz-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mercury-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mini-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mini-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mitsubishi-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"nissan-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"oldsmobile-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"one-password-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"opel-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"panoz-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"paw-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"peugeot-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"peugeot-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"plymouth-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"pontiac-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"porsche-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"protocol-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"pulse-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"puzzle-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"qr-code-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"radio-2-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"radio-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ram-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ram-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"refresh-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"renault-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"renault-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"rolls-royce-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"saab-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"saab-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"saturn-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"scion-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"seat-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"skoda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"slug-icon",{"label":[1],"name":[1],"size":[2]}],[0,"smart-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"spider-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"spyker-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"spyker-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"subaru-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"subaru-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"suzuki-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"svg-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"tesla-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"toyota-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"vector-curve-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"volkswagen-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"volvo-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"volvo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"webhook-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}]]]], options);
|
|
19
21
|
});
|
|
22
|
+
|
|
23
|
+
exports.setNonce = index.setNonce;
|
|
@@ -131,6 +131,15 @@ export { WebhookIcon as WebhookIcon } from '../types/components/webhook-icon/web
|
|
|
131
131
|
*/
|
|
132
132
|
export declare const setAssetPath: (path: string) => void;
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
136
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
137
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
138
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
139
|
+
* will result in the same behavior.
|
|
140
|
+
*/
|
|
141
|
+
export declare const setNonce: (nonce: string) => void
|
|
142
|
+
|
|
134
143
|
export interface SetPlatformOptions {
|
|
135
144
|
raf?: (c: FrameRequestCallback) => number;
|
|
136
145
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
1
|
+
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { AcuraIkon, defineCustomElement as defineCustomElementAcuraIkon } from './acura-ikon.js';
|
|
3
3
|
export { AlfaRomeoAltIkon, defineCustomElement as defineCustomElementAlfaRomeoAltIkon } from './alfa-romeo-alt-ikon.js';
|
|
4
4
|
export { AlfaRomeoIkon, defineCustomElement as defineCustomElementAlfaRomeoIkon } from './alfa-romeo-ikon.js';
|
|
@@ -44,6 +44,18 @@ const isComplexType = (o) => {
|
|
|
44
44
|
o = typeof o;
|
|
45
45
|
return o === 'object' || o === 'function';
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
49
|
+
* out of a DOM's head.
|
|
50
|
+
*
|
|
51
|
+
* @param doc The DOM containing the `head` to query against
|
|
52
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
53
|
+
* exists or the tag has no content.
|
|
54
|
+
*/
|
|
55
|
+
function queryNonceMetaTagContent(doc) {
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
58
|
+
}
|
|
47
59
|
/**
|
|
48
60
|
* Production h() function based on Preact by
|
|
49
61
|
* Jason Miller (@developit)
|
|
@@ -52,7 +64,6 @@ const isComplexType = (o) => {
|
|
|
52
64
|
*
|
|
53
65
|
* Modified for Stencil's compiler and vdom
|
|
54
66
|
*/
|
|
55
|
-
// const stack: any[] = [];
|
|
56
67
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
57
68
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
58
69
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -195,6 +206,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
195
206
|
styles.set(scopeId, style);
|
|
196
207
|
};
|
|
197
208
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
209
|
+
var _a;
|
|
198
210
|
let scopeId = getScopeId(cmpMeta);
|
|
199
211
|
const style = styles.get(scopeId);
|
|
200
212
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -214,6 +226,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
214
226
|
styleElm = doc.createElement('style');
|
|
215
227
|
styleElm.innerHTML = style;
|
|
216
228
|
}
|
|
229
|
+
// Apply CSP nonce to the style tag if it exists
|
|
230
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
231
|
+
if (nonce != null) {
|
|
232
|
+
styleElm.setAttribute('nonce', nonce);
|
|
233
|
+
}
|
|
217
234
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
218
235
|
}
|
|
219
236
|
if (appliedStyles) {
|
|
@@ -1057,6 +1074,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1057
1074
|
}
|
|
1058
1075
|
};
|
|
1059
1076
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1077
|
+
var _a;
|
|
1060
1078
|
const endBootstrap = createTime();
|
|
1061
1079
|
const cmpTags = [];
|
|
1062
1080
|
const exclude = options.exclude || [];
|
|
@@ -1119,6 +1137,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1119
1137
|
{
|
|
1120
1138
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1121
1139
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1140
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1141
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1142
|
+
if (nonce != null) {
|
|
1143
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1144
|
+
}
|
|
1122
1145
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1123
1146
|
}
|
|
1124
1147
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1134,6 +1157,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1134
1157
|
// Fallback appLoad event
|
|
1135
1158
|
endBootstrap();
|
|
1136
1159
|
};
|
|
1160
|
+
/**
|
|
1161
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1162
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1163
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1164
|
+
* @returns void
|
|
1165
|
+
*/
|
|
1166
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1137
1167
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1138
1168
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1139
1169
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1240,4 +1270,4 @@ const flush = () => {
|
|
|
1240
1270
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1241
1271
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1242
1272
|
|
|
1243
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1273
|
+
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c27f5881.js';
|
|
2
|
+
export { s as setNonce } from './index-c27f5881.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchEsm = () => {
|
|
7
8
|
return promiseResolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c27f5881.js';
|
|
2
|
+
export { s as setNonce } from './index-c27f5881.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
5
|
+
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchBrowser = () => {
|
|
7
8
|
const importMeta = import.meta.url;
|