@benbraide/inlinejs-stripe 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/inlinejs-stripe.js +172 -44
- package/dist/inlinejs-stripe.min.js +1 -1
- package/package.json +3 -3
package/dist/inlinejs-stripe.js
CHANGED
@@ -59,8 +59,13 @@ class CustomElement extends HTMLElement {
|
|
59
59
|
}
|
60
60
|
}
|
61
61
|
UpdateComponentProperty(value) {
|
62
|
-
var _a
|
63
|
-
|
62
|
+
var _a;
|
63
|
+
const component = (0,_benbraide_inlinejs__WEBPACK_IMPORTED_MODULE_0__.FindComponentById)(this.componentId_);
|
64
|
+
if (component) {
|
65
|
+
value = (value || '').trim();
|
66
|
+
(_a = component.FindScopeByRoot(this)) === null || _a === void 0 ? void 0 : _a.SetName(value);
|
67
|
+
component.GetRoot() === this && component.SetName(value);
|
68
|
+
}
|
64
69
|
}
|
65
70
|
AddResource(resource) {
|
66
71
|
this.resources_.push(resource);
|
@@ -473,6 +478,7 @@ class ResourceTargetElement extends _element__WEBPACK_IMPORTED_MODULE_2__.Custom
|
|
473
478
|
this.sequential = false;
|
474
479
|
this.defer = false;
|
475
480
|
this.onloaded = '';
|
481
|
+
this.onloadederror = '';
|
476
482
|
}
|
477
483
|
UpdateAttributesProperty(value) {
|
478
484
|
this.attributes_ = value;
|
@@ -481,11 +487,18 @@ class ResourceTargetElement extends _element__WEBPACK_IMPORTED_MODULE_2__.Custom
|
|
481
487
|
const wasLoaded = this.loadedResources_;
|
482
488
|
return new Promise((resolve, reject) => {
|
483
489
|
super.LoadResources().then((data) => {
|
484
|
-
!wasLoaded && this.onloaded && this.EvaluateExpression(this.onloaded, {
|
490
|
+
!wasLoaded && this.onloaded && (0,_benbraide_inlinejs__WEBPACK_IMPORTED_MODULE_0__.JournalTry)(() => this.EvaluateExpression(this.onloaded, {
|
485
491
|
disableFunctionCall: false,
|
486
|
-
|
492
|
+
contexts: { data },
|
493
|
+
}));
|
487
494
|
resolve(data);
|
488
|
-
}).catch(
|
495
|
+
}).catch((reason) => {
|
496
|
+
this.onloadederror && (0,_benbraide_inlinejs__WEBPACK_IMPORTED_MODULE_0__.JournalTry)(() => this.EvaluateExpression(this.onloadederror, {
|
497
|
+
disableFunctionCall: false,
|
498
|
+
contexts: { reason },
|
499
|
+
}));
|
500
|
+
reject(reason);
|
501
|
+
});
|
489
502
|
});
|
490
503
|
}
|
491
504
|
LoadTargetResources() {
|
@@ -520,6 +533,9 @@ __decorate([
|
|
520
533
|
__decorate([
|
521
534
|
(0,_decorators_property__WEBPACK_IMPORTED_MODULE_1__.Property)({ type: 'string' })
|
522
535
|
], ResourceTargetElement.prototype, "onloaded", void 0);
|
536
|
+
__decorate([
|
537
|
+
(0,_decorators_property__WEBPACK_IMPORTED_MODULE_1__.Property)({ type: 'string' })
|
538
|
+
], ResourceTargetElement.prototype, "onloadederror", void 0);
|
523
539
|
function ResourceTargetElementCompact() {
|
524
540
|
(0,_utilities_register__WEBPACK_IMPORTED_MODULE_3__.RegisterCustomElement)(ResourceTargetElement, 'resource-target');
|
525
541
|
}
|
@@ -949,6 +965,8 @@ class BaseComponent extends _changes_monitor__WEBPACK_IMPORTED_MODULE_11__.Chang
|
|
949
965
|
super();
|
950
966
|
this.id_ = id_;
|
951
967
|
this.root_ = root_;
|
968
|
+
this.isDestroying_ = false;
|
969
|
+
this.isDestroyed_ = false;
|
952
970
|
this.reactiveState_ = 'default';
|
953
971
|
this.name_ = '';
|
954
972
|
this.proxyAccessHandler_ = null;
|
@@ -1025,6 +1043,33 @@ class BaseComponent extends _changes_monitor__WEBPACK_IMPORTED_MODULE_11__.Chang
|
|
1025
1043
|
});
|
1026
1044
|
}, ['add', 'remove', 'attribute']);
|
1027
1045
|
}
|
1046
|
+
Destroy() {
|
1047
|
+
if (this.isDestroying_ || this.isDestroyed_) {
|
1048
|
+
return;
|
1049
|
+
}
|
1050
|
+
this.isDestroying_ = true;
|
1051
|
+
this.reactiveState_ = 'default';
|
1052
|
+
this.name_ = '';
|
1053
|
+
this.proxyAccessHandler_ = null;
|
1054
|
+
this.context_.Purge();
|
1055
|
+
(0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => this.changes_.Destroy());
|
1056
|
+
Object.values(this.scopes_).forEach(scope => (0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => scope.Destroy()));
|
1057
|
+
this.scopes_ = {};
|
1058
|
+
Object.values(this.elementScopes_).forEach(scope => (0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => scope.Destroy()));
|
1059
|
+
this.elementScopes_ = {};
|
1060
|
+
(0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => this.rootProxy_.Destroy());
|
1061
|
+
this.refs_ = {};
|
1062
|
+
Object.values(this.proxies_).forEach(proxy => (0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => proxy.Destroy()));
|
1063
|
+
this.proxies_ = {};
|
1064
|
+
this.currentScope_.Purge();
|
1065
|
+
this.selectionScopes_.Purge();
|
1066
|
+
this.uniqueMarkers_ = (0,_utilities_unique_markers__WEBPACK_IMPORTED_MODULE_9__.GetDefaultUniqueMarkers)();
|
1067
|
+
this.attributeObservers_ = [];
|
1068
|
+
Object.values(this.observers_.intersections).forEach(observer => (0,_journal_try__WEBPACK_IMPORTED_MODULE_4__.JournalTry)(() => observer.Destroy()));
|
1069
|
+
this.observers_.intersections = {};
|
1070
|
+
this.isDestroyed_ = true;
|
1071
|
+
this.isDestroying_ = false;
|
1072
|
+
}
|
1028
1073
|
SetReactiveState(state) {
|
1029
1074
|
this.NotifyListeners_('reactive-state', (this.reactiveState_ = state));
|
1030
1075
|
}
|
@@ -1657,6 +1702,19 @@ class Changes extends _changes_monitor__WEBPACK_IMPORTED_MODULE_3__.ChangesMonit
|
|
1657
1702
|
}
|
1658
1703
|
this.NotifyListeners_('subscribers', this.subscribers_);
|
1659
1704
|
}
|
1705
|
+
Destroy() {
|
1706
|
+
this.componentId_ = '';
|
1707
|
+
this.nextTickHandlers_.splice(0);
|
1708
|
+
this.nextIdleHandlers_.splice(0);
|
1709
|
+
this.nextNonIdleHandlers_.splice(0);
|
1710
|
+
this.isScheduled_ = false;
|
1711
|
+
this.isIdle_ = true;
|
1712
|
+
this.list_.splice(0);
|
1713
|
+
this.subscribers_ = {};
|
1714
|
+
this.lastAccessContext_ = '';
|
1715
|
+
this.getAccessStorages_.Purge();
|
1716
|
+
this.origins_.Purge();
|
1717
|
+
}
|
1660
1718
|
Unsubscribe_(id) {
|
1661
1719
|
delete this.subscribers_[id];
|
1662
1720
|
}
|
@@ -1684,6 +1742,11 @@ class Context {
|
|
1684
1742
|
Push(key, value) {
|
1685
1743
|
(this.record_[key] = (this.record_[key] || new _stack__WEBPACK_IMPORTED_MODULE_0__.Stack())).Push(value);
|
1686
1744
|
}
|
1745
|
+
Purge() {
|
1746
|
+
const record = this.record_;
|
1747
|
+
this.record_ = {};
|
1748
|
+
return record;
|
1749
|
+
}
|
1687
1750
|
Pop(key, noResult) {
|
1688
1751
|
return (this.record_.hasOwnProperty(key) ? this.record_[key].Pop() : (noResult || null));
|
1689
1752
|
}
|
@@ -2326,8 +2389,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
2326
2389
|
|
2327
2390
|
|
2328
2391
|
|
2329
|
-
function InsertHtml({ element, html, type = 'replace', component, processDirectives = true, afterRemove, afterInsert, afterTransitionCallback, transitionScope }) {
|
2392
|
+
function InsertHtml({ element, html, type = 'replace', component, processDirectives = true, beforeRemove, afterRemove, beforeInsert, afterInsert, afterTransitionCallback, transitionScope, useTransition }) {
|
2330
2393
|
const componentId = ((typeof component === 'string') ? component : ((component === null || component === void 0 ? void 0 : component.GetId()) || '')), insert = () => {
|
2394
|
+
if ((beforeInsert && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(beforeInsert, 'InlineJS.InsertHtml', element)) === false) {
|
2395
|
+
return;
|
2396
|
+
}
|
2331
2397
|
const tmpl = document.createElement('template');
|
2332
2398
|
tmpl.innerHTML = html;
|
2333
2399
|
if (type === 'replace' || type === 'append') {
|
@@ -2336,7 +2402,7 @@ function InsertHtml({ element, html, type = 'replace', component, processDirecti
|
|
2336
2402
|
else if (type === 'prepend') { //Insert before child nodes
|
2337
2403
|
element.prepend(...Array.from(tmpl.content.childNodes));
|
2338
2404
|
}
|
2339
|
-
|
2405
|
+
afterInsert && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(afterInsert, 'InlineJS.InsertHtml', element);
|
2340
2406
|
const resolvedComponent = (0,_find__WEBPACK_IMPORTED_MODULE_4__.FindComponentById)(componentId);
|
2341
2407
|
if (processDirectives && resolvedComponent) {
|
2342
2408
|
Array.from(element.children).forEach(child => (0,_directive_process__WEBPACK_IMPORTED_MODULE_0__.ProcessDirectives)({
|
@@ -2349,38 +2415,44 @@ function InsertHtml({ element, html, type = 'replace', component, processDirecti
|
|
2349
2415
|
},
|
2350
2416
|
}));
|
2351
2417
|
}
|
2352
|
-
if (afterTransitionCallback) {
|
2418
|
+
if (afterTransitionCallback || useTransition) {
|
2353
2419
|
(transitionScope || element).dispatchEvent(new CustomEvent('html.transition.begin', { detail: { insert: true } }));
|
2354
2420
|
(0,_directive_transition__WEBPACK_IMPORTED_MODULE_1__.WaitTransition)({ componentId,
|
2355
2421
|
contextElement: (transitionScope || element),
|
2356
2422
|
target: element,
|
2357
2423
|
callback: () => {
|
2358
2424
|
(transitionScope || element).dispatchEvent(new CustomEvent('html.transition.end', { detail: { insert: true } }));
|
2359
|
-
afterTransitionCallback();
|
2425
|
+
afterTransitionCallback && afterTransitionCallback();
|
2360
2426
|
},
|
2361
2427
|
});
|
2362
2428
|
}
|
2363
2429
|
};
|
2430
|
+
const destroyOffspring = (el) => {
|
2431
|
+
const resolvedComponent = (0,_find__WEBPACK_IMPORTED_MODULE_4__.FindComponentById)(componentId), global = (0,_global_get__WEBPACK_IMPORTED_MODULE_2__.GetGlobal)();
|
2432
|
+
Array.from(el.children).forEach((child) => {
|
2433
|
+
var _a;
|
2434
|
+
let elementScope = resolvedComponent === null || resolvedComponent === void 0 ? void 0 : resolvedComponent.FindElementScope(child);
|
2435
|
+
if (elementScope || (elementScope = (_a = global.InferComponentFrom(child)) === null || _a === void 0 ? void 0 : _a.FindElementScope(child))) {
|
2436
|
+
elementScope.Destroy();
|
2437
|
+
}
|
2438
|
+
else {
|
2439
|
+
destroyOffspring(child);
|
2440
|
+
}
|
2441
|
+
});
|
2442
|
+
};
|
2443
|
+
const remove = () => {
|
2444
|
+
if ((beforeRemove && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(() => beforeRemove(false), 'InlineJS.InsertHtml', element)) === false) {
|
2445
|
+
return;
|
2446
|
+
}
|
2447
|
+
destroyOffspring(element);
|
2448
|
+
Array.from(element.childNodes).forEach(child => child.remove());
|
2449
|
+
afterRemove && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(afterRemove, 'InlineJS.InsertHtml', element);
|
2450
|
+
};
|
2364
2451
|
if (type === 'replace' && element.childNodes.length != 0) { //Remove all child nodes
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
let elementScope = resolvedComponent === null || resolvedComponent === void 0 ? void 0 : resolvedComponent.FindElementScope(child);
|
2370
|
-
if (elementScope || (elementScope = (_a = global.InferComponentFrom(child)) === null || _a === void 0 ? void 0 : _a.FindElementScope(child))) {
|
2371
|
-
elementScope.Destroy();
|
2372
|
-
}
|
2373
|
-
else {
|
2374
|
-
destroyOffspring(child);
|
2375
|
-
}
|
2376
|
-
});
|
2377
|
-
};
|
2378
|
-
const remove = () => {
|
2379
|
-
destroyOffspring(element);
|
2380
|
-
Array.from(element.childNodes).forEach(child => child.remove());
|
2381
|
-
(afterRemove && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(afterRemove, 'InlineJS.InsertHtml', element));
|
2382
|
-
};
|
2383
|
-
if (afterTransitionCallback) {
|
2452
|
+
if ((beforeRemove && (0,_journal_try__WEBPACK_IMPORTED_MODULE_3__.JournalTry)(() => beforeRemove(true), 'InlineJS.InsertHtml', element)) === false) {
|
2453
|
+
return;
|
2454
|
+
}
|
2455
|
+
if (afterTransitionCallback || useTransition) {
|
2384
2456
|
(transitionScope || element).dispatchEvent(new CustomEvent('html.transition.begin', { detail: { insert: false } }));
|
2385
2457
|
(0,_directive_transition__WEBPACK_IMPORTED_MODULE_1__.WaitTransition)({ componentId,
|
2386
2458
|
contextElement: (transitionScope || element),
|
@@ -2549,7 +2621,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
2549
2621
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
2550
2622
|
/* harmony export */ Scope: () => (/* binding */ Scope)
|
2551
2623
|
/* harmony export */ });
|
2552
|
-
/* harmony import */ var
|
2624
|
+
/* harmony import */ var _journal_try__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../journal/try */ "./node_modules/@benbraide/inlinejs/lib/esm/journal/try.js");
|
2625
|
+
/* harmony import */ var _proxy_root__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../proxy/root */ "./node_modules/@benbraide/inlinejs/lib/esm/proxy/root.js");
|
2626
|
+
|
2553
2627
|
|
2554
2628
|
class Scope {
|
2555
2629
|
constructor(componentId_, id_, root_) {
|
@@ -2557,7 +2631,7 @@ class Scope {
|
|
2557
2631
|
this.id_ = id_;
|
2558
2632
|
this.root_ = root_;
|
2559
2633
|
this.name_ = '';
|
2560
|
-
this.proxy_ = new
|
2634
|
+
this.proxy_ = new _proxy_root__WEBPACK_IMPORTED_MODULE_1__.RootProxy(this.componentId_, {}, this.id_);
|
2561
2635
|
}
|
2562
2636
|
GetComponentId() {
|
2563
2637
|
return this.componentId_;
|
@@ -2596,6 +2670,13 @@ class Scope {
|
|
2596
2670
|
let realIndex = (index || 0);
|
2597
2671
|
return this.FindElement(target, () => (realIndex-- == 0));
|
2598
2672
|
}
|
2673
|
+
Destroy() {
|
2674
|
+
this.componentId_ = '';
|
2675
|
+
this.id_ = '';
|
2676
|
+
this.name_ = '';
|
2677
|
+
this.root_ = document.createElement('div');
|
2678
|
+
(0,_journal_try__WEBPACK_IMPORTED_MODULE_0__.JournalTry)(() => this.proxy_.Destroy());
|
2679
|
+
}
|
2599
2680
|
}
|
2600
2681
|
|
2601
2682
|
|
@@ -5186,7 +5267,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
5186
5267
|
function InitializeVersion() {
|
5187
5268
|
(0,_utilities_get_global_scope__WEBPACK_IMPORTED_MODULE_0__.InitializeGlobalScope)('version', {
|
5188
5269
|
major: 1,
|
5189
|
-
minor:
|
5270
|
+
minor: 3,
|
5190
5271
|
patch: 1,
|
5191
5272
|
get value() {
|
5192
5273
|
return `${this.major}.${this.minor}.${this.patch}`;
|
@@ -5540,6 +5621,13 @@ class IntersectionObserver {
|
|
5540
5621
|
this.handlers_ = this.handlers_.filter(info => (info.target === target));
|
5541
5622
|
(_a = this.observer_) === null || _a === void 0 ? void 0 : _a.unobserve(target);
|
5542
5623
|
}
|
5624
|
+
Destroy() {
|
5625
|
+
var _a;
|
5626
|
+
this.handlers_.forEach(({ target }) => { var _a; return (_a = this.observer_) === null || _a === void 0 ? void 0 : _a.unobserve(target); });
|
5627
|
+
this.handlers_ = [];
|
5628
|
+
(_a = this.observer_) === null || _a === void 0 ? void 0 : _a.disconnect();
|
5629
|
+
this.observer_ = null;
|
5630
|
+
}
|
5543
5631
|
}
|
5544
5632
|
|
5545
5633
|
|
@@ -5649,6 +5737,13 @@ class MutationObserver {
|
|
5649
5737
|
delete this.handlers_[target];
|
5650
5738
|
}
|
5651
5739
|
}
|
5740
|
+
Destroy() {
|
5741
|
+
var _a;
|
5742
|
+
this.uniqueMarkers_ = (0,_utilities_unique_markers__WEBPACK_IMPORTED_MODULE_3__.GetDefaultUniqueMarkers)();
|
5743
|
+
this.handlers_ = {};
|
5744
|
+
(_a = this.observer_) === null || _a === void 0 ? void 0 : _a.disconnect();
|
5745
|
+
this.observer_ = null;
|
5746
|
+
}
|
5652
5747
|
}
|
5653
5748
|
|
5654
5749
|
|
@@ -5698,6 +5793,12 @@ class ResizeObserver {
|
|
5698
5793
|
this.handlers_ = this.handlers_.filter(info => (info.target === target));
|
5699
5794
|
(_a = this.observer_) === null || _a === void 0 ? void 0 : _a.unobserve(target);
|
5700
5795
|
}
|
5796
|
+
Destroy() {
|
5797
|
+
var _a;
|
5798
|
+
this.handlers_ = [];
|
5799
|
+
(_a = this.observer_) === null || _a === void 0 ? void 0 : _a.disconnect();
|
5800
|
+
this.observer_ = null;
|
5801
|
+
}
|
5701
5802
|
}
|
5702
5803
|
|
5703
5804
|
|
@@ -6056,6 +6157,14 @@ class GenericProxy {
|
|
6056
6157
|
FindChild(name) {
|
6057
6158
|
return (this.children_.hasOwnProperty(name) ? this.children_[name] : null);
|
6058
6159
|
}
|
6160
|
+
Destroy() {
|
6161
|
+
this.componentId_ = '';
|
6162
|
+
this.name_ = '';
|
6163
|
+
this.target_ = null;
|
6164
|
+
this.parentPath_ = '';
|
6165
|
+
this.native_ = null;
|
6166
|
+
this.children_ = {};
|
6167
|
+
}
|
6059
6168
|
}
|
6060
6169
|
|
6061
6170
|
|
@@ -6357,6 +6466,9 @@ class Stack {
|
|
6357
6466
|
Push(value) {
|
6358
6467
|
this.list_.push(value);
|
6359
6468
|
}
|
6469
|
+
Purge() {
|
6470
|
+
return this.list_.splice(0);
|
6471
|
+
}
|
6360
6472
|
Pop() {
|
6361
6473
|
return ((this.list_.length == 0) ? null : this.list_.pop());
|
6362
6474
|
}
|
@@ -7168,24 +7280,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
7168
7280
|
/* harmony import */ var _values_loop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../values/loop */ "./node_modules/@benbraide/inlinejs/lib/esm/values/loop.js");
|
7169
7281
|
|
7170
7282
|
|
7171
|
-
function CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration) {
|
7283
|
+
function CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration, resolution = 1) {
|
7172
7284
|
let aborted = false, abort = () => (aborted = true), repeated = 0, computeSteps = (elapsed) => (delay ? Math.floor(elapsed / delay) : elapsed);
|
7173
|
-
let startTimestamp = performance.now(), lastTimestamp = startTimestamp,
|
7285
|
+
let startTimestamp = performance.now(), lastTimestamp = startTimestamp, requests = 0;
|
7286
|
+
const call = (doWhile, doFinal, doAbort) => {
|
7287
|
+
requestNextLoop((timestamp) => {
|
7288
|
+
if (resolution > 1) {
|
7289
|
+
if (requests % resolution === 0) {
|
7290
|
+
pass(doWhile, doFinal, doAbort, timestamp);
|
7291
|
+
}
|
7292
|
+
else {
|
7293
|
+
call(doWhile, doFinal, doAbort);
|
7294
|
+
}
|
7295
|
+
}
|
7296
|
+
else {
|
7297
|
+
pass(doWhile, doFinal, doAbort, timestamp);
|
7298
|
+
}
|
7299
|
+
});
|
7300
|
+
};
|
7301
|
+
const pass = (doWhile, doFinal, doAbort, timestamp) => {
|
7174
7302
|
if (aborted) {
|
7303
|
+
doAbort();
|
7175
7304
|
return;
|
7176
7305
|
}
|
7177
7306
|
const elapsed = (timestamp - startTimestamp);
|
7178
7307
|
if (duration && elapsed >= duration) { //Finished
|
7179
7308
|
if (repeats && (repeats < 0 || repeated < repeats)) { //Repeat
|
7309
|
+
requests = 0; //Reset requests
|
7180
7310
|
const offset = (elapsed - duration);
|
7181
7311
|
if (repeatDelay > 0 && offset < repeatDelay) { //Continue after delay
|
7182
7312
|
setTimeout(() => {
|
7183
7313
|
startTimestamp = performance.now(); //Reset start timestamp
|
7184
|
-
|
7314
|
+
call(doWhile, doFinal, doAbort);
|
7185
7315
|
}, (repeatDelay - offset));
|
7186
7316
|
}
|
7187
7317
|
else { //No delay
|
7188
|
-
|
7318
|
+
call(doWhile, doFinal, doAbort);
|
7189
7319
|
}
|
7190
7320
|
repeated += 1; //Increment repeats
|
7191
7321
|
startTimestamp = timestamp; //Reset start timestamp
|
@@ -7196,7 +7326,7 @@ function CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration) {
|
|
7196
7326
|
}
|
7197
7327
|
}
|
7198
7328
|
else { //Continue
|
7199
|
-
|
7329
|
+
call(doWhile, doFinal, doAbort);
|
7200
7330
|
const progress = (timestamp - lastTimestamp);
|
7201
7331
|
if (progress >= delay) { //Call
|
7202
7332
|
lastTimestamp = (timestamp + (delay ? (progress % delay) : progress)); //Update last timestamp
|
@@ -7204,12 +7334,10 @@ function CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration) {
|
|
7204
7334
|
}
|
7205
7335
|
}
|
7206
7336
|
};
|
7207
|
-
return new _values_loop__WEBPACK_IMPORTED_MODULE_1__.Loop((doWhile, doFinal) =>
|
7208
|
-
requestNextLoop(pass.bind(null, doWhile, doFinal));
|
7209
|
-
});
|
7337
|
+
return new _values_loop__WEBPACK_IMPORTED_MODULE_1__.Loop((doWhile, doFinal, doAbort) => call(doWhile, doFinal, doAbort));
|
7210
7338
|
}
|
7211
7339
|
const knownPeriods = [50, 40, 30, 25, 20, 15, 10, 5, 4, 3, 2, 1, 0];
|
7212
|
-
function CreateLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0, vsync = true) {
|
7340
|
+
function CreateLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0, vsync = true, resolution = 1) {
|
7213
7341
|
let period = 0, suitableDelay = Math.floor(delay / 2.2);
|
7214
7342
|
for (const knownPeriod of knownPeriods) {
|
7215
7343
|
if (knownPeriod <= suitableDelay) {
|
@@ -7220,10 +7348,10 @@ function CreateLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0, vsync
|
|
7220
7348
|
const requestNextLoop = (callback) => setTimeout(() => {
|
7221
7349
|
vsync ? requestAnimationFrame(callback) : callback(performance.now());
|
7222
7350
|
}, period);
|
7223
|
-
return CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration);
|
7351
|
+
return CreateLoop_(requestNextLoop, delay, repeats, repeatDelay, duration, resolution);
|
7224
7352
|
}
|
7225
|
-
function CreateAnimationLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0) {
|
7226
|
-
return CreateLoop_(requestAnimationFrame, delay, repeats, repeatDelay, duration);
|
7353
|
+
function CreateAnimationLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0, resolution = 1) {
|
7354
|
+
return CreateLoop_(requestAnimationFrame, delay, repeats, repeatDelay, duration, resolution);
|
7227
7355
|
}
|
7228
7356
|
|
7229
7357
|
|
@@ -8307,7 +8435,7 @@ exports.InlineJSStripe = InlineJSStripe;
|
|
8307
8435
|
/******/
|
8308
8436
|
/************************************************************************/
|
8309
8437
|
var __webpack_exports__ = {};
|
8310
|
-
// This entry
|
8438
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
8311
8439
|
(() => {
|
8312
8440
|
var exports = __webpack_exports__;
|
8313
8441
|
/*!********************************!*\
|
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";var e={16:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>b,NativeElement:()=>NativeElement,NativeElementCompact:()=>d,Property:()=>c,Register:()=>f,RegisterCustomElement:()=>s,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>p,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>_});var i=n(988);function s(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const r=(0,i.RandomString)();function o(){return r}function l(){return(0,i.GetGlobalScope)(`customProperties.${r}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,s){let r="",o=null;(void 0!==(null==e?void 0:e.initial)||!s&&(null==e?void 0:e.update))&&(e.initial=e.initial||t[n],o="boolean"===e.type?(e,t)=>{e&&"false"!==e?t.setAttribute(r,r):t.hasAttribute(r)&&t.removeAttribute(r)}:(e,t)=>{t.setAttribute(r,e)});let c=null,u={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:(null==e?void 0:e.initial)||void 0,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(s){if("function"==typeof s.value&&!s.get&&!s.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(s.value.name))){const t=s.value;r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||s.value.name.replace(/^Update(.+)Property/,"$1")),c=(e,n)=>t.call(n,e)}}else r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),c=(e,t)=>t[n]=e;if(r&&c){u.name=r,u.handler=c;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(u)}}}var u=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class CustomElement extends HTMLElement{constructor(e={}){if(super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none"),!(this.options_.disableImplicitData||"InlineJS"in globalThis&&(0,i.IsObject)(globalThis.InlineJS)&&globalThis.InlineJS.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t,n;null===(n=null===(t=(0,i.FindComponentById)(this.componentId_))||void 0===t?void 0:t.FindScopeByRoot(this))||void 0===n||n.SetName(e.trim())}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,s=new Array,r=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?s.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?s.push(e.GetResource()):s.push(e)})),s.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:s,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?r([]):Promise.all(n).then(r).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let s;return this.storedProxyAccessHandler_((()=>s=e(t,n,i))),s}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(t),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{e.initial&&e.setInitial&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>{this.nativeElement_=null,this.storedProxyAccessHandler_=null}))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const s=this.FindProperty_(e),r=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(s){let o=null;if(s.checkStoredObject&&t){if(t===r)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(s.handler):(0,i.JournalTry)((()=>s.handler(this.DecodeValue_(t,s.type||"string",s.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function d(){s(NativeElement)}var h=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function p(){s(ResourceElement,"resource")}h([c({type:"string"})],ResourceElement.prototype,"src",void 0),h([c({type:"string"})],ResourceElement.prototype,"type",void 0);var m=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1}),t(n)})).catch(n)}))}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function _(){s(ResourceTargetElement,"resource-target")}function f(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function b(){(0,i.WaitForGlobal)().then((()=>{d(),p(),_()}))}m([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),m([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),m([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0)},988:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Ee,AddDirectiveExpansionRule:()=>nt,AddDirectiveHandler:()=>Ut,AddMagicHandler:()=>on,AddOutsideEventExcept:()=>vt,AddOutsideEventListener:()=>bt,ApplyDirectiveExpansionRules:()=>st,AreObjects:()=>d,AttributeInterpolator:()=>Jt,AutoBootstrap:()=>qt,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>r,BindDirectiveExpansionRule:()=>an,BindEvent:()=>Zt,BootstrapAndAttach:()=>zt,BuildGetterProxyOptions:()=>we,BuildIntersectionOptions:()=>tn,BuildProxyOptions:()=>Ne,CallIfFunction:()=>ze,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>cn,ComponentCacheKey:()=>O,Config:()=>Config,Context:()=>Context,ContextKeys:()=>g,CreateAnimationLoop:()=>oe,CreateChildProxy:()=>xe,CreateDirective:()=>ot,CreateDirectiveExpansionRule:()=>tt,CreateDirectiveHandlerCallback:()=>Kt,CreateGlobal:()=>Ft,CreateInplaceProxy:()=>Ge,CreateLoop:()=>re,CreateMagicHandlerCallback:()=>ln,CreateReadonlyProxy:()=>ke,DecodeAttribute:()=>$,DecodeValue:()=>T,DeepCopy:()=>B,DefaultTransitionDelay:()=>Ot,DefaultTransitionDuration:()=>It,DefaultTransitionRepeats:()=>Gt,DeleteProxyProp:()=>Ae,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>Re,DispatchDirective:()=>ct,ElementScope:()=>ElementScope,ElementScopeKey:()=>C,EncodeAttribute:()=>W,EncodeValue:()=>J,EndsWith:()=>z,EvaluateLater:()=>Ue,EvaluateMagicProperty:()=>Se,ExtractDuration:()=>nn,FindAncestor:()=>q,FindAncestorByAttribute:()=>K,FindAncestorByAttributeValue:()=>V,FindAncestorByClass:()=>U,FindAncestorByTagName:()=>Y,FindCacheValue:()=>b,FindComponentById:()=>R,FindComponentByName:()=>N,FindComponentByRoot:()=>w,FindFirstAttribute:()=>X,FindFirstAttributeValue:()=>ee,FlattenDirective:()=>at,ForwardEvent:()=>Vt,Future:()=>Future,GenerateFunctionFromString:()=>qe,GenerateUniqueId:()=>Ce,GenerateValueReturningFunction:()=>Je,GenerateVoidFunction:()=>We,GenericProxy:()=>GenericProxy,GetAttribute:()=>Q,GetCache:()=>_,GetConfig:()=>et,GetDefaultCacheValue:()=>G,GetDefaultUniqueMarkers:()=>ye,GetDirectiveValue:()=>Qt,GetElementContent:()=>Mt,GetElementScopeId:()=>S,GetElementScopeIdWithElement:()=>E,GetGlobal:()=>P,GetGlobalScope:()=>h,GetLocal:()=>At,GetOrCreateGlobal:()=>jt,GetProxyProp:()=>Pe,GetTarget:()=>l,GetTargets:()=>a,GlobalCreatedEvent:()=>x,IncrementUniqueMarkers:()=>ve,InferComponent:()=>F,InitCache:()=>m,InitComponentCache:()=>k,InitJITProxy:()=>je,InitializeDev:()=>hn,InitializeGlobal:()=>pn,InitializeGlobalScope:()=>p,InitializeUtilities:()=>mn,InitializeValues:()=>_n,InitializeVersion:()=>fn,InlineJS:()=>bn,InlineJSGlobalKey:()=>A,InsertHtml:()=>Nt,Interpolate:()=>Bt,InterpolateText:()=>$t,IntersectionObserver:()=>IntersectionObserver,IsBooleanAttribute:()=>te,IsEqual:()=>ne,IsInsideTemplate:()=>be,IsObject:()=>u,IsTemplate:()=>fe,JoinPath:()=>he,JoinUniqueMarkers:()=>ge,JournalError:()=>i,JournalLog:()=>dn,JournalTry:()=>s,JournalWarn:()=>lt,LazyCheck:()=>rn,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>le,MergeObjects:()=>ae,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>un,PathToRelative:()=>ue,PeekCurrentComponent:()=>Te,PeekCurrentScope:()=>St,PeekStoredObject:()=>D,PopCurrentComponent:()=>De,PopCurrentScope:()=>Et,ProcessDirectives:()=>dt,ProxyKeys:()=>o,PushCurrentComponent:()=>Le,PushCurrentScope:()=>Ct,QueryGlobalComponent:()=>Pt,RandomString:()=>pe,RemoveDirectiveExpansionRule:()=>it,RemoveOutsideEventListener:()=>yt,ReplaceText:()=>Ht,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>Xt,ResolveOptions:()=>sn,ResolveTransition:()=>kt,RetrieveStoredObject:()=>L,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>me,SetCacheValue:()=>f,SetProxyAccessHandler:()=>Ye,SetProxyProp:()=>Ie,SplitPath:()=>de,Stack:()=>Stack,StoreProxyHandler:()=>Ze,StreamData:()=>Ke,SubscribeToChanges:()=>Qe,SupportsAttributes:()=>M,TextContentInterpolator:()=>Wt,TidyPath:()=>ce,ToCamelCase:()=>v,ToSnakeCase:()=>_e,ToString:()=>H,TraverseDirectives:()=>ut,UnbindOutsideEvent:()=>gt,UseCache:()=>y,UseEffect:()=>Xe,WaitForGlobal:()=>I,WaitPromise:()=>Me,WaitTransition:()=>Rt,WaitWhile:()=>Ve});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}function r(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}const o={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function l(e){return(Array.isArray(e)||e&&"object"==typeof e)&&o.target in e?l(e[o.target]):e}function a(e){return e.map((e=>l(e)))}function c(e){return(e=l(e))&&"object"==typeof e&&(o.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function u(e){return!!c(e)}function d(e){return-1==e.findIndex((e=>!c(e)))}function h(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return e&&(e=e.trim()),e&&e.split(".").forEach((e=>{n=n[e]=n[e]||{}})),!t||u(n)?n:{}}function p(e,t){const n=h(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return h("cache")[e]="function"==typeof t?t():t}function _(e,t){const n=h("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function f(e,t,n,i){const s=_(e,i);s&&"object"==typeof s&&(s[t]=n)}function b(e,t){const n=e in globalThis&&globalThis[e]||null;return n&&"object"==typeof n&&t in n?n[t]:void 0}function y(e,t,n,i,s){let r=_(t,i);if(r){const[e,t]=s?s(r):[r,r];if(e===n)return t}return m(t,r=e()),s?s(r)[1]:r}function v(e,t,n){const[i="",...s]=e.trim().split(n||"-"),r=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?r(i):i)+(s||[]).map((e=>r(e))).join("")}const g={self:"self",event:"event",scope:"scope"},C="__InlineJS_ELSCOPE_KEY__";function E(e){for(;e;){const n=C in(t=e)&&"string"==typeof t[C]?t[C]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function S(e){const[t]=E(e);return t||""}const A="__InlineJS_GLOBAL_KEY__",x="inlinejs.global.created";function P(){return h("global").base||null}function I(){return P()?Promise.resolve():new Promise((e=>window.addEventListener(x,e)))}const O="component";function G(){return{id:"",component:null}}function k(){m(O,{id:"",component:null})}function R(e){return y((()=>{const t=P().FindComponentById(e);return{id:t?e:"",component:t}}),O,e,G,(e=>[e.id,e.component]))}function N(e){return P().FindComponentByName(e)}function w(e){return P().FindComponentByRoot(e)}function F(e){const t=S(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}var j=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function L(e){var{key:t}=e,n=j(e,["key"]);const i=P().RetrieveObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function D(e){var{key:t}=e,n=j(e,["key"]);const i=P().PeekObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function T(e,t,n){var i;return L({key:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function M(e){return(e=l(e))&&"getAttribute"in e&&"setAttribute"in e}function H(e){return e=l(e),P().IsFuture(e)?H(e.Get()):!e&&!1!==e&&0!==e||P().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function $(e,t,n){const i=t&&M(e)?e.getAttribute(t):null;return i?T(i,n,e):H(i)}function B(e){if(e=l(e),!Array.isArray(e)&&!u(e))return e;if(Array.isArray(e))return e.map((e=>B(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=B(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?H(e):P().StoreObject({object:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function W(e,t,n,i){(!t||!M(e))&&e.setAttribute(t,J(n,i,e))}function z(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function q(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function U(e,t){return q(e,(e=>e.classList.contains(t)))}function K(e,t){return q(e,(e=>e.hasAttribute(t)))}function V(e,t,n){return q(e,(e=>e.getAttribute(t)===n))}function Y(e,t){return q(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function Z(e,t){return t&&M(e)?e.getAttribute(t):null}function Q(e,t){for(const n of Array.isArray(t)?t:[t]){const t=Z(e,n);if(t)return t}return null}function X(e,t){if(!M(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ee(e,t){const n=X(e,t);return n?n.value:null}function te(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return P().GetConfig().IsBooleanAttribute(t)}function ne(e,t,n=!0){const[i,s]=n?a([e,t]):[e,t];if(i===s)return!0;if(Array.isArray(i)&&Array.isArray(s))return i.length==s.length&&-1==i.findIndex(((e,t)=>!ne(e,s[t],n)));if(d([i,s])){const e=Object.keys(i),t=Object.keys(s);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!ne(i[e],s[e],n)))}return i==s}function ie(e,t,n,i,r){let o=!1,l=()=>o=!0,a=0,c=e=>t?Math.floor(e/t):e,u=performance.now(),d=u,h=(p,m,_)=>{if(o)return;const f=_-u;if(r&&f>=r)if(n&&(n<0||a<n)){const t=f-r;i>0&&t<i?setTimeout((()=>{u=performance.now(),e(h.bind(null,p,m))}),i-t):e(h.bind(null,p,m)),a+=1,u=_,d=_}else s((()=>m({repeats:a,steps:r?c(r):-1,elapsed:f,duration:r})));else{e(h.bind(null,p,m));const n=_-d;n>=t&&(d=_+(t?n%t:n),s((()=>p({repeats:a,steps:c(f),elapsed:f,duration:r,abort:l}))))}};return new Loop(((t,n)=>{e(h.bind(null,t,n))}))}const se=[50,40,30,25,20,15,10,5,4,3,2,1,0];function re(e,t=1e3,n=0,i=0,s=!0){let r=0,o=Math.floor(t/2.2);for(const e of se)if(e<=o){r=e;break}return ie((e=>setTimeout((()=>{s?requestAnimationFrame(e):e(performance.now())}),r)),t,n,i,e)}function oe(e,t=1e3,n=0,i=0){return ie(requestAnimationFrame,t,n,i,e)}function le(e){const t=performance.now();return e(),performance.now()-t}function ae(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function ce(e){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")):""}function ue(e,t,n){return(e=ce(e))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function de(e,t,n){const i=(e=t?ue(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function he({base:e,query:t},n,i,s){let r=`${ce(e)}?${t}`;return r=n?ue(r,n,i):ce(r),r=s?ce(`${n}/${r}`):r.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(r)?r:`/${r}`,r}function pe(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function me(e,t,n){t&&M(e)&&e.setAttribute(t,n)}function _e(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function fe(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function be(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&fe(t))return!0;return!1}function ye(){return{level0:0,level1:0,level2:0}}function ve(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?ve(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function ge(e){return`${e.level2}_${e.level1}_${e.level0}`}function Ce(e,t,n,i){return ve(e),`${t||""}${n||""}${ge(e)}${i||""}`}function Ee(e,t,n,i,s=!0){if(!i)return;const r={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(r),!s)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:r,path:o.join(".")})}function Se(e,t,n,r="",o=!0){const l="string"==typeof e?R(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),P().CreateNothing();let a=r&&n.startsWith(r)?n.substring(r.length):n;const c=P().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return P().CreateNothing();const e=r&&n.startsWith(`${r}${r}`)||!1;a=e?a.substring(r.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=N(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=F(t)||R(e);if(!i)return null;const s=i.FindElementScope(t),o=s&&s.GetLocal(n.substring(r.length));return s&&!P().IsNothing(o)?o:Se(i.GetId(),t,n,`${r}${r}`,!1)}}return P().CreateNothing()}return s((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Ae(e,t,n,i){var s;if(!(i in t))return!1;const r=R(e);return null===(s=null==r?void 0:r.FindProxy(n))||void 0===s||s.RemoveChild(i),delete t[i],null==r||r.RemoveProxy(`${n}.${i}`),Ee("delete",n,i,null==r?void 0:r.GetBackend().changes),!0}function xe(e,t,n,i){if(!e)return null;const s=e.FindChild(t);if(s)return s;if(!Array.isArray(n)&&!u(n))return null;const r=P().CreateChildProxy(e,t,n);return i&&i.AddProxy(r),r}function Pe(e,t,n,i,s){var r;switch(i){case o.target:return t;case o.componentId:return e;case o.name:return n.split(".").at(-1);case o.path:return n;case o.parentPath:return n.split(".").slice(0,-1).join(".")||""}const l=i in t;if(!l&&s){const t=s(R(e)||void 0,i);if(!P().IsNothing(t))return P().IsFuture(t)?t.Get():t}if(l&&!t.hasOwnProperty(i))return t[i];const a=l?t[i]:null;if(P().IsFuture(a))return a.Get();const c=R(e);return null==c||c.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(r=xe((null==c?void 0:c.FindProxy(n))||null,i,a,c||void 0))||void 0===r?void 0:r.GetNative())||a}function Ie(e,t,n,i,s){var r;if(i in t&&s===t[i])return!0;const o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),t[i]=s,null==o||o.RemoveProxy(`${n}.${i}`),Ee("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,r=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!r,a=this.GetPath(),c=(e,t)=>{const{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),P().CreateNothing());if(!P().IsNothing(e))return e}const s=n.Peek(g.self),r=null==e?void 0:e.FindElementLocalValue(s||e.GetRoot(),t,!0);if(!P().IsNothing(r))return r;const o=i?Se(e,s,t,"$"):P().CreateNothing();return t&&P().IsNothing(o)&&P().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,d={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Get?i.Get(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&P().GetConfig().GetWrapScopedFunctions()){const n=P().FindComponentById(o),i=null==n?void 0:n.FindScopeById(r||""),l=e[t];i&&P().PushScopeContext(i);const a=s((()=>(...e)=>l(...e)));return i&&P().PopScopeContext(),a}return Pe(o,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const s=null===(i=P().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),r=s&&s.Set?s.Set(t,n,e):P().CreateNothing();if(!P().IsNothing(r))return r}return Ie(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Delete?i.Delete(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return Ae(o,e,a,t.toString())},has(e,t){var n;if(u&&"symbol"!=typeof t){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Has?i.Has(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return"symbol"!=typeof t||Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,d)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var Oe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function Ge({target:e,getter:t,setter:n,deleter:i,lookup:s,alert:r}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const s=t?t(n.toString(),e):e[n];return P().IsNothing(s)?Reflect.get(e,n):(!r||r.list&&!(n in r.list)||null===(i=R(r.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${r.id}.${n}`),s)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):!!delete e[t]||!0,has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(s)?s.includes(t.toString()):s?s(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function ke(e){return Ge(we({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Re(){return!1}function Ne(e){var{setter:t,deleter:n,lookup:i}=e,s=Oe(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},s),{setter:t||Re,deleter:n||Re,lookup:i||Re})}function we(e){return Ne(e)}const Fe="InlineJS_ProxyGlobal";function je(e,t,n){const i=null==t?void 0:t.FindElementScope(n),s=null==i?void 0:i.GetId();if(!s)return["",null,null];const r=globalThis[Fe]=globalThis[Fe]||{},o=r[e]=r[e]||{};return s in o?[s,o[s],o]:(null==i||i.AddUninitCallback((()=>delete o[s])),[s,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function Le(e){P().PushCurrentComponent(e)}function De(){return P().PopCurrentComponent()}function Te(){return P().PeekCurrentComponent()}function Me(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>Me(e,t,!0))):e.then(t)}const He="__InlineJS_Context__",$e="InlineJS_Func_Cache";function Be(e,t,n,s=!1){const r=b($e,t);if(r)return r;try{const n=new Function(He,`\n with (${He}){\n ${e(t)};\n };\n `);return f($e,t,n,{}),n}catch(e){if(s||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Je(e,t,n=!1){return Be((e=>`return (${e})`),e,t,n)}function We(e,t,n=!1){return Be((e=>e),e,t,n)}function ze(e,t,n,i=[]){var s;if("function"==typeof e){const r=R(n||""),o=null==r?void 0:r.FindProxy(null==r?void 0:r.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(s=o||(null==r?void 0:r.GetRootProxy()))||void 0===s?void 0:s.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function qe({componentId:e,contextElement:t,expression:n,disableFunctionCall:s=!1,waitPromise:r="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Je(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=We(n,e,!0)))return l;const u=(o,l,a,c,u=!0,d)=>{var h;const p=R(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(h=null==p?void 0:p.FindElementScope(t))||void 0===h?void 0:h.IsDestroyed()))return;const{context:_=null,changes:f=null}=(null==p?void 0:p.GetBackend())||{};null==_||_.Push(g.self,t),null==f||f.ResetLastAccessContext(),Le(e),Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Push(e,t)));try{let t=l(m);if(P().IsFuture(t)&&(t=t.Get()),!o)return s?t:ze(t,o,e,a);const n=e=>{if(e&&"none"!==r)return Me(e,o,"recursive"===r),d||"Loading data...";o(e)};s?n(t):ze(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Pop(e,t))),De(),null==_||_.Pop(g.self)}};return(s,r=[],o,d)=>{try{return u(s,a.bind(t),r||[],o||{},void 0,d)}catch(d){if(d instanceof SyntaxError&&!c)return c=!0,a=We(n,e,!0),a?u(s,a.bind(t),r||[],o||{},!1):l(s);i(d,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(s)}}function Ue(e){return qe(e)}function Ke(e,t){const n=(e,t)=>Me(e,t,!0);return e instanceof Loop?new Loop(((i,s)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>s(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function Ve(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function Ye(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?R(e):e;if(!i)return()=>{};const s=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(s)}function Ze(e){var t;const n=null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=Ye(e,n||null);s(t),i()}}function Qe({componentId:e,changes:t,callback:n,subscriptionsCallback:s,contextElement:r}){var o,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();const{optimized:u,raw:d}=t.PopGetAccessStorage();if(0==((null===(o=u||d)||void 0===o?void 0:o.entries.length)||0))return s&&s({}),null;let h={},p=()=>{Object.keys(h).map((e=>R(e))).filter((e=>!!e)).forEach((e=>{const{changes:t}=e.GetBackend();h[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),h={}},m=!1,_=()=>{m=!0};const f=t=>{const s=R(e);if(!s||m)return void p();const{changes:r}=s.GetBackend();r.PushOrigin(f);try{n({changes:t||[],cancel:_})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},b={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(b[e.path]=b[e.path]||{})[e.compnentId]=!0)),Object.entries(b).forEach((([e,t])=>{Object.keys(t).map((e=>R(e))).filter((e=>!!e)).forEach((t=>{(h[t.GetId()]=h[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,f))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{_(),p()}))),s&&s(h),p}function Xe({componentId:e,callback:t,contextElement:n,options:s,subscriptionsCallback:r}){var o;const l=Ze(e),a=()=>{const s=R(e);if(!s)return;let o=!1;const{changes:a}=s.GetBackend(),c=n?s.FindElementScope(n):null,u=()=>{o=!0},d=null==c?void 0:c.GetElement();try{a.PushGetAccessStorage(),t({changes:[],cancel:u})}catch(t){i(t,`InlineJS.Component<${e}>.UseEffect`,d)}if(o)return a.PopAllGetAccessStorageSnapshots(!1),a.RestoreOptimizedGetAccessStorage(),void a.PopGetAccessStorage();Qe({componentId:e,changes:a,callback:e=>l((()=>t(e))),subscriptionsCallback:r,contextElement:d})};(null==s?void 0:s.nextTick)?null===(o=R(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function et(){return P().GetConfig()}function tt(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function nt(e){return P().GetDirectiveManager().AddExpansionRule(e)}function it(e){P().GetDirectiveManager().RemoveExpansionRule(e)}function st(e){return P().GetDirectiveManager().Expand(e)}let rt={};function ot(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in rt)return{meta:rt[e],value:t,proxyAccessHandler:n};const i=st(e),s=i.match(et().GetDirectiveRegex());if(!s||3!=s.length||!s[2])return null;const r=s[2].indexOf(":");let o=-1==r?[s[2]]:[s[2].substring(0,r),s[2].substring(r+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";l?u=c[0]:l=c[0],c.splice(0,1);const d=l.split("-"),h={view:{original:e,expanded:i},name:{value:l,joined:d.join("."),parts:d},arg:{key:u,options:c||[]}};return rt[e]=h,{meta:h,value:t,proxyAccessHandler:n}}function lt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function at(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function ct(e,t,n,r=0){const o="string"==typeof e?R(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++r),l=l||P().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return lt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=Ye(o,n.proxyAccessHandler||null);return 0==r&&!a&&o.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},at(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ut({element:e,callback:t,attributeCallback:n,proxyAccessHandler:s}){Array.from(e.attributes||[]).forEach((r=>{try{n&&n(r.name,r.value||"");const e=ot(r.name,r.value||"",s);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function dt({component:e,element:t,options:n={},proxyAccessHandler:s}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!be(e))}(t,n))return;const r="string"==typeof e?R(e):e;if(!r)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let o=0;ut({element:t,proxyAccessHandler:s,callback:n=>{ct(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>P().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:s,componentId:r.GetId(),component:r,contextElement:t})}),P().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t,proxyAccessHandler:s}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&r.CreateElementScope(t);const l=r.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=r.GetId(),c=()=>{const i=R(a);if(i&&!n.ignoreChildren&&!fe(t)){i.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},r=(t,i)=>dt({component:e,proxyAccessHandler:s,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>r(e,e.contains(t)))):Array.from(t.children).forEach((e=>r(e,e.contains(t)))),i.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>s((()=>n({target:e,object:()=>B(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new Stack,this.origins_=new Stack}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Array;0!=this.list_.length&&(this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{const i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),this.NotifyListeners_("list",this.list_)),0!=e.length?(this.isIdle_&&(this.isIdle_=!1,0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_))),e.forEach((e=>e.callback(e.changes))),0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()):this.isIdle_||(this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)))})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return B(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,s;const r=(null===(t=R(Te()||""))||void 0===t?void 0:t.GetBackend().changes)||this,o=e.lastIndexOf(".");r.lastAccessContext_=-1==o?"":e.substring(0,o);const l=r.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(s=l.details.raw)||void 0===s?void 0:s.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e,this.NotifyListeners_("last-access-context",this.list_),r.NotifyListeners_("get-access-storages",this.getAccessStorages_))}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_="",this.NotifyListeners_("last-access-context",this.lastAccessContext_)}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new Stack}:void 0,raw:{entries:new Array,snapshots:new Stack}},lastAccessPath:""}),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorage(){var e;const t=(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null;return this.NotifyListeners_("get-access-storages",this.getAccessStorages_),t}SwapOptimizedGetAccessStorage(){const e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries,this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}RestoreOptimizedGetAccessStorage(){var e;const t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushGetAccessStorageSnapshot(){var e,t;const n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e)))),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorageSnapshot(e){var t,n,i,s;const r=this.getAccessStorages_.Peek(),o=null===(t=null==r?void 0:r.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&o&&(null===(n=null==r?void 0:r.details.optimized)||void 0===n?void 0:n.entries)&&(r.details.optimized.entries=o);const l=null===(i=null==r?void 0:r.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(s=null==r?void 0:r.details.raw)||void 0===s?void 0:s.entries)&&(r.details.raw.entries=l),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopAllGetAccessStorageSnapshots(e){var t,n,i,s,r,o;const l=this.getAccessStorages_.Peek();let a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.snapshots.Pop();for(;(null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.entries)&&(l.details.raw.entries=c),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t},this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e),this.NotifyListeners_("subscribers",this.subscribers_)}Unsubscribe_(e){delete this.subscribers_[e]}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var ht=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function pt(e,t,n){const i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=ht(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function mt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=P().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=mt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:s,callback:r}=mt(t,n);s&&r&&(this.handlers_[e]=pt(i,s,r))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const _t="InlineJS_OutsideEvent";function ft(){return globalThis[_t]=globalThis[_t]||{targetScopes:new Array,eventCallbacks:{}}}function bt(e,t,n){let i=ft(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function yt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function vt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){const s=i.listeners[e].handlers.find((e=>e.callback===n));s&&(s.excepts=s.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{s.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function gt(e){ft().targetScopes=ft().targetScopes.filter((t=>t.target!==e&&!e.contains(t.target)))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1}}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:P().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:P().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)){const t=R(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,gt(this.element_),P().GetMutationObserver().Unobserve(this.element_);const t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[C],this.isRoot_){const e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>P().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,P().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const r=R(e);if(!r)return;const o=new Array,l=P().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&s((()=>e.callback(t)))})),o.forEach((e=>dt({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!r.FindElementScope(e)){dt({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?et().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=P().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],s=i.GetRoot();if(s===e)return i;!s.contains(e)||n&&!n.GetRoot().contains(s)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[C]=n.GetId();const i=t=>{const n=X(e,[et().GetDirectiveName(t,!1),et().GetDirectiveName(t,!0)]);if(n){const t=ot(n.name,n.value);t&&ct(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&s((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_;return t&&C in t&&"string"==typeof t[C]&&t[C]in this.elementScopes_?this.elementScopes_[t[C]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!s)return null;const r=this.FindAncestor(s);return r?this.FindElementLocal(r,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),s=i?i.GetLocal(t):P().CreateNothing();if(!P().IsNothing(s)||!n||!i&&"string"==typeof e)return s;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!r)return s;const o=this.FindAncestor(r);return o?this.FindElementLocalValue(o,t,!0):s}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return P()}}function Ct(e,t){var n;null===(n="string"==typeof e?R(e):e)||void 0===n||n.PushCurrentScope(t)}function Et(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function St(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function At(e,t,n,i={}){var s;let r=null;if(r=e instanceof HTMLElement?(null===(s="string"==typeof n?R(n):n)||void 0===s?void 0:s.FindElementScope(e))||null:e,!r)return i;let o=r.GetLocal(t);return P().IsNothing(o)&&r.SetLocal(t,o=i),o}const xt="__InlineJS_GLOBAL_COMPONENT_KEY__";function Pt(e){const t=globalThis[xt];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[xt]={root:n,component:P().CreateComponent(n)},globalThis[xt]}const It=300,Ot=0,Gt=0;function kt(e,t){if(!e||P().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=P().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||It,delay:e.delay||Ot,repeats:e.repeats||Gt,allowed:e.allowed||"both"}}function Rt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,d,h,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:l,allowRepeats:a});const _=kt((null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d?void 0:d.GetData("transition"))||null,l||!1);if(!_||!_.actor||!_.ease||"number"!=typeof _.duration||_.duration<=0)return i(!1),null;const f=e=>{var t;return"function"==typeof(null==_?void 0:_.actor)?null==_?void 0:_.actor(e):_&&(null===(t=_.actor)||void 0===t?void 0:t.Handle(e))},b=e=>{var t;return"function"==typeof _.ease?_.ease(e):_&&(null===(t=_.ease)||void 0===t?void 0:t.Handle(e))||0};let y=!1,v=0;const g=()=>y=!0,C=e=>l?1-e:e,E=()=>{var n,i;return null===(i=null===(n=R(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(g),m.dispatchEvent(new CustomEvent("transition.canceled")),r&&s((()=>r())),!1},S=(e,t,n)=>{o&&s((()=>o({duration:_.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(h=R(e))||void 0===h?void 0:h.FindElementScope(t))||void 0===p||p.AddUninitCallback(g);const A=_.duration,x=e=>{const t=C(e/A),n=b({duration:A,elapsed:e,fraction:t}),i=0==v++?"start":"middle";f({duration:A,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),S(i,e,n)};return x(0),oe(A,0,a?_.repeats:0,_.delay).While((({elapsed:e})=>{if(y)return E();0==v&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),x(e)})).Final((()=>{if(y)E();else{const e=C(1);f({duration:A,elapsedFraction:e,elapsed:A,target:m,stage:"end",fraction:b({duration:_.duration,elapsed:_.duration,fraction:e}),reverse:!!l}),S("end",_.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0)))}})),g}function Nt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterRemove:o,afterInsert:l,afterTransitionCallback:a,transitionScope:c}){const u="string"==typeof i?i:(null==i?void 0:i.GetId())||"",d=()=>{const i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),l&&s(l,"InlineJS.InsertHtml",e);const o=R(u);r&&o&&Array.from(e.children).forEach((e=>dt({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),a&&((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Rt({componentId:u,contextElement:c||e,target:e,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),a()}}))};if("replace"===n&&0!=e.childNodes.length){const t=e=>{const n=R(u),i=P();Array.from(e.children).forEach((e=>{var s;let r=null==n?void 0:n.FindElementScope(e);r||(r=null===(s=i.InferComponentFrom(e))||void 0===s?void 0:s.FindElementScope(e))?r.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),o&&s(o,"InlineJS.InsertHtml",e)};a?((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Rt({componentId:u,contextElement:c||e,target:e,reverse:!0,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n(),d()}})):(n(),d())}else d()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=Ze(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",s=null;"function"==typeof e?(i=t||"",s=e):(i=e.GetName(),s=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:s,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const s=S((null===(t=F(e))||void 0===t?void 0:t.GetRoot())||null);s?n(s).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const s=e.target instanceof HTMLElement?S((null===(t=F(e.target))||void 0===t?void 0:t.GetRoot())||null):"";s&&n(s).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?S((null===(i=F(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?S(n.target):"";if(!i||!(i in t))return;const r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(o||l||a)&&s((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=Ce(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{s((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=ae(Object.assign({},h("config",!0)),ae(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),!this.options_.directiveNameBuilder){const e=this.options_;e.directiveNameBuilder=(t,n=!1)=>{const i=e.directivePrefix||e.directivePrefix||"hx";return n?`data-${i}-${t}`:`${i}-${t}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e,this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}SetElementPrefix(e){this.options_.elementPrefix=e}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=this.options_.directiveRegex||new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}var wt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${pe(18)}@!@`,n){const s=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(s)return s.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.attributeProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchAttribute",i)})),l()}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.textContentProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchTextContent",i)})),l()}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const s=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(s){const t=s.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}}function Ft(e,t=0){const n=new BaseGlobal(e,t);return k(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(x)),n}function jt(e,t=0){return P()||Ft(e,t)}var Lt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};const Dt=/\{\{\s*(.+?)\s*\}\}/g,Tt=/\{\{.+?\}\}/;function Mt(e){const t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function Ht({componentId:e,contextElement:t,text:n,handler:i,testRegex:s,matchRegex:r,storeObject:o}){var l;let a=null,c=null;if(o){const o=n.trim();let l=(o.match(s||Tt)||[])[0];l&&l===o&&(l=l.replace(r||Dt,"$1").trim(),a=l?Ue({componentId:e,contextElement:t,expression:`return (${l});`,voidOnly:!0}):e=>e&&e(""),c=n=>i(J(n,e,t)))}a||(n=JSON.stringify(n).replace(r||Dt,'"+($1)+"').replace(/"\+\(\s*\)\+"/g,""),a=Ue({componentId:e,contextElement:t,expression:`const output = ${n}; return output;`})),null===(l=R(e))||void 0===l||l.CreateElementScope(t),Xe({componentId:e,contextElement:t,callback:()=>a(c||i)})}function $t(e){var{text:t,testRegex:n,matchRegex:i}=e,s=Lt(e,["text","testRegex","matchRegex"]);(n||i||Tt).test(t)&&Ht(Object.assign({text:t,testRegex:n,matchRegex:i},s))}function Bt({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o}){if("string"==typeof n)return i&&$t({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o});if(!(r||o||Tt).test(t.textContent||""))return;const l=new Array,a=new Array;let c=!1,u=()=>{c||(c=!0,queueMicrotask((()=>{c=!1,s((()=>(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;l.forEach((n=>{const i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()),"InlineJS.Interpolate",t)})))};[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&Tt.test(n.textContent)){const i={text:n.textContent||"",evaluated:n.textContent||""};l.push(i),a.push((()=>Ht({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,u()},testRegex:r,matchRegex:o})))}else 3==n.nodeType?l.push(n.textContent||""):l.push(n)})),l.reverse(),a.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Jt({componentId:e,contextElement:t,name:n,value:i}){$t({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function Wt({componentId:e,contextElement:t}){Bt({componentId:e,contextElement:t})}function zt(e){const t=e&&F(e);if(t)return void dt({component:t,element:e});const n=P(),i=n.GetConfig();[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)].forEach((t=>{(e||document).querySelectorAll(`[${t}]`).forEach((e=>{e.hasAttribute(t)&&document.contains(e)&&dt({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function qt(e){jt();const t=h();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{zt(e)})):zt(e)}),0)}function Ut(e,t){let n="",i=null;if("function"==typeof e){const t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else u(e)?({name:n,callback:i}=e):P().GetDirectiveManager().AddHandler(e);n&&i&&(t?P().GetDirectiveManager().AddHandlerExtension(t,i,n):P().GetDirectiveManager().AddHandler(i,n))}function Kt(e,t){return{name:e,callback:t}}function Vt(e,t,n,i,s){const r=P().GetConfig().GetDirectiveName("on"),o=(s||[]).join("."),l=ot(o?`${r}:${n}.${o}`:`${r}:${n}`,i||"");return!!l&&ct(e,t,l)}const Yt=["bind","event","on"];function Zt({component:e,contextElement:t,key:n,event:i,expression:s,options:r,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==r?void 0:r.filter((e=>!a.includes(e))):r,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?Vt(e,t,u(i),s,c()):!(!o||i!==o&&!Yt.includes(i))&&Vt(e,t,u(o),s,c())}function Qt(e,t,n){const i=P().GetConfig().GetDirectiveName(t,!1),s=P().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(s)||n&&e.getAttribute(n)||null}function Xt({componentId:e,contextElement:t,key:n,expression:i,callback:s,arrayCallback:r,useEffect:o=!0}){let l=0,a=Ue({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{Ke(e,(e=>{t==l&&(n?s([n,e]):u(e)?Object.entries(e).forEach(s):r&&("string"==typeof e||Array.isArray(e))&&r("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?Xe({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const en=Array.from(Array(100).keys()).map((e=>e/100));function tn(e){const t={root:null,rootMargin:"0px",threshold:0};return u(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=en),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),tn(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}function nn(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function sn({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:s}){const r=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{const a=r.find((e=>e&&n in e));if(!a)return s&&s({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=nn(t[l+1].trim(),o(n)):a[n]=o(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function rn({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=Ue({componentId:e,contextElement:n,expression:i}),d=sn({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===a?0:a||-1}),h=()=>u((e=>Me(e,o))),p=()=>!1===c?h():Xe({componentId:e,contextElement:n,callback:h});if(d.lazy){const i=t||R(e),r={root:d.ancestor<0?null:null==i?void 0:i.FindAncestor(n,d.ancestor),threshold:d.threshold<0?0:d.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),r):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var r;if(null==i?void 0:i.isIntersecting){const i=Ye(e,t||null);null===(r=R(e))||void 0===r||r.RemoveIntersectionObserver(n),s(p),i()}}))}else p()}else p()}function on(e){let t,n="",i=null;if("function"==typeof e){const s=e();s?({name:n,callback:i,onAccess:t}=s):(n=e("name"),i=e("callback"),t=e("access"))}else u(e)?({name:n,callback:i,onAccess:t}=e):P().GetMagicManager().AddHandler(e);n&&i&&P().GetMagicManager().AddHandler(i,n,t)}function ln(e,t,n){return{name:e,callback:t,onAccess:n}}function an(e){return e.startsWith(":")?P().GetConfig().GetDirectiveName("bind")+e:null}function cn(e){return e.startsWith(".")?e.replace(".",P().GetConfig().GetDirectiveName("class:")):null}function un(e){return e.startsWith("@")?e.replace("@",P().GetConfig().GetDirectiveName("on:")):null}function dn(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function hn(e=!0){e&&qt(),P().AddAttributeProcessor(Jt),P().AddTextContentProcessor(Wt)}function pn(){p("global",{bootstrap:zt,waitForGlobal:I,get:P,create:Ft,getElementContent:Mt,replaceText:Ht,interpolateText:$t,interpolate:Bt})}function mn(){p("utilities",{beginsWith:r,endsWith:z,toCamelCase:v,toSnakeCase:_e,insertHtml:Nt,findAncestor:q,getAttribute:Q,findFirstAttribute:X,findFirstAttributeValue:ee,setAttribute:me,isBooleanAttribute:te,supportsAttributes:M,getTarget:l,getTargets:a,isEqual:ne,isObject:u,toString:H,deepCopy:B,mergeObjects:ae,tidyPath:ce,pathToRelative:ue,splitPath:de,joinPath:he,getRandomString:pe,measureCallback:le,encodeAttribute:W,decodeAttribute:$,encodeValue:J,decodeValue:T,isTemplate:fe,isInsideTemplate:be})}function _n(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function fn(){p("version",{major:1,minor:2,patch:1,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function bn(){hn(),pn(),mn(),_n(),fn()}},409:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const s=n(16),r=n(979);class StripeDetailElement extends r.StripeGenericField{constructor(){super(),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();this.name&&((null==t?void 0:t.value)||this.value)&&(e.billingDetails=e.billingDetails||{},"address"===this.name?(e.billingDetails.address=e.billingDetails.address||{},e.billingDetails.address.line1=(null==t?void 0:t.value)||this.value):e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value)}GetInput_(){return this.input||this.querySelector("input")}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,s.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},538:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const r=n(988),o=n(16),l=n(979);class StripeFieldElement extends l.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.onready="",this.oncomplete="",this.onerrors=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe))return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n&&e.elements&&(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this))}))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onerrors",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},979:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const r=n(988),o=n(16);class StripeGenericField extends o.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()}))}GetStripe_(){return this.stripe||(0,r.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},380:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const s=n(16),r=n(979);class StripePaymentMenthodElement extends r.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,s.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},645:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const r=n(988),o=n(16);class StripeElement extends o.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.onready="",this.oncomplete="",this.onerrors="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,r.JournalTry)((()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncomplete&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.onerrors&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,s)=>{this.WaitInstance().then((r=>{var o,l;if(!(null==r?void 0:r.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"!=typeof a.method?{payment_method:{card:a.method,billing_details:a.billingDetails}}:{payment_method:a.method},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),r.stripe.confirmCardPayment(t,c).then(i).catch(s)):r.stripe.confirmCardSetup(t,c).then(i).catch(s)})).catch(s)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onerrors",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(StripeElement,"stripe")}},419:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(988),s=n(645),r=n(538),o=n(409),l=n(380);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,s.StripeElementCompact)(),(0,r.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(419).InlineJSStripe)()})();
|
1
|
+
(()=>{"use strict";var e={543:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>v,NativeElement:()=>NativeElement,NativeElementCompact:()=>h,Property:()=>c,Register:()=>f,RegisterCustomElement:()=>s,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>p,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>_});var i=n(393);function s(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const r=(0,i.RandomString)();function o(){return r}function l(){return(0,i.GetGlobalScope)(`customProperties.${r}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,s){let r="",o=null;(void 0!==(null==e?void 0:e.initial)||!s&&(null==e?void 0:e.update))&&(e.initial=e.initial||t[n],o="boolean"===e.type?(e,t)=>{e&&"false"!==e?t.setAttribute(r,r):t.hasAttribute(r)&&t.removeAttribute(r)}:(e,t)=>{t.setAttribute(r,e)});let c=null,u={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:(null==e?void 0:e.initial)||void 0,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(s){if("function"==typeof s.value&&!s.get&&!s.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(s.value.name))){const t=s.value;r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||s.value.name.replace(/^Update(.+)Property/,"$1")),c=(e,n)=>t.call(n,e)}}else r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),c=(e,t)=>t[n]=e;if(r&&c){u.name=r,u.handler=c;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(u)}}}var u=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class CustomElement extends HTMLElement{constructor(e={}){if(super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none"),!(this.options_.disableImplicitData||"InlineJS"in globalThis&&(0,i.IsObject)(globalThis.InlineJS)&&globalThis.InlineJS.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t;const n=(0,i.FindComponentById)(this.componentId_);n&&(e=(e||"").trim(),null===(t=n.FindScopeByRoot(this))||void 0===t||t.SetName(e),n.GetRoot()===this&&n.SetName(e))}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,s=new Array,r=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?s.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?s.push(e.GetResource()):s.push(e)})),s.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:s,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?r([]):Promise.all(n).then(r).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let s;return this.storedProxyAccessHandler_((()=>s=e(t,n,i))),s}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(t),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{e.initial&&e.setInitial&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>{this.nativeElement_=null,this.storedProxyAccessHandler_=null}))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const s=this.FindProperty_(e),r=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(s){let o=null;if(s.checkStoredObject&&t){if(t===r)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(s.handler):(0,i.JournalTry)((()=>s.handler(this.DecodeValue_(t,s.type||"string",s.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function h(){s(NativeElement)}var d=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function p(){s(ResourceElement,"resource")}d([c({type:"string"})],ResourceElement.prototype,"src",void 0),d([c({type:"string"})],ResourceElement.prototype,"type",void 0);var m=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded="",this.onloadederror=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1,contexts:{data:n}}))),t(n)})).catch((e=>{this.onloadederror&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloadederror,{disableFunctionCall:!1,contexts:{reason:e}}))),n(e)}))}))}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function _(){s(ResourceTargetElement,"resource-target")}function f(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function v(){(0,i.WaitForGlobal)().then((()=>{h(),p(),_()}))}m([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),m([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),m([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloadederror",void 0)},393:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Ee,AddDirectiveExpansionRule:()=>nt,AddDirectiveHandler:()=>Ut,AddMagicHandler:()=>on,AddOutsideEventExcept:()=>bt,AddOutsideEventListener:()=>vt,ApplyDirectiveExpansionRules:()=>st,AreObjects:()=>h,AttributeInterpolator:()=>Jt,AutoBootstrap:()=>qt,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>r,BindDirectiveExpansionRule:()=>an,BindEvent:()=>Zt,BootstrapAndAttach:()=>zt,BuildGetterProxyOptions:()=>we,BuildIntersectionOptions:()=>tn,BuildProxyOptions:()=>Ne,CallIfFunction:()=>ze,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>cn,ComponentCacheKey:()=>O,Config:()=>Config,Context:()=>Context,ContextKeys:()=>g,CreateAnimationLoop:()=>oe,CreateChildProxy:()=>Ae,CreateDirective:()=>ot,CreateDirectiveExpansionRule:()=>tt,CreateDirectiveHandlerCallback:()=>Kt,CreateGlobal:()=>Ft,CreateInplaceProxy:()=>ke,CreateLoop:()=>re,CreateMagicHandlerCallback:()=>ln,CreateReadonlyProxy:()=>Ge,DecodeAttribute:()=>$,DecodeValue:()=>T,DeepCopy:()=>B,DefaultTransitionDelay:()=>Ot,DefaultTransitionDuration:()=>It,DefaultTransitionRepeats:()=>kt,DeleteProxyProp:()=>xe,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>Re,DispatchDirective:()=>ct,ElementScope:()=>ElementScope,ElementScopeKey:()=>C,EncodeAttribute:()=>W,EncodeValue:()=>J,EndsWith:()=>z,EvaluateLater:()=>Ue,EvaluateMagicProperty:()=>Se,ExtractDuration:()=>nn,FindAncestor:()=>q,FindAncestorByAttribute:()=>K,FindAncestorByAttributeValue:()=>V,FindAncestorByClass:()=>U,FindAncestorByTagName:()=>Y,FindCacheValue:()=>v,FindComponentById:()=>R,FindComponentByName:()=>N,FindComponentByRoot:()=>w,FindFirstAttribute:()=>X,FindFirstAttributeValue:()=>ee,FlattenDirective:()=>at,ForwardEvent:()=>Vt,Future:()=>Future,GenerateFunctionFromString:()=>qe,GenerateUniqueId:()=>Ce,GenerateValueReturningFunction:()=>Je,GenerateVoidFunction:()=>We,GenericProxy:()=>GenericProxy,GetAttribute:()=>Q,GetCache:()=>_,GetConfig:()=>et,GetDefaultCacheValue:()=>k,GetDefaultUniqueMarkers:()=>ye,GetDirectiveValue:()=>Qt,GetElementContent:()=>Ht,GetElementScopeId:()=>S,GetElementScopeIdWithElement:()=>E,GetGlobal:()=>P,GetGlobalScope:()=>d,GetLocal:()=>xt,GetOrCreateGlobal:()=>jt,GetProxyProp:()=>Pe,GetTarget:()=>l,GetTargets:()=>a,GlobalCreatedEvent:()=>A,IncrementUniqueMarkers:()=>be,InferComponent:()=>F,InitCache:()=>m,InitComponentCache:()=>G,InitJITProxy:()=>je,InitializeDev:()=>dn,InitializeGlobal:()=>pn,InitializeGlobalScope:()=>p,InitializeUtilities:()=>mn,InitializeValues:()=>_n,InitializeVersion:()=>fn,InlineJS:()=>vn,InlineJSGlobalKey:()=>x,InsertHtml:()=>Nt,Interpolate:()=>Bt,InterpolateText:()=>$t,IntersectionObserver:()=>IntersectionObserver,IsBooleanAttribute:()=>te,IsEqual:()=>ne,IsInsideTemplate:()=>ve,IsObject:()=>u,IsTemplate:()=>fe,JoinPath:()=>de,JoinUniqueMarkers:()=>ge,JournalError:()=>i,JournalLog:()=>hn,JournalTry:()=>s,JournalWarn:()=>lt,LazyCheck:()=>rn,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>le,MergeObjects:()=>ae,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>un,PathToRelative:()=>ue,PeekCurrentComponent:()=>Te,PeekCurrentScope:()=>St,PeekStoredObject:()=>D,PopCurrentComponent:()=>De,PopCurrentScope:()=>Et,ProcessDirectives:()=>ht,ProxyKeys:()=>o,PushCurrentComponent:()=>Le,PushCurrentScope:()=>Ct,QueryGlobalComponent:()=>Pt,RandomString:()=>pe,RemoveDirectiveExpansionRule:()=>it,RemoveOutsideEventListener:()=>yt,ReplaceText:()=>Mt,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>Xt,ResolveOptions:()=>sn,ResolveTransition:()=>Gt,RetrieveStoredObject:()=>L,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>me,SetCacheValue:()=>f,SetProxyAccessHandler:()=>Ye,SetProxyProp:()=>Ie,SplitPath:()=>he,Stack:()=>Stack,StoreProxyHandler:()=>Ze,StreamData:()=>Ke,SubscribeToChanges:()=>Qe,SupportsAttributes:()=>H,TextContentInterpolator:()=>Wt,TidyPath:()=>ce,ToCamelCase:()=>b,ToSnakeCase:()=>_e,ToString:()=>M,TraverseDirectives:()=>ut,UnbindOutsideEvent:()=>gt,UseCache:()=>y,UseEffect:()=>Xe,WaitForGlobal:()=>I,WaitPromise:()=>He,WaitTransition:()=>Rt,WaitWhile:()=>Ve});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Purge(){return this.list_.splice(0)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}function r(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}const o={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function l(e){return(Array.isArray(e)||e&&"object"==typeof e)&&o.target in e?l(e[o.target]):e}function a(e){return e.map((e=>l(e)))}function c(e){return(e=l(e))&&"object"==typeof e&&(o.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function u(e){return!!c(e)}function h(e){return-1==e.findIndex((e=>!c(e)))}function d(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return e&&(e=e.trim()),e&&e.split(".").forEach((e=>{n=n[e]=n[e]||{}})),!t||u(n)?n:{}}function p(e,t){const n=d(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return d("cache")[e]="function"==typeof t?t():t}function _(e,t){const n=d("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function f(e,t,n,i){const s=_(e,i);s&&"object"==typeof s&&(s[t]=n)}function v(e,t){const n=e in globalThis&&globalThis[e]||null;return n&&"object"==typeof n&&t in n?n[t]:void 0}function y(e,t,n,i,s){let r=_(t,i);if(r){const[e,t]=s?s(r):[r,r];if(e===n)return t}return m(t,r=e()),s?s(r)[1]:r}function b(e,t,n){const[i="",...s]=e.trim().split(n||"-"),r=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?r(i):i)+(s||[]).map((e=>r(e))).join("")}const g={self:"self",event:"event",scope:"scope"},C="__InlineJS_ELSCOPE_KEY__";function E(e){for(;e;){const n=C in(t=e)&&"string"==typeof t[C]?t[C]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function S(e){const[t]=E(e);return t||""}const x="__InlineJS_GLOBAL_KEY__",A="inlinejs.global.created";function P(){return d("global").base||null}function I(){return P()?Promise.resolve():new Promise((e=>window.addEventListener(A,e)))}const O="component";function k(){return{id:"",component:null}}function G(){m(O,{id:"",component:null})}function R(e){return y((()=>{const t=P().FindComponentById(e);return{id:t?e:"",component:t}}),O,e,k,(e=>[e.id,e.component]))}function N(e){return P().FindComponentByName(e)}function w(e){return P().FindComponentByRoot(e)}function F(e){const t=S(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}var j=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function L(e){var{key:t}=e,n=j(e,["key"]);const i=P().RetrieveObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function D(e){var{key:t}=e,n=j(e,["key"]);const i=P().PeekObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function T(e,t,n){var i;return L({key:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function H(e){return(e=l(e))&&"getAttribute"in e&&"setAttribute"in e}function M(e){return e=l(e),P().IsFuture(e)?M(e.Get()):!e&&!1!==e&&0!==e||P().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function $(e,t,n){const i=t&&H(e)?e.getAttribute(t):null;return i?T(i,n,e):M(i)}function B(e){if(e=l(e),!Array.isArray(e)&&!u(e))return e;if(Array.isArray(e))return e.map((e=>B(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=B(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?M(e):P().StoreObject({object:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function W(e,t,n,i){(!t||!H(e))&&e.setAttribute(t,J(n,i,e))}function z(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function q(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function U(e,t){return q(e,(e=>e.classList.contains(t)))}function K(e,t){return q(e,(e=>e.hasAttribute(t)))}function V(e,t,n){return q(e,(e=>e.getAttribute(t)===n))}function Y(e,t){return q(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function Z(e,t){return t&&H(e)?e.getAttribute(t):null}function Q(e,t){for(const n of Array.isArray(t)?t:[t]){const t=Z(e,n);if(t)return t}return null}function X(e,t){if(!H(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ee(e,t){const n=X(e,t);return n?n.value:null}function te(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return P().GetConfig().IsBooleanAttribute(t)}function ne(e,t,n=!0){const[i,s]=n?a([e,t]):[e,t];if(i===s)return!0;if(Array.isArray(i)&&Array.isArray(s))return i.length==s.length&&-1==i.findIndex(((e,t)=>!ne(e,s[t],n)));if(h([i,s])){const e=Object.keys(i),t=Object.keys(s);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!ne(i[e],s[e],n)))}return i==s}function ie(e,t,n,i,r,o=1){let l=!1,a=()=>l=!0,c=0,u=e=>t?Math.floor(e/t):e,h=performance.now(),d=h,p=0;const m=(t,n,i)=>{e((e=>{o>1?p%o==0?_(t,n,i,e):m(t,n,i):_(t,n,i,e)}))},_=(e,o,_,f)=>{if(l)return void _();const v=f-h;if(r&&v>=r)if(n&&(n<0||c<n)){p=0;const t=v-r;i>0&&t<i?setTimeout((()=>{h=performance.now(),m(e,o,_)}),i-t):m(e,o,_),c+=1,h=f,d=f}else s((()=>o({repeats:c,steps:r?u(r):-1,elapsed:v,duration:r})));else{m(e,o,_);const n=f-d;n>=t&&(d=f+(t?n%t:n),s((()=>e({repeats:c,steps:u(v),elapsed:v,duration:r,abort:a}))))}};return new Loop(((e,t,n)=>m(e,t,n)))}const se=[50,40,30,25,20,15,10,5,4,3,2,1,0];function re(e,t=1e3,n=0,i=0,s=!0,r=1){let o=0,l=Math.floor(t/2.2);for(const e of se)if(e<=l){o=e;break}return ie((e=>setTimeout((()=>{s?requestAnimationFrame(e):e(performance.now())}),o)),t,n,i,e,r)}function oe(e,t=1e3,n=0,i=0,s=1){return ie(requestAnimationFrame,t,n,i,e,s)}function le(e){const t=performance.now();return e(),performance.now()-t}function ae(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function ce(e){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")):""}function ue(e,t,n){return(e=ce(e))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function he(e,t,n){const i=(e=t?ue(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function de({base:e,query:t},n,i,s){let r=`${ce(e)}?${t}`;return r=n?ue(r,n,i):ce(r),r=s?ce(`${n}/${r}`):r.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(r)?r:`/${r}`,r}function pe(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function me(e,t,n){t&&H(e)&&e.setAttribute(t,n)}function _e(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function fe(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function ve(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&fe(t))return!0;return!1}function ye(){return{level0:0,level1:0,level2:0}}function be(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?be(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function ge(e){return`${e.level2}_${e.level1}_${e.level0}`}function Ce(e,t,n,i){return be(e),`${t||""}${n||""}${ge(e)}${i||""}`}function Ee(e,t,n,i,s=!0){if(!i)return;const r={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(r),!s)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:r,path:o.join(".")})}function Se(e,t,n,r="",o=!0){const l="string"==typeof e?R(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),P().CreateNothing();let a=r&&n.startsWith(r)?n.substring(r.length):n;const c=P().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return P().CreateNothing();const e=r&&n.startsWith(`${r}${r}`)||!1;a=e?a.substring(r.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=N(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=F(t)||R(e);if(!i)return null;const s=i.FindElementScope(t),o=s&&s.GetLocal(n.substring(r.length));return s&&!P().IsNothing(o)?o:Se(i.GetId(),t,n,`${r}${r}`,!1)}}return P().CreateNothing()}return s((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function xe(e,t,n,i){var s;if(!(i in t))return!1;const r=R(e);return null===(s=null==r?void 0:r.FindProxy(n))||void 0===s||s.RemoveChild(i),delete t[i],null==r||r.RemoveProxy(`${n}.${i}`),Ee("delete",n,i,null==r?void 0:r.GetBackend().changes),!0}function Ae(e,t,n,i){if(!e)return null;const s=e.FindChild(t);if(s)return s;if(!Array.isArray(n)&&!u(n))return null;const r=P().CreateChildProxy(e,t,n);return i&&i.AddProxy(r),r}function Pe(e,t,n,i,s){var r;switch(i){case o.target:return t;case o.componentId:return e;case o.name:return n.split(".").at(-1);case o.path:return n;case o.parentPath:return n.split(".").slice(0,-1).join(".")||""}const l=i in t;if(!l&&s){const t=s(R(e)||void 0,i);if(!P().IsNothing(t))return P().IsFuture(t)?t.Get():t}if(l&&!t.hasOwnProperty(i))return t[i];const a=l?t[i]:null;if(P().IsFuture(a))return a.Get();const c=R(e);return null==c||c.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(r=Ae((null==c?void 0:c.FindProxy(n))||null,i,a,c||void 0))||void 0===r?void 0:r.GetNative())||a}function Ie(e,t,n,i,s){var r;if(i in t&&s===t[i])return!0;const o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),t[i]=s,null==o||o.RemoveProxy(`${n}.${i}`),Ee("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,r=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!r,a=this.GetPath(),c=(e,t)=>{const{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),P().CreateNothing());if(!P().IsNothing(e))return e}const s=n.Peek(g.self),r=null==e?void 0:e.FindElementLocalValue(s||e.GetRoot(),t,!0);if(!P().IsNothing(r))return r;const o=i?Se(e,s,t,"$"):P().CreateNothing();return t&&P().IsNothing(o)&&P().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,h={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Get?i.Get(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&P().GetConfig().GetWrapScopedFunctions()){const n=P().FindComponentById(o),i=null==n?void 0:n.FindScopeById(r||""),l=e[t];i&&P().PushScopeContext(i);const a=s((()=>(...e)=>l(...e)));return i&&P().PopScopeContext(),a}return Pe(o,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const s=null===(i=P().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),r=s&&s.Set?s.Set(t,n,e):P().CreateNothing();if(!P().IsNothing(r))return r}return Ie(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Delete?i.Delete(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return xe(o,e,a,t.toString())},has(e,t){var n;if(u&&"symbol"!=typeof t){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Has?i.Has(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return"symbol"!=typeof t||Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,h)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}Destroy(){this.componentId_="",this.name_="",this.target_=null,this.parentPath_="",this.native_=null,this.children_={}}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var Oe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function ke({target:e,getter:t,setter:n,deleter:i,lookup:s,alert:r}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const s=t?t(n.toString(),e):e[n];return P().IsNothing(s)?Reflect.get(e,n):(!r||r.list&&!(n in r.list)||null===(i=R(r.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${r.id}.${n}`),s)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):!!delete e[t]||!0,has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(s)?s.includes(t.toString()):s?s(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function Ge(e){return ke(we({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Re(){return!1}function Ne(e){var{setter:t,deleter:n,lookup:i}=e,s=Oe(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},s),{setter:t||Re,deleter:n||Re,lookup:i||Re})}function we(e){return Ne(e)}const Fe="InlineJS_ProxyGlobal";function je(e,t,n){const i=null==t?void 0:t.FindElementScope(n),s=null==i?void 0:i.GetId();if(!s)return["",null,null];const r=globalThis[Fe]=globalThis[Fe]||{},o=r[e]=r[e]||{};return s in o?[s,o[s],o]:(null==i||i.AddUninitCallback((()=>delete o[s])),[s,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function Le(e){P().PushCurrentComponent(e)}function De(){return P().PopCurrentComponent()}function Te(){return P().PeekCurrentComponent()}function He(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>He(e,t,!0))):e.then(t)}const Me="__InlineJS_Context__",$e="InlineJS_Func_Cache";function Be(e,t,n,s=!1){const r=v($e,t);if(r)return r;try{const n=new Function(Me,`\n with (${Me}){\n ${e(t)};\n };\n `);return f($e,t,n,{}),n}catch(e){if(s||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Je(e,t,n=!1){return Be((e=>`return (${e})`),e,t,n)}function We(e,t,n=!1){return Be((e=>e),e,t,n)}function ze(e,t,n,i=[]){var s;if("function"==typeof e){const r=R(n||""),o=null==r?void 0:r.FindProxy(null==r?void 0:r.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(s=o||(null==r?void 0:r.GetRootProxy()))||void 0===s?void 0:s.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function qe({componentId:e,contextElement:t,expression:n,disableFunctionCall:s=!1,waitPromise:r="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Je(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=We(n,e,!0)))return l;const u=(o,l,a,c,u=!0,h)=>{var d;const p=R(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(d=null==p?void 0:p.FindElementScope(t))||void 0===d?void 0:d.IsDestroyed()))return;const{context:_=null,changes:f=null}=(null==p?void 0:p.GetBackend())||{};null==_||_.Push(g.self,t),null==f||f.ResetLastAccessContext(),Le(e),Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Push(e,t)));try{let t=l(m);if(P().IsFuture(t)&&(t=t.Get()),!o)return s?t:ze(t,o,e,a);const n=e=>{if(e&&"none"!==r)return He(e,o,"recursive"===r),h||"Loading data...";o(e)};s?n(t):ze(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Pop(e,t))),De(),null==_||_.Pop(g.self)}};return(s,r=[],o,h)=>{try{return u(s,a.bind(t),r||[],o||{},void 0,h)}catch(h){if(h instanceof SyntaxError&&!c)return c=!0,a=We(n,e,!0),a?u(s,a.bind(t),r||[],o||{},!1):l(s);i(h,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(s)}}function Ue(e){return qe(e)}function Ke(e,t){const n=(e,t)=>He(e,t,!0);return e instanceof Loop?new Loop(((i,s)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>s(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function Ve(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function Ye(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?R(e):e;if(!i)return()=>{};const s=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(s)}function Ze(e){var t;const n=null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=Ye(e,n||null);s(t),i()}}function Qe({componentId:e,changes:t,callback:n,subscriptionsCallback:s,contextElement:r}){var o,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();const{optimized:u,raw:h}=t.PopGetAccessStorage();if(0==((null===(o=u||h)||void 0===o?void 0:o.entries.length)||0))return s&&s({}),null;let d={},p=()=>{Object.keys(d).map((e=>R(e))).filter((e=>!!e)).forEach((e=>{const{changes:t}=e.GetBackend();d[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),d={}},m=!1,_=()=>{m=!0};const f=t=>{const s=R(e);if(!s||m)return void p();const{changes:r}=s.GetBackend();r.PushOrigin(f);try{n({changes:t||[],cancel:_})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},v={};return null===(l=u||h)||void 0===l||l.entries.forEach((e=>(v[e.path]=v[e.path]||{})[e.compnentId]=!0)),Object.entries(v).forEach((([e,t])=>{Object.keys(t).map((e=>R(e))).filter((e=>!!e)).forEach((t=>{(d[t.GetId()]=d[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,f))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{_(),p()}))),s&&s(d),p}function Xe({componentId:e,callback:t,contextElement:n,options:s,subscriptionsCallback:r}){var o;const l=Ze(e),a=()=>{const s=R(e);if(!s)return;let o=!1;const{changes:a}=s.GetBackend(),c=n?s.FindElementScope(n):null,u=()=>{o=!0},h=null==c?void 0:c.GetElement();try{a.PushGetAccessStorage(),t({changes:[],cancel:u})}catch(t){i(t,`InlineJS.Component<${e}>.UseEffect`,h)}if(o)return a.PopAllGetAccessStorageSnapshots(!1),a.RestoreOptimizedGetAccessStorage(),void a.PopGetAccessStorage();Qe({componentId:e,changes:a,callback:e=>l((()=>t(e))),subscriptionsCallback:r,contextElement:h})};(null==s?void 0:s.nextTick)?null===(o=R(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function et(){return P().GetConfig()}function tt(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function nt(e){return P().GetDirectiveManager().AddExpansionRule(e)}function it(e){P().GetDirectiveManager().RemoveExpansionRule(e)}function st(e){return P().GetDirectiveManager().Expand(e)}let rt={};function ot(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in rt)return{meta:rt[e],value:t,proxyAccessHandler:n};const i=st(e),s=i.match(et().GetDirectiveRegex());if(!s||3!=s.length||!s[2])return null;const r=s[2].indexOf(":");let o=-1==r?[s[2]]:[s[2].substring(0,r),s[2].substring(r+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";l?u=c[0]:l=c[0],c.splice(0,1);const h=l.split("-"),d={view:{original:e,expanded:i},name:{value:l,joined:h.join("."),parts:h},arg:{key:u,options:c||[]}};return rt[e]=d,{meta:d,value:t,proxyAccessHandler:n}}function lt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function at(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function ct(e,t,n,r=0){const o="string"==typeof e?R(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++r),l=l||P().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return lt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=Ye(o,n.proxyAccessHandler||null);return 0==r&&!a&&o.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},at(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ut({element:e,callback:t,attributeCallback:n,proxyAccessHandler:s}){Array.from(e.attributes||[]).forEach((r=>{try{n&&n(r.name,r.value||"");const e=ot(r.name,r.value||"",s);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function ht({component:e,element:t,options:n={},proxyAccessHandler:s}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!ve(e))}(t,n))return;const r="string"==typeof e?R(e):e;if(!r)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let o=0;ut({element:t,proxyAccessHandler:s,callback:n=>{ct(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>P().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:s,componentId:r.GetId(),component:r,contextElement:t})}),P().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t,proxyAccessHandler:s}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&r.CreateElementScope(t);const l=r.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=r.GetId(),c=()=>{const i=R(a);if(i&&!n.ignoreChildren&&!fe(t)){i.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},r=(t,i)=>ht({component:e,proxyAccessHandler:s,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>r(e,e.contains(t)))):Array.from(t.children).forEach((e=>r(e,e.contains(t)))),i.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>s((()=>n({target:e,object:()=>B(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new Stack,this.origins_=new Stack}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Array;0!=this.list_.length&&(this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{const i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),this.NotifyListeners_("list",this.list_)),0!=e.length?(this.isIdle_&&(this.isIdle_=!1,0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_))),e.forEach((e=>e.callback(e.changes))),0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()):this.isIdle_||(this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)))})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return B(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,s;const r=(null===(t=R(Te()||""))||void 0===t?void 0:t.GetBackend().changes)||this,o=e.lastIndexOf(".");r.lastAccessContext_=-1==o?"":e.substring(0,o);const l=r.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(s=l.details.raw)||void 0===s?void 0:s.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e,this.NotifyListeners_("last-access-context",this.list_),r.NotifyListeners_("get-access-storages",this.getAccessStorages_))}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_="",this.NotifyListeners_("last-access-context",this.lastAccessContext_)}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new Stack}:void 0,raw:{entries:new Array,snapshots:new Stack}},lastAccessPath:""}),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorage(){var e;const t=(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null;return this.NotifyListeners_("get-access-storages",this.getAccessStorages_),t}SwapOptimizedGetAccessStorage(){const e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries,this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}RestoreOptimizedGetAccessStorage(){var e;const t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushGetAccessStorageSnapshot(){var e,t;const n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e)))),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorageSnapshot(e){var t,n,i,s;const r=this.getAccessStorages_.Peek(),o=null===(t=null==r?void 0:r.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&o&&(null===(n=null==r?void 0:r.details.optimized)||void 0===n?void 0:n.entries)&&(r.details.optimized.entries=o);const l=null===(i=null==r?void 0:r.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(s=null==r?void 0:r.details.raw)||void 0===s?void 0:s.entries)&&(r.details.raw.entries=l),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopAllGetAccessStorageSnapshots(e){var t,n,i,s,r,o;const l=this.getAccessStorages_.Peek();let a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.snapshots.Pop();for(;(null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.entries)&&(l.details.raw.entries=c),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t},this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e),this.NotifyListeners_("subscribers",this.subscribers_)}Destroy(){this.componentId_="",this.nextTickHandlers_.splice(0),this.nextIdleHandlers_.splice(0),this.nextNonIdleHandlers_.splice(0),this.isScheduled_=!1,this.isIdle_=!0,this.list_.splice(0),this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_.Purge(),this.origins_.Purge()}Unsubscribe_(e){delete this.subscribers_[e]}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Purge(){const e=this.record_;return this.record_={},e}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var dt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function pt(e,t,n){const i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=dt(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function mt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=P().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=mt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:s,callback:r}=mt(t,n);s&&r&&(this.handlers_[e]=pt(i,s,r))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const _t="InlineJS_OutsideEvent";function ft(){return globalThis[_t]=globalThis[_t]||{targetScopes:new Array,eventCallbacks:{}}}function vt(e,t,n){let i=ft(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function yt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function bt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){const s=i.listeners[e].handlers.find((e=>e.callback===n));s&&(s.excepts=s.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{s.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function gt(e){ft().targetScopes=ft().targetScopes.filter((t=>t.target!==e&&!e.contains(t.target)))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1}}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:P().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:P().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)){const t=R(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,gt(this.element_),P().GetMutationObserver().Unobserve(this.element_);const t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[C],this.isRoot_){const e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>P().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}Destroy(){this.componentId_="",this.id_="",this.name_="",this.root_=document.createElement("div"),s((()=>this.proxy_.Destroy()))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.isDestroying_=!1,this.isDestroyed_=!1,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,P().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const r=R(e);if(!r)return;const o=new Array,l=P().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&s((()=>e.callback(t)))})),o.forEach((e=>ht({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!r.FindElementScope(e)){ht({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}Destroy(){this.isDestroying_||this.isDestroyed_||(this.isDestroying_=!0,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_.Purge(),s((()=>this.changes_.Destroy())),Object.values(this.scopes_).forEach((e=>s((()=>e.Destroy())))),this.scopes_={},Object.values(this.elementScopes_).forEach((e=>s((()=>e.Destroy())))),this.elementScopes_={},s((()=>this.rootProxy_.Destroy())),this.refs_={},Object.values(this.proxies_).forEach((e=>s((()=>e.Destroy())))),this.proxies_={},this.currentScope_.Purge(),this.selectionScopes_.Purge(),this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=[],Object.values(this.observers_.intersections).forEach((e=>s((()=>e.Destroy())))),this.observers_.intersections={},this.isDestroyed_=!0,this.isDestroying_=!1)}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?et().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=P().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],s=i.GetRoot();if(s===e)return i;!s.contains(e)||n&&!n.GetRoot().contains(s)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[C]=n.GetId();const i=t=>{const n=X(e,[et().GetDirectiveName(t,!1),et().GetDirectiveName(t,!0)]);if(n){const t=ot(n.name,n.value);t&&ct(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&s((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_;return t&&C in t&&"string"==typeof t[C]&&t[C]in this.elementScopes_?this.elementScopes_[t[C]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!s)return null;const r=this.FindAncestor(s);return r?this.FindElementLocal(r,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),s=i?i.GetLocal(t):P().CreateNothing();if(!P().IsNothing(s)||!n||!i&&"string"==typeof e)return s;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!r)return s;const o=this.FindAncestor(r);return o?this.FindElementLocalValue(o,t,!0):s}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return P()}}function Ct(e,t){var n;null===(n="string"==typeof e?R(e):e)||void 0===n||n.PushCurrentScope(t)}function Et(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function St(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function xt(e,t,n,i={}){var s;let r=null;if(r=e instanceof HTMLElement?(null===(s="string"==typeof n?R(n):n)||void 0===s?void 0:s.FindElementScope(e))||null:e,!r)return i;let o=r.GetLocal(t);return P().IsNothing(o)&&r.SetLocal(t,o=i),o}const At="__InlineJS_GLOBAL_COMPONENT_KEY__";function Pt(e){const t=globalThis[At];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[At]={root:n,component:P().CreateComponent(n)},globalThis[At]}const It=300,Ot=0,kt=0;function Gt(e,t){if(!e||P().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=P().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||It,delay:e.delay||Ot,repeats:e.repeats||kt,allowed:e.allowed||"both"}}function Rt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,h,d,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:l,allowRepeats:a});const _=Gt((null===(h=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===h?void 0:h.GetData("transition"))||null,l||!1);if(!_||!_.actor||!_.ease||"number"!=typeof _.duration||_.duration<=0)return i(!1),null;const f=e=>{var t;return"function"==typeof(null==_?void 0:_.actor)?null==_?void 0:_.actor(e):_&&(null===(t=_.actor)||void 0===t?void 0:t.Handle(e))},v=e=>{var t;return"function"==typeof _.ease?_.ease(e):_&&(null===(t=_.ease)||void 0===t?void 0:t.Handle(e))||0};let y=!1,b=0;const g=()=>y=!0,C=e=>l?1-e:e,E=()=>{var n,i;return null===(i=null===(n=R(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(g),m.dispatchEvent(new CustomEvent("transition.canceled")),r&&s((()=>r())),!1},S=(e,t,n)=>{o&&s((()=>o({duration:_.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(d=R(e))||void 0===d?void 0:d.FindElementScope(t))||void 0===p||p.AddUninitCallback(g);const x=_.duration,A=e=>{const t=C(e/x),n=v({duration:x,elapsed:e,fraction:t}),i=0==b++?"start":"middle";f({duration:x,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),S(i,e,n)};return A(0),oe(x,0,a?_.repeats:0,_.delay).While((({elapsed:e})=>{if(y)return E();0==b&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),A(e)})).Final((()=>{if(y)E();else{const e=C(1);f({duration:x,elapsedFraction:e,elapsed:x,target:m,stage:"end",fraction:v({duration:_.duration,elapsed:_.duration,fraction:e}),reverse:!!l}),S("end",_.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0)))}})),g}function Nt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,beforeRemove:o,afterRemove:l,beforeInsert:a,afterInsert:c,afterTransitionCallback:u,transitionScope:h,useTransition:d}){const p="string"==typeof i?i:(null==i?void 0:i.GetId())||"",m=()=>{if(!1===(a&&s(a,"InlineJS.InsertHtml",e)))return;const i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),c&&s(c,"InlineJS.InsertHtml",e);const o=R(p);r&&o&&Array.from(e.children).forEach((e=>ht({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),(u||d)&&((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Rt({componentId:p,contextElement:h||e,target:e,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),u&&u()}}))},_=e=>{const t=R(p),n=P();Array.from(e.children).forEach((e=>{var i;let s=null==t?void 0:t.FindElementScope(e);s||(s=null===(i=n.InferComponentFrom(e))||void 0===i?void 0:i.FindElementScope(e))?s.Destroy():_(e)}))},f=()=>{!1!==(o&&s((()=>o(!1)),"InlineJS.InsertHtml",e))&&(_(e),Array.from(e.childNodes).forEach((e=>e.remove())),l&&s(l,"InlineJS.InsertHtml",e))};if("replace"===n&&0!=e.childNodes.length){if(!1===(o&&s((()=>o(!0)),"InlineJS.InsertHtml",e)))return;u||d?((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Rt({componentId:p,contextElement:h||e,target:e,reverse:!0,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),f(),m()}})):(f(),m())}else m()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=Ze(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",s=null;"function"==typeof e?(i=t||"",s=e):(i=e.GetName(),s=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:s,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const s=S((null===(t=F(e))||void 0===t?void 0:t.GetRoot())||null);s?n(s).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const s=e.target instanceof HTMLElement?S((null===(t=F(e.target))||void 0===t?void 0:t.GetRoot())||null):"";s&&n(s).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?S((null===(i=F(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?S(n.target):"";if(!i||!(i in t))return;const r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(o||l||a)&&s((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=Ce(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}Destroy(){var e;this.uniqueMarkers_={level0:0,level1:0,level2:0},this.handlers_={},null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{s((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=ae(Object.assign({},d("config",!0)),ae(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),!this.options_.directiveNameBuilder){const e=this.options_;e.directiveNameBuilder=(t,n=!1)=>{const i=e.directivePrefix||e.directivePrefix||"hx";return n?`data-${i}-${t}`:`${i}-${t}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e,this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}SetElementPrefix(e){this.options_.elementPrefix=e}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=this.options_.directiveRegex||new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}var wt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${pe(18)}@!@`,n){const s=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(s)return s.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.attributeProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchAttribute",i)})),l()}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.textContentProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchTextContent",i)})),l()}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const s=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(s){const t=s.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}}function Ft(e,t=0){const n=new BaseGlobal(e,t);return G(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(A)),n}function jt(e,t=0){return P()||Ft(e,t)}var Lt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};const Dt=/\{\{\s*(.+?)\s*\}\}/g,Tt=/\{\{.+?\}\}/;function Ht(e){const t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function Mt({componentId:e,contextElement:t,text:n,handler:i,testRegex:s,matchRegex:r,storeObject:o}){var l;let a=null,c=null;if(o){const o=n.trim();let l=(o.match(s||Tt)||[])[0];l&&l===o&&(l=l.replace(r||Dt,"$1").trim(),a=l?Ue({componentId:e,contextElement:t,expression:`return (${l});`,voidOnly:!0}):e=>e&&e(""),c=n=>i(J(n,e,t)))}a||(n=JSON.stringify(n).replace(r||Dt,'"+($1)+"').replace(/"\+\(\s*\)\+"/g,""),a=Ue({componentId:e,contextElement:t,expression:`const output = ${n}; return output;`})),null===(l=R(e))||void 0===l||l.CreateElementScope(t),Xe({componentId:e,contextElement:t,callback:()=>a(c||i)})}function $t(e){var{text:t,testRegex:n,matchRegex:i}=e,s=Lt(e,["text","testRegex","matchRegex"]);(n||i||Tt).test(t)&&Mt(Object.assign({text:t,testRegex:n,matchRegex:i},s))}function Bt({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o}){if("string"==typeof n)return i&&$t({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o});if(!(r||o||Tt).test(t.textContent||""))return;const l=new Array,a=new Array;let c=!1,u=()=>{c||(c=!0,queueMicrotask((()=>{c=!1,s((()=>(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;l.forEach((n=>{const i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()),"InlineJS.Interpolate",t)})))};[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&Tt.test(n.textContent)){const i={text:n.textContent||"",evaluated:n.textContent||""};l.push(i),a.push((()=>Mt({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,u()},testRegex:r,matchRegex:o})))}else 3==n.nodeType?l.push(n.textContent||""):l.push(n)})),l.reverse(),a.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Jt({componentId:e,contextElement:t,name:n,value:i}){$t({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function Wt({componentId:e,contextElement:t}){Bt({componentId:e,contextElement:t})}function zt(e){const t=e&&F(e);if(t)return void ht({component:t,element:e});const n=P(),i=n.GetConfig();[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)].forEach((t=>{(e||document).querySelectorAll(`[${t}]`).forEach((e=>{e.hasAttribute(t)&&document.contains(e)&&ht({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function qt(e){jt();const t=d();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{zt(e)})):zt(e)}),0)}function Ut(e,t){let n="",i=null;if("function"==typeof e){const t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else u(e)?({name:n,callback:i}=e):P().GetDirectiveManager().AddHandler(e);n&&i&&(t?P().GetDirectiveManager().AddHandlerExtension(t,i,n):P().GetDirectiveManager().AddHandler(i,n))}function Kt(e,t){return{name:e,callback:t}}function Vt(e,t,n,i,s){const r=P().GetConfig().GetDirectiveName("on"),o=(s||[]).join("."),l=ot(o?`${r}:${n}.${o}`:`${r}:${n}`,i||"");return!!l&&ct(e,t,l)}const Yt=["bind","event","on"];function Zt({component:e,contextElement:t,key:n,event:i,expression:s,options:r,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==r?void 0:r.filter((e=>!a.includes(e))):r,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?Vt(e,t,u(i),s,c()):!(!o||i!==o&&!Yt.includes(i))&&Vt(e,t,u(o),s,c())}function Qt(e,t,n){const i=P().GetConfig().GetDirectiveName(t,!1),s=P().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(s)||n&&e.getAttribute(n)||null}function Xt({componentId:e,contextElement:t,key:n,expression:i,callback:s,arrayCallback:r,useEffect:o=!0}){let l=0,a=Ue({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{Ke(e,(e=>{t==l&&(n?s([n,e]):u(e)?Object.entries(e).forEach(s):r&&("string"==typeof e||Array.isArray(e))&&r("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?Xe({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const en=Array.from(Array(100).keys()).map((e=>e/100));function tn(e){const t={root:null,rootMargin:"0px",threshold:0};return u(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=en),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),tn(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_.forEach((({target:e})=>{var t;return null===(t=this.observer_)||void 0===t?void 0:t.unobserve(e)})),this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}function nn(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function sn({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:s}){const r=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{const a=r.find((e=>e&&n in e));if(!a)return s&&s({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=nn(t[l+1].trim(),o(n)):a[n]=o(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function rn({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=Ue({componentId:e,contextElement:n,expression:i}),h=sn({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===a?0:a||-1}),d=()=>u((e=>He(e,o))),p=()=>!1===c?d():Xe({componentId:e,contextElement:n,callback:d});if(h.lazy){const i=t||R(e),r={root:h.ancestor<0?null:null==i?void 0:i.FindAncestor(n,h.ancestor),threshold:h.threshold<0?0:h.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),r):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var r;if(null==i?void 0:i.isIntersecting){const i=Ye(e,t||null);null===(r=R(e))||void 0===r||r.RemoveIntersectionObserver(n),s(p),i()}}))}else p()}else p()}function on(e){let t,n="",i=null;if("function"==typeof e){const s=e();s?({name:n,callback:i,onAccess:t}=s):(n=e("name"),i=e("callback"),t=e("access"))}else u(e)?({name:n,callback:i,onAccess:t}=e):P().GetMagicManager().AddHandler(e);n&&i&&P().GetMagicManager().AddHandler(i,n,t)}function ln(e,t,n){return{name:e,callback:t,onAccess:n}}function an(e){return e.startsWith(":")?P().GetConfig().GetDirectiveName("bind")+e:null}function cn(e){return e.startsWith(".")?e.replace(".",P().GetConfig().GetDirectiveName("class:")):null}function un(e){return e.startsWith("@")?e.replace("@",P().GetConfig().GetDirectiveName("on:")):null}function hn(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function dn(e=!0){e&&qt(),P().AddAttributeProcessor(Jt),P().AddTextContentProcessor(Wt)}function pn(){p("global",{bootstrap:zt,waitForGlobal:I,get:P,create:Ft,getElementContent:Ht,replaceText:Mt,interpolateText:$t,interpolate:Bt})}function mn(){p("utilities",{beginsWith:r,endsWith:z,toCamelCase:b,toSnakeCase:_e,insertHtml:Nt,findAncestor:q,getAttribute:Q,findFirstAttribute:X,findFirstAttributeValue:ee,setAttribute:me,isBooleanAttribute:te,supportsAttributes:H,getTarget:l,getTargets:a,isEqual:ne,isObject:u,toString:M,deepCopy:B,mergeObjects:ae,tidyPath:ce,pathToRelative:ue,splitPath:he,joinPath:de,getRandomString:pe,measureCallback:le,encodeAttribute:W,decodeAttribute:$,encodeValue:J,decodeValue:T,isTemplate:fe,isInsideTemplate:ve})}function _n(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function fn(){p("version",{major:1,minor:3,patch:1,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function vn(){dn(),pn(),mn(),_n(),fn()}},204:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const s=n(543),r=n(9);class StripeDetailElement extends r.StripeGenericField{constructor(){super(),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();this.name&&((null==t?void 0:t.value)||this.value)&&(e.billingDetails=e.billingDetails||{},"address"===this.name?(e.billingDetails.address=e.billingDetails.address||{},e.billingDetails.address.line1=(null==t?void 0:t.value)||this.value):e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value)}GetInput_(){return this.input||this.querySelector("input")}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,s.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},449:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const r=n(393),o=n(543),l=n(9);class StripeFieldElement extends l.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.onready="",this.oncomplete="",this.onerrors=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe))return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n&&e.elements&&(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this))}))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onerrors",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},9:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const r=n(393),o=n(543);class StripeGenericField extends o.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()}))}GetStripe_(){return this.stripe||(0,r.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},113:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const s=n(543),r=n(9);class StripePaymentMenthodElement extends r.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,s.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},372:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const r=n(393),o=n(543);class StripeElement extends o.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.onready="",this.oncomplete="",this.onerrors="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,r.JournalTry)((()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncomplete&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.onerrors&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,s)=>{this.WaitInstance().then((r=>{var o,l;if(!(null==r?void 0:r.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"!=typeof a.method?{payment_method:{card:a.method,billing_details:a.billingDetails}}:{payment_method:a.method},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),r.stripe.confirmCardPayment(t,c).then(i).catch(s)):r.stripe.confirmCardSetup(t,c).then(i).catch(s)})).catch(s)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onerrors",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(StripeElement,"stripe")}},0:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(393),s=n(372),r=n(449),o=n(204),l=n(113);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,s.StripeElementCompact)(),(0,r.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(0).InlineJSStripe)()})();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@benbraide/inlinejs-stripe",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.2.0",
|
4
4
|
"description": "Run javascript code by embedding them in your HTML using the element as context.",
|
5
5
|
"main": "./lib/common/index.js",
|
6
6
|
"module": "./lib/esm/index.js",
|
@@ -54,8 +54,8 @@
|
|
54
54
|
"webpack": "^5.41.0"
|
55
55
|
},
|
56
56
|
"dependencies": {
|
57
|
-
"@benbraide/inlinejs": "^1.
|
58
|
-
"@benbraide/inlinejs-element": "^2.
|
57
|
+
"@benbraide/inlinejs": "^1.3.1",
|
58
|
+
"@benbraide/inlinejs-element": "^2.2.0",
|
59
59
|
"webpack-cli": "^4.7.2"
|
60
60
|
}
|
61
61
|
}
|