@asante-org/atlascopco-vt-litesitegenerator 1.6.13 → 1.6.16

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 +2160 -7
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/index.esm.scss +883 -24
  4. package/dist/index.js +2164 -5
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.scss +883 -24
  7. package/dist/src/components/lsg/LsgHero/LsgHero.d.ts +43 -0
  8. package/dist/src/components/lsg/LsgHero/LsgHero.stories.d.ts +30 -0
  9. package/dist/src/components/lsg/LsgHero/LsgHeroController.d.ts +40 -0
  10. package/dist/src/components/lsg/LsgHero/index.d.ts +4 -0
  11. package/dist/src/components/lsg/LsgHeroCard/LsgHeroCard.d.ts +26 -0
  12. package/dist/src/components/lsg/LsgHeroCard/LsgHeroCard.stories.d.ts +20 -0
  13. package/dist/src/components/lsg/LsgHeroCard/index.d.ts +2 -0
  14. package/dist/src/components/lsg/index.d.ts +4 -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 +595 -9
  21. package/dist/themes/theme-1.css.map +1 -1
  22. package/dist/themes/theme-1.js +2016 -0
  23. package/dist/themes/theme-1.js.map +1 -1
  24. package/dist/themes/theme-2.css +405 -9
  25. package/dist/themes/theme-2.css.map +1 -1
  26. package/dist/themes/theme-2.js +2016 -0
  27. package/dist/themes/theme-2.js.map +1 -1
  28. package/dist/themes/theme-3.css +405 -9
  29. package/dist/themes/theme-3.css.map +1 -1
  30. package/dist/themes/theme-3.js +2016 -0
  31. package/dist/themes/theme-3.js.map +1 -1
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +4 -2
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { useState, useRef, useId, useEffect } from 'react';
1
+ import React, { useState, useRef, useId, useEffect, useCallback } from 'react';
2
2
 
3
3
  function _extends() {
4
4
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
@@ -1099,6 +1099,2154 @@ var LsgFooter = function (_a) {
1099
1099
  }, copyrightText)));
1100
1100
  };
1101
1101
 
1102
+ function isNumber$1(subject) {
1103
+ return typeof subject === 'number';
1104
+ }
1105
+ function isString(subject) {
1106
+ return typeof subject === 'string';
1107
+ }
1108
+ function isBoolean(subject) {
1109
+ return typeof subject === 'boolean';
1110
+ }
1111
+ function isObject(subject) {
1112
+ return Object.prototype.toString.call(subject) === '[object Object]';
1113
+ }
1114
+ function mathAbs(n) {
1115
+ return Math.abs(n);
1116
+ }
1117
+ function mathSign(n) {
1118
+ return Math.sign(n);
1119
+ }
1120
+ function deltaAbs(valueB, valueA) {
1121
+ return mathAbs(valueB - valueA);
1122
+ }
1123
+ function factorAbs(valueB, valueA) {
1124
+ if (valueB === 0 || valueA === 0) return 0;
1125
+ if (mathAbs(valueB) <= mathAbs(valueA)) return 0;
1126
+ const diff = deltaAbs(mathAbs(valueB), mathAbs(valueA));
1127
+ return mathAbs(diff / valueB);
1128
+ }
1129
+ function roundToTwoDecimals(num) {
1130
+ return Math.round(num * 100) / 100;
1131
+ }
1132
+ function arrayKeys(array) {
1133
+ return objectKeys(array).map(Number);
1134
+ }
1135
+ function arrayLast(array) {
1136
+ return array[arrayLastIndex(array)];
1137
+ }
1138
+ function arrayLastIndex(array) {
1139
+ return Math.max(0, array.length - 1);
1140
+ }
1141
+ function arrayIsLastIndex(array, index) {
1142
+ return index === arrayLastIndex(array);
1143
+ }
1144
+ function arrayFromNumber(n, startAt = 0) {
1145
+ return Array.from(Array(n), (_, i) => startAt + i);
1146
+ }
1147
+ function objectKeys(object) {
1148
+ return Object.keys(object);
1149
+ }
1150
+ function objectsMergeDeep(objectA, objectB) {
1151
+ return [objectA, objectB].reduce((mergedObjects, currentObject) => {
1152
+ objectKeys(currentObject).forEach(key => {
1153
+ const valueA = mergedObjects[key];
1154
+ const valueB = currentObject[key];
1155
+ const areObjects = isObject(valueA) && isObject(valueB);
1156
+ mergedObjects[key] = areObjects ? objectsMergeDeep(valueA, valueB) : valueB;
1157
+ });
1158
+ return mergedObjects;
1159
+ }, {});
1160
+ }
1161
+ function isMouseEvent(evt, ownerWindow) {
1162
+ return typeof ownerWindow.MouseEvent !== 'undefined' && evt instanceof ownerWindow.MouseEvent;
1163
+ }
1164
+ function Alignment(align, viewSize) {
1165
+ const predefined = {
1166
+ start,
1167
+ center,
1168
+ end
1169
+ };
1170
+ function start() {
1171
+ return 0;
1172
+ }
1173
+ function center(n) {
1174
+ return end(n) / 2;
1175
+ }
1176
+ function end(n) {
1177
+ return viewSize - n;
1178
+ }
1179
+ function measure(n, index) {
1180
+ if (isString(align)) return predefined[align](n);
1181
+ return align(viewSize, n, index);
1182
+ }
1183
+ const self = {
1184
+ measure
1185
+ };
1186
+ return self;
1187
+ }
1188
+ function EventStore() {
1189
+ let listeners = [];
1190
+ function add(node, type, handler, options = {
1191
+ passive: true
1192
+ }) {
1193
+ let removeListener;
1194
+ if ('addEventListener' in node) {
1195
+ node.addEventListener(type, handler, options);
1196
+ removeListener = () => node.removeEventListener(type, handler, options);
1197
+ } else {
1198
+ const legacyMediaQueryList = node;
1199
+ legacyMediaQueryList.addListener(handler);
1200
+ removeListener = () => legacyMediaQueryList.removeListener(handler);
1201
+ }
1202
+ listeners.push(removeListener);
1203
+ return self;
1204
+ }
1205
+ function clear() {
1206
+ listeners = listeners.filter(remove => remove());
1207
+ }
1208
+ const self = {
1209
+ add,
1210
+ clear
1211
+ };
1212
+ return self;
1213
+ }
1214
+ function Animations(ownerDocument, ownerWindow, update, render) {
1215
+ const documentVisibleHandler = EventStore();
1216
+ const fixedTimeStep = 1000 / 60;
1217
+ let lastTimeStamp = null;
1218
+ let accumulatedTime = 0;
1219
+ let animationId = 0;
1220
+ function init() {
1221
+ documentVisibleHandler.add(ownerDocument, 'visibilitychange', () => {
1222
+ if (ownerDocument.hidden) reset();
1223
+ });
1224
+ }
1225
+ function destroy() {
1226
+ stop();
1227
+ documentVisibleHandler.clear();
1228
+ }
1229
+ function animate(timeStamp) {
1230
+ if (!animationId) return;
1231
+ if (!lastTimeStamp) {
1232
+ lastTimeStamp = timeStamp;
1233
+ update();
1234
+ update();
1235
+ }
1236
+ const timeElapsed = timeStamp - lastTimeStamp;
1237
+ lastTimeStamp = timeStamp;
1238
+ accumulatedTime += timeElapsed;
1239
+ while (accumulatedTime >= fixedTimeStep) {
1240
+ update();
1241
+ accumulatedTime -= fixedTimeStep;
1242
+ }
1243
+ const alpha = accumulatedTime / fixedTimeStep;
1244
+ render(alpha);
1245
+ if (animationId) {
1246
+ animationId = ownerWindow.requestAnimationFrame(animate);
1247
+ }
1248
+ }
1249
+ function start() {
1250
+ if (animationId) return;
1251
+ animationId = ownerWindow.requestAnimationFrame(animate);
1252
+ }
1253
+ function stop() {
1254
+ ownerWindow.cancelAnimationFrame(animationId);
1255
+ lastTimeStamp = null;
1256
+ accumulatedTime = 0;
1257
+ animationId = 0;
1258
+ }
1259
+ function reset() {
1260
+ lastTimeStamp = null;
1261
+ accumulatedTime = 0;
1262
+ }
1263
+ const self = {
1264
+ init,
1265
+ destroy,
1266
+ start,
1267
+ stop,
1268
+ update,
1269
+ render
1270
+ };
1271
+ return self;
1272
+ }
1273
+ function Axis(axis, contentDirection) {
1274
+ const isRightToLeft = contentDirection === 'rtl';
1275
+ const isVertical = axis === 'y';
1276
+ const scroll = isVertical ? 'y' : 'x';
1277
+ const cross = isVertical ? 'x' : 'y';
1278
+ const sign = !isVertical && isRightToLeft ? -1 : 1;
1279
+ const startEdge = getStartEdge();
1280
+ const endEdge = getEndEdge();
1281
+ function measureSize(nodeRect) {
1282
+ const {
1283
+ height,
1284
+ width
1285
+ } = nodeRect;
1286
+ return isVertical ? height : width;
1287
+ }
1288
+ function getStartEdge() {
1289
+ if (isVertical) return 'top';
1290
+ return isRightToLeft ? 'right' : 'left';
1291
+ }
1292
+ function getEndEdge() {
1293
+ if (isVertical) return 'bottom';
1294
+ return isRightToLeft ? 'left' : 'right';
1295
+ }
1296
+ function direction(n) {
1297
+ return n * sign;
1298
+ }
1299
+ const self = {
1300
+ scroll,
1301
+ cross,
1302
+ startEdge,
1303
+ endEdge,
1304
+ measureSize,
1305
+ direction
1306
+ };
1307
+ return self;
1308
+ }
1309
+ function Limit(min = 0, max = 0) {
1310
+ const length = mathAbs(min - max);
1311
+ function reachedMin(n) {
1312
+ return n < min;
1313
+ }
1314
+ function reachedMax(n) {
1315
+ return n > max;
1316
+ }
1317
+ function reachedAny(n) {
1318
+ return reachedMin(n) || reachedMax(n);
1319
+ }
1320
+ function constrain(n) {
1321
+ if (!reachedAny(n)) return n;
1322
+ return reachedMin(n) ? min : max;
1323
+ }
1324
+ function removeOffset(n) {
1325
+ if (!length) return n;
1326
+ return n - length * Math.ceil((n - max) / length);
1327
+ }
1328
+ const self = {
1329
+ length,
1330
+ max,
1331
+ min,
1332
+ constrain,
1333
+ reachedAny,
1334
+ reachedMax,
1335
+ reachedMin,
1336
+ removeOffset
1337
+ };
1338
+ return self;
1339
+ }
1340
+ function Counter(max, start, loop) {
1341
+ const {
1342
+ constrain
1343
+ } = Limit(0, max);
1344
+ const loopEnd = max + 1;
1345
+ let counter = withinLimit(start);
1346
+ function withinLimit(n) {
1347
+ return !loop ? constrain(n) : mathAbs((loopEnd + n) % loopEnd);
1348
+ }
1349
+ function get() {
1350
+ return counter;
1351
+ }
1352
+ function set(n) {
1353
+ counter = withinLimit(n);
1354
+ return self;
1355
+ }
1356
+ function add(n) {
1357
+ return clone().set(get() + n);
1358
+ }
1359
+ function clone() {
1360
+ return Counter(max, get(), loop);
1361
+ }
1362
+ const self = {
1363
+ get,
1364
+ set,
1365
+ add,
1366
+ clone
1367
+ };
1368
+ return self;
1369
+ }
1370
+ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
1371
+ const {
1372
+ cross: crossAxis,
1373
+ direction
1374
+ } = axis;
1375
+ const focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];
1376
+ const nonPassiveEvent = {
1377
+ passive: false
1378
+ };
1379
+ const initEvents = EventStore();
1380
+ const dragEvents = EventStore();
1381
+ const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
1382
+ const snapForceBoost = {
1383
+ mouse: 300,
1384
+ touch: 400
1385
+ };
1386
+ const freeForceBoost = {
1387
+ mouse: 500,
1388
+ touch: 600
1389
+ };
1390
+ const baseSpeed = dragFree ? 43 : 25;
1391
+ let isMoving = false;
1392
+ let startScroll = 0;
1393
+ let startCross = 0;
1394
+ let pointerIsDown = false;
1395
+ let preventScroll = false;
1396
+ let preventClick = false;
1397
+ let isMouse = false;
1398
+ function init(emblaApi) {
1399
+ if (!watchDrag) return;
1400
+ function downIfAllowed(evt) {
1401
+ if (isBoolean(watchDrag) || watchDrag(emblaApi, evt)) down(evt);
1402
+ }
1403
+ const node = rootNode;
1404
+ 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);
1405
+ }
1406
+ function destroy() {
1407
+ initEvents.clear();
1408
+ dragEvents.clear();
1409
+ }
1410
+ function addDragEvents() {
1411
+ const node = isMouse ? ownerDocument : rootNode;
1412
+ dragEvents.add(node, 'touchmove', move, nonPassiveEvent).add(node, 'touchend', up).add(node, 'mousemove', move, nonPassiveEvent).add(node, 'mouseup', up);
1413
+ }
1414
+ function isFocusNode(node) {
1415
+ const nodeName = node.nodeName || '';
1416
+ return focusNodes.includes(nodeName);
1417
+ }
1418
+ function forceBoost() {
1419
+ const boost = dragFree ? freeForceBoost : snapForceBoost;
1420
+ const type = isMouse ? 'mouse' : 'touch';
1421
+ return boost[type];
1422
+ }
1423
+ function allowedForce(force, targetChanged) {
1424
+ const next = index.add(mathSign(force) * -1);
1425
+ const baseForce = scrollTarget.byDistance(force, !dragFree).distance;
1426
+ if (dragFree || mathAbs(force) < goToNextThreshold) return baseForce;
1427
+ if (skipSnaps && targetChanged) return baseForce * 0.5;
1428
+ return scrollTarget.byIndex(next.get(), 0).distance;
1429
+ }
1430
+ function down(evt) {
1431
+ const isMouseEvt = isMouseEvent(evt, ownerWindow);
1432
+ isMouse = isMouseEvt;
1433
+ preventClick = dragFree && isMouseEvt && !evt.buttons && isMoving;
1434
+ isMoving = deltaAbs(target.get(), location.get()) >= 2;
1435
+ if (isMouseEvt && evt.button !== 0) return;
1436
+ if (isFocusNode(evt.target)) return;
1437
+ pointerIsDown = true;
1438
+ dragTracker.pointerDown(evt);
1439
+ scrollBody.useFriction(0).useDuration(0);
1440
+ target.set(location);
1441
+ addDragEvents();
1442
+ startScroll = dragTracker.readPoint(evt);
1443
+ startCross = dragTracker.readPoint(evt, crossAxis);
1444
+ eventHandler.emit('pointerDown');
1445
+ }
1446
+ function move(evt) {
1447
+ const isTouchEvt = !isMouseEvent(evt, ownerWindow);
1448
+ if (isTouchEvt && evt.touches.length >= 2) return up(evt);
1449
+ const lastScroll = dragTracker.readPoint(evt);
1450
+ const lastCross = dragTracker.readPoint(evt, crossAxis);
1451
+ const diffScroll = deltaAbs(lastScroll, startScroll);
1452
+ const diffCross = deltaAbs(lastCross, startCross);
1453
+ if (!preventScroll && !isMouse) {
1454
+ if (!evt.cancelable) return up(evt);
1455
+ preventScroll = diffScroll > diffCross;
1456
+ if (!preventScroll) return up(evt);
1457
+ }
1458
+ const diff = dragTracker.pointerMove(evt);
1459
+ if (diffScroll > dragThreshold) preventClick = true;
1460
+ scrollBody.useFriction(0.3).useDuration(0.75);
1461
+ animation.start();
1462
+ target.add(direction(diff));
1463
+ evt.preventDefault();
1464
+ }
1465
+ function up(evt) {
1466
+ const currentLocation = scrollTarget.byDistance(0, false);
1467
+ const targetChanged = currentLocation.index !== index.get();
1468
+ const rawForce = dragTracker.pointerUp(evt) * forceBoost();
1469
+ const force = allowedForce(direction(rawForce), targetChanged);
1470
+ const forceFactor = factorAbs(rawForce, force);
1471
+ const speed = baseSpeed - 10 * forceFactor;
1472
+ const friction = baseFriction + forceFactor / 50;
1473
+ preventScroll = false;
1474
+ pointerIsDown = false;
1475
+ dragEvents.clear();
1476
+ scrollBody.useDuration(speed).useFriction(friction);
1477
+ scrollTo.distance(force, !dragFree);
1478
+ isMouse = false;
1479
+ eventHandler.emit('pointerUp');
1480
+ }
1481
+ function click(evt) {
1482
+ if (preventClick) {
1483
+ evt.stopPropagation();
1484
+ evt.preventDefault();
1485
+ preventClick = false;
1486
+ }
1487
+ }
1488
+ function pointerDown() {
1489
+ return pointerIsDown;
1490
+ }
1491
+ const self = {
1492
+ init,
1493
+ destroy,
1494
+ pointerDown
1495
+ };
1496
+ return self;
1497
+ }
1498
+ function DragTracker(axis, ownerWindow) {
1499
+ const logInterval = 170;
1500
+ let startEvent;
1501
+ let lastEvent;
1502
+ function readTime(evt) {
1503
+ return evt.timeStamp;
1504
+ }
1505
+ function readPoint(evt, evtAxis) {
1506
+ const property = evtAxis || axis.scroll;
1507
+ const coord = `client${property === 'x' ? 'X' : 'Y'}`;
1508
+ return (isMouseEvent(evt, ownerWindow) ? evt : evt.touches[0])[coord];
1509
+ }
1510
+ function pointerDown(evt) {
1511
+ startEvent = evt;
1512
+ lastEvent = evt;
1513
+ return readPoint(evt);
1514
+ }
1515
+ function pointerMove(evt) {
1516
+ const diff = readPoint(evt) - readPoint(lastEvent);
1517
+ const expired = readTime(evt) - readTime(startEvent) > logInterval;
1518
+ lastEvent = evt;
1519
+ if (expired) startEvent = evt;
1520
+ return diff;
1521
+ }
1522
+ function pointerUp(evt) {
1523
+ if (!startEvent || !lastEvent) return 0;
1524
+ const diffDrag = readPoint(lastEvent) - readPoint(startEvent);
1525
+ const diffTime = readTime(evt) - readTime(startEvent);
1526
+ const expired = readTime(evt) - readTime(lastEvent) > logInterval;
1527
+ const force = diffDrag / diffTime;
1528
+ const isFlick = diffTime && !expired && mathAbs(force) > 0.1;
1529
+ return isFlick ? force : 0;
1530
+ }
1531
+ const self = {
1532
+ pointerDown,
1533
+ pointerMove,
1534
+ pointerUp,
1535
+ readPoint
1536
+ };
1537
+ return self;
1538
+ }
1539
+ function NodeRects() {
1540
+ function measure(node) {
1541
+ const {
1542
+ offsetTop,
1543
+ offsetLeft,
1544
+ offsetWidth,
1545
+ offsetHeight
1546
+ } = node;
1547
+ const offset = {
1548
+ top: offsetTop,
1549
+ right: offsetLeft + offsetWidth,
1550
+ bottom: offsetTop + offsetHeight,
1551
+ left: offsetLeft,
1552
+ width: offsetWidth,
1553
+ height: offsetHeight
1554
+ };
1555
+ return offset;
1556
+ }
1557
+ const self = {
1558
+ measure
1559
+ };
1560
+ return self;
1561
+ }
1562
+ function PercentOfView(viewSize) {
1563
+ function measure(n) {
1564
+ return viewSize * (n / 100);
1565
+ }
1566
+ const self = {
1567
+ measure
1568
+ };
1569
+ return self;
1570
+ }
1571
+ function ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects) {
1572
+ const observeNodes = [container].concat(slides);
1573
+ let resizeObserver;
1574
+ let containerSize;
1575
+ let slideSizes = [];
1576
+ let destroyed = false;
1577
+ function readSize(node) {
1578
+ return axis.measureSize(nodeRects.measure(node));
1579
+ }
1580
+ function init(emblaApi) {
1581
+ if (!watchResize) return;
1582
+ containerSize = readSize(container);
1583
+ slideSizes = slides.map(readSize);
1584
+ function defaultCallback(entries) {
1585
+ for (const entry of entries) {
1586
+ if (destroyed) return;
1587
+ const isContainer = entry.target === container;
1588
+ const slideIndex = slides.indexOf(entry.target);
1589
+ const lastSize = isContainer ? containerSize : slideSizes[slideIndex];
1590
+ const newSize = readSize(isContainer ? container : slides[slideIndex]);
1591
+ const diffSize = mathAbs(newSize - lastSize);
1592
+ if (diffSize >= 0.5) {
1593
+ emblaApi.reInit();
1594
+ eventHandler.emit('resize');
1595
+ break;
1596
+ }
1597
+ }
1598
+ }
1599
+ resizeObserver = new ResizeObserver(entries => {
1600
+ if (isBoolean(watchResize) || watchResize(emblaApi, entries)) {
1601
+ defaultCallback(entries);
1602
+ }
1603
+ });
1604
+ ownerWindow.requestAnimationFrame(() => {
1605
+ observeNodes.forEach(node => resizeObserver.observe(node));
1606
+ });
1607
+ }
1608
+ function destroy() {
1609
+ destroyed = true;
1610
+ if (resizeObserver) resizeObserver.disconnect();
1611
+ }
1612
+ const self = {
1613
+ init,
1614
+ destroy
1615
+ };
1616
+ return self;
1617
+ }
1618
+ function ScrollBody(location, offsetLocation, previousLocation, target, baseDuration, baseFriction) {
1619
+ let scrollVelocity = 0;
1620
+ let scrollDirection = 0;
1621
+ let scrollDuration = baseDuration;
1622
+ let scrollFriction = baseFriction;
1623
+ let rawLocation = location.get();
1624
+ let rawLocationPrevious = 0;
1625
+ function seek() {
1626
+ const displacement = target.get() - location.get();
1627
+ const isInstant = !scrollDuration;
1628
+ let scrollDistance = 0;
1629
+ if (isInstant) {
1630
+ scrollVelocity = 0;
1631
+ previousLocation.set(target);
1632
+ location.set(target);
1633
+ scrollDistance = displacement;
1634
+ } else {
1635
+ previousLocation.set(location);
1636
+ scrollVelocity += displacement / scrollDuration;
1637
+ scrollVelocity *= scrollFriction;
1638
+ rawLocation += scrollVelocity;
1639
+ location.add(scrollVelocity);
1640
+ scrollDistance = rawLocation - rawLocationPrevious;
1641
+ }
1642
+ scrollDirection = mathSign(scrollDistance);
1643
+ rawLocationPrevious = rawLocation;
1644
+ return self;
1645
+ }
1646
+ function settled() {
1647
+ const diff = target.get() - offsetLocation.get();
1648
+ return mathAbs(diff) < 0.001;
1649
+ }
1650
+ function duration() {
1651
+ return scrollDuration;
1652
+ }
1653
+ function direction() {
1654
+ return scrollDirection;
1655
+ }
1656
+ function velocity() {
1657
+ return scrollVelocity;
1658
+ }
1659
+ function useBaseDuration() {
1660
+ return useDuration(baseDuration);
1661
+ }
1662
+ function useBaseFriction() {
1663
+ return useFriction(baseFriction);
1664
+ }
1665
+ function useDuration(n) {
1666
+ scrollDuration = n;
1667
+ return self;
1668
+ }
1669
+ function useFriction(n) {
1670
+ scrollFriction = n;
1671
+ return self;
1672
+ }
1673
+ const self = {
1674
+ direction,
1675
+ duration,
1676
+ velocity,
1677
+ seek,
1678
+ settled,
1679
+ useBaseFriction,
1680
+ useBaseDuration,
1681
+ useFriction,
1682
+ useDuration
1683
+ };
1684
+ return self;
1685
+ }
1686
+ function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
1687
+ const pullBackThreshold = percentOfView.measure(10);
1688
+ const edgeOffsetTolerance = percentOfView.measure(50);
1689
+ const frictionLimit = Limit(0.1, 0.99);
1690
+ let disabled = false;
1691
+ function shouldConstrain() {
1692
+ if (disabled) return false;
1693
+ if (!limit.reachedAny(target.get())) return false;
1694
+ if (!limit.reachedAny(location.get())) return false;
1695
+ return true;
1696
+ }
1697
+ function constrain(pointerDown) {
1698
+ if (!shouldConstrain()) return;
1699
+ const edge = limit.reachedMin(location.get()) ? 'min' : 'max';
1700
+ const diffToEdge = mathAbs(limit[edge] - location.get());
1701
+ const diffToTarget = target.get() - location.get();
1702
+ const friction = frictionLimit.constrain(diffToEdge / edgeOffsetTolerance);
1703
+ target.subtract(diffToTarget * friction);
1704
+ if (!pointerDown && mathAbs(diffToTarget) < pullBackThreshold) {
1705
+ target.set(limit.constrain(target.get()));
1706
+ scrollBody.useDuration(25).useBaseFriction();
1707
+ }
1708
+ }
1709
+ function toggleActive(active) {
1710
+ disabled = !active;
1711
+ }
1712
+ const self = {
1713
+ shouldConstrain,
1714
+ constrain,
1715
+ toggleActive
1716
+ };
1717
+ return self;
1718
+ }
1719
+ function ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance) {
1720
+ const scrollBounds = Limit(-contentSize + viewSize, 0);
1721
+ const snapsBounded = measureBounded();
1722
+ const scrollContainLimit = findScrollContainLimit();
1723
+ const snapsContained = measureContained();
1724
+ function usePixelTolerance(bound, snap) {
1725
+ return deltaAbs(bound, snap) <= 1;
1726
+ }
1727
+ function findScrollContainLimit() {
1728
+ const startSnap = snapsBounded[0];
1729
+ const endSnap = arrayLast(snapsBounded);
1730
+ const min = snapsBounded.lastIndexOf(startSnap);
1731
+ const max = snapsBounded.indexOf(endSnap) + 1;
1732
+ return Limit(min, max);
1733
+ }
1734
+ function measureBounded() {
1735
+ return snapsAligned.map((snapAligned, index) => {
1736
+ const {
1737
+ min,
1738
+ max
1739
+ } = scrollBounds;
1740
+ const snap = scrollBounds.constrain(snapAligned);
1741
+ const isFirst = !index;
1742
+ const isLast = arrayIsLastIndex(snapsAligned, index);
1743
+ if (isFirst) return max;
1744
+ if (isLast) return min;
1745
+ if (usePixelTolerance(min, snap)) return min;
1746
+ if (usePixelTolerance(max, snap)) return max;
1747
+ return snap;
1748
+ }).map(scrollBound => parseFloat(scrollBound.toFixed(3)));
1749
+ }
1750
+ function measureContained() {
1751
+ if (contentSize <= viewSize + pixelTolerance) return [scrollBounds.max];
1752
+ if (containScroll === 'keepSnaps') return snapsBounded;
1753
+ const {
1754
+ min,
1755
+ max
1756
+ } = scrollContainLimit;
1757
+ return snapsBounded.slice(min, max);
1758
+ }
1759
+ const self = {
1760
+ snapsContained,
1761
+ scrollContainLimit
1762
+ };
1763
+ return self;
1764
+ }
1765
+ function ScrollLimit(contentSize, scrollSnaps, loop) {
1766
+ const max = scrollSnaps[0];
1767
+ const min = loop ? max - contentSize : arrayLast(scrollSnaps);
1768
+ const limit = Limit(min, max);
1769
+ const self = {
1770
+ limit
1771
+ };
1772
+ return self;
1773
+ }
1774
+ function ScrollLooper(contentSize, limit, location, vectors) {
1775
+ const jointSafety = 0.1;
1776
+ const min = limit.min + jointSafety;
1777
+ const max = limit.max + jointSafety;
1778
+ const {
1779
+ reachedMin,
1780
+ reachedMax
1781
+ } = Limit(min, max);
1782
+ function shouldLoop(direction) {
1783
+ if (direction === 1) return reachedMax(location.get());
1784
+ if (direction === -1) return reachedMin(location.get());
1785
+ return false;
1786
+ }
1787
+ function loop(direction) {
1788
+ if (!shouldLoop(direction)) return;
1789
+ const loopDistance = contentSize * (direction * -1);
1790
+ vectors.forEach(v => v.add(loopDistance));
1791
+ }
1792
+ const self = {
1793
+ loop
1794
+ };
1795
+ return self;
1796
+ }
1797
+ function ScrollProgress(limit) {
1798
+ const {
1799
+ max,
1800
+ length
1801
+ } = limit;
1802
+ function get(n) {
1803
+ const currentLocation = n - max;
1804
+ return length ? currentLocation / -length : 0;
1805
+ }
1806
+ const self = {
1807
+ get
1808
+ };
1809
+ return self;
1810
+ }
1811
+ function ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll) {
1812
+ const {
1813
+ startEdge,
1814
+ endEdge
1815
+ } = axis;
1816
+ const {
1817
+ groupSlides
1818
+ } = slidesToScroll;
1819
+ const alignments = measureSizes().map(alignment.measure);
1820
+ const snaps = measureUnaligned();
1821
+ const snapsAligned = measureAligned();
1822
+ function measureSizes() {
1823
+ return groupSlides(slideRects).map(rects => arrayLast(rects)[endEdge] - rects[0][startEdge]).map(mathAbs);
1824
+ }
1825
+ function measureUnaligned() {
1826
+ return slideRects.map(rect => containerRect[startEdge] - rect[startEdge]).map(snap => -mathAbs(snap));
1827
+ }
1828
+ function measureAligned() {
1829
+ return groupSlides(snaps).map(g => g[0]).map((snap, index) => snap + alignments[index]);
1830
+ }
1831
+ const self = {
1832
+ snaps,
1833
+ snapsAligned
1834
+ };
1835
+ return self;
1836
+ }
1837
+ function SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes) {
1838
+ const {
1839
+ groupSlides
1840
+ } = slidesToScroll;
1841
+ const {
1842
+ min,
1843
+ max
1844
+ } = scrollContainLimit;
1845
+ const slideRegistry = createSlideRegistry();
1846
+ function createSlideRegistry() {
1847
+ const groupedSlideIndexes = groupSlides(slideIndexes);
1848
+ const doNotContain = !containSnaps || containScroll === 'keepSnaps';
1849
+ if (scrollSnaps.length === 1) return [slideIndexes];
1850
+ if (doNotContain) return groupedSlideIndexes;
1851
+ return groupedSlideIndexes.slice(min, max).map((group, index, groups) => {
1852
+ const isFirst = !index;
1853
+ const isLast = arrayIsLastIndex(groups, index);
1854
+ if (isFirst) {
1855
+ const range = arrayLast(groups[0]) + 1;
1856
+ return arrayFromNumber(range);
1857
+ }
1858
+ if (isLast) {
1859
+ const range = arrayLastIndex(slideIndexes) - arrayLast(groups)[0] + 1;
1860
+ return arrayFromNumber(range, arrayLast(groups)[0]);
1861
+ }
1862
+ return group;
1863
+ });
1864
+ }
1865
+ const self = {
1866
+ slideRegistry
1867
+ };
1868
+ return self;
1869
+ }
1870
+ function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
1871
+ const {
1872
+ reachedAny,
1873
+ removeOffset,
1874
+ constrain
1875
+ } = limit;
1876
+ function minDistance(distances) {
1877
+ return distances.concat().sort((a, b) => mathAbs(a) - mathAbs(b))[0];
1878
+ }
1879
+ function findTargetSnap(target) {
1880
+ const distance = loop ? removeOffset(target) : constrain(target);
1881
+ const ascDiffsToSnaps = scrollSnaps.map((snap, index) => ({
1882
+ diff: shortcut(snap - distance, 0),
1883
+ index
1884
+ })).sort((d1, d2) => mathAbs(d1.diff) - mathAbs(d2.diff));
1885
+ const {
1886
+ index
1887
+ } = ascDiffsToSnaps[0];
1888
+ return {
1889
+ index,
1890
+ distance
1891
+ };
1892
+ }
1893
+ function shortcut(target, direction) {
1894
+ const targets = [target, target + contentSize, target - contentSize];
1895
+ if (!loop) return target;
1896
+ if (!direction) return minDistance(targets);
1897
+ const matchingTargets = targets.filter(t => mathSign(t) === direction);
1898
+ if (matchingTargets.length) return minDistance(matchingTargets);
1899
+ return arrayLast(targets) - contentSize;
1900
+ }
1901
+ function byIndex(index, direction) {
1902
+ const diffToSnap = scrollSnaps[index] - targetVector.get();
1903
+ const distance = shortcut(diffToSnap, direction);
1904
+ return {
1905
+ index,
1906
+ distance
1907
+ };
1908
+ }
1909
+ function byDistance(distance, snap) {
1910
+ const target = targetVector.get() + distance;
1911
+ const {
1912
+ index,
1913
+ distance: targetSnapDistance
1914
+ } = findTargetSnap(target);
1915
+ const reachedBound = !loop && reachedAny(target);
1916
+ if (!snap || reachedBound) return {
1917
+ index,
1918
+ distance
1919
+ };
1920
+ const diffToSnap = scrollSnaps[index] - targetSnapDistance;
1921
+ const snapDistance = distance + shortcut(diffToSnap, 0);
1922
+ return {
1923
+ index,
1924
+ distance: snapDistance
1925
+ };
1926
+ }
1927
+ const self = {
1928
+ byDistance,
1929
+ byIndex,
1930
+ shortcut
1931
+ };
1932
+ return self;
1933
+ }
1934
+ function ScrollTo(animation, indexCurrent, indexPrevious, scrollBody, scrollTarget, targetVector, eventHandler) {
1935
+ function scrollTo(target) {
1936
+ const distanceDiff = target.distance;
1937
+ const indexDiff = target.index !== indexCurrent.get();
1938
+ targetVector.add(distanceDiff);
1939
+ if (distanceDiff) {
1940
+ if (scrollBody.duration()) {
1941
+ animation.start();
1942
+ } else {
1943
+ animation.update();
1944
+ animation.render(1);
1945
+ animation.update();
1946
+ }
1947
+ }
1948
+ if (indexDiff) {
1949
+ indexPrevious.set(indexCurrent.get());
1950
+ indexCurrent.set(target.index);
1951
+ eventHandler.emit('select');
1952
+ }
1953
+ }
1954
+ function distance(n, snap) {
1955
+ const target = scrollTarget.byDistance(n, snap);
1956
+ scrollTo(target);
1957
+ }
1958
+ function index(n, direction) {
1959
+ const targetIndex = indexCurrent.clone().set(n);
1960
+ const target = scrollTarget.byIndex(targetIndex.get(), direction);
1961
+ scrollTo(target);
1962
+ }
1963
+ const self = {
1964
+ distance,
1965
+ index
1966
+ };
1967
+ return self;
1968
+ }
1969
+ function SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus) {
1970
+ const focusListenerOptions = {
1971
+ passive: true,
1972
+ capture: true
1973
+ };
1974
+ let lastTabPressTime = 0;
1975
+ function init(emblaApi) {
1976
+ if (!watchFocus) return;
1977
+ function defaultCallback(index) {
1978
+ const nowTime = new Date().getTime();
1979
+ const diffTime = nowTime - lastTabPressTime;
1980
+ if (diffTime > 10) return;
1981
+ eventHandler.emit('slideFocusStart');
1982
+ root.scrollLeft = 0;
1983
+ const group = slideRegistry.findIndex(group => group.includes(index));
1984
+ if (!isNumber$1(group)) return;
1985
+ scrollBody.useDuration(0);
1986
+ scrollTo.index(group, 0);
1987
+ eventHandler.emit('slideFocus');
1988
+ }
1989
+ eventStore.add(document, 'keydown', registerTabPress, false);
1990
+ slides.forEach((slide, slideIndex) => {
1991
+ eventStore.add(slide, 'focus', evt => {
1992
+ if (isBoolean(watchFocus) || watchFocus(emblaApi, evt)) {
1993
+ defaultCallback(slideIndex);
1994
+ }
1995
+ }, focusListenerOptions);
1996
+ });
1997
+ }
1998
+ function registerTabPress(event) {
1999
+ if (event.code === 'Tab') lastTabPressTime = new Date().getTime();
2000
+ }
2001
+ const self = {
2002
+ init
2003
+ };
2004
+ return self;
2005
+ }
2006
+ function Vector1D(initialValue) {
2007
+ let value = initialValue;
2008
+ function get() {
2009
+ return value;
2010
+ }
2011
+ function set(n) {
2012
+ value = normalizeInput(n);
2013
+ }
2014
+ function add(n) {
2015
+ value += normalizeInput(n);
2016
+ }
2017
+ function subtract(n) {
2018
+ value -= normalizeInput(n);
2019
+ }
2020
+ function normalizeInput(n) {
2021
+ return isNumber$1(n) ? n : n.get();
2022
+ }
2023
+ const self = {
2024
+ get,
2025
+ set,
2026
+ add,
2027
+ subtract
2028
+ };
2029
+ return self;
2030
+ }
2031
+ function Translate(axis, container) {
2032
+ const translate = axis.scroll === 'x' ? x : y;
2033
+ const containerStyle = container.style;
2034
+ let previousTarget = null;
2035
+ let disabled = false;
2036
+ function x(n) {
2037
+ return `translate3d(${n}px,0px,0px)`;
2038
+ }
2039
+ function y(n) {
2040
+ return `translate3d(0px,${n}px,0px)`;
2041
+ }
2042
+ function to(target) {
2043
+ if (disabled) return;
2044
+ const newTarget = roundToTwoDecimals(axis.direction(target));
2045
+ if (newTarget === previousTarget) return;
2046
+ containerStyle.transform = translate(newTarget);
2047
+ previousTarget = newTarget;
2048
+ }
2049
+ function toggleActive(active) {
2050
+ disabled = !active;
2051
+ }
2052
+ function clear() {
2053
+ if (disabled) return;
2054
+ containerStyle.transform = '';
2055
+ if (!container.getAttribute('style')) container.removeAttribute('style');
2056
+ }
2057
+ const self = {
2058
+ clear,
2059
+ to,
2060
+ toggleActive
2061
+ };
2062
+ return self;
2063
+ }
2064
+ function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, location, slides) {
2065
+ const roundingSafety = 0.5;
2066
+ const ascItems = arrayKeys(slideSizesWithGaps);
2067
+ const descItems = arrayKeys(slideSizesWithGaps).reverse();
2068
+ const loopPoints = startPoints().concat(endPoints());
2069
+ function removeSlideSizes(indexes, from) {
2070
+ return indexes.reduce((a, i) => {
2071
+ return a - slideSizesWithGaps[i];
2072
+ }, from);
2073
+ }
2074
+ function slidesInGap(indexes, gap) {
2075
+ return indexes.reduce((a, i) => {
2076
+ const remainingGap = removeSlideSizes(a, gap);
2077
+ return remainingGap > 0 ? a.concat([i]) : a;
2078
+ }, []);
2079
+ }
2080
+ function findSlideBounds(offset) {
2081
+ return snaps.map((snap, index) => ({
2082
+ start: snap - slideSizes[index] + roundingSafety + offset,
2083
+ end: snap + viewSize - roundingSafety + offset
2084
+ }));
2085
+ }
2086
+ function findLoopPoints(indexes, offset, isEndEdge) {
2087
+ const slideBounds = findSlideBounds(offset);
2088
+ return indexes.map(index => {
2089
+ const initial = isEndEdge ? 0 : -contentSize;
2090
+ const altered = isEndEdge ? contentSize : 0;
2091
+ const boundEdge = isEndEdge ? 'end' : 'start';
2092
+ const loopPoint = slideBounds[index][boundEdge];
2093
+ return {
2094
+ index,
2095
+ loopPoint,
2096
+ slideLocation: Vector1D(-1),
2097
+ translate: Translate(axis, slides[index]),
2098
+ target: () => location.get() > loopPoint ? initial : altered
2099
+ };
2100
+ });
2101
+ }
2102
+ function startPoints() {
2103
+ const gap = scrollSnaps[0];
2104
+ const indexes = slidesInGap(descItems, gap);
2105
+ return findLoopPoints(indexes, contentSize, false);
2106
+ }
2107
+ function endPoints() {
2108
+ const gap = viewSize - scrollSnaps[0] - 1;
2109
+ const indexes = slidesInGap(ascItems, gap);
2110
+ return findLoopPoints(indexes, -contentSize, true);
2111
+ }
2112
+ function canLoop() {
2113
+ return loopPoints.every(({
2114
+ index
2115
+ }) => {
2116
+ const otherIndexes = ascItems.filter(i => i !== index);
2117
+ return removeSlideSizes(otherIndexes, viewSize) <= 0.1;
2118
+ });
2119
+ }
2120
+ function loop() {
2121
+ loopPoints.forEach(loopPoint => {
2122
+ const {
2123
+ target,
2124
+ translate,
2125
+ slideLocation
2126
+ } = loopPoint;
2127
+ const shiftLocation = target();
2128
+ if (shiftLocation === slideLocation.get()) return;
2129
+ translate.to(shiftLocation);
2130
+ slideLocation.set(shiftLocation);
2131
+ });
2132
+ }
2133
+ function clear() {
2134
+ loopPoints.forEach(loopPoint => loopPoint.translate.clear());
2135
+ }
2136
+ const self = {
2137
+ canLoop,
2138
+ clear,
2139
+ loop,
2140
+ loopPoints
2141
+ };
2142
+ return self;
2143
+ }
2144
+ function SlidesHandler(container, eventHandler, watchSlides) {
2145
+ let mutationObserver;
2146
+ let destroyed = false;
2147
+ function init(emblaApi) {
2148
+ if (!watchSlides) return;
2149
+ function defaultCallback(mutations) {
2150
+ for (const mutation of mutations) {
2151
+ if (mutation.type === 'childList') {
2152
+ emblaApi.reInit();
2153
+ eventHandler.emit('slidesChanged');
2154
+ break;
2155
+ }
2156
+ }
2157
+ }
2158
+ mutationObserver = new MutationObserver(mutations => {
2159
+ if (destroyed) return;
2160
+ if (isBoolean(watchSlides) || watchSlides(emblaApi, mutations)) {
2161
+ defaultCallback(mutations);
2162
+ }
2163
+ });
2164
+ mutationObserver.observe(container, {
2165
+ childList: true
2166
+ });
2167
+ }
2168
+ function destroy() {
2169
+ if (mutationObserver) mutationObserver.disconnect();
2170
+ destroyed = true;
2171
+ }
2172
+ const self = {
2173
+ init,
2174
+ destroy
2175
+ };
2176
+ return self;
2177
+ }
2178
+ function SlidesInView(container, slides, eventHandler, threshold) {
2179
+ const intersectionEntryMap = {};
2180
+ let inViewCache = null;
2181
+ let notInViewCache = null;
2182
+ let intersectionObserver;
2183
+ let destroyed = false;
2184
+ function init() {
2185
+ intersectionObserver = new IntersectionObserver(entries => {
2186
+ if (destroyed) return;
2187
+ entries.forEach(entry => {
2188
+ const index = slides.indexOf(entry.target);
2189
+ intersectionEntryMap[index] = entry;
2190
+ });
2191
+ inViewCache = null;
2192
+ notInViewCache = null;
2193
+ eventHandler.emit('slidesInView');
2194
+ }, {
2195
+ root: container.parentElement,
2196
+ threshold
2197
+ });
2198
+ slides.forEach(slide => intersectionObserver.observe(slide));
2199
+ }
2200
+ function destroy() {
2201
+ if (intersectionObserver) intersectionObserver.disconnect();
2202
+ destroyed = true;
2203
+ }
2204
+ function createInViewList(inView) {
2205
+ return objectKeys(intersectionEntryMap).reduce((list, slideIndex) => {
2206
+ const index = parseInt(slideIndex);
2207
+ const {
2208
+ isIntersecting
2209
+ } = intersectionEntryMap[index];
2210
+ const inViewMatch = inView && isIntersecting;
2211
+ const notInViewMatch = !inView && !isIntersecting;
2212
+ if (inViewMatch || notInViewMatch) list.push(index);
2213
+ return list;
2214
+ }, []);
2215
+ }
2216
+ function get(inView = true) {
2217
+ if (inView && inViewCache) return inViewCache;
2218
+ if (!inView && notInViewCache) return notInViewCache;
2219
+ const slideIndexes = createInViewList(inView);
2220
+ if (inView) inViewCache = slideIndexes;
2221
+ if (!inView) notInViewCache = slideIndexes;
2222
+ return slideIndexes;
2223
+ }
2224
+ const self = {
2225
+ init,
2226
+ destroy,
2227
+ get
2228
+ };
2229
+ return self;
2230
+ }
2231
+ function SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow) {
2232
+ const {
2233
+ measureSize,
2234
+ startEdge,
2235
+ endEdge
2236
+ } = axis;
2237
+ const withEdgeGap = slideRects[0] && readEdgeGap;
2238
+ const startGap = measureStartGap();
2239
+ const endGap = measureEndGap();
2240
+ const slideSizes = slideRects.map(measureSize);
2241
+ const slideSizesWithGaps = measureWithGaps();
2242
+ function measureStartGap() {
2243
+ if (!withEdgeGap) return 0;
2244
+ const slideRect = slideRects[0];
2245
+ return mathAbs(containerRect[startEdge] - slideRect[startEdge]);
2246
+ }
2247
+ function measureEndGap() {
2248
+ if (!withEdgeGap) return 0;
2249
+ const style = ownerWindow.getComputedStyle(arrayLast(slides));
2250
+ return parseFloat(style.getPropertyValue(`margin-${endEdge}`));
2251
+ }
2252
+ function measureWithGaps() {
2253
+ return slideRects.map((rect, index, rects) => {
2254
+ const isFirst = !index;
2255
+ const isLast = arrayIsLastIndex(rects, index);
2256
+ if (isFirst) return slideSizes[index] + startGap;
2257
+ if (isLast) return slideSizes[index] + endGap;
2258
+ return rects[index + 1][startEdge] - rect[startEdge];
2259
+ }).map(mathAbs);
2260
+ }
2261
+ const self = {
2262
+ slideSizes,
2263
+ slideSizesWithGaps,
2264
+ startGap,
2265
+ endGap
2266
+ };
2267
+ return self;
2268
+ }
2269
+ function SlidesToScroll(axis, viewSize, slidesToScroll, loop, containerRect, slideRects, startGap, endGap, pixelTolerance) {
2270
+ const {
2271
+ startEdge,
2272
+ endEdge,
2273
+ direction
2274
+ } = axis;
2275
+ const groupByNumber = isNumber$1(slidesToScroll);
2276
+ function byNumber(array, groupSize) {
2277
+ return arrayKeys(array).filter(i => i % groupSize === 0).map(i => array.slice(i, i + groupSize));
2278
+ }
2279
+ function bySize(array) {
2280
+ if (!array.length) return [];
2281
+ return arrayKeys(array).reduce((groups, rectB, index) => {
2282
+ const rectA = arrayLast(groups) || 0;
2283
+ const isFirst = rectA === 0;
2284
+ const isLast = rectB === arrayLastIndex(array);
2285
+ const edgeA = containerRect[startEdge] - slideRects[rectA][startEdge];
2286
+ const edgeB = containerRect[startEdge] - slideRects[rectB][endEdge];
2287
+ const gapA = !loop && isFirst ? direction(startGap) : 0;
2288
+ const gapB = !loop && isLast ? direction(endGap) : 0;
2289
+ const chunkSize = mathAbs(edgeB - gapB - (edgeA + gapA));
2290
+ if (index && chunkSize > viewSize + pixelTolerance) groups.push(rectB);
2291
+ if (isLast) groups.push(array.length);
2292
+ return groups;
2293
+ }, []).map((currentSize, index, groups) => {
2294
+ const previousSize = Math.max(groups[index - 1] || 0);
2295
+ return array.slice(previousSize, currentSize);
2296
+ });
2297
+ }
2298
+ function groupSlides(array) {
2299
+ return groupByNumber ? byNumber(array, slidesToScroll) : bySize(array);
2300
+ }
2301
+ const self = {
2302
+ groupSlides
2303
+ };
2304
+ return self;
2305
+ }
2306
+ function Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler) {
2307
+ // Options
2308
+ const {
2309
+ align,
2310
+ axis: scrollAxis,
2311
+ direction,
2312
+ startIndex,
2313
+ loop,
2314
+ duration,
2315
+ dragFree,
2316
+ dragThreshold,
2317
+ inViewThreshold,
2318
+ slidesToScroll: groupSlides,
2319
+ skipSnaps,
2320
+ containScroll,
2321
+ watchResize,
2322
+ watchSlides,
2323
+ watchDrag,
2324
+ watchFocus
2325
+ } = options;
2326
+ // Measurements
2327
+ const pixelTolerance = 2;
2328
+ const nodeRects = NodeRects();
2329
+ const containerRect = nodeRects.measure(container);
2330
+ const slideRects = slides.map(nodeRects.measure);
2331
+ const axis = Axis(scrollAxis, direction);
2332
+ const viewSize = axis.measureSize(containerRect);
2333
+ const percentOfView = PercentOfView(viewSize);
2334
+ const alignment = Alignment(align, viewSize);
2335
+ const containSnaps = !loop && !!containScroll;
2336
+ const readEdgeGap = loop || !!containScroll;
2337
+ const {
2338
+ slideSizes,
2339
+ slideSizesWithGaps,
2340
+ startGap,
2341
+ endGap
2342
+ } = SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow);
2343
+ const slidesToScroll = SlidesToScroll(axis, viewSize, groupSlides, loop, containerRect, slideRects, startGap, endGap, pixelTolerance);
2344
+ const {
2345
+ snaps,
2346
+ snapsAligned
2347
+ } = ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll);
2348
+ const contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);
2349
+ const {
2350
+ snapsContained,
2351
+ scrollContainLimit
2352
+ } = ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance);
2353
+ const scrollSnaps = containSnaps ? snapsContained : snapsAligned;
2354
+ const {
2355
+ limit
2356
+ } = ScrollLimit(contentSize, scrollSnaps, loop);
2357
+ // Indexes
2358
+ const index = Counter(arrayLastIndex(scrollSnaps), startIndex, loop);
2359
+ const indexPrevious = index.clone();
2360
+ const slideIndexes = arrayKeys(slides);
2361
+ // Animation
2362
+ const update = ({
2363
+ dragHandler,
2364
+ scrollBody,
2365
+ scrollBounds,
2366
+ options: {
2367
+ loop
2368
+ }
2369
+ }) => {
2370
+ if (!loop) scrollBounds.constrain(dragHandler.pointerDown());
2371
+ scrollBody.seek();
2372
+ };
2373
+ const render = ({
2374
+ scrollBody,
2375
+ translate,
2376
+ location,
2377
+ offsetLocation,
2378
+ previousLocation,
2379
+ scrollLooper,
2380
+ slideLooper,
2381
+ dragHandler,
2382
+ animation,
2383
+ eventHandler,
2384
+ scrollBounds,
2385
+ options: {
2386
+ loop
2387
+ }
2388
+ }, alpha) => {
2389
+ const shouldSettle = scrollBody.settled();
2390
+ const withinBounds = !scrollBounds.shouldConstrain();
2391
+ const hasSettled = loop ? shouldSettle : shouldSettle && withinBounds;
2392
+ const hasSettledAndIdle = hasSettled && !dragHandler.pointerDown();
2393
+ if (hasSettledAndIdle) animation.stop();
2394
+ const interpolatedLocation = location.get() * alpha + previousLocation.get() * (1 - alpha);
2395
+ offsetLocation.set(interpolatedLocation);
2396
+ if (loop) {
2397
+ scrollLooper.loop(scrollBody.direction());
2398
+ slideLooper.loop();
2399
+ }
2400
+ translate.to(offsetLocation.get());
2401
+ if (hasSettledAndIdle) eventHandler.emit('settle');
2402
+ if (!hasSettled) eventHandler.emit('scroll');
2403
+ };
2404
+ const animation = Animations(ownerDocument, ownerWindow, () => update(engine), alpha => render(engine, alpha));
2405
+ // Shared
2406
+ const friction = 0.68;
2407
+ const startLocation = scrollSnaps[index.get()];
2408
+ const location = Vector1D(startLocation);
2409
+ const previousLocation = Vector1D(startLocation);
2410
+ const offsetLocation = Vector1D(startLocation);
2411
+ const target = Vector1D(startLocation);
2412
+ const scrollBody = ScrollBody(location, offsetLocation, previousLocation, target, duration, friction);
2413
+ const scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
2414
+ const scrollTo = ScrollTo(animation, index, indexPrevious, scrollBody, scrollTarget, target, eventHandler);
2415
+ const scrollProgress = ScrollProgress(limit);
2416
+ const eventStore = EventStore();
2417
+ const slidesInView = SlidesInView(container, slides, eventHandler, inViewThreshold);
2418
+ const {
2419
+ slideRegistry
2420
+ } = SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes);
2421
+ const slideFocus = SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus);
2422
+ // Engine
2423
+ const engine = {
2424
+ ownerDocument,
2425
+ ownerWindow,
2426
+ eventHandler,
2427
+ containerRect,
2428
+ slideRects,
2429
+ animation,
2430
+ axis,
2431
+ dragHandler: DragHandler(axis, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
2432
+ eventStore,
2433
+ percentOfView,
2434
+ index,
2435
+ indexPrevious,
2436
+ limit,
2437
+ location,
2438
+ offsetLocation,
2439
+ previousLocation,
2440
+ options,
2441
+ resizeHandler: ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects),
2442
+ scrollBody,
2443
+ scrollBounds: ScrollBounds(limit, offsetLocation, target, scrollBody, percentOfView),
2444
+ scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [location, offsetLocation, previousLocation, target]),
2445
+ scrollProgress,
2446
+ scrollSnapList: scrollSnaps.map(scrollProgress.get),
2447
+ scrollSnaps,
2448
+ scrollTarget,
2449
+ scrollTo,
2450
+ slideLooper: SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, offsetLocation, slides),
2451
+ slideFocus,
2452
+ slidesHandler: SlidesHandler(container, eventHandler, watchSlides),
2453
+ slidesInView,
2454
+ slideIndexes,
2455
+ slideRegistry,
2456
+ slidesToScroll,
2457
+ target,
2458
+ translate: Translate(axis, container)
2459
+ };
2460
+ return engine;
2461
+ }
2462
+ function EventHandler() {
2463
+ let listeners = {};
2464
+ let api;
2465
+ function init(emblaApi) {
2466
+ api = emblaApi;
2467
+ }
2468
+ function getListeners(evt) {
2469
+ return listeners[evt] || [];
2470
+ }
2471
+ function emit(evt) {
2472
+ getListeners(evt).forEach(e => e(api, evt));
2473
+ return self;
2474
+ }
2475
+ function on(evt, cb) {
2476
+ listeners[evt] = getListeners(evt).concat([cb]);
2477
+ return self;
2478
+ }
2479
+ function off(evt, cb) {
2480
+ listeners[evt] = getListeners(evt).filter(e => e !== cb);
2481
+ return self;
2482
+ }
2483
+ function clear() {
2484
+ listeners = {};
2485
+ }
2486
+ const self = {
2487
+ init,
2488
+ emit,
2489
+ off,
2490
+ on,
2491
+ clear
2492
+ };
2493
+ return self;
2494
+ }
2495
+ const defaultOptions = {
2496
+ align: 'center',
2497
+ axis: 'x',
2498
+ container: null,
2499
+ slides: null,
2500
+ containScroll: 'trimSnaps',
2501
+ direction: 'ltr',
2502
+ slidesToScroll: 1,
2503
+ inViewThreshold: 0,
2504
+ breakpoints: {},
2505
+ dragFree: false,
2506
+ dragThreshold: 10,
2507
+ loop: false,
2508
+ skipSnaps: false,
2509
+ duration: 25,
2510
+ startIndex: 0,
2511
+ active: true,
2512
+ watchDrag: true,
2513
+ watchResize: true,
2514
+ watchSlides: true,
2515
+ watchFocus: true
2516
+ };
2517
+ function OptionsHandler(ownerWindow) {
2518
+ function mergeOptions(optionsA, optionsB) {
2519
+ return objectsMergeDeep(optionsA, optionsB || {});
2520
+ }
2521
+ function optionsAtMedia(options) {
2522
+ const optionsAtMedia = options.breakpoints || {};
2523
+ const matchedMediaOptions = objectKeys(optionsAtMedia).filter(media => ownerWindow.matchMedia(media).matches).map(media => optionsAtMedia[media]).reduce((a, mediaOption) => mergeOptions(a, mediaOption), {});
2524
+ return mergeOptions(options, matchedMediaOptions);
2525
+ }
2526
+ function optionsMediaQueries(optionsList) {
2527
+ return optionsList.map(options => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
2528
+ }
2529
+ const self = {
2530
+ mergeOptions,
2531
+ optionsAtMedia,
2532
+ optionsMediaQueries
2533
+ };
2534
+ return self;
2535
+ }
2536
+ function PluginsHandler(optionsHandler) {
2537
+ let activePlugins = [];
2538
+ function init(emblaApi, plugins) {
2539
+ activePlugins = plugins.filter(({
2540
+ options
2541
+ }) => optionsHandler.optionsAtMedia(options).active !== false);
2542
+ activePlugins.forEach(plugin => plugin.init(emblaApi, optionsHandler));
2543
+ return plugins.reduce((map, plugin) => Object.assign(map, {
2544
+ [plugin.name]: plugin
2545
+ }), {});
2546
+ }
2547
+ function destroy() {
2548
+ activePlugins = activePlugins.filter(plugin => plugin.destroy());
2549
+ }
2550
+ const self = {
2551
+ init,
2552
+ destroy
2553
+ };
2554
+ return self;
2555
+ }
2556
+ function EmblaCarousel(root, userOptions, userPlugins) {
2557
+ const ownerDocument = root.ownerDocument;
2558
+ const ownerWindow = ownerDocument.defaultView;
2559
+ const optionsHandler = OptionsHandler(ownerWindow);
2560
+ const pluginsHandler = PluginsHandler(optionsHandler);
2561
+ const mediaHandlers = EventStore();
2562
+ const eventHandler = EventHandler();
2563
+ const {
2564
+ mergeOptions,
2565
+ optionsAtMedia,
2566
+ optionsMediaQueries
2567
+ } = optionsHandler;
2568
+ const {
2569
+ on,
2570
+ off,
2571
+ emit
2572
+ } = eventHandler;
2573
+ const reInit = reActivate;
2574
+ let destroyed = false;
2575
+ let engine;
2576
+ let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
2577
+ let options = mergeOptions(optionsBase);
2578
+ let pluginList = [];
2579
+ let pluginApis;
2580
+ let container;
2581
+ let slides;
2582
+ function storeElements() {
2583
+ const {
2584
+ container: userContainer,
2585
+ slides: userSlides
2586
+ } = options;
2587
+ const customContainer = isString(userContainer) ? root.querySelector(userContainer) : userContainer;
2588
+ container = customContainer || root.children[0];
2589
+ const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
2590
+ slides = [].slice.call(customSlides || container.children);
2591
+ }
2592
+ function createEngine(options) {
2593
+ const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler);
2594
+ if (options.loop && !engine.slideLooper.canLoop()) {
2595
+ const optionsWithoutLoop = Object.assign({}, options, {
2596
+ loop: false
2597
+ });
2598
+ return createEngine(optionsWithoutLoop);
2599
+ }
2600
+ return engine;
2601
+ }
2602
+ function activate(withOptions, withPlugins) {
2603
+ if (destroyed) return;
2604
+ optionsBase = mergeOptions(optionsBase, withOptions);
2605
+ options = optionsAtMedia(optionsBase);
2606
+ pluginList = withPlugins || pluginList;
2607
+ storeElements();
2608
+ engine = createEngine(options);
2609
+ optionsMediaQueries([optionsBase, ...pluginList.map(({
2610
+ options
2611
+ }) => options)]).forEach(query => mediaHandlers.add(query, 'change', reActivate));
2612
+ if (!options.active) return;
2613
+ engine.translate.to(engine.location.get());
2614
+ engine.animation.init();
2615
+ engine.slidesInView.init();
2616
+ engine.slideFocus.init(self);
2617
+ engine.eventHandler.init(self);
2618
+ engine.resizeHandler.init(self);
2619
+ engine.slidesHandler.init(self);
2620
+ if (engine.options.loop) engine.slideLooper.loop();
2621
+ if (container.offsetParent && slides.length) engine.dragHandler.init(self);
2622
+ pluginApis = pluginsHandler.init(self, pluginList);
2623
+ }
2624
+ function reActivate(withOptions, withPlugins) {
2625
+ const startIndex = selectedScrollSnap();
2626
+ deActivate();
2627
+ activate(mergeOptions({
2628
+ startIndex
2629
+ }, withOptions), withPlugins);
2630
+ eventHandler.emit('reInit');
2631
+ }
2632
+ function deActivate() {
2633
+ engine.dragHandler.destroy();
2634
+ engine.eventStore.clear();
2635
+ engine.translate.clear();
2636
+ engine.slideLooper.clear();
2637
+ engine.resizeHandler.destroy();
2638
+ engine.slidesHandler.destroy();
2639
+ engine.slidesInView.destroy();
2640
+ engine.animation.destroy();
2641
+ pluginsHandler.destroy();
2642
+ mediaHandlers.clear();
2643
+ }
2644
+ function destroy() {
2645
+ if (destroyed) return;
2646
+ destroyed = true;
2647
+ mediaHandlers.clear();
2648
+ deActivate();
2649
+ eventHandler.emit('destroy');
2650
+ eventHandler.clear();
2651
+ }
2652
+ function scrollTo(index, jump, direction) {
2653
+ if (!options.active || destroyed) return;
2654
+ engine.scrollBody.useBaseFriction().useDuration(jump === true ? 0 : options.duration);
2655
+ engine.scrollTo.index(index, direction || 0);
2656
+ }
2657
+ function scrollNext(jump) {
2658
+ const next = engine.index.add(1).get();
2659
+ scrollTo(next, jump, -1);
2660
+ }
2661
+ function scrollPrev(jump) {
2662
+ const prev = engine.index.add(-1).get();
2663
+ scrollTo(prev, jump, 1);
2664
+ }
2665
+ function canScrollNext() {
2666
+ const next = engine.index.add(1).get();
2667
+ return next !== selectedScrollSnap();
2668
+ }
2669
+ function canScrollPrev() {
2670
+ const prev = engine.index.add(-1).get();
2671
+ return prev !== selectedScrollSnap();
2672
+ }
2673
+ function scrollSnapList() {
2674
+ return engine.scrollSnapList;
2675
+ }
2676
+ function scrollProgress() {
2677
+ return engine.scrollProgress.get(engine.offsetLocation.get());
2678
+ }
2679
+ function selectedScrollSnap() {
2680
+ return engine.index.get();
2681
+ }
2682
+ function previousScrollSnap() {
2683
+ return engine.indexPrevious.get();
2684
+ }
2685
+ function slidesInView() {
2686
+ return engine.slidesInView.get();
2687
+ }
2688
+ function slidesNotInView() {
2689
+ return engine.slidesInView.get(false);
2690
+ }
2691
+ function plugins() {
2692
+ return pluginApis;
2693
+ }
2694
+ function internalEngine() {
2695
+ return engine;
2696
+ }
2697
+ function rootNode() {
2698
+ return root;
2699
+ }
2700
+ function containerNode() {
2701
+ return container;
2702
+ }
2703
+ function slideNodes() {
2704
+ return slides;
2705
+ }
2706
+ const self = {
2707
+ canScrollNext,
2708
+ canScrollPrev,
2709
+ containerNode,
2710
+ internalEngine,
2711
+ destroy,
2712
+ off,
2713
+ on,
2714
+ emit,
2715
+ plugins,
2716
+ previousScrollSnap,
2717
+ reInit,
2718
+ rootNode,
2719
+ scrollNext,
2720
+ scrollPrev,
2721
+ scrollProgress,
2722
+ scrollSnapList,
2723
+ scrollTo,
2724
+ selectedScrollSnap,
2725
+ slideNodes,
2726
+ slidesInView,
2727
+ slidesNotInView
2728
+ };
2729
+ activate(userOptions, userPlugins);
2730
+ setTimeout(() => eventHandler.emit('init'), 0);
2731
+ return self;
2732
+ }
2733
+ EmblaCarousel.globalOptions = undefined;
2734
+
2735
+ function clampNumber(number, min, max) {
2736
+ return Math.min(Math.max(number, min), max);
2737
+ }
2738
+ function isNumber(value) {
2739
+ return typeof value === 'number' && !isNaN(value);
2740
+ }
2741
+ function Fade(userOptions = {}) {
2742
+ const fullOpacity = 1;
2743
+ const noOpacity = 0;
2744
+ const fadeFriction = 0.68;
2745
+ let emblaApi;
2746
+ let opacities = [];
2747
+ let fadeToNextDistance;
2748
+ let distanceFromPointerDown = 0;
2749
+ let fadeVelocity = 0;
2750
+ let progress = 0;
2751
+ let shouldFadePair = false;
2752
+ let defaultSettledBehaviour;
2753
+ let defaultProgressBehaviour;
2754
+ function init(emblaApiInstance) {
2755
+ emblaApi = emblaApiInstance;
2756
+ const selectedSnap = emblaApi.selectedScrollSnap();
2757
+ const {
2758
+ scrollBody,
2759
+ containerRect,
2760
+ axis
2761
+ } = emblaApi.internalEngine();
2762
+ const containerSize = axis.measureSize(containerRect);
2763
+ fadeToNextDistance = clampNumber(containerSize * 0.75, 200, 500);
2764
+ shouldFadePair = false;
2765
+ opacities = emblaApi.scrollSnapList().map((_, index) => index === selectedSnap ? fullOpacity : noOpacity);
2766
+ defaultSettledBehaviour = scrollBody.settled;
2767
+ defaultProgressBehaviour = emblaApi.scrollProgress;
2768
+ scrollBody.settled = settled;
2769
+ emblaApi.scrollProgress = scrollProgress;
2770
+ emblaApi.on('select', select).on('slideFocus', fadeToSelectedSnapInstantly).on('pointerDown', pointerDown).on('pointerUp', pointerUp);
2771
+ disableScroll();
2772
+ fadeToSelectedSnapInstantly();
2773
+ }
2774
+ function destroy() {
2775
+ const {
2776
+ scrollBody
2777
+ } = emblaApi.internalEngine();
2778
+ scrollBody.settled = defaultSettledBehaviour;
2779
+ emblaApi.scrollProgress = defaultProgressBehaviour;
2780
+ emblaApi.off('select', select).off('slideFocus', fadeToSelectedSnapInstantly).off('pointerDown', pointerDown).off('pointerUp', pointerUp);
2781
+ emblaApi.slideNodes().forEach(slideNode => {
2782
+ const slideStyle = slideNode.style;
2783
+ slideStyle.opacity = '';
2784
+ slideStyle.transform = '';
2785
+ slideStyle.pointerEvents = '';
2786
+ if (!slideNode.getAttribute('style')) slideNode.removeAttribute('style');
2787
+ });
2788
+ }
2789
+ function fadeToSelectedSnapInstantly() {
2790
+ const selectedSnap = emblaApi.selectedScrollSnap();
2791
+ setOpacities(selectedSnap, fullOpacity);
2792
+ }
2793
+ function pointerUp() {
2794
+ shouldFadePair = false;
2795
+ }
2796
+ function pointerDown() {
2797
+ shouldFadePair = false;
2798
+ distanceFromPointerDown = 0;
2799
+ fadeVelocity = 0;
2800
+ }
2801
+ function select() {
2802
+ const duration = emblaApi.internalEngine().scrollBody.duration();
2803
+ fadeVelocity = duration ? 0 : fullOpacity;
2804
+ shouldFadePair = true;
2805
+ if (!duration) fadeToSelectedSnapInstantly();
2806
+ }
2807
+ function getSlideTransform(position) {
2808
+ const {
2809
+ axis
2810
+ } = emblaApi.internalEngine();
2811
+ const translateAxis = axis.scroll.toUpperCase();
2812
+ return `translate${translateAxis}(${axis.direction(position)}px)`;
2813
+ }
2814
+ function disableScroll() {
2815
+ const {
2816
+ translate,
2817
+ slideLooper
2818
+ } = emblaApi.internalEngine();
2819
+ translate.clear();
2820
+ translate.toggleActive(false);
2821
+ slideLooper.loopPoints.forEach(({
2822
+ translate
2823
+ }) => {
2824
+ translate.clear();
2825
+ translate.toggleActive(false);
2826
+ });
2827
+ }
2828
+ function lockExcessiveScroll(fadeIndex) {
2829
+ const {
2830
+ scrollSnaps,
2831
+ location,
2832
+ target
2833
+ } = emblaApi.internalEngine();
2834
+ if (!isNumber(fadeIndex) || opacities[fadeIndex] < 0.5) return;
2835
+ location.set(scrollSnaps[fadeIndex]);
2836
+ target.set(location);
2837
+ }
2838
+ function setOpacities(fadeIndex, velocity) {
2839
+ const scrollSnaps = emblaApi.scrollSnapList();
2840
+ scrollSnaps.forEach((_, indexA) => {
2841
+ const absVelocity = Math.abs(velocity);
2842
+ const currentOpacity = opacities[indexA];
2843
+ const isFadeIndex = indexA === fadeIndex;
2844
+ const nextOpacity = isFadeIndex ? currentOpacity + absVelocity : currentOpacity - absVelocity;
2845
+ const clampedOpacity = clampNumber(nextOpacity, noOpacity, fullOpacity);
2846
+ opacities[indexA] = clampedOpacity;
2847
+ const fadePair = isFadeIndex && shouldFadePair;
2848
+ const indexB = emblaApi.previousScrollSnap();
2849
+ if (fadePair) opacities[indexB] = 1 - clampedOpacity;
2850
+ if (isFadeIndex) setProgress(fadeIndex, clampedOpacity);
2851
+ setOpacity(indexA);
2852
+ });
2853
+ }
2854
+ function setOpacity(index) {
2855
+ const slidesInSnap = emblaApi.internalEngine().slideRegistry[index];
2856
+ const {
2857
+ scrollSnaps,
2858
+ containerRect
2859
+ } = emblaApi.internalEngine();
2860
+ const opacity = opacities[index];
2861
+ slidesInSnap.forEach(slideIndex => {
2862
+ const slideStyle = emblaApi.slideNodes()[slideIndex].style;
2863
+ const roundedOpacity = parseFloat(opacity.toFixed(2));
2864
+ const hasOpacity = roundedOpacity > noOpacity;
2865
+ const position = hasOpacity ? scrollSnaps[index] : containerRect.width + 2;
2866
+ const transform = getSlideTransform(position);
2867
+ if (hasOpacity) slideStyle.transform = transform;
2868
+ slideStyle.opacity = roundedOpacity.toString();
2869
+ slideStyle.pointerEvents = opacity > 0.5 ? 'auto' : 'none';
2870
+ if (!hasOpacity) slideStyle.transform = transform;
2871
+ });
2872
+ }
2873
+ function setProgress(fadeIndex, opacity) {
2874
+ const {
2875
+ index,
2876
+ dragHandler,
2877
+ scrollSnaps
2878
+ } = emblaApi.internalEngine();
2879
+ const pointerDown = dragHandler.pointerDown();
2880
+ const snapFraction = 1 / (scrollSnaps.length - 1);
2881
+ let indexA = fadeIndex;
2882
+ let indexB = pointerDown ? emblaApi.selectedScrollSnap() : emblaApi.previousScrollSnap();
2883
+ if (pointerDown && indexA === indexB) {
2884
+ const reverseSign = Math.sign(distanceFromPointerDown) * -1;
2885
+ indexA = indexB;
2886
+ indexB = index.clone().set(indexB).add(reverseSign).get();
2887
+ }
2888
+ const currentPosition = indexB * snapFraction;
2889
+ const diffPosition = (indexA - indexB) * snapFraction;
2890
+ progress = currentPosition + diffPosition * opacity;
2891
+ }
2892
+ function getFadeIndex() {
2893
+ const {
2894
+ dragHandler,
2895
+ index,
2896
+ scrollBody
2897
+ } = emblaApi.internalEngine();
2898
+ const selectedSnap = emblaApi.selectedScrollSnap();
2899
+ if (!dragHandler.pointerDown()) return selectedSnap;
2900
+ const directionSign = Math.sign(scrollBody.velocity());
2901
+ const distanceSign = Math.sign(distanceFromPointerDown);
2902
+ const nextSnap = index.clone().set(selectedSnap).add(directionSign * -1).get();
2903
+ if (!directionSign || !distanceSign) return null;
2904
+ return distanceSign === directionSign ? nextSnap : selectedSnap;
2905
+ }
2906
+ function fade(emblaApi) {
2907
+ const {
2908
+ dragHandler,
2909
+ scrollBody
2910
+ } = emblaApi.internalEngine();
2911
+ const pointerDown = dragHandler.pointerDown();
2912
+ const velocity = scrollBody.velocity();
2913
+ const duration = scrollBody.duration();
2914
+ const fadeIndex = getFadeIndex();
2915
+ const noFadeIndex = !isNumber(fadeIndex);
2916
+ if (pointerDown) {
2917
+ if (!velocity) return;
2918
+ distanceFromPointerDown += velocity;
2919
+ fadeVelocity = Math.abs(velocity / fadeToNextDistance);
2920
+ lockExcessiveScroll(fadeIndex);
2921
+ }
2922
+ if (!pointerDown) {
2923
+ if (!duration || noFadeIndex) return;
2924
+ fadeVelocity += (fullOpacity - opacities[fadeIndex]) / duration;
2925
+ fadeVelocity *= fadeFriction;
2926
+ }
2927
+ if (noFadeIndex) return;
2928
+ setOpacities(fadeIndex, fadeVelocity);
2929
+ }
2930
+ function settled() {
2931
+ const {
2932
+ target,
2933
+ location
2934
+ } = emblaApi.internalEngine();
2935
+ const diffToTarget = target.get() - location.get();
2936
+ const notReachedTarget = Math.abs(diffToTarget) >= 1;
2937
+ const fadeIndex = getFadeIndex();
2938
+ const noFadeIndex = !isNumber(fadeIndex);
2939
+ fade(emblaApi);
2940
+ if (noFadeIndex || notReachedTarget) return false;
2941
+ return opacities[fadeIndex] > 0.999;
2942
+ }
2943
+ function scrollProgress() {
2944
+ return progress;
2945
+ }
2946
+ const self = {
2947
+ name: 'fade',
2948
+ options: userOptions,
2949
+ init,
2950
+ destroy
2951
+ };
2952
+ return self;
2953
+ }
2954
+ Fade.globalOptions = undefined;
2955
+
2956
+ var LsgHeroController = /** @class */function () {
2957
+ function LsgHeroController(viewport, elements, options) {
2958
+ if (elements === void 0) {
2959
+ elements = {};
2960
+ }
2961
+ if (options === void 0) {
2962
+ options = {};
2963
+ }
2964
+ var _this = this;
2965
+ var _a, _b, _c;
2966
+ this.embla = null;
2967
+ this.autoplayTimer = null;
2968
+ this.contentObserver = null;
2969
+ this.scrollPrev = function () {
2970
+ var _a;
2971
+ (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.scrollPrev();
2972
+ if (_this.opts.autoplay) _this.startAutoplay();
2973
+ };
2974
+ this.scrollNext = function () {
2975
+ var _a;
2976
+ (_a = _this.embla) === null || _a === void 0 ? void 0 : _a.scrollNext();
2977
+ if (_this.opts.autoplay) _this.startAutoplay();
2978
+ };
2979
+ this.handleScrollDown = function () {
2980
+ var _a;
2981
+ (_a = _this.els.scrollDownTarget) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
2982
+ behavior: "smooth"
2983
+ });
2984
+ };
2985
+ /** Start the autoplay interval (resets any existing timer). */
2986
+ this.startAutoplay = function () {
2987
+ _this.stopAutoplay();
2988
+ _this.autoplayTimer = setInterval(_this.scrollNext, _this.opts.autoplayInterval);
2989
+ };
2990
+ /** Clear the autoplay interval. */
2991
+ this.stopAutoplay = function () {
2992
+ if (_this.autoplayTimer !== null) {
2993
+ clearInterval(_this.autoplayTimer);
2994
+ _this.autoplayTimer = null;
2995
+ }
2996
+ };
2997
+ this.opts = {
2998
+ transition: (_a = options.transition) !== null && _a !== void 0 ? _a : "slide",
2999
+ autoplay: (_b = options.autoplay) !== null && _b !== void 0 ? _b : true,
3000
+ autoplayInterval: (_c = options.autoplayInterval) !== null && _c !== void 0 ? _c : 5000
3001
+ };
3002
+ this.els = elements;
3003
+ this.mount(viewport);
3004
+ }
3005
+ LsgHeroController.prototype.mount = function (viewport) {
3006
+ var _a, _b, _c;
3007
+ var plugins = this.opts.transition === "fade" ? [Fade()] : [];
3008
+ this.embla = EmblaCarousel(viewport, {
3009
+ loop: true
3010
+ }, plugins);
3011
+ if (this.opts.autoplay) {
3012
+ this.startAutoplay();
3013
+ this.embla.on("pointerDown", this.stopAutoplay);
3014
+ this.embla.on("pointerUp", this.startAutoplay);
3015
+ }
3016
+ (_a = this.els.prevBtn) === null || _a === void 0 ? void 0 : _a.addEventListener("click", this.scrollPrev);
3017
+ (_b = this.els.nextBtn) === null || _b === void 0 ? void 0 : _b.addEventListener("click", this.scrollNext);
3018
+ (_c = this.els.scrollDownBtn) === null || _c === void 0 ? void 0 : _c.addEventListener("click", this.handleScrollDown);
3019
+ // Sync the first slide's content-wrapper height to a CSS custom property
3020
+ // on the section root so the controls column can match it dynamically.
3021
+ var section = viewport.closest("[data-lsg-is='hero']");
3022
+ var contentWrapper = section === null || section === void 0 ? void 0 : section.querySelector(".lsg-hero-card__content-wrapper");
3023
+ if (section && contentWrapper && typeof ResizeObserver !== "undefined") {
3024
+ var setHeight_1 = function (el) {
3025
+ section.style.setProperty("--lsg-hero-content-height", "".concat(el.offsetHeight, "px"));
3026
+ };
3027
+ setHeight_1(contentWrapper);
3028
+ this.contentObserver = new ResizeObserver(function (entries) {
3029
+ setHeight_1(entries[0].target);
3030
+ });
3031
+ this.contentObserver.observe(contentWrapper);
3032
+ }
3033
+ };
3034
+ Object.defineProperty(LsgHeroController.prototype, "emblaApi", {
3035
+ /** Direct access to the underlying Embla instance for advanced usage. */
3036
+ get: function () {
3037
+ return this.embla;
3038
+ },
3039
+ enumerable: false,
3040
+ configurable: true
3041
+ });
3042
+ /** Tear down event listeners, autoplay, and the Embla instance. */
3043
+ LsgHeroController.prototype.destroy = function () {
3044
+ var _a, _b, _c, _d;
3045
+ this.stopAutoplay();
3046
+ (_a = this.contentObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
3047
+ this.contentObserver = null;
3048
+ if (this.embla) {
3049
+ this.embla.off("pointerDown", this.stopAutoplay);
3050
+ this.embla.off("pointerUp", this.startAutoplay);
3051
+ this.embla.destroy();
3052
+ this.embla = null;
3053
+ }
3054
+ (_b = this.els.prevBtn) === null || _b === void 0 ? void 0 : _b.removeEventListener("click", this.scrollPrev);
3055
+ (_c = this.els.nextBtn) === null || _c === void 0 ? void 0 : _c.removeEventListener("click", this.scrollNext);
3056
+ (_d = this.els.scrollDownBtn) === null || _d === void 0 ? void 0 : _d.removeEventListener("click", this.handleScrollDown);
3057
+ };
3058
+ return LsgHeroController;
3059
+ }();
3060
+
3061
+ // ─────────────────────────────────────────────────────────────────────────────
3062
+ // LsgHeroCard
3063
+ // ─────────────────────────────────────────────────────────────────────────────
3064
+ var LsgHeroCard = function (_a) {
3065
+ var imageSrc = _a.imageSrc,
3066
+ _b = _a.imageAlt,
3067
+ imageAlt = _b === void 0 ? "" : _b,
3068
+ videoSrc = _a.videoSrc,
3069
+ youtubeId = _a.youtubeId,
3070
+ vimeoId = _a.vimeoId,
3071
+ children = _a.children,
3072
+ index = _a.index,
3073
+ total = _a.total,
3074
+ _c = _a.className,
3075
+ className = _c === void 0 ? "" : _c;
3076
+ var _d = useState(false),
3077
+ videoReady = _d[0],
3078
+ setVideoReady = _d[1];
3079
+ // Video source priority: YouTube > Vimeo > DAM
3080
+ var hasYoutube = Boolean(youtubeId);
3081
+ var hasVimeo = !hasYoutube && Boolean(vimeoId);
3082
+ var hasDam = !hasYoutube && !hasVimeo && Boolean(videoSrc);
3083
+ var youtubeEmbedSrc = youtubeId ? "https://www.youtube.com/embed/".concat(youtubeId, "?autoplay=1&mute=1&loop=1&controls=0&disablekb=1&fs=0&iv_load_policy=3&modestbranding=1&playlist=").concat(youtubeId, "&rel=0") : undefined;
3084
+ var vimeoEmbedSrc = vimeoId ? "https://player.vimeo.com/video/".concat(vimeoId, "?autoplay=1&loop=1&background=1&muted=1") : undefined;
3085
+ var ariaLabel = index !== undefined && total !== undefined ? "Slide ".concat(index + 1, " of ").concat(total) : undefined;
3086
+ var articleClasses = ["lsg-hero-card", className].filter(Boolean).join(" ");
3087
+ return /*#__PURE__*/React.createElement("article", {
3088
+ className: articleClasses,
3089
+ role: "listitem",
3090
+ "aria-label": ariaLabel
3091
+ }, /*#__PURE__*/React.createElement("div", {
3092
+ className: "lsg-hero-card__media",
3093
+ "aria-hidden": "true"
3094
+ }, imageSrc &&
3095
+ /*#__PURE__*/
3096
+ // eslint-disable-next-line @next/next/no-img-element
3097
+ React.createElement("img", {
3098
+ className: "lsg-hero-card__image",
3099
+ src: imageSrc,
3100
+ alt: imageAlt,
3101
+ loading: "eager"
3102
+ }), hasDam && /*#__PURE__*/React.createElement("video", {
3103
+ className: "lsg-hero-card__video".concat(videoReady ? " lsg-hero-card__video--ready" : ""),
3104
+ autoPlay: true,
3105
+ muted: true,
3106
+ loop: true,
3107
+ playsInline: true,
3108
+ onCanPlay: function () {
3109
+ return setVideoReady(true);
3110
+ }
3111
+ }, /*#__PURE__*/React.createElement("source", {
3112
+ src: videoSrc
3113
+ })), hasYoutube && /*#__PURE__*/React.createElement("div", {
3114
+ className: "lsg-hero-card__video-embed lsg-hero-card__video-embed--youtube"
3115
+ }, /*#__PURE__*/React.createElement("iframe", {
3116
+ src: youtubeEmbedSrc,
3117
+ title: "Hero background video",
3118
+ allow: "autoplay",
3119
+ "aria-hidden": "true",
3120
+ tabIndex: -1
3121
+ })), hasVimeo && /*#__PURE__*/React.createElement("div", {
3122
+ className: "lsg-hero-card__video-embed lsg-hero-card__video-embed--vimeo"
3123
+ }, /*#__PURE__*/React.createElement("iframe", {
3124
+ src: vimeoEmbedSrc,
3125
+ title: "Hero background video",
3126
+ allow: "autoplay",
3127
+ "aria-hidden": "true",
3128
+ tabIndex: -1
3129
+ }))), /*#__PURE__*/React.createElement("div", {
3130
+ className: "lsg-hero-card__content layout-container--medium"
3131
+ }, /*#__PURE__*/React.createElement("div", {
3132
+ className: "lsg-hero-card__content-wrapper"
3133
+ }, children)));
3134
+ };
3135
+
3136
+ // ─────────────────────────────────────────────────────────────────────────────
3137
+ // LsgHero
3138
+ // ─────────────────────────────────────────────────────────────────────────────
3139
+ var LsgHero = function (_a) {
3140
+ var _b = _a.slides,
3141
+ slides = _b === void 0 ? [] : _b,
3142
+ _c = _a.height,
3143
+ height = _c === void 0 ? "full" : _c,
3144
+ _d = _a.showArrows,
3145
+ showArrows = _d === void 0 ? true : _d,
3146
+ _e = _a.transition,
3147
+ transition = _e === void 0 ? "slide" : _e,
3148
+ _f = _a.enableScrollDown,
3149
+ enableScrollDown = _f === void 0 ? false : _f,
3150
+ scrollDownText = _a.scrollDownText,
3151
+ _g = _a.autoplay,
3152
+ autoplay = _g === void 0 ? true : _g,
3153
+ _h = _a.autoplayInterval,
3154
+ autoplayInterval = _h === void 0 ? 5000 : _h,
3155
+ cardBackground = _a.cardBackground,
3156
+ cardColor = _a.cardColor,
3157
+ _j = _a.className,
3158
+ className = _j === void 0 ? "" : _j;
3159
+ var isCarousel = slides.length > 1;
3160
+ // ── Refs ──────────────────────────────────────────────────────────────────
3161
+ var sectionRef = useRef(null);
3162
+ var viewportRef = useRef(null);
3163
+ var prevBtnRef = useRef(null);
3164
+ var nextBtnRef = useRef(null);
3165
+ var controllerRef = useRef(null);
3166
+ // ── Controller init (vanilla JS — same logic as AEM clientlib) ────────────
3167
+ useEffect(function () {
3168
+ if (!viewportRef.current || !isCarousel) return;
3169
+ controllerRef.current = new LsgHeroController(viewportRef.current, {
3170
+ prevBtn: showArrows ? prevBtnRef.current : undefined,
3171
+ nextBtn: showArrows ? nextBtnRef.current : undefined
3172
+ }, {
3173
+ transition: transition,
3174
+ autoplay: autoplay,
3175
+ autoplayInterval: autoplayInterval
3176
+ });
3177
+ return function () {
3178
+ var _a;
3179
+ (_a = controllerRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
3180
+ controllerRef.current = null;
3181
+ };
3182
+ }, [isCarousel, showArrows, transition, autoplay, autoplayInterval]);
3183
+ // ── Scroll-down ───────────────────────────────────────────────────────────
3184
+ var handleScrollDown = useCallback(function () {
3185
+ var _a;
3186
+ var next = (_a = sectionRef.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling;
3187
+ next === null || next === void 0 ? void 0 : next.scrollIntoView({
3188
+ behavior: "smooth"
3189
+ });
3190
+ }, []);
3191
+ // ── Class names ───────────────────────────────────────────────────────────
3192
+ var sectionClasses = ["lsg-hero", "lsg-hero--".concat(height), "lsg-hero--".concat(transition), cardBackground && "lsg-hero--card-bg-".concat(cardBackground), cardColor && "lsg-hero--card-color-".concat(cardColor), className].filter(Boolean).join(" ");
3193
+ // ── Render ────────────────────────────────────────────────────────────────
3194
+ return /*#__PURE__*/React.createElement("section", {
3195
+ ref: sectionRef,
3196
+ className: sectionClasses,
3197
+ "data-lsg-is": "hero",
3198
+ "data-lsg-carousel": String(isCarousel),
3199
+ "data-lsg-transition": transition,
3200
+ "data-lsg-arrows": String(showArrows)
3201
+ }, /*#__PURE__*/React.createElement("div", {
3202
+ className: "lsg-hero__viewport",
3203
+ ref: viewportRef
3204
+ }, /*#__PURE__*/React.createElement("div", {
3205
+ className: "lsg-hero__slides",
3206
+ role: "list"
3207
+ }, slides.map(function (slide, index) {
3208
+ return /*#__PURE__*/React.createElement(LsgHeroCard, _extends({
3209
+ key: index
3210
+ }, slide, {
3211
+ index: index,
3212
+ total: slides.length
3213
+ }));
3214
+ }))), isCarousel && showArrows && /*#__PURE__*/React.createElement("div", {
3215
+ className: "lsg-hero__controls-wrap"
3216
+ }, /*#__PURE__*/React.createElement("nav", {
3217
+ className: "lsg-hero__controls",
3218
+ "aria-label": "Hero navigation"
3219
+ }, /*#__PURE__*/React.createElement("button", {
3220
+ ref: prevBtnRef,
3221
+ className: "lsg-hero__prev",
3222
+ type: "button",
3223
+ "aria-label": "Previous slide"
3224
+ }, /*#__PURE__*/React.createElement("span", {
3225
+ className: "lsg-hero__arrow-icon",
3226
+ "aria-hidden": "true"
3227
+ })), /*#__PURE__*/React.createElement("button", {
3228
+ ref: nextBtnRef,
3229
+ className: "lsg-hero__next",
3230
+ type: "button",
3231
+ "aria-label": "Next slide"
3232
+ }, /*#__PURE__*/React.createElement("span", {
3233
+ className: "lsg-hero__arrow-icon",
3234
+ "aria-hidden": "true"
3235
+ })))), enableScrollDown && /*#__PURE__*/React.createElement("div", {
3236
+ className: "lsg-hero__scroll-down"
3237
+ }, /*#__PURE__*/React.createElement("button", {
3238
+ className: "lsg-hero__scroll-down-btn",
3239
+ type: "button",
3240
+ "aria-label": scrollDownText !== null && scrollDownText !== void 0 ? scrollDownText : "Scroll down",
3241
+ onClick: handleScrollDown
3242
+ }, scrollDownText && /*#__PURE__*/React.createElement("span", {
3243
+ className: "lsg-hero__scroll-down-text"
3244
+ }, scrollDownText), /*#__PURE__*/React.createElement("span", {
3245
+ className: "lsg-hero__scroll-down-icon",
3246
+ "aria-hidden": "true"
3247
+ }))));
3248
+ };
3249
+
1102
3250
  var BASE_COMPONENTS = {
1103
3251
  LsgButton: LsgButton,
1104
3252
  LsgBanner: LsgBanner,
@@ -1112,7 +3260,8 @@ var BASE_COMPONENTS = {
1112
3260
  LsgHeader: LsgHeader,
1113
3261
  LsgQuickLinks: LsgQuickLinks,
1114
3262
  LsgSocialMediaIcons: LsgSocialMediaIcons,
1115
- LsgFooter: LsgFooter
3263
+ LsgFooter: LsgFooter,
3264
+ LsgHero: LsgHero
1116
3265
  };
1117
3266
  function createThemeComponent(themeName, componentName, Component) {
1118
3267
  var WrappedComponent = function (props) {
@@ -1137,7 +3286,8 @@ function createThemeComponents(themeName) {
1137
3286
  LsgHeader: createThemeComponent(themeName, "header", BASE_COMPONENTS.LsgHeader),
1138
3287
  LsgQuickLinks: createThemeComponent(themeName, "quick-links", BASE_COMPONENTS.LsgQuickLinks),
1139
3288
  LsgSocialMediaIcons: createThemeComponent(themeName, "social-media-icons", BASE_COMPONENTS.LsgSocialMediaIcons),
1140
- LsgFooter: createThemeComponent(themeName, "footer", BASE_COMPONENTS.LsgFooter)
3289
+ LsgFooter: createThemeComponent(themeName, "footer", BASE_COMPONENTS.LsgFooter),
3290
+ LsgHero: createThemeComponent(themeName, "hero", BASE_COMPONENTS.LsgHero)
1141
3291
  };
1142
3292
  }
1143
3293
 
@@ -1154,7 +3304,8 @@ var Theme1LsgButton = theme1Components.LsgButton,
1154
3304
  Theme1LsgHeader = theme1Components.LsgHeader,
1155
3305
  Theme1LsgQuickLinks = theme1Components.LsgQuickLinks,
1156
3306
  Theme1LsgSocialMediaIcons = theme1Components.LsgSocialMediaIcons,
1157
- Theme1LsgFooter = theme1Components.LsgFooter;
3307
+ Theme1LsgFooter = theme1Components.LsgFooter,
3308
+ Theme1LsgHero = theme1Components.LsgHero;
1158
3309
 
1159
3310
  var theme2Components = createThemeComponents("theme-2");
1160
3311
  var Theme2LsgButton = theme2Components.LsgButton,
@@ -1169,7 +3320,8 @@ var Theme2LsgButton = theme2Components.LsgButton,
1169
3320
  Theme2LsgHeader = theme2Components.LsgHeader,
1170
3321
  Theme2LsgQuickLinks = theme2Components.LsgQuickLinks,
1171
3322
  Theme2LsgSocialMediaIcons = theme2Components.LsgSocialMediaIcons,
1172
- Theme2LsgFooter = theme2Components.LsgFooter;
3323
+ Theme2LsgFooter = theme2Components.LsgFooter,
3324
+ Theme2LsgHero = theme2Components.LsgHero;
1173
3325
 
1174
3326
  var theme3Components = createThemeComponents("theme-3");
1175
3327
  var Theme3LsgButton = theme3Components.LsgButton,
@@ -1184,7 +3336,8 @@ var Theme3LsgButton = theme3Components.LsgButton,
1184
3336
  Theme3LsgHeader = theme3Components.LsgHeader,
1185
3337
  Theme3LsgQuickLinks = theme3Components.LsgQuickLinks,
1186
3338
  Theme3LsgSocialMediaIcons = theme3Components.LsgSocialMediaIcons,
1187
- Theme3LsgFooter = theme3Components.LsgFooter;
3339
+ Theme3LsgFooter = theme3Components.LsgFooter,
3340
+ Theme3LsgHero = theme3Components.LsgHero;
1188
3341
 
1189
- export { LsgBanner, LsgButton, LsgCard, LsgCards, LsgFooter, LsgHeader, LsgLanguageSwitcher, LsgLogo, LsgNavigation, LsgQuickLinks, LsgSearchOverlay, LsgSearchTrigger, LsgSocialMediaIcons, Theme1LsgBanner, Theme1LsgButton, Theme1LsgCard, Theme1LsgCards, Theme1LsgFooter, Theme1LsgHeader, Theme1LsgLanguageSwitcher, Theme1LsgLogo, Theme1LsgNavigation, Theme1LsgQuickLinks, Theme1LsgSearchOverlay, Theme1LsgSearchTrigger, Theme1LsgSocialMediaIcons, Theme2LsgBanner, Theme2LsgButton, Theme2LsgCard, Theme2LsgCards, Theme2LsgFooter, Theme2LsgHeader, Theme2LsgLanguageSwitcher, Theme2LsgLogo, Theme2LsgNavigation, Theme2LsgQuickLinks, Theme2LsgSearchOverlay, Theme2LsgSearchTrigger, Theme2LsgSocialMediaIcons, Theme3LsgBanner, Theme3LsgButton, Theme3LsgCard, Theme3LsgCards, Theme3LsgFooter, Theme3LsgHeader, Theme3LsgLanguageSwitcher, Theme3LsgLogo, Theme3LsgNavigation, Theme3LsgQuickLinks, Theme3LsgSearchOverlay, Theme3LsgSearchTrigger, Theme3LsgSocialMediaIcons, theme1Components, theme2Components, theme3Components };
3342
+ export { LsgBanner, LsgButton, LsgCard, LsgCards, LsgFooter, LsgHeader, LsgHero, LsgHeroCard, LsgHeroController, LsgLanguageSwitcher, LsgLogo, LsgNavigation, LsgQuickLinks, LsgSearchOverlay, LsgSearchTrigger, LsgSocialMediaIcons, Theme1LsgBanner, Theme1LsgButton, Theme1LsgCard, Theme1LsgCards, Theme1LsgFooter, Theme1LsgHeader, Theme1LsgHero, Theme1LsgLanguageSwitcher, Theme1LsgLogo, Theme1LsgNavigation, Theme1LsgQuickLinks, Theme1LsgSearchOverlay, Theme1LsgSearchTrigger, Theme1LsgSocialMediaIcons, Theme2LsgBanner, Theme2LsgButton, Theme2LsgCard, Theme2LsgCards, Theme2LsgFooter, Theme2LsgHeader, Theme2LsgHero, Theme2LsgLanguageSwitcher, Theme2LsgLogo, Theme2LsgNavigation, Theme2LsgQuickLinks, Theme2LsgSearchOverlay, Theme2LsgSearchTrigger, Theme2LsgSocialMediaIcons, Theme3LsgBanner, Theme3LsgButton, Theme3LsgCard, Theme3LsgCards, Theme3LsgFooter, Theme3LsgHeader, Theme3LsgHero, Theme3LsgLanguageSwitcher, Theme3LsgLogo, Theme3LsgNavigation, Theme3LsgQuickLinks, Theme3LsgSearchOverlay, Theme3LsgSearchTrigger, Theme3LsgSocialMediaIcons, theme1Components, theme2Components, theme3Components };
1190
3343
  //# sourceMappingURL=index.esm.js.map