PageSourceSearch

https://littlebitessnacks.ca/sites/default/files/js/js_RqsMH5sRyOIR1RcLIrLSHXkX0ayjyWC3WfSmWEt5x78.js

js littlebitessnacks.ca collected 2026-10-07 19:38:30 UTC 595,715 bytes, 14,771 lines download raw bytes

vendor: 3,920 bytes, lines 1-104
1/**
2 * @file
3 * Behaviors of Boostrap Layout Builder local video background.
4 */
5
6(function ($, _, Drupal, drupalSettings) {
7  "use strict";
8
9  Drupal.behaviors.scrollEffectsInit = {
10    attach: function (context, settings) {
11      AOS.init();
12    }
13  }
14
15})(window.jQuery, window._, window.Drupal, window.drupalSettings);
16;
17/******/ (function(modules) { // webpackBootstrap
18/******/ 	// The module cache
19/******/ 	var installedModules = {};
20/******/
21/******/ 	// The require function
22/******/ 	function __webpack_require__(moduleId) {
23/******/
24/******/ 		// Check if module is in cache
25/******/ 		if(installedModules[moduleId]) {
26/******/ 			return installedModules[moduleId].exports;
27/******/ 		}
28/******/ 		// Create a new module (and put it into the cache)
29/******/ 		var module = installedModules[moduleId] = {
30/******/ 			i: moduleId,
31/******/ 			l: false,
32/******/ 			exports: {}
33/******/ 		};
34/******/
35/******/ 		// Execute the module function
36/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
37/******/
38/******/ 		// Flag the module as loaded
39/******/ 		module.l = true;
40/******/
41/******/ 		// Return the exports of the module
42/******/ 		return module.exports;
43/******/ 	}
44/******/
45/******/
46/******/ 	// expose the modules object (__webpack_modules__)
47/******/ 	__webpack_require__.m = modules;
48/******/
49/******/ 	// expose the module cache
50/******/ 	__webpack_require__.c = installedModules;
51/******/
52/******/ 	// define getter function for harmony exports
53/******/ 	__webpack_require__.d = function(exports, name, getter) {
54/******/ 		if(!__webpack_require__.o(exports, name)) {
55/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
56/******/ 		}
57/******/ 	};
58/******/
59/******/ 	// define __esModule on exports
60/******/ 	__webpack_require__.r = function(exports) {
61/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
62/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
63/******/ 		}
64/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
65/******/ 	};
66/******/
67/******/ 	// create a fake namespace object
68/******/ 	// mode & 1: value is a module id, require it
69/******/ 	// mode & 2: merge all properties of value into the ns
70/******/ 	// mode & 4: return value when already ns object
71/******/ 	// mode & 8|1: behave like require
72/******/ 	__webpack_require__.t = function(value, mode) {
73/******/ 		if(mode & 1) value = __webpack_require__(value);
74/******/ 		if(mode & 8) return value;
75/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
76/******/ 		var ns = Object.create(null);
77/******/ 		__webpack_require__.r(ns);
78/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
79/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
80/******/ 		return ns;
81/******/ 	};
82/******/
83/******/ 	// getDefaultExport function for compatibility with non-harmony modules
84/******/ 	__webpack_require__.n = function(module) {
85/******/ 		var getter = module && module.__esModule ?
86/******/ 			function getDefault() { return module['default']; } :
87/******/ 			function getModuleExports() { return module; };
88/******/ 		__webpack_require__.d(getter, 'a', getter);
89/******/ 		return getter;
90/******/ 	};
91/******/
92/******/ 	// Object.prototype.hasOwnProperty.call
93/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
94/******/
95/******/ 	// __webpack_public_path__
96/******/ 	__webpack_require__.p = "/";
97/******/
98/******/
99/******/ 	// Load entry module and return exports
100/******/ 	return __webpack_require__(__webpack_require__.s = 17);
101/******/ })
102/************************************************************************/
103/******/ ({
104
vendor: 970 bytes, lines 105-127
105/***/ "./node_modules/tiny-slider/src/helpers/addCSSRule.js":
106/*!************************************************************!*\
107  !*** ./node_modules/tiny-slider/src/helpers/addCSSRule.js ***!
108  \************************************************************/
109/*! exports provided: addCSSRule */
110/***/ (function(module, __webpack_exports__, __webpack_require__) {
111
112"use strict";
113__webpack_require__.r(__webpack_exports__);
114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addCSSRule", function() { return addCSSRule; });
115/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
116// cross browsers addRule method
117
118function addCSSRule(sheet, selector, rules, index) {
119  // return raf(function() {
120    'insertRule' in sheet ?
121      sheet.insertRule(selector + '{' + rules + '}', index) :
122      sheet.addRule(selector, rules, index);
123  // });
124}
125
126/***/ }),
127
vendor: 1,082 bytes, lines 128-151
128/***/ "./node_modules/tiny-slider/src/helpers/addClass.js":
129/*!**********************************************************!*\
130  !*** ./node_modules/tiny-slider/src/helpers/addClass.js ***!
131  \**********************************************************/
132/*! exports provided: addClass */
133/***/ (function(module, __webpack_exports__, __webpack_require__) {
134
135"use strict";
136__webpack_require__.r(__webpack_exports__);
137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
138/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
139
140var addClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
141    function (el, str) {
142      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.add(str); }
143    } :
144    function (el, str) {
145      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.className += ' ' + str; }
146    };
147
148
149
150/***/ }),
151
vendor: 1,023 bytes, lines 152-173
152/***/ "./node_modules/tiny-slider/src/helpers/addEvents.js":
153/*!***********************************************************!*\
154  !*** ./node_modules/tiny-slider/src/helpers/addEvents.js ***!
155  \***********************************************************/
156/*! exports provided: addEvents */
157/***/ (function(module, __webpack_exports__, __webpack_require__) {
158
159"use strict";
160__webpack_require__.r(__webpack_exports__);
161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEvents", function() { return addEvents; });
162/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
163
164
165function addEvents(el, obj, preventScrolling) {
166  for (var prop in obj) {
167    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
168    el.addEventListener(prop, obj[prop], option);
169  }
170}
171
172/***/ }),
173
vendor: 745 bytes, lines 174-193
174/***/ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js":
175/*!*******************************************************************!*\
176  !*** ./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js ***!
177  \*******************************************************************/
178/*! exports provided: arrayFromNodeList */
179/***/ (function(module, __webpack_exports__, __webpack_require__) {
180
181"use strict";
182__webpack_require__.r(__webpack_exports__);
183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayFromNodeList", function() { return arrayFromNodeList; });
184function arrayFromNodeList (nl) {
185  var arr = [];
186  for (var i = 0, l = nl.length; i < l; i++) {
187    arr.push(nl[i]);
188  }
189  return arr;
190}
191
192/***/ }),
193
vendor: 637 bytes, lines 194-212
194/***/ "./node_modules/tiny-slider/src/helpers/caf.js":
195/*!*****************************************************!*\
196  !*** ./node_modules/tiny-slider/src/helpers/caf.js ***!
197  \*****************************************************/
198/*! exports provided: caf */
199/***/ (function(module, __webpack_exports__, __webpack_require__) {
200
201"use strict";
202__webpack_require__.r(__webpack_exports__);
203/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caf", function() { return caf; });
204var win = window;
205
206var caf = win.cancelAnimationFrame
207  || win.mozCancelAnimationFrame
208  || function(id){ clearTimeout(id); };
209
210
211/***/ }),
212
vendor: 1,914 bytes, lines 213-261
213/***/ "./node_modules/tiny-slider/src/helpers/calc.js":
214/*!******************************************************!*\
215  !*** ./node_modules/tiny-slider/src/helpers/calc.js ***!
216  \******************************************************/
217/*! exports provided: calc */
218/***/ (function(module, __webpack_exports__, __webpack_require__) {
219
220"use strict";
221__webpack_require__.r(__webpack_exports__);
222/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calc", function() { return calc; });
223/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
224/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
225/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
226// get css-calc 
227// @return - false | calc | -webkit-calc | -moz-calc
228// @usage - var calc = getCalc(); 
229
230
231
232
233function calc() {
234  var doc = document, 
235      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
236      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
237      div = doc.createElement('div'), 
238      result = false;
239
240  body.appendChild(div);
241  try {
242    var str = '(10px * 10)',
243        vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],
244        val;
245    for (var i = 0; i < 3; i++) {
246      val = vals[i];
247      div.style.width = val;
248      if (div.offsetWidth === 100) { 
249        result = val.replace(str, ''); 
250        break;
251      }
252    }
253  } catch (e) {}
254  
255  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
256
257  return result;
258}
259
260/***/ }),
261
vendor: 722 bytes, lines 262-277
262/***/ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js":
263/*!*******************************************************************!*\
264  !*** ./node_modules/tiny-slider/src/helpers/checkStorageValue.js ***!
265  \*******************************************************************/
266/*! exports provided: checkStorageValue */
267/***/ (function(module, __webpack_exports__, __webpack_require__) {
268
269"use strict";
270__webpack_require__.r(__webpack_exports__);
271/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkStorageValue", function() { return checkStorageValue; });
272function checkStorageValue (value) {
273  return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;
274}
275
276/***/ }),
277
vendor: 667 bytes, lines 278-291
278/***/ "./node_modules/tiny-slider/src/helpers/classListSupport.js":
279/*!******************************************************************!*\
280  !*** ./node_modules/tiny-slider/src/helpers/classListSupport.js ***!
281  \******************************************************************/
282/*! exports provided: classListSupport */
283/***/ (function(module, __webpack_exports__, __webpack_require__) {
284
285"use strict";
286__webpack_require__.r(__webpack_exports__);
287/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return classListSupport; });
288var classListSupport = 'classList' in document.createElement('_');
289
290/***/ }),
291
vendor: 1,359 bytes, lines 292-326
292/***/ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js":
293/*!******************************************************************!*\
294  !*** ./node_modules/tiny-slider/src/helpers/createStyleSheet.js ***!
295  \******************************************************************/
296/*! exports provided: createStyleSheet */
297/***/ (function(module, __webpack_exports__, __webpack_require__) {
298
299"use strict";
300__webpack_require__.r(__webpack_exports__);
301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStyleSheet", function() { return createStyleSheet; });
302// create and append style sheet
303function createStyleSheet (media, nonce) {
304  // Create the <style> tag
305  var style = document.createElement("style");
306  // style.setAttribute("type", "text/css");
307
308  // Add a media (and/or media query) here if you'd like!
309  // style.setAttribute("media", "screen")
310  // style.setAttribute("media", "only screen and (max-width : 1024px)")
311  if (media) { style.setAttribute("media", media); }
312
313  // Add nonce attribute for Content Security Policy
314  if (nonce) { style.setAttribute("nonce", nonce); }
315
316  // WebKit hack :(
317  // style.appendChild(document.createTextNode(""));
318
319  // Add the <style> element to the page
320  document.querySelector('head').appendChild(style);
321
322  return style.sheet ? style.sheet : style.styleSheet;
323};
324
325/***/ }),
326
vendor: 601 bytes, lines 327-340
327/***/ "./node_modules/tiny-slider/src/helpers/docElement.js":
328/*!************************************************************!*\
329  !*** ./node_modules/tiny-slider/src/helpers/docElement.js ***!
330  \************************************************************/
331/*! exports provided: docElement */
332/***/ (function(module, __webpack_exports__, __webpack_require__) {
333
334"use strict";
335__webpack_require__.r(__webpack_exports__);
336/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "docElement", function() { return docElement; });
337var docElement = document.documentElement;
338
339/***/ }),
340
vendor: 1,234 bytes, lines 341-380
341/***/ "./node_modules/tiny-slider/src/helpers/events.js":
342/*!********************************************************!*\
343  !*** ./node_modules/tiny-slider/src/helpers/events.js ***!
344  \********************************************************/
345/*! exports provided: Events */
346/***/ (function(module, __webpack_exports__, __webpack_require__) {
347
348"use strict";
349__webpack_require__.r(__webpack_exports__);
350/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
351function Events() {
352  return {
353    topics: {},
354    on: function (eventName, fn) {
355      this.topics[eventName] = this.topics[eventName] || [];
356      this.topics[eventName].push(fn);
357    },
358    off: function(eventName, fn) {
359      if (this.topics[eventName]) {
360        for (var i = 0; i < this.topics[eventName].length; i++) {
361          if (this.topics[eventName][i] === fn) {
362            this.topics[eventName].splice(i, 1);
363            break;
364          }
365        }
366      }
367    },
368    emit: function (eventName, data) {
369      data.type = eventName;
370      if (this.topics[eventName]) {
371        this.topics[eventName].forEach(function(fn) {
372          fn(data, eventName);
373        });
374      }
375    }
376  };
377};
378
379/***/ }),
380
vendor: 947 bytes, lines 381-414
381/***/ "./node_modules/tiny-slider/src/helpers/extend.js":
382/*!********************************************************!*\
383  !*** ./node_modules/tiny-slider/src/helpers/extend.js ***!
384  \********************************************************/
385/*! exports provided: extend */
386/***/ (function(module, __webpack_exports__, __webpack_require__) {
387
388"use strict";
389__webpack_require__.r(__webpack_exports__);
390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
391function extend() {
392  var obj, name, copy,
393      target = arguments[0] || {},
394      i = 1,
395      length = arguments.length;
396
397  for (; i < length; i++) {
398    if ((obj = arguments[i]) !== null) {
399      for (name in obj) {
400        copy = obj[name];
401
402        if (target === copy) {
403          continue;
404        } else if (copy !== undefined) {
405          target[name] = copy;
406        }
407      }
408    }
409  }
410  return target;
411}
412
413/***/ }),
414
vendor: 739 bytes, lines 415-433
415/***/ "./node_modules/tiny-slider/src/helpers/forEach.js":
416/*!*********************************************************!*\
417  !*** ./node_modules/tiny-slider/src/helpers/forEach.js ***!
418  \*********************************************************/
419/*! exports provided: forEach */
420/***/ (function(module, __webpack_exports__, __webpack_require__) {
421
422"use strict";
423__webpack_require__.r(__webpack_exports__);
424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
425// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
426function forEach (arr, callback, scope) {
427  for (var i = 0, l = arr.length; i < l; i++) {
428    callback.call(scope, arr[i], i);
429  }
430}
431
432/***/ }),
433
vendor: 600 bytes, lines 434-449
434/***/ "./node_modules/tiny-slider/src/helpers/getAttr.js":
435/*!*********************************************************!*\
436  !*** ./node_modules/tiny-slider/src/helpers/getAttr.js ***!
437  \*********************************************************/
438/*! exports provided: getAttr */
439/***/ (function(module, __webpack_exports__, __webpack_require__) {
440
441"use strict";
442__webpack_require__.r(__webpack_exports__);
443/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttr", function() { return getAttr; });
444function getAttr(el, attr) {
445  return el.getAttribute(attr);
446}
447
448/***/ }),
449
vendor: 702 bytes, lines 450-473
450/***/ "./node_modules/tiny-slider/src/helpers/getBody.js":
451/*!*********************************************************!*\
452  !*** ./node_modules/tiny-slider/src/helpers/getBody.js ***!
453  \*********************************************************/
454/*! exports provided: getBody */
455/***/ (function(module, __webpack_exports__, __webpack_require__) {
456
457"use strict";
458__webpack_require__.r(__webpack_exports__);
459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBody", function() { return getBody; });
460function getBody () {
461  var doc = document,
462      body = doc.body;
463
464  if (!body) {
465    body = doc.createElement('body');
466    body.fake = true;
467  }
468
469  return body;
470}
471
472/***/ }),
473
vendor: 736 bytes, lines 474-490
474/***/ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js":
475/*!*******************************************************************!*\
476  !*** ./node_modules/tiny-slider/src/helpers/getCssRulesLength.js ***!
477  \*******************************************************************/
478/*! exports provided: getCssRulesLength */
479/***/ (function(module, __webpack_exports__, __webpack_require__) {
480
481"use strict";
482__webpack_require__.r(__webpack_exports__);
483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCssRulesLength", function() { return getCssRulesLength; });
484function getCssRulesLength(sheet) {
485  var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules;
486  return rule.length;
487}
488
489/***/ }),
490
vendor: 1,105 bytes, lines 491-518
491/***/ "./node_modules/tiny-slider/src/helpers/getEndProperty.js":
492/*!****************************************************************!*\
493  !*** ./node_modules/tiny-slider/src/helpers/getEndProperty.js ***!
494  \****************************************************************/
495/*! exports provided: getEndProperty */
496/***/ (function(module, __webpack_exports__, __webpack_require__) {
497
498"use strict";
499__webpack_require__.r(__webpack_exports__);
500/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEndProperty", function() { return getEndProperty; });
501// get transitionend, animationend based on transitionDuration
502// @propin: string
503// @propOut: string, first-letter uppercase
504// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd
505function getEndProperty(propIn, propOut) {
506  var endProp = false;
507  if (/^Webkit/.test(propIn)) {
508    endProp = 'webkit' + propOut + 'End';
509  } else if (/^O/.test(propIn)) {
510    endProp = 'o' + propOut + 'End';
511  } else if (propIn) {
512    endProp = propOut.toLowerCase() + 'end';
513  }
514  return endProp;
515}
516
517/***/ }),
518
vendor: 678 bytes, lines 519-537
519/***/ "./node_modules/tiny-slider/src/helpers/getSlideId.js":
520/*!************************************************************!*\
521  !*** ./node_modules/tiny-slider/src/helpers/getSlideId.js ***!
522  \************************************************************/
523/*! exports provided: getSlideId */
524/***/ (function(module, __webpack_exports__, __webpack_require__) {
525
526"use strict";
527__webpack_require__.r(__webpack_exports__);
528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSlideId", function() { return getSlideId; });
529function getSlideId() {
530  var id = window.tnsId;
531  window.tnsId = !id ? 1 : id + 1;
532  
533  return 'tns' + window.tnsId;
534}
535
536/***/ }),
537
vendor: 867 bytes, lines 538-562
538/***/ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js":
539/*!*******************************************************************!*\
540  !*** ./node_modules/tiny-slider/src/helpers/getTouchDirection.js ***!
541  \*******************************************************************/
542/*! exports provided: getTouchDirection */
543/***/ (function(module, __webpack_exports__, __webpack_require__) {
544
545"use strict";
546__webpack_require__.r(__webpack_exports__);
547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchDirection", function() { return getTouchDirection; });
548function getTouchDirection(angle, range) {
549  var direction = false,
550      gap = Math.abs(90 - Math.abs(angle));
551      
552  if (gap >= 90 - range) {
553    direction = 'horizontal';
554  } else if (gap <= range) {
555    direction = 'vertical';
556  }
557
558  return direction;
559}
560
561/***/ }),
562
vendor: 1,957 bytes, lines 563-606
563/***/ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js":
564/*!*****************************************************************!*\
565  !*** ./node_modules/tiny-slider/src/helpers/has3DTransforms.js ***!
566  \*****************************************************************/
567/*! exports provided: has3DTransforms */
568/***/ (function(module, __webpack_exports__, __webpack_require__) {
569
570"use strict";
571__webpack_require__.r(__webpack_exports__);
572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has3DTransforms", function() { return has3DTransforms; });
573/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
574/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
575/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
576
577
578
579
580function has3DTransforms(tf){
581  if (!tf) { return false; }
582  if (!window.getComputedStyle) { return false; }
583  
584  var doc = document,
585      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
586      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
587      el = doc.createElement('p'),
588      has3d,
589      cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : '';
590
591  cssTF += 'transform';
592
593  // Add it to the body to get the computed style
594  body.insertBefore(el, null);
595
596  el.style[tf] = 'translate3d(1px,1px,1px)';
597  has3d = window.getComputedStyle(el).getPropertyValue(cssTF);
598
599  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : el.remove();
600
601  return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
602}
603
604
605/***/ }),
606
vendor: 600 bytes, lines 607-622
607/***/ "./node_modules/tiny-slider/src/helpers/hasAttr.js":
608/*!*********************************************************!*\
609  !*** ./node_modules/tiny-slider/src/helpers/hasAttr.js ***!
610  \*********************************************************/
611/*! exports provided: hasAttr */
612/***/ (function(module, __webpack_exports__, __webpack_require__) {
613
614"use strict";
615__webpack_require__.r(__webpack_exports__);
616/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAttr", function() { return hasAttr; });
617function hasAttr(el, attr) {
618  return el.hasAttribute(attr);
619}
620
621/***/ }),
622
vendor: 1,162 bytes, lines 623-645
623/***/ "./node_modules/tiny-slider/src/helpers/hasClass.js":
624/*!**********************************************************!*\
625  !*** ./node_modules/tiny-slider/src/helpers/hasClass.js ***!
626  \**********************************************************/
627/*! exports provided: classListSupport, hasClass */
628/***/ (function(module, __webpack_exports__, __webpack_require__) {
629
630"use strict";
631__webpack_require__.r(__webpack_exports__);
632/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; });
633/* harmony import */ var _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classListSupport.js */ "./node_modules/tiny-slider/src/helpers/classListSupport.js");
634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"]; });
635
636
637
638var hasClass = _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
639    function (el, str) { return el.classList.contains(str); } :
640    function (el, str) { return el.className.indexOf(str) >= 0; };
641
642
643
644/***/ }),
645
vendor: 671 bytes, lines 646-661
646/***/ "./node_modules/tiny-slider/src/helpers/hideElement.js":
647/*!*************************************************************!*\
648  !*** ./node_modules/tiny-slider/src/helpers/hideElement.js ***!
649  \*************************************************************/
650/*! exports provided: hideElement */
651/***/ (function(module, __webpack_exports__, __webpack_require__) {
652
653"use strict";
654__webpack_require__.r(__webpack_exports__);
655/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideElement", function() { return hideElement; });
656function hideElement(el, forceHide) {
657  if (el.style.display !== 'none') { el.style.display = 'none'; }
658}
659
660/***/ }),
661
vendor: 673 bytes, lines 662-678
662/***/ "./node_modules/tiny-slider/src/helpers/isNodeList.js":
663/*!************************************************************!*\
664  !*** ./node_modules/tiny-slider/src/helpers/isNodeList.js ***!
665  \************************************************************/
666/*! exports provided: isNodeList */
667/***/ (function(module, __webpack_exports__, __webpack_require__) {
668
669"use strict";
670__webpack_require__.r(__webpack_exports__);
671/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeList", function() { return isNodeList; });
672function isNodeList(el) {
673  // Only NodeList has the "item()" function
674  return typeof el.item !== "undefined"; 
675}
676
677/***/ }),
678
vendor: 635 bytes, lines 679-694
679/***/ "./node_modules/tiny-slider/src/helpers/isVisible.js":
680/*!***********************************************************!*\
681  !*** ./node_modules/tiny-slider/src/helpers/isVisible.js ***!
682  \***********************************************************/
683/*! exports provided: isVisible */
684/***/ (function(module, __webpack_exports__, __webpack_require__) {
685
686"use strict";
687__webpack_require__.r(__webpack_exports__);
688/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
689function isVisible(el) {
690  return window.getComputedStyle(el).display !== 'none';
691}
692
693/***/ }),
694
vendor: 1,205 bytes, lines 695-727
695/***/ "./node_modules/tiny-slider/src/helpers/jsTransform.js":
696/*!*************************************************************!*\
697  !*** ./node_modules/tiny-slider/src/helpers/jsTransform.js ***!
698  \*************************************************************/
699/*! exports provided: jsTransform */
700/***/ (function(module, __webpack_exports__, __webpack_require__) {
701
702"use strict";
703__webpack_require__.r(__webpack_exports__);
704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsTransform", function() { return jsTransform; });
705function jsTransform(element, attr, prefix, postfix, to, duration, callback) {
706  var tick = Math.min(duration, 10),
707      unit = (to.indexOf('%') >= 0) ? '%' : 'px',
708      to = to.replace(unit, ''),
709      from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),
710      positionTick = (to - from) / duration * tick,
711      running;
712
713  setTimeout(moveElement, tick);
714  function moveElement() {
715    duration -= tick;
716    from += positionTick;
717    element.style[attr] = prefix + from + unit + postfix;
718    if (duration > 0) { 
719      setTimeout(moveElement, tick); 
720    } else {
721      callback();
722    }
723  }
724}
725
726/***/ }),
727
vendor: 2,114 bytes, lines 728-779
728/***/ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js":
729/*!*******************************************************************!*\
730  !*** ./node_modules/tiny-slider/src/helpers/mediaquerySupport.js ***!
731  \*******************************************************************/
732/*! exports provided: mediaquerySupport */
733/***/ (function(module, __webpack_exports__, __webpack_require__) {
734
735"use strict";
736__webpack_require__.r(__webpack_exports__);
737/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mediaquerySupport", function() { return mediaquerySupport; });
738/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
739/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
740/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
741
742
743
744
745function mediaquerySupport () {
746  if (window.matchMedia || window.msMatchMedia) {
747    return true;
748  }
749  
750  var doc = document,
751      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
752      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
753      div = doc.createElement('div'),
754      style = doc.createElement('style'),
755      rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',
756      position;
757
758  style.type = 'text/css';
759  div.className = 'tns-mq-test';
760
761  body.appendChild(style);
762  body.appendChild(div);
763
764  if (style.styleSheet) {
765    style.styleSheet.cssText = rule;
766  } else {
767    style.appendChild(doc.createTextNode(rule));
768  }
769
770  position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];
771
772  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
773
774  return position === "absolute";
775}
776
777
778/***/ }),
779
vendor: 943 bytes, lines 780-803
780/***/ "./node_modules/tiny-slider/src/helpers/passiveOption.js":
781/*!***************************************************************!*\
782  !*** ./node_modules/tiny-slider/src/helpers/passiveOption.js ***!
783  \***************************************************************/
784/*! exports provided: passiveOption */
785/***/ (function(module, __webpack_exports__, __webpack_require__) {
786
787"use strict";
788__webpack_require__.r(__webpack_exports__);
789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "passiveOption", function() { return passiveOption; });
790// Test via a getter in the options object to see if the passive property is accessed
791var supportsPassive = false;
792try {
793  var opts = Object.defineProperty({}, 'passive', {
794    get: function() {
795      supportsPassive = true;
796    }
797  });
798  window.addEventListener("test", null, opts);
799} catch (e) {}
800var passiveOption = supportsPassive ? { passive: true } : false;
801
802/***/ }),
803
vendor: 2,093 bytes, lines 804-854
804/***/ "./node_modules/tiny-slider/src/helpers/percentageLayout.js":
805/*!******************************************************************!*\
806  !*** ./node_modules/tiny-slider/src/helpers/percentageLayout.js ***!
807  \******************************************************************/
808/*! exports provided: percentageLayout */
809/***/ (function(module, __webpack_exports__, __webpack_require__) {
810
811"use strict";
812__webpack_require__.r(__webpack_exports__);
813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percentageLayout", function() { return percentageLayout; });
814/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
815/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
816/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
817// get subpixel support value
818// @return - boolean
819
820
821
822
823function percentageLayout() {
824  // check subpixel layout supporting
825  var doc = document,
826      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
827      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
828      wrapper = doc.createElement('div'),
829      outer = doc.createElement('div'),
830      str = '',
831      count = 70,
832      perPage = 3,
833      supported = false;
834
835  wrapper.className = "tns-t-subp2";
836  outer.className = "tns-t-ct";
837
838  for (var i = 0; i < count; i++) {
839    str += '<div></div>';
840  }
841
842  outer.innerHTML = str;
843  wrapper.appendChild(outer);
844  body.appendChild(wrapper);
845
846  supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;
847
848  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : wrapper.remove();
849
850  return supported;
851}
852
853/***/ }),
854
vendor: 719 bytes, lines 855-875
855/***/ "./node_modules/tiny-slider/src/helpers/raf.js":
856/*!*****************************************************!*\
857  !*** ./node_modules/tiny-slider/src/helpers/raf.js ***!
858  \*****************************************************/
859/*! exports provided: raf */
860/***/ (function(module, __webpack_exports__, __webpack_require__) {
861
862"use strict";
863__webpack_require__.r(__webpack_exports__);
864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "raf", function() { return raf; });
865var win = window;
866
867var raf = win.requestAnimationFrame
868  || win.webkitRequestAnimationFrame
869  || win.mozRequestAnimationFrame
870  || win.msRequestAnimationFrame
871  || function(cb) { return setTimeout(cb, 16); };
872
873
874/***/ }),
875
vendor: 1,105 bytes, lines 876-902
876/***/ "./node_modules/tiny-slider/src/helpers/removeAttrs.js":
877/*!*************************************************************!*\
878  !*** ./node_modules/tiny-slider/src/helpers/removeAttrs.js ***!
879  \*************************************************************/
880/*! exports provided: removeAttrs */
881/***/ (function(module, __webpack_exports__, __webpack_require__) {
882
883"use strict";
884__webpack_require__.r(__webpack_exports__);
885/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAttrs", function() { return removeAttrs; });
886/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
887
888
889function removeAttrs(els, attrs) {
890  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
891  attrs = (attrs instanceof Array) ? attrs : [attrs];
892
893  var attrLength = attrs.length;
894  for (var i = els.length; i--;) {
895    for (var j = attrLength; j--;) {
896      els[i].removeAttribute(attrs[j]);
897    }
898  }
899}
900
901/***/ }),
902
vendor: 933 bytes, lines 903-925
903/***/ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js":
904/*!***************************************************************!*\
905  !*** ./node_modules/tiny-slider/src/helpers/removeCSSRule.js ***!
906  \***************************************************************/
907/*! exports provided: removeCSSRule */
908/***/ (function(module, __webpack_exports__, __webpack_require__) {
909
910"use strict";
911__webpack_require__.r(__webpack_exports__);
912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCSSRule", function() { return removeCSSRule; });
913/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
914// cross browsers addRule method
915
916function removeCSSRule(sheet, index) {
917  // return raf(function() {
918    'deleteRule' in sheet ?
919      sheet.deleteRule(index) :
920      sheet.removeRule(index);
921  // });
922}
923
924/***/ }),
925
vendor: 1,125 bytes, lines 926-949
926/***/ "./node_modules/tiny-slider/src/helpers/removeClass.js":
927/*!*************************************************************!*\
928  !*** ./node_modules/tiny-slider/src/helpers/removeClass.js ***!
929  \*************************************************************/
930/*! exports provided: removeClass */
931/***/ (function(module, __webpack_exports__, __webpack_require__) {
932
933"use strict";
934__webpack_require__.r(__webpack_exports__);
935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; });
936/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
937
938var removeClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
939    function (el, str) {
940      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.remove(str); }
941    } :
942    function (el, str) {
943      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el, str)) { el.className = el.className.replace(str, ''); }
944    };
945
946
947
948/***/ }),
949
vendor: 1,011 bytes, lines 950-971
950/***/ "./node_modules/tiny-slider/src/helpers/removeEvents.js":
951/*!**************************************************************!*\
952  !*** ./node_modules/tiny-slider/src/helpers/removeEvents.js ***!
953  \**************************************************************/
954/*! exports provided: removeEvents */
955/***/ (function(module, __webpack_exports__, __webpack_require__) {
956
957"use strict";
958__webpack_require__.r(__webpack_exports__);
959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEvents", function() { return removeEvents; });
960/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
961
962
963function removeEvents(el, obj) {
964  for (var prop in obj) {
965    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
966    el.removeEventListener(prop, obj[prop], option);
967  }
968}
969
970/***/ }),
971
vendor: 1,108 bytes, lines 972-996
972/***/ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js":
973/*!***************************************************************!*\
974  !*** ./node_modules/tiny-slider/src/helpers/resetFakeBody.js ***!
975  \***************************************************************/
976/*! exports provided: resetFakeBody */
977/***/ (function(module, __webpack_exports__, __webpack_require__) {
978
979"use strict";
980__webpack_require__.r(__webpack_exports__);
981/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetFakeBody", function() { return resetFakeBody; });
982/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
983
984
985function resetFakeBody (body, docOverflow) {
986  if (body.fake) {
987    body.remove();
988    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = docOverflow;
989    // Trigger layout so kinetic scrolling isn't disabled in iOS6+
990    // eslint-disable-next-line
991    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].offsetHeight;
992  }
993}
994
995/***/ }),
996
vendor: 1,068 bytes, lines 997-1022
997/***/ "./node_modules/tiny-slider/src/helpers/setAttrs.js":
998/*!**********************************************************!*\
999  !*** ./node_modules/tiny-slider/src/helpers/setAttrs.js ***!
1000  \**********************************************************/
1001/*! exports provided: setAttrs */
1002/***/ (function(module, __webpack_exports__, __webpack_require__) {
1003
1004"use strict";
1005__webpack_require__.r(__webpack_exports__);
1006/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAttrs", function() { return setAttrs; });
1007/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
1008
1009
1010function setAttrs(els, attrs) {
1011  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
1012  if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; }
1013
1014  for (var i = els.length; i--;) {
1015    for(var key in attrs) {
1016      els[i].setAttribute(key, attrs[key]);
1017    }
1018  }
1019}
1020
1021/***/ }),
1022
vendor: 1,310 bytes, lines 1023-1051
1023/***/ "./node_modules/tiny-slider/src/helpers/setFakeBody.js":
1024/*!*************************************************************!*\
1025  !*** ./node_modules/tiny-slider/src/helpers/setFakeBody.js ***!
1026  \*************************************************************/
1027/*! exports provided: setFakeBody */
1028/***/ (function(module, __webpack_exports__, __webpack_require__) {
1029
1030"use strict";
1031__webpack_require__.r(__webpack_exports__);
1032/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFakeBody", function() { return setFakeBody; });
1033/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
1034
1035
1036function setFakeBody (body) {
1037  var docOverflow = '';
1038  if (body.fake) {
1039    docOverflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow;
1040    //avoid crashing IE8, if background image is used
1041    body.style.background = '';
1042    //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
1043    body.style.overflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = 'hidden';
1044    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].appendChild(body);
1045  }
1046
1047  return docOverflow;
1048}
1049
1050/***/ }),
1051
vendor: 741 bytes, lines 1052-1070
1052/***/ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js":
1053/*!*****************************************************************!*\
1054  !*** ./node_modules/tiny-slider/src/helpers/setLocalStorage.js ***!
1055  \*****************************************************************/
1056/*! exports provided: setLocalStorage */
1057/***/ (function(module, __webpack_exports__, __webpack_require__) {
1058
1059"use strict";
1060__webpack_require__.r(__webpack_exports__);
1061/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocalStorage", function() { return setLocalStorage; });
1062function setLocalStorage(storage, key, value, access) {
1063  if (access) {
1064    try { storage.setItem(key, value); } catch (e) {}
1065  }
1066  return value;
1067}
1068
1069/***/ }),
1070
vendor: 667 bytes, lines 1071-1086
1071/***/ "./node_modules/tiny-slider/src/helpers/showElement.js":
1072/*!*************************************************************!*\
1073  !*** ./node_modules/tiny-slider/src/helpers/showElement.js ***!
1074  \*************************************************************/
1075/*! exports provided: showElement */
1076/***/ (function(module, __webpack_exports__, __webpack_require__) {
1077
1078"use strict";
1079__webpack_require__.r(__webpack_exports__);
1080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showElement", function() { return showElement; });
1081function showElement(el, forceHide) {
1082  if (el.style.display === 'none') { el.style.display = ''; }
1083}
1084
1085/***/ }),
1086
vendor: 618 bytes, lines 1087-1102
1087/***/ "./node_modules/tiny-slider/src/helpers/toDegree.js":
1088/*!**********************************************************!*\
1089  !*** ./node_modules/tiny-slider/src/helpers/toDegree.js ***!
1090  \**********************************************************/
1091/*! exports provided: toDegree */
1092/***/ (function(module, __webpack_exports__, __webpack_require__) {
1093
1094"use strict";
1095__webpack_require__.r(__webpack_exports__);
1096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return toDegree; });
1097function toDegree (y, x) {
1098  return Math.atan2(y, x) * (180 / Math.PI);
1099}
1100
1101/***/ }),
1102
vendor: 1,200 bytes, lines 1103-1140
1103/***/ "./node_modules/tiny-slider/src/helpers/whichProperty.js":
1104/*!***************************************************************!*\
1105  !*** ./node_modules/tiny-slider/src/helpers/whichProperty.js ***!
1106  \***************************************************************/
1107/*! exports provided: whichProperty */
1108/***/ (function(module, __webpack_exports__, __webpack_require__) {
1109
1110"use strict";
1111__webpack_require__.r(__webpack_exports__);
1112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whichProperty", function() { return whichProperty; });
1113function whichProperty(props){
1114  if (typeof props === 'string') {
1115    var arr = [props],
1116        Props = props.charAt(0).toUpperCase() + props.substr(1),
1117        prefixes = ['Webkit', 'Moz', 'ms', 'O'];
1118        
1119    prefixes.forEach(function(prefix) {
1120      if (prefix !== 'ms' || props === 'transform') {
1121        arr.push(prefix + Props);
1122      }
1123    });
1124
1125    props = arr;
1126  }
1127
1128  var el = document.createElement('fakeelement'),
1129      len = props.length;
1130  for(var i = 0; i < props.length; i++){
1131    var prop = props[i];
1132    if( el.style[prop] !== undefined ){ return prop; }
1133  }
1134
1135  return false; // explicit for ie9-
1136}
1137
1138
1139/***/ }),
1140
vendor: 109,421 bytes, lines 1141-3954
1141/***/ "./node_modules/tiny-slider/src/tiny-slider.js":
1142/*!*****************************************************!*\
1143  !*** ./node_modules/tiny-slider/src/tiny-slider.js ***!
1144  \*****************************************************/
1145/*! exports provided: tns */
1146/***/ (function(module, __webpack_exports__, __webpack_require__) {
1147
1148"use strict";
1149__webpack_require__.r(__webpack_exports__);
1150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return tns; });
1151/* harmony import */ var _helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
1152/* harmony import */ var _helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/caf.js */ "./node_modules/tiny-slider/src/helpers/caf.js");
1153/* harmony import */ var _helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers/extend.js */ "./node_modules/tiny-slider/src/helpers/extend.js");
1154/* harmony import */ var _helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers/checkStorageValue.js */ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js");
1155/* harmony import */ var _helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers/setLocalStorage.js */ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js");
1156/* harmony import */ var _helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/getSlideId.js */ "./node_modules/tiny-slider/src/helpers/getSlideId.js");
1157/* harmony import */ var _helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers/calc.js */ "./node_modules/tiny-slider/src/helpers/calc.js");
1158/* harmony import */ var _helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers/percentageLayout.js */ "./node_modules/tiny-slider/src/helpers/percentageLayout.js");
1159/* harmony import */ var _helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers/mediaquerySupport.js */ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js");
1160/* harmony import */ var _helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/createStyleSheet.js */ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js");
1161/* harmony import */ var _helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/addCSSRule.js */ "./node_modules/tiny-slider/src/helpers/addCSSRule.js");
1162/* harmony import */ var _helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/removeCSSRule.js */ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js");
1163/* harmony import */ var _helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/getCssRulesLength.js */ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js");
1164/* harmony import */ var _helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./helpers/toDegree.js */ "./node_modules/tiny-slider/src/helpers/toDegree.js");
1165/* harmony import */ var _helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/getTouchDirection.js */ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js");
1166/* harmony import */ var _helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/forEach.js */ "./node_modules/tiny-slider/src/helpers/forEach.js");
1167/* harmony import */ var _helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
1168/* harmony import */ var _helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./helpers/addClass.js */ "./node_modules/tiny-slider/src/helpers/addClass.js");
1169/* harmony import */ var _helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./helpers/removeClass.js */ "./node_modules/tiny-slider/src/helpers/removeClass.js");
1170/* harmony import */ var _helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./helpers/hasAttr.js */ "./node_modules/tiny-slider/src/helpers/hasAttr.js");
1171/* harmony import */ var _helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./helpers/getAttr.js */ "./node_modules/tiny-slider/src/helpers/getAttr.js");
1172/* harmony import */ var _helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./helpers/setAttrs.js */ "./node_modules/tiny-slider/src/helpers/setAttrs.js");
1173/* harmony import */ var _helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./helpers/removeAttrs.js */ "./node_modules/tiny-slider/src/helpers/removeAttrs.js");
1174/* harmony import */ var _helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./helpers/arrayFromNodeList.js */ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js");
1175/* harmony import */ var _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./helpers/hideElement.js */ "./node_modules/tiny-slider/src/helpers/hideElement.js");
1176/* harmony import */ var _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./helpers/showElement.js */ "./node_modules/tiny-slider/src/helpers/showElement.js");
1177/* harmony import */ var _helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./helpers/isVisible.js */ "./node_modules/tiny-slider/src/helpers/isVisible.js");
1178/* harmony import */ var _helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./helpers/whichProperty.js */ "./node_modules/tiny-slider/src/helpers/whichProperty.js");
1179/* harmony import */ var _helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./helpers/has3DTransforms.js */ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js");
1180/* harmony import */ var _helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./helpers/getEndProperty.js */ "./node_modules/tiny-slider/src/helpers/getEndProperty.js");
1181/* harmony import */ var _helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./helpers/addEvents.js */ "./node_modules/tiny-slider/src/helpers/addEvents.js");
1182/* harmony import */ var _helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./helpers/removeEvents.js */ "./node_modules/tiny-slider/src/helpers/removeEvents.js");
1183/* harmony import */ var _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./helpers/events.js */ "./node_modules/tiny-slider/src/helpers/events.js");
1184/* harmony import */ var _helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./helpers/jsTransform.js */ "./node_modules/tiny-slider/src/helpers/jsTransform.js");
1185// Object.keys
1186if (!Object.keys) {
1187  Object.keys = function(object) {
1188    var keys = [];
1189    for (var name in object) {
1190      if (Object.prototype.hasOwnProperty.call(object, name)) {
1191        keys.push(name);
1192      }
1193    }
1194    return keys;
1195  };
1196}
1197
1198// ChildNode.remove
1199if(!("remove" in Element.prototype)){
1200  Element.prototype.remove = function(){
1201    if(this.parentNode) {
1202      this.parentNode.removeChild(this);
1203    }
1204  };
1205}
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242var tns = function(options) {
1243  options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])({
1244    container: '.slider',
1245    mode: 'carousel',
1246    axis: 'horizontal',
1247    items: 1,
1248    gutter: 0,
1249    edgePadding: 0,
1250    fixedWidth: false,
1251    autoWidth: false,
1252    viewportMax: false,
1253    slideBy: 1,
1254    center: false,
1255    controls: true,
1256    controlsPosition: 'top',
1257    controlsText: ['prev', 'next'],
1258    controlsContainer: false,
1259    prevButton: false,
1260    nextButton: false,
1261    nav: true,
1262    navPosition: 'top',
1263    navContainer: false,
1264    navAsThumbnails: false,
1265    arrowKeys: false,
1266    speed: 300,
1267    autoplay: false,
1268    autoplayPosition: 'top',
1269    autoplayTimeout: 5000,
1270    autoplayDirection: 'forward',
1271    autoplayText: ['start', 'stop'],
1272    autoplayHoverPause: false,
1273    autoplayButton: false,
1274    autoplayButtonOutput: true,
1275    autoplayResetOnVisibility: true,
1276    animateIn: 'tns-fadeIn',
1277    animateOut: 'tns-fadeOut',
1278    animateNormal: 'tns-normal',
1279    animateDelay: false,
1280    loop: true,
1281    rewind: false,
1282    autoHeight: false,
1283    responsive: false,
1284    lazyload: false,
1285    lazyloadSelector: '.tns-lazy-img',
1286    touch: true,
1287    mouseDrag: false,
1288    swipeAngle: 15,
1289    nested: false,
1290    preventActionWhenRunning: false,
1291    preventScrollOnTouch: false,
1292    freezable: true,
1293    onInit: false,
1294    useLocalStorage: true,
1295    nonce: false
1296  }, options || {});
1297
1298  var doc = document,
1299      win = window,
1300      KEYS = {
1301        ENTER: 13,
1302        SPACE: 32,
1303        LEFT: 37,
1304        RIGHT: 39
1305      },
1306      tnsStorage = {},
1307      localStorageAccess = options.useLocalStorage;
1308
1309  if (localStorageAccess) {
1310    // check browser version and local storage access
1311    var browserInfo = navigator.userAgent;
1312    var uid = new Date;
1313
1314    try {
1315      tnsStorage = win.localStorage;
1316      if (tnsStorage) {
1317        tnsStorage.setItem(uid, uid);
1318        localStorageAccess = tnsStorage.getItem(uid) == uid;
1319        tnsStorage.removeItem(uid);
1320      } else {
1321        localStorageAccess = false;
1322      }
1323      if (!localStorageAccess) { tnsStorage = {}; }
1324    } catch(e) {
1325      localStorageAccess = false;
1326    }
1327
1328    if (localStorageAccess) {
1329      // remove storage when browser version changes
1330      if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) {
1331        ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); });
1332      }
1333      // update browserInfo
1334      localStorage['tnsApp'] = browserInfo;
1335    }
1336  }
1337
1338  var CALC = tnsStorage['tC'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tC']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tC', Object(_helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__["calc"])(), localStorageAccess),
1339      PERCENTAGELAYOUT = tnsStorage['tPL'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tPL']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tPL', Object(_helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__["percentageLayout"])(), localStorageAccess),
1340      CSSMQ = tnsStorage['tMQ'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tMQ']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tMQ', Object(_helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__["mediaquerySupport"])(), localStorageAccess),
1341      TRANSFORM = tnsStorage['tTf'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTf']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTf', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transform'), localStorageAccess),
1342      HAS3DTRANSFORMS = tnsStorage['t3D'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['t3D']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 't3D', Object(_helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__["has3DTransforms"])(TRANSFORM), localStorageAccess),
1343      TRANSITIONDURATION = tnsStorage['tTDu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDuration'), localStorageAccess),
1344      TRANSITIONDELAY = tnsStorage['tTDe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDelay'), localStorageAccess),
1345      ANIMATIONDURATION = tnsStorage['tADu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDuration'), localStorageAccess),
1346      ANIMATIONDELAY = tnsStorage['tADe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDelay'), localStorageAccess),
1347      TRANSITIONEND = tnsStorage['tTE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(TRANSITIONDURATION, 'Transition'), localStorageAccess),
1348      ANIMATIONEND = tnsStorage['tAE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tAE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tAE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(ANIMATIONDURATION, 'Animation'), localStorageAccess);
1349
1350  // get element nodes from selectors
1351  var supportConsoleWarn = win.console && typeof win.console.warn === "function",
1352      tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'],
1353      optionsElements = {};
1354
1355  tnsList.forEach(function(item) {
1356    if (typeof options[item] === 'string') {
1357      var str = options[item],
1358          el = doc.querySelector(str);
1359      optionsElements[item] = str;
1360
1361      if (el && el.nodeName) {
1362        options[item] = el;
1363      } else {
1364        if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); }
1365        return;
1366      }
1367    }
1368  });
1369
1370  // make sure at least 1 slide
1371  if (options.container.children.length < 1) {
1372    if (supportConsoleWarn) { console.warn('No slides found in', options.container); }
1373    return;
1374   }
1375
1376  // update options
1377  var responsive = options.responsive,
1378      nested = options.nested,
1379      carousel = options.mode === 'carousel' ? true : false;
1380
1381  if (responsive) {
1382    // apply responsive[0] to options and remove it
1383    if (0 in responsive) {
1384      options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, responsive[0]);
1385      delete responsive[0];
1386    }
1387
1388    var responsiveTem = {};
1389    for (var key in responsive) {
1390      var val = responsive[key];
1391      // update responsive
1392      // from: 300: 2
1393      // to:
1394      //   300: {
1395      //     items: 2
1396      //   }
1397      val = typeof val === 'number' ? {items: val} : val;
1398      responsiveTem[key] = val;
1399    }
1400    responsive = responsiveTem;
1401    responsiveTem = null;
1402  }
1403
1404  // update options
1405  function updateOptions (obj) {
1406    for (var key in obj) {
1407      if (!carousel) {
1408        if (key === 'slideBy') { obj[key] = 'page'; }
1409        if (key === 'edgePadding') { obj[key] = false; }
1410        if (key === 'autoHeight') { obj[key] = false; }
1411      }
1412
1413      // update responsive options
1414      if (key === 'responsive') { updateOptions(obj[key]); }
1415    }
1416  }
1417  if (!carousel) { updateOptions(options); }
1418
1419
1420  // === define and set variables ===
1421  if (!carousel) {
1422    options.axis = 'horizontal';
1423    options.slideBy = 'page';
1424    options.edgePadding = false;
1425
1426    var animateIn = options.animateIn,
1427        animateOut = options.animateOut,
1428        animateDelay = options.animateDelay,
1429        animateNormal = options.animateNormal;
1430  }
1431
1432  var horizontal = options.axis === 'horizontal' ? true : false,
1433      outerWrapper = doc.createElement('div'),
1434      innerWrapper = doc.createElement('div'),
1435      middleWrapper,
1436      container = options.container,
1437      containerParent = container.parentNode,
1438      containerHTML = container.outerHTML,
1439      slideItems = container.children,
1440      slideCount = slideItems.length,
1441      breakpointZone,
1442      windowWidth = getWindowWidth(),
1443      isOn = false;
1444  if (responsive) { setBreakpointZone(); }
1445  if (carousel) { container.className += ' tns-vpfix'; }
1446
1447  // fixedWidth: viewport > rightBoundary > indexMax
1448  var autoWidth = options.autoWidth,
1449      fixedWidth = getOption('fixedWidth'),
1450      edgePadding = getOption('edgePadding'),
1451      gutter = getOption('gutter'),
1452      viewport = getViewportWidth(),
1453      center = getOption('center'),
1454      items = !autoWidth ? Math.floor(getOption('items')) : 1,
1455      slideBy = getOption('slideBy'),
1456      viewportMax = options.viewportMax || options.fixedWidthViewportWidth,
1457      arrowKeys = getOption('arrowKeys'),
1458      speed = getOption('speed'),
1459      rewind = options.rewind,
1460      loop = rewind ? false : options.loop,
1461      autoHeight = getOption('autoHeight'),
1462      controls = getOption('controls'),
1463      controlsText = getOption('controlsText'),
1464      nav = getOption('nav'),
1465      touch = getOption('touch'),
1466      mouseDrag = getOption('mouseDrag'),
1467      autoplay = getOption('autoplay'),
1468      autoplayTimeout = getOption('autoplayTimeout'),
1469      autoplayText = getOption('autoplayText'),
1470      autoplayHoverPause = getOption('autoplayHoverPause'),
1471      autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'),
1472      sheet = Object(_helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__["createStyleSheet"])(null, getOption('nonce')),
1473      lazyload = options.lazyload,
1474      lazyloadSelector = options.lazyloadSelector,
1475      slidePositions, // collection of slide positions
1476      slideItemsOut = [],
1477      cloneCount = loop ? getCloneCountForLoop() : 0,
1478      slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2,
1479      hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false,
1480      rightBoundary = fixedWidth ? getRightBoundary() : null,
1481      updateIndexBeforeTransform = (!carousel || !loop) ? true : false,
1482      // transform
1483      transformAttr = horizontal ? 'left' : 'top',
1484      transformPrefix = '',
1485      transformPostfix = '',
1486      // index
1487      getIndexMax = (function () {
1488        if (fixedWidth) {
1489          return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); };
1490        } else if (autoWidth) {
1491          return function() {
1492            for (var i = 0; i < slideCountNew; i++) {
1493              if (slidePositions[i] >= - rightBoundary) { return i; }
1494            }
1495          };
1496        } else {
1497          return function() {
1498            if (center && carousel && !loop) {
1499              return slideCount - 1;
1500            } else {
1501              return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1;
1502            }
1503          };
1504        }
1505      })(),
1506      index = getStartIndex(getOption('startIndex')),
1507      indexCached = index,
1508      displayIndex = getCurrentSlide(),
1509      indexMin = 0,
1510      indexMax = !autoWidth ? getIndexMax() : null,
1511      // resize
1512      resizeTimer,
1513      preventActionWhenRunning = options.preventActionWhenRunning,
1514      swipeAngle = options.swipeAngle,
1515      moveDirectionExpected = swipeAngle ? '?' : true,
1516      running = false,
1517      onInit = options.onInit,
1518      events = new _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__["Events"](),
1519      // id, class
1520      newContainerClasses = ' tns-slider tns-' + options.mode,
1521      slideId = container.id || Object(_helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__["getSlideId"])(),
1522      disable = getOption('disable'),
1523      disabled = false,
1524      freezable = options.freezable,
1525      freeze = freezable && !autoWidth ? getFreeze() : false,
1526      frozen = false,
1527      controlsEvents = {
1528        'click': onControlsClick,
1529        'keydown': onControlsKeydown
1530      },
1531      navEvents = {
1532        'click': onNavClick,
1533        'keydown': onNavKeydown
1534      },
1535      hoverEvents = {
1536        'mouseover': mouseoverPause,
1537        'mouseout': mouseoutRestart
1538      },
1539      visibilityEvent = {'visibilitychange': onVisibilityChange},
1540      docmentKeydownEvent = {'keydown': onDocumentKeydown},
1541      touchEvents = {
1542        'touchstart': onPanStart,
1543        'touchmove': onPanMove,
1544        'touchend': onPanEnd,
1545        'touchcancel': onPanEnd
1546      }, dragEvents = {
1547        'mousedown': onPanStart,
1548        'mousemove': onPanMove,
1549        'mouseup': onPanEnd,
1550        'mouseleave': onPanEnd
1551      },
1552      hasControls = hasOption('controls'),
1553      hasNav = hasOption('nav'),
1554      navAsThumbnails = autoWidth ? true : options.navAsThumbnails,
1555      hasAutoplay = hasOption('autoplay'),
1556      hasTouch = hasOption('touch'),
1557      hasMouseDrag = hasOption('mouseDrag'),
1558      slideActiveClass = 'tns-slide-active',
1559      slideClonedClass = 'tns-slide-cloned',
1560      imgCompleteClass = 'tns-complete',
1561      imgEvents = {
1562        'load': onImgLoaded,
1563        'error': onImgFailed
1564      },
1565      imgsComplete,
1566      liveregionCurrent,
1567      preventScroll = options.preventScrollOnTouch === 'force' ? true : false;
1568
1569  // controls
1570  if (hasControls) {
1571    var controlsContainer = options.controlsContainer,
1572        controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '',
1573        prevButton = options.prevButton,
1574        nextButton = options.nextButton,
1575        prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '',
1576        nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '',
1577        prevIsButton,
1578        nextIsButton;
1579  }
1580
1581  // nav
1582  if (hasNav) {
1583    var navContainer = options.navContainer,
1584        navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '',
1585        navItems,
1586        pages = autoWidth ? slideCount : getPages(),
1587        pagesCached = 0,
1588        navClicked = -1,
1589        navCurrentIndex = getCurrentNavIndex(),
1590        navCurrentIndexCached = navCurrentIndex,
1591        navActiveClass = 'tns-nav-active',
1592        navStr = 'Carousel Page ',
1593        navStrCurrent = ' (Current Slide)';
1594  }
1595
1596  // autoplay
1597  if (hasAutoplay) {
1598    var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1,
1599        autoplayButton = options.autoplayButton,
1600        autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '',
1601        autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'],
1602        autoplayTimer,
1603        animating,
1604        autoplayHoverPaused,
1605        autoplayUserPaused,
1606        autoplayVisibilityPaused;
1607  }
1608
1609  if (hasTouch || hasMouseDrag) {
1610    var initPosition = {},
1611        lastPosition = {},
1612        translateInit,
1613        disX,
1614        disY,
1615        panStart = false,
1616        rafIndex,
1617        getDist = horizontal ?
1618          function(a, b) { return a.x - b.x; } :
1619          function(a, b) { return a.y - b.y; };
1620  }
1621
1622  // disable slider when slidecount <= items
1623  if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); }
1624
1625  if (TRANSFORM) {
1626    transformAttr = TRANSFORM;
1627    transformPrefix = 'translate';
1628
1629    if (HAS3DTRANSFORMS) {
1630      transformPrefix += horizontal ? '3d(' : '3d(0px, ';
1631      transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)';
1632    } else {
1633      transformPrefix += horizontal ? 'X(' : 'Y(';
1634      transformPostfix = ')';
1635    }
1636
1637  }
1638
1639  if (carousel) { container.className = container.className.replace('tns-vpfix', ''); }
1640  initStructure();
1641  initSheet();
1642  initSliderTransform();
1643
1644  // === COMMON FUNCTIONS === //
1645  function resetVariblesWhenDisable (condition) {
1646    if (condition) {
1647      controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;
1648    }
1649  }
1650
1651  function getCurrentSlide () {
1652    var tem = carousel ? index - cloneCount : index;
1653    while (tem < 0) { tem += slideCount; }
1654    return tem%slideCount + 1;
1655  }
1656
1657  function getStartIndex (ind) {
1658    ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0;
1659    return carousel ? ind + cloneCount : ind;
1660  }
1661
1662  function getAbsIndex (i) {
1663    if (i == null) { i = index; }
1664
1665    if (carousel) { i -= cloneCount; }
1666    while (i < 0) { i += slideCount; }
1667
1668    return Math.floor(i%slideCount);
1669  }
1670
1671  function getCurrentNavIndex () {
1672    var absIndex = getAbsIndex(),
1673        result;
1674
1675    result = navAsThumbnails ? absIndex :
1676      fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) :
1677          Math.floor(absIndex / items);
1678
1679    // set active nav to the last one when reaches the right edge
1680    if (!loop && carousel && index === indexMax) { result = pages - 1; }
1681
1682    return result;
1683  }
1684
1685  function getItemsMax () {
1686    // fixedWidth or autoWidth while viewportMax is not available
1687    if (autoWidth || (fixedWidth && !viewportMax)) {
1688      return slideCount - 1;
1689    // most cases
1690    } else {
1691      var str = fixedWidth ? 'fixedWidth' : 'items',
1692          arr = [];
1693
1694      if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); }
1695
1696      if (responsive) {
1697        for (var bp in responsive) {
1698          var tem = responsive[bp][str];
1699          if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); }
1700        }
1701      }
1702
1703      if (!arr.length) { arr.push(0); }
1704
1705      return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr));
1706    }
1707  }
1708
1709  function getCloneCountForLoop () {
1710    var itemsMax = getItemsMax(),
1711        result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount);
1712    result = Math.max(itemsMax, result);
1713
1714    return hasOption('edgePadding') ? result + 1 : result;
1715  }
1716
1717  function getWindowWidth () {
1718    return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
1719  }
1720
1721  function getInsertPosition (pos) {
1722    return pos === 'top' ? 'afterbegin' : 'beforeend';
1723  }
1724
1725  function getClientWidth (el) {
1726    if (el == null) { return; }
1727    var div = doc.createElement('div'), rect, width;
1728    el.appendChild(div);
1729    rect = div.getBoundingClientRect();
1730    width = rect.right - rect.left;
1731    div.remove();
1732    return width || getClientWidth(el.parentNode);
1733  }
1734
1735  function getViewportWidth () {
1736    var gap = edgePadding ? edgePadding * 2 - gutter : 0;
1737    return getClientWidth(containerParent) - gap;
1738  }
1739
1740  function hasOption (item) {
1741    if (options[item]) {
1742      return true;
1743    } else {
1744      if (responsive) {
1745        for (var bp in responsive) {
1746          if (responsive[bp][item]) { return true; }
1747        }
1748      }
1749      return false;
1750    }
1751  }
1752
1753  // get option:
1754  // fixed width: viewport, fixedWidth, gutter => items
1755  // others: window width => all variables
1756  // all: items => slideBy
1757  function getOption (item, ww) {
1758    if (ww == null) { ww = windowWidth; }
1759
1760    if (item === 'items' && fixedWidth) {
1761      return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1;
1762
1763    } else {
1764      var result = options[item];
1765
1766      if (responsive) {
1767        for (var bp in responsive) {
1768          // bp: convert string to number
1769          if (ww >= parseInt(bp)) {
1770            if (item in responsive[bp]) { result = responsive[bp][item]; }
1771          }
1772        }
1773      }
1774
1775      if (item === 'slideBy' && result === 'page') { result = getOption('items'); }
1776      if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); }
1777
1778      return result;
1779    }
1780  }
1781
1782  function getSlideMarginLeft (i) {
1783    return CALC ?
1784      CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' :
1785      i * 100 / slideCountNew + '%';
1786  }
1787
1788  function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) {
1789    var str = '';
1790
1791    if (edgePaddingTem !== undefined) {
1792      var gap = edgePaddingTem;
1793      if (gutterTem) { gap -= gutterTem; }
1794      str = horizontal ?
1795        'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' :
1796        'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;';
1797    } else if (gutterTem && !fixedWidthTem) {
1798      var gutterTemUnit = '-' + gutterTem + 'px',
1799          dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0';
1800      str = 'margin: 0 ' + dir + ';'
1801    }
1802
1803    if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); }
1804    return str;
1805  }
1806
1807  function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) {
1808    if (fixedWidthTem) {
1809      return (fixedWidthTem + gutterTem) * slideCountNew + 'px';
1810    } else {
1811      return CALC ?
1812        CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' :
1813        slideCountNew * 100 / itemsTem + '%';
1814    }
1815  }
1816
1817  function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) {
1818    var width;
1819
1820    if (fixedWidthTem) {
1821      width = (fixedWidthTem + gutterTem) + 'px';
1822    } else {
1823      if (!carousel) { itemsTem = Math.floor(itemsTem); }
1824      var dividend = carousel ? slideCountNew : itemsTem;
1825      width = CALC ?
1826        CALC + '(100% / ' + dividend + ')' :
1827        100 / dividend + '%';
1828    }
1829
1830    width = 'width:' + width;
1831
1832    // inner slider: overwrite outer slider styles
1833    return nested !== 'inner' ? width + ';' : width + ' !important;';
1834  }
1835
1836  function getSlideGutterStyle (gutterTem) {
1837    var str = '';
1838
1839    // gutter maybe interger || 0
1840    // so can't use 'if (gutter)'
1841    if (gutterTem !== false) {
1842      var prop = horizontal ? 'padding-' : 'margin-',
1843          dir = horizontal ? 'right' : 'bottom';
1844      str = prop +  dir + ': ' + gutterTem + 'px;';
1845    }
1846
1847    return str;
1848  }
1849
1850  function getCSSPrefix (name, num) {
1851    var prefix = name.substring(0, name.length - num).toLowerCase();
1852    if (prefix) { prefix = '-' + prefix + '-'; }
1853
1854    return prefix;
1855  }
1856
1857  function getTransitionDurationStyle (speed) {
1858    return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;';
1859  }
1860
1861  function getAnimationDurationStyle (speed) {
1862    return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;';
1863  }
1864
1865  function initStructure () {
1866    var classOuter = 'tns-outer',
1867        classInner = 'tns-inner',
1868        hasGutter = hasOption('gutter');
1869
1870    outerWrapper.className = classOuter;
1871    innerWrapper.className = classInner;
1872    outerWrapper.id = slideId + '-ow';
1873    innerWrapper.id = slideId + '-iw';
1874
1875    // set container properties
1876    if (container.id === '') { container.id = slideId; }
1877    newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel';
1878    newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc';
1879    if (autoWidth) { newContainerClasses += ' tns-autowidth'; }
1880    newContainerClasses += ' tns-' + options.axis;
1881    container.className += newContainerClasses;
1882
1883    // add constrain layer for carousel
1884    if (carousel) {
1885      middleWrapper = doc.createElement('div');
1886      middleWrapper.id = slideId + '-mw';
1887      middleWrapper.className = 'tns-ovh';
1888
1889      outerWrapper.appendChild(middleWrapper);
1890      middleWrapper.appendChild(innerWrapper);
1891    } else {
1892      outerWrapper.appendChild(innerWrapper);
1893    }
1894
1895    if (autoHeight) {
1896      var wp = middleWrapper ? middleWrapper : innerWrapper;
1897      wp.className += ' tns-ah';
1898    }
1899
1900    containerParent.insertBefore(outerWrapper, container);
1901    innerWrapper.appendChild(container);
1902
1903    // add id, class, aria attributes
1904    // before clone slides
1905    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
1906      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-item');
1907      if (!item.id) { item.id = slideId + '-item' + i; }
1908      if (!carousel && animateNormal) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal); }
1909      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
1910        'aria-hidden': 'true',
1911        'tabindex': '-1'
1912      });
1913    });
1914
1915    // ## clone slides
1916    // carousel: n + slides + n
1917    // gallery:      slides + n
1918    if (cloneCount) {
1919      var fragmentBefore = doc.createDocumentFragment(),
1920          fragmentAfter = doc.createDocumentFragment();
1921
1922      for (var j = cloneCount; j--;) {
1923        var num = j%slideCount,
1924            cloneFirst = slideItems[num].cloneNode(true);
1925        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneFirst, slideClonedClass);
1926        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneFirst, 'id');
1927        fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild);
1928
1929        if (carousel) {
1930          var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true);
1931          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneLast, slideClonedClass);
1932          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneLast, 'id');
1933          fragmentBefore.appendChild(cloneLast);
1934        }
1935      }
1936
1937      container.insertBefore(fragmentBefore, container.firstChild);
1938      container.appendChild(fragmentAfter);
1939      slideItems = container.children;
1940    }
1941
1942  }
1943
1944  function initSliderTransform () {
1945    // ## images loaded/failed
1946    if (hasOption('autoHeight') || autoWidth || !horizontal) {
1947      var imgs = container.querySelectorAll('img');
1948
1949      // add img load event listener
1950      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(imgs, function(img) {
1951        var src = img.src;
1952
1953        if (!lazyload) {
1954          // not data img
1955          if (src && src.indexOf('data:image') < 0) {
1956            img.src = '';
1957            Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
1958            Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
1959
1960            img.src = src;
1961          // data img
1962          } else {
1963            imgLoaded(img);
1964          }
1965        }
1966      });
1967
1968      // set imgsComplete
1969      Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), function() { imgsComplete = true; }); });
1970
1971      // reset imgs for auto height: check visible imgs only
1972      if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); }
1973
1974      lazyload ? initSliderTransformStyleCheck() : Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), initSliderTransformStyleCheck); });
1975
1976    } else {
1977      // set container transform property
1978      if (carousel) { doContainerTransformSilent(); }
1979
1980      // update slider tools and events
1981      initTools();
1982      initEvents();
1983    }
1984  }
1985
1986  function initSliderTransformStyleCheck () {
1987    if (autoWidth && slideCount > 1) {
1988      // check styles application
1989      var num = loop ? index : slideCount - 1;
1990
1991      (function stylesApplicationCheck() {
1992        var left = slideItems[num].getBoundingClientRect().left;
1993        var right = slideItems[num - 1].getBoundingClientRect().right;
1994
1995        (Math.abs(left - right) <= 1) ?
1996          initSliderTransformCore() :
1997          setTimeout(function(){ stylesApplicationCheck() }, 16);
1998      })();
1999
2000    } else {
2001      initSliderTransformCore();
2002    }
2003  }
2004
2005
2006  function initSliderTransformCore () {
2007    // run Fn()s which are rely on image loading
2008    if (!horizontal || autoWidth) {
2009      setSlidePositions();
2010
2011      if (autoWidth) {
2012        rightBoundary = getRightBoundary();
2013        if (freezable) { freeze = getFreeze(); }
2014        indexMax = getIndexMax(); // <= slidePositions, rightBoundary <=
2015        resetVariblesWhenDisable(disable || freeze);
2016      } else {
2017        updateContentWrapperHeight();
2018      }
2019    }
2020
2021    // set container transform property
2022    if (carousel) { doContainerTransformSilent(); }
2023
2024    // update slider tools and events
2025    initTools();
2026    initEvents();
2027  }
2028
2029  function initSheet () {
2030    // gallery:
2031    // set animation classes and left value for gallery slider
2032    if (!carousel) {
2033      for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) {
2034        var item = slideItems[i];
2035        item.style.left = (i - index) * 100 / items + '%';
2036        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
2037        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
2038      }
2039    }
2040
2041    // #### LAYOUT
2042
2043    // ## INLINE-BLOCK VS FLOAT
2044
2045    // ## PercentageLayout:
2046    // slides: inline-block
2047    // remove blank space between slides by set font-size: 0
2048
2049    // ## Non PercentageLayout:
2050    // slides: float
2051    //         margin-right: -100%
2052    //         margin-left: ~
2053
2054    // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing
2055    if (horizontal) {
2056      if (PERCENTAGELAYOUT || autoWidth) {
2057        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2058        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, 'font-size:0;', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2059      } else if (carousel) {
2060        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function (slide, i) {
2061          slide.style.marginLeft = getSlideMarginLeft(i);
2062        });
2063      }
2064    }
2065
2066
2067    // ## BASIC STYLES
2068    if (CSSMQ) {
2069      // middle wrapper style
2070      if (TRANSITIONDURATION) {
2071        var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : '';
2072        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-mw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2073      }
2074
2075      // inner wrapper styles
2076      str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight);
2077      Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-iw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2078
2079      // container styles
2080      if (carousel) {
2081        str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : '';
2082        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
2083        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2084      }
2085
2086      // slide styles
2087      str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : '';
2088      if (options.gutter) { str += getSlideGutterStyle(options.gutter); }
2089      // set gallery items transition-duration
2090      if (!carousel) {
2091        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
2092        if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); }
2093      }
2094      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
2095
2096    // non CSS mediaqueries: IE8
2097    // ## update inner wrapper, container, slides if needed
2098    // set inline styles for inner wrapper & container
2099    // insert stylesheet (one line) for slides only (since slides are many)
2100    } else {
2101      // middle wrapper styles
2102      update_carousel_transition_duration();
2103
2104      // inner wrapper styles
2105      innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight);
2106
2107      // container styles
2108      if (carousel && horizontal && !autoWidth) {
2109        container.style.width = getContainerWidth(fixedWidth, gutter, items);
2110      }
2111
2112      // slide styles
2113      var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : '';
2114      if (gutter) { str += getSlideGutterStyle(gutter); }
2115
2116      // append to the last line
2117      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
2118    }
2119
2120    // ## MEDIAQUERIES
2121    if (responsive && CSSMQ) {
2122      for (var bp in responsive) {
2123        // bp: convert string to number
2124        bp = parseInt(bp);
2125
2126        var opts = responsive[bp],
2127            str = '',
2128            middleWrapperStr = '',
2129            innerWrapperStr = '',
2130            containerStr = '',
2131            slideStr = '',
2132            itemsBP = !autoWidth ? getOption('items', bp) : null,
2133            fixedWidthBP = getOption('fixedWidth', bp),
2134            speedBP = getOption('speed', bp),
2135            edgePaddingBP = getOption('edgePadding', bp),
2136            autoHeightBP = getOption('autoHeight', bp),
2137            gutterBP = getOption('gutter', bp);
2138
2139        // middle wrapper string
2140        if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) {
2141          middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}';
2142        }
2143
2144        // inner wrapper string
2145        if ('edgePadding' in opts || 'gutter' in opts) {
2146          innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}';
2147        }
2148
2149        // container string
2150        if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) {
2151          containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';';
2152        }
2153        if (TRANSITIONDURATION && 'speed' in opts) {
2154          containerStr += getTransitionDurationStyle(speedBP);
2155        }
2156        if (containerStr) {
2157          containerStr = '#' + slideId + '{' + containerStr + '}';
2158        }
2159
2160        // slide string
2161        if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) {
2162          slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP);
2163        }
2164        if ('gutter' in opts) {
2165          slideStr += getSlideGutterStyle(gutterBP);
2166        }
2167        // set gallery items transition-duration
2168        if (!carousel && 'speed' in opts) {
2169          if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); }
2170          if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); }
2171        }
2172        if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; }
2173
2174        // add up
2175        str = middleWrapperStr + innerWrapperStr + containerStr + slideStr;
2176
2177        if (str) {
2178          sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length);
2179        }
2180      }
2181    }
2182  }
2183
2184  function initTools () {
2185    // == slides ==
2186    updateSlideStatus();
2187
2188    // == live region ==
2189    outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">' + getLiveRegionStr() + '</span>  of ' + slideCount + '</div>');
2190    liveregionCurrent = outerWrapper.querySelector('.tns-liveregion .current');
2191
2192    // == autoplayInit ==
2193    if (hasAutoplay) {
2194      var txt = autoplay ? 'stop' : 'start';
2195      if (autoplayButton) {
2196        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': txt});
2197      } else if (options.autoplayButtonOutput) {
2198        outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>');
2199        autoplayButton = outerWrapper.querySelector('[data-action]');
2200      }
2201
2202      // add event
2203      if (autoplayButton) {
2204        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(autoplayButton, {'click': toggleAutoplay});
2205      }
2206
2207      if (autoplay) {
2208        startAutoplay();
2209        if (autoplayHoverPause) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents); }
2210        if (autoplayResetOnVisibility) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, visibilityEvent); }
2211      }
2212    }
2213
2214    // == navInit ==
2215    if (hasNav) {
2216      var initIndex = !carousel ? 0 : cloneCount;
2217      // customized nav
2218      // will not hide the navs in case they're thumbnails
2219      if (navContainer) {
2220        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navContainer, {'aria-label': 'Carousel Pagination'});
2221        navItems = navContainer.children;
2222        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(navItems, function(item, i) {
2223          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
2224            'data-nav': i,
2225            'tabindex': '-1',
2226            'aria-label': navStr + (i + 1),
2227            'aria-controls': slideId,
2228          });
2229        });
2230
2231      // generated nav
2232      } else {
2233        var navHtml = '',
2234            hiddenStr = navAsThumbnails ? '' : 'style="display:none"';
2235        for (var i = 0; i < slideCount; i++) {
2236          // hide nav items by default
2237          navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>';
2238        }
2239        navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>';
2240        outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml);
2241
2242        navContainer = outerWrapper.querySelector('.tns-nav');
2243        navItems = navContainer.children;
2244      }
2245
2246      updateNavVisibility();
2247
2248      // add transition
2249      if (TRANSITIONDURATION) {
2250        var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(),
2251            str = 'transition: all ' + speed / 1000 + 's';
2252
2253        if (prefix) {
2254          str = '-' + prefix + '-' + str;
2255        }
2256
2257        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '[aria-controls^=' + slideId + '-item]', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2258      }
2259
2260      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
2261      Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navItems[navCurrentIndex], 'tabindex');
2262      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navItems[navCurrentIndex], navActiveClass);
2263
2264      // add events
2265      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(navContainer, navEvents);
2266    }
2267
2268
2269
2270    // == controlsInit ==
2271    if (hasControls) {
2272      if (!controlsContainer && (!prevButton || !nextButton)) {
2273        outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>');
2274
2275        controlsContainer = outerWrapper.querySelector('.tns-controls');
2276      }
2277
2278      if (!prevButton || !nextButton) {
2279        prevButton = controlsContainer.children[0];
2280        nextButton = controlsContainer.children[1];
2281      }
2282
2283      if (options.controlsContainer) {
2284        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(controlsContainer, {
2285          'aria-label': 'Carousel Navigation',
2286          'tabindex': '0'
2287        });
2288      }
2289
2290      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
2291        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])([prevButton, nextButton], {
2292          'aria-controls': slideId,
2293          'tabindex': '-1',
2294        });
2295      }
2296
2297      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
2298        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(prevButton, {'data-controls' : 'prev'});
2299        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(nextButton, {'data-controls' : 'next'});
2300      }
2301
2302      prevIsButton = isButton(prevButton);
2303      nextIsButton = isButton(nextButton);
2304
2305      updateControlsStatus();
2306
2307      // add events
2308      if (controlsContainer) {
2309        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(controlsContainer, controlsEvents);
2310      } else {
2311        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(prevButton, controlsEvents);
2312        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(nextButton, controlsEvents);
2313      }
2314    }
2315
2316    // hide tools if needed
2317    disableUI();
2318  }
2319
2320  function initEvents () {
2321    // add events
2322    if (carousel && TRANSITIONEND) {
2323      var eve = {};
2324      eve[TRANSITIONEND] = onTransitionEnd;
2325      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, eve);
2326    }
2327
2328    if (touch) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch); }
2329    if (mouseDrag) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents); }
2330    if (arrowKeys) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent); }
2331
2332    if (nested === 'inner') {
2333      events.on('outerResized', function () {
2334        resizeTasks();
2335        events.emit('innerLoaded', info());
2336      });
2337    } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) {
2338      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(win, {'resize': onResize});
2339    }
2340
2341    if (autoHeight) {
2342      if (nested === 'outer') {
2343        events.on('innerLoaded', doAutoHeight);
2344      } else if (!disable) { doAutoHeight(); }
2345    }
2346
2347    doLazyLoad();
2348    if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); }
2349
2350    events.on('indexChanged', additionalUpdates);
2351    if (nested === 'inner') { events.emit('innerLoaded', info()); }
2352    if (typeof onInit === 'function') { onInit(info()); }
2353    isOn = true;
2354  }
2355
2356  function destroy () {
2357    // sheet
2358    sheet.disabled = true;
2359    if (sheet.ownerNode) { sheet.ownerNode.remove(); }
2360
2361    // remove win event listeners
2362    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(win, {'resize': onResize});
2363
2364    // arrowKeys, controls, nav
2365    if (arrowKeys) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent); }
2366    if (controlsContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(controlsContainer, controlsEvents); }
2367    if (navContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(navContainer, navEvents); }
2368
2369    // autoplay
2370    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
2371    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, visibilityEvent);
2372    if (autoplayButton) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(autoplayButton, {'click': toggleAutoplay}); }
2373    if (autoplay) { clearInterval(autoplayTimer); }
2374
2375    // container
2376    if (carousel && TRANSITIONEND) {
2377      var eve = {};
2378      eve[TRANSITIONEND] = onTransitionEnd;
2379      Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, eve);
2380    }
2381    if (touch) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents); }
2382    if (mouseDrag) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents); }
2383
2384    // cache Object values in options && reset HTML
2385    var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML];
2386
2387    tnsList.forEach(function(item, i) {
2388      var el = item === 'container' ? outerWrapper : options[item];
2389
2390      if (typeof el === 'object' && el) {
2391        var prevEl = el.previousElementSibling ? el.previousElementSibling : false,
2392            parentEl = el.parentNode;
2393        el.outerHTML = htmlList[i];
2394        options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild;
2395      }
2396    });
2397
2398
2399    // reset variables
2400    tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null;
2401    // check variables
2402    // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } });
2403
2404    for (var a in this) {
2405      if (a !== 'rebuild') { this[a] = null; }
2406    }
2407    isOn = false;
2408  }
2409
2410// === ON RESIZE ===
2411  // responsive || fixedWidth || autoWidth || !horizontal
2412  function onResize (e) {
2413    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ resizeTasks(getEvent(e)); });
2414  }
2415
2416  function resizeTasks (e) {
2417    if (!isOn) { return; }
2418    if (nested === 'outer') { events.emit('outerResized', info(e)); }
2419    windowWidth = getWindowWidth();
2420    var bpChanged,
2421        breakpointZoneTem = breakpointZone,
2422        needContainerTransform = false;
2423
2424    if (responsive) {
2425      setBreakpointZone();
2426      bpChanged = breakpointZoneTem !== breakpointZone;
2427      // if (hasRightDeadZone) { needContainerTransform = true; } // *?
2428      if (bpChanged) { events.emit('newBreakpointStart', info(e)); }
2429    }
2430
2431    var indChanged,
2432        itemsChanged,
2433        itemsTem = items,
2434        disableTem = disable,
2435        freezeTem = freeze,
2436        arrowKeysTem = arrowKeys,
2437        controlsTem = controls,
2438        navTem = nav,
2439        touchTem = touch,
2440        mouseDragTem = mouseDrag,
2441        autoplayTem = autoplay,
2442        autoplayHoverPauseTem = autoplayHoverPause,
2443        autoplayResetOnVisibilityTem = autoplayResetOnVisibility,
2444        indexTem = index;
2445
2446    if (bpChanged) {
2447      var fixedWidthTem = fixedWidth,
2448          autoHeightTem = autoHeight,
2449          controlsTextTem = controlsText,
2450          centerTem = center,
2451          autoplayTextTem = autoplayText;
2452
2453      if (!CSSMQ) {
2454        var gutterTem = gutter,
2455            edgePaddingTem = edgePadding;
2456      }
2457    }
2458
2459    // get option:
2460    // fixed width: viewport, fixedWidth, gutter => items
2461    // others: window width => all variables
2462    // all: items => slideBy
2463    arrowKeys = getOption('arrowKeys');
2464    controls = getOption('controls');
2465    nav = getOption('nav');
2466    touch = getOption('touch');
2467    center = getOption('center');
2468    mouseDrag = getOption('mouseDrag');
2469    autoplay = getOption('autoplay');
2470    autoplayHoverPause = getOption('autoplayHoverPause');
2471    autoplayResetOnVisibility = getOption('autoplayResetOnVisibility');
2472
2473    if (bpChanged) {
2474      disable = getOption('disable');
2475      fixedWidth = getOption('fixedWidth');
2476      speed = getOption('speed');
2477      autoHeight = getOption('autoHeight');
2478      controlsText = getOption('controlsText');
2479      autoplayText = getOption('autoplayText');
2480      autoplayTimeout = getOption('autoplayTimeout');
2481
2482      if (!CSSMQ) {
2483        edgePadding = getOption('edgePadding');
2484        gutter = getOption('gutter');
2485      }
2486    }
2487    // update options
2488    resetVariblesWhenDisable(disable);
2489
2490    viewport = getViewportWidth(); // <= edgePadding, gutter
2491    if ((!horizontal || autoWidth) && !disable) {
2492      setSlidePositions();
2493      if (!horizontal) {
2494        updateContentWrapperHeight(); // <= setSlidePositions
2495        needContainerTransform = true;
2496      }
2497    }
2498    if (fixedWidth || autoWidth) {
2499      rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter
2500                                          // fixedWidth: <= viewport, fixedWidth, gutter
2501      indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions
2502                                // fixedWidth: <= rightBoundary, fixedWidth, gutter
2503    }
2504
2505    if (bpChanged || fixedWidth) {
2506      items = getOption('items');
2507      slideBy = getOption('slideBy');
2508      itemsChanged = items !== itemsTem;
2509
2510      if (itemsChanged) {
2511        if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items
2512        // check index before transform in case
2513        // slider reach the right edge then items become bigger
2514        updateIndex();
2515      }
2516    }
2517
2518    if (bpChanged) {
2519      if (disable !== disableTem) {
2520        if (disable) {
2521          disableSlider();
2522        } else {
2523          enableSlider(); // <= slidePositions, rightBoundary, indexMax
2524        }
2525      }
2526    }
2527
2528    if (freezable && (bpChanged || fixedWidth || autoWidth)) {
2529      freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary
2530                            // <= fixedWidth: fixedWidth, gutter, rightBoundary
2531                            // <= others: items
2532
2533      if (freeze !== freezeTem) {
2534        if (freeze) {
2535          doContainerTransform(getContainerTransformValue(getStartIndex(0)));
2536          freezeSlider();
2537        } else {
2538          unfreezeSlider();
2539          needContainerTransform = true;
2540        }
2541      }
2542    }
2543
2544    resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility
2545    if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; }
2546
2547    if (arrowKeys !== arrowKeysTem) {
2548      arrowKeys ?
2549        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent) :
2550        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent);
2551    }
2552    if (controls !== controlsTem) {
2553      if (controls) {
2554        if (controlsContainer) {
2555          Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
2556        } else {
2557          if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
2558          if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
2559        }
2560      } else {
2561        if (controlsContainer) {
2562          Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
2563        } else {
2564          if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
2565          if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
2566        }
2567      }
2568    }
2569    if (nav !== navTem) {
2570      if (nav) {
2571        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer);
2572        updateNavVisibility();
2573      } else {
2574        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer)
2575      }
2576    }
2577    if (touch !== touchTem) {
2578      touch ?
2579        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch) :
2580        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents);
2581    }
2582    if (mouseDrag !== mouseDragTem) {
2583      mouseDrag ?
2584        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents) :
2585        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents);
2586    }
2587    if (autoplay !== autoplayTem) {
2588      if (autoplay) {
2589        if (autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
2590        if (!animating && !autoplayUserPaused) { startAutoplay(); }
2591      } else {
2592        if (autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
2593        if (animating) { stopAutoplay(); }
2594      }
2595    }
2596    if (autoplayHoverPause !== autoplayHoverPauseTem) {
2597      autoplayHoverPause ?
2598        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents) :
2599        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
2600    }
2601    if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) {
2602      autoplayResetOnVisibility ?
2603        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, visibilityEvent) :
2604        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, visibilityEvent);
2605    }
2606
2607    if (bpChanged) {
2608      if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; }
2609
2610      if (autoHeight !== autoHeightTem) {
2611        if (!autoHeight) { innerWrapper.style.height = ''; }
2612      }
2613
2614      if (controls && controlsText !== controlsTextTem) {
2615        prevButton.innerHTML = controlsText[0];
2616        nextButton.innerHTML = controlsText[1];
2617      }
2618
2619      if (autoplayButton && autoplayText !== autoplayTextTem) {
2620        var i = autoplay ? 1 : 0,
2621            html = autoplayButton.innerHTML,
2622            len = html.length - autoplayTextTem[i].length;
2623        if (html.substring(len) === autoplayTextTem[i]) {
2624          autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i];
2625        }
2626      }
2627    } else {
2628      if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; }
2629    }
2630
2631    if (itemsChanged || fixedWidth && !autoWidth) {
2632      pages = getPages();
2633      updateNavVisibility();
2634    }
2635
2636    indChanged = index !== indexTem;
2637    if (indChanged) {
2638      events.emit('indexChanged', info());
2639      needContainerTransform = true;
2640    } else if (itemsChanged) {
2641      if (!indChanged) { additionalUpdates(); }
2642    } else if (fixedWidth || autoWidth) {
2643      doLazyLoad();
2644      updateSlideStatus();
2645      updateLiveRegion();
2646    }
2647
2648    if (itemsChanged && !carousel) { updateGallerySlidePositions(); }
2649
2650    if (!disable && !freeze) {
2651      // non-mediaqueries: IE8
2652      if (bpChanged && !CSSMQ) {
2653        // middle wrapper styles
2654
2655        // inner wrapper styles
2656        if (edgePadding !== edgePaddingTem || gutter !== gutterTem) {
2657          innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight);
2658        }
2659
2660        if (horizontal) {
2661          // container styles
2662          if (carousel) {
2663            container.style.width = getContainerWidth(fixedWidth, gutter, items);
2664          }
2665
2666          // slide styles
2667          var str = getSlideWidthStyle(fixedWidth, gutter, items) +
2668                    getSlideGutterStyle(gutter);
2669
2670          // remove the last line and
2671          // add new styles
2672          Object(_helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__["removeCSSRule"])(sheet, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet) - 1);
2673          Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2674        }
2675      }
2676
2677      // auto height
2678      if (autoHeight) { doAutoHeight(); }
2679
2680      if (needContainerTransform) {
2681        doContainerTransformSilent();
2682        indexCached = index;
2683      }
2684    }
2685
2686    if (bpChanged) { events.emit('newBreakpointEnd', info(e)); }
2687  }
2688
2689
2690
2691
2692
2693  // === INITIALIZATION FUNCTIONS === //
2694  function getFreeze () {
2695    if (!fixedWidth && !autoWidth) {
2696      var a = center ? items - (items - 1) / 2 : items;
2697      return  slideCount <= a;
2698    }
2699
2700    var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount],
2701        vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter;
2702
2703    if (center) {
2704      vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2;
2705    }
2706
2707    return width <= vp;
2708  }
2709
2710  function setBreakpointZone () {
2711    breakpointZone = 0;
2712    for (var bp in responsive) {
2713      bp = parseInt(bp); // convert string to number
2714      if (windowWidth >= bp) { breakpointZone = bp; }
2715    }
2716  }
2717
2718  // (slideBy, indexMin, indexMax) => index
2719  var updateIndex = (function () {
2720    return loop ?
2721      carousel ?
2722        // loop + carousel
2723        function () {
2724          var leftEdge = indexMin,
2725              rightEdge = indexMax;
2726
2727          leftEdge += slideBy;
2728          rightEdge -= slideBy;
2729
2730          // adjust edges when has edge paddings
2731          // or fixed-width slider with extra space on the right side
2732          if (edgePadding) {
2733            leftEdge += 1;
2734            rightEdge -= 1;
2735          } else if (fixedWidth) {
2736            if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; }
2737          }
2738
2739          if (cloneCount) {
2740            if (index > rightEdge) {
2741              index -= slideCount;
2742            } else if (index < leftEdge) {
2743              index += slideCount;
2744            }
2745          }
2746        } :
2747        // loop + gallery
2748        function() {
2749          if (index > indexMax) {
2750            while (index >= indexMin + slideCount) { index -= slideCount; }
2751          } else if (index < indexMin) {
2752            while (index <= indexMax - slideCount) { index += slideCount; }
2753          }
2754        } :
2755      // non-loop
2756      function() {
2757        index = Math.max(indexMin, Math.min(indexMax, index));
2758      };
2759  })();
2760
2761  function disableUI () {
2762    if (!autoplay && autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
2763    if (!nav && navContainer) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer); }
2764    if (!controls) {
2765      if (controlsContainer) {
2766        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
2767      } else {
2768        if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
2769        if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
2770      }
2771    }
2772  }
2773
2774  function enableUI () {
2775    if (autoplay && autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
2776    if (nav && navContainer) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer); }
2777    if (controls) {
2778      if (controlsContainer) {
2779        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
2780      } else {
2781        if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
2782        if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
2783      }
2784    }
2785  }
2786
2787  function freezeSlider () {
2788    if (frozen) { return; }
2789
2790    // remove edge padding from inner wrapper
2791    if (edgePadding) { innerWrapper.style.margin = '0px'; }
2792
2793    // add class tns-transparent to cloned slides
2794    if (cloneCount) {
2795      var str = 'tns-transparent';
2796      for (var i = cloneCount; i--;) {
2797        if (carousel) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[i], str); }
2798        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[slideCountNew - i - 1], str);
2799      }
2800    }
2801
2802    // update tools
2803    disableUI();
2804
2805    frozen = true;
2806  }
2807
2808  function unfreezeSlider () {
2809    if (!frozen) { return; }
2810
2811    // restore edge padding for inner wrapper
2812    // for mordern browsers
2813    if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; }
2814
2815    // remove class tns-transparent to cloned slides
2816    if (cloneCount) {
2817      var str = 'tns-transparent';
2818      for (var i = cloneCount; i--;) {
2819        if (carousel) { Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[i], str); }
2820        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[slideCountNew - i - 1], str);
2821      }
2822    }
2823
2824    // update tools
2825    enableUI();
2826
2827    frozen = false;
2828  }
2829
2830  function disableSlider () {
2831    if (disabled) { return; }
2832
2833    sheet.disabled = true;
2834    container.className = container.className.replace(newContainerClasses.substring(1), '');
2835    Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(container, ['style']);
2836    if (loop) {
2837      for (var j = cloneCount; j--;) {
2838        if (carousel) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[j]); }
2839        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[slideCountNew - j - 1]);
2840      }
2841    }
2842
2843    // vertical slider
2844    if (!horizontal || !carousel) { Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(innerWrapper, ['style']); }
2845
2846    // gallery
2847    if (!carousel) {
2848      for (var i = index, l = index + slideCount; i < l; i++) {
2849        var item = slideItems[i];
2850        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['style']);
2851        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
2852        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
2853      }
2854    }
2855
2856    // update tools
2857    disableUI();
2858
2859    disabled = true;
2860  }
2861
2862  function enableSlider () {
2863    if (!disabled) { return; }
2864
2865    sheet.disabled = false;
2866    container.className += newContainerClasses;
2867    doContainerTransformSilent();
2868
2869    if (loop) {
2870      for (var j = cloneCount; j--;) {
2871        if (carousel) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[j]); }
2872        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[slideCountNew - j - 1]);
2873      }
2874    }
2875
2876    // gallery
2877    if (!carousel) {
2878      for (var i = index, l = index + slideCount; i < l; i++) {
2879        var item = slideItems[i],
2880            classN = i < index + items ? animateIn : animateNormal;
2881        item.style.left = (i - index) * 100 / items + '%';
2882        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classN);
2883      }
2884    }
2885
2886    // update tools
2887    enableUI();
2888
2889    disabled = false;
2890  }
2891
2892  function updateLiveRegion () {
2893    var str = getLiveRegionStr();
2894    if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; }
2895  }
2896
2897  function getLiveRegionStr () {
2898    var arr = getVisibleSlideRange(),
2899        start = arr[0] + 1,
2900        end = arr[1] + 1;
2901    return start === end ? start + '' : start + ' to ' + end;
2902  }
2903
2904  function getVisibleSlideRange (val) {
2905    if (val == null) { val = getContainerTransformValue(); }
2906    var start = index, end, rangestart, rangeend;
2907
2908    // get range start, range end for autoWidth and fixedWidth
2909    if (center || edgePadding) {
2910      if (autoWidth || fixedWidth) {
2911        rangestart = - (parseFloat(val) + edgePadding);
2912        rangeend = rangestart + viewport + edgePadding * 2;
2913      }
2914    } else {
2915      if (autoWidth) {
2916        rangestart = slidePositions[index];
2917        rangeend = rangestart + viewport;
2918      }
2919    }
2920
2921    // get start, end
2922    // - check auto width
2923    if (autoWidth) {
2924      slidePositions.forEach(function(point, i) {
2925        if (i < slideCountNew) {
2926          if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; }
2927          if (rangeend - point >= 0.5) { end = i; }
2928        }
2929      });
2930
2931    // - check percentage width, fixed width
2932    } else {
2933
2934      if (fixedWidth) {
2935        var cell = fixedWidth + gutter;
2936        if (center || edgePadding) {
2937          start = Math.floor(rangestart/cell);
2938          end = Math.ceil(rangeend/cell - 1);
2939        } else {
2940          end = start + Math.ceil(viewport/cell) - 1;
2941        }
2942
2943      } else {
2944        if (center || edgePadding) {
2945          var a = items - 1;
2946          if (center) {
2947            start -= a / 2;
2948            end = index + a / 2;
2949          } else {
2950            end = index + a;
2951          }
2952
2953          if (edgePadding) {
2954            var b = edgePadding * items / viewport;
2955            start -= b;
2956            end += b;
2957          }
2958
2959          start = Math.floor(start);
2960          end = Math.ceil(end);
2961        } else {
2962          end = start + items - 1;
2963        }
2964      }
2965
2966      start = Math.max(start, 0);
2967      end = Math.min(end, slideCountNew - 1);
2968    }
2969
2970    return [start, end];
2971  }
2972
2973  function doLazyLoad () {
2974    if (lazyload && !disable) {
2975      var arg = getVisibleSlideRange();
2976      arg.push(lazyloadSelector);
2977
2978      getImageArray.apply(null, arg).forEach(function (img) {
2979        if (!Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) {
2980          // stop propagation transitionend event to container
2981          var eve = {};
2982          eve[TRANSITIONEND] = function (e) { e.stopPropagation(); };
2983          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, eve);
2984
2985          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
2986
2987          // update src
2988          img.src = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-src');
2989
2990          // update srcset
2991          var srcset = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-srcset');
2992          if (srcset) { img.srcset = srcset; }
2993
2994          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
2995        }
2996      });
2997    }
2998  }
2999
3000  function onImgLoaded (e) {
3001    imgLoaded(getTarget(e));
3002  }
3003
3004  function onImgFailed (e) {
3005    imgFailed(getTarget(e));
3006  }
3007
3008  function imgLoaded (img) {
3009    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loaded');
3010    imgCompleted(img);
3011  }
3012
3013  function imgFailed (img) {
3014    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'failed');
3015    imgCompleted(img);
3016  }
3017
3018  function imgCompleted (img) {
3019    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, imgCompleteClass);
3020    Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(img, 'loading');
3021    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(img, imgEvents);
3022  }
3023
3024  function getImageArray (start, end, imgSelector) {
3025    var imgs = [];
3026    if (!imgSelector) { imgSelector = 'img'; }
3027
3028    while (start <= end) {
3029      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); });
3030      start++;
3031    }
3032
3033    return imgs;
3034  }
3035
3036  // check if all visible images are loaded
3037  // and update container height if it's done
3038  function doAutoHeight () {
3039    var imgs = getImageArray.apply(null, getVisibleSlideRange());
3040    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); });
3041  }
3042
3043  function imgsLoadedCheck (imgs, cb) {
3044    // execute callback function if all images are complete
3045    if (imgsComplete) { return cb(); }
3046
3047    // check image classes
3048    imgs.forEach(function (img, index) {
3049      if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete
3050      if (Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) { imgs.splice(index, 1); }
3051    });
3052
3053    // execute callback function if selected images are all complete
3054    if (!imgs.length) { return cb(); }
3055
3056    // otherwise execute this functiona again
3057    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, cb); });
3058  }
3059
3060  function additionalUpdates () {
3061    doLazyLoad();
3062    updateSlideStatus();
3063    updateLiveRegion();
3064    updateControlsStatus();
3065    updateNavStatus();
3066  }
3067
3068
3069  function update_carousel_transition_duration () {
3070    if (carousel && autoHeight) {
3071      middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's';
3072    }
3073  }
3074
3075  function getMaxSlideHeight (slideStart, slideRange) {
3076    var heights = [];
3077    for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) {
3078      heights.push(slideItems[i].offsetHeight);
3079    }
3080
3081    return Math.max.apply(null, heights);
3082  }
3083
3084  // update inner wrapper height
3085  // 1. get the max-height of the visible slides
3086  // 2. set transitionDuration to speed
3087  // 3. update inner wrapper height to max-height
3088  // 4. set transitionDuration to 0s after transition done
3089  function updateInnerWrapperHeight () {
3090    var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount),
3091        wp = middleWrapper ? middleWrapper : innerWrapper;
3092
3093    if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; }
3094  }
3095
3096  // get the distance from the top edge of the first slide to each slide
3097  // (init) => slidePositions
3098  function setSlidePositions () {
3099    slidePositions = [0];
3100    var attr = horizontal ? 'left' : 'top',
3101        attr2 = horizontal ? 'right' : 'bottom',
3102        base = slideItems[0].getBoundingClientRect()[attr];
3103
3104    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
3105      // skip the first slide
3106      if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }
3107      // add the end edge
3108      if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }
3109    });
3110  }
3111
3112  // update slide
3113  function updateSlideStatus () {
3114    var range = getVisibleSlideRange(),
3115        start = range[0],
3116        end = range[1];
3117
3118    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
3119      // show slides
3120      if (i >= start && i <= end) {
3121        if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
3122          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['aria-hidden', 'tabindex']);
3123          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, slideActiveClass);
3124        }
3125      // hide slides
3126      } else {
3127        if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
3128          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
3129            'aria-hidden': 'true',
3130            'tabindex': '-1'
3131          });
3132          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, slideActiveClass);
3133        }
3134      }
3135    });
3136  }
3137
3138  // gallery: update slide position
3139  function updateGallerySlidePositions () {
3140    var l = index + Math.min(slideCount, items);
3141    for (var i = slideCountNew; i--;) {
3142      var item = slideItems[i];
3143
3144      if (i >= index && i < l) {
3145        // add transitions to visible slides when adjusting their positions
3146        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-moving');
3147
3148        item.style.left = (i - index) * 100 / items + '%';
3149        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
3150        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
3151      } else if (item.style.left) {
3152        item.style.left = '';
3153        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
3154        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
3155      }
3156
3157      // remove outlet animation
3158      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
3159    }
3160
3161    // removing '.tns-moving'
3162    setTimeout(function() {
3163      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(el) {
3164        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(el, 'tns-moving');
3165      });
3166    }, 300);
3167  }
3168
3169  // set tabindex on Nav
3170  function updateNavStatus () {
3171    // get current nav
3172    if (nav) {
3173      navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex();
3174      navClicked = -1;
3175
3176      if (navCurrentIndex !== navCurrentIndexCached) {
3177        var navPrev = navItems[navCurrentIndexCached],
3178            navCurrent = navItems[navCurrentIndex];
3179
3180        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navPrev, {
3181          'tabindex': '-1',
3182          'aria-label': navStr + (navCurrentIndexCached + 1)
3183        });
3184        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(navPrev, navActiveClass);
3185
3186        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
3187        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navCurrent, 'tabindex');
3188        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navCurrent, navActiveClass);
3189
3190        navCurrentIndexCached = navCurrentIndex;
3191      }
3192    }
3193  }
3194
3195  function getLowerCaseNodeName (el) {
3196    return el.nodeName.toLowerCase();
3197  }
3198
3199  function isButton (el) {
3200    return getLowerCaseNodeName(el) === 'button';
3201  }
3202
3203  function isAriaDisabled (el) {
3204    return el.getAttribute('aria-disabled') === 'true';
3205  }
3206
3207  function disEnableElement (isButton, el, val) {
3208    if (isButton) {
3209      el.disabled = val;
3210    } else {
3211      el.setAttribute('aria-disabled', val.toString());
3212    }
3213  }
3214
3215  // set 'disabled' to true on controls when reach the edges
3216  function updateControlsStatus () {
3217    if (!controls || rewind || loop) { return; }
3218
3219    var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton),
3220        nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton),
3221        disablePrev = (index <= indexMin) ? true : false,
3222        disableNext = (!rewind && index >= indexMax) ? true : false;
3223
3224    if (disablePrev && !prevDisabled) {
3225      disEnableElement(prevIsButton, prevButton, true);
3226    }
3227    if (!disablePrev && prevDisabled) {
3228      disEnableElement(prevIsButton, prevButton, false);
3229    }
3230    if (disableNext && !nextDisabled) {
3231      disEnableElement(nextIsButton, nextButton, true);
3232    }
3233    if (!disableNext && nextDisabled) {
3234      disEnableElement(nextIsButton, nextButton, false);
3235    }
3236  }
3237
3238  // set duration
3239  function resetDuration (el, str) {
3240    if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; }
3241  }
3242
3243  function getSliderWidth () {
3244    return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew];
3245  }
3246
3247  function getCenterGap (num) {
3248    if (num == null) { num = index; }
3249
3250    var gap = edgePadding ? gutter : 0;
3251    return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 :
3252      fixedWidth ? (viewport - fixedWidth) / 2 :
3253        (items - 1) / 2;
3254  }
3255
3256  function getRightBoundary () {
3257    var gap = edgePadding ? gutter : 0,
3258        result = (viewport + gap) - getSliderWidth();
3259
3260    if (center && !loop) {
3261      result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() :
3262        getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1];
3263    }
3264    if (result > 0) { result = 0; }
3265
3266    return result;
3267  }
3268
3269  function getContainerTransformValue (num) {
3270    if (num == null) { num = index; }
3271
3272    var val;
3273    if (horizontal && !autoWidth) {
3274      if (fixedWidth) {
3275        val = - (fixedWidth + gutter) * num;
3276        if (center) { val += getCenterGap(); }
3277      } else {
3278        var denominator = TRANSFORM ? slideCountNew : items;
3279        if (center) { num -= getCenterGap(); }
3280        val = - num * 100 / denominator;
3281      }
3282    } else {
3283      val = - slidePositions[num];
3284      if (center && autoWidth) {
3285        val += getCenterGap();
3286      }
3287    }
3288
3289    if (hasRightDeadZone) { val = Math.max(val, rightBoundary); }
3290
3291    val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px';
3292
3293    return val;
3294  }
3295
3296  function doContainerTransformSilent (val) {
3297    resetDuration(container, '0s');
3298    doContainerTransform(val);
3299  }
3300
3301  function doContainerTransform (val) {
3302    if (val == null) { val = getContainerTransformValue(); }
3303    container.style[transformAttr] = transformPrefix + val + transformPostfix;
3304  }
3305
3306  function animateSlide (number, classOut, classIn, isOut) {
3307    var l = number + items;
3308    if (!loop) { l = Math.min(l, slideCountNew); }
3309
3310    for (var i = number; i < l; i++) {
3311        var item = slideItems[i];
3312
3313      // set item positions
3314      if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; }
3315
3316      if (animateDelay && TRANSITIONDELAY) {
3317        item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's';
3318      }
3319      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, classOut);
3320      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classIn);
3321
3322      if (isOut) { slideItemsOut.push(item); }
3323    }
3324  }
3325
3326  // make transfer after click/drag:
3327  // 1. change 'transform' property for mordern browsers
3328  // 2. change 'left' property for legacy browsers
3329  var transformCore = (function () {
3330    return carousel ?
3331      function () {
3332        resetDuration(container, '');
3333        if (TRANSITIONDURATION || !speed) {
3334          // for morden browsers with non-zero duration or
3335          // zero duration for all browsers
3336          doContainerTransform();
3337          // run fallback function manually
3338          // when duration is 0 / container is hidden
3339          if (!speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
3340
3341        } else {
3342          // for old browser with non-zero duration
3343          Object(_helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__["jsTransform"])(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd);
3344        }
3345
3346        if (!horizontal) { updateContentWrapperHeight(); }
3347      } :
3348      function () {
3349        slideItemsOut = [];
3350
3351        var eve = {};
3352        eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd;
3353        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(slideItems[indexCached], eve);
3354        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(slideItems[index], eve);
3355
3356        animateSlide(indexCached, animateIn, animateOut, true);
3357        animateSlide(index, animateNormal, animateIn);
3358
3359        // run fallback function manually
3360        // when transition or animation not supported / duration is 0
3361        if (!TRANSITIONEND || !ANIMATIONEND || !speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
3362      };
3363  })();
3364
3365  function render (e, sliderMoved) {
3366    if (updateIndexBeforeTransform) { updateIndex(); }
3367
3368    // render when slider was moved (touch or drag) even though index may not change
3369    if (index !== indexCached || sliderMoved) {
3370      // events
3371      events.emit('indexChanged', info());
3372      events.emit('transitionStart', info());
3373      if (autoHeight) { doAutoHeight(); }
3374
3375      // pause autoplay when click or keydown from user
3376      if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); }
3377
3378      running = true;
3379      transformCore();
3380    }
3381  }
3382
3383  /*
3384   * Transfer prefixed properties to the same format
3385   * CSS: -Webkit-Transform => webkittransform
3386   * JS: WebkitTransform => webkittransform
3387   * @param {string} str - property
3388   *
3389   */
3390  function strTrans (str) {
3391    return str.toLowerCase().replace(/-/g, '');
3392  }
3393
3394  // AFTER TRANSFORM
3395  // Things need to be done after a transfer:
3396  // 1. check index
3397  // 2. add classes to visible slide
3398  // 3. disable controls buttons when reach the first/last slide in non-loop slider
3399  // 4. update nav status
3400  // 5. lazyload images
3401  // 6. update container height
3402  function onTransitionEnd (event) {
3403    // check running on gallery mode
3404    // make sure trantionend/animationend events run only once
3405    if (carousel || running) {
3406      events.emit('transitionEnd', info(event));
3407
3408      if (!carousel && slideItemsOut.length > 0) {
3409        for (var i = 0; i < slideItemsOut.length; i++) {
3410          var item = slideItemsOut[i];
3411          // set item positions
3412          item.style.left = '';
3413
3414          if (ANIMATIONDELAY && TRANSITIONDELAY) {
3415            item.style[ANIMATIONDELAY] = '';
3416            item.style[TRANSITIONDELAY] = '';
3417          }
3418          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
3419          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
3420        }
3421      }
3422
3423      /* update slides, nav, controls after checking ...
3424       * => legacy browsers who don't support 'event'
3425       *    have to check event first, otherwise event.target will cause an error
3426       * => or 'gallery' mode:
3427       *   + event target is slide item
3428       * => or 'carousel' mode:
3429       *   + event target is container,
3430       *   + event.property is the same with transform attribute
3431       */
3432      if (!event ||
3433          !carousel && event.target.parentNode === container ||
3434          event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {
3435
3436        if (!updateIndexBeforeTransform) {
3437          var indexTem = index;
3438          updateIndex();
3439          if (index !== indexTem) {
3440            events.emit('indexChanged', info());
3441
3442            doContainerTransformSilent();
3443          }
3444        }
3445
3446        if (nested === 'inner') { events.emit('innerLoaded', info()); }
3447        running = false;
3448        indexCached = index;
3449      }
3450    }
3451
3452  }
3453
3454  // # ACTIONS
3455  function goTo (targetIndex, e) {
3456    if (freeze) { return; }
3457
3458    // prev slideBy
3459    if (targetIndex === 'prev') {
3460      onControlsClick(e, -1);
3461
3462    // next slideBy
3463    } else if (targetIndex === 'next') {
3464      onControlsClick(e, 1);
3465
3466    // go to exact slide
3467    } else {
3468      if (running) {
3469        if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3470      }
3471
3472      var absIndex = getAbsIndex(),
3473          indexGap = 0;
3474
3475      if (targetIndex === 'first') {
3476        indexGap = - absIndex;
3477      } else if (targetIndex === 'last') {
3478        indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex;
3479      } else {
3480        if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); }
3481
3482        if (!isNaN(targetIndex)) {
3483          // from directly called goTo function
3484          if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); }
3485
3486          indexGap = targetIndex - absIndex;
3487        }
3488      }
3489
3490      // gallery: make sure new page won't overlap with current page
3491      if (!carousel && indexGap && Math.abs(indexGap) < items) {
3492        var factor = indexGap > 0 ? 1 : -1;
3493        indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1;
3494      }
3495
3496      index += indexGap;
3497
3498      // make sure index is in range
3499      if (carousel && loop) {
3500        if (index < indexMin) { index += slideCount; }
3501        if (index > indexMax) { index -= slideCount; }
3502      }
3503
3504      // if index is changed, start rendering
3505      if (getAbsIndex(index) !== getAbsIndex(indexCached)) {
3506        render(e);
3507      }
3508
3509    }
3510  }
3511
3512  // on controls click
3513  function onControlsClick (e, dir) {
3514    if (running) {
3515      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3516    }
3517    var passEventObject;
3518
3519    if (!dir) {
3520      e = getEvent(e);
3521      var target = getTarget(e);
3522
3523      while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; }
3524
3525      var targetIn = [prevButton, nextButton].indexOf(target);
3526      if (targetIn >= 0) {
3527        passEventObject = true;
3528        dir = targetIn === 0 ? -1 : 1;
3529      }
3530    }
3531
3532    if (rewind) {
3533      if (index === indexMin && dir === -1) {
3534        goTo('last', e);
3535        return;
3536      } else if (index === indexMax && dir === 1) {
3537        goTo('first', e);
3538        return;
3539      }
3540    }
3541
3542    if (dir) {
3543      index += slideBy * dir;
3544      if (autoWidth) { index = Math.floor(index); }
3545      // pass e when click control buttons or keydown
3546      render((passEventObject || (e && e.type === 'keydown')) ? e : null);
3547    }
3548  }
3549
3550  // on nav click
3551  function onNavClick (e) {
3552    if (running) {
3553      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3554    }
3555
3556    e = getEvent(e);
3557    var target = getTarget(e), navIndex;
3558
3559    // find the clicked nav item
3560    while (target !== navContainer && !Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) { target = target.parentNode; }
3561    if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) {
3562      var navIndex = navClicked = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(target, 'data-nav')),
3563          targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items,
3564          targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1);
3565      goTo(targetIndex, e);
3566
3567      if (navCurrentIndex === navIndex) {
3568        if (animating) { stopAutoplay(); }
3569        navClicked = -1; // reset navClicked
3570      }
3571    }
3572  }
3573
3574  // autoplay functions
3575  function setAutoplayTimer () {
3576    autoplayTimer = setInterval(function () {
3577      onControlsClick(null, autoplayDirection);
3578    }, autoplayTimeout);
3579
3580    animating = true;
3581  }
3582
3583  function stopAutoplayTimer () {
3584    clearInterval(autoplayTimer);
3585    animating = false;
3586  }
3587
3588  function updateAutoplayButton (action, txt) {
3589    Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': action});
3590    autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt;
3591  }
3592
3593  function startAutoplay () {
3594    setAutoplayTimer();
3595    if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); }
3596  }
3597
3598  function stopAutoplay () {
3599    stopAutoplayTimer();
3600    if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); }
3601  }
3602
3603  // programaitcally play/pause the slider
3604  function play () {
3605    if (autoplay && !animating) {
3606      startAutoplay();
3607      autoplayUserPaused = false;
3608    }
3609  }
3610  function pause () {
3611    if (animating) {
3612      stopAutoplay();
3613      autoplayUserPaused = true;
3614    }
3615  }
3616
3617  function toggleAutoplay () {
3618    if (animating) {
3619      stopAutoplay();
3620      autoplayUserPaused = true;
3621    } else {
3622      startAutoplay();
3623      autoplayUserPaused = false;
3624    }
3625  }
3626
3627  function onVisibilityChange () {
3628    if (doc.hidden) {
3629      if (animating) {
3630        stopAutoplayTimer();
3631        autoplayVisibilityPaused = true;
3632      }
3633    } else if (autoplayVisibilityPaused) {
3634      setAutoplayTimer();
3635      autoplayVisibilityPaused = false;
3636    }
3637  }
3638
3639  function mouseoverPause () {
3640    if (animating) {
3641      stopAutoplayTimer();
3642      autoplayHoverPaused = true;
3643    }
3644  }
3645
3646  function mouseoutRestart () {
3647    if (autoplayHoverPaused) {
3648      setAutoplayTimer();
3649      autoplayHoverPaused = false;
3650    }
3651  }
3652
3653  // keydown events on document
3654  function onDocumentKeydown (e) {
3655    e = getEvent(e);
3656    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
3657
3658    if (keyIndex >= 0) {
3659      onControlsClick(e, keyIndex === 0 ? -1 : 1);
3660    }
3661  }
3662
3663  // on key control
3664  function onControlsKeydown (e) {
3665    e = getEvent(e);
3666    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
3667
3668    if (keyIndex >= 0) {
3669      if (keyIndex === 0) {
3670        if (!prevButton.disabled) { onControlsClick(e, -1); }
3671      } else if (!nextButton.disabled) {
3672        onControlsClick(e, 1);
3673      }
3674    }
3675  }
3676
3677  // set focus
3678  function setFocus (el) {
3679    el.focus();
3680  }
3681
3682  // on key nav
3683  function onNavKeydown (e) {
3684    e = getEvent(e);
3685    var curElement = doc.activeElement;
3686    if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(curElement, 'data-nav')) { return; }
3687
3688    // var code = e.keyCode,
3689    var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode),
3690        navIndex = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(curElement, 'data-nav'));
3691
3692    if (keyIndex >= 0) {
3693      if (keyIndex === 0) {
3694        if (navIndex > 0) { setFocus(navItems[navIndex - 1]); }
3695      } else if (keyIndex === 1) {
3696        if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); }
3697      } else {
3698        navClicked = navIndex;
3699        goTo(navIndex, e);
3700      }
3701    }
3702  }
3703
3704  function getEvent (e) {
3705    e = e || win.event;
3706    return isTouchEvent(e) ? e.changedTouches[0] : e;
3707  }
3708  function getTarget (e) {
3709    return e.target || win.event.srcElement;
3710  }
3711
3712  function isTouchEvent (e) {
3713    return e.type.indexOf('touch') >= 0;
3714  }
3715
3716  function preventDefaultBehavior (e) {
3717    e.preventDefault ? e.preventDefault() : e.returnValue = false;
3718  }
3719
3720  function getMoveDirectionExpected () {
3721    return Object(_helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__["getTouchDirection"])(Object(_helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__["toDegree"])(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis;
3722  }
3723
3724  function onPanStart (e) {
3725    if (running) {
3726      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3727    }
3728
3729    if (autoplay && animating) { stopAutoplayTimer(); }
3730
3731    panStart = true;
3732    if (rafIndex) {
3733      Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3734      rafIndex = null;
3735    }
3736
3737    var $ = getEvent(e);
3738    events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e));
3739
3740    if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) {
3741      preventDefaultBehavior(e);
3742    }
3743
3744    lastPosition.x = initPosition.x = $.clientX;
3745    lastPosition.y = initPosition.y = $.clientY;
3746    if (carousel) {
3747      translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, ''));
3748      resetDuration(container, '0s');
3749    }
3750  }
3751
3752  function onPanMove (e) {
3753    if (panStart) {
3754      var $ = getEvent(e);
3755      lastPosition.x = $.clientX;
3756      lastPosition.y = $.clientY;
3757
3758      if (carousel) {
3759        if (!rafIndex) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
3760      } else {
3761        if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
3762        if (moveDirectionExpected) { preventScroll = true; }
3763      }
3764
3765      if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) {
3766        e.preventDefault();
3767      }
3768    }
3769  }
3770
3771  function panUpdate (e) {
3772    if (!moveDirectionExpected) {
3773      panStart = false;
3774      return;
3775    }
3776    Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3777    if (panStart) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
3778
3779    if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
3780    if (moveDirectionExpected) {
3781      if (!preventScroll && isTouchEvent(e)) { preventScroll = true; }
3782
3783      try {
3784        if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); }
3785      } catch(err) {}
3786
3787      var x = translateInit,
3788          dist = getDist(lastPosition, initPosition);
3789      if (!horizontal || fixedWidth || autoWidth) {
3790        x += dist;
3791        x += 'px';
3792      } else {
3793        var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter);
3794        x += percentageX;
3795        x += '%';
3796      }
3797
3798      container.style[transformAttr] = transformPrefix + x + transformPostfix;
3799    }
3800  }
3801
3802  function onPanEnd (e) {
3803    if (panStart) {
3804      if (rafIndex) {
3805        Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3806        rafIndex = null;
3807      }
3808      if (carousel) { resetDuration(container, ''); }
3809      panStart = false;
3810
3811      var $ = getEvent(e);
3812      lastPosition.x = $.clientX;
3813      lastPosition.y = $.clientY;
3814      var dist = getDist(lastPosition, initPosition);
3815
3816      if (Math.abs(dist)) {
3817        // drag vs click
3818        if (!isTouchEvent(e)) {
3819          // prevent "click"
3820          var target = getTarget(e);
3821          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(target, {'click': function preventClick (e) {
3822            preventDefaultBehavior(e);
3823            Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(target, {'click': preventClick});
3824          }});
3825        }
3826
3827        if (carousel) {
3828          rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function() {
3829            if (horizontal && !autoWidth) {
3830              var indexMoved = - dist * items / (viewport + gutter);
3831              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
3832              index += indexMoved;
3833            } else {
3834              var moved = - (translateInit + dist);
3835              if (moved <= 0) {
3836                index = indexMin;
3837              } else if (moved >= slidePositions[slideCountNew - 1]) {
3838                index = indexMax;
3839              } else {
3840                var i = 0;
3841                while (i < slideCountNew && moved >= slidePositions[i]) {
3842                  index = i;
3843                  if (moved > slidePositions[i] && dist < 0) { index += 1; }
3844                  i++;
3845                }
3846              }
3847            }
3848
3849            render(e, dist);
3850            events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e));
3851          });
3852        } else {
3853          if (moveDirectionExpected) {
3854            onControlsClick(e, dist > 0 ? -1 : 1);
3855          }
3856        }
3857      }
3858    }
3859
3860    // reset
3861    if (options.preventScrollOnTouch === 'auto') { preventScroll = false; }
3862    if (swipeAngle) { moveDirectionExpected = '?'; }
3863    if (autoplay && !animating) { setAutoplayTimer(); }
3864  }
3865
3866  // === RESIZE FUNCTIONS === //
3867  // (slidePositions, index, items) => vertical_conentWrapper.height
3868  function updateContentWrapperHeight () {
3869    var wp = middleWrapper ? middleWrapper : innerWrapper;
3870    wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px';
3871  }
3872
3873  function getPages () {
3874    var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items;
3875    return Math.min(Math.ceil(rough), slideCount);
3876  }
3877
3878  /*
3879   * 1. update visible nav items list
3880   * 2. add "hidden" attributes to previous visible nav items
3881   * 3. remove "hidden" attrubutes to new visible nav items
3882   */
3883  function updateNavVisibility () {
3884    if (!nav || navAsThumbnails) { return; }
3885
3886    if (pages !== pagesCached) {
3887      var min = pagesCached,
3888          max = pages,
3889          fn = _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"];
3890
3891      if (pagesCached > pages) {
3892        min = pages;
3893        max = pagesCached;
3894        fn = _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"];
3895      }
3896
3897      while (min < max) {
3898        fn(navItems[min]);
3899        min++;
3900      }
3901
3902      // cache pages
3903      pagesCached = pages;
3904    }
3905  }
3906
3907  function info (e) {
3908    return {
3909      container: container,
3910      slideItems: slideItems,
3911      navContainer: navContainer,
3912      navItems: navItems,
3913      controlsContainer: controlsContainer,
3914      hasControls: hasControls,
3915      prevButton: prevButton,
3916      nextButton: nextButton,
3917      items: items,
3918      slideBy: slideBy,
3919      cloneCount: cloneCount,
3920      slideCount: slideCount,
3921      slideCountNew: slideCountNew,
3922      index: index,
3923      indexCached: indexCached,
3924      displayIndex: getCurrentSlide(),
3925      navCurrentIndex: navCurrentIndex,
3926      navCurrentIndexCached: navCurrentIndexCached,
3927      pages: pages,
3928      pagesCached: pagesCached,
3929      sheet: sheet,
3930      isOn: isOn,
3931      event: e || {},
3932    };
3933  }
3934
3935  return {
3936    version: '2.9.3',
3937    getInfo: info,
3938    events: events,
3939    goTo: goTo,
3940    play: play,
3941    pause: pause,
3942    isOn: isOn,
3943    updateSliderHeight: updateInnerWrapperHeight,
3944    refresh: initSliderTransform,
3945    destroy: destroy,
3946    rebuild: function() {
3947      return tns(Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, optionsElements));
3948    }
3949  };
3950};
3951
3952
3953/***/ }),
3954
3955/***/ "./src/components/product-categories/product-categories.js":
3956/*!*****************************************************************!*\
3957  !*** ./src/components/product-categories/product-categories.js ***!
3958  \*****************************************************************/
3959/*! no exports provided */
3960/***/ (function(module, __webpack_exports__, __webpack_require__) {
3961
3962"use strict";
3963__webpack_require__.r(__webpack_exports__);
3964/* harmony import */ var _js_main_script__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../js/main.script */ "./src/js/main.script.js");
3965
3966
3967
3968
3969(function ($, Drupal) {
3970  $(document).ready(function () {
3971    console.log('THIS IS RUNNING'); // Carousel 3 Items Max.
3972
3973    var slider = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
3974      "container": ".path-about-us .product-category__row, .path-a-propos .path-home .product-category__row, .product-category__row",
3975      "items": 1,
3976      "loop": false,
3977      "center": true,
3978      "swipeAngle": false,
3979      "speed": 400,
3980      "nav": true,
3981      "controlsContainer": ".product-category__controls",
3982      "prevButton": ".product-category__carousel-prev",
3983      "nextButton": ".product-category__carousel-next",
3984      "edgePadding": 0,
3985      "gutter": 0,
3986      // "controlsPosition": "bottom",
3987      "responsive": {
3988        // "500": {
3989        "576": {
3990          "items": 2,
3991          "center": false
3992        },
3993        "768": {
3994          "slideBy": "page",
3995          "items": 3,
3996          "center": false
3997        },
3998        "1200": {
3999          "slideBy": "page",
4000          "items": 4 // "gutter": 0,
4001
4002        }
4003      }
4004    });
4005    $('.product-category__col .product').each(function (index) {
4006      var bgImage = $(this).css('background-image');
4007      console.log('GETTING IMAGE');
4008
4009      if (bgImage && bgImage !== 'none') {
4010        $('.tns-nav button').eq(index).css({
4011          'background-image': bgImage,
4012          'background-size': 'cover',
4013          'background-position': 'center',
4014          'background-repeat': 'no-repeat'
4015        });
4016        console.log('IMAGE UPDATED');
4017      }
4018    });
4019  });
4020})(jQuery, Drupal);
4021
4022/***/ }),
4023
4024/***/ "./src/js/main.script.js":
4025/*!*******************************!*\
4026  !*** ./src/js/main.script.js ***!
4027  \*******************************/
4028/*! exports provided: tns */
4029/***/ (function(module, __webpack_exports__, __webpack_require__) {
4030
4031"use strict";
4032__webpack_require__.r(__webpack_exports__);
4033/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill */ "./src/js/polyfill.js");
4034/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_polyfill__WEBPACK_IMPORTED_MODULE_0__);
4035/* harmony import */ var _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/tiny-slider/src/tiny-slider */ "./node_modules/tiny-slider/src/tiny-slider.js");
4036/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__["tns"]; });
4037
4038
4039
4040 // import 'bootstrap';
4041
4042
4043
4044
4045(function ($, Drupal, drupalSettings) {
4046  // Responsive check helper:
4047  // USAGE: if (Drupal.device.isMobile()) {}
4048  Drupal.device = {
4049    isDesktop: function isDesktop() {
4050      return $(window).innerWidth() > 980;
4051    },
4052    isTablet: function isTablet() {
4053      return $(window).innerWidth() <= 980 && $(window).innerWidth() > 728;
4054    },
4055    isMobile: function isMobile() {
4056      return $(window).innerWidth() <= 728;
4057    }
4058  };
4059  setTimeout(function () {
4060    $("#where-to-buy .wtb-title .more-link a").addClass("btn btn-primary");
4061  }, 1000); // Let the document know when the mouse is being used
4062
4063  document.body.addEventListener("mousedown", function () {
4064    document.body.classList.add("using-mouse");
4065  }); // Re-enable focus styling when Tab is pressed
4066
4067  document.body.addEventListener("keydown", function (event) {
4068    if (event.keyCode === 9) {
4069      document.body.classList.remove("using-mouse");
4070    }
4071  });
4072  $(".webform-email").attr("autocomplete", "email");
4073  $(".webform-email-confirm").attr("autocomplete", "email-confirm");
4074  $("#ajax-wrapper .js-form-item-image-upload small #edit-image-upload--description").append("<small> No file chosen.</small>");
4075  Drupal.behaviors.Bc_brandTheme = {
4076    attach: function attach(context, settings) {
4077      var host = window.location.host;
4078      $('a[href^="http"]:not([href*="' + host + '"])').each(function (index) {
4079        $(this).attr("rel", "noopener nofollow");
4080      });
4081      $('[data-toggle="popover"]').each(function (index) {
4082        var $this = $(this);
4083        var $container = $this.closest("div");
4084        $container.addClass("has-popover");
4085        $this.appendTo($container);
4086        $this.popover({
4087          template: '<div class="popover" role="tooltip"><div class="popover-body"></div></div>',
4088          container: $container
4089        });
4090      });
4091      $(".webform-submission-newsletter-form-form .form-item-postal-code input").inputmask({
4092        mask: ["99999", "99999-9999", "A9A 9A9"],
4093        placeholder: "",
4094        clearIncomplete: true
4095      }); // let optionsRegion = $('#region-select').html();
4096      // console.log("options",  optionsRegion);
4097      // $('#region-select-footer').append(optionsRegion);
4098      // tns carousel remove tabindex.
4099      // $('.tns-carousel > .tns-item').removeAttr('tabindex', 'aria-hidden');
4100
4101      /**
4102       * SHARE COMPONENT
4103       */
4104
4105      /**
4106       * Determine the mobile operating system.
4107       * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
4108       * Based on: https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system
4109       * @returns {String}
4110       */
4111
4112      function isAndroidIOS() {
4113        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
4114
4115        if (/android/i.test(userAgent)) {
4116          console.log("android detected");
4117          return true;
4118        } // iOS detection from: http://stackoverflow.com/a/9039885/177710
4119
4120
4121        if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
4122          console.log("ios detected");
4123          return true;
4124        } //not Android or iOS
4125
4126
4127        return false;
4128      }
4129
4130      function getMeta(metaName) {
4131        var metas = document.getElementsByTagName("meta");
4132
4133        for (var i = 0; i < metas.length; i++) {
4134          if (metas[i].getAttribute("name") === metaName) {
4135            return metas[i].getAttribute("content");
4136          }
4137        }
4138
4139        return "";
4140      }
4141
4142      $(".share-button", context).on("click", function () {
4143        var isMobile = isAndroidIOS();
4144        console.log(isMobile);
4145
4146        if (navigator.share && isMobile) {
4147          navigator.share({
4148            title: document.title,
4149            text: getMeta("description"),
4150            url: document.href
4151          }).then(function () {
4152            return console.log("Successful share");
4153          })["catch"](function (error) {
4154            return console.log("Error sharing", error);
4155          });
4156          return null;
4157        }
4158
4159        $(this).toggleClass("opened"); // $(this).find('.icon').toggleClass('icon-share-close icon-share');
4160
4161        $(".sharebox").toggleClass("opened");
4162
4163        if ($(this).hasClass("opened")) {
4164          $(this).attr("aria-expanded", "true");
4165        } else {
4166          $(this).attr("aria-expanded", "false");
4167        } // $('.sharebox .close').focus();
4168
4169      }); // $('.sharebox .close').on('click', function () {
4170      //   $(this).parents('.opened').removeClass('opened');
4171      // });
4172
4173      var $temp = $("<input>");
4174      var $url = $(location).attr("href");
4175      $(".sharebox .copybutton").on("click", function () {
4176        // $('.copyfield input')[0].select();
4177        // document.execCommand('copy');
4178        $("body").append($temp);
4179        $temp.val($url).select();
4180        document.execCommand("copy");
4181        $temp.remove();
4182        $(".copyfield .copymessage").addClass("shown");
4183        setTimeout(function () {
4184          $(".copyfield .copymessage").removeClass("shown");
4185        }, 10000);
4186      });
4187      $("#navbar .navbar-brand", context).attr("tabindex", "0"); //Change Element type
4188
4189      $.fn.changeElementType = function (newType) {
4190        this.each(function () {
4191          var attrs = {};
4192          $.each(this.attributes, function (idx, attr) {
4193            attrs[attr.nodeName] = attr.nodeValue;
4194          });
4195          $(this).replaceWith(function () {
4196            return $("<" + newType + "/>", attrs).append($(this).contents());
4197          });
4198        });
4199      }; // $(".juicer-feed .slick-list .slick-track").changeElementType("ul");
4200      // $(".juicer-feed").changeElementType("div");
4201      // Detect Valid Keyboard Clicks
4202      // https://karlgroves.com/2014/11/24/ridiculously-easy-trick-for-keyboard-accessibility
4203
4204
4205      function a11yClick(event) {
4206        if (event.type === "click") {
4207          return true;
4208        } else if (event.type === "keypress") {
4209          var code = event.charCode || event.keyCode;
4210
4211          if (code === 32 || code === 13) {
4212            return true;
4213          }
4214        } else {
4215          return false;
4216        }
4217      } // Juicer/Slick accessibility tweaks.
4218      // $("#block-juiceren .juicer-feed").changeElementType("div");
4219      // $(".j-overlay .j-close span").html('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
4220
4221
4222      $("#block-juiceren .juicer-feed").on("init", function (e, slick) {
4223        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active");
4224        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4225        setTimeout(function () {
4226          // Set slick's accessibility option to false as recommended here:
4227          // https://hub.accessible360.com/kb/articles/521#heading-tip-3-disable-accessibility-mode
4228          if ($("#block-juiceren .juicer-feed").hasClass("slick-initialized")) {
4229            $("#block-juiceren .juicer-feed.slick-initialized").slick("slickSetOption", {
4230              accessibility: false
4231            }, true);
4232          }
4233
4234          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4235        }, 1000);
4236        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text a").removeAttr("tabindex").css("color", "white").changeElementType("span");
4237        $("#block-juiceren .juicer-feed .slick-list").find(".slick-track .feed-item").attr("role", "group");
4238        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text .j-meta nav").addClass("j-meta-nav").changeElementType("div");
4239        $("#block-juiceren .juicer-feed .slick-list .feed-item").on("click", function () {
4240          window.open($(this).find("a").attr("href")); // console.log('test');
4241
4242          return false;
4243        }); // Play icon.
4244
4245        var $imageVideo = $("#block-juiceren .juicer-feed .slick-list .feed-item.j-video .j-image");
4246        var playIcon = '<span class="j-video-icon" aria-hidden="true"></span>';
4247        $imageVideo.append(playIcon);
4248        $("#block-juiceren .juicer-feed .slick-list .feed-item", context).each(function (i, e) {
4249          var alt = $(e).find(".j-image img").attr("alt"),
4250              message = $(e).find(".j-message").text(),
4251              label = Number($(e).attr("data-slick-index")) + 1,
4252              totalSlide = $("#block-juiceren .juicer-feed .slick-list .feed-item").length;
4253          $(e).attr({
4254            "aria-label": "Slide " + label + " of " + totalSlide
4255          }); // if (alt) {
4256          // $(e).find(".j-image img").attr("alt", alt.replace('Photo from ', ''));
4257          // }
4258
4259          $(e).find(".j-image img").attr("alt", message); // Social icon screen reader text.
4260
4261          var $social = $(this).find(".j-social");
4262          var socialIcon = '<span class="j-social-icon" aria-hidden="true"></span> <span class="sr-only">' + $social.attr("aria-label") + "</span>";
4263          $social.append(socialIcon).removeAttr("aria-label");
4264        });
4265        $(".slick-next, .slick-prev").on("click keypress", function (event) {
4266          if (a11yClick(event) === true) {
4267            setTimeout(function () {
4268              $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active a").first().focus();
4269            }, 100);
4270          }
4271        }); //update all j-meta a tags to say comments or likes
4272
4273        $(".comments, .repins").each(function () {
4274          var numComments = $(this).text();
4275          $(this).html(numComments + ' <span class="sr-only">comments</div>');
4276        });
4277        $(".likes").each(function () {
4278          var numLikes = $(this).text();
4279          $(this).html(numLikes + ' <span class="sr-only">likes</div>');
4280        });
4281      });
4282      $("#block-juiceren .juicer-feed").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
4283        $("#block-juiceren .juicer-feed .slick-list .feed-item").removeAttr("aria-hidden");
4284      });
4285      $("#block-juiceren .juicer-feed").on("afterChange", function (e, slick, currentSlide) {
4286        setTimeout(function () {
4287          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4288        }, 500);
4289      });
4290
4291      if ($("#prodH1").length > 0) {
4292        var root = document.getElementById("prodH1");
4293        root.style.setProperty("--h1-height", root.clientHeight + "px");
4294        $(".products--full").addClass("loaded");
4295        console.log("root.clientHeight", root.clientHeight);
4296      }
4297    }
4298  };
4299  setTimeout(function () {
4300    $(".path-sitemap .field-title a, .path-plan-du-site .field-title a").each(function () {
4301      var $this = $(this),
4302          content = $this.text().replace(/&#174;/g, "®").replace(/&#174/g, "®").replace(/&#127338;/g, "🅪").replace(/&#127339;/g, "🅫").replace(/&#8482;/g, "™");
4303      $this.text(content);
4304    });
4305    $(".j-overlay .j-close").append('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
4306  }, 100); // if ($("img[alt]").text === "[mtools:empty]") {
4307  //   console.log("origAlt");
4308  // }
4309
4310  $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
4311
4312  Drupal.behaviors.gameSliderControls = {
4313    attach: function attach(context, settings) {
4314      if ($(".game-slider").length > 0) {
4315        $(".game-slider .tns-controls").removeAttr("aria-label");
4316        $(".game-slider .tns-controls").removeAttr("tabindex");
4317        $(".game-slider__next").attr("tabindex", "0");
4318      }
4319    }
4320  }; //on click of "esc" key it closes the modal popup
4321
4322  $(document).on("keydown", function (event) {
4323    if ($("body").hasClass("mm-ocd-opened")) {
4324      if (event.key === "Escape" || event.key == "Esc") {
4325        $("#main-menu-button-close").click();
4326      }
4327    }
4328  });
4329
4330  function modalTabLock() {
4331    //Prevent Shift + Tab to focus outside of the Modal
4332    $(".page__header input, .page__header .btn").on("keydown", function (e) {
4333      if (e.which === 9 && e.shiftKey) {
4334        setTimeout(function () {
4335          $(".navbar-actions .icon-search").focus();
4336        }, 10);
4337      }
4338    }); //Prevent Tab to focus outside of the Modal
4339
4340    $(".page__header .btn").on("keydown", function (e) {
4341      if (e.which === 9 && !e.shiftKey) {
4342        e.preventDefault();
4343        setTimeout(function () {
4344          $(".navbar-actions .icon-search").focus();
4345        }, 10);
4346      }
4347    });
4348  }
4349
4350  setTimeout(function () {
4351    modalTabLock();
4352  }, 100);
4353  Drupal.behaviors.imageAlt = {
4354    attach: function attach(context, settings) {
4355      $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt='[mtools:empty]'").attr("alt", "");
4356      // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
4357      // var altText = $("img").getAttribute("alt");
4358      // if($("img").attr("alt") === "[mtools:empty]") {
4359      //   $(this).attr("alt", "");
4360      // }
4361
4362      $('img[alt="[mtools:empty]"]').each(function () {
4363        // `this` is the div
4364        $(this).attr("alt", "");
4365      });
4366    }
4367  };
4368})(jQuery, Drupal, drupalSettings);
4369
4370/***/ }),
4371
vendor: 4,438 bytes, lines 4372-4483
4372/***/ "./src/js/polyfill.js":
4373/*!****************************!*\
4374  !*** ./src/js/polyfill.js ***!
4375  \****************************/
4376/*! no static exports found */
4377/***/ (function(module, exports) {
4378
4379// Add your JS/node package pollyfills here
4380
4381/***/ }),
4382
4383/***/ 17:
4384/*!***********************************************************************!*\
4385  !*** multi ./src/components/product-categories/product-categories.js ***!
4386  \***********************************************************************/
4387/*! no static exports found */
4388/***/ (function(module, exports, __webpack_require__) {
4389
4390module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/product-categories/product-categories.js */"./src/components/product-categories/product-categories.js");
4391
4392
4393/***/ })
4394
4395/******/ });;
4396/******/ (function(modules) { // webpackBootstrap
4397/******/ 	// The module cache
4398/******/ 	var installedModules = {};
4399/******/
4400/******/ 	// The require function
4401/******/ 	function __webpack_require__(moduleId) {
4402/******/
4403/******/ 		// Check if module is in cache
4404/******/ 		if(installedModules[moduleId]) {
4405/******/ 			return installedModules[moduleId].exports;
4406/******/ 		}
4407/******/ 		// Create a new module (and put it into the cache)
4408/******/ 		var module = installedModules[moduleId] = {
4409/******/ 			i: moduleId,
4410/******/ 			l: false,
4411/******/ 			exports: {}
4412/******/ 		};
4413/******/
4414/******/ 		// Execute the module function
4415/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
4416/******/
4417/******/ 		// Flag the module as loaded
4418/******/ 		module.l = true;
4419/******/
4420/******/ 		// Return the exports of the module
4421/******/ 		return module.exports;
4422/******/ 	}
4423/******/
4424/******/
4425/******/ 	// expose the modules object (__webpack_modules__)
4426/******/ 	__webpack_require__.m = modules;
4427/******/
4428/******/ 	// expose the module cache
4429/******/ 	__webpack_require__.c = installedModules;
4430/******/
4431/******/ 	// define getter function for harmony exports
4432/******/ 	__webpack_require__.d = function(exports, name, getter) {
4433/******/ 		if(!__webpack_require__.o(exports, name)) {
4434/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
4435/******/ 		}
4436/******/ 	};
4437/******/
4438/******/ 	// define __esModule on exports
4439/******/ 	__webpack_require__.r = function(exports) {
4440/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4441/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4442/******/ 		}
4443/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
4444/******/ 	};
4445/******/
4446/******/ 	// create a fake namespace object
4447/******/ 	// mode & 1: value is a module id, require it
4448/******/ 	// mode & 2: merge all properties of value into the ns
4449/******/ 	// mode & 4: return value when already ns object
4450/******/ 	// mode & 8|1: behave like require
4451/******/ 	__webpack_require__.t = function(value, mode) {
4452/******/ 		if(mode & 1) value = __webpack_require__(value);
4453/******/ 		if(mode & 8) return value;
4454/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
4455/******/ 		var ns = Object.create(null);
4456/******/ 		__webpack_require__.r(ns);
4457/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
4458/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
4459/******/ 		return ns;
4460/******/ 	};
4461/******/
4462/******/ 	// getDefaultExport function for compatibility with non-harmony modules
4463/******/ 	__webpack_require__.n = function(module) {
4464/******/ 		var getter = module && module.__esModule ?
4465/******/ 			function getDefault() { return module['default']; } :
4466/******/ 			function getModuleExports() { return module; };
4467/******/ 		__webpack_require__.d(getter, 'a', getter);
4468/******/ 		return getter;
4469/******/ 	};
4470/******/
4471/******/ 	// Object.prototype.hasOwnProperty.call
4472/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
4473/******/
4474/******/ 	// __webpack_public_path__
4475/******/ 	__webpack_require__.p = "/";
4476/******/
4477/******/
4478/******/ 	// Load entry module and return exports
4479/******/ 	return __webpack_require__(__webpack_require__.s = 27);
4480/******/ })
4481/************************************************************************/
4482/******/ ({
4483
vendor: 970 bytes, lines 4484-4506
4484/***/ "./node_modules/tiny-slider/src/helpers/addCSSRule.js":
4485/*!************************************************************!*\
4486  !*** ./node_modules/tiny-slider/src/helpers/addCSSRule.js ***!
4487  \************************************************************/
4488/*! exports provided: addCSSRule */
4489/***/ (function(module, __webpack_exports__, __webpack_require__) {
4490
4491"use strict";
4492__webpack_require__.r(__webpack_exports__);
4493/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addCSSRule", function() { return addCSSRule; });
4494/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
4495// cross browsers addRule method
4496
4497function addCSSRule(sheet, selector, rules, index) {
4498  // return raf(function() {
4499    'insertRule' in sheet ?
4500      sheet.insertRule(selector + '{' + rules + '}', index) :
4501      sheet.addRule(selector, rules, index);
4502  // });
4503}
4504
4505/***/ }),
4506
vendor: 1,082 bytes, lines 4507-4530
4507/***/ "./node_modules/tiny-slider/src/helpers/addClass.js":
4508/*!**********************************************************!*\
4509  !*** ./node_modules/tiny-slider/src/helpers/addClass.js ***!
4510  \**********************************************************/
4511/*! exports provided: addClass */
4512/***/ (function(module, __webpack_exports__, __webpack_require__) {
4513
4514"use strict";
4515__webpack_require__.r(__webpack_exports__);
4516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
4517/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
4518
4519var addClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
4520    function (el, str) {
4521      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.add(str); }
4522    } :
4523    function (el, str) {
4524      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.className += ' ' + str; }
4525    };
4526
4527
4528
4529/***/ }),
4530
vendor: 1,023 bytes, lines 4531-4552
4531/***/ "./node_modules/tiny-slider/src/helpers/addEvents.js":
4532/*!***********************************************************!*\
4533  !*** ./node_modules/tiny-slider/src/helpers/addEvents.js ***!
4534  \***********************************************************/
4535/*! exports provided: addEvents */
4536/***/ (function(module, __webpack_exports__, __webpack_require__) {
4537
4538"use strict";
4539__webpack_require__.r(__webpack_exports__);
4540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEvents", function() { return addEvents; });
4541/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
4542
4543
4544function addEvents(el, obj, preventScrolling) {
4545  for (var prop in obj) {
4546    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
4547    el.addEventListener(prop, obj[prop], option);
4548  }
4549}
4550
4551/***/ }),
4552
vendor: 745 bytes, lines 4553-4572
4553/***/ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js":
4554/*!*******************************************************************!*\
4555  !*** ./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js ***!
4556  \*******************************************************************/
4557/*! exports provided: arrayFromNodeList */
4558/***/ (function(module, __webpack_exports__, __webpack_require__) {
4559
4560"use strict";
4561__webpack_require__.r(__webpack_exports__);
4562/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayFromNodeList", function() { return arrayFromNodeList; });
4563function arrayFromNodeList (nl) {
4564  var arr = [];
4565  for (var i = 0, l = nl.length; i < l; i++) {
4566    arr.push(nl[i]);
4567  }
4568  return arr;
4569}
4570
4571/***/ }),
4572
vendor: 637 bytes, lines 4573-4591
4573/***/ "./node_modules/tiny-slider/src/helpers/caf.js":
4574/*!*****************************************************!*\
4575  !*** ./node_modules/tiny-slider/src/helpers/caf.js ***!
4576  \*****************************************************/
4577/*! exports provided: caf */
4578/***/ (function(module, __webpack_exports__, __webpack_require__) {
4579
4580"use strict";
4581__webpack_require__.r(__webpack_exports__);
4582/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caf", function() { return caf; });
4583var win = window;
4584
4585var caf = win.cancelAnimationFrame
4586  || win.mozCancelAnimationFrame
4587  || function(id){ clearTimeout(id); };
4588
4589
4590/***/ }),
4591
vendor: 1,914 bytes, lines 4592-4640
4592/***/ "./node_modules/tiny-slider/src/helpers/calc.js":
4593/*!******************************************************!*\
4594  !*** ./node_modules/tiny-slider/src/helpers/calc.js ***!
4595  \******************************************************/
4596/*! exports provided: calc */
4597/***/ (function(module, __webpack_exports__, __webpack_require__) {
4598
4599"use strict";
4600__webpack_require__.r(__webpack_exports__);
4601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calc", function() { return calc; });
4602/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
4603/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
4604/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
4605// get css-calc 
4606// @return - false | calc | -webkit-calc | -moz-calc
4607// @usage - var calc = getCalc(); 
4608
4609
4610
4611
4612function calc() {
4613  var doc = document, 
4614      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
4615      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
4616      div = doc.createElement('div'), 
4617      result = false;
4618
4619  body.appendChild(div);
4620  try {
4621    var str = '(10px * 10)',
4622        vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],
4623        val;
4624    for (var i = 0; i < 3; i++) {
4625      val = vals[i];
4626      div.style.width = val;
4627      if (div.offsetWidth === 100) { 
4628        result = val.replace(str, ''); 
4629        break;
4630      }
4631    }
4632  } catch (e) {}
4633  
4634  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
4635
4636  return result;
4637}
4638
4639/***/ }),
4640
vendor: 722 bytes, lines 4641-4656
4641/***/ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js":
4642/*!*******************************************************************!*\
4643  !*** ./node_modules/tiny-slider/src/helpers/checkStorageValue.js ***!
4644  \*******************************************************************/
4645/*! exports provided: checkStorageValue */
4646/***/ (function(module, __webpack_exports__, __webpack_require__) {
4647
4648"use strict";
4649__webpack_require__.r(__webpack_exports__);
4650/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkStorageValue", function() { return checkStorageValue; });
4651function checkStorageValue (value) {
4652  return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;
4653}
4654
4655/***/ }),
4656
vendor: 667 bytes, lines 4657-4670
4657/***/ "./node_modules/tiny-slider/src/helpers/classListSupport.js":
4658/*!******************************************************************!*\
4659  !*** ./node_modules/tiny-slider/src/helpers/classListSupport.js ***!
4660  \******************************************************************/
4661/*! exports provided: classListSupport */
4662/***/ (function(module, __webpack_exports__, __webpack_require__) {
4663
4664"use strict";
4665__webpack_require__.r(__webpack_exports__);
4666/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return classListSupport; });
4667var classListSupport = 'classList' in document.createElement('_');
4668
4669/***/ }),
4670
vendor: 1,359 bytes, lines 4671-4705
4671/***/ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js":
4672/*!******************************************************************!*\
4673  !*** ./node_modules/tiny-slider/src/helpers/createStyleSheet.js ***!
4674  \******************************************************************/
4675/*! exports provided: createStyleSheet */
4676/***/ (function(module, __webpack_exports__, __webpack_require__) {
4677
4678"use strict";
4679__webpack_require__.r(__webpack_exports__);
4680/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStyleSheet", function() { return createStyleSheet; });
4681// create and append style sheet
4682function createStyleSheet (media, nonce) {
4683  // Create the <style> tag
4684  var style = document.createElement("style");
4685  // style.setAttribute("type", "text/css");
4686
4687  // Add a media (and/or media query) here if you'd like!
4688  // style.setAttribute("media", "screen")
4689  // style.setAttribute("media", "only screen and (max-width : 1024px)")
4690  if (media) { style.setAttribute("media", media); }
4691
4692  // Add nonce attribute for Content Security Policy
4693  if (nonce) { style.setAttribute("nonce", nonce); }
4694
4695  // WebKit hack :(
4696  // style.appendChild(document.createTextNode(""));
4697
4698  // Add the <style> element to the page
4699  document.querySelector('head').appendChild(style);
4700
4701  return style.sheet ? style.sheet : style.styleSheet;
4702};
4703
4704/***/ }),
4705
vendor: 601 bytes, lines 4706-4719
4706/***/ "./node_modules/tiny-slider/src/helpers/docElement.js":
4707/*!************************************************************!*\
4708  !*** ./node_modules/tiny-slider/src/helpers/docElement.js ***!
4709  \************************************************************/
4710/*! exports provided: docElement */
4711/***/ (function(module, __webpack_exports__, __webpack_require__) {
4712
4713"use strict";
4714__webpack_require__.r(__webpack_exports__);
4715/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "docElement", function() { return docElement; });
4716var docElement = document.documentElement;
4717
4718/***/ }),
4719
vendor: 1,234 bytes, lines 4720-4759
4720/***/ "./node_modules/tiny-slider/src/helpers/events.js":
4721/*!********************************************************!*\
4722  !*** ./node_modules/tiny-slider/src/helpers/events.js ***!
4723  \********************************************************/
4724/*! exports provided: Events */
4725/***/ (function(module, __webpack_exports__, __webpack_require__) {
4726
4727"use strict";
4728__webpack_require__.r(__webpack_exports__);
4729/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
4730function Events() {
4731  return {
4732    topics: {},
4733    on: function (eventName, fn) {
4734      this.topics[eventName] = this.topics[eventName] || [];
4735      this.topics[eventName].push(fn);
4736    },
4737    off: function(eventName, fn) {
4738      if (this.topics[eventName]) {
4739        for (var i = 0; i < this.topics[eventName].length; i++) {
4740          if (this.topics[eventName][i] === fn) {
4741            this.topics[eventName].splice(i, 1);
4742            break;
4743          }
4744        }
4745      }
4746    },
4747    emit: function (eventName, data) {
4748      data.type = eventName;
4749      if (this.topics[eventName]) {
4750        this.topics[eventName].forEach(function(fn) {
4751          fn(data, eventName);
4752        });
4753      }
4754    }
4755  };
4756};
4757
4758/***/ }),
4759
vendor: 947 bytes, lines 4760-4793
4760/***/ "./node_modules/tiny-slider/src/helpers/extend.js":
4761/*!********************************************************!*\
4762  !*** ./node_modules/tiny-slider/src/helpers/extend.js ***!
4763  \********************************************************/
4764/*! exports provided: extend */
4765/***/ (function(module, __webpack_exports__, __webpack_require__) {
4766
4767"use strict";
4768__webpack_require__.r(__webpack_exports__);
4769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
4770function extend() {
4771  var obj, name, copy,
4772      target = arguments[0] || {},
4773      i = 1,
4774      length = arguments.length;
4775
4776  for (; i < length; i++) {
4777    if ((obj = arguments[i]) !== null) {
4778      for (name in obj) {
4779        copy = obj[name];
4780
4781        if (target === copy) {
4782          continue;
4783        } else if (copy !== undefined) {
4784          target[name] = copy;
4785        }
4786      }
4787    }
4788  }
4789  return target;
4790}
4791
4792/***/ }),
4793
vendor: 739 bytes, lines 4794-4812
4794/***/ "./node_modules/tiny-slider/src/helpers/forEach.js":
4795/*!*********************************************************!*\
4796  !*** ./node_modules/tiny-slider/src/helpers/forEach.js ***!
4797  \*********************************************************/
4798/*! exports provided: forEach */
4799/***/ (function(module, __webpack_exports__, __webpack_require__) {
4800
4801"use strict";
4802__webpack_require__.r(__webpack_exports__);
4803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
4804// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
4805function forEach (arr, callback, scope) {
4806  for (var i = 0, l = arr.length; i < l; i++) {
4807    callback.call(scope, arr[i], i);
4808  }
4809}
4810
4811/***/ }),
4812
vendor: 600 bytes, lines 4813-4828
4813/***/ "./node_modules/tiny-slider/src/helpers/getAttr.js":
4814/*!*********************************************************!*\
4815  !*** ./node_modules/tiny-slider/src/helpers/getAttr.js ***!
4816  \*********************************************************/
4817/*! exports provided: getAttr */
4818/***/ (function(module, __webpack_exports__, __webpack_require__) {
4819
4820"use strict";
4821__webpack_require__.r(__webpack_exports__);
4822/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttr", function() { return getAttr; });
4823function getAttr(el, attr) {
4824  return el.getAttribute(attr);
4825}
4826
4827/***/ }),
4828
vendor: 702 bytes, lines 4829-4852
4829/***/ "./node_modules/tiny-slider/src/helpers/getBody.js":
4830/*!*********************************************************!*\
4831  !*** ./node_modules/tiny-slider/src/helpers/getBody.js ***!
4832  \*********************************************************/
4833/*! exports provided: getBody */
4834/***/ (function(module, __webpack_exports__, __webpack_require__) {
4835
4836"use strict";
4837__webpack_require__.r(__webpack_exports__);
4838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBody", function() { return getBody; });
4839function getBody () {
4840  var doc = document,
4841      body = doc.body;
4842
4843  if (!body) {
4844    body = doc.createElement('body');
4845    body.fake = true;
4846  }
4847
4848  return body;
4849}
4850
4851/***/ }),
4852
vendor: 736 bytes, lines 4853-4869
4853/***/ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js":
4854/*!*******************************************************************!*\
4855  !*** ./node_modules/tiny-slider/src/helpers/getCssRulesLength.js ***!
4856  \*******************************************************************/
4857/*! exports provided: getCssRulesLength */
4858/***/ (function(module, __webpack_exports__, __webpack_require__) {
4859
4860"use strict";
4861__webpack_require__.r(__webpack_exports__);
4862/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCssRulesLength", function() { return getCssRulesLength; });
4863function getCssRulesLength(sheet) {
4864  var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules;
4865  return rule.length;
4866}
4867
4868/***/ }),
4869
vendor: 1,105 bytes, lines 4870-4897
4870/***/ "./node_modules/tiny-slider/src/helpers/getEndProperty.js":
4871/*!****************************************************************!*\
4872  !*** ./node_modules/tiny-slider/src/helpers/getEndProperty.js ***!
4873  \****************************************************************/
4874/*! exports provided: getEndProperty */
4875/***/ (function(module, __webpack_exports__, __webpack_require__) {
4876
4877"use strict";
4878__webpack_require__.r(__webpack_exports__);
4879/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEndProperty", function() { return getEndProperty; });
4880// get transitionend, animationend based on transitionDuration
4881// @propin: string
4882// @propOut: string, first-letter uppercase
4883// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd
4884function getEndProperty(propIn, propOut) {
4885  var endProp = false;
4886  if (/^Webkit/.test(propIn)) {
4887    endProp = 'webkit' + propOut + 'End';
4888  } else if (/^O/.test(propIn)) {
4889    endProp = 'o' + propOut + 'End';
4890  } else if (propIn) {
4891    endProp = propOut.toLowerCase() + 'end';
4892  }
4893  return endProp;
4894}
4895
4896/***/ }),
4897
vendor: 678 bytes, lines 4898-4916
4898/***/ "./node_modules/tiny-slider/src/helpers/getSlideId.js":
4899/*!************************************************************!*\
4900  !*** ./node_modules/tiny-slider/src/helpers/getSlideId.js ***!
4901  \************************************************************/
4902/*! exports provided: getSlideId */
4903/***/ (function(module, __webpack_exports__, __webpack_require__) {
4904
4905"use strict";
4906__webpack_require__.r(__webpack_exports__);
4907/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSlideId", function() { return getSlideId; });
4908function getSlideId() {
4909  var id = window.tnsId;
4910  window.tnsId = !id ? 1 : id + 1;
4911  
4912  return 'tns' + window.tnsId;
4913}
4914
4915/***/ }),
4916
vendor: 867 bytes, lines 4917-4941
4917/***/ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js":
4918/*!*******************************************************************!*\
4919  !*** ./node_modules/tiny-slider/src/helpers/getTouchDirection.js ***!
4920  \*******************************************************************/
4921/*! exports provided: getTouchDirection */
4922/***/ (function(module, __webpack_exports__, __webpack_require__) {
4923
4924"use strict";
4925__webpack_require__.r(__webpack_exports__);
4926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchDirection", function() { return getTouchDirection; });
4927function getTouchDirection(angle, range) {
4928  var direction = false,
4929      gap = Math.abs(90 - Math.abs(angle));
4930      
4931  if (gap >= 90 - range) {
4932    direction = 'horizontal';
4933  } else if (gap <= range) {
4934    direction = 'vertical';
4935  }
4936
4937  return direction;
4938}
4939
4940/***/ }),
4941
vendor: 1,957 bytes, lines 4942-4985
4942/***/ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js":
4943/*!*****************************************************************!*\
4944  !*** ./node_modules/tiny-slider/src/helpers/has3DTransforms.js ***!
4945  \*****************************************************************/
4946/*! exports provided: has3DTransforms */
4947/***/ (function(module, __webpack_exports__, __webpack_require__) {
4948
4949"use strict";
4950__webpack_require__.r(__webpack_exports__);
4951/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has3DTransforms", function() { return has3DTransforms; });
4952/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
4953/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
4954/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
4955
4956
4957
4958
4959function has3DTransforms(tf){
4960  if (!tf) { return false; }
4961  if (!window.getComputedStyle) { return false; }
4962  
4963  var doc = document,
4964      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
4965      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
4966      el = doc.createElement('p'),
4967      has3d,
4968      cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : '';
4969
4970  cssTF += 'transform';
4971
4972  // Add it to the body to get the computed style
4973  body.insertBefore(el, null);
4974
4975  el.style[tf] = 'translate3d(1px,1px,1px)';
4976  has3d = window.getComputedStyle(el).getPropertyValue(cssTF);
4977
4978  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : el.remove();
4979
4980  return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
4981}
4982
4983
4984/***/ }),
4985
vendor: 600 bytes, lines 4986-5001
4986/***/ "./node_modules/tiny-slider/src/helpers/hasAttr.js":
4987/*!*********************************************************!*\
4988  !*** ./node_modules/tiny-slider/src/helpers/hasAttr.js ***!
4989  \*********************************************************/
4990/*! exports provided: hasAttr */
4991/***/ (function(module, __webpack_exports__, __webpack_require__) {
4992
4993"use strict";
4994__webpack_require__.r(__webpack_exports__);
4995/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAttr", function() { return hasAttr; });
4996function hasAttr(el, attr) {
4997  return el.hasAttribute(attr);
4998}
4999
5000/***/ }),
5001
vendor: 1,162 bytes, lines 5002-5024
5002/***/ "./node_modules/tiny-slider/src/helpers/hasClass.js":
5003/*!**********************************************************!*\
5004  !*** ./node_modules/tiny-slider/src/helpers/hasClass.js ***!
5005  \**********************************************************/
5006/*! exports provided: classListSupport, hasClass */
5007/***/ (function(module, __webpack_exports__, __webpack_require__) {
5008
5009"use strict";
5010__webpack_require__.r(__webpack_exports__);
5011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; });
5012/* harmony import */ var _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classListSupport.js */ "./node_modules/tiny-slider/src/helpers/classListSupport.js");
5013/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"]; });
5014
5015
5016
5017var hasClass = _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
5018    function (el, str) { return el.classList.contains(str); } :
5019    function (el, str) { return el.className.indexOf(str) >= 0; };
5020
5021
5022
5023/***/ }),
5024
vendor: 671 bytes, lines 5025-5040
5025/***/ "./node_modules/tiny-slider/src/helpers/hideElement.js":
5026/*!*************************************************************!*\
5027  !*** ./node_modules/tiny-slider/src/helpers/hideElement.js ***!
5028  \*************************************************************/
5029/*! exports provided: hideElement */
5030/***/ (function(module, __webpack_exports__, __webpack_require__) {
5031
5032"use strict";
5033__webpack_require__.r(__webpack_exports__);
5034/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideElement", function() { return hideElement; });
5035function hideElement(el, forceHide) {
5036  if (el.style.display !== 'none') { el.style.display = 'none'; }
5037}
5038
5039/***/ }),
5040
vendor: 673 bytes, lines 5041-5057
5041/***/ "./node_modules/tiny-slider/src/helpers/isNodeList.js":
5042/*!************************************************************!*\
5043  !*** ./node_modules/tiny-slider/src/helpers/isNodeList.js ***!
5044  \************************************************************/
5045/*! exports provided: isNodeList */
5046/***/ (function(module, __webpack_exports__, __webpack_require__) {
5047
5048"use strict";
5049__webpack_require__.r(__webpack_exports__);
5050/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeList", function() { return isNodeList; });
5051function isNodeList(el) {
5052  // Only NodeList has the "item()" function
5053  return typeof el.item !== "undefined"; 
5054}
5055
5056/***/ }),
5057
vendor: 635 bytes, lines 5058-5073
5058/***/ "./node_modules/tiny-slider/src/helpers/isVisible.js":
5059/*!***********************************************************!*\
5060  !*** ./node_modules/tiny-slider/src/helpers/isVisible.js ***!
5061  \***********************************************************/
5062/*! exports provided: isVisible */
5063/***/ (function(module, __webpack_exports__, __webpack_require__) {
5064
5065"use strict";
5066__webpack_require__.r(__webpack_exports__);
5067/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
5068function isVisible(el) {
5069  return window.getComputedStyle(el).display !== 'none';
5070}
5071
5072/***/ }),
5073
vendor: 1,205 bytes, lines 5074-5106
5074/***/ "./node_modules/tiny-slider/src/helpers/jsTransform.js":
5075/*!*************************************************************!*\
5076  !*** ./node_modules/tiny-slider/src/helpers/jsTransform.js ***!
5077  \*************************************************************/
5078/*! exports provided: jsTransform */
5079/***/ (function(module, __webpack_exports__, __webpack_require__) {
5080
5081"use strict";
5082__webpack_require__.r(__webpack_exports__);
5083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsTransform", function() { return jsTransform; });
5084function jsTransform(element, attr, prefix, postfix, to, duration, callback) {
5085  var tick = Math.min(duration, 10),
5086      unit = (to.indexOf('%') >= 0) ? '%' : 'px',
5087      to = to.replace(unit, ''),
5088      from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),
5089      positionTick = (to - from) / duration * tick,
5090      running;
5091
5092  setTimeout(moveElement, tick);
5093  function moveElement() {
5094    duration -= tick;
5095    from += positionTick;
5096    element.style[attr] = prefix + from + unit + postfix;
5097    if (duration > 0) { 
5098      setTimeout(moveElement, tick); 
5099    } else {
5100      callback();
5101    }
5102  }
5103}
5104
5105/***/ }),
5106
vendor: 2,114 bytes, lines 5107-5158
5107/***/ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js":
5108/*!*******************************************************************!*\
5109  !*** ./node_modules/tiny-slider/src/helpers/mediaquerySupport.js ***!
5110  \*******************************************************************/
5111/*! exports provided: mediaquerySupport */
5112/***/ (function(module, __webpack_exports__, __webpack_require__) {
5113
5114"use strict";
5115__webpack_require__.r(__webpack_exports__);
5116/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mediaquerySupport", function() { return mediaquerySupport; });
5117/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
5118/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
5119/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
5120
5121
5122
5123
5124function mediaquerySupport () {
5125  if (window.matchMedia || window.msMatchMedia) {
5126    return true;
5127  }
5128  
5129  var doc = document,
5130      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
5131      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
5132      div = doc.createElement('div'),
5133      style = doc.createElement('style'),
5134      rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',
5135      position;
5136
5137  style.type = 'text/css';
5138  div.className = 'tns-mq-test';
5139
5140  body.appendChild(style);
5141  body.appendChild(div);
5142
5143  if (style.styleSheet) {
5144    style.styleSheet.cssText = rule;
5145  } else {
5146    style.appendChild(doc.createTextNode(rule));
5147  }
5148
5149  position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];
5150
5151  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
5152
5153  return position === "absolute";
5154}
5155
5156
5157/***/ }),
5158
vendor: 943 bytes, lines 5159-5182
5159/***/ "./node_modules/tiny-slider/src/helpers/passiveOption.js":
5160/*!***************************************************************!*\
5161  !*** ./node_modules/tiny-slider/src/helpers/passiveOption.js ***!
5162  \***************************************************************/
5163/*! exports provided: passiveOption */
5164/***/ (function(module, __webpack_exports__, __webpack_require__) {
5165
5166"use strict";
5167__webpack_require__.r(__webpack_exports__);
5168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "passiveOption", function() { return passiveOption; });
5169// Test via a getter in the options object to see if the passive property is accessed
5170var supportsPassive = false;
5171try {
5172  var opts = Object.defineProperty({}, 'passive', {
5173    get: function() {
5174      supportsPassive = true;
5175    }
5176  });
5177  window.addEventListener("test", null, opts);
5178} catch (e) {}
5179var passiveOption = supportsPassive ? { passive: true } : false;
5180
5181/***/ }),
5182
vendor: 2,093 bytes, lines 5183-5233
5183/***/ "./node_modules/tiny-slider/src/helpers/percentageLayout.js":
5184/*!******************************************************************!*\
5185  !*** ./node_modules/tiny-slider/src/helpers/percentageLayout.js ***!
5186  \******************************************************************/
5187/*! exports provided: percentageLayout */
5188/***/ (function(module, __webpack_exports__, __webpack_require__) {
5189
5190"use strict";
5191__webpack_require__.r(__webpack_exports__);
5192/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percentageLayout", function() { return percentageLayout; });
5193/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
5194/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
5195/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
5196// get subpixel support value
5197// @return - boolean
5198
5199
5200
5201
5202function percentageLayout() {
5203  // check subpixel layout supporting
5204  var doc = document,
5205      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
5206      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
5207      wrapper = doc.createElement('div'),
5208      outer = doc.createElement('div'),
5209      str = '',
5210      count = 70,
5211      perPage = 3,
5212      supported = false;
5213
5214  wrapper.className = "tns-t-subp2";
5215  outer.className = "tns-t-ct";
5216
5217  for (var i = 0; i < count; i++) {
5218    str += '<div></div>';
5219  }
5220
5221  outer.innerHTML = str;
5222  wrapper.appendChild(outer);
5223  body.appendChild(wrapper);
5224
5225  supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;
5226
5227  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : wrapper.remove();
5228
5229  return supported;
5230}
5231
5232/***/ }),
5233
vendor: 719 bytes, lines 5234-5254
5234/***/ "./node_modules/tiny-slider/src/helpers/raf.js":
5235/*!*****************************************************!*\
5236  !*** ./node_modules/tiny-slider/src/helpers/raf.js ***!
5237  \*****************************************************/
5238/*! exports provided: raf */
5239/***/ (function(module, __webpack_exports__, __webpack_require__) {
5240
5241"use strict";
5242__webpack_require__.r(__webpack_exports__);
5243/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "raf", function() { return raf; });
5244var win = window;
5245
5246var raf = win.requestAnimationFrame
5247  || win.webkitRequestAnimationFrame
5248  || win.mozRequestAnimationFrame
5249  || win.msRequestAnimationFrame
5250  || function(cb) { return setTimeout(cb, 16); };
5251
5252
5253/***/ }),
5254
vendor: 1,105 bytes, lines 5255-5281
5255/***/ "./node_modules/tiny-slider/src/helpers/removeAttrs.js":
5256/*!*************************************************************!*\
5257  !*** ./node_modules/tiny-slider/src/helpers/removeAttrs.js ***!
5258  \*************************************************************/
5259/*! exports provided: removeAttrs */
5260/***/ (function(module, __webpack_exports__, __webpack_require__) {
5261
5262"use strict";
5263__webpack_require__.r(__webpack_exports__);
5264/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAttrs", function() { return removeAttrs; });
5265/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
5266
5267
5268function removeAttrs(els, attrs) {
5269  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
5270  attrs = (attrs instanceof Array) ? attrs : [attrs];
5271
5272  var attrLength = attrs.length;
5273  for (var i = els.length; i--;) {
5274    for (var j = attrLength; j--;) {
5275      els[i].removeAttribute(attrs[j]);
5276    }
5277  }
5278}
5279
5280/***/ }),
5281
vendor: 933 bytes, lines 5282-5304
5282/***/ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js":
5283/*!***************************************************************!*\
5284  !*** ./node_modules/tiny-slider/src/helpers/removeCSSRule.js ***!
5285  \***************************************************************/
5286/*! exports provided: removeCSSRule */
5287/***/ (function(module, __webpack_exports__, __webpack_require__) {
5288
5289"use strict";
5290__webpack_require__.r(__webpack_exports__);
5291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCSSRule", function() { return removeCSSRule; });
5292/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
5293// cross browsers addRule method
5294
5295function removeCSSRule(sheet, index) {
5296  // return raf(function() {
5297    'deleteRule' in sheet ?
5298      sheet.deleteRule(index) :
5299      sheet.removeRule(index);
5300  // });
5301}
5302
5303/***/ }),
5304
vendor: 1,125 bytes, lines 5305-5328
5305/***/ "./node_modules/tiny-slider/src/helpers/removeClass.js":
5306/*!*************************************************************!*\
5307  !*** ./node_modules/tiny-slider/src/helpers/removeClass.js ***!
5308  \*************************************************************/
5309/*! exports provided: removeClass */
5310/***/ (function(module, __webpack_exports__, __webpack_require__) {
5311
5312"use strict";
5313__webpack_require__.r(__webpack_exports__);
5314/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; });
5315/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
5316
5317var removeClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
5318    function (el, str) {
5319      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.remove(str); }
5320    } :
5321    function (el, str) {
5322      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el, str)) { el.className = el.className.replace(str, ''); }
5323    };
5324
5325
5326
5327/***/ }),
5328
vendor: 1,011 bytes, lines 5329-5350
5329/***/ "./node_modules/tiny-slider/src/helpers/removeEvents.js":
5330/*!**************************************************************!*\
5331  !*** ./node_modules/tiny-slider/src/helpers/removeEvents.js ***!
5332  \**************************************************************/
5333/*! exports provided: removeEvents */
5334/***/ (function(module, __webpack_exports__, __webpack_require__) {
5335
5336"use strict";
5337__webpack_require__.r(__webpack_exports__);
5338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEvents", function() { return removeEvents; });
5339/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
5340
5341
5342function removeEvents(el, obj) {
5343  for (var prop in obj) {
5344    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
5345    el.removeEventListener(prop, obj[prop], option);
5346  }
5347}
5348
5349/***/ }),
5350
vendor: 1,108 bytes, lines 5351-5375
5351/***/ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js":
5352/*!***************************************************************!*\
5353  !*** ./node_modules/tiny-slider/src/helpers/resetFakeBody.js ***!
5354  \***************************************************************/
5355/*! exports provided: resetFakeBody */
5356/***/ (function(module, __webpack_exports__, __webpack_require__) {
5357
5358"use strict";
5359__webpack_require__.r(__webpack_exports__);
5360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetFakeBody", function() { return resetFakeBody; });
5361/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
5362
5363
5364function resetFakeBody (body, docOverflow) {
5365  if (body.fake) {
5366    body.remove();
5367    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = docOverflow;
5368    // Trigger layout so kinetic scrolling isn't disabled in iOS6+
5369    // eslint-disable-next-line
5370    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].offsetHeight;
5371  }
5372}
5373
5374/***/ }),
5375
vendor: 1,068 bytes, lines 5376-5401
5376/***/ "./node_modules/tiny-slider/src/helpers/setAttrs.js":
5377/*!**********************************************************!*\
5378  !*** ./node_modules/tiny-slider/src/helpers/setAttrs.js ***!
5379  \**********************************************************/
5380/*! exports provided: setAttrs */
5381/***/ (function(module, __webpack_exports__, __webpack_require__) {
5382
5383"use strict";
5384__webpack_require__.r(__webpack_exports__);
5385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAttrs", function() { return setAttrs; });
5386/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
5387
5388
5389function setAttrs(els, attrs) {
5390  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
5391  if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; }
5392
5393  for (var i = els.length; i--;) {
5394    for(var key in attrs) {
5395      els[i].setAttribute(key, attrs[key]);
5396    }
5397  }
5398}
5399
5400/***/ }),
5401
vendor: 1,310 bytes, lines 5402-5430
5402/***/ "./node_modules/tiny-slider/src/helpers/setFakeBody.js":
5403/*!*************************************************************!*\
5404  !*** ./node_modules/tiny-slider/src/helpers/setFakeBody.js ***!
5405  \*************************************************************/
5406/*! exports provided: setFakeBody */
5407/***/ (function(module, __webpack_exports__, __webpack_require__) {
5408
5409"use strict";
5410__webpack_require__.r(__webpack_exports__);
5411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFakeBody", function() { return setFakeBody; });
5412/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
5413
5414
5415function setFakeBody (body) {
5416  var docOverflow = '';
5417  if (body.fake) {
5418    docOverflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow;
5419    //avoid crashing IE8, if background image is used
5420    body.style.background = '';
5421    //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
5422    body.style.overflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = 'hidden';
5423    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].appendChild(body);
5424  }
5425
5426  return docOverflow;
5427}
5428
5429/***/ }),
5430
vendor: 741 bytes, lines 5431-5449
5431/***/ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js":
5432/*!*****************************************************************!*\
5433  !*** ./node_modules/tiny-slider/src/helpers/setLocalStorage.js ***!
5434  \*****************************************************************/
5435/*! exports provided: setLocalStorage */
5436/***/ (function(module, __webpack_exports__, __webpack_require__) {
5437
5438"use strict";
5439__webpack_require__.r(__webpack_exports__);
5440/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocalStorage", function() { return setLocalStorage; });
5441function setLocalStorage(storage, key, value, access) {
5442  if (access) {
5443    try { storage.setItem(key, value); } catch (e) {}
5444  }
5445  return value;
5446}
5447
5448/***/ }),
5449
vendor: 667 bytes, lines 5450-5465
5450/***/ "./node_modules/tiny-slider/src/helpers/showElement.js":
5451/*!*************************************************************!*\
5452  !*** ./node_modules/tiny-slider/src/helpers/showElement.js ***!
5453  \*************************************************************/
5454/*! exports provided: showElement */
5455/***/ (function(module, __webpack_exports__, __webpack_require__) {
5456
5457"use strict";
5458__webpack_require__.r(__webpack_exports__);
5459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showElement", function() { return showElement; });
5460function showElement(el, forceHide) {
5461  if (el.style.display === 'none') { el.style.display = ''; }
5462}
5463
5464/***/ }),
5465
vendor: 618 bytes, lines 5466-5481
5466/***/ "./node_modules/tiny-slider/src/helpers/toDegree.js":
5467/*!**********************************************************!*\
5468  !*** ./node_modules/tiny-slider/src/helpers/toDegree.js ***!
5469  \**********************************************************/
5470/*! exports provided: toDegree */
5471/***/ (function(module, __webpack_exports__, __webpack_require__) {
5472
5473"use strict";
5474__webpack_require__.r(__webpack_exports__);
5475/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return toDegree; });
5476function toDegree (y, x) {
5477  return Math.atan2(y, x) * (180 / Math.PI);
5478}
5479
5480/***/ }),
5481
vendor: 1,200 bytes, lines 5482-5519
5482/***/ "./node_modules/tiny-slider/src/helpers/whichProperty.js":
5483/*!***************************************************************!*\
5484  !*** ./node_modules/tiny-slider/src/helpers/whichProperty.js ***!
5485  \***************************************************************/
5486/*! exports provided: whichProperty */
5487/***/ (function(module, __webpack_exports__, __webpack_require__) {
5488
5489"use strict";
5490__webpack_require__.r(__webpack_exports__);
5491/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whichProperty", function() { return whichProperty; });
5492function whichProperty(props){
5493  if (typeof props === 'string') {
5494    var arr = [props],
5495        Props = props.charAt(0).toUpperCase() + props.substr(1),
5496        prefixes = ['Webkit', 'Moz', 'ms', 'O'];
5497        
5498    prefixes.forEach(function(prefix) {
5499      if (prefix !== 'ms' || props === 'transform') {
5500        arr.push(prefix + Props);
5501      }
5502    });
5503
5504    props = arr;
5505  }
5506
5507  var el = document.createElement('fakeelement'),
5508      len = props.length;
5509  for(var i = 0; i < props.length; i++){
5510    var prop = props[i];
5511    if( el.style[prop] !== undefined ){ return prop; }
5512  }
5513
5514  return false; // explicit for ie9-
5515}
5516
5517
5518/***/ }),
5519
vendor: 109,421 bytes, lines 5520-8333
5520/***/ "./node_modules/tiny-slider/src/tiny-slider.js":
5521/*!*****************************************************!*\
5522  !*** ./node_modules/tiny-slider/src/tiny-slider.js ***!
5523  \*****************************************************/
5524/*! exports provided: tns */
5525/***/ (function(module, __webpack_exports__, __webpack_require__) {
5526
5527"use strict";
5528__webpack_require__.r(__webpack_exports__);
5529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return tns; });
5530/* harmony import */ var _helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
5531/* harmony import */ var _helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/caf.js */ "./node_modules/tiny-slider/src/helpers/caf.js");
5532/* harmony import */ var _helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers/extend.js */ "./node_modules/tiny-slider/src/helpers/extend.js");
5533/* harmony import */ var _helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers/checkStorageValue.js */ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js");
5534/* harmony import */ var _helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers/setLocalStorage.js */ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js");
5535/* harmony import */ var _helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/getSlideId.js */ "./node_modules/tiny-slider/src/helpers/getSlideId.js");
5536/* harmony import */ var _helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers/calc.js */ "./node_modules/tiny-slider/src/helpers/calc.js");
5537/* harmony import */ var _helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers/percentageLayout.js */ "./node_modules/tiny-slider/src/helpers/percentageLayout.js");
5538/* harmony import */ var _helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers/mediaquerySupport.js */ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js");
5539/* harmony import */ var _helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/createStyleSheet.js */ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js");
5540/* harmony import */ var _helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/addCSSRule.js */ "./node_modules/tiny-slider/src/helpers/addCSSRule.js");
5541/* harmony import */ var _helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/removeCSSRule.js */ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js");
5542/* harmony import */ var _helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/getCssRulesLength.js */ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js");
5543/* harmony import */ var _helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./helpers/toDegree.js */ "./node_modules/tiny-slider/src/helpers/toDegree.js");
5544/* harmony import */ var _helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/getTouchDirection.js */ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js");
5545/* harmony import */ var _helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/forEach.js */ "./node_modules/tiny-slider/src/helpers/forEach.js");
5546/* harmony import */ var _helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
5547/* harmony import */ var _helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./helpers/addClass.js */ "./node_modules/tiny-slider/src/helpers/addClass.js");
5548/* harmony import */ var _helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./helpers/removeClass.js */ "./node_modules/tiny-slider/src/helpers/removeClass.js");
5549/* harmony import */ var _helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./helpers/hasAttr.js */ "./node_modules/tiny-slider/src/helpers/hasAttr.js");
5550/* harmony import */ var _helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./helpers/getAttr.js */ "./node_modules/tiny-slider/src/helpers/getAttr.js");
5551/* harmony import */ var _helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./helpers/setAttrs.js */ "./node_modules/tiny-slider/src/helpers/setAttrs.js");
5552/* harmony import */ var _helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./helpers/removeAttrs.js */ "./node_modules/tiny-slider/src/helpers/removeAttrs.js");
5553/* harmony import */ var _helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./helpers/arrayFromNodeList.js */ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js");
5554/* harmony import */ var _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./helpers/hideElement.js */ "./node_modules/tiny-slider/src/helpers/hideElement.js");
5555/* harmony import */ var _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./helpers/showElement.js */ "./node_modules/tiny-slider/src/helpers/showElement.js");
5556/* harmony import */ var _helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./helpers/isVisible.js */ "./node_modules/tiny-slider/src/helpers/isVisible.js");
5557/* harmony import */ var _helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./helpers/whichProperty.js */ "./node_modules/tiny-slider/src/helpers/whichProperty.js");
5558/* harmony import */ var _helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./helpers/has3DTransforms.js */ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js");
5559/* harmony import */ var _helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./helpers/getEndProperty.js */ "./node_modules/tiny-slider/src/helpers/getEndProperty.js");
5560/* harmony import */ var _helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./helpers/addEvents.js */ "./node_modules/tiny-slider/src/helpers/addEvents.js");
5561/* harmony import */ var _helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./helpers/removeEvents.js */ "./node_modules/tiny-slider/src/helpers/removeEvents.js");
5562/* harmony import */ var _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./helpers/events.js */ "./node_modules/tiny-slider/src/helpers/events.js");
5563/* harmony import */ var _helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./helpers/jsTransform.js */ "./node_modules/tiny-slider/src/helpers/jsTransform.js");
5564// Object.keys
5565if (!Object.keys) {
5566  Object.keys = function(object) {
5567    var keys = [];
5568    for (var name in object) {
5569      if (Object.prototype.hasOwnProperty.call(object, name)) {
5570        keys.push(name);
5571      }
5572    }
5573    return keys;
5574  };
5575}
5576
5577// ChildNode.remove
5578if(!("remove" in Element.prototype)){
5579  Element.prototype.remove = function(){
5580    if(this.parentNode) {
5581      this.parentNode.removeChild(this);
5582    }
5583  };
5584}
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621var tns = function(options) {
5622  options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])({
5623    container: '.slider',
5624    mode: 'carousel',
5625    axis: 'horizontal',
5626    items: 1,
5627    gutter: 0,
5628    edgePadding: 0,
5629    fixedWidth: false,
5630    autoWidth: false,
5631    viewportMax: false,
5632    slideBy: 1,
5633    center: false,
5634    controls: true,
5635    controlsPosition: 'top',
5636    controlsText: ['prev', 'next'],
5637    controlsContainer: false,
5638    prevButton: false,
5639    nextButton: false,
5640    nav: true,
5641    navPosition: 'top',
5642    navContainer: false,
5643    navAsThumbnails: false,
5644    arrowKeys: false,
5645    speed: 300,
5646    autoplay: false,
5647    autoplayPosition: 'top',
5648    autoplayTimeout: 5000,
5649    autoplayDirection: 'forward',
5650    autoplayText: ['start', 'stop'],
5651    autoplayHoverPause: false,
5652    autoplayButton: false,
5653    autoplayButtonOutput: true,
5654    autoplayResetOnVisibility: true,
5655    animateIn: 'tns-fadeIn',
5656    animateOut: 'tns-fadeOut',
5657    animateNormal: 'tns-normal',
5658    animateDelay: false,
5659    loop: true,
5660    rewind: false,
5661    autoHeight: false,
5662    responsive: false,
5663    lazyload: false,
5664    lazyloadSelector: '.tns-lazy-img',
5665    touch: true,
5666    mouseDrag: false,
5667    swipeAngle: 15,
5668    nested: false,
5669    preventActionWhenRunning: false,
5670    preventScrollOnTouch: false,
5671    freezable: true,
5672    onInit: false,
5673    useLocalStorage: true,
5674    nonce: false
5675  }, options || {});
5676
5677  var doc = document,
5678      win = window,
5679      KEYS = {
5680        ENTER: 13,
5681        SPACE: 32,
5682        LEFT: 37,
5683        RIGHT: 39
5684      },
5685      tnsStorage = {},
5686      localStorageAccess = options.useLocalStorage;
5687
5688  if (localStorageAccess) {
5689    // check browser version and local storage access
5690    var browserInfo = navigator.userAgent;
5691    var uid = new Date;
5692
5693    try {
5694      tnsStorage = win.localStorage;
5695      if (tnsStorage) {
5696        tnsStorage.setItem(uid, uid);
5697        localStorageAccess = tnsStorage.getItem(uid) == uid;
5698        tnsStorage.removeItem(uid);
5699      } else {
5700        localStorageAccess = false;
5701      }
5702      if (!localStorageAccess) { tnsStorage = {}; }
5703    } catch(e) {
5704      localStorageAccess = false;
5705    }
5706
5707    if (localStorageAccess) {
5708      // remove storage when browser version changes
5709      if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) {
5710        ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); });
5711      }
5712      // update browserInfo
5713      localStorage['tnsApp'] = browserInfo;
5714    }
5715  }
5716
5717  var CALC = tnsStorage['tC'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tC']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tC', Object(_helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__["calc"])(), localStorageAccess),
5718      PERCENTAGELAYOUT = tnsStorage['tPL'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tPL']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tPL', Object(_helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__["percentageLayout"])(), localStorageAccess),
5719      CSSMQ = tnsStorage['tMQ'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tMQ']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tMQ', Object(_helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__["mediaquerySupport"])(), localStorageAccess),
5720      TRANSFORM = tnsStorage['tTf'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTf']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTf', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transform'), localStorageAccess),
5721      HAS3DTRANSFORMS = tnsStorage['t3D'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['t3D']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 't3D', Object(_helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__["has3DTransforms"])(TRANSFORM), localStorageAccess),
5722      TRANSITIONDURATION = tnsStorage['tTDu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDuration'), localStorageAccess),
5723      TRANSITIONDELAY = tnsStorage['tTDe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDelay'), localStorageAccess),
5724      ANIMATIONDURATION = tnsStorage['tADu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDuration'), localStorageAccess),
5725      ANIMATIONDELAY = tnsStorage['tADe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDelay'), localStorageAccess),
5726      TRANSITIONEND = tnsStorage['tTE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(TRANSITIONDURATION, 'Transition'), localStorageAccess),
5727      ANIMATIONEND = tnsStorage['tAE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tAE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tAE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(ANIMATIONDURATION, 'Animation'), localStorageAccess);
5728
5729  // get element nodes from selectors
5730  var supportConsoleWarn = win.console && typeof win.console.warn === "function",
5731      tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'],
5732      optionsElements = {};
5733
5734  tnsList.forEach(function(item) {
5735    if (typeof options[item] === 'string') {
5736      var str = options[item],
5737          el = doc.querySelector(str);
5738      optionsElements[item] = str;
5739
5740      if (el && el.nodeName) {
5741        options[item] = el;
5742      } else {
5743        if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); }
5744        return;
5745      }
5746    }
5747  });
5748
5749  // make sure at least 1 slide
5750  if (options.container.children.length < 1) {
5751    if (supportConsoleWarn) { console.warn('No slides found in', options.container); }
5752    return;
5753   }
5754
5755  // update options
5756  var responsive = options.responsive,
5757      nested = options.nested,
5758      carousel = options.mode === 'carousel' ? true : false;
5759
5760  if (responsive) {
5761    // apply responsive[0] to options and remove it
5762    if (0 in responsive) {
5763      options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, responsive[0]);
5764      delete responsive[0];
5765    }
5766
5767    var responsiveTem = {};
5768    for (var key in responsive) {
5769      var val = responsive[key];
5770      // update responsive
5771      // from: 300: 2
5772      // to:
5773      //   300: {
5774      //     items: 2
5775      //   }
5776      val = typeof val === 'number' ? {items: val} : val;
5777      responsiveTem[key] = val;
5778    }
5779    responsive = responsiveTem;
5780    responsiveTem = null;
5781  }
5782
5783  // update options
5784  function updateOptions (obj) {
5785    for (var key in obj) {
5786      if (!carousel) {
5787        if (key === 'slideBy') { obj[key] = 'page'; }
5788        if (key === 'edgePadding') { obj[key] = false; }
5789        if (key === 'autoHeight') { obj[key] = false; }
5790      }
5791
5792      // update responsive options
5793      if (key === 'responsive') { updateOptions(obj[key]); }
5794    }
5795  }
5796  if (!carousel) { updateOptions(options); }
5797
5798
5799  // === define and set variables ===
5800  if (!carousel) {
5801    options.axis = 'horizontal';
5802    options.slideBy = 'page';
5803    options.edgePadding = false;
5804
5805    var animateIn = options.animateIn,
5806        animateOut = options.animateOut,
5807        animateDelay = options.animateDelay,
5808        animateNormal = options.animateNormal;
5809  }
5810
5811  var horizontal = options.axis === 'horizontal' ? true : false,
5812      outerWrapper = doc.createElement('div'),
5813      innerWrapper = doc.createElement('div'),
5814      middleWrapper,
5815      container = options.container,
5816      containerParent = container.parentNode,
5817      containerHTML = container.outerHTML,
5818      slideItems = container.children,
5819      slideCount = slideItems.length,
5820      breakpointZone,
5821      windowWidth = getWindowWidth(),
5822      isOn = false;
5823  if (responsive) { setBreakpointZone(); }
5824  if (carousel) { container.className += ' tns-vpfix'; }
5825
5826  // fixedWidth: viewport > rightBoundary > indexMax
5827  var autoWidth = options.autoWidth,
5828      fixedWidth = getOption('fixedWidth'),
5829      edgePadding = getOption('edgePadding'),
5830      gutter = getOption('gutter'),
5831      viewport = getViewportWidth(),
5832      center = getOption('center'),
5833      items = !autoWidth ? Math.floor(getOption('items')) : 1,
5834      slideBy = getOption('slideBy'),
5835      viewportMax = options.viewportMax || options.fixedWidthViewportWidth,
5836      arrowKeys = getOption('arrowKeys'),
5837      speed = getOption('speed'),
5838      rewind = options.rewind,
5839      loop = rewind ? false : options.loop,
5840      autoHeight = getOption('autoHeight'),
5841      controls = getOption('controls'),
5842      controlsText = getOption('controlsText'),
5843      nav = getOption('nav'),
5844      touch = getOption('touch'),
5845      mouseDrag = getOption('mouseDrag'),
5846      autoplay = getOption('autoplay'),
5847      autoplayTimeout = getOption('autoplayTimeout'),
5848      autoplayText = getOption('autoplayText'),
5849      autoplayHoverPause = getOption('autoplayHoverPause'),
5850      autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'),
5851      sheet = Object(_helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__["createStyleSheet"])(null, getOption('nonce')),
5852      lazyload = options.lazyload,
5853      lazyloadSelector = options.lazyloadSelector,
5854      slidePositions, // collection of slide positions
5855      slideItemsOut = [],
5856      cloneCount = loop ? getCloneCountForLoop() : 0,
5857      slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2,
5858      hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false,
5859      rightBoundary = fixedWidth ? getRightBoundary() : null,
5860      updateIndexBeforeTransform = (!carousel || !loop) ? true : false,
5861      // transform
5862      transformAttr = horizontal ? 'left' : 'top',
5863      transformPrefix = '',
5864      transformPostfix = '',
5865      // index
5866      getIndexMax = (function () {
5867        if (fixedWidth) {
5868          return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); };
5869        } else if (autoWidth) {
5870          return function() {
5871            for (var i = 0; i < slideCountNew; i++) {
5872              if (slidePositions[i] >= - rightBoundary) { return i; }
5873            }
5874          };
5875        } else {
5876          return function() {
5877            if (center && carousel && !loop) {
5878              return slideCount - 1;
5879            } else {
5880              return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1;
5881            }
5882          };
5883        }
5884      })(),
5885      index = getStartIndex(getOption('startIndex')),
5886      indexCached = index,
5887      displayIndex = getCurrentSlide(),
5888      indexMin = 0,
5889      indexMax = !autoWidth ? getIndexMax() : null,
5890      // resize
5891      resizeTimer,
5892      preventActionWhenRunning = options.preventActionWhenRunning,
5893      swipeAngle = options.swipeAngle,
5894      moveDirectionExpected = swipeAngle ? '?' : true,
5895      running = false,
5896      onInit = options.onInit,
5897      events = new _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__["Events"](),
5898      // id, class
5899      newContainerClasses = ' tns-slider tns-' + options.mode,
5900      slideId = container.id || Object(_helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__["getSlideId"])(),
5901      disable = getOption('disable'),
5902      disabled = false,
5903      freezable = options.freezable,
5904      freeze = freezable && !autoWidth ? getFreeze() : false,
5905      frozen = false,
5906      controlsEvents = {
5907        'click': onControlsClick,
5908        'keydown': onControlsKeydown
5909      },
5910      navEvents = {
5911        'click': onNavClick,
5912        'keydown': onNavKeydown
5913      },
5914      hoverEvents = {
5915        'mouseover': mouseoverPause,
5916        'mouseout': mouseoutRestart
5917      },
5918      visibilityEvent = {'visibilitychange': onVisibilityChange},
5919      docmentKeydownEvent = {'keydown': onDocumentKeydown},
5920      touchEvents = {
5921        'touchstart': onPanStart,
5922        'touchmove': onPanMove,
5923        'touchend': onPanEnd,
5924        'touchcancel': onPanEnd
5925      }, dragEvents = {
5926        'mousedown': onPanStart,
5927        'mousemove': onPanMove,
5928        'mouseup': onPanEnd,
5929        'mouseleave': onPanEnd
5930      },
5931      hasControls = hasOption('controls'),
5932      hasNav = hasOption('nav'),
5933      navAsThumbnails = autoWidth ? true : options.navAsThumbnails,
5934      hasAutoplay = hasOption('autoplay'),
5935      hasTouch = hasOption('touch'),
5936      hasMouseDrag = hasOption('mouseDrag'),
5937      slideActiveClass = 'tns-slide-active',
5938      slideClonedClass = 'tns-slide-cloned',
5939      imgCompleteClass = 'tns-complete',
5940      imgEvents = {
5941        'load': onImgLoaded,
5942        'error': onImgFailed
5943      },
5944      imgsComplete,
5945      liveregionCurrent,
5946      preventScroll = options.preventScrollOnTouch === 'force' ? true : false;
5947
5948  // controls
5949  if (hasControls) {
5950    var controlsContainer = options.controlsContainer,
5951        controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '',
5952        prevButton = options.prevButton,
5953        nextButton = options.nextButton,
5954        prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '',
5955        nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '',
5956        prevIsButton,
5957        nextIsButton;
5958  }
5959
5960  // nav
5961  if (hasNav) {
5962    var navContainer = options.navContainer,
5963        navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '',
5964        navItems,
5965        pages = autoWidth ? slideCount : getPages(),
5966        pagesCached = 0,
5967        navClicked = -1,
5968        navCurrentIndex = getCurrentNavIndex(),
5969        navCurrentIndexCached = navCurrentIndex,
5970        navActiveClass = 'tns-nav-active',
5971        navStr = 'Carousel Page ',
5972        navStrCurrent = ' (Current Slide)';
5973  }
5974
5975  // autoplay
5976  if (hasAutoplay) {
5977    var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1,
5978        autoplayButton = options.autoplayButton,
5979        autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '',
5980        autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'],
5981        autoplayTimer,
5982        animating,
5983        autoplayHoverPaused,
5984        autoplayUserPaused,
5985        autoplayVisibilityPaused;
5986  }
5987
5988  if (hasTouch || hasMouseDrag) {
5989    var initPosition = {},
5990        lastPosition = {},
5991        translateInit,
5992        disX,
5993        disY,
5994        panStart = false,
5995        rafIndex,
5996        getDist = horizontal ?
5997          function(a, b) { return a.x - b.x; } :
5998          function(a, b) { return a.y - b.y; };
5999  }
6000
6001  // disable slider when slidecount <= items
6002  if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); }
6003
6004  if (TRANSFORM) {
6005    transformAttr = TRANSFORM;
6006    transformPrefix = 'translate';
6007
6008    if (HAS3DTRANSFORMS) {
6009      transformPrefix += horizontal ? '3d(' : '3d(0px, ';
6010      transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)';
6011    } else {
6012      transformPrefix += horizontal ? 'X(' : 'Y(';
6013      transformPostfix = ')';
6014    }
6015
6016  }
6017
6018  if (carousel) { container.className = container.className.replace('tns-vpfix', ''); }
6019  initStructure();
6020  initSheet();
6021  initSliderTransform();
6022
6023  // === COMMON FUNCTIONS === //
6024  function resetVariblesWhenDisable (condition) {
6025    if (condition) {
6026      controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;
6027    }
6028  }
6029
6030  function getCurrentSlide () {
6031    var tem = carousel ? index - cloneCount : index;
6032    while (tem < 0) { tem += slideCount; }
6033    return tem%slideCount + 1;
6034  }
6035
6036  function getStartIndex (ind) {
6037    ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0;
6038    return carousel ? ind + cloneCount : ind;
6039  }
6040
6041  function getAbsIndex (i) {
6042    if (i == null) { i = index; }
6043
6044    if (carousel) { i -= cloneCount; }
6045    while (i < 0) { i += slideCount; }
6046
6047    return Math.floor(i%slideCount);
6048  }
6049
6050  function getCurrentNavIndex () {
6051    var absIndex = getAbsIndex(),
6052        result;
6053
6054    result = navAsThumbnails ? absIndex :
6055      fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) :
6056          Math.floor(absIndex / items);
6057
6058    // set active nav to the last one when reaches the right edge
6059    if (!loop && carousel && index === indexMax) { result = pages - 1; }
6060
6061    return result;
6062  }
6063
6064  function getItemsMax () {
6065    // fixedWidth or autoWidth while viewportMax is not available
6066    if (autoWidth || (fixedWidth && !viewportMax)) {
6067      return slideCount - 1;
6068    // most cases
6069    } else {
6070      var str = fixedWidth ? 'fixedWidth' : 'items',
6071          arr = [];
6072
6073      if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); }
6074
6075      if (responsive) {
6076        for (var bp in responsive) {
6077          var tem = responsive[bp][str];
6078          if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); }
6079        }
6080      }
6081
6082      if (!arr.length) { arr.push(0); }
6083
6084      return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr));
6085    }
6086  }
6087
6088  function getCloneCountForLoop () {
6089    var itemsMax = getItemsMax(),
6090        result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount);
6091    result = Math.max(itemsMax, result);
6092
6093    return hasOption('edgePadding') ? result + 1 : result;
6094  }
6095
6096  function getWindowWidth () {
6097    return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
6098  }
6099
6100  function getInsertPosition (pos) {
6101    return pos === 'top' ? 'afterbegin' : 'beforeend';
6102  }
6103
6104  function getClientWidth (el) {
6105    if (el == null) { return; }
6106    var div = doc.createElement('div'), rect, width;
6107    el.appendChild(div);
6108    rect = div.getBoundingClientRect();
6109    width = rect.right - rect.left;
6110    div.remove();
6111    return width || getClientWidth(el.parentNode);
6112  }
6113
6114  function getViewportWidth () {
6115    var gap = edgePadding ? edgePadding * 2 - gutter : 0;
6116    return getClientWidth(containerParent) - gap;
6117  }
6118
6119  function hasOption (item) {
6120    if (options[item]) {
6121      return true;
6122    } else {
6123      if (responsive) {
6124        for (var bp in responsive) {
6125          if (responsive[bp][item]) { return true; }
6126        }
6127      }
6128      return false;
6129    }
6130  }
6131
6132  // get option:
6133  // fixed width: viewport, fixedWidth, gutter => items
6134  // others: window width => all variables
6135  // all: items => slideBy
6136  function getOption (item, ww) {
6137    if (ww == null) { ww = windowWidth; }
6138
6139    if (item === 'items' && fixedWidth) {
6140      return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1;
6141
6142    } else {
6143      var result = options[item];
6144
6145      if (responsive) {
6146        for (var bp in responsive) {
6147          // bp: convert string to number
6148          if (ww >= parseInt(bp)) {
6149            if (item in responsive[bp]) { result = responsive[bp][item]; }
6150          }
6151        }
6152      }
6153
6154      if (item === 'slideBy' && result === 'page') { result = getOption('items'); }
6155      if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); }
6156
6157      return result;
6158    }
6159  }
6160
6161  function getSlideMarginLeft (i) {
6162    return CALC ?
6163      CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' :
6164      i * 100 / slideCountNew + '%';
6165  }
6166
6167  function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) {
6168    var str = '';
6169
6170    if (edgePaddingTem !== undefined) {
6171      var gap = edgePaddingTem;
6172      if (gutterTem) { gap -= gutterTem; }
6173      str = horizontal ?
6174        'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' :
6175        'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;';
6176    } else if (gutterTem && !fixedWidthTem) {
6177      var gutterTemUnit = '-' + gutterTem + 'px',
6178          dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0';
6179      str = 'margin: 0 ' + dir + ';'
6180    }
6181
6182    if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); }
6183    return str;
6184  }
6185
6186  function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) {
6187    if (fixedWidthTem) {
6188      return (fixedWidthTem + gutterTem) * slideCountNew + 'px';
6189    } else {
6190      return CALC ?
6191        CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' :
6192        slideCountNew * 100 / itemsTem + '%';
6193    }
6194  }
6195
6196  function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) {
6197    var width;
6198
6199    if (fixedWidthTem) {
6200      width = (fixedWidthTem + gutterTem) + 'px';
6201    } else {
6202      if (!carousel) { itemsTem = Math.floor(itemsTem); }
6203      var dividend = carousel ? slideCountNew : itemsTem;
6204      width = CALC ?
6205        CALC + '(100% / ' + dividend + ')' :
6206        100 / dividend + '%';
6207    }
6208
6209    width = 'width:' + width;
6210
6211    // inner slider: overwrite outer slider styles
6212    return nested !== 'inner' ? width + ';' : width + ' !important;';
6213  }
6214
6215  function getSlideGutterStyle (gutterTem) {
6216    var str = '';
6217
6218    // gutter maybe interger || 0
6219    // so can't use 'if (gutter)'
6220    if (gutterTem !== false) {
6221      var prop = horizontal ? 'padding-' : 'margin-',
6222          dir = horizontal ? 'right' : 'bottom';
6223      str = prop +  dir + ': ' + gutterTem + 'px;';
6224    }
6225
6226    return str;
6227  }
6228
6229  function getCSSPrefix (name, num) {
6230    var prefix = name.substring(0, name.length - num).toLowerCase();
6231    if (prefix) { prefix = '-' + prefix + '-'; }
6232
6233    return prefix;
6234  }
6235
6236  function getTransitionDurationStyle (speed) {
6237    return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;';
6238  }
6239
6240  function getAnimationDurationStyle (speed) {
6241    return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;';
6242  }
6243
6244  function initStructure () {
6245    var classOuter = 'tns-outer',
6246        classInner = 'tns-inner',
6247        hasGutter = hasOption('gutter');
6248
6249    outerWrapper.className = classOuter;
6250    innerWrapper.className = classInner;
6251    outerWrapper.id = slideId + '-ow';
6252    innerWrapper.id = slideId + '-iw';
6253
6254    // set container properties
6255    if (container.id === '') { container.id = slideId; }
6256    newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel';
6257    newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc';
6258    if (autoWidth) { newContainerClasses += ' tns-autowidth'; }
6259    newContainerClasses += ' tns-' + options.axis;
6260    container.className += newContainerClasses;
6261
6262    // add constrain layer for carousel
6263    if (carousel) {
6264      middleWrapper = doc.createElement('div');
6265      middleWrapper.id = slideId + '-mw';
6266      middleWrapper.className = 'tns-ovh';
6267
6268      outerWrapper.appendChild(middleWrapper);
6269      middleWrapper.appendChild(innerWrapper);
6270    } else {
6271      outerWrapper.appendChild(innerWrapper);
6272    }
6273
6274    if (autoHeight) {
6275      var wp = middleWrapper ? middleWrapper : innerWrapper;
6276      wp.className += ' tns-ah';
6277    }
6278
6279    containerParent.insertBefore(outerWrapper, container);
6280    innerWrapper.appendChild(container);
6281
6282    // add id, class, aria attributes
6283    // before clone slides
6284    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
6285      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-item');
6286      if (!item.id) { item.id = slideId + '-item' + i; }
6287      if (!carousel && animateNormal) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal); }
6288      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
6289        'aria-hidden': 'true',
6290        'tabindex': '-1'
6291      });
6292    });
6293
6294    // ## clone slides
6295    // carousel: n + slides + n
6296    // gallery:      slides + n
6297    if (cloneCount) {
6298      var fragmentBefore = doc.createDocumentFragment(),
6299          fragmentAfter = doc.createDocumentFragment();
6300
6301      for (var j = cloneCount; j--;) {
6302        var num = j%slideCount,
6303            cloneFirst = slideItems[num].cloneNode(true);
6304        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneFirst, slideClonedClass);
6305        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneFirst, 'id');
6306        fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild);
6307
6308        if (carousel) {
6309          var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true);
6310          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneLast, slideClonedClass);
6311          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneLast, 'id');
6312          fragmentBefore.appendChild(cloneLast);
6313        }
6314      }
6315
6316      container.insertBefore(fragmentBefore, container.firstChild);
6317      container.appendChild(fragmentAfter);
6318      slideItems = container.children;
6319    }
6320
6321  }
6322
6323  function initSliderTransform () {
6324    // ## images loaded/failed
6325    if (hasOption('autoHeight') || autoWidth || !horizontal) {
6326      var imgs = container.querySelectorAll('img');
6327
6328      // add img load event listener
6329      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(imgs, function(img) {
6330        var src = img.src;
6331
6332        if (!lazyload) {
6333          // not data img
6334          if (src && src.indexOf('data:image') < 0) {
6335            img.src = '';
6336            Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
6337            Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
6338
6339            img.src = src;
6340          // data img
6341          } else {
6342            imgLoaded(img);
6343          }
6344        }
6345      });
6346
6347      // set imgsComplete
6348      Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), function() { imgsComplete = true; }); });
6349
6350      // reset imgs for auto height: check visible imgs only
6351      if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); }
6352
6353      lazyload ? initSliderTransformStyleCheck() : Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), initSliderTransformStyleCheck); });
6354
6355    } else {
6356      // set container transform property
6357      if (carousel) { doContainerTransformSilent(); }
6358
6359      // update slider tools and events
6360      initTools();
6361      initEvents();
6362    }
6363  }
6364
6365  function initSliderTransformStyleCheck () {
6366    if (autoWidth && slideCount > 1) {
6367      // check styles application
6368      var num = loop ? index : slideCount - 1;
6369
6370      (function stylesApplicationCheck() {
6371        var left = slideItems[num].getBoundingClientRect().left;
6372        var right = slideItems[num - 1].getBoundingClientRect().right;
6373
6374        (Math.abs(left - right) <= 1) ?
6375          initSliderTransformCore() :
6376          setTimeout(function(){ stylesApplicationCheck() }, 16);
6377      })();
6378
6379    } else {
6380      initSliderTransformCore();
6381    }
6382  }
6383
6384
6385  function initSliderTransformCore () {
6386    // run Fn()s which are rely on image loading
6387    if (!horizontal || autoWidth) {
6388      setSlidePositions();
6389
6390      if (autoWidth) {
6391        rightBoundary = getRightBoundary();
6392        if (freezable) { freeze = getFreeze(); }
6393        indexMax = getIndexMax(); // <= slidePositions, rightBoundary <=
6394        resetVariblesWhenDisable(disable || freeze);
6395      } else {
6396        updateContentWrapperHeight();
6397      }
6398    }
6399
6400    // set container transform property
6401    if (carousel) { doContainerTransformSilent(); }
6402
6403    // update slider tools and events
6404    initTools();
6405    initEvents();
6406  }
6407
6408  function initSheet () {
6409    // gallery:
6410    // set animation classes and left value for gallery slider
6411    if (!carousel) {
6412      for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) {
6413        var item = slideItems[i];
6414        item.style.left = (i - index) * 100 / items + '%';
6415        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
6416        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
6417      }
6418    }
6419
6420    // #### LAYOUT
6421
6422    // ## INLINE-BLOCK VS FLOAT
6423
6424    // ## PercentageLayout:
6425    // slides: inline-block
6426    // remove blank space between slides by set font-size: 0
6427
6428    // ## Non PercentageLayout:
6429    // slides: float
6430    //         margin-right: -100%
6431    //         margin-left: ~
6432
6433    // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing
6434    if (horizontal) {
6435      if (PERCENTAGELAYOUT || autoWidth) {
6436        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6437        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, 'font-size:0;', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6438      } else if (carousel) {
6439        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function (slide, i) {
6440          slide.style.marginLeft = getSlideMarginLeft(i);
6441        });
6442      }
6443    }
6444
6445
6446    // ## BASIC STYLES
6447    if (CSSMQ) {
6448      // middle wrapper style
6449      if (TRANSITIONDURATION) {
6450        var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : '';
6451        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-mw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6452      }
6453
6454      // inner wrapper styles
6455      str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight);
6456      Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-iw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6457
6458      // container styles
6459      if (carousel) {
6460        str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : '';
6461        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
6462        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6463      }
6464
6465      // slide styles
6466      str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : '';
6467      if (options.gutter) { str += getSlideGutterStyle(options.gutter); }
6468      // set gallery items transition-duration
6469      if (!carousel) {
6470        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
6471        if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); }
6472      }
6473      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
6474
6475    // non CSS mediaqueries: IE8
6476    // ## update inner wrapper, container, slides if needed
6477    // set inline styles for inner wrapper & container
6478    // insert stylesheet (one line) for slides only (since slides are many)
6479    } else {
6480      // middle wrapper styles
6481      update_carousel_transition_duration();
6482
6483      // inner wrapper styles
6484      innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight);
6485
6486      // container styles
6487      if (carousel && horizontal && !autoWidth) {
6488        container.style.width = getContainerWidth(fixedWidth, gutter, items);
6489      }
6490
6491      // slide styles
6492      var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : '';
6493      if (gutter) { str += getSlideGutterStyle(gutter); }
6494
6495      // append to the last line
6496      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
6497    }
6498
6499    // ## MEDIAQUERIES
6500    if (responsive && CSSMQ) {
6501      for (var bp in responsive) {
6502        // bp: convert string to number
6503        bp = parseInt(bp);
6504
6505        var opts = responsive[bp],
6506            str = '',
6507            middleWrapperStr = '',
6508            innerWrapperStr = '',
6509            containerStr = '',
6510            slideStr = '',
6511            itemsBP = !autoWidth ? getOption('items', bp) : null,
6512            fixedWidthBP = getOption('fixedWidth', bp),
6513            speedBP = getOption('speed', bp),
6514            edgePaddingBP = getOption('edgePadding', bp),
6515            autoHeightBP = getOption('autoHeight', bp),
6516            gutterBP = getOption('gutter', bp);
6517
6518        // middle wrapper string
6519        if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) {
6520          middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}';
6521        }
6522
6523        // inner wrapper string
6524        if ('edgePadding' in opts || 'gutter' in opts) {
6525          innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}';
6526        }
6527
6528        // container string
6529        if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) {
6530          containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';';
6531        }
6532        if (TRANSITIONDURATION && 'speed' in opts) {
6533          containerStr += getTransitionDurationStyle(speedBP);
6534        }
6535        if (containerStr) {
6536          containerStr = '#' + slideId + '{' + containerStr + '}';
6537        }
6538
6539        // slide string
6540        if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) {
6541          slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP);
6542        }
6543        if ('gutter' in opts) {
6544          slideStr += getSlideGutterStyle(gutterBP);
6545        }
6546        // set gallery items transition-duration
6547        if (!carousel && 'speed' in opts) {
6548          if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); }
6549          if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); }
6550        }
6551        if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; }
6552
6553        // add up
6554        str = middleWrapperStr + innerWrapperStr + containerStr + slideStr;
6555
6556        if (str) {
6557          sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length);
6558        }
6559      }
6560    }
6561  }
6562
6563  function initTools () {
6564    // == slides ==
6565    updateSlideStatus();
6566
6567    // == live region ==
6568    outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">' + getLiveRegionStr() + '</span>  of ' + slideCount + '</div>');
6569    liveregionCurrent = outerWrapper.querySelector('.tns-liveregion .current');
6570
6571    // == autoplayInit ==
6572    if (hasAutoplay) {
6573      var txt = autoplay ? 'stop' : 'start';
6574      if (autoplayButton) {
6575        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': txt});
6576      } else if (options.autoplayButtonOutput) {
6577        outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>');
6578        autoplayButton = outerWrapper.querySelector('[data-action]');
6579      }
6580
6581      // add event
6582      if (autoplayButton) {
6583        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(autoplayButton, {'click': toggleAutoplay});
6584      }
6585
6586      if (autoplay) {
6587        startAutoplay();
6588        if (autoplayHoverPause) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents); }
6589        if (autoplayResetOnVisibility) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, visibilityEvent); }
6590      }
6591    }
6592
6593    // == navInit ==
6594    if (hasNav) {
6595      var initIndex = !carousel ? 0 : cloneCount;
6596      // customized nav
6597      // will not hide the navs in case they're thumbnails
6598      if (navContainer) {
6599        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navContainer, {'aria-label': 'Carousel Pagination'});
6600        navItems = navContainer.children;
6601        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(navItems, function(item, i) {
6602          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
6603            'data-nav': i,
6604            'tabindex': '-1',
6605            'aria-label': navStr + (i + 1),
6606            'aria-controls': slideId,
6607          });
6608        });
6609
6610      // generated nav
6611      } else {
6612        var navHtml = '',
6613            hiddenStr = navAsThumbnails ? '' : 'style="display:none"';
6614        for (var i = 0; i < slideCount; i++) {
6615          // hide nav items by default
6616          navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>';
6617        }
6618        navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>';
6619        outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml);
6620
6621        navContainer = outerWrapper.querySelector('.tns-nav');
6622        navItems = navContainer.children;
6623      }
6624
6625      updateNavVisibility();
6626
6627      // add transition
6628      if (TRANSITIONDURATION) {
6629        var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(),
6630            str = 'transition: all ' + speed / 1000 + 's';
6631
6632        if (prefix) {
6633          str = '-' + prefix + '-' + str;
6634        }
6635
6636        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '[aria-controls^=' + slideId + '-item]', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
6637      }
6638
6639      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
6640      Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navItems[navCurrentIndex], 'tabindex');
6641      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navItems[navCurrentIndex], navActiveClass);
6642
6643      // add events
6644      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(navContainer, navEvents);
6645    }
6646
6647
6648
6649    // == controlsInit ==
6650    if (hasControls) {
6651      if (!controlsContainer && (!prevButton || !nextButton)) {
6652        outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>');
6653
6654        controlsContainer = outerWrapper.querySelector('.tns-controls');
6655      }
6656
6657      if (!prevButton || !nextButton) {
6658        prevButton = controlsContainer.children[0];
6659        nextButton = controlsContainer.children[1];
6660      }
6661
6662      if (options.controlsContainer) {
6663        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(controlsContainer, {
6664          'aria-label': 'Carousel Navigation',
6665          'tabindex': '0'
6666        });
6667      }
6668
6669      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
6670        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])([prevButton, nextButton], {
6671          'aria-controls': slideId,
6672          'tabindex': '-1',
6673        });
6674      }
6675
6676      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
6677        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(prevButton, {'data-controls' : 'prev'});
6678        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(nextButton, {'data-controls' : 'next'});
6679      }
6680
6681      prevIsButton = isButton(prevButton);
6682      nextIsButton = isButton(nextButton);
6683
6684      updateControlsStatus();
6685
6686      // add events
6687      if (controlsContainer) {
6688        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(controlsContainer, controlsEvents);
6689      } else {
6690        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(prevButton, controlsEvents);
6691        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(nextButton, controlsEvents);
6692      }
6693    }
6694
6695    // hide tools if needed
6696    disableUI();
6697  }
6698
6699  function initEvents () {
6700    // add events
6701    if (carousel && TRANSITIONEND) {
6702      var eve = {};
6703      eve[TRANSITIONEND] = onTransitionEnd;
6704      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, eve);
6705    }
6706
6707    if (touch) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch); }
6708    if (mouseDrag) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents); }
6709    if (arrowKeys) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent); }
6710
6711    if (nested === 'inner') {
6712      events.on('outerResized', function () {
6713        resizeTasks();
6714        events.emit('innerLoaded', info());
6715      });
6716    } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) {
6717      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(win, {'resize': onResize});
6718    }
6719
6720    if (autoHeight) {
6721      if (nested === 'outer') {
6722        events.on('innerLoaded', doAutoHeight);
6723      } else if (!disable) { doAutoHeight(); }
6724    }
6725
6726    doLazyLoad();
6727    if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); }
6728
6729    events.on('indexChanged', additionalUpdates);
6730    if (nested === 'inner') { events.emit('innerLoaded', info()); }
6731    if (typeof onInit === 'function') { onInit(info()); }
6732    isOn = true;
6733  }
6734
6735  function destroy () {
6736    // sheet
6737    sheet.disabled = true;
6738    if (sheet.ownerNode) { sheet.ownerNode.remove(); }
6739
6740    // remove win event listeners
6741    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(win, {'resize': onResize});
6742
6743    // arrowKeys, controls, nav
6744    if (arrowKeys) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent); }
6745    if (controlsContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(controlsContainer, controlsEvents); }
6746    if (navContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(navContainer, navEvents); }
6747
6748    // autoplay
6749    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
6750    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, visibilityEvent);
6751    if (autoplayButton) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(autoplayButton, {'click': toggleAutoplay}); }
6752    if (autoplay) { clearInterval(autoplayTimer); }
6753
6754    // container
6755    if (carousel && TRANSITIONEND) {
6756      var eve = {};
6757      eve[TRANSITIONEND] = onTransitionEnd;
6758      Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, eve);
6759    }
6760    if (touch) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents); }
6761    if (mouseDrag) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents); }
6762
6763    // cache Object values in options && reset HTML
6764    var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML];
6765
6766    tnsList.forEach(function(item, i) {
6767      var el = item === 'container' ? outerWrapper : options[item];
6768
6769      if (typeof el === 'object' && el) {
6770        var prevEl = el.previousElementSibling ? el.previousElementSibling : false,
6771            parentEl = el.parentNode;
6772        el.outerHTML = htmlList[i];
6773        options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild;
6774      }
6775    });
6776
6777
6778    // reset variables
6779    tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null;
6780    // check variables
6781    // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } });
6782
6783    for (var a in this) {
6784      if (a !== 'rebuild') { this[a] = null; }
6785    }
6786    isOn = false;
6787  }
6788
6789// === ON RESIZE ===
6790  // responsive || fixedWidth || autoWidth || !horizontal
6791  function onResize (e) {
6792    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ resizeTasks(getEvent(e)); });
6793  }
6794
6795  function resizeTasks (e) {
6796    if (!isOn) { return; }
6797    if (nested === 'outer') { events.emit('outerResized', info(e)); }
6798    windowWidth = getWindowWidth();
6799    var bpChanged,
6800        breakpointZoneTem = breakpointZone,
6801        needContainerTransform = false;
6802
6803    if (responsive) {
6804      setBreakpointZone();
6805      bpChanged = breakpointZoneTem !== breakpointZone;
6806      // if (hasRightDeadZone) { needContainerTransform = true; } // *?
6807      if (bpChanged) { events.emit('newBreakpointStart', info(e)); }
6808    }
6809
6810    var indChanged,
6811        itemsChanged,
6812        itemsTem = items,
6813        disableTem = disable,
6814        freezeTem = freeze,
6815        arrowKeysTem = arrowKeys,
6816        controlsTem = controls,
6817        navTem = nav,
6818        touchTem = touch,
6819        mouseDragTem = mouseDrag,
6820        autoplayTem = autoplay,
6821        autoplayHoverPauseTem = autoplayHoverPause,
6822        autoplayResetOnVisibilityTem = autoplayResetOnVisibility,
6823        indexTem = index;
6824
6825    if (bpChanged) {
6826      var fixedWidthTem = fixedWidth,
6827          autoHeightTem = autoHeight,
6828          controlsTextTem = controlsText,
6829          centerTem = center,
6830          autoplayTextTem = autoplayText;
6831
6832      if (!CSSMQ) {
6833        var gutterTem = gutter,
6834            edgePaddingTem = edgePadding;
6835      }
6836    }
6837
6838    // get option:
6839    // fixed width: viewport, fixedWidth, gutter => items
6840    // others: window width => all variables
6841    // all: items => slideBy
6842    arrowKeys = getOption('arrowKeys');
6843    controls = getOption('controls');
6844    nav = getOption('nav');
6845    touch = getOption('touch');
6846    center = getOption('center');
6847    mouseDrag = getOption('mouseDrag');
6848    autoplay = getOption('autoplay');
6849    autoplayHoverPause = getOption('autoplayHoverPause');
6850    autoplayResetOnVisibility = getOption('autoplayResetOnVisibility');
6851
6852    if (bpChanged) {
6853      disable = getOption('disable');
6854      fixedWidth = getOption('fixedWidth');
6855      speed = getOption('speed');
6856      autoHeight = getOption('autoHeight');
6857      controlsText = getOption('controlsText');
6858      autoplayText = getOption('autoplayText');
6859      autoplayTimeout = getOption('autoplayTimeout');
6860
6861      if (!CSSMQ) {
6862        edgePadding = getOption('edgePadding');
6863        gutter = getOption('gutter');
6864      }
6865    }
6866    // update options
6867    resetVariblesWhenDisable(disable);
6868
6869    viewport = getViewportWidth(); // <= edgePadding, gutter
6870    if ((!horizontal || autoWidth) && !disable) {
6871      setSlidePositions();
6872      if (!horizontal) {
6873        updateContentWrapperHeight(); // <= setSlidePositions
6874        needContainerTransform = true;
6875      }
6876    }
6877    if (fixedWidth || autoWidth) {
6878      rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter
6879                                          // fixedWidth: <= viewport, fixedWidth, gutter
6880      indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions
6881                                // fixedWidth: <= rightBoundary, fixedWidth, gutter
6882    }
6883
6884    if (bpChanged || fixedWidth) {
6885      items = getOption('items');
6886      slideBy = getOption('slideBy');
6887      itemsChanged = items !== itemsTem;
6888
6889      if (itemsChanged) {
6890        if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items
6891        // check index before transform in case
6892        // slider reach the right edge then items become bigger
6893        updateIndex();
6894      }
6895    }
6896
6897    if (bpChanged) {
6898      if (disable !== disableTem) {
6899        if (disable) {
6900          disableSlider();
6901        } else {
6902          enableSlider(); // <= slidePositions, rightBoundary, indexMax
6903        }
6904      }
6905    }
6906
6907    if (freezable && (bpChanged || fixedWidth || autoWidth)) {
6908      freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary
6909                            // <= fixedWidth: fixedWidth, gutter, rightBoundary
6910                            // <= others: items
6911
6912      if (freeze !== freezeTem) {
6913        if (freeze) {
6914          doContainerTransform(getContainerTransformValue(getStartIndex(0)));
6915          freezeSlider();
6916        } else {
6917          unfreezeSlider();
6918          needContainerTransform = true;
6919        }
6920      }
6921    }
6922
6923    resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility
6924    if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; }
6925
6926    if (arrowKeys !== arrowKeysTem) {
6927      arrowKeys ?
6928        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent) :
6929        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent);
6930    }
6931    if (controls !== controlsTem) {
6932      if (controls) {
6933        if (controlsContainer) {
6934          Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
6935        } else {
6936          if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
6937          if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
6938        }
6939      } else {
6940        if (controlsContainer) {
6941          Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
6942        } else {
6943          if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
6944          if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
6945        }
6946      }
6947    }
6948    if (nav !== navTem) {
6949      if (nav) {
6950        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer);
6951        updateNavVisibility();
6952      } else {
6953        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer)
6954      }
6955    }
6956    if (touch !== touchTem) {
6957      touch ?
6958        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch) :
6959        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents);
6960    }
6961    if (mouseDrag !== mouseDragTem) {
6962      mouseDrag ?
6963        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents) :
6964        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents);
6965    }
6966    if (autoplay !== autoplayTem) {
6967      if (autoplay) {
6968        if (autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
6969        if (!animating && !autoplayUserPaused) { startAutoplay(); }
6970      } else {
6971        if (autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
6972        if (animating) { stopAutoplay(); }
6973      }
6974    }
6975    if (autoplayHoverPause !== autoplayHoverPauseTem) {
6976      autoplayHoverPause ?
6977        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents) :
6978        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
6979    }
6980    if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) {
6981      autoplayResetOnVisibility ?
6982        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, visibilityEvent) :
6983        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, visibilityEvent);
6984    }
6985
6986    if (bpChanged) {
6987      if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; }
6988
6989      if (autoHeight !== autoHeightTem) {
6990        if (!autoHeight) { innerWrapper.style.height = ''; }
6991      }
6992
6993      if (controls && controlsText !== controlsTextTem) {
6994        prevButton.innerHTML = controlsText[0];
6995        nextButton.innerHTML = controlsText[1];
6996      }
6997
6998      if (autoplayButton && autoplayText !== autoplayTextTem) {
6999        var i = autoplay ? 1 : 0,
7000            html = autoplayButton.innerHTML,
7001            len = html.length - autoplayTextTem[i].length;
7002        if (html.substring(len) === autoplayTextTem[i]) {
7003          autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i];
7004        }
7005      }
7006    } else {
7007      if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; }
7008    }
7009
7010    if (itemsChanged || fixedWidth && !autoWidth) {
7011      pages = getPages();
7012      updateNavVisibility();
7013    }
7014
7015    indChanged = index !== indexTem;
7016    if (indChanged) {
7017      events.emit('indexChanged', info());
7018      needContainerTransform = true;
7019    } else if (itemsChanged) {
7020      if (!indChanged) { additionalUpdates(); }
7021    } else if (fixedWidth || autoWidth) {
7022      doLazyLoad();
7023      updateSlideStatus();
7024      updateLiveRegion();
7025    }
7026
7027    if (itemsChanged && !carousel) { updateGallerySlidePositions(); }
7028
7029    if (!disable && !freeze) {
7030      // non-mediaqueries: IE8
7031      if (bpChanged && !CSSMQ) {
7032        // middle wrapper styles
7033
7034        // inner wrapper styles
7035        if (edgePadding !== edgePaddingTem || gutter !== gutterTem) {
7036          innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight);
7037        }
7038
7039        if (horizontal) {
7040          // container styles
7041          if (carousel) {
7042            container.style.width = getContainerWidth(fixedWidth, gutter, items);
7043          }
7044
7045          // slide styles
7046          var str = getSlideWidthStyle(fixedWidth, gutter, items) +
7047                    getSlideGutterStyle(gutter);
7048
7049          // remove the last line and
7050          // add new styles
7051          Object(_helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__["removeCSSRule"])(sheet, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet) - 1);
7052          Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
7053        }
7054      }
7055
7056      // auto height
7057      if (autoHeight) { doAutoHeight(); }
7058
7059      if (needContainerTransform) {
7060        doContainerTransformSilent();
7061        indexCached = index;
7062      }
7063    }
7064
7065    if (bpChanged) { events.emit('newBreakpointEnd', info(e)); }
7066  }
7067
7068
7069
7070
7071
7072  // === INITIALIZATION FUNCTIONS === //
7073  function getFreeze () {
7074    if (!fixedWidth && !autoWidth) {
7075      var a = center ? items - (items - 1) / 2 : items;
7076      return  slideCount <= a;
7077    }
7078
7079    var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount],
7080        vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter;
7081
7082    if (center) {
7083      vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2;
7084    }
7085
7086    return width <= vp;
7087  }
7088
7089  function setBreakpointZone () {
7090    breakpointZone = 0;
7091    for (var bp in responsive) {
7092      bp = parseInt(bp); // convert string to number
7093      if (windowWidth >= bp) { breakpointZone = bp; }
7094    }
7095  }
7096
7097  // (slideBy, indexMin, indexMax) => index
7098  var updateIndex = (function () {
7099    return loop ?
7100      carousel ?
7101        // loop + carousel
7102        function () {
7103          var leftEdge = indexMin,
7104              rightEdge = indexMax;
7105
7106          leftEdge += slideBy;
7107          rightEdge -= slideBy;
7108
7109          // adjust edges when has edge paddings
7110          // or fixed-width slider with extra space on the right side
7111          if (edgePadding) {
7112            leftEdge += 1;
7113            rightEdge -= 1;
7114          } else if (fixedWidth) {
7115            if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; }
7116          }
7117
7118          if (cloneCount) {
7119            if (index > rightEdge) {
7120              index -= slideCount;
7121            } else if (index < leftEdge) {
7122              index += slideCount;
7123            }
7124          }
7125        } :
7126        // loop + gallery
7127        function() {
7128          if (index > indexMax) {
7129            while (index >= indexMin + slideCount) { index -= slideCount; }
7130          } else if (index < indexMin) {
7131            while (index <= indexMax - slideCount) { index += slideCount; }
7132          }
7133        } :
7134      // non-loop
7135      function() {
7136        index = Math.max(indexMin, Math.min(indexMax, index));
7137      };
7138  })();
7139
7140  function disableUI () {
7141    if (!autoplay && autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
7142    if (!nav && navContainer) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer); }
7143    if (!controls) {
7144      if (controlsContainer) {
7145        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
7146      } else {
7147        if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
7148        if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
7149      }
7150    }
7151  }
7152
7153  function enableUI () {
7154    if (autoplay && autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
7155    if (nav && navContainer) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer); }
7156    if (controls) {
7157      if (controlsContainer) {
7158        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
7159      } else {
7160        if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
7161        if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
7162      }
7163    }
7164  }
7165
7166  function freezeSlider () {
7167    if (frozen) { return; }
7168
7169    // remove edge padding from inner wrapper
7170    if (edgePadding) { innerWrapper.style.margin = '0px'; }
7171
7172    // add class tns-transparent to cloned slides
7173    if (cloneCount) {
7174      var str = 'tns-transparent';
7175      for (var i = cloneCount; i--;) {
7176        if (carousel) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[i], str); }
7177        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[slideCountNew - i - 1], str);
7178      }
7179    }
7180
7181    // update tools
7182    disableUI();
7183
7184    frozen = true;
7185  }
7186
7187  function unfreezeSlider () {
7188    if (!frozen) { return; }
7189
7190    // restore edge padding for inner wrapper
7191    // for mordern browsers
7192    if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; }
7193
7194    // remove class tns-transparent to cloned slides
7195    if (cloneCount) {
7196      var str = 'tns-transparent';
7197      for (var i = cloneCount; i--;) {
7198        if (carousel) { Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[i], str); }
7199        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[slideCountNew - i - 1], str);
7200      }
7201    }
7202
7203    // update tools
7204    enableUI();
7205
7206    frozen = false;
7207  }
7208
7209  function disableSlider () {
7210    if (disabled) { return; }
7211
7212    sheet.disabled = true;
7213    container.className = container.className.replace(newContainerClasses.substring(1), '');
7214    Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(container, ['style']);
7215    if (loop) {
7216      for (var j = cloneCount; j--;) {
7217        if (carousel) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[j]); }
7218        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[slideCountNew - j - 1]);
7219      }
7220    }
7221
7222    // vertical slider
7223    if (!horizontal || !carousel) { Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(innerWrapper, ['style']); }
7224
7225    // gallery
7226    if (!carousel) {
7227      for (var i = index, l = index + slideCount; i < l; i++) {
7228        var item = slideItems[i];
7229        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['style']);
7230        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
7231        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
7232      }
7233    }
7234
7235    // update tools
7236    disableUI();
7237
7238    disabled = true;
7239  }
7240
7241  function enableSlider () {
7242    if (!disabled) { return; }
7243
7244    sheet.disabled = false;
7245    container.className += newContainerClasses;
7246    doContainerTransformSilent();
7247
7248    if (loop) {
7249      for (var j = cloneCount; j--;) {
7250        if (carousel) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[j]); }
7251        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[slideCountNew - j - 1]);
7252      }
7253    }
7254
7255    // gallery
7256    if (!carousel) {
7257      for (var i = index, l = index + slideCount; i < l; i++) {
7258        var item = slideItems[i],
7259            classN = i < index + items ? animateIn : animateNormal;
7260        item.style.left = (i - index) * 100 / items + '%';
7261        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classN);
7262      }
7263    }
7264
7265    // update tools
7266    enableUI();
7267
7268    disabled = false;
7269  }
7270
7271  function updateLiveRegion () {
7272    var str = getLiveRegionStr();
7273    if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; }
7274  }
7275
7276  function getLiveRegionStr () {
7277    var arr = getVisibleSlideRange(),
7278        start = arr[0] + 1,
7279        end = arr[1] + 1;
7280    return start === end ? start + '' : start + ' to ' + end;
7281  }
7282
7283  function getVisibleSlideRange (val) {
7284    if (val == null) { val = getContainerTransformValue(); }
7285    var start = index, end, rangestart, rangeend;
7286
7287    // get range start, range end for autoWidth and fixedWidth
7288    if (center || edgePadding) {
7289      if (autoWidth || fixedWidth) {
7290        rangestart = - (parseFloat(val) + edgePadding);
7291        rangeend = rangestart + viewport + edgePadding * 2;
7292      }
7293    } else {
7294      if (autoWidth) {
7295        rangestart = slidePositions[index];
7296        rangeend = rangestart + viewport;
7297      }
7298    }
7299
7300    // get start, end
7301    // - check auto width
7302    if (autoWidth) {
7303      slidePositions.forEach(function(point, i) {
7304        if (i < slideCountNew) {
7305          if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; }
7306          if (rangeend - point >= 0.5) { end = i; }
7307        }
7308      });
7309
7310    // - check percentage width, fixed width
7311    } else {
7312
7313      if (fixedWidth) {
7314        var cell = fixedWidth + gutter;
7315        if (center || edgePadding) {
7316          start = Math.floor(rangestart/cell);
7317          end = Math.ceil(rangeend/cell - 1);
7318        } else {
7319          end = start + Math.ceil(viewport/cell) - 1;
7320        }
7321
7322      } else {
7323        if (center || edgePadding) {
7324          var a = items - 1;
7325          if (center) {
7326            start -= a / 2;
7327            end = index + a / 2;
7328          } else {
7329            end = index + a;
7330          }
7331
7332          if (edgePadding) {
7333            var b = edgePadding * items / viewport;
7334            start -= b;
7335            end += b;
7336          }
7337
7338          start = Math.floor(start);
7339          end = Math.ceil(end);
7340        } else {
7341          end = start + items - 1;
7342        }
7343      }
7344
7345      start = Math.max(start, 0);
7346      end = Math.min(end, slideCountNew - 1);
7347    }
7348
7349    return [start, end];
7350  }
7351
7352  function doLazyLoad () {
7353    if (lazyload && !disable) {
7354      var arg = getVisibleSlideRange();
7355      arg.push(lazyloadSelector);
7356
7357      getImageArray.apply(null, arg).forEach(function (img) {
7358        if (!Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) {
7359          // stop propagation transitionend event to container
7360          var eve = {};
7361          eve[TRANSITIONEND] = function (e) { e.stopPropagation(); };
7362          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, eve);
7363
7364          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
7365
7366          // update src
7367          img.src = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-src');
7368
7369          // update srcset
7370          var srcset = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-srcset');
7371          if (srcset) { img.srcset = srcset; }
7372
7373          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
7374        }
7375      });
7376    }
7377  }
7378
7379  function onImgLoaded (e) {
7380    imgLoaded(getTarget(e));
7381  }
7382
7383  function onImgFailed (e) {
7384    imgFailed(getTarget(e));
7385  }
7386
7387  function imgLoaded (img) {
7388    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loaded');
7389    imgCompleted(img);
7390  }
7391
7392  function imgFailed (img) {
7393    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'failed');
7394    imgCompleted(img);
7395  }
7396
7397  function imgCompleted (img) {
7398    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, imgCompleteClass);
7399    Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(img, 'loading');
7400    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(img, imgEvents);
7401  }
7402
7403  function getImageArray (start, end, imgSelector) {
7404    var imgs = [];
7405    if (!imgSelector) { imgSelector = 'img'; }
7406
7407    while (start <= end) {
7408      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); });
7409      start++;
7410    }
7411
7412    return imgs;
7413  }
7414
7415  // check if all visible images are loaded
7416  // and update container height if it's done
7417  function doAutoHeight () {
7418    var imgs = getImageArray.apply(null, getVisibleSlideRange());
7419    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); });
7420  }
7421
7422  function imgsLoadedCheck (imgs, cb) {
7423    // execute callback function if all images are complete
7424    if (imgsComplete) { return cb(); }
7425
7426    // check image classes
7427    imgs.forEach(function (img, index) {
7428      if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete
7429      if (Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) { imgs.splice(index, 1); }
7430    });
7431
7432    // execute callback function if selected images are all complete
7433    if (!imgs.length) { return cb(); }
7434
7435    // otherwise execute this functiona again
7436    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, cb); });
7437  }
7438
7439  function additionalUpdates () {
7440    doLazyLoad();
7441    updateSlideStatus();
7442    updateLiveRegion();
7443    updateControlsStatus();
7444    updateNavStatus();
7445  }
7446
7447
7448  function update_carousel_transition_duration () {
7449    if (carousel && autoHeight) {
7450      middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's';
7451    }
7452  }
7453
7454  function getMaxSlideHeight (slideStart, slideRange) {
7455    var heights = [];
7456    for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) {
7457      heights.push(slideItems[i].offsetHeight);
7458    }
7459
7460    return Math.max.apply(null, heights);
7461  }
7462
7463  // update inner wrapper height
7464  // 1. get the max-height of the visible slides
7465  // 2. set transitionDuration to speed
7466  // 3. update inner wrapper height to max-height
7467  // 4. set transitionDuration to 0s after transition done
7468  function updateInnerWrapperHeight () {
7469    var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount),
7470        wp = middleWrapper ? middleWrapper : innerWrapper;
7471
7472    if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; }
7473  }
7474
7475  // get the distance from the top edge of the first slide to each slide
7476  // (init) => slidePositions
7477  function setSlidePositions () {
7478    slidePositions = [0];
7479    var attr = horizontal ? 'left' : 'top',
7480        attr2 = horizontal ? 'right' : 'bottom',
7481        base = slideItems[0].getBoundingClientRect()[attr];
7482
7483    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
7484      // skip the first slide
7485      if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }
7486      // add the end edge
7487      if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }
7488    });
7489  }
7490
7491  // update slide
7492  function updateSlideStatus () {
7493    var range = getVisibleSlideRange(),
7494        start = range[0],
7495        end = range[1];
7496
7497    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
7498      // show slides
7499      if (i >= start && i <= end) {
7500        if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
7501          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['aria-hidden', 'tabindex']);
7502          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, slideActiveClass);
7503        }
7504      // hide slides
7505      } else {
7506        if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
7507          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
7508            'aria-hidden': 'true',
7509            'tabindex': '-1'
7510          });
7511          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, slideActiveClass);
7512        }
7513      }
7514    });
7515  }
7516
7517  // gallery: update slide position
7518  function updateGallerySlidePositions () {
7519    var l = index + Math.min(slideCount, items);
7520    for (var i = slideCountNew; i--;) {
7521      var item = slideItems[i];
7522
7523      if (i >= index && i < l) {
7524        // add transitions to visible slides when adjusting their positions
7525        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-moving');
7526
7527        item.style.left = (i - index) * 100 / items + '%';
7528        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
7529        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
7530      } else if (item.style.left) {
7531        item.style.left = '';
7532        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
7533        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
7534      }
7535
7536      // remove outlet animation
7537      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
7538    }
7539
7540    // removing '.tns-moving'
7541    setTimeout(function() {
7542      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(el) {
7543        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(el, 'tns-moving');
7544      });
7545    }, 300);
7546  }
7547
7548  // set tabindex on Nav
7549  function updateNavStatus () {
7550    // get current nav
7551    if (nav) {
7552      navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex();
7553      navClicked = -1;
7554
7555      if (navCurrentIndex !== navCurrentIndexCached) {
7556        var navPrev = navItems[navCurrentIndexCached],
7557            navCurrent = navItems[navCurrentIndex];
7558
7559        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navPrev, {
7560          'tabindex': '-1',
7561          'aria-label': navStr + (navCurrentIndexCached + 1)
7562        });
7563        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(navPrev, navActiveClass);
7564
7565        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
7566        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navCurrent, 'tabindex');
7567        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navCurrent, navActiveClass);
7568
7569        navCurrentIndexCached = navCurrentIndex;
7570      }
7571    }
7572  }
7573
7574  function getLowerCaseNodeName (el) {
7575    return el.nodeName.toLowerCase();
7576  }
7577
7578  function isButton (el) {
7579    return getLowerCaseNodeName(el) === 'button';
7580  }
7581
7582  function isAriaDisabled (el) {
7583    return el.getAttribute('aria-disabled') === 'true';
7584  }
7585
7586  function disEnableElement (isButton, el, val) {
7587    if (isButton) {
7588      el.disabled = val;
7589    } else {
7590      el.setAttribute('aria-disabled', val.toString());
7591    }
7592  }
7593
7594  // set 'disabled' to true on controls when reach the edges
7595  function updateControlsStatus () {
7596    if (!controls || rewind || loop) { return; }
7597
7598    var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton),
7599        nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton),
7600        disablePrev = (index <= indexMin) ? true : false,
7601        disableNext = (!rewind && index >= indexMax) ? true : false;
7602
7603    if (disablePrev && !prevDisabled) {
7604      disEnableElement(prevIsButton, prevButton, true);
7605    }
7606    if (!disablePrev && prevDisabled) {
7607      disEnableElement(prevIsButton, prevButton, false);
7608    }
7609    if (disableNext && !nextDisabled) {
7610      disEnableElement(nextIsButton, nextButton, true);
7611    }
7612    if (!disableNext && nextDisabled) {
7613      disEnableElement(nextIsButton, nextButton, false);
7614    }
7615  }
7616
7617  // set duration
7618  function resetDuration (el, str) {
7619    if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; }
7620  }
7621
7622  function getSliderWidth () {
7623    return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew];
7624  }
7625
7626  function getCenterGap (num) {
7627    if (num == null) { num = index; }
7628
7629    var gap = edgePadding ? gutter : 0;
7630    return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 :
7631      fixedWidth ? (viewport - fixedWidth) / 2 :
7632        (items - 1) / 2;
7633  }
7634
7635  function getRightBoundary () {
7636    var gap = edgePadding ? gutter : 0,
7637        result = (viewport + gap) - getSliderWidth();
7638
7639    if (center && !loop) {
7640      result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() :
7641        getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1];
7642    }
7643    if (result > 0) { result = 0; }
7644
7645    return result;
7646  }
7647
7648  function getContainerTransformValue (num) {
7649    if (num == null) { num = index; }
7650
7651    var val;
7652    if (horizontal && !autoWidth) {
7653      if (fixedWidth) {
7654        val = - (fixedWidth + gutter) * num;
7655        if (center) { val += getCenterGap(); }
7656      } else {
7657        var denominator = TRANSFORM ? slideCountNew : items;
7658        if (center) { num -= getCenterGap(); }
7659        val = - num * 100 / denominator;
7660      }
7661    } else {
7662      val = - slidePositions[num];
7663      if (center && autoWidth) {
7664        val += getCenterGap();
7665      }
7666    }
7667
7668    if (hasRightDeadZone) { val = Math.max(val, rightBoundary); }
7669
7670    val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px';
7671
7672    return val;
7673  }
7674
7675  function doContainerTransformSilent (val) {
7676    resetDuration(container, '0s');
7677    doContainerTransform(val);
7678  }
7679
7680  function doContainerTransform (val) {
7681    if (val == null) { val = getContainerTransformValue(); }
7682    container.style[transformAttr] = transformPrefix + val + transformPostfix;
7683  }
7684
7685  function animateSlide (number, classOut, classIn, isOut) {
7686    var l = number + items;
7687    if (!loop) { l = Math.min(l, slideCountNew); }
7688
7689    for (var i = number; i < l; i++) {
7690        var item = slideItems[i];
7691
7692      // set item positions
7693      if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; }
7694
7695      if (animateDelay && TRANSITIONDELAY) {
7696        item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's';
7697      }
7698      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, classOut);
7699      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classIn);
7700
7701      if (isOut) { slideItemsOut.push(item); }
7702    }
7703  }
7704
7705  // make transfer after click/drag:
7706  // 1. change 'transform' property for mordern browsers
7707  // 2. change 'left' property for legacy browsers
7708  var transformCore = (function () {
7709    return carousel ?
7710      function () {
7711        resetDuration(container, '');
7712        if (TRANSITIONDURATION || !speed) {
7713          // for morden browsers with non-zero duration or
7714          // zero duration for all browsers
7715          doContainerTransform();
7716          // run fallback function manually
7717          // when duration is 0 / container is hidden
7718          if (!speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
7719
7720        } else {
7721          // for old browser with non-zero duration
7722          Object(_helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__["jsTransform"])(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd);
7723        }
7724
7725        if (!horizontal) { updateContentWrapperHeight(); }
7726      } :
7727      function () {
7728        slideItemsOut = [];
7729
7730        var eve = {};
7731        eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd;
7732        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(slideItems[indexCached], eve);
7733        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(slideItems[index], eve);
7734
7735        animateSlide(indexCached, animateIn, animateOut, true);
7736        animateSlide(index, animateNormal, animateIn);
7737
7738        // run fallback function manually
7739        // when transition or animation not supported / duration is 0
7740        if (!TRANSITIONEND || !ANIMATIONEND || !speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
7741      };
7742  })();
7743
7744  function render (e, sliderMoved) {
7745    if (updateIndexBeforeTransform) { updateIndex(); }
7746
7747    // render when slider was moved (touch or drag) even though index may not change
7748    if (index !== indexCached || sliderMoved) {
7749      // events
7750      events.emit('indexChanged', info());
7751      events.emit('transitionStart', info());
7752      if (autoHeight) { doAutoHeight(); }
7753
7754      // pause autoplay when click or keydown from user
7755      if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); }
7756
7757      running = true;
7758      transformCore();
7759    }
7760  }
7761
7762  /*
7763   * Transfer prefixed properties to the same format
7764   * CSS: -Webkit-Transform => webkittransform
7765   * JS: WebkitTransform => webkittransform
7766   * @param {string} str - property
7767   *
7768   */
7769  function strTrans (str) {
7770    return str.toLowerCase().replace(/-/g, '');
7771  }
7772
7773  // AFTER TRANSFORM
7774  // Things need to be done after a transfer:
7775  // 1. check index
7776  // 2. add classes to visible slide
7777  // 3. disable controls buttons when reach the first/last slide in non-loop slider
7778  // 4. update nav status
7779  // 5. lazyload images
7780  // 6. update container height
7781  function onTransitionEnd (event) {
7782    // check running on gallery mode
7783    // make sure trantionend/animationend events run only once
7784    if (carousel || running) {
7785      events.emit('transitionEnd', info(event));
7786
7787      if (!carousel && slideItemsOut.length > 0) {
7788        for (var i = 0; i < slideItemsOut.length; i++) {
7789          var item = slideItemsOut[i];
7790          // set item positions
7791          item.style.left = '';
7792
7793          if (ANIMATIONDELAY && TRANSITIONDELAY) {
7794            item.style[ANIMATIONDELAY] = '';
7795            item.style[TRANSITIONDELAY] = '';
7796          }
7797          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
7798          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
7799        }
7800      }
7801
7802      /* update slides, nav, controls after checking ...
7803       * => legacy browsers who don't support 'event'
7804       *    have to check event first, otherwise event.target will cause an error
7805       * => or 'gallery' mode:
7806       *   + event target is slide item
7807       * => or 'carousel' mode:
7808       *   + event target is container,
7809       *   + event.property is the same with transform attribute
7810       */
7811      if (!event ||
7812          !carousel && event.target.parentNode === container ||
7813          event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {
7814
7815        if (!updateIndexBeforeTransform) {
7816          var indexTem = index;
7817          updateIndex();
7818          if (index !== indexTem) {
7819            events.emit('indexChanged', info());
7820
7821            doContainerTransformSilent();
7822          }
7823        }
7824
7825        if (nested === 'inner') { events.emit('innerLoaded', info()); }
7826        running = false;
7827        indexCached = index;
7828      }
7829    }
7830
7831  }
7832
7833  // # ACTIONS
7834  function goTo (targetIndex, e) {
7835    if (freeze) { return; }
7836
7837    // prev slideBy
7838    if (targetIndex === 'prev') {
7839      onControlsClick(e, -1);
7840
7841    // next slideBy
7842    } else if (targetIndex === 'next') {
7843      onControlsClick(e, 1);
7844
7845    // go to exact slide
7846    } else {
7847      if (running) {
7848        if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
7849      }
7850
7851      var absIndex = getAbsIndex(),
7852          indexGap = 0;
7853
7854      if (targetIndex === 'first') {
7855        indexGap = - absIndex;
7856      } else if (targetIndex === 'last') {
7857        indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex;
7858      } else {
7859        if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); }
7860
7861        if (!isNaN(targetIndex)) {
7862          // from directly called goTo function
7863          if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); }
7864
7865          indexGap = targetIndex - absIndex;
7866        }
7867      }
7868
7869      // gallery: make sure new page won't overlap with current page
7870      if (!carousel && indexGap && Math.abs(indexGap) < items) {
7871        var factor = indexGap > 0 ? 1 : -1;
7872        indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1;
7873      }
7874
7875      index += indexGap;
7876
7877      // make sure index is in range
7878      if (carousel && loop) {
7879        if (index < indexMin) { index += slideCount; }
7880        if (index > indexMax) { index -= slideCount; }
7881      }
7882
7883      // if index is changed, start rendering
7884      if (getAbsIndex(index) !== getAbsIndex(indexCached)) {
7885        render(e);
7886      }
7887
7888    }
7889  }
7890
7891  // on controls click
7892  function onControlsClick (e, dir) {
7893    if (running) {
7894      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
7895    }
7896    var passEventObject;
7897
7898    if (!dir) {
7899      e = getEvent(e);
7900      var target = getTarget(e);
7901
7902      while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; }
7903
7904      var targetIn = [prevButton, nextButton].indexOf(target);
7905      if (targetIn >= 0) {
7906        passEventObject = true;
7907        dir = targetIn === 0 ? -1 : 1;
7908      }
7909    }
7910
7911    if (rewind) {
7912      if (index === indexMin && dir === -1) {
7913        goTo('last', e);
7914        return;
7915      } else if (index === indexMax && dir === 1) {
7916        goTo('first', e);
7917        return;
7918      }
7919    }
7920
7921    if (dir) {
7922      index += slideBy * dir;
7923      if (autoWidth) { index = Math.floor(index); }
7924      // pass e when click control buttons or keydown
7925      render((passEventObject || (e && e.type === 'keydown')) ? e : null);
7926    }
7927  }
7928
7929  // on nav click
7930  function onNavClick (e) {
7931    if (running) {
7932      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
7933    }
7934
7935    e = getEvent(e);
7936    var target = getTarget(e), navIndex;
7937
7938    // find the clicked nav item
7939    while (target !== navContainer && !Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) { target = target.parentNode; }
7940    if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) {
7941      var navIndex = navClicked = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(target, 'data-nav')),
7942          targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items,
7943          targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1);
7944      goTo(targetIndex, e);
7945
7946      if (navCurrentIndex === navIndex) {
7947        if (animating) { stopAutoplay(); }
7948        navClicked = -1; // reset navClicked
7949      }
7950    }
7951  }
7952
7953  // autoplay functions
7954  function setAutoplayTimer () {
7955    autoplayTimer = setInterval(function () {
7956      onControlsClick(null, autoplayDirection);
7957    }, autoplayTimeout);
7958
7959    animating = true;
7960  }
7961
7962  function stopAutoplayTimer () {
7963    clearInterval(autoplayTimer);
7964    animating = false;
7965  }
7966
7967  function updateAutoplayButton (action, txt) {
7968    Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': action});
7969    autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt;
7970  }
7971
7972  function startAutoplay () {
7973    setAutoplayTimer();
7974    if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); }
7975  }
7976
7977  function stopAutoplay () {
7978    stopAutoplayTimer();
7979    if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); }
7980  }
7981
7982  // programaitcally play/pause the slider
7983  function play () {
7984    if (autoplay && !animating) {
7985      startAutoplay();
7986      autoplayUserPaused = false;
7987    }
7988  }
7989  function pause () {
7990    if (animating) {
7991      stopAutoplay();
7992      autoplayUserPaused = true;
7993    }
7994  }
7995
7996  function toggleAutoplay () {
7997    if (animating) {
7998      stopAutoplay();
7999      autoplayUserPaused = true;
8000    } else {
8001      startAutoplay();
8002      autoplayUserPaused = false;
8003    }
8004  }
8005
8006  function onVisibilityChange () {
8007    if (doc.hidden) {
8008      if (animating) {
8009        stopAutoplayTimer();
8010        autoplayVisibilityPaused = true;
8011      }
8012    } else if (autoplayVisibilityPaused) {
8013      setAutoplayTimer();
8014      autoplayVisibilityPaused = false;
8015    }
8016  }
8017
8018  function mouseoverPause () {
8019    if (animating) {
8020      stopAutoplayTimer();
8021      autoplayHoverPaused = true;
8022    }
8023  }
8024
8025  function mouseoutRestart () {
8026    if (autoplayHoverPaused) {
8027      setAutoplayTimer();
8028      autoplayHoverPaused = false;
8029    }
8030  }
8031
8032  // keydown events on document
8033  function onDocumentKeydown (e) {
8034    e = getEvent(e);
8035    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
8036
8037    if (keyIndex >= 0) {
8038      onControlsClick(e, keyIndex === 0 ? -1 : 1);
8039    }
8040  }
8041
8042  // on key control
8043  function onControlsKeydown (e) {
8044    e = getEvent(e);
8045    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
8046
8047    if (keyIndex >= 0) {
8048      if (keyIndex === 0) {
8049        if (!prevButton.disabled) { onControlsClick(e, -1); }
8050      } else if (!nextButton.disabled) {
8051        onControlsClick(e, 1);
8052      }
8053    }
8054  }
8055
8056  // set focus
8057  function setFocus (el) {
8058    el.focus();
8059  }
8060
8061  // on key nav
8062  function onNavKeydown (e) {
8063    e = getEvent(e);
8064    var curElement = doc.activeElement;
8065    if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(curElement, 'data-nav')) { return; }
8066
8067    // var code = e.keyCode,
8068    var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode),
8069        navIndex = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(curElement, 'data-nav'));
8070
8071    if (keyIndex >= 0) {
8072      if (keyIndex === 0) {
8073        if (navIndex > 0) { setFocus(navItems[navIndex - 1]); }
8074      } else if (keyIndex === 1) {
8075        if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); }
8076      } else {
8077        navClicked = navIndex;
8078        goTo(navIndex, e);
8079      }
8080    }
8081  }
8082
8083  function getEvent (e) {
8084    e = e || win.event;
8085    return isTouchEvent(e) ? e.changedTouches[0] : e;
8086  }
8087  function getTarget (e) {
8088    return e.target || win.event.srcElement;
8089  }
8090
8091  function isTouchEvent (e) {
8092    return e.type.indexOf('touch') >= 0;
8093  }
8094
8095  function preventDefaultBehavior (e) {
8096    e.preventDefault ? e.preventDefault() : e.returnValue = false;
8097  }
8098
8099  function getMoveDirectionExpected () {
8100    return Object(_helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__["getTouchDirection"])(Object(_helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__["toDegree"])(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis;
8101  }
8102
8103  function onPanStart (e) {
8104    if (running) {
8105      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
8106    }
8107
8108    if (autoplay && animating) { stopAutoplayTimer(); }
8109
8110    panStart = true;
8111    if (rafIndex) {
8112      Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
8113      rafIndex = null;
8114    }
8115
8116    var $ = getEvent(e);
8117    events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e));
8118
8119    if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) {
8120      preventDefaultBehavior(e);
8121    }
8122
8123    lastPosition.x = initPosition.x = $.clientX;
8124    lastPosition.y = initPosition.y = $.clientY;
8125    if (carousel) {
8126      translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, ''));
8127      resetDuration(container, '0s');
8128    }
8129  }
8130
8131  function onPanMove (e) {
8132    if (panStart) {
8133      var $ = getEvent(e);
8134      lastPosition.x = $.clientX;
8135      lastPosition.y = $.clientY;
8136
8137      if (carousel) {
8138        if (!rafIndex) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
8139      } else {
8140        if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
8141        if (moveDirectionExpected) { preventScroll = true; }
8142      }
8143
8144      if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) {
8145        e.preventDefault();
8146      }
8147    }
8148  }
8149
8150  function panUpdate (e) {
8151    if (!moveDirectionExpected) {
8152      panStart = false;
8153      return;
8154    }
8155    Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
8156    if (panStart) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
8157
8158    if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
8159    if (moveDirectionExpected) {
8160      if (!preventScroll && isTouchEvent(e)) { preventScroll = true; }
8161
8162      try {
8163        if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); }
8164      } catch(err) {}
8165
8166      var x = translateInit,
8167          dist = getDist(lastPosition, initPosition);
8168      if (!horizontal || fixedWidth || autoWidth) {
8169        x += dist;
8170        x += 'px';
8171      } else {
8172        var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter);
8173        x += percentageX;
8174        x += '%';
8175      }
8176
8177      container.style[transformAttr] = transformPrefix + x + transformPostfix;
8178    }
8179  }
8180
8181  function onPanEnd (e) {
8182    if (panStart) {
8183      if (rafIndex) {
8184        Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
8185        rafIndex = null;
8186      }
8187      if (carousel) { resetDuration(container, ''); }
8188      panStart = false;
8189
8190      var $ = getEvent(e);
8191      lastPosition.x = $.clientX;
8192      lastPosition.y = $.clientY;
8193      var dist = getDist(lastPosition, initPosition);
8194
8195      if (Math.abs(dist)) {
8196        // drag vs click
8197        if (!isTouchEvent(e)) {
8198          // prevent "click"
8199          var target = getTarget(e);
8200          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(target, {'click': function preventClick (e) {
8201            preventDefaultBehavior(e);
8202            Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(target, {'click': preventClick});
8203          }});
8204        }
8205
8206        if (carousel) {
8207          rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function() {
8208            if (horizontal && !autoWidth) {
8209              var indexMoved = - dist * items / (viewport + gutter);
8210              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
8211              index += indexMoved;
8212            } else {
8213              var moved = - (translateInit + dist);
8214              if (moved <= 0) {
8215                index = indexMin;
8216              } else if (moved >= slidePositions[slideCountNew - 1]) {
8217                index = indexMax;
8218              } else {
8219                var i = 0;
8220                while (i < slideCountNew && moved >= slidePositions[i]) {
8221                  index = i;
8222                  if (moved > slidePositions[i] && dist < 0) { index += 1; }
8223                  i++;
8224                }
8225              }
8226            }
8227
8228            render(e, dist);
8229            events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e));
8230          });
8231        } else {
8232          if (moveDirectionExpected) {
8233            onControlsClick(e, dist > 0 ? -1 : 1);
8234          }
8235        }
8236      }
8237    }
8238
8239    // reset
8240    if (options.preventScrollOnTouch === 'auto') { preventScroll = false; }
8241    if (swipeAngle) { moveDirectionExpected = '?'; }
8242    if (autoplay && !animating) { setAutoplayTimer(); }
8243  }
8244
8245  // === RESIZE FUNCTIONS === //
8246  // (slidePositions, index, items) => vertical_conentWrapper.height
8247  function updateContentWrapperHeight () {
8248    var wp = middleWrapper ? middleWrapper : innerWrapper;
8249    wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px';
8250  }
8251
8252  function getPages () {
8253    var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items;
8254    return Math.min(Math.ceil(rough), slideCount);
8255  }
8256
8257  /*
8258   * 1. update visible nav items list
8259   * 2. add "hidden" attributes to previous visible nav items
8260   * 3. remove "hidden" attrubutes to new visible nav items
8261   */
8262  function updateNavVisibility () {
8263    if (!nav || navAsThumbnails) { return; }
8264
8265    if (pages !== pagesCached) {
8266      var min = pagesCached,
8267          max = pages,
8268          fn = _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"];
8269
8270      if (pagesCached > pages) {
8271        min = pages;
8272        max = pagesCached;
8273        fn = _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"];
8274      }
8275
8276      while (min < max) {
8277        fn(navItems[min]);
8278        min++;
8279      }
8280
8281      // cache pages
8282      pagesCached = pages;
8283    }
8284  }
8285
8286  function info (e) {
8287    return {
8288      container: container,
8289      slideItems: slideItems,
8290      navContainer: navContainer,
8291      navItems: navItems,
8292      controlsContainer: controlsContainer,
8293      hasControls: hasControls,
8294      prevButton: prevButton,
8295      nextButton: nextButton,
8296      items: items,
8297      slideBy: slideBy,
8298      cloneCount: cloneCount,
8299      slideCount: slideCount,
8300      slideCountNew: slideCountNew,
8301      index: index,
8302      indexCached: indexCached,
8303      displayIndex: getCurrentSlide(),
8304      navCurrentIndex: navCurrentIndex,
8305      navCurrentIndexCached: navCurrentIndexCached,
8306      pages: pages,
8307      pagesCached: pagesCached,
8308      sheet: sheet,
8309      isOn: isOn,
8310      event: e || {},
8311    };
8312  }
8313
8314  return {
8315    version: '2.9.3',
8316    getInfo: info,
8317    events: events,
8318    goTo: goTo,
8319    play: play,
8320    pause: pause,
8321    isOn: isOn,
8322    updateSliderHeight: updateInnerWrapperHeight,
8323    refresh: initSliderTransform,
8324    destroy: destroy,
8325    rebuild: function() {
8326      return tns(Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, optionsElements));
8327    }
8328  };
8329};
8330
8331
8332/***/ }),
8333
8334/***/ "./src/components/slider/slider.js":
8335/*!*****************************************!*\
8336  !*** ./src/components/slider/slider.js ***!
8337  \*****************************************/
8338/*! no exports provided */
8339/***/ (function(module, __webpack_exports__, __webpack_require__) {
8340
8341"use strict";
8342__webpack_require__.r(__webpack_exports__);
8343/* harmony import */ var _js_main_script__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../js/main.script */ "./src/js/main.script.js");
8344
8345
8346
8347
8348(function ($, Drupal) {
8349  if ($('.slider--full-width .image__item').length) {
8350    var image__fullwidth = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
8351      container: '.slider--full-width .image__content',
8352      navPosition: 'bottom',
8353      controlsPosition: 'bottom',
8354      controlsContainer: ".carousel-controls",
8355      prevButton: ".carousel-prev",
8356      nextButton: ".carousel-next",
8357      mouseDrag: true,
8358      arrowKeys: true,
8359      onInit: function onInit(info) {
8360        info.controlsContainer.setAttribute('tabindex', -1);
8361        info.nextButton.setAttribute('tabindex', 3);
8362        info.prevButton.setAttribute('tabindex', 3);
8363      }
8364    });
8365  }
8366
8367  if ($('.slider--three .image__item').length) {
8368    var image__three = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
8369      container: '.slider--three .image__content',
8370      navPosition: 'bottom',
8371      controlsPosition: 'bottom',
8372      mouseDrag: true,
8373      controls: false,
8374      center: true,
8375      gutter: 0,
8376      widthAuto: true,
8377      arrowKeys: true,
8378      responsive: {
8379        960: {
8380          controls: true,
8381          gutter: 40,
8382          fixedWidth: 550
8383        }
8384      },
8385      onInit: function onInit(info) {
8386        info.controlsContainer.setAttribute('tabindex', -1);
8387        info.nextButton.setAttribute('tabindex', 3);
8388        info.prevButton.setAttribute('tabindex', 3);
8389      }
8390    });
8391  }
8392
8393  if ($('.slider--featured .item').length) {
8394    var image__featured = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
8395      container: '.slider--featured .content',
8396      navPosition: 'bottom',
8397      controlsPosition: 'bottom',
8398      mouseDrag: true,
8399      controls: false,
8400      center: true,
8401      gutter: 0,
8402      widthAuto: true,
8403      arrowKeys: true,
8404      responsive: {
8405        960: {
8406          controls: true,
8407          nav: false,
8408          gutter: 40,
8409          fixedWidth: 550
8410        }
8411      },
8412      onInit: function onInit(info) {
8413        info.controlsContainer.setAttribute('tabindex', -1);
8414        info.nextButton.setAttribute('tabindex', 3);
8415        info.prevButton.setAttribute('tabindex', 3);
8416        document.addEventListener("DOMContentLoaded", function (event) {
8417          document.querySelectorAll('.tns-slide-cloned a').forEach(function (btn) {
8418            btn.setAttribute('tabindex', -1);
8419          });
8420        });
8421      }
8422    });
8423  }
8424
8425  if ($('.slider--five .image__item').length) {
8426    var image__five = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
8427      container: '.slider--five .image__content',
8428      navPosition: 'bottom',
8429      controlsPosition: 'bottom',
8430      mouseDrag: true,
8431      controls: false,
8432      center: true,
8433      gutter: 0,
8434      arrowKeys: true,
8435      responsive: {
8436        960: {
8437          controls: true,
8438          gutter: 40,
8439          items: 5
8440        }
8441      },
8442      onInit: function onInit(info) {
8443        info.controlsContainer.setAttribute('tabindex', -1);
8444        info.nextButton.setAttribute('tabindex', 3);
8445        info.prevButton.setAttribute('tabindex', 3);
8446      }
8447    });
8448  }
8449
8450  if ($('.slider--six .image__item').length) {
8451    var image__six = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
8452      container: '.slider--six .image__content',
8453      navPosition: 'bottom',
8454      controlsPosition: 'bottom',
8455      mouseDrag: true,
8456      controls: false,
8457      center: true,
8458      gutter: 0,
8459      widthAuto: true,
8460      arrowKeys: true,
8461      responsive: {
8462        960: {
8463          controls: true,
8464          gutter: 40,
8465          fixedWidth: 254
8466        }
8467      },
8468      onInit: function onInit(info) {
8469        info.controlsContainer.setAttribute('tabindex', -1);
8470        info.nextButton.setAttribute('tabindex', 3);
8471        info.prevButton.setAttribute('tabindex', 3);
8472      }
8473    });
8474  }
8475})(jQuery, Drupal);
8476
8477/***/ }),
8478
8479/***/ "./src/js/main.script.js":
8480/*!*******************************!*\
8481  !*** ./src/js/main.script.js ***!
8482  \*******************************/
8483/*! exports provided: tns */
8484/***/ (function(module, __webpack_exports__, __webpack_require__) {
8485
8486"use strict";
8487__webpack_require__.r(__webpack_exports__);
8488/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill */ "./src/js/polyfill.js");
8489/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_polyfill__WEBPACK_IMPORTED_MODULE_0__);
8490/* harmony import */ var _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/tiny-slider/src/tiny-slider */ "./node_modules/tiny-slider/src/tiny-slider.js");
8491/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__["tns"]; });
8492
8493
8494
8495 // import 'bootstrap';
8496
8497
8498
8499
8500(function ($, Drupal, drupalSettings) {
8501  // Responsive check helper:
8502  // USAGE: if (Drupal.device.isMobile()) {}
8503  Drupal.device = {
8504    isDesktop: function isDesktop() {
8505      return $(window).innerWidth() > 980;
8506    },
8507    isTablet: function isTablet() {
8508      return $(window).innerWidth() <= 980 && $(window).innerWidth() > 728;
8509    },
8510    isMobile: function isMobile() {
8511      return $(window).innerWidth() <= 728;
8512    }
8513  };
8514  setTimeout(function () {
8515    $("#where-to-buy .wtb-title .more-link a").addClass("btn btn-primary");
8516  }, 1000); // Let the document know when the mouse is being used
8517
8518  document.body.addEventListener("mousedown", function () {
8519    document.body.classList.add("using-mouse");
8520  }); // Re-enable focus styling when Tab is pressed
8521
8522  document.body.addEventListener("keydown", function (event) {
8523    if (event.keyCode === 9) {
8524      document.body.classList.remove("using-mouse");
8525    }
8526  });
8527  $(".webform-email").attr("autocomplete", "email");
8528  $(".webform-email-confirm").attr("autocomplete", "email-confirm");
8529  $("#ajax-wrapper .js-form-item-image-upload small #edit-image-upload--description").append("<small> No file chosen.</small>");
8530  Drupal.behaviors.Bc_brandTheme = {
8531    attach: function attach(context, settings) {
8532      var host = window.location.host;
8533      $('a[href^="http"]:not([href*="' + host + '"])').each(function (index) {
8534        $(this).attr("rel", "noopener nofollow");
8535      });
8536      $('[data-toggle="popover"]').each(function (index) {
8537        var $this = $(this);
8538        var $container = $this.closest("div");
8539        $container.addClass("has-popover");
8540        $this.appendTo($container);
8541        $this.popover({
8542          template: '<div class="popover" role="tooltip"><div class="popover-body"></div></div>',
8543          container: $container
8544        });
8545      });
8546      $(".webform-submission-newsletter-form-form .form-item-postal-code input").inputmask({
8547        mask: ["99999", "99999-9999", "A9A 9A9"],
8548        placeholder: "",
8549        clearIncomplete: true
8550      }); // let optionsRegion = $('#region-select').html();
8551      // console.log("options",  optionsRegion);
8552      // $('#region-select-footer').append(optionsRegion);
8553      // tns carousel remove tabindex.
8554      // $('.tns-carousel > .tns-item').removeAttr('tabindex', 'aria-hidden');
8555
8556      /**
8557       * SHARE COMPONENT
8558       */
8559
8560      /**
8561       * Determine the mobile operating system.
8562       * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
8563       * Based on: https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system
8564       * @returns {String}
8565       */
8566
8567      function isAndroidIOS() {
8568        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
8569
8570        if (/android/i.test(userAgent)) {
8571          console.log("android detected");
8572          return true;
8573        } // iOS detection from: http://stackoverflow.com/a/9039885/177710
8574
8575
8576        if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
8577          console.log("ios detected");
8578          return true;
8579        } //not Android or iOS
8580
8581
8582        return false;
8583      }
8584
8585      function getMeta(metaName) {
8586        var metas = document.getElementsByTagName("meta");
8587
8588        for (var i = 0; i < metas.length; i++) {
8589          if (metas[i].getAttribute("name") === metaName) {
8590            return metas[i].getAttribute("content");
8591          }
8592        }
8593
8594        return "";
8595      }
8596
8597      $(".share-button", context).on("click", function () {
8598        var isMobile = isAndroidIOS();
8599        console.log(isMobile);
8600
8601        if (navigator.share && isMobile) {
8602          navigator.share({
8603            title: document.title,
8604            text: getMeta("description"),
8605            url: document.href
8606          }).then(function () {
8607            return console.log("Successful share");
8608          })["catch"](function (error) {
8609            return console.log("Error sharing", error);
8610          });
8611          return null;
8612        }
8613
8614        $(this).toggleClass("opened"); // $(this).find('.icon').toggleClass('icon-share-close icon-share');
8615
8616        $(".sharebox").toggleClass("opened");
8617
8618        if ($(this).hasClass("opened")) {
8619          $(this).attr("aria-expanded", "true");
8620        } else {
8621          $(this).attr("aria-expanded", "false");
8622        } // $('.sharebox .close').focus();
8623
8624      }); // $('.sharebox .close').on('click', function () {
8625      //   $(this).parents('.opened').removeClass('opened');
8626      // });
8627
8628      var $temp = $("<input>");
8629      var $url = $(location).attr("href");
8630      $(".sharebox .copybutton").on("click", function () {
8631        // $('.copyfield input')[0].select();
8632        // document.execCommand('copy');
8633        $("body").append($temp);
8634        $temp.val($url).select();
8635        document.execCommand("copy");
8636        $temp.remove();
8637        $(".copyfield .copymessage").addClass("shown");
8638        setTimeout(function () {
8639          $(".copyfield .copymessage").removeClass("shown");
8640        }, 10000);
8641      });
8642      $("#navbar .navbar-brand", context).attr("tabindex", "0"); //Change Element type
8643
8644      $.fn.changeElementType = function (newType) {
8645        this.each(function () {
8646          var attrs = {};
8647          $.each(this.attributes, function (idx, attr) {
8648            attrs[attr.nodeName] = attr.nodeValue;
8649          });
8650          $(this).replaceWith(function () {
8651            return $("<" + newType + "/>", attrs).append($(this).contents());
8652          });
8653        });
8654      }; // $(".juicer-feed .slick-list .slick-track").changeElementType("ul");
8655      // $(".juicer-feed").changeElementType("div");
8656      // Detect Valid Keyboard Clicks
8657      // https://karlgroves.com/2014/11/24/ridiculously-easy-trick-for-keyboard-accessibility
8658
8659
8660      function a11yClick(event) {
8661        if (event.type === "click") {
8662          return true;
8663        } else if (event.type === "keypress") {
8664          var code = event.charCode || event.keyCode;
8665
8666          if (code === 32 || code === 13) {
8667            return true;
8668          }
8669        } else {
8670          return false;
8671        }
8672      } // Juicer/Slick accessibility tweaks.
8673      // $("#block-juiceren .juicer-feed").changeElementType("div");
8674      // $(".j-overlay .j-close span").html('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
8675
8676
8677      $("#block-juiceren .juicer-feed").on("init", function (e, slick) {
8678        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active");
8679        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
8680        setTimeout(function () {
8681          // Set slick's accessibility option to false as recommended here:
8682          // https://hub.accessible360.com/kb/articles/521#heading-tip-3-disable-accessibility-mode
8683          if ($("#block-juiceren .juicer-feed").hasClass("slick-initialized")) {
8684            $("#block-juiceren .juicer-feed.slick-initialized").slick("slickSetOption", {
8685              accessibility: false
8686            }, true);
8687          }
8688
8689          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
8690        }, 1000);
8691        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text a").removeAttr("tabindex").css("color", "white").changeElementType("span");
8692        $("#block-juiceren .juicer-feed .slick-list").find(".slick-track .feed-item").attr("role", "group");
8693        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text .j-meta nav").addClass("j-meta-nav").changeElementType("div");
8694        $("#block-juiceren .juicer-feed .slick-list .feed-item").on("click", function () {
8695          window.open($(this).find("a").attr("href")); // console.log('test');
8696
8697          return false;
8698        }); // Play icon.
8699
8700        var $imageVideo = $("#block-juiceren .juicer-feed .slick-list .feed-item.j-video .j-image");
8701        var playIcon = '<span class="j-video-icon" aria-hidden="true"></span>';
8702        $imageVideo.append(playIcon);
8703        $("#block-juiceren .juicer-feed .slick-list .feed-item", context).each(function (i, e) {
8704          var alt = $(e).find(".j-image img").attr("alt"),
8705              message = $(e).find(".j-message").text(),
8706              label = Number($(e).attr("data-slick-index")) + 1,
8707              totalSlide = $("#block-juiceren .juicer-feed .slick-list .feed-item").length;
8708          $(e).attr({
8709            "aria-label": "Slide " + label + " of " + totalSlide
8710          }); // if (alt) {
8711          // $(e).find(".j-image img").attr("alt", alt.replace('Photo from ', ''));
8712          // }
8713
8714          $(e).find(".j-image img").attr("alt", message); // Social icon screen reader text.
8715
8716          var $social = $(this).find(".j-social");
8717          var socialIcon = '<span class="j-social-icon" aria-hidden="true"></span> <span class="sr-only">' + $social.attr("aria-label") + "</span>";
8718          $social.append(socialIcon).removeAttr("aria-label");
8719        });
8720        $(".slick-next, .slick-prev").on("click keypress", function (event) {
8721          if (a11yClick(event) === true) {
8722            setTimeout(function () {
8723              $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active a").first().focus();
8724            }, 100);
8725          }
8726        }); //update all j-meta a tags to say comments or likes
8727
8728        $(".comments, .repins").each(function () {
8729          var numComments = $(this).text();
8730          $(this).html(numComments + ' <span class="sr-only">comments</div>');
8731        });
8732        $(".likes").each(function () {
8733          var numLikes = $(this).text();
8734          $(this).html(numLikes + ' <span class="sr-only">likes</div>');
8735        });
8736      });
8737      $("#block-juiceren .juicer-feed").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
8738        $("#block-juiceren .juicer-feed .slick-list .feed-item").removeAttr("aria-hidden");
8739      });
8740      $("#block-juiceren .juicer-feed").on("afterChange", function (e, slick, currentSlide) {
8741        setTimeout(function () {
8742          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
8743        }, 500);
8744      });
8745
8746      if ($("#prodH1").length > 0) {
8747        var root = document.getElementById("prodH1");
8748        root.style.setProperty("--h1-height", root.clientHeight + "px");
8749        $(".products--full").addClass("loaded");
8750        console.log("root.clientHeight", root.clientHeight);
8751      }
8752    }
8753  };
8754  setTimeout(function () {
8755    $(".path-sitemap .field-title a, .path-plan-du-site .field-title a").each(function () {
8756      var $this = $(this),
8757          content = $this.text().replace(/&#174;/g, "®").replace(/&#174/g, "®").replace(/&#127338;/g, "🅪").replace(/&#127339;/g, "🅫").replace(/&#8482;/g, "™");
8758      $this.text(content);
8759    });
8760    $(".j-overlay .j-close").append('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
8761  }, 100); // if ($("img[alt]").text === "[mtools:empty]") {
8762  //   console.log("origAlt");
8763  // }
8764
8765  $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
8766
8767  Drupal.behaviors.gameSliderControls = {
8768    attach: function attach(context, settings) {
8769      if ($(".game-slider").length > 0) {
8770        $(".game-slider .tns-controls").removeAttr("aria-label");
8771        $(".game-slider .tns-controls").removeAttr("tabindex");
8772        $(".game-slider__next").attr("tabindex", "0");
8773      }
8774    }
8775  }; //on click of "esc" key it closes the modal popup
8776
8777  $(document).on("keydown", function (event) {
8778    if ($("body").hasClass("mm-ocd-opened")) {
8779      if (event.key === "Escape" || event.key == "Esc") {
8780        $("#main-menu-button-close").click();
8781      }
8782    }
8783  });
8784
8785  function modalTabLock() {
8786    //Prevent Shift + Tab to focus outside of the Modal
8787    $(".page__header input, .page__header .btn").on("keydown", function (e) {
8788      if (e.which === 9 && e.shiftKey) {
8789        setTimeout(function () {
8790          $(".navbar-actions .icon-search").focus();
8791        }, 10);
8792      }
8793    }); //Prevent Tab to focus outside of the Modal
8794
8795    $(".page__header .btn").on("keydown", function (e) {
8796      if (e.which === 9 && !e.shiftKey) {
8797        e.preventDefault();
8798        setTimeout(function () {
8799          $(".navbar-actions .icon-search").focus();
8800        }, 10);
8801      }
8802    });
8803  }
8804
8805  setTimeout(function () {
8806    modalTabLock();
8807  }, 100);
8808  Drupal.behaviors.imageAlt = {
8809    attach: function attach(context, settings) {
8810      $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt='[mtools:empty]'").attr("alt", "");
8811      // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
8812      // var altText = $("img").getAttribute("alt");
8813      // if($("img").attr("alt") === "[mtools:empty]") {
8814      //   $(this).attr("alt", "");
8815      // }
8816
8817      $('img[alt="[mtools:empty]"]').each(function () {
8818        // `this` is the div
8819        $(this).attr("alt", "");
8820      });
8821    }
8822  };
8823})(jQuery, Drupal, drupalSettings);
8824
8825/***/ }),
8826
vendor: 4,318 bytes, lines 8827-8938
8827/***/ "./src/js/polyfill.js":
8828/*!****************************!*\
8829  !*** ./src/js/polyfill.js ***!
8830  \****************************/
8831/*! no static exports found */
8832/***/ (function(module, exports) {
8833
8834// Add your JS/node package pollyfills here
8835
8836/***/ }),
8837
8838/***/ 27:
8839/*!***********************************************!*\
8840  !*** multi ./src/components/slider/slider.js ***!
8841  \***********************************************/
8842/*! no static exports found */
8843/***/ (function(module, exports, __webpack_require__) {
8844
8845module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/slider/slider.js */"./src/components/slider/slider.js");
8846
8847
8848/***/ })
8849
8850/******/ });;
8851/******/ (function(modules) { // webpackBootstrap
8852/******/ 	// The module cache
8853/******/ 	var installedModules = {};
8854/******/
8855/******/ 	// The require function
8856/******/ 	function __webpack_require__(moduleId) {
8857/******/
8858/******/ 		// Check if module is in cache
8859/******/ 		if(installedModules[moduleId]) {
8860/******/ 			return installedModules[moduleId].exports;
8861/******/ 		}
8862/******/ 		// Create a new module (and put it into the cache)
8863/******/ 		var module = installedModules[moduleId] = {
8864/******/ 			i: moduleId,
8865/******/ 			l: false,
8866/******/ 			exports: {}
8867/******/ 		};
8868/******/
8869/******/ 		// Execute the module function
8870/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
8871/******/
8872/******/ 		// Flag the module as loaded
8873/******/ 		module.l = true;
8874/******/
8875/******/ 		// Return the exports of the module
8876/******/ 		return module.exports;
8877/******/ 	}
8878/******/
8879/******/
8880/******/ 	// expose the modules object (__webpack_modules__)
8881/******/ 	__webpack_require__.m = modules;
8882/******/
8883/******/ 	// expose the module cache
8884/******/ 	__webpack_require__.c = installedModules;
8885/******/
8886/******/ 	// define getter function for harmony exports
8887/******/ 	__webpack_require__.d = function(exports, name, getter) {
8888/******/ 		if(!__webpack_require__.o(exports, name)) {
8889/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
8890/******/ 		}
8891/******/ 	};
8892/******/
8893/******/ 	// define __esModule on exports
8894/******/ 	__webpack_require__.r = function(exports) {
8895/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
8896/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
8897/******/ 		}
8898/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
8899/******/ 	};
8900/******/
8901/******/ 	// create a fake namespace object
8902/******/ 	// mode & 1: value is a module id, require it
8903/******/ 	// mode & 2: merge all properties of value into the ns
8904/******/ 	// mode & 4: return value when already ns object
8905/******/ 	// mode & 8|1: behave like require
8906/******/ 	__webpack_require__.t = function(value, mode) {
8907/******/ 		if(mode & 1) value = __webpack_require__(value);
8908/******/ 		if(mode & 8) return value;
8909/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
8910/******/ 		var ns = Object.create(null);
8911/******/ 		__webpack_require__.r(ns);
8912/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
8913/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
8914/******/ 		return ns;
8915/******/ 	};
8916/******/
8917/******/ 	// getDefaultExport function for compatibility with non-harmony modules
8918/******/ 	__webpack_require__.n = function(module) {
8919/******/ 		var getter = module && module.__esModule ?
8920/******/ 			function getDefault() { return module['default']; } :
8921/******/ 			function getModuleExports() { return module; };
8922/******/ 		__webpack_require__.d(getter, 'a', getter);
8923/******/ 		return getter;
8924/******/ 	};
8925/******/
8926/******/ 	// Object.prototype.hasOwnProperty.call
8927/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
8928/******/
8929/******/ 	// __webpack_public_path__
8930/******/ 	__webpack_require__.p = "/";
8931/******/
8932/******/
8933/******/ 	// Load entry module and return exports
8934/******/ 	return __webpack_require__(__webpack_require__.s = 11);
8935/******/ })
8936/************************************************************************/
8937/******/ ({
8938
vendor: 970 bytes, lines 8939-8961
8939/***/ "./node_modules/tiny-slider/src/helpers/addCSSRule.js":
8940/*!************************************************************!*\
8941  !*** ./node_modules/tiny-slider/src/helpers/addCSSRule.js ***!
8942  \************************************************************/
8943/*! exports provided: addCSSRule */
8944/***/ (function(module, __webpack_exports__, __webpack_require__) {
8945
8946"use strict";
8947__webpack_require__.r(__webpack_exports__);
8948/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addCSSRule", function() { return addCSSRule; });
8949/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
8950// cross browsers addRule method
8951
8952function addCSSRule(sheet, selector, rules, index) {
8953  // return raf(function() {
8954    'insertRule' in sheet ?
8955      sheet.insertRule(selector + '{' + rules + '}', index) :
8956      sheet.addRule(selector, rules, index);
8957  // });
8958}
8959
8960/***/ }),
8961
vendor: 1,082 bytes, lines 8962-8985
8962/***/ "./node_modules/tiny-slider/src/helpers/addClass.js":
8963/*!**********************************************************!*\
8964  !*** ./node_modules/tiny-slider/src/helpers/addClass.js ***!
8965  \**********************************************************/
8966/*! exports provided: addClass */
8967/***/ (function(module, __webpack_exports__, __webpack_require__) {
8968
8969"use strict";
8970__webpack_require__.r(__webpack_exports__);
8971/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
8972/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
8973
8974var addClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
8975    function (el, str) {
8976      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.add(str); }
8977    } :
8978    function (el, str) {
8979      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.className += ' ' + str; }
8980    };
8981
8982
8983
8984/***/ }),
8985
vendor: 1,023 bytes, lines 8986-9007
8986/***/ "./node_modules/tiny-slider/src/helpers/addEvents.js":
8987/*!***********************************************************!*\
8988  !*** ./node_modules/tiny-slider/src/helpers/addEvents.js ***!
8989  \***********************************************************/
8990/*! exports provided: addEvents */
8991/***/ (function(module, __webpack_exports__, __webpack_require__) {
8992
8993"use strict";
8994__webpack_require__.r(__webpack_exports__);
8995/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEvents", function() { return addEvents; });
8996/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
8997
8998
8999function addEvents(el, obj, preventScrolling) {
9000  for (var prop in obj) {
9001    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
9002    el.addEventListener(prop, obj[prop], option);
9003  }
9004}
9005
9006/***/ }),
9007
vendor: 745 bytes, lines 9008-9027
9008/***/ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js":
9009/*!*******************************************************************!*\
9010  !*** ./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js ***!
9011  \*******************************************************************/
9012/*! exports provided: arrayFromNodeList */
9013/***/ (function(module, __webpack_exports__, __webpack_require__) {
9014
9015"use strict";
9016__webpack_require__.r(__webpack_exports__);
9017/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayFromNodeList", function() { return arrayFromNodeList; });
9018function arrayFromNodeList (nl) {
9019  var arr = [];
9020  for (var i = 0, l = nl.length; i < l; i++) {
9021    arr.push(nl[i]);
9022  }
9023  return arr;
9024}
9025
9026/***/ }),
9027
vendor: 637 bytes, lines 9028-9046
9028/***/ "./node_modules/tiny-slider/src/helpers/caf.js":
9029/*!*****************************************************!*\
9030  !*** ./node_modules/tiny-slider/src/helpers/caf.js ***!
9031  \*****************************************************/
9032/*! exports provided: caf */
9033/***/ (function(module, __webpack_exports__, __webpack_require__) {
9034
9035"use strict";
9036__webpack_require__.r(__webpack_exports__);
9037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caf", function() { return caf; });
9038var win = window;
9039
9040var caf = win.cancelAnimationFrame
9041  || win.mozCancelAnimationFrame
9042  || function(id){ clearTimeout(id); };
9043
9044
9045/***/ }),
9046
vendor: 1,914 bytes, lines 9047-9095
9047/***/ "./node_modules/tiny-slider/src/helpers/calc.js":
9048/*!******************************************************!*\
9049  !*** ./node_modules/tiny-slider/src/helpers/calc.js ***!
9050  \******************************************************/
9051/*! exports provided: calc */
9052/***/ (function(module, __webpack_exports__, __webpack_require__) {
9053
9054"use strict";
9055__webpack_require__.r(__webpack_exports__);
9056/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calc", function() { return calc; });
9057/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
9058/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
9059/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
9060// get css-calc 
9061// @return - false | calc | -webkit-calc | -moz-calc
9062// @usage - var calc = getCalc(); 
9063
9064
9065
9066
9067function calc() {
9068  var doc = document, 
9069      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
9070      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
9071      div = doc.createElement('div'), 
9072      result = false;
9073
9074  body.appendChild(div);
9075  try {
9076    var str = '(10px * 10)',
9077        vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],
9078        val;
9079    for (var i = 0; i < 3; i++) {
9080      val = vals[i];
9081      div.style.width = val;
9082      if (div.offsetWidth === 100) { 
9083        result = val.replace(str, ''); 
9084        break;
9085      }
9086    }
9087  } catch (e) {}
9088  
9089  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
9090
9091  return result;
9092}
9093
9094/***/ }),
9095
vendor: 722 bytes, lines 9096-9111
9096/***/ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js":
9097/*!*******************************************************************!*\
9098  !*** ./node_modules/tiny-slider/src/helpers/checkStorageValue.js ***!
9099  \*******************************************************************/
9100/*! exports provided: checkStorageValue */
9101/***/ (function(module, __webpack_exports__, __webpack_require__) {
9102
9103"use strict";
9104__webpack_require__.r(__webpack_exports__);
9105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkStorageValue", function() { return checkStorageValue; });
9106function checkStorageValue (value) {
9107  return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;
9108}
9109
9110/***/ }),
9111
vendor: 667 bytes, lines 9112-9125
9112/***/ "./node_modules/tiny-slider/src/helpers/classListSupport.js":
9113/*!******************************************************************!*\
9114  !*** ./node_modules/tiny-slider/src/helpers/classListSupport.js ***!
9115  \******************************************************************/
9116/*! exports provided: classListSupport */
9117/***/ (function(module, __webpack_exports__, __webpack_require__) {
9118
9119"use strict";
9120__webpack_require__.r(__webpack_exports__);
9121/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return classListSupport; });
9122var classListSupport = 'classList' in document.createElement('_');
9123
9124/***/ }),
9125
vendor: 1,359 bytes, lines 9126-9160
9126/***/ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js":
9127/*!******************************************************************!*\
9128  !*** ./node_modules/tiny-slider/src/helpers/createStyleSheet.js ***!
9129  \******************************************************************/
9130/*! exports provided: createStyleSheet */
9131/***/ (function(module, __webpack_exports__, __webpack_require__) {
9132
9133"use strict";
9134__webpack_require__.r(__webpack_exports__);
9135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStyleSheet", function() { return createStyleSheet; });
9136// create and append style sheet
9137function createStyleSheet (media, nonce) {
9138  // Create the <style> tag
9139  var style = document.createElement("style");
9140  // style.setAttribute("type", "text/css");
9141
9142  // Add a media (and/or media query) here if you'd like!
9143  // style.setAttribute("media", "screen")
9144  // style.setAttribute("media", "only screen and (max-width : 1024px)")
9145  if (media) { style.setAttribute("media", media); }
9146
9147  // Add nonce attribute for Content Security Policy
9148  if (nonce) { style.setAttribute("nonce", nonce); }
9149
9150  // WebKit hack :(
9151  // style.appendChild(document.createTextNode(""));
9152
9153  // Add the <style> element to the page
9154  document.querySelector('head').appendChild(style);
9155
9156  return style.sheet ? style.sheet : style.styleSheet;
9157};
9158
9159/***/ }),
9160
vendor: 601 bytes, lines 9161-9174
9161/***/ "./node_modules/tiny-slider/src/helpers/docElement.js":
9162/*!************************************************************!*\
9163  !*** ./node_modules/tiny-slider/src/helpers/docElement.js ***!
9164  \************************************************************/
9165/*! exports provided: docElement */
9166/***/ (function(module, __webpack_exports__, __webpack_require__) {
9167
9168"use strict";
9169__webpack_require__.r(__webpack_exports__);
9170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "docElement", function() { return docElement; });
9171var docElement = document.documentElement;
9172
9173/***/ }),
9174
vendor: 1,234 bytes, lines 9175-9214
9175/***/ "./node_modules/tiny-slider/src/helpers/events.js":
9176/*!********************************************************!*\
9177  !*** ./node_modules/tiny-slider/src/helpers/events.js ***!
9178  \********************************************************/
9179/*! exports provided: Events */
9180/***/ (function(module, __webpack_exports__, __webpack_require__) {
9181
9182"use strict";
9183__webpack_require__.r(__webpack_exports__);
9184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
9185function Events() {
9186  return {
9187    topics: {},
9188    on: function (eventName, fn) {
9189      this.topics[eventName] = this.topics[eventName] || [];
9190      this.topics[eventName].push(fn);
9191    },
9192    off: function(eventName, fn) {
9193      if (this.topics[eventName]) {
9194        for (var i = 0; i < this.topics[eventName].length; i++) {
9195          if (this.topics[eventName][i] === fn) {
9196            this.topics[eventName].splice(i, 1);
9197            break;
9198          }
9199        }
9200      }
9201    },
9202    emit: function (eventName, data) {
9203      data.type = eventName;
9204      if (this.topics[eventName]) {
9205        this.topics[eventName].forEach(function(fn) {
9206          fn(data, eventName);
9207        });
9208      }
9209    }
9210  };
9211};
9212
9213/***/ }),
9214
vendor: 947 bytes, lines 9215-9248
9215/***/ "./node_modules/tiny-slider/src/helpers/extend.js":
9216/*!********************************************************!*\
9217  !*** ./node_modules/tiny-slider/src/helpers/extend.js ***!
9218  \********************************************************/
9219/*! exports provided: extend */
9220/***/ (function(module, __webpack_exports__, __webpack_require__) {
9221
9222"use strict";
9223__webpack_require__.r(__webpack_exports__);
9224/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
9225function extend() {
9226  var obj, name, copy,
9227      target = arguments[0] || {},
9228      i = 1,
9229      length = arguments.length;
9230
9231  for (; i < length; i++) {
9232    if ((obj = arguments[i]) !== null) {
9233      for (name in obj) {
9234        copy = obj[name];
9235
9236        if (target === copy) {
9237          continue;
9238        } else if (copy !== undefined) {
9239          target[name] = copy;
9240        }
9241      }
9242    }
9243  }
9244  return target;
9245}
9246
9247/***/ }),
9248
vendor: 739 bytes, lines 9249-9267
9249/***/ "./node_modules/tiny-slider/src/helpers/forEach.js":
9250/*!*********************************************************!*\
9251  !*** ./node_modules/tiny-slider/src/helpers/forEach.js ***!
9252  \*********************************************************/
9253/*! exports provided: forEach */
9254/***/ (function(module, __webpack_exports__, __webpack_require__) {
9255
9256"use strict";
9257__webpack_require__.r(__webpack_exports__);
9258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
9259// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
9260function forEach (arr, callback, scope) {
9261  for (var i = 0, l = arr.length; i < l; i++) {
9262    callback.call(scope, arr[i], i);
9263  }
9264}
9265
9266/***/ }),
9267
vendor: 600 bytes, lines 9268-9283
9268/***/ "./node_modules/tiny-slider/src/helpers/getAttr.js":
9269/*!*********************************************************!*\
9270  !*** ./node_modules/tiny-slider/src/helpers/getAttr.js ***!
9271  \*********************************************************/
9272/*! exports provided: getAttr */
9273/***/ (function(module, __webpack_exports__, __webpack_require__) {
9274
9275"use strict";
9276__webpack_require__.r(__webpack_exports__);
9277/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttr", function() { return getAttr; });
9278function getAttr(el, attr) {
9279  return el.getAttribute(attr);
9280}
9281
9282/***/ }),
9283
vendor: 702 bytes, lines 9284-9307
9284/***/ "./node_modules/tiny-slider/src/helpers/getBody.js":
9285/*!*********************************************************!*\
9286  !*** ./node_modules/tiny-slider/src/helpers/getBody.js ***!
9287  \*********************************************************/
9288/*! exports provided: getBody */
9289/***/ (function(module, __webpack_exports__, __webpack_require__) {
9290
9291"use strict";
9292__webpack_require__.r(__webpack_exports__);
9293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBody", function() { return getBody; });
9294function getBody () {
9295  var doc = document,
9296      body = doc.body;
9297
9298  if (!body) {
9299    body = doc.createElement('body');
9300    body.fake = true;
9301  }
9302
9303  return body;
9304}
9305
9306/***/ }),
9307
vendor: 736 bytes, lines 9308-9324
9308/***/ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js":
9309/*!*******************************************************************!*\
9310  !*** ./node_modules/tiny-slider/src/helpers/getCssRulesLength.js ***!
9311  \*******************************************************************/
9312/*! exports provided: getCssRulesLength */
9313/***/ (function(module, __webpack_exports__, __webpack_require__) {
9314
9315"use strict";
9316__webpack_require__.r(__webpack_exports__);
9317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCssRulesLength", function() { return getCssRulesLength; });
9318function getCssRulesLength(sheet) {
9319  var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules;
9320  return rule.length;
9321}
9322
9323/***/ }),
9324
vendor: 1,105 bytes, lines 9325-9352
9325/***/ "./node_modules/tiny-slider/src/helpers/getEndProperty.js":
9326/*!****************************************************************!*\
9327  !*** ./node_modules/tiny-slider/src/helpers/getEndProperty.js ***!
9328  \****************************************************************/
9329/*! exports provided: getEndProperty */
9330/***/ (function(module, __webpack_exports__, __webpack_require__) {
9331
9332"use strict";
9333__webpack_require__.r(__webpack_exports__);
9334/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEndProperty", function() { return getEndProperty; });
9335// get transitionend, animationend based on transitionDuration
9336// @propin: string
9337// @propOut: string, first-letter uppercase
9338// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd
9339function getEndProperty(propIn, propOut) {
9340  var endProp = false;
9341  if (/^Webkit/.test(propIn)) {
9342    endProp = 'webkit' + propOut + 'End';
9343  } else if (/^O/.test(propIn)) {
9344    endProp = 'o' + propOut + 'End';
9345  } else if (propIn) {
9346    endProp = propOut.toLowerCase() + 'end';
9347  }
9348  return endProp;
9349}
9350
9351/***/ }),
9352
vendor: 678 bytes, lines 9353-9371
9353/***/ "./node_modules/tiny-slider/src/helpers/getSlideId.js":
9354/*!************************************************************!*\
9355  !*** ./node_modules/tiny-slider/src/helpers/getSlideId.js ***!
9356  \************************************************************/
9357/*! exports provided: getSlideId */
9358/***/ (function(module, __webpack_exports__, __webpack_require__) {
9359
9360"use strict";
9361__webpack_require__.r(__webpack_exports__);
9362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSlideId", function() { return getSlideId; });
9363function getSlideId() {
9364  var id = window.tnsId;
9365  window.tnsId = !id ? 1 : id + 1;
9366  
9367  return 'tns' + window.tnsId;
9368}
9369
9370/***/ }),
9371
vendor: 867 bytes, lines 9372-9396
9372/***/ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js":
9373/*!*******************************************************************!*\
9374  !*** ./node_modules/tiny-slider/src/helpers/getTouchDirection.js ***!
9375  \*******************************************************************/
9376/*! exports provided: getTouchDirection */
9377/***/ (function(module, __webpack_exports__, __webpack_require__) {
9378
9379"use strict";
9380__webpack_require__.r(__webpack_exports__);
9381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchDirection", function() { return getTouchDirection; });
9382function getTouchDirection(angle, range) {
9383  var direction = false,
9384      gap = Math.abs(90 - Math.abs(angle));
9385      
9386  if (gap >= 90 - range) {
9387    direction = 'horizontal';
9388  } else if (gap <= range) {
9389    direction = 'vertical';
9390  }
9391
9392  return direction;
9393}
9394
9395/***/ }),
9396
vendor: 1,957 bytes, lines 9397-9440
9397/***/ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js":
9398/*!*****************************************************************!*\
9399  !*** ./node_modules/tiny-slider/src/helpers/has3DTransforms.js ***!
9400  \*****************************************************************/
9401/*! exports provided: has3DTransforms */
9402/***/ (function(module, __webpack_exports__, __webpack_require__) {
9403
9404"use strict";
9405__webpack_require__.r(__webpack_exports__);
9406/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has3DTransforms", function() { return has3DTransforms; });
9407/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
9408/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
9409/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
9410
9411
9412
9413
9414function has3DTransforms(tf){
9415  if (!tf) { return false; }
9416  if (!window.getComputedStyle) { return false; }
9417  
9418  var doc = document,
9419      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
9420      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
9421      el = doc.createElement('p'),
9422      has3d,
9423      cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : '';
9424
9425  cssTF += 'transform';
9426
9427  // Add it to the body to get the computed style
9428  body.insertBefore(el, null);
9429
9430  el.style[tf] = 'translate3d(1px,1px,1px)';
9431  has3d = window.getComputedStyle(el).getPropertyValue(cssTF);
9432
9433  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : el.remove();
9434
9435  return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
9436}
9437
9438
9439/***/ }),
9440
vendor: 600 bytes, lines 9441-9456
9441/***/ "./node_modules/tiny-slider/src/helpers/hasAttr.js":
9442/*!*********************************************************!*\
9443  !*** ./node_modules/tiny-slider/src/helpers/hasAttr.js ***!
9444  \*********************************************************/
9445/*! exports provided: hasAttr */
9446/***/ (function(module, __webpack_exports__, __webpack_require__) {
9447
9448"use strict";
9449__webpack_require__.r(__webpack_exports__);
9450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAttr", function() { return hasAttr; });
9451function hasAttr(el, attr) {
9452  return el.hasAttribute(attr);
9453}
9454
9455/***/ }),
9456
vendor: 1,162 bytes, lines 9457-9479
9457/***/ "./node_modules/tiny-slider/src/helpers/hasClass.js":
9458/*!**********************************************************!*\
9459  !*** ./node_modules/tiny-slider/src/helpers/hasClass.js ***!
9460  \**********************************************************/
9461/*! exports provided: classListSupport, hasClass */
9462/***/ (function(module, __webpack_exports__, __webpack_require__) {
9463
9464"use strict";
9465__webpack_require__.r(__webpack_exports__);
9466/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; });
9467/* harmony import */ var _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classListSupport.js */ "./node_modules/tiny-slider/src/helpers/classListSupport.js");
9468/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"]; });
9469
9470
9471
9472var hasClass = _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
9473    function (el, str) { return el.classList.contains(str); } :
9474    function (el, str) { return el.className.indexOf(str) >= 0; };
9475
9476
9477
9478/***/ }),
9479
vendor: 671 bytes, lines 9480-9495
9480/***/ "./node_modules/tiny-slider/src/helpers/hideElement.js":
9481/*!*************************************************************!*\
9482  !*** ./node_modules/tiny-slider/src/helpers/hideElement.js ***!
9483  \*************************************************************/
9484/*! exports provided: hideElement */
9485/***/ (function(module, __webpack_exports__, __webpack_require__) {
9486
9487"use strict";
9488__webpack_require__.r(__webpack_exports__);
9489/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideElement", function() { return hideElement; });
9490function hideElement(el, forceHide) {
9491  if (el.style.display !== 'none') { el.style.display = 'none'; }
9492}
9493
9494/***/ }),
9495
vendor: 673 bytes, lines 9496-9512
9496/***/ "./node_modules/tiny-slider/src/helpers/isNodeList.js":
9497/*!************************************************************!*\
9498  !*** ./node_modules/tiny-slider/src/helpers/isNodeList.js ***!
9499  \************************************************************/
9500/*! exports provided: isNodeList */
9501/***/ (function(module, __webpack_exports__, __webpack_require__) {
9502
9503"use strict";
9504__webpack_require__.r(__webpack_exports__);
9505/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeList", function() { return isNodeList; });
9506function isNodeList(el) {
9507  // Only NodeList has the "item()" function
9508  return typeof el.item !== "undefined"; 
9509}
9510
9511/***/ }),
9512
vendor: 635 bytes, lines 9513-9528
9513/***/ "./node_modules/tiny-slider/src/helpers/isVisible.js":
9514/*!***********************************************************!*\
9515  !*** ./node_modules/tiny-slider/src/helpers/isVisible.js ***!
9516  \***********************************************************/
9517/*! exports provided: isVisible */
9518/***/ (function(module, __webpack_exports__, __webpack_require__) {
9519
9520"use strict";
9521__webpack_require__.r(__webpack_exports__);
9522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
9523function isVisible(el) {
9524  return window.getComputedStyle(el).display !== 'none';
9525}
9526
9527/***/ }),
9528
vendor: 1,205 bytes, lines 9529-9561
9529/***/ "./node_modules/tiny-slider/src/helpers/jsTransform.js":
9530/*!*************************************************************!*\
9531  !*** ./node_modules/tiny-slider/src/helpers/jsTransform.js ***!
9532  \*************************************************************/
9533/*! exports provided: jsTransform */
9534/***/ (function(module, __webpack_exports__, __webpack_require__) {
9535
9536"use strict";
9537__webpack_require__.r(__webpack_exports__);
9538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsTransform", function() { return jsTransform; });
9539function jsTransform(element, attr, prefix, postfix, to, duration, callback) {
9540  var tick = Math.min(duration, 10),
9541      unit = (to.indexOf('%') >= 0) ? '%' : 'px',
9542      to = to.replace(unit, ''),
9543      from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),
9544      positionTick = (to - from) / duration * tick,
9545      running;
9546
9547  setTimeout(moveElement, tick);
9548  function moveElement() {
9549    duration -= tick;
9550    from += positionTick;
9551    element.style[attr] = prefix + from + unit + postfix;
9552    if (duration > 0) { 
9553      setTimeout(moveElement, tick); 
9554    } else {
9555      callback();
9556    }
9557  }
9558}
9559
9560/***/ }),
9561
vendor: 2,114 bytes, lines 9562-9613
9562/***/ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js":
9563/*!*******************************************************************!*\
9564  !*** ./node_modules/tiny-slider/src/helpers/mediaquerySupport.js ***!
9565  \*******************************************************************/
9566/*! exports provided: mediaquerySupport */
9567/***/ (function(module, __webpack_exports__, __webpack_require__) {
9568
9569"use strict";
9570__webpack_require__.r(__webpack_exports__);
9571/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mediaquerySupport", function() { return mediaquerySupport; });
9572/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
9573/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
9574/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
9575
9576
9577
9578
9579function mediaquerySupport () {
9580  if (window.matchMedia || window.msMatchMedia) {
9581    return true;
9582  }
9583  
9584  var doc = document,
9585      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
9586      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
9587      div = doc.createElement('div'),
9588      style = doc.createElement('style'),
9589      rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',
9590      position;
9591
9592  style.type = 'text/css';
9593  div.className = 'tns-mq-test';
9594
9595  body.appendChild(style);
9596  body.appendChild(div);
9597
9598  if (style.styleSheet) {
9599    style.styleSheet.cssText = rule;
9600  } else {
9601    style.appendChild(doc.createTextNode(rule));
9602  }
9603
9604  position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];
9605
9606  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
9607
9608  return position === "absolute";
9609}
9610
9611
9612/***/ }),
9613
vendor: 943 bytes, lines 9614-9637
9614/***/ "./node_modules/tiny-slider/src/helpers/passiveOption.js":
9615/*!***************************************************************!*\
9616  !*** ./node_modules/tiny-slider/src/helpers/passiveOption.js ***!
9617  \***************************************************************/
9618/*! exports provided: passiveOption */
9619/***/ (function(module, __webpack_exports__, __webpack_require__) {
9620
9621"use strict";
9622__webpack_require__.r(__webpack_exports__);
9623/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "passiveOption", function() { return passiveOption; });
9624// Test via a getter in the options object to see if the passive property is accessed
9625var supportsPassive = false;
9626try {
9627  var opts = Object.defineProperty({}, 'passive', {
9628    get: function() {
9629      supportsPassive = true;
9630    }
9631  });
9632  window.addEventListener("test", null, opts);
9633} catch (e) {}
9634var passiveOption = supportsPassive ? { passive: true } : false;
9635
9636/***/ }),
9637
vendor: 2,093 bytes, lines 9638-9688
9638/***/ "./node_modules/tiny-slider/src/helpers/percentageLayout.js":
9639/*!******************************************************************!*\
9640  !*** ./node_modules/tiny-slider/src/helpers/percentageLayout.js ***!
9641  \******************************************************************/
9642/*! exports provided: percentageLayout */
9643/***/ (function(module, __webpack_exports__, __webpack_require__) {
9644
9645"use strict";
9646__webpack_require__.r(__webpack_exports__);
9647/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percentageLayout", function() { return percentageLayout; });
9648/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
9649/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
9650/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
9651// get subpixel support value
9652// @return - boolean
9653
9654
9655
9656
9657function percentageLayout() {
9658  // check subpixel layout supporting
9659  var doc = document,
9660      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
9661      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
9662      wrapper = doc.createElement('div'),
9663      outer = doc.createElement('div'),
9664      str = '',
9665      count = 70,
9666      perPage = 3,
9667      supported = false;
9668
9669  wrapper.className = "tns-t-subp2";
9670  outer.className = "tns-t-ct";
9671
9672  for (var i = 0; i < count; i++) {
9673    str += '<div></div>';
9674  }
9675
9676  outer.innerHTML = str;
9677  wrapper.appendChild(outer);
9678  body.appendChild(wrapper);
9679
9680  supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;
9681
9682  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : wrapper.remove();
9683
9684  return supported;
9685}
9686
9687/***/ }),
9688
vendor: 719 bytes, lines 9689-9709
9689/***/ "./node_modules/tiny-slider/src/helpers/raf.js":
9690/*!*****************************************************!*\
9691  !*** ./node_modules/tiny-slider/src/helpers/raf.js ***!
9692  \*****************************************************/
9693/*! exports provided: raf */
9694/***/ (function(module, __webpack_exports__, __webpack_require__) {
9695
9696"use strict";
9697__webpack_require__.r(__webpack_exports__);
9698/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "raf", function() { return raf; });
9699var win = window;
9700
9701var raf = win.requestAnimationFrame
9702  || win.webkitRequestAnimationFrame
9703  || win.mozRequestAnimationFrame
9704  || win.msRequestAnimationFrame
9705  || function(cb) { return setTimeout(cb, 16); };
9706
9707
9708/***/ }),
9709
vendor: 1,105 bytes, lines 9710-9736
9710/***/ "./node_modules/tiny-slider/src/helpers/removeAttrs.js":
9711/*!*************************************************************!*\
9712  !*** ./node_modules/tiny-slider/src/helpers/removeAttrs.js ***!
9713  \*************************************************************/
9714/*! exports provided: removeAttrs */
9715/***/ (function(module, __webpack_exports__, __webpack_require__) {
9716
9717"use strict";
9718__webpack_require__.r(__webpack_exports__);
9719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAttrs", function() { return removeAttrs; });
9720/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
9721
9722
9723function removeAttrs(els, attrs) {
9724  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
9725  attrs = (attrs instanceof Array) ? attrs : [attrs];
9726
9727  var attrLength = attrs.length;
9728  for (var i = els.length; i--;) {
9729    for (var j = attrLength; j--;) {
9730      els[i].removeAttribute(attrs[j]);
9731    }
9732  }
9733}
9734
9735/***/ }),
9736
vendor: 933 bytes, lines 9737-9759
9737/***/ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js":
9738/*!***************************************************************!*\
9739  !*** ./node_modules/tiny-slider/src/helpers/removeCSSRule.js ***!
9740  \***************************************************************/
9741/*! exports provided: removeCSSRule */
9742/***/ (function(module, __webpack_exports__, __webpack_require__) {
9743
9744"use strict";
9745__webpack_require__.r(__webpack_exports__);
9746/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCSSRule", function() { return removeCSSRule; });
9747/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
9748// cross browsers addRule method
9749
9750function removeCSSRule(sheet, index) {
9751  // return raf(function() {
9752    'deleteRule' in sheet ?
9753      sheet.deleteRule(index) :
9754      sheet.removeRule(index);
9755  // });
9756}
9757
9758/***/ }),
9759
vendor: 1,125 bytes, lines 9760-9783
9760/***/ "./node_modules/tiny-slider/src/helpers/removeClass.js":
9761/*!*************************************************************!*\
9762  !*** ./node_modules/tiny-slider/src/helpers/removeClass.js ***!
9763  \*************************************************************/
9764/*! exports provided: removeClass */
9765/***/ (function(module, __webpack_exports__, __webpack_require__) {
9766
9767"use strict";
9768__webpack_require__.r(__webpack_exports__);
9769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; });
9770/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
9771
9772var removeClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
9773    function (el, str) {
9774      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.remove(str); }
9775    } :
9776    function (el, str) {
9777      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el, str)) { el.className = el.className.replace(str, ''); }
9778    };
9779
9780
9781
9782/***/ }),
9783
vendor: 1,011 bytes, lines 9784-9805
9784/***/ "./node_modules/tiny-slider/src/helpers/removeEvents.js":
9785/*!**************************************************************!*\
9786  !*** ./node_modules/tiny-slider/src/helpers/removeEvents.js ***!
9787  \**************************************************************/
9788/*! exports provided: removeEvents */
9789/***/ (function(module, __webpack_exports__, __webpack_require__) {
9790
9791"use strict";
9792__webpack_require__.r(__webpack_exports__);
9793/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEvents", function() { return removeEvents; });
9794/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
9795
9796
9797function removeEvents(el, obj) {
9798  for (var prop in obj) {
9799    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
9800    el.removeEventListener(prop, obj[prop], option);
9801  }
9802}
9803
9804/***/ }),
9805
vendor: 1,108 bytes, lines 9806-9830
9806/***/ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js":
9807/*!***************************************************************!*\
9808  !*** ./node_modules/tiny-slider/src/helpers/resetFakeBody.js ***!
9809  \***************************************************************/
9810/*! exports provided: resetFakeBody */
9811/***/ (function(module, __webpack_exports__, __webpack_require__) {
9812
9813"use strict";
9814__webpack_require__.r(__webpack_exports__);
9815/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetFakeBody", function() { return resetFakeBody; });
9816/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
9817
9818
9819function resetFakeBody (body, docOverflow) {
9820  if (body.fake) {
9821    body.remove();
9822    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = docOverflow;
9823    // Trigger layout so kinetic scrolling isn't disabled in iOS6+
9824    // eslint-disable-next-line
9825    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].offsetHeight;
9826  }
9827}
9828
9829/***/ }),
9830
vendor: 1,068 bytes, lines 9831-9856
9831/***/ "./node_modules/tiny-slider/src/helpers/setAttrs.js":
9832/*!**********************************************************!*\
9833  !*** ./node_modules/tiny-slider/src/helpers/setAttrs.js ***!
9834  \**********************************************************/
9835/*! exports provided: setAttrs */
9836/***/ (function(module, __webpack_exports__, __webpack_require__) {
9837
9838"use strict";
9839__webpack_require__.r(__webpack_exports__);
9840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAttrs", function() { return setAttrs; });
9841/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
9842
9843
9844function setAttrs(els, attrs) {
9845  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
9846  if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; }
9847
9848  for (var i = els.length; i--;) {
9849    for(var key in attrs) {
9850      els[i].setAttribute(key, attrs[key]);
9851    }
9852  }
9853}
9854
9855/***/ }),
9856
vendor: 1,310 bytes, lines 9857-9885
9857/***/ "./node_modules/tiny-slider/src/helpers/setFakeBody.js":
9858/*!*************************************************************!*\
9859  !*** ./node_modules/tiny-slider/src/helpers/setFakeBody.js ***!
9860  \*************************************************************/
9861/*! exports provided: setFakeBody */
9862/***/ (function(module, __webpack_exports__, __webpack_require__) {
9863
9864"use strict";
9865__webpack_require__.r(__webpack_exports__);
9866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFakeBody", function() { return setFakeBody; });
9867/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
9868
9869
9870function setFakeBody (body) {
9871  var docOverflow = '';
9872  if (body.fake) {
9873    docOverflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow;
9874    //avoid crashing IE8, if background image is used
9875    body.style.background = '';
9876    //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
9877    body.style.overflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = 'hidden';
9878    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].appendChild(body);
9879  }
9880
9881  return docOverflow;
9882}
9883
9884/***/ }),
9885
vendor: 741 bytes, lines 9886-9904
9886/***/ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js":
9887/*!*****************************************************************!*\
9888  !*** ./node_modules/tiny-slider/src/helpers/setLocalStorage.js ***!
9889  \*****************************************************************/
9890/*! exports provided: setLocalStorage */
9891/***/ (function(module, __webpack_exports__, __webpack_require__) {
9892
9893"use strict";
9894__webpack_require__.r(__webpack_exports__);
9895/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocalStorage", function() { return setLocalStorage; });
9896function setLocalStorage(storage, key, value, access) {
9897  if (access) {
9898    try { storage.setItem(key, value); } catch (e) {}
9899  }
9900  return value;
9901}
9902
9903/***/ }),
9904
vendor: 667 bytes, lines 9905-9920
9905/***/ "./node_modules/tiny-slider/src/helpers/showElement.js":
9906/*!*************************************************************!*\
9907  !*** ./node_modules/tiny-slider/src/helpers/showElement.js ***!
9908  \*************************************************************/
9909/*! exports provided: showElement */
9910/***/ (function(module, __webpack_exports__, __webpack_require__) {
9911
9912"use strict";
9913__webpack_require__.r(__webpack_exports__);
9914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showElement", function() { return showElement; });
9915function showElement(el, forceHide) {
9916  if (el.style.display === 'none') { el.style.display = ''; }
9917}
9918
9919/***/ }),
9920
vendor: 618 bytes, lines 9921-9936
9921/***/ "./node_modules/tiny-slider/src/helpers/toDegree.js":
9922/*!**********************************************************!*\
9923  !*** ./node_modules/tiny-slider/src/helpers/toDegree.js ***!
9924  \**********************************************************/
9925/*! exports provided: toDegree */
9926/***/ (function(module, __webpack_exports__, __webpack_require__) {
9927
9928"use strict";
9929__webpack_require__.r(__webpack_exports__);
9930/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return toDegree; });
9931function toDegree (y, x) {
9932  return Math.atan2(y, x) * (180 / Math.PI);
9933}
9934
9935/***/ }),
9936
vendor: 1,200 bytes, lines 9937-9974
9937/***/ "./node_modules/tiny-slider/src/helpers/whichProperty.js":
9938/*!***************************************************************!*\
9939  !*** ./node_modules/tiny-slider/src/helpers/whichProperty.js ***!
9940  \***************************************************************/
9941/*! exports provided: whichProperty */
9942/***/ (function(module, __webpack_exports__, __webpack_require__) {
9943
9944"use strict";
9945__webpack_require__.r(__webpack_exports__);
9946/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whichProperty", function() { return whichProperty; });
9947function whichProperty(props){
9948  if (typeof props === 'string') {
9949    var arr = [props],
9950        Props = props.charAt(0).toUpperCase() + props.substr(1),
9951        prefixes = ['Webkit', 'Moz', 'ms', 'O'];
9952        
9953    prefixes.forEach(function(prefix) {
9954      if (prefix !== 'ms' || props === 'transform') {
9955        arr.push(prefix + Props);
9956      }
9957    });
9958
9959    props = arr;
9960  }
9961
9962  var el = document.createElement('fakeelement'),
9963      len = props.length;
9964  for(var i = 0; i < props.length; i++){
9965    var prop = props[i];
9966    if( el.style[prop] !== undefined ){ return prop; }
9967  }
9968
9969  return false; // explicit for ie9-
9970}
9971
9972
9973/***/ }),
9974
vendor: 109,421 bytes, lines 9975-12788
9975/***/ "./node_modules/tiny-slider/src/tiny-slider.js":
9976/*!*****************************************************!*\
9977  !*** ./node_modules/tiny-slider/src/tiny-slider.js ***!
9978  \*****************************************************/
9979/*! exports provided: tns */
9980/***/ (function(module, __webpack_exports__, __webpack_require__) {
9981
9982"use strict";
9983__webpack_require__.r(__webpack_exports__);
9984/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return tns; });
9985/* harmony import */ var _helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
9986/* harmony import */ var _helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/caf.js */ "./node_modules/tiny-slider/src/helpers/caf.js");
9987/* harmony import */ var _helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers/extend.js */ "./node_modules/tiny-slider/src/helpers/extend.js");
9988/* harmony import */ var _helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers/checkStorageValue.js */ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js");
9989/* harmony import */ var _helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers/setLocalStorage.js */ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js");
9990/* harmony import */ var _helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/getSlideId.js */ "./node_modules/tiny-slider/src/helpers/getSlideId.js");
9991/* harmony import */ var _helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers/calc.js */ "./node_modules/tiny-slider/src/helpers/calc.js");
9992/* harmony import */ var _helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers/percentageLayout.js */ "./node_modules/tiny-slider/src/helpers/percentageLayout.js");
9993/* harmony import */ var _helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers/mediaquerySupport.js */ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js");
9994/* harmony import */ var _helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/createStyleSheet.js */ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js");
9995/* harmony import */ var _helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/addCSSRule.js */ "./node_modules/tiny-slider/src/helpers/addCSSRule.js");
9996/* harmony import */ var _helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/removeCSSRule.js */ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js");
9997/* harmony import */ var _helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/getCssRulesLength.js */ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js");
9998/* harmony import */ var _helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./helpers/toDegree.js */ "./node_modules/tiny-slider/src/helpers/toDegree.js");
9999/* harmony import */ var _helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/getTouchDirection.js */ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js");
10000/* harmony import */ var _helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/forEach.js */ "./node_modules/tiny-slider/src/helpers/forEach.js");
10001/* harmony import */ var _helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
10002/* harmony import */ var _helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./helpers/addClass.js */ "./node_modules/tiny-slider/src/helpers/addClass.js");
10003/* harmony import */ var _helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./helpers/removeClass.js */ "./node_modules/tiny-slider/src/helpers/removeClass.js");
10004/* harmony import */ var _helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./helpers/hasAttr.js */ "./node_modules/tiny-slider/src/helpers/hasAttr.js");
10005/* harmony import */ var _helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./helpers/getAttr.js */ "./node_modules/tiny-slider/src/helpers/getAttr.js");
10006/* harmony import */ var _helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./helpers/setAttrs.js */ "./node_modules/tiny-slider/src/helpers/setAttrs.js");
10007/* harmony import */ var _helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./helpers/removeAttrs.js */ "./node_modules/tiny-slider/src/helpers/removeAttrs.js");
10008/* harmony import */ var _helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./helpers/arrayFromNodeList.js */ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js");
10009/* harmony import */ var _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./helpers/hideElement.js */ "./node_modules/tiny-slider/src/helpers/hideElement.js");
10010/* harmony import */ var _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./helpers/showElement.js */ "./node_modules/tiny-slider/src/helpers/showElement.js");
10011/* harmony import */ var _helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./helpers/isVisible.js */ "./node_modules/tiny-slider/src/helpers/isVisible.js");
10012/* harmony import */ var _helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./helpers/whichProperty.js */ "./node_modules/tiny-slider/src/helpers/whichProperty.js");
10013/* harmony import */ var _helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./helpers/has3DTransforms.js */ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js");
10014/* harmony import */ var _helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./helpers/getEndProperty.js */ "./node_modules/tiny-slider/src/helpers/getEndProperty.js");
10015/* harmony import */ var _helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./helpers/addEvents.js */ "./node_modules/tiny-slider/src/helpers/addEvents.js");
10016/* harmony import */ var _helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./helpers/removeEvents.js */ "./node_modules/tiny-slider/src/helpers/removeEvents.js");
10017/* harmony import */ var _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./helpers/events.js */ "./node_modules/tiny-slider/src/helpers/events.js");
10018/* harmony import */ var _helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./helpers/jsTransform.js */ "./node_modules/tiny-slider/src/helpers/jsTransform.js");
10019// Object.keys
10020if (!Object.keys) {
10021  Object.keys = function(object) {
10022    var keys = [];
10023    for (var name in object) {
10024      if (Object.prototype.hasOwnProperty.call(object, name)) {
10025        keys.push(name);
10026      }
10027    }
10028    return keys;
10029  };
10030}
10031
10032// ChildNode.remove
10033if(!("remove" in Element.prototype)){
10034  Element.prototype.remove = function(){
10035    if(this.parentNode) {
10036      this.parentNode.removeChild(this);
10037    }
10038  };
10039}
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076var tns = function(options) {
10077  options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])({
10078    container: '.slider',
10079    mode: 'carousel',
10080    axis: 'horizontal',
10081    items: 1,
10082    gutter: 0,
10083    edgePadding: 0,
10084    fixedWidth: false,
10085    autoWidth: false,
10086    viewportMax: false,
10087    slideBy: 1,
10088    center: false,
10089    controls: true,
10090    controlsPosition: 'top',
10091    controlsText: ['prev', 'next'],
10092    controlsContainer: false,
10093    prevButton: false,
10094    nextButton: false,
10095    nav: true,
10096    navPosition: 'top',
10097    navContainer: false,
10098    navAsThumbnails: false,
10099    arrowKeys: false,
10100    speed: 300,
10101    autoplay: false,
10102    autoplayPosition: 'top',
10103    autoplayTimeout: 5000,
10104    autoplayDirection: 'forward',
10105    autoplayText: ['start', 'stop'],
10106    autoplayHoverPause: false,
10107    autoplayButton: false,
10108    autoplayButtonOutput: true,
10109    autoplayResetOnVisibility: true,
10110    animateIn: 'tns-fadeIn',
10111    animateOut: 'tns-fadeOut',
10112    animateNormal: 'tns-normal',
10113    animateDelay: false,
10114    loop: true,
10115    rewind: false,
10116    autoHeight: false,
10117    responsive: false,
10118    lazyload: false,
10119    lazyloadSelector: '.tns-lazy-img',
10120    touch: true,
10121    mouseDrag: false,
10122    swipeAngle: 15,
10123    nested: false,
10124    preventActionWhenRunning: false,
10125    preventScrollOnTouch: false,
10126    freezable: true,
10127    onInit: false,
10128    useLocalStorage: true,
10129    nonce: false
10130  }, options || {});
10131
10132  var doc = document,
10133      win = window,
10134      KEYS = {
10135        ENTER: 13,
10136        SPACE: 32,
10137        LEFT: 37,
10138        RIGHT: 39
10139      },
10140      tnsStorage = {},
10141      localStorageAccess = options.useLocalStorage;
10142
10143  if (localStorageAccess) {
10144    // check browser version and local storage access
10145    var browserInfo = navigator.userAgent;
10146    var uid = new Date;
10147
10148    try {
10149      tnsStorage = win.localStorage;
10150      if (tnsStorage) {
10151        tnsStorage.setItem(uid, uid);
10152        localStorageAccess = tnsStorage.getItem(uid) == uid;
10153        tnsStorage.removeItem(uid);
10154      } else {
10155        localStorageAccess = false;
10156      }
10157      if (!localStorageAccess) { tnsStorage = {}; }
10158    } catch(e) {
10159      localStorageAccess = false;
10160    }
10161
10162    if (localStorageAccess) {
10163      // remove storage when browser version changes
10164      if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) {
10165        ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); });
10166      }
10167      // update browserInfo
10168      localStorage['tnsApp'] = browserInfo;
10169    }
10170  }
10171
10172  var CALC = tnsStorage['tC'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tC']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tC', Object(_helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__["calc"])(), localStorageAccess),
10173      PERCENTAGELAYOUT = tnsStorage['tPL'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tPL']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tPL', Object(_helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__["percentageLayout"])(), localStorageAccess),
10174      CSSMQ = tnsStorage['tMQ'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tMQ']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tMQ', Object(_helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__["mediaquerySupport"])(), localStorageAccess),
10175      TRANSFORM = tnsStorage['tTf'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTf']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTf', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transform'), localStorageAccess),
10176      HAS3DTRANSFORMS = tnsStorage['t3D'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['t3D']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 't3D', Object(_helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__["has3DTransforms"])(TRANSFORM), localStorageAccess),
10177      TRANSITIONDURATION = tnsStorage['tTDu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDuration'), localStorageAccess),
10178      TRANSITIONDELAY = tnsStorage['tTDe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDelay'), localStorageAccess),
10179      ANIMATIONDURATION = tnsStorage['tADu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDuration'), localStorageAccess),
10180      ANIMATIONDELAY = tnsStorage['tADe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDelay'), localStorageAccess),
10181      TRANSITIONEND = tnsStorage['tTE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(TRANSITIONDURATION, 'Transition'), localStorageAccess),
10182      ANIMATIONEND = tnsStorage['tAE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tAE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tAE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(ANIMATIONDURATION, 'Animation'), localStorageAccess);
10183
10184  // get element nodes from selectors
10185  var supportConsoleWarn = win.console && typeof win.console.warn === "function",
10186      tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'],
10187      optionsElements = {};
10188
10189  tnsList.forEach(function(item) {
10190    if (typeof options[item] === 'string') {
10191      var str = options[item],
10192          el = doc.querySelector(str);
10193      optionsElements[item] = str;
10194
10195      if (el && el.nodeName) {
10196        options[item] = el;
10197      } else {
10198        if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); }
10199        return;
10200      }
10201    }
10202  });
10203
10204  // make sure at least 1 slide
10205  if (options.container.children.length < 1) {
10206    if (supportConsoleWarn) { console.warn('No slides found in', options.container); }
10207    return;
10208   }
10209
10210  // update options
10211  var responsive = options.responsive,
10212      nested = options.nested,
10213      carousel = options.mode === 'carousel' ? true : false;
10214
10215  if (responsive) {
10216    // apply responsive[0] to options and remove it
10217    if (0 in responsive) {
10218      options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, responsive[0]);
10219      delete responsive[0];
10220    }
10221
10222    var responsiveTem = {};
10223    for (var key in responsive) {
10224      var val = responsive[key];
10225      // update responsive
10226      // from: 300: 2
10227      // to:
10228      //   300: {
10229      //     items: 2
10230      //   }
10231      val = typeof val === 'number' ? {items: val} : val;
10232      responsiveTem[key] = val;
10233    }
10234    responsive = responsiveTem;
10235    responsiveTem = null;
10236  }
10237
10238  // update options
10239  function updateOptions (obj) {
10240    for (var key in obj) {
10241      if (!carousel) {
10242        if (key === 'slideBy') { obj[key] = 'page'; }
10243        if (key === 'edgePadding') { obj[key] = false; }
10244        if (key === 'autoHeight') { obj[key] = false; }
10245      }
10246
10247      // update responsive options
10248      if (key === 'responsive') { updateOptions(obj[key]); }
10249    }
10250  }
10251  if (!carousel) { updateOptions(options); }
10252
10253
10254  // === define and set variables ===
10255  if (!carousel) {
10256    options.axis = 'horizontal';
10257    options.slideBy = 'page';
10258    options.edgePadding = false;
10259
10260    var animateIn = options.animateIn,
10261        animateOut = options.animateOut,
10262        animateDelay = options.animateDelay,
10263        animateNormal = options.animateNormal;
10264  }
10265
10266  var horizontal = options.axis === 'horizontal' ? true : false,
10267      outerWrapper = doc.createElement('div'),
10268      innerWrapper = doc.createElement('div'),
10269      middleWrapper,
10270      container = options.container,
10271      containerParent = container.parentNode,
10272      containerHTML = container.outerHTML,
10273      slideItems = container.children,
10274      slideCount = slideItems.length,
10275      breakpointZone,
10276      windowWidth = getWindowWidth(),
10277      isOn = false;
10278  if (responsive) { setBreakpointZone(); }
10279  if (carousel) { container.className += ' tns-vpfix'; }
10280
10281  // fixedWidth: viewport > rightBoundary > indexMax
10282  var autoWidth = options.autoWidth,
10283      fixedWidth = getOption('fixedWidth'),
10284      edgePadding = getOption('edgePadding'),
10285      gutter = getOption('gutter'),
10286      viewport = getViewportWidth(),
10287      center = getOption('center'),
10288      items = !autoWidth ? Math.floor(getOption('items')) : 1,
10289      slideBy = getOption('slideBy'),
10290      viewportMax = options.viewportMax || options.fixedWidthViewportWidth,
10291      arrowKeys = getOption('arrowKeys'),
10292      speed = getOption('speed'),
10293      rewind = options.rewind,
10294      loop = rewind ? false : options.loop,
10295      autoHeight = getOption('autoHeight'),
10296      controls = getOption('controls'),
10297      controlsText = getOption('controlsText'),
10298      nav = getOption('nav'),
10299      touch = getOption('touch'),
10300      mouseDrag = getOption('mouseDrag'),
10301      autoplay = getOption('autoplay'),
10302      autoplayTimeout = getOption('autoplayTimeout'),
10303      autoplayText = getOption('autoplayText'),
10304      autoplayHoverPause = getOption('autoplayHoverPause'),
10305      autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'),
10306      sheet = Object(_helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__["createStyleSheet"])(null, getOption('nonce')),
10307      lazyload = options.lazyload,
10308      lazyloadSelector = options.lazyloadSelector,
10309      slidePositions, // collection of slide positions
10310      slideItemsOut = [],
10311      cloneCount = loop ? getCloneCountForLoop() : 0,
10312      slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2,
10313      hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false,
10314      rightBoundary = fixedWidth ? getRightBoundary() : null,
10315      updateIndexBeforeTransform = (!carousel || !loop) ? true : false,
10316      // transform
10317      transformAttr = horizontal ? 'left' : 'top',
10318      transformPrefix = '',
10319      transformPostfix = '',
10320      // index
10321      getIndexMax = (function () {
10322        if (fixedWidth) {
10323          return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); };
10324        } else if (autoWidth) {
10325          return function() {
10326            for (var i = 0; i < slideCountNew; i++) {
10327              if (slidePositions[i] >= - rightBoundary) { return i; }
10328            }
10329          };
10330        } else {
10331          return function() {
10332            if (center && carousel && !loop) {
10333              return slideCount - 1;
10334            } else {
10335              return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1;
10336            }
10337          };
10338        }
10339      })(),
10340      index = getStartIndex(getOption('startIndex')),
10341      indexCached = index,
10342      displayIndex = getCurrentSlide(),
10343      indexMin = 0,
10344      indexMax = !autoWidth ? getIndexMax() : null,
10345      // resize
10346      resizeTimer,
10347      preventActionWhenRunning = options.preventActionWhenRunning,
10348      swipeAngle = options.swipeAngle,
10349      moveDirectionExpected = swipeAngle ? '?' : true,
10350      running = false,
10351      onInit = options.onInit,
10352      events = new _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__["Events"](),
10353      // id, class
10354      newContainerClasses = ' tns-slider tns-' + options.mode,
10355      slideId = container.id || Object(_helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__["getSlideId"])(),
10356      disable = getOption('disable'),
10357      disabled = false,
10358      freezable = options.freezable,
10359      freeze = freezable && !autoWidth ? getFreeze() : false,
10360      frozen = false,
10361      controlsEvents = {
10362        'click': onControlsClick,
10363        'keydown': onControlsKeydown
10364      },
10365      navEvents = {
10366        'click': onNavClick,
10367        'keydown': onNavKeydown
10368      },
10369      hoverEvents = {
10370        'mouseover': mouseoverPause,
10371        'mouseout': mouseoutRestart
10372      },
10373      visibilityEvent = {'visibilitychange': onVisibilityChange},
10374      docmentKeydownEvent = {'keydown': onDocumentKeydown},
10375      touchEvents = {
10376        'touchstart': onPanStart,
10377        'touchmove': onPanMove,
10378        'touchend': onPanEnd,
10379        'touchcancel': onPanEnd
10380      }, dragEvents = {
10381        'mousedown': onPanStart,
10382        'mousemove': onPanMove,
10383        'mouseup': onPanEnd,
10384        'mouseleave': onPanEnd
10385      },
10386      hasControls = hasOption('controls'),
10387      hasNav = hasOption('nav'),
10388      navAsThumbnails = autoWidth ? true : options.navAsThumbnails,
10389      hasAutoplay = hasOption('autoplay'),
10390      hasTouch = hasOption('touch'),
10391      hasMouseDrag = hasOption('mouseDrag'),
10392      slideActiveClass = 'tns-slide-active',
10393      slideClonedClass = 'tns-slide-cloned',
10394      imgCompleteClass = 'tns-complete',
10395      imgEvents = {
10396        'load': onImgLoaded,
10397        'error': onImgFailed
10398      },
10399      imgsComplete,
10400      liveregionCurrent,
10401      preventScroll = options.preventScrollOnTouch === 'force' ? true : false;
10402
10403  // controls
10404  if (hasControls) {
10405    var controlsContainer = options.controlsContainer,
10406        controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '',
10407        prevButton = options.prevButton,
10408        nextButton = options.nextButton,
10409        prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '',
10410        nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '',
10411        prevIsButton,
10412        nextIsButton;
10413  }
10414
10415  // nav
10416  if (hasNav) {
10417    var navContainer = options.navContainer,
10418        navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '',
10419        navItems,
10420        pages = autoWidth ? slideCount : getPages(),
10421        pagesCached = 0,
10422        navClicked = -1,
10423        navCurrentIndex = getCurrentNavIndex(),
10424        navCurrentIndexCached = navCurrentIndex,
10425        navActiveClass = 'tns-nav-active',
10426        navStr = 'Carousel Page ',
10427        navStrCurrent = ' (Current Slide)';
10428  }
10429
10430  // autoplay
10431  if (hasAutoplay) {
10432    var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1,
10433        autoplayButton = options.autoplayButton,
10434        autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '',
10435        autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'],
10436        autoplayTimer,
10437        animating,
10438        autoplayHoverPaused,
10439        autoplayUserPaused,
10440        autoplayVisibilityPaused;
10441  }
10442
10443  if (hasTouch || hasMouseDrag) {
10444    var initPosition = {},
10445        lastPosition = {},
10446        translateInit,
10447        disX,
10448        disY,
10449        panStart = false,
10450        rafIndex,
10451        getDist = horizontal ?
10452          function(a, b) { return a.x - b.x; } :
10453          function(a, b) { return a.y - b.y; };
10454  }
10455
10456  // disable slider when slidecount <= items
10457  if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); }
10458
10459  if (TRANSFORM) {
10460    transformAttr = TRANSFORM;
10461    transformPrefix = 'translate';
10462
10463    if (HAS3DTRANSFORMS) {
10464      transformPrefix += horizontal ? '3d(' : '3d(0px, ';
10465      transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)';
10466    } else {
10467      transformPrefix += horizontal ? 'X(' : 'Y(';
10468      transformPostfix = ')';
10469    }
10470
10471  }
10472
10473  if (carousel) { container.className = container.className.replace('tns-vpfix', ''); }
10474  initStructure();
10475  initSheet();
10476  initSliderTransform();
10477
10478  // === COMMON FUNCTIONS === //
10479  function resetVariblesWhenDisable (condition) {
10480    if (condition) {
10481      controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;
10482    }
10483  }
10484
10485  function getCurrentSlide () {
10486    var tem = carousel ? index - cloneCount : index;
10487    while (tem < 0) { tem += slideCount; }
10488    return tem%slideCount + 1;
10489  }
10490
10491  function getStartIndex (ind) {
10492    ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0;
10493    return carousel ? ind + cloneCount : ind;
10494  }
10495
10496  function getAbsIndex (i) {
10497    if (i == null) { i = index; }
10498
10499    if (carousel) { i -= cloneCount; }
10500    while (i < 0) { i += slideCount; }
10501
10502    return Math.floor(i%slideCount);
10503  }
10504
10505  function getCurrentNavIndex () {
10506    var absIndex = getAbsIndex(),
10507        result;
10508
10509    result = navAsThumbnails ? absIndex :
10510      fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) :
10511          Math.floor(absIndex / items);
10512
10513    // set active nav to the last one when reaches the right edge
10514    if (!loop && carousel && index === indexMax) { result = pages - 1; }
10515
10516    return result;
10517  }
10518
10519  function getItemsMax () {
10520    // fixedWidth or autoWidth while viewportMax is not available
10521    if (autoWidth || (fixedWidth && !viewportMax)) {
10522      return slideCount - 1;
10523    // most cases
10524    } else {
10525      var str = fixedWidth ? 'fixedWidth' : 'items',
10526          arr = [];
10527
10528      if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); }
10529
10530      if (responsive) {
10531        for (var bp in responsive) {
10532          var tem = responsive[bp][str];
10533          if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); }
10534        }
10535      }
10536
10537      if (!arr.length) { arr.push(0); }
10538
10539      return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr));
10540    }
10541  }
10542
10543  function getCloneCountForLoop () {
10544    var itemsMax = getItemsMax(),
10545        result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount);
10546    result = Math.max(itemsMax, result);
10547
10548    return hasOption('edgePadding') ? result + 1 : result;
10549  }
10550
10551  function getWindowWidth () {
10552    return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
10553  }
10554
10555  function getInsertPosition (pos) {
10556    return pos === 'top' ? 'afterbegin' : 'beforeend';
10557  }
10558
10559  function getClientWidth (el) {
10560    if (el == null) { return; }
10561    var div = doc.createElement('div'), rect, width;
10562    el.appendChild(div);
10563    rect = div.getBoundingClientRect();
10564    width = rect.right - rect.left;
10565    div.remove();
10566    return width || getClientWidth(el.parentNode);
10567  }
10568
10569  function getViewportWidth () {
10570    var gap = edgePadding ? edgePadding * 2 - gutter : 0;
10571    return getClientWidth(containerParent) - gap;
10572  }
10573
10574  function hasOption (item) {
10575    if (options[item]) {
10576      return true;
10577    } else {
10578      if (responsive) {
10579        for (var bp in responsive) {
10580          if (responsive[bp][item]) { return true; }
10581        }
10582      }
10583      return false;
10584    }
10585  }
10586
10587  // get option:
10588  // fixed width: viewport, fixedWidth, gutter => items
10589  // others: window width => all variables
10590  // all: items => slideBy
10591  function getOption (item, ww) {
10592    if (ww == null) { ww = windowWidth; }
10593
10594    if (item === 'items' && fixedWidth) {
10595      return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1;
10596
10597    } else {
10598      var result = options[item];
10599
10600      if (responsive) {
10601        for (var bp in responsive) {
10602          // bp: convert string to number
10603          if (ww >= parseInt(bp)) {
10604            if (item in responsive[bp]) { result = responsive[bp][item]; }
10605          }
10606        }
10607      }
10608
10609      if (item === 'slideBy' && result === 'page') { result = getOption('items'); }
10610      if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); }
10611
10612      return result;
10613    }
10614  }
10615
10616  function getSlideMarginLeft (i) {
10617    return CALC ?
10618      CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' :
10619      i * 100 / slideCountNew + '%';
10620  }
10621
10622  function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) {
10623    var str = '';
10624
10625    if (edgePaddingTem !== undefined) {
10626      var gap = edgePaddingTem;
10627      if (gutterTem) { gap -= gutterTem; }
10628      str = horizontal ?
10629        'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' :
10630        'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;';
10631    } else if (gutterTem && !fixedWidthTem) {
10632      var gutterTemUnit = '-' + gutterTem + 'px',
10633          dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0';
10634      str = 'margin: 0 ' + dir + ';'
10635    }
10636
10637    if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); }
10638    return str;
10639  }
10640
10641  function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) {
10642    if (fixedWidthTem) {
10643      return (fixedWidthTem + gutterTem) * slideCountNew + 'px';
10644    } else {
10645      return CALC ?
10646        CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' :
10647        slideCountNew * 100 / itemsTem + '%';
10648    }
10649  }
10650
10651  function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) {
10652    var width;
10653
10654    if (fixedWidthTem) {
10655      width = (fixedWidthTem + gutterTem) + 'px';
10656    } else {
10657      if (!carousel) { itemsTem = Math.floor(itemsTem); }
10658      var dividend = carousel ? slideCountNew : itemsTem;
10659      width = CALC ?
10660        CALC + '(100% / ' + dividend + ')' :
10661        100 / dividend + '%';
10662    }
10663
10664    width = 'width:' + width;
10665
10666    // inner slider: overwrite outer slider styles
10667    return nested !== 'inner' ? width + ';' : width + ' !important;';
10668  }
10669
10670  function getSlideGutterStyle (gutterTem) {
10671    var str = '';
10672
10673    // gutter maybe interger || 0
10674    // so can't use 'if (gutter)'
10675    if (gutterTem !== false) {
10676      var prop = horizontal ? 'padding-' : 'margin-',
10677          dir = horizontal ? 'right' : 'bottom';
10678      str = prop +  dir + ': ' + gutterTem + 'px;';
10679    }
10680
10681    return str;
10682  }
10683
10684  function getCSSPrefix (name, num) {
10685    var prefix = name.substring(0, name.length - num).toLowerCase();
10686    if (prefix) { prefix = '-' + prefix + '-'; }
10687
10688    return prefix;
10689  }
10690
10691  function getTransitionDurationStyle (speed) {
10692    return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;';
10693  }
10694
10695  function getAnimationDurationStyle (speed) {
10696    return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;';
10697  }
10698
10699  function initStructure () {
10700    var classOuter = 'tns-outer',
10701        classInner = 'tns-inner',
10702        hasGutter = hasOption('gutter');
10703
10704    outerWrapper.className = classOuter;
10705    innerWrapper.className = classInner;
10706    outerWrapper.id = slideId + '-ow';
10707    innerWrapper.id = slideId + '-iw';
10708
10709    // set container properties
10710    if (container.id === '') { container.id = slideId; }
10711    newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel';
10712    newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc';
10713    if (autoWidth) { newContainerClasses += ' tns-autowidth'; }
10714    newContainerClasses += ' tns-' + options.axis;
10715    container.className += newContainerClasses;
10716
10717    // add constrain layer for carousel
10718    if (carousel) {
10719      middleWrapper = doc.createElement('div');
10720      middleWrapper.id = slideId + '-mw';
10721      middleWrapper.className = 'tns-ovh';
10722
10723      outerWrapper.appendChild(middleWrapper);
10724      middleWrapper.appendChild(innerWrapper);
10725    } else {
10726      outerWrapper.appendChild(innerWrapper);
10727    }
10728
10729    if (autoHeight) {
10730      var wp = middleWrapper ? middleWrapper : innerWrapper;
10731      wp.className += ' tns-ah';
10732    }
10733
10734    containerParent.insertBefore(outerWrapper, container);
10735    innerWrapper.appendChild(container);
10736
10737    // add id, class, aria attributes
10738    // before clone slides
10739    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
10740      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-item');
10741      if (!item.id) { item.id = slideId + '-item' + i; }
10742      if (!carousel && animateNormal) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal); }
10743      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
10744        'aria-hidden': 'true',
10745        'tabindex': '-1'
10746      });
10747    });
10748
10749    // ## clone slides
10750    // carousel: n + slides + n
10751    // gallery:      slides + n
10752    if (cloneCount) {
10753      var fragmentBefore = doc.createDocumentFragment(),
10754          fragmentAfter = doc.createDocumentFragment();
10755
10756      for (var j = cloneCount; j--;) {
10757        var num = j%slideCount,
10758            cloneFirst = slideItems[num].cloneNode(true);
10759        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneFirst, slideClonedClass);
10760        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneFirst, 'id');
10761        fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild);
10762
10763        if (carousel) {
10764          var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true);
10765          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneLast, slideClonedClass);
10766          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneLast, 'id');
10767          fragmentBefore.appendChild(cloneLast);
10768        }
10769      }
10770
10771      container.insertBefore(fragmentBefore, container.firstChild);
10772      container.appendChild(fragmentAfter);
10773      slideItems = container.children;
10774    }
10775
10776  }
10777
10778  function initSliderTransform () {
10779    // ## images loaded/failed
10780    if (hasOption('autoHeight') || autoWidth || !horizontal) {
10781      var imgs = container.querySelectorAll('img');
10782
10783      // add img load event listener
10784      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(imgs, function(img) {
10785        var src = img.src;
10786
10787        if (!lazyload) {
10788          // not data img
10789          if (src && src.indexOf('data:image') < 0) {
10790            img.src = '';
10791            Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
10792            Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
10793
10794            img.src = src;
10795          // data img
10796          } else {
10797            imgLoaded(img);
10798          }
10799        }
10800      });
10801
10802      // set imgsComplete
10803      Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), function() { imgsComplete = true; }); });
10804
10805      // reset imgs for auto height: check visible imgs only
10806      if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); }
10807
10808      lazyload ? initSliderTransformStyleCheck() : Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), initSliderTransformStyleCheck); });
10809
10810    } else {
10811      // set container transform property
10812      if (carousel) { doContainerTransformSilent(); }
10813
10814      // update slider tools and events
10815      initTools();
10816      initEvents();
10817    }
10818  }
10819
10820  function initSliderTransformStyleCheck () {
10821    if (autoWidth && slideCount > 1) {
10822      // check styles application
10823      var num = loop ? index : slideCount - 1;
10824
10825      (function stylesApplicationCheck() {
10826        var left = slideItems[num].getBoundingClientRect().left;
10827        var right = slideItems[num - 1].getBoundingClientRect().right;
10828
10829        (Math.abs(left - right) <= 1) ?
10830          initSliderTransformCore() :
10831          setTimeout(function(){ stylesApplicationCheck() }, 16);
10832      })();
10833
10834    } else {
10835      initSliderTransformCore();
10836    }
10837  }
10838
10839
10840  function initSliderTransformCore () {
10841    // run Fn()s which are rely on image loading
10842    if (!horizontal || autoWidth) {
10843      setSlidePositions();
10844
10845      if (autoWidth) {
10846        rightBoundary = getRightBoundary();
10847        if (freezable) { freeze = getFreeze(); }
10848        indexMax = getIndexMax(); // <= slidePositions, rightBoundary <=
10849        resetVariblesWhenDisable(disable || freeze);
10850      } else {
10851        updateContentWrapperHeight();
10852      }
10853    }
10854
10855    // set container transform property
10856    if (carousel) { doContainerTransformSilent(); }
10857
10858    // update slider tools and events
10859    initTools();
10860    initEvents();
10861  }
10862
10863  function initSheet () {
10864    // gallery:
10865    // set animation classes and left value for gallery slider
10866    if (!carousel) {
10867      for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) {
10868        var item = slideItems[i];
10869        item.style.left = (i - index) * 100 / items + '%';
10870        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
10871        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
10872      }
10873    }
10874
10875    // #### LAYOUT
10876
10877    // ## INLINE-BLOCK VS FLOAT
10878
10879    // ## PercentageLayout:
10880    // slides: inline-block
10881    // remove blank space between slides by set font-size: 0
10882
10883    // ## Non PercentageLayout:
10884    // slides: float
10885    //         margin-right: -100%
10886    //         margin-left: ~
10887
10888    // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing
10889    if (horizontal) {
10890      if (PERCENTAGELAYOUT || autoWidth) {
10891        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
10892        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, 'font-size:0;', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
10893      } else if (carousel) {
10894        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function (slide, i) {
10895          slide.style.marginLeft = getSlideMarginLeft(i);
10896        });
10897      }
10898    }
10899
10900
10901    // ## BASIC STYLES
10902    if (CSSMQ) {
10903      // middle wrapper style
10904      if (TRANSITIONDURATION) {
10905        var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : '';
10906        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-mw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
10907      }
10908
10909      // inner wrapper styles
10910      str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight);
10911      Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-iw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
10912
10913      // container styles
10914      if (carousel) {
10915        str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : '';
10916        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
10917        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
10918      }
10919
10920      // slide styles
10921      str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : '';
10922      if (options.gutter) { str += getSlideGutterStyle(options.gutter); }
10923      // set gallery items transition-duration
10924      if (!carousel) {
10925        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
10926        if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); }
10927      }
10928      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
10929
10930    // non CSS mediaqueries: IE8
10931    // ## update inner wrapper, container, slides if needed
10932    // set inline styles for inner wrapper & container
10933    // insert stylesheet (one line) for slides only (since slides are many)
10934    } else {
10935      // middle wrapper styles
10936      update_carousel_transition_duration();
10937
10938      // inner wrapper styles
10939      innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight);
10940
10941      // container styles
10942      if (carousel && horizontal && !autoWidth) {
10943        container.style.width = getContainerWidth(fixedWidth, gutter, items);
10944      }
10945
10946      // slide styles
10947      var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : '';
10948      if (gutter) { str += getSlideGutterStyle(gutter); }
10949
10950      // append to the last line
10951      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
10952    }
10953
10954    // ## MEDIAQUERIES
10955    if (responsive && CSSMQ) {
10956      for (var bp in responsive) {
10957        // bp: convert string to number
10958        bp = parseInt(bp);
10959
10960        var opts = responsive[bp],
10961            str = '',
10962            middleWrapperStr = '',
10963            innerWrapperStr = '',
10964            containerStr = '',
10965            slideStr = '',
10966            itemsBP = !autoWidth ? getOption('items', bp) : null,
10967            fixedWidthBP = getOption('fixedWidth', bp),
10968            speedBP = getOption('speed', bp),
10969            edgePaddingBP = getOption('edgePadding', bp),
10970            autoHeightBP = getOption('autoHeight', bp),
10971            gutterBP = getOption('gutter', bp);
10972
10973        // middle wrapper string
10974        if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) {
10975          middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}';
10976        }
10977
10978        // inner wrapper string
10979        if ('edgePadding' in opts || 'gutter' in opts) {
10980          innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}';
10981        }
10982
10983        // container string
10984        if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) {
10985          containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';';
10986        }
10987        if (TRANSITIONDURATION && 'speed' in opts) {
10988          containerStr += getTransitionDurationStyle(speedBP);
10989        }
10990        if (containerStr) {
10991          containerStr = '#' + slideId + '{' + containerStr + '}';
10992        }
10993
10994        // slide string
10995        if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) {
10996          slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP);
10997        }
10998        if ('gutter' in opts) {
10999          slideStr += getSlideGutterStyle(gutterBP);
11000        }
11001        // set gallery items transition-duration
11002        if (!carousel && 'speed' in opts) {
11003          if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); }
11004          if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); }
11005        }
11006        if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; }
11007
11008        // add up
11009        str = middleWrapperStr + innerWrapperStr + containerStr + slideStr;
11010
11011        if (str) {
11012          sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length);
11013        }
11014      }
11015    }
11016  }
11017
11018  function initTools () {
11019    // == slides ==
11020    updateSlideStatus();
11021
11022    // == live region ==
11023    outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">' + getLiveRegionStr() + '</span>  of ' + slideCount + '</div>');
11024    liveregionCurrent = outerWrapper.querySelector('.tns-liveregion .current');
11025
11026    // == autoplayInit ==
11027    if (hasAutoplay) {
11028      var txt = autoplay ? 'stop' : 'start';
11029      if (autoplayButton) {
11030        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': txt});
11031      } else if (options.autoplayButtonOutput) {
11032        outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>');
11033        autoplayButton = outerWrapper.querySelector('[data-action]');
11034      }
11035
11036      // add event
11037      if (autoplayButton) {
11038        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(autoplayButton, {'click': toggleAutoplay});
11039      }
11040
11041      if (autoplay) {
11042        startAutoplay();
11043        if (autoplayHoverPause) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents); }
11044        if (autoplayResetOnVisibility) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, visibilityEvent); }
11045      }
11046    }
11047
11048    // == navInit ==
11049    if (hasNav) {
11050      var initIndex = !carousel ? 0 : cloneCount;
11051      // customized nav
11052      // will not hide the navs in case they're thumbnails
11053      if (navContainer) {
11054        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navContainer, {'aria-label': 'Carousel Pagination'});
11055        navItems = navContainer.children;
11056        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(navItems, function(item, i) {
11057          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
11058            'data-nav': i,
11059            'tabindex': '-1',
11060            'aria-label': navStr + (i + 1),
11061            'aria-controls': slideId,
11062          });
11063        });
11064
11065      // generated nav
11066      } else {
11067        var navHtml = '',
11068            hiddenStr = navAsThumbnails ? '' : 'style="display:none"';
11069        for (var i = 0; i < slideCount; i++) {
11070          // hide nav items by default
11071          navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>';
11072        }
11073        navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>';
11074        outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml);
11075
11076        navContainer = outerWrapper.querySelector('.tns-nav');
11077        navItems = navContainer.children;
11078      }
11079
11080      updateNavVisibility();
11081
11082      // add transition
11083      if (TRANSITIONDURATION) {
11084        var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(),
11085            str = 'transition: all ' + speed / 1000 + 's';
11086
11087        if (prefix) {
11088          str = '-' + prefix + '-' + str;
11089        }
11090
11091        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '[aria-controls^=' + slideId + '-item]', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
11092      }
11093
11094      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
11095      Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navItems[navCurrentIndex], 'tabindex');
11096      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navItems[navCurrentIndex], navActiveClass);
11097
11098      // add events
11099      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(navContainer, navEvents);
11100    }
11101
11102
11103
11104    // == controlsInit ==
11105    if (hasControls) {
11106      if (!controlsContainer && (!prevButton || !nextButton)) {
11107        outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>');
11108
11109        controlsContainer = outerWrapper.querySelector('.tns-controls');
11110      }
11111
11112      if (!prevButton || !nextButton) {
11113        prevButton = controlsContainer.children[0];
11114        nextButton = controlsContainer.children[1];
11115      }
11116
11117      if (options.controlsContainer) {
11118        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(controlsContainer, {
11119          'aria-label': 'Carousel Navigation',
11120          'tabindex': '0'
11121        });
11122      }
11123
11124      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
11125        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])([prevButton, nextButton], {
11126          'aria-controls': slideId,
11127          'tabindex': '-1',
11128        });
11129      }
11130
11131      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
11132        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(prevButton, {'data-controls' : 'prev'});
11133        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(nextButton, {'data-controls' : 'next'});
11134      }
11135
11136      prevIsButton = isButton(prevButton);
11137      nextIsButton = isButton(nextButton);
11138
11139      updateControlsStatus();
11140
11141      // add events
11142      if (controlsContainer) {
11143        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(controlsContainer, controlsEvents);
11144      } else {
11145        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(prevButton, controlsEvents);
11146        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(nextButton, controlsEvents);
11147      }
11148    }
11149
11150    // hide tools if needed
11151    disableUI();
11152  }
11153
11154  function initEvents () {
11155    // add events
11156    if (carousel && TRANSITIONEND) {
11157      var eve = {};
11158      eve[TRANSITIONEND] = onTransitionEnd;
11159      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, eve);
11160    }
11161
11162    if (touch) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch); }
11163    if (mouseDrag) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents); }
11164    if (arrowKeys) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent); }
11165
11166    if (nested === 'inner') {
11167      events.on('outerResized', function () {
11168        resizeTasks();
11169        events.emit('innerLoaded', info());
11170      });
11171    } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) {
11172      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(win, {'resize': onResize});
11173    }
11174
11175    if (autoHeight) {
11176      if (nested === 'outer') {
11177        events.on('innerLoaded', doAutoHeight);
11178      } else if (!disable) { doAutoHeight(); }
11179    }
11180
11181    doLazyLoad();
11182    if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); }
11183
11184    events.on('indexChanged', additionalUpdates);
11185    if (nested === 'inner') { events.emit('innerLoaded', info()); }
11186    if (typeof onInit === 'function') { onInit(info()); }
11187    isOn = true;
11188  }
11189
11190  function destroy () {
11191    // sheet
11192    sheet.disabled = true;
11193    if (sheet.ownerNode) { sheet.ownerNode.remove(); }
11194
11195    // remove win event listeners
11196    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(win, {'resize': onResize});
11197
11198    // arrowKeys, controls, nav
11199    if (arrowKeys) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent); }
11200    if (controlsContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(controlsContainer, controlsEvents); }
11201    if (navContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(navContainer, navEvents); }
11202
11203    // autoplay
11204    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
11205    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, visibilityEvent);
11206    if (autoplayButton) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(autoplayButton, {'click': toggleAutoplay}); }
11207    if (autoplay) { clearInterval(autoplayTimer); }
11208
11209    // container
11210    if (carousel && TRANSITIONEND) {
11211      var eve = {};
11212      eve[TRANSITIONEND] = onTransitionEnd;
11213      Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, eve);
11214    }
11215    if (touch) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents); }
11216    if (mouseDrag) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents); }
11217
11218    // cache Object values in options && reset HTML
11219    var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML];
11220
11221    tnsList.forEach(function(item, i) {
11222      var el = item === 'container' ? outerWrapper : options[item];
11223
11224      if (typeof el === 'object' && el) {
11225        var prevEl = el.previousElementSibling ? el.previousElementSibling : false,
11226            parentEl = el.parentNode;
11227        el.outerHTML = htmlList[i];
11228        options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild;
11229      }
11230    });
11231
11232
11233    // reset variables
11234    tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null;
11235    // check variables
11236    // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } });
11237
11238    for (var a in this) {
11239      if (a !== 'rebuild') { this[a] = null; }
11240    }
11241    isOn = false;
11242  }
11243
11244// === ON RESIZE ===
11245  // responsive || fixedWidth || autoWidth || !horizontal
11246  function onResize (e) {
11247    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ resizeTasks(getEvent(e)); });
11248  }
11249
11250  function resizeTasks (e) {
11251    if (!isOn) { return; }
11252    if (nested === 'outer') { events.emit('outerResized', info(e)); }
11253    windowWidth = getWindowWidth();
11254    var bpChanged,
11255        breakpointZoneTem = breakpointZone,
11256        needContainerTransform = false;
11257
11258    if (responsive) {
11259      setBreakpointZone();
11260      bpChanged = breakpointZoneTem !== breakpointZone;
11261      // if (hasRightDeadZone) { needContainerTransform = true; } // *?
11262      if (bpChanged) { events.emit('newBreakpointStart', info(e)); }
11263    }
11264
11265    var indChanged,
11266        itemsChanged,
11267        itemsTem = items,
11268        disableTem = disable,
11269        freezeTem = freeze,
11270        arrowKeysTem = arrowKeys,
11271        controlsTem = controls,
11272        navTem = nav,
11273        touchTem = touch,
11274        mouseDragTem = mouseDrag,
11275        autoplayTem = autoplay,
11276        autoplayHoverPauseTem = autoplayHoverPause,
11277        autoplayResetOnVisibilityTem = autoplayResetOnVisibility,
11278        indexTem = index;
11279
11280    if (bpChanged) {
11281      var fixedWidthTem = fixedWidth,
11282          autoHeightTem = autoHeight,
11283          controlsTextTem = controlsText,
11284          centerTem = center,
11285          autoplayTextTem = autoplayText;
11286
11287      if (!CSSMQ) {
11288        var gutterTem = gutter,
11289            edgePaddingTem = edgePadding;
11290      }
11291    }
11292
11293    // get option:
11294    // fixed width: viewport, fixedWidth, gutter => items
11295    // others: window width => all variables
11296    // all: items => slideBy
11297    arrowKeys = getOption('arrowKeys');
11298    controls = getOption('controls');
11299    nav = getOption('nav');
11300    touch = getOption('touch');
11301    center = getOption('center');
11302    mouseDrag = getOption('mouseDrag');
11303    autoplay = getOption('autoplay');
11304    autoplayHoverPause = getOption('autoplayHoverPause');
11305    autoplayResetOnVisibility = getOption('autoplayResetOnVisibility');
11306
11307    if (bpChanged) {
11308      disable = getOption('disable');
11309      fixedWidth = getOption('fixedWidth');
11310      speed = getOption('speed');
11311      autoHeight = getOption('autoHeight');
11312      controlsText = getOption('controlsText');
11313      autoplayText = getOption('autoplayText');
11314      autoplayTimeout = getOption('autoplayTimeout');
11315
11316      if (!CSSMQ) {
11317        edgePadding = getOption('edgePadding');
11318        gutter = getOption('gutter');
11319      }
11320    }
11321    // update options
11322    resetVariblesWhenDisable(disable);
11323
11324    viewport = getViewportWidth(); // <= edgePadding, gutter
11325    if ((!horizontal || autoWidth) && !disable) {
11326      setSlidePositions();
11327      if (!horizontal) {
11328        updateContentWrapperHeight(); // <= setSlidePositions
11329        needContainerTransform = true;
11330      }
11331    }
11332    if (fixedWidth || autoWidth) {
11333      rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter
11334                                          // fixedWidth: <= viewport, fixedWidth, gutter
11335      indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions
11336                                // fixedWidth: <= rightBoundary, fixedWidth, gutter
11337    }
11338
11339    if (bpChanged || fixedWidth) {
11340      items = getOption('items');
11341      slideBy = getOption('slideBy');
11342      itemsChanged = items !== itemsTem;
11343
11344      if (itemsChanged) {
11345        if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items
11346        // check index before transform in case
11347        // slider reach the right edge then items become bigger
11348        updateIndex();
11349      }
11350    }
11351
11352    if (bpChanged) {
11353      if (disable !== disableTem) {
11354        if (disable) {
11355          disableSlider();
11356        } else {
11357          enableSlider(); // <= slidePositions, rightBoundary, indexMax
11358        }
11359      }
11360    }
11361
11362    if (freezable && (bpChanged || fixedWidth || autoWidth)) {
11363      freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary
11364                            // <= fixedWidth: fixedWidth, gutter, rightBoundary
11365                            // <= others: items
11366
11367      if (freeze !== freezeTem) {
11368        if (freeze) {
11369          doContainerTransform(getContainerTransformValue(getStartIndex(0)));
11370          freezeSlider();
11371        } else {
11372          unfreezeSlider();
11373          needContainerTransform = true;
11374        }
11375      }
11376    }
11377
11378    resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility
11379    if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; }
11380
11381    if (arrowKeys !== arrowKeysTem) {
11382      arrowKeys ?
11383        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent) :
11384        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent);
11385    }
11386    if (controls !== controlsTem) {
11387      if (controls) {
11388        if (controlsContainer) {
11389          Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
11390        } else {
11391          if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
11392          if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
11393        }
11394      } else {
11395        if (controlsContainer) {
11396          Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
11397        } else {
11398          if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
11399          if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
11400        }
11401      }
11402    }
11403    if (nav !== navTem) {
11404      if (nav) {
11405        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer);
11406        updateNavVisibility();
11407      } else {
11408        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer)
11409      }
11410    }
11411    if (touch !== touchTem) {
11412      touch ?
11413        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch) :
11414        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents);
11415    }
11416    if (mouseDrag !== mouseDragTem) {
11417      mouseDrag ?
11418        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents) :
11419        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents);
11420    }
11421    if (autoplay !== autoplayTem) {
11422      if (autoplay) {
11423        if (autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
11424        if (!animating && !autoplayUserPaused) { startAutoplay(); }
11425      } else {
11426        if (autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
11427        if (animating) { stopAutoplay(); }
11428      }
11429    }
11430    if (autoplayHoverPause !== autoplayHoverPauseTem) {
11431      autoplayHoverPause ?
11432        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents) :
11433        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
11434    }
11435    if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) {
11436      autoplayResetOnVisibility ?
11437        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, visibilityEvent) :
11438        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, visibilityEvent);
11439    }
11440
11441    if (bpChanged) {
11442      if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; }
11443
11444      if (autoHeight !== autoHeightTem) {
11445        if (!autoHeight) { innerWrapper.style.height = ''; }
11446      }
11447
11448      if (controls && controlsText !== controlsTextTem) {
11449        prevButton.innerHTML = controlsText[0];
11450        nextButton.innerHTML = controlsText[1];
11451      }
11452
11453      if (autoplayButton && autoplayText !== autoplayTextTem) {
11454        var i = autoplay ? 1 : 0,
11455            html = autoplayButton.innerHTML,
11456            len = html.length - autoplayTextTem[i].length;
11457        if (html.substring(len) === autoplayTextTem[i]) {
11458          autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i];
11459        }
11460      }
11461    } else {
11462      if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; }
11463    }
11464
11465    if (itemsChanged || fixedWidth && !autoWidth) {
11466      pages = getPages();
11467      updateNavVisibility();
11468    }
11469
11470    indChanged = index !== indexTem;
11471    if (indChanged) {
11472      events.emit('indexChanged', info());
11473      needContainerTransform = true;
11474    } else if (itemsChanged) {
11475      if (!indChanged) { additionalUpdates(); }
11476    } else if (fixedWidth || autoWidth) {
11477      doLazyLoad();
11478      updateSlideStatus();
11479      updateLiveRegion();
11480    }
11481
11482    if (itemsChanged && !carousel) { updateGallerySlidePositions(); }
11483
11484    if (!disable && !freeze) {
11485      // non-mediaqueries: IE8
11486      if (bpChanged && !CSSMQ) {
11487        // middle wrapper styles
11488
11489        // inner wrapper styles
11490        if (edgePadding !== edgePaddingTem || gutter !== gutterTem) {
11491          innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight);
11492        }
11493
11494        if (horizontal) {
11495          // container styles
11496          if (carousel) {
11497            container.style.width = getContainerWidth(fixedWidth, gutter, items);
11498          }
11499
11500          // slide styles
11501          var str = getSlideWidthStyle(fixedWidth, gutter, items) +
11502                    getSlideGutterStyle(gutter);
11503
11504          // remove the last line and
11505          // add new styles
11506          Object(_helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__["removeCSSRule"])(sheet, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet) - 1);
11507          Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
11508        }
11509      }
11510
11511      // auto height
11512      if (autoHeight) { doAutoHeight(); }
11513
11514      if (needContainerTransform) {
11515        doContainerTransformSilent();
11516        indexCached = index;
11517      }
11518    }
11519
11520    if (bpChanged) { events.emit('newBreakpointEnd', info(e)); }
11521  }
11522
11523
11524
11525
11526
11527  // === INITIALIZATION FUNCTIONS === //
11528  function getFreeze () {
11529    if (!fixedWidth && !autoWidth) {
11530      var a = center ? items - (items - 1) / 2 : items;
11531      return  slideCount <= a;
11532    }
11533
11534    var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount],
11535        vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter;
11536
11537    if (center) {
11538      vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2;
11539    }
11540
11541    return width <= vp;
11542  }
11543
11544  function setBreakpointZone () {
11545    breakpointZone = 0;
11546    for (var bp in responsive) {
11547      bp = parseInt(bp); // convert string to number
11548      if (windowWidth >= bp) { breakpointZone = bp; }
11549    }
11550  }
11551
11552  // (slideBy, indexMin, indexMax) => index
11553  var updateIndex = (function () {
11554    return loop ?
11555      carousel ?
11556        // loop + carousel
11557        function () {
11558          var leftEdge = indexMin,
11559              rightEdge = indexMax;
11560
11561          leftEdge += slideBy;
11562          rightEdge -= slideBy;
11563
11564          // adjust edges when has edge paddings
11565          // or fixed-width slider with extra space on the right side
11566          if (edgePadding) {
11567            leftEdge += 1;
11568            rightEdge -= 1;
11569          } else if (fixedWidth) {
11570            if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; }
11571          }
11572
11573          if (cloneCount) {
11574            if (index > rightEdge) {
11575              index -= slideCount;
11576            } else if (index < leftEdge) {
11577              index += slideCount;
11578            }
11579          }
11580        } :
11581        // loop + gallery
11582        function() {
11583          if (index > indexMax) {
11584            while (index >= indexMin + slideCount) { index -= slideCount; }
11585          } else if (index < indexMin) {
11586            while (index <= indexMax - slideCount) { index += slideCount; }
11587          }
11588        } :
11589      // non-loop
11590      function() {
11591        index = Math.max(indexMin, Math.min(indexMax, index));
11592      };
11593  })();
11594
11595  function disableUI () {
11596    if (!autoplay && autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
11597    if (!nav && navContainer) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer); }
11598    if (!controls) {
11599      if (controlsContainer) {
11600        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
11601      } else {
11602        if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
11603        if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
11604      }
11605    }
11606  }
11607
11608  function enableUI () {
11609    if (autoplay && autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
11610    if (nav && navContainer) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer); }
11611    if (controls) {
11612      if (controlsContainer) {
11613        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
11614      } else {
11615        if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
11616        if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
11617      }
11618    }
11619  }
11620
11621  function freezeSlider () {
11622    if (frozen) { return; }
11623
11624    // remove edge padding from inner wrapper
11625    if (edgePadding) { innerWrapper.style.margin = '0px'; }
11626
11627    // add class tns-transparent to cloned slides
11628    if (cloneCount) {
11629      var str = 'tns-transparent';
11630      for (var i = cloneCount; i--;) {
11631        if (carousel) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[i], str); }
11632        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[slideCountNew - i - 1], str);
11633      }
11634    }
11635
11636    // update tools
11637    disableUI();
11638
11639    frozen = true;
11640  }
11641
11642  function unfreezeSlider () {
11643    if (!frozen) { return; }
11644
11645    // restore edge padding for inner wrapper
11646    // for mordern browsers
11647    if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; }
11648
11649    // remove class tns-transparent to cloned slides
11650    if (cloneCount) {
11651      var str = 'tns-transparent';
11652      for (var i = cloneCount; i--;) {
11653        if (carousel) { Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[i], str); }
11654        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[slideCountNew - i - 1], str);
11655      }
11656    }
11657
11658    // update tools
11659    enableUI();
11660
11661    frozen = false;
11662  }
11663
11664  function disableSlider () {
11665    if (disabled) { return; }
11666
11667    sheet.disabled = true;
11668    container.className = container.className.replace(newContainerClasses.substring(1), '');
11669    Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(container, ['style']);
11670    if (loop) {
11671      for (var j = cloneCount; j--;) {
11672        if (carousel) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[j]); }
11673        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[slideCountNew - j - 1]);
11674      }
11675    }
11676
11677    // vertical slider
11678    if (!horizontal || !carousel) { Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(innerWrapper, ['style']); }
11679
11680    // gallery
11681    if (!carousel) {
11682      for (var i = index, l = index + slideCount; i < l; i++) {
11683        var item = slideItems[i];
11684        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['style']);
11685        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
11686        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
11687      }
11688    }
11689
11690    // update tools
11691    disableUI();
11692
11693    disabled = true;
11694  }
11695
11696  function enableSlider () {
11697    if (!disabled) { return; }
11698
11699    sheet.disabled = false;
11700    container.className += newContainerClasses;
11701    doContainerTransformSilent();
11702
11703    if (loop) {
11704      for (var j = cloneCount; j--;) {
11705        if (carousel) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[j]); }
11706        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[slideCountNew - j - 1]);
11707      }
11708    }
11709
11710    // gallery
11711    if (!carousel) {
11712      for (var i = index, l = index + slideCount; i < l; i++) {
11713        var item = slideItems[i],
11714            classN = i < index + items ? animateIn : animateNormal;
11715        item.style.left = (i - index) * 100 / items + '%';
11716        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classN);
11717      }
11718    }
11719
11720    // update tools
11721    enableUI();
11722
11723    disabled = false;
11724  }
11725
11726  function updateLiveRegion () {
11727    var str = getLiveRegionStr();
11728    if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; }
11729  }
11730
11731  function getLiveRegionStr () {
11732    var arr = getVisibleSlideRange(),
11733        start = arr[0] + 1,
11734        end = arr[1] + 1;
11735    return start === end ? start + '' : start + ' to ' + end;
11736  }
11737
11738  function getVisibleSlideRange (val) {
11739    if (val == null) { val = getContainerTransformValue(); }
11740    var start = index, end, rangestart, rangeend;
11741
11742    // get range start, range end for autoWidth and fixedWidth
11743    if (center || edgePadding) {
11744      if (autoWidth || fixedWidth) {
11745        rangestart = - (parseFloat(val) + edgePadding);
11746        rangeend = rangestart + viewport + edgePadding * 2;
11747      }
11748    } else {
11749      if (autoWidth) {
11750        rangestart = slidePositions[index];
11751        rangeend = rangestart + viewport;
11752      }
11753    }
11754
11755    // get start, end
11756    // - check auto width
11757    if (autoWidth) {
11758      slidePositions.forEach(function(point, i) {
11759        if (i < slideCountNew) {
11760          if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; }
11761          if (rangeend - point >= 0.5) { end = i; }
11762        }
11763      });
11764
11765    // - check percentage width, fixed width
11766    } else {
11767
11768      if (fixedWidth) {
11769        var cell = fixedWidth + gutter;
11770        if (center || edgePadding) {
11771          start = Math.floor(rangestart/cell);
11772          end = Math.ceil(rangeend/cell - 1);
11773        } else {
11774          end = start + Math.ceil(viewport/cell) - 1;
11775        }
11776
11777      } else {
11778        if (center || edgePadding) {
11779          var a = items - 1;
11780          if (center) {
11781            start -= a / 2;
11782            end = index + a / 2;
11783          } else {
11784            end = index + a;
11785          }
11786
11787          if (edgePadding) {
11788            var b = edgePadding * items / viewport;
11789            start -= b;
11790            end += b;
11791          }
11792
11793          start = Math.floor(start);
11794          end = Math.ceil(end);
11795        } else {
11796          end = start + items - 1;
11797        }
11798      }
11799
11800      start = Math.max(start, 0);
11801      end = Math.min(end, slideCountNew - 1);
11802    }
11803
11804    return [start, end];
11805  }
11806
11807  function doLazyLoad () {
11808    if (lazyload && !disable) {
11809      var arg = getVisibleSlideRange();
11810      arg.push(lazyloadSelector);
11811
11812      getImageArray.apply(null, arg).forEach(function (img) {
11813        if (!Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) {
11814          // stop propagation transitionend event to container
11815          var eve = {};
11816          eve[TRANSITIONEND] = function (e) { e.stopPropagation(); };
11817          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, eve);
11818
11819          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
11820
11821          // update src
11822          img.src = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-src');
11823
11824          // update srcset
11825          var srcset = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-srcset');
11826          if (srcset) { img.srcset = srcset; }
11827
11828          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
11829        }
11830      });
11831    }
11832  }
11833
11834  function onImgLoaded (e) {
11835    imgLoaded(getTarget(e));
11836  }
11837
11838  function onImgFailed (e) {
11839    imgFailed(getTarget(e));
11840  }
11841
11842  function imgLoaded (img) {
11843    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loaded');
11844    imgCompleted(img);
11845  }
11846
11847  function imgFailed (img) {
11848    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'failed');
11849    imgCompleted(img);
11850  }
11851
11852  function imgCompleted (img) {
11853    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, imgCompleteClass);
11854    Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(img, 'loading');
11855    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(img, imgEvents);
11856  }
11857
11858  function getImageArray (start, end, imgSelector) {
11859    var imgs = [];
11860    if (!imgSelector) { imgSelector = 'img'; }
11861
11862    while (start <= end) {
11863      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); });
11864      start++;
11865    }
11866
11867    return imgs;
11868  }
11869
11870  // check if all visible images are loaded
11871  // and update container height if it's done
11872  function doAutoHeight () {
11873    var imgs = getImageArray.apply(null, getVisibleSlideRange());
11874    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); });
11875  }
11876
11877  function imgsLoadedCheck (imgs, cb) {
11878    // execute callback function if all images are complete
11879    if (imgsComplete) { return cb(); }
11880
11881    // check image classes
11882    imgs.forEach(function (img, index) {
11883      if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete
11884      if (Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) { imgs.splice(index, 1); }
11885    });
11886
11887    // execute callback function if selected images are all complete
11888    if (!imgs.length) { return cb(); }
11889
11890    // otherwise execute this functiona again
11891    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, cb); });
11892  }
11893
11894  function additionalUpdates () {
11895    doLazyLoad();
11896    updateSlideStatus();
11897    updateLiveRegion();
11898    updateControlsStatus();
11899    updateNavStatus();
11900  }
11901
11902
11903  function update_carousel_transition_duration () {
11904    if (carousel && autoHeight) {
11905      middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's';
11906    }
11907  }
11908
11909  function getMaxSlideHeight (slideStart, slideRange) {
11910    var heights = [];
11911    for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) {
11912      heights.push(slideItems[i].offsetHeight);
11913    }
11914
11915    return Math.max.apply(null, heights);
11916  }
11917
11918  // update inner wrapper height
11919  // 1. get the max-height of the visible slides
11920  // 2. set transitionDuration to speed
11921  // 3. update inner wrapper height to max-height
11922  // 4. set transitionDuration to 0s after transition done
11923  function updateInnerWrapperHeight () {
11924    var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount),
11925        wp = middleWrapper ? middleWrapper : innerWrapper;
11926
11927    if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; }
11928  }
11929
11930  // get the distance from the top edge of the first slide to each slide
11931  // (init) => slidePositions
11932  function setSlidePositions () {
11933    slidePositions = [0];
11934    var attr = horizontal ? 'left' : 'top',
11935        attr2 = horizontal ? 'right' : 'bottom',
11936        base = slideItems[0].getBoundingClientRect()[attr];
11937
11938    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
11939      // skip the first slide
11940      if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }
11941      // add the end edge
11942      if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }
11943    });
11944  }
11945
11946  // update slide
11947  function updateSlideStatus () {
11948    var range = getVisibleSlideRange(),
11949        start = range[0],
11950        end = range[1];
11951
11952    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
11953      // show slides
11954      if (i >= start && i <= end) {
11955        if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
11956          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['aria-hidden', 'tabindex']);
11957          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, slideActiveClass);
11958        }
11959      // hide slides
11960      } else {
11961        if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
11962          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
11963            'aria-hidden': 'true',
11964            'tabindex': '-1'
11965          });
11966          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, slideActiveClass);
11967        }
11968      }
11969    });
11970  }
11971
11972  // gallery: update slide position
11973  function updateGallerySlidePositions () {
11974    var l = index + Math.min(slideCount, items);
11975    for (var i = slideCountNew; i--;) {
11976      var item = slideItems[i];
11977
11978      if (i >= index && i < l) {
11979        // add transitions to visible slides when adjusting their positions
11980        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-moving');
11981
11982        item.style.left = (i - index) * 100 / items + '%';
11983        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
11984        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
11985      } else if (item.style.left) {
11986        item.style.left = '';
11987        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
11988        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
11989      }
11990
11991      // remove outlet animation
11992      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
11993    }
11994
11995    // removing '.tns-moving'
11996    setTimeout(function() {
11997      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(el) {
11998        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(el, 'tns-moving');
11999      });
12000    }, 300);
12001  }
12002
12003  // set tabindex on Nav
12004  function updateNavStatus () {
12005    // get current nav
12006    if (nav) {
12007      navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex();
12008      navClicked = -1;
12009
12010      if (navCurrentIndex !== navCurrentIndexCached) {
12011        var navPrev = navItems[navCurrentIndexCached],
12012            navCurrent = navItems[navCurrentIndex];
12013
12014        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navPrev, {
12015          'tabindex': '-1',
12016          'aria-label': navStr + (navCurrentIndexCached + 1)
12017        });
12018        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(navPrev, navActiveClass);
12019
12020        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
12021        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navCurrent, 'tabindex');
12022        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navCurrent, navActiveClass);
12023
12024        navCurrentIndexCached = navCurrentIndex;
12025      }
12026    }
12027  }
12028
12029  function getLowerCaseNodeName (el) {
12030    return el.nodeName.toLowerCase();
12031  }
12032
12033  function isButton (el) {
12034    return getLowerCaseNodeName(el) === 'button';
12035  }
12036
12037  function isAriaDisabled (el) {
12038    return el.getAttribute('aria-disabled') === 'true';
12039  }
12040
12041  function disEnableElement (isButton, el, val) {
12042    if (isButton) {
12043      el.disabled = val;
12044    } else {
12045      el.setAttribute('aria-disabled', val.toString());
12046    }
12047  }
12048
12049  // set 'disabled' to true on controls when reach the edges
12050  function updateControlsStatus () {
12051    if (!controls || rewind || loop) { return; }
12052
12053    var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton),
12054        nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton),
12055        disablePrev = (index <= indexMin) ? true : false,
12056        disableNext = (!rewind && index >= indexMax) ? true : false;
12057
12058    if (disablePrev && !prevDisabled) {
12059      disEnableElement(prevIsButton, prevButton, true);
12060    }
12061    if (!disablePrev && prevDisabled) {
12062      disEnableElement(prevIsButton, prevButton, false);
12063    }
12064    if (disableNext && !nextDisabled) {
12065      disEnableElement(nextIsButton, nextButton, true);
12066    }
12067    if (!disableNext && nextDisabled) {
12068      disEnableElement(nextIsButton, nextButton, false);
12069    }
12070  }
12071
12072  // set duration
12073  function resetDuration (el, str) {
12074    if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; }
12075  }
12076
12077  function getSliderWidth () {
12078    return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew];
12079  }
12080
12081  function getCenterGap (num) {
12082    if (num == null) { num = index; }
12083
12084    var gap = edgePadding ? gutter : 0;
12085    return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 :
12086      fixedWidth ? (viewport - fixedWidth) / 2 :
12087        (items - 1) / 2;
12088  }
12089
12090  function getRightBoundary () {
12091    var gap = edgePadding ? gutter : 0,
12092        result = (viewport + gap) - getSliderWidth();
12093
12094    if (center && !loop) {
12095      result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() :
12096        getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1];
12097    }
12098    if (result > 0) { result = 0; }
12099
12100    return result;
12101  }
12102
12103  function getContainerTransformValue (num) {
12104    if (num == null) { num = index; }
12105
12106    var val;
12107    if (horizontal && !autoWidth) {
12108      if (fixedWidth) {
12109        val = - (fixedWidth + gutter) * num;
12110        if (center) { val += getCenterGap(); }
12111      } else {
12112        var denominator = TRANSFORM ? slideCountNew : items;
12113        if (center) { num -= getCenterGap(); }
12114        val = - num * 100 / denominator;
12115      }
12116    } else {
12117      val = - slidePositions[num];
12118      if (center && autoWidth) {
12119        val += getCenterGap();
12120      }
12121    }
12122
12123    if (hasRightDeadZone) { val = Math.max(val, rightBoundary); }
12124
12125    val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px';
12126
12127    return val;
12128  }
12129
12130  function doContainerTransformSilent (val) {
12131    resetDuration(container, '0s');
12132    doContainerTransform(val);
12133  }
12134
12135  function doContainerTransform (val) {
12136    if (val == null) { val = getContainerTransformValue(); }
12137    container.style[transformAttr] = transformPrefix + val + transformPostfix;
12138  }
12139
12140  function animateSlide (number, classOut, classIn, isOut) {
12141    var l = number + items;
12142    if (!loop) { l = Math.min(l, slideCountNew); }
12143
12144    for (var i = number; i < l; i++) {
12145        var item = slideItems[i];
12146
12147      // set item positions
12148      if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; }
12149
12150      if (animateDelay && TRANSITIONDELAY) {
12151        item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's';
12152      }
12153      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, classOut);
12154      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classIn);
12155
12156      if (isOut) { slideItemsOut.push(item); }
12157    }
12158  }
12159
12160  // make transfer after click/drag:
12161  // 1. change 'transform' property for mordern browsers
12162  // 2. change 'left' property for legacy browsers
12163  var transformCore = (function () {
12164    return carousel ?
12165      function () {
12166        resetDuration(container, '');
12167        if (TRANSITIONDURATION || !speed) {
12168          // for morden browsers with non-zero duration or
12169          // zero duration for all browsers
12170          doContainerTransform();
12171          // run fallback function manually
12172          // when duration is 0 / container is hidden
12173          if (!speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
12174
12175        } else {
12176          // for old browser with non-zero duration
12177          Object(_helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__["jsTransform"])(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd);
12178        }
12179
12180        if (!horizontal) { updateContentWrapperHeight(); }
12181      } :
12182      function () {
12183        slideItemsOut = [];
12184
12185        var eve = {};
12186        eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd;
12187        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(slideItems[indexCached], eve);
12188        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(slideItems[index], eve);
12189
12190        animateSlide(indexCached, animateIn, animateOut, true);
12191        animateSlide(index, animateNormal, animateIn);
12192
12193        // run fallback function manually
12194        // when transition or animation not supported / duration is 0
12195        if (!TRANSITIONEND || !ANIMATIONEND || !speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
12196      };
12197  })();
12198
12199  function render (e, sliderMoved) {
12200    if (updateIndexBeforeTransform) { updateIndex(); }
12201
12202    // render when slider was moved (touch or drag) even though index may not change
12203    if (index !== indexCached || sliderMoved) {
12204      // events
12205      events.emit('indexChanged', info());
12206      events.emit('transitionStart', info());
12207      if (autoHeight) { doAutoHeight(); }
12208
12209      // pause autoplay when click or keydown from user
12210      if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); }
12211
12212      running = true;
12213      transformCore();
12214    }
12215  }
12216
12217  /*
12218   * Transfer prefixed properties to the same format
12219   * CSS: -Webkit-Transform => webkittransform
12220   * JS: WebkitTransform => webkittransform
12221   * @param {string} str - property
12222   *
12223   */
12224  function strTrans (str) {
12225    return str.toLowerCase().replace(/-/g, '');
12226  }
12227
12228  // AFTER TRANSFORM
12229  // Things need to be done after a transfer:
12230  // 1. check index
12231  // 2. add classes to visible slide
12232  // 3. disable controls buttons when reach the first/last slide in non-loop slider
12233  // 4. update nav status
12234  // 5. lazyload images
12235  // 6. update container height
12236  function onTransitionEnd (event) {
12237    // check running on gallery mode
12238    // make sure trantionend/animationend events run only once
12239    if (carousel || running) {
12240      events.emit('transitionEnd', info(event));
12241
12242      if (!carousel && slideItemsOut.length > 0) {
12243        for (var i = 0; i < slideItemsOut.length; i++) {
12244          var item = slideItemsOut[i];
12245          // set item positions
12246          item.style.left = '';
12247
12248          if (ANIMATIONDELAY && TRANSITIONDELAY) {
12249            item.style[ANIMATIONDELAY] = '';
12250            item.style[TRANSITIONDELAY] = '';
12251          }
12252          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
12253          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
12254        }
12255      }
12256
12257      /* update slides, nav, controls after checking ...
12258       * => legacy browsers who don't support 'event'
12259       *    have to check event first, otherwise event.target will cause an error
12260       * => or 'gallery' mode:
12261       *   + event target is slide item
12262       * => or 'carousel' mode:
12263       *   + event target is container,
12264       *   + event.property is the same with transform attribute
12265       */
12266      if (!event ||
12267          !carousel && event.target.parentNode === container ||
12268          event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {
12269
12270        if (!updateIndexBeforeTransform) {
12271          var indexTem = index;
12272          updateIndex();
12273          if (index !== indexTem) {
12274            events.emit('indexChanged', info());
12275
12276            doContainerTransformSilent();
12277          }
12278        }
12279
12280        if (nested === 'inner') { events.emit('innerLoaded', info()); }
12281        running = false;
12282        indexCached = index;
12283      }
12284    }
12285
12286  }
12287
12288  // # ACTIONS
12289  function goTo (targetIndex, e) {
12290    if (freeze) { return; }
12291
12292    // prev slideBy
12293    if (targetIndex === 'prev') {
12294      onControlsClick(e, -1);
12295
12296    // next slideBy
12297    } else if (targetIndex === 'next') {
12298      onControlsClick(e, 1);
12299
12300    // go to exact slide
12301    } else {
12302      if (running) {
12303        if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
12304      }
12305
12306      var absIndex = getAbsIndex(),
12307          indexGap = 0;
12308
12309      if (targetIndex === 'first') {
12310        indexGap = - absIndex;
12311      } else if (targetIndex === 'last') {
12312        indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex;
12313      } else {
12314        if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); }
12315
12316        if (!isNaN(targetIndex)) {
12317          // from directly called goTo function
12318          if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); }
12319
12320          indexGap = targetIndex - absIndex;
12321        }
12322      }
12323
12324      // gallery: make sure new page won't overlap with current page
12325      if (!carousel && indexGap && Math.abs(indexGap) < items) {
12326        var factor = indexGap > 0 ? 1 : -1;
12327        indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1;
12328      }
12329
12330      index += indexGap;
12331
12332      // make sure index is in range
12333      if (carousel && loop) {
12334        if (index < indexMin) { index += slideCount; }
12335        if (index > indexMax) { index -= slideCount; }
12336      }
12337
12338      // if index is changed, start rendering
12339      if (getAbsIndex(index) !== getAbsIndex(indexCached)) {
12340        render(e);
12341      }
12342
12343    }
12344  }
12345
12346  // on controls click
12347  function onControlsClick (e, dir) {
12348    if (running) {
12349      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
12350    }
12351    var passEventObject;
12352
12353    if (!dir) {
12354      e = getEvent(e);
12355      var target = getTarget(e);
12356
12357      while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; }
12358
12359      var targetIn = [prevButton, nextButton].indexOf(target);
12360      if (targetIn >= 0) {
12361        passEventObject = true;
12362        dir = targetIn === 0 ? -1 : 1;
12363      }
12364    }
12365
12366    if (rewind) {
12367      if (index === indexMin && dir === -1) {
12368        goTo('last', e);
12369        return;
12370      } else if (index === indexMax && dir === 1) {
12371        goTo('first', e);
12372        return;
12373      }
12374    }
12375
12376    if (dir) {
12377      index += slideBy * dir;
12378      if (autoWidth) { index = Math.floor(index); }
12379      // pass e when click control buttons or keydown
12380      render((passEventObject || (e && e.type === 'keydown')) ? e : null);
12381    }
12382  }
12383
12384  // on nav click
12385  function onNavClick (e) {
12386    if (running) {
12387      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
12388    }
12389
12390    e = getEvent(e);
12391    var target = getTarget(e), navIndex;
12392
12393    // find the clicked nav item
12394    while (target !== navContainer && !Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) { target = target.parentNode; }
12395    if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) {
12396      var navIndex = navClicked = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(target, 'data-nav')),
12397          targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items,
12398          targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1);
12399      goTo(targetIndex, e);
12400
12401      if (navCurrentIndex === navIndex) {
12402        if (animating) { stopAutoplay(); }
12403        navClicked = -1; // reset navClicked
12404      }
12405    }
12406  }
12407
12408  // autoplay functions
12409  function setAutoplayTimer () {
12410    autoplayTimer = setInterval(function () {
12411      onControlsClick(null, autoplayDirection);
12412    }, autoplayTimeout);
12413
12414    animating = true;
12415  }
12416
12417  function stopAutoplayTimer () {
12418    clearInterval(autoplayTimer);
12419    animating = false;
12420  }
12421
12422  function updateAutoplayButton (action, txt) {
12423    Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': action});
12424    autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt;
12425  }
12426
12427  function startAutoplay () {
12428    setAutoplayTimer();
12429    if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); }
12430  }
12431
12432  function stopAutoplay () {
12433    stopAutoplayTimer();
12434    if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); }
12435  }
12436
12437  // programaitcally play/pause the slider
12438  function play () {
12439    if (autoplay && !animating) {
12440      startAutoplay();
12441      autoplayUserPaused = false;
12442    }
12443  }
12444  function pause () {
12445    if (animating) {
12446      stopAutoplay();
12447      autoplayUserPaused = true;
12448    }
12449  }
12450
12451  function toggleAutoplay () {
12452    if (animating) {
12453      stopAutoplay();
12454      autoplayUserPaused = true;
12455    } else {
12456      startAutoplay();
12457      autoplayUserPaused = false;
12458    }
12459  }
12460
12461  function onVisibilityChange () {
12462    if (doc.hidden) {
12463      if (animating) {
12464        stopAutoplayTimer();
12465        autoplayVisibilityPaused = true;
12466      }
12467    } else if (autoplayVisibilityPaused) {
12468      setAutoplayTimer();
12469      autoplayVisibilityPaused = false;
12470    }
12471  }
12472
12473  function mouseoverPause () {
12474    if (animating) {
12475      stopAutoplayTimer();
12476      autoplayHoverPaused = true;
12477    }
12478  }
12479
12480  function mouseoutRestart () {
12481    if (autoplayHoverPaused) {
12482      setAutoplayTimer();
12483      autoplayHoverPaused = false;
12484    }
12485  }
12486
12487  // keydown events on document
12488  function onDocumentKeydown (e) {
12489    e = getEvent(e);
12490    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
12491
12492    if (keyIndex >= 0) {
12493      onControlsClick(e, keyIndex === 0 ? -1 : 1);
12494    }
12495  }
12496
12497  // on key control
12498  function onControlsKeydown (e) {
12499    e = getEvent(e);
12500    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
12501
12502    if (keyIndex >= 0) {
12503      if (keyIndex === 0) {
12504        if (!prevButton.disabled) { onControlsClick(e, -1); }
12505      } else if (!nextButton.disabled) {
12506        onControlsClick(e, 1);
12507      }
12508    }
12509  }
12510
12511  // set focus
12512  function setFocus (el) {
12513    el.focus();
12514  }
12515
12516  // on key nav
12517  function onNavKeydown (e) {
12518    e = getEvent(e);
12519    var curElement = doc.activeElement;
12520    if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(curElement, 'data-nav')) { return; }
12521
12522    // var code = e.keyCode,
12523    var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode),
12524        navIndex = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(curElement, 'data-nav'));
12525
12526    if (keyIndex >= 0) {
12527      if (keyIndex === 0) {
12528        if (navIndex > 0) { setFocus(navItems[navIndex - 1]); }
12529      } else if (keyIndex === 1) {
12530        if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); }
12531      } else {
12532        navClicked = navIndex;
12533        goTo(navIndex, e);
12534      }
12535    }
12536  }
12537
12538  function getEvent (e) {
12539    e = e || win.event;
12540    return isTouchEvent(e) ? e.changedTouches[0] : e;
12541  }
12542  function getTarget (e) {
12543    return e.target || win.event.srcElement;
12544  }
12545
12546  function isTouchEvent (e) {
12547    return e.type.indexOf('touch') >= 0;
12548  }
12549
12550  function preventDefaultBehavior (e) {
12551    e.preventDefault ? e.preventDefault() : e.returnValue = false;
12552  }
12553
12554  function getMoveDirectionExpected () {
12555    return Object(_helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__["getTouchDirection"])(Object(_helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__["toDegree"])(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis;
12556  }
12557
12558  function onPanStart (e) {
12559    if (running) {
12560      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
12561    }
12562
12563    if (autoplay && animating) { stopAutoplayTimer(); }
12564
12565    panStart = true;
12566    if (rafIndex) {
12567      Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
12568      rafIndex = null;
12569    }
12570
12571    var $ = getEvent(e);
12572    events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e));
12573
12574    if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) {
12575      preventDefaultBehavior(e);
12576    }
12577
12578    lastPosition.x = initPosition.x = $.clientX;
12579    lastPosition.y = initPosition.y = $.clientY;
12580    if (carousel) {
12581      translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, ''));
12582      resetDuration(container, '0s');
12583    }
12584  }
12585
12586  function onPanMove (e) {
12587    if (panStart) {
12588      var $ = getEvent(e);
12589      lastPosition.x = $.clientX;
12590      lastPosition.y = $.clientY;
12591
12592      if (carousel) {
12593        if (!rafIndex) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
12594      } else {
12595        if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
12596        if (moveDirectionExpected) { preventScroll = true; }
12597      }
12598
12599      if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) {
12600        e.preventDefault();
12601      }
12602    }
12603  }
12604
12605  function panUpdate (e) {
12606    if (!moveDirectionExpected) {
12607      panStart = false;
12608      return;
12609    }
12610    Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
12611    if (panStart) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
12612
12613    if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
12614    if (moveDirectionExpected) {
12615      if (!preventScroll && isTouchEvent(e)) { preventScroll = true; }
12616
12617      try {
12618        if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); }
12619      } catch(err) {}
12620
12621      var x = translateInit,
12622          dist = getDist(lastPosition, initPosition);
12623      if (!horizontal || fixedWidth || autoWidth) {
12624        x += dist;
12625        x += 'px';
12626      } else {
12627        var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter);
12628        x += percentageX;
12629        x += '%';
12630      }
12631
12632      container.style[transformAttr] = transformPrefix + x + transformPostfix;
12633    }
12634  }
12635
12636  function onPanEnd (e) {
12637    if (panStart) {
12638      if (rafIndex) {
12639        Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
12640        rafIndex = null;
12641      }
12642      if (carousel) { resetDuration(container, ''); }
12643      panStart = false;
12644
12645      var $ = getEvent(e);
12646      lastPosition.x = $.clientX;
12647      lastPosition.y = $.clientY;
12648      var dist = getDist(lastPosition, initPosition);
12649
12650      if (Math.abs(dist)) {
12651        // drag vs click
12652        if (!isTouchEvent(e)) {
12653          // prevent "click"
12654          var target = getTarget(e);
12655          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(target, {'click': function preventClick (e) {
12656            preventDefaultBehavior(e);
12657            Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(target, {'click': preventClick});
12658          }});
12659        }
12660
12661        if (carousel) {
12662          rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function() {
12663            if (horizontal && !autoWidth) {
12664              var indexMoved = - dist * items / (viewport + gutter);
12665              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
12666              index += indexMoved;
12667            } else {
12668              var moved = - (translateInit + dist);
12669              if (moved <= 0) {
12670                index = indexMin;
12671              } else if (moved >= slidePositions[slideCountNew - 1]) {
12672                index = indexMax;
12673              } else {
12674                var i = 0;
12675                while (i < slideCountNew && moved >= slidePositions[i]) {
12676                  index = i;
12677                  if (moved > slidePositions[i] && dist < 0) { index += 1; }
12678                  i++;
12679                }
12680              }
12681            }
12682
12683            render(e, dist);
12684            events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e));
12685          });
12686        } else {
12687          if (moveDirectionExpected) {
12688            onControlsClick(e, dist > 0 ? -1 : 1);
12689          }
12690        }
12691      }
12692    }
12693
12694    // reset
12695    if (options.preventScrollOnTouch === 'auto') { preventScroll = false; }
12696    if (swipeAngle) { moveDirectionExpected = '?'; }
12697    if (autoplay && !animating) { setAutoplayTimer(); }
12698  }
12699
12700  // === RESIZE FUNCTIONS === //
12701  // (slidePositions, index, items) => vertical_conentWrapper.height
12702  function updateContentWrapperHeight () {
12703    var wp = middleWrapper ? middleWrapper : innerWrapper;
12704    wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px';
12705  }
12706
12707  function getPages () {
12708    var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items;
12709    return Math.min(Math.ceil(rough), slideCount);
12710  }
12711
12712  /*
12713   * 1. update visible nav items list
12714   * 2. add "hidden" attributes to previous visible nav items
12715   * 3. remove "hidden" attrubutes to new visible nav items
12716   */
12717  function updateNavVisibility () {
12718    if (!nav || navAsThumbnails) { return; }
12719
12720    if (pages !== pagesCached) {
12721      var min = pagesCached,
12722          max = pages,
12723          fn = _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"];
12724
12725      if (pagesCached > pages) {
12726        min = pages;
12727        max = pagesCached;
12728        fn = _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"];
12729      }
12730
12731      while (min < max) {
12732        fn(navItems[min]);
12733        min++;
12734      }
12735
12736      // cache pages
12737      pagesCached = pages;
12738    }
12739  }
12740
12741  function info (e) {
12742    return {
12743      container: container,
12744      slideItems: slideItems,
12745      navContainer: navContainer,
12746      navItems: navItems,
12747      controlsContainer: controlsContainer,
12748      hasControls: hasControls,
12749      prevButton: prevButton,
12750      nextButton: nextButton,
12751      items: items,
12752      slideBy: slideBy,
12753      cloneCount: cloneCount,
12754      slideCount: slideCount,
12755      slideCountNew: slideCountNew,
12756      index: index,
12757      indexCached: indexCached,
12758      displayIndex: getCurrentSlide(),
12759      navCurrentIndex: navCurrentIndex,
12760      navCurrentIndexCached: navCurrentIndexCached,
12761      pages: pages,
12762      pagesCached: pagesCached,
12763      sheet: sheet,
12764      isOn: isOn,
12765      event: e || {},
12766    };
12767  }
12768
12769  return {
12770    version: '2.9.3',
12771    getInfo: info,
12772    events: events,
12773    goTo: goTo,
12774    play: play,
12775    pause: pause,
12776    isOn: isOn,
12777    updateSliderHeight: updateInnerWrapperHeight,
12778    refresh: initSliderTransform,
12779    destroy: destroy,
12780    rebuild: function() {
12781      return tns(Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, optionsElements));
12782    }
12783  };
12784};
12785
12786
12787/***/ }),
12788
12789/***/ "./src/components/heroes/heroes.js":
12790/*!*****************************************!*\
12791  !*** ./src/components/heroes/heroes.js ***!
12792  \*****************************************/
12793/*! no exports provided */
12794/***/ (function(module, __webpack_exports__, __webpack_require__) {
12795
12796"use strict";
12797__webpack_require__.r(__webpack_exports__);
12798/* harmony import */ var _js_main_script__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../js/main.script */ "./src/js/main.script.js");
12799
12800
12801
12802
12803(function ($, Drupal) {
12804  $(document).ready(function () {// const tnsCarouselPrimary = document.querySelectorAll('.heroes-primary');
12805    // tnsCarouselPrimary.forEach(slider => {
12806    //   // if( $('.heroes-primary .heroes__item').length > 1) {
12807    //     const heroes_primary__slider = tns({
12808    //       container: slider.querySelector(".heroes__row"),
12809    //       controlsContainer: slider.querySelector(".tns__controls"),
12810    //       navContainer: slider.querySelector(".tns__dots"),
12811    //       prevButton: slider.querySelector(".tns__arrow.prev"),
12812    //       nextButton: slider.querySelector(".tns__arrow.next"),
12813    //       navPosition: 'top',
12814    //       gutter: 1,
12815    //
12816    //       onInit(info) {
12817    //         $('.path-home .heroes-primary .heroes').css("display","flex");
12818    //
12819    //         if( $(info).find('.heroes__item').length > 1) {
12820    //
12821    //           info.controlsContainer.setAttribute('tabindex', -1);
12822    //           info.nextButton.setAttribute('tabindex', 3);
12823    //           info.prevButton.setAttribute('tabindex', 3);
12824    //
12825    //           document.querySelectorAll('.tns-slide-cloned a').forEach(function(btn) {
12826    //             btn.setAttribute('tabindex', -1);
12827    //           });
12828    //         }
12829    //       }
12830    //
12831    //     });
12832    //   // }
12833    // });
12834    // // if( $('.heroes-secondary .heroes__item').length > 1) {
12835    // const tnsCarouselSecondary = document.querySelectorAll('.heroes-secondary');
12836    // tnsCarouselSecondary.forEach(slider => {
12837    //   const heroes_secondary__slider = tns({
12838    //     container: slider.querySelector(".heroes__row"),
12839    //     controlsContainer: slider.querySelector(".tns__controls"),
12840    //     navContainer: slider.querySelector(".tns__dots"),
12841    //     prevButton: slider.querySelector(".tns__arrow.prev"),
12842    //     nextButton: slider.querySelector(".tns__arrow.next"),
12843    //     navPosition: 'top',
12844    //
12845    //     onInit(info) {
12846    //       info.controlsContainer.setAttribute('tabindex', -1);
12847    //       info.nextButton.setAttribute('tabindex', 3);
12848    //       info.prevButton.setAttribute('tabindex', 3);
12849    //
12850    //       document.querySelectorAll('.tns-slide-cloned a').forEach(function(btn) {
12851    //         btn.setAttribute('tabindex', -1);
12852    //       });
12853    //     }
12854    //   });
12855    // // }
12856    // });
12857  });
12858})(jQuery, Drupal);
12859
12860/***/ }),
12861
12862/***/ "./src/js/main.script.js":
12863/*!*******************************!*\
12864  !*** ./src/js/main.script.js ***!
12865  \*******************************/
12866/*! exports provided: tns */
12867/***/ (function(module, __webpack_exports__, __webpack_require__) {
12868
12869"use strict";
12870__webpack_require__.r(__webpack_exports__);
12871/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill */ "./src/js/polyfill.js");
12872/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_polyfill__WEBPACK_IMPORTED_MODULE_0__);
12873/* harmony import */ var _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/tiny-slider/src/tiny-slider */ "./node_modules/tiny-slider/src/tiny-slider.js");
12874/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__["tns"]; });
12875
12876
12877
12878 // import 'bootstrap';
12879
12880
12881
12882
12883(function ($, Drupal, drupalSettings) {
12884  // Responsive check helper:
12885  // USAGE: if (Drupal.device.isMobile()) {}
12886  Drupal.device = {
12887    isDesktop: function isDesktop() {
12888      return $(window).innerWidth() > 980;
12889    },
12890    isTablet: function isTablet() {
12891      return $(window).innerWidth() <= 980 && $(window).innerWidth() > 728;
12892    },
12893    isMobile: function isMobile() {
12894      return $(window).innerWidth() <= 728;
12895    }
12896  };
12897  setTimeout(function () {
12898    $("#where-to-buy .wtb-title .more-link a").addClass("btn btn-primary");
12899  }, 1000); // Let the document know when the mouse is being used
12900
12901  document.body.addEventListener("mousedown", function () {
12902    document.body.classList.add("using-mouse");
12903  }); // Re-enable focus styling when Tab is pressed
12904
12905  document.body.addEventListener("keydown", function (event) {
12906    if (event.keyCode === 9) {
12907      document.body.classList.remove("using-mouse");
12908    }
12909  });
12910  $(".webform-email").attr("autocomplete", "email");
12911  $(".webform-email-confirm").attr("autocomplete", "email-confirm");
12912  $("#ajax-wrapper .js-form-item-image-upload small #edit-image-upload--description").append("<small> No file chosen.</small>");
12913  Drupal.behaviors.Bc_brandTheme = {
12914    attach: function attach(context, settings) {
12915      var host = window.location.host;
12916      $('a[href^="http"]:not([href*="' + host + '"])').each(function (index) {
12917        $(this).attr("rel", "noopener nofollow");
12918      });
12919      $('[data-toggle="popover"]').each(function (index) {
12920        var $this = $(this);
12921        var $container = $this.closest("div");
12922        $container.addClass("has-popover");
12923        $this.appendTo($container);
12924        $this.popover({
12925          template: '<div class="popover" role="tooltip"><div class="popover-body"></div></div>',
12926          container: $container
12927        });
12928      });
12929      $(".webform-submission-newsletter-form-form .form-item-postal-code input").inputmask({
12930        mask: ["99999", "99999-9999", "A9A 9A9"],
12931        placeholder: "",
12932        clearIncomplete: true
12933      }); // let optionsRegion = $('#region-select').html();
12934      // console.log("options",  optionsRegion);
12935      // $('#region-select-footer').append(optionsRegion);
12936      // tns carousel remove tabindex.
12937      // $('.tns-carousel > .tns-item').removeAttr('tabindex', 'aria-hidden');
12938
12939      /**
12940       * SHARE COMPONENT
12941       */
12942
12943      /**
12944       * Determine the mobile operating system.
12945       * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
12946       * Based on: https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system
12947       * @returns {String}
12948       */
12949
12950      function isAndroidIOS() {
12951        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
12952
12953        if (/android/i.test(userAgent)) {
12954          console.log("android detected");
12955          return true;
12956        } // iOS detection from: http://stackoverflow.com/a/9039885/177710
12957
12958
12959        if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
12960          console.log("ios detected");
12961          return true;
12962        } //not Android or iOS
12963
12964
12965        return false;
12966      }
12967
12968      function getMeta(metaName) {
12969        var metas = document.getElementsByTagName("meta");
12970
12971        for (var i = 0; i < metas.length; i++) {
12972          if (metas[i].getAttribute("name") === metaName) {
12973            return metas[i].getAttribute("content");
12974          }
12975        }
12976
12977        return "";
12978      }
12979
12980      $(".share-button", context).on("click", function () {
12981        var isMobile = isAndroidIOS();
12982        console.log(isMobile);
12983
12984        if (navigator.share && isMobile) {
12985          navigator.share({
12986            title: document.title,
12987            text: getMeta("description"),
12988            url: document.href
12989          }).then(function () {
12990            return console.log("Successful share");
12991          })["catch"](function (error) {
12992            return console.log("Error sharing", error);
12993          });
12994          return null;
12995        }
12996
12997        $(this).toggleClass("opened"); // $(this).find('.icon').toggleClass('icon-share-close icon-share');
12998
12999        $(".sharebox").toggleClass("opened");
13000
13001        if ($(this).hasClass("opened")) {
13002          $(this).attr("aria-expanded", "true");
13003        } else {
13004          $(this).attr("aria-expanded", "false");
13005        } // $('.sharebox .close').focus();
13006
13007      }); // $('.sharebox .close').on('click', function () {
13008      //   $(this).parents('.opened').removeClass('opened');
13009      // });
13010
13011      var $temp = $("<input>");
13012      var $url = $(location).attr("href");
13013      $(".sharebox .copybutton").on("click", function () {
13014        // $('.copyfield input')[0].select();
13015        // document.execCommand('copy');
13016        $("body").append($temp);
13017        $temp.val($url).select();
13018        document.execCommand("copy");
13019        $temp.remove();
13020        $(".copyfield .copymessage").addClass("shown");
13021        setTimeout(function () {
13022          $(".copyfield .copymessage").removeClass("shown");
13023        }, 10000);
13024      });
13025      $("#navbar .navbar-brand", context).attr("tabindex", "0"); //Change Element type
13026
13027      $.fn.changeElementType = function (newType) {
13028        this.each(function () {
13029          var attrs = {};
13030          $.each(this.attributes, function (idx, attr) {
13031            attrs[attr.nodeName] = attr.nodeValue;
13032          });
13033          $(this).replaceWith(function () {
13034            return $("<" + newType + "/>", attrs).append($(this).contents());
13035          });
13036        });
13037      }; // $(".juicer-feed .slick-list .slick-track").changeElementType("ul");
13038      // $(".juicer-feed").changeElementType("div");
13039      // Detect Valid Keyboard Clicks
13040      // https://karlgroves.com/2014/11/24/ridiculously-easy-trick-for-keyboard-accessibility
13041
13042
13043      function a11yClick(event) {
13044        if (event.type === "click") {
13045          return true;
13046        } else if (event.type === "keypress") {
13047          var code = event.charCode || event.keyCode;
13048
13049          if (code === 32 || code === 13) {
13050            return true;
13051          }
13052        } else {
13053          return false;
13054        }
13055      } // Juicer/Slick accessibility tweaks.
13056      // $("#block-juiceren .juicer-feed").changeElementType("div");
13057      // $(".j-overlay .j-close span").html('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
13058
13059
13060      $("#block-juiceren .juicer-feed").on("init", function (e, slick) {
13061        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active");
13062        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
13063        setTimeout(function () {
13064          // Set slick's accessibility option to false as recommended here:
13065          // https://hub.accessible360.com/kb/articles/521#heading-tip-3-disable-accessibility-mode
13066          if ($("#block-juiceren .juicer-feed").hasClass("slick-initialized")) {
13067            $("#block-juiceren .juicer-feed.slick-initialized").slick("slickSetOption", {
13068              accessibility: false
13069            }, true);
13070          }
13071
13072          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
13073        }, 1000);
13074        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text a").removeAttr("tabindex").css("color", "white").changeElementType("span");
13075        $("#block-juiceren .juicer-feed .slick-list").find(".slick-track .feed-item").attr("role", "group");
13076        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text .j-meta nav").addClass("j-meta-nav").changeElementType("div");
13077        $("#block-juiceren .juicer-feed .slick-list .feed-item").on("click", function () {
13078          window.open($(this).find("a").attr("href")); // console.log('test');
13079
13080          return false;
13081        }); // Play icon.
13082
13083        var $imageVideo = $("#block-juiceren .juicer-feed .slick-list .feed-item.j-video .j-image");
13084        var playIcon = '<span class="j-video-icon" aria-hidden="true"></span>';
13085        $imageVideo.append(playIcon);
13086        $("#block-juiceren .juicer-feed .slick-list .feed-item", context).each(function (i, e) {
13087          var alt = $(e).find(".j-image img").attr("alt"),
13088              message = $(e).find(".j-message").text(),
13089              label = Number($(e).attr("data-slick-index")) + 1,
13090              totalSlide = $("#block-juiceren .juicer-feed .slick-list .feed-item").length;
13091          $(e).attr({
13092            "aria-label": "Slide " + label + " of " + totalSlide
13093          }); // if (alt) {
13094          // $(e).find(".j-image img").attr("alt", alt.replace('Photo from ', ''));
13095          // }
13096
13097          $(e).find(".j-image img").attr("alt", message); // Social icon screen reader text.
13098
13099          var $social = $(this).find(".j-social");
13100          var socialIcon = '<span class="j-social-icon" aria-hidden="true"></span> <span class="sr-only">' + $social.attr("aria-label") + "</span>";
13101          $social.append(socialIcon).removeAttr("aria-label");
13102        });
13103        $(".slick-next, .slick-prev").on("click keypress", function (event) {
13104          if (a11yClick(event) === true) {
13105            setTimeout(function () {
13106              $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active a").first().focus();
13107            }, 100);
13108          }
13109        }); //update all j-meta a tags to say comments or likes
13110
13111        $(".comments, .repins").each(function () {
13112          var numComments = $(this).text();
13113          $(this).html(numComments + ' <span class="sr-only">comments</div>');
13114        });
13115        $(".likes").each(function () {
13116          var numLikes = $(this).text();
13117          $(this).html(numLikes + ' <span class="sr-only">likes</div>');
13118        });
13119      });
13120      $("#block-juiceren .juicer-feed").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
13121        $("#block-juiceren .juicer-feed .slick-list .feed-item").removeAttr("aria-hidden");
13122      });
13123      $("#block-juiceren .juicer-feed").on("afterChange", function (e, slick, currentSlide) {
13124        setTimeout(function () {
13125          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
13126        }, 500);
13127      });
13128
13129      if ($("#prodH1").length > 0) {
13130        var root = document.getElementById("prodH1");
13131        root.style.setProperty("--h1-height", root.clientHeight + "px");
13132        $(".products--full").addClass("loaded");
13133        console.log("root.clientHeight", root.clientHeight);
13134      }
13135    }
13136  };
13137  setTimeout(function () {
13138    $(".path-sitemap .field-title a, .path-plan-du-site .field-title a").each(function () {
13139      var $this = $(this),
13140          content = $this.text().replace(/&#174;/g, "®").replace(/&#174/g, "®").replace(/&#127338;/g, "🅪").replace(/&#127339;/g, "🅫").replace(/&#8482;/g, "™");
13141      $this.text(content);
13142    });
13143    $(".j-overlay .j-close").append('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
13144  }, 100); // if ($("img[alt]").text === "[mtools:empty]") {
13145  //   console.log("origAlt");
13146  // }
13147
13148  $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
13149
13150  Drupal.behaviors.gameSliderControls = {
13151    attach: function attach(context, settings) {
13152      if ($(".game-slider").length > 0) {
13153        $(".game-slider .tns-controls").removeAttr("aria-label");
13154        $(".game-slider .tns-controls").removeAttr("tabindex");
13155        $(".game-slider__next").attr("tabindex", "0");
13156      }
13157    }
13158  }; //on click of "esc" key it closes the modal popup
13159
13160  $(document).on("keydown", function (event) {
13161    if ($("body").hasClass("mm-ocd-opened")) {
13162      if (event.key === "Escape" || event.key == "Esc") {
13163        $("#main-menu-button-close").click();
13164      }
13165    }
13166  });
13167
13168  function modalTabLock() {
13169    //Prevent Shift + Tab to focus outside of the Modal
13170    $(".page__header input, .page__header .btn").on("keydown", function (e) {
13171      if (e.which === 9 && e.shiftKey) {
13172        setTimeout(function () {
13173          $(".navbar-actions .icon-search").focus();
13174        }, 10);
13175      }
13176    }); //Prevent Tab to focus outside of the Modal
13177
13178    $(".page__header .btn").on("keydown", function (e) {
13179      if (e.which === 9 && !e.shiftKey) {
13180        e.preventDefault();
13181        setTimeout(function () {
13182          $(".navbar-actions .icon-search").focus();
13183        }, 10);
13184      }
13185    });
13186  }
13187
13188  setTimeout(function () {
13189    modalTabLock();
13190  }, 100);
13191  Drupal.behaviors.imageAlt = {
13192    attach: function attach(context, settings) {
13193      $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt='[mtools:empty]'").attr("alt", "");
13194      // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
13195      // var altText = $("img").getAttribute("alt");
13196      // if($("img").attr("alt") === "[mtools:empty]") {
13197      //   $(this).attr("alt", "");
13198      // }
13199
13200      $('img[alt="[mtools:empty]"]').each(function () {
13201        // `this` is the div
13202        $(this).attr("alt", "");
13203      });
13204    }
13205  };
13206})(jQuery, Drupal, drupalSettings);
13207
13208/***/ }),
13209
vendor: 4,318 bytes, lines 13210-13321
13210/***/ "./src/js/polyfill.js":
13211/*!****************************!*\
13212  !*** ./src/js/polyfill.js ***!
13213  \****************************/
13214/*! no static exports found */
13215/***/ (function(module, exports) {
13216
13217// Add your JS/node package pollyfills here
13218
13219/***/ }),
13220
13221/***/ 11:
13222/*!***********************************************!*\
13223  !*** multi ./src/components/heroes/heroes.js ***!
13224  \***********************************************/
13225/*! no static exports found */
13226/***/ (function(module, exports, __webpack_require__) {
13227
13228module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/heroes/heroes.js */"./src/components/heroes/heroes.js");
13229
13230
13231/***/ })
13232
13233/******/ });;
13234/******/ (function(modules) { // webpackBootstrap
13235/******/ 	// The module cache
13236/******/ 	var installedModules = {};
13237/******/
13238/******/ 	// The require function
13239/******/ 	function __webpack_require__(moduleId) {
13240/******/
13241/******/ 		// Check if module is in cache
13242/******/ 		if(installedModules[moduleId]) {
13243/******/ 			return installedModules[moduleId].exports;
13244/******/ 		}
13245/******/ 		// Create a new module (and put it into the cache)
13246/******/ 		var module = installedModules[moduleId] = {
13247/******/ 			i: moduleId,
13248/******/ 			l: false,
13249/******/ 			exports: {}
13250/******/ 		};
13251/******/
13252/******/ 		// Execute the module function
13253/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
13254/******/
13255/******/ 		// Flag the module as loaded
13256/******/ 		module.l = true;
13257/******/
13258/******/ 		// Return the exports of the module
13259/******/ 		return module.exports;
13260/******/ 	}
13261/******/
13262/******/
13263/******/ 	// expose the modules object (__webpack_modules__)
13264/******/ 	__webpack_require__.m = modules;
13265/******/
13266/******/ 	// expose the module cache
13267/******/ 	__webpack_require__.c = installedModules;
13268/******/
13269/******/ 	// define getter function for harmony exports
13270/******/ 	__webpack_require__.d = function(exports, name, getter) {
13271/******/ 		if(!__webpack_require__.o(exports, name)) {
13272/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
13273/******/ 		}
13274/******/ 	};
13275/******/
13276/******/ 	// define __esModule on exports
13277/******/ 	__webpack_require__.r = function(exports) {
13278/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13279/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13280/******/ 		}
13281/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
13282/******/ 	};
13283/******/
13284/******/ 	// create a fake namespace object
13285/******/ 	// mode & 1: value is a module id, require it
13286/******/ 	// mode & 2: merge all properties of value into the ns
13287/******/ 	// mode & 4: return value when already ns object
13288/******/ 	// mode & 8|1: behave like require
13289/******/ 	__webpack_require__.t = function(value, mode) {
13290/******/ 		if(mode & 1) value = __webpack_require__(value);
13291/******/ 		if(mode & 8) return value;
13292/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
13293/******/ 		var ns = Object.create(null);
13294/******/ 		__webpack_require__.r(ns);
13295/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
13296/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
13297/******/ 		return ns;
13298/******/ 	};
13299/******/
13300/******/ 	// getDefaultExport function for compatibility with non-harmony modules
13301/******/ 	__webpack_require__.n = function(module) {
13302/******/ 		var getter = module && module.__esModule ?
13303/******/ 			function getDefault() { return module['default']; } :
13304/******/ 			function getModuleExports() { return module; };
13305/******/ 		__webpack_require__.d(getter, 'a', getter);
13306/******/ 		return getter;
13307/******/ 	};
13308/******/
13309/******/ 	// Object.prototype.hasOwnProperty.call
13310/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
13311/******/
13312/******/ 	// __webpack_public_path__
13313/******/ 	__webpack_require__.p = "/";
13314/******/
13315/******/
13316/******/ 	// Load entry module and return exports
13317/******/ 	return __webpack_require__(__webpack_require__.s = 10);
13318/******/ })
13319/************************************************************************/
13320/******/ ({
13321
13322/***/ "./src/components/header/header.js":
13323/*!*****************************************!*\
13324  !*** ./src/components/header/header.js ***!
13325  \*****************************************/
13326/*! no static exports found */
13327/***/ (function(module, exports, __webpack_require__) {
13328
13329"use strict";
13330
13331
13332(function ($, Drupal) {
13333  var valueTerm = $("#term");
13334  var searchToggle = false;
13335  var w = window.innerWidth;
13336  var $form = $(".search__header form"); //array of view names included in search
13337
13338  var searchViews = ["search_products", // "search_recipes",
13339  // "search_blog",
13340  "search_basic_pages"]; //focus trap
13341
13342  function focusTrap(trapSelector) {
13343    console.log('FOCUS TRAP RUNNING'); // Focus Trap: Causes the tab key to loop focus within the given selector.
13344
13345    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden), [tabindex]:not([tabindex="-1"])'; // All focusable elements
13346
13347    document.addEventListener('keydown', function (e) {
13348      var trap = document.querySelector(trapSelector); // If the key pressed is not 'Tab' or the trap element is not present: do nothing
13349
13350      var isTabPressed = e.key === 'Tab' || e.keyCode === 9;
13351
13352      if (!isTabPressed || !trap) {
13353        return;
13354      }
13355
13356      var focusableContent = trap.querySelectorAll(focusableElements),
13357          firstFocusableElement = focusableContent[0],
13358          // first focusable element
13359      lastFocusableElement = focusableContent[focusableContent.length - 1]; // last focusable element
13360
13361      if (e.shiftKey) {
13362        // if shift + tab on first element, focus the last focusable element
13363        if (document.activeElement === firstFocusableElement) {
13364          lastFocusableElement.focus(); //
13365
13366          e.preventDefault();
13367        }
13368      } else {
13369        // if tab on last element, focus the first focusable element
13370        if (document.activeElement === lastFocusableElement) {
13371          firstFocusableElement.focus();
13372          e.preventDefault();
13373        }
13374      }
13375
13376      console.log('FOCASABLE ', lastFocusableElement);
13377    });
13378  } // focusTrap('#search-container');
13379  // =======================================================================================
13380  // Hide Background from Screen Readers
13381  // =======================================================================================
13382
13383
13384  function hideModalBG(e) {
13385    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden), [tabindex]:not([tabindex="-1"])'; // All focusable elements
13386
13387    var modalElements = $(e).find(focusableElements); //on show  
13388
13389    $("body > *").not(e).each(function () {
13390      var ariaHidden = $(this).attr("aria-hidden");
13391
13392      if (typeof ariaHidden == "undefined") {
13393        ariaHidden = "false";
13394      }
13395
13396      ;
13397      $(this).attr("data-aria-hidden", ariaHidden);
13398    });
13399    $("body > *").not(e).attr("aria-hidden", true);
13400    $("body").find(focusableElements).not(e).each(function () {
13401      var eTabIndex = $(this).attr("tabindex");
13402      console.log('data-tabindex', eTabIndex);
13403
13404      if (typeof eTabIndex == "undefined") {
13405        eTabIndex = 0;
13406      }
13407
13408      ;
13409      $(this).attr("data-tabindex", eTabIndex);
13410    });
13411    $("body").find(focusableElements).not(modalElements).attr("tabindex", '-1');
13412    console.log('HIDE MODAL BG RUNS');
13413  }
13414
13415  ;
13416
13417  function showModalBG(e) {
13418    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden)'; // All focusable elements
13419    //on hide    
13420
13421    $("body > *").each(function (index, el) {
13422      var ariaHidden = $(el).attr("data-aria-hidden");
13423
13424      if (ariaHidden == "false") {
13425        $(el).removeAttr("aria-hidden");
13426      } else {
13427        $(el).attr("aria-hidden", ariaHidden);
13428      }
13429    });
13430    $("body > *").removeAttr("data-aria-hidden");
13431    $("body").find(focusableElements).each(function (index, el) {
13432      var eTabIndex = $(el).attr("data-tabindex");
13433      console.log('TABINDEX', eTabIndex);
13434
13435      if (eTabIndex == 0) {
13436        $(el).removeAttr("tabindex");
13437      } else {
13438        $(el).attr("tabindex", eTabIndex);
13439      }
13440    });
13441    $("body").find(focusableElements).removeAttr("data-tabindex");
13442    console.log('SHOW MODAL BG RUNS');
13443  }
13444
13445  Drupal.behaviors.searchSubmit = {
13446    attach: function attach(context, settings) {
13447      if (context.nodeType) {
13448        once('searchSubmit', '.search__header form', context).forEach(function (element) {
13449          // search - submit
13450          $(".search__header form").on("submit", function (e) {
13451            //$(".search__header .submit", context).on("click", function (e) {
13452            e.preventDefault(); //console.log($form.get(0).reportValidity());
13453
13454            var $form = $(this);
13455
13456            if ($form.get(0).reportValidity()) {
13457              var url = new URL(window.location);
13458              var userSearchTerm = $("#term").val(); // console.log(userSearchTerm);
13459
13460              url.searchParams.set("term", userSearchTerm); // console.log("url", url);
13461
13462              window.history.replaceState({}, "", url);
13463            }
13464          });
13465        });
13466      } else {
13467        console.log("not a node", context);
13468      }
13469    }
13470  };
13471  Drupal.behaviors.header = {
13472    attach: function attach(context, settings) {
13473      //only attach once
13474      //https://www.lullabot.com/articles/understanding-javascript-behaviors-in-drupal
13475      //https://drupal.stackexchange.com/questions/244492/jquery-once-onload
13476      $("main .page__header").removeClass("page__header").addClass("page__header-outer"); // $("#search__container").attr("aria-hidden", "true");
13477      // $(
13478      //   ".search__header button, .search__header a, .search__header input"
13479      // ).attr("tabindex", "-1");
13480      // $('.page__header', context).once('search-controls').each(function () {
13481
13482      $(context).find(".navbar-actions").once("search-controls").each(function (context) {
13483        // console.log("attach search-controls");
13484        var clearButton = $(".clear", context); //open search
13485        // console.log($('.navbar-actions .icon', context));
13486
13487        $(this).find(".icon-search").on("click", function (e) {
13488          e.preventDefault();
13489          Drupal.behaviors.header.toggleSearch(context); // console.log('toggle search');
13490
13491          var $headerContainer = $("#search-container");
13492          var $headerInputs = $(".search__header button, .search__header a, .search__header input");
13493
13494          if ($headerContainer.attr("aria-hidden")) {
13495            $headerContainer.removeAttr("aria-hidden");
13496            $headerContainer.removeClass('d-none');
13497            $headerInputs.removeAttr("tabindex");
13498            $('.page__content').attr('inert', true); // $('#navbar').attr('inert', true);
13499
13500            $('#navbar-top').attr('inert', true);
13501            $('#block-bc-brand-sitebranding').attr('inert', true);
13502            $('#main-menu .main-menu').attr('inert', true);
13503            $('#main-content').attr('inert', true);
13504            $('.skip-link').attr('inert', true);
13505            $('.footer').attr('inert', true);
13506            $('#search-container #term').focus();
13507          } else {
13508            $headerContainer.attr("aria-hidden", "true");
13509            $headerContainer.addClass('d-none');
13510            $headerInputs.attr("tabindex", "-1");
13511            $('.page__content').removeAttr('inert'); // $('#navbar').removeAttr('inert');
13512
13513            $('#navbar-top').removeAttr('inert');
13514            $('#block-bc-brand-sitebranding').removeAttr('inert');
13515            $('#main-menu .main-menu').removeAttr('inert');
13516            $('.footer').removeAttr('inert');
13517            $('.skip-link').removeAttr('inert');
13518            $('.footer').removeAttr('inert');
13519            $('#main-menu .navbar-actions .icon-search').focus();
13520          }
13521        });
13522        $(".we-mega-menu-li", context).on("mousedown", function (e) {
13523          if (searchToggle) Drupal.behaviors.header.toggleSearch(context);
13524        });
13525        $(window).resize(function () {
13526          var btnCloseMenu = $(".btn-close");
13527
13528          if (w != window.innerWidth && window.innerWidth <= 991) {
13529            $("body").removeClass("page__header--active");
13530            $("body").removeClass("toggled");
13531            $(".navbar-we-mega-menu").removeClass("we-mobile-megamenu-active has-cl
13531icked");
13532            $(".we-mega-menu-submenu").removeAttr("style");
13533            btnCloseMenu.removeClass("d-none");
13534            searchToggle = false; // $('.navbar-actions .icon-search').attr('aria-expanded', 'false');
13535          }
13536        });
13537        $("#main-menu-button").click(function () {
13538          $("body").removeClass("page__header--active"); // console.log("menu open");
13539        });
13540        valueTerm.on("input", function () {
13541          // console.log($(this).val());
13542          if ($(this).val() == "") {
13543            clearButton.removeClass("d-inline-flex");
13544          } else {
13545            clearButton.addClass("d-inline-flex");
13546          }
13547        }); //search navigation
13548
13549        $(".search-results-filter button").click(function () {
13550          // console.log('test');
13551          $(".search-results-filter button").attr("aria-pressed", "false");
13552          $(this).attr("aria-pressed", "true");
13553          var selected = $(this).attr("data-filter");
13554
13555          if (selected) {
13556            $(".search-results .views-element-container").addClass("d-none");
13557            $(".search-results .views-element-container" + selected).removeClass("d-none");
13558          } else {
13559            //show all
13560            $(".search-results .views-element-container").removeClass("d-none");
13561            Drupal.behaviors.header.checkEmpty(context);
13562          }
13563        });
13564        $(".search__header .form-control").each(function () {
13565          Drupal.behaviors.header.checkForInput(this, context);
13566        });
13567        $(".search__header .form-control").on("change keyup", function () {
13568          Drupal.behaviors.header.checkForInput(this, context);
13569        });
13570        var replaceState = window.history.replaceState; //history state is loaded (run search)
13571
13572        window.history.replaceState = function (e) {
13573          replaceState.apply(window.history, arguments);
13574          var urlParams = new URLSearchParams(window.location.search);
13575          var term = urlParams.get("term"); //if search term found in query string
13576
13577          if (term) {
13578            // console.log(term);
13579            $(".search-wrapper").addClass("d-none"); // clearButton.addClass("d-inline-flex");
13580            // iterate through the various views instance names to find our views
13581
13582            console.log("Drupal", Drupal); //if (Drupal.views) {
13583
13584            var instances = Drupal.views.instances;
13585            var countViewsLeft = searchViews.length; //number of views specified
13586
13587            $.each(instances, function getInstance(index, element) {
13588              if (searchViews.includes(element.settings.view_name)) {
13589                //callback function for Refresh View
13590                //from: https://www.vhinandrich.com/blog/drupal-8-show-drupal-throbber-button-manually-calls-views-ajax-refreshview
13591                element.refreshViewAjax.success = function (response, status) {
13592                  // Call the original callback
13593                  Drupal.Ajax.prototype.success.call(this, response, status); //add custom callback functions below \/
13594
13595                  countViewsLeft -= 1; //remove one
13596
13597                  Drupal.behaviors.header.updateSearchMsg(context, countViewsLeft);
13598                };
13599
13600                $(".js-view-dom-id-" + element.settings.view_dom_id, context).trigger("RefreshView");
13601                setTimeout(function () {
13602                  $(".js-view-dom-id-" + element.settings.view_dom_id, context).trigger("RefreshView");
13603                }, 3000);
13604              }
13605            }); //}
13606          }
13607        };
13608      });
13609    },
13610    checkEmpty: function checkEmpty(context) {
13611      var $hasProducts = $(".view-search-products .views-row").length;
13612      var $hasRecipes = $(".view-search-recipes .views-row").length;
13613      var $hasArticles = $(".view-search-blog .views-row").length;
13614      var $hasBasicPages = $(".view-search-basic-pages .views-row").length;
13615
13616      if (!$hasProducts && !$hasRecipes && !$hasArticles && !$hasBasicPages) {
13617        // console.log('has no products or recipes or articles or basic pages');
13618        $(".block-views-blocksearch-recipes-block-1").addClass("d-none");
13619        $(".block-views-blocksearch-blog-block-1").addClass("d-none");
13620        $(".block-views-blocksearch-basic-pages-block-1").addClass("d-none");
13621      } else if (!$hasProducts) {
13622        // console.log('has no products');
13623        // console.log('removed text')
13624        $(".block-views-blocksearch-products-block-1").addClass("d-none");
13625      } else if (!$hasRecipes) {
13626        // console.log('has no recipes');
13627        $(".block-views-blocksearch-recipes-block-1").addClass("d-none");
13628      } else if (!$hasArticles) {
13629        // console.log('has no articles');
13630        $(".block-views-blocksearch-blog-block-1").addClass("d-none");
13631      } else if (!$hasBasicPages) {
13632        // console.log('has no basic pages');
13633        $(".block-views-blocksearch-basic-pages-block-1").addClass("d-none");
13634      }
13635    },
13636    updateSearchMsg: function updateSearchMsg(context, countViewsLeft) {
13637      // console.log(context);
13638      if (countViewsLeft == 0) {
13639        setTimeout(function () {
13640          Drupal.behaviors.header.checkEmpty(context); //no views left to review, remove the display none class
13641
13642          $(".search-wrapper").removeClass("d-none");
13643        }, 3000);
13644      }
13645    },
13646    toggleSearch: function toggleSearch(context) {
13647      // $("main").toggleClass("overlay_filter");
13648      // setTimeout(function() {
13649      var btnCloseMenu = $(".btn-close");
13650      searchToggle = !searchToggle;
13651
13652      if (searchToggle) {
13653        if (window.innerWidth >= 991) {
13654          $(".we-mega-menu-li.dropdown-menu").removeClass("modal");
13655        }
13656
13657        Drupal.behaviors.header.setFocusSearch(context);
13658        btnCloseMenu.addClass("d-none"); // console.log('open');
13659
13660        $(".navbar-actions .icon-search").attr("aria-expanded", "true");
13661      } else {
13662        btnCloseMenu.removeClass("d-none"); // console.log('closed');
13663
13664        $(".navbar-actions .icon-search").attr("aria-expanded", "false");
13665      }
13666
13667      $("body").toggleClass("page__header--active"); // }, 3000);
13668    },
13669    checkForInput: function checkForInput(element, context) {
13670      console.log('KEY UP TRIGGER');
13671      var $label = $(element).siblings("label");
13672
13673      if ($(element).val().length > 0) {
13674        $label.addClass("input-has-value");
13675        $(element).addClass("has-value");
13676      } else {
13677        $label.removeClass("input-has-value");
13678        $(element).removeClass("has-value");
13679      }
13680    },
13681    clearSearchTerm: function clearSearchTerm(context) {
13682      valueTerm.val("");
13683      $(".search-wrapper").addClass("d-none");
13684    },
13685    setFocusSearch: function setFocusSearch(context) {
13686      valueTerm.focus();
13687    }
13688  };
13689})(jQuery, Drupal, once);
13690
13691/***/ }),
13692
13693/***/ 10:
13694/*!***********************************************!*\
13695  !*** multi ./src/components/header/header.js ***!
13696  \***********************************************/
13697/*! no static exports found */
13698/***/ (function(module, exports, __webpack_require__) {
13699
13700module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/header/header.js */"./src/components/header/header.js");
13701
13702
13703/***/ })
13704
13705/******/ });;
13706/******/ (function(modules) { // webpackBootstrap
13707/******/ 	// The module cache
13708/******/ 	var installedModules = {};
13709/******/
13710/******/ 	// The require function
13711/******/ 	function __webpack_require__(moduleId) {
13712/******/
13713/******/ 		// Check if module is in cache
13714/******/ 		if(installedModules[moduleId]) {
13715/******/ 			return installedModules[moduleId].exports;
13716/******/ 		}
13717/******/ 		// Create a new module (and put it into the cache)
13718/******/ 		var module = installedModules[moduleId] = {
13719/******/ 			i: moduleId,
13720/******/ 			l: false,
13721/******/ 			exports: {}
13722/******/ 		};
13723/******/
13724/******/ 		// Execute the module function
13725/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
13726/******/
13727/******/ 		// Flag the module as loaded
vendor: 2,824 bytes, lines 13728-13793
13728/******/ 		module.l = true;
13729/******/
13730/******/ 		// Return the exports of the module
13731/******/ 		return module.exports;
13732/******/ 	}
13733/******/
13734/******/
13735/******/ 	// expose the modules object (__webpack_modules__)
13736/******/ 	__webpack_require__.m = modules;
13737/******/
13738/******/ 	// expose the module cache
13739/******/ 	__webpack_require__.c = installedModules;
13740/******/
13741/******/ 	// define getter function for harmony exports
13742/******/ 	__webpack_require__.d = function(exports, name, getter) {
13743/******/ 		if(!__webpack_require__.o(exports, name)) {
13744/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
13745/******/ 		}
13746/******/ 	};
13747/******/
13748/******/ 	// define __esModule on exports
13749/******/ 	__webpack_require__.r = function(exports) {
13750/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13751/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13752/******/ 		}
13753/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
13754/******/ 	};
13755/******/
13756/******/ 	// create a fake namespace object
13757/******/ 	// mode & 1: value is a module id, require it
13758/******/ 	// mode & 2: merge all properties of value into the ns
13759/******/ 	// mode & 4: return value when already ns object
13760/******/ 	// mode & 8|1: behave like require
13761/******/ 	__webpack_require__.t = function(value, mode) {
13762/******/ 		if(mode & 1) value = __webpack_require__(value);
13763/******/ 		if(mode & 8) return value;
13764/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
13765/******/ 		var ns = Object.create(null);
13766/******/ 		__webpack_require__.r(ns);
13767/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
13768/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
13769/******/ 		return ns;
13770/******/ 	};
13771/******/
13772/******/ 	// getDefaultExport function for compatibility with non-harmony modules
13773/******/ 	__webpack_require__.n = function(module) {
13774/******/ 		var getter = module && module.__esModule ?
13775/******/ 			function getDefault() { return module['default']; } :
13776/******/ 			function getModuleExports() { return module; };
13777/******/ 		__webpack_require__.d(getter, 'a', getter);
13778/******/ 		return getter;
13779/******/ 	};
13780/******/
13781/******/ 	// Object.prototype.hasOwnProperty.call
13782/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
13783/******/
13784/******/ 	// __webpack_public_path__
13785/******/ 	__webpack_require__.p = "/";
13786/******/
13787/******/
13788/******/ 	// Load entry module and return exports
13789/******/ 	return __webpack_require__(__webpack_require__.s = 15);
13790/******/ })
13791/************************************************************************/
13792/******/ ({
13793
13794/***/ "./src/components/navbar/navbar.js":
13795/*!*****************************************!*\
13796  !*** ./src/components/navbar/navbar.js ***!
13797  \*****************************************/
13798/*! no static exports found */
13799/***/ (function(module, exports) {
13800
13801(function ($, Drupal) {
13802  Drupal.behaviors.navbar = {
13803    attach: function attach(context) {
13804      var $navbar = $('#navbar'),
13805          $body = $('body'),
13806          prevScroll = 0,
13807          alertHeight = 0,
13808          menuHeight = 0,
13809          scrollDir = 'up';
13810      var initialSt = $(window).scrollTop();
13811
13812      if (initialSt == 0) {
13813        $navbar.removeClass('scroll-dir-up');
13814        $body.removeClass('scrolled-up');
13815      } //get height of the alert bar
13816
13817
13818      if ($("#block-bc-brand-headernotification").length) {
13819        alertHeight = $("#block-bc-brand-headernotification").outerHeight();
13820      }
13821
13822      if ($("#navbar-inner-wrapper").length) {
13823        menuHeight = $("#navbar-inner-wrapper").outerHeight();
13824      }
13825
13826      $(document).off('scroll.navdir').on('scroll.navdir', function () {
13827        var st = $(window).scrollTop();
13828        var initialSt = st; // console.log(prevScroll,st);
13829        //initial scroll down, don't snap until out of view
13830
13831        if (initialSt < menuHeight + alertHeight && !$navbar.hasClass('scrolled')) {
13832          $navbar.removeClass('scroll-dir-up');
13833          $body.removeClass('scrolled-up');
13834          $navbar.removeClass('scroll-dir-down');
13835          $navbar.removeClass('scrolled');
13836        } //scrolling back up, don't snap until at the very top
13837        else if (st <= alertHeight && scrollDir === 'up') {
13838            $navbar.removeClass('scroll-dir-up');
13839            $body.removeClass('scrolled-up');
13840            $navbar.removeClass('scroll-dir-down');
13841            $navbar.removeClass('scrolled');
13842          } else if (st < prevScroll && scrollDir === 'down') {
13843            // console.log("up");
13844            scrollDir = 'up';
13845            $navbar.addClass('scrolled');
13846            $navbar.addClass('scroll-dir-up');
13847            $body.addClass('scrolled-up');
13848            $navbar.removeClass('scroll-dir-down');
13849          } else if (st > prevScroll && scrollDir === 'up') {
13850            // console.log("down");
13851            $navbar.addClass('scrolled');
13852            $navbar.removeClass('scroll-dir-up');
13853            $body.removeClass('scrolled-up');
13854            $navbar.addClass('scroll-dir-down');
13855            scrollDir = 'down';
13856          }
13857
13858        prevScroll = st;
13859        return;
13860      });
13861    }
13862  };
13863})(jQuery, Drupal);
13864
13865/***/ }),
13866
13867/***/ 15:
13868/*!***********************************************!*\
13869  !*** multi ./src/components/navbar/navbar.js ***!
13870  \***********************************************/
13871/*! no static exports found */
13872/***/ (function(module, exports, __webpack_require__) {
13873
13874module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/navbar/navbar.js */"./src/components/navbar/navbar.js");
13875
13876
13877/***/ })
13878
13879/******/ });;
13880/**
13881* DO NOT EDIT THIS FILE.
13882* See the following change record for more information,
13883* https://www.drupal.org/node/2815083
13884* @preserve
13885**/
13886function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13887function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13888function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEac
13888h(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13889function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13890function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13891function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13892(function ($, Drupal, cookies) {
13893  var deprecatedMessageSuffix = "is deprecated in Drupal 9.0.0 and will be removed in Drupal 10.0.0. Use the core/js-cookie library instead. See https://www.drupal.org/node/3104677";
13894  var isFunction = function isFunction(obj) {
13895    return Object.prototype.toString.call(obj) === '[object Function]';
13896  };
13897  var parseCookieValue = function parseCookieValue(value, parseJson) {
13898    if (value.indexOf('"') === 0) {
13899      value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
13900    }
13901    try {
13902      value = decodeURIComponent(value.replace(/\+/g, ' '));
13903      return parseJson ? JSON.parse(value) : value;
13904    } catch (e) {}
13905  };
13906  var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) {
13907    var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson);
13908    if (converter !== undefined && isFunction(converter)) {
13909      return converter(value, cookieName);
13910    }
13911    return value;
13912  };
13913  $.cookie = function (key) {
13914    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
13915    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
13916    Drupal.deprecationError({
13917      message: "jQuery.cookie() ".concat(deprecatedMessageSuffix)
13918    });
13919    if (value !== undefined && !isFunction(value)) {
13920      var attributes = _objectSpread(_objectSpread({}, $.cookie.defaults), options);
13921      if (typeof attributes.expires === 'string' && attributes.expires !== '') {
13922        attributes.expires = new Date(attributes.expires);
13923      }
13924      var cookieSetter = cookies.withConverter({
13925        write: function write(cookieValue) {
13926          return encodeURIComponent(cookieValue);
13927        }
13928      });
13929      value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value);
13930      return cookieSetter.set(key, value, attributes);
13931    }
13932    var userProvidedConverter = value;
13933    var cookiesShim = cookies.withConverter({
13934      read: function read(cookieValue, cookieName) {
13935        return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json);
13936      }
13937    });
13938    if (key !== undefined) {
13939      return cookiesShim.get(key);
13940    }
13941    var results = cookiesShim.get();
13942    Object.keys(results).forEach(function (resultKey) {
13943      if (results[resultKey] === undefined) {
13944        delete results[resultKey];
13945      }
13946    });
13947    return results;
13948  };
13949  $.cookie.defaults = _objectSpread({
13950    path: ''
13951  }, cookies.defaults);
13952  $.cookie.json = false;
13953  $.cookie.raw = false;
13954  $.removeCookie = function (key, options) {
13955    Drupal.deprecationError({
13956      message: "jQuery.removeCookie() ".concat(deprecatedMessageSuffix)
13957    });
13958    cookies.remove(key, _objectSpread(_objectSpread({}, $.cookie.defaults), options));
13959    return !cookies.get(key);
13960  };
13961})(jQuery, Drupal, window.Cookies);;
13962(function ($, Drupal) {
13963  Drupal.behaviors.provinceSelector = {
13964    attach: function (context, settings) {
13965      // When juicer.io block is enabled it breaks jQuery.once, The following
13966      // is a fix for this behavior.
13967      let queryString = window.location.search;
13968      let urlParams = new URLSearchParams(queryString);
13969      let regionFocus = urlParams.get('regionFocus');
13970      if (regionFocus != null) {
13971        $("#region-select").focus();
13972        var simpleLiveCurl=location.protocol + '//' + location.host + location.pathname;
13973        window.history.replaceState( {} , 'regionFocus', simpleLiveCurl);
13974      }
13975      let $selector = null;
13976      let $selector_mobile = null;
13977      let $selector_footer = null;
13978      if (typeof jQuery.fn.once !== "undefined") {
13979        $selector = $("#province-selector select").once("provinceSelector");
13980        $selector_mobile = $("#province-selector-mobile select").once(
13981          "provinceSelector"
13982        );
13983        $selector_footer = $("#region-select-footer").once("provinceSelector");
13984      } else {
13985        $selector = $("#province-selector select");
13986        $selector_mobile = $("#province-selector-mobile select");
13987        $selector_footer = $("#region-select-footer");
13988      }
13989      provinceSelector.setDefault();
13990      // Bypass megamenu caching issue
13991      const activeProvince = provinceSelector.getProvince();
13992
13993      $('option', $selector_mobile).removeAttr('selected')
13994      $selector_mobile.val(activeProvince);
13995
13996      $selector.on("change", () => {
13997        const region = $("option:selected", $selector).data("region");
13998        provinceSelector.setCookie($selector.val(), region);
13999      });
14000
14001      $selector_mobile.on("change", () => {
14002        // Fix issue with variable undefined
14003        let $sMobile =  $("#province-selector-mobile select");
14004        const region = $("option:selected", $sMobile).data("region");
14005        provinceSelector.setCookie($sMobile.val(), region);
14006      });
14007
14008      $selector_footer.on("change", () => {
14009        const region = $("option:selected", $selector_footer).data("region");
14010        provinceSelector.setCookie($selector_footer.val(), region);
14011      });
14012    },
14013  };
14014
14015  // Helper object.
14016  const provinceSelector = {
14017    provinceCookie: "currentProvince",
14018    regionCookie: "currentRegion",
14019    setDefault: () => {
14020      // Get default province from backend integration.
14021      $.cookie(
14022        provinceSelector.provinceCookie, drupalSettings.defaultProvince,
14023        { path: "/" }
14024      );
14025      $.cookie(
14026        provinceSelector.regionCookie, drupalSettings.defaultRegion,
14027        { path: "/" }
14028      );
14029    },
14030    setCookie: (province, region) => {
14031      $.cookie(provinceSelector.provinceCookie, province, { path: "/" });
14032      $.cookie(provinceSelector.regionCookie, region, { path: "/" });
14033      // document.location.reload(true);
14034      let queryString = window.location.search;
14035      let urlParams = new URLSearchParams(queryString);
14036      urlParams.delete('regionFocus');
14037      urlParams.set('regionFocus', '');
14038      document.location.href += '?' + urlParams;
14039    },
14040    getProvince: () => {
14041      return $.cookie(provinceSelector.provinceCookie)
14042    }
14043  };
14044})(jQuery, Drupal);
14045;
14046/*!
14047 * jQuery Form Plugin
14048 * version: 4.3.0
14049 * Requires jQuery v1.7.2 or later
14050 * Project repository: https://github.com/jquery-form/form
14051
14052 * Copyright 2017 Kevin Morris
14053 * Copyright 2006 M. Alsup
14054
14055 * Dual licensed under the LGPL-2.1+ or MIT licenses
14056 * https://github.com/jquery-form/form#license
14057
14058 * This library is free software; you can redistribute it and/or
14059 * modify it under the terms of the GNU Lesser General Public
vendor: 16,397 bytes, lines 14060-14067
14060 * License as published by the Free Software Foundation; either
14061 * version 2.1 of the License, or (at your option) any later version.
14062 * This library is distributed in the hope that it will be useful,
14063 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14064 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14065 * Lesser General Public License for more details.
14066 */
14067!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('<input type="file">').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0<arguments.length?(M={url:M,data:e,dataType:t},"function"==typeof r&&(M.success=r)):void 0===M&&(M={}),O=M.method||M.type||this.attr2("method"),n=(n=(n="string"==typeof(a=M.url||this.attr2("action"))?q.trim(a):"")||window.location.href||"")&&(n.match(/^([^#]+)/)||[])[1],o=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",M=q.extend(!0,{url:n,success:q.ajaxSettings.success,type:O||q.ajaxSettings.type,iframeSrc:o},M);var i={};if(this.trigger("form-pre-serialize",[this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return N("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var s=M.traditional;void 0===s&&(s=q.ajaxSettings.traditional);var u,c,C=[],l=this.formToArray(M.semantic,C,M.filtering);if(M.data&&(c=q.isFunction(M.data)?M.data(l):M.data,M.extraData=c,u=q.param(c,s)),M.beforeSubmit&&!1===M.beforeSubmit(l,this,M))return N("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var f=q.param(l,s);u&&(f=f?f+"&"+u:u),"GET"===M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+f,M.data=null):M.data=f;var d,m,p,h=[];M.resetForm&&h.push(function(){X.resetForm()}),M.clearForm&&h.push(function(){X.clearForm(M.includeHidden)}),!M.dataType&&M.target?(d=M.success||function(){},h.push(function(e,t,r){var a=arguments,n=M.replaceTarget?"replaceWith":"html";q(M.target)[n](e).each(function(){d.apply(this,a)})})):M.success&&(q.isArray(M.success)?q.merge(h,M.success):h.push(M.success)),M.success=function(e,t,r){for(var a=M.context||this,n=0,o=h.length;n<o;n++)h[n].apply(a,[e,t,r||X,X])},M.error&&(m=M.error,M.error=function(e,t,r){var a=M.context||this;m.apply(a,[e,t,r,X])}),M.complete&&(p=M.complete,M.complete=function(e,t){var r=M.context||this;p.apply(r,[e,t,X])});var v=0<q("input[type=file]:enabled",this).filter(function(){return""!==q(this).val()}).length,g="multipart/form-data",x=X.attr("enctype")===g||X.attr("encoding")===g,y=S.fileapi&&S.formdata;N("fileAPI :"+y);var b,T=(v||x)&&!y;!1!==M.iframe&&(M.iframe||T)?M.closeKeepAlive?q.get(M.closeKeepAlive,function(){b=w(l)}):b=w(l):b=(v||x)&&y?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(M.extraData){var a=function(e){var t,r,a=q.param(e,M.traditional).split("&"),n=a.length,o=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),o.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return o}(M.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}M.data=null;var n=q.extend(!0,{},q.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:O||"POST"});M.uploadProgress&&(n.xhr=function(){var e=q.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),M.uploadProgress(e,r,a,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){M.formData?t.data=M.formData:t.data=r,o&&o.call(this,e,t)},q.ajax(n)}(l):q.ajax(M),X.removeData("jqxhr").data("jqxhr",b);for(var j=0;j<C.length;j++)C[j]=null;return this.trigger("form-submit-notify",[this,M]),this;function w(e){var t,r,l,f,o,d,m,p,a,n,h,v,i=X[0],g=q.Deferred();if(g.abort=function(e){p.abort(e)},e)for(r=0;r<C.length;r++)t=q(C[r]),_?t.prop("disabled",!1):t.removeAttr("disabled");(l=q.extend(!0,{},q.ajaxSettings,M)).context=l.context||l,o="jqFormIO"+(new Date).getTime();var s=i.ownerDocument,u=X.closest("body");if(l.iframeTarget?(n=(d=q(l.iframeTarget,s)).attr2("name"))?o=n:d.attr2("name",o):(d=q('<iframe name="'+o+'" src="'+l.iframeSrc+'" />',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('<input type="hidden" name="'+l.extraData[n].name+'">',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('<input type="hidden" name="'+n+'">',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:r},"function"==typeof a&&(e.success=a)),(e=e||{}).delegation=e.delegation&&q.isFunction(q.fn.on),e.delegation||0!==this.length)return e.delegation?(q(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i));var n={s:this.selector,c:this.context};return!q.isReady&&n.s?(N("DOM not ready, queuing ajaxForm"),q(function(){q(n.s,n.c).ajaxForm(e)})):N("terminating; zero elements found by selector"+(q.isReady?"":" (DOM not ready)")),this},q.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},q.fn.formToArray=function(e,t,r){var a=[];if(0===this.length)return a;var n,o,i,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=(v=e||void 0===p.elements?p.getElementsByTagName("*"):p.elements)&&q.makeArray(v);if(h&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(n=q(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(n)),!v||!v.length)return a;for(q.isFunction(r)&&(v=q.map(v,r)),o=0,c=v.length;o<c;o++)if((m=(u=v[o]).name)&&!u.disabled)if(e&&p.clk&&"image"===u.type)p.clk===u&&(a.push({name:m,value:q(u).val(),type:u.type}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y}));else if((s=q.fieldValue(u,!0))&&s.constructor===Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)a.push({name:m,value:s[i]});else if(S.fileapi&&"file"===u.type){t&&t.push(u);var g=u.files;if(g.length)for(i=0;i<g.length;i++)a.push({name:m,value:g[i],type:u.type});else a.push({name:m,value:"",type:u.type})}else null!=s&&(t&&t.push(u),a.push({name:m,value:s,type:u.type,required:u.required}));return e||!p.clk||(m=(d=(f=q(p.clk))[0]).name)&&!d.disabled&&"image"===d.type&&(a.push({name:m,value:f.val()}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y})),a},q.fn.formSerialize=function(e){return q.param(this.formToArray(e))},q.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=q.fieldValue(this,n);if(t&&t.constructor===Array)for(var r=0,a=t.length;r<a;r++)o.push({name:e,value:t[r]});else null!=t&&o.push({name:this.name,value:t})}}),q.param(o)},q.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],o=q.fieldValue(n,e);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?q.merge(t,o):t.push(o))}return t},q.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!e.checked||("submit"===a||"image"===a)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return q(e).val().replace(m,"\r\n");var o=e.selectedIndex;if(o<0)return null;for(var i=[],s=e.options,u="select-one"===a,c=u?o+1:s.length,l=u?o:0;l<c;l++){var f=s[l];if(f.selected&&!f.disabled){var d=(d=f.value)||(f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value);if(u)return d;i.push(d)}}return i},q.fn.clearForm=function(e){return this.each(function(){q("input,select,textarea",this).clearFields(e)})},q.fn.clearFields=q.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?q(this).replaceWith(q(this).clone(!0)):q(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&q(this).is(r))&&(this.value="")})},q.fn.resetForm=function(){return this.each(function(){var t=q(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var r=t.parents("select");return r.length&&r[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():r.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=q(t.attr("for")),n=t.find("input,select,textarea");return a[0]&&n.unshift(a[0]),n.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},q.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},q.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e,t=this.t
14067ype;"checkbox"===t||"radio"===t?this.checked=r:"option"===this.tagName.toLowerCase()&&(e=q(this).parent("select"),r&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=r)})},q.fn.ajaxSubmit.debug=!1});
14068
14069;
14070/**
14071* DO NOT EDIT THIS FILE.
14072* See the following change record for more information,
14073* https://www.drupal.org/node/2815083
14074* @preserve
14075**/
14076(function ($, Drupal, drupalSettings) {
14077  Drupal.Views = {};
14078  Drupal.Views.parseQueryString = function (query) {
14079    var args = {};
14080    var pos = query.indexOf('?');
14081    if (pos !== -1) {
14082      query = query.substring(pos + 1);
14083    }
14084    var pair;
14085    var pairs = query.split('&');
14086    for (var i = 0; i < pairs.length; i++) {
14087      pair = pairs[i].split('=');
14088      if (pair[0] !== 'q' && pair[1]) {
14089        args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
14090      }
14091    }
14092    return args;
14093  };
14094  Drupal.Views.parseViewArgs = function (href, viewPath) {
14095    var returnObj = {};
14096    var path = Drupal.Views.getPath(href);
14097    var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length);
14098    if (viewHref && path.substring(0, viewHref.length + 1) === "".concat(viewHref, "/")) {
14099      returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length));
14100      returnObj.view_path = path;
14101    }
14102    return returnObj;
14103  };
14104  Drupal.Views.pathPortion = function (href) {
14105    var protocol = window.location.protocol;
14106    if (href.substring(0, protocol.length) === protocol) {
14107      href = href.substring(href.indexOf('/', protocol.length + 2));
14108    }
14109    return href;
14110  };
14111  Drupal.Views.getPath = function (href) {
14112    href = Drupal.Views.pathPortion(href);
14113    href = href.substring(drupalSettings.path.baseUrl.length, href.length);
14114    if (href.substring(0, 3) === '?q=') {
14115      href = href.substring(3, href.length);
14116    }
14117    var chars = ['#', '?', '&'];
14118    for (var i = 0; i < chars.length; i++) {
14119      if (href.indexOf(chars[i]) > -1) {
14120        href = href.substr(0, href.indexOf(chars[i]));
14121      }
14122    }
14123    return href;
14124  };
14125})(jQuery, Drupal, drupalSettings);;
14126/**
14127* DO NOT EDIT THIS FILE.
14128* See the following change record for more information,
14129* https://www.drupal.org/node/2815083
14130* @preserve
14131**/
14132(function ($, Drupal, drupalSettings) {
14133  Drupal.behaviors.ViewsAjaxView = {};
14134  Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) {
14135    if (settings && settings.views && settings.views.ajaxViews) {
14136      var ajaxViews = settings.views.ajaxViews;
14137      Object.keys(ajaxViews || {}).forEach(function (i) {
14138        Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]);
14139      });
14140    }
14141  };
14142  Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) {
14143    if (trigger === 'unload') {
14144      if (settings && settings.views && settings.views.ajaxViews) {
14145        var ajaxViews = settings.views.ajaxViews;
14146        Object.keys(ajaxViews || {}).forEach(function (i) {
14147          var selector = ".js-view-dom-id-".concat(ajaxViews[i].view_dom_id);
14148          if ($(selector, context).length) {
14149            delete Drupal.views.instances[i];
14150            delete settings.views.ajaxViews[i];
14151          }
14152        });
14153      }
14154    }
14155  };
14156  Drupal.views = {};
14157  Drupal.views.instances = {};
14158  Drupal.views.ajaxView = function (settings) {
14159    var selector = ".js-view-dom-id-".concat(settings.view_dom_id);
14160    this.$view = $(selector);
14161    var ajaxPath = drupalSettings.views.ajax_path;
14162    if (ajaxPath.constructor.toString().indexOf('Array') !== -1) {
14163      ajaxPath = ajaxPath[0];
14164    }
14165    var queryString = window.location.search || '';
14166    if (queryString !== '') {
14167      queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
14168      if (queryString !== '') {
14169        queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString;
14170      }
14171    }
14172    this.element_settings = {
14173      url: ajaxPath + queryString,
14174      submit: settings,
14175      setClick: true,
14176      event: 'click',
14177      selector: selector,
14178      progress: {
14179        type: 'fullscreen'
14180      }
14181    };
14182    this.settings = settings;
14183    this.$exposed_form = $("form#views-exposed-form-".concat(settings.view_name.replace(/_/g, '-'), "-").concat(settings.view_display_id.replace(/_/g, '-')));
14184    once('exposed-form', this.$exposed_form).forEach($.proxy(this.attachExposedFormAjax, this));
14185    once('ajax-pager', this.$view.filter($.proxy(this.filterNestedViews, this))).forEach($.proxy(this.attachPagerAjax, this));
14186    var selfSettings = $.extend({}, this.element_settings, {
14187      event: 'RefreshView',
14188      base: this.selector,
14189      element: this.$view.get(0)
14190    });
14191    this.refreshViewAjax = Drupal.ajax(selfSettings);
14192  };
14193  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
14194    var that = this;
14195    this.exposedFormAjax = [];
14196    $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {
14197      var selfSettings = $.extend({}, that.element_settings, {
14198        base: $(this).attr('id'),
14199        element: this
14200      });
14201      that.exposedFormAjax[index] = Drupal.ajax(selfSettings);
14202    });
14203  };
14204  Drupal.views.ajaxView.prototype.filterNestedViews = function () {
14205    return !this.$view.parents('.view').length;
14206  };
14207  Drupal.views.ajaxView.prototype.attachPagerAjax = function () {
14208    this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this));
14209  };
14210  Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) {
14211    var $link = $(link);
14212    var viewData = {};
14213    var href = $link.attr('href');
14214    $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
14215    var selfSettings = $.extend({}, this.element_settings, {
14216      submit: viewData,
14217      base: false,
14218      element: link
14219    });
14220    this.pagerAjax = Drupal.ajax(selfSettings);
14221  };
14222  Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) {
14223    var offset = $(response.selector).offset();
14224    var scrollTarget = response.selector;
14225    while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) {
14226      scrollTarget = $(scrollTarget).parent();
14227    }
14228    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
14229      $(scrollTarget).animate({
14230        scrollTop: offset.top - 10
14231      }, 500);
14232    }
14233  };
14234})(jQuery, Drupal, drupalSettings);;
14235/******/ (function(modules) { // webpackBootstrap
14236/******/ 	// The module cache
14237/******/ 	var installedModules = {};
14238/******/
14239/******/ 	// The require function
14240/******/ 	function __webpack_require__(moduleId) {
14241/******/
14242/******/ 		// Check if module is in cache
14243/******/ 		if(installedModules[moduleId]) {
14244/******/ 			return installedModules[moduleId].exports;
14245/******/ 		}
14246/******/ 		// Create a new module (and put it into the cache)
14247/******/ 		var module = installedModules[moduleId] = {
14248/******/ 			i: moduleId,
14249/******/ 			l: false,
14250/******/ 			exports: {}
14251/******/ 		};
14252/******/
14253/******/ 		// Execute the module function
14254/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
14255/******/
14256/******/ 		// Flag the module as loaded
14257/******/ 		module.l = true;
14258/******/
14259/******/ 		// Return the exports of the module
14260/******/ 		return module.exports;
14261/******/ 	}
14262/******/
14263/******/
14264/******/ 	// expose the modules object (__webpack_modules__)
14265/******/ 	__webpack_require__.m = modules;
14266/******/
14267/******/ 	// expose the module cache
14268/******/ 	__webpack_require__.c = installedModules;
14269/******/
14270/******/ 	// define getter function for harmony exports
14271/******/ 	__webpack_require__.d = function(exports, name, getter) {
14272/******/ 		if(!__webpack_require__.o(exports, name)) {
14273/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
14274/******/ 		}
14275/******/ 	};
14276/******/
14277/******/ 	// define __esModule on exports
14278/******/ 	__webpack_require__.r = function(exports) {
14279/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
14280/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
14281/******/ 		}
14282/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
14283/******/ 	};
14284/******/
14285/******/ 	// create a fake namespace object
14286/******/ 	// mode & 1: value is a module id, require it
14287/******/ 	// mode & 2: merge all properties of value into the ns
14288/******/ 	// mode & 4: return value when already ns object
14289/******/ 	// mode & 8|1: behave like require
14290/******/ 	__webpack_require__.t = function(value, mode) {
14291/******/ 		if(mode & 1) value = __webpack_require__(value);
14292/******/ 		if(mode & 8) return value;
14293/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
14294/******/ 		var ns = Object.create(null);
14295/******/ 		__webpack_require__.r(ns);
14296/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
14297/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
14298/******/ 		return ns;
14299/******/ 	};
14300/******/
14301/******/ 	// getDefaultExport function for compatibility with non-harmony modules
14302/******/ 	__webpack_require__.n = function(module) {
14303/******/ 		var getter = module && module.__esModule ?
14304/******/ 			function getDefault() { return module['default']; } :
14305/******/ 			function getModuleExports() { return module; };
14306/******/ 		__webpack_require__.d(getter, 'a', getter);
14307/******/ 		return getter;
14308/******/ 	};
14309/******/
14310/******/ 	// Object.prototype.hasOwnProperty.call
14311/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
14312/******/
14313/******/ 	// __webpack_public_path__
14314/******/ 	__webpack_require__.p = "/";
14315/******/
14316/******/
14317/******/ 	// Load entry module and return exports
14318/******/ 	return __webpack_require__(__webpack_require__.s = 25);
14319/******/ })
14320/************************************************************************/
14321/******/ ({
14322
14323/***/ "./src/components/search/search.js":
14324/*!*****************************************!*\
14325  !*** ./src/components/search/search.js ***!
14326  \*****************************************/
14327/*! no static exports found */
14328/***/ (function(module, exports, __webpack_require__) {
14329
14330"use strict";
14331
14332
14333(function ($, Drupal) {
14334  Drupal.behaviors.search = {
14335    attach: function attach(context) {
14336      var filterItem = $(".path-search-results .page__header .search__filters li a, .path-resultats-de-recherche .page__header .search__filters li a", context);
14337      var clearButton = $(".clear");
14338      var submitButton = $(".submit");
14339      filterItem.on("click", function () {
14340        filterItem.removeClass("is-active");
14341        $(this).addClass("is-active");
14342        var itemValue = $(this).attr("href");
14343
14344        if (itemValue === "#all") {
14345          $(".view-search-products", context).show();
14346          $(".view-search-recipes", context).show();
14347          $(".view-search-basic-pages", context).show();
14348        } else if (itemValue === "#products") {
14349          $(".view-search-products", context).show();
14350          $(".view-search-recipes", context).hide();
14351          $(".view-search-basic-pages", context).hide();
14352        } else if (itemValue === "#recipes") {
14353          $(".view-search-products", context).hide();
14354          $(".view-search-recipes", context).show();
14355          $(".view-search-basic-pages", context).hide();
14356        } else {
14357          $(".view-search-products", context).hide();
14358          $(".view-search-recipes", context).hide();
14359          $(".view-search-basic-pages", context).show();
14360        }
14361      });
14362      clearButton.on("click", function (context) {
14363        $(this).removeClass("d-inline-flex");
14364        submitButton.removeClass("d-none");
14365        Drupal.behaviors.header.clearSearchTerm(context);
14366        Drupal.behaviors.header.setFocusSearch(context);
14367      });
14368      var params = new URLSearchParams(window.location.search);
14369
14370      if (params.has("term")) {
14371        if (context === document) {
14372          var $hasProducts = $(".view-search-products .views-row").length;
14373          var $hasRecipes = $(".view-search-recipes .views-row").length;
14374          var $hasPages = $(".view-search-basic-pages .views-row").length;
14375          clearButton.addClass("d-inline-flex");
14376          submitButton.addClass("d-none");
14377
14378          if (!$hasProducts && !$hasRecipes && !$hasPages) {
14379            $(".layout-builder__layout .col-12").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results.</span><span class='fr'>Désolé, Il n'y a aucun résultat.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
14380          }
14381
14382          if (!$hasProducts && $hasRecipes && $hasPages) {
14383            $(".view-search-products").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for products.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour produits.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
14384          }
14385
14386          if (!$hasRecipes && $hasProducts && $hasPages) {
14387            $(".view-search-recipes").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for recipes.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour recettes.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
14388          }
14389
14390          if (!$hasPages && $hasProducts && $hasRecipes) {
14391            $(".view-search-basic-pages").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for pages.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour pages.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
14392          }
14393
14394          if (window.innerWidth >= 991) {
14395            Drupal.behaviors.header.toggleSearch(context);
14396          }
14397
14398          $("#term").val(params.get("term"));
14399        }
14400      }
14401    }
14402  };
14403})(jQuery, Drupal);
14404
14405/***/ }),
14406
14407/***/ 25:
14408/*!***********************************************!*\
14409  !*** multi ./src/components/search/search.js ***!
14410  \***********************************************/
14411/*! no static exports found */
14412/***/ (function(module, exports, __webpack_require__) {
14413
14414module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/search/search.js */"./src/components/search/search.js");
14415
14416
14417/***/ })
14418
14419/******/ });;
14420/**
14421 * @file
14422 * Infinite Scroll JS.
14423 */
14424
14425(function ($, Drupal, debounce) {
14426  "use strict";
14427
14428  // Cached reference to $(window).
14429  var $window = $(window);
14430
14431  // The threshold for how far to the bottom you should reach before reloading.
14432  var scrollThreshold = 200;
14433
14434  // The selector for the automatic pager.
14435  var automaticPagerSelector = '[data-drupal-views-infinite-scroll-pager
14435="automatic"]';
14436
14437  // The selector for both manual load and automatic pager.
14438  var pagerSelector = '[data-drupal-views-infinite-scroll-pager]';
14439
14440  // The selector for the automatic pager.
14441  var contentWrapperSelector = '[data-drupal-views-infinite-scroll-content-wrapper]';
14442
14443  // The event and namespace that is bound to window for automatic scrolling.
14444  var scrollEvent = 'scroll.views_infinite_scroll';
14445
14446  /**
14447   * Insert a views infinite scroll view into the document.
14448   *
14449   * @param {jQuery} $newView
14450   *   New content detached from the DOM.
14451   */
14452  $.fn.infiniteScrollInsertView = function ($newView) {
14453    // Extract the view DOM ID from the view classes.
14454    var matches = /(js-view-dom-id-\w+)/.exec(this.attr('class'));
14455
14456    if (!matches) {
14457      return;
14458    }
14459
14460    var currentViewId = matches[1].replace('js-view-dom-id-', 'views_dom_id:');
14461
14462    // Get the existing ajaxViews object.
14463    var view = Drupal.views.instances[currentViewId];
14464    // Remove once so that the exposed form and pager are processed on
14465    // behavior attach.
14466    view.$view.removeOnce('ajax-pager');
14467    view.$exposed_form.removeOnce('exposed-form');
14468    // Make sure infinite scroll can be reinitialized.
14469    var $existingPager = view.$view.find(pagerSelector);
14470    $existingPager.removeOnce('infinite-scroll');
14471
14472    var $newRows = $newView.find(contentWrapperSelector).children();
14473    var $newPager = $newView.find(pagerSelector);
14474
14475    view.$view.find(contentWrapperSelector)
14476      // Trigger a jQuery event on the wrapper to inform that new content was
14477      // loaded and allow other scripts to respond to the event.
14478      .trigger('views_infinite_scroll.new_content', $newRows.clone())
14479      // Add the new rows to existing view.
14480      .append($newRows);
14481
14482    // Replace the pager link with the new link and ajaxPageState values.
14483    $existingPager.replaceWith($newPager);
14484
14485    // Run views and VIS behaviors.
14486    Drupal.attachBehaviors(view.$view[0]);
14487  };
14488
14489  /**
14490   * Handle the automatic paging based on the scroll amount.
14491   *
14492   * @type {Drupal~behavior}
14493   *
14494   * @prop {Drupal~behaviorAttach} attach
14495   *   Initialize infinite scroll pagers and bind the scroll event.
14496   * @prop {Drupal~behaviorDetach} detach
14497   *   During `unload` remove the scroll event binding.
14498   */
14499  Drupal.behaviors.views_infinite_scroll_automatic = {
14500    attach : function (context, settings) {
14501      $(context).find(automaticPagerSelector).once('infinite-scroll').each(function () {
14502        var $pager = $(this);
14503        $pager.addClass('visually-hidden');
14504        var isLoadNeeded = function () {
14505          return window.innerHeight + window.pageYOffset > $pager.offset().top - scrollThreshold;
14506        };
14507        $window.on(scrollEvent, debounce(function () {
14508          if (isLoadNeeded()) {
14509            $pager.find('[rel=next]').click();
14510            $window.off(scrollEvent);
14511          }
14512        }, 200));
14513        if (isLoadNeeded()) {
14514          $window.trigger(scrollEvent);
14515        }
14516      });
14517    },
14518    detach: function (context, settings, trigger) {
14519      // In the case where the view is removed from the document, remove it's
14520      // events. This is important in the case a view being refreshed for a reason
14521      // other than a scroll. AJAX filters are a good example of the event needing
14522      // to be destroyed earlier than above.
14523      if (trigger === 'unload') {
14524        if ($(context).find(automaticPagerSelector).removeOnce('infinite-scroll').length) {
14525          $window.off(scrollEvent);
14526        }
14527      }
14528    }
14529  };
14530
14531  /**
14532   * Views AJAX pagination filter.
14533   *
14534   * In case the Entity View Attachment is rendered in a view context,
14535   * the default filter function prevents the required 'Use AJAX' setting
14536   * to work.
14537   *
14538   * @return {Boolean}
14539   *   Whether to apply the Views AJAX paginator. VIS requires this setting
14540   *   for pagination.
14541   */
14542  Drupal.views.ajaxView.prototype.filterNestedViews = function () {
14543    return this.$view.hasClass('view-eva') || !this.$view.parents('.view').length;
14544  };
14545
14546})(jQuery, Drupal, Drupal.debounce);
14547;
14548/******/ (function(modules) { // webpackBootstrap
14549/******/ 	// The module cache
14550/******/ 	var installedModules = {};
14551/******/
14552/******/ 	// The require function
14553/******/ 	function __webpack_require__(moduleId) {
14554/******/
14555/******/ 		// Check if module is in cache
14556/******/ 		if(installedModules[moduleId]) {
14557/******/ 			return installedModules[moduleId].exports;
14558/******/ 		}
14559/******/ 		// Create a new module (and put it into the cache)
14560/******/ 		var module = installedModules[moduleId] = {
14561/******/ 			i: moduleId,
14562/******/ 			l: false,
14563/******/ 			exports: {}
14564/******/ 		};
14565/******/
14566/******/ 		// Execute the module function
14567/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
14568/******/
14569/******/ 		// Flag the module as loaded
vendor: 2,823 bytes, lines 14570-14635
14570/******/ 		module.l = true;
14571/******/
14572/******/ 		// Return the exports of the module
14573/******/ 		return module.exports;
14574/******/ 	}
14575/******/
14576/******/
14577/******/ 	// expose the modules object (__webpack_modules__)
14578/******/ 	__webpack_require__.m = modules;
14579/******/
14580/******/ 	// expose the module cache
14581/******/ 	__webpack_require__.c = installedModules;
14582/******/
14583/******/ 	// define getter function for harmony exports
14584/******/ 	__webpack_require__.d = function(exports, name, getter) {
14585/******/ 		if(!__webpack_require__.o(exports, name)) {
14586/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
14587/******/ 		}
14588/******/ 	};
14589/******/
14590/******/ 	// define __esModule on exports
14591/******/ 	__webpack_require__.r = function(exports) {
14592/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
14593/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
14594/******/ 		}
14595/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
14596/******/ 	};
14597/******/
14598/******/ 	// create a fake namespace object
14599/******/ 	// mode & 1: value is a module id, require it
14600/******/ 	// mode & 2: merge all properties of value into the ns
14601/******/ 	// mode & 4: return value when already ns object
14602/******/ 	// mode & 8|1: behave like require
14603/******/ 	__webpack_require__.t = function(value, mode) {
14604/******/ 		if(mode & 1) value = __webpack_require__(value);
14605/******/ 		if(mode & 8) return value;
14606/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
14607/******/ 		var ns = Object.create(null);
14608/******/ 		__webpack_require__.r(ns);
14609/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
14610/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
14611/******/ 		return ns;
14612/******/ 	};
14613/******/
14614/******/ 	// getDefaultExport function for compatibility with non-harmony modules
14615/******/ 	__webpack_require__.n = function(module) {
14616/******/ 		var getter = module && module.__esModule ?
14617/******/ 			function getDefault() { return module['default']; } :
14618/******/ 			function getModuleExports() { return module; };
14619/******/ 		__webpack_require__.d(getter, 'a', getter);
14620/******/ 		return getter;
14621/******/ 	};
14622/******/
14623/******/ 	// Object.prototype.hasOwnProperty.call
14624/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
14625/******/
14626/******/ 	// __webpack_public_path__
14627/******/ 	__webpack_require__.p = "/";
14628/******/
14629/******/
14630/******/ 	// Load entry module and return exports
14631/******/ 	return __webpack_require__(__webpack_require__.s = 8);
14632/******/ })
14633/************************************************************************/
14634/******/ ({
14635
14636/***/ "./src/components/form/form.js":
14637/*!*************************************!*\
14638  !*** ./src/components/form/form.js ***!
14639  \*************************************/
14640/*! no static exports found */
14641/***/ (function(module, exports, __webpack_require__) {
14642
14643"use strict";
14644
14645
14646(function ($, Drupal) {
14647  Drupal.behaviors.form = {
14648    attach: function attach(context) {
14649      if ($('.path-contact-us').length) {
14650        var path = $('.webform-confirmation', context).length;
14651
14652        if (path) {
14653          $('html, body').animate({
14654            scrollTop: $('.hero-intro').first().offset().top + 300
14655          }, 800);
14656        } //focus on fields with errors when form's submitted.
14657
14658
14659        $(".webform-button--submit").on("click", function () {
14660          var errorSubmission = $('.error:visible', context).not('strong.error'); // var countryConfirmation = $('#edit-country.has-value', context).length;
14661          // //Canada fields not filled
14662          // var provinceCANotFilled = $('#edit-province-state-canada', context).not('has-value').length;
14663          // var postaCANotFilled = $('#edit-postal-code-canada', context).not('has-value').length;
14664          // //USA fields not filled
14665          // var provinceUSANotFilled = $('#edit-province-state-usa', context).not('has-value').length;
14666          // var postaUSANotFilled = $('#edit-postal-code-usa', context).not('has-value').length;
14667
14668          if (errorSubmission.first().offset()) {
14669            //For the others fields with .error class
14670            $('html, body').animate({
14671              scrollTop: errorSubmission.first().offset().top - 250
14672            }, 800, function () {
14673              // Callback after animation
14674              // Must change focus!
14675              errorSubmission.first().focus();
14676            });
14677          } // else if (countryConfirmation && provinceCANotFilled) {
14678          //   //if country field are filled, but the .error class not appear on province and postal code fields, put a focus on them:
14679          //   $('html, body').animate({
14680          //     scrollTop: ($('#edit-province-state-canada', context).not('has-value').first().offset().top - 250)
14681          //   },800);
14682          // } else if (countryConfirmation && postaCANotFilled) {
14683          //   $('html, body').animate({
14684          //     scrollTop: ($('#edit-postal-code-canada', context).not('has-value').first().offset().top - 250)
14685          //   },800);
14686          // } else if (countryConfirmation && provinceUSANotFilled) {
14687          //     $('html, body').animate({
14688          //       scrollTop: ($('#edit-province-state-usa', context).not('has-value').first().offset().top - 250)
14689          //     },800);
14690          // } else if (countryConfirmation && postaUSANotFilled) {
14691          //   $('html, body').animate({
14692          //     scrollTop: ($('#edit-postal-code-usa', context).not('has-value').first().offset().top - 250)
14693          //   },800);
14694          // } else if ($('.path-frontpage')) {
14695          //   var path = $('.webform-confirmation', context).length;
14696          //   if(path) {
14697          //     $('html, body').animate({
14698          //       scrollTop: ($('.newsletter-form').first().offset().top - 100)
14699          //     },800);
14700          //   }
14701          // }
14702
14703        });
14704      }
14705
14706      if (!$('.path-user').length) {
14707        $(".form-control").each(function () {
14708          Drupal.behaviors.form.checkForInput(this, context);
14709        });
14710        $(".form-control").on("change keyup", function () {
14711          Drupal.behaviors.form.checkForInput(this, context);
14712        });
14713      }
14714
14715      $('.js-form-type-managed-file .form-check-input', context).change(function () {
14716        $(this).parent().siblings('[name="image_upload_remove_button"]').trigger("mousedown");
14717      }); // popovers
14718
14719      $('.popover-button').popover({
14720        html: true,
14721        trigger: 'manual'
14722      }).click(function (e) {
14723        $('.popover-button').not(this).popover('hide').css('z-index', '7999');
14724        $(this).popover('toggle').css('z-index', '8001');
14725      });
14726      $(document).click(function (e) {
14727        if (!$(e.target).is('.popover-button, .popover-title, .popover-content')) {
14728          $('.popover-button').popover('hide');
14729        }
14730      });
14731      $('.webform-submission-form select option', context).each(function () {
14732        if ($(this).val() == '') {
14733          $(this).text('');
14734        }
14735      });
14736      $('.webform-submission-form select option').each(function () {
14737        if ($(this).val() == '') {
14738          $(this).text('');
14739        }
14740      });
14741      $('#edit-email-confirmation-mail-2').removeAttr('autocomplete');
14742    },
14743    checkForInput: function checkForInput(element, context) {
14744      var $label = $(element).siblings("label");
14745
14746      if ($(element).val().length > 0) {
14747        $label.addClass("input-has-value");
14748        $(element).addClass("has-value");
14749      } else {
14750        $label.removeClass("input-has-value");
14751        $(element).removeClass("has-value");
14752      }
14753    }
14754  };
14755})(jQuery, Drupal);
14756
14757/***/ })
14757,
14758
14759/***/ 8:
14760/*!*******************************************!*\
14761  !*** multi ./src/components/form/form.js ***!
14762  \*******************************************/
14763/*! no static exports found */
14764/***/ (function(module, exports, __webpack_require__) {
14765
14766module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/form/form.js */"./src/components/form/form.js");
14767
14768
14769/***/ })
14770
14771/******/ });;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.