@proximus/lavender-carousel 2.0.0-alpha.23 → 2.0.0-alpha.231

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/dist/index.es.js CHANGED
@@ -1,431 +1,523 @@
1
- var O = (r) => {
2
- throw TypeError(r);
1
+ import { AttributeBreakpointHandlerDelegate as e, PxElement as t, WithExtraAttributes as n, accessibilityAttributes as r, backgroundColorValues as i, booleanPropertyToAttributeSetter as a, checkName as o, createTemplate as s, gapValues as c, iconSizeValuesKC as l, log as u, nativeButtonAttributes as d, nativeButtonMethods as f, nativeButtonProperties as p, propertyToAttributeSetter as m, renderTemplate as h } from "@proximus/lavender-common";
2
+ //#region src/carousel.css?inline
3
+ var g = ":host{display:block}:host *{box-sizing:border-box}:host{--px-carousel-visible-items:1;--px-carousel-gap-default:var(--px-spacing-default-desktop)}:host([visible-items=\"1\"]){--px-carousel-visible-items:1}:host([visible-items=\"2\"]){--px-carousel-visible-items:2}:host([visible-items=\"3\"]){--px-carousel-visible-items:3}:host([visible-items=\"4\"]){--px-carousel-visible-items:4}:host([visible-items=\"5\"]){--px-carousel-visible-items:5}:host([visible-items=\"6\"]){--px-carousel-visible-items:6}:host([visible-items=\"7\"]){--px-carousel-visible-items:7}:host([visible-items=\"8\"]){--px-carousel-visible-items:8}:host([visible-items=\"9\"]){--px-carousel-visible-items:9}:host([visible-items--mobile=\"1\"]){--px-carousel-visible-items--mobile:1}:host([visible-items--mobile=\"2\"]){--px-carousel-visible-items--mobile:2}:host([visible-items--mobile=\"3\"]){--px-carousel-visible-items--mobile:3}:host([visible-items--mobile=\"4\"]){--px-carousel-visible-items--mobile:4}:host([visible-items--mobile=\"5\"]){--px-carousel-visible-items--mobile:5}:host([visible-items--mobile=\"6\"]){--px-carousel-visible-items--mobile:6}:host([visible-items--mobile=\"7\"]){--px-carousel-visible-items--mobile:7}:host([visible-items--mobile=\"8\"]){--px-carousel-visible-items--mobile:8}:host([visible-items--mobile=\"9\"]){--px-carousel-visible-items--mobile:9}:host([visible-items--tablet=\"1\"]){--px-carousel-visible-items--tablet:1}:host([visible-items--tablet=\"2\"]){--px-carousel-visible-items--tablet:2}:host([visible-items--tablet=\"3\"]){--px-carousel-visible-items--tablet:3}:host([visible-items--tablet=\"4\"]){--px-carousel-visible-items--tablet:4}:host([visible-items--tablet=\"5\"]){--px-carousel-visible-items--tablet:5}:host([visible-items--tablet=\"6\"]){--px-carousel-visible-items--tablet:6}:host([visible-items--tablet=\"7\"]){--px-carousel-visible-items--tablet:7}:host([visible-items--tablet=\"8\"]){--px-carousel-visible-items--tablet:8}:host([visible-items--tablet=\"9\"]){--px-carousel-visible-items--tablet:9}:host([visible-items--laptop=\"1\"]){--px-carousel-visible-items--laptop:1}:host([visible-items--laptop=\"2\"]){--px-carousel-visible-items--laptop:2}:host([visible-items--laptop=\"3\"]){--px-carousel-visible-items--laptop:3}:host([visible-items--laptop=\"4\"]){--px-carousel-visible-items--laptop:4}:host([visible-items--laptop=\"5\"]){--px-carousel-visible-items--laptop:5}:host([visible-items--laptop=\"6\"]){--px-carousel-visible-items--laptop:6}:host([visible-items--laptop=\"7\"]){--px-carousel-visible-items--laptop:7}:host([visible-items--laptop=\"8\"]){--px-carousel-visible-items--laptop:8}:host([visible-items--laptop=\"9\"]){--px-carousel-visible-items--laptop:9}:host([visible-items--desktop=\"1\"]){--px-carousel-visible-items--desktop:1}:host([visible-items--desktop=\"2\"]){--px-carousel-visible-items--desktop:2}:host([visible-items--desktop=\"3\"]){--px-carousel-visible-items--desktop:3}:host([visible-items--desktop=\"4\"]){--px-carousel-visible-items--desktop:4}:host([visible-items--desktop=\"5\"]){--px-carousel-visible-items--desktop:5}:host([visible-items--desktop=\"6\"]){--px-carousel-visible-items--desktop:6}:host([visible-items--desktop=\"7\"]){--px-carousel-visible-items--desktop:7}:host([visible-items--desktop=\"8\"]){--px-carousel-visible-items--desktop:8}:host([visible-items--desktop=\"9\"]){--px-carousel-visible-items--desktop:9}:host([gap=default]){--px-carousel-gap-default:var(--px-spacing-default-desktop)}:host([gap=s]){--px-carousel-gap-default:var(--px-spacing-s-desktop)}:host([gap=xs]){--px-carousel-gap-default:var(--px-spacing-xs-desktop)}:host([gap=\"2xs\"]){--px-carousel-gap-default:var(--px-spacing-2xs-desktop)}:host([gap=l]){--px-carousel-gap-default:var(--px-spacing-l-desktop)}:host([gap=none]){--px-carousel-gap-default:0}:host([gap--mobile=default]){--px-carousel-gap-default--mobile:var(--px-spacing-default-mobile)}:host([gap--mobile=s]){--px-carousel-gap-default--mobile:var(--px-spacing-s-mobile)}:host([gap--mobile=xs]){--px-carousel-gap-default--mobile:var(--px-spacing-xs-mobile)}:host([gap--mobile=\"2xs\"]){--px-carousel-gap-default--mobile:var(--px-spacing-2xs-mobile)}:host([gap--mobile=l]){--px-carousel-gap-default--mobile:var(--px-spacing-l-mobile)}:host([gap--mobile=none]){--px-carousel-gap-default--mobile:0}:host([gap--tablet=default]){--px-carousel-gap-default--tablet:var(--px-spacing-default-tablet)}:host([gap--tablet=s]){--px-carousel-gap-default--tablet:var(--px-spacing-s-tablet)}:host([gap--tablet=xs]){--px-carousel-gap-default--tablet:var(--px-spacing-xs-tablet)}:host([gap--tablet=\"2xs\"]){--px-carousel-gap-default--tablet:var(--px-spacing-2xs-tablet)}:host([gap--tablet=l]){--px-carousel-gap-default--tablet:var(--px-spacing-l-tablet)}:host([gap--tablet=none]){--px-carousel-gap-default--tablet:0}:host([gap--laptop=default]){--px-carousel-gap-default--laptop:var(--px-spacing-default-laptop)}:host([gap--laptop=s]){--px-carousel-gap-default--laptop:var(--px-spacing-s-laptop)}:host([gap--laptop=xs]){--px-carousel-gap-default--laptop:var(--px-spacing-xs-laptop)}:host([gap--laptop=\"2xs\"]){--px-carousel-gap-default--laptop:var(--px-spacing-2xs-laptop)}:host([gap--laptop=l]){--px-carousel-gap-default--laptop:var(--px-spacing-l-laptop)}:host([gap--laptop=none]){--px-carousel-gap-default--laptop:0}:host([gap--desktop=default]){--px-carousel-gap-default--desktop:var(--px-spacing-default-desktop)}:host([gap--desktop=s]){--px-carousel-gap-default--desktop:var(--px-spacing-s-desktop)}:host([gap--desktop=xs]){--px-carousel-gap-default--desktop:var(--px-spacing-xs-desktop)}:host([gap--desktop=\"2xs\"]){--px-carousel-gap-default--desktop:var(--px-spacing-2xs-desktop)}:host([gap--desktop=l]){--px-carousel-gap-default--desktop:var(--px-spacing-l-desktop)}:host([gap--desktop=none]){--px-carousel-gap-default--desktop:0}.carousel{scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-carousel-gap-default--desktop,var(--px-carousel-gap-default));display:flex;overflow:auto hidden}@media screen and (width<=48rem){.carousel{gap:var(--px-carousel-gap-default--mobile,var(--px-carousel-gap-default))}}@media screen and (width>=48.0625rem) and (width<=64rem){.carousel{gap:var(--px-carousel-gap-default--tablet,var(--px-carousel-gap-default))}}@media screen and (width>=64.0625rem) and (width<=90rem){.carousel{gap:var(--px-carousel-gap-default--laptop,var(--px-carousel-gap-default))}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media screen and (width<=48rem){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}", _ = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;border-radius:var(--px-radius-main);--visible-items:var(--px-carousel-visible-items--desktop,var(--px-carousel-visible-items,1));--spacing:var(--px-carousel-gap-default--desktop,var(--px-carousel-gap-default,var(--px-spacing-s-desktop)));min-width:calc((100% - max(var(--visible-items), 2) * var(--spacing)) / var(--visible-items) - 64px / max(var(--visible-items), 2));background:#fff;justify-content:center;align-items:center;overflow:hidden}@media screen and (width<=48rem){:host{--visible-items:var(--px-carousel-visible-items--mobile,var(--px-carousel-visible-items,1));--spacing:var(--px-carousel-gap-default--mobile,var(--px-carousel-gap-default,var(--px-spacing-s-mobile)))}}@media screen and (width>=48.0625rem) and (width<=64rem){:host{--visible-items:var(--px-carousel-visible-items--tablet,var(--px-carousel-visible-items,1));--spacing:var(--px-carousel-gap-default--tablet,var(--px-carousel-gap-default,var(--px-spacing-s-desktop)))}}@media screen and (width>=64.0625rem) and (width<=90rem){:host{--visible-items:var(--px-carousel-visible-items--laptop,var(--px-carousel-visible-items,1));--spacing:var(--px-carousel-gap-default--laptop,var(--px-carousel-gap-default,var(--px-spacing-s-desktop)))}}@media screen and (width<=48rem){:host{scroll-snap-align:center;flex:1 0 var(--px-carousel-min-width-mobile,var(--px-carousel-min-width-all-mobile))!important}}@media screen and (width>=48rem) and (width<=64rem){:host{flex:1 0 var(--px-carousel-min-width-tablet,var(--px-carousel-min-width-all-tablet))!important}}", v = ":host{--host-gap--mobile:var(--px-spacing-none-mobile);--host-gap--tablet:var(--px-spacing-none-tablet);--host-gap--laptop:var(--px-spacing-none-desktop);--host-gap--desktop:var(--px-spacing-none-desktop);--overflow-x-all:visible;--overflow-x-all-mobile:initial;--overflow-x-all-tablet:initial;--overflow-x-all-laptop:initial;--overflow-x-all-desktop:initial;display:block}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-mobile) - var(--host-gap--mobile))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{--flex-direction--mobile-value:row;--flex-direction--tablet-value:row;--flex-direction--laptop-value:row;--flex-direction--desktop-value:row;--flex-gap--mobile-value:var(--px-spacing-none-mobile);--flex-gap--tablet-value:var(--px-spacing-none-tablet);--flex-gap--laptop-value:var(--px-spacing-none-desktop);--flex-gap--desktop-value:var(--px-spacing-none-desktop);--flex-align-items--mobile-value:stretch;--flex-align-items--tablet-value:stretch;--flex-align-items--laptop-value:stretch;--flex-align-items--desktop-value:stretch;--flex-justify-content--mobile-value:flex-start;--flex-justify-content--tablet-value:flex-start;--flex-justify-content--laptop-value:flex-start;--flex-justify-content--desktop-value:flex-start;--flex-wrap--mobile-value:nowrap;--flex-wrap--tablet-value:nowrap;--flex-wrap--laptop-value:nowrap;--flex-wrap--desktop-value:nowrap;--flex-overflow-y--mobile-value:visible;--flex-overflow-y--tablet-value:visible;--flex-overflow-y--laptop-value:visible;--flex-overflow-y--desktop-value:visible;--flex-max-height--mobile-value:none;--flex-max-height--tablet-value:none;--flex-max-height--laptop-value:none;--flex-max-height--desktop-value:none;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);width:100%;height:100%;overflow-x:var(--overflow-x-all);overflow-y:var(--flex-overflow-y--mobile-value);max-height:var(--flex-max-height--mobile-value);display:flex}@media screen and (width<=47.938rem){.flex-container{overflow-x:var(--overflow-x-all-mobile,var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (width>=48rem){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value);overflow-y:var(--flex-overflow-y--tablet-value);max-height:var(--flex-max-height--tablet-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-tablet) - var(--host-gap--tablet))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media screen and (width>=48rem) and (width<=64rem){.flex-container{overflow-x:var(--overflow-x-all-tablet,var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (width>=64.0625rem){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value);overflow-y:var(--flex-overflow-y--laptop-value);max-height:var(--flex-max-height--laptop-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-laptop) - var(--host-gap--laptop))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media screen and (width>=64.0625rem) and (width<=90rem){.flex-container{overflow-x:var(--overflow-x-all-laptop,var(--overflow-x-all))}}@media screen and (width>=90.0625rem){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-y:var(--flex-overflow-y--desktop-value);max-height:var(--flex-max-height--desktop-value);overflow-x:var(--overflow-x-all-desktop,var(--overflow-x-all))}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-desktop) - var(--host-gap--desktop))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}:host(px-vstack) .flex-container{--flex-direction--mobile-value:column!important;--flex-direction--tablet-value:column!important;--flex-direction--laptop-value:column!important;--flex-direction--desktop-value:column!important}:host(px-hstack) .flex-container{--flex-direction--mobile-value:row!important;--flex-direction--tablet-value:row!important;--flex-direction--laptop-value:row!important;--flex-direction--desktop-value:row!important}", y = new CSSStyleSheet();
4
+ y.replaceSync(v);
5
+ var b = document.createElement("template");
6
+ b.innerHTML = "<div class=\"flex-container\"><slot></slot></div>";
7
+ var x = [
8
+ "",
9
+ "default",
10
+ "row",
11
+ "row-reverse",
12
+ "column",
13
+ "column-reverse"
14
+ ], ee = [
15
+ "",
16
+ "default",
17
+ "stretch",
18
+ "flex-start",
19
+ "start",
20
+ "flex-end",
21
+ "end",
22
+ "center",
23
+ "baseline"
24
+ ], te = [
25
+ "",
26
+ "default",
27
+ "flex-start",
28
+ "start",
29
+ "flex-end",
30
+ "end",
31
+ "center",
32
+ "space-between",
33
+ "space-around",
34
+ "space-evenly"
35
+ ], ne = [
36
+ "",
37
+ "default",
38
+ "nowrap",
39
+ "wrap",
40
+ "wrap-reverse"
41
+ ], S = [
42
+ "",
43
+ "visible",
44
+ "hidden",
45
+ "scroll",
46
+ "auto"
47
+ ], C = class t extends n {
48
+ constructor() {
49
+ super(y), this.overflowXAttributeDelegate = new e(this, "overflow-x", (e) => e, "--overflow-x"), this.shadowRoot.firstChild || this.shadowRoot.appendChild(document.importNode(b.content, !0));
50
+ }
51
+ connectedCallback() {}
52
+ static get observedAttributes() {
53
+ return [
54
+ ...super.observedAttributes,
55
+ "direction",
56
+ "direction--mobile",
57
+ "direction--tablet",
58
+ "direction--laptop",
59
+ "direction--desktop",
60
+ "gap",
61
+ "gap--mobile",
62
+ "gap--tablet",
63
+ "gap--laptop",
64
+ "gap--desktop",
65
+ "justify-content",
66
+ "justify-content--mobile",
67
+ "justify-content--tablet",
68
+ "justify-content--laptop",
69
+ "justify-content--desktop",
70
+ "align-items",
71
+ "align-items--mobile",
72
+ "align-items--tablet",
73
+ "align-items--laptop",
74
+ "align-items--desktop",
75
+ "wrap",
76
+ "wrap--mobile",
77
+ "wrap--tablet",
78
+ "wrap--laptop",
79
+ "wrap--desktop",
80
+ "overflow-x",
81
+ "overflow-x--mobile",
82
+ "overflow-x--tablet",
83
+ "overflow-x--laptop",
84
+ "overflow-x--desktop",
85
+ "overflow-y",
86
+ "overflow-y--mobile",
87
+ "overflow-y--tablet",
88
+ "overflow-y--laptop",
89
+ "overflow-y--desktop",
90
+ "max-height",
91
+ "max-height--mobile",
92
+ "max-height--tablet",
93
+ "max-height--laptop",
94
+ "max-height--desktop"
95
+ ];
96
+ }
97
+ attributeChangedCallback(e, t, n) {
98
+ switch (e) {
99
+ case "gap":
100
+ case "gap--mobile":
101
+ case "gap--tablet":
102
+ case "gap--laptop":
103
+ case "gap--desktop":
104
+ this.updateFlexProperties(e, t, n, c);
105
+ break;
106
+ case "justify-content":
107
+ case "justify-content--mobile":
108
+ case "justify-content--tablet":
109
+ case "justify-content--laptop":
110
+ case "justify-content--desktop":
111
+ this.updateFlexProperties(e, t, n, te);
112
+ break;
113
+ case "align-items":
114
+ case "align-items--mobile":
115
+ case "align-items--tablet":
116
+ case "align-items--laptop":
117
+ case "align-items--desktop":
118
+ this.updateFlexProperties(e, t, n, ee);
119
+ break;
120
+ case "wrap":
121
+ case "wrap--mobile":
122
+ case "wrap--tablet":
123
+ case "wrap--laptop":
124
+ case "wrap--desktop":
125
+ this.updateFlexProperties(e, t, n, ne);
126
+ break;
127
+ case "direction":
128
+ case "direction--mobile":
129
+ case "direction--tablet":
130
+ case "direction--laptop":
131
+ case "direction--desktop":
132
+ this.updateFlexProperties(e, t, n, x), this.updateVerticalStyles();
133
+ break;
134
+ case "overflow-y":
135
+ case "overflow-y--mobile":
136
+ case "overflow-y--tablet":
137
+ case "overflow-y--laptop":
138
+ case "overflow-y--desktop":
139
+ case "max-height":
140
+ case "max-height--mobile":
141
+ case "max-height--tablet":
142
+ case "max-height--laptop":
143
+ case "max-height--desktop":
144
+ n && !this.isValidVerticalValue(e, n) && u(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}.`), this.updateVerticalStyles();
145
+ break;
146
+ case "overflow-x":
147
+ case "overflow-x--mobile":
148
+ case "overflow-x--tablet":
149
+ case "overflow-x--laptop":
150
+ case "overflow-x--desktop":
151
+ this.updateOverflowX(e, t, n, S);
152
+ break;
153
+ default: super.attributeChangedCallback(e, t, n);
154
+ }
155
+ }
156
+ isValidVerticalValue(e, t) {
157
+ return e.startsWith("overflow-y") ? S.includes(t) : CSS.supports("max-height", t);
158
+ }
159
+ updateVerticalStyles() {
160
+ for (let e of t.breakpoints) {
161
+ let t = this.localName === "px-stack" && this.getAttribute(`direction--${e}`) || this.direction, n = t === "column" || t === "column-reverse";
162
+ for (let t of ["overflow-y", "max-height"]) {
163
+ let r = this.getAttribute(`${t}--${e}`) || this.getAttribute(t);
164
+ this.updateStyle(t, e, n && r && this.isValidVerticalValue(t, r) ? r : null);
165
+ }
166
+ }
167
+ }
168
+ updateOverflowX(e, t, n, r) {
169
+ o(r, n) ? this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n) : u(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
170
+ }
171
+ updateFlexProperties(e, n, r, i) {
172
+ r !== null && !this.checkName(i, r) && u(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
173
+ let a = e.indexOf("--");
174
+ if (a === -1) for (let n of t.breakpoints) this.getAttribute(`${e}--${n}`) || this.updateStyle(e, n, r, i);
175
+ else {
176
+ let t = e.slice(0, a), n = e.slice(a + 2);
177
+ this.updateStyle(t, n, r || this.getAttribute(t), i);
178
+ }
179
+ }
180
+ updateStyle(e, t, n, r) {
181
+ let i = `--flex-${e}--${t}-value`, a = e === "gap";
182
+ if (!n) this.$el.style.removeProperty(i), a && this.style.removeProperty(`--host-gap--${t}`);
183
+ else if (a && r && r.includes(n)) {
184
+ let e = `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`;
185
+ this.$el.style.setProperty(i, e), this.style.setProperty(`--host-gap--${t}`, e);
186
+ } else this.$el.style.setProperty(i, n);
187
+ }
188
+ static {
189
+ this.breakpoints = [
190
+ "mobile",
191
+ "tablet",
192
+ "laptop",
193
+ "desktop"
194
+ ];
195
+ }
196
+ get direction() {
197
+ return this.getAttribute("direction") ?? "row";
198
+ }
199
+ set direction(e) {
200
+ m(this, "direction", e);
201
+ }
202
+ get directionMobile() {
203
+ return this.getAttribute("direction--mobile");
204
+ }
205
+ set directionMobile(e) {
206
+ m(this, "direction--mobile", e);
207
+ }
208
+ get directionTablet() {
209
+ return this.getAttribute("direction--tablet");
210
+ }
211
+ set directionTablet(e) {
212
+ m(this, "direction--tablet", e);
213
+ }
214
+ get directionLaptop() {
215
+ return this.getAttribute("direction--laptop");
216
+ }
217
+ set directionLaptop(e) {
218
+ m(this, "direction--laptop", e);
219
+ }
220
+ get directionDesktop() {
221
+ return this.getAttribute("direction--desktop");
222
+ }
223
+ set directionDesktop(e) {
224
+ m(this, "direction--desktop", e);
225
+ }
226
+ get gap() {
227
+ return this.getAttribute("gap") ?? "none";
228
+ }
229
+ set gap(e) {
230
+ m(this, "gap", e);
231
+ }
232
+ get gapMobile() {
233
+ return this.getAttribute("gap--mobile");
234
+ }
235
+ set gapMobile(e) {
236
+ m(this, "gap--mobile", e);
237
+ }
238
+ get gapTablet() {
239
+ return this.getAttribute("gap--tablet");
240
+ }
241
+ set gapTablet(e) {
242
+ m(this, "gap--tablet", e);
243
+ }
244
+ get gapLaptop() {
245
+ return this.getAttribute("gap--laptop");
246
+ }
247
+ set gapLaptop(e) {
248
+ m(this, "gap--laptop", e);
249
+ }
250
+ get gapDesktop() {
251
+ return this.getAttribute("gap--desktop");
252
+ }
253
+ set gapDesktop(e) {
254
+ m(this, "gap--desktop", e);
255
+ }
256
+ get justifyContent() {
257
+ return this.getAttribute("justify-content") ?? "flex-start";
258
+ }
259
+ set justifyContent(e) {
260
+ m(this, "justify-content", e);
261
+ }
262
+ get justifyContentMobile() {
263
+ return this.getAttribute("justify-content--mobile");
264
+ }
265
+ set justifyContentMobile(e) {
266
+ m(this, "justify-content--mobile", e);
267
+ }
268
+ get justifyContentTablet() {
269
+ return this.getAttribute("justify-content--tablet");
270
+ }
271
+ set justifyContentTablet(e) {
272
+ m(this, "justify-content--tablet", e);
273
+ }
274
+ get justifyContentLaptop() {
275
+ return this.getAttribute("justify-content--laptop");
276
+ }
277
+ set justifyContentLaptop(e) {
278
+ m(this, "justify-content--laptop", e);
279
+ }
280
+ get justifyContentDesktop() {
281
+ return this.getAttribute("justify-content--desktop");
282
+ }
283
+ set justifyContentDesktop(e) {
284
+ m(this, "justify-content--desktop", e);
285
+ }
286
+ get alignItems() {
287
+ return this.getAttribute("align-items") ?? "stretch";
288
+ }
289
+ set alignItems(e) {
290
+ m(this, "align-items", e);
291
+ }
292
+ get alignItemsMobile() {
293
+ return this.getAttribute("align-items--mobile");
294
+ }
295
+ set alignItemsMobile(e) {
296
+ m(this, "align-items--mobile", e);
297
+ }
298
+ get alignItemsTablet() {
299
+ return this.getAttribute("align-items--tablet");
300
+ }
301
+ set alignItemsTablet(e) {
302
+ m(this, "align-items--tablet", e);
303
+ }
304
+ get alignItemsLaptop() {
305
+ return this.getAttribute("align-items--laptop");
306
+ }
307
+ set alignItemsLaptop(e) {
308
+ m(this, "align-items--laptop", e);
309
+ }
310
+ get alignItemsDesktop() {
311
+ return this.getAttribute("align-items--desktop");
312
+ }
313
+ set alignItemsDesktop(e) {
314
+ m(this, "align-items--desktop", e);
315
+ }
316
+ get wrap() {
317
+ return this.getAttribute("wrap") ?? "nowrap";
318
+ }
319
+ set wrap(e) {
320
+ m(this, "wrap", e);
321
+ }
322
+ get wrapMobile() {
323
+ return this.getAttribute("wrap--mobile");
324
+ }
325
+ set wrapMobile(e) {
326
+ m(this, "wrap--mobile", e);
327
+ }
328
+ get wrapTablet() {
329
+ return this.getAttribute("wrap--tablet");
330
+ }
331
+ set wrapTablet(e) {
332
+ m(this, "wrap--tablet", e);
333
+ }
334
+ get wrapLaptop() {
335
+ return this.getAttribute("wrap--laptop");
336
+ }
337
+ set wrapLaptop(e) {
338
+ m(this, "wrap--laptop", e);
339
+ }
340
+ get wrapDesktop() {
341
+ return this.getAttribute("wrap--desktop");
342
+ }
343
+ set wrapDesktop(e) {
344
+ m(this, "wrap--desktop", e);
345
+ }
346
+ get overflowX() {
347
+ return this.getAttribute("overflow-x") ?? "visible";
348
+ }
349
+ set overflowX(e) {
350
+ m(this, "overflow-x", e);
351
+ }
352
+ get overflowXMobile() {
353
+ return this.getAttribute("overflow-x--mobile");
354
+ }
355
+ set overflowXMobile(e) {
356
+ m(this, "overflow-x--mobile", e);
357
+ }
358
+ get overflowXTablet() {
359
+ return this.getAttribute("overflow-x--tablet");
360
+ }
361
+ set overflowXTablet(e) {
362
+ m(this, "overflow-x--tablet", e);
363
+ }
364
+ get overflowXLaptop() {
365
+ return this.getAttribute("overflow-x--laptop");
366
+ }
367
+ set overflowXLaptop(e) {
368
+ m(this, "overflow-x--laptop", e);
369
+ }
370
+ get overflowXDesktop() {
371
+ return this.getAttribute("overflow-x--desktop");
372
+ }
373
+ set overflowXDesktop(e) {
374
+ m(this, "overflow-x--desktop", e);
375
+ }
376
+ get overflowY() {
377
+ return this.getAttribute("overflow-y") ?? "visible";
378
+ }
379
+ set overflowY(e) {
380
+ m(this, "overflow-y", e);
381
+ }
382
+ get overflowYMobile() {
383
+ return this.getAttribute("overflow-y--mobile");
384
+ }
385
+ set overflowYMobile(e) {
386
+ m(this, "overflow-y--mobile", e);
387
+ }
388
+ get overflowYTablet() {
389
+ return this.getAttribute("overflow-y--tablet");
390
+ }
391
+ set overflowYTablet(e) {
392
+ m(this, "overflow-y--tablet", e);
393
+ }
394
+ get overflowYLaptop() {
395
+ return this.getAttribute("overflow-y--laptop");
396
+ }
397
+ set overflowYLaptop(e) {
398
+ m(this, "overflow-y--laptop", e);
399
+ }
400
+ get overflowYDesktop() {
401
+ return this.getAttribute("overflow-y--desktop");
402
+ }
403
+ set overflowYDesktop(e) {
404
+ m(this, "overflow-y--desktop", e);
405
+ }
406
+ get maxHeight() {
407
+ return this.getAttribute("max-height") ?? "none";
408
+ }
409
+ set maxHeight(e) {
410
+ m(this, "max-height", e);
411
+ }
412
+ get maxHeightMobile() {
413
+ return this.getAttribute("max-height--mobile");
414
+ }
415
+ set maxHeightMobile(e) {
416
+ m(this, "max-height--mobile", e);
417
+ }
418
+ get maxHeightTablet() {
419
+ return this.getAttribute("max-height--tablet");
420
+ }
421
+ set maxHeightTablet(e) {
422
+ m(this, "max-height--tablet", e);
423
+ }
424
+ get maxHeightLaptop() {
425
+ return this.getAttribute("max-height--laptop");
426
+ }
427
+ set maxHeightLaptop(e) {
428
+ m(this, "max-height--laptop", e);
429
+ }
430
+ get maxHeightDesktop() {
431
+ return this.getAttribute("max-height--desktop");
432
+ }
433
+ set maxHeightDesktop(e) {
434
+ m(this, "max-height--desktop", e);
435
+ }
436
+ get $el() {
437
+ return this.shadowRoot.firstElementChild;
438
+ }
3
439
  };
4
- var N = (r, t, e) => t.has(r) || O("Cannot " + e);
5
- var d = (r, t, e) => (N(r, t, "read from private field"), e ? e.call(r) : t.get(r)), k = (r, t, e) => t.has(r) ? O("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), j = (r, t, e, i) => (N(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
6
- import { WithExtraAttributes as I, AttributeBreakpointHandlerDelegate as B, gapValues as G, checkName as st, log as x, backgroundColorValues as ot, PxElement as at, transferAccessibilityAttributes as nt, iconSizeValuesKC as lt, cssTokenBreakpoints as ct } from "@proximus/lavender-common";
7
- const dt = ":host{display:block}:host *{box-sizing:border-box}.carousel{overflow:hidden;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-spacing-default-desktop)}@media only screen and (max-width: 768px){.carousel{gap:var(--px-spacing-default-mobile)}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media only screen and (max-width: 768px){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}", pt = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;align-items:center;justify-content:center;flex:1 0 var( --px-carousel-min-width-desktop, var(--px-carousel-min-width-all-desktop) );border-radius:var(--px-radius-main);background:#fff;overflow:hidden}@media screen and (max-width: 768px){:host{scroll-snap-align:center;flex:1 0 var( --px-carousel-min-width-mobile, var(--px-carousel-min-width-all-mobile) )!important}}@media screen and (min-width: 768px) and (max-width: 1024px){:host{flex:1 0 var( --px-carousel-min-width-tablet, var(--px-carousel-min-width-all-tablet) )!important}}", ut = ':host{display:block}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);overflow-x:var(--overflow-x-all)}@media only screen and (max-width: 47.9375em){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 48em){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media only screen and (min-width: 48em) and (max-width: 64em){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 64.0625em){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media only screen and (min-width: 90.0625em){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop, var(--overflow-x-all))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}', Z = new CSSStyleSheet();
8
- Z.replaceSync(ut);
9
- const ht = [
10
- "",
11
- "default",
12
- "row",
13
- "row-reverse",
14
- "column",
15
- "column-reverse"
16
- ], bt = [
17
- "",
18
- "default",
19
- "stretch",
20
- "flex-start",
21
- "flex-end",
22
- "center",
23
- "baseline"
24
- ], gt = [
25
- "",
26
- "default",
27
- "flex-start",
28
- "flex-end",
29
- "center",
30
- "space-between",
31
- "space-around",
32
- "space-evenly"
33
- ], vt = ["", "default", "nowrap", "wrap", "wrap-reverse"], ft = ["", "visible", "hidden", "scroll", "auto"];
34
- class R extends I {
35
- constructor() {
36
- super(Z), this.overflowXAttributeDelegate = new B(
37
- this,
38
- "overflow-x",
39
- (t) => t,
40
- "--overflow-x"
41
- ), this.template = `<div class="flex-container">
42
- <slot></slot>
43
- </div>`, this.shadowRoot.innerHTML = this.template;
44
- }
45
- connectedCallback() {
46
- this.hasAttribute("direction") || (this.direction = "row"), this.hasAttribute("gap") || (this.gap = "none"), this.hasAttribute("align-items") || (this.alignItems = "stretch"), this.hasAttribute("justify-content") || (this.justifyContent = "flex-start"), this.hasAttribute("wrap") || (this.wrap = "nowrap"), this.hasAttribute("overflow-x") || this.overflowXAttributeDelegate.init("visible");
47
- }
48
- static get observedAttributes() {
49
- return [
50
- ...super.observedAttributes,
51
- "direction",
52
- "direction--mobile",
53
- "direction--tablet",
54
- "direction--laptop",
55
- "direction--desktop",
56
- "gap",
57
- "gap--mobile",
58
- "gap--tablet",
59
- "gap--laptop",
60
- "gap--desktop",
61
- "justify-content",
62
- "justify-content--mobile",
63
- "justify-content--tablet",
64
- "justify-content--laptop",
65
- "justify-content--desktop",
66
- "align-items",
67
- "align-items--mobile",
68
- "align-items--tablet",
69
- "align-items--laptop",
70
- "align-items--desktop",
71
- "wrap",
72
- "wrap--mobile",
73
- "wrap--tablet",
74
- "wrap--laptop",
75
- "wrap--desktop",
76
- "overflow-x",
77
- "overflow-x--mobile",
78
- "overflow-x--tablet",
79
- "overflow-x--laptop",
80
- "overflow-x--desktop"
81
- ];
82
- }
83
- attributeChangedCallback(t, e, i) {
84
- switch (t) {
85
- case "gap":
86
- case "gap--mobile":
87
- case "gap--tablet":
88
- case "gap--laptop":
89
- case "gap--desktop":
90
- this.updateFlexProperties(t, e, i, G);
91
- break;
92
- case "justify-content":
93
- case "justify-content--mobile":
94
- case "justify-content--tablet":
95
- case "justify-content--laptop":
96
- case "justify-content--desktop":
97
- this.updateFlexProperties(
98
- t,
99
- e,
100
- i,
101
- gt
102
- );
103
- break;
104
- case "align-items":
105
- case "align-items--mobile":
106
- case "align-items--tablet":
107
- case "align-items--laptop":
108
- case "align-items--desktop":
109
- this.updateFlexProperties(t, e, i, bt);
110
- break;
111
- case "wrap":
112
- case "wrap--mobile":
113
- case "wrap--tablet":
114
- case "wrap--laptop":
115
- case "wrap--desktop":
116
- this.updateFlexProperties(t, e, i, vt);
117
- break;
118
- case "direction":
119
- case "direction--mobile":
120
- case "direction--tablet":
121
- case "direction--laptop":
122
- case "direction--desktop":
123
- this.updateFlexProperties(t, e, i, ht);
124
- break;
125
- case "overflow-x":
126
- case "overflow-x--mobile":
127
- case "overflow-x--tablet":
128
- case "overflow-x--laptop":
129
- case "overflow-x--desktop":
130
- this.updateOverflowX(t, e, i, ft);
131
- break;
132
- default:
133
- super.attributeChangedCallback(t, e, i);
134
- break;
135
- }
136
- }
137
- updateOverflowX(t, e, i, s) {
138
- if (!st(s, i)) {
139
- x(
140
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
141
- );
142
- return;
143
- }
144
- this.overflowXAttributeDelegate.attributeChangedCallback(
145
- t,
146
- e,
147
- i
148
- );
149
- }
150
- updateFlexProperties(t, e, i, s) {
151
- this.checkName(s, i) || x(
152
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
153
- );
154
- const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, a = [];
155
- if (!n)
156
- this.getAttribute(l + "--mobile") || a.push("mobile"), this.getAttribute(l + "--tablet") || a.push("tablet"), this.getAttribute(l + "--laptop") || a.push("laptop"), this.getAttribute(l + "--desktop") || a.push("desktop"), a.forEach((c) => {
157
- this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
158
- });
159
- else {
160
- const c = t.split("--")[1];
161
- this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
162
- }
163
- }
164
- updateStyle(t, e, i, s) {
165
- i && (t === "gap" && s && s.includes(i) ? this.$el.style.setProperty(
166
- `--flex-${t}--${e}-value`,
167
- `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
168
- ) : this.$el.style.setProperty(
169
- `--flex-${t}--${e}-value`,
170
- i
171
- ));
172
- }
173
- get direction() {
174
- return this.getAttribute("direction");
175
- }
176
- set direction(t) {
177
- this.setAttribute("direction", t);
178
- }
179
- get directionMobile() {
180
- return this.getAttribute("direction--mobile");
181
- }
182
- set directionMobile(t) {
183
- this.setAttribute("direction--mobile", t);
184
- }
185
- get directionTablet() {
186
- return this.getAttribute("direction--tablet");
187
- }
188
- set directionTablet(t) {
189
- this.setAttribute("direction--tablet", t);
190
- }
191
- get directionLaptop() {
192
- return this.getAttribute("direction--laptop");
193
- }
194
- set directionLaptop(t) {
195
- this.setAttribute("direction--laptop", t);
196
- }
197
- get directionDesktop() {
198
- return this.getAttribute("direction--desktop");
199
- }
200
- set directionDesktop(t) {
201
- this.setAttribute("direction--desktop", t);
202
- }
203
- get gap() {
204
- return this.getAttribute("gap");
205
- }
206
- set gap(t) {
207
- this.setAttribute("gap", t);
208
- }
209
- get gapMobile() {
210
- return this.getAttribute("gap--mobile");
211
- }
212
- set gapMobile(t) {
213
- this.setAttribute("gap--mobile", t);
214
- }
215
- get gapTablet() {
216
- return this.getAttribute("gap--tablet");
217
- }
218
- set gapTablet(t) {
219
- this.setAttribute("gap--tablet", t);
220
- }
221
- get gapLaptop() {
222
- return this.getAttribute("gap--laptop");
223
- }
224
- set gapLaptop(t) {
225
- this.setAttribute("gap--laptop", t);
226
- }
227
- get gapDesktop() {
228
- return this.getAttribute("gap--desktop");
229
- }
230
- set gapDesktop(t) {
231
- this.setAttribute("gap--desktop", t);
232
- }
233
- get justifyContent() {
234
- return this.getAttribute("justify-content");
235
- }
236
- set justifyContent(t) {
237
- this.setAttribute("justify-content", t);
238
- }
239
- get justifyContentMobile() {
240
- return this.getAttribute("justify-content--mobile");
241
- }
242
- set justifyContentMobile(t) {
243
- this.setAttribute("justify-content--mobile", t);
244
- }
245
- get justifyContentTablet() {
246
- return this.getAttribute("justify-content--tablet");
247
- }
248
- set justifyContentTablet(t) {
249
- this.setAttribute("justify-content--tablet", t);
250
- }
251
- get justifyContentLaptop() {
252
- return this.getAttribute("justify-content--laptop");
253
- }
254
- set justifyContentLaptop(t) {
255
- this.setAttribute("justify-content--laptop", t);
256
- }
257
- get justifyContentDesktop() {
258
- return this.getAttribute("justify-content--desktop");
259
- }
260
- set justifyContentDesktop(t) {
261
- this.setAttribute("justify-content--desktop", t);
262
- }
263
- get alignItems() {
264
- return this.getAttribute("align-items");
265
- }
266
- set alignItems(t) {
267
- this.setAttribute("align-items", t);
268
- }
269
- get alignItemsMobile() {
270
- return this.getAttribute("align-items--mobile");
271
- }
272
- set alignItemsMobile(t) {
273
- this.setAttribute("align-items--mobile", t);
274
- }
275
- get alignItemsTablet() {
276
- return this.getAttribute("align-items--tablet");
277
- }
278
- set alignItemsTablet(t) {
279
- this.setAttribute("align-items--tablet", t);
280
- }
281
- get alignItemsLaptop() {
282
- return this.getAttribute("align-items--laptop");
283
- }
284
- set alignItemsLaptop(t) {
285
- this.setAttribute("align-items--laptop", t);
286
- }
287
- get alignItemsDesktop() {
288
- return this.getAttribute("align-items--desktop");
289
- }
290
- set alignItemsDesktop(t) {
291
- this.setAttribute("align-items--desktop", t);
292
- }
293
- get wrap() {
294
- return this.getAttribute("wrap");
295
- }
296
- set wrap(t) {
297
- this.setAttribute("wrap", t);
298
- }
299
- get wrapMobile() {
300
- return this.getAttribute("wrap--mobile");
301
- }
302
- set wrapMobile(t) {
303
- this.setAttribute("wrap--mobile", t);
304
- }
305
- get wrapTablet() {
306
- return this.getAttribute("wrap--tablet");
307
- }
308
- set wrapTablet(t) {
309
- this.setAttribute("wrap--tablet", t);
310
- }
311
- get wrapLaptop() {
312
- return this.getAttribute("wrap--laptop");
313
- }
314
- set wrapLaptop(t) {
315
- this.setAttribute("wrap--laptop", t);
316
- }
317
- get wrapDesktop() {
318
- return this.getAttribute("wrap--desktop");
319
- }
320
- set wrapDesktop(t) {
321
- this.setAttribute("wrap--desktop", t);
322
- }
323
- get overflowX() {
324
- return this.getAttribute("overflow-x");
325
- }
326
- set overflowX(t) {
327
- this.setAttribute("overflow-x", t);
328
- }
329
- get overflowXMobile() {
330
- return this.getAttribute("overflow-x--mobile");
331
- }
332
- set overflowXMobile(t) {
333
- this.setAttribute("overflow-x--mobile", t);
334
- }
335
- get overflowXTablet() {
336
- return this.getAttribute("overflow-x--tablet");
337
- }
338
- set overflowXTablet(t) {
339
- this.setAttribute("overflow-x--tablet", t);
340
- }
341
- get overflowXLaptop() {
342
- return this.getAttribute("overflow-x--laptop");
343
- }
344
- set overflowXLaptop(t) {
345
- this.setAttribute("overflow-x--laptop", t);
346
- }
347
- get overflowXDesktop() {
348
- return this.getAttribute("overflow-x--desktop");
349
- }
350
- set overflowXDesktop(t) {
351
- this.setAttribute("overflow-x--desktop", t);
352
- }
353
- get $el() {
354
- return this.shadowRoot.querySelector(".flex-container");
355
- }
356
- }
357
- customElements.get("px-stack") || customElements.define("px-stack", R);
358
- class xt extends R {
359
- constructor() {
360
- super();
361
- }
362
- connectedCallback() {
363
- super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
364
- }
365
- }
366
- customElements.get("px-vstack") || customElements.define("px-vstack", xt);
367
- class mt extends R {
368
- constructor() {
369
- super();
370
- }
371
- connectedCallback() {
372
- super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
373
- }
374
- }
375
- customElements.get("px-hstack") || customElements.define("px-hstack", mt);
376
- class kt extends HTMLElement {
377
- constructor() {
378
- super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
379
- }
380
- static get observedAttributes() {
381
- return ["grow", "nogap"];
382
- }
383
- attributeChangedCallback(t, e, i) {
384
- t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
385
- }
386
- connectedCallback() {
387
- this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
388
- this.handleSizeChange();
389
- }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
390
- }
391
- disconnectedCallback() {
392
- var t;
393
- (t = this.resizeObserver) == null || t.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
394
- }
395
- get grow() {
396
- return this.getAttribute("grow");
397
- }
398
- set grow(t) {
399
- this.setAttribute("grow", t);
400
- }
401
- scheduleRecheck() {
402
- this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
403
- this.recheckHandle = void 0, this.recalculateVisibility();
404
- });
405
- }
406
- recalculateVisibility() {
407
- this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
408
- }
409
- handleSizeChange() {
410
- const t = this.getBoundingClientRect(), e = t.width === 0 && !this.isVertical || t.height === 0 && this.isVertical;
411
- this.isZeroSized !== e && (this.isZeroSized = e, this.updateParticipation());
412
- }
413
- updateParticipation() {
414
- this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
415
- }
416
- get nogap() {
417
- return this.hasAttribute("nogap");
418
- }
419
- set nogap(t) {
420
- t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
421
- }
422
- }
423
- customElements.get("px-spacer") || customElements.define("px-spacer", kt);
424
- const yt = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", _ = new CSSStyleSheet();
425
- _.replaceSync(yt);
426
- class wt extends I {
427
- constructor() {
428
- super(_), this.template = (t) => `
440
+ customElements.get("px-stack") || customElements.define("px-stack", C);
441
+ var w = (e) => e === "direction" || e.startsWith("direction--"), re = class extends C {
442
+ get direction() {
443
+ return "column";
444
+ }
445
+ set direction(e) {
446
+ m(this, "direction", e);
447
+ }
448
+ attributeChangedCallback(e, t, n) {
449
+ w(e) || super.attributeChangedCallback(e, t, n);
450
+ }
451
+ };
452
+ customElements.get("px-vstack") || customElements.define("px-vstack", re);
453
+ var ie = class extends C {
454
+ get direction() {
455
+ return "row";
456
+ }
457
+ set direction(e) {
458
+ m(this, "direction", e);
459
+ }
460
+ attributeChangedCallback(e, t, n) {
461
+ w(e) || super.attributeChangedCallback(e, t, n);
462
+ }
463
+ };
464
+ customElements.get("px-hstack") || customElements.define("px-hstack", ie);
465
+ //#endregion
466
+ //#region ../Layout/src/Spacer.ts
467
+ var ae = class extends HTMLElement {
468
+ constructor() {
469
+ super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
470
+ }
471
+ static get observedAttributes() {
472
+ return ["grow", "nogap"];
473
+ }
474
+ attributeChangedCallback(e, t, n) {
475
+ e === "grow" && (this.growValue = n || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
476
+ }
477
+ connectedCallback() {
478
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && this.parentElement && (this.resizeObserver = new ResizeObserver(() => {
479
+ this.handleSizeChange();
480
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
481
+ }
482
+ disconnectedCallback() {
483
+ this.resizeObserver?.disconnect(), this.recheckHandle &&= (cancelAnimationFrame(this.recheckHandle), void 0);
484
+ }
485
+ get grow() {
486
+ return this.getAttribute("grow");
487
+ }
488
+ set grow(e) {
489
+ this.setAttribute("grow", `${e}`);
490
+ }
491
+ scheduleRecheck() {
492
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
493
+ this.recheckHandle = void 0, this.recalculateVisibility();
494
+ });
495
+ }
496
+ recalculateVisibility() {
497
+ this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
498
+ }
499
+ handleSizeChange() {
500
+ let e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
501
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
502
+ }
503
+ updateParticipation() {
504
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
505
+ }
506
+ get nogap() {
507
+ return this.hasAttribute("nogap");
508
+ }
509
+ set nogap(e) {
510
+ e ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
511
+ }
512
+ };
513
+ customElements.get("px-spacer") || customElements.define("px-spacer", ae);
514
+ //#endregion
515
+ //#region ../Layout/src/Page.css?inline
516
+ var oe = ":host{box-sizing:border-box;display:block}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", T = new CSSStyleSheet();
517
+ T.replaceSync(oe);
518
+ var E = class extends n {
519
+ constructor() {
520
+ super(T), this.template = () => `
429
521
  <px-container border-radius="none" padding="none">
430
522
  <px-vstack>
431
523
  <px-container id="header-container" border-radius="none">
@@ -462,15 +554,6 @@ class wt extends I {
462
554
  <px-spacer></px-spacer>
463
555
  </px-hstack>
464
556
  </px-container>
465
- ${t ? ` <px-hstack>
466
- <px-spacer></px-spacer>
467
- <px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
468
- <px-vstack gap="s">
469
- <slot name="image-sticky-container"></slot>
470
- </px-vstack>
471
- </px-container>
472
- <px-spacer></px-spacer>
473
- </px-hstack>` : ""}
474
557
  <px-container
475
558
  id="body-container"
476
559
  id="main"
@@ -527,220 +610,227 @@ class wt extends I {
527
610
  </px-container>
528
611
  </px-vstack>
529
612
  </px-container>
530
- `, this.shadowRoot.innerHTML = this.template(!!this.$imageStickySlot);
531
- }
532
- static get observedAttributes() {
533
- return [
534
- ...super.observedAttributes,
535
- "background-image",
536
- "gap",
537
- "background-color",
538
- "padding-vertical",
539
- "padding-horizontal"
540
- ];
541
- }
542
- get $wideImage() {
543
- return this.shadowRoot.querySelector("#image-box");
544
- }
545
- get $bodyVStackContainer() {
546
- return this.shadowRoot.querySelector("#header-vstack-container");
547
- }
548
- get $bodyContainer() {
549
- return this.shadowRoot.querySelector("#body-container");
550
- }
551
- get $contactContainer() {
552
- return this.shadowRoot.querySelector("#contact-container");
553
- }
554
- get $footerContainer() {
555
- return this.shadowRoot.querySelector("#footer-container");
556
- }
557
- get $headerContainer() {
558
- return this.shadowRoot.querySelector("#header-container");
559
- }
560
- get $imageContainer() {
561
- return this.shadowRoot.querySelector("#image-container");
562
- }
563
- get backgroundImage() {
564
- return this.getAttribute("background-image");
565
- }
566
- get $imageStickySlot() {
567
- return this.querySelector('*[slot="image-sticky-container"]');
568
- }
569
- get $main() {
570
- return this.shadowRoot.querySelector("#main");
571
- }
572
- get backgroundColor() {
573
- return this.getAttribute("background-color") || "none";
574
- }
575
- get paddingVertical() {
576
- return this.getAttribute("padding-vertical");
577
- }
578
- get paddingHorizontal() {
579
- return this.getAttribute("padding-horizontal");
580
- }
581
- set paddingVertical(t) {
582
- this.setAttribute("padding-vertical", t);
583
- }
584
- set paddingHorizontal(t) {
585
- this.setAttribute("padding-horizontal", t);
586
- }
587
- get gap() {
588
- return this.getAttribute("gap");
589
- }
590
- connectedCallback() {
591
- this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
592
- }
593
- attributeChangedCallback(t, e, i) {
594
- if (e !== i)
595
- switch (t) {
596
- case "background-image":
597
- this.$imageContainer.setAttribute("background-image", i);
598
- break;
599
- case "gap":
600
- this.$bodyVStackContainer.setAttribute("gap", i);
601
- break;
602
- case "background-color":
603
- this.$bodyContainer.setAttribute(
604
- "background-color",
605
- ot.indexOf(i) > 0 ? i : "none"
606
- );
607
- break;
608
- case "padding-vertical":
609
- this.handlePaddingVerticalChange(i);
610
- break;
611
- case "padding-horizontal":
612
- this.handlePaddingHorizontalChange(i);
613
- break;
614
- default:
615
- super.attributeChangedCallback(t, e, i);
616
- }
617
- }
618
- handlePaddingVerticalChange(t) {
619
- this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
620
- }
621
- handlePaddingHorizontalChange(t) {
622
- this.$headerContainer.paddingLeft = t, this.$headerContainer.paddingRight = t, this.$bodyContainer.paddingLeft = t, this.$bodyContainer.paddingRight = t, this.$contactContainer.paddingLeft = t, this.$contactContainer.paddingRight = t, this.$footerContainer.paddingLeft = t, this.$footerContainer.paddingRight = t, this.$imageContainer.paddingLeft = t, this.$imageContainer.paddingRight = t;
623
- }
624
- }
625
- customElements.get("px-page") === void 0 && customElements.define("px-page", wt);
626
- const At = ".btn-icon{font-size:var(--px-font-size-base);display:inline-flex;width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;align-items:center;justify-content:center;cursor:pointer;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-default);width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:transparent}:host([inverted]) .btn-icon.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-inverted)}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media only screen and (min-width: 1025px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}", U = new CSSStyleSheet();
627
- U.replaceSync(At);
628
- const $t = ["", "default", "small"], St = [
629
- "",
630
- "default",
631
- "secondary",
632
- "naked"
633
- ], A = class A extends at {
634
- constructor() {
635
- super(U), this.template = () => "<slot></slot>";
636
- const t = document.createElement(A.nativeName);
637
- t.classList.add("btn-icon"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
638
- }
639
- static get observedAttributes() {
640
- return [
641
- ...super.observedAttributes,
642
- "inverted",
643
- "loading",
644
- "size",
645
- "variant",
646
- "aria-expanded"
647
- ];
648
- }
649
- connectedCallback() {
650
- const t = this.querySelector("px-icon");
651
- if (t) {
652
- const e = t.getAttribute("size"), i = t.getAttribute("color");
653
- t.addEventListener("click", () => {
654
- this.$el.focus();
655
- }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "xs"), i || t.setAttribute("color", "inherit");
656
- }
657
- nt(this, this.$el, !1);
658
- }
659
- attributeChangedCallback(t, e, i) {
660
- if (e !== i)
661
- switch (t) {
662
- case "loading":
663
- this.updateLoading();
664
- break;
665
- case "size":
666
- this.updateSize(e, i);
667
- break;
668
- case "variant":
669
- this.updateVariant(e, i);
670
- break;
671
- case "aria-expanded":
672
- i && (this.$el.setAttribute("aria-expanded", i), this.removeAttribute("aria-expanded"));
673
- break;
674
- default:
675
- super.attributeChangedCallback(t, e, i);
676
- break;
677
- }
678
- }
679
- _toggleClass(t, e) {
680
- t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e);
681
- }
682
- updateLoading() {
683
- this.$el.classList.toggle("btn-icon--state-loading");
684
- }
685
- updateSize(t, e) {
686
- this.checkName($t, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : x(
687
- `${e} is not a valid size value for ${this.tagName.toLowerCase()}`
688
- );
689
- }
690
- updateVariant(t, e) {
691
- this.checkName(St, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : x(
692
- `${e} is not a valid variant value for ${this.tagName.toLowerCase()}`
693
- );
694
- }
695
- get inverted() {
696
- return this.getAttribute("inverted");
697
- }
698
- set inverted(t) {
699
- this.setAttribute("inverted", t);
700
- }
701
- get loading() {
702
- return this.getAttribute("loading");
703
- }
704
- set loading(t) {
705
- this.setAttribute("loading", t);
706
- }
707
- get size() {
708
- return this.getAttribute("size");
709
- }
710
- set size(t) {
711
- this.setAttribute("size", t);
712
- }
713
- get variant() {
714
- return this.getAttribute("variant");
715
- }
716
- set variant(t) {
717
- this.setAttribute("variant", t);
718
- }
719
- get ariaExpanded() {
720
- return this.getAttribute("aria-expanded");
721
- }
722
- set ariaExpanded(t) {
723
- t ? this.setAttribute("aria-expanded", t) : this.removeAttribute("aria-expanded");
724
- }
613
+ `, h(this.shadowRoot, this.template());
614
+ }
615
+ static get observedAttributes() {
616
+ return [
617
+ ...super.observedAttributes,
618
+ "background-image",
619
+ "gap",
620
+ "background-color",
621
+ "padding-vertical",
622
+ "padding-horizontal"
623
+ ];
624
+ }
625
+ get $wideImage() {
626
+ return this.shadowRoot.querySelector("#image-box");
627
+ }
628
+ get $bodyVStackContainer() {
629
+ return this.shadowRoot.querySelector("#header-vstack-container");
630
+ }
631
+ get $bodyContainer() {
632
+ return this.shadowRoot.querySelector("#body-container");
633
+ }
634
+ get $contactContainer() {
635
+ return this.shadowRoot.querySelector("#contact-container");
636
+ }
637
+ get $footerContainer() {
638
+ return this.shadowRoot.querySelector("#footer-container");
639
+ }
640
+ get $headerContainer() {
641
+ return this.shadowRoot.querySelector("#header-container");
642
+ }
643
+ get $imageContainer() {
644
+ return this.shadowRoot.querySelector("#image-container");
645
+ }
646
+ get backgroundImage() {
647
+ return this.getAttribute("background-image");
648
+ }
649
+ get $main() {
650
+ return this.shadowRoot.querySelector("#main");
651
+ }
652
+ get backgroundColor() {
653
+ return this.getAttribute("background-color") || "none";
654
+ }
655
+ get paddingVertical() {
656
+ return this.getAttribute("padding-vertical");
657
+ }
658
+ get paddingHorizontal() {
659
+ return this.getAttribute("padding-horizontal");
660
+ }
661
+ set paddingVertical(e) {
662
+ this.setAttribute("padding-vertical", `${e}`);
663
+ }
664
+ set paddingHorizontal(e) {
665
+ this.setAttribute("padding-horizontal", `${e}`);
666
+ }
667
+ get gap() {
668
+ return this.getAttribute("gap");
669
+ }
670
+ connectedCallback() {
671
+ this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
672
+ }
673
+ attributeChangedCallback(e, t, n) {
674
+ if (t !== n) switch (e) {
675
+ case "background-image":
676
+ this.$imageContainer.setAttribute("background-image", n);
677
+ break;
678
+ case "gap":
679
+ this.$bodyVStackContainer.setAttribute("gap", n);
680
+ break;
681
+ case "background-color":
682
+ this.$bodyContainer.setAttribute("background-color", i.indexOf(n) > 0 ? n : "none");
683
+ break;
684
+ case "padding-vertical":
685
+ this.handlePaddingVerticalChange(n);
686
+ break;
687
+ case "padding-horizontal":
688
+ this.handlePaddingHorizontalChange(n);
689
+ break;
690
+ default: super.attributeChangedCallback(e, t, n);
691
+ }
692
+ }
693
+ handlePaddingVerticalChange(e) {
694
+ this.$bodyContainer.paddingTop = e, this.$bodyContainer.paddingBottom = e;
695
+ }
696
+ handlePaddingHorizontalChange(e) {
697
+ this.$headerContainer.paddingLeft = e, this.$headerContainer.paddingRight = e, this.$bodyContainer.paddingLeft = e, this.$bodyContainer.paddingRight = e, this.$contactContainer.paddingLeft = e, this.$contactContainer.paddingRight = e, this.$footerContainer.paddingLeft = e, this.$footerContainer.paddingRight = e, this.$imageContainer.paddingLeft = e, this.$imageContainer.paddingRight = e;
698
+ }
699
+ };
700
+ customElements.get("px-page") === void 0 && customElements.define("px-page", E);
701
+ //#endregion
702
+ //#region ../ButtonIcon/src/buttonicon.css?inline
703
+ var D = ":host{display:inline-block}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon{font-size:var(--px-font-size-base);width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;cursor:pointer;--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent;justify-content:center;align-items:center;display:inline-flex}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{color:var(--px-color-icon-brand-default);background-color:#0000;width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:#0000}:host([inverted]) .btn-icon.btn-icon--variant-naked{color:var(--px-color-icon-brand-inverted);background-color:#0000}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media screen and (width>=48rem){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media screen and (width>=64.0625rem){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}", O = new CSSStyleSheet();
704
+ O.replaceSync(D);
705
+ var k = [
706
+ "",
707
+ "default",
708
+ "small"
709
+ ], A = [
710
+ "",
711
+ "default",
712
+ "secondary",
713
+ "naked"
714
+ ], se = class e extends t {
715
+ static {
716
+ this.template = s("<button class=\"btn-icon\"><slot></slot></button>");
717
+ }
718
+ static {
719
+ this.nativeName = "button";
720
+ }
721
+ static {
722
+ this.nativeProperties = p;
723
+ }
724
+ static {
725
+ this.nativeMethods = f;
726
+ }
727
+ static {
728
+ this.nativeAttributes = d;
729
+ }
730
+ constructor() {
731
+ super(O), h(this.shadowRoot, e.template);
732
+ }
733
+ static get observedAttributes() {
734
+ return [
735
+ ...super.observedAttributes,
736
+ ...r,
737
+ "inverted",
738
+ "loading",
739
+ "size",
740
+ "variant",
741
+ "aria-expanded"
742
+ ];
743
+ }
744
+ connectedCallback() {
745
+ let e = this.querySelector("px-icon");
746
+ if (e) {
747
+ let t = e.getAttribute("size"), n = e.getAttribute("color");
748
+ e.addEventListener("click", () => {
749
+ this.$el.focus();
750
+ }), t || e.setAttribute("size", "s"), this.size === "small" && e.setAttribute("size", "xs"), n || e.setAttribute("color", "inherit");
751
+ }
752
+ }
753
+ attributeChangedCallback(e, t, n) {
754
+ if (t !== n) switch (e) {
755
+ case "loading":
756
+ this.updateLoading();
757
+ break;
758
+ case "size":
759
+ this.updateSize(t, n);
760
+ break;
761
+ case "variant":
762
+ this.updateVariant(t, n);
763
+ break;
764
+ case "aria-expanded":
765
+ n && (this.$el.setAttribute("aria-expanded", n), this.removeAttribute("aria-expanded"));
766
+ break;
767
+ default: r.includes(e) ? this._forwardNativeAttribute(e, n) : super.attributeChangedCallback(e, t, n);
768
+ }
769
+ }
770
+ _toggleClass(e, t) {
771
+ e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t);
772
+ }
773
+ updateLoading() {
774
+ this.$el.classList.toggle("btn-icon--state-loading");
775
+ }
776
+ updateSize(e, t) {
777
+ this.checkName(k, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`)) : u(`"${t}" is not a valid size value for ${this.tagName.toLowerCase()}. Allowed values are: "${k.join("\", \"")}".`);
778
+ }
779
+ updateVariant(e, t) {
780
+ this.checkName(A, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`)) : u(`"${t}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${A.join("\", \"")}".`);
781
+ }
782
+ get inverted() {
783
+ return this.hasAttribute("inverted");
784
+ }
785
+ set inverted(e) {
786
+ this._updateBooleanAttribute("inverted", e);
787
+ }
788
+ get loading() {
789
+ return this.hasAttribute("loading");
790
+ }
791
+ set loading(e) {
792
+ this._updateBooleanAttribute("loading", e);
793
+ }
794
+ get size() {
795
+ return this.getAttribute("size");
796
+ }
797
+ set size(e) {
798
+ this._updateAttribute("size", e);
799
+ }
800
+ get variant() {
801
+ return this.getAttribute("variant");
802
+ }
803
+ set variant(e) {
804
+ this._updateAttribute("variant", e);
805
+ }
806
+ get ariaExpanded() {
807
+ return this.getAttribute("aria-expanded");
808
+ }
809
+ set ariaExpanded(e) {
810
+ this._updateAttribute("aria-expanded", e);
811
+ }
725
812
  };
726
- A.nativeName = "button";
727
- let E = A;
728
- customElements.get("px-button-icon") || customElements.define("px-button-icon", E);
729
- class Ct extends HTMLElement {
730
- constructor() {
731
- super();
732
- }
733
- static get observedAttributes() {
734
- return ["name", "src", "type", "format"];
735
- }
736
- connectedCallback() {
737
- if (document.querySelectorAll(
738
- `px-icon-set[name="${this.getAttribute("name")}"]`
739
- ).length > 1 && (console.warn(
740
- "Only one <px-icon-set> component is allowed, self removing"
741
- ), this.remove()), this.getAttribute("type") === "font") {
742
- const e = document.createElement("style");
743
- e.setAttribute("type", "text/css"), e.setAttribute("data-name", this.getAttribute("name")), e.textContent = `
813
+ customElements.get("px-button-icon") || customElements.define("px-button-icon", se);
814
+ //#endregion
815
+ //#region ../Icon/common/src/IconSet.ts
816
+ var ce = class extends HTMLElement {
817
+ constructor() {
818
+ super();
819
+ }
820
+ static get observedAttributes() {
821
+ return [
822
+ "name",
823
+ "src",
824
+ "type",
825
+ "format"
826
+ ];
827
+ }
828
+ connectedCallback() {
829
+ if (document.querySelectorAll(`px-icon-set[name="${this.getAttribute("name")}"]`).length > 1 && (console.warn("Only one <px-icon-set> component is allowed, self removing"), this.remove()), this.getAttribute("type") === "font") {
830
+ let e = document.createElement("style");
831
+ e.setAttribute("type", "text/css");
832
+ let t = this.getAttribute("name");
833
+ t && e.setAttribute("data-name", t), e.textContent = `
744
834
  @font-face {
745
835
  font-family: 'lavender';
746
836
  src:
@@ -750,445 +840,377 @@ class Ct extends HTMLElement {
750
840
  font-display: block;
751
841
  }
752
842
  `, document.head.appendChild(e);
753
- }
754
- }
755
- disconnectedCallback() {
756
- const t = document.querySelector(
757
- `style[data-name="${this.getAttribute("name")}"]`
758
- );
759
- t && t.remove();
760
- }
761
- }
762
- customElements.get("px-icon-set") || customElements.define("px-icon-set", Ct);
763
- const zt = [
764
- "Brand",
765
- "Accent",
766
- "Neutral",
767
- "Dimmed",
768
- "PurposeSuccess",
769
- "PurposeWarning",
770
- "PurposeError",
771
- "PurposeUnlimited",
772
- "PurposePromo",
773
- "StateHover",
774
- "StateActive",
775
- "StateDisabled"
776
- ], jt = ["Inherit", ...zt].map(
777
- (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
778
- ), Lt = ":host{display:inline-flex;flex-direction:column;justify-content:center}svg{font-size:var(--px-size-icon-s);line-height:var(--px-font-line-height-xs);width:1em;height:1em;color:var(--px-color-icon-accent-default)}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-default)}.accent{color:var(--px-color-icon-accent-default)}.neutral{color:var(--px-color-icon-neutral-default)}.dimmed{color:var(--px-color-icon-dimmed-default)}.purpose-success{color:var(--px-color-icon-purpose-success-default)}.purpose-warning{color:var(--px-color-icon-purpose-warning-default)}.purpose-error{color:var(--px-color-icon-purpose-error-default)}.purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-default)}.purpose-promo{color:var(--px-color-icon-purpose-promo-default)}.state-hover:hover{color:var(--px-color-icon-state-hover-default)}.state-active:active{color:var(--px-color-icon-state-active-default)}.state-disabled{color:var(--px-color-icon-state-disabled-default)}:host([inverted]) svg{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .accent{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .neutral{color:var(--px-color-icon-neutral-inverted)}:host([inverted]) .dimmed{color:var(--px-color-icon-dimmed-inverted)}:host([inverted]) .purpose-success{color:var(--px-color-icon-purpose-success-inverted)}:host([inverted]) .purpose-warning{color:var(--px-color-icon-purpose-warning-inverted)}:host([inverted]) .purpose-error{color:var(--px-color-icon-purpose-error-inverted)}:host([inverted]) .purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-inverted)}:host([inverted]) .purpose-promo{color:var(--px-color-icon-purpose-promo-inverted)}:host([inverted]) .state-hover:hover{color:var(--px-color-icon-state-hover-inverted)}:host([inverted]) .state-active:active{color:var(--px-color-icon-state-active-inverted)}:host([inverted]) .state-disabled{color:var(--px-color-icon-state-disabled-inverted)}.size-xs{font-size:var(--px-size-icon-xs)}.size-s{font-size:var(--px-size-icon-s)}.size-m{font-size:var(--px-size-icon-m)}.size-l{font-size:var(--px-size-icon-l)}.size-xl{font-size:var(--px-size-icon-xl)}", K = new CSSStyleSheet();
779
- K.replaceSync(Lt);
780
- const Tt = [
781
- "name",
782
- "size",
783
- "color",
784
- "aria-label",
785
- "inverted",
786
- "from",
787
- "disabled"
788
- ];
789
- var h, p, $;
790
- class Et extends I {
791
- constructor(...e) {
792
- var i;
793
- super(...e, K);
794
- k(this, h);
795
- k(this, p);
796
- k(this, $, () => `<svg aria-hidden="true">
797
- <use xlink:href=""></use>
798
- </svg>`);
799
- this.shadowRoot.innerHTML = d(this, $).call(this), j(this, p, (i = this.attachInternals) == null ? void 0 : i.call(this)), d(this, p) && (d(this, p).role = "img");
800
- }
801
- static get observedAttributes() {
802
- return [...super.observedAttributes, ...Tt];
803
- }
804
- attributeChangedCallback(e, i, s) {
805
- if (i !== s)
806
- switch (e) {
807
- case "name":
808
- this.updateName(i, s);
809
- break;
810
- case "size":
811
- this.updateAttribute(e, i, s, lt);
812
- break;
813
- case "color":
814
- this.updateAttribute(e, i, s, jt);
815
- break;
816
- case "disabled":
817
- this.color = "state-disabled";
818
- break;
819
- case "aria-label":
820
- if (!d(this, p))
821
- return;
822
- s ? (d(this, p).ariaHidden = "false", this.ariaHidden = "false") : (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
823
- break;
824
- }
825
- }
826
- connectedCallback() {
827
- this.role = "img", this.name && this.$el.firstElementChild.setAttribute(
828
- "xlink:href",
829
- `#icon-${this.name}`
830
- );
831
- const e = document.querySelectorAll("px-icon-set");
832
- e || console.log("<px-icon-set> component not found");
833
- for (const i of e) {
834
- if (!i.getAttribute("name") || !i.getAttribute("src")) {
835
- console.error("Icon name or src not found");
836
- continue;
837
- }
838
- i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (j(this, h, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
839
- "xlink:href",
840
- `${d(this, h)}#icon-${this.name}`
841
- ));
842
- }
843
- !this.ariaLabel && d(this, p) && (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
844
- }
845
- updateAttribute(e, i, s, n) {
846
- i !== null && i !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${i}`) : this.$el.classList.toggle(i)), s !== null && s !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${s}`) : this.$el.classList.toggle(s)), this.checkName(n, s) || x(
847
- `${s} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`
848
- );
849
- }
850
- updateName(e, i) {
851
- d(this, h) && this.$el.firstElementChild.setAttribute(
852
- "xlink:href",
853
- `${d(this, h)}#icon-${i}`
854
- );
855
- }
856
- get $el() {
857
- return this.shadowRoot.querySelector("svg");
858
- }
859
- get name() {
860
- return this.getAttribute("name");
861
- }
862
- set name(e) {
863
- this.setAttribute("name", e);
864
- }
865
- get size() {
866
- return this.getAttribute("size");
867
- }
868
- set size(e) {
869
- this.setAttribute("size", e);
870
- }
871
- get color() {
872
- return this.getAttribute("color");
873
- }
874
- set color(e) {
875
- this.setAttribute("color", e);
876
- }
877
- get arialabel() {
878
- return this.getAttribute("aria-label");
879
- }
880
- set arialabel(e) {
881
- this.setAttribute("aria-label", e);
882
- }
883
- get inverted() {
884
- return this.getAttribute("inverted");
885
- }
886
- set inverted(e) {
887
- this.setAttribute("inverted", e);
888
- }
889
- get from() {
890
- return this.getAttribute("from");
891
- }
892
- set from(e) {
893
- this.setAttribute("from", e);
894
- }
895
- get disabled() {
896
- return this.getAttribute("disabled");
897
- }
898
- set disabled(e) {
899
- this.setAttribute("disabled", e);
900
- }
901
- }
902
- h = new WeakMap(), p = new WeakMap(), $ = new WeakMap();
903
- customElements.get("px-icon") || customElements.define("px-icon", Et);
904
- const It = ":host{--px-appleseed-size-l: 14px;--px-appleseed-size-m: 10px;--px-appleseed-size-s: 6px;--px-appleseed-size-xs: 4px}.container{display:flex}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(4)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(5)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(1)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.appleseed{width:var(--px-size-icon-m);height:var(--px-size-icon-m);display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 47.938em){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}.appleseed-6-plus>div,.appleseed-6-minus>div{box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-brand-default);border-radius:var(--px-radius-main);height:var(--px-appleseed-size-m);width:var(--px-appleseed-size-m)}.appleseed-6-plus[active]>div,.appleseed-6-minus[active]>div{width:var(--px-appleseed-size-l);height:var(--px-appleseed-size-l);background-color:var(--px-color-icon-brand-default)}", J = new CSSStyleSheet();
905
- J.replaceSync(It);
906
- class Rt extends HTMLElement {
907
- constructor() {
908
- super(), this.template = (t, e) => `<div class="container">
909
- ${Array.from(
910
- { length: Math.min(t, 5) },
911
- (i, s) => `<div id="seed-${s}" ${e === s ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
843
+ }
844
+ }
845
+ disconnectedCallback() {
846
+ let e = document.querySelector(`style[data-name="${this.getAttribute("name")}"]`);
847
+ e && e.remove();
848
+ }
849
+ };
850
+ customElements.get("px-icon-set") || customElements.define("px-icon-set", ce);
851
+ var le = [
852
+ "Inherit",
853
+ "Brand",
854
+ "Accent",
855
+ "Neutral",
856
+ "Dimmed",
857
+ "PurposeSuccess",
858
+ "PurposeWarning",
859
+ "PurposeError",
860
+ "PurposeUnlimited",
861
+ "PurposePromo",
862
+ "StateHover",
863
+ "StateActive",
864
+ "StateDisabled"
865
+ ].map((e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)), ue = ":host{flex-direction:column;justify-content:center;display:inline-flex}svg{font-size:var(--px-size-icon-s);width:1em;height:1em;color:var(--px-color-icon-accent-default);line-height:1}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-default)}.accent{color:var(--px-color-icon-accent-default)}.neutral{color:var(--px-color-icon-neutral-default)}.dimmed{color:var(--px-color-icon-dimmed-default)}.purpose-success{color:var(--px-color-icon-purpose-success-default)}.purpose-warning{color:var(--px-color-icon-purpose-warning-default)}.purpose-error{color:var(--px-color-icon-purpose-error-default)}.purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-default)}.purpose-promo{color:var(--px-color-icon-purpose-promo-default)}.state-hover:hover{color:var(--px-color-icon-state-hover-default)}.state-active:active{color:var(--px-color-icon-state-active-default)}.state-disabled{color:var(--px-color-icon-state-disabled-default)}:host([inverted]) svg{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .accent{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .neutral{color:var(--px-color-icon-neutral-inverted)}:host([inverted]) .dimmed{color:var(--px-color-icon-dimmed-inverted)}:host([inverted]) .purpose-success{color:var(--px-color-icon-purpose-success-inverted)}:host([inverted]) .purpose-warning{color:var(--px-color-icon-purpose-warning-inverted)}:host([inverted]) .purpose-error{color:var(--px-color-icon-purpose-error-inverted)}:host([inverted]) .purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-inverted)}:host([inverted]) .purpose-promo{color:var(--px-color-icon-purpose-promo-inverted)}:host([inverted]) .state-hover:hover{color:var(--px-color-icon-state-hover-inverted)}:host([inverted]) .state-active:active{color:var(--px-color-icon-state-active-inverted)}:host([inverted]) .state-disabled{color:var(--px-color-icon-state-disabled-inverted)}.size-xs{font-size:var(--px-size-icon-xs)}.size-s{font-size:var(--px-size-icon-s)}.size-m{font-size:var(--px-size-icon-m)}.size-l{font-size:var(--px-size-icon-l)}.size-xl{font-size:var(--px-size-icon-xl)}", j = new CSSStyleSheet();
866
+ j.replaceSync(ue);
867
+ var de = class e extends n {
868
+ static {
869
+ this.template = s("<svg aria-hidden=\"true\"><use></use></svg>");
870
+ }
871
+ #e = null;
872
+ #t;
873
+ static get observedAttributes() {
874
+ return [
875
+ ...super.observedAttributes,
876
+ "name",
877
+ "size",
878
+ "color",
879
+ "aria-label",
880
+ "inverted",
881
+ "from",
882
+ "disabled"
883
+ ];
884
+ }
885
+ constructor(...t) {
886
+ super(...t, j), h(this.shadowRoot, e.template), this.#t = this.attachInternals?.(), this.#t && (this.#t.role = "img");
887
+ }
888
+ attributeChangedCallback(e, t, n) {
889
+ if (t !== n) switch (e) {
890
+ case "name":
891
+ this.updateName(t, n);
892
+ break;
893
+ case "size":
894
+ this.updateAttribute(e, t, n, l);
895
+ break;
896
+ case "color":
897
+ this.updateAttribute(e, t, n, le);
898
+ break;
899
+ case "disabled":
900
+ this.color = "state-disabled";
901
+ break;
902
+ case "aria-label":
903
+ if (!this.#t) return;
904
+ n ? (this.#t.ariaHidden = "false", this.ariaHidden = "false") : (this.#t.ariaHidden = "true", this.ariaHidden = "true");
905
+ }
906
+ }
907
+ connectedCallback() {
908
+ this.role = "img";
909
+ let e = document.querySelectorAll("px-icon-set");
910
+ e || console.log("<px-icon-set> component not found");
911
+ for (let t of e) !t.getAttribute("name") || !t.getAttribute("src") ? console.error("Icon name or src not found") : t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
912
+ !this.ariaLabel && this.#t && (this.#t.ariaHidden = "true", this.ariaHidden = "true"), this.parentElement?.localName === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
913
+ }
914
+ updateAttribute(e, t, n, r) {
915
+ t !== null && t !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${t}`) : this.$el.classList.toggle(t)), n !== null && n !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${n}`) : this.$el.classList.toggle(n)), this.checkName(r, n) || u(`${n} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`);
916
+ }
917
+ updateName(e, t) {
918
+ this.#e && this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${t}`);
919
+ }
920
+ get $el() {
921
+ return this.shadowRoot.querySelector("svg");
922
+ }
923
+ get name() {
924
+ return this.getAttribute("name");
925
+ }
926
+ set name(e) {
927
+ m(this, "name", e);
928
+ }
929
+ get size() {
930
+ return this.getAttribute("size");
931
+ }
932
+ set size(e) {
933
+ m(this, "size", e);
934
+ }
935
+ get color() {
936
+ return this.getAttribute("color");
937
+ }
938
+ set color(e) {
939
+ m(this, "color", e);
940
+ }
941
+ get arialabel() {
942
+ return this.getAttribute("aria-label");
943
+ }
944
+ set arialabel(e) {
945
+ m(this, "aria-label", e);
946
+ }
947
+ get inverted() {
948
+ return this.hasAttribute("inverted");
949
+ }
950
+ set inverted(e) {
951
+ a(this, "inverted", e);
952
+ }
953
+ get from() {
954
+ return this.getAttribute("from");
955
+ }
956
+ set from(e) {
957
+ m(this, "from", e);
958
+ }
959
+ get disabled() {
960
+ return this.hasAttribute("disabled");
961
+ }
962
+ set disabled(e) {
963
+ a(this, "disabled", e);
964
+ }
965
+ };
966
+ customElements.get("px-icon") || customElements.define("px-icon", de);
967
+ //#endregion
968
+ //#region src/appleseed.css?inline
969
+ var fe = ":host{--px-appleseed-size-l:14px;--px-appleseed-size-m:10px;--px-appleseed-size-s:6px;--px-appleseed-size-xs:4px}.container{display:flex}:is(.container:has(#seed-0.appleseed-6-plus[active]),.container:has(#seed-1.appleseed-6-plus[active])) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}:is(.container:has(#seed-0.appleseed-6-plus[active]),.container:has(#seed-1.appleseed-6-plus[active])) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}:is(.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2),.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4))>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}:is(.container:has(#seed-2.appleseed-6-plus[active]) :first-child,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(5))>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :first-child>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :first-child>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.appleseed{width:var(--px-size-icon-m);height:var(--px-size-icon-m);justify-content:center;align-items:center;display:flex}@media screen and (width<=47.938rem){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}:is(.appleseed-6-plus,.appleseed-6-minus)>div{box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-brand-default);border-radius:var(--px-radius-main);height:var(--px-appleseed-size-m);width:var(--px-appleseed-size-m)}:is(.appleseed-6-plus,.appleseed-6-minus)[active]>div{width:var(--px-appleseed-size-l);height:var(--px-appleseed-size-l);background-color:var(--px-color-icon-brand-default)}", M = new CSSStyleSheet();
970
+ M.replaceSync(fe);
971
+ var N = class extends HTMLElement {
972
+ constructor() {
973
+ super(), this.template = (e, t) => `<div class="container">
974
+ ${Array.from({ length: Math.min(e, 5) }, (n, r) => `<div id="seed-${r}" ${t === r ? "active" : ""} class="appleseed ${e > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
912
975
  <div></div>
913
- </div>`
914
- ).join("")}
915
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [J], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
916
- }
917
- static get observedAttributes() {
918
- return ["amount", "active"];
919
- }
920
- attributeChangedCallback(t, e, i) {
921
- if (e !== i)
922
- switch (t) {
923
- case "amount":
924
- this.shadowRoot.innerHTML = this.template(
925
- parseInt(i) || 0,
926
- this.active
927
- );
928
- break;
929
- case "active":
930
- this.handleActive(e, i);
931
- break;
932
- }
933
- }
934
- handleActive(t, e) {
935
- var i;
936
- t === null || e === void 0 || (this.$active.removeAttribute("active"), (i = this.shadowRoot.querySelector(`#seed-${e}`)) == null || i.setAttribute("active", ""));
937
- }
938
- get $active() {
939
- return this.shadowRoot.querySelector("[active]");
940
- }
941
- get amount() {
942
- return parseInt(this.getAttribute("amount")) || 0;
943
- }
944
- get active() {
945
- return parseInt(this.getAttribute("active")) || 0;
946
- }
947
- }
948
- customElements.get("px-appleseed") || customElements.define("px-appleseed", Rt);
949
- function y(r) {
950
- var t = typeof r;
951
- return r != null && (t == "object" || t == "function");
952
- }
953
- var Mt = typeof global == "object" && global && global.Object === Object && global, Ht = typeof self == "object" && self && self.Object === Object && self, Q = Mt || Ht || Function("return this")(), L = function() {
954
- return Q.Date.now();
955
- }, Pt = /\s/;
956
- function Dt(r) {
957
- for (var t = r.length; t-- && Pt.test(r.charAt(t)); )
958
- ;
959
- return t;
960
- }
961
- var qt = /^\s+/;
962
- function Ot(r) {
963
- return r && r.slice(0, Dt(r) + 1).replace(qt, "");
976
+ </div>`).join("")}
977
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [M], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
978
+ }
979
+ static get observedAttributes() {
980
+ return ["amount", "active"];
981
+ }
982
+ attributeChangedCallback(e, t, n) {
983
+ if (t !== n) switch (e) {
984
+ case "amount":
985
+ this.shadowRoot.innerHTML = this.template(parseInt(n) || 0, this.active);
986
+ break;
987
+ case "active": this.handleActive(t, n);
988
+ }
989
+ }
990
+ handleActive(e, t) {
991
+ e !== null && t !== void 0 && (this.$active?.removeAttribute("active"), this.shadowRoot.querySelector(`#seed-${t}`)?.setAttribute("active", ""));
992
+ }
993
+ get $active() {
994
+ return this.shadowRoot.querySelector("[active]");
995
+ }
996
+ get amount() {
997
+ return parseInt(this.getAttribute("amount") ?? "0") || 0;
998
+ }
999
+ get active() {
1000
+ return parseInt(this.getAttribute("active") ?? "0") || 0;
1001
+ }
1002
+ };
1003
+ customElements.get("px-appleseed") || customElements.define("px-appleseed", N);
1004
+ //#endregion
1005
+ //#region ../../../node_modules/lodash-es/isObject.js
1006
+ function P(e) {
1007
+ var t = typeof e;
1008
+ return e != null && (t == "object" || t == "function");
964
1009
  }
965
- var w = Q.Symbol, Y = Object.prototype, Nt = Y.hasOwnProperty, Wt = Y.toString, f = w ? w.toStringTag : void 0;
966
- function Xt(r) {
967
- var t = Nt.call(r, f), e = r[f];
968
- try {
969
- r[f] = void 0;
970
- var i = !0;
971
- } catch {
972
- }
973
- var s = Wt.call(r);
974
- return i && (t ? r[f] = e : delete r[f]), s;
1010
+ //#endregion
1011
+ //#region ../../../node_modules/lodash-es/_freeGlobal.js
1012
+ var F = typeof global == "object" && global && global.Object === Object && global, I = typeof self == "object" && self && self.Object === Object && self, L = F || I || Function("return this")(), R = function() {
1013
+ return L.Date.now();
1014
+ }, z = /\s/;
1015
+ function B(e) {
1016
+ for (var t = e.length; t-- && z.test(e.charAt(t)););
1017
+ return t;
975
1018
  }
976
- var Ft = Object.prototype, Bt = Ft.toString;
977
- function Gt(r) {
978
- return Bt.call(r);
1019
+ //#endregion
1020
+ //#region ../../../node_modules/lodash-es/_baseTrim.js
1021
+ var V = /^\s+/;
1022
+ function pe(e) {
1023
+ return e && e.slice(0, B(e) + 1).replace(V, "");
979
1024
  }
980
- var Zt = "[object Null]", _t = "[object Undefined]", W = w ? w.toStringTag : void 0;
981
- function Ut(r) {
982
- return r == null ? r === void 0 ? _t : Zt : W && W in Object(r) ? Xt(r) : Gt(r);
1025
+ //#endregion
1026
+ //#region ../../../node_modules/lodash-es/_Symbol.js
1027
+ var H = L.Symbol, U = Object.prototype, me = U.hasOwnProperty, he = U.toString, W = H ? H.toStringTag : void 0;
1028
+ function ge(e) {
1029
+ var t = me.call(e, W), n = e[W];
1030
+ try {
1031
+ e[W] = void 0;
1032
+ var r = !0;
1033
+ } catch {}
1034
+ var i = he.call(e);
1035
+ return r && (t ? e[W] = n : delete e[W]), i;
983
1036
  }
984
- function Kt(r) {
985
- return r != null && typeof r == "object";
1037
+ //#endregion
1038
+ //#region ../../../node_modules/lodash-es/_objectToString.js
1039
+ var _e = Object.prototype.toString;
1040
+ function ve(e) {
1041
+ return _e.call(e);
986
1042
  }
987
- var Jt = "[object Symbol]";
988
- function Qt(r) {
989
- return typeof r == "symbol" || Kt(r) && Ut(r) == Jt;
1043
+ //#endregion
1044
+ //#region ../../../node_modules/lodash-es/_baseGetTag.js
1045
+ var ye = "[object Null]", be = "[object Undefined]", G = H ? H.toStringTag : void 0;
1046
+ function xe(e) {
1047
+ return e == null ? e === void 0 ? be : ye : G && G in Object(e) ? ge(e) : ve(e);
990
1048
  }
991
- var X = NaN, Yt = /^[-+]0x[0-9a-f]+$/i, Vt = /^0b[01]+$/i, te = /^0o[0-7]+$/i, ee = parseInt;
992
- function F(r) {
993
- if (typeof r == "number")
994
- return r;
995
- if (Qt(r))
996
- return X;
997
- if (y(r)) {
998
- var t = typeof r.valueOf == "function" ? r.valueOf() : r;
999
- r = y(t) ? t + "" : t;
1000
- }
1001
- if (typeof r != "string")
1002
- return r === 0 ? r : +r;
1003
- r = Ot(r);
1004
- var e = Vt.test(r);
1005
- return e || te.test(r) ? ee(r.slice(2), e ? 2 : 8) : Yt.test(r) ? X : +r;
1049
+ //#endregion
1050
+ //#region ../../../node_modules/lodash-es/isObjectLike.js
1051
+ function Se(e) {
1052
+ return typeof e == "object" && !!e;
1006
1053
  }
1007
- var ie = "Expected a function", re = Math.max, se = Math.min;
1008
- function oe(r, t, e) {
1009
- var i, s, n, l, a, c, b = 0, H = !1, g = !1, S = !0;
1010
- if (typeof r != "function")
1011
- throw new TypeError(ie);
1012
- t = F(t) || 0, y(e) && (H = !!e.leading, g = "maxWait" in e, n = g ? re(F(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
1013
- function C(o) {
1014
- var u = i, v = s;
1015
- return i = s = void 0, b = o, l = r.apply(v, u), l;
1016
- }
1017
- function tt(o) {
1018
- return b = o, a = setTimeout(m, t), H ? C(o) : l;
1019
- }
1020
- function et(o) {
1021
- var u = o - c, v = o - b, q = t - u;
1022
- return g ? se(q, n - v) : q;
1023
- }
1024
- function P(o) {
1025
- var u = o - c, v = o - b;
1026
- return c === void 0 || u >= t || u < 0 || g && v >= n;
1027
- }
1028
- function m() {
1029
- var o = L();
1030
- if (P(o))
1031
- return D(o);
1032
- a = setTimeout(m, et(o));
1033
- }
1034
- function D(o) {
1035
- return a = void 0, S && i ? C(o) : (i = s = void 0, l);
1036
- }
1037
- function it() {
1038
- a !== void 0 && clearTimeout(a), b = 0, i = c = s = a = void 0;
1039
- }
1040
- function rt() {
1041
- return a === void 0 ? l : D(L());
1042
- }
1043
- function z() {
1044
- var o = L(), u = P(o);
1045
- if (i = arguments, s = this, c = o, u) {
1046
- if (a === void 0)
1047
- return tt(c);
1048
- if (g)
1049
- return clearTimeout(a), a = setTimeout(m, t), C(c);
1050
- }
1051
- return a === void 0 && (a = setTimeout(m, t)), l;
1052
- }
1053
- return z.cancel = it, z.flush = rt, z;
1054
+ //#endregion
1055
+ //#region ../../../node_modules/lodash-es/isSymbol.js
1056
+ var Ce = "[object Symbol]";
1057
+ function we(e) {
1058
+ return typeof e == "symbol" || Se(e) && xe(e) == Ce;
1054
1059
  }
1055
- var ae = "Expected a function";
1056
- function ne(r, t, e) {
1057
- var i = !0, s = !0;
1058
- if (typeof r != "function")
1059
- throw new TypeError(ae);
1060
- return y(e) && (i = "leading" in e ? !!e.leading : i, s = "trailing" in e ? !!e.trailing : s), oe(r, t, {
1061
- leading: i,
1062
- maxWait: t,
1063
- trailing: s
1064
- });
1060
+ //#endregion
1061
+ //#region ../../../node_modules/lodash-es/toNumber.js
1062
+ var K = NaN, Te = /^[-+]0x[0-9a-f]+$/i, Ee = /^0b[01]+$/i, De = /^0o[0-7]+$/i, Oe = parseInt;
1063
+ function q(e) {
1064
+ if (typeof e == "number") return e;
1065
+ if (we(e)) return K;
1066
+ if (P(e)) {
1067
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
1068
+ e = P(t) ? t + "" : t;
1069
+ }
1070
+ if (typeof e != "string") return e === 0 ? e : +e;
1071
+ e = pe(e);
1072
+ var n = Ee.test(e);
1073
+ return n || De.test(e) ? Oe(e.slice(2), n ? 2 : 8) : Te.test(e) ? K : +e;
1065
1074
  }
1066
- const M = new CSSStyleSheet();
1067
- M.replaceSync(dt);
1068
- const le = (r, t, e) => `:host([${r}${e ? `--${e}` : ""}='${t}']) .carousel`, ce = "px-spacing", T = (r) => (t, e) => `calc(((100% - ${Math.max(parseInt(t), 2)} * ( var(--px-spacing-${r}-${e}))) / ${t}) - ( 64px / ${Math.max(parseInt(t), 2)}))`;
1069
- class de extends HTMLElement {
1070
- constructor() {
1071
- super(), this.visibleItemsAttributeDelegate = new B(
1072
- this,
1073
- "visible-items",
1074
- T("s"),
1075
- "--px-carousel-min-width"
1076
- ), this.template = `<px-vstack gap="default">
1077
- <div class="carousel">
1078
- <slot></slot>
1079
- </div>
1080
- <px-hstack
1081
- id="appleseed-container"
1082
- justify-content="space-between"
1083
- justify-content--mobile="center"
1084
- >
1085
- <px-appleseed active="0"></px-appleseed>
1086
- <px-hstack id="button-icons" gap="default">
1087
- <px-button-icon disabled id="previous" aria-hidden="true">
1088
- <px-icon name="chevron_left" from="lavender"></px-icon>
1089
- </px-button-icon>
1090
- <px-button-icon id="next" aria-hidden="true">
1091
- <px-icon name="chevron_right" from="lavender"></px-icon>
1092
- </px-button-icon>
1093
- </px-hstack>
1094
- </px-hstack>
1095
- </px-vstack>`, this.onScroll = () => {
1096
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1097
- let s = 0;
1098
- window.innerWidth < 768 ? s = Math.round(
1099
- t / (e - i) * (this.itemNumbers - 1)
1100
- ) : Math.ceil(t + i) + 10 >= e ? s = this.itemNumbers - 1 : s = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1101
- let n = s;
1102
- this.itemNumbers > 5 && (s > 2 && s < this.itemNumbers - 2 ? n = 2 : s === this.itemNumbers - 2 ? n = 3 : s === this.itemNumbers - 1 && (n = 4)), this.$appleseed.setAttribute("active", `${n}`), this.handleNextPrevious();
1103
- }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [
1104
- M,
1105
- ct(
1106
- "gap",
1107
- le,
1108
- G,
1109
- ce
1110
- )
1111
- ];
1112
- }
1113
- static get observedAttributes() {
1114
- return ["visible-items"];
1115
- }
1116
- attributeChangedCallback(t, e, i) {
1117
- if (e !== i)
1118
- switch (t) {
1119
- case "gap":
1120
- case "gap--mobile":
1121
- case "gap--tablet":
1122
- case "gap--desktop":
1123
- this.visibleItemsAttributeDelegate.attributeValue = T(i);
1124
- break;
1125
- default:
1126
- this.visibleItemsAttributeDelegate.attributeChangedCallback(
1127
- t,
1128
- e,
1129
- i
1130
- );
1131
- }
1132
- }
1133
- connectedCallback() {
1134
- this.visibleItemsAttributeDelegate.init("1"), this.visibleItemsAttributeDelegate.attributeValue = T(
1135
- this.getAttribute("gap") || "s"
1136
- ), requestAnimationFrame(() => {
1137
- this.handleAppleSeedDisplay();
1138
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ne(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1139
- this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1140
- }), this.$next.addEventListener("click", () => {
1141
- this.$carousel.scrollLeft += this.$carousel.clientWidth;
1142
- }), window.addEventListener("resize", () => {
1143
- this.handleAppleSeedDisplay();
1144
- });
1145
- }
1146
- handleNextPrevious() {
1147
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1148
- t === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), t + i >= e ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1149
- }
1150
- handleAppleSeedDisplay() {
1151
- this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
1152
- }
1153
- isScrolling() {
1154
- return this.$carousel.scrollWidth - this.$carousel.clientWidth > 10;
1155
- }
1156
- get $appleseedContainer() {
1157
- return this.shadowRoot.querySelector("#appleseed-container");
1158
- }
1159
- get $appleseed() {
1160
- return this.$appleseedContainer.querySelector("px-appleseed");
1161
- }
1162
- get $carousel() {
1163
- return this.shadowRoot.querySelector(".carousel");
1164
- }
1165
- get $previous() {
1166
- return this.shadowRoot.querySelector("#previous");
1167
- }
1168
- get $next() {
1169
- return this.shadowRoot.querySelector("#next");
1170
- }
1171
- get $firstItem() {
1172
- return this.querySelector("px-carousel-item");
1173
- }
1174
- get itemNumbers() {
1175
- return this.querySelectorAll("px-carousel-item").length;
1176
- }
1075
+ //#endregion
1076
+ //#region ../../../node_modules/lodash-es/debounce.js
1077
+ var ke = "Expected a function", Ae = Math.max, je = Math.min;
1078
+ function Me(e, t, n) {
1079
+ var r, i, a, o, s, c, l = 0, u = !1, d = !1, f = !0;
1080
+ if (typeof e != "function") throw TypeError(ke);
1081
+ t = q(t) || 0, P(n) && (u = !!n.leading, d = "maxWait" in n, a = d ? Ae(q(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
1082
+ function p(t) {
1083
+ var n = r, a = i;
1084
+ return r = i = void 0, l = t, o = e.apply(a, n), o;
1085
+ }
1086
+ function m(e) {
1087
+ return l = e, s = setTimeout(_, t), u ? p(e) : o;
1088
+ }
1089
+ function h(e) {
1090
+ var n = e - c, r = e - l, i = t - n;
1091
+ return d ? je(i, a - r) : i;
1092
+ }
1093
+ function g(e) {
1094
+ var n = e - c, r = e - l;
1095
+ return c === void 0 || n >= t || n < 0 || d && r >= a;
1096
+ }
1097
+ function _() {
1098
+ var e = R();
1099
+ if (g(e)) return v(e);
1100
+ s = setTimeout(_, h(e));
1101
+ }
1102
+ function v(e) {
1103
+ return s = void 0, f && r ? p(e) : (r = i = void 0, o);
1104
+ }
1105
+ function y() {
1106
+ s !== void 0 && clearTimeout(s), l = 0, r = c = i = s = void 0;
1107
+ }
1108
+ function b() {
1109
+ return s === void 0 ? o : v(R());
1110
+ }
1111
+ function x() {
1112
+ var e = R(), n = g(e);
1113
+ if (r = arguments, i = this, c = e, n) {
1114
+ if (s === void 0) return m(c);
1115
+ if (d) return clearTimeout(s), s = setTimeout(_, t), p(c);
1116
+ }
1117
+ return s === void 0 && (s = setTimeout(_, t)), o;
1118
+ }
1119
+ return x.cancel = y, x.flush = b, x;
1177
1120
  }
1178
- customElements.get("px-carousel") || customElements.define("px-carousel", de);
1179
- const V = new CSSStyleSheet();
1180
- V.replaceSync(pt);
1181
- class pe extends HTMLElement {
1182
- constructor() {
1183
- super(), this.template = `
1184
- <div class="carousel-item">
1185
- <slot></slot>
1186
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [M, V];
1187
- }
1121
+ //#endregion
1122
+ //#region ../../../node_modules/lodash-es/throttle.js
1123
+ var J = "Expected a function";
1124
+ function Ne(e, t, n) {
1125
+ var r = !0, i = !0;
1126
+ if (typeof e != "function") throw TypeError(J);
1127
+ return P(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), Me(e, t, {
1128
+ leading: r,
1129
+ maxWait: t,
1130
+ trailing: i
1131
+ });
1188
1132
  }
1189
- customElements.get("px-carousel-item") || customElements.define("px-carousel-item", pe);
1190
- export {
1191
- Rt as AppleSeed,
1192
- de as Carousel,
1193
- pe as CarouselItem
1133
+ //#endregion
1134
+ //#region src/Carousel.ts
1135
+ var Y = new CSSStyleSheet();
1136
+ Y.replaceSync(g);
1137
+ var X = "px-carousel-item-connected", Z = class e extends HTMLElement {
1138
+ static {
1139
+ this.template = s("<px-vstack gap=\"default\"><div class=\"carousel\"><slot></slot></div><px-hstack\n id=\"appleseed-container\"\n justify-content=\"space-between\"\n justify-content--mobile=\"center\"\n ><px-appleseed active=\"0\"></px-appleseed><px-hstack id=\"button-icons\" gap=\"default\"><px-button-icon disabled id=\"previous\" aria-hidden=\"true\"><px-icon name=\"chevron_left\" from=\"lavender\"></px-icon></px-button-icon><px-button-icon id=\"next\" aria-hidden=\"true\"><px-icon name=\"chevron_right\" from=\"lavender\"></px-icon></px-button-icon></px-hstack></px-hstack></px-vstack>");
1140
+ }
1141
+ constructor() {
1142
+ super(), this.onScroll = () => {
1143
+ let e = this.$carousel.scrollLeft, t = this.$carousel.scrollWidth, n = this.$carousel.clientWidth, r = 0;
1144
+ r = window.innerWidth < 768 ? Math.round(e / (t - n) * (this.itemNumbers - 1)) : Math.ceil(e + n) + 10 >= t ? this.itemNumbers - 1 : Math.floor(e / this.$firstItem.offsetWidth + 1) - 1;
1145
+ let i = r;
1146
+ this.itemNumbers > 5 && (r > 2 && r < this.itemNumbers - 2 ? i = 2 : r === this.itemNumbers - 2 ? i = 3 : r === this.itemNumbers - 1 && (i = 4)), this.$appleseed.setAttribute("active", `${i}`), this.handleNextPrevious();
1147
+ }, this.attachShadow({ mode: "open" }), h(this.shadowRoot, e.template), this.shadowRoot.adoptedStyleSheets = [Y];
1148
+ }
1149
+ connectedCallback() {
1150
+ this.addEventListener(X, () => {
1151
+ this.#e();
1152
+ }), this.#e(), this.$carousel.addEventListener("scroll", Ne(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1153
+ this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1154
+ }), this.$next.addEventListener("click", () => {
1155
+ this.$carousel.scrollLeft += this.$carousel.clientWidth;
1156
+ }), window.addEventListener("resize", () => {
1157
+ this.handleAppleSeedDisplay();
1158
+ });
1159
+ }
1160
+ #e() {
1161
+ this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), requestAnimationFrame(() => {
1162
+ this.handleAppleSeedDisplay();
1163
+ });
1164
+ }
1165
+ handleNextPrevious() {
1166
+ let e = this.$carousel.scrollLeft, t = this.$carousel.scrollWidth, n = this.$carousel.clientWidth;
1167
+ e === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), e + n >= t ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1168
+ }
1169
+ handleAppleSeedDisplay() {
1170
+ this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
1171
+ }
1172
+ isScrolling() {
1173
+ return this.$carousel.scrollWidth - this.$carousel.clientWidth > 10;
1174
+ }
1175
+ get $appleseedContainer() {
1176
+ return this.shadowRoot.querySelector("#appleseed-container");
1177
+ }
1178
+ get $appleseed() {
1179
+ return this.$appleseedContainer.querySelector("px-appleseed");
1180
+ }
1181
+ get $carousel() {
1182
+ return this.shadowRoot.querySelector(".carousel");
1183
+ }
1184
+ get $previous() {
1185
+ return this.shadowRoot.querySelector("#previous");
1186
+ }
1187
+ get $next() {
1188
+ return this.shadowRoot.querySelector("#next");
1189
+ }
1190
+ get $firstItem() {
1191
+ return this.querySelector("px-carousel-item");
1192
+ }
1193
+ get itemNumbers() {
1194
+ return this.querySelectorAll("px-carousel-item").length;
1195
+ }
1196
+ };
1197
+ customElements.get("px-carousel") || customElements.define("px-carousel", Z);
1198
+ var Q = new CSSStyleSheet();
1199
+ Q.replaceSync(_);
1200
+ var $ = class e extends HTMLElement {
1201
+ static {
1202
+ this.template = s("<div class=\"carousel-item\"><slot></slot></div>");
1203
+ }
1204
+ constructor() {
1205
+ super(), this.attachShadow({ mode: "open" }), h(this.shadowRoot, e.template), this.shadowRoot.adoptedStyleSheets = [Q];
1206
+ }
1207
+ connectedCallback() {
1208
+ this.dispatchEvent(new CustomEvent(X, {
1209
+ bubbles: !0,
1210
+ composed: !0
1211
+ }));
1212
+ }
1194
1213
  };
1214
+ customElements.get("px-carousel-item") || customElements.define("px-carousel-item", $);
1215
+ //#endregion
1216
+ export { N as AppleSeed, X as CAROUSEL_ITEM_CONNECTED_EVENT, Z as Carousel, $ as CarouselItem };