@baloise/ds-core 19.9.4-nightly.20260513 → 19.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/all.d.ts +0 -2
- package/components/all.js +0 -3
- package/components/animation.decorator.js +1 -1
- package/components/bal-accordion.js +1 -1
- package/components/bal-app.js +102 -1
- package/components/bal-button2.js +1 -1
- package/components/bal-carousel-item.js +1 -1
- package/components/bal-checkbox-group.js +21 -3
- package/components/bal-checkbox2.js +21 -4
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-date.js +1 -1
- package/components/bal-dropdown.js +1 -1
- package/components/bal-field.js +1 -1
- package/components/bal-footer.js +1 -1
- package/components/bal-form.js +1 -1
- package/components/bal-input-stepper.js +1 -1
- package/components/bal-list-item-accordion-body2.js +1 -1
- package/components/bal-list-item2.js +1 -1
- package/components/bal-logo2.js +1 -1
- package/components/bal-modal.js +1 -1
- package/components/bal-nav.js +65 -53
- package/components/bal-navbar-brand.js +1 -1
- package/components/bal-option-list2.js +1 -1
- package/components/bal-popup2.js +1 -1
- package/components/bal-radio-group.js +1 -1
- package/components/bal-segment-item.js +1 -1
- package/components/bal-select2.js +23 -11
- package/components/bal-spinner2.js +1 -1
- package/components/bal-stage-image.js +1 -1
- package/components/bal-switch.js +1 -74
- package/{dist/esm/bal-switch.entry.js → components/bal-switch2.js} +36 -8
- package/components/bal-tabs2.js +29 -17
- package/components/breakpoints.subject.js +1 -1
- package/components/element-states.decorator.js +1 -1
- package/components/floating-ui.js +1 -1
- package/components/focus.decorator.js +1 -1
- package/components/form-input.js +1 -1
- package/components/helpers.js +1 -1
- package/components/index.js +449 -5
- package/components/mutation.decorator.js +1 -1
- package/components/overlays.js +1 -1
- package/components/resize.decorator.js +1 -1
- package/components/swipe.subject.js +1 -1
- package/components/swiper.util.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/components/visibility.decorator.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-09d63730a7.entry.js → p-1bb5b8696e.entry.js} +1 -1
- package/dist/baloise-design-system/p-1d7406989c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-0b1aeaaed8.entry.js → p-3850595dd0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-81c4b117a6.system.entry.js → p-43dd693355.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8f510eed45.entry.js → p-477359bbf9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-873a0bf9d9.system.entry.js → p-59129fb1d1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-CIBedZ4h.js → p-5GEK9UQy.js} +1 -1
- package/dist/baloise-design-system/{p-8bc92b4b2e.system.entry.js → p-607125007c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-38888ff243.system.entry.js → p-64d45da025.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-89a45b7719.system.entry.js → p-68baccfba9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8da007a406.entry.js → p-68f77714ab.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9459a04689.system.entry.js → p-6c3d087d59.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-627def5e99.entry.js → p-74fe27789f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-41e1ac82bb.entry.js → p-8268d61dd6.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b273a2f73a.entry.js → p-8e3412d465.entry.js} +1 -1
- package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
- package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
- package/dist/baloise-design-system/p-Bk7UdnZ5.system.js +1 -0
- package/dist/baloise-design-system/p-CKN3W8qn.js +1 -0
- package/dist/baloise-design-system/{p-x0vPGP6t.system.js → p-CPHPFMUC.system.js} +1 -1
- package/dist/baloise-design-system/{p-3VlTyI5Z.system.js → p-CsPrCX4f.system.js} +1 -1
- package/dist/baloise-design-system/{p-CWajPM1f.system.js → p-DLLNm5Gs.system.js} +1 -1
- package/dist/baloise-design-system/{p-BQ-ZBPGz.js → p-DvLv1IDC.js} +1 -1
- package/dist/baloise-design-system/{p-DOmwcY8I.system.js → p-DxnFuP0T.system.js} +1 -1
- package/dist/baloise-design-system/{p-BeOuHPcP.js → p-Oz8SBVmc.js} +1 -1
- package/dist/baloise-design-system/p-aDM_iThE.system.js +1 -0
- package/dist/baloise-design-system/{p-bd8e1fd900.entry.js → p-af05694fd5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2bd8d02b81.entry.js → p-b670d9cae9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-46986c305d.system.entry.js → p-b6e82651ef.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4df7edd98f.entry.js → p-bac3d30df3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1922f177ca.system.entry.js → p-bbeeefc31a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b75d71bb54.entry.js → p-c31dc8146b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-439f4eac54.system.entry.js → p-c4a244b558.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4f5b4d3b9e.entry.js → p-c5ae87f18e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-15a9d2bdb4.entry.js → p-c8b853074f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8058e17e38.system.entry.js → p-d21134a60b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c6f0c6f765.system.entry.js → p-d5bd821ab7.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d9349f5eb0.entry.js +1 -0
- package/dist/baloise-design-system/{p-7d611a8e60.entry.js → p-e6f03ecdd0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c72c874ad0.system.entry.js → p-eb2f5b22de.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4b6f33ea10.system.entry.js → p-f2435a528c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2cab716afd.system.entry.js → p-fa728470a3.system.entry.js} +1 -1
- package/dist/cjs/{global-BOGOCc0T.js → app-globals-D4xKyILL.js} +4 -2
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/{bal-dropdown_3.cjs.entry.js → bal-check_7.cjs.entry.js} +815 -9
- package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/{bal-radio_2.cjs.entry.js → bal-radio_3.cjs.entry.js} +50 -0
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/baloise-design-system.cjs.js +2 -3
- package/dist/cjs/{breakpoints.decorator-CDD6cOv6.js → breakpoints.decorator-DPrGtqtk.js} +1 -1
- package/dist/cjs/{breakpoints.subject-DpuyBCjh.js → breakpoints.subject-C1p-ePFH.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/{tokens.esm-LV2Uuiay.js → tokens.esm-BWWYqtq4.js} +1 -1
- package/dist/cjs/{window-resize.decorator-C-w0-60C.js → window-resize.decorator-DRN0wiUR.js} +1 -1
- package/dist/collection/collection-manifest.json +15 -17
- package/dist/collection/components/bal-checkbox/bal-checkbox.js +2 -3
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{global-Llrc69_N.js → app-globals-Blx--ecs.js} +4 -2
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/{bal-dropdown_3.entry.js → bal-check_7.entry.js} +815 -13
- package/dist/esm/bal-field_5.entry.js +3 -3
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/{bal-radio_2.entry.js → bal-radio_3.entry.js} +50 -1
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +3 -3
- package/dist/esm/baloise-design-system.js +2 -3
- package/dist/esm/{breakpoints.decorator-DcfCKRvu.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
- package/dist/esm/{breakpoints.subject-9qUvMXOC.js → breakpoints.subject-PxavGndB.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-W3od-FM9.js +1 -1
- package/dist/esm/loader.js +2 -3
- package/dist/esm/{tokens.esm-CvA86VZU.js → tokens.esm-Dk6PruGq.js} +1 -1
- package/dist/esm/{window-resize.decorator-DNh3w5KW.js → window-resize.decorator-DiNYHJee.js} +1 -1
- package/dist/esm-es5/app-globals-Blx--ecs.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-check_7.entry.js +1 -0
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/{bal-radio_2.entry.js → bal-radio_3.entry.js} +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-DcfCKRvu.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-9qUvMXOC.js → breakpoints.subject-PxavGndB.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-DNh3w5KW.js → window-resize.decorator-DiNYHJee.js} +1 -1
- package/dist/types/components.d.ts +0 -75
- package/package.json +6 -6
- package/components/bal-app2.js +0 -104
- package/components/bal-doc-app.d.ts +0 -11
- package/components/bal-doc-app.js +0 -264
- package/components/initialize.js +0 -450
- package/dist/baloise-design-system/p-00d493e589.system.entry.js +0 -1
- package/dist/baloise-design-system/p-21ea7b32f1.system.entry.js +0 -1
- package/dist/baloise-design-system/p-24185181f1.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2dbbdfb785.system.entry.js +0 -1
- package/dist/baloise-design-system/p-5965694a0f.entry.js +0 -1
- package/dist/baloise-design-system/p-75f3abf19e.system.entry.js +0 -1
- package/dist/baloise-design-system/p-90d225c57c.system.entry.js +0 -1
- package/dist/baloise-design-system/p-9ca0a9bf5c.entry.js +0 -1
- package/dist/baloise-design-system/p-BvSkuJ_n.js +0 -1
- package/dist/baloise-design-system/p-BzIZLOtt.system.js +0 -1
- package/dist/baloise-design-system/p-C_qvcMEM.system.js +0 -1
- package/dist/baloise-design-system/p-DrynNwPm.system.js +0 -1
- package/dist/baloise-design-system/p-Ectc3YAG.js +0 -1
- package/dist/baloise-design-system/p-a97c5309f7.entry.js +0 -1
- package/dist/baloise-design-system/p-f217ad88a9.entry.js +0 -1
- package/dist/baloise-design-system/p-f7b16f08ab.entry.js +0 -1
- package/dist/baloise-design-system/p-fc9a46b295.entry.js +0 -1
- package/dist/cjs/app-globals-DcKvQZAC.js +0 -7
- package/dist/cjs/bal-check.cjs.entry.js +0 -55
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +0 -734
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
- package/dist/cjs/bal-radio-icon.cjs.entry.js +0 -55
- package/dist/cjs/bal-switch.cjs.entry.js +0 -50
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -248
- package/dist/esm/app-globals-CIj5uAPM.js +0 -5
- package/dist/esm/bal-check.entry.js +0 -53
- package/dist/esm/bal-checkbox_2.entry.js +0 -731
- package/dist/esm/bal-doc-app.entry.js +0 -229
- package/dist/esm/bal-radio-icon.entry.js +0 -53
- package/dist/esm-es5/app-globals-CIj5uAPM.js +0 -1
- package/dist/esm-es5/bal-check.entry.js +0 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/bal-dropdown_3.entry.js +0 -1
- package/dist/esm-es5/bal-radio-icon.entry.js +0 -1
- package/dist/esm-es5/bal-switch.entry.js +0 -1
- package/dist/esm-es5/global-Llrc69_N.js +0 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -82
- /package/dist/baloise-design-system/{p-CvA86VZU.js → p-Dk6PruGq.js} +0 -0
- /package/dist/baloise-design-system/{p-BpG6m494.system.js → p-Nqmo3uHl.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-CvA86VZU.js → tokens.esm-Dk6PruGq.js} +0 -0
package/components/initialize.js
DELETED
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
|
-
import { b as balBrowser } from './browser.js';
|
|
3
|
-
import { f as waitForComponent } from './helpers.js';
|
|
4
|
-
import { d as defaultConfig } from './config.default.js';
|
|
5
|
-
|
|
6
|
-
const BALOISE_ANIMATION_KEY = 'baloise-animated';
|
|
7
|
-
|
|
8
|
-
class Config {
|
|
9
|
-
constructor() {
|
|
10
|
-
this._componentObservers = [];
|
|
11
|
-
this._observers = [];
|
|
12
|
-
this._config = defaultConfig;
|
|
13
|
-
}
|
|
14
|
-
get locale() {
|
|
15
|
-
return `${this._config.language}-${this._config.region}`;
|
|
16
|
-
}
|
|
17
|
-
get region() {
|
|
18
|
-
return this._config.region;
|
|
19
|
-
}
|
|
20
|
-
set region(region) {
|
|
21
|
-
if (region !== this._config.region) {
|
|
22
|
-
this._config.region = region;
|
|
23
|
-
this._notify();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
get language() {
|
|
27
|
-
return this._config.language;
|
|
28
|
-
}
|
|
29
|
-
get brand() {
|
|
30
|
-
return this._config.brand;
|
|
31
|
-
}
|
|
32
|
-
set brand(brand) {
|
|
33
|
-
if (brand !== this._config.brand) {
|
|
34
|
-
this._config.brand = brand;
|
|
35
|
-
this._notify();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
set language(language) {
|
|
39
|
-
if (language !== this._config.language) {
|
|
40
|
-
if (this._config.allowedLanguages.includes(language)) {
|
|
41
|
-
this._config.language = language;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this._config.language = this._config.fallbackLanguage;
|
|
45
|
-
}
|
|
46
|
-
this._notify();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
get allowedLanguages() {
|
|
50
|
-
return this._config.allowedLanguages;
|
|
51
|
-
}
|
|
52
|
-
set allowedLanguages(allowedLanguages) {
|
|
53
|
-
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
54
|
-
this._config.allowedLanguages = allowedLanguages;
|
|
55
|
-
this._notify();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
get icons() {
|
|
59
|
-
return this._config.icons;
|
|
60
|
-
}
|
|
61
|
-
set icons(icons) {
|
|
62
|
-
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
63
|
-
this._notify();
|
|
64
|
-
}
|
|
65
|
-
get logger() {
|
|
66
|
-
return this._config.logger;
|
|
67
|
-
}
|
|
68
|
-
set logger(logger) {
|
|
69
|
-
this._config.logger = Object.assign({}, logger);
|
|
70
|
-
this._notify();
|
|
71
|
-
}
|
|
72
|
-
get animated() {
|
|
73
|
-
return this._config.animated;
|
|
74
|
-
}
|
|
75
|
-
set animated(animated) {
|
|
76
|
-
this._config.animated = animated;
|
|
77
|
-
this._notify();
|
|
78
|
-
}
|
|
79
|
-
get httpFormSubmit() {
|
|
80
|
-
return this._config.httpFormSubmit;
|
|
81
|
-
}
|
|
82
|
-
set httpFormSubmit(httpFormSubmit) {
|
|
83
|
-
this._config.httpFormSubmit = httpFormSubmit;
|
|
84
|
-
this._notify();
|
|
85
|
-
}
|
|
86
|
-
attach(observer) {
|
|
87
|
-
const isExist = this._observers.includes(observer);
|
|
88
|
-
if (isExist) {
|
|
89
|
-
return console.log('Subject: Observer has been attached already.');
|
|
90
|
-
}
|
|
91
|
-
this._observers.push(observer);
|
|
92
|
-
observer.configChanged(this._config);
|
|
93
|
-
}
|
|
94
|
-
detach(observer) {
|
|
95
|
-
const observerIndex = this._observers.indexOf(observer);
|
|
96
|
-
if (observerIndex === -1) {
|
|
97
|
-
return console.log('Subject: Nonexistent observer.');
|
|
98
|
-
}
|
|
99
|
-
this._observers.splice(observerIndex, 1);
|
|
100
|
-
}
|
|
101
|
-
attachComponent(observer) {
|
|
102
|
-
const isExist = this._componentObservers.includes(observer);
|
|
103
|
-
if (isExist) {
|
|
104
|
-
return console.log('Subject: Observer has been attached already.');
|
|
105
|
-
}
|
|
106
|
-
this._componentObservers.push(observer);
|
|
107
|
-
observer.configChanged(this._config);
|
|
108
|
-
}
|
|
109
|
-
detachComponent(observer) {
|
|
110
|
-
const observerIndex = this._componentObservers.indexOf(observer);
|
|
111
|
-
if (observerIndex === -1) {
|
|
112
|
-
return console.log('Subject: Nonexistent observer.');
|
|
113
|
-
}
|
|
114
|
-
this._componentObservers.splice(observerIndex, 1);
|
|
115
|
-
}
|
|
116
|
-
toString() {
|
|
117
|
-
return JSON.stringify(this._config);
|
|
118
|
-
}
|
|
119
|
-
reset(config) {
|
|
120
|
-
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
121
|
-
this._notify(false);
|
|
122
|
-
}
|
|
123
|
-
_notify(all = true) {
|
|
124
|
-
for (const observer of this._componentObservers) {
|
|
125
|
-
observer.configChanged(this._config);
|
|
126
|
-
}
|
|
127
|
-
if (all) {
|
|
128
|
-
for (const observer of this._observers) {
|
|
129
|
-
observer.configChanged(this._config);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
const config = /*@__PURE__*/ new Config();
|
|
135
|
-
const configFromLocalStorage = (win) => {
|
|
136
|
-
try {
|
|
137
|
-
const animated = JSON.parse(win.localStorage.getItem(BALOISE_ANIMATION_KEY));
|
|
138
|
-
if (animated !== null) {
|
|
139
|
-
return {
|
|
140
|
-
animated,
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
return {};
|
|
144
|
-
}
|
|
145
|
-
catch (e) {
|
|
146
|
-
return {};
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const setupConfig = (userConfig = {}, win = {}) => {
|
|
151
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
152
|
-
win = window;
|
|
153
|
-
}
|
|
154
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
155
|
-
config.reset(Object.assign(Object.assign(Object.assign({}, configFromLocalStorage(win)), userConfig), { icons: Object.assign({}, userConfig.icons) }));
|
|
156
|
-
win.BaloiseDesignSystem.config = config;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
class BalNoticeController {
|
|
160
|
-
constructor(options) {
|
|
161
|
-
this.options = options;
|
|
162
|
-
this.container = null;
|
|
163
|
-
this.queue = [];
|
|
164
|
-
this.preQueue = [];
|
|
165
|
-
this.queueLimit = 5;
|
|
166
|
-
}
|
|
167
|
-
create(options) {
|
|
168
|
-
if (balBrowser.hasDocument) {
|
|
169
|
-
this.setupContainer(options);
|
|
170
|
-
const clone = this.findClone(options);
|
|
171
|
-
if (clone === undefined) {
|
|
172
|
-
const el = document.createElement(this.options.tag);
|
|
173
|
-
Object.assign(el, options);
|
|
174
|
-
el.addEventListener('balClose', ev => {
|
|
175
|
-
this.removeFromQueue(ev.detail);
|
|
176
|
-
});
|
|
177
|
-
this.preQueue.push(el);
|
|
178
|
-
this.updateQueue();
|
|
179
|
-
return el;
|
|
180
|
-
}
|
|
181
|
-
return clone;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
setQueue(queueLimit) {
|
|
185
|
-
this.queueLimit = queueLimit;
|
|
186
|
-
}
|
|
187
|
-
async dismissAll() {
|
|
188
|
-
var _a;
|
|
189
|
-
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
190
|
-
if (elements) {
|
|
191
|
-
const closingQueue = [];
|
|
192
|
-
for (let index = 0; index < elements.length; index++) {
|
|
193
|
-
const el = elements[index];
|
|
194
|
-
if (el.close) {
|
|
195
|
-
closingQueue.push(el.close());
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
await Promise.all(closingQueue);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* @deprecated use dismissAll instead
|
|
203
|
-
*/
|
|
204
|
-
async clearAll() {
|
|
205
|
-
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
206
|
-
return this.dismissAll();
|
|
207
|
-
}
|
|
208
|
-
findClone(options) {
|
|
209
|
-
for (let index = 0; index < this.queue.length; index++) {
|
|
210
|
-
const el = this.queue[index];
|
|
211
|
-
if (el.message === options.message && el.color === options.color) {
|
|
212
|
-
return el;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
return undefined;
|
|
216
|
-
}
|
|
217
|
-
setupContainer(options) {
|
|
218
|
-
if (balBrowser.hasDocument) {
|
|
219
|
-
const containerId = `${this.options.tag}-container`;
|
|
220
|
-
this.container = document.getElementById(containerId);
|
|
221
|
-
if (this.container)
|
|
222
|
-
return;
|
|
223
|
-
if (!this.container) {
|
|
224
|
-
this.container = document.createElement('bal-notices');
|
|
225
|
-
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
226
|
-
this.container.setAttribute('animated', options.animated ? 'true' : 'false');
|
|
227
|
-
if (options.container !== undefined) {
|
|
228
|
-
this.container.setAttribute('container', options.container === true ? '' : options.container);
|
|
229
|
-
}
|
|
230
|
-
this.container.id = containerId;
|
|
231
|
-
}
|
|
232
|
-
document.body.appendChild(this.container);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
async updateQueue() {
|
|
236
|
-
var _a;
|
|
237
|
-
if (this.queue.length < this.queueLimit) {
|
|
238
|
-
const el = this.preQueue.shift();
|
|
239
|
-
if (el && this.container) {
|
|
240
|
-
await waitForComponent(this.container);
|
|
241
|
-
const innerEl = this.container.querySelector('.bal-notices__inner');
|
|
242
|
-
if (innerEl) {
|
|
243
|
-
this.queue.push(el);
|
|
244
|
-
innerEl.insertAdjacentElement('beforeend', el);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (this.queue.length === 0) {
|
|
249
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
removeFromQueue(toastId) {
|
|
253
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
254
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
class BalSnackbarController extends BalNoticeController {
|
|
259
|
-
constructor() {
|
|
260
|
-
super({
|
|
261
|
-
tag: 'bal-snackbar',
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
create(options) {
|
|
265
|
-
return super.create(options);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const balSnackbarController = new BalSnackbarController();
|
|
269
|
-
|
|
270
|
-
class BalToastController extends BalNoticeController {
|
|
271
|
-
constructor() {
|
|
272
|
-
super({
|
|
273
|
-
tag: 'bal-toast',
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
create(options) {
|
|
277
|
-
return super.create(options);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
const balToastController = new BalToastController();
|
|
281
|
-
|
|
282
|
-
const tags = [
|
|
283
|
-
"bal-accordion",
|
|
284
|
-
"bal-accordion-details",
|
|
285
|
-
"bal-accordion-summary",
|
|
286
|
-
"bal-accordion-trigger",
|
|
287
|
-
"bal-app",
|
|
288
|
-
"bal-badge",
|
|
289
|
-
"bal-button",
|
|
290
|
-
"bal-button-group",
|
|
291
|
-
"bal-card",
|
|
292
|
-
"bal-card-actions",
|
|
293
|
-
"bal-card-button",
|
|
294
|
-
"bal-card-content",
|
|
295
|
-
"bal-card-subtitle",
|
|
296
|
-
"bal-card-title",
|
|
297
|
-
"bal-carousel",
|
|
298
|
-
"bal-carousel-item",
|
|
299
|
-
"bal-check",
|
|
300
|
-
"bal-checkbox",
|
|
301
|
-
"bal-checkbox-group",
|
|
302
|
-
"bal-close",
|
|
303
|
-
"bal-content",
|
|
304
|
-
"bal-data",
|
|
305
|
-
"bal-data-item",
|
|
306
|
-
"bal-data-label",
|
|
307
|
-
"bal-data-value",
|
|
308
|
-
"bal-date",
|
|
309
|
-
"bal-date-calendar",
|
|
310
|
-
"bal-date-calendar-cell",
|
|
311
|
-
"bal-divider",
|
|
312
|
-
"bal-dropdown",
|
|
313
|
-
"bal-field",
|
|
314
|
-
"bal-field-control",
|
|
315
|
-
"bal-field-hint",
|
|
316
|
-
"bal-field-label",
|
|
317
|
-
"bal-field-message",
|
|
318
|
-
"bal-file-upload",
|
|
319
|
-
"bal-footer",
|
|
320
|
-
"bal-form",
|
|
321
|
-
"bal-form-col",
|
|
322
|
-
"bal-form-grid",
|
|
323
|
-
"bal-heading",
|
|
324
|
-
"bal-hint",
|
|
325
|
-
"bal-hint-text",
|
|
326
|
-
"bal-hint-title",
|
|
327
|
-
"bal-icon",
|
|
328
|
-
"bal-input",
|
|
329
|
-
"bal-input-date",
|
|
330
|
-
"bal-input-group",
|
|
331
|
-
"bal-input-slider",
|
|
332
|
-
"bal-input-stepper",
|
|
333
|
-
"bal-label",
|
|
334
|
-
"bal-list",
|
|
335
|
-
"bal-list-item",
|
|
336
|
-
"bal-list-item-accordion-body",
|
|
337
|
-
"bal-list-item-accordion-head",
|
|
338
|
-
"bal-list-item-content",
|
|
339
|
-
"bal-list-item-icon",
|
|
340
|
-
"bal-list-item-subtitle",
|
|
341
|
-
"bal-list-item-title",
|
|
342
|
-
"bal-logo",
|
|
343
|
-
"bal-modal",
|
|
344
|
-
"bal-modal-body",
|
|
345
|
-
"bal-modal-header",
|
|
346
|
-
"bal-nav",
|
|
347
|
-
"bal-nav-link",
|
|
348
|
-
"bal-nav-link-grid",
|
|
349
|
-
"bal-nav-link-grid-col",
|
|
350
|
-
"bal-nav-link-group",
|
|
351
|
-
"bal-nav-menu-bar",
|
|
352
|
-
"bal-nav-menu-flyout",
|
|
353
|
-
"bal-nav-meta-bar",
|
|
354
|
-
"bal-navbar",
|
|
355
|
-
"bal-navbar-brand",
|
|
356
|
-
"bal-navbar-menu",
|
|
357
|
-
"bal-navbar-menu-end",
|
|
358
|
-
"bal-navbar-menu-start",
|
|
359
|
-
"bal-notices",
|
|
360
|
-
"bal-notification",
|
|
361
|
-
"bal-number-input",
|
|
362
|
-
"bal-option",
|
|
363
|
-
"bal-option-list",
|
|
364
|
-
"bal-pagination",
|
|
365
|
-
"bal-popover",
|
|
366
|
-
"bal-popover-content",
|
|
367
|
-
"bal-popup",
|
|
368
|
-
"bal-progress-bar",
|
|
369
|
-
"bal-radio",
|
|
370
|
-
"bal-radio-group",
|
|
371
|
-
"bal-radio-icon",
|
|
372
|
-
"bal-segment",
|
|
373
|
-
"bal-segment-item",
|
|
374
|
-
"bal-select",
|
|
375
|
-
"bal-select-option",
|
|
376
|
-
"bal-shape",
|
|
377
|
-
"bal-sheet",
|
|
378
|
-
"bal-snackbar",
|
|
379
|
-
"bal-spinner",
|
|
380
|
-
"bal-stack",
|
|
381
|
-
"bal-stage",
|
|
382
|
-
"bal-stage-back-link",
|
|
383
|
-
"bal-stage-body",
|
|
384
|
-
"bal-stage-foot",
|
|
385
|
-
"bal-stage-head",
|
|
386
|
-
"bal-stage-image",
|
|
387
|
-
"bal-step-item",
|
|
388
|
-
"bal-steps",
|
|
389
|
-
"bal-switch",
|
|
390
|
-
"bal-tab-item",
|
|
391
|
-
"bal-table",
|
|
392
|
-
"bal-tabs",
|
|
393
|
-
"bal-tag",
|
|
394
|
-
"bal-tag-group",
|
|
395
|
-
"bal-text",
|
|
396
|
-
"bal-textarea",
|
|
397
|
-
"bal-time-input",
|
|
398
|
-
"bal-toast",
|
|
399
|
-
"bal-tooltip"
|
|
400
|
-
];
|
|
401
|
-
|
|
402
|
-
// generated by .build/version.js
|
|
403
|
-
const VERSION = '19.9.4-nightly.20260513';
|
|
404
|
-
|
|
405
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
406
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
407
|
-
win = window;
|
|
408
|
-
}
|
|
409
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
410
|
-
if (platformConfig) {
|
|
411
|
-
setPlatformHelpers(platformConfig);
|
|
412
|
-
}
|
|
413
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
414
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
415
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
416
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
417
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
418
|
-
if (userConfig._generateHydrateForCustomElementsOutput) {
|
|
419
|
-
generateHydrateForCustomElementsOutput(tags);
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
/**
|
|
423
|
-
* This function generates the CSS needed for custom elements hydration and inserts it into the document head.
|
|
424
|
-
* The CSS rules include styles for slot fallback and the hydrated class.
|
|
425
|
-
*
|
|
426
|
-
* This is copied from the Stencil core library.
|
|
427
|
-
* src/runtime/bootstrap-lazy.ts
|
|
428
|
-
*/
|
|
429
|
-
const generateHydrateForCustomElementsOutput = (cmpTags = []) => {
|
|
430
|
-
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
431
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
432
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
433
|
-
if (!win.document) {
|
|
434
|
-
console.warn('Stencil: No document found. Skipping bootstrapping lazy components.');
|
|
435
|
-
return;
|
|
436
|
-
}
|
|
437
|
-
const head = win.document.head;
|
|
438
|
-
const metaCharset = /* @__PURE__ */ head.querySelector('meta[charset]');
|
|
439
|
-
const dataStyles = /* @__PURE__ */ win.document.createElement('style');
|
|
440
|
-
if (cmpTags.length > 0) {
|
|
441
|
-
dataStyles.textContent += SLOT_FB_CSS;
|
|
442
|
-
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
443
|
-
if (dataStyles.innerHTML.length) {
|
|
444
|
-
dataStyles.setAttribute('data-styles', '');
|
|
445
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
export { BalSnackbarController as B, BalToastController as a, balSnackbarController as b, balToastController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,r,e){function n(o){return o instanceof r?o:new r((function(t){t(o)}))}return new(r||(r=Promise))((function(r,i){function a(o){try{l(e.next(o))}catch(o){i(o)}}function d(o){try{l(e["throw"](o))}catch(o){i(o)}}function l(o){o.done?r(o.value):n(o.value).then(a,d)}l((e=e.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=d(0),a["throw"]=d(1),a["return"]=d(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(o){return function(t){return l([o,t])}}function l(d){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(r=0)),r)try{if(e=1,n&&(i=d[0]&2?n["return"]:d[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;if(n=0,i)d=[d[0]&2,i.value];switch(d[0]){case 0:case 1:i=d;break;case 4:r.label++;return{value:d[1],done:false};case 5:r.label++;n=d[1];d=[0];continue;case 7:d=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1];i=d;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(d);break}if(i[2])r.ops.pop();r.trys.pop();continue}d=t.call(o,r)}catch(o){d=[6,o];n=0}finally{e=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,r){if(r||arguments.length===2)for(var e=0,n=t.length,i;e<n;e++){if(i||!(e in t)){if(!i)i=Array.prototype.slice.call(t,0,e);i[e]=t[e]}}return o.concat(i||Array.prototype.slice.call(t))};System.register(["./p-PNu_g_s6.system.js","./p-Cjiw70Dk.system.js","./p-m5GX4h3i.system.js","./p-BbAtjg9Y.system.js","./p-D7_eHNTI.system.js","./p-CLfE_o7e.system.js","./p-CLDmOIBx.system.js","./p-D1opIX9W.system.js","./p-4Y53iwfN.system.js","./p-CpWDVANq.system.js","./p-BPUKeAhO.system.js","./p-D-yL3ygS.system.js","./p-Bp0A6Ore.system.js","./p-DWgCJRpS.system.js","./p-DKjTFqnu.system.js","./p-ncoiCFQ1.system.js","./p-DtlqgdI2.system.js","./p-BpMXwP_q.system.js","./p-DowF7e07.system.js","./p-Dou6adza.system.js","./p-BM_oHMik.system.js","./p-Bzy18UgU.system.js","./p-lFDHYLJ4.system.js","./p-DDPYMMGG.system.js"],(function(o){"use strict";var t,r,e,n,i,a,d,l,s,c,u,p,h,b,f,_,v,w,m,g,y,x,k,j,O,z,C,F,A,D,L,S,T,B,I,q;return{setters:[function(o){t=o.h;r=o.r;e=o.c;n=o.H;i=o.g},function(o){a=o._;d=o.a},function(o){l=o.i},function(o){s=o.B},function(o){c=o.b},function(o){u=o.d},function(o){p=o.s},function(o){h=o.r;b=o.a;f=o.o;_=o.p;v=o.b;w=o.m},function(o){m=o.L},function(o){g=o.i},function(o){y=o.a},function(o){x=o.F},function(o){k=o.b},function(o){j=o.D},function(o){O=o.a},function(o){z=o.d},function(o){C=o.d;F=o.b;A=o.a;D=o.j;L=o.i},function(o){S=o.L},function(o){T=o.B;B=o.L},function(o){I=o.i;q=o.s},null,null,null,null],execute:function(){var P=function(){function o(){var o=this;this.handleAutoFill=function(t){return __awaiter(o,void 0,void 0,(function(){var o,r;return __generator(this,(function(e){switch(e.label){case 0:p(t);if(!this.isAutoFillAllowed())return[3,2];this.component.isAutoFilled=true;o=this.component.nativeEl.value;return[4,this.parseAutoFillValueWithOptions(o)];case 1:r=e.sent();if(r===undefined){this.component.isAutoFilled=false;return[2]}if(!y(r,this.component.rawValue)){this.component.valueUtil.updateRawValueBySelection(r,true)}e.label=2;case 2:return[2]}}))}))}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.isAutoFillAllowed=function(){return!this.component.multiple};o.prototype.parseAutoFillValueWithOptions=function(o){return __awaiter(this,void 0,void 0,(function(){var t,r,e,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.component.listEl.getOptions()];case 1:t=i.sent();r=undefined;for(e=0;e<t.length;e++){n=t[e];if(n.value===o||n.label===o){return[2,[n.value]]}}return[2,r]}}))}))};return o}();var E={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};var H=function(){function o(){var o=this;this.handlePointerDown=function(){o.component.isKeyboardMode=false};this.handleKeydown=function(t){o.component.isKeyboardMode=x.includes(t.key)}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.handleFocus=function(o){this.component.hasFocus=true;this.component.balFocus.emit(o)};o.prototype.handleBlur=function(o){var t=this;if(!this.component.isExpanded){this.component.hasFocus=false;h((function(){return t.component.balBlur.emit(o)}))}};o.prototype.handleClick=function(o){if(!this.component.valueUtil.isDisabled()){if(this.component.chips){var t=o.target;var r=t.closest("bal-close");if(r){return}}if(this.component.clearable){var t=o.target;var e=t.closest(".bal-dropdown__clear");if(e){this.component.valueUtil.updateRawValueBySelection([]);return}}this.component.popupUtil.toggleList()}};o.prototype.handleOutsideClick=function(o){var t=this;var r;if(this.component.isExpanded){if(!this.component.el.contains(o.target)){this.component.isExpanded=false;(r=this.component.listEl)===null||r===void 0?void 0:r.resetFocus();this.component.hasFocus=false;h((function(){return t.component.balBlur.emit(o)}))}}};return o}();var M=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.focusOptionByLabel=function(o,t){var r=this;if(t===void 0){t={}}this.component.labelToFocus=(this.component.labelToFocus+o).trim();if(this.component.labelToFocus.length>0){clearTimeout(this.keyHitTimeout);this.keyHitTimeout=setTimeout((function(){var o;(o=r.component.listEl)===null||o===void 0?void 0:o.focusByLabel(r.component.labelToFocus,t)}),100);clearTimeout(this.timeout);this.timeout=setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(o){this.component.labelToFocus="";return[2]}))}))}),1e3)}};return o}();var W=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o;this.component.initialValue=this.component.value};o.prototype.componentDidRender=function(){var o=this;if(this.component.selectEl){var t=this.component.selectEl.querySelectorAll("option");t.forEach((function(t){if(o.component.rawValue.includes(t.value)){t.selected=true}}))}};o.prototype.handle=function(o){var t=this;var r=o.target;if(r===null||r===void 0?void 0:r.contains(this.component.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){var o=t.component.valueUtil.parseValueString(t.component.initialValue);t.component.valueUtil.updateRawValueBySelection(o)}),0)}};return o}();var G=function(o){var r=o.name,e=o.httpFormSubmit,n=o.multiple,i=o.required,a=o.disabled,d=o.rawValue,l=o.refSelectEl;var c=s.block("dropdown");return e?t("select",{class:Object.assign({},c.element("root").element("select").class()),"aria-hidden":"true",name:r,multiple:n,required:i,disabled:a,tabindex:-1,ref:l},d.map((function(o){return t("option",{key:o,value:o,selected:true},o)}))):""};var K=function(o){var r=o.size,e=o.theme,n=o.icon,i=o.language,a=o.loading,d=o.clearable,l=o.invalid,c=o.filled,u=o.expanded,p=o.disabled;var h=s.block("dropdown");if(a){return t("bal-spinner",{class:Object.assign({},h.element("rear").class()),small:true,variation:"circle",color:"white"})}else if(d&&c&&!p){return t("button",{title:E[i].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},h.element("rear").class()),h.element("clear").class()),h.element("clear").modifier("invalid").class(l)),h.element("clear").modifier("theme-purple").class(e==="purple"))},t("bal-icon",{class:Object.assign({},h.element("rear").class()),name:e==="purple"?"close":"close-circle",size:r,color:e==="purple"?"primary":"grey"}))}else{return t("bal-icon",{class:Object.assign({},h.element("rear").class()),name:n,size:r,turn:u,color:p?"grey":l?"danger":"primary"})}};var N=function(o){var r=o.inputId,e=o.httpFormSubmit,n=o.ariaForm,i=o.rawValue,a=o.autocomplete,d=o.required,l=o.disabled,c=o.readonly,u=o.placeholder,p=o.expanded,h=o.invalid,b=o.language,f=o.inputLabel,_=o.inheritedAttributes,v=o.refInputEl,w=o.onChange,m=o.onFocus,g=o.onBlur,y=o.onKeyDown;var x=s.block("dropdown");var k=function(){return t("input",Object.assign({id:n.controlId||"".concat(r,"-ctrl"),class:Object.assign({},x.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:a,value:i.join(","),required:d,disabled:l,readonly:c,placeholder:u,title:p?E[b].close:E[b].open,"aria-label":p?E[b].close:E[b].open,"aria-owns":"".concat(r,"-menu"),"aria-invalid":O(h),"aria-disabled":O(l||c),"aria-labelledby":n.labelId,"aria-describedby":n.messageId,"aria-haspopup":"listbox","data-native":true,"data-label":f,"data-value":i.join(","),ref:function(o){return v(o)},onChange:function(o){return w(o)},onFocus:function(o){return m(o)},onBlur:function(o){return g(o)},onKeyDown:function(o){return y(o)}},_))};if(e){return t(k,null)}return t("form",{novalidate:true},t(k,null))};var U=function(){function o(){this.updatePanelPosition=function(o,t,r){return function(){o.computePosition(t,r,{placement:"bottom-start",middleware:[o.flip(),o.shift()]}).then((function(o){var t=o.x,e=o.y;Object.assign(r.style,{left:"".concat(t,"px"),top:"".concat(e,"px")})}))}}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.toggleList=function(){if(!this.component.valueUtil.isDisabled()){if(this.component.isExpanded){this.collapseList()}else{this.expandList()}}};o.prototype.expandList=function(){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:if(!this.component.panelEl)return[3,2];return[4,k.load()];case 1:t=r.sent();this.component.panelCleanup=t.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(t,this.component.el,this.component.panelEl));r.label=2;case 2:this.component.isExpanded=true;return[4,(o=this.component.listEl)===null||o===void 0?void 0:o.focusSelected()];case 3:r.sent();return[2]}}))}))};o.prototype.collapseList=function(){var o;this.component.isExpanded=false;(o=this.component.listEl)===null||o===void 0?void 0:o.resetFocus();if(this.component.panelCleanup){this.component.panelCleanup()}};return o}();var Y=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.componentDidLoad=function(){var o=this;setTimeout((function(){return o.valueChanged(o.component.value,undefined)}),0)};o.prototype.isDisabled=function(){return this.component.disabled||this.component.readonly};o.prototype.isFilled=function(){return this.component.rawValue&&this.component.rawValue.length>0};o.prototype.valueChanged=function(o,t){var r=typeof o;var e=typeof t;if(r!==e){this.updateRawValueByValueProp(o)}if(r==="string"&&o!==t){this.updateRawValueByValueProp(o)}if(Array.isArray(o)&&Array.isArray(t)&&!y(o,t)){this.updateRawValueByValueProp(o)}};o.prototype.updateRawValueBySelection=function(o,t){if(o===void 0){o=[]}if(t===void 0){t=false}this.component.isAutoFilled=t;this.updateRawValue(o);if(this.component.multiple){this.component.balChange.emit(this.component.rawValue)}else{this.component.balChange.emit(this.component.rawValue[0])}};o.prototype.parseValueString=function(o){if(o===void 0){o=[]}var t=[];if(!g(o)&&o!==""){if(Array.isArray(o)){t=__spreadArray([],o.filter((function(o){return!g(o)})),true)}else{if(o.split("").includes(",")){t=__spreadArray([],o.split(",").filter((function(o){return o})).map((function(o){return o.trim()})),true)}else{t=[o]}}}return t};o.prototype.updateRawValueByValueProp=function(o){if(o===void 0){o=[]}var t=this.parseValueString(o);this.updateRawValue(t)};o.prototype.updateRawValue=function(){return __awaiter(this,arguments,void 0,(function(o){if(o===void 0){o=[]}return __generator(this,(function(t){switch(t.label){case 0:this.component.rawValue=o;if(!this.component.listEl)return[3,2];return[4,this.component.listEl.updateSelected(this.component.rawValue)];case 1:t.sent();t.label=2;case 2:return[4,this.updateInputContent()];case 3:t.sent();return[2]}}))}))};o.prototype.removeOption=function(o){var t=this.component.rawValue.filter((function(t){return t!==o.value}));this.updateRawValueBySelection(t)};o.prototype.updateInputContent=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:return[4,b()];case 1:t.sent();if(!this.component.listEl)return[3,3];o=this.component;return[4,this.component.listEl.getSelectedOptions(this.component.rawValue)];case 2:o.choices=t.sent();this.component.inputLabel=this.component.choices.map((function(o){return o.label.trim()})).sort().join(",");t.label=3;case 3:return[2]}}))}))};return o}();var V=function(o){var r=o.inlineLabel,e=o.filled,n=o.chips,i=o.placeholder,a=o.choices,d=o.renderChip;var l=s.block("dropdown");if(e){if(n){return t("div",{class:Object.assign({},l.element("root").element("content").element("chips").class())},a.map((function(o){return d(o)})))}else{return(r&&"".concat(r,": "))+a.map((function(o){return o.label})).join(", ")}}else{return i}};var X=':root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1;width:100%}.bal-dropdown__root{border-width:.125rem;border-style:solid;border-color:var(--bal-dropdown-control-border-color);border-radius:var(--bal-dropdown-control-border-radius);background:var(--bal-dropdown-control-background);font-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);font-family:var(--bal-font-family-text);color:var(--bal-dropdown-control-text-color);outline:none;-webkit-box-shadow:var(--bal-shadow-none);box-shadow:var(--bal-shadow-none);padding-right:1rem;height:auto;min-height:3rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;width:100%;text-align:left;gap:1rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.bal-dropdown__root__content__chips{--bal-tag-size-small-font-size:var(--bal-text-size-normal);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-xx-small);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-x-small)}.bal-dropdown__root__content__chips>bal-tag{z-index:1}.bal-dropdown__root__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);position:absolute;right:var(--bal-border-width-normal);left:var(--bal-border-width-normal);top:var(--bal-border-width-normal);bottom:var(--bal-border-width-normal);opacity:0;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));cursor:pointer}.bal-dropdown__root__input:disabled{cursor:default}.bal-dropdown__root__input:-webkit-autofill{opacity:1}.bal-dropdown__root__input:autofill{opacity:1}.bal-dropdown__root__input:-internal-autofill-selected{opacity:0}.bal-dropdown__root__select{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-dropdown__root--autofill .bal-dropdown__root__input{opacity:0}.bal-dropdown__list{display:none;visibility:hidden;opacity:0;width:100vw;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow-end-color);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';var J=o("bal_dropdown",function(){function o(o){var t=this;r(this,o);this.balChange=e(this,"balChange");this.balFocus=e(this,"balFocus");this.balBlur=e(this,"balBlur");this.inputId="bal-dropdown-".concat(R++);this.inheritedAttributes={};this.initialValue=[];this.nativeOptions=[];this.rawOptions=[];this.choices=[];this.rawValue=[];this.hasFocus=false;this.isExpanded=false;this.isAutoFilled=false;this.isKeyboardMode=false;this.inputLabel="";this.ariaForm=u;this.language=z.language;this.region=z.region;this.httpFormSubmit=z.httpFormSubmit;this.labelToFocus="";this.valueUtil=new Y;this.eventsUtil=new H;this.popupUtil=new U;this.optionUtil=new j;this.formSubmitUtil=new W;this.focusUtil=new M;this.autoFillUtil=new P;this.autocomplete="off";this.name=this.inputId;this.placeholder="";this.inlineLabel="";this.icon="caret-down";this.size="";this.theme="";this.disabled=false;this.readonly=false;this.multiple=false;this.chips=false;this.clearable=false;this.invalid=false;this.required=false;this.loading=false;this.filter="includes";this.contentHeight=262;this.inverted=false;this.options=[];this.value=[];this.hasConnected=false;this.listenToOptionChange=function(o){t.optionUtil.listenToOptionChange(o)};this.listenOnClickOutside=function(o){t.eventsUtil.handleOutsideClick(o)};this.resetHandler=function(o){t.formSubmitUtil.handle(o)};this.handleAutoFill=function(o){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.log("(handleAutoFill)",o,this.nativeEl.value);this.autoFillUtil.handleAutoFill(o);return[2]}))}))};this.handleKeyDown=function(o){var r,e,n,i,a;if(o&&o.key){if(t.isExpanded){if(C(o)){p(o);(r=t.listEl)===null||r===void 0?void 0:r.focusNext()}else if(F(o)){p(o);(e=t.listEl)===null||e===void 0?void 0:e.focusPrevious()}else if(o.key==="Home"||o.key==="PageUp"){p(o);(n=t.listEl)===null||n===void 0?void 0:n.focusFirst()}else if(o.key==="End"||o.key==="PageDown"){p(o);(i=t.listEl)===null||i===void 0?void 0:i.focusLast()}else if(A(o)){p(o);(a=t.listEl)===null||a===void 0?void 0:a.selectByFocus()}else if(o.key==="Tab"||D(o)){t.popupUtil.collapseList()}else if(o.key.length===1){t.focusUtil.focusOptionByLabel(o.key)}}else{if(A(o)||L(o)){p(o);t.popupUtil.expandList()}else if(o.key.length===1){t.focusUtil.focusOptionByLabel(o.key,{select:true})}}}else{if(t.isExpanded){t.popupUtil.collapseList()}}}}o.prototype.createLogger=function(o){this.log=o};o.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.optionUtil.optionChanged();return[2]}))}))};o.prototype.valueChanged=function(o,t){this.valueUtil.valueChanged(o,t)};o.prototype.connectedCallback=function(){if(!this.hasConnected){this.eventsUtil.connectedCallback(this);this.valueUtil.connectedCallback(this);this.popupUtil.connectedCallback(this);this.optionUtil.connectedCallback(this);this.formSubmitUtil.connectedCallback(this);this.focusUtil.connectedCallback(this);this.autoFillUtil.connectedCallback(this)}f(this.el,"balOptionChange",this.listenToOptionChange);if(c.hasDocument){f(document,"keydown",this.eventsUtil.handleKeydown);f(document,"touchstart",this.eventsUtil.handlePointerDown);f(document,"mousedown",this.eventsUtil.handlePointerDown);f(document,"click",this.listenOnClickOutside);f(document,"reset",this.resetHandler,{capture:true})}this.hasConnected=true};o.prototype.disconnectedCallback=function(){_(this.el,"balOptionChange",this.listenToOptionChange);if(c.hasDocument){_(document,"keydown",this.eventsUtil.handleKeydown);_(document,"touchstart",this.eventsUtil.handlePointerDown);_(document,"mousedown",this.eventsUtil.handlePointerDown);_(document,"click",this.listenOnClickOutside);_(document,"reset",this.resetHandler,{capture:true})}};o.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.inheritedAttributes=l(this.el,["tabindex","data-hj-allow"]);return[4,this.optionUtil.componentWillRender()];case 1:o.sent();return[2]}}))}))};o.prototype.componentDidRender=function(){this.formSubmitUtil.componentDidRender()};o.prototype.componentDidLoad=function(){this.valueUtil.componentDidLoad()};o.prototype.configChanged=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=o.language;this.region=o.region;this.httpFormSubmit=o.httpFormSubmit;return[2]}))}))};o.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(this.nativeEl&&!this.valueUtil.isDisabled()))return[3,2];return[4,v()];case 1:o.sent();this.nativeEl.focus();o.label=2;case 2:return[2]}}))}))};o.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.rawValue]}))}))};o.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.valueUtil.updateRawValueBySelection([]);return[2]}))}))};o.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.expandList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.collapseList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.select=function(o){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=this.valueUtil.parseValueString(o);this.valueUtil.updateRawValueBySelection(t);return[2]}))}))};o.prototype.setAriaForm=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},o);return[2]}))}))};o.prototype.render=function(){var o=this;var r=s.block("dropdown");var e=this.valueUtil.isFilled();var i=this.size!=="";var a="size-".concat(this.size);var d=this.theme!=="";var l="theme-".concat(this.theme);var c=this.theme==="purple"?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return t(n,{key:"3fe05ba6190dabe5fb8c297f4809659f7c24aa74",class:Object.assign({},r.class()),tabindex:"-1",id:"".concat(this.inputId)},t("div",{key:"e0b038aa5b7ead381d271c5b7b04fd5bbaa3ea3b",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r.element("root").class()),r.element("root").modifier("focused").class(c)),r.element("root").modifier("invalid").class(this.invalid)),r.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),r.element("root").modifier("autofill").class(this.isAutoFilled)),r.element("root").modifier(a).class(i)),r.element("root").modifier(l).class(d)),r.element("root").modifier(l+"-filled").class(e&&d)),r.element("root").modifier(l+"-expanded").class(this.isExpanded&&d)),"data-testid":"bal-dropdown-trigger",onClick:function(t){return o.eventsUtil.handleClick(t)}},t("span",{key:"a3499a9e2abcaa3b363385c475c3dcd91ed1a371",class:Object.assign(Object.assign(Object.assign(Object.assign({},r.element("root").element("content").class()),r.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),r.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),r.element("root").element("content").modifier(a).class(i))},t(V,{key:"8ffc980c91386038c4ee9b9e6673a25a3609d674",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,renderChip:function(r){return t("bal-tag",{key:r.value,"data-testid":"bal-dropdown-chip",size:"small",invalid:o.invalid,disabled:o.disabled||o.readonly,closable:!(o.disabled||o.readonly),onBalCloseClick:function(){return o.valueUtil.removeOption(r)}},r.label)}})),t(N,{key:"9a97fc39a821d5dcca32eba522ae29e4aa6eedc0",inputId:this.inputId,httpFormSubmit:this.httpFormSubmit,ariaForm:this.ariaForm,rawValue:this.rawValue,autocomplete:this.autocomplete,required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,expanded:this.isExpanded,invalid:this.invalid,language:this.language,inputLabel:this.inputLabel,inheritedAttributes:this.inheritedAttributes,refInputEl:function(t){return o.nativeEl=t},onChange:function(t){return o.handleAutoFill(t)},onFocus:function(t){return o.eventsUtil.handleFocus(t)},onBlur:function(t){return o.eventsUtil.handleBlur(t)},onKeyDown:function(t){return o.handleKeyDown(t)}}),t(G,{key:"2a33a8ac7f336889197137fc741ed8a4a107fceb",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:function(t){return o.selectEl=t}}),t(K,{key:"d0f6958fb47ad7f6d73d4f98482cb2102c344f20",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:e,disabled:this.valueUtil.isDisabled()})),t("div",{key:"29e98d1f54ffb6ee913bd682d6531d45997fc1d0",id:"".concat(this.inputId,"-menu"),class:Object.assign(Object.assign({},r.element("list").class()),r.element("list").modifier("expanded").class(this.isExpanded)),ref:function(t){return o.panelEl=t}},t("bal-option-list",{key:"4e6fa69f9d9859208f83dd7bc86c17fc75d5eb60",multiple:this.multiple,disabled:this.valueUtil.isDisabled(),filter:this.filter,required:this.required,contentHeight:this.contentHeight,ref:function(t){return o.listEl=t}},t("slot",{key:"1c169dc692632671f62410b2dadcbbc10b0fe36a"}),this.optionUtil.hasPropOptions()?this.rawOptions.map((function(o){return t("bal-option",{key:o.value,value:o.value,label:o.label,disabled:o.disabled,multiline:o.multiline,invalid:o.invalid,hidden:o.hidden,selected:o.selected,focused:o.focused},o.label)})):"")))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return o}());a([m("bal-dropdown"),d("design:type",Function),d("design:paramtypes",[Function]),d("design:returntype",void 0)],J.prototype,"createLogger",null);a([S(),d("design:type",Function),d("design:paramtypes",[Object]),d("design:returntype",Promise)],J.prototype,"configChanged",null);var R=0;J.style=X;var Q=":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-3);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-check-size:1.25rem}";var Z=o("bal_option",function(){function o(o){var t=this;r(this,o);this.balOptionChange=e(this,"balOptionChange");this.balOptionFocus=e(this,"balOptionFocus");this.inputId="bal-option-".concat($++);this.checkbox=false;this.interactionState=T.DefaultState;this.label="";this.value="";this.disabled=false;this.multiline=false;this.invalid=false;this.selected=false;this.focused=false;this.hidden=false;this.onClick=function(o){var r=t.el.closest("bal-option-list");if(t.disabled||r&&r.disabled){p(o)}else{if(r&&r.required&&!r.multiple){if(!t.selected){t.select(true)}}else{t.select(!t.selected)}}}}o.prototype.createLogger=function(o){this.log=o};o.prototype.componentWillRender=function(){if(this.el){var o=this.el.closest("bal-option-list");if(o){this.checkbox=!!o.multiple}}};o.prototype.listenToMouseEnter=function(){var o=this,t=o.label,r=o.value,e=o.selected,n=o.disabled,i=o.hidden;if(!i&&!n){this.balOptionFocus.emit({label:t,value:r,selected:e})}};o.prototype.elementStateListener=function(o){this.interactionChildElements.forEach((function(t){t.hovered=o.hovered;t.pressed=o.pressed}))};o.prototype.select=function(){return __awaiter(this,arguments,void 0,(function(o){var t,r,e;if(o===void 0){o=true}return __generator(this,(function(n){this.selected=o;t=this,r=t.label,e=t.value;this.balOptionChange.emit({label:r,value:e,selected:o});return[2]}))}))};Object.defineProperty(o.prototype,"interactionChildElements",{get:function(){return Array.from(this.el.querySelectorAll("bal-check"))},enumerable:false,configurable:true});o.prototype.render=function(){var o=s.block("option");return t(n,{key:"dca805aa021ad35c2ea4153008a8a5ba4f37931c",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("checkbox").class(this.checkbox)),o.modifier("focused").class(this.focused)),o.modifier("invalid").class(this.invalid)),o.modifier("selected").class(this.selected)),o.modifier("disabled").class(this.disabled)),o.modifier("hidden").class(this.hidden)),role:"option",id:this.inputId,"data-value":this.value,"data-label":this.label,"aria-label":this.label,"aria-hidden":O(this.hidden),"aria-selected":O(this.selected),"aria-checked":O(this.selected),"aria-disabled":O(this.disabled),"aria-invalid":O(this.invalid),tabIndex:-1,onClick:this.onClick},t("bal-stack",{key:"cfcf978a82159a6e7ad2dcddccdb40dd6b9f74a4",py:"small",space:"x-small"},this.checkbox?t("bal-check",{checked:this.selected,disabled:this.disabled,invalid:this.invalid,hovered:this.interactionState.hovered,pressed:this.interactionState.pressed,tabindex:-1}):"",t("div",{key:"e92a9c019432d29f6153371daca316c8136c75e9",class:Object.assign(Object.assign({},o.element("inner").class()),o.element("inner").modifier("multiline").class(this.multiline))},t("slot",{key:"639a99194ed6e86787e9eb2b3adc993161d58a07"})),this.selected&&!this.checkbox?t("bal-icon",{name:"check",size:"small",color:this.disabled?"grey":this.invalid?"danger":"primary"}):""))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return o}());a([m("bal-option"),d("design:type",Function),d("design:paramtypes",[Function]),d("design:returntype",void 0)],Z.prototype,"createLogger",null);a([B(),d("design:type",Function),d("design:paramtypes",[Object]),d("design:returntype",void 0)],Z.prototype,"elementStateListener",null);var $=0;Z.style=Q;var oo=".bal-option-list{display:block;position:relative;width:100%;list-style:none;margin:0;outline:0;max-height:var(--bal-option-list-max-height);border-radius:var(--bal-radius-normal);overflow:hidden auto}";var to=o("bal_option_list",function(){function o(o){r(this,o);this.inputId="bal-option-list-".concat(ro++);this.inheritAttributes={};this.ariaForm=u;this.multiple=false;this.disabled=false;this.required=false;this.focusIndex=-1;this.filter="includes";this.contentHeight=262}o.prototype.createLogger=function(o){this.log=o};o.prototype.contentHeightChanged=function(o){if(o===undefined){this.el.style.removeProperty("--bal-option-list-max-height")}else{this.el.style.setProperty("--bal-option-list-max-height","".concat(o,"px"))}};o.prototype.componentDidLoad=function(){this.contentHeightChanged(this.contentHeight)};o.prototype.componentWillRender=function(){this.inheritAttributes=l(this.el,["aria-multiselectable","aria-labelledby"])};o.prototype.listenToMouseEnter=function(o){var t=this.options;var r=this.getOptionIndex(t,o.detail.value);if(r!==undefined){this.updateFocus(t,r)}};o.prototype.listenToOptionChange=function(o){var t=o.detail;if(!this.multiple){this.options.filter((function(o){return o.value!==t.value})).forEach((function(o){return o.selected=false}))}};o.prototype.focusSelected=function(){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:o=this.options;t=this.getSelectedOptionIndex(o);if(!(t>0))return[3,2];this.updateFocus(o,t);return[4,b()];case 1:r.sent();return[2,t];case 2:return[4,this.focusFirst()];case 3:return[2,r.sent()]}}))}))};o.prototype.focusFirst=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,r;return __generator(this,(function(e){switch(e.label){case 0:o=this.options;t=this.getFirstOptionIndex(o);this.updateFocus(o,t);r=o[t];this.updateScrollTopPosition(r);return[4,b()];case 1:e.sent();return[2,t]}}))}))};o.prototype.focusLast=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,r;return __generator(this,(function(e){switch(e.label){case 0:o=this.options;t=this.getLastOptionIndex(o);this.updateFocus(o,t);r=o[t];this.updateScrollBottomPosition(r);return[4,b()];case 1:e.sent();return[2,t]}}))}))};o.prototype.focusNext=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,r;return __generator(this,(function(e){switch(e.label){case 0:o=this.options;t=this.getNextOptionIndex(o);this.updateFocus(o,t);r=o[t];this.updateScrollBottomPosition(r);return[4,b()];case 1:e.sent();return[2,t]}}))}))};o.prototype.focusPrevious=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,r;return __generator(this,(function(e){switch(e.label){case 0:o=this.options;t=this.getPreviousOptionIndex(o);this.updateFocus(o,t);r=o[t];this.updateScrollTopPosition(r);return[4,b()];case 1:e.sent();return[2,t]}}))}))};o.prototype.focusByLabel=function(o,t){return __awaiter(this,void 0,void 0,(function(){var r,e,n;return __generator(this,(function(i){switch(i.label){case 0:r=this.options;e=this.getOptionIndexByLabel(r,o);this.updateFocus(r,e);n=r[e];this.updateScrollTopPosition(n);return[4,b()];case 1:i.sent();if(!t.select)return[3,3];return[4,n.select()];case 2:i.sent();i.label=3;case 3:return[2,e]}}))}))};o.prototype.filterByContent=function(o){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=this.allOptions;this.filterOptions(t,o);return[4,b()];case 1:r.sent();return[2,this.focusFirst()]}}))}))};o.prototype.resetHidden=function(){return __awaiter(this,arguments,void 0,(function(o){if(o===void 0){o=false}return __generator(this,(function(t){switch(t.label){case 0:this.options.forEach((function(t){return t.hidden=o}));return[4,b()];case 1:t.sent();this.resetFocus();return[2]}}))}))};o.prototype.resetSelected=function(){return __awaiter(this,arguments,void 0,(function(o){if(o===void 0){o=false}return __generator(this,(function(t){switch(t.label){case 0:this.options.forEach((function(t){return t.selected=o}));return[4,b()];case 1:t.sent();return[2]}}))}))};o.prototype.updateSelected=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.options.forEach((function(t){return t.selected=o.includes(t.value)}));return[4,b()];case 1:t.sent();return[2]}}))}))};o.prototype.resetFocus=function(){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:o=this.options;t=-1;this.updateFocus(o,t);this.scrollTo(0);return[4,b()];case 1:r.sent();return[2,t]}}))}))};o.prototype.getSelectedValues=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=this.options;return[2,o.filter((function(o){return o.selected})).map((function(o){return o.value}))]}))}))};o.prototype.getSelectedOptions=function(o){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=this.options;if(o&&o.length>0){return[2,t.filter((function(t){return o.includes(t.value)})).map((function(o){return o}))]}return[2,t.filter((function(o){return o.selected})).map((function(o){return o}))]}))}))};o.prototype.getValues=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.options.map((function(o){return o.value}))]}))}))};o.prototype.getLabels=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.options.map((function(o){return o.label}))]}))}))};o.prototype.getOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.options.filter((function(o){return!o.disabled||!o.hidden}))]}))}))};o.prototype.selectByFocus=function(){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){o=this.options;t=o[this.focusIndex];if(t){if(this.multiple){t.select(!t.selected)}else{t.select(true)}}return[2]}))}))};o.prototype.setAriaForm=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},o);return[2]}))}))};Object.defineProperty(o.prototype,"options",{get:function(){return Array.from(this.el.querySelectorAll("bal-option")).filter((function(o){return!o.hidden}))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"allOptions",{get:function(){return Array.from(this.el.querySelectorAll("bal-option"))},enumerable:false,configurable:true});o.prototype.filterOptions=function(o,t){var r=[];var e=this.filter==="includes"?I:q;for(var n=0;n<o.length;n++){var i=o[n];var a=i.textContent||"";if(e(a,t)){r.push(i);i.hidden=false}else{i.hidden=true}}return r};o.prototype.isOptionVisible=function(o){var t=this.el.clientHeight;var r=this.el.scrollTop;var e=r+t;var n=r<=o.offsetTop&&o.offsetTop+o.clientHeight<=e;return n};o.prototype.updateScrollTopPosition=function(o){if(o){var t=this.isOptionVisible(o);if(!t){this.scrollTo(this.getScrollTopForTopPosition(o))}}};o.prototype.updateScrollBottomPosition=function(o){if(o){var t=this.isOptionVisible(o);if(!t){this.scrollTo(this.getScrollTopForBottomPosition(o))}}};o.prototype.getScrollTopForTopPosition=function(o){var t=o.offsetTop;var r=t;if(r<0){return 0}return r};o.prototype.getScrollTopForBottomPosition=function(o){var t=this.el.clientHeight;var r=o.offsetTop+o.clientHeight;var e=r-t;if(e<0){return 0}return e};o.prototype.scrollTo=function(o){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){if(o!==undefined&&o!==null){if(this.focusRaf!==undefined){cancelAnimationFrame(this.focusRaf)}this.focusRaf=w((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.el.scrollTop=o;return[2]}))}))}))}return[2]}))}))};o.prototype.updateFocus=function(o,t){this.focusIndex=t;for(var r=0;r<o.length;r++){var e=o[r];e.focused=r===t}};o.prototype.getOptionIndex=function(o,t){for(var r=0;r<o.length;r++){var e=o[r];if(e.value===t){return r}}return undefined};o.prototype.getSelectedOptionIndex=function(o){for(var t=0;t<o.length;t++){var r=o[t];if(r.selected&&!r.hidden){return t}}return this.focusIndex};o.prototype.getFirstOptionIndex=function(o){for(var t=0;t<o.length;t++){var r=o[t];if(!r.disabled&&!r.hidden){return t}}return this.focusIndex};o.prototype.getNextOptionIndex=function(o,t){if(t===void 0){t=this.focusIndex}if(t<0){return this.getFirstOptionIndex(o)}var r=this.getLength(o);var e=t;if(t<r){e=t+1;if(o[e].disabled){return this.getNextOptionIndex(o,e)}}return e};o.prototype.getPreviousOptionIndex=function(o,t){if(t===void 0){t=this.focusIndex}var r=this.getFirstOptionIndex(o);if(t<=r){return r}var e=t;e=t-1;if(o[e].disabled){return this.getPreviousOptionIndex(o,e)}return e};o.prototype.getLastOptionIndex=function(o){for(var t=o.length-1;t>=0;t--){var r=o[t];if(!r.disabled){return t}}return this.focusIndex};o.prototype.getOptionIndexByLabel=function(o,t){if(t===undefined||t===""){return this.focusIndex}var r=o.find((function(o){return q(o.label||"",t)}));if(!g(r)&&r.id){return o.indexOf(r)}return this.focusIndex};o.prototype.getLength=function(o){var t=o.map((function(o,t){return o.disabled?0:t}));var r=Math.max.apply(Math,t);return r};o.prototype.render=function(){var o=s.block("option-list");var r=this.labelledby||this.ariaForm.labelId;return t(n,{key:"bcb9ee55aefe68beac309225d1127524f327f9da",class:Object.assign({},o.class()),id:this.inputId},t("div",Object.assign({key:"ac14c8a5615c6497569ca0aa8436dda3924babf6",role:"listbox","aria-labelledby":r,"aria-disabled":O(this.disabled),class:Object.assign({},o.element("container").class())},this.inheritAttributes),t("slot",{key:"869656387e53fd832b45141cb3b5b89684e61727"})))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{contentHeight:["contentHeightChanged"]}},enumerable:false,configurable:true});return o}());a([m("bal-option-list"),d("design:type",Function),d("design:paramtypes",[Function]),d("design:returntype",void 0)],to.prototype,"createLogger",null);var ro=0;to.style=oo}}}));
|