@3t-transform/threeteeui 0.0.13 → 0.0.15

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 (121) hide show
  1. package/package.json +7 -4
  2. package/dist/cjs/index-bf39be87.js +0 -1530
  3. package/dist/cjs/index.cjs.js +0 -2
  4. package/dist/cjs/loader.cjs.js +0 -22
  5. package/dist/cjs/tttx-button.cjs.entry.js +0 -28
  6. package/dist/cjs/tttx-checkbox.cjs.entry.js +0 -28
  7. package/dist/cjs/tttx-form.cjs.entry.js +0 -186
  8. package/dist/cjs/tttx-icon.cjs.entry.js +0 -1861
  9. package/dist/cjs/tttx-list.cjs.entry.js +0 -198
  10. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +0 -26
  11. package/dist/cjs/tttx-popover-content.cjs.entry.js +0 -23
  12. package/dist/cjs/tttx-standalone-input.cjs.entry.js +0 -136
  13. package/dist/cjs/tttx.cjs.js +0 -23
  14. package/dist/collection/collection-manifest.json +0 -19
  15. package/dist/collection/components/atoms/tttx-button/tttx-button.css +0 -62
  16. package/dist/collection/components/atoms/tttx-button/tttx-button.js +0 -93
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +0 -27
  18. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +0 -105
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +0 -114
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +0 -47
  21. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +0 -48
  22. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +0 -66
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +0 -17
  24. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +0 -30
  25. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +0 -96
  26. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +0 -23
  27. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +0 -181
  28. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +0 -101
  29. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +0 -13
  30. package/dist/collection/components/molecules/tttx-form/tttx-form.css +0 -230
  31. package/dist/collection/components/molecules/tttx-form/tttx-form.js +0 -249
  32. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +0 -102
  33. package/dist/collection/components/molecules/tttx-list/tttx-list.css +0 -56
  34. package/dist/collection/components/molecules/tttx-list/tttx-list.js +0 -311
  35. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +0 -37
  36. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +0 -177
  37. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +0 -569
  38. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +0 -156
  39. package/dist/collection/components/palette.stories.js +0 -88
  40. package/dist/collection/docs/gettingstarted-developer.stories.js +0 -9
  41. package/dist/collection/icons.js +0 -2838
  42. package/dist/collection/index.js +0 -1
  43. package/dist/components/index.d.ts +0 -38
  44. package/dist/components/index.js +0 -9
  45. package/dist/components/tttx-button.d.ts +0 -11
  46. package/dist/components/tttx-button.js +0 -45
  47. package/dist/components/tttx-checkbox.d.ts +0 -11
  48. package/dist/components/tttx-checkbox.js +0 -46
  49. package/dist/components/tttx-form.d.ts +0 -11
  50. package/dist/components/tttx-form.js +0 -203
  51. package/dist/components/tttx-icon.d.ts +0 -11
  52. package/dist/components/tttx-icon.js +0 -6
  53. package/dist/components/tttx-icon2.js +0 -1875
  54. package/dist/components/tttx-list.d.ts +0 -11
  55. package/dist/components/tttx-list.js +0 -225
  56. package/dist/components/tttx-loading-spinner.d.ts +0 -11
  57. package/dist/components/tttx-loading-spinner.js +0 -6
  58. package/dist/components/tttx-loading-spinner2.js +0 -40
  59. package/dist/components/tttx-popover-content.d.ts +0 -11
  60. package/dist/components/tttx-popover-content.js +0 -42
  61. package/dist/components/tttx-standalone-input.d.ts +0 -11
  62. package/dist/components/tttx-standalone-input.js +0 -178
  63. package/dist/esm/index-63c4d25e.js +0 -1501
  64. package/dist/esm/index.js +0 -1
  65. package/dist/esm/loader.js +0 -18
  66. package/dist/esm/polyfills/core-js.js +0 -11
  67. package/dist/esm/polyfills/css-shim.js +0 -1
  68. package/dist/esm/polyfills/dom.js +0 -79
  69. package/dist/esm/polyfills/es5-html-element.js +0 -1
  70. package/dist/esm/polyfills/index.js +0 -34
  71. package/dist/esm/polyfills/system.js +0 -6
  72. package/dist/esm/tttx-button.entry.js +0 -24
  73. package/dist/esm/tttx-checkbox.entry.js +0 -24
  74. package/dist/esm/tttx-form.entry.js +0 -182
  75. package/dist/esm/tttx-icon.entry.js +0 -1857
  76. package/dist/esm/tttx-list.entry.js +0 -194
  77. package/dist/esm/tttx-loading-spinner.entry.js +0 -22
  78. package/dist/esm/tttx-popover-content.entry.js +0 -19
  79. package/dist/esm/tttx-standalone-input.entry.js +0 -132
  80. package/dist/esm/tttx.js +0 -18
  81. package/dist/index.cjs.js +0 -1
  82. package/dist/index.js +0 -1
  83. package/dist/tttx/index.esm.js +0 -0
  84. package/dist/tttx/p-1a4eb1f3.entry.js +0 -1
  85. package/dist/tttx/p-25953f82.entry.js +0 -1
  86. package/dist/tttx/p-2b6720ac.entry.js +0 -1
  87. package/dist/tttx/p-2d54f8aa.entry.js +0 -1
  88. package/dist/tttx/p-4c57bcbd.entry.js +0 -1
  89. package/dist/tttx/p-709246f5.entry.js +0 -1
  90. package/dist/tttx/p-95a29e09.entry.js +0 -1
  91. package/dist/tttx/p-ad0c3fe4.entry.js +0 -1
  92. package/dist/tttx/p-bec472d8.js +0 -2
  93. package/dist/tttx/tttx.esm.js +0 -1
  94. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +0 -9
  95. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +0 -20
  96. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +0 -14
  97. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +0 -21
  98. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +0 -6
  99. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +0 -17
  100. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +0 -7
  101. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +0 -18
  102. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +0 -9
  103. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +0 -6
  104. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +0 -18
  105. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -6
  106. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +0 -51
  107. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -13
  108. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +0 -38
  109. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +0 -106
  110. package/dist/types/components/palette.stories.d.ts +0 -6
  111. package/dist/types/components.d.ts +0 -236
  112. package/dist/types/docs/gettingstarted-developer.stories.d.ts +0 -5
  113. package/dist/types/icons.d.ts +0 -2
  114. package/dist/types/index.d.ts +0 -1
  115. package/dist/types/stencil-public-runtime.d.ts +0 -1637
  116. package/loader/cdn.js +0 -3
  117. package/loader/index.cjs.js +0 -3
  118. package/loader/index.d.ts +0 -21
  119. package/loader/index.es2017.js +0 -3
  120. package/loader/index.js +0 -4
  121. package/loader/package.json +0 -11
@@ -1,1501 +0,0 @@
1
- const NAMESPACE = 'tttx';
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
- */
11
- let scopeId;
12
- let hostTagName;
13
- let isSvgMode = false;
14
- let queuePending = false;
15
- const createTime = (fnName, tagName = '') => {
16
- {
17
- return () => {
18
- return;
19
- };
20
- }
21
- };
22
- const uniqueTime = (key, measureText) => {
23
- {
24
- return () => {
25
- return;
26
- };
27
- }
28
- };
29
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
30
- /**
31
- * Default style mode id
32
- */
33
- /**
34
- * Reusable empty obj/array
35
- * Don't add values to these!!
36
- */
37
- const EMPTY_OBJ = {};
38
- const isDef = (v) => v != null;
39
- const isComplexType = (o) => {
40
- // https://jsperf.com/typeof-fn-object/5
41
- o = typeof o;
42
- return o === 'object' || o === 'function';
43
- };
44
- /**
45
- * Helper method for querying a `meta` tag that contains a nonce value
46
- * out of a DOM's head.
47
- *
48
- * @param doc The DOM containing the `head` to query against
49
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
50
- * exists or the tag has no content.
51
- */
52
- function queryNonceMetaTagContent(doc) {
53
- var _a, _b, _c;
54
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
55
- }
56
- /**
57
- * Production h() function based on Preact by
58
- * Jason Miller (@developit)
59
- * Licensed under the MIT License
60
- * https://github.com/developit/preact/blob/master/LICENSE
61
- *
62
- * Modified for Stencil's compiler and vdom
63
- */
64
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
65
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
66
- const h = (nodeName, vnodeData, ...children) => {
67
- let child = null;
68
- let simple = false;
69
- let lastSimple = false;
70
- const vNodeChildren = [];
71
- const walk = (c) => {
72
- for (let i = 0; i < c.length; i++) {
73
- child = c[i];
74
- if (Array.isArray(child)) {
75
- walk(child);
76
- }
77
- else if (child != null && typeof child !== 'boolean') {
78
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
79
- child = String(child);
80
- }
81
- if (simple && lastSimple) {
82
- // If the previous child was simple (string), we merge both
83
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
84
- }
85
- else {
86
- // Append a new vNode, if it's text, we create a text vNode
87
- vNodeChildren.push(simple ? newVNode(null, child) : child);
88
- }
89
- lastSimple = simple;
90
- }
91
- }
92
- };
93
- walk(children);
94
- if (vnodeData) {
95
- {
96
- const classData = vnodeData.className || vnodeData.class;
97
- if (classData) {
98
- vnodeData.class =
99
- typeof classData !== 'object'
100
- ? classData
101
- : Object.keys(classData)
102
- .filter((k) => classData[k])
103
- .join(' ');
104
- }
105
- }
106
- }
107
- const vnode = newVNode(nodeName, null);
108
- vnode.$attrs$ = vnodeData;
109
- if (vNodeChildren.length > 0) {
110
- vnode.$children$ = vNodeChildren;
111
- }
112
- return vnode;
113
- };
114
- /**
115
- * A utility function for creating a virtual DOM node from a tag and some
116
- * possible text content.
117
- *
118
- * @param tag the tag for this element
119
- * @param text possible text content for the node
120
- * @returns a newly-minted virtual DOM node
121
- */
122
- const newVNode = (tag, text) => {
123
- const vnode = {
124
- $flags$: 0,
125
- $tag$: tag,
126
- $text$: text,
127
- $elm$: null,
128
- $children$: null,
129
- };
130
- {
131
- vnode.$attrs$ = null;
132
- }
133
- return vnode;
134
- };
135
- const Host = {};
136
- /**
137
- * Check whether a given node is a Host node or not
138
- *
139
- * @param node the virtual DOM node to check
140
- * @returns whether it's a Host node or not
141
- */
142
- const isHost = (node) => node && node.$tag$ === Host;
143
- /**
144
- * Parse a new property value for a given property type.
145
- *
146
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
147
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
148
- * 1. `any`, the type given to `propValue` in the function signature
149
- * 2. the type stored from `propType`.
150
- *
151
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
152
- *
153
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
154
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
155
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
156
- * ```tsx
157
- * <my-cmp prop-val={0}></my-cmp>
158
- * ```
159
- *
160
- * HTML prop values on the other hand, will always a string
161
- *
162
- * @param propValue the new value to coerce to some type
163
- * @param propType the type of the prop, expressed as a binary number
164
- * @returns the parsed/coerced value
165
- */
166
- const parsePropertyValue = (propValue, propType) => {
167
- // ensure this value is of the correct prop type
168
- if (propValue != null && !isComplexType(propValue)) {
169
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
170
- // per the HTML spec, any string value means it is a boolean true value
171
- // but we'll cheat here and say that the string "false" is the boolean false
172
- return propValue === 'false' ? false : propValue === '' || !!propValue;
173
- }
174
- if (propType & 1 /* MEMBER_FLAGS.String */) {
175
- // could have been passed as a number or boolean
176
- // but we still want it as a string
177
- return String(propValue);
178
- }
179
- // redundant return here for better minification
180
- return propValue;
181
- }
182
- // not sure exactly what type we want
183
- // so no need to change to a different type
184
- return propValue;
185
- };
186
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
187
- const createEvent = (ref, name, flags) => {
188
- const elm = getElement(ref);
189
- return {
190
- emit: (detail) => {
191
- return emitEvent(elm, name, {
192
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
193
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
194
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
195
- detail,
196
- });
197
- },
198
- };
199
- };
200
- /**
201
- * Helper function to create & dispatch a custom Event on a provided target
202
- * @param elm the target of the Event
203
- * @param name the name to give the custom Event
204
- * @param opts options for configuring a custom Event
205
- * @returns the custom Event
206
- */
207
- const emitEvent = (elm, name, opts) => {
208
- const ev = plt.ce(name, opts);
209
- elm.dispatchEvent(ev);
210
- return ev;
211
- };
212
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
213
- const registerStyle = (scopeId, cssText, allowCS) => {
214
- let style = styles.get(scopeId);
215
- if (supportsConstructableStylesheets && allowCS) {
216
- style = (style || new CSSStyleSheet());
217
- if (typeof style === 'string') {
218
- style = cssText;
219
- }
220
- else {
221
- style.replaceSync(cssText);
222
- }
223
- }
224
- else {
225
- style = cssText;
226
- }
227
- styles.set(scopeId, style);
228
- };
229
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
230
- var _a;
231
- let scopeId = getScopeId(cmpMeta);
232
- const style = styles.get(scopeId);
233
- // if an element is NOT connected then getRootNode() will return the wrong root node
234
- // so the fallback is to always use the document for the root node in those cases
235
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
236
- if (style) {
237
- if (typeof style === 'string') {
238
- styleContainerNode = styleContainerNode.head || styleContainerNode;
239
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
240
- let styleElm;
241
- if (!appliedStyles) {
242
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
243
- }
244
- if (!appliedStyles.has(scopeId)) {
245
- {
246
- {
247
- styleElm = doc.createElement('style');
248
- styleElm.innerHTML = style;
249
- }
250
- // Apply CSP nonce to the style tag if it exists
251
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
252
- if (nonce != null) {
253
- styleElm.setAttribute('nonce', nonce);
254
- }
255
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
256
- }
257
- if (appliedStyles) {
258
- appliedStyles.add(scopeId);
259
- }
260
- }
261
- }
262
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
263
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
264
- }
265
- }
266
- return scopeId;
267
- };
268
- const attachStyles = (hostRef) => {
269
- const cmpMeta = hostRef.$cmpMeta$;
270
- const elm = hostRef.$hostElement$;
271
- const flags = cmpMeta.$flags$;
272
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
273
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
274
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
275
- // only required when we're NOT using native shadow dom (slot)
276
- // or this browser doesn't support native shadow dom
277
- // and this host element was NOT created with SSR
278
- // let's pick out the inner content for slot projection
279
- // create a node to represent where the original
280
- // content was first placed, which is useful later on
281
- // DOM WRITE!!
282
- elm['s-sc'] = scopeId;
283
- elm.classList.add(scopeId + '-h');
284
- if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
285
- elm.classList.add(scopeId + '-s');
286
- }
287
- }
288
- endAttachStyles();
289
- };
290
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
291
- /**
292
- * Production setAccessor() function based on Preact by
293
- * Jason Miller (@developit)
294
- * Licensed under the MIT License
295
- * https://github.com/developit/preact/blob/master/LICENSE
296
- *
297
- * Modified for Stencil's compiler and vdom
298
- */
299
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
300
- if (oldValue !== newValue) {
301
- let isProp = isMemberInElement(elm, memberName);
302
- let ln = memberName.toLowerCase();
303
- if (memberName === 'class') {
304
- const classList = elm.classList;
305
- const oldClasses = parseClassList(oldValue);
306
- const newClasses = parseClassList(newValue);
307
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
308
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
309
- }
310
- else if (memberName === 'ref') {
311
- // minifier will clean this up
312
- if (newValue) {
313
- newValue(elm);
314
- }
315
- }
316
- else if ((!isProp ) &&
317
- memberName[0] === 'o' &&
318
- memberName[1] === 'n') {
319
- // Event Handlers
320
- // so if the member name starts with "on" and the 3rd characters is
321
- // a capital letter, and it's not already a member on the element,
322
- // then we're assuming it's an event listener
323
- if (memberName[2] === '-') {
324
- // on- prefixed events
325
- // allows to be explicit about the dom event to listen without any magic
326
- // under the hood:
327
- // <my-cmp on-click> // listens for "click"
328
- // <my-cmp on-Click> // listens for "Click"
329
- // <my-cmp on-ionChange> // listens for "ionChange"
330
- // <my-cmp on-EVENTS> // listens for "EVENTS"
331
- memberName = memberName.slice(3);
332
- }
333
- else if (isMemberInElement(win, ln)) {
334
- // standard event
335
- // the JSX attribute could have been "onMouseOver" and the
336
- // member name "onmouseover" is on the window's prototype
337
- // so let's add the listener "mouseover", which is all lowercased
338
- memberName = ln.slice(2);
339
- }
340
- else {
341
- // custom event
342
- // the JSX attribute could have been "onMyCustomEvent"
343
- // so let's trim off the "on" prefix and lowercase the first character
344
- // and add the listener "myCustomEvent"
345
- // except for the first character, we keep the event name case
346
- memberName = ln[2] + memberName.slice(3);
347
- }
348
- if (oldValue) {
349
- plt.rel(elm, memberName, oldValue, false);
350
- }
351
- if (newValue) {
352
- plt.ael(elm, memberName, newValue, false);
353
- }
354
- }
355
- else {
356
- // Set property if it exists and it's not a SVG
357
- const isComplex = isComplexType(newValue);
358
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
359
- try {
360
- if (!elm.tagName.includes('-')) {
361
- const n = newValue == null ? '' : newValue;
362
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
363
- if (memberName === 'list') {
364
- isProp = false;
365
- }
366
- else if (oldValue == null || elm[memberName] != n) {
367
- elm[memberName] = n;
368
- }
369
- }
370
- else {
371
- elm[memberName] = newValue;
372
- }
373
- }
374
- catch (e) { }
375
- }
376
- if (newValue == null || newValue === false) {
377
- if (newValue !== false || elm.getAttribute(memberName) === '') {
378
- {
379
- elm.removeAttribute(memberName);
380
- }
381
- }
382
- }
383
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
384
- newValue = newValue === true ? '' : newValue;
385
- {
386
- elm.setAttribute(memberName, newValue);
387
- }
388
- }
389
- }
390
- }
391
- };
392
- const parseClassListRegex = /\s/;
393
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
394
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
395
- // if the element passed in is a shadow root, which is a document fragment
396
- // then we want to be adding attrs/props to the shadow root's "host" element
397
- // if it's not a shadow root, then we add attrs/props to the same element
398
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
399
- ? newVnode.$elm$.host
400
- : newVnode.$elm$;
401
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
402
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
403
- {
404
- // remove attributes no longer present on the vnode by setting them to undefined
405
- for (memberName in oldVnodeAttrs) {
406
- if (!(memberName in newVnodeAttrs)) {
407
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
408
- }
409
- }
410
- }
411
- // add new & update changed attributes
412
- for (memberName in newVnodeAttrs) {
413
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
414
- }
415
- };
416
- /**
417
- * Create a DOM Node corresponding to one of the children of a given VNode.
418
- *
419
- * @param oldParentVNode the parent VNode from the previous render
420
- * @param newParentVNode the parent VNode from the current render
421
- * @param childIndex the index of the VNode, in the _new_ parent node's
422
- * children, for which we will create a new DOM node
423
- * @param parentElm the parent DOM node which our new node will be a child of
424
- * @returns the newly created node
425
- */
426
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
427
- // tslint:disable-next-line: prefer-const
428
- const newVNode = newParentVNode.$children$[childIndex];
429
- let i = 0;
430
- let elm;
431
- let childNode;
432
- if (newVNode.$text$ !== null) {
433
- // create text node
434
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
435
- }
436
- else {
437
- // create element
438
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
439
- // add css classes, attrs, props, listeners, etc.
440
- {
441
- updateElement(null, newVNode, isSvgMode);
442
- }
443
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
444
- // if there is a scopeId and this is the initial render
445
- // then let's add the scopeId as a css class
446
- elm.classList.add((elm['s-si'] = scopeId));
447
- }
448
- if (newVNode.$children$) {
449
- for (i = 0; i < newVNode.$children$.length; ++i) {
450
- // create the node
451
- childNode = createElm(oldParentVNode, newVNode, i);
452
- // return node could have been null
453
- if (childNode) {
454
- // append our new node
455
- elm.appendChild(childNode);
456
- }
457
- }
458
- }
459
- }
460
- return elm;
461
- };
462
- /**
463
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
464
- * add them to the DOM in the appropriate place.
465
- *
466
- * @param parentElm the DOM node which should be used as a parent for the new
467
- * DOM nodes
468
- * @param before a child of the `parentElm` which the new children should be
469
- * inserted before (optional)
470
- * @param parentVNode the parent virtual DOM node
471
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
472
- * @param startIdx the index in the child virtual DOM nodes at which to start
473
- * creating DOM nodes (inclusive)
474
- * @param endIdx the index in the child virtual DOM nodes at which to stop
475
- * creating DOM nodes (inclusive)
476
- */
477
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
478
- let containerElm = (parentElm);
479
- let childNode;
480
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
481
- containerElm = containerElm.shadowRoot;
482
- }
483
- for (; startIdx <= endIdx; ++startIdx) {
484
- if (vnodes[startIdx]) {
485
- childNode = createElm(null, parentVNode, startIdx);
486
- if (childNode) {
487
- vnodes[startIdx].$elm$ = childNode;
488
- containerElm.insertBefore(childNode, before);
489
- }
490
- }
491
- }
492
- };
493
- /**
494
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
495
- * This can be used to, for instance, clean up after a list of children which
496
- * should no longer be shown.
497
- *
498
- * This function also handles some of Stencil's slot relocation logic.
499
- *
500
- * @param vnodes a list of virtual DOM nodes to remove
501
- * @param startIdx the index at which to start removing nodes (inclusive)
502
- * @param endIdx the index at which to stop removing nodes (inclusive)
503
- * @param vnode a VNode
504
- * @param elm an element
505
- */
506
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
507
- for (; startIdx <= endIdx; ++startIdx) {
508
- if ((vnode = vnodes[startIdx])) {
509
- elm = vnode.$elm$;
510
- callNodeRefs(vnode);
511
- // remove the vnode's element from the dom
512
- elm.remove();
513
- }
514
- }
515
- };
516
- /**
517
- * Reconcile the children of a new VNode with the children of an old VNode by
518
- * traversing the two collections of children, identifying nodes that are
519
- * conserved or changed, calling out to `patch` to make any necessary
520
- * updates to the DOM, and rearranging DOM nodes as needed.
521
- *
522
- * The algorithm for reconciling children works by analyzing two 'windows' onto
523
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
524
- * 'windows' by storing start and end indices and references to the
525
- * corresponding array entries. Initially the two 'windows' are basically equal
526
- * to the entire array, but we progressively narrow the windows until there are
527
- * no children left to update by doing the following:
528
- *
529
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
530
- * that if we have an initial array like the following we'll end up dealing
531
- * only with a window bounded by the highlighted elements:
532
- *
533
- * [null, null, VNode1 , ... , VNode2, null, null]
534
- * ^^^^^^ ^^^^^^
535
- *
536
- * 2. Check to see if the elements at the head and tail positions are equal
537
- * across the windows. This will basically detect elements which haven't
538
- * been added, removed, or changed position, i.e. if you had the following
539
- * VNode elements (represented as HTML):
540
- *
541
- * oldVNode: `<div><p><span>HEY</span></p></div>`
542
- * newVNode: `<div><p><span>THERE</span></p></div>`
543
- *
544
- * Then when comparing the children of the `<div>` tag we check the equality
545
- * of the VNodes corresponding to the `<p>` tags and, since they are the
546
- * same tag in the same position, we'd be able to avoid completely
547
- * re-rendering the subtree under them with a new DOM element and would just
548
- * call out to `patch` to handle reconciling their children and so on.
549
- *
550
- * 3. Check, for both windows, to see if the element at the beginning of the
551
- * window corresponds to the element at the end of the other window. This is
552
- * a heuristic which will let us identify _some_ situations in which
553
- * elements have changed position, for instance it _should_ detect that the
554
- * children nodes themselves have not changed but merely moved in the
555
- * following example:
556
- *
557
- * oldVNode: `<div><element-one /><element-two /></div>`
558
- * newVNode: `<div><element-two /><element-one /></div>`
559
- *
560
- * If we find cases like this then we also need to move the concrete DOM
561
- * elements corresponding to the moved children to write the re-order to the
562
- * DOM.
563
- *
564
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
565
- * nodes in the old children which have the same key as the first element in
566
- * our window on the new children. If we find such a node we handle calling
567
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
568
- * what we find.
569
- *
570
- * Finally, once we've narrowed our 'windows' to the point that either of them
571
- * collapse (i.e. they have length 0) we then handle any remaining VNode
572
- * insertion or deletion that needs to happen to get a DOM state that correctly
573
- * reflects the new child VNodes. If, for instance, after our window on the old
574
- * children has collapsed we still have more nodes on the new children that
575
- * we haven't dealt with yet then we need to add them, or if the new children
576
- * collapse but we still have unhandled _old_ children then we need to make
577
- * sure the corresponding DOM nodes are removed.
578
- *
579
- * @param parentElm the node into which the parent VNode is rendered
580
- * @param oldCh the old children of the parent node
581
- * @param newVNode the new VNode which will replace the parent
582
- * @param newCh the new children of the parent node
583
- */
584
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
585
- let oldStartIdx = 0;
586
- let newStartIdx = 0;
587
- let oldEndIdx = oldCh.length - 1;
588
- let oldStartVnode = oldCh[0];
589
- let oldEndVnode = oldCh[oldEndIdx];
590
- let newEndIdx = newCh.length - 1;
591
- let newStartVnode = newCh[0];
592
- let newEndVnode = newCh[newEndIdx];
593
- let node;
594
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
595
- if (oldStartVnode == null) {
596
- // VNode might have been moved left
597
- oldStartVnode = oldCh[++oldStartIdx];
598
- }
599
- else if (oldEndVnode == null) {
600
- oldEndVnode = oldCh[--oldEndIdx];
601
- }
602
- else if (newStartVnode == null) {
603
- newStartVnode = newCh[++newStartIdx];
604
- }
605
- else if (newEndVnode == null) {
606
- newEndVnode = newCh[--newEndIdx];
607
- }
608
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
609
- // if the start nodes are the same then we should patch the new VNode
610
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
611
- // indices to reflect that. We don't need to move any DOM Nodes around
612
- // since things are matched up in order.
613
- patch(oldStartVnode, newStartVnode);
614
- oldStartVnode = oldCh[++oldStartIdx];
615
- newStartVnode = newCh[++newStartIdx];
616
- }
617
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
618
- // likewise, if the end nodes are the same we patch new onto old and
619
- // decrement our end indices, and also likewise in this case we don't
620
- // need to move any DOM Nodes.
621
- patch(oldEndVnode, newEndVnode);
622
- oldEndVnode = oldCh[--oldEndIdx];
623
- newEndVnode = newCh[--newEndIdx];
624
- }
625
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
626
- patch(oldStartVnode, newEndVnode);
627
- // We need to move the element for `oldStartVnode` into a position which
628
- // will be appropriate for `newEndVnode`. For this we can use
629
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
630
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
631
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
632
- //
633
- // <old-start-node />
634
- // <some-intervening-node />
635
- // <old-end-node />
636
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
637
- // <next-sibling />
638
- //
639
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
640
- // the node for `oldStartVnode` at the end of the children of
641
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
642
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
643
- // append it to the children of the parent element.
644
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
645
- oldStartVnode = oldCh[++oldStartIdx];
646
- newEndVnode = newCh[--newEndIdx];
647
- }
648
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
649
- patch(oldEndVnode, newStartVnode);
650
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
651
- // the same node, so since we're here we know that they are not. Thus we
652
- // can move the element for `oldEndVnode` _before_ the element for
653
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
654
- // future.
655
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
656
- oldEndVnode = oldCh[--oldEndIdx];
657
- newStartVnode = newCh[++newStartIdx];
658
- }
659
- else {
660
- {
661
- // We either didn't find an element in the old children that matches
662
- // the key of the first new child OR the build is not using `key`
663
- // attributes at all. In either case we need to create a new element
664
- // for the new node.
665
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
666
- newStartVnode = newCh[++newStartIdx];
667
- }
668
- if (node) {
669
- // if we created a new node then handle inserting it to the DOM
670
- {
671
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
672
- }
673
- }
674
- }
675
- }
676
- if (oldStartIdx > oldEndIdx) {
677
- // we have some more new nodes to add which don't match up with old nodes
678
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
679
- }
680
- else if (newStartIdx > newEndIdx) {
681
- // there are nodes in the `oldCh` array which no longer correspond to nodes
682
- // in the new array, so lets remove them (which entails cleaning up the
683
- // relevant DOM nodes)
684
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
685
- }
686
- };
687
- /**
688
- * Compare two VNodes to determine if they are the same
689
- *
690
- * **NB**: This function is an equality _heuristic_ based on the available
691
- * information set on the two VNodes and can be misleading under certain
692
- * circumstances. In particular, if the two nodes do not have `key` attrs
693
- * (available under `$key$` on VNodes) then the function falls back on merely
694
- * checking that they have the same tag.
695
- *
696
- * So, in other words, if `key` attrs are not set on VNodes which may be
697
- * changing order within a `children` array or something along those lines then
698
- * we could obtain a false negative and then have to do needless re-rendering
699
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
700
- *
701
- * @param leftVNode the first VNode to check
702
- * @param rightVNode the second VNode to check
703
- * @returns whether they're equal or not
704
- */
705
- const isSameVnode = (leftVNode, rightVNode) => {
706
- // compare if two vnode to see if they're "technically" the same
707
- // need to have the same element tag, and same key to be the same
708
- if (leftVNode.$tag$ === rightVNode.$tag$) {
709
- return true;
710
- }
711
- return false;
712
- };
713
- /**
714
- * Handle reconciling an outdated VNode with a new one which corresponds to
715
- * it. This function handles flushing updates to the DOM and reconciling the
716
- * children of the two nodes (if any).
717
- *
718
- * @param oldVNode an old VNode whose DOM element and children we want to update
719
- * @param newVNode a new VNode representing an updated version of the old one
720
- */
721
- const patch = (oldVNode, newVNode) => {
722
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
723
- const oldChildren = oldVNode.$children$;
724
- const newChildren = newVNode.$children$;
725
- const tag = newVNode.$tag$;
726
- const text = newVNode.$text$;
727
- if (text === null) {
728
- {
729
- if (tag === 'slot')
730
- ;
731
- else {
732
- // either this is the first render of an element OR it's an update
733
- // AND we already know it's possible it could have changed
734
- // this updates the element's css classes, attrs, props, listeners, etc.
735
- updateElement(oldVNode, newVNode, isSvgMode);
736
- }
737
- }
738
- if (oldChildren !== null && newChildren !== null) {
739
- // looks like there's child vnodes for both the old and new vnodes
740
- // so we need to call `updateChildren` to reconcile them
741
- updateChildren(elm, oldChildren, newVNode, newChildren);
742
- }
743
- else if (newChildren !== null) {
744
- // no old child vnodes, but there are new child vnodes to add
745
- if (oldVNode.$text$ !== null) {
746
- // the old vnode was text, so be sure to clear it out
747
- elm.textContent = '';
748
- }
749
- // add the new vnode children
750
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
751
- }
752
- else if (oldChildren !== null) {
753
- // no new child vnodes, but there are old child vnodes to remove
754
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
755
- }
756
- }
757
- else if (oldVNode.$text$ !== text) {
758
- // update the text content for the text only vnode
759
- // and also only if the text is different than before
760
- elm.data = text;
761
- }
762
- };
763
- const callNodeRefs = (vNode) => {
764
- {
765
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
766
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
767
- }
768
- };
769
- /**
770
- * The main entry point for Stencil's virtual DOM-based rendering engine
771
- *
772
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
773
- * function will handle creating a virtual DOM tree with a single root, patching
774
- * the current virtual DOM tree onto an old one (if any), dealing with slot
775
- * relocation, and reflecting attributes.
776
- *
777
- * @param hostRef data needed to root and render the virtual DOM tree, such as
778
- * the DOM node into which it should be rendered.
779
- * @param renderFnResults the virtual DOM nodes to be rendered
780
- */
781
- const renderVdom = (hostRef, renderFnResults) => {
782
- const hostElm = hostRef.$hostElement$;
783
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
784
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
785
- hostTagName = hostElm.tagName;
786
- rootVnode.$tag$ = null;
787
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
788
- hostRef.$vnode$ = rootVnode;
789
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
790
- {
791
- scopeId = hostElm['s-sc'];
792
- }
793
- // synchronous patch
794
- patch(oldVNode, rootVnode);
795
- };
796
- const attachToAncestor = (hostRef, ancestorComponent) => {
797
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
798
- ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
799
- }
800
- };
801
- const scheduleUpdate = (hostRef, isInitialLoad) => {
802
- {
803
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
804
- }
805
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
806
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
807
- return;
808
- }
809
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
810
- // there is no ancestor component or the ancestor component
811
- // has already fired off its lifecycle update then
812
- // fire off the initial update
813
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
814
- return writeTask(dispatch) ;
815
- };
816
- const dispatchHooks = (hostRef, isInitialLoad) => {
817
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
818
- const instance = hostRef.$lazyInstance$ ;
819
- let promise;
820
- if (isInitialLoad) {
821
- {
822
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
823
- if (hostRef.$queuedListeners$) {
824
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
825
- hostRef.$queuedListeners$ = null;
826
- }
827
- }
828
- {
829
- promise = safeCall(instance, 'componentWillLoad');
830
- }
831
- }
832
- {
833
- promise = then(promise, () => safeCall(instance, 'componentWillRender'));
834
- }
835
- endSchedule();
836
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
837
- };
838
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
839
- // updateComponent
840
- const elm = hostRef.$hostElement$;
841
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
842
- const rc = elm['s-rc'];
843
- if (isInitialLoad) {
844
- // DOM WRITE!
845
- attachStyles(hostRef);
846
- }
847
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
848
- {
849
- callRender(hostRef, instance);
850
- }
851
- if (rc) {
852
- // ok, so turns out there are some child host elements
853
- // waiting on this parent element to load
854
- // let's fire off all update callbacks waiting
855
- rc.map((cb) => cb());
856
- elm['s-rc'] = undefined;
857
- }
858
- endRender();
859
- endUpdate();
860
- {
861
- const childrenPromises = elm['s-p'];
862
- const postUpdate = () => postUpdateComponent(hostRef);
863
- if (childrenPromises.length === 0) {
864
- postUpdate();
865
- }
866
- else {
867
- Promise.all(childrenPromises).then(postUpdate);
868
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
869
- childrenPromises.length = 0;
870
- }
871
- }
872
- };
873
- const callRender = (hostRef, instance, elm) => {
874
- try {
875
- instance = instance.render() ;
876
- {
877
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
878
- }
879
- {
880
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
881
- }
882
- {
883
- {
884
- // looks like we've got child nodes to render into this host element
885
- // or we need to update the css class/attrs on the host element
886
- // DOM WRITE!
887
- {
888
- renderVdom(hostRef, instance);
889
- }
890
- }
891
- }
892
- }
893
- catch (e) {
894
- consoleError(e, hostRef.$hostElement$);
895
- }
896
- return null;
897
- };
898
- const postUpdateComponent = (hostRef) => {
899
- const tagName = hostRef.$cmpMeta$.$tagName$;
900
- const elm = hostRef.$hostElement$;
901
- const endPostUpdate = createTime('postUpdate', tagName);
902
- const instance = hostRef.$lazyInstance$ ;
903
- const ancestorComponent = hostRef.$ancestorComponent$;
904
- {
905
- safeCall(instance, 'componentDidRender');
906
- }
907
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
908
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
909
- {
910
- // DOM WRITE!
911
- addHydratedFlag(elm);
912
- }
913
- {
914
- safeCall(instance, 'componentDidLoad');
915
- }
916
- endPostUpdate();
917
- {
918
- hostRef.$onReadyResolve$(elm);
919
- if (!ancestorComponent) {
920
- appDidLoad();
921
- }
922
- }
923
- }
924
- else {
925
- endPostUpdate();
926
- }
927
- // load events fire from bottom to top
928
- // the deepest elements load first then bubbles up
929
- {
930
- if (hostRef.$onRenderResolve$) {
931
- hostRef.$onRenderResolve$();
932
- hostRef.$onRenderResolve$ = undefined;
933
- }
934
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
935
- nextTick(() => scheduleUpdate(hostRef, false));
936
- }
937
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
938
- }
939
- // ( •_•)
940
- // ( •_•)>⌐■-■
941
- // (⌐■_■)
942
- };
943
- const appDidLoad = (who) => {
944
- // on appload
945
- // we have finish the first big initial render
946
- {
947
- addHydratedFlag(doc.documentElement);
948
- }
949
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
950
- };
951
- const safeCall = (instance, method, arg) => {
952
- if (instance && instance[method]) {
953
- try {
954
- return instance[method](arg);
955
- }
956
- catch (e) {
957
- consoleError(e);
958
- }
959
- }
960
- return undefined;
961
- };
962
- const then = (promise, thenFn) => {
963
- return promise && promise.then ? promise.then(thenFn) : thenFn();
964
- };
965
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
966
- ;
967
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
968
- const setValue = (ref, propName, newVal, cmpMeta) => {
969
- // check our new property value against our internal value
970
- const hostRef = getHostRef(ref);
971
- const elm = hostRef.$hostElement$ ;
972
- const oldVal = hostRef.$instanceValues$.get(propName);
973
- const flags = hostRef.$flags$;
974
- const instance = hostRef.$lazyInstance$ ;
975
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
976
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
977
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
978
- const didValueChange = newVal !== oldVal && !areBothNaN;
979
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
980
- // gadzooks! the property's value has changed!!
981
- // set our new value!
982
- hostRef.$instanceValues$.set(propName, newVal);
983
- if (instance) {
984
- // get an array of method names of watch functions to call
985
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
986
- const watchMethods = cmpMeta.$watchers$[propName];
987
- if (watchMethods) {
988
- // this instance is watching for when this property changed
989
- watchMethods.map((watchMethodName) => {
990
- try {
991
- // fire off each of the watch methods that are watching this property
992
- instance[watchMethodName](newVal, oldVal, propName);
993
- }
994
- catch (e) {
995
- consoleError(e, elm);
996
- }
997
- });
998
- }
999
- }
1000
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1001
- // looks like this value actually changed, so we've got work to do!
1002
- // but only if we've already rendered, otherwise just chill out
1003
- // queue that we need to do an update, but don't worry about queuing
1004
- // up millions cuz this function ensures it only runs once
1005
- scheduleUpdate(hostRef, false);
1006
- }
1007
- }
1008
- }
1009
- };
1010
- /**
1011
- * Attach a series of runtime constructs to a compiled Stencil component
1012
- * constructor, including getters and setters for the `@Prop` and `@State`
1013
- * decorators, callbacks for when attributes change, and so on.
1014
- *
1015
- * @param Cstr the constructor for a component that we need to process
1016
- * @param cmpMeta metadata collected previously about the component
1017
- * @param flags a number used to store a series of bit flags
1018
- * @returns a reference to the same constructor passed in (but now mutated)
1019
- */
1020
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1021
- if (cmpMeta.$members$) {
1022
- if (Cstr.watchers) {
1023
- cmpMeta.$watchers$ = Cstr.watchers;
1024
- }
1025
- // It's better to have a const than two Object.entries()
1026
- const members = Object.entries(cmpMeta.$members$);
1027
- const prototype = Cstr.prototype;
1028
- members.map(([memberName, [memberFlags]]) => {
1029
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1030
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1031
- // proxyComponent - prop
1032
- Object.defineProperty(prototype, memberName, {
1033
- get() {
1034
- // proxyComponent, get value
1035
- return getValue(this, memberName);
1036
- },
1037
- set(newValue) {
1038
- // proxyComponent, set value
1039
- setValue(this, memberName, newValue, cmpMeta);
1040
- },
1041
- configurable: true,
1042
- enumerable: true,
1043
- });
1044
- }
1045
- });
1046
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1047
- const attrNameToPropName = new Map();
1048
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1049
- plt.jmp(() => {
1050
- const propName = attrNameToPropName.get(attrName);
1051
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1052
- // in the case where an attribute was set inline.
1053
- // ```html
1054
- // <my-component some-attribute="some-value"></my-component>
1055
- // ```
1056
- //
1057
- // There is an edge case where a developer sets the attribute inline on a custom element and then
1058
- // programmatically changes it before it has been upgraded as shown below:
1059
- //
1060
- // ```html
1061
- // <!-- this component has _not_ been upgraded yet -->
1062
- // <my-component id="test" some-attribute="some-value"></my-component>
1063
- // <script>
1064
- // // grab non-upgraded component
1065
- // el = document.querySelector("#test");
1066
- // el.someAttribute = "another-value";
1067
- // // upgrade component
1068
- // customElements.define('my-component', MyComponent);
1069
- // </script>
1070
- // ```
1071
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1072
- // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1073
- // to the value that was set inline i.e. "some-value" from above example. When
1074
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1075
- //
1076
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1077
- // by connectedCallback as this attributeChangedCallback will not fire.
1078
- //
1079
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1080
- //
1081
- // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1082
- // properties here given that this goes against best practices outlined here
1083
- // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1084
- if (this.hasOwnProperty(propName)) {
1085
- newValue = this[propName];
1086
- delete this[propName];
1087
- }
1088
- else if (prototype.hasOwnProperty(propName) &&
1089
- typeof this[propName] === 'number' &&
1090
- this[propName] == newValue) {
1091
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1092
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1093
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1094
- return;
1095
- }
1096
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1097
- });
1098
- };
1099
- // create an array of attributes to observe
1100
- // and also create a map of html attribute name to js property name
1101
- Cstr.observedAttributes = members
1102
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1103
- .map(([propName, m]) => {
1104
- const attrName = m[1] || propName;
1105
- attrNameToPropName.set(attrName, propName);
1106
- return attrName;
1107
- });
1108
- }
1109
- }
1110
- return Cstr;
1111
- };
1112
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1113
- // initializeComponent
1114
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1115
- {
1116
- // we haven't initialized this element yet
1117
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1118
- // lazy loaded components
1119
- // request the component's implementation to be
1120
- // wired up with the host element
1121
- Cstr = loadModule(cmpMeta);
1122
- if (Cstr.then) {
1123
- // Await creates a micro-task avoid if possible
1124
- const endLoad = uniqueTime();
1125
- Cstr = await Cstr;
1126
- endLoad();
1127
- }
1128
- if (!Cstr.isProxied) {
1129
- // we've never proxied this Constructor before
1130
- // let's add the getters/setters to its prototype before
1131
- // the first time we create an instance of the implementation
1132
- {
1133
- cmpMeta.$watchers$ = Cstr.watchers;
1134
- }
1135
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1136
- Cstr.isProxied = true;
1137
- }
1138
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1139
- // ok, time to construct the instance
1140
- // but let's keep track of when we start and stop
1141
- // so that the getters/setters don't incorrectly step on data
1142
- {
1143
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1144
- }
1145
- // construct the lazy-loaded component implementation
1146
- // passing the hostRef is very important during
1147
- // construction in order to directly wire together the
1148
- // host element and the lazy-loaded instance
1149
- try {
1150
- new Cstr(hostRef);
1151
- }
1152
- catch (e) {
1153
- consoleError(e);
1154
- }
1155
- {
1156
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1157
- }
1158
- {
1159
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1160
- }
1161
- endNewInstance();
1162
- }
1163
- if (Cstr.style) {
1164
- // this component has styles but we haven't registered them yet
1165
- let style = Cstr.style;
1166
- const scopeId = getScopeId(cmpMeta);
1167
- if (!styles.has(scopeId)) {
1168
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1169
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1170
- endRegisterStyles();
1171
- }
1172
- }
1173
- }
1174
- // we've successfully created a lazy instance
1175
- const ancestorComponent = hostRef.$ancestorComponent$;
1176
- const schedule = () => scheduleUpdate(hostRef, true);
1177
- if (ancestorComponent && ancestorComponent['s-rc']) {
1178
- // this is the initial load and this component it has an ancestor component
1179
- // but the ancestor component has NOT fired its will update lifecycle yet
1180
- // so let's just cool our jets and wait for the ancestor to continue first
1181
- // this will get fired off when the ancestor component
1182
- // finally gets around to rendering its lazy self
1183
- // fire off the initial update
1184
- ancestorComponent['s-rc'].push(schedule);
1185
- }
1186
- else {
1187
- schedule();
1188
- }
1189
- };
1190
- const connectedCallback = (elm) => {
1191
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1192
- const hostRef = getHostRef(elm);
1193
- const cmpMeta = hostRef.$cmpMeta$;
1194
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1195
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1196
- // first time this component has connected
1197
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1198
- {
1199
- // find the first ancestor component (if there is one) and register
1200
- // this component as one of the actively loading child components for its ancestor
1201
- let ancestorComponent = elm;
1202
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1203
- // climb up the ancestors looking for the first
1204
- // component that hasn't finished its lifecycle update yet
1205
- if (ancestorComponent['s-p']) {
1206
- // we found this components first ancestor component
1207
- // keep a reference to this component's ancestor component
1208
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1209
- break;
1210
- }
1211
- }
1212
- }
1213
- // Lazy properties
1214
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1215
- if (cmpMeta.$members$) {
1216
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1217
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1218
- const value = elm[memberName];
1219
- delete elm[memberName];
1220
- elm[memberName] = value;
1221
- }
1222
- });
1223
- }
1224
- {
1225
- initializeComponent(elm, hostRef, cmpMeta);
1226
- }
1227
- }
1228
- else {
1229
- // not the first time this has connected
1230
- // reattach any event listeners to the host
1231
- // since they would have been removed when disconnected
1232
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1233
- }
1234
- endConnected();
1235
- }
1236
- };
1237
- const disconnectedCallback = (elm) => {
1238
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1239
- const hostRef = getHostRef(elm);
1240
- const instance = hostRef.$lazyInstance$ ;
1241
- {
1242
- if (hostRef.$rmListeners$) {
1243
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1244
- hostRef.$rmListeners$ = undefined;
1245
- }
1246
- }
1247
- {
1248
- safeCall(instance, 'disconnectedCallback');
1249
- }
1250
- }
1251
- };
1252
- const bootstrapLazy = (lazyBundles, options = {}) => {
1253
- var _a;
1254
- const endBootstrap = createTime();
1255
- const cmpTags = [];
1256
- const exclude = options.exclude || [];
1257
- const customElements = win.customElements;
1258
- const head = doc.head;
1259
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1260
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1261
- const deferredConnectedCallbacks = [];
1262
- let appLoadFallback;
1263
- let isBootstrapping = true;
1264
- Object.assign(plt, options);
1265
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1266
- lazyBundles.map((lazyBundle) => {
1267
- lazyBundle[1].map((compactMeta) => {
1268
- const cmpMeta = {
1269
- $flags$: compactMeta[0],
1270
- $tagName$: compactMeta[1],
1271
- $members$: compactMeta[2],
1272
- $listeners$: compactMeta[3],
1273
- };
1274
- {
1275
- cmpMeta.$members$ = compactMeta[2];
1276
- }
1277
- {
1278
- cmpMeta.$listeners$ = compactMeta[3];
1279
- }
1280
- {
1281
- cmpMeta.$watchers$ = {};
1282
- }
1283
- const tagName = cmpMeta.$tagName$;
1284
- const HostElement = class extends HTMLElement {
1285
- // StencilLazyHost
1286
- constructor(self) {
1287
- // @ts-ignore
1288
- super(self);
1289
- self = this;
1290
- registerHost(self, cmpMeta);
1291
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1292
- // this component is using shadow dom
1293
- // and this browser supports shadow dom
1294
- // add the read-only property "shadowRoot" to the host element
1295
- // adding the shadow root build conditionals to minimize runtime
1296
- {
1297
- {
1298
- self.attachShadow({ mode: 'open' });
1299
- }
1300
- }
1301
- }
1302
- }
1303
- connectedCallback() {
1304
- if (appLoadFallback) {
1305
- clearTimeout(appLoadFallback);
1306
- appLoadFallback = null;
1307
- }
1308
- if (isBootstrapping) {
1309
- // connectedCallback will be processed once all components have been registered
1310
- deferredConnectedCallbacks.push(this);
1311
- }
1312
- else {
1313
- plt.jmp(() => connectedCallback(this));
1314
- }
1315
- }
1316
- disconnectedCallback() {
1317
- plt.jmp(() => disconnectedCallback(this));
1318
- }
1319
- componentOnReady() {
1320
- return getHostRef(this).$onReadyPromise$;
1321
- }
1322
- };
1323
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1324
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1325
- cmpTags.push(tagName);
1326
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1327
- }
1328
- });
1329
- });
1330
- {
1331
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1332
- visibilityStyle.setAttribute('data-styles', '');
1333
- // Apply CSP nonce to the style tag if it exists
1334
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1335
- if (nonce != null) {
1336
- visibilityStyle.setAttribute('nonce', nonce);
1337
- }
1338
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1339
- }
1340
- // Process deferred connectedCallbacks now all components have been registered
1341
- isBootstrapping = false;
1342
- if (deferredConnectedCallbacks.length) {
1343
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1344
- }
1345
- else {
1346
- {
1347
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1348
- }
1349
- }
1350
- // Fallback appLoad event
1351
- endBootstrap();
1352
- };
1353
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1354
- if (listeners) {
1355
- listeners.map(([flags, name, method]) => {
1356
- const target = getHostListenerTarget(elm, flags) ;
1357
- const handler = hostListenerProxy(hostRef, method);
1358
- const opts = hostListenerOpts(flags);
1359
- plt.ael(target, name, handler, opts);
1360
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1361
- });
1362
- }
1363
- };
1364
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
1365
- try {
1366
- {
1367
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1368
- // instance is ready, let's call it's member method for this event
1369
- hostRef.$lazyInstance$[methodName](ev);
1370
- }
1371
- else {
1372
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1373
- }
1374
- }
1375
- }
1376
- catch (e) {
1377
- consoleError(e);
1378
- }
1379
- };
1380
- const getHostListenerTarget = (elm, flags) => {
1381
- if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1382
- return doc;
1383
- return elm;
1384
- };
1385
- // prettier-ignore
1386
- const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1387
- /**
1388
- * Assigns the given value to the nonce property on the runtime platform object.
1389
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1390
- * @param nonce The value to be assigned to the platform nonce property.
1391
- * @returns void
1392
- */
1393
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1394
- const hostRefs = /*@__PURE__*/ new WeakMap();
1395
- const getHostRef = (ref) => hostRefs.get(ref);
1396
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1397
- const registerHost = (elm, cmpMeta) => {
1398
- const hostRef = {
1399
- $flags$: 0,
1400
- $hostElement$: elm,
1401
- $cmpMeta$: cmpMeta,
1402
- $instanceValues$: new Map(),
1403
- };
1404
- {
1405
- hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1406
- elm['s-p'] = [];
1407
- elm['s-rc'] = [];
1408
- }
1409
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1410
- return hostRefs.set(elm, hostRef);
1411
- };
1412
- const isMemberInElement = (elm, memberName) => memberName in elm;
1413
- const consoleError = (e, el) => (0, console.error)(e, el);
1414
- const cmpModules = /*@__PURE__*/ new Map();
1415
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1416
- // loadModuleImport
1417
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1418
- const bundleId = cmpMeta.$lazyBundleId$;
1419
- const module = cmpModules.get(bundleId) ;
1420
- if (module) {
1421
- return module[exportName];
1422
- }
1423
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1424
- return import(
1425
- /* @vite-ignore */
1426
- /* webpackInclude: /\.entry\.js$/ */
1427
- /* webpackExclude: /\.system\.entry\.js$/ */
1428
- /* webpackMode: "lazy" */
1429
- `./${bundleId}.entry.js${''}`).then((importedModule) => {
1430
- {
1431
- cmpModules.set(bundleId, importedModule);
1432
- }
1433
- return importedModule[exportName];
1434
- }, consoleError);
1435
- };
1436
- const styles = /*@__PURE__*/ new Map();
1437
- const win = typeof window !== 'undefined' ? window : {};
1438
- const doc = win.document || { head: {} };
1439
- const plt = {
1440
- $flags$: 0,
1441
- $resourcesUrl$: '',
1442
- jmp: (h) => h(),
1443
- raf: (h) => requestAnimationFrame(h),
1444
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1445
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1446
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
1447
- };
1448
- const promiseResolve = (v) => Promise.resolve(v);
1449
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1450
- try {
1451
- new CSSStyleSheet();
1452
- return typeof new CSSStyleSheet().replaceSync === 'function';
1453
- }
1454
- catch (e) { }
1455
- return false;
1456
- })()
1457
- ;
1458
- const queueDomReads = [];
1459
- const queueDomWrites = [];
1460
- const queueTask = (queue, write) => (cb) => {
1461
- queue.push(cb);
1462
- if (!queuePending) {
1463
- queuePending = true;
1464
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1465
- nextTick(flush);
1466
- }
1467
- else {
1468
- plt.raf(flush);
1469
- }
1470
- }
1471
- };
1472
- const consume = (queue) => {
1473
- for (let i = 0; i < queue.length; i++) {
1474
- try {
1475
- queue[i](performance.now());
1476
- }
1477
- catch (e) {
1478
- consoleError(e);
1479
- }
1480
- }
1481
- queue.length = 0;
1482
- };
1483
- const flush = () => {
1484
- // always force a bunch of medium callbacks to run, but still have
1485
- // a throttle on how many can run in a certain time
1486
- // DOM READS!!!
1487
- consume(queueDomReads);
1488
- // DOM WRITES!!!
1489
- {
1490
- consume(queueDomWrites);
1491
- if ((queuePending = queueDomReads.length > 0)) {
1492
- // still more to do yet, but we've run out of time
1493
- // let's let this thing cool off and try again in the next tick
1494
- plt.raf(flush);
1495
- }
1496
- }
1497
- };
1498
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1499
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1500
-
1501
- export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };