ednl-liftstatus-web-components 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/cjs/ednl-liftstatus-web-components.cjs.js +19 -0
  4. package/dist/cjs/index-844f384e.js +1073 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/loader.cjs.js +21 -0
  7. package/dist/cjs/ls-3d-scene_8.cjs.entry.js +10130 -0
  8. package/dist/collection/collection-manifest.json +19 -0
  9. package/dist/collection/components/ls-3d-scene/ls-3d-scene.css +4 -0
  10. package/dist/collection/components/ls-3d-scene/ls-3d-scene.js +17 -0
  11. package/dist/collection/components/ls-counters/ls-counters.css +4 -0
  12. package/dist/collection/components/ls-counters/ls-counters.js +17 -0
  13. package/dist/collection/components/ls-data/ls-data.css +4 -0
  14. package/dist/collection/components/ls-data/ls-data.js +51 -0
  15. package/dist/collection/components/ls-history/ls-history.css +4 -0
  16. package/dist/collection/components/ls-history/ls-history.js +17 -0
  17. package/dist/collection/components/ls-status/ls-status.css +4 -0
  18. package/dist/collection/components/ls-status/ls-status.js +24 -0
  19. package/dist/collection/components/ls-status-history/ls-status-history.css +4 -0
  20. package/dist/collection/components/ls-status-history/ls-status-history.js +17 -0
  21. package/dist/collection/components/ls-status-item/ls-status-item.css +19 -0
  22. package/dist/collection/components/ls-status-item/ls-status-item.js +68 -0
  23. package/dist/collection/components/ls-swimlane/ls-swimlane.css +4 -0
  24. package/dist/collection/components/ls-swimlane/ls-swimlane.js +17 -0
  25. package/dist/collection/index.js +1 -0
  26. package/dist/collection/utils/utils.js +3 -0
  27. package/dist/custom-elements/index.d.ts +87 -0
  28. package/dist/custom-elements/index.js +10163 -0
  29. package/dist/ednl-liftstatus-web-components/ednl-liftstatus-web-components.css +1 -0
  30. package/dist/ednl-liftstatus-web-components/ednl-liftstatus-web-components.esm.js +1 -0
  31. package/dist/ednl-liftstatus-web-components/index.esm.js +0 -0
  32. package/dist/ednl-liftstatus-web-components/p-7b9ecd22.js +1 -0
  33. package/dist/ednl-liftstatus-web-components/p-db25283a.entry.js +2 -0
  34. package/dist/esm/ednl-liftstatus-web-components.js +17 -0
  35. package/dist/esm/index-01d5c148.js +1047 -0
  36. package/dist/esm/index.js +1 -0
  37. package/dist/esm/loader.js +17 -0
  38. package/dist/esm/ls-3d-scene_8.entry.js +10119 -0
  39. package/dist/esm/polyfills/core-js.js +11 -0
  40. package/dist/esm/polyfills/css-shim.js +1 -0
  41. package/dist/esm/polyfills/dom.js +79 -0
  42. package/dist/esm/polyfills/es5-html-element.js +1 -0
  43. package/dist/esm/polyfills/index.js +34 -0
  44. package/dist/esm/polyfills/system.js +6 -0
  45. package/dist/index.cjs.js +1 -0
  46. package/dist/index.js +1 -0
  47. package/dist/types/components/ls-3d-scene/ls-3d-scene.d.ts +3 -0
  48. package/dist/types/components/ls-counters/ls-counters.d.ts +3 -0
  49. package/dist/types/components/ls-data/ls-data.d.ts +10 -0
  50. package/dist/types/components/ls-history/ls-history.d.ts +3 -0
  51. package/dist/types/components/ls-status/ls-status.d.ts +3 -0
  52. package/dist/types/components/ls-status-history/ls-status-history.d.ts +3 -0
  53. package/dist/types/components/ls-status-item/ls-status-item.d.ts +26 -0
  54. package/dist/types/components/ls-swimlane/ls-swimlane.d.ts +3 -0
  55. package/dist/types/components.d.ts +144 -0
  56. package/dist/types/index.d.ts +1 -0
  57. package/dist/types/stencil-public-runtime.d.ts +1563 -0
  58. package/dist/types/utils/utils.d.ts +1 -0
  59. package/loader/cdn.js +3 -0
  60. package/loader/index.cjs.js +3 -0
  61. package/loader/index.d.ts +13 -0
  62. package/loader/index.es2017.js +3 -0
  63. package/loader/index.js +4 -0
  64. package/loader/package.json +10 -0
  65. package/package.json +76 -0
@@ -0,0 +1,1073 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'ednl-liftstatus-web-components';
24
+
25
+ let scopeId;
26
+ let hostTagName;
27
+ let isSvgMode = false;
28
+ 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 supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
42
+ try {
43
+ new CSSStyleSheet();
44
+ return typeof new CSSStyleSheet().replace === 'function';
45
+ }
46
+ catch (e) { }
47
+ return false;
48
+ })()
49
+ ;
50
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
51
+ const createTime = (fnName, tagName = '') => {
52
+ {
53
+ return () => {
54
+ return;
55
+ };
56
+ }
57
+ };
58
+ const uniqueTime = (key, measureText) => {
59
+ {
60
+ return () => {
61
+ return;
62
+ };
63
+ }
64
+ };
65
+ const rootAppliedStyles = new WeakMap();
66
+ const registerStyle = (scopeId, cssText, allowCS) => {
67
+ let style = styles.get(scopeId);
68
+ if (supportsConstructibleStylesheets && allowCS) {
69
+ style = (style || new CSSStyleSheet());
70
+ style.replace(cssText);
71
+ }
72
+ else {
73
+ style = cssText;
74
+ }
75
+ styles.set(scopeId, style);
76
+ };
77
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
78
+ let scopeId = getScopeId(cmpMeta);
79
+ let style = styles.get(scopeId);
80
+ // if an element is NOT connected then getRootNode() will return the wrong root node
81
+ // so the fallback is to always use the document for the root node in those cases
82
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
83
+ if (style) {
84
+ if (typeof style === 'string') {
85
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
86
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
87
+ let styleElm;
88
+ if (!appliedStyles) {
89
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
90
+ }
91
+ if (!appliedStyles.has(scopeId)) {
92
+ {
93
+ {
94
+ styleElm = doc.createElement('style');
95
+ styleElm.innerHTML = style;
96
+ }
97
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
98
+ }
99
+ if (appliedStyles) {
100
+ appliedStyles.add(scopeId);
101
+ }
102
+ }
103
+ }
104
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
105
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
106
+ }
107
+ }
108
+ return scopeId;
109
+ };
110
+ const attachStyles = (hostRef) => {
111
+ const cmpMeta = hostRef.$cmpMeta$;
112
+ const elm = hostRef.$hostElement$;
113
+ const flags = cmpMeta.$flags$;
114
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
115
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
116
+ if (flags & 10 /* needsScopedEncapsulation */) {
117
+ // only required when we're NOT using native shadow dom (slot)
118
+ // or this browser doesn't support native shadow dom
119
+ // and this host element was NOT created with SSR
120
+ // let's pick out the inner content for slot projection
121
+ // create a node to represent where the original
122
+ // content was first placed, which is useful later on
123
+ // DOM WRITE!!
124
+ elm['s-sc'] = scopeId;
125
+ elm.classList.add(scopeId + '-h');
126
+ }
127
+ endAttachStyles();
128
+ };
129
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
130
+ /**
131
+ * Default style mode id
132
+ */
133
+ /**
134
+ * Reusable empty obj/array
135
+ * Don't add values to these!!
136
+ */
137
+ const EMPTY_OBJ = {};
138
+ const isDef = (v) => v != null;
139
+ const isComplexType = (o) => {
140
+ // https://jsperf.com/typeof-fn-object/5
141
+ o = typeof o;
142
+ return o === 'object' || o === 'function';
143
+ };
144
+ /**
145
+ * Production h() function based on Preact by
146
+ * Jason Miller (@developit)
147
+ * Licensed under the MIT License
148
+ * https://github.com/developit/preact/blob/master/LICENSE
149
+ *
150
+ * Modified for Stencil's compiler and vdom
151
+ */
152
+ // const stack: any[] = [];
153
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
154
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
155
+ const h = (nodeName, vnodeData, ...children) => {
156
+ let child = null;
157
+ let simple = false;
158
+ let lastSimple = false;
159
+ let vNodeChildren = [];
160
+ const walk = (c) => {
161
+ for (let i = 0; i < c.length; i++) {
162
+ child = c[i];
163
+ if (Array.isArray(child)) {
164
+ walk(child);
165
+ }
166
+ else if (child != null && typeof child !== 'boolean') {
167
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
168
+ child = String(child);
169
+ }
170
+ if (simple && lastSimple) {
171
+ // If the previous child was simple (string), we merge both
172
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
173
+ }
174
+ else {
175
+ // Append a new vNode, if it's text, we create a text vNode
176
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
177
+ }
178
+ lastSimple = simple;
179
+ }
180
+ }
181
+ };
182
+ walk(children);
183
+ if (vnodeData) {
184
+ {
185
+ const classData = vnodeData.className || vnodeData.class;
186
+ if (classData) {
187
+ vnodeData.class =
188
+ typeof classData !== 'object'
189
+ ? classData
190
+ : Object.keys(classData)
191
+ .filter((k) => classData[k])
192
+ .join(' ');
193
+ }
194
+ }
195
+ }
196
+ const vnode = newVNode(nodeName, null);
197
+ vnode.$attrs$ = vnodeData;
198
+ if (vNodeChildren.length > 0) {
199
+ vnode.$children$ = vNodeChildren;
200
+ }
201
+ return vnode;
202
+ };
203
+ const newVNode = (tag, text) => {
204
+ const vnode = {
205
+ $flags$: 0,
206
+ $tag$: tag,
207
+ $text$: text,
208
+ $elm$: null,
209
+ $children$: null,
210
+ };
211
+ {
212
+ vnode.$attrs$ = null;
213
+ }
214
+ return vnode;
215
+ };
216
+ const Host = {};
217
+ const isHost = (node) => node && node.$tag$ === Host;
218
+ /**
219
+ * Production setAccessor() function based on Preact by
220
+ * Jason Miller (@developit)
221
+ * Licensed under the MIT License
222
+ * https://github.com/developit/preact/blob/master/LICENSE
223
+ *
224
+ * Modified for Stencil's compiler and vdom
225
+ */
226
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
227
+ if (oldValue !== newValue) {
228
+ let isProp = isMemberInElement(elm, memberName);
229
+ memberName.toLowerCase();
230
+ if (memberName === 'class') {
231
+ const classList = elm.classList;
232
+ const oldClasses = parseClassList(oldValue);
233
+ const newClasses = parseClassList(newValue);
234
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
235
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
236
+ }
237
+ else {
238
+ // Set property if it exists and it's not a SVG
239
+ const isComplex = isComplexType(newValue);
240
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
241
+ try {
242
+ if (!elm.tagName.includes('-')) {
243
+ let n = newValue == null ? '' : newValue;
244
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
245
+ if (memberName === 'list') {
246
+ isProp = false;
247
+ // tslint:disable-next-line: triple-equals
248
+ }
249
+ else if (oldValue == null || elm[memberName] != n) {
250
+ elm[memberName] = n;
251
+ }
252
+ }
253
+ else {
254
+ elm[memberName] = newValue;
255
+ }
256
+ }
257
+ catch (e) { }
258
+ }
259
+ if (newValue == null || newValue === false) {
260
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
261
+ {
262
+ elm.removeAttribute(memberName);
263
+ }
264
+ }
265
+ }
266
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
267
+ newValue = newValue === true ? '' : newValue;
268
+ {
269
+ elm.setAttribute(memberName, newValue);
270
+ }
271
+ }
272
+ }
273
+ }
274
+ };
275
+ const parseClassListRegex = /\s/;
276
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
277
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
278
+ // if the element passed in is a shadow root, which is a document fragment
279
+ // then we want to be adding attrs/props to the shadow root's "host" element
280
+ // if it's not a shadow root, then we add attrs/props to the same element
281
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
282
+ ? newVnode.$elm$.host
283
+ : newVnode.$elm$;
284
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
285
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
286
+ {
287
+ // remove attributes no longer present on the vnode by setting them to undefined
288
+ for (memberName in oldVnodeAttrs) {
289
+ if (!(memberName in newVnodeAttrs)) {
290
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
291
+ }
292
+ }
293
+ }
294
+ // add new & update changed attributes
295
+ for (memberName in newVnodeAttrs) {
296
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
297
+ }
298
+ };
299
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
300
+ // tslint:disable-next-line: prefer-const
301
+ let newVNode = newParentVNode.$children$[childIndex];
302
+ let i = 0;
303
+ let elm;
304
+ let childNode;
305
+ if (newVNode.$text$ !== null) {
306
+ // create text node
307
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
308
+ }
309
+ else {
310
+ // create element
311
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
312
+ // add css classes, attrs, props, listeners, etc.
313
+ {
314
+ updateElement(null, newVNode, isSvgMode);
315
+ }
316
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
317
+ // if there is a scopeId and this is the initial render
318
+ // then let's add the scopeId as a css class
319
+ elm.classList.add((elm['s-si'] = scopeId));
320
+ }
321
+ if (newVNode.$children$) {
322
+ for (i = 0; i < newVNode.$children$.length; ++i) {
323
+ // create the node
324
+ childNode = createElm(oldParentVNode, newVNode, i);
325
+ // return node could have been null
326
+ if (childNode) {
327
+ // append our new node
328
+ elm.appendChild(childNode);
329
+ }
330
+ }
331
+ }
332
+ }
333
+ return elm;
334
+ };
335
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
336
+ let containerElm = (parentElm);
337
+ let childNode;
338
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
339
+ containerElm = containerElm.shadowRoot;
340
+ }
341
+ for (; startIdx <= endIdx; ++startIdx) {
342
+ if (vnodes[startIdx]) {
343
+ childNode = createElm(null, parentVNode, startIdx);
344
+ if (childNode) {
345
+ vnodes[startIdx].$elm$ = childNode;
346
+ containerElm.insertBefore(childNode, before);
347
+ }
348
+ }
349
+ }
350
+ };
351
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
352
+ for (; startIdx <= endIdx; ++startIdx) {
353
+ if ((vnode = vnodes[startIdx])) {
354
+ elm = vnode.$elm$;
355
+ // remove the vnode's element from the dom
356
+ elm.remove();
357
+ }
358
+ }
359
+ };
360
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
361
+ let oldStartIdx = 0;
362
+ let newStartIdx = 0;
363
+ let oldEndIdx = oldCh.length - 1;
364
+ let oldStartVnode = oldCh[0];
365
+ let oldEndVnode = oldCh[oldEndIdx];
366
+ let newEndIdx = newCh.length - 1;
367
+ let newStartVnode = newCh[0];
368
+ let newEndVnode = newCh[newEndIdx];
369
+ let node;
370
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
371
+ if (oldStartVnode == null) {
372
+ // Vnode might have been moved left
373
+ oldStartVnode = oldCh[++oldStartIdx];
374
+ }
375
+ else if (oldEndVnode == null) {
376
+ oldEndVnode = oldCh[--oldEndIdx];
377
+ }
378
+ else if (newStartVnode == null) {
379
+ newStartVnode = newCh[++newStartIdx];
380
+ }
381
+ else if (newEndVnode == null) {
382
+ newEndVnode = newCh[--newEndIdx];
383
+ }
384
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
385
+ patch(oldStartVnode, newStartVnode);
386
+ oldStartVnode = oldCh[++oldStartIdx];
387
+ newStartVnode = newCh[++newStartIdx];
388
+ }
389
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
390
+ patch(oldEndVnode, newEndVnode);
391
+ oldEndVnode = oldCh[--oldEndIdx];
392
+ newEndVnode = newCh[--newEndIdx];
393
+ }
394
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
395
+ patch(oldStartVnode, newEndVnode);
396
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
397
+ oldStartVnode = oldCh[++oldStartIdx];
398
+ newEndVnode = newCh[--newEndIdx];
399
+ }
400
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
401
+ patch(oldEndVnode, newStartVnode);
402
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
403
+ oldEndVnode = oldCh[--oldEndIdx];
404
+ newStartVnode = newCh[++newStartIdx];
405
+ }
406
+ else {
407
+ {
408
+ // new element
409
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
410
+ newStartVnode = newCh[++newStartIdx];
411
+ }
412
+ if (node) {
413
+ {
414
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
415
+ }
416
+ }
417
+ }
418
+ }
419
+ if (oldStartIdx > oldEndIdx) {
420
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
421
+ }
422
+ else if (newStartIdx > newEndIdx) {
423
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
424
+ }
425
+ };
426
+ const isSameVnode = (vnode1, vnode2) => {
427
+ // compare if two vnode to see if they're "technically" the same
428
+ // need to have the same element tag, and same key to be the same
429
+ if (vnode1.$tag$ === vnode2.$tag$) {
430
+ return true;
431
+ }
432
+ return false;
433
+ };
434
+ const patch = (oldVNode, newVNode) => {
435
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
436
+ const oldChildren = oldVNode.$children$;
437
+ const newChildren = newVNode.$children$;
438
+ const tag = newVNode.$tag$;
439
+ const text = newVNode.$text$;
440
+ if (text === null) {
441
+ // element node
442
+ {
443
+ if (tag === 'slot')
444
+ ;
445
+ else {
446
+ // either this is the first render of an element OR it's an update
447
+ // AND we already know it's possible it could have changed
448
+ // this updates the element's css classes, attrs, props, listeners, etc.
449
+ updateElement(oldVNode, newVNode, isSvgMode);
450
+ }
451
+ }
452
+ if (oldChildren !== null && newChildren !== null) {
453
+ // looks like there's child vnodes for both the old and new vnodes
454
+ updateChildren(elm, oldChildren, newVNode, newChildren);
455
+ }
456
+ else if (newChildren !== null) {
457
+ // no old child vnodes, but there are new child vnodes to add
458
+ if (oldVNode.$text$ !== null) {
459
+ // the old vnode was text, so be sure to clear it out
460
+ elm.textContent = '';
461
+ }
462
+ // add the new vnode children
463
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
464
+ }
465
+ else if (oldChildren !== null) {
466
+ // no new child vnodes, but there are old child vnodes to remove
467
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
468
+ }
469
+ }
470
+ else if (oldVNode.$text$ !== text) {
471
+ // update the text content for the text only vnode
472
+ // and also only if the text is different than before
473
+ elm.data = text;
474
+ }
475
+ };
476
+ const renderVdom = (hostRef, renderFnResults) => {
477
+ const hostElm = hostRef.$hostElement$;
478
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
479
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
480
+ hostTagName = hostElm.tagName;
481
+ rootVnode.$tag$ = null;
482
+ rootVnode.$flags$ |= 4 /* isHost */;
483
+ hostRef.$vnode$ = rootVnode;
484
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
485
+ {
486
+ scopeId = hostElm['s-sc'];
487
+ }
488
+ // synchronous patch
489
+ patch(oldVNode, rootVnode);
490
+ };
491
+ /**
492
+ * Helper function to create & dispatch a custom Event on a provided target
493
+ * @param elm the target of the Event
494
+ * @param name the name to give the custom Event
495
+ * @param opts options for configuring a custom Event
496
+ * @returns the custom Event
497
+ */
498
+ const emitEvent = (elm, name, opts) => {
499
+ const ev = plt.ce(name, opts);
500
+ elm.dispatchEvent(ev);
501
+ return ev;
502
+ };
503
+ const attachToAncestor = (hostRef, ancestorComponent) => {
504
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
505
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
506
+ }
507
+ };
508
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
509
+ {
510
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
511
+ }
512
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
513
+ hostRef.$flags$ |= 512 /* needsRerender */;
514
+ return;
515
+ }
516
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
517
+ // there is no ancestor component or the ancestor component
518
+ // has already fired off its lifecycle update then
519
+ // fire off the initial update
520
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
521
+ return writeTask(dispatch) ;
522
+ };
523
+ const dispatchHooks = (hostRef, isInitialLoad) => {
524
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
525
+ const instance = hostRef.$lazyInstance$ ;
526
+ let promise;
527
+ if (isInitialLoad) {
528
+ {
529
+ promise = safeCall(instance, 'componentWillLoad');
530
+ }
531
+ }
532
+ endSchedule();
533
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
534
+ };
535
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
536
+ // updateComponent
537
+ const elm = hostRef.$hostElement$;
538
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
539
+ const rc = elm['s-rc'];
540
+ if (isInitialLoad) {
541
+ // DOM WRITE!
542
+ attachStyles(hostRef);
543
+ }
544
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
545
+ {
546
+ callRender(hostRef, instance);
547
+ }
548
+ if (rc) {
549
+ // ok, so turns out there are some child host elements
550
+ // waiting on this parent element to load
551
+ // let's fire off all update callbacks waiting
552
+ rc.map((cb) => cb());
553
+ elm['s-rc'] = undefined;
554
+ }
555
+ endRender();
556
+ endUpdate();
557
+ {
558
+ const childrenPromises = elm['s-p'];
559
+ const postUpdate = () => postUpdateComponent(hostRef);
560
+ if (childrenPromises.length === 0) {
561
+ postUpdate();
562
+ }
563
+ else {
564
+ Promise.all(childrenPromises).then(postUpdate);
565
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
566
+ childrenPromises.length = 0;
567
+ }
568
+ }
569
+ };
570
+ const callRender = (hostRef, instance, elm) => {
571
+ try {
572
+ instance = instance.render() ;
573
+ {
574
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
575
+ }
576
+ {
577
+ hostRef.$flags$ |= 2 /* hasRendered */;
578
+ }
579
+ {
580
+ {
581
+ // looks like we've got child nodes to render into this host element
582
+ // or we need to update the css class/attrs on the host element
583
+ // DOM WRITE!
584
+ {
585
+ renderVdom(hostRef, instance);
586
+ }
587
+ }
588
+ }
589
+ }
590
+ catch (e) {
591
+ consoleError(e, hostRef.$hostElement$);
592
+ }
593
+ return null;
594
+ };
595
+ const postUpdateComponent = (hostRef) => {
596
+ const tagName = hostRef.$cmpMeta$.$tagName$;
597
+ const elm = hostRef.$hostElement$;
598
+ const endPostUpdate = createTime('postUpdate', tagName);
599
+ const ancestorComponent = hostRef.$ancestorComponent$;
600
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
601
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
602
+ {
603
+ // DOM WRITE!
604
+ addHydratedFlag(elm);
605
+ }
606
+ endPostUpdate();
607
+ {
608
+ hostRef.$onReadyResolve$(elm);
609
+ if (!ancestorComponent) {
610
+ appDidLoad();
611
+ }
612
+ }
613
+ }
614
+ else {
615
+ endPostUpdate();
616
+ }
617
+ // load events fire from bottom to top
618
+ // the deepest elements load first then bubbles up
619
+ {
620
+ if (hostRef.$onRenderResolve$) {
621
+ hostRef.$onRenderResolve$();
622
+ hostRef.$onRenderResolve$ = undefined;
623
+ }
624
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
625
+ nextTick(() => scheduleUpdate(hostRef, false));
626
+ }
627
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
628
+ }
629
+ // ( •_•)
630
+ // ( •_•)>⌐■-■
631
+ // (⌐■_■)
632
+ };
633
+ const appDidLoad = (who) => {
634
+ // on appload
635
+ // we have finish the first big initial render
636
+ {
637
+ addHydratedFlag(doc.documentElement);
638
+ }
639
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
640
+ };
641
+ const safeCall = (instance, method, arg) => {
642
+ if (instance && instance[method]) {
643
+ try {
644
+ return instance[method](arg);
645
+ }
646
+ catch (e) {
647
+ consoleError(e);
648
+ }
649
+ }
650
+ return undefined;
651
+ };
652
+ const then = (promise, thenFn) => {
653
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
654
+ };
655
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
656
+ ;
657
+ const parsePropertyValue = (propValue, propType) => {
658
+ // ensure this value is of the correct prop type
659
+ if (propValue != null && !isComplexType(propValue)) {
660
+ if (propType & 2 /* Number */) {
661
+ // force it to be a number
662
+ return parseFloat(propValue);
663
+ }
664
+ if (propType & 1 /* String */) {
665
+ // could have been passed as a number or boolean
666
+ // but we still want it as a string
667
+ return String(propValue);
668
+ }
669
+ // redundant return here for better minification
670
+ return propValue;
671
+ }
672
+ // not sure exactly what type we want
673
+ // so no need to change to a different type
674
+ return propValue;
675
+ };
676
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
677
+ const setValue = (ref, propName, newVal, cmpMeta) => {
678
+ // check our new property value against our internal value
679
+ const hostRef = getHostRef(ref);
680
+ const oldVal = hostRef.$instanceValues$.get(propName);
681
+ const flags = hostRef.$flags$;
682
+ const instance = hostRef.$lazyInstance$ ;
683
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
684
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
685
+ // gadzooks! the property's value has changed!!
686
+ // set our new value!
687
+ hostRef.$instanceValues$.set(propName, newVal);
688
+ if (instance) {
689
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
690
+ // looks like this value actually changed, so we've got work to do!
691
+ // but only if we've already rendered, otherwise just chill out
692
+ // queue that we need to do an update, but don't worry about queuing
693
+ // up millions cuz this function ensures it only runs once
694
+ scheduleUpdate(hostRef, false);
695
+ }
696
+ }
697
+ }
698
+ };
699
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
700
+ if (cmpMeta.$members$) {
701
+ // It's better to have a const than two Object.entries()
702
+ const members = Object.entries(cmpMeta.$members$);
703
+ const prototype = Cstr.prototype;
704
+ members.map(([memberName, [memberFlags]]) => {
705
+ if ((memberFlags & 31 /* Prop */ ||
706
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
707
+ // proxyComponent - prop
708
+ Object.defineProperty(prototype, memberName, {
709
+ get() {
710
+ // proxyComponent, get value
711
+ return getValue(this, memberName);
712
+ },
713
+ set(newValue) {
714
+ // proxyComponent, set value
715
+ setValue(this, memberName, newValue, cmpMeta);
716
+ },
717
+ configurable: true,
718
+ enumerable: true,
719
+ });
720
+ }
721
+ });
722
+ if ((flags & 1 /* isElementConstructor */)) {
723
+ const attrNameToPropName = new Map();
724
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
725
+ plt.jmp(() => {
726
+ const propName = attrNameToPropName.get(attrName);
727
+ // In a webcomponent lifecyle the attributeChangedCallback runs prior to connectedCallback
728
+ // in the case where an attribute was set inline.
729
+ // ```html
730
+ // <my-component some-attribute="some-value"></my-component>
731
+ // ```
732
+ //
733
+ // There is an edge case where a developer sets the attribute inline on a custom element and then programatically
734
+ // changes it before it has been upgraded as shown below:
735
+ //
736
+ // ```html
737
+ // <!-- this component has _not_ been upgraded yet -->
738
+ // <my-component id="test" some-attribute="some-value"></my-component>
739
+ // <script>
740
+ // // grab non-upgraded component
741
+ // el = document.querySelector("#test");
742
+ // el.someAttribute = "another-value";
743
+ // // upgrade component
744
+ // cutsomElements.define('my-component', MyComponent);
745
+ // </script>
746
+ // ```
747
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
748
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
749
+ // to the value that was set inline i.e. "some-value" from above example. When
750
+ // the connectedCallback attempts to unshadow it will use "some-value" as the intial value rather than "another-value"
751
+ //
752
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
753
+ // by connectedCallback as this attributeChangedCallback will not fire.
754
+ //
755
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
756
+ //
757
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
758
+ // properties here given that this goes against best practices outlined here
759
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
760
+ if (this.hasOwnProperty(propName)) {
761
+ newValue = this[propName];
762
+ delete this[propName];
763
+ }
764
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
765
+ });
766
+ };
767
+ // create an array of attributes to observe
768
+ // and also create a map of html attribute name to js property name
769
+ Cstr.observedAttributes = members
770
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
771
+ .map(([propName, m]) => {
772
+ const attrName = m[1] || propName;
773
+ attrNameToPropName.set(attrName, propName);
774
+ return attrName;
775
+ });
776
+ }
777
+ }
778
+ return Cstr;
779
+ };
780
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
781
+ // initializeComponent
782
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
783
+ {
784
+ // we haven't initialized this element yet
785
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
786
+ // lazy loaded components
787
+ // request the component's implementation to be
788
+ // wired up with the host element
789
+ Cstr = loadModule(cmpMeta);
790
+ if (Cstr.then) {
791
+ // Await creates a micro-task avoid if possible
792
+ const endLoad = uniqueTime();
793
+ Cstr = await Cstr;
794
+ endLoad();
795
+ }
796
+ if (!Cstr.isProxied) {
797
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
798
+ Cstr.isProxied = true;
799
+ }
800
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
801
+ // ok, time to construct the instance
802
+ // but let's keep track of when we start and stop
803
+ // so that the getters/setters don't incorrectly step on data
804
+ {
805
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
806
+ }
807
+ // construct the lazy-loaded component implementation
808
+ // passing the hostRef is very important during
809
+ // construction in order to directly wire together the
810
+ // host element and the lazy-loaded instance
811
+ try {
812
+ new Cstr(hostRef);
813
+ }
814
+ catch (e) {
815
+ consoleError(e);
816
+ }
817
+ {
818
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
819
+ }
820
+ endNewInstance();
821
+ }
822
+ if (Cstr.style) {
823
+ // this component has styles but we haven't registered them yet
824
+ let style = Cstr.style;
825
+ const scopeId = getScopeId(cmpMeta);
826
+ if (!styles.has(scopeId)) {
827
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
828
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
829
+ endRegisterStyles();
830
+ }
831
+ }
832
+ }
833
+ // we've successfully created a lazy instance
834
+ const ancestorComponent = hostRef.$ancestorComponent$;
835
+ const schedule = () => scheduleUpdate(hostRef, true);
836
+ if (ancestorComponent && ancestorComponent['s-rc']) {
837
+ // this is the intial load and this component it has an ancestor component
838
+ // but the ancestor component has NOT fired its will update lifecycle yet
839
+ // so let's just cool our jets and wait for the ancestor to continue first
840
+ // this will get fired off when the ancestor component
841
+ // finally gets around to rendering its lazy self
842
+ // fire off the initial update
843
+ ancestorComponent['s-rc'].push(schedule);
844
+ }
845
+ else {
846
+ schedule();
847
+ }
848
+ };
849
+ const connectedCallback = (elm) => {
850
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
851
+ const hostRef = getHostRef(elm);
852
+ const cmpMeta = hostRef.$cmpMeta$;
853
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
854
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
855
+ // first time this component has connected
856
+ hostRef.$flags$ |= 1 /* hasConnected */;
857
+ {
858
+ // find the first ancestor component (if there is one) and register
859
+ // this component as one of the actively loading child components for its ancestor
860
+ let ancestorComponent = elm;
861
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
862
+ // climb up the ancestors looking for the first
863
+ // component that hasn't finished its lifecycle update yet
864
+ if (ancestorComponent['s-p']) {
865
+ // we found this components first ancestor component
866
+ // keep a reference to this component's ancestor component
867
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
868
+ break;
869
+ }
870
+ }
871
+ }
872
+ // Lazy properties
873
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
874
+ if (cmpMeta.$members$) {
875
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
876
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
877
+ const value = elm[memberName];
878
+ delete elm[memberName];
879
+ elm[memberName] = value;
880
+ }
881
+ });
882
+ }
883
+ {
884
+ initializeComponent(elm, hostRef, cmpMeta);
885
+ }
886
+ }
887
+ endConnected();
888
+ }
889
+ };
890
+ const disconnectedCallback = (elm) => {
891
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
892
+ const hostRef = getHostRef(elm);
893
+ const instance = hostRef.$lazyInstance$ ;
894
+ {
895
+ safeCall(instance, 'disconnectedCallback');
896
+ }
897
+ }
898
+ };
899
+ const bootstrapLazy = (lazyBundles, options = {}) => {
900
+ const endBootstrap = createTime();
901
+ const cmpTags = [];
902
+ const exclude = options.exclude || [];
903
+ const customElements = win.customElements;
904
+ const head = doc.head;
905
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
906
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
907
+ const deferredConnectedCallbacks = [];
908
+ let appLoadFallback;
909
+ let isBootstrapping = true;
910
+ Object.assign(plt, options);
911
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
912
+ lazyBundles.map((lazyBundle) => lazyBundle[1].map((compactMeta) => {
913
+ const cmpMeta = {
914
+ $flags$: compactMeta[0],
915
+ $tagName$: compactMeta[1],
916
+ $members$: compactMeta[2],
917
+ $listeners$: compactMeta[3],
918
+ };
919
+ {
920
+ cmpMeta.$members$ = compactMeta[2];
921
+ }
922
+ const tagName = cmpMeta.$tagName$;
923
+ const HostElement = class extends HTMLElement {
924
+ // StencilLazyHost
925
+ constructor(self) {
926
+ // @ts-ignore
927
+ super(self);
928
+ self = this;
929
+ registerHost(self, cmpMeta);
930
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
931
+ // this component is using shadow dom
932
+ // and this browser supports shadow dom
933
+ // add the read-only property "shadowRoot" to the host element
934
+ // adding the shadow root build conditionals to minimize runtime
935
+ {
936
+ {
937
+ self.attachShadow({ mode: 'open' });
938
+ }
939
+ }
940
+ }
941
+ }
942
+ connectedCallback() {
943
+ if (appLoadFallback) {
944
+ clearTimeout(appLoadFallback);
945
+ appLoadFallback = null;
946
+ }
947
+ if (isBootstrapping) {
948
+ // connectedCallback will be processed once all components have been registered
949
+ deferredConnectedCallbacks.push(this);
950
+ }
951
+ else {
952
+ plt.jmp(() => connectedCallback(this));
953
+ }
954
+ }
955
+ disconnectedCallback() {
956
+ plt.jmp(() => disconnectedCallback(this));
957
+ }
958
+ componentOnReady() {
959
+ return getHostRef(this).$onReadyPromise$;
960
+ }
961
+ };
962
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
963
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
964
+ cmpTags.push(tagName);
965
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
966
+ }
967
+ }));
968
+ {
969
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
970
+ visibilityStyle.setAttribute('data-styles', '');
971
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
972
+ }
973
+ // Process deferred connectedCallbacks now all components have been registered
974
+ isBootstrapping = false;
975
+ if (deferredConnectedCallbacks.length) {
976
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
977
+ }
978
+ else {
979
+ {
980
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
981
+ }
982
+ }
983
+ // Fallback appLoad event
984
+ endBootstrap();
985
+ };
986
+ const hostRefs = new WeakMap();
987
+ const getHostRef = (ref) => hostRefs.get(ref);
988
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
989
+ const registerHost = (elm, cmpMeta) => {
990
+ const hostRef = {
991
+ $flags$: 0,
992
+ $hostElement$: elm,
993
+ $cmpMeta$: cmpMeta,
994
+ $instanceValues$: new Map(),
995
+ };
996
+ {
997
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
998
+ elm['s-p'] = [];
999
+ elm['s-rc'] = [];
1000
+ }
1001
+ return hostRefs.set(elm, hostRef);
1002
+ };
1003
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1004
+ const consoleError = (e, el) => (0, console.error)(e, el);
1005
+ const cmpModules = /*@__PURE__*/ new Map();
1006
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1007
+ // loadModuleImport
1008
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1009
+ const bundleId = cmpMeta.$lazyBundleId$;
1010
+ const module = cmpModules.get(bundleId) ;
1011
+ if (module) {
1012
+ return module[exportName];
1013
+ }
1014
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1015
+ /* webpackInclude: /\.entry\.js$/ */
1016
+ /* webpackExclude: /\.system\.entry\.js$/ */
1017
+ /* webpackMode: "lazy" */
1018
+ `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
1019
+ {
1020
+ cmpModules.set(bundleId, importedModule);
1021
+ }
1022
+ return importedModule[exportName];
1023
+ }, consoleError);
1024
+ };
1025
+ const styles = new Map();
1026
+ const queueDomReads = [];
1027
+ const queueDomWrites = [];
1028
+ const queueTask = (queue, write) => (cb) => {
1029
+ queue.push(cb);
1030
+ if (!queuePending) {
1031
+ queuePending = true;
1032
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1033
+ nextTick(flush);
1034
+ }
1035
+ else {
1036
+ plt.raf(flush);
1037
+ }
1038
+ }
1039
+ };
1040
+ const consume = (queue) => {
1041
+ for (let i = 0; i < queue.length; i++) {
1042
+ try {
1043
+ queue[i](performance.now());
1044
+ }
1045
+ catch (e) {
1046
+ consoleError(e);
1047
+ }
1048
+ }
1049
+ queue.length = 0;
1050
+ };
1051
+ const flush = () => {
1052
+ // always force a bunch of medium callbacks to run, but still have
1053
+ // a throttle on how many can run in a certain time
1054
+ // DOM READS!!!
1055
+ consume(queueDomReads);
1056
+ // DOM WRITES!!!
1057
+ {
1058
+ consume(queueDomWrites);
1059
+ if ((queuePending = queueDomReads.length > 0)) {
1060
+ // still more to do yet, but we've run out of time
1061
+ // let's let this thing cool off and try again in the next tick
1062
+ plt.raf(flush);
1063
+ }
1064
+ }
1065
+ };
1066
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1067
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1068
+
1069
+ exports.Host = Host;
1070
+ exports.bootstrapLazy = bootstrapLazy;
1071
+ exports.h = h;
1072
+ exports.promiseResolve = promiseResolve;
1073
+ exports.registerInstance = registerInstance;