web-component-wrapper 0.0.578 → 0.0.580
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactWeb.d.ts +24 -22
- package/ReactWeb.js +1 -1
- package/ReactWebNext.js +1 -1
- package/Web.d.ts +44 -37
- package/Web.js +1 -1
- package/WebNext.js +1 -1
- package/index.js +1 -1
- package/indexNext.js +1 -1
- package/package.json +1 -1
package/Web.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AttributesReflectionConfiguration, CompiledDomNodeTemplateItem, Compile
|
|
|
3
3
|
export declare const log: Logger;
|
|
4
4
|
export declare const GenericHTMLElement: typeof HTMLElement;
|
|
5
5
|
/**
|
|
6
|
-
* Generic web component to render a content against instance
|
|
6
|
+
* Generic web component to render a content against instance-specific values.
|
|
7
7
|
* @property applyRootBinding - If determined itself as root declarative event
|
|
8
8
|
* and property bindings will be applied to itself.
|
|
9
9
|
* @property content - Content to render when changes happened.
|
|
@@ -14,25 +14,27 @@ export declare const GenericHTMLElement: typeof HTMLElement;
|
|
|
14
14
|
* @property observedAttributes - Attribute names to observe for changes.
|
|
15
15
|
* @property controllableProperties - A list of controllable property names.
|
|
16
16
|
* @property eventToPropertyMapping - Explicitly defined output events (a
|
|
17
|
-
* mapping of event names to a potential parameter to properties
|
|
17
|
+
* mapping of event names to a potential parameter to properties-transformer).
|
|
18
18
|
* @property propertyAliases - A mapping of property names to be treated as
|
|
19
19
|
* equal.
|
|
20
20
|
* @property propertyTypes - Configuration defining how to convert attributes
|
|
21
21
|
* into properties and reflect property changes back to attributes.
|
|
22
|
-
* @property propertiesToReflectAsAttributes - An
|
|
22
|
+
* @property propertiesToReflectAsAttributes - An Item, List, or Mapping of
|
|
23
23
|
* properties to reflect as attributes.
|
|
24
24
|
* @property renderProperties - List of known render properties.
|
|
25
25
|
* @property cloneSlots - Indicates whether to clone slot before to transclude
|
|
26
|
-
* content into them. If a slot should be used multiple times (for example
|
|
27
|
-
* it works as a template node) they should be copied to avoid unexpected
|
|
26
|
+
* content into them. If a slot should be used multiple times (for example,
|
|
27
|
+
* when it works as a template node.) they should be copied to avoid unexpected
|
|
28
28
|
* mutations.
|
|
29
|
+
* @property doRender - Configures whether this component instance should
|
|
30
|
+
* evaluate its given body content.
|
|
29
31
|
* @property evaluateSlots - Indicates whether to evaluate slot content when
|
|
30
32
|
* before rendering them.
|
|
31
33
|
* @property renderSlots - Indicates whether determined slots should be
|
|
32
34
|
* rendered into root node.
|
|
33
35
|
* @property trimSlots - Ignore empty text nodes while applying slots.
|
|
34
36
|
* @property renderUnsafe - Defines default render behavior.
|
|
35
|
-
* @property _name - Name to access instance
|
|
37
|
+
* @property _name - Name to access instance-evaluated content or used
|
|
36
38
|
* to derive default component name. This is also useful for logging.
|
|
37
39
|
* @property _propertyAliasIndex - Internal alias index to quickly match
|
|
38
40
|
* properties in both directions.
|
|
@@ -46,6 +48,8 @@ export declare const GenericHTMLElement: typeof HTMLElement;
|
|
|
46
48
|
* performing.
|
|
47
49
|
* @property renderState.resolve - Callback to trigger when rendering has been
|
|
48
50
|
* finished.
|
|
51
|
+
* @property childComponentInstances - List of direct child components (needed
|
|
52
|
+
* to wait for them to finish dom manipulation).
|
|
49
53
|
* @property batchAttributeUpdates - Indicates whether to directly update dom
|
|
50
54
|
* after each attribute mutation or to wait and batch mutations after current
|
|
51
55
|
* queue has been finished.
|
|
@@ -64,7 +68,7 @@ export declare const GenericHTMLElement: typeof HTMLElement;
|
|
|
64
68
|
* @property rootInstance - Root component instance.
|
|
65
69
|
* @property scope - Render scope.
|
|
66
70
|
* @property domNodeEventBindings - Holds a mapping from nodes with registered
|
|
67
|
-
* event handlers mapped to their
|
|
71
|
+
* event handlers mapped to their deregistration function.
|
|
68
72
|
* @property domNodeTemplateCache - Caches template compilation results.
|
|
69
73
|
* @property externalProperties - Holds currently evaluated or seen properties.
|
|
70
74
|
* @property ignoreAttributeUpdateObservations - Indicates whether attribute
|
|
@@ -73,16 +77,16 @@ export declare const GenericHTMLElement: typeof HTMLElement;
|
|
|
73
77
|
* are owned by this instance and should always be delegated.
|
|
74
78
|
* @property outputEventNames - Set of determined output event names.
|
|
75
79
|
* @property instance - Wrapped component instance.
|
|
76
|
-
* @property isRoot - Indicates whether their exists another web
|
|
80
|
+
* @property isRoot - Indicates whether their exists another web-derived
|
|
77
81
|
* component up the tree or not.
|
|
78
82
|
* @property root - Hosting dom node.
|
|
79
83
|
* @property runDomConnectionAndRenderingInSameEventQueue - Indicates whether
|
|
80
84
|
* we should render initial dom immediately after the component is connected to
|
|
81
85
|
* dom. Deactivating this allows wrapped components to detect their parents
|
|
82
|
-
* since their parent
|
|
86
|
+
* since their parent-connected callback will be called before the children's
|
|
83
87
|
* render method.
|
|
84
88
|
* @property self - Back-reference to this class.
|
|
85
|
-
* @property slots - Grabbed slots
|
|
89
|
+
* @property slots - Grabbed slots that where present in the connecting phase.
|
|
86
90
|
*/
|
|
87
91
|
export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapping<unknown> = Mapping<unknown>, InternalProperties extends Mapping<unknown> = Mapping<unknown>> extends GenericHTMLElement {
|
|
88
92
|
static applyRootBinding: boolean;
|
|
@@ -100,6 +104,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
100
104
|
static propertyTypes: PropertiesConfiguration;
|
|
101
105
|
static propertiesToReflectAsAttributes: AttributesReflectionConfiguration;
|
|
102
106
|
static renderProperties: Array<string>;
|
|
107
|
+
static doRender: boolean;
|
|
103
108
|
static cloneSlots: boolean;
|
|
104
109
|
static evaluateSlots: boolean;
|
|
105
110
|
static renderSlots: boolean;
|
|
@@ -156,7 +161,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
156
161
|
onUpdateAttribute(name: string, newValue: string): void;
|
|
157
162
|
/**
|
|
158
163
|
* Triggered when this component is mounted into the document.
|
|
159
|
-
* Attaches event handler, grabs given slots, reflects external properties
|
|
164
|
+
* Attaches event handler, grabs given slots, reflects external properties,
|
|
160
165
|
* and enqueues first rendering.
|
|
161
166
|
*/
|
|
162
167
|
connectedCallback(): void;
|
|
@@ -203,20 +208,20 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
203
208
|
*/
|
|
204
209
|
setPropertyValue(name: string, value: unknown): void;
|
|
205
210
|
/**
|
|
206
|
-
* Triggers a new rendering cycle and respects property
|
|
211
|
+
* Triggers a new rendering cycle and respects property-specific state
|
|
207
212
|
* connection.
|
|
208
213
|
* @param name - Property name to write.
|
|
209
214
|
* @param value - New value to write.
|
|
210
215
|
*/
|
|
211
216
|
triggerPropertySpecificRendering(name: string, value: unknown): void;
|
|
212
217
|
/**
|
|
213
|
-
* Binds properties and event handler to given dom node.
|
|
218
|
+
* Binds properties and event handler to the given dom node.
|
|
214
219
|
* @param domNode - Node to start traversing from.
|
|
215
220
|
* @param scope - Scope to render property value again.
|
|
216
221
|
*/
|
|
217
222
|
applyBinding(domNode: Node, scope: Mapping<unknown>): void;
|
|
218
223
|
/**
|
|
219
|
-
* Binds properties and event handler to given, sibling and nested nodes.
|
|
224
|
+
* Binds properties and event handler to given, sibling, and nested nodes.
|
|
220
225
|
* @param domNode - Node to start traversing from.
|
|
221
226
|
* @param scope - Scope to render property value again.
|
|
222
227
|
* @param renderSlots - Indicates whether to render nested elements of
|
|
@@ -224,7 +229,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
224
229
|
*/
|
|
225
230
|
applyBindings(domNode: Node | null, scope: Mapping<unknown>, renderSlots?: boolean): void;
|
|
226
231
|
/**
|
|
227
|
-
* Compiles given node content and their children. Provides corresponding
|
|
232
|
+
* Compiles given node content and their children. Provides a corresponding
|
|
228
233
|
* map of compiled template functions connected to their (sub) nodes and
|
|
229
234
|
* expected scope names.
|
|
230
235
|
* @param domNode - Node to compile.
|
|
@@ -236,7 +241,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
236
241
|
* should be traversed or not.
|
|
237
242
|
* @param options.ignoreNestedComponents - Indicates if nested components
|
|
238
243
|
* should be traversed or not.
|
|
239
|
-
* @param options.unsafe - Indicates if full
|
|
244
|
+
* @param options.unsafe - Indicates if full HTML generation should be
|
|
240
245
|
* allowed.
|
|
241
246
|
* @returns Map of compiled templates.
|
|
242
247
|
*/
|
|
@@ -263,7 +268,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
263
268
|
* should be traversed or not.
|
|
264
269
|
* @param options.domNodeTemplateCache - Yet compiled dom nodes to just
|
|
265
270
|
* reference instead of recompiling.
|
|
266
|
-
* @param options.unsafe - Indicates if full
|
|
271
|
+
* @param options.unsafe - Indicates if full HTML generation should be
|
|
267
272
|
* allowed.
|
|
268
273
|
*/
|
|
269
274
|
evaluateDomNodeTemplate<NodeType extends Node = Node>(domNode: NodeType, scope?: Mapping<unknown>, options?: {
|
|
@@ -275,13 +280,15 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
275
280
|
unsafe?: boolean;
|
|
276
281
|
}): void;
|
|
277
282
|
/**
|
|
278
|
-
* Adds an event listener to given dom node so that it will be
|
|
279
|
-
* when the component instance
|
|
283
|
+
* Adds an event listener to the given dom node so that it will be
|
|
284
|
+
* deregistered when the component instance is destroyed.
|
|
280
285
|
* @param domNode - Node to assign event handler to.
|
|
281
286
|
* @param name - Event name.
|
|
282
287
|
* @param handler - Callback to trigger when given event occurs.
|
|
288
|
+
* @param options - Add event listener options.
|
|
289
|
+
* @param removeOptions - Remove event listener options.
|
|
283
290
|
*/
|
|
284
|
-
addSecureEventListener(domNode: Node | Window, name:
|
|
291
|
+
addSecureEventListener<EventName extends keyof WindowEventMap>(domNode: Node | Window, name: EventName, handler: (this: Window, event: WindowEventMap[EventName]) => void, options?: boolean | AddEventListenerOptions, removeOptions?: EventListenerOptions): void;
|
|
285
292
|
/**
|
|
286
293
|
* Determines initial root which initializes rendering digest.
|
|
287
294
|
*/
|
|
@@ -293,7 +300,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
293
300
|
*/
|
|
294
301
|
static hasCode(content: unknown): boolean;
|
|
295
302
|
/**
|
|
296
|
-
* Converts given list, item or map to a map (with ordering).
|
|
303
|
+
* Converts given the list, item, or map to a map (with ordering).
|
|
297
304
|
* @param value - Attribute reflection configuration.
|
|
298
305
|
* @returns Generated map.
|
|
299
306
|
*/
|
|
@@ -322,7 +329,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
322
329
|
*/
|
|
323
330
|
triggerOutputEvents(): void;
|
|
324
331
|
/**
|
|
325
|
-
* Forwards given event as native web event.
|
|
332
|
+
* Forwards given event as the native web event.
|
|
326
333
|
* @param name - Event name.
|
|
327
334
|
* @param parameters - Event parameters.
|
|
328
335
|
* @returns False if event is cancelable, and at least one of the event
|
|
@@ -331,15 +338,15 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
331
338
|
*/
|
|
332
339
|
forwardEvent(name: string, parameters: Array<unknown>): boolean;
|
|
333
340
|
/**
|
|
334
|
-
* Renders component given slot contents into given dom node. If
|
|
335
|
-
* slots are not given but a fallback is specified they will be
|
|
336
|
-
* internal slot mapping.
|
|
341
|
+
* Renders component given slot contents into the given dom node. If
|
|
342
|
+
* expected slots are not given but a fallback is specified, they will be
|
|
343
|
+
* loaded into internal slot mapping.
|
|
337
344
|
* @param targetDomNode - Target dom node to render slots into.
|
|
338
345
|
* @param scope - Environment to render slots again if specified.
|
|
339
346
|
*/
|
|
340
347
|
applySlots(targetDomNode: HTMLElement, scope: Mapping<unknown>): void;
|
|
341
348
|
/**
|
|
342
|
-
* Determines slot content from given node.
|
|
349
|
+
* Determines slot content from the given node.
|
|
343
350
|
* @param slot - Node to grab slot content from.
|
|
344
351
|
* @returns Determined slot.
|
|
345
352
|
*/
|
|
@@ -349,7 +356,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
349
356
|
*/
|
|
350
357
|
grabGivenSlots(): void;
|
|
351
358
|
/**
|
|
352
|
-
* Determines if given property name exists in wrapped component state.
|
|
359
|
+
* Determines if a given property name exists in wrapped component state.
|
|
353
360
|
* @param name - Property name to check if exists in state.
|
|
354
361
|
* @returns Boolean result.
|
|
355
362
|
*/
|
|
@@ -371,16 +378,16 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
371
378
|
*/
|
|
372
379
|
reflectProperties(properties: Partial<ExternalProperties>): void;
|
|
373
380
|
/**
|
|
374
|
-
* Reflect given event handler call with given parameter back to
|
|
375
|
-
* properties state.
|
|
381
|
+
* Reflect the given event handler call with the given parameter back to
|
|
382
|
+
* current properties state.
|
|
376
383
|
* @param name - Event name.
|
|
377
384
|
* @param parameters - List of parameter to given event handler call.
|
|
378
385
|
* @returns Mapped properties or null if nothing could be mapped.
|
|
379
386
|
*/
|
|
380
387
|
reflectEventToProperties(name: string, parameters: Array<unknown>): Promise<Partial<ExternalProperties> | null>;
|
|
381
388
|
/**
|
|
382
|
-
* Evaluates given property value depending on its property definition
|
|
383
|
-
* registers in
|
|
389
|
+
* Evaluates the given property value depending on its property definition
|
|
390
|
+
* and registers in a property mapping object.
|
|
384
391
|
* @param attributeName - Name of given value.
|
|
385
392
|
* @param value - Value to evaluate.
|
|
386
393
|
*/
|
|
@@ -395,12 +402,12 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
395
402
|
* @param reason - Rendering reason description.
|
|
396
403
|
* @param resolveRendering - Indicates whether to resolve the rendering or
|
|
397
404
|
* just return a resolving promise directly.
|
|
398
|
-
* @returns A promise resolving when all nested render promises
|
|
405
|
+
* @returns A promise resolving when all nested render promises have been
|
|
399
406
|
* resolved.
|
|
400
407
|
*/
|
|
401
408
|
resolveRenderingPromiseIfSet(reason: string, resolveRendering: boolean): Promise<void>;
|
|
402
409
|
/**
|
|
403
|
-
*
|
|
410
|
+
* Sets up a new rendering cycle representing promise.
|
|
404
411
|
*/
|
|
405
412
|
prepareNewRenderingPromise(): void;
|
|
406
413
|
/**
|
|
@@ -409,23 +416,23 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
|
409
416
|
*/
|
|
410
417
|
triggerRender(reason: string): void;
|
|
411
418
|
/**
|
|
412
|
-
* Creates shadow root if not created yet and assigns to current root
|
|
419
|
+
* Creates shadow root if not created yet and assigns to the current root
|
|
413
420
|
* property.
|
|
414
421
|
*/
|
|
415
422
|
applyShadowRootIfNotExisting(): void;
|
|
416
423
|
/**
|
|
417
|
-
* Determines new scope object with useful default set of environment
|
|
424
|
+
* Determines a new scope object with a useful default set of environment
|
|
418
425
|
* values.
|
|
419
426
|
* @param scope - To apply to generated scope.
|
|
420
427
|
*/
|
|
421
428
|
determineRenderScope(scope?: Mapping<unknown>): void;
|
|
422
429
|
/**
|
|
423
|
-
* Method
|
|
430
|
+
* Method that does the rendering job. Should be called when ever state
|
|
424
431
|
* changes should be projected to the hosts dom content.
|
|
425
432
|
* @param reason - Description why rendering is necessary.
|
|
426
433
|
* @param resolveRendering - Indicates whether rendering should be resolved
|
|
427
434
|
* finally. Should be set to "false" via super calls in inherited render
|
|
428
|
-
* methods which do further dom manipulations
|
|
435
|
+
* methods which do further dom manipulations afterward and resolve the
|
|
429
436
|
* rendering process by their own.
|
|
430
437
|
* @returns A promise resolving when rendering has finished. A promise may
|
|
431
438
|
* be needed for classes inheriting from this class.
|
package/Web.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator","clientnode","clientnode/property-types"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"],e.clientnode,e["clientnode/property-types"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,s,o,a,l){return function(){var p=[function(e){e.exports=r},function(e){e.exports=a},function(e){e.exports=l},function(e){e.exports=n},function(e,t,r){var n=r(0),i=r.n(n),s=r(1),o=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:o.string},e),function(t,r){if("string"==typeof r){var n,o=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(o,"observedAttributes")||(o.observedAttributes=o.observedAttributes?[].concat(o.observedAttributes):[]);var a=(0,s.camelCaseToDelimited)(r);o.observedAttributes&&!o.observedAttributes.includes(a)&&o.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(o,"propertyTypes")||(o.propertyTypes=o.propertyTypes?i()({},o.propertyTypes):{}),!o.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(o,"propertiesToReflectAsAttributes")||(o.propertiesToReflectAsAttributes=o.propertiesToReflectAsAttributes?(0,s.copy)(o.propertiesToReflectAsAttributes):[]),e.update||o.propertiesToReflectAsAttributes instanceof Map&&!o.propertiesToReflectAsAttributes.has(r)||Array.isArray(o.propertiesToReflectAsAttributes)&&!o.propertiesToReflectAsAttributes.includes(r)||"object"==typeof o.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(o.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&o.propertyTypes&&Object.prototype.hasOwnProperty.call(o.propertyTypes,r)&&(n=o.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(o.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?o.propertiesToReflectAsAttributes.push(r):o.normalizePropertyTypeList&&(o.propertiesToReflectAsAttributes=o.normalizePropertyTypeList(o.propertiesToReflectAsAttributes))),o.propertiesToReflectAsAttributes instanceof Map&&o.propertiesToReflectAsAttributes.set(r,n),"object"==typeof o.propertiesToReflectAsAttributes&&(o.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(o,"propertyAliases")||(o.propertyAliases=o.propertyAliases?i()({},o.propertyAliases):{}),!o.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyAliases[r]=e.alias))}}}},function(t){t.exports=e},function(e){e.exports=o},,function(e){e.exports=t},function(e){e.exports=i},function(e){e.exports=s}],u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};c.r(d),c.d(d,{GenericHTMLElement:function(){return D},Web:function(){return k},api:function(){return M},log:function(){return V}});var h,f,b,y,m=c(5),v=c.n(m),g=c(8),P=c.n(g),A=c(0),w=c.n(A),T=c(3),O=c.n(T),S=c(9),x=c.n(S),R=(c(10),c(6)),C=c.n(R),E=c(1),N=c(2),I=c(4);function j(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return U(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var V=new E.Logger({name:"web-component-wrapper-web"}),D="undefined"==typeof HTMLElement?function(){}:HTMLElement,k=(h=(0,I.default)({type:N.boolean,writeAttribute:!0}),y=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:E.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=w()({},E.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,P()(r,"isRoot",b,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}O()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this;this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,E.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):this.render("attributeChanged")},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,E.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){try{this.isConnected=!1}catch(e){}for(var e,t=j(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=j(e.value.values());!(r=n()).done;){(0,r.value)()}this.slots={}},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=j((0,E.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:this.externalProperties[e];return null!=(n=this.instance)&&null!=(n=n.current)&&n.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:i},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,E.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,E.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i=n.value,s="";if(i.startsWith("data-bind-")?s=i.substring(10):i.startsWith("bind-")&&(s=i.substring(5)),s){var o=e.getAttribute(i);if(null===o)return 0;if(s.startsWith("attribute-")||s.startsWith("property-")){var a=(0,E.evaluate)(o,t,!1,!0,e);if(a.error)return V.warn("Error occurred during processing given",'attribute binding "'+i+'" on node:',e,a.error),0;s.startsWith("attribute-")?e.setAttribute(s.substring(10),a.result):e[(0,E.delimitedToCamelCase)(s.substring(9))]=a.result}else if(s.startsWith("on-")){s=(0,E.delimitedToCamelCase)(s.substring(3)),t=w()({log:V,event:void 0,parameters:void 0},t);var l=(0,E.compile)(o,t,!0,!0,e);l.error?V.warn("Error occurred during compiling given event",'binding "'+i+'" on node:',e,l.error):r.addSecureEventListener(e,s,(function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];t.event=n[0],t.parameters=n;try{l.templateFunction.apply(l,l.originalScopeNames.map((function(e){return t[e]})))}catch(t){V.warn("Error occurred during processing","given event binding",'"'+i+'" on node:',e,'Given expression "'+o+'" could',"not be evaluated with given scope",'names "'+l.scopeNames.join('", "')+'": '+(0,E.represent)(t))}}))}}},s=j(e.getAttributeNames());!(n=s()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=w()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var s=(0,E.compile)("`"+i+"`",t);return{domNode:e,children:[],error:s.error,scopeNames:s.scopeNames,template:i,templateFunction:s.templateFunction}}return null}var o=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(o=a.replace(/ /g," ").trim())}var l=[],p={children:l,domNode:e};if(o){var u=(0,E.compile)("`"+o+"`",t);p.error=u.error,p.scopeNames=u.scopeNames,p.template=o,p.templateFunction=u.templateFunction}for(var c=e.firstChild;c;){if(!r.filter||r.filter(c)){var d=this.compileDomNodeTemplate(c,t,w()({},r,{ignoreComponents:r.ignoreNestedComponents}));d&&l.push(d)}c=c.nextSibling}return p},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,i=e.templateFunction,s=e.scopeNames;if(!i||!s)return null;if(n)return V.warn("Error occurred during compiling node content:",n),null;var o=null;try{o=i.apply(void 0,s.map((function(e){return t[e]})))}catch(n){V.warn('Error occurred when "'+this.self._name+'" is running','"'+String(i)+'": with bound','names "'+s.join('", "')+'":','"'+n+'". Rendering node:',r)}return o},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var i=(r=w()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!i.has(e)){var s={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},o=this.compileDomNodeTemplate(e,t,s);o&&i.set(e,o)}if(i.has(e)){var a=i.get(e),l=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==l&&(r.unsafe&&e.innerHTML?e.innerHTML=l:e.textContent=l),a.children.length){var p=function(e){for(var r,i=j(e);!(r=i()).done;){var s=r.value,o=n.evaluateCompiledDomNodeTemplate(s,t);null!==o&&(s.domNode.textContent=o),s.children.length&&p(s.children)}};p(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r){var n=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var i=this.domNodeEventBindings.get(e),s=null==i?void 0:i.get(t);s&&s!==r&&s(),null==i||i.set(t,(function(){e.removeEventListener(t,r),i.delete(t),0===i.size&&n.domNodeEventBindings.delete(e)})),e.addEventListener(t,r)},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,s=j(n);!(r=s()).done;){var o=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,o)&&i.set(o,t.propertyTypes[o])}return i}return(0,E.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,v()(C().mark((function t(){var n,i,s,o,a=arguments;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),s=0;s<n;s++)i[s]=a[s];return t.next=1,e.reflectEventToProperties(r,i);case 1:(o=t.sent)&&(i[0]=o),e.forwardEvent(r,i);case 2:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],s=r[0],o=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,s)||![N.func,"function"].includes(o)||t.self.renderProperties.includes(s)||(t.outputEventNames.add(s),t.setInternalPropertyValue(s,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(s,n),t.forwardEvent(s,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=j(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,E.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,i=0,s=Array.from(e.querySelectorAll("slot"));i<s.length;i++){var o=s[i],a=o.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var l,p=j(this.slots.default);!(l=p()).done;){var u=l.value;this.evaluateDomNodeTemplate(u,r)}(0,E.replace)(o,this.slots.default,t.trimSlots)}}else this.slots.default=(0,E.unwrap)(o).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,E.replace)(o,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,E.unwrap)(o).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=N.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var i=r.cloneNode();return r.classList.add("web-component-template"),i.innerHTML="",i.template=n,i}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,i=r[t],s=i.parentNode,o=!0;s;){if(s.nodeName.includes("-")){s===this&&(o=!1);break}s=s.parentNode}if(!o){var a=null==(n=i.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:i.nodeName.toLowerCase()]=this.grabSlotContent(i)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=w()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,i=r[t],s=i[0],o=i[1];if(this.setExternalPropertyValue(s,o),this.isConnected){var a=(0,E.camelCaseToDelimited)(s);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(s))switch(this.self._propertiesToReflectAsAttributes.get(s)){case N.boolean:case"boolean":o?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case N.func:case"function":break;case"json":if(o){var l=JSON.stringify(o);if(l&&this.getAttribute(a)!==l){this.setAttribute(a,l);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case N.number:case"number":if("number"!=typeof o||isNaN(o))this.hasAttribute(a)&&this.removeAttribute(a);else{var p=String(o);this.getAttribute(a)!==p&&this.setAttribute(a,p)}break;case N.string:case"string":o?this.getAttribute(a)!==o&&this.setAttribute(a,o):this.hasAttribute(a)&&this.removeAttribute(a);break;case N.any:case N.array:case N.arrayOf:case N.element:case N.elementType:case N.instanceOf:case N.node:case N.object:case"object":case N.objectOf:case N.shape:case N.exact:case N.symbol:default:if(o){var u=(0,E.represent)(o);if(u&&this.getAttribute(a)!==u){this.setAttribute(a,u);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,i=j(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=i()).done;){var s=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,s)&&this.setInternalPropertyValue(s,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var o,a=j(this.self.controllableProperties);!(o=a()).done;){var l=o.value;Object.prototype.hasOwnProperty.call(e,l)&&this.setInternalPropertyValue(l,e[l])}},r.reflectEventToProperties=function(){var e=v()(C().mark((function e(t,r){var n,i,s,o,a,l,p,u,c,d,h,f,b,y,m,v,g;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,s=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,E.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(o=this.self.eventToPropertyMapping)[t].apply(o,r.concat([this])))&&"then"in a&&(0,E.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:g=e.sent,e.next=3;break;case 2:g=a;case 3:l=g,s=!0,Array.isArray(l)?(i=l[0],this.reflectProperties(i),(0,E.extend)(!0,this.internalProperties,l[1])):null===l?s=!1:"object"==typeof l&&(i=l,this.reflectProperties(l));case 4:if(!s&&r.length>0&&(0,E.isObject)(r[0])){if(u=r[0],"persist"in r[0]&&(0,E.isFunction)(r[0].persist))for(u={},c=0,d=Object.keys(this.self.propertyTypes);c<d.length;c++)for(h=d[c],f=j([h].concat(null!==(y=this.getPropertyAlias(h))&&void 0!==y?y:[]));!(b=f()).done;)m=b.value,(v=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,m)?r[0].currentTarget[m]:this.getPropertyValue(m))!==this.externalProperties[m]&&(u[m]=v);else[null,void 0].includes(null==(p=u.detail)?void 0:p.value)||(u=w()({},u.detail));i=u,this.reflectProperties(u)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,s=(0,E.delimitedToCamelCase)(i),o=this.getPropertyAlias(s);if(o&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)&&(s=o),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)){var a=this.self.propertyTypes[s];if(n){if(t){var l=(0,E.evaluate)(t,w()({},E.UTILITY_SCOPE),!1,!0,this);l.error?(V.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+l.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(s,void 0)):(this.setInternalPropertyValue(s,l.result),this.setExternalPropertyValue(s,l.result))}}else switch(a){case N.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(s,p),this.setExternalPropertyValue(s,p);break;case N.func:case"function":var u,c=null,d=["data","event","firstArgument","firstParameter","options","scope","parameters"].concat(E.UTILITY_SCOPE_NAMES);if(t){var h=(0,E.compile)(t,d);c=h.error,u=h.templateFunction,c&&V.warn("Failed to compile given handler",'"'+e+'": '+c+".")}this.setInternalPropertyValue(s,(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.outputEventNames.has(s)&&r.reflectEventToProperties(s,i);var a=void 0;if(!c)try{var l;a=null==(l=u)?void 0:l.call.apply(l,[r,i[0],i[0],i[0],i[0],i[0],i[0],i].concat(E.UTILITY_SCOPE_VALUES))}catch(r){V.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+d.join('", "')+'" set to','"'+(0,E.represent)(i)+'":',r+". Set property",'to "undefined".')}return r.self.renderProperties.includes(s)||r.forwardEvent(s,i),a})),c||this.setExternalPropertyValue(s,u);break;case"json":if(t){var f;try{f=JSON.parse(t)}catch(c){V.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,E.represent)(c));break}this.setInternalPropertyValue(s,f),this.setExternalPropertyValue(s,(0,E.copy)(f,!1,1))}else this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null);break;case N.number:case"number":if(null===t){this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break}var b=parseFloat(t);isNaN(b)&&(b=void 0),this.setInternalPropertyValue(s,b),this.setExternalPropertyValue(s,b);break;case N.string:case"string":this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break;case N.any:case N.array:case N.arrayOf:case N.element:case N.elementType:case N.instanceOf:case N.node:case N.object:case"object":case N.objectOf:case N.oneOf:case N.oneOfType:case N.shape:case N.exact:case N.symbol:default:if(t){var y=(0,E.evaluate)(t,{},!1,!0,this);if(y.error){V.warn("Error occurred during processing given",'attribute configuration "'+e+'":',y.error);break}this.setInternalPropertyValue(s,y.result),this.setExternalPropertyValue(s,(0,E.copy)(y.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(s,!0),this.setExternalPropertyValue(s,!0)):(this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null))}}},r.waitForNestedComponentRendering=function(){var e=v()(C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=v()(C().mark((function e(t,r){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,E.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,E.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=w()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,E.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=v()(C().mark((function e(t,r){var n,i,s=this;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=2;break}return e.next=1,Promise.all(this.self.pendingRenderPromises);case 1:this.self.pendingRenderPromises=[];case 2:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=4;break}return this.renderState.resolve(t),e.next=3,Promise.all(this.self.pendingRenderPromises);case 3:return e.abrupt("return");case 4:if(!(n=(0,E.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=6;break}return V.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=5,Promise.all(this.self.pendingRenderPromises);case 5:return e.abrupt("return");case 6:return this.applyShadowRootIfNotExisting(),(i=document.createElement("div")).innerHTML=n.result,this.applySlots(i,w()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=i.innerHTML,e.next=7,(0,E.timeout)();case 7:return this.waitForNestedComponentRendering().then((function(){s.applyBindings(s.rootInstance.firstChild,s.scope,s.self.renderSlots)})),e.next=8,this.resolveRenderingPromiseIfSet(t,r);case 8:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),t}(D),y.applyRootBinding=!0,y.pendingRenderPromises=[],y.content="<slot>Please provide a template to transclude.</slot>",y.determineRootBinding=!0,y.shadowDOM=null,y.observedAttributes=[],y.controllableProperties=[],y.eventToPropertyMapping={},y.propertyAliases={},y.propertyTypes={onClick:N.func},y.propertiesToReflectAsAttributes=[],y.renderProperties=["children"],y.cloneSlots=!1,y.evaluateSlots=!1,y.renderSlots=!0,y.trimSlots=!0,y.renderUnsafe=!1,y._name="BaseWeb",y._propertyAliasIndex=void 0,y._propertiesToReflectAsAttributes=void 0,f=y,b=x()(f.prototype,"isRoot",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f),M={component:k,register:function(e){void 0===e&&(e=(0,E.camelCaseToDelimited)(k._name)),customElements.define(e,k)}};return d.default=k,d}()}));
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator","clientnode","clientnode/property-types"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"],e.clientnode,e["clientnode/property-types"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,s,o,a,l){return function(){var p=[function(e){e.exports=r},function(e){e.exports=a},function(e){e.exports=l},function(e){e.exports=n},function(e,t,r){var n=r(0),i=r.n(n),s=r(1),o=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:o.string},e),function(t,r){if("string"==typeof r){var n,o=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(o,"observedAttributes")||(o.observedAttributes=o.observedAttributes?[].concat(o.observedAttributes):[]);var a=(0,s.camelCaseToDelimited)(r);o.observedAttributes&&!o.observedAttributes.includes(a)&&o.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(o,"propertyTypes")||(o.propertyTypes=o.propertyTypes?i()({},o.propertyTypes):{}),!o.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(o,"propertiesToReflectAsAttributes")||(o.propertiesToReflectAsAttributes=o.propertiesToReflectAsAttributes?(0,s.copy)(o.propertiesToReflectAsAttributes):[]),e.update||o.propertiesToReflectAsAttributes instanceof Map&&!o.propertiesToReflectAsAttributes.has(r)||Array.isArray(o.propertiesToReflectAsAttributes)&&!o.propertiesToReflectAsAttributes.includes(r)||"object"==typeof o.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(o.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&o.propertyTypes&&Object.prototype.hasOwnProperty.call(o.propertyTypes,r)&&(n=o.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(o.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?o.propertiesToReflectAsAttributes.push(r):o.normalizePropertyTypeList&&(o.propertiesToReflectAsAttributes=o.normalizePropertyTypeList(o.propertiesToReflectAsAttributes))),o.propertiesToReflectAsAttributes instanceof Map&&o.propertiesToReflectAsAttributes.set(r,n),"object"==typeof o.propertiesToReflectAsAttributes&&(o.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(o,"propertyAliases")||(o.propertyAliases=o.propertyAliases?i()({},o.propertyAliases):{}),!o.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyAliases[r]=e.alias))}}}},function(t){t.exports=e},function(e){e.exports=o},,function(e){e.exports=t},function(e){e.exports=i},function(e){e.exports=s}],u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};c.r(d),c.d(d,{GenericHTMLElement:function(){return V},Web:function(){return k},api:function(){return M},log:function(){return D}});var h,f,b,y,m=c(5),v=c.n(m),g=c(8),P=c.n(g),A=c(0),w=c.n(A),T=c(3),O=c.n(T),x=c(9),S=c.n(x),R=(c(10),c(6)),C=c.n(R),E=c(1),N=c(2),I=c(4);function j(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return U(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var D=new E.Logger({name:"web-component-wrapper-web"}),V="undefined"==typeof HTMLElement?function(){}:HTMLElement,k=(h=(0,I.default)({type:N.boolean,writeAttribute:!0}),y=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:E.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=w()({},E.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,P()(r,"isRoot",b,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}O()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this;this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,E.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):this.render("attributeChanged")},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,E.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){try{this.isConnected=!1}catch(e){}for(var e,t=j(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=j(e.value.values());!(r=n()).done;){(0,r.value)()}this.slots={}},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=j((0,E.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:this.externalProperties[e];return null!=(n=this.instance)&&null!=(n=n.current)&&n.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:i},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,E.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,E.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i,s=n.value;if(s.startsWith("data-bind-")?i=s.substring(10):s.startsWith("bind-")&&(i=s.substring(5)),i){var o=e.getAttribute(s);if(null===o)return 0;if(i.startsWith("attribute-")||i.startsWith("property-")){var a=(0,E.evaluate)(o,t,!1,!0,e);if(a.error)return D.warn("Error occurred during processing given",'attribute binding "'+s+'" on node:',e,a.error),0;i.startsWith("attribute-")?e.setAttribute(i.substring(10),a.result):e[(0,E.delimitedToCamelCase)(i.substring(9))]=a.result}else if(i.startsWith("on-")){i=(0,E.delimitedToCamelCase)(i.substring(3)),t=w()({log:D,event:void 0,parameters:void 0},t);var l=(0,E.compile)(o,t,!0,!0,e);l.error?D.warn("Error occurred during compiling given event",'binding "'+s+'" on node:',e,l.error):r.addSecureEventListener(e,i,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.event=n[0],t.parameters=n;try{l.templateFunction.apply(l,l.originalScopeNames.map((function(e){return t[e]})))}catch(t){D.warn("Error occurred during processing","given event binding",'"'+s+'" on node:',e,'Given expression "'+o+'" could',"not be evaluated with given scope",'names "'+l.scopeNames.join('", "')+'": '+(0,E.represent)(t))}}))}}},s=j(e.getAttributeNames());!(n=s()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=w()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var s=(0,E.compile)("`"+i+"`",t);return{domNode:e,children:[],error:s.error,scopeNames:s.scopeNames,template:i,templateFunction:s.templateFunction}}return null}var o=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(o=a.replace(/ /g," ").trim())}var l=[],p={children:l,domNode:e};if(o){var u=(0,E.compile)("`"+o+"`",t);p.error=u.error,p.scopeNames=u.scopeNames,p.template=o,p.templateFunction=u.templateFunction}for(var c=e.firstChild;c;){if(!r.filter||r.filter(c)){var d=this.compileDomNodeTemplate(c,t,w()({},r,{ignoreComponents:r.ignoreNestedComponents}));d&&l.push(d)}c=c.nextSibling}return p},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,i=e.templateFunction,s=e.scopeNames;if(!i||!s)return null;if(n)return D.warn("Error occurred during compiling node content:",n),null;var o=null;try{o=i.apply(void 0,s.map((function(e){return t[e]})))}catch(n){D.warn('Error occurred when "'+this.self._name+'" is running','"'+String(i)+'": with bound','names "'+s.join('", "')+'":','"'+n+'". Rendering node:',r)}return o},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var i=(r=w()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!i.has(e)){var s={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},o=this.compileDomNodeTemplate(e,t,s);o&&i.set(e,o)}if(i.has(e)){var a=i.get(e),l=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==l&&(r.unsafe&&e.innerHTML?e.innerHTML=l:e.textContent=l),a.children.length){var p=function(e){for(var r,i=j(e);!(r=i()).done;){var s=r.value,o=n.evaluateCompiledDomNodeTemplate(s,t);null!==o&&(s.domNode.textContent=o),s.children.length&&p(s.children)}};p(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r,n,i){var s=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var o=this.domNodeEventBindings.get(e),a=null==o?void 0:o.get(t);a&&a!==r&&a(),null==o||o.set(t,(function(){e.removeEventListener(t,r,i),o.delete(t),0===o.size&&s.domNodeEventBindings.delete(e)})),e.addEventListener(t,r,n)},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,s=j(n);!(r=s()).done;){var o=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,o)&&i.set(o,t.propertyTypes[o])}return i}return(0,E.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,v()(C().mark((function t(){var n,i,s,o,a=arguments;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),s=0;s<n;s++)i[s]=a[s];return t.next=1,e.reflectEventToProperties(r,i);case 1:(o=t.sent)&&(i[0]=o),e.forwardEvent(r,i);case 2:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],s=r[0],o=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,s)||![N.func,"function"].includes(o)||t.self.renderProperties.includes(s)||(t.outputEventNames.add(s),t.setInternalPropertyValue(s,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(s,n),t.forwardEvent(s,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=j(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,E.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,i=0,s=Array.from(e.querySelectorAll("slot"));i<s.length;i++){var o=s[i],a=o.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var l,p=j(this.slots.default);!(l=p()).done;){var u=l.value;this.evaluateDomNodeTemplate(u,r)}(0,E.replace)(o,this.slots.default,t.trimSlots)}}else this.slots.default=(0,E.unwrap)(o).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,E.replace)(o,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,E.unwrap)(o).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=N.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var i=r.cloneNode();return r.classList.add("web-component-template"),i.innerHTML="",i.template=n,i}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,i=r[t],s=i.parentNode,o=!0;s;){if(s.nodeName.includes("-")){s===this&&(o=!1);break}s=s.parentNode}if(!o){var a=null==(n=i.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:i.nodeName.toLowerCase()]=this.grabSlotContent(i)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=w()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,i=r[t],s=i[0],o=i[1];if(this.setExternalPropertyValue(s,o),this.isConnected){var a=(0,E.camelCaseToDelimited)(s);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(s))switch(this.self._propertiesToReflectAsAttributes.get(s)){case N.boolean:case"boolean":o?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case N.func:case"function":break;case"json":if(o){var l=JSON.stringify(o);if(l&&this.getAttribute(a)!==l){this.setAttribute(a,l);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case N.number:case"number":if("number"!=typeof o||isNaN(o))this.hasAttribute(a)&&this.removeAttribute(a);else{var p=String(o);this.getAttribute(a)!==p&&this.setAttribute(a,p)}break;case N.string:case"string":o?this.getAttribute(a)!==o&&this.setAttribute(a,o):this.hasAttribute(a)&&this.removeAttribute(a);break;case N.any:case N.array:case N.arrayOf:case N.element:case N.elementType:case N.instanceOf:case N.node:case N.object:case"object":case N.objectOf:case N.shape:case N.exact:case N.symbol:default:if(o){var u=(0,E.represent)(o);if(u&&this.getAttribute(a)!==u){this.setAttribute(a,u);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,i=j(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=i()).done;){var s=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,s)&&this.setInternalPropertyValue(s,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var o,a=j(this.self.controllableProperties);!(o=a()).done;){var l=o.value;Object.prototype.hasOwnProperty.call(e,l)&&this.setInternalPropertyValue(l,e[l])}},r.reflectEventToProperties=function(){var e=v()(C().mark((function e(t,r){var n,i,s,o,a,l,p,u,c,d,h,f,b,y,m,v,g;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,s=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,E.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(o=this.self.eventToPropertyMapping)[t].apply(o,r.concat([this])))&&"then"in a&&(0,E.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:g=e.sent,e.next=3;break;case 2:g=a;case 3:l=g,s=!0,Array.isArray(l)?(i=l[0],this.reflectProperties(i),(0,E.extend)(!0,this.internalProperties,l[1])):null===l?s=!1:"object"==typeof l&&(i=l,this.reflectProperties(l));case 4:if(!s&&r.length>0&&(0,E.isObject)(r[0])){if(u=r[0],"persist"in r[0]&&(0,E.isFunction)(r[0].persist))for(u={},c=0,d=Object.keys(this.self.propertyTypes);c<d.length;c++)for(h=d[c],f=j([h].concat(null!==(y=this.getPropertyAlias(h))&&void 0!==y?y:[]));!(b=f()).done;)m=b.value,(v=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,m)?r[0].currentTarget[m]:this.getPropertyValue(m))!==this.externalProperties[m]&&(u[m]=v);else[null,void 0].includes(null==(p=u.detail)?void 0:p.value)||(u=w()({},u.detail));i=u,this.reflectProperties(u)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,s=(0,E.delimitedToCamelCase)(i),o=this.getPropertyAlias(s);if(o&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)&&(s=o),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)){var a=this.self.propertyTypes[s];if(n){if(t){var l=(0,E.evaluate)(t,w()({},E.UTILITY_SCOPE),!1,!0,this);l.error?(D.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+l.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(s,void 0)):(this.setInternalPropertyValue(s,l.result),this.setExternalPropertyValue(s,l.result))}}else switch(a){case N.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(s,p),this.setExternalPropertyValue(s,p);break;case N.func:case"function":var u,c=null,d=["data","event","firstArgument","firstParameter","options","scope","parameters"].concat(E.UTILITY_SCOPE_NAMES);if(t){var h=(0,E.compile)(t,d);c=h.error,u=h.templateFunction,c&&D.warn("Failed to compile given handler",'"'+e+'": '+c+".")}this.setInternalPropertyValue(s,(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.outputEventNames.has(s)&&r.reflectEventToProperties(s,i);var a=void 0;if(!c)try{var l;a=null==(l=u)?void 0:l.call.apply(l,[r,i[0],i[0],i[0],i[0],i[0],i[0],i].concat(E.UTILITY_SCOPE_VALUES))}catch(r){D.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+d.join('", "')+'" set to','"'+(0,E.represent)(i)+'":',r+". Set property",'to "undefined".')}return r.self.renderProperties.includes(s)||r.forwardEvent(s,i),a})),c||this.setExternalPropertyValue(s,u);break;case"json":if(t){var f;try{f=JSON.parse(t)}catch(c){D.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,E.represent)(c));break}this.setInternalPropertyValue(s,f),this.setExternalPropertyValue(s,(0,E.copy)(f,!1,1))}else this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null);break;case N.number:case"number":if(null===t){this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break}var b=parseFloat(t);isNaN(b)&&(b=void 0),this.setInternalPropertyValue(s,b),this.setExternalPropertyValue(s,b);break;case N.string:case"string":this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break;case N.any:case N.array:case N.arrayOf:case N.element:case N.elementType:case N.instanceOf:case N.node:case N.object:case"object":case N.objectOf:case N.oneOf:case N.oneOfType:case N.shape:case N.exact:case N.symbol:default:if(t){var y=(0,E.evaluate)(t,{},!1,!0,this);if(y.error){D.warn("Error occurred during processing given",'attribute configuration "'+e+'":',y.error);break}this.setInternalPropertyValue(s,y.result),this.setExternalPropertyValue(s,(0,E.copy)(y.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(s,!0),this.setExternalPropertyValue(s,!0)):(this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null))}}},r.waitForNestedComponentRendering=function(){var e=v()(C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=v()(C().mark((function e(t,r){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,E.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,E.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=w()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,E.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=v()(C().mark((function e(t,r){var n,i,s=this;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=3;break}return e.next=1,this.resolveRenderingPromiseIfSet(t,r);case 1:if(!r){e.next=3;break}return e.next=2,Promise.all(this.self.pendingRenderPromises);case 2:this.self.pendingRenderPromises=[];case 3:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.self.doRender&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=5;break}return e.next=4,this.resolveRenderingPromiseIfSet(t,r);case 4:return e.abrupt("return");case 5:if(!(n=(0,E.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=7;break}return D.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=6,Promise.all(this.self.pendingRenderPromises);case 6:return e.abrupt("return");case 7:return this.applyShadowRootIfNotExisting(),(i=document.createElement("div")).innerHTML=n.result,this.applySlots(i,w()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=i.innerHTML,e.next=8,(0,E.timeout)();case 8:return this.waitForNestedComponentRendering().then((function(){s.applyBindings(s.hostDomNode.firstChild,s.scope,s.self.renderSlots)})),e.next=9,this.resolveRenderingPromiseIfSet(t,r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),t}(V),y.applyRootBinding=!0,y.pendingRenderPromises=[],y.content="<slot>Please provide a template to transclude.</slot>",y.determineRootBinding=!0,y.shadowDOM=null,y.observedAttributes=[],y.controllableProperties=[],y.eventToPropertyMapping={},y.propertyAliases={},y.propertyTypes={onClick:N.func},y.propertiesToReflectAsAttributes=[],y.renderProperties=["children"],y.doRender=!1,y.cloneSlots=!1,y.evaluateSlots=!1,y.renderSlots=!0,y.trimSlots=!0,y.renderUnsafe=!1,y._name="BaseWeb",y._propertyAliasIndex=void 0,y._propertiesToReflectAsAttributes=void 0,f=y,b=S()(f.prototype,"isRoot",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f),M={component:k,register:function(e){void 0===e&&(e=(0,E.camelCaseToDelimited)(k._name)),customElements.define(e,k)}};return d.default=k,d}()}));
|
package/WebNext.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","clientnode","clientnode/property-types","@babel/runtime/helpers/extends"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends")):t(e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e.clientnode,e["clientnode/property-types"],e["@babel/runtime/helpers/extends"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,((__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__2__)=>(()=>{var __webpack_modules__=[e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__0__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__1__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__2__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__3__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__4__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(module,__unused_webpack_exports,__webpack_require__){var __webpack_dirname__="/",e,t,r;if(module=__webpack_require__.nmd(module),null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&null!=__webpack_dirname__&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window=void 0===__webpack_require__.g||null===__webpack_require__.g?{}:__webpack_require__.g;module.exports=(e=__webpack_require__(2),t=__webpack_require__(0),r=__webpack_require__(1),function(){var n=[function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=r}],i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};s.r(o),s.d(o,{property:function(){return c}});var _=s(0),a=s.n(_),l=s(1),p=s(2);function c(e){return void 0===e&&(e={}),e=a()({readAttribute:!0,type:p.string},e),function(t,r){if("string"==typeof r){var n,i=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(i,"observedAttributes")||(i.observedAttributes=i.observedAttributes?[].concat(i.observedAttributes):[]);var s=(0,l.camelCaseToDelimited)(r);i.observedAttributes&&!i.observedAttributes.includes(s)&&i.observedAttributes.push(s)}e.type&&(Object.prototype.hasOwnProperty.call(i,"propertyTypes")||(i.propertyTypes=i.propertyTypes?a()({},i.propertyTypes):{}),!i.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(i,"propertiesToReflectAsAttributes")||(i.propertiesToReflectAsAttributes=i.propertiesToReflectAsAttributes?(0,l.copy)(i.propertiesToReflectAsAttributes):[]),(e.update||i.propertiesToReflectAsAttributes instanceof Map&&!i.propertiesToReflectAsAttributes.has(r)||Array.isArray(i.propertiesToReflectAsAttributes)&&!i.propertiesToReflectAsAttributes.includes(r)||"object"==typeof i.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(i.propertiesToReflectAsAttributes,r))&&("boolean"==typeof e.writeAttribute?e.writeAttribute&&i.propertyTypes&&Object.prototype.hasOwnProperty.call(i.propertyTypes,r)&&(n=i.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(i.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?i.propertiesToReflectAsAttributes.push(r):i.normalizePropertyTypeList&&(i.propertiesToReflectAsAttributes=i.normalizePropertyTypeList(i.propertiesToReflectAsAttributes))),i.propertiesToReflectAsAttributes instanceof Map&&i.propertiesToReflectAsAttributes.set(r,n),"object"==typeof i.propertiesToReflectAsAttributes&&(i.propertiesToReflectAsAttributes[r]=n)))),e.alias&&(Object.prototype.hasOwnProperty.call(i,"propertyAliases")||(i.propertyAliases=i.propertyAliases?a()({},i.propertyAliases):{}),!i.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyAliases[r]=e.alias))}}}return o.default=c,o}())}],__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{GenericHTMLElement:()=>GenericHTMLElement,Web:()=>Web,api:()=>api,default:()=>Web_0,log:()=>log});var _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__),clientnode__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),clientnode__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_3__),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__),_decorator__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),_decorator__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_decorator__WEBPACK_IMPORTED_MODULE_5__),_dec,_class,_descriptor,_Web;const log=new clientnode__WEBPACK_IMPORTED_MODULE_3__.Logger({name:"web-component-wrapper-web"}),GenericHTMLElement="undefined"==typeof HTMLElement?class{}:HTMLElement;let Web=(_dec=_decorator__WEBPACK_IMPORTED_MODULE_5___default()({type:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean,writeAttribute:!0}),_Web=class e extends GenericHTMLElement{constructor(){super(),this.renderState={promise:Promise.resolve(""),pending:!1,resolve:clientnode__WEBPACK_IMPORTED_MODULE_3__.NOOP},this.childComponentInstances=[],this.batchAttributeUpdates=!0,this.batchPropertyUpdates=!0,this.batchUpdates=!0,this.batchedAttributeUpdateRunning=!0,this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,this.parentInstance=null,this.rootInstance=void 0,this.hostDomNode=void 0,this.scope={...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},this.domNodeEventBindings=new Map,this.domNodeTemplateCache=new Map,this.externalProperties={},this.ignoreAttributeUpdateObservations=!1,this.internalProperties={},this.outputEventNames=new Set,this.instance=null,_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this,"isRoot",_descriptor,this),this.runDomConnectionAndRenderingInSameEventQueue=!1,this.self=e,this.slots={},this.prepareNewRenderingPromise(),this.self=this.constructor,this.self._propertiesToReflectAsAttributes||(this.self._propertiesToReflectAsAttributes=this.self.normalizePropertyTypeList(this.self.propertiesToReflectAsAttributes)),this.generateAliasIndex(),this.hostDomNode=this,this.rootInstance=this,this.defineGetterAndSetterInterface()}attributeChangedCallback(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)}onUpdateAttribute(e,t){this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedAttributeUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("attributeChanged")}))):this.render("attributeChanged")}connectedCallback(){try{this.isConnected=!0}catch{}this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.render("connected")}))}disconnectedCallback(){try{this.isConnected=!1}catch{}for(const e of this.domNodeEventBindings.values())for(const t of e.values())t();this.slots={}}defineGetterAndSetterInterface(){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[]));for(const t of e)Object.prototype.hasOwnProperty.call(this,t)&&this.setPropertyValue(t,this[t]),Object.defineProperty(this,t,{configurable:!0,get:()=>this.getPropertyValue(t),set:e=>{this.setPropertyValue(t,e),this.triggerPropertySpecificRendering(t,e)}})}getPropertyAlias(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null}getPropertyValue(t){const r=this.instance?.current?.properties&&(Object.prototype.hasOwnProperty.call(!e.propertyTypes,t)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,t))?this.instance.current.properties[t]:this.externalProperties[t];return this.instance?.current?.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,t)?this.instance.current.state[t]:r}setExternalPropertyValue(e,t){this.externalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)}setInternalPropertyValue(e,t){this.internalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)}setPropertyValue(e,t){this.reflectProperties({[e]:t}),this.setInternalPropertyValue(e,t)}triggerPropertySpecificRendering(e,t){if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{void 0!==t&&this.isStateProperty(e)?(this.render("preStatePropertyChanged"),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.setInternalPropertyValue(e,void 0),this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("postStatePropertyChanged"),this.triggerOutputEvents()}))):(this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("propertyChanged"),this.triggerOutputEvents())})));else{const r=this.isStateProperty(e);this.render(r?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&r&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}}applyBinding(e,t){if(e.getAttributeNames)for(const r of e.getAttributeNames()){let n="";if(r.startsWith("data-bind-")?n=r.substring(10):r.startsWith("bind-")&&(n=r.substring(5)),n){const i=e.getAttribute(r);if(null===i)continue;if(n.startsWith("attribute-")||n.startsWith("property-")){const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(i,t,!1,!0,e);if(s.error){log.warn("Error occurred during processing given",`attribute binding "${r}" on node:`,e,s.error);continue}n.startsWith("attribute-")?e.setAttribute(n.substring(10),s.result):e[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(9))]=s.result}else if(n.startsWith("on-")){n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(3)),t={log,event:void 0,parameters:void 0,...t};const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(i,t,!0,!0,e);s.error?log.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,s.error):this.addSecureEventListener(e,n,((...n)=>{t.event=n[0],t.parameters=n;try{s.templateFunction(...s.originalScopeNames.map((e=>t[e])))}catch(t){log.warn("Error occurred during processing","given event binding",`"${r}" on node:`,e,`Given expression "${i}" could`,"not be evaluated with given scope",'names "'+s.scopeNames.join('", "')+`": ${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t)}`)}}))}}}}applyBindings(e,t,r=!0){for(;e;)!e.attributes?.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}compileDomNodeTemplate(e,t=[],r={}){r={ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r};const n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){let r=e.innerHTML;if(!r&&e.template&&(r=e.template),this.self.hasCode(r)){const n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${r}\``,t);return{domNode:e,children:[],error:n.error,scopeNames:n.scopeNames,template:r,templateFunction:n.templateFunction}}return null}let i=null;if("#text"===n){const t=e.textContent;t&&this.self.hasCode(t)&&(i=t.replace(/ /g," ").trim())}const s=[],o={children:s,domNode:e};if(i){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${i}\``,t);o.error=e.error,o.scopeNames=e.scopeNames,o.template=i,o.templateFunction=e.templateFunction}let _=e.firstChild;for(;_;){if(!r.filter||r.filter(_)){const e=this.compileDomNodeTemplate(_,t,{...r,ignoreComponents:r.ignoreNestedComponents});e&&s.push(e)}_=_.nextSibling}return o}evaluateCompiledDomNodeTemplate(e,t){const{domNode:r,error:n,templateFunction:i,scopeNames:s}=e;if(!i||!s)return null;if(n)return log.warn("Error occurred during compiling node content:",n),null;let o=null;try{o=i(...s.map((e=>t[e])))}catch(n){log.warn(`Error occurred when "${this.self._name}" is running`,`"${String(i)}": with bound`,`names "${s.join('", "')}":`,`"${n}". Rendering node:`,r)}return o}evaluateDomNodeTemplate(e,t={},r={}){const n=(r={domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r}).domNodeTemplateCache;if(!n.has(e)){const i={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,i);s&&n.set(e,s)}if(n.has(e)){const i=n.get(e),s=this.evaluateCompiledDomNodeTemplate(i,t);if(null!==s&&(r.unsafe&&e.innerHTML?e.innerHTML=s:e.textContent=s),i.children.length){const e=r=>{for(const n of r){const r=this.evaluateCompiledDomNodeTemplate(n,t);null!==r&&(n.domNode.textContent=r),n.children.length&&e(n.children)}};e(i.children)}}r.applyBindings&&this.applyBindings(e,t)}addSecureEventListener(e,t,r){this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);const n=this.domNodeEventBindings.get(e),i=n?.get(t);i&&i!==r&&i(),n?.set(t,(()=>{e.removeEventListener(t,r),n.delete(t),0===n.size&&this.domNodeEventBindings.delete(e)})),e.addEventListener(t,r)}determineRootBinding(){let t=this.parentNode;for(;t;){const r=t instanceof e||t.nodeName.includes("-")&&"#document-fragment"!==t.nodeName,n=null===t.parentNode&&"[object ShadowRoot]"===t.toString();r?(this.rootInstance===this&&(this.parentInstance=t,this.setPropertyValue("isRoot",!1)),this.rootInstance=t):n&&this.setPropertyValue("isRoot",!1),t=t.parentNode}}static hasCode(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)}static normalizePropertyTypeList(t){if("string"==typeof t&&(t=[t]),Array.isArray(t)){const r=t,n=new Map;for(const t of r)Object.prototype.hasOwnProperty.call(e.propertyTypes,t)&&n.set(t,e.propertyTypes[t]);return n}return(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.convertPlainObjectToMap)(t)}attachEventHandler(){if(null===this.self.eventToPropertyMapping)return;const e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}attachExplicitDefinedOutputEventHandler(){if(!this.self.eventToPropertyMapping)return!1;let e=!1;for(const t of Object.keys(this.self.eventToPropertyMapping))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||(e=!0,this.outputEventNames.add(t),this.setInternalPropertyValue(t,(async(...e)=>{const r=await this.reflectEventToProperties(t,e);r&&(e[0]=r),this.forwardEvent(t,e)})));return e}attachImplicitDefinedOutputEventHandler(e=!0){for(const[t,r]of Object.entries(this.self.propertyTypes))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||![clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func,"function"].includes(r)||this.self.renderProperties.includes(t)||(this.outputEventNames.add(t),this.setInternalPropertyValue(t,((...r)=>{e&&this.reflectEventToProperties(t,r),this.forwardEvent(t,r)})))}triggerOutputEvents(){for(const e of this.outputEventNames)this.forwardEvent(e,[this.externalProperties])}forwardEvent(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))}applySlots(t,r){for(const n of Array.from(t.querySelectorAll("slot"))){const t=n.getAttribute("name");if(null===t||"default"===t)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(const e of this.slots.default)this.evaluateDomNodeTemplate(e,r);(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots.default,e.trimSlots)}}else this.slots.default=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).map((e=>this.grabSlotContent(e)));else this.slots[t]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[t],r),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots[t],e.trimSlots)):this.slots[t]=this.grabSlotContent((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).filter((e=>"#text"!==e.nodeName.toLowerCase()))[0])}}grabSlotContent(e){const t=clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node.firstElementChild?e:null;if(t&&"textarea"===t.firstElementChild?.nodeName.toLowerCase()&&(!t.firstElementChild.hasAttribute("data-no-template")||"false"===t.firstElementChild.getAttribute("data-no-template"))){const e=t.firstElementChild.value;t.classList.remove("web-component-template");const r=t.cloneNode();return t.classList.add("web-component-template"),r.innerHTML="",r.template=e,r}return this.self.cloneSlots?e.cloneNode(!0):e}grabGivenSlots(){this.slots={};for(const e of Array.from(this.querySelectorAll("[slot]"))){let t=e.parentNode,r=!0;for(;t;){if(t.nodeName.includes("-")){t===this&&(r=!1);break}t=t.parentNode}if(r)continue;const n=e.getAttribute("slot")?.trim();this.slots[null!=n?n:e.nodeName.toLowerCase()]=this.grabSlotContent(e)}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((e=>this.grabSlotContent(e))):this.slots.default=[]}isStateProperty(e){return Boolean(this.instance?.current?.state&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))}generateAliasIndex(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex={...this.self.propertyAliases};for(const[e,t]of Object.entries(this.self._propertyAliasIndex))Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,t)||(this.self._propertyAliasIndex[t]=e)}}reflectExternalProperties(e){this.ignoreAttributeUpdateObservations=!0;for(const[t,r]of Object.entries(e)){if(this.setExternalPropertyValue(t,r),!this.isConnected)continue;const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(t);if(this.self._propertiesToReflectAsAttributes?.has(t))switch(this.self._propertiesToReflectAsAttributes.get(t)){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":r?""!==this.getAttribute(e)&&this.setAttribute(e,""):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":break;case"json":if(r){const t=JSON.stringify(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":if("number"!=typeof r||isNaN(r))this.hasAttribute(e)&&this.removeAttribute(e);else{const t=String(r);this.getAttribute(e)!==t&&this.setAttribute(e,t)}break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":r?this.getAttribute(e)!==r&&this.setAttribute(e,r):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(r){const t=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e)}}this.ignoreAttributeUpdateObservations=!1}reflectProperties(e){if(this.reflectExternalProperties(e),this.instance?.current?.state&&"object"==typeof this.instance.current.state)for(const e of Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]))Object.prototype.hasOwnProperty.call(this.internalProperties,e)&&this.setInternalPropertyValue(e,void 0);this.internalProperties.model?.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(const t of this.self.controllableProperties)Object.prototype.hasOwnProperty.call(e,t)&&this.setInternalPropertyValue(t,e[t])}async reflectEventToProperties(e,t){const r=this.batchUpdates;this.batchUpdates=!1;let n=null,i=!1;if(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,e)&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(this.self.eventToPropertyMapping[e])){const r=this.self.eventToPropertyMapping[e](...t,this),s=r&&"then"in r&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(r.then)?await r:r;i=!0,Array.isArray(s)?(n=s[0],this.reflectProperties(n),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.extend)(!0,this.internalProperties,s[1])):null===s?i=!1:"object"==typeof s&&(n=s,this.reflectProperties(s))}if(!i&&t.length>0&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(t[0])){let e=t[0];if("persist"in t[0]&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(t[0].persist)){e={};for(const r of Object.keys(this.self.propertyTypes))for(const n of[r].concat(null!==(s=this.getPropertyAlias(r))&&void 0!==s?s:[])){var s;const r=t[0].currentTarget&&Object.prototype.hasOwnProperty.call(t[0].currentTarget,n)?t[0].currentTarget[n]:this.getPropertyValue(n);r!==this.externalProperties[n]&&(e[n]=r)}}else[null,void 0].includes(e.detail?.value)||(e={...e.detail});n=e,this.reflectProperties(e)}return this.triggerRender("propertyReflected"),this.batchUpdates=r,n}evaluateStringOrNullAndSetAsProperty(e,t){const r=e.startsWith("-"),n=r?e.substring(1):e;let i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n);const s=this.getPropertyAlias(i);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(i=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)){const n=this.self.propertyTypes[i];if(r){if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},!1,!0,this);r.error?(log.warn("Failed to process pre-evaluation attribute",`"${e}": ${r.error}. Will be`,'set to "undefined".'),this.setInternalPropertyValue(i,void 0)):(this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,r.result))}}else switch(n){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":{const e=![null,"false"].includes(t);this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":{let r,n=null;const s=["data","event","firstArgument","firstParameter","options","scope","parameters",...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_NAMES];if(t){const i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(t,s);n=i.error,r=i.templateFunction,n&&log.warn("Failed to compile given handler",`"${e}": ${n}.`)}this.setInternalPropertyValue(i,((...o)=>{let _;if(this.outputEventNames.has(i)&&this.reflectEventToProperties(i,o),!n)try{_=r?.call(this,o[0],o[0],o[0],o[0],o[0],o[0],o,...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_VALUES)}catch(r){log.warn("Failed to evaluate function",`"${e}" with expression`,`"${t}" and scope`,"variables",`"${s.join('", "')}" set to`,`"${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(o)}":`,`${r}. Set property`,'to "undefined".')}return this.self.renderProperties.includes(i)||this.forwardEvent(i,o),_})),n||this.setExternalPropertyValue(i,r);break}case"json":if(t){let r;try{r=JSON.parse(t)}catch(t){log.warn("Error occurred during parsing given json",`attribute "${e}":`,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t));break}this.setInternalPropertyValue(i,r),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r,!1,1))}else this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":{if(null===t){this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break}let e=parseFloat(t);isNaN(e)&&(e=void 0),this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOfType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{},!1,!0,this);if(r.error){log.warn("Error occurred during processing given",`attribute configuration "${e}":`,r.error);break}this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(i,!0),this.setExternalPropertyValue(i,!0)):(this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null))}}}async waitForNestedComponentRendering(){await Promise.all(this.childComponentInstances.map((e=>e.renderState.pending?e.renderState.promise:Promise.resolve())))}async resolveRenderingPromiseIfSet(e,t){t&&(await this.waitForNestedComponentRendering(),this.renderState.pending=!1,this.renderState.resolve(e),this.prepareNewRenderingPromise())}prepareNewRenderingPromise(){this.renderState.pending||(this.renderState.promise=new Promise((e=>{this.renderState.resolve=t=>{this.renderState.pending=!1,e(t)}})))}triggerRender(e){this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedUpdateRunning=!1,this.render(e)}))):this.render(e)}applyShadowRootIfNotExisting(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))}determineRenderScope(e={}){this.scope={...this.parentInstance?.scope||{},...this.scope,...this.internalProperties,parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this,[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(this.self._name)||"instance"]:this,...e},this.scope.scope=this.scope}async render(e="unknown",t=!0){if(this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(await Promise.all(this.self.pendingRenderPromises),this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(`\`${this.self.content}\``,this.scope);if(r.error)return log.warn(`Failed to process template: ${r.error}`),this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);this.applyShadowRootIfNotExisting();const n=document.createElement("div");n.innerHTML=r.result,this.applySlots(n,{...this.scope,parentInstance:this}),this.hostDomNode.innerHTML=n.innerHTML,await(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)(),this.waitForNestedComponentRendering().then((()=>{this.applyBindings(this.rootInstance.firstChild,this.scope,this.self.renderSlots)})),await this.resolveRenderingPromiseIfSet(e,t)}},_Web.applyRootBinding=!0,_Web.pendingRenderPromises=[],_Web.content="<slot>Please provide a template to transclude.</slot>",_Web.determineRootBinding=!0,_Web.shadowDOM=null,_Web.observedAttributes=[],_Web.controllableProperties=[],_Web.eventToPropertyMapping={},_Web.propertyAliases={},_Web.propertyTypes={onClick:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func},_Web.propertiesToReflectAsAttributes=[],_Web.renderProperties=["children"],_Web.cloneSlots=!1,_Web.evaluateSlots=!1,_Web.renderSlots=!0,_Web.trimSlots=!0,_Web.renderUnsafe=!1,_Web._name="BaseWeb",_Web._propertyAliasIndex=void 0,_Web._propertiesToReflectAsAttributes=void 0,_class=_Web,_descriptor=_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class.prototype,"isRoot",[_dec],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_class);const api={component:Web,register:(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(Web._name))=>{customElements.define(e,Web)}},Web_0=Web;return __webpack_exports__})()));
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","clientnode","clientnode/property-types","@babel/runtime/helpers/extends"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends")):t(e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e.clientnode,e["clientnode/property-types"],e["@babel/runtime/helpers/extends"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,((__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__2__)=>(()=>{var __webpack_modules__=[e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__0__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__1__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__2__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__3__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__4__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(module,__unused_webpack_exports,__webpack_require__){var __webpack_dirname__="/",e,t,r;if(module=__webpack_require__.nmd(module),null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&null!=__webpack_dirname__&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window=void 0===__webpack_require__.g||null===__webpack_require__.g?{}:__webpack_require__.g;module.exports=(e=__webpack_require__(2),t=__webpack_require__(0),r=__webpack_require__(1),function(){var n=[function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=r}],i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};s.r(o),s.d(o,{property:function(){return c}});var _=s(0),a=s.n(_),l=s(1),p=s(2);function c(e){return void 0===e&&(e={}),e=a()({readAttribute:!0,type:p.string},e),function(t,r){if("string"==typeof r){var n,i=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(i,"observedAttributes")||(i.observedAttributes=i.observedAttributes?[].concat(i.observedAttributes):[]);var s=(0,l.camelCaseToDelimited)(r);i.observedAttributes&&!i.observedAttributes.includes(s)&&i.observedAttributes.push(s)}e.type&&(Object.prototype.hasOwnProperty.call(i,"propertyTypes")||(i.propertyTypes=i.propertyTypes?a()({},i.propertyTypes):{}),!i.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(i,"propertiesToReflectAsAttributes")||(i.propertiesToReflectAsAttributes=i.propertiesToReflectAsAttributes?(0,l.copy)(i.propertiesToReflectAsAttributes):[]),(e.update||i.propertiesToReflectAsAttributes instanceof Map&&!i.propertiesToReflectAsAttributes.has(r)||Array.isArray(i.propertiesToReflectAsAttributes)&&!i.propertiesToReflectAsAttributes.includes(r)||"object"==typeof i.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(i.propertiesToReflectAsAttributes,r))&&("boolean"==typeof e.writeAttribute?e.writeAttribute&&i.propertyTypes&&Object.prototype.hasOwnProperty.call(i.propertyTypes,r)&&(n=i.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(i.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?i.propertiesToReflectAsAttributes.push(r):i.normalizePropertyTypeList&&(i.propertiesToReflectAsAttributes=i.normalizePropertyTypeList(i.propertiesToReflectAsAttributes))),i.propertiesToReflectAsAttributes instanceof Map&&i.propertiesToReflectAsAttributes.set(r,n),"object"==typeof i.propertiesToReflectAsAttributes&&(i.propertiesToReflectAsAttributes[r]=n)))),e.alias&&(Object.prototype.hasOwnProperty.call(i,"propertyAliases")||(i.propertyAliases=i.propertyAliases?a()({},i.propertyAliases):{}),!i.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyAliases[r]=e.alias))}}}return o.default=c,o}())}],__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{GenericHTMLElement:()=>GenericHTMLElement,Web:()=>Web,api:()=>api,default:()=>Web_0,log:()=>log});var _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__),clientnode__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),clientnode__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_3__),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__),_decorator__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),_decorator__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_decorator__WEBPACK_IMPORTED_MODULE_5__),_dec,_class,_descriptor,_Web;const log=new clientnode__WEBPACK_IMPORTED_MODULE_3__.Logger({name:"web-component-wrapper-web"}),GenericHTMLElement="undefined"==typeof HTMLElement?class{}:HTMLElement;let Web=(_dec=_decorator__WEBPACK_IMPORTED_MODULE_5___default()({type:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean,writeAttribute:!0}),_Web=class e extends GenericHTMLElement{constructor(){super(),this.renderState={promise:Promise.resolve(""),pending:!1,resolve:clientnode__WEBPACK_IMPORTED_MODULE_3__.NOOP},this.childComponentInstances=[],this.batchAttributeUpdates=!0,this.batchPropertyUpdates=!0,this.batchUpdates=!0,this.batchedAttributeUpdateRunning=!0,this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,this.parentInstance=null,this.rootInstance=void 0,this.hostDomNode=void 0,this.scope={...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},this.domNodeEventBindings=new Map,this.domNodeTemplateCache=new Map,this.externalProperties={},this.ignoreAttributeUpdateObservations=!1,this.internalProperties={},this.outputEventNames=new Set,this.instance=null,_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this,"isRoot",_descriptor,this),this.runDomConnectionAndRenderingInSameEventQueue=!1,this.self=e,this.slots={},this.prepareNewRenderingPromise(),this.self=this.constructor,this.self._propertiesToReflectAsAttributes||(this.self._propertiesToReflectAsAttributes=this.self.normalizePropertyTypeList(this.self.propertiesToReflectAsAttributes)),this.generateAliasIndex(),this.hostDomNode=this,this.rootInstance=this,this.defineGetterAndSetterInterface()}attributeChangedCallback(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)}onUpdateAttribute(e,t){this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedAttributeUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("attributeChanged")}))):this.render("attributeChanged")}connectedCallback(){try{this.isConnected=!0}catch{}this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.render("connected")}))}disconnectedCallback(){try{this.isConnected=!1}catch{}for(const e of this.domNodeEventBindings.values())for(const t of e.values())t();this.slots={}}defineGetterAndSetterInterface(){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[]));for(const t of e)Object.prototype.hasOwnProperty.call(this,t)&&this.setPropertyValue(t,this[t]),Object.defineProperty(this,t,{configurable:!0,get:()=>this.getPropertyValue(t),set:e=>{this.setPropertyValue(t,e),this.triggerPropertySpecificRendering(t,e)}})}getPropertyAlias(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null}getPropertyValue(t){const r=this.instance?.current?.properties&&(Object.prototype.hasOwnProperty.call(!e.propertyTypes,t)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,t))?this.instance.current.properties[t]:this.externalProperties[t];return this.instance?.current?.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,t)?this.instance.current.state[t]:r}setExternalPropertyValue(e,t){this.externalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)}setInternalPropertyValue(e,t){this.internalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)}setPropertyValue(e,t){this.reflectProperties({[e]:t}),this.setInternalPropertyValue(e,t)}triggerPropertySpecificRendering(e,t){if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{void 0!==t&&this.isStateProperty(e)?(this.render("preStatePropertyChanged"),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.setInternalPropertyValue(e,void 0),this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("postStatePropertyChanged"),this.triggerOutputEvents()}))):(this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("propertyChanged"),this.triggerOutputEvents())})));else{const r=this.isStateProperty(e);this.render(r?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&r&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}}applyBinding(e,t){if(e.getAttributeNames)for(const r of e.getAttributeNames()){let n;if(r.startsWith("data-bind-")?n=r.substring(10):r.startsWith("bind-")&&(n=r.substring(5)),n){const i=e.getAttribute(r);if(null===i)continue;if(n.startsWith("attribute-")||n.startsWith("property-")){const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(i,t,!1,!0,e);if(s.error){log.warn("Error occurred during processing given",`attribute binding "${r}" on node:`,e,s.error);continue}n.startsWith("attribute-")?e.setAttribute(n.substring(10),s.result):e[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(9))]=s.result}else if(n.startsWith("on-")){n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(3)),t={log,event:void 0,parameters:void 0,...t};const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(i,t,!0,!0,e);s.error?log.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,s.error):this.addSecureEventListener(e,n,((...n)=>{t.event=n[0],t.parameters=n;try{s.templateFunction(...s.originalScopeNames.map((e=>t[e])))}catch(t){log.warn("Error occurred during processing","given event binding",`"${r}" on node:`,e,`Given expression "${i}" could`,"not be evaluated with given scope",'names "'+s.scopeNames.join('", "')+`": ${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t)}`)}}))}}}}applyBindings(e,t,r=!0){for(;e;)!e.attributes?.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}compileDomNodeTemplate(e,t=[],r={}){r={ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r};const n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){let r=e.innerHTML;if(!r&&e.template&&(r=e.template),this.self.hasCode(r)){const n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${r}\``,t);return{domNode:e,children:[],error:n.error,scopeNames:n.scopeNames,template:r,templateFunction:n.templateFunction}}return null}let i=null;if("#text"===n){const t=e.textContent;t&&this.self.hasCode(t)&&(i=t.replace(/ /g," ").trim())}const s=[],o={children:s,domNode:e};if(i){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${i}\``,t);o.error=e.error,o.scopeNames=e.scopeNames,o.template=i,o.templateFunction=e.templateFunction}let _=e.firstChild;for(;_;){if(!r.filter||r.filter(_)){const e=this.compileDomNodeTemplate(_,t,{...r,ignoreComponents:r.ignoreNestedComponents});e&&s.push(e)}_=_.nextSibling}return o}evaluateCompiledDomNodeTemplate(e,t){const{domNode:r,error:n,templateFunction:i,scopeNames:s}=e;if(!i||!s)return null;if(n)return log.warn("Error occurred during compiling node content:",n),null;let o=null;try{o=i(...s.map((e=>t[e])))}catch(n){log.warn(`Error occurred when "${this.self._name}" is running`,`"${String(i)}": with bound`,`names "${s.join('", "')}":`,`"${n}". Rendering node:`,r)}return o}evaluateDomNodeTemplate(e,t={},r={}){const n=(r={domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r}).domNodeTemplateCache;if(!n.has(e)){const i={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,i);s&&n.set(e,s)}if(n.has(e)){const i=n.get(e),s=this.evaluateCompiledDomNodeTemplate(i,t);if(null!==s&&(r.unsafe&&e.innerHTML?e.innerHTML=s:e.textContent=s),i.children.length){const e=r=>{for(const n of r){const r=this.evaluateCompiledDomNodeTemplate(n,t);null!==r&&(n.domNode.textContent=r),n.children.length&&e(n.children)}};e(i.children)}}r.applyBindings&&this.applyBindings(e,t)}addSecureEventListener(e,t,r,n,i){this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);const s=this.domNodeEventBindings.get(e),o=s?.get(t);o&&o!==r&&o(),s?.set(t,(()=>{e.removeEventListener(t,r,i),s.delete(t),0===s.size&&this.domNodeEventBindings.delete(e)})),e.addEventListener(t,r,n)}determineRootBinding(){let t=this.parentNode;for(;t;){const r=t instanceof e||t.nodeName.includes("-")&&"#document-fragment"!==t.nodeName,n=null===t.parentNode&&"[object ShadowRoot]"===t.toString();r?(this.rootInstance===this&&(this.parentInstance=t,this.setPropertyValue("isRoot",!1)),this.rootInstance=t):n&&this.setPropertyValue("isRoot",!1),t=t.parentNode}}static hasCode(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)}static normalizePropertyTypeList(t){if("string"==typeof t&&(t=[t]),Array.isArray(t)){const r=t,n=new Map;for(const t of r)Object.prototype.hasOwnProperty.call(e.propertyTypes,t)&&n.set(t,e.propertyTypes[t]);return n}return(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.convertPlainObjectToMap)(t)}attachEventHandler(){if(null===this.self.eventToPropertyMapping)return;const e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}attachExplicitDefinedOutputEventHandler(){if(!this.self.eventToPropertyMapping)return!1;let e=!1;for(const t of Object.keys(this.self.eventToPropertyMapping))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||(e=!0,this.outputEventNames.add(t),this.setInternalPropertyValue(t,(async(...e)=>{const r=await this.reflectEventToProperties(t,e);r&&(e[0]=r),this.forwardEvent(t,e)})));return e}attachImplicitDefinedOutputEventHandler(e=!0){for(const[t,r]of Object.entries(this.self.propertyTypes))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||![clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func,"function"].includes(r)||this.self.renderProperties.includes(t)||(this.outputEventNames.add(t),this.setInternalPropertyValue(t,((...r)=>{e&&this.reflectEventToProperties(t,r),this.forwardEvent(t,r)})))}triggerOutputEvents(){for(const e of this.outputEventNames)this.forwardEvent(e,[this.externalProperties])}forwardEvent(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))}applySlots(t,r){for(const n of Array.from(t.querySelectorAll("slot"))){const t=n.getAttribute("name");if(null===t||"default"===t)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(const e of this.slots.default)this.evaluateDomNodeTemplate(e,r);(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots.default,e.trimSlots)}}else this.slots.default=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).map((e=>this.grabSlotContent(e)));else this.slots[t]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[t],r),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots[t],e.trimSlots)):this.slots[t]=this.grabSlotContent((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).filter((e=>"#text"!==e.nodeName.toLowerCase()))[0])}}grabSlotContent(e){const t=clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node.firstElementChild?e:null;if(t&&"textarea"===t.firstElementChild?.nodeName.toLowerCase()&&(!t.firstElementChild.hasAttribute("data-no-template")||"false"===t.firstElementChild.getAttribute("data-no-template"))){const e=t.firstElementChild.value;t.classList.remove("web-component-template");const r=t.cloneNode();return t.classList.add("web-component-template"),r.innerHTML="",r.template=e,r}return this.self.cloneSlots?e.cloneNode(!0):e}grabGivenSlots(){this.slots={};for(const e of Array.from(this.querySelectorAll("[slot]"))){let t=e.parentNode,r=!0;for(;t;){if(t.nodeName.includes("-")){t===this&&(r=!1);break}t=t.parentNode}if(r)continue;const n=e.getAttribute("slot")?.trim();this.slots[null!=n?n:e.nodeName.toLowerCase()]=this.grabSlotContent(e)}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((e=>this.grabSlotContent(e))):this.slots.default=[]}isStateProperty(e){return Boolean(this.instance?.current?.state&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))}generateAliasIndex(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex={...this.self.propertyAliases};for(const[e,t]of Object.entries(this.self._propertyAliasIndex))Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,t)||(this.self._propertyAliasIndex[t]=e)}}reflectExternalProperties(e){this.ignoreAttributeUpdateObservations=!0;for(const[t,r]of Object.entries(e)){if(this.setExternalPropertyValue(t,r),!this.isConnected)continue;const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(t);if(this.self._propertiesToReflectAsAttributes?.has(t))switch(this.self._propertiesToReflectAsAttributes.get(t)){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":r?""!==this.getAttribute(e)&&this.setAttribute(e,""):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":break;case"json":if(r){const t=JSON.stringify(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":if("number"!=typeof r||isNaN(r))this.hasAttribute(e)&&this.removeAttribute(e);else{const t=String(r);this.getAttribute(e)!==t&&this.setAttribute(e,t)}break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":r?this.getAttribute(e)!==r&&this.setAttribute(e,r):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(r){const t=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e)}}this.ignoreAttributeUpdateObservations=!1}reflectProperties(e){if(this.reflectExternalProperties(e),this.instance?.current?.state&&"object"==typeof this.instance.current.state)for(const e of Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]))Object.prototype.hasOwnProperty.call(this.internalProperties,e)&&this.setInternalPropertyValue(e,void 0);this.internalProperties.model?.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(const t of this.self.controllableProperties)Object.prototype.hasOwnProperty.call(e,t)&&this.setInternalPropertyValue(t,e[t])}async reflectEventToProperties(e,t){const r=this.batchUpdates;this.batchUpdates=!1;let n=null,i=!1;if(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,e)&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(this.self.eventToPropertyMapping[e])){const r=this.self.eventToPropertyMapping[e](...t,this),s=r&&"then"in r&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(r.then)?await r:r;i=!0,Array.isArray(s)?(n=s[0],this.reflectProperties(n),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.extend)(!0,this.internalProperties,s[1])):null===s?i=!1:"object"==typeof s&&(n=s,this.reflectProperties(s))}if(!i&&t.length>0&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(t[0])){let e=t[0];if("persist"in t[0]&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(t[0].persist)){e={};for(const r of Object.keys(this.self.propertyTypes))for(const n of[r].concat(null!==(s=this.getPropertyAlias(r))&&void 0!==s?s:[])){var s;const r=t[0].currentTarget&&Object.prototype.hasOwnProperty.call(t[0].currentTarget,n)?t[0].currentTarget[n]:this.getPropertyValue(n);r!==this.externalProperties[n]&&(e[n]=r)}}else[null,void 0].includes(e.detail?.value)||(e={...e.detail});n=e,this.reflectProperties(e)}return this.triggerRender("propertyReflected"),this.batchUpdates=r,n}evaluateStringOrNullAndSetAsProperty(e,t){const r=e.startsWith("-"),n=r?e.substring(1):e;let i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n);const s=this.getPropertyAlias(i);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(i=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)){const n=this.self.propertyTypes[i];if(r){if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},!1,!0,this);r.error?(log.warn("Failed to process pre-evaluation attribute",`"${e}": ${r.error}. Will be`,'set to "undefined".'),this.setInternalPropertyValue(i,void 0)):(this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,r.result))}}else switch(n){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":{const e=![null,"false"].includes(t);this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":{let r,n=null;const s=["data","event","firstArgument","firstParameter","options","scope","parameters",...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_NAMES];if(t){const i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(t,s);n=i.error,r=i.templateFunction,n&&log.warn("Failed to compile given handler",`"${e}": ${n}.`)}this.setInternalPropertyValue(i,((...o)=>{let _;if(this.outputEventNames.has(i)&&this.reflectEventToProperties(i,o),!n)try{_=r?.call(this,o[0],o[0],o[0],o[0],o[0],o[0],o,...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_VALUES)}catch(r){log.warn("Failed to evaluate function",`"${e}" with expression`,`"${t}" and scope`,"variables",`"${s.join('", "')}" set to`,`"${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(o)}":`,`${r}. Set property`,'to "undefined".')}return this.self.renderProperties.includes(i)||this.forwardEvent(i,o),_})),n||this.setExternalPropertyValue(i,r);break}case"json":if(t){let r;try{r=JSON.parse(t)}catch(t){log.warn("Error occurred during parsing given json",`attribute "${e}":`,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t));break}this.setInternalPropertyValue(i,r),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r,!1,1))}else this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":{if(null===t){this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break}let e=parseFloat(t);isNaN(e)&&(e=void 0),this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOfType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{},!1,!0,this);if(r.error){log.warn("Error occurred during processing given",`attribute configuration "${e}":`,r.error);break}this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(i,!0),this.setExternalPropertyValue(i,!0)):(this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null))}}}async waitForNestedComponentRendering(){await Promise.all(this.childComponentInstances.map((e=>e.renderState.pending?e.renderState.promise:Promise.resolve())))}async resolveRenderingPromiseIfSet(e,t){t&&(await this.waitForNestedComponentRendering(),this.renderState.pending=!1,this.renderState.resolve(e),this.prepareNewRenderingPromise())}prepareNewRenderingPromise(){this.renderState.pending||(this.renderState.promise=new Promise((e=>{this.renderState.resolve=t=>{this.renderState.pending=!1,e(t)}})))}triggerRender(e){this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedUpdateRunning=!1,this.render(e)}))):this.render(e)}applyShadowRootIfNotExisting(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))}determineRenderScope(e={}){this.scope={...this.parentInstance?.scope||{},...this.scope,...this.internalProperties,parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this,[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(this.self._name)||"instance"]:this,...e},this.scope.scope=this.scope}async render(e="unknown",t=!0){if(this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(await this.resolveRenderingPromiseIfSet(e,t),t&&(await Promise.all(this.self.pendingRenderPromises),this.self.pendingRenderPromises=[])),this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),!this.self.doRender||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return void await this.resolveRenderingPromiseIfSet(e,t);const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(`\`${this.self.content}\``,this.scope);if(r.error)return log.warn(`Failed to process template: ${r.error}`),this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);this.applyShadowRootIfNotExisting();const n=document.createElement("div");n.innerHTML=r.result,this.applySlots(n,{...this.scope,parentInstance:this}),this.hostDomNode.innerHTML=n.innerHTML,await(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)(),this.waitForNestedComponentRendering().then((()=>{this.applyBindings(this.hostDomNode.firstChild,this.scope,this.self.renderSlots)})),await this.resolveRenderingPromiseIfSet(e,t)}},_Web.applyRootBinding=!0,_Web.pendingRenderPromises=[],_Web.content="<slot>Please provide a template to transclude.</slot>",_Web.determineRootBinding=!0,_Web.shadowDOM=null,_Web.observedAttributes=[],_Web.controllableProperties=[],_Web.eventToPropertyMapping={},_Web.propertyAliases={},_Web.propertyTypes={onClick:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func},_Web.propertiesToReflectAsAttributes=[],_Web.renderProperties=["children"],_Web.doRender=!1,_Web.cloneSlots=!1,_Web.evaluateSlots=!1,_Web.renderSlots=!0,_Web.trimSlots=!0,_Web.renderUnsafe=!1,_Web._name="BaseWeb",_Web._propertyAliasIndex=void 0,_Web._propertiesToReflectAsAttributes=void 0,_class=_Web,_descriptor=_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class.prototype,"isRoot",[_dec],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_class);const api={component:Web,register:(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(Web._name))=>{customElements.define(e,Web)}},Web_0=Web;return __webpack_exports__})()));
|