@usecapsule/core-components 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/{p-5ed5e96c.entry.js → p-02072c68.entry.js} +2 -2
- package/dist/capsule/{p-5ed5e96c.entry.js.map → p-02072c68.entry.js.map} +1 -1
- package/dist/capsule/p-1474c545.entry.js +29 -0
- package/dist/capsule/{p-6e900654.entry.js.map → p-1474c545.entry.js.map} +1 -1
- package/dist/capsule/p-2c16694d.entry.js +2 -0
- package/dist/capsule/{p-397edab5.entry.js.map → p-2c16694d.entry.js.map} +1 -1
- package/dist/capsule/{p-52d6ebee.entry.js → p-41088cd4.entry.js} +2 -2
- package/dist/capsule/{p-52d6ebee.entry.js.map → p-41088cd4.entry.js.map} +1 -1
- package/dist/capsule/{p-f9351426.entry.js → p-6dcaee48.entry.js} +2 -2
- package/dist/capsule/{p-f9351426.entry.js.map → p-6dcaee48.entry.js.map} +1 -1
- package/dist/capsule/p-7dde3172.js +3 -0
- package/dist/capsule/p-7dde3172.js.map +1 -0
- package/dist/capsule/p-a6aaf3f4.entry.js +10 -0
- package/dist/capsule/{p-86e6cba5.entry.js.map → p-a6aaf3f4.entry.js.map} +1 -1
- package/dist/capsule/{p-70f95c93.entry.js → p-b976b6f0.entry.js} +2 -2
- package/dist/capsule/{p-70f95c93.entry.js.map → p-b976b6f0.entry.js.map} +1 -1
- package/dist/cjs/capsule.cjs.js +9 -9
- package/dist/cjs/capsule.cjs.js.map +1 -1
- package/dist/cjs/cpsl-alert_33.cjs.entry.js +45 -39
- package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
- package/dist/cjs/index-528f7428.js +2103 -0
- package/dist/cjs/index-528f7428.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +2 -2
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
- package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +2 -2
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -1
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +2 -2
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +1 -1
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.css +1 -9
- package/dist/collection/components/cpsl-table/cpsl-table.js +7 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +1 -1
- package/dist/esm/capsule.js +10 -10
- package/dist/esm/capsule.js.map +1 -1
- package/dist/esm/cpsl-alert_33.entry.js +45 -39
- package/dist/esm/cpsl-alert_33.entry.js.map +1 -1
- package/dist/esm/cpsl-animation.entry.js +2 -2
- package/dist/esm/cpsl-col.entry.js +2 -2
- package/dist/esm/cpsl-grid.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js +2 -2
- package/dist/esm/cpsl-modal-v2.entry.js +2 -2
- package/dist/esm/cpsl-modal-v2.entry.js.map +1 -1
- package/dist/esm/cpsl-row.entry.js +2 -2
- package/dist/esm/index-b188f201.js +2072 -0
- package/dist/esm/index-b188f201.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/loader/cdn.js +3 -1
- package/dist/loader/index.cjs.js +3 -1
- package/dist/loader/index.es2017.js +3 -1
- package/dist/loader/index.js +3 -1
- package/dist/types/components/cpsl-table/cpsl-table.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +8 -3
- package/package.json +2 -2
- package/dist/capsule/p-397edab5.entry.js +0 -2
- package/dist/capsule/p-6e71539d.js +0 -3
- package/dist/capsule/p-6e71539d.js.map +0 -1
- package/dist/capsule/p-6e900654.entry.js +0 -29
- package/dist/capsule/p-86e6cba5.entry.js +0 -10
- package/dist/cjs/index-85125285.js +0 -1414
- package/dist/cjs/index-85125285.js.map +0 -1
- package/dist/esm/index-b9a060b3.js +0 -1383
- package/dist/esm/index-b9a060b3.js.map +0 -1
@@ -1,1414 +0,0 @@
|
|
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 = 'capsule';
|
24
|
-
const BUILD = /* capsule */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
25
|
-
|
26
|
-
/*
|
27
|
-
Stencil Client Platform v4.18.3 | MIT Licensed | https://stenciljs.com
|
28
|
-
*/
|
29
|
-
var __defProp = Object.defineProperty;
|
30
|
-
var __export = (target, all) => {
|
31
|
-
for (var name in all)
|
32
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
33
|
-
};
|
34
|
-
|
35
|
-
// src/utils/constants.ts
|
36
|
-
var EMPTY_OBJ = {};
|
37
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
38
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
39
|
-
|
40
|
-
// src/utils/helpers.ts
|
41
|
-
var isDef = (v) => v != null;
|
42
|
-
var isComplexType = (o) => {
|
43
|
-
o = typeof o;
|
44
|
-
return o === "object" || o === "function";
|
45
|
-
};
|
46
|
-
|
47
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
48
|
-
function queryNonceMetaTagContent(doc2) {
|
49
|
-
var _a, _b, _c;
|
50
|
-
return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
51
|
-
}
|
52
|
-
|
53
|
-
// src/utils/result.ts
|
54
|
-
var result_exports = {};
|
55
|
-
__export(result_exports, {
|
56
|
-
err: () => err,
|
57
|
-
map: () => map,
|
58
|
-
ok: () => ok,
|
59
|
-
unwrap: () => unwrap,
|
60
|
-
unwrapErr: () => unwrapErr
|
61
|
-
});
|
62
|
-
var ok = (value) => ({
|
63
|
-
isOk: true,
|
64
|
-
isErr: false,
|
65
|
-
value
|
66
|
-
});
|
67
|
-
var err = (value) => ({
|
68
|
-
isOk: false,
|
69
|
-
isErr: true,
|
70
|
-
value
|
71
|
-
});
|
72
|
-
function map(result, fn) {
|
73
|
-
if (result.isOk) {
|
74
|
-
const val = fn(result.value);
|
75
|
-
if (val instanceof Promise) {
|
76
|
-
return val.then((newVal) => ok(newVal));
|
77
|
-
} else {
|
78
|
-
return ok(val);
|
79
|
-
}
|
80
|
-
}
|
81
|
-
if (result.isErr) {
|
82
|
-
const value = result.value;
|
83
|
-
return err(value);
|
84
|
-
}
|
85
|
-
throw "should never get here";
|
86
|
-
}
|
87
|
-
var unwrap = (result) => {
|
88
|
-
if (result.isOk) {
|
89
|
-
return result.value;
|
90
|
-
} else {
|
91
|
-
throw result.value;
|
92
|
-
}
|
93
|
-
};
|
94
|
-
var unwrapErr = (result) => {
|
95
|
-
if (result.isErr) {
|
96
|
-
return result.value;
|
97
|
-
} else {
|
98
|
-
throw result.value;
|
99
|
-
}
|
100
|
-
};
|
101
|
-
var createTime = (fnName, tagName = "") => {
|
102
|
-
{
|
103
|
-
return () => {
|
104
|
-
return;
|
105
|
-
};
|
106
|
-
}
|
107
|
-
};
|
108
|
-
var uniqueTime = (key, measureText) => {
|
109
|
-
{
|
110
|
-
return () => {
|
111
|
-
return;
|
112
|
-
};
|
113
|
-
}
|
114
|
-
};
|
115
|
-
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
116
|
-
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
117
|
-
var h = (nodeName, vnodeData, ...children) => {
|
118
|
-
let child = null;
|
119
|
-
let key = null;
|
120
|
-
let simple = false;
|
121
|
-
let lastSimple = false;
|
122
|
-
const vNodeChildren = [];
|
123
|
-
const walk = (c) => {
|
124
|
-
for (let i2 = 0; i2 < c.length; i2++) {
|
125
|
-
child = c[i2];
|
126
|
-
if (Array.isArray(child)) {
|
127
|
-
walk(child);
|
128
|
-
} else if (child != null && typeof child !== "boolean") {
|
129
|
-
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
130
|
-
child = String(child);
|
131
|
-
}
|
132
|
-
if (simple && lastSimple) {
|
133
|
-
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
134
|
-
} else {
|
135
|
-
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
136
|
-
}
|
137
|
-
lastSimple = simple;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
};
|
141
|
-
walk(children);
|
142
|
-
if (vnodeData) {
|
143
|
-
if (vnodeData.key) {
|
144
|
-
key = vnodeData.key;
|
145
|
-
}
|
146
|
-
{
|
147
|
-
const classData = vnodeData.className || vnodeData.class;
|
148
|
-
if (classData) {
|
149
|
-
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
150
|
-
}
|
151
|
-
}
|
152
|
-
}
|
153
|
-
if (typeof nodeName === "function") {
|
154
|
-
return nodeName(
|
155
|
-
vnodeData === null ? {} : vnodeData,
|
156
|
-
vNodeChildren,
|
157
|
-
vdomFnUtils
|
158
|
-
);
|
159
|
-
}
|
160
|
-
const vnode = newVNode(nodeName, null);
|
161
|
-
vnode.$attrs$ = vnodeData;
|
162
|
-
if (vNodeChildren.length > 0) {
|
163
|
-
vnode.$children$ = vNodeChildren;
|
164
|
-
}
|
165
|
-
{
|
166
|
-
vnode.$key$ = key;
|
167
|
-
}
|
168
|
-
return vnode;
|
169
|
-
};
|
170
|
-
var newVNode = (tag, text) => {
|
171
|
-
const vnode = {
|
172
|
-
$flags$: 0,
|
173
|
-
$tag$: tag,
|
174
|
-
$text$: text,
|
175
|
-
$elm$: null,
|
176
|
-
$children$: null
|
177
|
-
};
|
178
|
-
{
|
179
|
-
vnode.$attrs$ = null;
|
180
|
-
}
|
181
|
-
{
|
182
|
-
vnode.$key$ = null;
|
183
|
-
}
|
184
|
-
return vnode;
|
185
|
-
};
|
186
|
-
var Host = {};
|
187
|
-
var isHost = (node) => node && node.$tag$ === Host;
|
188
|
-
var vdomFnUtils = {
|
189
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
190
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
191
|
-
};
|
192
|
-
var convertToPublic = (node) => ({
|
193
|
-
vattrs: node.$attrs$,
|
194
|
-
vchildren: node.$children$,
|
195
|
-
vkey: node.$key$,
|
196
|
-
vname: node.$name$,
|
197
|
-
vtag: node.$tag$,
|
198
|
-
vtext: node.$text$
|
199
|
-
});
|
200
|
-
var convertToPrivate = (node) => {
|
201
|
-
if (typeof node.vtag === "function") {
|
202
|
-
const vnodeData = { ...node.vattrs };
|
203
|
-
if (node.vkey) {
|
204
|
-
vnodeData.key = node.vkey;
|
205
|
-
}
|
206
|
-
if (node.vname) {
|
207
|
-
vnodeData.name = node.vname;
|
208
|
-
}
|
209
|
-
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
210
|
-
}
|
211
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
212
|
-
vnode.$attrs$ = node.vattrs;
|
213
|
-
vnode.$children$ = node.vchildren;
|
214
|
-
vnode.$key$ = node.vkey;
|
215
|
-
vnode.$name$ = node.vname;
|
216
|
-
return vnode;
|
217
|
-
};
|
218
|
-
var parsePropertyValue = (propValue, propType) => {
|
219
|
-
if (propValue != null && !isComplexType(propValue)) {
|
220
|
-
if (propType & 4 /* Boolean */) {
|
221
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
222
|
-
}
|
223
|
-
if (propType & 2 /* Number */) {
|
224
|
-
return parseFloat(propValue);
|
225
|
-
}
|
226
|
-
if (propType & 1 /* String */) {
|
227
|
-
return String(propValue);
|
228
|
-
}
|
229
|
-
return propValue;
|
230
|
-
}
|
231
|
-
return propValue;
|
232
|
-
};
|
233
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
234
|
-
|
235
|
-
// src/runtime/event-emitter.ts
|
236
|
-
var createEvent = (ref, name, flags) => {
|
237
|
-
const elm = getElement(ref);
|
238
|
-
return {
|
239
|
-
emit: (detail) => {
|
240
|
-
return emitEvent(elm, name, {
|
241
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
242
|
-
composed: !!(flags & 2 /* Composed */),
|
243
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
244
|
-
detail
|
245
|
-
});
|
246
|
-
}
|
247
|
-
};
|
248
|
-
};
|
249
|
-
var emitEvent = (elm, name, opts) => {
|
250
|
-
const ev = plt.ce(name, opts);
|
251
|
-
elm.dispatchEvent(ev);
|
252
|
-
return ev;
|
253
|
-
};
|
254
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
255
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
256
|
-
let style = styles.get(scopeId2);
|
257
|
-
if (supportsConstructableStylesheets && allowCS) {
|
258
|
-
style = style || new CSSStyleSheet();
|
259
|
-
if (typeof style === "string") {
|
260
|
-
style = cssText;
|
261
|
-
} else {
|
262
|
-
style.replaceSync(cssText);
|
263
|
-
}
|
264
|
-
} else {
|
265
|
-
style = cssText;
|
266
|
-
}
|
267
|
-
styles.set(scopeId2, style);
|
268
|
-
};
|
269
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
270
|
-
var _a;
|
271
|
-
const scopeId2 = getScopeId(cmpMeta);
|
272
|
-
const style = styles.get(scopeId2);
|
273
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
274
|
-
if (style) {
|
275
|
-
if (typeof style === "string") {
|
276
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
277
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
278
|
-
let styleElm;
|
279
|
-
if (!appliedStyles) {
|
280
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
281
|
-
}
|
282
|
-
if (!appliedStyles.has(scopeId2)) {
|
283
|
-
{
|
284
|
-
styleElm = doc.createElement("style");
|
285
|
-
styleElm.innerHTML = style;
|
286
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
287
|
-
if (nonce != null) {
|
288
|
-
styleElm.setAttribute("nonce", nonce);
|
289
|
-
}
|
290
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
291
|
-
}
|
292
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
293
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
294
|
-
}
|
295
|
-
if (appliedStyles) {
|
296
|
-
appliedStyles.add(scopeId2);
|
297
|
-
}
|
298
|
-
}
|
299
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
300
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
301
|
-
}
|
302
|
-
}
|
303
|
-
return scopeId2;
|
304
|
-
};
|
305
|
-
var attachStyles = (hostRef) => {
|
306
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
307
|
-
const elm = hostRef.$hostElement$;
|
308
|
-
const flags = cmpMeta.$flags$;
|
309
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
310
|
-
const scopeId2 = addStyle(
|
311
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
312
|
-
cmpMeta);
|
313
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
314
|
-
elm["s-sc"] = scopeId2;
|
315
|
-
elm.classList.add(scopeId2 + "-h");
|
316
|
-
}
|
317
|
-
endAttachStyles();
|
318
|
-
};
|
319
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
320
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
321
|
-
if (oldValue !== newValue) {
|
322
|
-
let isProp = isMemberInElement(elm, memberName);
|
323
|
-
let ln = memberName.toLowerCase();
|
324
|
-
if (memberName === "class") {
|
325
|
-
const classList = elm.classList;
|
326
|
-
const oldClasses = parseClassList(oldValue);
|
327
|
-
const newClasses = parseClassList(newValue);
|
328
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
329
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
330
|
-
} else if (memberName === "style") {
|
331
|
-
{
|
332
|
-
for (const prop in oldValue) {
|
333
|
-
if (!newValue || newValue[prop] == null) {
|
334
|
-
if (prop.includes("-")) {
|
335
|
-
elm.style.removeProperty(prop);
|
336
|
-
} else {
|
337
|
-
elm.style[prop] = "";
|
338
|
-
}
|
339
|
-
}
|
340
|
-
}
|
341
|
-
}
|
342
|
-
for (const prop in newValue) {
|
343
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
344
|
-
if (prop.includes("-")) {
|
345
|
-
elm.style.setProperty(prop, newValue[prop]);
|
346
|
-
} else {
|
347
|
-
elm.style[prop] = newValue[prop];
|
348
|
-
}
|
349
|
-
}
|
350
|
-
}
|
351
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
352
|
-
if (newValue) {
|
353
|
-
newValue(elm);
|
354
|
-
}
|
355
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
356
|
-
if (memberName[2] === "-") {
|
357
|
-
memberName = memberName.slice(3);
|
358
|
-
} else if (isMemberInElement(win, ln)) {
|
359
|
-
memberName = ln.slice(2);
|
360
|
-
} else {
|
361
|
-
memberName = ln[2] + memberName.slice(3);
|
362
|
-
}
|
363
|
-
if (oldValue || newValue) {
|
364
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
365
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
366
|
-
if (oldValue) {
|
367
|
-
plt.rel(elm, memberName, oldValue, capture);
|
368
|
-
}
|
369
|
-
if (newValue) {
|
370
|
-
plt.ael(elm, memberName, newValue, capture);
|
371
|
-
}
|
372
|
-
}
|
373
|
-
} else {
|
374
|
-
const isComplex = isComplexType(newValue);
|
375
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
376
|
-
try {
|
377
|
-
if (!elm.tagName.includes("-")) {
|
378
|
-
const n = newValue == null ? "" : newValue;
|
379
|
-
if (memberName === "list") {
|
380
|
-
isProp = false;
|
381
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
382
|
-
elm[memberName] = n;
|
383
|
-
}
|
384
|
-
} else {
|
385
|
-
elm[memberName] = newValue;
|
386
|
-
}
|
387
|
-
} catch (e) {
|
388
|
-
}
|
389
|
-
}
|
390
|
-
if (newValue == null || newValue === false) {
|
391
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
392
|
-
{
|
393
|
-
elm.removeAttribute(memberName);
|
394
|
-
}
|
395
|
-
}
|
396
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
397
|
-
newValue = newValue === true ? "" : newValue;
|
398
|
-
{
|
399
|
-
elm.setAttribute(memberName, newValue);
|
400
|
-
}
|
401
|
-
}
|
402
|
-
}
|
403
|
-
}
|
404
|
-
};
|
405
|
-
var parseClassListRegex = /\s/;
|
406
|
-
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
407
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
408
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
409
|
-
|
410
|
-
// src/runtime/vdom/update-element.ts
|
411
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
412
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
413
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
414
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
415
|
-
{
|
416
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
417
|
-
if (!(memberName in newVnodeAttrs)) {
|
418
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
419
|
-
}
|
420
|
-
}
|
421
|
-
}
|
422
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
423
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
424
|
-
}
|
425
|
-
};
|
426
|
-
function sortedAttrNames(attrNames) {
|
427
|
-
return attrNames.includes("ref") ? (
|
428
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
429
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
430
|
-
) : (
|
431
|
-
// no need to sort, return the original array
|
432
|
-
attrNames
|
433
|
-
);
|
434
|
-
}
|
435
|
-
|
436
|
-
// src/runtime/vdom/vdom-render.ts
|
437
|
-
var scopeId;
|
438
|
-
var hostTagName;
|
439
|
-
var useNativeShadowDom = false;
|
440
|
-
var isSvgMode = false;
|
441
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
442
|
-
const newVNode2 = newParentVNode.$children$[childIndex];
|
443
|
-
let i2 = 0;
|
444
|
-
let elm;
|
445
|
-
let childNode;
|
446
|
-
if (newVNode2.$text$ !== null) {
|
447
|
-
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
448
|
-
} else {
|
449
|
-
if (!isSvgMode) {
|
450
|
-
isSvgMode = newVNode2.$tag$ === "svg";
|
451
|
-
}
|
452
|
-
elm = newVNode2.$elm$ = doc.createElementNS(
|
453
|
-
isSvgMode ? SVG_NS : HTML_NS,
|
454
|
-
newVNode2.$tag$
|
455
|
-
) ;
|
456
|
-
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
457
|
-
isSvgMode = false;
|
458
|
-
}
|
459
|
-
{
|
460
|
-
updateElement(null, newVNode2, isSvgMode);
|
461
|
-
}
|
462
|
-
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
463
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
464
|
-
}
|
465
|
-
if (newVNode2.$children$) {
|
466
|
-
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
467
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
468
|
-
if (childNode) {
|
469
|
-
elm.appendChild(childNode);
|
470
|
-
}
|
471
|
-
}
|
472
|
-
}
|
473
|
-
{
|
474
|
-
if (newVNode2.$tag$ === "svg") {
|
475
|
-
isSvgMode = false;
|
476
|
-
} else if (elm.tagName === "foreignObject") {
|
477
|
-
isSvgMode = true;
|
478
|
-
}
|
479
|
-
}
|
480
|
-
}
|
481
|
-
elm["s-hn"] = hostTagName;
|
482
|
-
return elm;
|
483
|
-
};
|
484
|
-
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
485
|
-
let containerElm = parentElm;
|
486
|
-
let childNode;
|
487
|
-
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
488
|
-
containerElm = containerElm.shadowRoot;
|
489
|
-
}
|
490
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
491
|
-
if (vnodes[startIdx]) {
|
492
|
-
childNode = createElm(null, parentVNode, startIdx);
|
493
|
-
if (childNode) {
|
494
|
-
vnodes[startIdx].$elm$ = childNode;
|
495
|
-
insertBefore(containerElm, childNode, before);
|
496
|
-
}
|
497
|
-
}
|
498
|
-
}
|
499
|
-
};
|
500
|
-
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
501
|
-
for (let index = startIdx; index <= endIdx; ++index) {
|
502
|
-
const vnode = vnodes[index];
|
503
|
-
if (vnode) {
|
504
|
-
const elm = vnode.$elm$;
|
505
|
-
nullifyVNodeRefs(vnode);
|
506
|
-
if (elm) {
|
507
|
-
elm.remove();
|
508
|
-
}
|
509
|
-
}
|
510
|
-
}
|
511
|
-
};
|
512
|
-
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
513
|
-
let oldStartIdx = 0;
|
514
|
-
let newStartIdx = 0;
|
515
|
-
let idxInOld = 0;
|
516
|
-
let i2 = 0;
|
517
|
-
let oldEndIdx = oldCh.length - 1;
|
518
|
-
let oldStartVnode = oldCh[0];
|
519
|
-
let oldEndVnode = oldCh[oldEndIdx];
|
520
|
-
let newEndIdx = newCh.length - 1;
|
521
|
-
let newStartVnode = newCh[0];
|
522
|
-
let newEndVnode = newCh[newEndIdx];
|
523
|
-
let node;
|
524
|
-
let elmToMove;
|
525
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
526
|
-
if (oldStartVnode == null) {
|
527
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
528
|
-
} else if (oldEndVnode == null) {
|
529
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
530
|
-
} else if (newStartVnode == null) {
|
531
|
-
newStartVnode = newCh[++newStartIdx];
|
532
|
-
} else if (newEndVnode == null) {
|
533
|
-
newEndVnode = newCh[--newEndIdx];
|
534
|
-
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
535
|
-
patch(oldStartVnode, newStartVnode, isInitialRender);
|
536
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
537
|
-
newStartVnode = newCh[++newStartIdx];
|
538
|
-
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
539
|
-
patch(oldEndVnode, newEndVnode, isInitialRender);
|
540
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
541
|
-
newEndVnode = newCh[--newEndIdx];
|
542
|
-
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
543
|
-
patch(oldStartVnode, newEndVnode, isInitialRender);
|
544
|
-
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
545
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
546
|
-
newEndVnode = newCh[--newEndIdx];
|
547
|
-
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
548
|
-
patch(oldEndVnode, newStartVnode, isInitialRender);
|
549
|
-
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
550
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
551
|
-
newStartVnode = newCh[++newStartIdx];
|
552
|
-
} else {
|
553
|
-
idxInOld = -1;
|
554
|
-
{
|
555
|
-
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
556
|
-
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
557
|
-
idxInOld = i2;
|
558
|
-
break;
|
559
|
-
}
|
560
|
-
}
|
561
|
-
}
|
562
|
-
if (idxInOld >= 0) {
|
563
|
-
elmToMove = oldCh[idxInOld];
|
564
|
-
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
565
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
566
|
-
} else {
|
567
|
-
patch(elmToMove, newStartVnode, isInitialRender);
|
568
|
-
oldCh[idxInOld] = void 0;
|
569
|
-
node = elmToMove.$elm$;
|
570
|
-
}
|
571
|
-
newStartVnode = newCh[++newStartIdx];
|
572
|
-
} else {
|
573
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
574
|
-
newStartVnode = newCh[++newStartIdx];
|
575
|
-
}
|
576
|
-
if (node) {
|
577
|
-
{
|
578
|
-
insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
579
|
-
}
|
580
|
-
}
|
581
|
-
}
|
582
|
-
}
|
583
|
-
if (oldStartIdx > oldEndIdx) {
|
584
|
-
addVnodes(
|
585
|
-
parentElm,
|
586
|
-
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
587
|
-
newVNode2,
|
588
|
-
newCh,
|
589
|
-
newStartIdx,
|
590
|
-
newEndIdx
|
591
|
-
);
|
592
|
-
} else if (newStartIdx > newEndIdx) {
|
593
|
-
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
594
|
-
}
|
595
|
-
};
|
596
|
-
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
597
|
-
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
598
|
-
if (!isInitialRender) {
|
599
|
-
return leftVNode.$key$ === rightVNode.$key$;
|
600
|
-
}
|
601
|
-
return true;
|
602
|
-
}
|
603
|
-
return false;
|
604
|
-
};
|
605
|
-
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
606
|
-
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
607
|
-
const oldChildren = oldVNode.$children$;
|
608
|
-
const newChildren = newVNode2.$children$;
|
609
|
-
const tag = newVNode2.$tag$;
|
610
|
-
const text = newVNode2.$text$;
|
611
|
-
if (text === null) {
|
612
|
-
{
|
613
|
-
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
614
|
-
}
|
615
|
-
{
|
616
|
-
if (tag === "slot" && !useNativeShadowDom) ; else {
|
617
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
618
|
-
}
|
619
|
-
}
|
620
|
-
if (oldChildren !== null && newChildren !== null) {
|
621
|
-
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
622
|
-
} else if (newChildren !== null) {
|
623
|
-
if (oldVNode.$text$ !== null) {
|
624
|
-
elm.textContent = "";
|
625
|
-
}
|
626
|
-
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
627
|
-
} else if (oldChildren !== null) {
|
628
|
-
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
629
|
-
}
|
630
|
-
if (isSvgMode && tag === "svg") {
|
631
|
-
isSvgMode = false;
|
632
|
-
}
|
633
|
-
} else if (oldVNode.$text$ !== text) {
|
634
|
-
elm.data = text;
|
635
|
-
}
|
636
|
-
};
|
637
|
-
var nullifyVNodeRefs = (vNode) => {
|
638
|
-
{
|
639
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
640
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
641
|
-
}
|
642
|
-
};
|
643
|
-
var insertBefore = (parent, newNode, reference) => {
|
644
|
-
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
645
|
-
return inserted;
|
646
|
-
};
|
647
|
-
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
648
|
-
const hostElm = hostRef.$hostElement$;
|
649
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
650
|
-
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
651
|
-
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
652
|
-
hostTagName = hostElm.tagName;
|
653
|
-
if (cmpMeta.$attrsToReflect$) {
|
654
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
655
|
-
cmpMeta.$attrsToReflect$.map(
|
656
|
-
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
657
|
-
);
|
658
|
-
}
|
659
|
-
if (isInitialLoad && rootVnode.$attrs$) {
|
660
|
-
for (const key of Object.keys(rootVnode.$attrs$)) {
|
661
|
-
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
662
|
-
rootVnode.$attrs$[key] = hostElm[key];
|
663
|
-
}
|
664
|
-
}
|
665
|
-
}
|
666
|
-
rootVnode.$tag$ = null;
|
667
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
668
|
-
hostRef.$vnode$ = rootVnode;
|
669
|
-
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
670
|
-
{
|
671
|
-
scopeId = hostElm["s-sc"];
|
672
|
-
}
|
673
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
674
|
-
patch(oldVNode, rootVnode, isInitialLoad);
|
675
|
-
};
|
676
|
-
|
677
|
-
// src/runtime/update-component.ts
|
678
|
-
var attachToAncestor = (hostRef, ancestorComponent) => {
|
679
|
-
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
680
|
-
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
681
|
-
}
|
682
|
-
};
|
683
|
-
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
684
|
-
{
|
685
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
686
|
-
}
|
687
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
688
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
689
|
-
return;
|
690
|
-
}
|
691
|
-
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
692
|
-
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
693
|
-
return writeTask(dispatch) ;
|
694
|
-
};
|
695
|
-
var dispatchHooks = (hostRef, isInitialLoad) => {
|
696
|
-
const elm = hostRef.$hostElement$;
|
697
|
-
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
698
|
-
const instance = hostRef.$lazyInstance$ ;
|
699
|
-
if (!instance) {
|
700
|
-
throw new Error(
|
701
|
-
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
702
|
-
);
|
703
|
-
}
|
704
|
-
let maybePromise;
|
705
|
-
if (isInitialLoad) {
|
706
|
-
{
|
707
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
708
|
-
if (hostRef.$queuedListeners$) {
|
709
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
710
|
-
hostRef.$queuedListeners$ = void 0;
|
711
|
-
}
|
712
|
-
}
|
713
|
-
{
|
714
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
715
|
-
}
|
716
|
-
}
|
717
|
-
{
|
718
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
719
|
-
}
|
720
|
-
endSchedule();
|
721
|
-
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
722
|
-
};
|
723
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
724
|
-
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
725
|
-
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
726
|
-
var _a;
|
727
|
-
const elm = hostRef.$hostElement$;
|
728
|
-
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
729
|
-
const rc = elm["s-rc"];
|
730
|
-
if (isInitialLoad) {
|
731
|
-
attachStyles(hostRef);
|
732
|
-
}
|
733
|
-
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
734
|
-
{
|
735
|
-
callRender(hostRef, instance, elm, isInitialLoad);
|
736
|
-
}
|
737
|
-
if (rc) {
|
738
|
-
rc.map((cb) => cb());
|
739
|
-
elm["s-rc"] = void 0;
|
740
|
-
}
|
741
|
-
endRender();
|
742
|
-
endUpdate();
|
743
|
-
{
|
744
|
-
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
745
|
-
const postUpdate = () => postUpdateComponent(hostRef);
|
746
|
-
if (childrenPromises.length === 0) {
|
747
|
-
postUpdate();
|
748
|
-
} else {
|
749
|
-
Promise.all(childrenPromises).then(postUpdate);
|
750
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
751
|
-
childrenPromises.length = 0;
|
752
|
-
}
|
753
|
-
}
|
754
|
-
};
|
755
|
-
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
756
|
-
try {
|
757
|
-
instance = instance.render() ;
|
758
|
-
{
|
759
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
760
|
-
}
|
761
|
-
{
|
762
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
763
|
-
}
|
764
|
-
{
|
765
|
-
{
|
766
|
-
{
|
767
|
-
renderVdom(hostRef, instance, isInitialLoad);
|
768
|
-
}
|
769
|
-
}
|
770
|
-
}
|
771
|
-
} catch (e) {
|
772
|
-
consoleError(e, hostRef.$hostElement$);
|
773
|
-
}
|
774
|
-
return null;
|
775
|
-
};
|
776
|
-
var postUpdateComponent = (hostRef) => {
|
777
|
-
const tagName = hostRef.$cmpMeta$.$tagName$;
|
778
|
-
const elm = hostRef.$hostElement$;
|
779
|
-
const endPostUpdate = createTime("postUpdate", tagName);
|
780
|
-
const instance = hostRef.$lazyInstance$ ;
|
781
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
782
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
783
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
784
|
-
{
|
785
|
-
addHydratedFlag(elm);
|
786
|
-
}
|
787
|
-
{
|
788
|
-
safeCall(instance, "componentDidLoad");
|
789
|
-
}
|
790
|
-
endPostUpdate();
|
791
|
-
{
|
792
|
-
hostRef.$onReadyResolve$(elm);
|
793
|
-
if (!ancestorComponent) {
|
794
|
-
appDidLoad();
|
795
|
-
}
|
796
|
-
}
|
797
|
-
} else {
|
798
|
-
endPostUpdate();
|
799
|
-
}
|
800
|
-
{
|
801
|
-
hostRef.$onInstanceResolve$(elm);
|
802
|
-
}
|
803
|
-
{
|
804
|
-
if (hostRef.$onRenderResolve$) {
|
805
|
-
hostRef.$onRenderResolve$();
|
806
|
-
hostRef.$onRenderResolve$ = void 0;
|
807
|
-
}
|
808
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
809
|
-
nextTick(() => scheduleUpdate(hostRef, false));
|
810
|
-
}
|
811
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
812
|
-
}
|
813
|
-
};
|
814
|
-
var forceUpdate = (ref) => {
|
815
|
-
{
|
816
|
-
const hostRef = getHostRef(ref);
|
817
|
-
const isConnected = hostRef.$hostElement$.isConnected;
|
818
|
-
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
819
|
-
scheduleUpdate(hostRef, false);
|
820
|
-
}
|
821
|
-
return isConnected;
|
822
|
-
}
|
823
|
-
};
|
824
|
-
var appDidLoad = (who) => {
|
825
|
-
{
|
826
|
-
addHydratedFlag(doc.documentElement);
|
827
|
-
}
|
828
|
-
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
829
|
-
};
|
830
|
-
var safeCall = (instance, method, arg) => {
|
831
|
-
if (instance && instance[method]) {
|
832
|
-
try {
|
833
|
-
return instance[method](arg);
|
834
|
-
} catch (e) {
|
835
|
-
consoleError(e);
|
836
|
-
}
|
837
|
-
}
|
838
|
-
return void 0;
|
839
|
-
};
|
840
|
-
var addHydratedFlag = (elm) => {
|
841
|
-
var _a;
|
842
|
-
return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
|
843
|
-
};
|
844
|
-
|
845
|
-
// src/runtime/set-value.ts
|
846
|
-
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
847
|
-
var setValue = (ref, propName, newVal, cmpMeta) => {
|
848
|
-
const hostRef = getHostRef(ref);
|
849
|
-
if (!hostRef) {
|
850
|
-
throw new Error(
|
851
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
852
|
-
);
|
853
|
-
}
|
854
|
-
const elm = hostRef.$hostElement$ ;
|
855
|
-
const oldVal = hostRef.$instanceValues$.get(propName);
|
856
|
-
const flags = hostRef.$flags$;
|
857
|
-
const instance = hostRef.$lazyInstance$ ;
|
858
|
-
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
859
|
-
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
860
|
-
const didValueChange = newVal !== oldVal && !areBothNaN;
|
861
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
862
|
-
hostRef.$instanceValues$.set(propName, newVal);
|
863
|
-
if (instance) {
|
864
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
865
|
-
const watchMethods = cmpMeta.$watchers$[propName];
|
866
|
-
if (watchMethods) {
|
867
|
-
watchMethods.map((watchMethodName) => {
|
868
|
-
try {
|
869
|
-
instance[watchMethodName](newVal, oldVal, propName);
|
870
|
-
} catch (e) {
|
871
|
-
consoleError(e, elm);
|
872
|
-
}
|
873
|
-
});
|
874
|
-
}
|
875
|
-
}
|
876
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
877
|
-
scheduleUpdate(hostRef, false);
|
878
|
-
}
|
879
|
-
}
|
880
|
-
}
|
881
|
-
};
|
882
|
-
|
883
|
-
// src/runtime/proxy-component.ts
|
884
|
-
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
885
|
-
var _a;
|
886
|
-
const prototype = Cstr.prototype;
|
887
|
-
if (cmpMeta.$members$) {
|
888
|
-
if (Cstr.watchers) {
|
889
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
890
|
-
}
|
891
|
-
const members = Object.entries(cmpMeta.$members$);
|
892
|
-
members.map(([memberName, [memberFlags]]) => {
|
893
|
-
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
894
|
-
Object.defineProperty(prototype, memberName, {
|
895
|
-
get() {
|
896
|
-
return getValue(this, memberName);
|
897
|
-
},
|
898
|
-
set(newValue) {
|
899
|
-
setValue(this, memberName, newValue, cmpMeta);
|
900
|
-
},
|
901
|
-
configurable: true,
|
902
|
-
enumerable: true
|
903
|
-
});
|
904
|
-
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
905
|
-
Object.defineProperty(prototype, memberName, {
|
906
|
-
value(...args) {
|
907
|
-
var _a2;
|
908
|
-
const ref = getHostRef(this);
|
909
|
-
return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
|
910
|
-
var _a3;
|
911
|
-
return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
|
912
|
-
});
|
913
|
-
}
|
914
|
-
});
|
915
|
-
}
|
916
|
-
});
|
917
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
918
|
-
const attrNameToPropName = /* @__PURE__ */ new Map();
|
919
|
-
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
920
|
-
plt.jmp(() => {
|
921
|
-
var _a2;
|
922
|
-
const propName = attrNameToPropName.get(attrName);
|
923
|
-
if (this.hasOwnProperty(propName)) {
|
924
|
-
newValue = this[propName];
|
925
|
-
delete this[propName];
|
926
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
927
|
-
return;
|
928
|
-
} else if (propName == null) {
|
929
|
-
const hostRef = getHostRef(this);
|
930
|
-
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
931
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
932
|
-
const instance = hostRef.$lazyInstance$ ;
|
933
|
-
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
934
|
-
entry == null ? void 0 : entry.forEach((callbackName) => {
|
935
|
-
if (instance[callbackName] != null) {
|
936
|
-
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
937
|
-
}
|
938
|
-
});
|
939
|
-
}
|
940
|
-
return;
|
941
|
-
}
|
942
|
-
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
943
|
-
});
|
944
|
-
};
|
945
|
-
Cstr.observedAttributes = Array.from(
|
946
|
-
/* @__PURE__ */ new Set([
|
947
|
-
...Object.keys((_a = cmpMeta.$watchers$) != null ? _a : {}),
|
948
|
-
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
949
|
-
var _a2;
|
950
|
-
const attrName = m[1] || propName;
|
951
|
-
attrNameToPropName.set(attrName, propName);
|
952
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
953
|
-
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
954
|
-
}
|
955
|
-
return attrName;
|
956
|
-
})
|
957
|
-
])
|
958
|
-
);
|
959
|
-
}
|
960
|
-
}
|
961
|
-
return Cstr;
|
962
|
-
};
|
963
|
-
|
964
|
-
// src/runtime/initialize-component.ts
|
965
|
-
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
966
|
-
let Cstr;
|
967
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
968
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
969
|
-
const bundleId = cmpMeta.$lazyBundleId$;
|
970
|
-
if (bundleId) {
|
971
|
-
const CstrImport = loadModule(cmpMeta);
|
972
|
-
if (CstrImport && "then" in CstrImport) {
|
973
|
-
const endLoad = uniqueTime();
|
974
|
-
Cstr = await CstrImport;
|
975
|
-
endLoad();
|
976
|
-
} else {
|
977
|
-
Cstr = CstrImport;
|
978
|
-
}
|
979
|
-
if (!Cstr) {
|
980
|
-
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
981
|
-
}
|
982
|
-
if (!Cstr.isProxied) {
|
983
|
-
{
|
984
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
985
|
-
}
|
986
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
987
|
-
Cstr.isProxied = true;
|
988
|
-
}
|
989
|
-
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
990
|
-
{
|
991
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
992
|
-
}
|
993
|
-
try {
|
994
|
-
new Cstr(hostRef);
|
995
|
-
} catch (e) {
|
996
|
-
consoleError(e);
|
997
|
-
}
|
998
|
-
{
|
999
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
1000
|
-
}
|
1001
|
-
{
|
1002
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
1003
|
-
}
|
1004
|
-
endNewInstance();
|
1005
|
-
} else {
|
1006
|
-
Cstr = elm.constructor;
|
1007
|
-
const cmpTag = elm.localName;
|
1008
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
1009
|
-
}
|
1010
|
-
if (Cstr && Cstr.style) {
|
1011
|
-
let style = Cstr.style;
|
1012
|
-
const scopeId2 = getScopeId(cmpMeta);
|
1013
|
-
if (!styles.has(scopeId2)) {
|
1014
|
-
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
1015
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
1016
|
-
endRegisterStyles();
|
1017
|
-
}
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
1021
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
1022
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
1023
|
-
ancestorComponent["s-rc"].push(schedule);
|
1024
|
-
} else {
|
1025
|
-
schedule();
|
1026
|
-
}
|
1027
|
-
};
|
1028
|
-
var fireConnectedCallback = (instance) => {
|
1029
|
-
};
|
1030
|
-
|
1031
|
-
// src/runtime/connected-callback.ts
|
1032
|
-
var connectedCallback = (elm) => {
|
1033
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
1034
|
-
const hostRef = getHostRef(elm);
|
1035
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
1036
|
-
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
1037
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
1038
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
1039
|
-
{
|
1040
|
-
let ancestorComponent = elm;
|
1041
|
-
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
1042
|
-
if (ancestorComponent["s-p"]) {
|
1043
|
-
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
1044
|
-
break;
|
1045
|
-
}
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
if (cmpMeta.$members$) {
|
1049
|
-
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
1050
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
1051
|
-
const value = elm[memberName];
|
1052
|
-
delete elm[memberName];
|
1053
|
-
elm[memberName] = value;
|
1054
|
-
}
|
1055
|
-
});
|
1056
|
-
}
|
1057
|
-
{
|
1058
|
-
initializeComponent(elm, hostRef, cmpMeta);
|
1059
|
-
}
|
1060
|
-
} else {
|
1061
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
1062
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
1063
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
1064
|
-
}
|
1065
|
-
}
|
1066
|
-
endConnected();
|
1067
|
-
}
|
1068
|
-
};
|
1069
|
-
var disconnectInstance = (instance) => {
|
1070
|
-
{
|
1071
|
-
safeCall(instance, "disconnectedCallback");
|
1072
|
-
}
|
1073
|
-
};
|
1074
|
-
var disconnectedCallback = async (elm) => {
|
1075
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
1076
|
-
const hostRef = getHostRef(elm);
|
1077
|
-
{
|
1078
|
-
if (hostRef.$rmListeners$) {
|
1079
|
-
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
1080
|
-
hostRef.$rmListeners$ = void 0;
|
1081
|
-
}
|
1082
|
-
}
|
1083
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
1084
|
-
disconnectInstance(hostRef.$lazyInstance$);
|
1085
|
-
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
1086
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
1087
|
-
}
|
1088
|
-
}
|
1089
|
-
};
|
1090
|
-
|
1091
|
-
// src/runtime/bootstrap-lazy.ts
|
1092
|
-
var bootstrapLazy = (lazyBundles, options = {}) => {
|
1093
|
-
var _a;
|
1094
|
-
const endBootstrap = createTime();
|
1095
|
-
const cmpTags = [];
|
1096
|
-
const exclude = options.exclude || [];
|
1097
|
-
const customElements2 = win.customElements;
|
1098
|
-
const head = doc.head;
|
1099
|
-
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
1100
|
-
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
1101
|
-
const deferredConnectedCallbacks = [];
|
1102
|
-
let appLoadFallback;
|
1103
|
-
let isBootstrapping = true;
|
1104
|
-
Object.assign(plt, options);
|
1105
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
1106
|
-
let hasSlotRelocation = false;
|
1107
|
-
lazyBundles.map((lazyBundle) => {
|
1108
|
-
lazyBundle[1].map((compactMeta) => {
|
1109
|
-
var _a2;
|
1110
|
-
const cmpMeta = {
|
1111
|
-
$flags$: compactMeta[0],
|
1112
|
-
$tagName$: compactMeta[1],
|
1113
|
-
$members$: compactMeta[2],
|
1114
|
-
$listeners$: compactMeta[3]
|
1115
|
-
};
|
1116
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
1117
|
-
hasSlotRelocation = true;
|
1118
|
-
}
|
1119
|
-
{
|
1120
|
-
cmpMeta.$members$ = compactMeta[2];
|
1121
|
-
}
|
1122
|
-
{
|
1123
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
1124
|
-
}
|
1125
|
-
{
|
1126
|
-
cmpMeta.$attrsToReflect$ = [];
|
1127
|
-
}
|
1128
|
-
{
|
1129
|
-
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
1130
|
-
}
|
1131
|
-
const tagName = cmpMeta.$tagName$;
|
1132
|
-
const HostElement = class extends HTMLElement {
|
1133
|
-
// StencilLazyHost
|
1134
|
-
constructor(self) {
|
1135
|
-
super(self);
|
1136
|
-
self = this;
|
1137
|
-
registerHost(self, cmpMeta);
|
1138
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
1139
|
-
{
|
1140
|
-
{
|
1141
|
-
self.attachShadow({ mode: "open" });
|
1142
|
-
}
|
1143
|
-
}
|
1144
|
-
}
|
1145
|
-
}
|
1146
|
-
connectedCallback() {
|
1147
|
-
if (appLoadFallback) {
|
1148
|
-
clearTimeout(appLoadFallback);
|
1149
|
-
appLoadFallback = null;
|
1150
|
-
}
|
1151
|
-
if (isBootstrapping) {
|
1152
|
-
deferredConnectedCallbacks.push(this);
|
1153
|
-
} else {
|
1154
|
-
plt.jmp(() => connectedCallback(this));
|
1155
|
-
}
|
1156
|
-
}
|
1157
|
-
disconnectedCallback() {
|
1158
|
-
plt.jmp(() => disconnectedCallback(this));
|
1159
|
-
}
|
1160
|
-
componentOnReady() {
|
1161
|
-
return getHostRef(this).$onReadyPromise$;
|
1162
|
-
}
|
1163
|
-
};
|
1164
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
1165
|
-
if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
|
1166
|
-
cmpTags.push(tagName);
|
1167
|
-
customElements2.define(
|
1168
|
-
tagName,
|
1169
|
-
proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
|
1170
|
-
);
|
1171
|
-
}
|
1172
|
-
});
|
1173
|
-
});
|
1174
|
-
if (cmpTags.length > 0) {
|
1175
|
-
if (hasSlotRelocation) {
|
1176
|
-
dataStyles.textContent += SLOT_FB_CSS;
|
1177
|
-
}
|
1178
|
-
{
|
1179
|
-
dataStyles.textContent += cmpTags + HYDRATED_CSS;
|
1180
|
-
}
|
1181
|
-
if (dataStyles.innerHTML.length) {
|
1182
|
-
dataStyles.setAttribute("data-styles", "");
|
1183
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
1184
|
-
if (nonce != null) {
|
1185
|
-
dataStyles.setAttribute("nonce", nonce);
|
1186
|
-
}
|
1187
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
1188
|
-
}
|
1189
|
-
}
|
1190
|
-
isBootstrapping = false;
|
1191
|
-
if (deferredConnectedCallbacks.length) {
|
1192
|
-
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
1193
|
-
} else {
|
1194
|
-
{
|
1195
|
-
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
endBootstrap();
|
1199
|
-
};
|
1200
|
-
|
1201
|
-
// src/runtime/fragment.ts
|
1202
|
-
var Fragment = (_, children) => children;
|
1203
|
-
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
1204
|
-
if (listeners) {
|
1205
|
-
listeners.map(([flags, name, method]) => {
|
1206
|
-
const target = getHostListenerTarget(elm, flags) ;
|
1207
|
-
const handler = hostListenerProxy(hostRef, method);
|
1208
|
-
const opts = hostListenerOpts(flags);
|
1209
|
-
plt.ael(target, name, handler, opts);
|
1210
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
1211
|
-
});
|
1212
|
-
}
|
1213
|
-
};
|
1214
|
-
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
1215
|
-
var _a;
|
1216
|
-
try {
|
1217
|
-
{
|
1218
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
1219
|
-
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
1220
|
-
} else {
|
1221
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
1222
|
-
}
|
1223
|
-
}
|
1224
|
-
} catch (e) {
|
1225
|
-
consoleError(e);
|
1226
|
-
}
|
1227
|
-
};
|
1228
|
-
var getHostListenerTarget = (elm, flags) => {
|
1229
|
-
if (flags & 8 /* TargetWindow */) return win;
|
1230
|
-
return elm;
|
1231
|
-
};
|
1232
|
-
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
1233
|
-
passive: (flags & 1 /* Passive */) !== 0,
|
1234
|
-
capture: (flags & 2 /* Capture */) !== 0
|
1235
|
-
} : (flags & 2 /* Capture */) !== 0;
|
1236
|
-
|
1237
|
-
// src/runtime/nonce.ts
|
1238
|
-
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
1239
|
-
|
1240
|
-
// src/client/client-host-ref.ts
|
1241
|
-
var hostRefs = /* @__PURE__ */ new WeakMap();
|
1242
|
-
var getHostRef = (ref) => hostRefs.get(ref);
|
1243
|
-
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
1244
|
-
var registerHost = (hostElement, cmpMeta) => {
|
1245
|
-
const hostRef = {
|
1246
|
-
$flags$: 0,
|
1247
|
-
$hostElement$: hostElement,
|
1248
|
-
$cmpMeta$: cmpMeta,
|
1249
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
1250
|
-
};
|
1251
|
-
{
|
1252
|
-
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
1253
|
-
}
|
1254
|
-
{
|
1255
|
-
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
1256
|
-
hostElement["s-p"] = [];
|
1257
|
-
hostElement["s-rc"] = [];
|
1258
|
-
}
|
1259
|
-
addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
|
1260
|
-
return hostRefs.set(hostElement, hostRef);
|
1261
|
-
};
|
1262
|
-
var isMemberInElement = (elm, memberName) => memberName in elm;
|
1263
|
-
var consoleError = (e, el) => (0, console.error)(e, el);
|
1264
|
-
|
1265
|
-
// src/client/client-load-module.ts
|
1266
|
-
var cmpModules = /* @__PURE__ */ new Map();
|
1267
|
-
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
1268
|
-
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
1269
|
-
const bundleId = cmpMeta.$lazyBundleId$;
|
1270
|
-
if (!bundleId) {
|
1271
|
-
return void 0;
|
1272
|
-
}
|
1273
|
-
const module = cmpModules.get(bundleId) ;
|
1274
|
-
if (module) {
|
1275
|
-
return module[exportName];
|
1276
|
-
}
|
1277
|
-
|
1278
|
-
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
1279
|
-
const processMod = importedModule => {
|
1280
|
-
cmpModules.set(bundleId, importedModule);
|
1281
|
-
return importedModule[exportName];
|
1282
|
-
}
|
1283
|
-
switch(bundleId) {
|
1284
|
-
|
1285
|
-
case 'cpsl-alert_33.cjs':
|
1286
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1287
|
-
/* webpackMode: "lazy" */
|
1288
|
-
'./cpsl-alert_33.cjs.entry.js')); }).then(processMod, consoleError);
|
1289
|
-
case 'cpsl-animation.cjs':
|
1290
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1291
|
-
/* webpackMode: "lazy" */
|
1292
|
-
'./cpsl-animation.cjs.entry.js')); }).then(processMod, consoleError);
|
1293
|
-
case 'cpsl-col.cjs':
|
1294
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1295
|
-
/* webpackMode: "lazy" */
|
1296
|
-
'./cpsl-col.cjs.entry.js')); }).then(processMod, consoleError);
|
1297
|
-
case 'cpsl-grid.cjs':
|
1298
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1299
|
-
/* webpackMode: "lazy" */
|
1300
|
-
'./cpsl-grid.cjs.entry.js')); }).then(processMod, consoleError);
|
1301
|
-
case 'cpsl-info-box.cjs':
|
1302
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1303
|
-
/* webpackMode: "lazy" */
|
1304
|
-
'./cpsl-info-box.cjs.entry.js')); }).then(processMod, consoleError);
|
1305
|
-
case 'cpsl-modal-v2.cjs':
|
1306
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1307
|
-
/* webpackMode: "lazy" */
|
1308
|
-
'./cpsl-modal-v2.cjs.entry.js')); }).then(processMod, consoleError);
|
1309
|
-
case 'cpsl-row.cjs':
|
1310
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1311
|
-
/* webpackMode: "lazy" */
|
1312
|
-
'./cpsl-row.cjs.entry.js')); }).then(processMod, consoleError);
|
1313
|
-
}
|
1314
|
-
}
|
1315
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
1316
|
-
/* @vite-ignore */
|
1317
|
-
/* webpackInclude: /\.entry\.js$/ */
|
1318
|
-
/* webpackExclude: /\.system\.entry\.js$/ */
|
1319
|
-
/* webpackMode: "lazy" */
|
1320
|
-
`./${bundleId}.entry.js${""}`
|
1321
|
-
)); }).then((importedModule) => {
|
1322
|
-
{
|
1323
|
-
cmpModules.set(bundleId, importedModule);
|
1324
|
-
}
|
1325
|
-
return importedModule[exportName];
|
1326
|
-
}, consoleError);
|
1327
|
-
};
|
1328
|
-
|
1329
|
-
// src/client/client-style.ts
|
1330
|
-
var styles = /* @__PURE__ */ new Map();
|
1331
|
-
var win = typeof window !== "undefined" ? window : {};
|
1332
|
-
var doc = win.document || { head: {} };
|
1333
|
-
var plt = {
|
1334
|
-
$flags$: 0,
|
1335
|
-
$resourcesUrl$: "",
|
1336
|
-
jmp: (h2) => h2(),
|
1337
|
-
raf: (h2) => requestAnimationFrame(h2),
|
1338
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
1339
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
1340
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
1341
|
-
};
|
1342
|
-
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
1343
|
-
let supportsListenerOptions2 = false;
|
1344
|
-
try {
|
1345
|
-
doc.addEventListener(
|
1346
|
-
"e",
|
1347
|
-
null,
|
1348
|
-
Object.defineProperty({}, "passive", {
|
1349
|
-
get() {
|
1350
|
-
supportsListenerOptions2 = true;
|
1351
|
-
}
|
1352
|
-
})
|
1353
|
-
);
|
1354
|
-
} catch (e) {
|
1355
|
-
}
|
1356
|
-
return supportsListenerOptions2;
|
1357
|
-
})();
|
1358
|
-
var promiseResolve = (v) => Promise.resolve(v);
|
1359
|
-
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
1360
|
-
try {
|
1361
|
-
new CSSStyleSheet();
|
1362
|
-
return typeof new CSSStyleSheet().replaceSync === "function";
|
1363
|
-
} catch (e) {
|
1364
|
-
}
|
1365
|
-
return false;
|
1366
|
-
})() ;
|
1367
|
-
var queuePending = false;
|
1368
|
-
var queueDomReads = [];
|
1369
|
-
var queueDomWrites = [];
|
1370
|
-
var queueTask = (queue, write) => (cb) => {
|
1371
|
-
queue.push(cb);
|
1372
|
-
if (!queuePending) {
|
1373
|
-
queuePending = true;
|
1374
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
1375
|
-
nextTick(flush);
|
1376
|
-
} else {
|
1377
|
-
plt.raf(flush);
|
1378
|
-
}
|
1379
|
-
}
|
1380
|
-
};
|
1381
|
-
var consume = (queue) => {
|
1382
|
-
for (let i2 = 0; i2 < queue.length; i2++) {
|
1383
|
-
try {
|
1384
|
-
queue[i2](performance.now());
|
1385
|
-
} catch (e) {
|
1386
|
-
consoleError(e);
|
1387
|
-
}
|
1388
|
-
}
|
1389
|
-
queue.length = 0;
|
1390
|
-
};
|
1391
|
-
var flush = () => {
|
1392
|
-
consume(queueDomReads);
|
1393
|
-
{
|
1394
|
-
consume(queueDomWrites);
|
1395
|
-
if (queuePending = queueDomReads.length > 0) {
|
1396
|
-
plt.raf(flush);
|
1397
|
-
}
|
1398
|
-
}
|
1399
|
-
};
|
1400
|
-
var nextTick = (cb) => promiseResolve().then(cb);
|
1401
|
-
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
1402
|
-
|
1403
|
-
exports.Fragment = Fragment;
|
1404
|
-
exports.Host = Host;
|
1405
|
-
exports.bootstrapLazy = bootstrapLazy;
|
1406
|
-
exports.createEvent = createEvent;
|
1407
|
-
exports.forceUpdate = forceUpdate;
|
1408
|
-
exports.getElement = getElement;
|
1409
|
-
exports.h = h;
|
1410
|
-
exports.promiseResolve = promiseResolve;
|
1411
|
-
exports.registerInstance = registerInstance;
|
1412
|
-
exports.setNonce = setNonce;
|
1413
|
-
|
1414
|
-
//# sourceMappingURL=index-85125285.js.map
|