proto-daisy-db 0.0.44 → 0.0.46
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/{index-71a69513.js → index-454d6dd6.js} +160 -142
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/proto-daisy-db.cjs.js +2 -2
- package/dist/cjs/proto-daisy-db_5.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/{index-9b5001c6.js → index-cb68dfba.js} +160 -142
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/proto-daisy-db.js +2 -2
- package/dist/esm/proto-daisy-db_5.entry.js +1 -1
- package/dist/proto-daisy-db/p-190c3102.js +2 -0
- package/dist/proto-daisy-db/{p-5b349ed7.entry.js → p-9c724d12.entry.js} +1 -1
- package/dist/proto-daisy-db/proto-daisy-db.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/package.json +3 -3
- package/dist/proto-daisy-db/p-5f1daad3.js +0 -2
|
@@ -22,32 +22,18 @@ function _interopNamespace(e) {
|
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'proto-daisy-db';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
27
|
+
* Simon Friis Vindum (@paldepind)
|
|
28
|
+
* Licensed under the MIT License
|
|
29
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
30
|
+
*
|
|
31
|
+
* Modified for Stencil's renderer and slot projection
|
|
32
|
+
*/
|
|
25
33
|
let scopeId;
|
|
26
34
|
let hostTagName;
|
|
27
35
|
let isSvgMode = false;
|
|
28
36
|
let queuePending = false;
|
|
29
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
30
|
-
const doc = win.document || { head: {} };
|
|
31
|
-
const plt = {
|
|
32
|
-
$flags$: 0,
|
|
33
|
-
$resourcesUrl$: '',
|
|
34
|
-
jmp: (h) => h(),
|
|
35
|
-
raf: (h) => requestAnimationFrame(h),
|
|
36
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
37
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
38
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
39
|
-
};
|
|
40
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
41
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
42
|
-
try {
|
|
43
|
-
new CSSStyleSheet();
|
|
44
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
45
|
-
}
|
|
46
|
-
catch (e) { }
|
|
47
|
-
return false;
|
|
48
|
-
})()
|
|
49
|
-
;
|
|
50
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
51
37
|
const createTime = (fnName, tagName = '') => {
|
|
52
38
|
{
|
|
53
39
|
return () => {
|
|
@@ -62,76 +48,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
62
48
|
};
|
|
63
49
|
}
|
|
64
50
|
};
|
|
65
|
-
const
|
|
66
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
67
|
-
let style = styles.get(scopeId);
|
|
68
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
69
|
-
style = (style || new CSSStyleSheet());
|
|
70
|
-
if (typeof style === 'string') {
|
|
71
|
-
style = cssText;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
style.replaceSync(cssText);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
style = cssText;
|
|
79
|
-
}
|
|
80
|
-
styles.set(scopeId, style);
|
|
81
|
-
};
|
|
82
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
83
|
-
let scopeId = getScopeId(cmpMeta);
|
|
84
|
-
const style = styles.get(scopeId);
|
|
85
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
86
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
87
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
88
|
-
if (style) {
|
|
89
|
-
if (typeof style === 'string') {
|
|
90
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
91
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
92
|
-
let styleElm;
|
|
93
|
-
if (!appliedStyles) {
|
|
94
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
95
|
-
}
|
|
96
|
-
if (!appliedStyles.has(scopeId)) {
|
|
97
|
-
{
|
|
98
|
-
{
|
|
99
|
-
styleElm = doc.createElement('style');
|
|
100
|
-
styleElm.innerHTML = style;
|
|
101
|
-
}
|
|
102
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
103
|
-
}
|
|
104
|
-
if (appliedStyles) {
|
|
105
|
-
appliedStyles.add(scopeId);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
110
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return scopeId;
|
|
114
|
-
};
|
|
115
|
-
const attachStyles = (hostRef) => {
|
|
116
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
117
|
-
const elm = hostRef.$hostElement$;
|
|
118
|
-
const flags = cmpMeta.$flags$;
|
|
119
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
120
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
121
|
-
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
122
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
123
|
-
// or this browser doesn't support native shadow dom
|
|
124
|
-
// and this host element was NOT created with SSR
|
|
125
|
-
// let's pick out the inner content for slot projection
|
|
126
|
-
// create a node to represent where the original
|
|
127
|
-
// content was first placed, which is useful later on
|
|
128
|
-
// DOM WRITE!!
|
|
129
|
-
elm['s-sc'] = scopeId;
|
|
130
|
-
elm.classList.add(scopeId + '-h');
|
|
131
|
-
}
|
|
132
|
-
endAttachStyles();
|
|
133
|
-
};
|
|
134
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
51
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
135
52
|
/**
|
|
136
53
|
* Default style mode id
|
|
137
54
|
*/
|
|
@@ -220,6 +137,126 @@ const newVNode = (tag, text) => {
|
|
|
220
137
|
};
|
|
221
138
|
const Host = {};
|
|
222
139
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
140
|
+
/**
|
|
141
|
+
* Parse a new property value for a given property type.
|
|
142
|
+
*
|
|
143
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
144
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
145
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
146
|
+
* 2. the type stored from `propType`.
|
|
147
|
+
*
|
|
148
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
149
|
+
*
|
|
150
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
151
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
152
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
153
|
+
* ```tsx
|
|
154
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* HTML prop values on the other hand, will always a string
|
|
158
|
+
*
|
|
159
|
+
* @param propValue the new value to coerce to some type
|
|
160
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
161
|
+
* @returns the parsed/coerced value
|
|
162
|
+
*/
|
|
163
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
164
|
+
// ensure this value is of the correct prop type
|
|
165
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
166
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
167
|
+
// could have been passed as a number or boolean
|
|
168
|
+
// but we still want it as a string
|
|
169
|
+
return String(propValue);
|
|
170
|
+
}
|
|
171
|
+
// redundant return here for better minification
|
|
172
|
+
return propValue;
|
|
173
|
+
}
|
|
174
|
+
// not sure exactly what type we want
|
|
175
|
+
// so no need to change to a different type
|
|
176
|
+
return propValue;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
180
|
+
* @param elm the target of the Event
|
|
181
|
+
* @param name the name to give the custom Event
|
|
182
|
+
* @param opts options for configuring a custom Event
|
|
183
|
+
* @returns the custom Event
|
|
184
|
+
*/
|
|
185
|
+
const emitEvent = (elm, name, opts) => {
|
|
186
|
+
const ev = plt.ce(name, opts);
|
|
187
|
+
elm.dispatchEvent(ev);
|
|
188
|
+
return ev;
|
|
189
|
+
};
|
|
190
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
191
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
192
|
+
let style = styles.get(scopeId);
|
|
193
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
194
|
+
style = (style || new CSSStyleSheet());
|
|
195
|
+
if (typeof style === 'string') {
|
|
196
|
+
style = cssText;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
style.replaceSync(cssText);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
style = cssText;
|
|
204
|
+
}
|
|
205
|
+
styles.set(scopeId, style);
|
|
206
|
+
};
|
|
207
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
208
|
+
let scopeId = getScopeId(cmpMeta);
|
|
209
|
+
const style = styles.get(scopeId);
|
|
210
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
211
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
212
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
213
|
+
if (style) {
|
|
214
|
+
if (typeof style === 'string') {
|
|
215
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
216
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
217
|
+
let styleElm;
|
|
218
|
+
if (!appliedStyles) {
|
|
219
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
220
|
+
}
|
|
221
|
+
if (!appliedStyles.has(scopeId)) {
|
|
222
|
+
{
|
|
223
|
+
{
|
|
224
|
+
styleElm = doc.createElement('style');
|
|
225
|
+
styleElm.innerHTML = style;
|
|
226
|
+
}
|
|
227
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
228
|
+
}
|
|
229
|
+
if (appliedStyles) {
|
|
230
|
+
appliedStyles.add(scopeId);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
235
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return scopeId;
|
|
239
|
+
};
|
|
240
|
+
const attachStyles = (hostRef) => {
|
|
241
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
242
|
+
const elm = hostRef.$hostElement$;
|
|
243
|
+
const flags = cmpMeta.$flags$;
|
|
244
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
245
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
246
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
247
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
248
|
+
// or this browser doesn't support native shadow dom
|
|
249
|
+
// and this host element was NOT created with SSR
|
|
250
|
+
// let's pick out the inner content for slot projection
|
|
251
|
+
// create a node to represent where the original
|
|
252
|
+
// content was first placed, which is useful later on
|
|
253
|
+
// DOM WRITE!!
|
|
254
|
+
elm['s-sc'] = scopeId;
|
|
255
|
+
elm.classList.add(scopeId + '-h');
|
|
256
|
+
}
|
|
257
|
+
endAttachStyles();
|
|
258
|
+
};
|
|
259
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
223
260
|
/**
|
|
224
261
|
* Production setAccessor() function based on Preact by
|
|
225
262
|
* Jason Miller (@developit)
|
|
@@ -668,18 +705,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
668
705
|
// synchronous patch
|
|
669
706
|
patch(oldVNode, rootVnode);
|
|
670
707
|
};
|
|
671
|
-
/**
|
|
672
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
673
|
-
* @param elm the target of the Event
|
|
674
|
-
* @param name the name to give the custom Event
|
|
675
|
-
* @param opts options for configuring a custom Event
|
|
676
|
-
* @returns the custom Event
|
|
677
|
-
*/
|
|
678
|
-
const emitEvent = (elm, name, opts) => {
|
|
679
|
-
const ev = plt.ce(name, opts);
|
|
680
|
-
elm.dispatchEvent(ev);
|
|
681
|
-
return ev;
|
|
682
|
-
};
|
|
683
708
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
684
709
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
685
710
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -833,44 +858,6 @@ const then = (promise, thenFn) => {
|
|
|
833
858
|
};
|
|
834
859
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
835
860
|
;
|
|
836
|
-
/**
|
|
837
|
-
* Parse a new property value for a given property type.
|
|
838
|
-
*
|
|
839
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
840
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
841
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
842
|
-
* 2. the type stored from `propType`.
|
|
843
|
-
*
|
|
844
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
845
|
-
*
|
|
846
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
847
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
848
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
849
|
-
* ```tsx
|
|
850
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
851
|
-
* ```
|
|
852
|
-
*
|
|
853
|
-
* HTML prop values on the other hand, will always a string
|
|
854
|
-
*
|
|
855
|
-
* @param propValue the new value to coerce to some type
|
|
856
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
857
|
-
* @returns the parsed/coerced value
|
|
858
|
-
*/
|
|
859
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
860
|
-
// ensure this value is of the correct prop type
|
|
861
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
862
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
863
|
-
// could have been passed as a number or boolean
|
|
864
|
-
// but we still want it as a string
|
|
865
|
-
return String(propValue);
|
|
866
|
-
}
|
|
867
|
-
// redundant return here for better minification
|
|
868
|
-
return propValue;
|
|
869
|
-
}
|
|
870
|
-
// not sure exactly what type we want
|
|
871
|
-
// so no need to change to a different type
|
|
872
|
-
return propValue;
|
|
873
|
-
};
|
|
874
861
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
875
862
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
876
863
|
// check our new property value against our internal value
|
|
@@ -897,6 +884,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
897
884
|
}
|
|
898
885
|
}
|
|
899
886
|
};
|
|
887
|
+
/**
|
|
888
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
889
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
890
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
891
|
+
*
|
|
892
|
+
* @param Cstr the constructor for a component that we need to process
|
|
893
|
+
* @param cmpMeta metadata collected previously about the component
|
|
894
|
+
* @param flags a number used to store a series of bit flags
|
|
895
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
896
|
+
*/
|
|
900
897
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
901
898
|
if (cmpMeta.$members$) {
|
|
902
899
|
// It's better to have a const than two Object.entries()
|
|
@@ -1232,6 +1229,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1232
1229
|
}, consoleError);
|
|
1233
1230
|
};
|
|
1234
1231
|
const styles = /*@__PURE__*/ new Map();
|
|
1232
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
1233
|
+
const doc = win.document || { head: {} };
|
|
1234
|
+
const plt = {
|
|
1235
|
+
$flags$: 0,
|
|
1236
|
+
$resourcesUrl$: '',
|
|
1237
|
+
jmp: (h) => h(),
|
|
1238
|
+
raf: (h) => requestAnimationFrame(h),
|
|
1239
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1240
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1241
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
1242
|
+
};
|
|
1243
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
1244
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
1245
|
+
try {
|
|
1246
|
+
new CSSStyleSheet();
|
|
1247
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
1248
|
+
}
|
|
1249
|
+
catch (e) { }
|
|
1250
|
+
return false;
|
|
1251
|
+
})()
|
|
1252
|
+
;
|
|
1235
1253
|
const queueDomReads = [];
|
|
1236
1254
|
const queueDomWrites = [];
|
|
1237
1255
|
const queueTask = (queue, write) => (cb) => {
|
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-454d6dd6.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.18.
|
|
8
|
+
Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-454d6dd6.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.18.
|
|
6
|
+
Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-daisy-db.cjs.js', document.baseURI).href));
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'proto-daisy-db';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
+
*
|
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
|
10
|
+
*/
|
|
3
11
|
let scopeId;
|
|
4
12
|
let hostTagName;
|
|
5
13
|
let isSvgMode = false;
|
|
6
14
|
let queuePending = false;
|
|
7
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
8
|
-
const doc = win.document || { head: {} };
|
|
9
|
-
const plt = {
|
|
10
|
-
$flags$: 0,
|
|
11
|
-
$resourcesUrl$: '',
|
|
12
|
-
jmp: (h) => h(),
|
|
13
|
-
raf: (h) => requestAnimationFrame(h),
|
|
14
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
15
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
16
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
17
|
-
};
|
|
18
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
19
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
20
|
-
try {
|
|
21
|
-
new CSSStyleSheet();
|
|
22
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
23
|
-
}
|
|
24
|
-
catch (e) { }
|
|
25
|
-
return false;
|
|
26
|
-
})()
|
|
27
|
-
;
|
|
28
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
29
15
|
const createTime = (fnName, tagName = '') => {
|
|
30
16
|
{
|
|
31
17
|
return () => {
|
|
@@ -40,76 +26,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
40
26
|
};
|
|
41
27
|
}
|
|
42
28
|
};
|
|
43
|
-
const
|
|
44
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
45
|
-
let style = styles.get(scopeId);
|
|
46
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
47
|
-
style = (style || new CSSStyleSheet());
|
|
48
|
-
if (typeof style === 'string') {
|
|
49
|
-
style = cssText;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
style.replaceSync(cssText);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
style = cssText;
|
|
57
|
-
}
|
|
58
|
-
styles.set(scopeId, style);
|
|
59
|
-
};
|
|
60
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
61
|
-
let scopeId = getScopeId(cmpMeta);
|
|
62
|
-
const style = styles.get(scopeId);
|
|
63
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
64
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
65
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
66
|
-
if (style) {
|
|
67
|
-
if (typeof style === 'string') {
|
|
68
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
69
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
70
|
-
let styleElm;
|
|
71
|
-
if (!appliedStyles) {
|
|
72
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
73
|
-
}
|
|
74
|
-
if (!appliedStyles.has(scopeId)) {
|
|
75
|
-
{
|
|
76
|
-
{
|
|
77
|
-
styleElm = doc.createElement('style');
|
|
78
|
-
styleElm.innerHTML = style;
|
|
79
|
-
}
|
|
80
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
81
|
-
}
|
|
82
|
-
if (appliedStyles) {
|
|
83
|
-
appliedStyles.add(scopeId);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
88
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return scopeId;
|
|
92
|
-
};
|
|
93
|
-
const attachStyles = (hostRef) => {
|
|
94
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
95
|
-
const elm = hostRef.$hostElement$;
|
|
96
|
-
const flags = cmpMeta.$flags$;
|
|
97
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
98
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
99
|
-
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
100
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
101
|
-
// or this browser doesn't support native shadow dom
|
|
102
|
-
// and this host element was NOT created with SSR
|
|
103
|
-
// let's pick out the inner content for slot projection
|
|
104
|
-
// create a node to represent where the original
|
|
105
|
-
// content was first placed, which is useful later on
|
|
106
|
-
// DOM WRITE!!
|
|
107
|
-
elm['s-sc'] = scopeId;
|
|
108
|
-
elm.classList.add(scopeId + '-h');
|
|
109
|
-
}
|
|
110
|
-
endAttachStyles();
|
|
111
|
-
};
|
|
112
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
29
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
113
30
|
/**
|
|
114
31
|
* Default style mode id
|
|
115
32
|
*/
|
|
@@ -198,6 +115,126 @@ const newVNode = (tag, text) => {
|
|
|
198
115
|
};
|
|
199
116
|
const Host = {};
|
|
200
117
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
118
|
+
/**
|
|
119
|
+
* Parse a new property value for a given property type.
|
|
120
|
+
*
|
|
121
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
122
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
123
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
124
|
+
* 2. the type stored from `propType`.
|
|
125
|
+
*
|
|
126
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
127
|
+
*
|
|
128
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
129
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
130
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
131
|
+
* ```tsx
|
|
132
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* HTML prop values on the other hand, will always a string
|
|
136
|
+
*
|
|
137
|
+
* @param propValue the new value to coerce to some type
|
|
138
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
139
|
+
* @returns the parsed/coerced value
|
|
140
|
+
*/
|
|
141
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
142
|
+
// ensure this value is of the correct prop type
|
|
143
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
144
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
145
|
+
// could have been passed as a number or boolean
|
|
146
|
+
// but we still want it as a string
|
|
147
|
+
return String(propValue);
|
|
148
|
+
}
|
|
149
|
+
// redundant return here for better minification
|
|
150
|
+
return propValue;
|
|
151
|
+
}
|
|
152
|
+
// not sure exactly what type we want
|
|
153
|
+
// so no need to change to a different type
|
|
154
|
+
return propValue;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
158
|
+
* @param elm the target of the Event
|
|
159
|
+
* @param name the name to give the custom Event
|
|
160
|
+
* @param opts options for configuring a custom Event
|
|
161
|
+
* @returns the custom Event
|
|
162
|
+
*/
|
|
163
|
+
const emitEvent = (elm, name, opts) => {
|
|
164
|
+
const ev = plt.ce(name, opts);
|
|
165
|
+
elm.dispatchEvent(ev);
|
|
166
|
+
return ev;
|
|
167
|
+
};
|
|
168
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
169
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
170
|
+
let style = styles.get(scopeId);
|
|
171
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
172
|
+
style = (style || new CSSStyleSheet());
|
|
173
|
+
if (typeof style === 'string') {
|
|
174
|
+
style = cssText;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
style.replaceSync(cssText);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
style = cssText;
|
|
182
|
+
}
|
|
183
|
+
styles.set(scopeId, style);
|
|
184
|
+
};
|
|
185
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
186
|
+
let scopeId = getScopeId(cmpMeta);
|
|
187
|
+
const style = styles.get(scopeId);
|
|
188
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
189
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
190
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
191
|
+
if (style) {
|
|
192
|
+
if (typeof style === 'string') {
|
|
193
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
194
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
195
|
+
let styleElm;
|
|
196
|
+
if (!appliedStyles) {
|
|
197
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
198
|
+
}
|
|
199
|
+
if (!appliedStyles.has(scopeId)) {
|
|
200
|
+
{
|
|
201
|
+
{
|
|
202
|
+
styleElm = doc.createElement('style');
|
|
203
|
+
styleElm.innerHTML = style;
|
|
204
|
+
}
|
|
205
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
206
|
+
}
|
|
207
|
+
if (appliedStyles) {
|
|
208
|
+
appliedStyles.add(scopeId);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
213
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return scopeId;
|
|
217
|
+
};
|
|
218
|
+
const attachStyles = (hostRef) => {
|
|
219
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
220
|
+
const elm = hostRef.$hostElement$;
|
|
221
|
+
const flags = cmpMeta.$flags$;
|
|
222
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
223
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
224
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
225
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
226
|
+
// or this browser doesn't support native shadow dom
|
|
227
|
+
// and this host element was NOT created with SSR
|
|
228
|
+
// let's pick out the inner content for slot projection
|
|
229
|
+
// create a node to represent where the original
|
|
230
|
+
// content was first placed, which is useful later on
|
|
231
|
+
// DOM WRITE!!
|
|
232
|
+
elm['s-sc'] = scopeId;
|
|
233
|
+
elm.classList.add(scopeId + '-h');
|
|
234
|
+
}
|
|
235
|
+
endAttachStyles();
|
|
236
|
+
};
|
|
237
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
201
238
|
/**
|
|
202
239
|
* Production setAccessor() function based on Preact by
|
|
203
240
|
* Jason Miller (@developit)
|
|
@@ -646,18 +683,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
646
683
|
// synchronous patch
|
|
647
684
|
patch(oldVNode, rootVnode);
|
|
648
685
|
};
|
|
649
|
-
/**
|
|
650
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
651
|
-
* @param elm the target of the Event
|
|
652
|
-
* @param name the name to give the custom Event
|
|
653
|
-
* @param opts options for configuring a custom Event
|
|
654
|
-
* @returns the custom Event
|
|
655
|
-
*/
|
|
656
|
-
const emitEvent = (elm, name, opts) => {
|
|
657
|
-
const ev = plt.ce(name, opts);
|
|
658
|
-
elm.dispatchEvent(ev);
|
|
659
|
-
return ev;
|
|
660
|
-
};
|
|
661
686
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
662
687
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
663
688
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -811,44 +836,6 @@ const then = (promise, thenFn) => {
|
|
|
811
836
|
};
|
|
812
837
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
813
838
|
;
|
|
814
|
-
/**
|
|
815
|
-
* Parse a new property value for a given property type.
|
|
816
|
-
*
|
|
817
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
818
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
819
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
820
|
-
* 2. the type stored from `propType`.
|
|
821
|
-
*
|
|
822
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
823
|
-
*
|
|
824
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
825
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
826
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
827
|
-
* ```tsx
|
|
828
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
829
|
-
* ```
|
|
830
|
-
*
|
|
831
|
-
* HTML prop values on the other hand, will always a string
|
|
832
|
-
*
|
|
833
|
-
* @param propValue the new value to coerce to some type
|
|
834
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
835
|
-
* @returns the parsed/coerced value
|
|
836
|
-
*/
|
|
837
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
838
|
-
// ensure this value is of the correct prop type
|
|
839
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
840
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
841
|
-
// could have been passed as a number or boolean
|
|
842
|
-
// but we still want it as a string
|
|
843
|
-
return String(propValue);
|
|
844
|
-
}
|
|
845
|
-
// redundant return here for better minification
|
|
846
|
-
return propValue;
|
|
847
|
-
}
|
|
848
|
-
// not sure exactly what type we want
|
|
849
|
-
// so no need to change to a different type
|
|
850
|
-
return propValue;
|
|
851
|
-
};
|
|
852
839
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
853
840
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
854
841
|
// check our new property value against our internal value
|
|
@@ -875,6 +862,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
875
862
|
}
|
|
876
863
|
}
|
|
877
864
|
};
|
|
865
|
+
/**
|
|
866
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
867
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
868
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
869
|
+
*
|
|
870
|
+
* @param Cstr the constructor for a component that we need to process
|
|
871
|
+
* @param cmpMeta metadata collected previously about the component
|
|
872
|
+
* @param flags a number used to store a series of bit flags
|
|
873
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
874
|
+
*/
|
|
878
875
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
879
876
|
if (cmpMeta.$members$) {
|
|
880
877
|
// It's better to have a const than two Object.entries()
|
|
@@ -1210,6 +1207,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1210
1207
|
}, consoleError);
|
|
1211
1208
|
};
|
|
1212
1209
|
const styles = /*@__PURE__*/ new Map();
|
|
1210
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
1211
|
+
const doc = win.document || { head: {} };
|
|
1212
|
+
const plt = {
|
|
1213
|
+
$flags$: 0,
|
|
1214
|
+
$resourcesUrl$: '',
|
|
1215
|
+
jmp: (h) => h(),
|
|
1216
|
+
raf: (h) => requestAnimationFrame(h),
|
|
1217
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1218
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1219
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
1220
|
+
};
|
|
1221
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
1222
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
1223
|
+
try {
|
|
1224
|
+
new CSSStyleSheet();
|
|
1225
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
1226
|
+
}
|
|
1227
|
+
catch (e) { }
|
|
1228
|
+
return false;
|
|
1229
|
+
})()
|
|
1230
|
+
;
|
|
1213
1231
|
const queueDomReads = [];
|
|
1214
1232
|
const queueDomWrites = [];
|
|
1215
1233
|
const queueTask = (queue, write) => (cb) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-cb68dfba.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.18.
|
|
4
|
+
Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
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="@";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}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;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}).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,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-cb68dfba.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.18.
|
|
4
|
+
Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const a=r(e,null);return a.l=t,c.length>0&&(a.o=c),a},r=(e,t)=>({i:0,u:e,t,$:null,o:null,l:null}),i={},c=new WeakMap,u=e=>"sc-"+e.h,a=(e,t,n,l,o,r)=>{if(n!==l){let i=R(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,s=$(n),o=$(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const c=s(l);if((i||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||o)&&!c&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):R(F,c)?c.slice(2):c[2]+t.slice(3),n&&V.rel(e,t,n,!1),l&&V.ael(e,t,l,!1)}},f=/\s/,$=e=>e?e.split(f):[],d=(e,t,n,s)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,r=e&&e.l||l,i=t.l||l;for(s in r)s in i||a(o,s,r[s],void 0,n,t.i);for(s in i)a(o,s,r[s],i[s],n,t.i)},y=(t,n,l)=>{const s=n.o[l];let o,r,i=0;if(null!==s.t)o=s.$=H.createTextNode(s.t);else if(o=s.$=H.createElement(s.u),d(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(i=0;i<s.o.length;++i)r=y(t,s,i),r&&o.appendChild(r);return o},h=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=y(null,l,o),i&&(s[o].$=i,c.insertBefore(i,n)))},p=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.$.remove()},m=(e,t)=>e.u===t.u,b=(e,t)=>{const n=t.$=e.$,l=e.o,s=t.o,o=t.t;null===o?(d(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:m(c,f)?(b(c,f),c=t[++o],f=l[++r]):m(u,$)?(b(u,$),u=t[--i],$=l[--a]):m(c,$)?(b(c,$),e.insertBefore(c.$,u.$.nextSibling),c=t[++o],$=l[--a]):m(u,f)?(b(u,f),e.insertBefore(u.$,c.$),u=t[--i],f=l[++r]):(s=y(t&&t[r],n,r),f=l[++r],s&&c.$.parentNode.insertBefore(s,c.$));o>i?h(e,null==l[a+1]?null:l[a+1].$,n,l,r,a):r>a&&p(t,o,i)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),h(n,null,t,s,0,s.length-1)):null!==l&&p(l,0,l.length-1)):e.t!==o&&(n.data=o)},w=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},S=(e,t)=>{if(e.i|=16,!(4&e.i))return w(e,e.m),X((()=>g(e,t)));e.i|=512},g=(e,t)=>{const n=e.S;return O(void 0,(()=>j(e,n,t)))},j=async(e,t,n)=>{const l=e.g,s=l["s-rc"];n&&(e=>{const t=e.j,n=e.g,l=t.i,s=((e,t)=>{let n=u(t);const l=D.get(n);if(e=11===e.nodeType?e:H,l)if("string"==typeof l){let t,s=c.get(e=e.head||e);s||c.set(e,s=new Set),s.has(n)||(t=H.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);v(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>M(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},v=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.g,c=n.v||r(null,null),u=(e=>e&&e.u===i)(l)?l:o(null,null,l);t=s.tagName,u.u=null,u.i|=4,n.v=u,u.$=c.$=s.shadowRoot||s,e=s["s-sc"],b(c,u)})(n,l)}catch(e){U(e,n.g)}return null},M=e=>{const t=e.g,n=e.S,l=e.m;64&e.i||(e.i|=64,P(t),C(n,"componentDidLoad"),e.M(t),l||k()),e.p&&(e.p(),e.p=void 0),512&e.i&&Q((()=>S(e,!1))),e.i&=-517},k=()=>{P(H.documentElement),Q((()=>(e=>{const t=V.ce("appload",{detail:{namespace:"proto-daisy-db"}});return e.dispatchEvent(t),t})(F)))},C=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){U(e)}},O=(e,t)=>e&&e.then?e.then(t):t(),P=e=>e.classList.add("hydrated"),x=(e,t,n)=>{if(t.k){const l=Object.entries(t.k),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>N(this).C.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=N(e),r=o.C.get(t),i=o.i,c=o.S;n=((e,t)=>null==e||s(e)?e:1&t?e+"":e)(n,l.k[t][0]),8&i&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n)||(o.C.set(t,n),c&&2==(18&i)&&S(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){V.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},E=(e,t={})=>{const n=[],l=t.exclude||[],s=F.customElements,o=H.head,r=o.querySelector("meta[charset]"),i=H.createElement("style"),c=[];let a,f=!0;Object.assign(V,t),V.O=new URL(t.resourcesUrl||"./",H.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],h:t[1],k:t[2],P:t[3]};o.k=t[2];const r=o.h,i=class extends HTMLElement{constructor(e){super(e),A(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),f?c.push(this):V.jmp((()=>(e=>{if(0==(1&V.i)){const t=N(e),n=t.j,l=()=>{};if(!(1&t.i)){t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){w(t,t.m=n);break}}n.k&&Object.entries(n.k).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(x(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){U(e)}t.i&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!D.has(t)){const l=()=>{};((e,t,n)=>{let l=D.get(e);z&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,D.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.m,r=()=>S(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){V.jmp((()=>{}))}componentOnReady(){return N(this).L}};o.N=e[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,x(i,o,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),o.insertBefore(i,r?r.nextSibling:o.firstChild),f=!1,c.length?c.map((e=>e.connectedCallback())):V.jmp((()=>a=setTimeout(k,30)))},L=new WeakMap,N=e=>L.get(e),T=(e,t)=>L.set(t.S=e,t),A=(e,t)=>{const n={i:0,g:e,j:t,C:new Map};return n.L=new Promise((e=>n.M=e)),e["s-p"]=[],e["s-rc"]=[],L.set(e,n)},R=(e,t)=>t in e,U=(e,t)=>(0,console.error)(e,t),W=new Map,q=e=>{const t=e.h.replace(/-/g,"_"),n=e.N,l=W.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(W.set(n,e),e[t])),U)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},D=new Map,F="undefined"!=typeof window?window:{},H=F.document||{head:{}},V={i:0,O:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},_=e=>Promise.resolve(e),z=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),B=[],G=[],I=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&V.i?Q(K):V.raf(K))},J=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){U(e)}e.length=0},K=()=>{J(B),J(G),(n=B.length>0)&&V.raf(K)},Q=e=>_().then(e),X=I(G,!0);export{E as b,o as h,_ as p,T as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as o}from"./p-
|
|
1
|
+
import{r as t,h as o}from"./p-190c3102.js";const s="proto-daisy-db:app-data",a=class{constructor(o){t(this,o),this.emitter=void 0}componentDidLoad(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter];t.on("app-data:get",(()=>{var o;console.log("app-data:get"),(o=localStorage.getItem(s),new Promise(((t,s)=>{try{t(JSON.parse(o))}catch(t){s(t)}}))).then((o=>{t.emit("app-data:value",o)})).catch((t=>{console.log(t)}))})),t.on("app-data:store",(t=>{console.log("app-data:store",t),(t=>{const o=JSON.stringify(t);localStorage.setItem(s,o)})(t)})),t.emit("proto-daisy-db",{ready:!0})}}render(){return o("div",null)}};a.style="";const r=class{constructor(o){t(this,o),this.data=void 0}render(){const t=this.data?Object.keys(this.data):[];return o("div",{class:"flex flex-col"},t.map((t=>o("span",null,t))))}};r.style="";const e=class{constructor(o){t(this,o),this.data=void 0}render(){return o("div",{class:"flex"},o("span",null,this.data?this.data.stamp:""))}};e.style="";const i=class{constructor(o){t(this,o),this.emitter=void 0,this.data=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("app-data:value",(t=>{this.data=t}))}emitData(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter],o={login:!0,stamp:Date.now(),theme:"dark",dealers:[]};this.data=void 0,t.emit("app-data:store",o)}}fetchData(){this.emitter&&window[this.emitter]&&window[this.emitter].emit("app-data:get",42)}render(){return o("div",{class:"flex flex-col font-sans"},o("div",{class:"flex flex-row content-center gap-2"},o("button",{class:"btn bg-clrs-navy text-clrs-white",onClick:()=>this.emitData()},"Save"),o("button",{class:"btn bg-clrs-blue text-clrs-white",onClick:()=>this.fetchData()},"Fetch")),o("proto-faux-type",{class:"mt-4",emitter:this.emitter}),o("proto-faux-stamp",{class:"mt-2 text-xs",data:this.data}),o("proto-faux-keys",{class:"mt-2",data:this.data}))}};i.style="*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.btn{border-radius:0.375rem;border-width:1px;border-style:solid;border-color:var(--clrs-aqua, #7fdbff);padding:0.5rem}.mt-4{margin-top:1rem}.mt-2{margin-top:0.5rem}.flex{display:flex}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.content-center{align-content:center}.gap-2{gap:0.5rem}.bg-clrs-navy{background-color:var(--clrs-navy, #001f3f)}.bg-clrs-blue{background-color:var(--clrs-blue, #0074d9)}.font-sans{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}.text-xs{font-size:0.75rem;line-height:1rem}.italic{font-style:italic}.text-clrs-white{color:var(--clrs-white, #ffffff)}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),\n 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";const n=class{constructor(o){t(this,o),this.emitter=void 0,this.eventType=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("*",(t=>{this.eventType=t}))}render(){return o("div",null,o("span",{class:"text-xs italic"},this.eventType))}};n.style="proto-faux-type{}";export{a as proto_daisy_db,r as proto_faux_keys,e as proto_faux_stamp,i as proto_faux_trigger,n as proto_faux_type}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as e}from"./p-
|
|
1
|
+
import{p as t,b as e}from"./p-190c3102.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),t(r)})().then((t=>e([["p-9c724d12",[[0,"proto-faux-trigger",{emitter:[1],data:[1040]}],[1,"proto-daisy-db",{emitter:[1]}],[0,"proto-faux-keys",{data:[16]}],[0,"proto-faux-stamp",{data:[16]}],[0,"proto-faux-type",{emitter:[1],eventType:[1025,"event-type"]}]]]],t)));
|
|
@@ -221,7 +221,8 @@ export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
225
226
|
*/
|
|
226
227
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
228
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +235,8 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
235
|
/**
|
|
235
236
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
237
|
* if the path needs to be customized.
|
|
238
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
239
|
+
* used in conjunction with the base asset path
|
|
237
240
|
*/
|
|
238
241
|
export declare function getAssetPath(path: string): string;
|
|
239
242
|
/**
|
|
@@ -246,18 +249,22 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
249
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
250
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
251
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
252
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
253
|
* will have to ensure the static assets are copied to its build directory.
|
|
254
|
+
* @param path the asset path to set
|
|
251
255
|
*/
|
|
252
256
|
export declare function setAssetPath(path: string): string;
|
|
253
257
|
/**
|
|
254
|
-
*
|
|
258
|
+
* Retrieve a Stencil element for a given reference
|
|
259
|
+
* @param ref the ref to get the Stencil element for
|
|
255
260
|
*/
|
|
256
261
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
262
|
/**
|
|
258
263
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
264
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
265
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
266
|
+
*
|
|
267
|
+
* @param ref the node/element to force the re-render of
|
|
261
268
|
*/
|
|
262
269
|
export declare function forceUpdate(ref: any): void;
|
|
263
270
|
/**
|
|
@@ -272,6 +279,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
279
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
280
|
*
|
|
274
281
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
282
|
+
*
|
|
283
|
+
* @param task the DOM-write to schedule
|
|
275
284
|
*/
|
|
276
285
|
export declare function writeTask(task: RafCallback): void;
|
|
277
286
|
/**
|
|
@@ -279,6 +288,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
288
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
289
|
*
|
|
281
290
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
291
|
+
*
|
|
292
|
+
* @param task the DOM-read to schedule
|
|
282
293
|
*/
|
|
283
294
|
export declare function readTask(task: RafCallback): void;
|
|
284
295
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proto-daisy-db",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"format": "prettier --write src"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@stencil/core": "2.18.
|
|
30
|
+
"@stencil/core": "2.18.1",
|
|
31
31
|
"mitt": "3.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"postcss": "8.4.17",
|
|
40
40
|
"prettier": "2.7.1",
|
|
41
41
|
"prettier-plugin-tailwindcss": "0.1.13",
|
|
42
|
-
"proto-tailwindcss-clrs": "0.0.
|
|
42
|
+
"proto-tailwindcss-clrs": "0.0.169",
|
|
43
43
|
"tailwindcss": "3.1.8"
|
|
44
44
|
},
|
|
45
45
|
"license": "MIT"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1;const r=[],i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=d(e,null);return c.u=t,r.length>0&&(c.$=r),c},d=(e,t)=>({t:0,h:e,i:t,p:null,$:null,u:null}),y={},h=(e,t,n,s,r,i)=>{if(n!==s){let c=F(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=m(n),o=m(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{const l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):F(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},p=/\s/,m=e=>e?e.split(p):[],b=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||h(s,l,o[l],void 0,n,t.t);for(l in r)h(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{const o=n.$[l];let r,i,c=0;if(null!==o.i)r=o.p=s.createTextNode(o.i);else if(r=o.p=s.createElement(o.h),b(null,o,!1),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),o.$)for(c=0;c<o.$.length;++c)i=w(t,o,c),i&&r.appendChild(i);return r},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].p=i,c.insertBefore(i,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.p.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.p=e.p,l=e.$,s=t.$,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,$)?(v(u,$),u=t[--i],$=l[--a]):j(c,$)?(v(c,$),e.insertBefore(c.p,u.p.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.p.parentNode.insertBefore(s,c.p));o>i?S(e,null==l[a+1]?null:l[a+1].p,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},k=(e,t)=>{if(e.t|=16,!(4&e.t))return M(e,e.S),X((()=>C(e,t)));e.t|=512},C=(e,t)=>{const n=e.g;return N(void 0,(()=>O(e,n,t)))},O=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,o=((e,t)=>{let n=u(t);const l=z.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);P(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>x(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M||d(null,null),r=(e=>e&&e.h===y)(l)?l:$(null,null,l);t=s.tagName,r.h=null,r.t|=4,n.M=r,r.p=o.p=s.shadowRoot||s,e=s["s-sc"],v(o,r)})(n,l)}catch(e){H(e,n.j)}return null},x=e=>{const t=e.j,n=e.g,l=e.S;64&e.t||(e.t|=64,T(t),L(n,"componentDidLoad"),e.k(t),l||E()),e.m&&(e.m(),e.m=void 0),512&e.t&&Q((()=>k(e,!1))),e.t&=-517},E=()=>{T(s.documentElement),Q((()=>(e=>{const t=o.ce("appload",{detail:{namespace:"proto-daisy-db"}});return e.dispatchEvent(t),t})(l)))},L=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){H(e)}},N=(e,t)=>e&&e.then?e.then(t):t(),T=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>W(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=W(e),o=s.O.get(t),r=s.t,i=s.g;n=((e,t)=>null==e||f(e)?e:1&t?e+"":e)(n,l.C[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),i&&2==(18&r)&&k(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},R=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),d=[];let y,h=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),D(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=W(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(t,t.S=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=_(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(A(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){H(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!z.has(t)){const l=()=>{};((e,t,n)=>{let l=z.get(e);i&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,z.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.S,r=()=>k(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return W(this).L}};l.N=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,A(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):o.jmp((()=>y=setTimeout(E,30)))},U=new WeakMap,W=e=>U.get(e),q=(e,t)=>U.set(t.g=e,t),D=(e,t)=>{const n={t:0,j:e,v:t,O:new Map};return n.L=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],U.set(e,n)},F=(e,t)=>t in e,H=(e,t)=>(0,console.error)(e,t),V=new Map,_=e=>{const t=e.o.replace(/-/g,"_"),n=e.N,l=V.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(V.set(n,e),e[t])),H)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B=[],G=[],I=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Q(K):o.raf(K))},J=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){H(e)}e.length=0},K=()=>{J(B),J(G),(n=B.length>0)&&o.raf(K)},Q=e=>r().then(e),X=I(G,!0);export{R as b,$ as h,r as p,q as r}
|