@sledge-app/react-instant-search 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sledge-react-instant-search.cjs +1 -1
- package/dist/sledge-react-instant-search.cjs.map +1 -1
- package/dist/sledge-react-instant-search.js +448 -324
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/{vendor-9c93dcff.cjs → vendor-db1ee31a.cjs} +2 -2
- package/dist/vendor-db1ee31a.cjs.map +1 -0
- package/dist/{vendor-efe38901.js → vendor-eadacf73.js} +1719 -11
- package/dist/vendor-eadacf73.js.map +1 -0
- package/package.json +2 -1
- package/dist/vendor-9c93dcff.cjs.map +0 -1
- package/dist/vendor-efe38901.js.map +0 -1
|
@@ -8814,11 +8814,11 @@ const sanitize = (v2) => Math.round(v2 * 1e5) / 1e5;
|
|
|
8814
8814
|
const floatRegex = /(-)?([\d]*\.?[\d])+/g;
|
|
8815
8815
|
const colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
|
|
8816
8816
|
const singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
8817
|
-
function isString(v2) {
|
|
8817
|
+
function isString$1(v2) {
|
|
8818
8818
|
return typeof v2 === "string";
|
|
8819
8819
|
}
|
|
8820
8820
|
const createUnitType = (unit) => ({
|
|
8821
|
-
test: (v2) => isString(v2) && v2.endsWith(unit) && v2.split(" ").length === 1,
|
|
8821
|
+
test: (v2) => isString$1(v2) && v2.endsWith(unit) && v2.split(" ").length === 1,
|
|
8822
8822
|
parse: parseFloat,
|
|
8823
8823
|
transform: (v2) => `${v2}${unit}`
|
|
8824
8824
|
});
|
|
@@ -9947,10 +9947,10 @@ const easingDefinitionToFunction = (definition) => {
|
|
|
9947
9947
|
return definition;
|
|
9948
9948
|
};
|
|
9949
9949
|
const isColorString = (type, testProp) => (v2) => {
|
|
9950
|
-
return Boolean(isString(v2) && singleColorRegex.test(v2) && v2.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v2, testProp));
|
|
9950
|
+
return Boolean(isString$1(v2) && singleColorRegex.test(v2) && v2.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v2, testProp));
|
|
9951
9951
|
};
|
|
9952
9952
|
const splitColor = (aName, bName, cName) => (v2) => {
|
|
9953
|
-
if (!isString(v2))
|
|
9953
|
+
if (!isString$1(v2))
|
|
9954
9954
|
return v2;
|
|
9955
9955
|
const [a2, b2, c2, alpha2] = v2.match(floatRegex);
|
|
9956
9956
|
return {
|
|
@@ -10021,7 +10021,7 @@ const color = {
|
|
|
10021
10021
|
}
|
|
10022
10022
|
},
|
|
10023
10023
|
transform: (v2) => {
|
|
10024
|
-
return isString(v2) ? v2 : v2.hasOwnProperty("red") ? rgba.transform(v2) : hsla.transform(v2);
|
|
10024
|
+
return isString$1(v2) ? v2 : v2.hasOwnProperty("red") ? rgba.transform(v2) : hsla.transform(v2);
|
|
10025
10025
|
}
|
|
10026
10026
|
};
|
|
10027
10027
|
const mix = (from, to, progress2) => -progress2 * from + progress2 * to + from;
|
|
@@ -10092,7 +10092,7 @@ const colorToken = "${c}";
|
|
|
10092
10092
|
const numberToken = "${n}";
|
|
10093
10093
|
function test(v2) {
|
|
10094
10094
|
var _a, _b;
|
|
10095
|
-
return isNaN(v2) && isString(v2) && (((_a = v2.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) + (((_b = v2.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;
|
|
10095
|
+
return isNaN(v2) && isString$1(v2) && (((_a = v2.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) + (((_b = v2.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;
|
|
10096
10096
|
}
|
|
10097
10097
|
function analyseComplexValue(v2) {
|
|
10098
10098
|
if (typeof v2 === "number")
|
|
@@ -17063,6 +17063,1713 @@ const $57acba87d6e25586$export$be92b6f5f03c0fe9 = $57acba87d6e25586$export$ccf8d
|
|
|
17063
17063
|
const $57acba87d6e25586$export$d5c6c08dc2d3ca7 = $57acba87d6e25586$export$a21cbf9f11fca853;
|
|
17064
17064
|
const $57acba87d6e25586$export$9a4e88b92edfce6b = $57acba87d6e25586$export$2fabd85d0eba3c57;
|
|
17065
17065
|
const $57acba87d6e25586$export$6521433ed15a34db = $57acba87d6e25586$export$9fba1154677d7cd2;
|
|
17066
|
+
function isObject$1(subject) {
|
|
17067
|
+
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
17068
|
+
}
|
|
17069
|
+
function isRecord(subject) {
|
|
17070
|
+
return isObject$1(subject) || Array.isArray(subject);
|
|
17071
|
+
}
|
|
17072
|
+
function canUseDOM() {
|
|
17073
|
+
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
17074
|
+
}
|
|
17075
|
+
function areOptionsEqual(optionsA, optionsB) {
|
|
17076
|
+
const optionsAKeys = Object.keys(optionsA);
|
|
17077
|
+
const optionsBKeys = Object.keys(optionsB);
|
|
17078
|
+
if (optionsAKeys.length !== optionsBKeys.length)
|
|
17079
|
+
return false;
|
|
17080
|
+
const breakpointsA = JSON.stringify(Object.keys(optionsA.breakpoints || {}));
|
|
17081
|
+
const breakpointsB = JSON.stringify(Object.keys(optionsB.breakpoints || {}));
|
|
17082
|
+
if (breakpointsA !== breakpointsB)
|
|
17083
|
+
return false;
|
|
17084
|
+
return optionsAKeys.every((key) => {
|
|
17085
|
+
const valueA = optionsA[key];
|
|
17086
|
+
const valueB = optionsB[key];
|
|
17087
|
+
if (typeof valueA === "function")
|
|
17088
|
+
return `${valueA}` === `${valueB}`;
|
|
17089
|
+
if (!isRecord(valueA) || !isRecord(valueB))
|
|
17090
|
+
return valueA === valueB;
|
|
17091
|
+
return areOptionsEqual(valueA, valueB);
|
|
17092
|
+
});
|
|
17093
|
+
}
|
|
17094
|
+
function sortAndMapPluginToOptions(plugins) {
|
|
17095
|
+
return plugins.concat().sort((a2, b2) => a2.name > b2.name ? 1 : -1).map((plugin) => plugin.options);
|
|
17096
|
+
}
|
|
17097
|
+
function arePluginsEqual(pluginsA, pluginsB) {
|
|
17098
|
+
if (pluginsA.length !== pluginsB.length)
|
|
17099
|
+
return false;
|
|
17100
|
+
const optionsA = sortAndMapPluginToOptions(pluginsA);
|
|
17101
|
+
const optionsB = sortAndMapPluginToOptions(pluginsB);
|
|
17102
|
+
return optionsA.every((optionA, index2) => {
|
|
17103
|
+
const optionB = optionsB[index2];
|
|
17104
|
+
return areOptionsEqual(optionA, optionB);
|
|
17105
|
+
});
|
|
17106
|
+
}
|
|
17107
|
+
function isNumber(subject) {
|
|
17108
|
+
return typeof subject === "number";
|
|
17109
|
+
}
|
|
17110
|
+
function isString(subject) {
|
|
17111
|
+
return typeof subject === "string";
|
|
17112
|
+
}
|
|
17113
|
+
function isBoolean(subject) {
|
|
17114
|
+
return typeof subject === "boolean";
|
|
17115
|
+
}
|
|
17116
|
+
function isObject(subject) {
|
|
17117
|
+
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
17118
|
+
}
|
|
17119
|
+
function mathAbs(n2) {
|
|
17120
|
+
return Math.abs(n2);
|
|
17121
|
+
}
|
|
17122
|
+
function mathSign(n2) {
|
|
17123
|
+
return Math.sign(n2);
|
|
17124
|
+
}
|
|
17125
|
+
function deltaAbs(valueB, valueA) {
|
|
17126
|
+
return mathAbs(valueB - valueA);
|
|
17127
|
+
}
|
|
17128
|
+
function factorAbs(valueB, valueA) {
|
|
17129
|
+
if (valueB === 0 || valueA === 0)
|
|
17130
|
+
return 0;
|
|
17131
|
+
if (mathAbs(valueB) <= mathAbs(valueA))
|
|
17132
|
+
return 0;
|
|
17133
|
+
const diff = deltaAbs(mathAbs(valueB), mathAbs(valueA));
|
|
17134
|
+
return mathAbs(diff / valueB);
|
|
17135
|
+
}
|
|
17136
|
+
function arrayKeys(array) {
|
|
17137
|
+
return objectKeys(array).map(Number);
|
|
17138
|
+
}
|
|
17139
|
+
function arrayLast(array) {
|
|
17140
|
+
return array[arrayLastIndex(array)];
|
|
17141
|
+
}
|
|
17142
|
+
function arrayLastIndex(array) {
|
|
17143
|
+
return Math.max(0, array.length - 1);
|
|
17144
|
+
}
|
|
17145
|
+
function arrayFromNumber(n2, startAt = 0) {
|
|
17146
|
+
return Array.from(Array(n2), (_, i2) => startAt + i2);
|
|
17147
|
+
}
|
|
17148
|
+
function objectKeys(object) {
|
|
17149
|
+
return Object.keys(object);
|
|
17150
|
+
}
|
|
17151
|
+
function objectsMergeDeep(objectA, objectB) {
|
|
17152
|
+
return [objectA, objectB].reduce((mergedObjects, currentObject) => {
|
|
17153
|
+
objectKeys(currentObject).forEach((key) => {
|
|
17154
|
+
const valueA = mergedObjects[key];
|
|
17155
|
+
const valueB = currentObject[key];
|
|
17156
|
+
const areObjects = isObject(valueA) && isObject(valueB);
|
|
17157
|
+
mergedObjects[key] = areObjects ? objectsMergeDeep(valueA, valueB) : valueB;
|
|
17158
|
+
});
|
|
17159
|
+
return mergedObjects;
|
|
17160
|
+
}, {});
|
|
17161
|
+
}
|
|
17162
|
+
function isMouseEvent(evt, ownerWindow) {
|
|
17163
|
+
return typeof ownerWindow.MouseEvent !== "undefined" && evt instanceof ownerWindow.MouseEvent;
|
|
17164
|
+
}
|
|
17165
|
+
function Alignment(align, viewSize) {
|
|
17166
|
+
const predefined = {
|
|
17167
|
+
start,
|
|
17168
|
+
center,
|
|
17169
|
+
end
|
|
17170
|
+
};
|
|
17171
|
+
function start() {
|
|
17172
|
+
return 0;
|
|
17173
|
+
}
|
|
17174
|
+
function center(n2) {
|
|
17175
|
+
return end(n2) / 2;
|
|
17176
|
+
}
|
|
17177
|
+
function end(n2) {
|
|
17178
|
+
return viewSize - n2;
|
|
17179
|
+
}
|
|
17180
|
+
function percent2() {
|
|
17181
|
+
return viewSize * Number(align);
|
|
17182
|
+
}
|
|
17183
|
+
function measure(n2) {
|
|
17184
|
+
if (isNumber(align))
|
|
17185
|
+
return percent2();
|
|
17186
|
+
return predefined[align](n2);
|
|
17187
|
+
}
|
|
17188
|
+
const self = {
|
|
17189
|
+
measure
|
|
17190
|
+
};
|
|
17191
|
+
return self;
|
|
17192
|
+
}
|
|
17193
|
+
function Axis(axis, direction) {
|
|
17194
|
+
const scroll = axis === "y" ? "y" : "x";
|
|
17195
|
+
const cross = axis === "y" ? "x" : "y";
|
|
17196
|
+
const startEdge = getStartEdge();
|
|
17197
|
+
const endEdge = getEndEdge();
|
|
17198
|
+
function measureSize(rect) {
|
|
17199
|
+
const {
|
|
17200
|
+
width,
|
|
17201
|
+
height
|
|
17202
|
+
} = rect;
|
|
17203
|
+
return scroll === "x" ? width : height;
|
|
17204
|
+
}
|
|
17205
|
+
function getStartEdge() {
|
|
17206
|
+
if (scroll === "y")
|
|
17207
|
+
return "top";
|
|
17208
|
+
return direction === "rtl" ? "right" : "left";
|
|
17209
|
+
}
|
|
17210
|
+
function getEndEdge() {
|
|
17211
|
+
if (scroll === "y")
|
|
17212
|
+
return "bottom";
|
|
17213
|
+
return direction === "rtl" ? "left" : "right";
|
|
17214
|
+
}
|
|
17215
|
+
const self = {
|
|
17216
|
+
scroll,
|
|
17217
|
+
cross,
|
|
17218
|
+
startEdge,
|
|
17219
|
+
endEdge,
|
|
17220
|
+
measureSize
|
|
17221
|
+
};
|
|
17222
|
+
return self;
|
|
17223
|
+
}
|
|
17224
|
+
function Limit(min, max) {
|
|
17225
|
+
const length = mathAbs(min - max);
|
|
17226
|
+
function reachedMin(n2) {
|
|
17227
|
+
return n2 < min;
|
|
17228
|
+
}
|
|
17229
|
+
function reachedMax(n2) {
|
|
17230
|
+
return n2 > max;
|
|
17231
|
+
}
|
|
17232
|
+
function reachedAny(n2) {
|
|
17233
|
+
return reachedMin(n2) || reachedMax(n2);
|
|
17234
|
+
}
|
|
17235
|
+
function constrain(n2) {
|
|
17236
|
+
if (!reachedAny(n2))
|
|
17237
|
+
return n2;
|
|
17238
|
+
return reachedMin(n2) ? min : max;
|
|
17239
|
+
}
|
|
17240
|
+
function removeOffset(n2) {
|
|
17241
|
+
if (!length)
|
|
17242
|
+
return n2;
|
|
17243
|
+
return n2 - length * Math.ceil((n2 - max) / length);
|
|
17244
|
+
}
|
|
17245
|
+
const self = {
|
|
17246
|
+
length,
|
|
17247
|
+
max,
|
|
17248
|
+
min,
|
|
17249
|
+
constrain,
|
|
17250
|
+
reachedAny,
|
|
17251
|
+
reachedMax,
|
|
17252
|
+
reachedMin,
|
|
17253
|
+
removeOffset
|
|
17254
|
+
};
|
|
17255
|
+
return self;
|
|
17256
|
+
}
|
|
17257
|
+
function Counter(max, start, loop) {
|
|
17258
|
+
const {
|
|
17259
|
+
constrain
|
|
17260
|
+
} = Limit(0, max);
|
|
17261
|
+
const loopEnd = max + 1;
|
|
17262
|
+
let counter = withinLimit(start);
|
|
17263
|
+
function withinLimit(n2) {
|
|
17264
|
+
return !loop ? constrain(n2) : mathAbs((loopEnd + n2) % loopEnd);
|
|
17265
|
+
}
|
|
17266
|
+
function get() {
|
|
17267
|
+
return counter;
|
|
17268
|
+
}
|
|
17269
|
+
function set(n2) {
|
|
17270
|
+
counter = withinLimit(n2);
|
|
17271
|
+
return self;
|
|
17272
|
+
}
|
|
17273
|
+
function add(n2) {
|
|
17274
|
+
return clone().set(get() + n2);
|
|
17275
|
+
}
|
|
17276
|
+
function clone() {
|
|
17277
|
+
return Counter(max, get(), loop);
|
|
17278
|
+
}
|
|
17279
|
+
const self = {
|
|
17280
|
+
get,
|
|
17281
|
+
set,
|
|
17282
|
+
add,
|
|
17283
|
+
clone
|
|
17284
|
+
};
|
|
17285
|
+
return self;
|
|
17286
|
+
}
|
|
17287
|
+
function Direction(direction) {
|
|
17288
|
+
const sign = direction === "rtl" ? -1 : 1;
|
|
17289
|
+
function apply(n2) {
|
|
17290
|
+
return n2 * sign;
|
|
17291
|
+
}
|
|
17292
|
+
const self = {
|
|
17293
|
+
apply
|
|
17294
|
+
};
|
|
17295
|
+
return self;
|
|
17296
|
+
}
|
|
17297
|
+
function EventStore() {
|
|
17298
|
+
let listeners = [];
|
|
17299
|
+
function add(node, type, handler, options = {
|
|
17300
|
+
passive: true
|
|
17301
|
+
}) {
|
|
17302
|
+
let removeListener;
|
|
17303
|
+
if ("addEventListener" in node) {
|
|
17304
|
+
node.addEventListener(type, handler, options);
|
|
17305
|
+
removeListener = () => node.removeEventListener(type, handler, options);
|
|
17306
|
+
} else {
|
|
17307
|
+
const legacyMediaQueryList = node;
|
|
17308
|
+
legacyMediaQueryList.addListener(handler);
|
|
17309
|
+
removeListener = () => legacyMediaQueryList.removeListener(handler);
|
|
17310
|
+
}
|
|
17311
|
+
listeners.push(removeListener);
|
|
17312
|
+
return self;
|
|
17313
|
+
}
|
|
17314
|
+
function clear() {
|
|
17315
|
+
listeners = listeners.filter((remove) => remove());
|
|
17316
|
+
}
|
|
17317
|
+
const self = {
|
|
17318
|
+
add,
|
|
17319
|
+
clear
|
|
17320
|
+
};
|
|
17321
|
+
return self;
|
|
17322
|
+
}
|
|
17323
|
+
function DragHandler(axis, direction, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
|
|
17324
|
+
const {
|
|
17325
|
+
cross: crossAxis
|
|
17326
|
+
} = axis;
|
|
17327
|
+
const focusNodes = ["INPUT", "SELECT", "TEXTAREA"];
|
|
17328
|
+
const nonPassiveEvent = {
|
|
17329
|
+
passive: false
|
|
17330
|
+
};
|
|
17331
|
+
const initEvents = EventStore();
|
|
17332
|
+
const dragEvents = EventStore();
|
|
17333
|
+
const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
|
|
17334
|
+
const snapForceBoost = {
|
|
17335
|
+
mouse: 300,
|
|
17336
|
+
touch: 400
|
|
17337
|
+
};
|
|
17338
|
+
const freeForceBoost = {
|
|
17339
|
+
mouse: 500,
|
|
17340
|
+
touch: 600
|
|
17341
|
+
};
|
|
17342
|
+
const baseSpeed = dragFree ? 43 : 25;
|
|
17343
|
+
let isMoving = false;
|
|
17344
|
+
let startScroll = 0;
|
|
17345
|
+
let startCross = 0;
|
|
17346
|
+
let pointerIsDown = false;
|
|
17347
|
+
let preventScroll = false;
|
|
17348
|
+
let preventClick = false;
|
|
17349
|
+
let isMouse = false;
|
|
17350
|
+
function init(emblaApi) {
|
|
17351
|
+
if (!watchDrag)
|
|
17352
|
+
return;
|
|
17353
|
+
function downIfAllowed(evt) {
|
|
17354
|
+
if (isBoolean(watchDrag) || watchDrag(emblaApi, evt))
|
|
17355
|
+
down(evt);
|
|
17356
|
+
}
|
|
17357
|
+
const node = rootNode;
|
|
17358
|
+
initEvents.add(node, "dragstart", (evt) => evt.preventDefault(), nonPassiveEvent).add(node, "touchmove", () => void 0, nonPassiveEvent).add(node, "touchend", () => void 0).add(node, "touchstart", downIfAllowed).add(node, "mousedown", downIfAllowed).add(node, "touchcancel", up).add(node, "contextmenu", up).add(node, "click", click, true);
|
|
17359
|
+
}
|
|
17360
|
+
function destroy() {
|
|
17361
|
+
initEvents.clear();
|
|
17362
|
+
dragEvents.clear();
|
|
17363
|
+
}
|
|
17364
|
+
function addDragEvents() {
|
|
17365
|
+
const node = isMouse ? ownerDocument : rootNode;
|
|
17366
|
+
dragEvents.add(node, "touchmove", move, nonPassiveEvent).add(node, "touchend", up).add(node, "mousemove", move, nonPassiveEvent).add(node, "mouseup", up);
|
|
17367
|
+
}
|
|
17368
|
+
function isFocusNode(node) {
|
|
17369
|
+
const nodeName = node.nodeName || "";
|
|
17370
|
+
return focusNodes.includes(nodeName);
|
|
17371
|
+
}
|
|
17372
|
+
function forceBoost() {
|
|
17373
|
+
const boost = dragFree ? freeForceBoost : snapForceBoost;
|
|
17374
|
+
const type = isMouse ? "mouse" : "touch";
|
|
17375
|
+
return boost[type];
|
|
17376
|
+
}
|
|
17377
|
+
function allowedForce(force, targetChanged) {
|
|
17378
|
+
const next = index2.add(mathSign(force) * -1);
|
|
17379
|
+
const baseForce = scrollTarget.byDistance(force, !dragFree).distance;
|
|
17380
|
+
if (dragFree || mathAbs(force) < goToNextThreshold)
|
|
17381
|
+
return baseForce;
|
|
17382
|
+
if (skipSnaps && targetChanged)
|
|
17383
|
+
return baseForce * 0.5;
|
|
17384
|
+
return scrollTarget.byIndex(next.get(), 0).distance;
|
|
17385
|
+
}
|
|
17386
|
+
function down(evt) {
|
|
17387
|
+
const isMouseEvt = isMouseEvent(evt, ownerWindow);
|
|
17388
|
+
isMouse = isMouseEvt;
|
|
17389
|
+
if (isMouseEvt && evt.button !== 0)
|
|
17390
|
+
return;
|
|
17391
|
+
if (isFocusNode(evt.target))
|
|
17392
|
+
return;
|
|
17393
|
+
preventClick = dragFree && isMouseEvt && !evt.buttons && isMoving;
|
|
17394
|
+
isMoving = deltaAbs(target.get(), location.get()) >= 2;
|
|
17395
|
+
pointerIsDown = true;
|
|
17396
|
+
dragTracker.pointerDown(evt);
|
|
17397
|
+
scrollBody.useFriction(0).useDuration(0);
|
|
17398
|
+
target.set(location);
|
|
17399
|
+
addDragEvents();
|
|
17400
|
+
startScroll = dragTracker.readPoint(evt);
|
|
17401
|
+
startCross = dragTracker.readPoint(evt, crossAxis);
|
|
17402
|
+
eventHandler.emit("pointerDown");
|
|
17403
|
+
}
|
|
17404
|
+
function move(evt) {
|
|
17405
|
+
const lastScroll = dragTracker.readPoint(evt);
|
|
17406
|
+
const lastCross = dragTracker.readPoint(evt, crossAxis);
|
|
17407
|
+
const diffScroll = deltaAbs(lastScroll, startScroll);
|
|
17408
|
+
const diffCross = deltaAbs(lastCross, startCross);
|
|
17409
|
+
if (!preventScroll && !isMouse) {
|
|
17410
|
+
if (!evt.cancelable)
|
|
17411
|
+
return up(evt);
|
|
17412
|
+
preventScroll = diffScroll > diffCross;
|
|
17413
|
+
if (!preventScroll)
|
|
17414
|
+
return up(evt);
|
|
17415
|
+
}
|
|
17416
|
+
const diff = dragTracker.pointerMove(evt);
|
|
17417
|
+
if (diffScroll > dragThreshold)
|
|
17418
|
+
preventClick = true;
|
|
17419
|
+
scrollBody.useFriction(0.3).useDuration(1);
|
|
17420
|
+
animation.start();
|
|
17421
|
+
target.add(direction.apply(diff));
|
|
17422
|
+
evt.preventDefault();
|
|
17423
|
+
}
|
|
17424
|
+
function up(evt) {
|
|
17425
|
+
const currentLocation = scrollTarget.byDistance(0, false);
|
|
17426
|
+
const targetChanged = currentLocation.index !== index2.get();
|
|
17427
|
+
const rawForce = dragTracker.pointerUp(evt) * forceBoost();
|
|
17428
|
+
const force = allowedForce(direction.apply(rawForce), targetChanged);
|
|
17429
|
+
const forceFactor = factorAbs(rawForce, force);
|
|
17430
|
+
const speed = baseSpeed - 10 * forceFactor;
|
|
17431
|
+
const friction = baseFriction + forceFactor / 50;
|
|
17432
|
+
preventScroll = false;
|
|
17433
|
+
pointerIsDown = false;
|
|
17434
|
+
dragEvents.clear();
|
|
17435
|
+
scrollBody.useDuration(speed).useFriction(friction);
|
|
17436
|
+
scrollTo.distance(force, !dragFree);
|
|
17437
|
+
isMouse = false;
|
|
17438
|
+
eventHandler.emit("pointerUp");
|
|
17439
|
+
}
|
|
17440
|
+
function click(evt) {
|
|
17441
|
+
if (preventClick) {
|
|
17442
|
+
evt.stopPropagation();
|
|
17443
|
+
evt.preventDefault();
|
|
17444
|
+
}
|
|
17445
|
+
}
|
|
17446
|
+
function pointerDown() {
|
|
17447
|
+
return pointerIsDown;
|
|
17448
|
+
}
|
|
17449
|
+
const self = {
|
|
17450
|
+
init,
|
|
17451
|
+
pointerDown,
|
|
17452
|
+
destroy
|
|
17453
|
+
};
|
|
17454
|
+
return self;
|
|
17455
|
+
}
|
|
17456
|
+
function DragTracker(axis, ownerWindow) {
|
|
17457
|
+
const logInterval = 170;
|
|
17458
|
+
let startEvent;
|
|
17459
|
+
let lastEvent;
|
|
17460
|
+
function readTime(evt) {
|
|
17461
|
+
return evt.timeStamp;
|
|
17462
|
+
}
|
|
17463
|
+
function readPoint(evt, evtAxis) {
|
|
17464
|
+
const property = evtAxis || axis.scroll;
|
|
17465
|
+
const coord = `client${property === "x" ? "X" : "Y"}`;
|
|
17466
|
+
return (isMouseEvent(evt, ownerWindow) ? evt : evt.touches[0])[coord];
|
|
17467
|
+
}
|
|
17468
|
+
function pointerDown(evt) {
|
|
17469
|
+
startEvent = evt;
|
|
17470
|
+
lastEvent = evt;
|
|
17471
|
+
return readPoint(evt);
|
|
17472
|
+
}
|
|
17473
|
+
function pointerMove(evt) {
|
|
17474
|
+
const diff = readPoint(evt) - readPoint(lastEvent);
|
|
17475
|
+
const expired = readTime(evt) - readTime(startEvent) > logInterval;
|
|
17476
|
+
lastEvent = evt;
|
|
17477
|
+
if (expired)
|
|
17478
|
+
startEvent = evt;
|
|
17479
|
+
return diff;
|
|
17480
|
+
}
|
|
17481
|
+
function pointerUp(evt) {
|
|
17482
|
+
if (!startEvent || !lastEvent)
|
|
17483
|
+
return 0;
|
|
17484
|
+
const diffDrag = readPoint(lastEvent) - readPoint(startEvent);
|
|
17485
|
+
const diffTime = readTime(evt) - readTime(startEvent);
|
|
17486
|
+
const expired = readTime(evt) - readTime(lastEvent) > logInterval;
|
|
17487
|
+
const force = diffDrag / diffTime;
|
|
17488
|
+
const isFlick = diffTime && !expired && mathAbs(force) > 0.1;
|
|
17489
|
+
return isFlick ? force : 0;
|
|
17490
|
+
}
|
|
17491
|
+
const self = {
|
|
17492
|
+
pointerDown,
|
|
17493
|
+
pointerMove,
|
|
17494
|
+
pointerUp,
|
|
17495
|
+
readPoint
|
|
17496
|
+
};
|
|
17497
|
+
return self;
|
|
17498
|
+
}
|
|
17499
|
+
function PercentOfView(viewSize) {
|
|
17500
|
+
function measure(n2) {
|
|
17501
|
+
return viewSize * (n2 / 100);
|
|
17502
|
+
}
|
|
17503
|
+
const self = {
|
|
17504
|
+
measure
|
|
17505
|
+
};
|
|
17506
|
+
return self;
|
|
17507
|
+
}
|
|
17508
|
+
function ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize) {
|
|
17509
|
+
let resizeObserver;
|
|
17510
|
+
let containerSize;
|
|
17511
|
+
let slideSizes = [];
|
|
17512
|
+
let destroyed = false;
|
|
17513
|
+
function readSize(node) {
|
|
17514
|
+
return axis.measureSize(node.getBoundingClientRect());
|
|
17515
|
+
}
|
|
17516
|
+
function init(emblaApi) {
|
|
17517
|
+
if (!watchResize)
|
|
17518
|
+
return;
|
|
17519
|
+
containerSize = readSize(container);
|
|
17520
|
+
slideSizes = slides.map(readSize);
|
|
17521
|
+
function defaultCallback(entries) {
|
|
17522
|
+
for (const entry of entries) {
|
|
17523
|
+
const isContainer = entry.target === container;
|
|
17524
|
+
const slideIndex = slides.indexOf(entry.target);
|
|
17525
|
+
const lastSize = isContainer ? containerSize : slideSizes[slideIndex];
|
|
17526
|
+
const newSize = readSize(isContainer ? container : slides[slideIndex]);
|
|
17527
|
+
const diffSize = mathAbs(newSize - lastSize);
|
|
17528
|
+
if (diffSize >= 0.2) {
|
|
17529
|
+
ownerWindow.requestAnimationFrame(() => {
|
|
17530
|
+
emblaApi.reInit();
|
|
17531
|
+
eventHandler.emit("resize");
|
|
17532
|
+
});
|
|
17533
|
+
break;
|
|
17534
|
+
}
|
|
17535
|
+
}
|
|
17536
|
+
}
|
|
17537
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
17538
|
+
if (destroyed)
|
|
17539
|
+
return;
|
|
17540
|
+
if (isBoolean(watchResize) || watchResize(emblaApi, entries)) {
|
|
17541
|
+
defaultCallback(entries);
|
|
17542
|
+
}
|
|
17543
|
+
});
|
|
17544
|
+
const observeNodes = [container].concat(slides);
|
|
17545
|
+
observeNodes.forEach((node) => resizeObserver.observe(node));
|
|
17546
|
+
}
|
|
17547
|
+
function destroy() {
|
|
17548
|
+
if (resizeObserver)
|
|
17549
|
+
resizeObserver.disconnect();
|
|
17550
|
+
destroyed = true;
|
|
17551
|
+
}
|
|
17552
|
+
const self = {
|
|
17553
|
+
init,
|
|
17554
|
+
destroy
|
|
17555
|
+
};
|
|
17556
|
+
return self;
|
|
17557
|
+
}
|
|
17558
|
+
function ScrollBody(location, target, baseDuration, baseFriction) {
|
|
17559
|
+
let hasSettled = true;
|
|
17560
|
+
let bodyVelocity = 0;
|
|
17561
|
+
let scrollDirection = 0;
|
|
17562
|
+
let scrollDuration = baseDuration;
|
|
17563
|
+
let scrollFriction = baseFriction;
|
|
17564
|
+
let rawLocation = location.get();
|
|
17565
|
+
let rawLocationPrevious = 0;
|
|
17566
|
+
function seek() {
|
|
17567
|
+
const diff = target.get() - location.get();
|
|
17568
|
+
const isInstant = !scrollDuration;
|
|
17569
|
+
let directionDiff = 0;
|
|
17570
|
+
if (isInstant) {
|
|
17571
|
+
bodyVelocity = 0;
|
|
17572
|
+
location.set(target);
|
|
17573
|
+
directionDiff = diff;
|
|
17574
|
+
} else {
|
|
17575
|
+
bodyVelocity += diff / scrollDuration;
|
|
17576
|
+
bodyVelocity *= scrollFriction;
|
|
17577
|
+
rawLocation += bodyVelocity;
|
|
17578
|
+
location.add(bodyVelocity);
|
|
17579
|
+
directionDiff = rawLocation - rawLocationPrevious;
|
|
17580
|
+
}
|
|
17581
|
+
scrollDirection = mathSign(directionDiff);
|
|
17582
|
+
rawLocationPrevious = rawLocation;
|
|
17583
|
+
hasSettled = mathAbs(diff) < 1e-3;
|
|
17584
|
+
return self;
|
|
17585
|
+
}
|
|
17586
|
+
function settled() {
|
|
17587
|
+
return hasSettled;
|
|
17588
|
+
}
|
|
17589
|
+
function duration() {
|
|
17590
|
+
return scrollDuration;
|
|
17591
|
+
}
|
|
17592
|
+
function direction() {
|
|
17593
|
+
return scrollDirection;
|
|
17594
|
+
}
|
|
17595
|
+
function velocity() {
|
|
17596
|
+
return bodyVelocity;
|
|
17597
|
+
}
|
|
17598
|
+
function useBaseDuration() {
|
|
17599
|
+
return useDuration(baseDuration);
|
|
17600
|
+
}
|
|
17601
|
+
function useBaseFriction() {
|
|
17602
|
+
return useFriction(baseFriction);
|
|
17603
|
+
}
|
|
17604
|
+
function useDuration(n2) {
|
|
17605
|
+
scrollDuration = n2;
|
|
17606
|
+
return self;
|
|
17607
|
+
}
|
|
17608
|
+
function useFriction(n2) {
|
|
17609
|
+
scrollFriction = n2;
|
|
17610
|
+
return self;
|
|
17611
|
+
}
|
|
17612
|
+
const self = {
|
|
17613
|
+
direction,
|
|
17614
|
+
duration,
|
|
17615
|
+
velocity,
|
|
17616
|
+
seek,
|
|
17617
|
+
settled,
|
|
17618
|
+
useBaseFriction,
|
|
17619
|
+
useBaseDuration,
|
|
17620
|
+
useFriction,
|
|
17621
|
+
useDuration
|
|
17622
|
+
};
|
|
17623
|
+
return self;
|
|
17624
|
+
}
|
|
17625
|
+
function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
|
|
17626
|
+
const pullBackThreshold = percentOfView.measure(10);
|
|
17627
|
+
const edgeOffsetTolerance = percentOfView.measure(50);
|
|
17628
|
+
const frictionLimit = Limit(0.1, 0.99);
|
|
17629
|
+
let disabled = false;
|
|
17630
|
+
function shouldConstrain() {
|
|
17631
|
+
if (disabled)
|
|
17632
|
+
return false;
|
|
17633
|
+
if (!limit.reachedAny(target.get()))
|
|
17634
|
+
return false;
|
|
17635
|
+
if (!limit.reachedAny(location.get()))
|
|
17636
|
+
return false;
|
|
17637
|
+
return true;
|
|
17638
|
+
}
|
|
17639
|
+
function constrain(pointerDown) {
|
|
17640
|
+
if (!shouldConstrain())
|
|
17641
|
+
return;
|
|
17642
|
+
const edge = limit.reachedMin(location.get()) ? "min" : "max";
|
|
17643
|
+
const diffToEdge = mathAbs(limit[edge] - location.get());
|
|
17644
|
+
const diffToTarget = target.get() - location.get();
|
|
17645
|
+
const friction = frictionLimit.constrain(diffToEdge / edgeOffsetTolerance);
|
|
17646
|
+
target.subtract(diffToTarget * friction);
|
|
17647
|
+
if (!pointerDown && mathAbs(diffToTarget) < pullBackThreshold) {
|
|
17648
|
+
target.set(limit.constrain(target.get()));
|
|
17649
|
+
scrollBody.useDuration(25).useBaseFriction();
|
|
17650
|
+
}
|
|
17651
|
+
}
|
|
17652
|
+
function toggleActive(active) {
|
|
17653
|
+
disabled = !active;
|
|
17654
|
+
}
|
|
17655
|
+
const self = {
|
|
17656
|
+
constrain,
|
|
17657
|
+
toggleActive
|
|
17658
|
+
};
|
|
17659
|
+
return self;
|
|
17660
|
+
}
|
|
17661
|
+
function ScrollContain(viewSize, contentSize, snapsAligned, containScroll) {
|
|
17662
|
+
const scrollBounds = Limit(-contentSize + viewSize, 0);
|
|
17663
|
+
const snapsBounded = measureBounded();
|
|
17664
|
+
const scrollContainLimit = findScrollContainLimit();
|
|
17665
|
+
const snapsContained = measureContained();
|
|
17666
|
+
function findScrollContainLimit() {
|
|
17667
|
+
const startSnap = snapsBounded[0];
|
|
17668
|
+
const endSnap = arrayLast(snapsBounded);
|
|
17669
|
+
const min = snapsBounded.lastIndexOf(startSnap);
|
|
17670
|
+
const max = snapsBounded.indexOf(endSnap) + 1;
|
|
17671
|
+
return Limit(min, max);
|
|
17672
|
+
}
|
|
17673
|
+
function measureBounded() {
|
|
17674
|
+
return snapsAligned.map(scrollBounds.constrain).map((scrollBound) => parseFloat(scrollBound.toFixed(3)));
|
|
17675
|
+
}
|
|
17676
|
+
function measureContained() {
|
|
17677
|
+
if (contentSize <= viewSize)
|
|
17678
|
+
return [scrollBounds.max];
|
|
17679
|
+
if (containScroll === "keepSnaps")
|
|
17680
|
+
return snapsBounded;
|
|
17681
|
+
const {
|
|
17682
|
+
min,
|
|
17683
|
+
max
|
|
17684
|
+
} = scrollContainLimit;
|
|
17685
|
+
return snapsBounded.slice(min, max);
|
|
17686
|
+
}
|
|
17687
|
+
const self = {
|
|
17688
|
+
snapsContained,
|
|
17689
|
+
scrollContainLimit
|
|
17690
|
+
};
|
|
17691
|
+
return self;
|
|
17692
|
+
}
|
|
17693
|
+
function ScrollLimit(contentSize, scrollSnaps, loop) {
|
|
17694
|
+
const max = scrollSnaps[0];
|
|
17695
|
+
const min = loop ? max - contentSize : arrayLast(scrollSnaps);
|
|
17696
|
+
const limit = Limit(min, max);
|
|
17697
|
+
const self = {
|
|
17698
|
+
limit
|
|
17699
|
+
};
|
|
17700
|
+
return self;
|
|
17701
|
+
}
|
|
17702
|
+
function ScrollLooper(contentSize, limit, offsetLocation, vectors) {
|
|
17703
|
+
const jointSafety = 0.1;
|
|
17704
|
+
const min = limit.min + jointSafety;
|
|
17705
|
+
const max = limit.max + jointSafety;
|
|
17706
|
+
const {
|
|
17707
|
+
reachedMin,
|
|
17708
|
+
reachedMax
|
|
17709
|
+
} = Limit(min, max);
|
|
17710
|
+
function shouldLoop(direction) {
|
|
17711
|
+
if (direction === 1)
|
|
17712
|
+
return reachedMax(offsetLocation.get());
|
|
17713
|
+
if (direction === -1)
|
|
17714
|
+
return reachedMin(offsetLocation.get());
|
|
17715
|
+
return false;
|
|
17716
|
+
}
|
|
17717
|
+
function loop(direction) {
|
|
17718
|
+
if (!shouldLoop(direction))
|
|
17719
|
+
return;
|
|
17720
|
+
const loopDistance = contentSize * (direction * -1);
|
|
17721
|
+
vectors.forEach((v2) => v2.add(loopDistance));
|
|
17722
|
+
}
|
|
17723
|
+
const self = {
|
|
17724
|
+
loop
|
|
17725
|
+
};
|
|
17726
|
+
return self;
|
|
17727
|
+
}
|
|
17728
|
+
function ScrollProgress(limit) {
|
|
17729
|
+
const {
|
|
17730
|
+
max,
|
|
17731
|
+
length
|
|
17732
|
+
} = limit;
|
|
17733
|
+
function get(n2) {
|
|
17734
|
+
const currentLocation = n2 - max;
|
|
17735
|
+
return length ? currentLocation / -length : 0;
|
|
17736
|
+
}
|
|
17737
|
+
const self = {
|
|
17738
|
+
get
|
|
17739
|
+
};
|
|
17740
|
+
return self;
|
|
17741
|
+
}
|
|
17742
|
+
function ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll) {
|
|
17743
|
+
const {
|
|
17744
|
+
startEdge,
|
|
17745
|
+
endEdge
|
|
17746
|
+
} = axis;
|
|
17747
|
+
const {
|
|
17748
|
+
groupSlides
|
|
17749
|
+
} = slidesToScroll;
|
|
17750
|
+
const alignments = measureSizes().map(alignment.measure);
|
|
17751
|
+
const snaps = measureUnaligned();
|
|
17752
|
+
const snapsAligned = measureAligned();
|
|
17753
|
+
function measureSizes() {
|
|
17754
|
+
return groupSlides(slideRects).map((rects) => arrayLast(rects)[endEdge] - rects[0][startEdge]).map(mathAbs);
|
|
17755
|
+
}
|
|
17756
|
+
function measureUnaligned() {
|
|
17757
|
+
return slideRects.map((rect) => containerRect[startEdge] - rect[startEdge]).map((snap) => -mathAbs(snap));
|
|
17758
|
+
}
|
|
17759
|
+
function measureAligned() {
|
|
17760
|
+
return groupSlides(snaps).map((g2) => g2[0]).map((snap, index2) => snap + alignments[index2]);
|
|
17761
|
+
}
|
|
17762
|
+
const self = {
|
|
17763
|
+
snaps,
|
|
17764
|
+
snapsAligned
|
|
17765
|
+
};
|
|
17766
|
+
return self;
|
|
17767
|
+
}
|
|
17768
|
+
function SlideRegistry(viewSize, contentSize, containSnaps, scrollContainLimit, slidesToScroll, slideIndexes) {
|
|
17769
|
+
const {
|
|
17770
|
+
groupSlides
|
|
17771
|
+
} = slidesToScroll;
|
|
17772
|
+
const {
|
|
17773
|
+
min,
|
|
17774
|
+
max
|
|
17775
|
+
} = scrollContainLimit;
|
|
17776
|
+
const slideRegistry = createSlideRegistry();
|
|
17777
|
+
function createSlideRegistry() {
|
|
17778
|
+
const groupedSlideIndexes = groupSlides(slideIndexes);
|
|
17779
|
+
if (!containSnaps || contentSize <= viewSize)
|
|
17780
|
+
return groupedSlideIndexes;
|
|
17781
|
+
return groupedSlideIndexes.slice(min, max).map((group, index2, groups) => {
|
|
17782
|
+
const indexIsFirst = !index2;
|
|
17783
|
+
const indexIsLast = !indexIsFirst && index2 === arrayLastIndex(groups);
|
|
17784
|
+
if (indexIsFirst) {
|
|
17785
|
+
const range = arrayLast(groups[0]) + 1;
|
|
17786
|
+
return arrayFromNumber(range);
|
|
17787
|
+
}
|
|
17788
|
+
if (indexIsLast) {
|
|
17789
|
+
const range = arrayLastIndex(slideIndexes) - arrayLast(groups)[0] + 1;
|
|
17790
|
+
return arrayFromNumber(range, arrayLast(groups)[0]);
|
|
17791
|
+
}
|
|
17792
|
+
return group;
|
|
17793
|
+
});
|
|
17794
|
+
}
|
|
17795
|
+
const self = {
|
|
17796
|
+
slideRegistry
|
|
17797
|
+
};
|
|
17798
|
+
return self;
|
|
17799
|
+
}
|
|
17800
|
+
function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
|
|
17801
|
+
const {
|
|
17802
|
+
reachedAny,
|
|
17803
|
+
removeOffset,
|
|
17804
|
+
constrain
|
|
17805
|
+
} = limit;
|
|
17806
|
+
function minDistance(distances) {
|
|
17807
|
+
return distances.concat().sort((a2, b2) => mathAbs(a2) - mathAbs(b2))[0];
|
|
17808
|
+
}
|
|
17809
|
+
function findTargetSnap(target) {
|
|
17810
|
+
const distance2 = loop ? removeOffset(target) : constrain(target);
|
|
17811
|
+
const ascDiffsToSnaps = scrollSnaps.map((scrollSnap) => scrollSnap - distance2).map((diffToSnap) => shortcut(diffToSnap, 0)).map((diff, i2) => ({
|
|
17812
|
+
diff,
|
|
17813
|
+
index: i2
|
|
17814
|
+
})).sort((d1, d2) => mathAbs(d1.diff) - mathAbs(d2.diff));
|
|
17815
|
+
const {
|
|
17816
|
+
index: index2
|
|
17817
|
+
} = ascDiffsToSnaps[0];
|
|
17818
|
+
return {
|
|
17819
|
+
index: index2,
|
|
17820
|
+
distance: distance2
|
|
17821
|
+
};
|
|
17822
|
+
}
|
|
17823
|
+
function shortcut(target, direction) {
|
|
17824
|
+
const targets = [target, target + contentSize, target - contentSize];
|
|
17825
|
+
if (!loop)
|
|
17826
|
+
return targets[0];
|
|
17827
|
+
if (!direction)
|
|
17828
|
+
return minDistance(targets);
|
|
17829
|
+
const matchingTargets = targets.filter((t2) => mathSign(t2) === direction);
|
|
17830
|
+
if (matchingTargets.length)
|
|
17831
|
+
return minDistance(matchingTargets);
|
|
17832
|
+
return arrayLast(targets) - contentSize;
|
|
17833
|
+
}
|
|
17834
|
+
function byIndex(index2, direction) {
|
|
17835
|
+
const diffToSnap = scrollSnaps[index2] - targetVector.get();
|
|
17836
|
+
const distance2 = shortcut(diffToSnap, direction);
|
|
17837
|
+
return {
|
|
17838
|
+
index: index2,
|
|
17839
|
+
distance: distance2
|
|
17840
|
+
};
|
|
17841
|
+
}
|
|
17842
|
+
function byDistance(distance2, snap) {
|
|
17843
|
+
const target = targetVector.get() + distance2;
|
|
17844
|
+
const {
|
|
17845
|
+
index: index2,
|
|
17846
|
+
distance: targetSnapDistance
|
|
17847
|
+
} = findTargetSnap(target);
|
|
17848
|
+
const reachedBound = !loop && reachedAny(target);
|
|
17849
|
+
if (!snap || reachedBound)
|
|
17850
|
+
return {
|
|
17851
|
+
index: index2,
|
|
17852
|
+
distance: distance2
|
|
17853
|
+
};
|
|
17854
|
+
const diffToSnap = scrollSnaps[index2] - targetSnapDistance;
|
|
17855
|
+
const snapDistance = distance2 + shortcut(diffToSnap, 0);
|
|
17856
|
+
return {
|
|
17857
|
+
index: index2,
|
|
17858
|
+
distance: snapDistance
|
|
17859
|
+
};
|
|
17860
|
+
}
|
|
17861
|
+
const self = {
|
|
17862
|
+
byDistance,
|
|
17863
|
+
byIndex,
|
|
17864
|
+
shortcut
|
|
17865
|
+
};
|
|
17866
|
+
return self;
|
|
17867
|
+
}
|
|
17868
|
+
function ScrollTo(animation, indexCurrent, indexPrevious, scrollTarget, scrollBody, targetVector, eventHandler) {
|
|
17869
|
+
function scrollTo(target) {
|
|
17870
|
+
const distanceDiff = target.distance;
|
|
17871
|
+
const indexDiff = target.index !== indexCurrent.get();
|
|
17872
|
+
targetVector.add(distanceDiff);
|
|
17873
|
+
if (distanceDiff) {
|
|
17874
|
+
if (scrollBody.duration()) {
|
|
17875
|
+
animation.start();
|
|
17876
|
+
} else {
|
|
17877
|
+
animation.update();
|
|
17878
|
+
animation.render(1);
|
|
17879
|
+
animation.update();
|
|
17880
|
+
}
|
|
17881
|
+
}
|
|
17882
|
+
if (indexDiff) {
|
|
17883
|
+
indexPrevious.set(indexCurrent.get());
|
|
17884
|
+
indexCurrent.set(target.index);
|
|
17885
|
+
eventHandler.emit("select");
|
|
17886
|
+
}
|
|
17887
|
+
}
|
|
17888
|
+
function distance2(n2, snap) {
|
|
17889
|
+
const target = scrollTarget.byDistance(n2, snap);
|
|
17890
|
+
scrollTo(target);
|
|
17891
|
+
}
|
|
17892
|
+
function index2(n2, direction) {
|
|
17893
|
+
const targetIndex = indexCurrent.clone().set(n2);
|
|
17894
|
+
const target = scrollTarget.byIndex(targetIndex.get(), direction);
|
|
17895
|
+
scrollTo(target);
|
|
17896
|
+
}
|
|
17897
|
+
const self = {
|
|
17898
|
+
distance: distance2,
|
|
17899
|
+
index: index2
|
|
17900
|
+
};
|
|
17901
|
+
return self;
|
|
17902
|
+
}
|
|
17903
|
+
function SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore) {
|
|
17904
|
+
let lastTabPressTime = 0;
|
|
17905
|
+
function init() {
|
|
17906
|
+
eventStore.add(document, "keydown", registerTabPress, false);
|
|
17907
|
+
slides.forEach(addSlideFocusEvent);
|
|
17908
|
+
}
|
|
17909
|
+
function registerTabPress(event) {
|
|
17910
|
+
if (event.code === "Tab")
|
|
17911
|
+
lastTabPressTime = (/* @__PURE__ */ new Date()).getTime();
|
|
17912
|
+
}
|
|
17913
|
+
function addSlideFocusEvent(slide) {
|
|
17914
|
+
const focus = () => {
|
|
17915
|
+
const nowTime = (/* @__PURE__ */ new Date()).getTime();
|
|
17916
|
+
const diffTime = nowTime - lastTabPressTime;
|
|
17917
|
+
if (diffTime > 10)
|
|
17918
|
+
return;
|
|
17919
|
+
root.scrollLeft = 0;
|
|
17920
|
+
const index2 = slides.indexOf(slide);
|
|
17921
|
+
const group = slideRegistry.findIndex((group2) => group2.includes(index2));
|
|
17922
|
+
if (!isNumber(group))
|
|
17923
|
+
return;
|
|
17924
|
+
scrollBody.useDuration(0);
|
|
17925
|
+
scrollTo.index(group, 0);
|
|
17926
|
+
};
|
|
17927
|
+
eventStore.add(slide, "focus", focus, {
|
|
17928
|
+
passive: true,
|
|
17929
|
+
capture: true
|
|
17930
|
+
});
|
|
17931
|
+
}
|
|
17932
|
+
const self = {
|
|
17933
|
+
init
|
|
17934
|
+
};
|
|
17935
|
+
return self;
|
|
17936
|
+
}
|
|
17937
|
+
function Vector1D(initialValue) {
|
|
17938
|
+
let value = initialValue;
|
|
17939
|
+
function get() {
|
|
17940
|
+
return value;
|
|
17941
|
+
}
|
|
17942
|
+
function set(n2) {
|
|
17943
|
+
value = normalizeInput(n2);
|
|
17944
|
+
}
|
|
17945
|
+
function add(n2) {
|
|
17946
|
+
value += normalizeInput(n2);
|
|
17947
|
+
}
|
|
17948
|
+
function subtract(n2) {
|
|
17949
|
+
value -= normalizeInput(n2);
|
|
17950
|
+
}
|
|
17951
|
+
function normalizeInput(n2) {
|
|
17952
|
+
return isNumber(n2) ? n2 : n2.get();
|
|
17953
|
+
}
|
|
17954
|
+
const self = {
|
|
17955
|
+
get,
|
|
17956
|
+
set,
|
|
17957
|
+
add,
|
|
17958
|
+
subtract
|
|
17959
|
+
};
|
|
17960
|
+
return self;
|
|
17961
|
+
}
|
|
17962
|
+
function Translate(axis, direction, container) {
|
|
17963
|
+
const translate = axis.scroll === "x" ? x2 : y2;
|
|
17964
|
+
const containerStyle = container.style;
|
|
17965
|
+
let disabled = false;
|
|
17966
|
+
function x2(n2) {
|
|
17967
|
+
return `translate3d(${n2}px,0px,0px)`;
|
|
17968
|
+
}
|
|
17969
|
+
function y2(n2) {
|
|
17970
|
+
return `translate3d(0px,${n2}px,0px)`;
|
|
17971
|
+
}
|
|
17972
|
+
function to(target) {
|
|
17973
|
+
if (disabled)
|
|
17974
|
+
return;
|
|
17975
|
+
containerStyle.transform = translate(direction.apply(target));
|
|
17976
|
+
}
|
|
17977
|
+
function toggleActive(active) {
|
|
17978
|
+
disabled = !active;
|
|
17979
|
+
}
|
|
17980
|
+
function clear() {
|
|
17981
|
+
if (disabled)
|
|
17982
|
+
return;
|
|
17983
|
+
containerStyle.transform = "";
|
|
17984
|
+
if (!container.getAttribute("style"))
|
|
17985
|
+
container.removeAttribute("style");
|
|
17986
|
+
}
|
|
17987
|
+
const self = {
|
|
17988
|
+
clear,
|
|
17989
|
+
to,
|
|
17990
|
+
toggleActive
|
|
17991
|
+
};
|
|
17992
|
+
return self;
|
|
17993
|
+
}
|
|
17994
|
+
function SlideLooper(axis, direction, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, offsetLocation, slides) {
|
|
17995
|
+
const roundingSafety = 0.5;
|
|
17996
|
+
const ascItems = arrayKeys(slideSizesWithGaps);
|
|
17997
|
+
const descItems = arrayKeys(slideSizesWithGaps).reverse();
|
|
17998
|
+
const loopPoints = startPoints().concat(endPoints());
|
|
17999
|
+
function removeSlideSizes(indexes, from) {
|
|
18000
|
+
return indexes.reduce((a2, i2) => {
|
|
18001
|
+
return a2 - slideSizesWithGaps[i2];
|
|
18002
|
+
}, from);
|
|
18003
|
+
}
|
|
18004
|
+
function slidesInGap(indexes, gap) {
|
|
18005
|
+
return indexes.reduce((a2, i2) => {
|
|
18006
|
+
const remainingGap = removeSlideSizes(a2, gap);
|
|
18007
|
+
return remainingGap > 0 ? a2.concat([i2]) : a2;
|
|
18008
|
+
}, []);
|
|
18009
|
+
}
|
|
18010
|
+
function findSlideBounds(offset) {
|
|
18011
|
+
return snaps.map((snap, index2) => ({
|
|
18012
|
+
start: snap - slideSizes[index2] + roundingSafety + offset,
|
|
18013
|
+
end: snap + viewSize - roundingSafety + offset
|
|
18014
|
+
}));
|
|
18015
|
+
}
|
|
18016
|
+
function findLoopPoints(indexes, offset, isEndEdge) {
|
|
18017
|
+
const slideBounds = findSlideBounds(offset);
|
|
18018
|
+
return indexes.map((index2) => {
|
|
18019
|
+
const initial = isEndEdge ? 0 : -contentSize;
|
|
18020
|
+
const altered = isEndEdge ? contentSize : 0;
|
|
18021
|
+
const boundEdge = isEndEdge ? "end" : "start";
|
|
18022
|
+
const loopPoint = slideBounds[index2][boundEdge];
|
|
18023
|
+
return {
|
|
18024
|
+
index: index2,
|
|
18025
|
+
slideLocation: Vector1D(-1),
|
|
18026
|
+
translate: Translate(axis, direction, slides[index2]),
|
|
18027
|
+
target: () => offsetLocation.get() > loopPoint ? initial : altered
|
|
18028
|
+
};
|
|
18029
|
+
});
|
|
18030
|
+
}
|
|
18031
|
+
function startPoints() {
|
|
18032
|
+
const gap = scrollSnaps[0] - 1;
|
|
18033
|
+
const indexes = slidesInGap(descItems, gap);
|
|
18034
|
+
return findLoopPoints(indexes, contentSize, false);
|
|
18035
|
+
}
|
|
18036
|
+
function endPoints() {
|
|
18037
|
+
const gap = viewSize - scrollSnaps[0] - 1;
|
|
18038
|
+
const indexes = slidesInGap(ascItems, gap);
|
|
18039
|
+
return findLoopPoints(indexes, -contentSize, true);
|
|
18040
|
+
}
|
|
18041
|
+
function canLoop() {
|
|
18042
|
+
return loopPoints.every(({
|
|
18043
|
+
index: index2
|
|
18044
|
+
}) => {
|
|
18045
|
+
const otherIndexes = ascItems.filter((i2) => i2 !== index2);
|
|
18046
|
+
return removeSlideSizes(otherIndexes, viewSize) <= 0.1;
|
|
18047
|
+
});
|
|
18048
|
+
}
|
|
18049
|
+
function loop() {
|
|
18050
|
+
loopPoints.forEach((loopPoint) => {
|
|
18051
|
+
const {
|
|
18052
|
+
target,
|
|
18053
|
+
translate,
|
|
18054
|
+
slideLocation
|
|
18055
|
+
} = loopPoint;
|
|
18056
|
+
const shiftLocation = target();
|
|
18057
|
+
if (shiftLocation === slideLocation.get())
|
|
18058
|
+
return;
|
|
18059
|
+
translate.to(shiftLocation);
|
|
18060
|
+
slideLocation.set(shiftLocation);
|
|
18061
|
+
});
|
|
18062
|
+
}
|
|
18063
|
+
function clear() {
|
|
18064
|
+
loopPoints.forEach((loopPoint) => loopPoint.translate.clear());
|
|
18065
|
+
}
|
|
18066
|
+
const self = {
|
|
18067
|
+
canLoop,
|
|
18068
|
+
clear,
|
|
18069
|
+
loop,
|
|
18070
|
+
loopPoints
|
|
18071
|
+
};
|
|
18072
|
+
return self;
|
|
18073
|
+
}
|
|
18074
|
+
function SlidesHandler(container, eventHandler, watchSlides) {
|
|
18075
|
+
let mutationObserver;
|
|
18076
|
+
let destroyed = false;
|
|
18077
|
+
function init(emblaApi) {
|
|
18078
|
+
if (!watchSlides)
|
|
18079
|
+
return;
|
|
18080
|
+
function defaultCallback(mutations) {
|
|
18081
|
+
for (const mutation of mutations) {
|
|
18082
|
+
if (mutation.type === "childList") {
|
|
18083
|
+
emblaApi.reInit();
|
|
18084
|
+
eventHandler.emit("slidesChanged");
|
|
18085
|
+
break;
|
|
18086
|
+
}
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
18089
|
+
mutationObserver = new MutationObserver((mutations) => {
|
|
18090
|
+
if (destroyed)
|
|
18091
|
+
return;
|
|
18092
|
+
if (isBoolean(watchSlides) || watchSlides(emblaApi, mutations)) {
|
|
18093
|
+
defaultCallback(mutations);
|
|
18094
|
+
}
|
|
18095
|
+
});
|
|
18096
|
+
mutationObserver.observe(container, {
|
|
18097
|
+
childList: true
|
|
18098
|
+
});
|
|
18099
|
+
}
|
|
18100
|
+
function destroy() {
|
|
18101
|
+
if (mutationObserver)
|
|
18102
|
+
mutationObserver.disconnect();
|
|
18103
|
+
destroyed = true;
|
|
18104
|
+
}
|
|
18105
|
+
const self = {
|
|
18106
|
+
init,
|
|
18107
|
+
destroy
|
|
18108
|
+
};
|
|
18109
|
+
return self;
|
|
18110
|
+
}
|
|
18111
|
+
function SlidesInView(container, slides, eventHandler, threshold) {
|
|
18112
|
+
const intersectionEntryMap = {};
|
|
18113
|
+
let inViewCache = null;
|
|
18114
|
+
let notInViewCache = null;
|
|
18115
|
+
let intersectionObserver;
|
|
18116
|
+
let destroyed = false;
|
|
18117
|
+
function init() {
|
|
18118
|
+
intersectionObserver = new IntersectionObserver((entries) => {
|
|
18119
|
+
if (destroyed)
|
|
18120
|
+
return;
|
|
18121
|
+
entries.forEach((entry) => {
|
|
18122
|
+
const index2 = slides.indexOf(entry.target);
|
|
18123
|
+
intersectionEntryMap[index2] = entry;
|
|
18124
|
+
});
|
|
18125
|
+
inViewCache = null;
|
|
18126
|
+
notInViewCache = null;
|
|
18127
|
+
eventHandler.emit("slidesInView");
|
|
18128
|
+
}, {
|
|
18129
|
+
root: container.parentElement,
|
|
18130
|
+
threshold
|
|
18131
|
+
});
|
|
18132
|
+
slides.forEach((slide) => intersectionObserver.observe(slide));
|
|
18133
|
+
}
|
|
18134
|
+
function destroy() {
|
|
18135
|
+
if (intersectionObserver)
|
|
18136
|
+
intersectionObserver.disconnect();
|
|
18137
|
+
destroyed = true;
|
|
18138
|
+
}
|
|
18139
|
+
function createInViewList(inView) {
|
|
18140
|
+
return objectKeys(intersectionEntryMap).reduce((list, slideIndex) => {
|
|
18141
|
+
const index2 = parseInt(slideIndex);
|
|
18142
|
+
const {
|
|
18143
|
+
isIntersecting
|
|
18144
|
+
} = intersectionEntryMap[index2];
|
|
18145
|
+
const inViewMatch = inView && isIntersecting;
|
|
18146
|
+
const notInViewMatch = !inView && !isIntersecting;
|
|
18147
|
+
if (inViewMatch || notInViewMatch)
|
|
18148
|
+
list.push(index2);
|
|
18149
|
+
return list;
|
|
18150
|
+
}, []);
|
|
18151
|
+
}
|
|
18152
|
+
function get(inView = true) {
|
|
18153
|
+
if (inView && inViewCache)
|
|
18154
|
+
return inViewCache;
|
|
18155
|
+
if (!inView && notInViewCache)
|
|
18156
|
+
return notInViewCache;
|
|
18157
|
+
const slideIndexes = createInViewList(inView);
|
|
18158
|
+
if (inView)
|
|
18159
|
+
inViewCache = slideIndexes;
|
|
18160
|
+
if (!inView)
|
|
18161
|
+
notInViewCache = slideIndexes;
|
|
18162
|
+
return slideIndexes;
|
|
18163
|
+
}
|
|
18164
|
+
const self = {
|
|
18165
|
+
init,
|
|
18166
|
+
destroy,
|
|
18167
|
+
get
|
|
18168
|
+
};
|
|
18169
|
+
return self;
|
|
18170
|
+
}
|
|
18171
|
+
function SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow) {
|
|
18172
|
+
const {
|
|
18173
|
+
measureSize,
|
|
18174
|
+
startEdge,
|
|
18175
|
+
endEdge
|
|
18176
|
+
} = axis;
|
|
18177
|
+
const withEdgeGap = slideRects[0] && readEdgeGap;
|
|
18178
|
+
const startGap = measureStartGap();
|
|
18179
|
+
const endGap = measureEndGap();
|
|
18180
|
+
const slideSizes = slideRects.map(measureSize);
|
|
18181
|
+
const slideSizesWithGaps = measureWithGaps();
|
|
18182
|
+
function measureStartGap() {
|
|
18183
|
+
if (!withEdgeGap)
|
|
18184
|
+
return 0;
|
|
18185
|
+
const slideRect = slideRects[0];
|
|
18186
|
+
return mathAbs(containerRect[startEdge] - slideRect[startEdge]);
|
|
18187
|
+
}
|
|
18188
|
+
function measureEndGap() {
|
|
18189
|
+
if (!withEdgeGap)
|
|
18190
|
+
return 0;
|
|
18191
|
+
const style = ownerWindow.getComputedStyle(arrayLast(slides));
|
|
18192
|
+
return parseFloat(style.getPropertyValue(`margin-${endEdge}`));
|
|
18193
|
+
}
|
|
18194
|
+
function measureWithGaps() {
|
|
18195
|
+
return slideRects.map((rect, index2, rects) => {
|
|
18196
|
+
const isFirst = !index2;
|
|
18197
|
+
const isLast = index2 === arrayLastIndex(rects);
|
|
18198
|
+
if (isFirst)
|
|
18199
|
+
return slideSizes[index2] + startGap;
|
|
18200
|
+
if (isLast)
|
|
18201
|
+
return slideSizes[index2] + endGap;
|
|
18202
|
+
return rects[index2 + 1][startEdge] - rect[startEdge];
|
|
18203
|
+
}).map(mathAbs);
|
|
18204
|
+
}
|
|
18205
|
+
const self = {
|
|
18206
|
+
slideSizes,
|
|
18207
|
+
slideSizesWithGaps,
|
|
18208
|
+
startGap,
|
|
18209
|
+
endGap
|
|
18210
|
+
};
|
|
18211
|
+
return self;
|
|
18212
|
+
}
|
|
18213
|
+
function SlidesToScroll(axis, direction, viewSize, slidesToScroll, loop, containerRect, slideRects, startGap, endGap) {
|
|
18214
|
+
const {
|
|
18215
|
+
startEdge,
|
|
18216
|
+
endEdge
|
|
18217
|
+
} = axis;
|
|
18218
|
+
const groupByNumber = isNumber(slidesToScroll);
|
|
18219
|
+
function byNumber(array, groupSize) {
|
|
18220
|
+
return arrayKeys(array).filter((i2) => i2 % groupSize === 0).map((i2) => array.slice(i2, i2 + groupSize));
|
|
18221
|
+
}
|
|
18222
|
+
function bySize(array) {
|
|
18223
|
+
if (!array.length)
|
|
18224
|
+
return [];
|
|
18225
|
+
return arrayKeys(array).reduce((groups, rectB) => {
|
|
18226
|
+
const rectA = arrayLast(groups) || 0;
|
|
18227
|
+
const isFirst = rectA === 0;
|
|
18228
|
+
const isLast = rectB === arrayLastIndex(array);
|
|
18229
|
+
const edgeA = containerRect[startEdge] - slideRects[rectA][startEdge];
|
|
18230
|
+
const edgeB = containerRect[startEdge] - slideRects[rectB][endEdge];
|
|
18231
|
+
const gapA = !loop && isFirst ? direction.apply(startGap) : 0;
|
|
18232
|
+
const gapB = !loop && isLast ? direction.apply(endGap) : 0;
|
|
18233
|
+
const chunkSize = mathAbs(edgeB - gapB - (edgeA + gapA));
|
|
18234
|
+
if (chunkSize > viewSize)
|
|
18235
|
+
groups.push(rectB);
|
|
18236
|
+
if (isLast)
|
|
18237
|
+
groups.push(array.length);
|
|
18238
|
+
return groups;
|
|
18239
|
+
}, []).map((currentSize, index2, groups) => {
|
|
18240
|
+
const previousSize = Math.max(groups[index2 - 1] || 0);
|
|
18241
|
+
return array.slice(previousSize, currentSize);
|
|
18242
|
+
});
|
|
18243
|
+
}
|
|
18244
|
+
function groupSlides(array) {
|
|
18245
|
+
return groupByNumber ? byNumber(array, slidesToScroll) : bySize(array);
|
|
18246
|
+
}
|
|
18247
|
+
const self = {
|
|
18248
|
+
groupSlides
|
|
18249
|
+
};
|
|
18250
|
+
return self;
|
|
18251
|
+
}
|
|
18252
|
+
function Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler, animations2) {
|
|
18253
|
+
const {
|
|
18254
|
+
align,
|
|
18255
|
+
axis: scrollAxis,
|
|
18256
|
+
direction: contentDirection,
|
|
18257
|
+
startIndex,
|
|
18258
|
+
loop,
|
|
18259
|
+
duration,
|
|
18260
|
+
dragFree,
|
|
18261
|
+
dragThreshold,
|
|
18262
|
+
inViewThreshold,
|
|
18263
|
+
slidesToScroll: groupSlides,
|
|
18264
|
+
skipSnaps,
|
|
18265
|
+
containScroll,
|
|
18266
|
+
watchResize,
|
|
18267
|
+
watchSlides,
|
|
18268
|
+
watchDrag
|
|
18269
|
+
} = options;
|
|
18270
|
+
const containerRect = container.getBoundingClientRect();
|
|
18271
|
+
const slideRects = slides.map((slide) => slide.getBoundingClientRect());
|
|
18272
|
+
const direction = Direction(contentDirection);
|
|
18273
|
+
const axis = Axis(scrollAxis, contentDirection);
|
|
18274
|
+
const viewSize = axis.measureSize(containerRect);
|
|
18275
|
+
const percentOfView = PercentOfView(viewSize);
|
|
18276
|
+
const alignment = Alignment(align, viewSize);
|
|
18277
|
+
const containSnaps = !loop && !!containScroll;
|
|
18278
|
+
const readEdgeGap = loop || !!containScroll;
|
|
18279
|
+
const {
|
|
18280
|
+
slideSizes,
|
|
18281
|
+
slideSizesWithGaps,
|
|
18282
|
+
startGap,
|
|
18283
|
+
endGap
|
|
18284
|
+
} = SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow);
|
|
18285
|
+
const slidesToScroll = SlidesToScroll(axis, direction, viewSize, groupSlides, loop, containerRect, slideRects, startGap, endGap);
|
|
18286
|
+
const {
|
|
18287
|
+
snaps,
|
|
18288
|
+
snapsAligned
|
|
18289
|
+
} = ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll);
|
|
18290
|
+
const contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);
|
|
18291
|
+
const {
|
|
18292
|
+
snapsContained,
|
|
18293
|
+
scrollContainLimit
|
|
18294
|
+
} = ScrollContain(viewSize, contentSize, snapsAligned, containScroll);
|
|
18295
|
+
const scrollSnaps = containSnaps ? snapsContained : snapsAligned;
|
|
18296
|
+
const {
|
|
18297
|
+
limit
|
|
18298
|
+
} = ScrollLimit(contentSize, scrollSnaps, loop);
|
|
18299
|
+
const index2 = Counter(arrayLastIndex(scrollSnaps), startIndex, loop);
|
|
18300
|
+
const indexPrevious = index2.clone();
|
|
18301
|
+
const slideIndexes = arrayKeys(slides);
|
|
18302
|
+
const update = ({
|
|
18303
|
+
dragHandler,
|
|
18304
|
+
scrollBody: scrollBody2,
|
|
18305
|
+
scrollBounds,
|
|
18306
|
+
eventHandler: eventHandler2,
|
|
18307
|
+
animation: animation2,
|
|
18308
|
+
options: {
|
|
18309
|
+
loop: loop2
|
|
18310
|
+
}
|
|
18311
|
+
}) => {
|
|
18312
|
+
const pointerDown = dragHandler.pointerDown();
|
|
18313
|
+
if (!loop2)
|
|
18314
|
+
scrollBounds.constrain(pointerDown);
|
|
18315
|
+
const hasSettled = scrollBody2.seek().settled();
|
|
18316
|
+
if (hasSettled && !pointerDown) {
|
|
18317
|
+
animation2.stop();
|
|
18318
|
+
eventHandler2.emit("settle");
|
|
18319
|
+
}
|
|
18320
|
+
if (!hasSettled)
|
|
18321
|
+
eventHandler2.emit("scroll");
|
|
18322
|
+
};
|
|
18323
|
+
const render = ({
|
|
18324
|
+
scrollBody: scrollBody2,
|
|
18325
|
+
translate,
|
|
18326
|
+
location: location2,
|
|
18327
|
+
offsetLocation: offsetLocation2,
|
|
18328
|
+
scrollLooper,
|
|
18329
|
+
slideLooper,
|
|
18330
|
+
options: {
|
|
18331
|
+
loop: loop2
|
|
18332
|
+
}
|
|
18333
|
+
}, lagOffset) => {
|
|
18334
|
+
const velocity = scrollBody2.velocity();
|
|
18335
|
+
offsetLocation2.set(location2.get() - velocity + velocity * lagOffset);
|
|
18336
|
+
if (loop2) {
|
|
18337
|
+
scrollLooper.loop(scrollBody2.direction());
|
|
18338
|
+
slideLooper.loop();
|
|
18339
|
+
}
|
|
18340
|
+
translate.to(offsetLocation2.get());
|
|
18341
|
+
};
|
|
18342
|
+
const animation = {
|
|
18343
|
+
start: () => animations2.start(engine),
|
|
18344
|
+
stop: () => animations2.stop(engine),
|
|
18345
|
+
update: () => update(engine),
|
|
18346
|
+
render: (lagOffset) => render(engine, lagOffset)
|
|
18347
|
+
};
|
|
18348
|
+
const friction = 0.68;
|
|
18349
|
+
const startLocation = scrollSnaps[index2.get()];
|
|
18350
|
+
const location = Vector1D(startLocation);
|
|
18351
|
+
const offsetLocation = Vector1D(startLocation);
|
|
18352
|
+
const target = Vector1D(startLocation);
|
|
18353
|
+
const scrollBody = ScrollBody(location, target, duration, friction);
|
|
18354
|
+
const scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
|
|
18355
|
+
const scrollTo = ScrollTo(animation, index2, indexPrevious, scrollTarget, scrollBody, target, eventHandler);
|
|
18356
|
+
const scrollProgress = ScrollProgress(limit);
|
|
18357
|
+
const eventStore = EventStore();
|
|
18358
|
+
const slidesInView = SlidesInView(container, slides, eventHandler, inViewThreshold);
|
|
18359
|
+
const {
|
|
18360
|
+
slideRegistry
|
|
18361
|
+
} = SlideRegistry(viewSize, contentSize, containSnaps, scrollContainLimit, slidesToScroll, slideIndexes);
|
|
18362
|
+
const slideFocus = SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore);
|
|
18363
|
+
const engine = {
|
|
18364
|
+
ownerDocument,
|
|
18365
|
+
ownerWindow,
|
|
18366
|
+
eventHandler,
|
|
18367
|
+
containerRect,
|
|
18368
|
+
slideRects,
|
|
18369
|
+
animation,
|
|
18370
|
+
axis,
|
|
18371
|
+
direction,
|
|
18372
|
+
dragHandler: DragHandler(axis, direction, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
|
|
18373
|
+
eventStore,
|
|
18374
|
+
percentOfView,
|
|
18375
|
+
index: index2,
|
|
18376
|
+
indexPrevious,
|
|
18377
|
+
limit,
|
|
18378
|
+
location,
|
|
18379
|
+
offsetLocation,
|
|
18380
|
+
options,
|
|
18381
|
+
resizeHandler: ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize),
|
|
18382
|
+
scrollBody,
|
|
18383
|
+
scrollBounds: ScrollBounds(limit, location, target, scrollBody, percentOfView),
|
|
18384
|
+
scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [location, offsetLocation, target]),
|
|
18385
|
+
scrollProgress,
|
|
18386
|
+
scrollSnapList: scrollSnaps.map(scrollProgress.get),
|
|
18387
|
+
scrollSnaps,
|
|
18388
|
+
scrollTarget,
|
|
18389
|
+
scrollTo,
|
|
18390
|
+
slideLooper: SlideLooper(axis, direction, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, offsetLocation, slides),
|
|
18391
|
+
slideFocus,
|
|
18392
|
+
slidesHandler: SlidesHandler(container, eventHandler, watchSlides),
|
|
18393
|
+
slidesInView,
|
|
18394
|
+
slideIndexes,
|
|
18395
|
+
slideRegistry,
|
|
18396
|
+
slidesToScroll,
|
|
18397
|
+
target,
|
|
18398
|
+
translate: Translate(axis, direction, container)
|
|
18399
|
+
};
|
|
18400
|
+
return engine;
|
|
18401
|
+
}
|
|
18402
|
+
function Animations(ownerWindow) {
|
|
18403
|
+
const timeStep = 1e3 / 60;
|
|
18404
|
+
let engines = [];
|
|
18405
|
+
let lastTimeStamp = null;
|
|
18406
|
+
let lag = 0;
|
|
18407
|
+
let animationFrame = 0;
|
|
18408
|
+
function animate(timeStamp) {
|
|
18409
|
+
if (!lastTimeStamp)
|
|
18410
|
+
lastTimeStamp = timeStamp;
|
|
18411
|
+
const elapsed = timeStamp - lastTimeStamp;
|
|
18412
|
+
lastTimeStamp = timeStamp;
|
|
18413
|
+
lag += elapsed;
|
|
18414
|
+
while (lag >= timeStep) {
|
|
18415
|
+
engines.forEach(({
|
|
18416
|
+
animation
|
|
18417
|
+
}) => animation.update());
|
|
18418
|
+
lag -= timeStep;
|
|
18419
|
+
}
|
|
18420
|
+
const lagOffset = mathAbs(lag / timeStep);
|
|
18421
|
+
engines.forEach(({
|
|
18422
|
+
animation
|
|
18423
|
+
}) => animation.render(lagOffset));
|
|
18424
|
+
if (animationFrame)
|
|
18425
|
+
ownerWindow.requestAnimationFrame(animate);
|
|
18426
|
+
}
|
|
18427
|
+
function start(engine) {
|
|
18428
|
+
if (!engines.includes(engine))
|
|
18429
|
+
engines.push(engine);
|
|
18430
|
+
if (animationFrame)
|
|
18431
|
+
return;
|
|
18432
|
+
animationFrame = ownerWindow.requestAnimationFrame(animate);
|
|
18433
|
+
}
|
|
18434
|
+
function stop(engine) {
|
|
18435
|
+
engines = engines.filter((e2) => e2 !== engine);
|
|
18436
|
+
if (engines.length)
|
|
18437
|
+
return;
|
|
18438
|
+
ownerWindow.cancelAnimationFrame(animationFrame);
|
|
18439
|
+
lastTimeStamp = null;
|
|
18440
|
+
lag = 0;
|
|
18441
|
+
animationFrame = 0;
|
|
18442
|
+
}
|
|
18443
|
+
function reset() {
|
|
18444
|
+
lastTimeStamp = null;
|
|
18445
|
+
lag = 0;
|
|
18446
|
+
}
|
|
18447
|
+
const self = {
|
|
18448
|
+
start,
|
|
18449
|
+
stop,
|
|
18450
|
+
reset,
|
|
18451
|
+
window: ownerWindow
|
|
18452
|
+
};
|
|
18453
|
+
return self;
|
|
18454
|
+
}
|
|
18455
|
+
function EventHandler() {
|
|
18456
|
+
const listeners = {};
|
|
18457
|
+
let api;
|
|
18458
|
+
function init(emblaApi) {
|
|
18459
|
+
api = emblaApi;
|
|
18460
|
+
}
|
|
18461
|
+
function getListeners(evt) {
|
|
18462
|
+
return listeners[evt] || [];
|
|
18463
|
+
}
|
|
18464
|
+
function emit(evt) {
|
|
18465
|
+
getListeners(evt).forEach((e2) => e2(api, evt));
|
|
18466
|
+
return self;
|
|
18467
|
+
}
|
|
18468
|
+
function on(evt, cb) {
|
|
18469
|
+
listeners[evt] = getListeners(evt).concat([cb]);
|
|
18470
|
+
return self;
|
|
18471
|
+
}
|
|
18472
|
+
function off(evt, cb) {
|
|
18473
|
+
listeners[evt] = getListeners(evt).filter((e2) => e2 !== cb);
|
|
18474
|
+
return self;
|
|
18475
|
+
}
|
|
18476
|
+
const self = {
|
|
18477
|
+
init,
|
|
18478
|
+
emit,
|
|
18479
|
+
off,
|
|
18480
|
+
on
|
|
18481
|
+
};
|
|
18482
|
+
return self;
|
|
18483
|
+
}
|
|
18484
|
+
const defaultOptions = {
|
|
18485
|
+
align: "center",
|
|
18486
|
+
axis: "x",
|
|
18487
|
+
container: null,
|
|
18488
|
+
slides: null,
|
|
18489
|
+
containScroll: "trimSnaps",
|
|
18490
|
+
direction: "ltr",
|
|
18491
|
+
slidesToScroll: 1,
|
|
18492
|
+
inViewThreshold: 0,
|
|
18493
|
+
breakpoints: {},
|
|
18494
|
+
dragFree: false,
|
|
18495
|
+
dragThreshold: 10,
|
|
18496
|
+
loop: false,
|
|
18497
|
+
skipSnaps: false,
|
|
18498
|
+
duration: 25,
|
|
18499
|
+
startIndex: 0,
|
|
18500
|
+
active: true,
|
|
18501
|
+
watchDrag: true,
|
|
18502
|
+
watchResize: true,
|
|
18503
|
+
watchSlides: true
|
|
18504
|
+
};
|
|
18505
|
+
function OptionsHandler(ownerWindow) {
|
|
18506
|
+
function mergeOptions(optionsA, optionsB) {
|
|
18507
|
+
return objectsMergeDeep(optionsA, optionsB || {});
|
|
18508
|
+
}
|
|
18509
|
+
function optionsAtMedia(options) {
|
|
18510
|
+
const optionsAtMedia2 = options.breakpoints || {};
|
|
18511
|
+
const matchedMediaOptions = objectKeys(optionsAtMedia2).filter((media) => ownerWindow.matchMedia(media).matches).map((media) => optionsAtMedia2[media]).reduce((a2, mediaOption) => mergeOptions(a2, mediaOption), {});
|
|
18512
|
+
return mergeOptions(options, matchedMediaOptions);
|
|
18513
|
+
}
|
|
18514
|
+
function optionsMediaQueries(optionsList) {
|
|
18515
|
+
return optionsList.map((options) => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
|
|
18516
|
+
}
|
|
18517
|
+
const self = {
|
|
18518
|
+
mergeOptions,
|
|
18519
|
+
optionsAtMedia,
|
|
18520
|
+
optionsMediaQueries
|
|
18521
|
+
};
|
|
18522
|
+
return self;
|
|
18523
|
+
}
|
|
18524
|
+
function PluginsHandler(optionsHandler) {
|
|
18525
|
+
let activePlugins = [];
|
|
18526
|
+
function init(emblaApi, plugins) {
|
|
18527
|
+
activePlugins = plugins.filter(({
|
|
18528
|
+
options
|
|
18529
|
+
}) => optionsHandler.optionsAtMedia(options).active !== false);
|
|
18530
|
+
activePlugins.forEach((plugin) => plugin.init(emblaApi, optionsHandler));
|
|
18531
|
+
return plugins.reduce((map, plugin) => Object.assign(map, {
|
|
18532
|
+
[plugin.name]: plugin
|
|
18533
|
+
}), {});
|
|
18534
|
+
}
|
|
18535
|
+
function destroy() {
|
|
18536
|
+
activePlugins = activePlugins.filter((plugin) => plugin.destroy());
|
|
18537
|
+
}
|
|
18538
|
+
const self = {
|
|
18539
|
+
init,
|
|
18540
|
+
destroy
|
|
18541
|
+
};
|
|
18542
|
+
return self;
|
|
18543
|
+
}
|
|
18544
|
+
function EmblaCarousel(root, userOptions, userPlugins) {
|
|
18545
|
+
const ownerDocument = root.ownerDocument;
|
|
18546
|
+
const ownerWindow = ownerDocument.defaultView;
|
|
18547
|
+
const optionsHandler = OptionsHandler(ownerWindow);
|
|
18548
|
+
const pluginsHandler = PluginsHandler(optionsHandler);
|
|
18549
|
+
const mediaHandlers = EventStore();
|
|
18550
|
+
const documentVisibleHandler = EventStore();
|
|
18551
|
+
const eventHandler = EventHandler();
|
|
18552
|
+
const {
|
|
18553
|
+
animationRealms
|
|
18554
|
+
} = EmblaCarousel;
|
|
18555
|
+
const {
|
|
18556
|
+
mergeOptions,
|
|
18557
|
+
optionsAtMedia,
|
|
18558
|
+
optionsMediaQueries
|
|
18559
|
+
} = optionsHandler;
|
|
18560
|
+
const {
|
|
18561
|
+
on,
|
|
18562
|
+
off,
|
|
18563
|
+
emit
|
|
18564
|
+
} = eventHandler;
|
|
18565
|
+
const reInit = reActivate;
|
|
18566
|
+
let destroyed = false;
|
|
18567
|
+
let engine;
|
|
18568
|
+
let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
|
|
18569
|
+
let options = mergeOptions(optionsBase);
|
|
18570
|
+
let pluginList = [];
|
|
18571
|
+
let pluginApis;
|
|
18572
|
+
let container;
|
|
18573
|
+
let slides;
|
|
18574
|
+
function storeElements() {
|
|
18575
|
+
const {
|
|
18576
|
+
container: userContainer,
|
|
18577
|
+
slides: userSlides
|
|
18578
|
+
} = options;
|
|
18579
|
+
const customContainer = isString(userContainer) ? root.querySelector(userContainer) : userContainer;
|
|
18580
|
+
container = customContainer || root.children[0];
|
|
18581
|
+
const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
|
|
18582
|
+
slides = [].slice.call(customSlides || container.children);
|
|
18583
|
+
}
|
|
18584
|
+
function createEngine(options2, animations2) {
|
|
18585
|
+
const engine2 = Engine(root, container, slides, ownerDocument, ownerWindow, options2, eventHandler, animations2);
|
|
18586
|
+
if (options2.loop && !engine2.slideLooper.canLoop()) {
|
|
18587
|
+
const optionsWithoutLoop = Object.assign({}, options2, {
|
|
18588
|
+
loop: false
|
|
18589
|
+
});
|
|
18590
|
+
return createEngine(optionsWithoutLoop, animations2);
|
|
18591
|
+
}
|
|
18592
|
+
return engine2;
|
|
18593
|
+
}
|
|
18594
|
+
function activate(withOptions, withPlugins) {
|
|
18595
|
+
if (destroyed)
|
|
18596
|
+
return;
|
|
18597
|
+
const animationRealm = animationRealms.find((a2) => a2.window === ownerWindow);
|
|
18598
|
+
const animations2 = animationRealm || Animations(ownerWindow);
|
|
18599
|
+
if (!animationRealm)
|
|
18600
|
+
animationRealms.push(animations2);
|
|
18601
|
+
optionsBase = mergeOptions(optionsBase, withOptions);
|
|
18602
|
+
options = optionsAtMedia(optionsBase);
|
|
18603
|
+
pluginList = withPlugins || pluginList;
|
|
18604
|
+
storeElements();
|
|
18605
|
+
engine = createEngine(options, animations2);
|
|
18606
|
+
optionsMediaQueries([optionsBase, ...pluginList.map(({
|
|
18607
|
+
options: options2
|
|
18608
|
+
}) => options2)]).forEach((query) => mediaHandlers.add(query, "change", reActivate));
|
|
18609
|
+
if (!options.active)
|
|
18610
|
+
return;
|
|
18611
|
+
engine.translate.to(engine.location.get());
|
|
18612
|
+
engine.slidesInView.init();
|
|
18613
|
+
engine.slideFocus.init();
|
|
18614
|
+
engine.eventHandler.init(self);
|
|
18615
|
+
engine.resizeHandler.init(self);
|
|
18616
|
+
engine.slidesHandler.init(self);
|
|
18617
|
+
documentVisibleHandler.add(ownerDocument, "visibilitychange", () => {
|
|
18618
|
+
if (ownerDocument.hidden)
|
|
18619
|
+
animations2.reset();
|
|
18620
|
+
});
|
|
18621
|
+
if (engine.options.loop)
|
|
18622
|
+
engine.slideLooper.loop();
|
|
18623
|
+
if (container.offsetParent && slides.length)
|
|
18624
|
+
engine.dragHandler.init(self);
|
|
18625
|
+
pluginApis = pluginsHandler.init(self, pluginList);
|
|
18626
|
+
}
|
|
18627
|
+
function reActivate(withOptions, withPlugins) {
|
|
18628
|
+
const startIndex = selectedScrollSnap();
|
|
18629
|
+
deActivate();
|
|
18630
|
+
activate(mergeOptions({
|
|
18631
|
+
startIndex
|
|
18632
|
+
}, withOptions), withPlugins);
|
|
18633
|
+
eventHandler.emit("reInit");
|
|
18634
|
+
}
|
|
18635
|
+
function deActivate() {
|
|
18636
|
+
engine.dragHandler.destroy();
|
|
18637
|
+
engine.animation.stop();
|
|
18638
|
+
engine.eventStore.clear();
|
|
18639
|
+
engine.translate.clear();
|
|
18640
|
+
engine.slideLooper.clear();
|
|
18641
|
+
engine.resizeHandler.destroy();
|
|
18642
|
+
engine.slidesHandler.destroy();
|
|
18643
|
+
pluginsHandler.destroy();
|
|
18644
|
+
mediaHandlers.clear();
|
|
18645
|
+
documentVisibleHandler.clear();
|
|
18646
|
+
}
|
|
18647
|
+
function destroy() {
|
|
18648
|
+
if (destroyed)
|
|
18649
|
+
return;
|
|
18650
|
+
destroyed = true;
|
|
18651
|
+
mediaHandlers.clear();
|
|
18652
|
+
deActivate();
|
|
18653
|
+
eventHandler.emit("destroy");
|
|
18654
|
+
}
|
|
18655
|
+
function scrollTo(index2, jump, direction) {
|
|
18656
|
+
if (!options.active || destroyed)
|
|
18657
|
+
return;
|
|
18658
|
+
engine.scrollBody.useBaseFriction().useDuration(jump ? 0 : options.duration);
|
|
18659
|
+
engine.scrollTo.index(index2, direction || 0);
|
|
18660
|
+
}
|
|
18661
|
+
function scrollNext(jump) {
|
|
18662
|
+
const next = engine.index.add(1).get();
|
|
18663
|
+
scrollTo(next, jump === true, -1);
|
|
18664
|
+
}
|
|
18665
|
+
function scrollPrev(jump) {
|
|
18666
|
+
const prev = engine.index.add(-1).get();
|
|
18667
|
+
scrollTo(prev, jump === true, 1);
|
|
18668
|
+
}
|
|
18669
|
+
function canScrollNext() {
|
|
18670
|
+
const next = engine.index.add(1).get();
|
|
18671
|
+
return next !== selectedScrollSnap();
|
|
18672
|
+
}
|
|
18673
|
+
function canScrollPrev() {
|
|
18674
|
+
const prev = engine.index.add(-1).get();
|
|
18675
|
+
return prev !== selectedScrollSnap();
|
|
18676
|
+
}
|
|
18677
|
+
function scrollSnapList() {
|
|
18678
|
+
return engine.scrollSnapList;
|
|
18679
|
+
}
|
|
18680
|
+
function scrollProgress() {
|
|
18681
|
+
return engine.scrollProgress.get(engine.location.get());
|
|
18682
|
+
}
|
|
18683
|
+
function selectedScrollSnap() {
|
|
18684
|
+
return engine.index.get();
|
|
18685
|
+
}
|
|
18686
|
+
function previousScrollSnap() {
|
|
18687
|
+
return engine.indexPrevious.get();
|
|
18688
|
+
}
|
|
18689
|
+
function slidesInView() {
|
|
18690
|
+
return engine.slidesInView.get();
|
|
18691
|
+
}
|
|
18692
|
+
function slidesNotInView() {
|
|
18693
|
+
return engine.slidesInView.get(false);
|
|
18694
|
+
}
|
|
18695
|
+
function plugins() {
|
|
18696
|
+
return pluginApis;
|
|
18697
|
+
}
|
|
18698
|
+
function internalEngine() {
|
|
18699
|
+
return engine;
|
|
18700
|
+
}
|
|
18701
|
+
function rootNode() {
|
|
18702
|
+
return root;
|
|
18703
|
+
}
|
|
18704
|
+
function containerNode() {
|
|
18705
|
+
return container;
|
|
18706
|
+
}
|
|
18707
|
+
function slideNodes() {
|
|
18708
|
+
return slides;
|
|
18709
|
+
}
|
|
18710
|
+
const self = {
|
|
18711
|
+
canScrollNext,
|
|
18712
|
+
canScrollPrev,
|
|
18713
|
+
containerNode,
|
|
18714
|
+
internalEngine,
|
|
18715
|
+
destroy,
|
|
18716
|
+
off,
|
|
18717
|
+
on,
|
|
18718
|
+
emit,
|
|
18719
|
+
plugins,
|
|
18720
|
+
previousScrollSnap,
|
|
18721
|
+
reInit,
|
|
18722
|
+
rootNode,
|
|
18723
|
+
scrollNext,
|
|
18724
|
+
scrollPrev,
|
|
18725
|
+
scrollProgress,
|
|
18726
|
+
scrollSnapList,
|
|
18727
|
+
scrollTo,
|
|
18728
|
+
selectedScrollSnap,
|
|
18729
|
+
slideNodes,
|
|
18730
|
+
slidesInView,
|
|
18731
|
+
slidesNotInView
|
|
18732
|
+
};
|
|
18733
|
+
activate(userOptions, userPlugins);
|
|
18734
|
+
setTimeout(() => eventHandler.emit("init"), 0);
|
|
18735
|
+
return self;
|
|
18736
|
+
}
|
|
18737
|
+
EmblaCarousel.animationRealms = [];
|
|
18738
|
+
EmblaCarousel.globalOptions = void 0;
|
|
18739
|
+
function useEmblaCarousel(options = {}, plugins = []) {
|
|
18740
|
+
const storedOptions = useRef(options);
|
|
18741
|
+
const storedPlugins = useRef(plugins);
|
|
18742
|
+
const [emblaApi, setEmblaApi] = useState();
|
|
18743
|
+
const [viewport, setViewport] = useState();
|
|
18744
|
+
const reInit = useCallback(() => {
|
|
18745
|
+
if (emblaApi)
|
|
18746
|
+
emblaApi.reInit(storedOptions.current, storedPlugins.current);
|
|
18747
|
+
}, [emblaApi]);
|
|
18748
|
+
useEffect(() => {
|
|
18749
|
+
if (canUseDOM() && viewport) {
|
|
18750
|
+
EmblaCarousel.globalOptions = useEmblaCarousel.globalOptions;
|
|
18751
|
+
const newEmblaApi = EmblaCarousel(viewport, storedOptions.current, storedPlugins.current);
|
|
18752
|
+
setEmblaApi(newEmblaApi);
|
|
18753
|
+
return () => newEmblaApi.destroy();
|
|
18754
|
+
} else {
|
|
18755
|
+
setEmblaApi(void 0);
|
|
18756
|
+
}
|
|
18757
|
+
}, [viewport, setEmblaApi]);
|
|
18758
|
+
useEffect(() => {
|
|
18759
|
+
if (areOptionsEqual(storedOptions.current, options))
|
|
18760
|
+
return;
|
|
18761
|
+
storedOptions.current = options;
|
|
18762
|
+
reInit();
|
|
18763
|
+
}, [options, reInit]);
|
|
18764
|
+
useEffect(() => {
|
|
18765
|
+
if (arePluginsEqual(storedPlugins.current, plugins))
|
|
18766
|
+
return;
|
|
18767
|
+
storedPlugins.current = plugins;
|
|
18768
|
+
reInit();
|
|
18769
|
+
}, [plugins, reInit]);
|
|
18770
|
+
return [setViewport, emblaApi];
|
|
18771
|
+
}
|
|
18772
|
+
useEmblaCarousel.globalOptions = void 0;
|
|
17066
18773
|
export {
|
|
17067
18774
|
$cb5cc270b50c6fcd$export$be92b6f5f03c0fe9 as $,
|
|
17068
18775
|
$cc7e05a45900e73f$export$2f60d3ec9ad468f2 as A,
|
|
@@ -17082,10 +18789,11 @@ export {
|
|
|
17082
18789
|
$57acba87d6e25586$export$6521433ed15a34db as O,
|
|
17083
18790
|
MasonryResponsive as P,
|
|
17084
18791
|
Masonry as Q,
|
|
17085
|
-
|
|
17086
|
-
$5d3850c4d0b4e6c7$export$
|
|
17087
|
-
$5d3850c4d0b4e6c7$export$
|
|
17088
|
-
$5d3850c4d0b4e6c7$export$
|
|
18792
|
+
useEmblaCarousel as R,
|
|
18793
|
+
$5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 as S,
|
|
18794
|
+
$5d3850c4d0b4e6c7$export$602eac185826482c as T,
|
|
18795
|
+
$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff as U,
|
|
18796
|
+
$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 as V,
|
|
17089
18797
|
$cb5cc270b50c6fcd$export$41fb9f06171c75f4 as a,
|
|
17090
18798
|
$cb5cc270b50c6fcd$export$602eac185826482c as b,
|
|
17091
18799
|
$cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 as c,
|
|
@@ -17113,4 +18821,4 @@ export {
|
|
|
17113
18821
|
$cc7e05a45900e73f$export$602eac185826482c as y,
|
|
17114
18822
|
$cc7e05a45900e73f$export$7c6e2c02157bb7d2 as z
|
|
17115
18823
|
};
|
|
17116
|
-
//# sourceMappingURL=vendor-
|
|
18824
|
+
//# sourceMappingURL=vendor-eadacf73.js.map
|