@asante-org/atlascopco-vt-litesitegenerator 3.0.28 → 3.0.30

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.
Files changed (33) hide show
  1. package/dist/index.esm.js +2428 -1903
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/index.esm.scss +1281 -323
  4. package/dist/index.js +2431 -1901
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.scss +1281 -323
  7. package/dist/src/components/lsg/LsgAccordion/LsgAccordion.d.ts +3 -18
  8. package/dist/src/components/lsg/LsgAccordion/LsgAccordion.stories.d.ts +2 -4
  9. package/dist/src/components/lsg/LsgCarousel/LsgCarousel.d.ts +42 -0
  10. package/dist/src/components/lsg/LsgCarousel/LsgCarousel.stories.d.ts +10 -0
  11. package/dist/src/components/lsg/LsgCarousel/LsgCarouselController.d.ts +36 -0
  12. package/dist/src/components/lsg/LsgCarousel/bootLsgCarousel.d.ts +10 -0
  13. package/dist/src/components/lsg/LsgCarousel/index.d.ts +5 -0
  14. package/dist/src/components/lsg/index.d.ts +2 -0
  15. package/dist/src/index.d.ts +5 -5
  16. package/dist/src/themes/createThemeComponents.d.ts +1 -0
  17. package/dist/src/themes/theme-1/components.d.ts +2 -1
  18. package/dist/src/themes/theme-2/components.d.ts +2 -1
  19. package/dist/src/themes/theme-3/components.d.ts +2 -1
  20. package/dist/themes/theme-1.css +957 -105
  21. package/dist/themes/theme-1.css.map +1 -1
  22. package/dist/themes/theme-1.js +108 -0
  23. package/dist/themes/theme-1.js.map +1 -1
  24. package/dist/themes/theme-2.css +691 -103
  25. package/dist/themes/theme-2.css.map +1 -1
  26. package/dist/themes/theme-2.js +108 -0
  27. package/dist/themes/theme-2.js.map +1 -1
  28. package/dist/themes/theme-3.css +878 -123
  29. package/dist/themes/theme-3.css.map +1 -1
  30. package/dist/themes/theme-3.js +108 -0
  31. package/dist/themes/theme-3.js.map +1 -1
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { useState, useRef, useId, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react';
1
+ import React, { useState, useRef, useEffect, useId, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react';
2
2
 
3
3
  function _extends() {
4
4
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
@@ -136,1706 +136,598 @@ var LsgBanner = function (_a) {
136
136
  })))));
137
137
  };
138
138
 
139
- function cardVariantClass(variant) {
140
- switch (variant) {
141
- case "onlyText":
142
- return "lsg-card--only-text";
143
- case "withIcon":
144
- return "lsg-card--with-icon";
145
- case "withImage":
146
- default:
147
- return "lsg-card--with-image";
139
+ function isSafeUrl$1(url) {
140
+ if (!url) return false;
141
+ var lower = url.toLowerCase().trim();
142
+ if (lower.startsWith("javascript:") || lower.startsWith("data:") || lower.startsWith("vbscript:")) {
143
+ return false;
148
144
  }
145
+ return lower.startsWith("/") || lower.startsWith("http://") || lower.startsWith("https://") || lower.startsWith("mailto:") || lower.startsWith("tel:") || !lower.includes(":");
149
146
  }
150
- var LsgCard = function (_a) {
151
- var _b;
152
- var title = _a.title,
153
- preTitle = _a.preTitle,
154
- subtitle = _a.subtitle,
147
+ var LsgImage = function (_a) {
148
+ var imageUrl = _a.imageUrl,
149
+ _b = _a.imageAlt,
150
+ imageAlt = _b === void 0 ? "" : _b,
151
+ _c = _a.tags,
152
+ tags = _c === void 0 ? [] : _c,
153
+ title = _a.title,
155
154
  description = _a.description,
156
- imageUrl = _a.imageUrl,
157
- _c = _a.imageAlt,
158
- imageAlt = _c === void 0 ? "" : _c,
159
- iconUrl = _a.iconUrl,
160
- _d = _a.iconAlt,
161
- iconAlt = _d === void 0 ? "" : _d,
155
+ caption = _a.caption,
162
156
  href = _a.href,
163
- cta = _a.cta,
164
- _e = _a.variant,
165
- variant = _e === void 0 ? "withImage" : _e,
166
- className = _a.className;
167
- var resolvedIconUrl = iconUrl !== null && iconUrl !== void 0 ? iconUrl : imageUrl;
168
- var actionLabel = (_b = cta === null || cta === void 0 ? void 0 : cta.label) !== null && _b !== void 0 ? _b : "Read more";
169
- var cardClassName = ["lsg-card", cardVariantClass(variant), className].filter(Boolean).join(" ");
170
- var content = /*#__PURE__*/React.createElement(React.Fragment, null, variant === "withImage" && imageUrl && /*#__PURE__*/React.createElement("div", {
171
- className: "lsg-card__media"
172
- }, /*#__PURE__*/React.createElement("img", {
157
+ _d = _a.className,
158
+ className = _d === void 0 ? "" : _d;
159
+ var text = description !== null && description !== void 0 ? description : caption;
160
+ var visibleTags = Array.isArray(tags) ? tags.filter(function (tag) {
161
+ return Boolean(tag) && typeof tag.label === "string" && tag.label.trim().length > 0;
162
+ }).slice(0, 3) : [];
163
+ var rootClass = ["lsg-image", className].filter(Boolean).join(" ");
164
+ var safeHref = href && isSafeUrl$1(href) ? href : undefined;
165
+ var linkLabel = title ? "View ".concat(title) : "View image";
166
+ var showCaption = Boolean(title) || Boolean(text);
167
+ return /*#__PURE__*/React.createElement("div", {
168
+ className: rootClass
169
+ }, /*#__PURE__*/React.createElement("div", {
170
+ className: "lsg-image__media"
171
+ }, /*#__PURE__*/React.createElement("div", {
172
+ className: "lsg-image__picture"
173
+ }, imageUrl && /*#__PURE__*/React.createElement("img", {
174
+ className: "lsg-image__img",
173
175
  src: imageUrl,
174
176
  alt: imageAlt,
175
177
  loading: "lazy"
176
- })), /*#__PURE__*/React.createElement("div", {
177
- className: "lsg-card__content"
178
- }, variant === "withIcon" && resolvedIconUrl && /*#__PURE__*/React.createElement("div", {
179
- className: "lsg-card__icon",
180
- "aria-hidden": iconAlt ? undefined : true
181
- }, /*#__PURE__*/React.createElement("img", {
182
- src: resolvedIconUrl,
183
- alt: iconAlt,
184
- loading: "lazy"
185
- })), /*#__PURE__*/React.createElement("div", {
186
- className: "lsg-card__top"
187
- }, preTitle && /*#__PURE__*/React.createElement("span", {
188
- className: "lsg-card__pre-title"
189
- }, /*#__PURE__*/React.createElement("span", {
190
- className: "lsg-card__pre-title-dot",
191
- "aria-hidden": "true"
192
- }), /*#__PURE__*/React.createElement("span", {
193
- className: "lsg-card__pre-title-text"
194
- }, preTitle), /*#__PURE__*/React.createElement("span", {
195
- className: "lsg-card__pre-title-arrow",
196
- "aria-hidden": "true"
197
- }, "\u2192")), /*#__PURE__*/React.createElement("h3", {
198
- className: "lsg-card__title"
199
- }, title), subtitle && /*#__PURE__*/React.createElement("h4", {
200
- className: "lsg-card__subtitle"
201
- }, subtitle)), /*#__PURE__*/React.createElement("div", {
202
- className: "lsg-card__bottom"
203
- }, description && /*#__PURE__*/React.createElement("p", {
204
- className: "lsg-card__description"
205
- }, description), (href || cta) && (href ? /*#__PURE__*/React.createElement("span", {
206
- className: "lsg-card__cta",
207
- "aria-hidden": "true"
208
- }, /*#__PURE__*/React.createElement("span", {
209
- className: "lsg-card__cta-label"
210
- }, actionLabel), /*#__PURE__*/React.createElement("span", {
211
- className: "lsg-card__cta-arrow",
212
- "aria-hidden": "true"
213
- }, "\u2192")) : /*#__PURE__*/React.createElement("a", {
214
- className: "lsg-card__cta",
215
- href: cta === null || cta === void 0 ? void 0 : cta.href,
216
- target: (cta === null || cta === void 0 ? void 0 : cta.external) ? "_blank" : undefined,
217
- rel: (cta === null || cta === void 0 ? void 0 : cta.external) ? "noreferrer noopener" : undefined
218
- }, /*#__PURE__*/React.createElement("span", {
219
- className: "lsg-card__cta-label"
220
- }, actionLabel), /*#__PURE__*/React.createElement("span", {
221
- className: "lsg-card__cta-arrow",
222
- "aria-hidden": "true"
223
- }, "\u2192"))))));
224
- return /*#__PURE__*/React.createElement("article", {
225
- className: cardClassName,
226
- "data-lsg-card-variant": variant
227
- }, href ? /*#__PURE__*/React.createElement("a", {
228
- href: href,
229
- className: "lsg-card__link",
230
- "aria-label": title
231
- }, content) : /*#__PURE__*/React.createElement("div", {
232
- className: "lsg-card__link"
233
- }, content));
234
- };
235
- /** Renders the AEM/Storybook compatible responsive card grid. */
236
- var LsgCards = function (_a) {
237
- var cards = _a.cards,
238
- _b = _a.columns,
239
- columns = _b === void 0 ? 3 : _b,
240
- className = _a.className;
241
- var listClassName = ["lsg-cards", "lsg-cards--cols-".concat(columns), className].filter(Boolean).join(" ");
242
- return /*#__PURE__*/React.createElement("ul", {
243
- className: listClassName,
244
- "data-columns": columns
245
- }, cards.map(function (card, index) {
246
- var _a, _b, _c;
247
- return /*#__PURE__*/React.createElement("li", {
248
- className: "lsg-cards__item",
249
- key: (_c = (_a = card.href) !== null && _a !== void 0 ? _a : (_b = card.cta) === null || _b === void 0 ? void 0 : _b.href) !== null && _c !== void 0 ? _c : "".concat(card.title, "-").concat(index)
250
- }, /*#__PURE__*/React.createElement(LsgCard, card));
251
- }));
252
- };
253
-
254
- var LSG_ICON_PATHS = {
255
- bars: "M96 160C96 142.3 110.3 128 128 128L512 128C529.7 128 544 142.3 544 160C544 177.7 529.7 192 512 192L128 192C110.3 192 96 177.7 96 160zM96 320C96 302.3 110.3 288 128 288L512 288C529.7 288 544 302.3 544 320C544 337.7 529.7 352 512 352L128 352C110.3 352 96 337.7 96 320zM544 480C544 497.7 529.7 512 512 512L128 512C110.3 512 96 497.7 96 480C96 462.3 110.3 448 128 448L512 448C529.7 448 544 462.3 544 480z",
256
- chevronLeft: "M169.4 297.4C156.9 309.9 156.9 330.2 169.4 342.7L361.4 534.7C373.9 547.2 394.2 547.2 406.7 534.7C419.2 522.2 419.2 501.9 406.7 489.4L237.3 320L406.6 150.6C419.1 138.1 419.1 117.8 406.6 105.3C394.1 92.8 373.8 92.8 361.3 105.3L169.3 297.3z",
257
- chevronRight: "M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z",
258
- close: "M504.6 148.5C515.9 134.9 514.1 114.7 500.5 103.4C486.9 92.1 466.7 93.9 455.4 107.5L320 270L184.6 107.5C173.3 93.9 153.1 92.1 139.5 103.4C125.9 114.7 124.1 134.9 135.4 148.5L278.3 320L135.4 491.5C124.1 505.1 125.9 525.3 139.5 536.6C153.1 547.9 173.3 546.1 184.6 532.5L320 370L455.4 532.5C466.7 546.1 486.9 547.9 500.5 536.6C514.1 525.3 515.9 505.1 504.6 491.5L361.7 320L504.6 148.5z",
259
- globe: "M367.2 477C345.7 520.7 325.8 528 320 528C314.2 528 294.3 520.7 272.8 477C255.8 442.5 243.6 395.4 240.7 344L399.3 344C396.3 395.5 384.1 442.6 367.2 477zM399.3 296L240.7 296C243.7 244.5 255.9 197.4 272.8 163C294.3 119.3 314.2 112 320 112C325.8 112 345.7 119.3 367.2 163C384.2 197.5 396.4 244.6 399.3 296zM447.4 344L526.6 344C518 418.6 469.9 481.3 403.8 510.4C427.8 467.6 444.1 408 447.4 344zM526.6 296L447.4 296C444.1 232 427.8 172.4 403.8 129.6C469.9 158.8 518 221.4 526.6 296zM192.6 296L113.4 296C122 221.4 170.1 158.7 236.2 129.6C212.2 172.4 195.9 232 192.6 296zM113.4 344L192.6 344C195.9 408 212.2 467.6 236.2 510.4C170.1 481.2 122 418.6 113.4 344zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576z",
260
- home: "M96 320L320 128L544 320H480V528H352V384H288V528H160V320H96z",
261
- search: "M480 272C480 317.9 465.1 360.3 440 394.7L566.6 521.4C579.1 533.9 579.1 554.2 566.6 566.7C554.1 579.2 533.8 579.2 521.3 566.7L394.7 440C360.3 465.1 317.9 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272zM272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272C128 351.5 192.5 416 272 416z"
262
- };
263
-
264
- var LsgIcon = function (_a) {
265
- var name = _a.name,
266
- className = _a.className;
267
- return /*#__PURE__*/React.createElement("svg", {
268
- className: className,
269
- xmlns: "http://www.w3.org/2000/svg",
270
- viewBox: "0 0 640 640",
271
- "aria-hidden": "true",
272
- focusable: "false"
273
- }, /*#__PURE__*/React.createElement("path", {
274
- d: LSG_ICON_PATHS[name]
275
- }));
178
+ })), safeHref && /*#__PURE__*/React.createElement("a", {
179
+ className: "lsg-image__link",
180
+ href: safeHref,
181
+ "aria-label": linkLabel
182
+ }), visibleTags.length > 0 && /*#__PURE__*/React.createElement("div", {
183
+ className: "lsg-image__tags"
184
+ }, visibleTags.map(function (tag, index) {
185
+ return /*#__PURE__*/React.createElement("span", {
186
+ key: "".concat(tag.label, "-").concat(index),
187
+ className: "lsg-image__tag"
188
+ }, tag.label);
189
+ }))), showCaption && /*#__PURE__*/React.createElement("div", {
190
+ className: "lsg-image__caption"
191
+ }, title && /*#__PURE__*/React.createElement("p", {
192
+ className: "lsg-image__title"
193
+ }, title), text && /*#__PURE__*/React.createElement("p", {
194
+ className: "lsg-image__text"
195
+ }, text)));
276
196
  };
277
197
 
278
- function isSafeHref(href) {
279
- if (!href) return false;
280
- var value = href.trim().toLowerCase();
281
- if (value.startsWith("javascript:") || value.startsWith("data:") || value.startsWith("vbscript:")) {
282
- return false;
198
+ function buildUrl(base, params) {
199
+ try {
200
+ var url_1 = new URL(base);
201
+ Object.keys(params).forEach(function (key) {
202
+ return url_1.searchParams.set(key, params[key]);
203
+ });
204
+ return url_1.toString();
205
+ } catch (_a) {
206
+ return base;
283
207
  }
284
- return value.startsWith("/") || value.startsWith("#") || value.startsWith("http://") || value.startsWith("https://") || !value.includes(":");
285
208
  }
286
- var BreadcrumbSeparator = function () {
287
- return /*#__PURE__*/React.createElement("li", {
288
- className: "lsg-breadcrumb__separator",
289
- "aria-hidden": "true"
290
- }, /*#__PURE__*/React.createElement(LsgIcon, {
291
- name: "chevronRight",
292
- className: "lsg-breadcrumb__separator-icon"
293
- }));
294
- };
295
- var LsgBreadcrumb = function (_a) {
296
- var _b = _a.items,
297
- items = _b === void 0 ? [] : _b,
298
- _c = _a.showBreadcrumbs,
299
- showBreadcrumbs = _c === void 0 ? true : _c,
300
- _d = _a.includeHome,
301
- includeHome = _d === void 0 ? true : _d,
302
- _e = _a.homeHref,
303
- homeHref = _e === void 0 ? "/" : _e,
304
- _f = _a.homeLabel,
305
- homeLabel = _f === void 0 ? "Home" : _f,
306
- _g = _a.className,
307
- className = _g === void 0 ? "" : _g;
308
- if (!showBreadcrumbs) return null;
309
- var visibleItems = Array.isArray(items) ? items.filter(function (item) {
310
- return Boolean(item) && typeof item.label === "string" && item.label.trim().length > 0;
311
- }) : [];
312
- if (!includeHome && visibleItems.length === 0) return null;
313
- var rootClassName = ["lsg-breadcrumb", className].filter(Boolean).join(" ");
314
- var safeHomeHref = isSafeHref(homeHref) ? homeHref : "/";
315
- return /*#__PURE__*/React.createElement("nav", {
316
- className: rootClassName,
317
- "aria-label": "Breadcrumb"
318
- }, /*#__PURE__*/React.createElement("ol", {
319
- className: "lsg-breadcrumb__list"
320
- }, includeHome && /*#__PURE__*/React.createElement("li", {
321
- className: "lsg-breadcrumb__item lsg-breadcrumb__item--home"
322
- }, /*#__PURE__*/React.createElement("a", {
323
- className: "lsg-breadcrumb__home",
324
- href: safeHomeHref,
325
- "aria-label": homeLabel
326
- }, /*#__PURE__*/React.createElement(LsgIcon, {
327
- name: "home",
328
- className: "lsg-breadcrumb__home-icon"
329
- }))), visibleItems.map(function (item, index) {
330
- var isCurrent = index === visibleItems.length - 1;
331
- var safeHref = isSafeHref(item.href) ? item.href : undefined;
332
- return /*#__PURE__*/React.createElement(React.Fragment, {
333
- key: "".concat(item.label, "-").concat(index)
334
- }, (includeHome || index > 0) && /*#__PURE__*/React.createElement(BreadcrumbSeparator, null), /*#__PURE__*/React.createElement("li", {
335
- className: ["lsg-breadcrumb__item", isCurrent ? "lsg-breadcrumb__item--current" : "lsg-breadcrumb__item--ancestor"].join(" ")
336
- }, isCurrent ? /*#__PURE__*/React.createElement("span", {
337
- className: "lsg-breadcrumb__current",
338
- "aria-current": "page"
339
- }, /*#__PURE__*/React.createElement("span", {
340
- className: "lsg-breadcrumb__current-marker",
341
- "aria-hidden": "true"
342
- }), /*#__PURE__*/React.createElement("span", {
343
- className: "lsg-breadcrumb__label"
344
- }, item.label)) : safeHref ? /*#__PURE__*/React.createElement("a", {
345
- className: "lsg-breadcrumb__link",
346
- href: safeHref
347
- }, item.label) : /*#__PURE__*/React.createElement("span", {
348
- className: "lsg-breadcrumb__ancestor"
349
- }, item.label)));
350
- })));
209
+ function getEmbedInfo(videoUrl, opts) {
210
+ if (!videoUrl || typeof videoUrl !== "string") return null;
211
+ try {
212
+ var url = new URL(videoUrl);
213
+ var host = url.hostname.replace(/^www\./, "");
214
+ var path = url.pathname;
215
+ if (host === "youtube.com" || host === "youtube-nocookie.com" || host === "youtu.be") {
216
+ var id = null;
217
+ if (host === "youtu.be") {
218
+ id = path.slice(1);
219
+ } else if (path.startsWith("/embed/") || path.startsWith("/shorts/")) {
220
+ id = path.split("/")[2];
221
+ } else if (path === "/watch") {
222
+ id = url.searchParams.get("v");
223
+ }
224
+ if (id && /^[A-Za-z0-9_-]{11}$/.test(id)) {
225
+ var params = {
226
+ autoplay: opts.autoplay ? "1" : "0",
227
+ mute: opts.muted ? "1" : "0",
228
+ controls: opts.controls ? "1" : "0",
229
+ rel: "0"
230
+ };
231
+ if (opts.loop) {
232
+ params.loop = "1";
233
+ params.playlist = id;
234
+ }
235
+ var baseHost = host === "youtube-nocookie.com" ? "youtube-nocookie.com" : "youtube.com";
236
+ return {
237
+ provider: "youtube",
238
+ embedUrl: buildUrl("https://www.".concat(baseHost, "/embed/").concat(id), params)
239
+ };
240
+ }
241
+ }
242
+ if (host === "vimeo.com" || host === "player.vimeo.com") {
243
+ var id = null;
244
+ if (host === "player.vimeo.com" && path.startsWith("/video/")) {
245
+ id = path.split("/")[2];
246
+ } else {
247
+ var match = path.match(/^\/(\d+)$/);
248
+ if (match) id = match[1];
249
+ }
250
+ if (id && /^\d+$/.test(id)) {
251
+ var params = {
252
+ autoplay: opts.autoplay ? "1" : "0",
253
+ muted: opts.muted ? "1" : "0",
254
+ loop: opts.loop ? "1" : "0",
255
+ controls: opts.controls ? "1" : "0"
256
+ };
257
+ return {
258
+ provider: "vimeo",
259
+ embedUrl: buildUrl("https://player.vimeo.com/video/".concat(id), params)
260
+ };
261
+ }
262
+ }
263
+ } catch (_a) {
264
+ return null;
265
+ }
266
+ return null;
267
+ }
268
+ function isSafeUrl(url) {
269
+ if (!url) return false;
270
+ var lower = url.toLowerCase().trim();
271
+ if (lower.startsWith("javascript:") || lower.startsWith("data:") || lower.startsWith("vbscript:")) return false;
272
+ return lower.startsWith("/") || lower.startsWith("http://") || lower.startsWith("https://") || lower.startsWith("mailto:") || lower.startsWith("tel:") || !lower.includes(":");
273
+ }
274
+ var PlayIcon = /*#__PURE__*/React.createElement("svg", {
275
+ className: "lsg-video__play-svg",
276
+ width: "60",
277
+ height: "60",
278
+ viewBox: "0 0 60 60",
279
+ fill: "none",
280
+ xmlns: "http://www.w3.org/2000/svg",
281
+ "aria-hidden": "true",
282
+ focusable: "false"
283
+ }, /*#__PURE__*/React.createElement("circle", {
284
+ cx: "30",
285
+ cy: "30",
286
+ r: "30",
287
+ fill: "currentColor",
288
+ fillOpacity: "0.15"
289
+ }), /*#__PURE__*/React.createElement("polygon", {
290
+ points: "24,18 46,30 24,42",
291
+ fill: "currentColor"
292
+ }));
293
+ var LsgVideo = function (_a) {
294
+ var imageUrl = _a.imageUrl,
295
+ _b = _a.imageAlt,
296
+ imageAlt = _b === void 0 ? "" : _b,
297
+ _c = _a.tags,
298
+ tags = _c === void 0 ? [] : _c,
299
+ title = _a.title,
300
+ caption = _a.caption,
301
+ href = _a.href,
302
+ onPlay = _a.onPlay,
303
+ videoUrl = _a.videoUrl,
304
+ _d = _a.autoplay,
305
+ autoplay = _d === void 0 ? false : _d,
306
+ _e = _a.loop,
307
+ loop = _e === void 0 ? false : _e,
308
+ _f = _a.muted,
309
+ muted = _f === void 0 ? false : _f,
310
+ _g = _a.controls,
311
+ controls = _g === void 0 ? true : _g,
312
+ _h = _a.displayMode,
313
+ displayMode = _h === void 0 ? "content" : _h,
314
+ _j = _a.showTags,
315
+ showTags = _j === void 0 ? true : _j,
316
+ _k = _a.className,
317
+ className = _k === void 0 ? "" : _k;
318
+ var _l = useState(false),
319
+ isRevealed = _l[0],
320
+ setIsRevealed = _l[1];
321
+ var hasVideoSource = typeof videoUrl === "string" && videoUrl.length > 0;
322
+ var embedInfo = hasVideoSource ? getEmbedInfo(videoUrl, {
323
+ autoplay: autoplay,
324
+ loop: loop,
325
+ muted: muted,
326
+ controls: controls
327
+ }) : null;
328
+ var isEmbed = embedInfo !== null;
329
+ var isNativeSource = hasVideoSource && !isEmbed;
330
+ var showMedia = hasVideoSource && (autoplay || isRevealed);
331
+ var visibleTags = showTags && Array.isArray(tags) ? tags.filter(function (tag) {
332
+ return Boolean(tag) && typeof tag.label === "string" && tag.label.trim().length > 0;
333
+ }).slice(0, 3) : [];
334
+ var handleActivate = function (e) {
335
+ if (hasVideoSource) {
336
+ e.preventDefault();
337
+ setIsRevealed(true);
338
+ onPlay === null || onPlay === void 0 ? void 0 : onPlay();
339
+ return;
340
+ }
341
+ if (href && isSafeUrl(href)) return;
342
+ if (onPlay) {
343
+ e.preventDefault();
344
+ onPlay();
345
+ }
346
+ };
347
+ var playLabel = title ? "Play ".concat(title) : "Play video";
348
+ var rootClass = ["lsg-video", "lsg-video--".concat(displayMode), className].filter(Boolean).join(" ");
349
+ var showCaption = Boolean(title) || Boolean(caption);
350
+ var renderPlayControl = function () {
351
+ if (hasVideoSource) {
352
+ return /*#__PURE__*/React.createElement("button", {
353
+ type: "button",
354
+ className: "lsg-video__play",
355
+ "aria-label": playLabel,
356
+ onClick: handleActivate
357
+ }, PlayIcon);
358
+ }
359
+ if (href && isSafeUrl(href)) {
360
+ return /*#__PURE__*/React.createElement("a", {
361
+ href: href,
362
+ className: "lsg-video__play",
363
+ "aria-label": playLabel,
364
+ onClick: handleActivate
365
+ }, PlayIcon);
366
+ }
367
+ return /*#__PURE__*/React.createElement("button", {
368
+ type: "button",
369
+ className: "lsg-video__play",
370
+ "aria-label": playLabel,
371
+ onClick: handleActivate
372
+ }, PlayIcon);
373
+ };
374
+ return /*#__PURE__*/React.createElement("div", {
375
+ className: rootClass
376
+ }, /*#__PURE__*/React.createElement("div", {
377
+ className: "lsg-video__media"
378
+ }, showMedia ? isEmbed ? /*#__PURE__*/React.createElement("div", {
379
+ className: "lsg-video__embed"
380
+ }, /*#__PURE__*/React.createElement("iframe", {
381
+ className: "lsg-video__iframe",
382
+ src: embedInfo.embedUrl,
383
+ title: title || "Video",
384
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
385
+ referrerPolicy: "strict-origin-when-cross-origin",
386
+ allowFullScreen: true,
387
+ loading: "lazy"
388
+ })) : isNativeSource &&
389
+ /*#__PURE__*/
390
+ // eslint-disable-next-line jsx-a11y/media-has-caption
391
+ React.createElement("video", {
392
+ className: "lsg-video__native",
393
+ poster: imageUrl || undefined,
394
+ controls: controls,
395
+ autoPlay: true,
396
+ loop: loop,
397
+ muted: muted,
398
+ playsInline: true
399
+ }, /*#__PURE__*/React.createElement("source", {
400
+ src: videoUrl
401
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
402
+ className: "lsg-video__poster"
403
+ }, imageUrl && /*#__PURE__*/React.createElement("img", {
404
+ className: "lsg-video__poster-img",
405
+ src: imageUrl,
406
+ alt: imageAlt,
407
+ loading: "lazy"
408
+ })), visibleTags.length > 0 && /*#__PURE__*/React.createElement("div", {
409
+ className: "lsg-video__tags"
410
+ }, visibleTags.map(function (tag, i) {
411
+ return /*#__PURE__*/React.createElement("span", {
412
+ key: "".concat(tag.label, "-").concat(i),
413
+ className: "lsg-video__tag"
414
+ }, tag.label);
415
+ })), renderPlayControl()), showCaption && /*#__PURE__*/React.createElement("div", {
416
+ className: "lsg-video__caption"
417
+ }, title && /*#__PURE__*/React.createElement("p", {
418
+ className: "lsg-video__title"
419
+ }, title), caption && /*#__PURE__*/React.createElement("p", {
420
+ className: "lsg-video__text"
421
+ }, caption))));
351
422
  };
352
423
 
353
- var LsgLogo = function (_a) {
354
- var src = _a.src,
355
- _b = _a.alt,
356
- alt = _b === void 0 ? "Logo" : _b,
357
- _c = _a.href,
358
- href = _c === void 0 ? "/" : _c,
359
- width = _a.width,
360
- _d = _a.height,
361
- height = _d === void 0 ? 40 : _d,
362
- _e = _a.text,
363
- text = _e === void 0 ? "Atlas Copco" : _e;
364
- var content = src ? /*#__PURE__*/React.createElement("img", {
365
- src: src,
366
- alt: alt,
367
- width: width,
368
- height: height,
369
- className: "lsg-logo__image"
370
- }) : /*#__PURE__*/React.createElement("span", {
371
- className: "lsg-logo__text"
372
- }, text);
373
- return /*#__PURE__*/React.createElement("a", {
374
- href: href,
375
- className: "lsg-logo",
376
- "aria-label": src ? alt : undefined
377
- }, content);
378
- };
379
-
380
- var LsgNavigation = function (_a) {
381
- var items = _a.items,
382
- _b = _a.label,
383
- label = _b === void 0 ? "Main navigation" : _b,
384
- _c = _a.variant,
385
- variant = _c === void 0 ? "simple" : _c,
386
- onItemClick = _a.onItemClick,
387
- onItemHover = _a.onItemHover;
388
- var renderItems = function (navItems, level) {
389
- if (level === void 0) {
390
- level = 0;
391
- }
392
- return /*#__PURE__*/React.createElement("ul", {
393
- className: level === 0 ? "lsg-nav__list" : "lsg-nav__dropdown",
394
- role: "list"
395
- }, navItems.map(function (item) {
396
- var _a;
397
- var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
398
- return /*#__PURE__*/React.createElement("li", {
399
- key: "".concat(item.href, "-").concat(level),
400
- className: ["lsg-nav__item", hasChildren ? "lsg-nav__item--has-children" : "", item.open ? "lsg-nav__item--open" : ""].filter(Boolean).join(" "),
401
- onMouseEnter: function () {
402
- if (onItemHover && hasChildren) {
403
- onItemHover(item, level);
404
- }
405
- }
406
- }, /*#__PURE__*/React.createElement("a", {
407
- href: item.href,
408
- onClick: function (event) {
409
- if (onItemClick && hasChildren) {
410
- event.preventDefault();
411
- onItemClick(item, level);
412
- }
413
- },
414
- className: ["lsg-nav__link", item.current ? "lsg-nav__link--current" : ""].filter(Boolean).join(" "),
415
- "aria-current": item.current ? "page" : undefined,
416
- "aria-expanded": variant === "dropdown" && hasChildren ? item.open : undefined
417
- }, /*#__PURE__*/React.createElement("p", null, item.label), hasChildren && /*#__PURE__*/React.createElement("span", {
418
- className: "lsg-nav__chevron",
419
- "aria-hidden": "true"
420
- }, /*#__PURE__*/React.createElement("svg", {
421
- viewBox: "0 0 640 640",
422
- focusable: "false"
423
- }, /*#__PURE__*/React.createElement("path", {
424
- d: "M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z"
425
- })))), hasChildren && renderItems(item.children || [], level + 1));
426
- }));
424
+ function isNumber$1(subject) {
425
+ return typeof subject === 'number';
426
+ }
427
+ function isString(subject) {
428
+ return typeof subject === 'string';
429
+ }
430
+ function isBoolean(subject) {
431
+ return typeof subject === 'boolean';
432
+ }
433
+ function isObject(subject) {
434
+ return Object.prototype.toString.call(subject) === '[object Object]';
435
+ }
436
+ function mathAbs(n) {
437
+ return Math.abs(n);
438
+ }
439
+ function mathSign(n) {
440
+ return Math.sign(n);
441
+ }
442
+ function deltaAbs(valueB, valueA) {
443
+ return mathAbs(valueB - valueA);
444
+ }
445
+ function factorAbs(valueB, valueA) {
446
+ if (valueB === 0 || valueA === 0) return 0;
447
+ if (mathAbs(valueB) <= mathAbs(valueA)) return 0;
448
+ const diff = deltaAbs(mathAbs(valueB), mathAbs(valueA));
449
+ return mathAbs(diff / valueB);
450
+ }
451
+ function roundToTwoDecimals(num) {
452
+ return Math.round(num * 100) / 100;
453
+ }
454
+ function arrayKeys(array) {
455
+ return objectKeys(array).map(Number);
456
+ }
457
+ function arrayLast(array) {
458
+ return array[arrayLastIndex(array)];
459
+ }
460
+ function arrayLastIndex(array) {
461
+ return Math.max(0, array.length - 1);
462
+ }
463
+ function arrayIsLastIndex(array, index) {
464
+ return index === arrayLastIndex(array);
465
+ }
466
+ function arrayFromNumber(n, startAt = 0) {
467
+ return Array.from(Array(n), (_, i) => startAt + i);
468
+ }
469
+ function objectKeys(object) {
470
+ return Object.keys(object);
471
+ }
472
+ function objectsMergeDeep(objectA, objectB) {
473
+ return [objectA, objectB].reduce((mergedObjects, currentObject) => {
474
+ objectKeys(currentObject).forEach(key => {
475
+ const valueA = mergedObjects[key];
476
+ const valueB = currentObject[key];
477
+ const areObjects = isObject(valueA) && isObject(valueB);
478
+ mergedObjects[key] = areObjects ? objectsMergeDeep(valueA, valueB) : valueB;
479
+ });
480
+ return mergedObjects;
481
+ }, {});
482
+ }
483
+ function isMouseEvent(evt, ownerWindow) {
484
+ return typeof ownerWindow.MouseEvent !== 'undefined' && evt instanceof ownerWindow.MouseEvent;
485
+ }
486
+ function Alignment(align, viewSize) {
487
+ const predefined = {
488
+ start,
489
+ center,
490
+ end
427
491
  };
428
- return /*#__PURE__*/React.createElement("nav", {
429
- className: ["lsg-nav", "lsg-nav--".concat(variant)].join(" "),
430
- "aria-label": label
431
- }, renderItems(items));
432
- };
433
-
434
- var ChevronIcon = function () {
435
- return /*#__PURE__*/React.createElement("svg", {
436
- xmlns: "http://www.w3.org/2000/svg",
437
- viewBox: "0 0 12 12",
438
- fill: "none",
439
- stroke: "currentColor",
440
- strokeWidth: "1.5",
441
- strokeLinecap: "round",
442
- strokeLinejoin: "round",
443
- "aria-hidden": "true",
444
- focusable: "false"
445
- }, /*#__PURE__*/React.createElement("polyline", {
446
- points: "2 4 6 8 10 4"
447
- }));
448
- };
449
- /**
450
- * Language Switcher
451
- *
452
- * Hydrated: state managed by React (useState).
453
- * Clientlib-only: driven by lsg-clientlib.js targeting [data-lsg-lang-switcher].
454
- */
455
- var LsgLanguageSwitcher = function (_a) {
456
- var currentLanguage = _a.currentLanguage,
457
- languages = _a.languages,
458
- _b = _a.label,
459
- label = _b === void 0 ? "Select language" : _b,
460
- onLanguageChange = _a.onLanguageChange;
461
- var _c = useState(false),
462
- isOpen = _c[0],
463
- setIsOpen = _c[1];
464
- var containerRef = useRef(null);
465
- var reactId = useId();
466
- var triggerId = "lsg-lang-trigger-".concat(reactId);
467
- var dropdownId = "lsg-lang-dropdown-".concat(reactId);
468
- // Close on outside click
469
- useEffect(function () {
470
- if (!isOpen) return;
471
- var handleClick = function (e) {
472
- if (containerRef.current && !containerRef.current.contains(e.target)) {
473
- setIsOpen(false);
474
- }
475
- };
476
- document.addEventListener("mousedown", handleClick);
477
- return function () {
478
- return document.removeEventListener("mousedown", handleClick);
479
- };
480
- }, [isOpen]);
481
- // Close on Escape
482
- useEffect(function () {
483
- if (!isOpen) return;
484
- var handleKey = function (e) {
485
- if (e.key === "Escape") setIsOpen(false);
486
- };
487
- document.addEventListener("keydown", handleKey);
488
- return function () {
489
- return document.removeEventListener("keydown", handleKey);
490
- };
491
- }, [isOpen]);
492
- return /*#__PURE__*/React.createElement("div", {
493
- className: "lsg-lang-switcher",
494
- ref: containerRef,
495
- "data-lsg-lang-switcher": true
496
- }, /*#__PURE__*/React.createElement("button", {
497
- id: triggerId,
498
- type: "button",
499
- className: "lsg-lang-switcher__trigger",
500
- "aria-label": label,
501
- "aria-haspopup": "listbox",
502
- "aria-expanded": isOpen,
503
- "aria-controls": dropdownId,
504
- onClick: function () {
505
- return setIsOpen(function (prev) {
506
- return !prev;
507
- });
492
+ function start() {
493
+ return 0;
494
+ }
495
+ function center(n) {
496
+ return end(n) / 2;
497
+ }
498
+ function end(n) {
499
+ return viewSize - n;
500
+ }
501
+ function measure(n, index) {
502
+ if (isString(align)) return predefined[align](n);
503
+ return align(viewSize, n, index);
504
+ }
505
+ const self = {
506
+ measure
507
+ };
508
+ return self;
509
+ }
510
+ function EventStore() {
511
+ let listeners = [];
512
+ function add(node, type, handler, options = {
513
+ passive: true
514
+ }) {
515
+ let removeListener;
516
+ if ('addEventListener' in node) {
517
+ node.addEventListener(type, handler, options);
518
+ removeListener = () => node.removeEventListener(type, handler, options);
519
+ } else {
520
+ const legacyMediaQueryList = node;
521
+ legacyMediaQueryList.addListener(handler);
522
+ removeListener = () => legacyMediaQueryList.removeListener(handler);
508
523
  }
509
- }, /*#__PURE__*/React.createElement(LsgIcon, {
510
- name: "globe",
511
- className: "lsg-lang-switcher__globe"
512
- }), /*#__PURE__*/React.createElement("span", {
513
- className: "lsg-lang-switcher__current"
514
- }, currentLanguage), /*#__PURE__*/React.createElement(ChevronIcon, null)), isOpen && /*#__PURE__*/React.createElement("ul", {
515
- id: dropdownId,
516
- className: "lsg-lang-switcher__dropdown",
517
- role: "listbox",
518
- "aria-labelledby": triggerId
519
- }, languages.map(function (lang) {
520
- return /*#__PURE__*/React.createElement("li", {
521
- key: lang.code,
522
- className: "lsg-lang-switcher__option",
523
- role: "option"
524
- }, /*#__PURE__*/React.createElement("a", {
525
- href: lang.href,
526
- className: ["lsg-lang-switcher__option-link", lang.code === currentLanguage ? "lsg-lang-switcher__option-link--active" : ""].filter(Boolean).join(" "),
527
- "aria-current": lang.code === currentLanguage ? true : undefined,
528
- onClick: function (event) {
529
- if (!onLanguageChange) return;
530
- event.preventDefault();
531
- onLanguageChange(lang);
532
- setIsOpen(false);
533
- }
534
- }, lang.label));
535
- })));
536
- };
537
-
538
- var SearchIcon$1 = function () {
539
- return /*#__PURE__*/React.createElement("svg", {
540
- xmlns: "http://www.w3.org/2000/svg",
541
- viewBox: "0 0 24 24",
542
- fill: "none",
543
- stroke: "currentColor",
544
- strokeWidth: "2",
545
- strokeLinecap: "round",
546
- strokeLinejoin: "round",
547
- "aria-hidden": "true",
548
- focusable: "false"
549
- }, /*#__PURE__*/React.createElement("circle", {
550
- cx: "11",
551
- cy: "11",
552
- r: "8"
553
- }), /*#__PURE__*/React.createElement("line", {
554
- x1: "21",
555
- y1: "21",
556
- x2: "16.65",
557
- y2: "16.65"
558
- }));
559
- };
560
- var LsgSearchTrigger = function (_a) {
561
- var _b = _a.label,
562
- label = _b === void 0 ? "Open search" : _b,
563
- targetId = _a.targetId,
564
- onClick = _a.onClick;
565
- return /*#__PURE__*/React.createElement("button", {
566
- type: "button",
567
- className: "lsg-search-trigger",
568
- "aria-label": label,
569
- "aria-haspopup": "dialog",
570
- "aria-controls": targetId,
571
- onClick: onClick,
572
- "data-lsg-search-trigger": true
573
- }, /*#__PURE__*/React.createElement(SearchIcon$1, null));
574
- };
575
-
576
- var SearchIcon = function () {
577
- return /*#__PURE__*/React.createElement("svg", {
578
- xmlns: "http://www.w3.org/2000/svg",
579
- viewBox: "0 0 24 24",
580
- fill: "none",
581
- stroke: "currentColor",
582
- strokeWidth: "2",
583
- strokeLinecap: "round",
584
- strokeLinejoin: "round",
585
- "aria-hidden": "true",
586
- focusable: "false"
587
- }, /*#__PURE__*/React.createElement("circle", {
588
- cx: "11",
589
- cy: "11",
590
- r: "8"
591
- }), /*#__PURE__*/React.createElement("line", {
592
- x1: "21",
593
- y1: "21",
594
- x2: "16.65",
595
- y2: "16.65"
596
- }));
597
- };
598
- var CloseIcon = function () {
599
- return /*#__PURE__*/React.createElement("svg", {
600
- xmlns: "http://www.w3.org/2000/svg",
601
- viewBox: "0 0 24 24",
602
- fill: "none",
603
- stroke: "currentColor",
604
- strokeWidth: "2",
605
- strokeLinecap: "round",
606
- strokeLinejoin: "round",
607
- "aria-hidden": "true",
608
- focusable: "false"
609
- }, /*#__PURE__*/React.createElement("line", {
610
- x1: "18",
611
- y1: "6",
612
- x2: "6",
613
- y2: "18"
614
- }), /*#__PURE__*/React.createElement("line", {
615
- x1: "6",
616
- y1: "6",
617
- x2: "18",
618
- y2: "18"
619
- }));
620
- };
621
- /**
622
- * Search Overlay
623
- *
624
- * Hydrated: isOpen/onClose controlled by parent (e.g. LsgHeader).
625
- * Clientlib-only: driven by lsg-clientlib.js targeting [data-lsg-search-overlay].
626
- * The CSS class lsg-search-overlay--open drives visibility in both modes.
627
- */
628
- var LsgSearchOverlay = function (_a) {
629
- var _b = _a.id,
630
- id = _b === void 0 ? "lsg-search-overlay" : _b,
631
- _c = _a.placeholder,
632
- placeholder = _c === void 0 ? "Search…" : _c,
633
- _d = _a.label,
634
- label = _d === void 0 ? "Search" : _d,
635
- _e = _a.isOpen,
636
- isOpen = _e === void 0 ? false : _e,
637
- onClose = _a.onClose,
638
- onSearch = _a.onSearch;
639
- var inputRef = useRef(null);
640
- var inputId = "".concat(id, "-input");
641
- // Focus the input when overlay opens
642
- useEffect(function () {
643
- var _a;
644
- if (isOpen) (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
645
- }, [isOpen]);
646
- // Close on Escape
647
- useEffect(function () {
648
- if (!isOpen) return;
649
- var handleKey = function (e) {
650
- if (e.key === "Escape") onClose === null || onClose === void 0 ? void 0 : onClose();
651
- };
652
- document.addEventListener("keydown", handleKey);
653
- return function () {
654
- return document.removeEventListener("keydown", handleKey);
655
- };
656
- }, [isOpen, onClose]);
657
- var handleSubmit = function (e) {
658
- var _a, _b;
659
- e.preventDefault();
660
- var query = (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
661
- if (query.trim()) onSearch === null || onSearch === void 0 ? void 0 : onSearch(query.trim());
524
+ listeners.push(removeListener);
525
+ return self;
526
+ }
527
+ function clear() {
528
+ listeners = listeners.filter(remove => remove());
529
+ }
530
+ const self = {
531
+ add,
532
+ clear
662
533
  };
663
- var overlayClass = ["lsg-search-overlay", isOpen ? "lsg-search-overlay--open" : ""].filter(Boolean).join(" ");
664
- return /*#__PURE__*/React.createElement("div", {
665
- id: id,
666
- className: overlayClass,
667
- role: "dialog",
668
- "aria-modal": "true",
669
- "aria-label": label,
670
- "data-lsg-search-overlay": true
671
- }, /*#__PURE__*/React.createElement("div", {
672
- className: "lsg-search-overlay__backdrop",
673
- "aria-hidden": "true",
674
- onClick: onClose,
675
- style: {
676
- position: "absolute",
677
- inset: 0,
678
- cursor: "default"
679
- }
680
- }), /*#__PURE__*/React.createElement("div", {
681
- className: "lsg-search-overlay__panel"
682
- }, /*#__PURE__*/React.createElement("form", {
683
- className: "lsg-search-overlay__form",
684
- role: "search",
685
- onSubmit: handleSubmit
686
- }, /*#__PURE__*/React.createElement("label", {
687
- htmlFor: inputId,
688
- className: "lsg-search-overlay__label"
689
- }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement("span", {
690
- className: "lsg-visually-hidden"
691
- }, label)), /*#__PURE__*/React.createElement("input", {
692
- id: inputId,
693
- ref: inputRef,
694
- type: "search",
695
- className: "lsg-search-overlay__input",
696
- placeholder: placeholder,
697
- autoComplete: "off"
698
- }), /*#__PURE__*/React.createElement("button", {
699
- type: "submit",
700
- className: "lsg-search-overlay__submit",
701
- "aria-label": "Submit search"
702
- }, /*#__PURE__*/React.createElement(SearchIcon, null)), /*#__PURE__*/React.createElement("button", {
703
- type: "button",
704
- className: "lsg-search-overlay__close",
705
- "aria-label": "Close search",
706
- onClick: onClose
707
- }, /*#__PURE__*/React.createElement(CloseIcon, null)))));
708
- };
709
-
710
- var SEARCH_OVERLAY_ID = "lsg-header-search-overlay";
711
- var LsgHeaderIcon = function (_a) {
712
- var name = _a.name,
713
- className = _a.className;
714
- return /*#__PURE__*/React.createElement(LsgIcon, {
715
- name: name,
716
- className: ["lsg-header__icon", "lsg-header__icon--".concat(name), className || ""].filter(Boolean).join(" ")
717
- });
718
- };
719
- var getItemByPath = function (items, activePath, depth) {
720
- var currentItems = items;
721
- var currentItem;
722
- var _loop_1 = function (i) {
723
- currentItem = currentItems.find(function (item) {
724
- return item.label === activePath[i];
534
+ return self;
535
+ }
536
+ function Animations(ownerDocument, ownerWindow, update, render) {
537
+ const documentVisibleHandler = EventStore();
538
+ const fixedTimeStep = 1000 / 60;
539
+ let lastTimeStamp = null;
540
+ let accumulatedTime = 0;
541
+ let animationId = 0;
542
+ function init() {
543
+ documentVisibleHandler.add(ownerDocument, 'visibilitychange', () => {
544
+ if (ownerDocument.hidden) reset();
725
545
  });
726
- currentItems = (currentItem === null || currentItem === void 0 ? void 0 : currentItem.children) || [];
727
- };
728
- for (var i = 0; i <= depth; i += 1) {
729
- _loop_1(i);
730
- }
731
- return currentItem;
732
- };
733
- var getItemsAtLevel = function (items, activePath, level) {
734
- var _a;
735
- if (level <= 1) {
736
- return items;
737
546
  }
738
- return ((_a = getItemByPath(items, activePath, level - 2)) === null || _a === void 0 ? void 0 : _a.children) || [];
739
- };
740
- var getMegaColumns = function (items, activePath, maxDepth) {
741
- if (maxDepth === void 0) {
742
- maxDepth = 4;
547
+ function destroy() {
548
+ stop();
549
+ documentVisibleHandler.clear();
743
550
  }
744
- var columns = [items];
745
- var currentItems = items;
746
- activePath.slice(0, maxDepth - 1).forEach(function (label) {
747
- var _a;
748
- var activeItem = currentItems.find(function (item) {
749
- return item.label === label;
750
- });
751
- if ((_a = activeItem === null || activeItem === void 0 ? void 0 : activeItem.children) === null || _a === void 0 ? void 0 : _a.length) {
752
- columns.push(activeItem.children);
753
- currentItems = activeItem.children;
754
- }
755
- });
756
- return columns.slice(0, maxDepth);
757
- };
758
- var isCurrentOrActiveAtLevel = function (item, activePath, level) {
759
- return item.current || activePath[level] === item.label;
760
- };
761
- var isSelectedAtLevel = function (item, activePath, level) {
762
- return activePath[level] === item.label;
763
- };
764
- var hasOpenNavItem = function (items) {
765
- return items.some(function (item) {
766
- return item.open || hasOpenNavItem(item.children || []);
767
- });
768
- };
769
- var clearMegaMenuBranch = function (scope) {
770
- if (scope instanceof HTMLElement) {
771
- scope.classList.remove("lsg-header__mega-item--open");
772
- scope.classList.remove("lsg-header__mega-column--open");
773
- }
774
- scope.querySelectorAll(".lsg-header__mega-item--open").forEach(function (item) {
775
- item.classList.remove("lsg-header__mega-item--open");
776
- });
777
- scope.querySelectorAll(".lsg-header__mega-column--open").forEach(function (column) {
778
- column.classList.remove("lsg-header__mega-column--open");
779
- });
780
- };
781
- var activateMegaMenuItem = function (item) {
782
- var _a;
783
- var parentColumn = item.parentElement;
784
- if (parentColumn) {
785
- Array.from(parentColumn.children).forEach(function (openItem) {
786
- if (openItem !== item) {
787
- clearMegaMenuBranch(openItem);
788
- }
789
- });
790
- }
791
- item.classList.add("lsg-header__mega-item--open");
792
- (_a = item.querySelector(":scope > .lsg-header__mega-column")) === null || _a === void 0 ? void 0 : _a.classList.add("lsg-header__mega-column--open");
793
- };
794
- var HeaderActionButton = function (_a) {
795
- var label = _a.label,
796
- icon = _a.icon,
797
- onClick = _a.onClick,
798
- controls = _a.controls,
799
- className = _a.className;
800
- return /*#__PURE__*/React.createElement("button", {
801
- type: "button",
802
- className: ["lsg-header__icon-button", className || ""].filter(Boolean).join(" "),
803
- "aria-label": label,
804
- "aria-controls": controls,
805
- onClick: onClick,
806
- "data-lsg-search-trigger": icon === "search" ? "" : undefined
807
- }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
808
- name: icon
809
- }));
810
- };
811
- var LsgHeader = function (_a) {
812
- var logo = _a.logo,
813
- _b = _a.navItems,
814
- navItems = _b === void 0 ? [] : _b,
815
- _c = _a.languages,
816
- languages = _c === void 0 ? [] : _c,
817
- _d = _a.currentLanguage,
818
- currentLanguage = _d === void 0 ? "EN" : _d,
819
- onLanguageChange = _a.onLanguageChange,
820
- _e = _a.searchLabel,
821
- searchLabel = _e === void 0 ? "Open search" : _e,
822
- _f = _a.searchPlaceholder,
823
- searchPlaceholder = _f === void 0 ? "Search products, documents..." : _f,
824
- _g = _a.variant,
825
- variant = _g === void 0 ? "simple" : _g,
826
- _h = _a.menuOpen,
827
- menuOpen = _h === void 0 ? false : _h,
828
- _j = _a.mobileLevel,
829
- mobileLevel = _j === void 0 ? 0 : _j,
830
- _k = _a.activePath,
831
- activePath = _k === void 0 ? [] : _k,
832
- mobileSelectedLabel = _a.mobileSelectedLabel,
833
- onMenuToggle = _a.onMenuToggle,
834
- onNavItemHover = _a.onNavItemHover,
835
- onDropdownClose = _a.onDropdownClose,
836
- onMegaItemHover = _a.onMegaItemHover,
837
- onMobileItemClick = _a.onMobileItemClick,
838
- onMobileBreadcrumbClick = _a.onMobileBreadcrumbClick,
839
- children = _a.children;
840
- var _l = useState(false),
841
- searchOpen = _l[0],
842
- setSearchOpen = _l[1];
843
- var headerRef = useRef(null);
844
- var mobileOpen = menuOpen || mobileLevel > 0;
845
- var columns = children ? [] : getMegaColumns(navItems, activePath);
846
- var mobileItems = getItemsAtLevel(navItems, activePath, mobileLevel || 1);
847
- var mobileBackLabel = activePath[activePath.length - 1] || "menu";
848
- var dropdownOpen = variant === "dropdown" && hasOpenNavItem(navItems);
849
- useEffect(function () {
850
- if (!menuOpen && !dropdownOpen) {
851
- return undefined;
551
+ function animate(timeStamp) {
552
+ if (!animationId) return;
553
+ if (!lastTimeStamp) {
554
+ lastTimeStamp = timeStamp;
555
+ update();
556
+ update();
852
557
  }
853
- var closeOnOutsidePointerDown = function (event) {
854
- var _a;
855
- if ((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
856
- return;
857
- }
858
- if (menuOpen) {
859
- onMenuToggle === null || onMenuToggle === void 0 ? void 0 : onMenuToggle();
860
- }
861
- if (dropdownOpen) {
862
- onDropdownClose === null || onDropdownClose === void 0 ? void 0 : onDropdownClose();
863
- }
864
- };
865
- document.addEventListener("mousedown", closeOnOutsidePointerDown);
866
- document.addEventListener("touchstart", closeOnOutsidePointerDown);
867
- return function () {
868
- document.removeEventListener("mousedown", closeOnOutsidePointerDown);
869
- document.removeEventListener("touchstart", closeOnOutsidePointerDown);
870
- };
871
- }, [dropdownOpen, menuOpen, onDropdownClose, onMenuToggle]);
872
- useEffect(function () {
873
- if (variant !== "mega" || !children || !menuOpen || !headerRef.current) {
874
- return undefined;
558
+ const timeElapsed = timeStamp - lastTimeStamp;
559
+ lastTimeStamp = timeStamp;
560
+ accumulatedTime += timeElapsed;
561
+ while (accumulatedTime >= fixedTimeStep) {
562
+ update();
563
+ accumulatedTime -= fixedTimeStep;
875
564
  }
876
- var megaItems = Array.from(headerRef.current.querySelectorAll(".lsg-header__mega-item--has-children"));
877
- var removeListeners = megaItems.map(function (item) {
878
- var onMouseEnter = function () {
879
- return activateMegaMenuItem(item);
880
- };
881
- var onFocusIn = function () {
882
- return activateMegaMenuItem(item);
883
- };
884
- item.addEventListener("mouseenter", onMouseEnter);
885
- item.addEventListener("focusin", onFocusIn);
886
- return function () {
887
- item.removeEventListener("mouseenter", onMouseEnter);
888
- item.removeEventListener("focusin", onFocusIn);
889
- };
890
- });
891
- return function () {
892
- removeListeners.forEach(function (removeListener) {
893
- return removeListener();
894
- });
895
- if (headerRef.current) {
896
- clearMegaMenuBranch(headerRef.current);
897
- }
898
- };
899
- }, [children, menuOpen, variant]);
900
- var openSearch = function () {
901
- return setSearchOpen(true);
902
- };
903
- var renderActions = function (showMenu) {
904
- if (showMenu === void 0) {
905
- showMenu = false;
565
+ const alpha = accumulatedTime / fixedTimeStep;
566
+ render(alpha);
567
+ if (animationId) {
568
+ animationId = ownerWindow.requestAnimationFrame(animate);
906
569
  }
907
- return /*#__PURE__*/React.createElement("div", {
908
- className: "lsg-header__actions"
909
- }, showMenu && variant === "mega" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
910
- type: "button",
911
- className: "lsg-header__menu-trigger",
912
- "aria-label": menuOpen ? "Close menu" : "Open menu",
913
- "aria-expanded": menuOpen,
914
- onClick: onMenuToggle,
915
- "data-lsg-menu-trigger": true
916
- }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
917
- name: menuOpen ? "close" : "bars"
918
- }), /*#__PURE__*/React.createElement("span", null, menuOpen ? "CLOSE" : "MENU")), /*#__PURE__*/React.createElement("span", {
919
- className: "lsg-header__separator",
920
- "aria-hidden": "true"
921
- }, "|")), /*#__PURE__*/React.createElement(HeaderActionButton, {
922
- label: searchLabel,
923
- icon: "search",
924
- controls: SEARCH_OVERLAY_ID,
925
- onClick: openSearch
926
- }), languages.length > 0 && /*#__PURE__*/React.createElement(LsgLanguageSwitcher, {
927
- currentLanguage: currentLanguage,
928
- languages: languages,
929
- label: "Current language: ".concat(currentLanguage),
930
- onLanguageChange: onLanguageChange
931
- }));
932
- };
933
- var renderMegaPanel = function () {
934
- return /*#__PURE__*/React.createElement("div", {
935
- className: "lsg-header__mega-panel"
936
- }, /*#__PURE__*/React.createElement("div", {
937
- className: "lsg-header__mega-inner"
938
- }, columns.map(function (columnItems, columnIndex) {
939
- return /*#__PURE__*/React.createElement("ul", {
940
- key: "mega-column-".concat(columnIndex),
941
- className: "lsg-header__mega-column",
942
- role: "list"
943
- }, columnItems.map(function (item) {
944
- var _a;
945
- var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
946
- return /*#__PURE__*/React.createElement("li", {
947
- key: "".concat(item.href, "-").concat(columnIndex),
948
- className: ["lsg-header__mega-item", hasChildren ? "lsg-header__mega-item--has-children" : "", isSelectedAtLevel(item, activePath, columnIndex) ? "lsg-header__mega-item--active" : ""].filter(Boolean).join(" "),
949
- onMouseEnter: function () {
950
- if (onMegaItemHover && hasChildren) {
951
- onMegaItemHover(item, columnIndex);
952
- }
953
- }
954
- }, /*#__PURE__*/React.createElement("a", {
955
- href: item.href,
956
- className: "lsg-header__mega-link"
957
- }, /*#__PURE__*/React.createElement("span", null, item.label), hasChildren && /*#__PURE__*/React.createElement(LsgHeaderIcon, {
958
- name: "chevronRight"
959
- })));
960
- }));
961
- })));
570
+ }
571
+ function start() {
572
+ if (animationId) return;
573
+ animationId = ownerWindow.requestAnimationFrame(animate);
574
+ }
575
+ function stop() {
576
+ ownerWindow.cancelAnimationFrame(animationId);
577
+ lastTimeStamp = null;
578
+ accumulatedTime = 0;
579
+ animationId = 0;
580
+ }
581
+ function reset() {
582
+ lastTimeStamp = null;
583
+ accumulatedTime = 0;
584
+ }
585
+ const self = {
586
+ init,
587
+ destroy,
588
+ start,
589
+ stop,
590
+ update,
591
+ render
962
592
  };
963
- var renderMobileMenu = function () {
964
- return /*#__PURE__*/React.createElement("div", {
965
- className: "lsg-header__mobile-panel"
966
- }, variant === "dropdown" ? /*#__PURE__*/React.createElement(LsgNavigation, {
967
- items: navItems,
968
- variant: "dropdown",
969
- onItemClick: function (item, level) {
970
- return onMobileItemClick === null || onMobileItemClick === void 0 ? void 0 : onMobileItemClick(item, level + 1);
971
- }
972
- }) : /*#__PURE__*/React.createElement(React.Fragment, null, variant === "mega" && mobileLevel > 1 && /*#__PURE__*/React.createElement("nav", {
973
- className: "lsg-header__mobile-back",
974
- "aria-label": "Menu navigation"
975
- }, /*#__PURE__*/React.createElement("button", {
976
- type: "button",
977
- className: "lsg-header__mobile-back-button",
978
- "aria-label": "Back to ".concat(mobileBackLabel),
979
- onClick: function () {
980
- return onMobileBreadcrumbClick === null || onMobileBreadcrumbClick === void 0 ? void 0 : onMobileBreadcrumbClick(Math.max(1, mobileLevel - 1));
981
- }
982
- }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
983
- name: "chevronRight"
984
- }), /*#__PURE__*/React.createElement("span", null, "Back to ", mobileBackLabel))), /*#__PURE__*/React.createElement("ul", {
985
- className: "lsg-header__mobile-list",
986
- role: "list"
987
- }, mobileItems.map(function (item, index) {
988
- var _a;
989
- var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
990
- var isSelected = mobileSelectedLabel ? item.label === mobileSelectedLabel : isCurrentOrActiveAtLevel(item, activePath, Math.max(0, mobileLevel - 1));
991
- return /*#__PURE__*/React.createElement("li", {
992
- key: "".concat(item.href, "-mobile-").concat(index),
993
- className: ["lsg-header__mobile-item", hasChildren ? "lsg-header__mobile-item--has-children" : "", isSelected ? "lsg-header__mobile-item--active" : ""].filter(Boolean).join(" ")
994
- }, /*#__PURE__*/React.createElement("a", {
995
- href: item.href,
996
- className: "lsg-header__mobile-link",
997
- onClick: function (event) {
998
- if (onMobileItemClick && hasChildren) {
999
- event.preventDefault();
1000
- onMobileItemClick(item, Math.max(1, mobileLevel || 1));
1001
- }
1002
- }
1003
- }, /*#__PURE__*/React.createElement("span", null, item.label), hasChildren && /*#__PURE__*/React.createElement(LsgHeaderIcon, {
1004
- name: "chevronRight"
1005
- })));
1006
- }))));
593
+ return self;
594
+ }
595
+ function Axis(axis, contentDirection) {
596
+ const isRightToLeft = contentDirection === 'rtl';
597
+ const isVertical = axis === 'y';
598
+ const scroll = isVertical ? 'y' : 'x';
599
+ const cross = isVertical ? 'x' : 'y';
600
+ const sign = !isVertical && isRightToLeft ? -1 : 1;
601
+ const startEdge = getStartEdge();
602
+ const endEdge = getEndEdge();
603
+ function measureSize(nodeRect) {
604
+ const {
605
+ height,
606
+ width
607
+ } = nodeRect;
608
+ return isVertical ? height : width;
609
+ }
610
+ function getStartEdge() {
611
+ if (isVertical) return 'top';
612
+ return isRightToLeft ? 'right' : 'left';
613
+ }
614
+ function getEndEdge() {
615
+ if (isVertical) return 'bottom';
616
+ return isRightToLeft ? 'left' : 'right';
617
+ }
618
+ function direction(n) {
619
+ return n * sign;
620
+ }
621
+ const self = {
622
+ scroll,
623
+ cross,
624
+ startEdge,
625
+ endEdge,
626
+ measureSize,
627
+ direction
1007
628
  };
1008
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LsgSearchOverlay, {
1009
- id: SEARCH_OVERLAY_ID,
1010
- isOpen: searchOpen,
1011
- onClose: function () {
1012
- return setSearchOpen(false);
1013
- },
1014
- placeholder: searchPlaceholder
1015
- }), /*#__PURE__*/React.createElement("header", {
1016
- ref: headerRef,
1017
- className: ["lsg-header", "lsg-header--".concat(variant), menuOpen ? "lsg-header--menu-open" : "", "lsg-header--mobile-level-".concat(mobileLevel)].filter(Boolean).join(" ")
1018
- }, /*#__PURE__*/React.createElement("div", {
1019
- className: "lsg-header__inner"
1020
- }, /*#__PURE__*/React.createElement("div", {
1021
- className: "lsg-logo-decorator"
1022
- }, /*#__PURE__*/React.createElement("div", {
1023
- className: "lsg-logo"
1024
- }, /*#__PURE__*/React.createElement(LsgLogo, logo))), variant !== "mega" && navItems.length > 0 && /*#__PURE__*/React.createElement("div", {
1025
- className: "lsg-header__nav"
1026
- }, /*#__PURE__*/React.createElement(LsgNavigation, {
1027
- items: navItems,
1028
- variant: variant,
1029
- onItemHover: onNavItemHover
1030
- })), variant === "mega" && /*#__PURE__*/React.createElement("div", {
1031
- className: "lsg-header__desktop-menu"
1032
- }, renderActions(true)), variant !== "mega" && /*#__PURE__*/React.createElement("div", {
1033
- className: "lsg-header__desktop-actions"
1034
- }, /*#__PURE__*/React.createElement("span", {
1035
- className: "lsg-header__separator",
1036
- "aria-hidden": "true"
1037
- }, "|"), renderActions(false)), /*#__PURE__*/React.createElement("div", {
1038
- className: "lsg-header__mobile-actions"
1039
- }, /*#__PURE__*/React.createElement(HeaderActionButton, {
1040
- label: searchLabel,
1041
- icon: "search",
1042
- controls: SEARCH_OVERLAY_ID,
1043
- onClick: openSearch
1044
- }), languages.length > 0 && /*#__PURE__*/React.createElement(LsgLanguageSwitcher, {
1045
- currentLanguage: currentLanguage,
1046
- languages: languages,
1047
- label: "Current language: ".concat(currentLanguage),
1048
- onLanguageChange: onLanguageChange
1049
- }), /*#__PURE__*/React.createElement("span", {
1050
- className: "lsg-header__separator",
1051
- "aria-hidden": "true"
1052
- }, "|"), /*#__PURE__*/React.createElement("button", {
1053
- type: "button",
1054
- className: "lsg-header__icon-button",
1055
- "aria-label": mobileOpen ? "Close menu" : "Open menu",
1056
- "aria-expanded": mobileOpen,
1057
- onClick: onMenuToggle,
1058
- "data-lsg-menu-trigger": true
1059
- }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
1060
- name: mobileOpen ? "close" : "bars"
1061
- })))), variant === "mega" && menuOpen && (children || renderMegaPanel()), mobileOpen && renderMobileMenu()));
1062
- };
1063
-
1064
- var LsgQuickLinks = function (_a) {
1065
- var heading = _a.heading,
1066
- links = _a.links;
1067
- return /*#__PURE__*/React.createElement("nav", {
1068
- className: "lsg-quick-links",
1069
- "aria-label": heading !== null && heading !== void 0 ? heading : "Quick links"
1070
- }, heading && /*#__PURE__*/React.createElement("p", {
1071
- className: "lsg-quick-links__heading",
1072
- "aria-hidden": "true"
1073
- }, heading), /*#__PURE__*/React.createElement("ul", {
1074
- className: "lsg-quick-links__list",
1075
- role: "list"
1076
- }, links.map(function (link) {
1077
- return /*#__PURE__*/React.createElement("li", {
1078
- key: link.href,
1079
- className: "lsg-quick-links__item"
1080
- }, /*#__PURE__*/React.createElement("a", {
1081
- href: link.href,
1082
- className: "lsg-quick-links__link"
1083
- }, link.label));
1084
- })));
1085
- };
1086
-
1087
- var platformIcons = {
1088
- linkedin: /*#__PURE__*/React.createElement("svg", {
1089
- viewBox: "0 0 24 24",
1090
- xmlns: "http://www.w3.org/2000/svg",
1091
- "aria-hidden": "true",
1092
- focusable: "false"
1093
- }, /*#__PURE__*/React.createElement("path", {
1094
- d: "M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.95v5.66H9.34V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.45v6.29zM5.34 7.43a2.07 2.07 0 1 1 0-4.14 2.07 2.07 0 0 1 0 4.14zM7.12 20.45H3.55V9h3.57v11.45z"
1095
- })),
1096
- twitter: /*#__PURE__*/React.createElement("svg", {
1097
- viewBox: "0 0 24 24",
1098
- xmlns: "http://www.w3.org/2000/svg",
1099
- "aria-hidden": "true",
1100
- focusable: "false"
1101
- }, /*#__PURE__*/React.createElement("path", {
1102
- d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
1103
- })),
1104
- facebook: /*#__PURE__*/React.createElement("svg", {
1105
- viewBox: "0 0 24 24",
1106
- xmlns: "http://www.w3.org/2000/svg",
1107
- "aria-hidden": "true",
1108
- focusable: "false"
1109
- }, /*#__PURE__*/React.createElement("path", {
1110
- d: "M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.874v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"
1111
- })),
1112
- instagram: /*#__PURE__*/React.createElement("svg", {
1113
- viewBox: "0 0 24 24",
1114
- xmlns: "http://www.w3.org/2000/svg",
1115
- "aria-hidden": "true",
1116
- focusable: "false"
1117
- }, /*#__PURE__*/React.createElement("path", {
1118
- d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z"
1119
- })),
1120
- youtube: /*#__PURE__*/React.createElement("svg", {
1121
- viewBox: "0 0 24 24",
1122
- xmlns: "http://www.w3.org/2000/svg",
1123
- "aria-hidden": "true",
1124
- focusable: "false"
1125
- }, /*#__PURE__*/React.createElement("path", {
1126
- d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
1127
- }))
1128
- };
1129
- var LsgSocialMediaIcons = function (_a) {
1130
- var items = _a.items;
1131
- return /*#__PURE__*/React.createElement("ul", {
1132
- className: "lsg-social-icons",
1133
- role: "list"
1134
- }, items.map(function (item) {
1135
- return /*#__PURE__*/React.createElement("li", {
1136
- key: item.platform,
1137
- className: "lsg-social-icons__item"
1138
- }, /*#__PURE__*/React.createElement("a", {
1139
- href: item.href,
1140
- className: "lsg-social-icons__link",
1141
- "aria-label": item.label,
1142
- target: "_blank",
1143
- rel: "noopener noreferrer"
1144
- }, platformIcons[item.platform]));
1145
- }));
1146
- };
1147
-
1148
- var PhoneIcon = function () {
1149
- return /*#__PURE__*/React.createElement("svg", {
1150
- width: "20",
1151
- height: "20",
1152
- viewBox: "0 0 20 20",
1153
- fill: "none",
1154
- xmlns: "http://www.w3.org/2000/svg",
1155
- "aria-hidden": "true"
1156
- }, /*#__PURE__*/React.createElement("path", {
1157
- d: "M15.833 13.483c-.417-.416-1.25-.833-1.875-1.083-.625-.25-1.042-.167-1.458.208l-.834.833c-.208.209-.5.209-.708.042-.625-.5-1.833-1.583-2.583-2.333-.75-.75-1.75-1.875-2.25-2.583-.167-.208-.125-.5.083-.709l.834-.833c.416-.417.5-.833.25-1.458-.25-.625-.667-1.458-1.084-1.875C8.791 3.25 8.208 3 7.583 3c-.416 0-.833.167-1.125.458L5.625 4.292C4.5 5.417 4.708 7.125 5.333 8.833c.625 1.708 2 3.833 3.625 5.458 1.625 1.625 3.75 3 5.458 3.625 1.709.625 3.417.833 4.542-.292l.833-.833c.292-.292.458-.708.458-1.125 0-.625-.25-1.208-.416-1.583z",
1158
- fill: "currentColor"
1159
- }));
1160
- };
1161
- var FaxIcon = function () {
1162
- return /*#__PURE__*/React.createElement("svg", {
1163
- width: "20",
1164
- height: "20",
1165
- viewBox: "0 0 20 20",
1166
- fill: "none",
1167
- xmlns: "http://www.w3.org/2000/svg",
1168
- "aria-hidden": "true"
1169
- }, /*#__PURE__*/React.createElement("path", {
1170
- d: "M16 6h-1V2H5v4H4c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h1v2h10v-2h1c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM7 4h6v2H7V4zm6 12H7v-4h6v4zm3-5H4V8h12v3z",
1171
- fill: "currentColor"
1172
- }));
1173
- };
1174
- var MailIcon = function () {
1175
- return /*#__PURE__*/React.createElement("svg", {
1176
- width: "24",
1177
- height: "20",
1178
- viewBox: "0 0 24 20",
1179
- fill: "none",
1180
- xmlns: "http://www.w3.org/2000/svg",
1181
- "aria-hidden": "true"
1182
- }, /*#__PURE__*/React.createElement("path", {
1183
- d: "M20 0H4C2.9 0 2 .9 2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V2l8 5 8-5v2z",
1184
- fill: "currentColor"
1185
- }));
1186
- };
1187
- var LocationIcon = function () {
1188
- return /*#__PURE__*/React.createElement("svg", {
1189
- width: "18",
1190
- height: "21",
1191
- viewBox: "0 0 18 24",
1192
- fill: "none",
1193
- xmlns: "http://www.w3.org/2000/svg",
1194
- "aria-hidden": "true"
1195
- }, /*#__PURE__*/React.createElement("path", {
1196
- d: "M9 0C5.13 0 2 3.13 2 7c0 5.25 7 13 7 13s7-7.75 7-13C16 3.13 12.87 0 9 0zm0 9.5C7.62 9.5 6.5 8.38 6.5 7S7.62 4.5 9 4.5 11.5 5.62 11.5 7 10.38 9.5 9 9.5z",
1197
- fill: "currentColor"
1198
- }));
1199
- };
1200
- var AiBadge = function () {
1201
- return /*#__PURE__*/React.createElement("span", {
1202
- className: "lsg-footer__ai-badge"
1203
- }, /*#__PURE__*/React.createElement("svg", {
1204
- width: "16",
1205
- height: "16",
1206
- viewBox: "0 0 24 24",
1207
- fill: "none",
1208
- xmlns: "http://www.w3.org/2000/svg",
1209
- "aria-hidden": "true"
1210
- }, /*#__PURE__*/React.createElement("circle", {
1211
- cx: "12",
1212
- cy: "12",
1213
- r: "10",
1214
- stroke: "currentColor",
1215
- strokeWidth: "1.5"
1216
- }), /*#__PURE__*/React.createElement("path", {
1217
- d: "M2 12h20M12 2a15.3 15.3 0 0 1 0 20M12 2a15.3 15.3 0 0 0 0 20",
1218
- stroke: "currentColor",
1219
- strokeWidth: "1.5"
1220
- })), "This Website Is Translated With AI");
1221
- };
1222
- var SocialIcon = function (_a) {
1223
- var _b;
1224
- var platform = _a.platform;
1225
- var icons = {
1226
- facebook: /*#__PURE__*/React.createElement("svg", {
1227
- width: "20",
1228
- height: "20",
1229
- viewBox: "0 0 24 24",
1230
- fill: "currentColor",
1231
- xmlns: "http://www.w3.org/2000/svg",
1232
- "aria-hidden": "true"
1233
- }, /*#__PURE__*/React.createElement("path", {
1234
- d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"
1235
- })),
1236
- twitter: /*#__PURE__*/React.createElement("svg", {
1237
- width: "20",
1238
- height: "20",
1239
- viewBox: "0 0 24 24",
1240
- fill: "currentColor",
1241
- xmlns: "http://www.w3.org/2000/svg",
1242
- "aria-hidden": "true"
1243
- }, /*#__PURE__*/React.createElement("path", {
1244
- d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
1245
- })),
1246
- linkedin: /*#__PURE__*/React.createElement("svg", {
1247
- width: "20",
1248
- height: "20",
1249
- viewBox: "0 0 24 24",
1250
- fill: "currentColor",
1251
- xmlns: "http://www.w3.org/2000/svg",
1252
- "aria-hidden": "true"
1253
- }, /*#__PURE__*/React.createElement("path", {
1254
- d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6zM2 9h4v12H2z"
1255
- }), /*#__PURE__*/React.createElement("circle", {
1256
- cx: "4",
1257
- cy: "4",
1258
- r: "2"
1259
- })),
1260
- youtube: /*#__PURE__*/React.createElement("svg", {
1261
- width: "20",
1262
- height: "20",
1263
- viewBox: "0 0 24 24",
1264
- fill: "currentColor",
1265
- xmlns: "http://www.w3.org/2000/svg",
1266
- "aria-hidden": "true"
1267
- }, /*#__PURE__*/React.createElement("path", {
1268
- d: "M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58A2.78 2.78 0 0 0 3.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.4a2.78 2.78 0 0 0 1.95-1.95A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"
1269
- })),
1270
- instagram: /*#__PURE__*/React.createElement("svg", {
1271
- width: "20",
1272
- height: "20",
1273
- viewBox: "0 0 24 24",
1274
- fill: "none",
1275
- stroke: "currentColor",
1276
- strokeWidth: "2",
1277
- xmlns: "http://www.w3.org/2000/svg",
1278
- "aria-hidden": "true"
1279
- }, /*#__PURE__*/React.createElement("rect", {
1280
- x: "2",
1281
- y: "2",
1282
- width: "20",
1283
- height: "20",
1284
- rx: "5",
1285
- ry: "5"
1286
- }), /*#__PURE__*/React.createElement("circle", {
1287
- cx: "12",
1288
- cy: "12",
1289
- r: "4"
1290
- }), /*#__PURE__*/React.createElement("circle", {
1291
- cx: "17.5",
1292
- cy: "6.5",
1293
- r: "0.5",
1294
- fill: "currentColor"
1295
- }))
1296
- };
1297
- return /*#__PURE__*/React.createElement(React.Fragment, null, (_b = icons[platform]) !== null && _b !== void 0 ? _b : null);
1298
- };
1299
- var SocialIconsRow = function (_a) {
1300
- var links = _a.links;
1301
- return /*#__PURE__*/React.createElement("div", {
1302
- className: "lsg-footer__bottom-social"
1303
- }, links.map(function (l) {
1304
- return /*#__PURE__*/React.createElement("a", {
1305
- key: l.platform,
1306
- href: l.href,
1307
- "aria-label": l.platform,
1308
- style: {
1309
- color: "inherit",
1310
- display: "inline-flex",
1311
- alignItems: "center",
1312
- opacity: 0.8
1313
- }
1314
- }, /*#__PURE__*/React.createElement(SocialIcon, {
1315
- platform: l.platform
1316
- }));
1317
- }));
1318
- };
1319
- var LsgFooter = function (_a) {
1320
- var _b, _c, _d, _e;
1321
- var _f = _a.variant,
1322
- variant = _f === void 0 ? "simple" : _f,
1323
- _g = _a.simpleTwoRow,
1324
- simpleTwoRow = _g === void 0 ? false : _g,
1325
- _h = _a.brandLine,
1326
- brandLine = _h === void 0 ? "Part of Atlas Copco Group" : _h,
1327
- _j = _a.complexColumns,
1328
- complexColumns = _j === void 0 ? "2col" : _j,
1329
- _k = _a.showAiBadge,
1330
- showAiBadge = _k === void 0 ? false : _k,
1331
- cookieSetting = _a.cookieSetting,
1332
- logo = _a.logo,
1333
- _l = _a.navItems,
1334
- navItems = _l === void 0 ? [] : _l,
1335
- contact = _a.contact,
1336
- _m = _a.quickLinks,
1337
- quickLinks = _m === void 0 ? [] : _m,
1338
- copyright = _a.copyright,
1339
- colHeadings = _a.colHeadings,
1340
- socialLinks = _a.socialLinks,
1341
- _o = _a.socialPosition,
1342
- socialPosition = _o === void 0 ? "body" : _o,
1343
- _p = _a.className,
1344
- className = _p === void 0 ? "" : _p;
1345
- var year = new Date().getFullYear();
1346
- var copyrightText = copyright !== null && copyright !== void 0 ? copyright : "\u00A9 ".concat(year, " Brand - Part of Atlas Copco Group");
1347
- // ── Simple footer ──────────────────────────────────────────────────────────
1348
- if (variant === "simple") {
1349
- if (simpleTwoRow) {
1350
- return /*#__PURE__*/React.createElement("footer", {
1351
- className: "lsg-footer lsg-footer--simple lsg-footer--simple-tworow".concat(className ? " ".concat(className) : "")
1352
- }, /*#__PURE__*/React.createElement("div", {
1353
- className: "lsg-footer__simple-top"
1354
- }, /*#__PURE__*/React.createElement("span", {
1355
- className: "lsg-footer__brand-line"
1356
- }, brandLine), navItems.length > 0 && /*#__PURE__*/React.createElement("nav", {
1357
- className: "lsg-footer__simple-nav",
1358
- "aria-label": "Footer navigation"
1359
- }, navItems.map(function (item, i) {
1360
- return /*#__PURE__*/React.createElement(React.Fragment, {
1361
- key: item.href
1362
- }, i > 0 && /*#__PURE__*/React.createElement("span", {
1363
- className: "lsg-footer__pipe",
1364
- "aria-hidden": "true"
1365
- }, "|"), /*#__PURE__*/React.createElement("a", {
1366
- href: item.href,
1367
- className: "lsg-footer__simple-nav-item"
1368
- }, item.label));
1369
- }))), /*#__PURE__*/React.createElement("div", {
1370
- className: "lsg-footer__simple-bottom"
1371
- }, /*#__PURE__*/React.createElement("div", {
1372
- className: "lsg-footer__simple-bottom-left"
1373
- }, cookieSetting && /*#__PURE__*/React.createElement("a", {
1374
- href: "#",
1375
- className: "lsg-footer__cookie-link"
1376
- }, cookieSetting), /*#__PURE__*/React.createElement("p", {
1377
- className: "lsg-footer__copyright"
1378
- }, copyrightText)), showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null)));
1379
- }
1380
- return /*#__PURE__*/React.createElement("footer", {
1381
- className: "lsg-footer lsg-footer--simple".concat(className ? " ".concat(className) : "")
1382
- }, /*#__PURE__*/React.createElement("div", {
1383
- className: "lsg-footer__simple-inner"
1384
- }, /*#__PURE__*/React.createElement("p", {
1385
- className: "lsg-footer__copyright"
1386
- }, copyrightText), navItems.length > 0 && /*#__PURE__*/React.createElement("nav", {
1387
- className: "lsg-footer__simple-nav",
1388
- "aria-label": "Footer navigation"
1389
- }, navItems.map(function (item, i) {
1390
- return /*#__PURE__*/React.createElement(React.Fragment, {
1391
- key: item.href
1392
- }, i > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
1393
- className: "lsg-footer__pipe",
1394
- "aria-hidden": "true"
1395
- }, "|"), /*#__PURE__*/React.createElement("hr", {
1396
- className: "lsg-footer__mobile-divider",
1397
- "aria-hidden": "true"
1398
- })), /*#__PURE__*/React.createElement("a", {
1399
- href: item.href,
1400
- className: "lsg-footer__simple-nav-item"
1401
- }, item.label));
1402
- }))));
629
+ return self;
630
+ }
631
+ function Limit(min = 0, max = 0) {
632
+ const length = mathAbs(min - max);
633
+ function reachedMin(n) {
634
+ return n < min;
1403
635
  }
1404
- // ── Complex footer ─────────────────────────────────────────────────────────
1405
- var is3col = complexColumns === "3col";
1406
- var headings = {
1407
- contact: (_b = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.contact) !== null && _b !== void 0 ? _b : "CONTACT",
1408
- quickLinks: (_c = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.quickLinks) !== null && _c !== void 0 ? _c : is3col ? "Quicklinks" : "QUICK LINKS",
1409
- about: (_d = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.about) !== null && _d !== void 0 ? _d : "About brand",
1410
- contactAlt: (_e = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.contactAlt) !== null && _e !== void 0 ? _e : "Contact"
636
+ function reachedMax(n) {
637
+ return n > max;
638
+ }
639
+ function reachedAny(n) {
640
+ return reachedMin(n) || reachedMax(n);
641
+ }
642
+ function constrain(n) {
643
+ if (!reachedAny(n)) return n;
644
+ return reachedMin(n) ? min : max;
645
+ }
646
+ function removeOffset(n) {
647
+ if (!length) return n;
648
+ return n - length * Math.ceil((n - max) / length);
649
+ }
650
+ const self = {
651
+ length,
652
+ max,
653
+ min,
654
+ constrain,
655
+ reachedAny,
656
+ reachedMax,
657
+ reachedMin,
658
+ removeOffset
1411
659
  };
1412
- var bottomBar = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("hr", {
1413
- className: "lsg-footer__bottom-divider"
1414
- }), /*#__PURE__*/React.createElement("div", {
1415
- className: "lsg-footer__bottom"
1416
- }, /*#__PURE__*/React.createElement("div", {
1417
- className: "lsg-footer__bottom-left"
1418
- }, cookieSetting && /*#__PURE__*/React.createElement("a", {
1419
- href: "#",
1420
- className: "lsg-footer__cookie-link"
1421
- }, cookieSetting), /*#__PURE__*/React.createElement("p", {
1422
- className: "lsg-footer__copyright"
1423
- }, copyrightText), is3col && showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null)), !is3col && showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null), socialPosition === "bottom-bar" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement(SocialIconsRow, {
1424
- links: socialLinks
1425
- })));
1426
- if (is3col) {
1427
- return /*#__PURE__*/React.createElement("footer", {
1428
- className: "lsg-footer lsg-footer--complex".concat(className ? " ".concat(className) : "")
1429
- }, /*#__PURE__*/React.createElement("div", {
1430
- className: "lsg-footer__complex-inner"
1431
- }, logo && /*#__PURE__*/React.createElement("div", {
1432
- className: "lsg-footer__logo-col"
1433
- }, /*#__PURE__*/React.createElement(LsgLogo, logo), brandLine && /*#__PURE__*/React.createElement("span", {
1434
- className: "lsg-footer__brand-line"
1435
- }, brandLine)), /*#__PURE__*/React.createElement("div", {
1436
- className: "lsg-footer__content-cols lsg-footer__content-cols--3col"
1437
- }, /*#__PURE__*/React.createElement("div", {
1438
- className: "lsg-footer__about-col"
1439
- }, /*#__PURE__*/React.createElement("h3", {
1440
- className: "lsg-footer__col-heading"
1441
- }, headings.about), (contact === null || contact === void 0 ? void 0 : contact.address) && /*#__PURE__*/React.createElement("div", {
1442
- className: "lsg-footer__address"
1443
- }, /*#__PURE__*/React.createElement(LocationIcon, null), /*#__PURE__*/React.createElement("p", null, contact.address))), /*#__PURE__*/React.createElement("div", {
1444
- className: "lsg-footer__contact-col"
1445
- }, /*#__PURE__*/React.createElement("h3", {
1446
- className: "lsg-footer__col-heading"
1447
- }, headings.contactAlt), /*#__PURE__*/React.createElement("div", {
1448
- className: "lsg-footer__contact-items"
1449
- }, (contact === null || contact === void 0 ? void 0 : contact.phone) && /*#__PURE__*/React.createElement("div", {
1450
- className: "lsg-footer__contact-item"
1451
- }, /*#__PURE__*/React.createElement(PhoneIcon, null), /*#__PURE__*/React.createElement("span", null, contact.phone)), (contact === null || contact === void 0 ? void 0 : contact.fax) && /*#__PURE__*/React.createElement("div", {
1452
- className: "lsg-footer__contact-item"
1453
- }, /*#__PURE__*/React.createElement(FaxIcon, null), /*#__PURE__*/React.createElement("span", null, contact.fax)), (contact === null || contact === void 0 ? void 0 : contact.email) && /*#__PURE__*/React.createElement("div", {
1454
- className: "lsg-footer__contact-item"
1455
- }, /*#__PURE__*/React.createElement(MailIcon, null), /*#__PURE__*/React.createElement("a", {
1456
- href: "mailto:".concat(contact.email)
1457
- }, contact.email)))), quickLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
1458
- className: "lsg-footer__quicklinks-col"
1459
- }, /*#__PURE__*/React.createElement("h3", {
1460
- className: "lsg-footer__col-heading"
1461
- }, headings.quickLinks), /*#__PURE__*/React.createElement("ul", {
1462
- className: "lsg-footer__quicklinks-list"
1463
- }, quickLinks.map(function (link, i) {
1464
- var _a;
1465
- return /*#__PURE__*/React.createElement("li", {
1466
- key: (_a = link.href) !== null && _a !== void 0 ? _a : i,
1467
- className: "lsg-footer__quicklink-item"
1468
- }, /*#__PURE__*/React.createElement("a", {
1469
- href: link.href,
1470
- className: "lsg-footer__quicklink"
1471
- }, link.label), /*#__PURE__*/React.createElement("hr", {
1472
- className: "lsg-footer__divider"
1473
- }));
1474
- })), socialPosition === "body" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
1475
- className: "lsg-footer__body-social"
1476
- }, /*#__PURE__*/React.createElement(SocialIconsRow, {
1477
- links: socialLinks
1478
- }))))), bottomBar);
1479
- }
1480
- return /*#__PURE__*/React.createElement("footer", {
1481
- className: "lsg-footer lsg-footer--complex".concat(className ? " ".concat(className) : "")
1482
- }, /*#__PURE__*/React.createElement("div", {
1483
- className: "lsg-footer__complex-inner"
1484
- }, logo && /*#__PURE__*/React.createElement("div", {
1485
- className: "lsg-footer__logo-col"
1486
- }, /*#__PURE__*/React.createElement(LsgLogo, logo), brandLine && /*#__PURE__*/React.createElement("span", {
1487
- className: "lsg-footer__brand-line"
1488
- }, brandLine)), /*#__PURE__*/React.createElement("div", {
1489
- className: "lsg-footer__content-cols"
1490
- }, contact && /*#__PURE__*/React.createElement("div", {
1491
- className: "lsg-footer__contact-col"
1492
- }, /*#__PURE__*/React.createElement("h3", {
1493
- className: "lsg-footer__col-heading"
1494
- }, headings.contact), contact.address && /*#__PURE__*/React.createElement("div", {
1495
- className: "lsg-footer__address"
1496
- }, /*#__PURE__*/React.createElement(LocationIcon, null), /*#__PURE__*/React.createElement("p", null, contact.address)), /*#__PURE__*/React.createElement("hr", {
1497
- className: "lsg-footer__divider"
1498
- }), /*#__PURE__*/React.createElement("div", {
1499
- className: "lsg-footer__contact-items"
1500
- }, contact.phone && /*#__PURE__*/React.createElement("div", {
1501
- className: "lsg-footer__contact-item"
1502
- }, /*#__PURE__*/React.createElement(PhoneIcon, null), /*#__PURE__*/React.createElement("span", null, contact.phone)), contact.fax && /*#__PURE__*/React.createElement("div", {
1503
- className: "lsg-footer__contact-item"
1504
- }, /*#__PURE__*/React.createElement(FaxIcon, null), /*#__PURE__*/React.createElement("span", null, contact.fax)), contact.email && /*#__PURE__*/React.createElement("div", {
1505
- className: "lsg-footer__contact-item"
1506
- }, /*#__PURE__*/React.createElement(MailIcon, null), /*#__PURE__*/React.createElement("a", {
1507
- href: "mailto:".concat(contact.email)
1508
- }, contact.email)))), quickLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
1509
- className: "lsg-footer__quicklinks-col"
1510
- }, /*#__PURE__*/React.createElement("h3", {
1511
- className: "lsg-footer__col-heading"
1512
- }, headings.quickLinks), /*#__PURE__*/React.createElement("ul", {
1513
- className: "lsg-footer__quicklinks-list"
1514
- }, quickLinks.map(function (link, i) {
1515
- var _a;
1516
- return /*#__PURE__*/React.createElement("li", {
1517
- key: (_a = link.href) !== null && _a !== void 0 ? _a : i,
1518
- className: "lsg-footer__quicklink-item"
1519
- }, /*#__PURE__*/React.createElement("a", {
1520
- href: link.href,
1521
- className: "lsg-footer__quicklink"
1522
- }, link.label), /*#__PURE__*/React.createElement("hr", {
1523
- className: "lsg-footer__divider"
1524
- }));
1525
- })), socialPosition === "body" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
1526
- className: "lsg-footer__body-social"
1527
- }, /*#__PURE__*/React.createElement(SocialIconsRow, {
1528
- links: socialLinks
1529
- }))))), bottomBar);
1530
- };
1531
-
1532
- function isNumber$1(subject) {
1533
- return typeof subject === 'number';
1534
- }
1535
- function isString(subject) {
1536
- return typeof subject === 'string';
1537
- }
1538
- function isBoolean(subject) {
1539
- return typeof subject === 'boolean';
1540
- }
1541
- function isObject(subject) {
1542
- return Object.prototype.toString.call(subject) === '[object Object]';
1543
- }
1544
- function mathAbs(n) {
1545
- return Math.abs(n);
1546
- }
1547
- function mathSign(n) {
1548
- return Math.sign(n);
1549
- }
1550
- function deltaAbs(valueB, valueA) {
1551
- return mathAbs(valueB - valueA);
1552
- }
1553
- function factorAbs(valueB, valueA) {
1554
- if (valueB === 0 || valueA === 0) return 0;
1555
- if (mathAbs(valueB) <= mathAbs(valueA)) return 0;
1556
- const diff = deltaAbs(mathAbs(valueB), mathAbs(valueA));
1557
- return mathAbs(diff / valueB);
1558
- }
1559
- function roundToTwoDecimals(num) {
1560
- return Math.round(num * 100) / 100;
1561
- }
1562
- function arrayKeys(array) {
1563
- return objectKeys(array).map(Number);
1564
- }
1565
- function arrayLast(array) {
1566
- return array[arrayLastIndex(array)];
1567
- }
1568
- function arrayLastIndex(array) {
1569
- return Math.max(0, array.length - 1);
1570
- }
1571
- function arrayIsLastIndex(array, index) {
1572
- return index === arrayLastIndex(array);
1573
- }
1574
- function arrayFromNumber(n, startAt = 0) {
1575
- return Array.from(Array(n), (_, i) => startAt + i);
1576
- }
1577
- function objectKeys(object) {
1578
- return Object.keys(object);
1579
- }
1580
- function objectsMergeDeep(objectA, objectB) {
1581
- return [objectA, objectB].reduce((mergedObjects, currentObject) => {
1582
- objectKeys(currentObject).forEach(key => {
1583
- const valueA = mergedObjects[key];
1584
- const valueB = currentObject[key];
1585
- const areObjects = isObject(valueA) && isObject(valueB);
1586
- mergedObjects[key] = areObjects ? objectsMergeDeep(valueA, valueB) : valueB;
1587
- });
1588
- return mergedObjects;
1589
- }, {});
1590
- }
1591
- function isMouseEvent(evt, ownerWindow) {
1592
- return typeof ownerWindow.MouseEvent !== 'undefined' && evt instanceof ownerWindow.MouseEvent;
660
+ return self;
1593
661
  }
1594
- function Alignment(align, viewSize) {
1595
- const predefined = {
1596
- start,
1597
- center,
1598
- end
1599
- };
1600
- function start() {
1601
- return 0;
662
+ function Counter(max, start, loop) {
663
+ const {
664
+ constrain
665
+ } = Limit(0, max);
666
+ const loopEnd = max + 1;
667
+ let counter = withinLimit(start);
668
+ function withinLimit(n) {
669
+ return !loop ? constrain(n) : mathAbs((loopEnd + n) % loopEnd);
1602
670
  }
1603
- function center(n) {
1604
- return end(n) / 2;
671
+ function get() {
672
+ return counter;
1605
673
  }
1606
- function end(n) {
1607
- return viewSize - n;
674
+ function set(n) {
675
+ counter = withinLimit(n);
676
+ return self;
1608
677
  }
1609
- function measure(n, index) {
1610
- if (isString(align)) return predefined[align](n);
1611
- return align(viewSize, n, index);
678
+ function add(n) {
679
+ return clone().set(get() + n);
680
+ }
681
+ function clone() {
682
+ return Counter(max, get(), loop);
1612
683
  }
1613
684
  const self = {
1614
- measure
685
+ get,
686
+ set,
687
+ add,
688
+ clone
1615
689
  };
1616
690
  return self;
1617
691
  }
1618
- function EventStore() {
1619
- let listeners = [];
1620
- function add(node, type, handler, options = {
1621
- passive: true
1622
- }) {
1623
- let removeListener;
1624
- if ('addEventListener' in node) {
1625
- node.addEventListener(type, handler, options);
1626
- removeListener = () => node.removeEventListener(type, handler, options);
1627
- } else {
1628
- const legacyMediaQueryList = node;
1629
- legacyMediaQueryList.addListener(handler);
1630
- removeListener = () => legacyMediaQueryList.removeListener(handler);
692
+ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
693
+ const {
694
+ cross: crossAxis,
695
+ direction
696
+ } = axis;
697
+ const focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];
698
+ const nonPassiveEvent = {
699
+ passive: false
700
+ };
701
+ const initEvents = EventStore();
702
+ const dragEvents = EventStore();
703
+ const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
704
+ const snapForceBoost = {
705
+ mouse: 300,
706
+ touch: 400
707
+ };
708
+ const freeForceBoost = {
709
+ mouse: 500,
710
+ touch: 600
711
+ };
712
+ const baseSpeed = dragFree ? 43 : 25;
713
+ let isMoving = false;
714
+ let startScroll = 0;
715
+ let startCross = 0;
716
+ let pointerIsDown = false;
717
+ let preventScroll = false;
718
+ let preventClick = false;
719
+ let isMouse = false;
720
+ function init(emblaApi) {
721
+ if (!watchDrag) return;
722
+ function downIfAllowed(evt) {
723
+ if (isBoolean(watchDrag) || watchDrag(emblaApi, evt)) down(evt);
1631
724
  }
1632
- listeners.push(removeListener);
1633
- return self;
725
+ const node = rootNode;
726
+ initEvents.add(node, 'dragstart', evt => evt.preventDefault(), nonPassiveEvent).add(node, 'touchmove', () => undefined, nonPassiveEvent).add(node, 'touchend', () => undefined).add(node, 'touchstart', downIfAllowed).add(node, 'mousedown', downIfAllowed).add(node, 'touchcancel', up).add(node, 'contextmenu', up).add(node, 'click', click, true);
1634
727
  }
1635
- function clear() {
1636
- listeners = listeners.filter(remove => remove());
1637
- }
1638
- const self = {
1639
- add,
1640
- clear
1641
- };
1642
- return self;
1643
- }
1644
- function Animations(ownerDocument, ownerWindow, update, render) {
1645
- const documentVisibleHandler = EventStore();
1646
- const fixedTimeStep = 1000 / 60;
1647
- let lastTimeStamp = null;
1648
- let accumulatedTime = 0;
1649
- let animationId = 0;
1650
- function init() {
1651
- documentVisibleHandler.add(ownerDocument, 'visibilitychange', () => {
1652
- if (ownerDocument.hidden) reset();
1653
- });
1654
- }
1655
- function destroy() {
1656
- stop();
1657
- documentVisibleHandler.clear();
1658
- }
1659
- function animate(timeStamp) {
1660
- if (!animationId) return;
1661
- if (!lastTimeStamp) {
1662
- lastTimeStamp = timeStamp;
1663
- update();
1664
- update();
1665
- }
1666
- const timeElapsed = timeStamp - lastTimeStamp;
1667
- lastTimeStamp = timeStamp;
1668
- accumulatedTime += timeElapsed;
1669
- while (accumulatedTime >= fixedTimeStep) {
1670
- update();
1671
- accumulatedTime -= fixedTimeStep;
1672
- }
1673
- const alpha = accumulatedTime / fixedTimeStep;
1674
- render(alpha);
1675
- if (animationId) {
1676
- animationId = ownerWindow.requestAnimationFrame(animate);
1677
- }
1678
- }
1679
- function start() {
1680
- if (animationId) return;
1681
- animationId = ownerWindow.requestAnimationFrame(animate);
1682
- }
1683
- function stop() {
1684
- ownerWindow.cancelAnimationFrame(animationId);
1685
- lastTimeStamp = null;
1686
- accumulatedTime = 0;
1687
- animationId = 0;
1688
- }
1689
- function reset() {
1690
- lastTimeStamp = null;
1691
- accumulatedTime = 0;
1692
- }
1693
- const self = {
1694
- init,
1695
- destroy,
1696
- start,
1697
- stop,
1698
- update,
1699
- render
1700
- };
1701
- return self;
1702
- }
1703
- function Axis(axis, contentDirection) {
1704
- const isRightToLeft = contentDirection === 'rtl';
1705
- const isVertical = axis === 'y';
1706
- const scroll = isVertical ? 'y' : 'x';
1707
- const cross = isVertical ? 'x' : 'y';
1708
- const sign = !isVertical && isRightToLeft ? -1 : 1;
1709
- const startEdge = getStartEdge();
1710
- const endEdge = getEndEdge();
1711
- function measureSize(nodeRect) {
1712
- const {
1713
- height,
1714
- width
1715
- } = nodeRect;
1716
- return isVertical ? height : width;
1717
- }
1718
- function getStartEdge() {
1719
- if (isVertical) return 'top';
1720
- return isRightToLeft ? 'right' : 'left';
1721
- }
1722
- function getEndEdge() {
1723
- if (isVertical) return 'bottom';
1724
- return isRightToLeft ? 'left' : 'right';
1725
- }
1726
- function direction(n) {
1727
- return n * sign;
1728
- }
1729
- const self = {
1730
- scroll,
1731
- cross,
1732
- startEdge,
1733
- endEdge,
1734
- measureSize,
1735
- direction
1736
- };
1737
- return self;
1738
- }
1739
- function Limit(min = 0, max = 0) {
1740
- const length = mathAbs(min - max);
1741
- function reachedMin(n) {
1742
- return n < min;
1743
- }
1744
- function reachedMax(n) {
1745
- return n > max;
1746
- }
1747
- function reachedAny(n) {
1748
- return reachedMin(n) || reachedMax(n);
1749
- }
1750
- function constrain(n) {
1751
- if (!reachedAny(n)) return n;
1752
- return reachedMin(n) ? min : max;
1753
- }
1754
- function removeOffset(n) {
1755
- if (!length) return n;
1756
- return n - length * Math.ceil((n - max) / length);
1757
- }
1758
- const self = {
1759
- length,
1760
- max,
1761
- min,
1762
- constrain,
1763
- reachedAny,
1764
- reachedMax,
1765
- reachedMin,
1766
- removeOffset
1767
- };
1768
- return self;
1769
- }
1770
- function Counter(max, start, loop) {
1771
- const {
1772
- constrain
1773
- } = Limit(0, max);
1774
- const loopEnd = max + 1;
1775
- let counter = withinLimit(start);
1776
- function withinLimit(n) {
1777
- return !loop ? constrain(n) : mathAbs((loopEnd + n) % loopEnd);
1778
- }
1779
- function get() {
1780
- return counter;
1781
- }
1782
- function set(n) {
1783
- counter = withinLimit(n);
1784
- return self;
1785
- }
1786
- function add(n) {
1787
- return clone().set(get() + n);
1788
- }
1789
- function clone() {
1790
- return Counter(max, get(), loop);
1791
- }
1792
- const self = {
1793
- get,
1794
- set,
1795
- add,
1796
- clone
1797
- };
1798
- return self;
1799
- }
1800
- function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
1801
- const {
1802
- cross: crossAxis,
1803
- direction
1804
- } = axis;
1805
- const focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];
1806
- const nonPassiveEvent = {
1807
- passive: false
1808
- };
1809
- const initEvents = EventStore();
1810
- const dragEvents = EventStore();
1811
- const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
1812
- const snapForceBoost = {
1813
- mouse: 300,
1814
- touch: 400
1815
- };
1816
- const freeForceBoost = {
1817
- mouse: 500,
1818
- touch: 600
1819
- };
1820
- const baseSpeed = dragFree ? 43 : 25;
1821
- let isMoving = false;
1822
- let startScroll = 0;
1823
- let startCross = 0;
1824
- let pointerIsDown = false;
1825
- let preventScroll = false;
1826
- let preventClick = false;
1827
- let isMouse = false;
1828
- function init(emblaApi) {
1829
- if (!watchDrag) return;
1830
- function downIfAllowed(evt) {
1831
- if (isBoolean(watchDrag) || watchDrag(emblaApi, evt)) down(evt);
1832
- }
1833
- const node = rootNode;
1834
- initEvents.add(node, 'dragstart', evt => evt.preventDefault(), nonPassiveEvent).add(node, 'touchmove', () => undefined, nonPassiveEvent).add(node, 'touchend', () => undefined).add(node, 'touchstart', downIfAllowed).add(node, 'mousedown', downIfAllowed).add(node, 'touchcancel', up).add(node, 'contextmenu', up).add(node, 'click', click, true);
1835
- }
1836
- function destroy() {
1837
- initEvents.clear();
1838
- dragEvents.clear();
728
+ function destroy() {
729
+ initEvents.clear();
730
+ dragEvents.clear();
1839
731
  }
1840
732
  function addDragEvents() {
1841
733
  const node = isMouse ? ownerDocument : rootNode;
@@ -2920,247 +1812,1875 @@ function EventHandler() {
2920
1812
  on,
2921
1813
  clear
2922
1814
  };
2923
- return self;
2924
- }
2925
- const defaultOptions = {
2926
- align: 'center',
2927
- axis: 'x',
2928
- container: null,
2929
- slides: null,
2930
- containScroll: 'trimSnaps',
2931
- direction: 'ltr',
2932
- slidesToScroll: 1,
2933
- inViewThreshold: 0,
2934
- breakpoints: {},
2935
- dragFree: false,
2936
- dragThreshold: 10,
2937
- loop: false,
2938
- skipSnaps: false,
2939
- duration: 25,
2940
- startIndex: 0,
2941
- active: true,
2942
- watchDrag: true,
2943
- watchResize: true,
2944
- watchSlides: true,
2945
- watchFocus: true
1815
+ return self;
1816
+ }
1817
+ const defaultOptions = {
1818
+ align: 'center',
1819
+ axis: 'x',
1820
+ container: null,
1821
+ slides: null,
1822
+ containScroll: 'trimSnaps',
1823
+ direction: 'ltr',
1824
+ slidesToScroll: 1,
1825
+ inViewThreshold: 0,
1826
+ breakpoints: {},
1827
+ dragFree: false,
1828
+ dragThreshold: 10,
1829
+ loop: false,
1830
+ skipSnaps: false,
1831
+ duration: 25,
1832
+ startIndex: 0,
1833
+ active: true,
1834
+ watchDrag: true,
1835
+ watchResize: true,
1836
+ watchSlides: true,
1837
+ watchFocus: true
1838
+ };
1839
+ function OptionsHandler(ownerWindow) {
1840
+ function mergeOptions(optionsA, optionsB) {
1841
+ return objectsMergeDeep(optionsA, optionsB || {});
1842
+ }
1843
+ function optionsAtMedia(options) {
1844
+ const optionsAtMedia = options.breakpoints || {};
1845
+ const matchedMediaOptions = objectKeys(optionsAtMedia).filter(media => ownerWindow.matchMedia(media).matches).map(media => optionsAtMedia[media]).reduce((a, mediaOption) => mergeOptions(a, mediaOption), {});
1846
+ return mergeOptions(options, matchedMediaOptions);
1847
+ }
1848
+ function optionsMediaQueries(optionsList) {
1849
+ return optionsList.map(options => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
1850
+ }
1851
+ const self = {
1852
+ mergeOptions,
1853
+ optionsAtMedia,
1854
+ optionsMediaQueries
1855
+ };
1856
+ return self;
1857
+ }
1858
+ function PluginsHandler(optionsHandler) {
1859
+ let activePlugins = [];
1860
+ function init(emblaApi, plugins) {
1861
+ activePlugins = plugins.filter(({
1862
+ options
1863
+ }) => optionsHandler.optionsAtMedia(options).active !== false);
1864
+ activePlugins.forEach(plugin => plugin.init(emblaApi, optionsHandler));
1865
+ return plugins.reduce((map, plugin) => Object.assign(map, {
1866
+ [plugin.name]: plugin
1867
+ }), {});
1868
+ }
1869
+ function destroy() {
1870
+ activePlugins = activePlugins.filter(plugin => plugin.destroy());
1871
+ }
1872
+ const self = {
1873
+ init,
1874
+ destroy
1875
+ };
1876
+ return self;
1877
+ }
1878
+ function EmblaCarousel(root, userOptions, userPlugins) {
1879
+ const ownerDocument = root.ownerDocument;
1880
+ const ownerWindow = ownerDocument.defaultView;
1881
+ const optionsHandler = OptionsHandler(ownerWindow);
1882
+ const pluginsHandler = PluginsHandler(optionsHandler);
1883
+ const mediaHandlers = EventStore();
1884
+ const eventHandler = EventHandler();
1885
+ const {
1886
+ mergeOptions,
1887
+ optionsAtMedia,
1888
+ optionsMediaQueries
1889
+ } = optionsHandler;
1890
+ const {
1891
+ on,
1892
+ off,
1893
+ emit
1894
+ } = eventHandler;
1895
+ const reInit = reActivate;
1896
+ let destroyed = false;
1897
+ let engine;
1898
+ let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
1899
+ let options = mergeOptions(optionsBase);
1900
+ let pluginList = [];
1901
+ let pluginApis;
1902
+ let container;
1903
+ let slides;
1904
+ function storeElements() {
1905
+ const {
1906
+ container: userContainer,
1907
+ slides: userSlides
1908
+ } = options;
1909
+ const customContainer = isString(userContainer) ? root.querySelector(userContainer) : userContainer;
1910
+ container = customContainer || root.children[0];
1911
+ const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
1912
+ slides = [].slice.call(customSlides || container.children);
1913
+ }
1914
+ function createEngine(options) {
1915
+ const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler);
1916
+ if (options.loop && !engine.slideLooper.canLoop()) {
1917
+ const optionsWithoutLoop = Object.assign({}, options, {
1918
+ loop: false
1919
+ });
1920
+ return createEngine(optionsWithoutLoop);
1921
+ }
1922
+ return engine;
1923
+ }
1924
+ function activate(withOptions, withPlugins) {
1925
+ if (destroyed) return;
1926
+ optionsBase = mergeOptions(optionsBase, withOptions);
1927
+ options = optionsAtMedia(optionsBase);
1928
+ pluginList = withPlugins || pluginList;
1929
+ storeElements();
1930
+ engine = createEngine(options);
1931
+ optionsMediaQueries([optionsBase, ...pluginList.map(({
1932
+ options
1933
+ }) => options)]).forEach(query => mediaHandlers.add(query, 'change', reActivate));
1934
+ if (!options.active) return;
1935
+ engine.translate.to(engine.location.get());
1936
+ engine.animation.init();
1937
+ engine.slidesInView.init();
1938
+ engine.slideFocus.init(self);
1939
+ engine.eventHandler.init(self);
1940
+ engine.resizeHandler.init(self);
1941
+ engine.slidesHandler.init(self);
1942
+ if (engine.options.loop) engine.slideLooper.loop();
1943
+ if (container.offsetParent && slides.length) engine.dragHandler.init(self);
1944
+ pluginApis = pluginsHandler.init(self, pluginList);
1945
+ }
1946
+ function reActivate(withOptions, withPlugins) {
1947
+ const startIndex = selectedScrollSnap();
1948
+ deActivate();
1949
+ activate(mergeOptions({
1950
+ startIndex
1951
+ }, withOptions), withPlugins);
1952
+ eventHandler.emit('reInit');
1953
+ }
1954
+ function deActivate() {
1955
+ engine.dragHandler.destroy();
1956
+ engine.eventStore.clear();
1957
+ engine.translate.clear();
1958
+ engine.slideLooper.clear();
1959
+ engine.resizeHandler.destroy();
1960
+ engine.slidesHandler.destroy();
1961
+ engine.slidesInView.destroy();
1962
+ engine.animation.destroy();
1963
+ pluginsHandler.destroy();
1964
+ mediaHandlers.clear();
1965
+ }
1966
+ function destroy() {
1967
+ if (destroyed) return;
1968
+ destroyed = true;
1969
+ mediaHandlers.clear();
1970
+ deActivate();
1971
+ eventHandler.emit('destroy');
1972
+ eventHandler.clear();
1973
+ }
1974
+ function scrollTo(index, jump, direction) {
1975
+ if (!options.active || destroyed) return;
1976
+ engine.scrollBody.useBaseFriction().useDuration(jump === true ? 0 : options.duration);
1977
+ engine.scrollTo.index(index, direction || 0);
1978
+ }
1979
+ function scrollNext(jump) {
1980
+ const next = engine.index.add(1).get();
1981
+ scrollTo(next, jump, -1);
1982
+ }
1983
+ function scrollPrev(jump) {
1984
+ const prev = engine.index.add(-1).get();
1985
+ scrollTo(prev, jump, 1);
1986
+ }
1987
+ function canScrollNext() {
1988
+ const next = engine.index.add(1).get();
1989
+ return next !== selectedScrollSnap();
1990
+ }
1991
+ function canScrollPrev() {
1992
+ const prev = engine.index.add(-1).get();
1993
+ return prev !== selectedScrollSnap();
1994
+ }
1995
+ function scrollSnapList() {
1996
+ return engine.scrollSnapList;
1997
+ }
1998
+ function scrollProgress() {
1999
+ return engine.scrollProgress.get(engine.offsetLocation.get());
2000
+ }
2001
+ function selectedScrollSnap() {
2002
+ return engine.index.get();
2003
+ }
2004
+ function previousScrollSnap() {
2005
+ return engine.indexPrevious.get();
2006
+ }
2007
+ function slidesInView() {
2008
+ return engine.slidesInView.get();
2009
+ }
2010
+ function slidesNotInView() {
2011
+ return engine.slidesInView.get(false);
2012
+ }
2013
+ function plugins() {
2014
+ return pluginApis;
2015
+ }
2016
+ function internalEngine() {
2017
+ return engine;
2018
+ }
2019
+ function rootNode() {
2020
+ return root;
2021
+ }
2022
+ function containerNode() {
2023
+ return container;
2024
+ }
2025
+ function slideNodes() {
2026
+ return slides;
2027
+ }
2028
+ const self = {
2029
+ canScrollNext,
2030
+ canScrollPrev,
2031
+ containerNode,
2032
+ internalEngine,
2033
+ destroy,
2034
+ off,
2035
+ on,
2036
+ emit,
2037
+ plugins,
2038
+ previousScrollSnap,
2039
+ reInit,
2040
+ rootNode,
2041
+ scrollNext,
2042
+ scrollPrev,
2043
+ scrollProgress,
2044
+ scrollSnapList,
2045
+ scrollTo,
2046
+ selectedScrollSnap,
2047
+ slideNodes,
2048
+ slidesInView,
2049
+ slidesNotInView
2050
+ };
2051
+ activate(userOptions, userPlugins);
2052
+ setTimeout(() => eventHandler.emit('init'), 0);
2053
+ return self;
2054
+ }
2055
+ EmblaCarousel.globalOptions = undefined;
2056
+
2057
+ var LsgCarouselController = /** @class */function () {
2058
+ function LsgCarouselController(viewport, elements, options) {
2059
+ if (elements === void 0) {
2060
+ elements = {};
2061
+ }
2062
+ if (options === void 0) {
2063
+ options = {};
2064
+ }
2065
+ var _this = this;
2066
+ var _a, _b, _c, _d;
2067
+ this.embla = null;
2068
+ this.scrollPrev = function () {
2069
+ var _a;
2070
+ (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.scrollPrev();
2071
+ };
2072
+ this.scrollNext = function () {
2073
+ var _a;
2074
+ (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.scrollNext();
2075
+ };
2076
+ this.syncSelectedState = function () {
2077
+ var _a, _b;
2078
+ var selected = (_b = (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.selectedScrollSnap()) !== null && _b !== void 0 ? _b : 0;
2079
+ _this.paginationBtns.forEach(function (button, index) {
2080
+ var active = index === selected;
2081
+ button.classList.toggle("lsg-carousel__dot--active", active);
2082
+ button.setAttribute("aria-current", active ? "true" : "false");
2083
+ });
2084
+ };
2085
+ this.els = elements;
2086
+ this.paginationBtns = elements.paginationBtns ? Array.from(elements.paginationBtns) : [];
2087
+ this.embla = EmblaCarousel(viewport, {
2088
+ align: "start",
2089
+ containScroll: "trimSnaps",
2090
+ direction: (_a = options.direction) !== null && _a !== void 0 ? _a : "ltr",
2091
+ loop: (_b = options.loop) !== null && _b !== void 0 ? _b : true,
2092
+ skipSnaps: false
2093
+ });
2094
+ this.paginationHandlers = this.paginationBtns.map(function (_, index) {
2095
+ return function () {
2096
+ var _a;
2097
+ (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.scrollTo(index);
2098
+ };
2099
+ });
2100
+ (_c = this.els.prevBtn) === null || _c === void 0 ? void 0 : _c.addEventListener("click", this.scrollPrev);
2101
+ (_d = this.els.nextBtn) === null || _d === void 0 ? void 0 : _d.addEventListener("click", this.scrollNext);
2102
+ this.paginationBtns.forEach(function (button, index) {
2103
+ button.addEventListener("click", _this.paginationHandlers[index]);
2104
+ });
2105
+ this.embla.on("select", this.syncSelectedState);
2106
+ this.embla.on("reInit", this.syncSelectedState);
2107
+ this.syncSelectedState();
2108
+ }
2109
+ Object.defineProperty(LsgCarouselController.prototype, "emblaApi", {
2110
+ get: function () {
2111
+ return this.embla;
2112
+ },
2113
+ enumerable: false,
2114
+ configurable: true
2115
+ });
2116
+ LsgCarouselController.prototype.destroy = function () {
2117
+ var _this = this;
2118
+ var _a, _b;
2119
+ (_a = this.els.prevBtn) === null || _a === void 0 ? void 0 : _a.removeEventListener("click", this.scrollPrev);
2120
+ (_b = this.els.nextBtn) === null || _b === void 0 ? void 0 : _b.removeEventListener("click", this.scrollNext);
2121
+ this.paginationBtns.forEach(function (button, index) {
2122
+ button.removeEventListener("click", _this.paginationHandlers[index]);
2123
+ });
2124
+ if (this.embla) {
2125
+ this.embla.off("select", this.syncSelectedState);
2126
+ this.embla.off("reInit", this.syncSelectedState);
2127
+ this.embla.destroy();
2128
+ this.embla = null;
2129
+ }
2130
+ };
2131
+ return LsgCarouselController;
2132
+ }();
2133
+
2134
+ var mediaTypeFor = function (item) {
2135
+ var _a;
2136
+ return (_a = item.type) !== null && _a !== void 0 ? _a : item.videoUrl ? "video" : "image";
2137
+ };
2138
+ var directionForLayout = function (layout) {
2139
+ return layout === "media-left" ? "rtl" : "ltr";
2140
+ };
2141
+ var LsgCarousel = function (_a) {
2142
+ var _b;
2143
+ var heading = _a.heading,
2144
+ preTitle = _a.preTitle,
2145
+ body = _a.body,
2146
+ cta = _a.cta,
2147
+ _c = _a.items,
2148
+ items = _c === void 0 ? [] : _c,
2149
+ _d = _a.layout,
2150
+ layout = _d === void 0 ? "media-right" : _d,
2151
+ _e = _a.headingTag,
2152
+ headingTag = _e === void 0 ? "h2" : _e,
2153
+ _f = _a.ariaLabel,
2154
+ ariaLabel = _f === void 0 ? "Media carousel" : _f,
2155
+ _g = _a.className,
2156
+ className = _g === void 0 ? "" : _g;
2157
+ var rootRef = useRef(null);
2158
+ var viewportRef = useRef(null);
2159
+ var prevBtnRef = useRef(null);
2160
+ var nextBtnRef = useRef(null);
2161
+ var dotsRef = useRef(null);
2162
+ var controllerRef = useRef(null);
2163
+ var HeadingTag = headingTag;
2164
+ var isCarousel = items.length > 1;
2165
+ var carouselDirection = directionForLayout(layout);
2166
+ useEffect(function () {
2167
+ var _a, _b;
2168
+ if (!viewportRef.current || !isCarousel) return;
2169
+ controllerRef.current = new LsgCarouselController(viewportRef.current, {
2170
+ prevBtn: prevBtnRef.current,
2171
+ nextBtn: nextBtnRef.current,
2172
+ paginationBtns: (_b = (_a = dotsRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-lsg-carousel-dot]")) !== null && _b !== void 0 ? _b : []
2173
+ }, {
2174
+ loop: true,
2175
+ direction: carouselDirection
2176
+ });
2177
+ return function () {
2178
+ var _a;
2179
+ (_a = controllerRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
2180
+ controllerRef.current = null;
2181
+ };
2182
+ }, [carouselDirection, isCarousel, items.length]);
2183
+ var rootClasses = ["lsg-carousel", "lsg-carousel--".concat(layout), className].filter(Boolean).join(" ");
2184
+ return /*#__PURE__*/React.createElement("section", {
2185
+ ref: rootRef,
2186
+ className: rootClasses,
2187
+ "data-lsg-is": "carousel",
2188
+ "data-lsg-carousel-layout": layout,
2189
+ "data-lsg-carousel-direction": carouselDirection,
2190
+ "data-lsg-carousel-count": items.length,
2191
+ "aria-label": ariaLabel
2192
+ }, /*#__PURE__*/React.createElement("div", {
2193
+ className: "lsg-carousel__shell"
2194
+ }, /*#__PURE__*/React.createElement("div", {
2195
+ className: "lsg-carousel__content"
2196
+ }, preTitle && /*#__PURE__*/React.createElement("div", {
2197
+ className: "lsg-carousel__pre-title"
2198
+ }, /*#__PURE__*/React.createElement("span", {
2199
+ className: "lsg-carousel__pre-title-marker",
2200
+ "aria-hidden": "true"
2201
+ }), /*#__PURE__*/React.createElement("span", null, preTitle)), /*#__PURE__*/React.createElement(HeadingTag, {
2202
+ className: "lsg-carousel__heading"
2203
+ }, heading), body && /*#__PURE__*/React.createElement("p", {
2204
+ className: "lsg-carousel__body"
2205
+ }, body), cta && /*#__PURE__*/React.createElement("div", {
2206
+ className: "lsg-carousel__actions"
2207
+ }, /*#__PURE__*/React.createElement(LsgButton, {
2208
+ className: "lsg-carousel__cta",
2209
+ href: cta.href,
2210
+ external: cta.external,
2211
+ variant: (_b = cta.variant) !== null && _b !== void 0 ? _b : "primary",
2212
+ onClick: cta.onClick
2213
+ }, cta.label))), /*#__PURE__*/React.createElement("div", {
2214
+ className: "lsg-carousel__media-column"
2215
+ }, /*#__PURE__*/React.createElement("div", {
2216
+ className: "lsg-carousel__viewport",
2217
+ ref: viewportRef,
2218
+ dir: carouselDirection
2219
+ }, /*#__PURE__*/React.createElement("div", {
2220
+ className: "lsg-carousel__track",
2221
+ role: "list"
2222
+ }, items.map(function (item, index) {
2223
+ var _a, _b, _c, _d, _e, _f, _g;
2224
+ var type = mediaTypeFor(item);
2225
+ var key = (_a = item.id) !== null && _a !== void 0 ? _a : "".concat(type, "-").concat((_c = (_b = item.imageUrl) !== null && _b !== void 0 ? _b : item.videoUrl) !== null && _c !== void 0 ? _c : index, "-").concat(index);
2226
+ return /*#__PURE__*/React.createElement("article", {
2227
+ key: key,
2228
+ className: "lsg-carousel__slide",
2229
+ role: "listitem",
2230
+ "aria-label": "Slide ".concat(index + 1, " of ").concat(items.length),
2231
+ "data-lsg-carousel-item": true
2232
+ }, /*#__PURE__*/React.createElement("div", {
2233
+ className: "lsg-carousel__media"
2234
+ }, type === "video" && item.videoUrl ? /*#__PURE__*/React.createElement(LsgVideo, {
2235
+ videoUrl: item.videoUrl,
2236
+ imageUrl: item.videoPoster,
2237
+ imageAlt: item.imageAlt,
2238
+ controls: (_d = item.videoControls) !== null && _d !== void 0 ? _d : true,
2239
+ autoplay: (_e = item.videoAutoPlay) !== null && _e !== void 0 ? _e : false,
2240
+ muted: (_f = item.videoMuted) !== null && _f !== void 0 ? _f : true,
2241
+ loop: (_g = item.videoLoop) !== null && _g !== void 0 ? _g : false,
2242
+ displayMode: "content",
2243
+ showTags: false,
2244
+ className: "lsg-carousel__video-component"
2245
+ }) : item.imageUrl ? /*#__PURE__*/React.createElement(LsgImage, {
2246
+ imageUrl: item.imageUrl,
2247
+ imageAlt: item.imageAlt,
2248
+ className: "lsg-carousel__image-component"
2249
+ }) : /*#__PURE__*/React.createElement("div", {
2250
+ className: "lsg-carousel__media-placeholder",
2251
+ "aria-hidden": "true"
2252
+ }), item.label && /*#__PURE__*/React.createElement("span", {
2253
+ className: "lsg-carousel__media-label"
2254
+ }, item.label)));
2255
+ }))), isCarousel && /*#__PURE__*/React.createElement("div", {
2256
+ className: "lsg-carousel__navigation",
2257
+ "aria-label": "Carousel navigation"
2258
+ }, /*#__PURE__*/React.createElement("button", {
2259
+ ref: prevBtnRef,
2260
+ className: "lsg-carousel__arrow lsg-carousel__arrow--prev",
2261
+ type: "button",
2262
+ "aria-label": "Previous slide",
2263
+ "data-lsg-carousel-prev": true
2264
+ }, /*#__PURE__*/React.createElement("span", {
2265
+ className: "lsg-carousel__arrow-icon",
2266
+ "aria-hidden": "true"
2267
+ })), /*#__PURE__*/React.createElement("div", {
2268
+ className: "lsg-carousel__pagination",
2269
+ ref: dotsRef
2270
+ }, items.map(function (item, index) {
2271
+ var _a;
2272
+ return /*#__PURE__*/React.createElement("button", {
2273
+ key: (_a = item.id) !== null && _a !== void 0 ? _a : "dot-".concat(index),
2274
+ className: "lsg-carousel__dot".concat(index === 0 ? " lsg-carousel__dot--active" : ""),
2275
+ type: "button",
2276
+ "aria-label": "Go to slide ".concat(index + 1),
2277
+ "aria-current": index === 0 ? "true" : "false",
2278
+ "data-lsg-carousel-dot": true
2279
+ });
2280
+ })), /*#__PURE__*/React.createElement("button", {
2281
+ ref: nextBtnRef,
2282
+ className: "lsg-carousel__arrow lsg-carousel__arrow--next",
2283
+ type: "button",
2284
+ "aria-label": "Next slide",
2285
+ "data-lsg-carousel-next": true
2286
+ }, /*#__PURE__*/React.createElement("span", {
2287
+ className: "lsg-carousel__arrow-icon",
2288
+ "aria-hidden": "true"
2289
+ }))))));
2290
+ };
2291
+
2292
+ function cardVariantClass(variant) {
2293
+ switch (variant) {
2294
+ case "onlyText":
2295
+ return "lsg-card--only-text";
2296
+ case "withIcon":
2297
+ return "lsg-card--with-icon";
2298
+ case "withImage":
2299
+ default:
2300
+ return "lsg-card--with-image";
2301
+ }
2302
+ }
2303
+ var LsgCard = function (_a) {
2304
+ var _b;
2305
+ var title = _a.title,
2306
+ preTitle = _a.preTitle,
2307
+ subtitle = _a.subtitle,
2308
+ description = _a.description,
2309
+ imageUrl = _a.imageUrl,
2310
+ _c = _a.imageAlt,
2311
+ imageAlt = _c === void 0 ? "" : _c,
2312
+ iconUrl = _a.iconUrl,
2313
+ _d = _a.iconAlt,
2314
+ iconAlt = _d === void 0 ? "" : _d,
2315
+ href = _a.href,
2316
+ cta = _a.cta,
2317
+ _e = _a.variant,
2318
+ variant = _e === void 0 ? "withImage" : _e,
2319
+ className = _a.className;
2320
+ var resolvedIconUrl = iconUrl !== null && iconUrl !== void 0 ? iconUrl : imageUrl;
2321
+ var actionLabel = (_b = cta === null || cta === void 0 ? void 0 : cta.label) !== null && _b !== void 0 ? _b : "Read more";
2322
+ var cardClassName = ["lsg-card", cardVariantClass(variant), className].filter(Boolean).join(" ");
2323
+ var content = /*#__PURE__*/React.createElement(React.Fragment, null, variant === "withImage" && imageUrl && /*#__PURE__*/React.createElement("div", {
2324
+ className: "lsg-card__media"
2325
+ }, /*#__PURE__*/React.createElement("img", {
2326
+ src: imageUrl,
2327
+ alt: imageAlt,
2328
+ loading: "lazy"
2329
+ })), /*#__PURE__*/React.createElement("div", {
2330
+ className: "lsg-card__content"
2331
+ }, variant === "withIcon" && resolvedIconUrl && /*#__PURE__*/React.createElement("div", {
2332
+ className: "lsg-card__icon",
2333
+ "aria-hidden": iconAlt ? undefined : true
2334
+ }, /*#__PURE__*/React.createElement("img", {
2335
+ src: resolvedIconUrl,
2336
+ alt: iconAlt,
2337
+ loading: "lazy"
2338
+ })), /*#__PURE__*/React.createElement("div", {
2339
+ className: "lsg-card__top"
2340
+ }, preTitle && /*#__PURE__*/React.createElement("span", {
2341
+ className: "lsg-card__pre-title"
2342
+ }, /*#__PURE__*/React.createElement("span", {
2343
+ className: "lsg-card__pre-title-dot",
2344
+ "aria-hidden": "true"
2345
+ }), /*#__PURE__*/React.createElement("span", {
2346
+ className: "lsg-card__pre-title-text"
2347
+ }, preTitle), /*#__PURE__*/React.createElement("span", {
2348
+ className: "lsg-card__pre-title-arrow",
2349
+ "aria-hidden": "true"
2350
+ }, "\u2192")), /*#__PURE__*/React.createElement("h3", {
2351
+ className: "lsg-card__title"
2352
+ }, title), subtitle && /*#__PURE__*/React.createElement("h4", {
2353
+ className: "lsg-card__subtitle"
2354
+ }, subtitle)), /*#__PURE__*/React.createElement("div", {
2355
+ className: "lsg-card__bottom"
2356
+ }, description && /*#__PURE__*/React.createElement("p", {
2357
+ className: "lsg-card__description"
2358
+ }, description), (href || cta) && (href ? /*#__PURE__*/React.createElement("span", {
2359
+ className: "lsg-card__cta",
2360
+ "aria-hidden": "true"
2361
+ }, /*#__PURE__*/React.createElement("span", {
2362
+ className: "lsg-card__cta-label"
2363
+ }, actionLabel), /*#__PURE__*/React.createElement("span", {
2364
+ className: "lsg-card__cta-arrow",
2365
+ "aria-hidden": "true"
2366
+ }, "\u2192")) : /*#__PURE__*/React.createElement("a", {
2367
+ className: "lsg-card__cta",
2368
+ href: cta === null || cta === void 0 ? void 0 : cta.href,
2369
+ target: (cta === null || cta === void 0 ? void 0 : cta.external) ? "_blank" : undefined,
2370
+ rel: (cta === null || cta === void 0 ? void 0 : cta.external) ? "noreferrer noopener" : undefined
2371
+ }, /*#__PURE__*/React.createElement("span", {
2372
+ className: "lsg-card__cta-label"
2373
+ }, actionLabel), /*#__PURE__*/React.createElement("span", {
2374
+ className: "lsg-card__cta-arrow",
2375
+ "aria-hidden": "true"
2376
+ }, "\u2192"))))));
2377
+ return /*#__PURE__*/React.createElement("article", {
2378
+ className: cardClassName,
2379
+ "data-lsg-card-variant": variant
2380
+ }, href ? /*#__PURE__*/React.createElement("a", {
2381
+ href: href,
2382
+ className: "lsg-card__link",
2383
+ "aria-label": title
2384
+ }, content) : /*#__PURE__*/React.createElement("div", {
2385
+ className: "lsg-card__link"
2386
+ }, content));
2387
+ };
2388
+ /** Renders the AEM/Storybook compatible responsive card grid. */
2389
+ var LsgCards = function (_a) {
2390
+ var cards = _a.cards,
2391
+ _b = _a.columns,
2392
+ columns = _b === void 0 ? 3 : _b,
2393
+ className = _a.className;
2394
+ var listClassName = ["lsg-cards", "lsg-cards--cols-".concat(columns), className].filter(Boolean).join(" ");
2395
+ return /*#__PURE__*/React.createElement("ul", {
2396
+ className: listClassName,
2397
+ "data-columns": columns
2398
+ }, cards.map(function (card, index) {
2399
+ var _a, _b, _c;
2400
+ return /*#__PURE__*/React.createElement("li", {
2401
+ className: "lsg-cards__item",
2402
+ key: (_c = (_a = card.href) !== null && _a !== void 0 ? _a : (_b = card.cta) === null || _b === void 0 ? void 0 : _b.href) !== null && _c !== void 0 ? _c : "".concat(card.title, "-").concat(index)
2403
+ }, /*#__PURE__*/React.createElement(LsgCard, card));
2404
+ }));
2405
+ };
2406
+
2407
+ var LSG_ICON_PATHS = {
2408
+ bars: "M96 160C96 142.3 110.3 128 128 128L512 128C529.7 128 544 142.3 544 160C544 177.7 529.7 192 512 192L128 192C110.3 192 96 177.7 96 160zM96 320C96 302.3 110.3 288 128 288L512 288C529.7 288 544 302.3 544 320C544 337.7 529.7 352 512 352L128 352C110.3 352 96 337.7 96 320zM544 480C544 497.7 529.7 512 512 512L128 512C110.3 512 96 497.7 96 480C96 462.3 110.3 448 128 448L512 448C529.7 448 544 462.3 544 480z",
2409
+ chevronLeft: "M169.4 297.4C156.9 309.9 156.9 330.2 169.4 342.7L361.4 534.7C373.9 547.2 394.2 547.2 406.7 534.7C419.2 522.2 419.2 501.9 406.7 489.4L237.3 320L406.6 150.6C419.1 138.1 419.1 117.8 406.6 105.3C394.1 92.8 373.8 92.8 361.3 105.3L169.3 297.3z",
2410
+ chevronRight: "M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z",
2411
+ close: "M504.6 148.5C515.9 134.9 514.1 114.7 500.5 103.4C486.9 92.1 466.7 93.9 455.4 107.5L320 270L184.6 107.5C173.3 93.9 153.1 92.1 139.5 103.4C125.9 114.7 124.1 134.9 135.4 148.5L278.3 320L135.4 491.5C124.1 505.1 125.9 525.3 139.5 536.6C153.1 547.9 173.3 546.1 184.6 532.5L320 370L455.4 532.5C466.7 546.1 486.9 547.9 500.5 536.6C514.1 525.3 515.9 505.1 504.6 491.5L361.7 320L504.6 148.5z",
2412
+ globe: "M367.2 477C345.7 520.7 325.8 528 320 528C314.2 528 294.3 520.7 272.8 477C255.8 442.5 243.6 395.4 240.7 344L399.3 344C396.3 395.5 384.1 442.6 367.2 477zM399.3 296L240.7 296C243.7 244.5 255.9 197.4 272.8 163C294.3 119.3 314.2 112 320 112C325.8 112 345.7 119.3 367.2 163C384.2 197.5 396.4 244.6 399.3 296zM447.4 344L526.6 344C518 418.6 469.9 481.3 403.8 510.4C427.8 467.6 444.1 408 447.4 344zM526.6 296L447.4 296C444.1 232 427.8 172.4 403.8 129.6C469.9 158.8 518 221.4 526.6 296zM192.6 296L113.4 296C122 221.4 170.1 158.7 236.2 129.6C212.2 172.4 195.9 232 192.6 296zM113.4 344L192.6 344C195.9 408 212.2 467.6 236.2 510.4C170.1 481.2 122 418.6 113.4 344zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576z",
2413
+ home: "M96 320L320 128L544 320H480V528H352V384H288V528H160V320H96z",
2414
+ search: "M480 272C480 317.9 465.1 360.3 440 394.7L566.6 521.4C579.1 533.9 579.1 554.2 566.6 566.7C554.1 579.2 533.8 579.2 521.3 566.7L394.7 440C360.3 465.1 317.9 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272zM272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272C128 351.5 192.5 416 272 416z"
2415
+ };
2416
+
2417
+ var LsgIcon = function (_a) {
2418
+ var name = _a.name,
2419
+ className = _a.className;
2420
+ return /*#__PURE__*/React.createElement("svg", {
2421
+ className: className,
2422
+ xmlns: "http://www.w3.org/2000/svg",
2423
+ viewBox: "0 0 640 640",
2424
+ "aria-hidden": "true",
2425
+ focusable: "false"
2426
+ }, /*#__PURE__*/React.createElement("path", {
2427
+ d: LSG_ICON_PATHS[name]
2428
+ }));
2429
+ };
2430
+
2431
+ function isSafeHref(href) {
2432
+ if (!href) return false;
2433
+ var value = href.trim().toLowerCase();
2434
+ if (value.startsWith("javascript:") || value.startsWith("data:") || value.startsWith("vbscript:")) {
2435
+ return false;
2436
+ }
2437
+ return value.startsWith("/") || value.startsWith("#") || value.startsWith("http://") || value.startsWith("https://") || !value.includes(":");
2438
+ }
2439
+ var BreadcrumbSeparator = function () {
2440
+ return /*#__PURE__*/React.createElement("li", {
2441
+ className: "lsg-breadcrumb__separator",
2442
+ "aria-hidden": "true"
2443
+ }, /*#__PURE__*/React.createElement(LsgIcon, {
2444
+ name: "chevronRight",
2445
+ className: "lsg-breadcrumb__separator-icon"
2446
+ }));
2447
+ };
2448
+ var LsgBreadcrumb = function (_a) {
2449
+ var _b = _a.items,
2450
+ items = _b === void 0 ? [] : _b,
2451
+ _c = _a.showBreadcrumbs,
2452
+ showBreadcrumbs = _c === void 0 ? true : _c,
2453
+ _d = _a.includeHome,
2454
+ includeHome = _d === void 0 ? true : _d,
2455
+ _e = _a.homeHref,
2456
+ homeHref = _e === void 0 ? "/" : _e,
2457
+ _f = _a.homeLabel,
2458
+ homeLabel = _f === void 0 ? "Home" : _f,
2459
+ _g = _a.className,
2460
+ className = _g === void 0 ? "" : _g;
2461
+ if (!showBreadcrumbs) return null;
2462
+ var visibleItems = Array.isArray(items) ? items.filter(function (item) {
2463
+ return Boolean(item) && typeof item.label === "string" && item.label.trim().length > 0;
2464
+ }) : [];
2465
+ if (!includeHome && visibleItems.length === 0) return null;
2466
+ var rootClassName = ["lsg-breadcrumb", className].filter(Boolean).join(" ");
2467
+ var safeHomeHref = isSafeHref(homeHref) ? homeHref : "/";
2468
+ return /*#__PURE__*/React.createElement("nav", {
2469
+ className: rootClassName,
2470
+ "aria-label": "Breadcrumb"
2471
+ }, /*#__PURE__*/React.createElement("ol", {
2472
+ className: "lsg-breadcrumb__list"
2473
+ }, includeHome && /*#__PURE__*/React.createElement("li", {
2474
+ className: "lsg-breadcrumb__item lsg-breadcrumb__item--home"
2475
+ }, /*#__PURE__*/React.createElement("a", {
2476
+ className: "lsg-breadcrumb__home",
2477
+ href: safeHomeHref,
2478
+ "aria-label": homeLabel
2479
+ }, /*#__PURE__*/React.createElement(LsgIcon, {
2480
+ name: "home",
2481
+ className: "lsg-breadcrumb__home-icon"
2482
+ }))), visibleItems.map(function (item, index) {
2483
+ var isCurrent = index === visibleItems.length - 1;
2484
+ var safeHref = isSafeHref(item.href) ? item.href : undefined;
2485
+ return /*#__PURE__*/React.createElement(React.Fragment, {
2486
+ key: "".concat(item.label, "-").concat(index)
2487
+ }, (includeHome || index > 0) && /*#__PURE__*/React.createElement(BreadcrumbSeparator, null), /*#__PURE__*/React.createElement("li", {
2488
+ className: ["lsg-breadcrumb__item", isCurrent ? "lsg-breadcrumb__item--current" : "lsg-breadcrumb__item--ancestor"].join(" ")
2489
+ }, isCurrent ? /*#__PURE__*/React.createElement("span", {
2490
+ className: "lsg-breadcrumb__current",
2491
+ "aria-current": "page"
2492
+ }, /*#__PURE__*/React.createElement("span", {
2493
+ className: "lsg-breadcrumb__current-marker",
2494
+ "aria-hidden": "true"
2495
+ }), /*#__PURE__*/React.createElement("span", {
2496
+ className: "lsg-breadcrumb__label"
2497
+ }, item.label)) : safeHref ? /*#__PURE__*/React.createElement("a", {
2498
+ className: "lsg-breadcrumb__link",
2499
+ href: safeHref
2500
+ }, item.label) : /*#__PURE__*/React.createElement("span", {
2501
+ className: "lsg-breadcrumb__ancestor"
2502
+ }, item.label)));
2503
+ })));
2504
+ };
2505
+
2506
+ var LsgLogo = function (_a) {
2507
+ var src = _a.src,
2508
+ _b = _a.alt,
2509
+ alt = _b === void 0 ? "Logo" : _b,
2510
+ _c = _a.href,
2511
+ href = _c === void 0 ? "/" : _c,
2512
+ width = _a.width,
2513
+ _d = _a.height,
2514
+ height = _d === void 0 ? 40 : _d,
2515
+ _e = _a.text,
2516
+ text = _e === void 0 ? "Atlas Copco" : _e;
2517
+ var content = src ? /*#__PURE__*/React.createElement("img", {
2518
+ src: src,
2519
+ alt: alt,
2520
+ width: width,
2521
+ height: height,
2522
+ className: "lsg-logo__image"
2523
+ }) : /*#__PURE__*/React.createElement("span", {
2524
+ className: "lsg-logo__text"
2525
+ }, text);
2526
+ return /*#__PURE__*/React.createElement("a", {
2527
+ href: href,
2528
+ className: "lsg-logo",
2529
+ "aria-label": src ? alt : undefined
2530
+ }, content);
2531
+ };
2532
+
2533
+ var LsgNavigation = function (_a) {
2534
+ var items = _a.items,
2535
+ _b = _a.label,
2536
+ label = _b === void 0 ? "Main navigation" : _b,
2537
+ _c = _a.variant,
2538
+ variant = _c === void 0 ? "simple" : _c,
2539
+ onItemClick = _a.onItemClick,
2540
+ onItemHover = _a.onItemHover;
2541
+ var renderItems = function (navItems, level) {
2542
+ if (level === void 0) {
2543
+ level = 0;
2544
+ }
2545
+ return /*#__PURE__*/React.createElement("ul", {
2546
+ className: level === 0 ? "lsg-nav__list" : "lsg-nav__dropdown",
2547
+ role: "list"
2548
+ }, navItems.map(function (item) {
2549
+ var _a;
2550
+ var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
2551
+ return /*#__PURE__*/React.createElement("li", {
2552
+ key: "".concat(item.href, "-").concat(level),
2553
+ className: ["lsg-nav__item", hasChildren ? "lsg-nav__item--has-children" : "", item.open ? "lsg-nav__item--open" : ""].filter(Boolean).join(" "),
2554
+ onMouseEnter: function () {
2555
+ if (onItemHover && hasChildren) {
2556
+ onItemHover(item, level);
2557
+ }
2558
+ }
2559
+ }, /*#__PURE__*/React.createElement("a", {
2560
+ href: item.href,
2561
+ onClick: function (event) {
2562
+ if (onItemClick && hasChildren) {
2563
+ event.preventDefault();
2564
+ onItemClick(item, level);
2565
+ }
2566
+ },
2567
+ className: ["lsg-nav__link", item.current ? "lsg-nav__link--current" : ""].filter(Boolean).join(" "),
2568
+ "aria-current": item.current ? "page" : undefined,
2569
+ "aria-expanded": variant === "dropdown" && hasChildren ? item.open : undefined
2570
+ }, /*#__PURE__*/React.createElement("p", null, item.label), hasChildren && /*#__PURE__*/React.createElement("span", {
2571
+ className: "lsg-nav__chevron",
2572
+ "aria-hidden": "true"
2573
+ }, /*#__PURE__*/React.createElement("svg", {
2574
+ viewBox: "0 0 640 640",
2575
+ focusable: "false"
2576
+ }, /*#__PURE__*/React.createElement("path", {
2577
+ d: "M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z"
2578
+ })))), hasChildren && renderItems(item.children || [], level + 1));
2579
+ }));
2580
+ };
2581
+ return /*#__PURE__*/React.createElement("nav", {
2582
+ className: ["lsg-nav", "lsg-nav--".concat(variant)].join(" "),
2583
+ "aria-label": label
2584
+ }, renderItems(items));
2585
+ };
2586
+
2587
+ var ChevronIcon = function () {
2588
+ return /*#__PURE__*/React.createElement("svg", {
2589
+ xmlns: "http://www.w3.org/2000/svg",
2590
+ viewBox: "0 0 12 12",
2591
+ fill: "none",
2592
+ stroke: "currentColor",
2593
+ strokeWidth: "1.5",
2594
+ strokeLinecap: "round",
2595
+ strokeLinejoin: "round",
2596
+ "aria-hidden": "true",
2597
+ focusable: "false"
2598
+ }, /*#__PURE__*/React.createElement("polyline", {
2599
+ points: "2 4 6 8 10 4"
2600
+ }));
2601
+ };
2602
+ /**
2603
+ * Language Switcher
2604
+ *
2605
+ * Hydrated: state managed by React (useState).
2606
+ * Clientlib-only: driven by lsg-clientlib.js targeting [data-lsg-lang-switcher].
2607
+ */
2608
+ var LsgLanguageSwitcher = function (_a) {
2609
+ var currentLanguage = _a.currentLanguage,
2610
+ languages = _a.languages,
2611
+ _b = _a.label,
2612
+ label = _b === void 0 ? "Select language" : _b,
2613
+ onLanguageChange = _a.onLanguageChange;
2614
+ var _c = useState(false),
2615
+ isOpen = _c[0],
2616
+ setIsOpen = _c[1];
2617
+ var containerRef = useRef(null);
2618
+ var reactId = useId();
2619
+ var triggerId = "lsg-lang-trigger-".concat(reactId);
2620
+ var dropdownId = "lsg-lang-dropdown-".concat(reactId);
2621
+ // Close on outside click
2622
+ useEffect(function () {
2623
+ if (!isOpen) return;
2624
+ var handleClick = function (e) {
2625
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
2626
+ setIsOpen(false);
2627
+ }
2628
+ };
2629
+ document.addEventListener("mousedown", handleClick);
2630
+ return function () {
2631
+ return document.removeEventListener("mousedown", handleClick);
2632
+ };
2633
+ }, [isOpen]);
2634
+ // Close on Escape
2635
+ useEffect(function () {
2636
+ if (!isOpen) return;
2637
+ var handleKey = function (e) {
2638
+ if (e.key === "Escape") setIsOpen(false);
2639
+ };
2640
+ document.addEventListener("keydown", handleKey);
2641
+ return function () {
2642
+ return document.removeEventListener("keydown", handleKey);
2643
+ };
2644
+ }, [isOpen]);
2645
+ return /*#__PURE__*/React.createElement("div", {
2646
+ className: "lsg-lang-switcher",
2647
+ ref: containerRef,
2648
+ "data-lsg-lang-switcher": true
2649
+ }, /*#__PURE__*/React.createElement("button", {
2650
+ id: triggerId,
2651
+ type: "button",
2652
+ className: "lsg-lang-switcher__trigger",
2653
+ "aria-label": label,
2654
+ "aria-haspopup": "listbox",
2655
+ "aria-expanded": isOpen,
2656
+ "aria-controls": dropdownId,
2657
+ onClick: function () {
2658
+ return setIsOpen(function (prev) {
2659
+ return !prev;
2660
+ });
2661
+ }
2662
+ }, /*#__PURE__*/React.createElement(LsgIcon, {
2663
+ name: "globe",
2664
+ className: "lsg-lang-switcher__globe"
2665
+ }), /*#__PURE__*/React.createElement("span", {
2666
+ className: "lsg-lang-switcher__current"
2667
+ }, currentLanguage), /*#__PURE__*/React.createElement(ChevronIcon, null)), isOpen && /*#__PURE__*/React.createElement("ul", {
2668
+ id: dropdownId,
2669
+ className: "lsg-lang-switcher__dropdown",
2670
+ role: "listbox",
2671
+ "aria-labelledby": triggerId
2672
+ }, languages.map(function (lang) {
2673
+ return /*#__PURE__*/React.createElement("li", {
2674
+ key: lang.code,
2675
+ className: "lsg-lang-switcher__option",
2676
+ role: "option"
2677
+ }, /*#__PURE__*/React.createElement("a", {
2678
+ href: lang.href,
2679
+ className: ["lsg-lang-switcher__option-link", lang.code === currentLanguage ? "lsg-lang-switcher__option-link--active" : ""].filter(Boolean).join(" "),
2680
+ "aria-current": lang.code === currentLanguage ? true : undefined,
2681
+ onClick: function (event) {
2682
+ if (!onLanguageChange) return;
2683
+ event.preventDefault();
2684
+ onLanguageChange(lang);
2685
+ setIsOpen(false);
2686
+ }
2687
+ }, lang.label));
2688
+ })));
2689
+ };
2690
+
2691
+ var SearchIcon$1 = function () {
2692
+ return /*#__PURE__*/React.createElement("svg", {
2693
+ xmlns: "http://www.w3.org/2000/svg",
2694
+ viewBox: "0 0 24 24",
2695
+ fill: "none",
2696
+ stroke: "currentColor",
2697
+ strokeWidth: "2",
2698
+ strokeLinecap: "round",
2699
+ strokeLinejoin: "round",
2700
+ "aria-hidden": "true",
2701
+ focusable: "false"
2702
+ }, /*#__PURE__*/React.createElement("circle", {
2703
+ cx: "11",
2704
+ cy: "11",
2705
+ r: "8"
2706
+ }), /*#__PURE__*/React.createElement("line", {
2707
+ x1: "21",
2708
+ y1: "21",
2709
+ x2: "16.65",
2710
+ y2: "16.65"
2711
+ }));
2712
+ };
2713
+ var LsgSearchTrigger = function (_a) {
2714
+ var _b = _a.label,
2715
+ label = _b === void 0 ? "Open search" : _b,
2716
+ targetId = _a.targetId,
2717
+ onClick = _a.onClick;
2718
+ return /*#__PURE__*/React.createElement("button", {
2719
+ type: "button",
2720
+ className: "lsg-search-trigger",
2721
+ "aria-label": label,
2722
+ "aria-haspopup": "dialog",
2723
+ "aria-controls": targetId,
2724
+ onClick: onClick,
2725
+ "data-lsg-search-trigger": true
2726
+ }, /*#__PURE__*/React.createElement(SearchIcon$1, null));
2727
+ };
2728
+
2729
+ var SearchIcon = function () {
2730
+ return /*#__PURE__*/React.createElement("svg", {
2731
+ xmlns: "http://www.w3.org/2000/svg",
2732
+ viewBox: "0 0 24 24",
2733
+ fill: "none",
2734
+ stroke: "currentColor",
2735
+ strokeWidth: "2",
2736
+ strokeLinecap: "round",
2737
+ strokeLinejoin: "round",
2738
+ "aria-hidden": "true",
2739
+ focusable: "false"
2740
+ }, /*#__PURE__*/React.createElement("circle", {
2741
+ cx: "11",
2742
+ cy: "11",
2743
+ r: "8"
2744
+ }), /*#__PURE__*/React.createElement("line", {
2745
+ x1: "21",
2746
+ y1: "21",
2747
+ x2: "16.65",
2748
+ y2: "16.65"
2749
+ }));
2750
+ };
2751
+ var CloseIcon = function () {
2752
+ return /*#__PURE__*/React.createElement("svg", {
2753
+ xmlns: "http://www.w3.org/2000/svg",
2754
+ viewBox: "0 0 24 24",
2755
+ fill: "none",
2756
+ stroke: "currentColor",
2757
+ strokeWidth: "2",
2758
+ strokeLinecap: "round",
2759
+ strokeLinejoin: "round",
2760
+ "aria-hidden": "true",
2761
+ focusable: "false"
2762
+ }, /*#__PURE__*/React.createElement("line", {
2763
+ x1: "18",
2764
+ y1: "6",
2765
+ x2: "6",
2766
+ y2: "18"
2767
+ }), /*#__PURE__*/React.createElement("line", {
2768
+ x1: "6",
2769
+ y1: "6",
2770
+ x2: "18",
2771
+ y2: "18"
2772
+ }));
2773
+ };
2774
+ /**
2775
+ * Search Overlay
2776
+ *
2777
+ * Hydrated: isOpen/onClose controlled by parent (e.g. LsgHeader).
2778
+ * Clientlib-only: driven by lsg-clientlib.js targeting [data-lsg-search-overlay].
2779
+ * The CSS class lsg-search-overlay--open drives visibility in both modes.
2780
+ */
2781
+ var LsgSearchOverlay = function (_a) {
2782
+ var _b = _a.id,
2783
+ id = _b === void 0 ? "lsg-search-overlay" : _b,
2784
+ _c = _a.placeholder,
2785
+ placeholder = _c === void 0 ? "Search…" : _c,
2786
+ _d = _a.label,
2787
+ label = _d === void 0 ? "Search" : _d,
2788
+ _e = _a.isOpen,
2789
+ isOpen = _e === void 0 ? false : _e,
2790
+ onClose = _a.onClose,
2791
+ onSearch = _a.onSearch;
2792
+ var inputRef = useRef(null);
2793
+ var inputId = "".concat(id, "-input");
2794
+ // Focus the input when overlay opens
2795
+ useEffect(function () {
2796
+ var _a;
2797
+ if (isOpen) (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
2798
+ }, [isOpen]);
2799
+ // Close on Escape
2800
+ useEffect(function () {
2801
+ if (!isOpen) return;
2802
+ var handleKey = function (e) {
2803
+ if (e.key === "Escape") onClose === null || onClose === void 0 ? void 0 : onClose();
2804
+ };
2805
+ document.addEventListener("keydown", handleKey);
2806
+ return function () {
2807
+ return document.removeEventListener("keydown", handleKey);
2808
+ };
2809
+ }, [isOpen, onClose]);
2810
+ var handleSubmit = function (e) {
2811
+ var _a, _b;
2812
+ e.preventDefault();
2813
+ var query = (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
2814
+ if (query.trim()) onSearch === null || onSearch === void 0 ? void 0 : onSearch(query.trim());
2815
+ };
2816
+ var overlayClass = ["lsg-search-overlay", isOpen ? "lsg-search-overlay--open" : ""].filter(Boolean).join(" ");
2817
+ return /*#__PURE__*/React.createElement("div", {
2818
+ id: id,
2819
+ className: overlayClass,
2820
+ role: "dialog",
2821
+ "aria-modal": "true",
2822
+ "aria-label": label,
2823
+ "data-lsg-search-overlay": true
2824
+ }, /*#__PURE__*/React.createElement("div", {
2825
+ className: "lsg-search-overlay__backdrop",
2826
+ "aria-hidden": "true",
2827
+ onClick: onClose,
2828
+ style: {
2829
+ position: "absolute",
2830
+ inset: 0,
2831
+ cursor: "default"
2832
+ }
2833
+ }), /*#__PURE__*/React.createElement("div", {
2834
+ className: "lsg-search-overlay__panel"
2835
+ }, /*#__PURE__*/React.createElement("form", {
2836
+ className: "lsg-search-overlay__form",
2837
+ role: "search",
2838
+ onSubmit: handleSubmit
2839
+ }, /*#__PURE__*/React.createElement("label", {
2840
+ htmlFor: inputId,
2841
+ className: "lsg-search-overlay__label"
2842
+ }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement("span", {
2843
+ className: "lsg-visually-hidden"
2844
+ }, label)), /*#__PURE__*/React.createElement("input", {
2845
+ id: inputId,
2846
+ ref: inputRef,
2847
+ type: "search",
2848
+ className: "lsg-search-overlay__input",
2849
+ placeholder: placeholder,
2850
+ autoComplete: "off"
2851
+ }), /*#__PURE__*/React.createElement("button", {
2852
+ type: "submit",
2853
+ className: "lsg-search-overlay__submit",
2854
+ "aria-label": "Submit search"
2855
+ }, /*#__PURE__*/React.createElement(SearchIcon, null)), /*#__PURE__*/React.createElement("button", {
2856
+ type: "button",
2857
+ className: "lsg-search-overlay__close",
2858
+ "aria-label": "Close search",
2859
+ onClick: onClose
2860
+ }, /*#__PURE__*/React.createElement(CloseIcon, null)))));
2861
+ };
2862
+
2863
+ var SEARCH_OVERLAY_ID = "lsg-header-search-overlay";
2864
+ var LsgHeaderIcon = function (_a) {
2865
+ var name = _a.name,
2866
+ className = _a.className;
2867
+ return /*#__PURE__*/React.createElement(LsgIcon, {
2868
+ name: name,
2869
+ className: ["lsg-header__icon", "lsg-header__icon--".concat(name), className || ""].filter(Boolean).join(" ")
2870
+ });
2871
+ };
2872
+ var getItemByPath = function (items, activePath, depth) {
2873
+ var currentItems = items;
2874
+ var currentItem;
2875
+ var _loop_1 = function (i) {
2876
+ currentItem = currentItems.find(function (item) {
2877
+ return item.label === activePath[i];
2878
+ });
2879
+ currentItems = (currentItem === null || currentItem === void 0 ? void 0 : currentItem.children) || [];
2880
+ };
2881
+ for (var i = 0; i <= depth; i += 1) {
2882
+ _loop_1(i);
2883
+ }
2884
+ return currentItem;
2885
+ };
2886
+ var getItemsAtLevel = function (items, activePath, level) {
2887
+ var _a;
2888
+ if (level <= 1) {
2889
+ return items;
2890
+ }
2891
+ return ((_a = getItemByPath(items, activePath, level - 2)) === null || _a === void 0 ? void 0 : _a.children) || [];
2892
+ };
2893
+ var getMegaColumns = function (items, activePath, maxDepth) {
2894
+ if (maxDepth === void 0) {
2895
+ maxDepth = 4;
2896
+ }
2897
+ var columns = [items];
2898
+ var currentItems = items;
2899
+ activePath.slice(0, maxDepth - 1).forEach(function (label) {
2900
+ var _a;
2901
+ var activeItem = currentItems.find(function (item) {
2902
+ return item.label === label;
2903
+ });
2904
+ if ((_a = activeItem === null || activeItem === void 0 ? void 0 : activeItem.children) === null || _a === void 0 ? void 0 : _a.length) {
2905
+ columns.push(activeItem.children);
2906
+ currentItems = activeItem.children;
2907
+ }
2908
+ });
2909
+ return columns.slice(0, maxDepth);
2910
+ };
2911
+ var isCurrentOrActiveAtLevel = function (item, activePath, level) {
2912
+ return item.current || activePath[level] === item.label;
2913
+ };
2914
+ var isSelectedAtLevel = function (item, activePath, level) {
2915
+ return activePath[level] === item.label;
2916
+ };
2917
+ var hasOpenNavItem = function (items) {
2918
+ return items.some(function (item) {
2919
+ return item.open || hasOpenNavItem(item.children || []);
2920
+ });
2921
+ };
2922
+ var clearMegaMenuBranch = function (scope) {
2923
+ if (scope instanceof HTMLElement) {
2924
+ scope.classList.remove("lsg-header__mega-item--open");
2925
+ scope.classList.remove("lsg-header__mega-column--open");
2926
+ }
2927
+ scope.querySelectorAll(".lsg-header__mega-item--open").forEach(function (item) {
2928
+ item.classList.remove("lsg-header__mega-item--open");
2929
+ });
2930
+ scope.querySelectorAll(".lsg-header__mega-column--open").forEach(function (column) {
2931
+ column.classList.remove("lsg-header__mega-column--open");
2932
+ });
2933
+ };
2934
+ var activateMegaMenuItem = function (item) {
2935
+ var _a;
2936
+ var parentColumn = item.parentElement;
2937
+ if (parentColumn) {
2938
+ Array.from(parentColumn.children).forEach(function (openItem) {
2939
+ if (openItem !== item) {
2940
+ clearMegaMenuBranch(openItem);
2941
+ }
2942
+ });
2943
+ }
2944
+ item.classList.add("lsg-header__mega-item--open");
2945
+ (_a = item.querySelector(":scope > .lsg-header__mega-column")) === null || _a === void 0 ? void 0 : _a.classList.add("lsg-header__mega-column--open");
2946
+ };
2947
+ var HeaderActionButton = function (_a) {
2948
+ var label = _a.label,
2949
+ icon = _a.icon,
2950
+ onClick = _a.onClick,
2951
+ controls = _a.controls,
2952
+ className = _a.className;
2953
+ return /*#__PURE__*/React.createElement("button", {
2954
+ type: "button",
2955
+ className: ["lsg-header__icon-button", className || ""].filter(Boolean).join(" "),
2956
+ "aria-label": label,
2957
+ "aria-controls": controls,
2958
+ onClick: onClick,
2959
+ "data-lsg-search-trigger": icon === "search" ? "" : undefined
2960
+ }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
2961
+ name: icon
2962
+ }));
2963
+ };
2964
+ var LsgHeader = function (_a) {
2965
+ var logo = _a.logo,
2966
+ _b = _a.navItems,
2967
+ navItems = _b === void 0 ? [] : _b,
2968
+ _c = _a.languages,
2969
+ languages = _c === void 0 ? [] : _c,
2970
+ _d = _a.currentLanguage,
2971
+ currentLanguage = _d === void 0 ? "EN" : _d,
2972
+ onLanguageChange = _a.onLanguageChange,
2973
+ _e = _a.searchLabel,
2974
+ searchLabel = _e === void 0 ? "Open search" : _e,
2975
+ _f = _a.searchPlaceholder,
2976
+ searchPlaceholder = _f === void 0 ? "Search products, documents..." : _f,
2977
+ _g = _a.variant,
2978
+ variant = _g === void 0 ? "simple" : _g,
2979
+ _h = _a.menuOpen,
2980
+ menuOpen = _h === void 0 ? false : _h,
2981
+ _j = _a.mobileLevel,
2982
+ mobileLevel = _j === void 0 ? 0 : _j,
2983
+ _k = _a.activePath,
2984
+ activePath = _k === void 0 ? [] : _k,
2985
+ mobileSelectedLabel = _a.mobileSelectedLabel,
2986
+ onMenuToggle = _a.onMenuToggle,
2987
+ onNavItemHover = _a.onNavItemHover,
2988
+ onDropdownClose = _a.onDropdownClose,
2989
+ onMegaItemHover = _a.onMegaItemHover,
2990
+ onMobileItemClick = _a.onMobileItemClick,
2991
+ onMobileBreadcrumbClick = _a.onMobileBreadcrumbClick,
2992
+ children = _a.children;
2993
+ var _l = useState(false),
2994
+ searchOpen = _l[0],
2995
+ setSearchOpen = _l[1];
2996
+ var headerRef = useRef(null);
2997
+ var mobileOpen = menuOpen || mobileLevel > 0;
2998
+ var columns = children ? [] : getMegaColumns(navItems, activePath);
2999
+ var mobileItems = getItemsAtLevel(navItems, activePath, mobileLevel || 1);
3000
+ var mobileBackLabel = activePath[activePath.length - 1] || "menu";
3001
+ var dropdownOpen = variant === "dropdown" && hasOpenNavItem(navItems);
3002
+ useEffect(function () {
3003
+ if (!menuOpen && !dropdownOpen) {
3004
+ return undefined;
3005
+ }
3006
+ var closeOnOutsidePointerDown = function (event) {
3007
+ var _a;
3008
+ if ((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
3009
+ return;
3010
+ }
3011
+ if (menuOpen) {
3012
+ onMenuToggle === null || onMenuToggle === void 0 ? void 0 : onMenuToggle();
3013
+ }
3014
+ if (dropdownOpen) {
3015
+ onDropdownClose === null || onDropdownClose === void 0 ? void 0 : onDropdownClose();
3016
+ }
3017
+ };
3018
+ document.addEventListener("mousedown", closeOnOutsidePointerDown);
3019
+ document.addEventListener("touchstart", closeOnOutsidePointerDown);
3020
+ return function () {
3021
+ document.removeEventListener("mousedown", closeOnOutsidePointerDown);
3022
+ document.removeEventListener("touchstart", closeOnOutsidePointerDown);
3023
+ };
3024
+ }, [dropdownOpen, menuOpen, onDropdownClose, onMenuToggle]);
3025
+ useEffect(function () {
3026
+ if (variant !== "mega" || !children || !menuOpen || !headerRef.current) {
3027
+ return undefined;
3028
+ }
3029
+ var megaItems = Array.from(headerRef.current.querySelectorAll(".lsg-header__mega-item--has-children"));
3030
+ var removeListeners = megaItems.map(function (item) {
3031
+ var onMouseEnter = function () {
3032
+ return activateMegaMenuItem(item);
3033
+ };
3034
+ var onFocusIn = function () {
3035
+ return activateMegaMenuItem(item);
3036
+ };
3037
+ item.addEventListener("mouseenter", onMouseEnter);
3038
+ item.addEventListener("focusin", onFocusIn);
3039
+ return function () {
3040
+ item.removeEventListener("mouseenter", onMouseEnter);
3041
+ item.removeEventListener("focusin", onFocusIn);
3042
+ };
3043
+ });
3044
+ return function () {
3045
+ removeListeners.forEach(function (removeListener) {
3046
+ return removeListener();
3047
+ });
3048
+ if (headerRef.current) {
3049
+ clearMegaMenuBranch(headerRef.current);
3050
+ }
3051
+ };
3052
+ }, [children, menuOpen, variant]);
3053
+ var openSearch = function () {
3054
+ return setSearchOpen(true);
3055
+ };
3056
+ var renderActions = function (showMenu) {
3057
+ if (showMenu === void 0) {
3058
+ showMenu = false;
3059
+ }
3060
+ return /*#__PURE__*/React.createElement("div", {
3061
+ className: "lsg-header__actions"
3062
+ }, showMenu && variant === "mega" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
3063
+ type: "button",
3064
+ className: "lsg-header__menu-trigger",
3065
+ "aria-label": menuOpen ? "Close menu" : "Open menu",
3066
+ "aria-expanded": menuOpen,
3067
+ onClick: onMenuToggle,
3068
+ "data-lsg-menu-trigger": true
3069
+ }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
3070
+ name: menuOpen ? "close" : "bars"
3071
+ }), /*#__PURE__*/React.createElement("span", null, menuOpen ? "CLOSE" : "MENU")), /*#__PURE__*/React.createElement("span", {
3072
+ className: "lsg-header__separator",
3073
+ "aria-hidden": "true"
3074
+ }, "|")), /*#__PURE__*/React.createElement(HeaderActionButton, {
3075
+ label: searchLabel,
3076
+ icon: "search",
3077
+ controls: SEARCH_OVERLAY_ID,
3078
+ onClick: openSearch
3079
+ }), languages.length > 0 && /*#__PURE__*/React.createElement(LsgLanguageSwitcher, {
3080
+ currentLanguage: currentLanguage,
3081
+ languages: languages,
3082
+ label: "Current language: ".concat(currentLanguage),
3083
+ onLanguageChange: onLanguageChange
3084
+ }));
3085
+ };
3086
+ var renderMegaPanel = function () {
3087
+ return /*#__PURE__*/React.createElement("div", {
3088
+ className: "lsg-header__mega-panel"
3089
+ }, /*#__PURE__*/React.createElement("div", {
3090
+ className: "lsg-header__mega-inner"
3091
+ }, columns.map(function (columnItems, columnIndex) {
3092
+ return /*#__PURE__*/React.createElement("ul", {
3093
+ key: "mega-column-".concat(columnIndex),
3094
+ className: "lsg-header__mega-column",
3095
+ role: "list"
3096
+ }, columnItems.map(function (item) {
3097
+ var _a;
3098
+ var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
3099
+ return /*#__PURE__*/React.createElement("li", {
3100
+ key: "".concat(item.href, "-").concat(columnIndex),
3101
+ className: ["lsg-header__mega-item", hasChildren ? "lsg-header__mega-item--has-children" : "", isSelectedAtLevel(item, activePath, columnIndex) ? "lsg-header__mega-item--active" : ""].filter(Boolean).join(" "),
3102
+ onMouseEnter: function () {
3103
+ if (onMegaItemHover && hasChildren) {
3104
+ onMegaItemHover(item, columnIndex);
3105
+ }
3106
+ }
3107
+ }, /*#__PURE__*/React.createElement("a", {
3108
+ href: item.href,
3109
+ className: "lsg-header__mega-link"
3110
+ }, /*#__PURE__*/React.createElement("span", null, item.label), hasChildren && /*#__PURE__*/React.createElement(LsgHeaderIcon, {
3111
+ name: "chevronRight"
3112
+ })));
3113
+ }));
3114
+ })));
3115
+ };
3116
+ var renderMobileMenu = function () {
3117
+ return /*#__PURE__*/React.createElement("div", {
3118
+ className: "lsg-header__mobile-panel"
3119
+ }, variant === "dropdown" ? /*#__PURE__*/React.createElement(LsgNavigation, {
3120
+ items: navItems,
3121
+ variant: "dropdown",
3122
+ onItemClick: function (item, level) {
3123
+ return onMobileItemClick === null || onMobileItemClick === void 0 ? void 0 : onMobileItemClick(item, level + 1);
3124
+ }
3125
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, variant === "mega" && mobileLevel > 1 && /*#__PURE__*/React.createElement("nav", {
3126
+ className: "lsg-header__mobile-back",
3127
+ "aria-label": "Menu navigation"
3128
+ }, /*#__PURE__*/React.createElement("button", {
3129
+ type: "button",
3130
+ className: "lsg-header__mobile-back-button",
3131
+ "aria-label": "Back to ".concat(mobileBackLabel),
3132
+ onClick: function () {
3133
+ return onMobileBreadcrumbClick === null || onMobileBreadcrumbClick === void 0 ? void 0 : onMobileBreadcrumbClick(Math.max(1, mobileLevel - 1));
3134
+ }
3135
+ }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
3136
+ name: "chevronRight"
3137
+ }), /*#__PURE__*/React.createElement("span", null, "Back to ", mobileBackLabel))), /*#__PURE__*/React.createElement("ul", {
3138
+ className: "lsg-header__mobile-list",
3139
+ role: "list"
3140
+ }, mobileItems.map(function (item, index) {
3141
+ var _a;
3142
+ var hasChildren = Boolean((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
3143
+ var isSelected = mobileSelectedLabel ? item.label === mobileSelectedLabel : isCurrentOrActiveAtLevel(item, activePath, Math.max(0, mobileLevel - 1));
3144
+ return /*#__PURE__*/React.createElement("li", {
3145
+ key: "".concat(item.href, "-mobile-").concat(index),
3146
+ className: ["lsg-header__mobile-item", hasChildren ? "lsg-header__mobile-item--has-children" : "", isSelected ? "lsg-header__mobile-item--active" : ""].filter(Boolean).join(" ")
3147
+ }, /*#__PURE__*/React.createElement("a", {
3148
+ href: item.href,
3149
+ className: "lsg-header__mobile-link",
3150
+ onClick: function (event) {
3151
+ if (onMobileItemClick && hasChildren) {
3152
+ event.preventDefault();
3153
+ onMobileItemClick(item, Math.max(1, mobileLevel || 1));
3154
+ }
3155
+ }
3156
+ }, /*#__PURE__*/React.createElement("span", null, item.label), hasChildren && /*#__PURE__*/React.createElement(LsgHeaderIcon, {
3157
+ name: "chevronRight"
3158
+ })));
3159
+ }))));
3160
+ };
3161
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LsgSearchOverlay, {
3162
+ id: SEARCH_OVERLAY_ID,
3163
+ isOpen: searchOpen,
3164
+ onClose: function () {
3165
+ return setSearchOpen(false);
3166
+ },
3167
+ placeholder: searchPlaceholder
3168
+ }), /*#__PURE__*/React.createElement("header", {
3169
+ ref: headerRef,
3170
+ className: ["lsg-header", "lsg-header--".concat(variant), menuOpen ? "lsg-header--menu-open" : "", "lsg-header--mobile-level-".concat(mobileLevel)].filter(Boolean).join(" ")
3171
+ }, /*#__PURE__*/React.createElement("div", {
3172
+ className: "lsg-header__inner"
3173
+ }, /*#__PURE__*/React.createElement("div", {
3174
+ className: "lsg-logo-decorator"
3175
+ }, /*#__PURE__*/React.createElement("div", {
3176
+ className: "lsg-logo"
3177
+ }, /*#__PURE__*/React.createElement(LsgLogo, logo))), variant !== "mega" && navItems.length > 0 && /*#__PURE__*/React.createElement("div", {
3178
+ className: "lsg-header__nav"
3179
+ }, /*#__PURE__*/React.createElement(LsgNavigation, {
3180
+ items: navItems,
3181
+ variant: variant,
3182
+ onItemHover: onNavItemHover
3183
+ })), variant === "mega" && /*#__PURE__*/React.createElement("div", {
3184
+ className: "lsg-header__desktop-menu"
3185
+ }, renderActions(true)), variant !== "mega" && /*#__PURE__*/React.createElement("div", {
3186
+ className: "lsg-header__desktop-actions"
3187
+ }, /*#__PURE__*/React.createElement("span", {
3188
+ className: "lsg-header__separator",
3189
+ "aria-hidden": "true"
3190
+ }, "|"), renderActions(false)), /*#__PURE__*/React.createElement("div", {
3191
+ className: "lsg-header__mobile-actions"
3192
+ }, /*#__PURE__*/React.createElement(HeaderActionButton, {
3193
+ label: searchLabel,
3194
+ icon: "search",
3195
+ controls: SEARCH_OVERLAY_ID,
3196
+ onClick: openSearch
3197
+ }), languages.length > 0 && /*#__PURE__*/React.createElement(LsgLanguageSwitcher, {
3198
+ currentLanguage: currentLanguage,
3199
+ languages: languages,
3200
+ label: "Current language: ".concat(currentLanguage),
3201
+ onLanguageChange: onLanguageChange
3202
+ }), /*#__PURE__*/React.createElement("span", {
3203
+ className: "lsg-header__separator",
3204
+ "aria-hidden": "true"
3205
+ }, "|"), /*#__PURE__*/React.createElement("button", {
3206
+ type: "button",
3207
+ className: "lsg-header__icon-button",
3208
+ "aria-label": mobileOpen ? "Close menu" : "Open menu",
3209
+ "aria-expanded": mobileOpen,
3210
+ onClick: onMenuToggle,
3211
+ "data-lsg-menu-trigger": true
3212
+ }, /*#__PURE__*/React.createElement(LsgHeaderIcon, {
3213
+ name: mobileOpen ? "close" : "bars"
3214
+ })))), variant === "mega" && menuOpen && (children || renderMegaPanel()), mobileOpen && renderMobileMenu()));
3215
+ };
3216
+
3217
+ var LsgQuickLinks = function (_a) {
3218
+ var heading = _a.heading,
3219
+ links = _a.links;
3220
+ return /*#__PURE__*/React.createElement("nav", {
3221
+ className: "lsg-quick-links",
3222
+ "aria-label": heading !== null && heading !== void 0 ? heading : "Quick links"
3223
+ }, heading && /*#__PURE__*/React.createElement("p", {
3224
+ className: "lsg-quick-links__heading",
3225
+ "aria-hidden": "true"
3226
+ }, heading), /*#__PURE__*/React.createElement("ul", {
3227
+ className: "lsg-quick-links__list",
3228
+ role: "list"
3229
+ }, links.map(function (link) {
3230
+ return /*#__PURE__*/React.createElement("li", {
3231
+ key: link.href,
3232
+ className: "lsg-quick-links__item"
3233
+ }, /*#__PURE__*/React.createElement("a", {
3234
+ href: link.href,
3235
+ className: "lsg-quick-links__link"
3236
+ }, link.label));
3237
+ })));
3238
+ };
3239
+
3240
+ var platformIcons = {
3241
+ linkedin: /*#__PURE__*/React.createElement("svg", {
3242
+ viewBox: "0 0 24 24",
3243
+ xmlns: "http://www.w3.org/2000/svg",
3244
+ "aria-hidden": "true",
3245
+ focusable: "false"
3246
+ }, /*#__PURE__*/React.createElement("path", {
3247
+ d: "M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.95v5.66H9.34V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.45v6.29zM5.34 7.43a2.07 2.07 0 1 1 0-4.14 2.07 2.07 0 0 1 0 4.14zM7.12 20.45H3.55V9h3.57v11.45z"
3248
+ })),
3249
+ twitter: /*#__PURE__*/React.createElement("svg", {
3250
+ viewBox: "0 0 24 24",
3251
+ xmlns: "http://www.w3.org/2000/svg",
3252
+ "aria-hidden": "true",
3253
+ focusable: "false"
3254
+ }, /*#__PURE__*/React.createElement("path", {
3255
+ d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
3256
+ })),
3257
+ facebook: /*#__PURE__*/React.createElement("svg", {
3258
+ viewBox: "0 0 24 24",
3259
+ xmlns: "http://www.w3.org/2000/svg",
3260
+ "aria-hidden": "true",
3261
+ focusable: "false"
3262
+ }, /*#__PURE__*/React.createElement("path", {
3263
+ d: "M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.874v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"
3264
+ })),
3265
+ instagram: /*#__PURE__*/React.createElement("svg", {
3266
+ viewBox: "0 0 24 24",
3267
+ xmlns: "http://www.w3.org/2000/svg",
3268
+ "aria-hidden": "true",
3269
+ focusable: "false"
3270
+ }, /*#__PURE__*/React.createElement("path", {
3271
+ d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z"
3272
+ })),
3273
+ youtube: /*#__PURE__*/React.createElement("svg", {
3274
+ viewBox: "0 0 24 24",
3275
+ xmlns: "http://www.w3.org/2000/svg",
3276
+ "aria-hidden": "true",
3277
+ focusable: "false"
3278
+ }, /*#__PURE__*/React.createElement("path", {
3279
+ d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
3280
+ }))
3281
+ };
3282
+ var LsgSocialMediaIcons = function (_a) {
3283
+ var items = _a.items;
3284
+ return /*#__PURE__*/React.createElement("ul", {
3285
+ className: "lsg-social-icons",
3286
+ role: "list"
3287
+ }, items.map(function (item) {
3288
+ return /*#__PURE__*/React.createElement("li", {
3289
+ key: item.platform,
3290
+ className: "lsg-social-icons__item"
3291
+ }, /*#__PURE__*/React.createElement("a", {
3292
+ href: item.href,
3293
+ className: "lsg-social-icons__link",
3294
+ "aria-label": item.label,
3295
+ target: "_blank",
3296
+ rel: "noopener noreferrer"
3297
+ }, platformIcons[item.platform]));
3298
+ }));
3299
+ };
3300
+
3301
+ var PhoneIcon = function () {
3302
+ return /*#__PURE__*/React.createElement("svg", {
3303
+ width: "20",
3304
+ height: "20",
3305
+ viewBox: "0 0 20 20",
3306
+ fill: "none",
3307
+ xmlns: "http://www.w3.org/2000/svg",
3308
+ "aria-hidden": "true"
3309
+ }, /*#__PURE__*/React.createElement("path", {
3310
+ d: "M15.833 13.483c-.417-.416-1.25-.833-1.875-1.083-.625-.25-1.042-.167-1.458.208l-.834.833c-.208.209-.5.209-.708.042-.625-.5-1.833-1.583-2.583-2.333-.75-.75-1.75-1.875-2.25-2.583-.167-.208-.125-.5.083-.709l.834-.833c.416-.417.5-.833.25-1.458-.25-.625-.667-1.458-1.084-1.875C8.791 3.25 8.208 3 7.583 3c-.416 0-.833.167-1.125.458L5.625 4.292C4.5 5.417 4.708 7.125 5.333 8.833c.625 1.708 2 3.833 3.625 5.458 1.625 1.625 3.75 3 5.458 3.625 1.709.625 3.417.833 4.542-.292l.833-.833c.292-.292.458-.708.458-1.125 0-.625-.25-1.208-.416-1.583z",
3311
+ fill: "currentColor"
3312
+ }));
3313
+ };
3314
+ var FaxIcon = function () {
3315
+ return /*#__PURE__*/React.createElement("svg", {
3316
+ width: "20",
3317
+ height: "20",
3318
+ viewBox: "0 0 20 20",
3319
+ fill: "none",
3320
+ xmlns: "http://www.w3.org/2000/svg",
3321
+ "aria-hidden": "true"
3322
+ }, /*#__PURE__*/React.createElement("path", {
3323
+ d: "M16 6h-1V2H5v4H4c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h1v2h10v-2h1c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM7 4h6v2H7V4zm6 12H7v-4h6v4zm3-5H4V8h12v3z",
3324
+ fill: "currentColor"
3325
+ }));
3326
+ };
3327
+ var MailIcon = function () {
3328
+ return /*#__PURE__*/React.createElement("svg", {
3329
+ width: "24",
3330
+ height: "20",
3331
+ viewBox: "0 0 24 20",
3332
+ fill: "none",
3333
+ xmlns: "http://www.w3.org/2000/svg",
3334
+ "aria-hidden": "true"
3335
+ }, /*#__PURE__*/React.createElement("path", {
3336
+ d: "M20 0H4C2.9 0 2 .9 2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V2l8 5 8-5v2z",
3337
+ fill: "currentColor"
3338
+ }));
3339
+ };
3340
+ var LocationIcon = function () {
3341
+ return /*#__PURE__*/React.createElement("svg", {
3342
+ width: "18",
3343
+ height: "21",
3344
+ viewBox: "0 0 18 24",
3345
+ fill: "none",
3346
+ xmlns: "http://www.w3.org/2000/svg",
3347
+ "aria-hidden": "true"
3348
+ }, /*#__PURE__*/React.createElement("path", {
3349
+ d: "M9 0C5.13 0 2 3.13 2 7c0 5.25 7 13 7 13s7-7.75 7-13C16 3.13 12.87 0 9 0zm0 9.5C7.62 9.5 6.5 8.38 6.5 7S7.62 4.5 9 4.5 11.5 5.62 11.5 7 10.38 9.5 9 9.5z",
3350
+ fill: "currentColor"
3351
+ }));
3352
+ };
3353
+ var AiBadge = function () {
3354
+ return /*#__PURE__*/React.createElement("span", {
3355
+ className: "lsg-footer__ai-badge"
3356
+ }, /*#__PURE__*/React.createElement("svg", {
3357
+ width: "16",
3358
+ height: "16",
3359
+ viewBox: "0 0 24 24",
3360
+ fill: "none",
3361
+ xmlns: "http://www.w3.org/2000/svg",
3362
+ "aria-hidden": "true"
3363
+ }, /*#__PURE__*/React.createElement("circle", {
3364
+ cx: "12",
3365
+ cy: "12",
3366
+ r: "10",
3367
+ stroke: "currentColor",
3368
+ strokeWidth: "1.5"
3369
+ }), /*#__PURE__*/React.createElement("path", {
3370
+ d: "M2 12h20M12 2a15.3 15.3 0 0 1 0 20M12 2a15.3 15.3 0 0 0 0 20",
3371
+ stroke: "currentColor",
3372
+ strokeWidth: "1.5"
3373
+ })), "This Website Is Translated With AI");
3374
+ };
3375
+ var SocialIcon = function (_a) {
3376
+ var _b;
3377
+ var platform = _a.platform;
3378
+ var icons = {
3379
+ facebook: /*#__PURE__*/React.createElement("svg", {
3380
+ width: "20",
3381
+ height: "20",
3382
+ viewBox: "0 0 24 24",
3383
+ fill: "currentColor",
3384
+ xmlns: "http://www.w3.org/2000/svg",
3385
+ "aria-hidden": "true"
3386
+ }, /*#__PURE__*/React.createElement("path", {
3387
+ d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"
3388
+ })),
3389
+ twitter: /*#__PURE__*/React.createElement("svg", {
3390
+ width: "20",
3391
+ height: "20",
3392
+ viewBox: "0 0 24 24",
3393
+ fill: "currentColor",
3394
+ xmlns: "http://www.w3.org/2000/svg",
3395
+ "aria-hidden": "true"
3396
+ }, /*#__PURE__*/React.createElement("path", {
3397
+ d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
3398
+ })),
3399
+ linkedin: /*#__PURE__*/React.createElement("svg", {
3400
+ width: "20",
3401
+ height: "20",
3402
+ viewBox: "0 0 24 24",
3403
+ fill: "currentColor",
3404
+ xmlns: "http://www.w3.org/2000/svg",
3405
+ "aria-hidden": "true"
3406
+ }, /*#__PURE__*/React.createElement("path", {
3407
+ d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6zM2 9h4v12H2z"
3408
+ }), /*#__PURE__*/React.createElement("circle", {
3409
+ cx: "4",
3410
+ cy: "4",
3411
+ r: "2"
3412
+ })),
3413
+ youtube: /*#__PURE__*/React.createElement("svg", {
3414
+ width: "20",
3415
+ height: "20",
3416
+ viewBox: "0 0 24 24",
3417
+ fill: "currentColor",
3418
+ xmlns: "http://www.w3.org/2000/svg",
3419
+ "aria-hidden": "true"
3420
+ }, /*#__PURE__*/React.createElement("path", {
3421
+ d: "M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58A2.78 2.78 0 0 0 3.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.4a2.78 2.78 0 0 0 1.95-1.95A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"
3422
+ })),
3423
+ instagram: /*#__PURE__*/React.createElement("svg", {
3424
+ width: "20",
3425
+ height: "20",
3426
+ viewBox: "0 0 24 24",
3427
+ fill: "none",
3428
+ stroke: "currentColor",
3429
+ strokeWidth: "2",
3430
+ xmlns: "http://www.w3.org/2000/svg",
3431
+ "aria-hidden": "true"
3432
+ }, /*#__PURE__*/React.createElement("rect", {
3433
+ x: "2",
3434
+ y: "2",
3435
+ width: "20",
3436
+ height: "20",
3437
+ rx: "5",
3438
+ ry: "5"
3439
+ }), /*#__PURE__*/React.createElement("circle", {
3440
+ cx: "12",
3441
+ cy: "12",
3442
+ r: "4"
3443
+ }), /*#__PURE__*/React.createElement("circle", {
3444
+ cx: "17.5",
3445
+ cy: "6.5",
3446
+ r: "0.5",
3447
+ fill: "currentColor"
3448
+ }))
3449
+ };
3450
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (_b = icons[platform]) !== null && _b !== void 0 ? _b : null);
2946
3451
  };
2947
- function OptionsHandler(ownerWindow) {
2948
- function mergeOptions(optionsA, optionsB) {
2949
- return objectsMergeDeep(optionsA, optionsB || {});
2950
- }
2951
- function optionsAtMedia(options) {
2952
- const optionsAtMedia = options.breakpoints || {};
2953
- const matchedMediaOptions = objectKeys(optionsAtMedia).filter(media => ownerWindow.matchMedia(media).matches).map(media => optionsAtMedia[media]).reduce((a, mediaOption) => mergeOptions(a, mediaOption), {});
2954
- return mergeOptions(options, matchedMediaOptions);
2955
- }
2956
- function optionsMediaQueries(optionsList) {
2957
- return optionsList.map(options => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
2958
- }
2959
- const self = {
2960
- mergeOptions,
2961
- optionsAtMedia,
2962
- optionsMediaQueries
2963
- };
2964
- return self;
2965
- }
2966
- function PluginsHandler(optionsHandler) {
2967
- let activePlugins = [];
2968
- function init(emblaApi, plugins) {
2969
- activePlugins = plugins.filter(({
2970
- options
2971
- }) => optionsHandler.optionsAtMedia(options).active !== false);
2972
- activePlugins.forEach(plugin => plugin.init(emblaApi, optionsHandler));
2973
- return plugins.reduce((map, plugin) => Object.assign(map, {
2974
- [plugin.name]: plugin
2975
- }), {});
2976
- }
2977
- function destroy() {
2978
- activePlugins = activePlugins.filter(plugin => plugin.destroy());
2979
- }
2980
- const self = {
2981
- init,
2982
- destroy
2983
- };
2984
- return self;
2985
- }
2986
- function EmblaCarousel(root, userOptions, userPlugins) {
2987
- const ownerDocument = root.ownerDocument;
2988
- const ownerWindow = ownerDocument.defaultView;
2989
- const optionsHandler = OptionsHandler(ownerWindow);
2990
- const pluginsHandler = PluginsHandler(optionsHandler);
2991
- const mediaHandlers = EventStore();
2992
- const eventHandler = EventHandler();
2993
- const {
2994
- mergeOptions,
2995
- optionsAtMedia,
2996
- optionsMediaQueries
2997
- } = optionsHandler;
2998
- const {
2999
- on,
3000
- off,
3001
- emit
3002
- } = eventHandler;
3003
- const reInit = reActivate;
3004
- let destroyed = false;
3005
- let engine;
3006
- let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
3007
- let options = mergeOptions(optionsBase);
3008
- let pluginList = [];
3009
- let pluginApis;
3010
- let container;
3011
- let slides;
3012
- function storeElements() {
3013
- const {
3014
- container: userContainer,
3015
- slides: userSlides
3016
- } = options;
3017
- const customContainer = isString(userContainer) ? root.querySelector(userContainer) : userContainer;
3018
- container = customContainer || root.children[0];
3019
- const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
3020
- slides = [].slice.call(customSlides || container.children);
3021
- }
3022
- function createEngine(options) {
3023
- const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler);
3024
- if (options.loop && !engine.slideLooper.canLoop()) {
3025
- const optionsWithoutLoop = Object.assign({}, options, {
3026
- loop: false
3027
- });
3028
- return createEngine(optionsWithoutLoop);
3029
- }
3030
- return engine;
3031
- }
3032
- function activate(withOptions, withPlugins) {
3033
- if (destroyed) return;
3034
- optionsBase = mergeOptions(optionsBase, withOptions);
3035
- options = optionsAtMedia(optionsBase);
3036
- pluginList = withPlugins || pluginList;
3037
- storeElements();
3038
- engine = createEngine(options);
3039
- optionsMediaQueries([optionsBase, ...pluginList.map(({
3040
- options
3041
- }) => options)]).forEach(query => mediaHandlers.add(query, 'change', reActivate));
3042
- if (!options.active) return;
3043
- engine.translate.to(engine.location.get());
3044
- engine.animation.init();
3045
- engine.slidesInView.init();
3046
- engine.slideFocus.init(self);
3047
- engine.eventHandler.init(self);
3048
- engine.resizeHandler.init(self);
3049
- engine.slidesHandler.init(self);
3050
- if (engine.options.loop) engine.slideLooper.loop();
3051
- if (container.offsetParent && slides.length) engine.dragHandler.init(self);
3052
- pluginApis = pluginsHandler.init(self, pluginList);
3053
- }
3054
- function reActivate(withOptions, withPlugins) {
3055
- const startIndex = selectedScrollSnap();
3056
- deActivate();
3057
- activate(mergeOptions({
3058
- startIndex
3059
- }, withOptions), withPlugins);
3060
- eventHandler.emit('reInit');
3061
- }
3062
- function deActivate() {
3063
- engine.dragHandler.destroy();
3064
- engine.eventStore.clear();
3065
- engine.translate.clear();
3066
- engine.slideLooper.clear();
3067
- engine.resizeHandler.destroy();
3068
- engine.slidesHandler.destroy();
3069
- engine.slidesInView.destroy();
3070
- engine.animation.destroy();
3071
- pluginsHandler.destroy();
3072
- mediaHandlers.clear();
3073
- }
3074
- function destroy() {
3075
- if (destroyed) return;
3076
- destroyed = true;
3077
- mediaHandlers.clear();
3078
- deActivate();
3079
- eventHandler.emit('destroy');
3080
- eventHandler.clear();
3081
- }
3082
- function scrollTo(index, jump, direction) {
3083
- if (!options.active || destroyed) return;
3084
- engine.scrollBody.useBaseFriction().useDuration(jump === true ? 0 : options.duration);
3085
- engine.scrollTo.index(index, direction || 0);
3086
- }
3087
- function scrollNext(jump) {
3088
- const next = engine.index.add(1).get();
3089
- scrollTo(next, jump, -1);
3090
- }
3091
- function scrollPrev(jump) {
3092
- const prev = engine.index.add(-1).get();
3093
- scrollTo(prev, jump, 1);
3094
- }
3095
- function canScrollNext() {
3096
- const next = engine.index.add(1).get();
3097
- return next !== selectedScrollSnap();
3098
- }
3099
- function canScrollPrev() {
3100
- const prev = engine.index.add(-1).get();
3101
- return prev !== selectedScrollSnap();
3102
- }
3103
- function scrollSnapList() {
3104
- return engine.scrollSnapList;
3105
- }
3106
- function scrollProgress() {
3107
- return engine.scrollProgress.get(engine.offsetLocation.get());
3108
- }
3109
- function selectedScrollSnap() {
3110
- return engine.index.get();
3111
- }
3112
- function previousScrollSnap() {
3113
- return engine.indexPrevious.get();
3114
- }
3115
- function slidesInView() {
3116
- return engine.slidesInView.get();
3117
- }
3118
- function slidesNotInView() {
3119
- return engine.slidesInView.get(false);
3120
- }
3121
- function plugins() {
3122
- return pluginApis;
3123
- }
3124
- function internalEngine() {
3125
- return engine;
3126
- }
3127
- function rootNode() {
3128
- return root;
3129
- }
3130
- function containerNode() {
3131
- return container;
3132
- }
3133
- function slideNodes() {
3134
- return slides;
3452
+ var SocialIconsRow = function (_a) {
3453
+ var links = _a.links;
3454
+ return /*#__PURE__*/React.createElement("div", {
3455
+ className: "lsg-footer__bottom-social"
3456
+ }, links.map(function (l) {
3457
+ return /*#__PURE__*/React.createElement("a", {
3458
+ key: l.platform,
3459
+ href: l.href,
3460
+ "aria-label": l.platform,
3461
+ style: {
3462
+ color: "inherit",
3463
+ display: "inline-flex",
3464
+ alignItems: "center",
3465
+ opacity: 0.8
3466
+ }
3467
+ }, /*#__PURE__*/React.createElement(SocialIcon, {
3468
+ platform: l.platform
3469
+ }));
3470
+ }));
3471
+ };
3472
+ var LsgFooter = function (_a) {
3473
+ var _b, _c, _d, _e;
3474
+ var _f = _a.variant,
3475
+ variant = _f === void 0 ? "simple" : _f,
3476
+ _g = _a.simpleTwoRow,
3477
+ simpleTwoRow = _g === void 0 ? false : _g,
3478
+ _h = _a.brandLine,
3479
+ brandLine = _h === void 0 ? "Part of Atlas Copco Group" : _h,
3480
+ _j = _a.complexColumns,
3481
+ complexColumns = _j === void 0 ? "2col" : _j,
3482
+ _k = _a.showAiBadge,
3483
+ showAiBadge = _k === void 0 ? false : _k,
3484
+ cookieSetting = _a.cookieSetting,
3485
+ logo = _a.logo,
3486
+ _l = _a.navItems,
3487
+ navItems = _l === void 0 ? [] : _l,
3488
+ contact = _a.contact,
3489
+ _m = _a.quickLinks,
3490
+ quickLinks = _m === void 0 ? [] : _m,
3491
+ copyright = _a.copyright,
3492
+ colHeadings = _a.colHeadings,
3493
+ socialLinks = _a.socialLinks,
3494
+ _o = _a.socialPosition,
3495
+ socialPosition = _o === void 0 ? "body" : _o,
3496
+ _p = _a.className,
3497
+ className = _p === void 0 ? "" : _p;
3498
+ var year = new Date().getFullYear();
3499
+ var copyrightText = copyright !== null && copyright !== void 0 ? copyright : "\u00A9 ".concat(year, " Brand - Part of Atlas Copco Group");
3500
+ // ── Simple footer ──────────────────────────────────────────────────────────
3501
+ if (variant === "simple") {
3502
+ if (simpleTwoRow) {
3503
+ return /*#__PURE__*/React.createElement("footer", {
3504
+ className: "lsg-footer lsg-footer--simple lsg-footer--simple-tworow".concat(className ? " ".concat(className) : "")
3505
+ }, /*#__PURE__*/React.createElement("div", {
3506
+ className: "lsg-footer__simple-top"
3507
+ }, /*#__PURE__*/React.createElement("span", {
3508
+ className: "lsg-footer__brand-line"
3509
+ }, brandLine), navItems.length > 0 && /*#__PURE__*/React.createElement("nav", {
3510
+ className: "lsg-footer__simple-nav",
3511
+ "aria-label": "Footer navigation"
3512
+ }, navItems.map(function (item, i) {
3513
+ return /*#__PURE__*/React.createElement(React.Fragment, {
3514
+ key: item.href
3515
+ }, i > 0 && /*#__PURE__*/React.createElement("span", {
3516
+ className: "lsg-footer__pipe",
3517
+ "aria-hidden": "true"
3518
+ }, "|"), /*#__PURE__*/React.createElement("a", {
3519
+ href: item.href,
3520
+ className: "lsg-footer__simple-nav-item"
3521
+ }, item.label));
3522
+ }))), /*#__PURE__*/React.createElement("div", {
3523
+ className: "lsg-footer__simple-bottom"
3524
+ }, /*#__PURE__*/React.createElement("div", {
3525
+ className: "lsg-footer__simple-bottom-left"
3526
+ }, cookieSetting && /*#__PURE__*/React.createElement("a", {
3527
+ href: "#",
3528
+ className: "lsg-footer__cookie-link"
3529
+ }, cookieSetting), /*#__PURE__*/React.createElement("p", {
3530
+ className: "lsg-footer__copyright"
3531
+ }, copyrightText)), showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null)));
3532
+ }
3533
+ return /*#__PURE__*/React.createElement("footer", {
3534
+ className: "lsg-footer lsg-footer--simple".concat(className ? " ".concat(className) : "")
3535
+ }, /*#__PURE__*/React.createElement("div", {
3536
+ className: "lsg-footer__simple-inner"
3537
+ }, /*#__PURE__*/React.createElement("p", {
3538
+ className: "lsg-footer__copyright"
3539
+ }, copyrightText), navItems.length > 0 && /*#__PURE__*/React.createElement("nav", {
3540
+ className: "lsg-footer__simple-nav",
3541
+ "aria-label": "Footer navigation"
3542
+ }, navItems.map(function (item, i) {
3543
+ return /*#__PURE__*/React.createElement(React.Fragment, {
3544
+ key: item.href
3545
+ }, i > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
3546
+ className: "lsg-footer__pipe",
3547
+ "aria-hidden": "true"
3548
+ }, "|"), /*#__PURE__*/React.createElement("hr", {
3549
+ className: "lsg-footer__mobile-divider",
3550
+ "aria-hidden": "true"
3551
+ })), /*#__PURE__*/React.createElement("a", {
3552
+ href: item.href,
3553
+ className: "lsg-footer__simple-nav-item"
3554
+ }, item.label));
3555
+ }))));
3135
3556
  }
3136
- const self = {
3137
- canScrollNext,
3138
- canScrollPrev,
3139
- containerNode,
3140
- internalEngine,
3141
- destroy,
3142
- off,
3143
- on,
3144
- emit,
3145
- plugins,
3146
- previousScrollSnap,
3147
- reInit,
3148
- rootNode,
3149
- scrollNext,
3150
- scrollPrev,
3151
- scrollProgress,
3152
- scrollSnapList,
3153
- scrollTo,
3154
- selectedScrollSnap,
3155
- slideNodes,
3156
- slidesInView,
3157
- slidesNotInView
3557
+ // ── Complex footer ─────────────────────────────────────────────────────────
3558
+ var is3col = complexColumns === "3col";
3559
+ var headings = {
3560
+ contact: (_b = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.contact) !== null && _b !== void 0 ? _b : "CONTACT",
3561
+ quickLinks: (_c = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.quickLinks) !== null && _c !== void 0 ? _c : is3col ? "Quicklinks" : "QUICK LINKS",
3562
+ about: (_d = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.about) !== null && _d !== void 0 ? _d : "About brand",
3563
+ contactAlt: (_e = colHeadings === null || colHeadings === void 0 ? void 0 : colHeadings.contactAlt) !== null && _e !== void 0 ? _e : "Contact"
3158
3564
  };
3159
- activate(userOptions, userPlugins);
3160
- setTimeout(() => eventHandler.emit('init'), 0);
3161
- return self;
3162
- }
3163
- EmblaCarousel.globalOptions = undefined;
3565
+ var bottomBar = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("hr", {
3566
+ className: "lsg-footer__bottom-divider"
3567
+ }), /*#__PURE__*/React.createElement("div", {
3568
+ className: "lsg-footer__bottom"
3569
+ }, /*#__PURE__*/React.createElement("div", {
3570
+ className: "lsg-footer__bottom-left"
3571
+ }, cookieSetting && /*#__PURE__*/React.createElement("a", {
3572
+ href: "#",
3573
+ className: "lsg-footer__cookie-link"
3574
+ }, cookieSetting), /*#__PURE__*/React.createElement("p", {
3575
+ className: "lsg-footer__copyright"
3576
+ }, copyrightText), is3col && showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null)), !is3col && showAiBadge && /*#__PURE__*/React.createElement(AiBadge, null), socialPosition === "bottom-bar" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement(SocialIconsRow, {
3577
+ links: socialLinks
3578
+ })));
3579
+ if (is3col) {
3580
+ return /*#__PURE__*/React.createElement("footer", {
3581
+ className: "lsg-footer lsg-footer--complex".concat(className ? " ".concat(className) : "")
3582
+ }, /*#__PURE__*/React.createElement("div", {
3583
+ className: "lsg-footer__complex-inner"
3584
+ }, logo && /*#__PURE__*/React.createElement("div", {
3585
+ className: "lsg-footer__logo-col"
3586
+ }, /*#__PURE__*/React.createElement(LsgLogo, logo), brandLine && /*#__PURE__*/React.createElement("span", {
3587
+ className: "lsg-footer__brand-line"
3588
+ }, brandLine)), /*#__PURE__*/React.createElement("div", {
3589
+ className: "lsg-footer__content-cols lsg-footer__content-cols--3col"
3590
+ }, /*#__PURE__*/React.createElement("div", {
3591
+ className: "lsg-footer__about-col"
3592
+ }, /*#__PURE__*/React.createElement("h3", {
3593
+ className: "lsg-footer__col-heading"
3594
+ }, headings.about), (contact === null || contact === void 0 ? void 0 : contact.address) && /*#__PURE__*/React.createElement("div", {
3595
+ className: "lsg-footer__address"
3596
+ }, /*#__PURE__*/React.createElement(LocationIcon, null), /*#__PURE__*/React.createElement("p", null, contact.address))), /*#__PURE__*/React.createElement("div", {
3597
+ className: "lsg-footer__contact-col"
3598
+ }, /*#__PURE__*/React.createElement("h3", {
3599
+ className: "lsg-footer__col-heading"
3600
+ }, headings.contactAlt), /*#__PURE__*/React.createElement("div", {
3601
+ className: "lsg-footer__contact-items"
3602
+ }, (contact === null || contact === void 0 ? void 0 : contact.phone) && /*#__PURE__*/React.createElement("div", {
3603
+ className: "lsg-footer__contact-item"
3604
+ }, /*#__PURE__*/React.createElement(PhoneIcon, null), /*#__PURE__*/React.createElement("span", null, contact.phone)), (contact === null || contact === void 0 ? void 0 : contact.fax) && /*#__PURE__*/React.createElement("div", {
3605
+ className: "lsg-footer__contact-item"
3606
+ }, /*#__PURE__*/React.createElement(FaxIcon, null), /*#__PURE__*/React.createElement("span", null, contact.fax)), (contact === null || contact === void 0 ? void 0 : contact.email) && /*#__PURE__*/React.createElement("div", {
3607
+ className: "lsg-footer__contact-item"
3608
+ }, /*#__PURE__*/React.createElement(MailIcon, null), /*#__PURE__*/React.createElement("a", {
3609
+ href: "mailto:".concat(contact.email)
3610
+ }, contact.email)))), quickLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
3611
+ className: "lsg-footer__quicklinks-col"
3612
+ }, /*#__PURE__*/React.createElement("h3", {
3613
+ className: "lsg-footer__col-heading"
3614
+ }, headings.quickLinks), /*#__PURE__*/React.createElement("ul", {
3615
+ className: "lsg-footer__quicklinks-list"
3616
+ }, quickLinks.map(function (link, i) {
3617
+ var _a;
3618
+ return /*#__PURE__*/React.createElement("li", {
3619
+ key: (_a = link.href) !== null && _a !== void 0 ? _a : i,
3620
+ className: "lsg-footer__quicklink-item"
3621
+ }, /*#__PURE__*/React.createElement("a", {
3622
+ href: link.href,
3623
+ className: "lsg-footer__quicklink"
3624
+ }, link.label), /*#__PURE__*/React.createElement("hr", {
3625
+ className: "lsg-footer__divider"
3626
+ }));
3627
+ })), socialPosition === "body" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
3628
+ className: "lsg-footer__body-social"
3629
+ }, /*#__PURE__*/React.createElement(SocialIconsRow, {
3630
+ links: socialLinks
3631
+ }))))), bottomBar);
3632
+ }
3633
+ return /*#__PURE__*/React.createElement("footer", {
3634
+ className: "lsg-footer lsg-footer--complex".concat(className ? " ".concat(className) : "")
3635
+ }, /*#__PURE__*/React.createElement("div", {
3636
+ className: "lsg-footer__complex-inner"
3637
+ }, logo && /*#__PURE__*/React.createElement("div", {
3638
+ className: "lsg-footer__logo-col"
3639
+ }, /*#__PURE__*/React.createElement(LsgLogo, logo), brandLine && /*#__PURE__*/React.createElement("span", {
3640
+ className: "lsg-footer__brand-line"
3641
+ }, brandLine)), /*#__PURE__*/React.createElement("div", {
3642
+ className: "lsg-footer__content-cols"
3643
+ }, contact && /*#__PURE__*/React.createElement("div", {
3644
+ className: "lsg-footer__contact-col"
3645
+ }, /*#__PURE__*/React.createElement("h3", {
3646
+ className: "lsg-footer__col-heading"
3647
+ }, headings.contact), contact.address && /*#__PURE__*/React.createElement("div", {
3648
+ className: "lsg-footer__address"
3649
+ }, /*#__PURE__*/React.createElement(LocationIcon, null), /*#__PURE__*/React.createElement("p", null, contact.address)), /*#__PURE__*/React.createElement("hr", {
3650
+ className: "lsg-footer__divider"
3651
+ }), /*#__PURE__*/React.createElement("div", {
3652
+ className: "lsg-footer__contact-items"
3653
+ }, contact.phone && /*#__PURE__*/React.createElement("div", {
3654
+ className: "lsg-footer__contact-item"
3655
+ }, /*#__PURE__*/React.createElement(PhoneIcon, null), /*#__PURE__*/React.createElement("span", null, contact.phone)), contact.fax && /*#__PURE__*/React.createElement("div", {
3656
+ className: "lsg-footer__contact-item"
3657
+ }, /*#__PURE__*/React.createElement(FaxIcon, null), /*#__PURE__*/React.createElement("span", null, contact.fax)), contact.email && /*#__PURE__*/React.createElement("div", {
3658
+ className: "lsg-footer__contact-item"
3659
+ }, /*#__PURE__*/React.createElement(MailIcon, null), /*#__PURE__*/React.createElement("a", {
3660
+ href: "mailto:".concat(contact.email)
3661
+ }, contact.email)))), quickLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
3662
+ className: "lsg-footer__quicklinks-col"
3663
+ }, /*#__PURE__*/React.createElement("h3", {
3664
+ className: "lsg-footer__col-heading"
3665
+ }, headings.quickLinks), /*#__PURE__*/React.createElement("ul", {
3666
+ className: "lsg-footer__quicklinks-list"
3667
+ }, quickLinks.map(function (link, i) {
3668
+ var _a;
3669
+ return /*#__PURE__*/React.createElement("li", {
3670
+ key: (_a = link.href) !== null && _a !== void 0 ? _a : i,
3671
+ className: "lsg-footer__quicklink-item"
3672
+ }, /*#__PURE__*/React.createElement("a", {
3673
+ href: link.href,
3674
+ className: "lsg-footer__quicklink"
3675
+ }, link.label), /*#__PURE__*/React.createElement("hr", {
3676
+ className: "lsg-footer__divider"
3677
+ }));
3678
+ })), socialPosition === "body" && socialLinks && socialLinks.length > 0 && /*#__PURE__*/React.createElement("div", {
3679
+ className: "lsg-footer__body-social"
3680
+ }, /*#__PURE__*/React.createElement(SocialIconsRow, {
3681
+ links: socialLinks
3682
+ }))))), bottomBar);
3683
+ };
3164
3684
 
3165
3685
  function clampNumber(number, min, max) {
3166
3686
  return Math.min(Math.max(number, min), max);
@@ -4651,6 +5171,7 @@ var LsgFormContainer = function (_a) {
4651
5171
  var BASE_COMPONENTS = {
4652
5172
  LsgButton: LsgButton,
4653
5173
  LsgBanner: LsgBanner,
5174
+ LsgCarousel: LsgCarousel,
4654
5175
  LsgCard: LsgCard,
4655
5176
  LsgCards: LsgCards,
4656
5177
  LsgBreadcrumb: LsgBreadcrumb,
@@ -4688,6 +5209,7 @@ function createThemeComponents(themeName) {
4688
5209
  return {
4689
5210
  LsgButton: createThemeComponent(themeName, "button", BASE_COMPONENTS.LsgButton),
4690
5211
  LsgBanner: createThemeComponent(themeName, "banner", BASE_COMPONENTS.LsgBanner),
5212
+ LsgCarousel: createThemeComponent(themeName, "carousel", BASE_COMPONENTS.LsgCarousel),
4691
5213
  LsgCard: createThemeComponent(themeName, "card", BASE_COMPONENTS.LsgCard),
4692
5214
  LsgCards: createThemeComponent(themeName, "cards", BASE_COMPONENTS.LsgCards),
4693
5215
  LsgBreadcrumb: createThemeComponent(themeName, "breadcrumb", BASE_COMPONENTS.LsgBreadcrumb),
@@ -4717,6 +5239,7 @@ function createThemeComponents(themeName) {
4717
5239
  var theme1Components = createThemeComponents("theme-1");
4718
5240
  var Theme1LsgButton = theme1Components.LsgButton,
4719
5241
  Theme1LsgBanner = theme1Components.LsgBanner,
5242
+ Theme1LsgCarousel = theme1Components.LsgCarousel,
4720
5243
  Theme1LsgCard = theme1Components.LsgCard,
4721
5244
  Theme1LsgCards = theme1Components.LsgCards,
4722
5245
  Theme1LsgBreadcrumb = theme1Components.LsgBreadcrumb,
@@ -4745,6 +5268,7 @@ var Theme1LsgButton = theme1Components.LsgButton,
4745
5268
  var theme2Components = createThemeComponents("theme-2");
4746
5269
  var Theme2LsgButton = theme2Components.LsgButton,
4747
5270
  Theme2LsgBanner = theme2Components.LsgBanner,
5271
+ Theme2LsgCarousel = theme2Components.LsgCarousel,
4748
5272
  Theme2LsgCard = theme2Components.LsgCard,
4749
5273
  Theme2LsgCards = theme2Components.LsgCards,
4750
5274
  Theme2LsgBreadcrumb = theme2Components.LsgBreadcrumb,
@@ -4772,6 +5296,7 @@ var Theme2LsgButton = theme2Components.LsgButton,
4772
5296
  var theme3Components = createThemeComponents("theme-3");
4773
5297
  var Theme3LsgButton = theme3Components.LsgButton,
4774
5298
  Theme3LsgBanner = theme3Components.LsgBanner,
5299
+ Theme3LsgCarousel = theme3Components.LsgCarousel,
4775
5300
  Theme3LsgCard = theme3Components.LsgCard,
4776
5301
  Theme3LsgCards = theme3Components.LsgCards,
4777
5302
  Theme3LsgBreadcrumb = theme3Components.LsgBreadcrumb,
@@ -4796,5 +5321,5 @@ var Theme3LsgButton = theme3Components.LsgButton,
4796
5321
  theme3Components.LsgFormFieldConsent;
4797
5322
  theme3Components.LsgFormStep;
4798
5323
 
4799
- export { LsgBanner, LsgBreadcrumb, LsgButton, LsgCard, LsgCards, LsgFooter, LsgHeader, LsgHero, LsgHeroCard, LsgHeroController, LsgLanguageSwitcher, LsgLogo, LsgNavigation, LsgQuickLinks, LsgSearchOverlay, LsgSearchTrigger, LsgSocialMediaIcons, Theme1LsgBanner, Theme1LsgBreadcrumb, Theme1LsgButton, Theme1LsgCard, Theme1LsgCards, Theme1LsgFooter, Theme1LsgHeader, Theme1LsgHero, Theme1LsgLanguageSwitcher, Theme1LsgLogo, Theme1LsgNavigation, Theme1LsgQuickLinks, Theme1LsgSearchOverlay, Theme1LsgSearchTrigger, Theme1LsgSocialMediaIcons, Theme2LsgBanner, Theme2LsgBreadcrumb, Theme2LsgButton, Theme2LsgCard, Theme2LsgCards, Theme2LsgFooter, Theme2LsgHeader, Theme2LsgHero, Theme2LsgLanguageSwitcher, Theme2LsgLogo, Theme2LsgNavigation, Theme2LsgQuickLinks, Theme2LsgSearchOverlay, Theme2LsgSearchTrigger, Theme2LsgSocialMediaIcons, Theme3LsgBanner, Theme3LsgBreadcrumb, Theme3LsgButton, Theme3LsgCard, Theme3LsgCards, Theme3LsgFooter, Theme3LsgHeader, Theme3LsgHero, Theme3LsgLanguageSwitcher, Theme3LsgLogo, Theme3LsgNavigation, Theme3LsgQuickLinks, Theme3LsgSearchOverlay, Theme3LsgSearchTrigger, Theme3LsgSocialMediaIcons, getTelValue, initTelPickers, theme1Components, theme2Components, theme3Components };
5324
+ export { LsgBanner, LsgBreadcrumb, LsgButton, LsgCard, LsgCards, LsgCarousel, LsgCarouselController, LsgFooter, LsgHeader, LsgHero, LsgHeroCard, LsgHeroController, LsgLanguageSwitcher, LsgLogo, LsgNavigation, LsgQuickLinks, LsgSearchOverlay, LsgSearchTrigger, LsgSocialMediaIcons, Theme1LsgBanner, Theme1LsgBreadcrumb, Theme1LsgButton, Theme1LsgCard, Theme1LsgCards, Theme1LsgCarousel, Theme1LsgFooter, Theme1LsgHeader, Theme1LsgHero, Theme1LsgLanguageSwitcher, Theme1LsgLogo, Theme1LsgNavigation, Theme1LsgQuickLinks, Theme1LsgSearchOverlay, Theme1LsgSearchTrigger, Theme1LsgSocialMediaIcons, Theme2LsgBanner, Theme2LsgBreadcrumb, Theme2LsgButton, Theme2LsgCard, Theme2LsgCards, Theme2LsgCarousel, Theme2LsgFooter, Theme2LsgHeader, Theme2LsgHero, Theme2LsgLanguageSwitcher, Theme2LsgLogo, Theme2LsgNavigation, Theme2LsgQuickLinks, Theme2LsgSearchOverlay, Theme2LsgSearchTrigger, Theme2LsgSocialMediaIcons, Theme3LsgBanner, Theme3LsgBreadcrumb, Theme3LsgButton, Theme3LsgCard, Theme3LsgCards, Theme3LsgCarousel, Theme3LsgFooter, Theme3LsgHeader, Theme3LsgHero, Theme3LsgLanguageSwitcher, Theme3LsgLogo, Theme3LsgNavigation, Theme3LsgQuickLinks, Theme3LsgSearchOverlay, Theme3LsgSearchTrigger, Theme3LsgSocialMediaIcons, getTelValue, initTelPickers, theme1Components, theme2Components, theme3Components };
4800
5325
  //# sourceMappingURL=index.esm.js.map