1/*! 2 * Flickity PACKAGED v2.3.0 3 * Touch, responsive, flickable carousels 4 * 5 * Licensed GPLv3 for open source use 6 * or Flickity Commercial License for commercial use 7 * 8 * https://flickity.metafizzy.co 9 * Copyright 2015-2021 Metafizzy 10 */ 11(function(e, i) { if (typeof define == "function" && define.amd) { define("jquery-bridget/jquery-bridget", ["jquery"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("jquery")) } else { e.jQueryBridget = i(e, e.jQuery) } })(window, function t(e, r) { 12 "use strict"; 13 var o = Array.prototype.slice; 14 var i = e.console; 15 var u = typeof i == "undefined" ? function() {} : function(t) { i.error(t) }; 16 17 function n(h, s, c) { 18 c = c || r || e.jQuery; 19 if (!c) { return } 20 if (!s.prototype.option) { 21 s.prototype.option = function(t) { 22 if (!c.isPlainObject(t)) { return } 23 this.options = c.extend(true, this.options, t) 24 } 25 } 26 c.fn[h] = function(t) { 27 if (typeof t == "string") { var e = o.call(arguments, 1); return i(this, t, e) } 28 n(this, t); 29 return this 30 }; 31 32 function i(t, r, o) { 33 var a; 34 var l = "$()." + h + '("' + r + '")'; 35 t.each(function(t, e) { 36 var i = c.data(e, h); 37 if (!i) { u(h + " not initialized. Cannot call methods, i.e. " + l); return } 38 var n = i[r]; 39 if (!n || r.charAt(0) == "_") { u(l + " is not a valid method"); return } 40 var s = n.apply(i, o); 41 a = a === undefined ? s : a 42 }); 43 return a !== undefined ? a : t 44 } 45 46 function n(t, n) { 47 t.each(function(t, e) { 48 var i = c.data(e, h); 49 if (i) { 50 i.option(n); 51 i._init() 52 } else { 53 i = new s(e, n); 54 c.data(e, h, i) 55 } 56 }) 57 } 58 a(c) 59 } 60 61 function a(t) { 62 if (!t || t && t.bridget) { return } 63 t.bridget = n 64 } 65 a(r || e.jQuery); 66 return n 67}); 68(function(t, e) { if (typeof define == "function" && define.amd) { define("ev-emitter/ev-emitter", e) } else if (typeof module == "object" && module.exports) { module.exports = e() } else { t.EvEmitter = e() } })(typeof window != "undefined" ? window : this, function() { 69 function t() {} 70 var e = t.prototype; 71 e.on = function(t, e) { if (!t || !e) { return } var i = this._events = this._events || {}; var n = i[t] = i[t] || []; if (n.indexOf(e) == -1) { n.push(e) } return this }; 72 e.once = function(t, e) { 73 if (!t || !e) { return } 74 this.on(t, e); 75 var i = this._onceEvents = this._onceEvents || {}; 76 var n = i[t] = i[t] || {}; 77 n[e] = true; 78 return this 79 }; 80 e.off = function(t, e) { var i = this._events && this._events[t]; if (!i || !i.length) { return } var n = i.indexOf(e); if (n != -1) { i.splice(n, 1) } return this }; 81 e.emitEvent = function(t, e) { 82 var i = this._events && this._events[t]; 83 if (!i || !i.length) { return } 84 i = i.slice(0); 85 e = e || []; 86 var n = this._onceEvents && this._onceEvents[t]; 87 for (var s = 0; s < i.length; s++) { 88 var r = i[s]; 89 var o = n && n[r]; 90 if (o) { 91 this.off(t, r); 92 delete n[r] 93 } 94 r.apply(this, e) 95 } 96 return this 97 }; 98 e.allOff = function() { 99 delete this._events; 100 delete this._onceEvents 101 }; 102 return t 103}); 104/*! 105 * getSize v2.0.3 106 * measure size of elements 107 * MIT license 108 */ 109(function(t, e) { if (typeof define == "function" && define.amd) { define("get-size/get-size", e) } else if (typeof module == "object" && module.exports) { module.exports = e() } else { t.getSize = e() } })(window, function t() { 110 "use strict"; 111 112 function m(t) { var e = parseFloat(t); var i = t.indexOf("%") == -1 && !isNaN(e); return i && e } 113 114 function e() {} 115 var i = typeof console == "undefined" ? e : function(t) { console.error(t) }; 116 var y = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; 117 var b = y.length; 118 119 function E() { 120 var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }; 121 for (var e = 0; e < b; e++) { 122 var i = y[e]; 123 t[i] = 0 124 } 125 return t 126 } 127 128 function S(t) { var e = getComputedStyle(t); if (!e) { i("Style returned " + e + ". Are you running this code in a hidden iframe on Firefox? " + "See https://bit.ly/getsizebug1") } return e } 129 var n = false; 130 var C; 131 132 function x() { 133 if (n) { return } 134 n = true; 135 var t = document.createElement("div"); 136 t.style.width = "200px"; 137 t.style.padding = "1px 2px 3px 4px"; 138 t.style.borderStyle = "solid"; 139 t.style.borderWidth = "1px 2px 3px 4px"; 140 t.style.boxSizing = "border-box"; 141 var e = document.body || document.documentElement; 142 e.appendChild(t); 143 var i = S(t); 144 C = Math.round(m(i.width)) == 200; 145 s.isBoxSizeOuter = C; 146 e.removeChild(t) 147 } 148 149 function s(t) { 150 x(); 151 if (typeof t == "string") { t = document.querySelector(t) } 152 if (!t || typeof t != "object" || !t.nodeType) { return } 153 var e = S(t);
154 if (e.display == "none") { return E() } 155 var i = {}; 156 i.width = t.offsetWidth; 157 i.height = t.offsetHeight; 158 var n = i.isBorderBox = e.boxSizing == "border-box"; 159 for (var s = 0; s < b; s++) { 160 var r = y[s]; 161 var o = e[r]; 162 var a = parseFloat(o); 163 i[r] = !isNaN(a) ? a : 0 164 } 165 var l = i.paddingLeft + i.paddingRight; 166 var h = i.paddingTop + i.paddingBottom; 167 var c = i.marginLeft + i.marginRight; 168 var u = i.marginTop + i.marginBottom; 169 var d = i.borderLeftWidth + i.borderRightWidth; 170 var f = i.borderTopWidth + i.borderBottomWidth; 171 var p = n && C; 172 var v = m(e.width); 173 if (v !== false) { i.width = v + (p ? 0 : l + d) } 174 var g = m(e.height); 175 if (g !== false) { i.height = g + (p ? 0 : h + f) } 176 i.innerWidth = i.width - (l + d); 177 i.innerHeight = i.height - (h + f); 178 i.outerWidth = i.width + c; 179 i.outerHeight = i.height + u; 180 return i 181 } 182 return s 183}); 184(function(t, e) { "use strict"; if (typeof define == "function" && define.amd) { define("desandro-matches-selector/matches-selector", e) } else if (typeof module == "object" && module.exports) { module.exports = e() } else { t.matchesSelector = e() } })(window, function t() { "use strict"; var n = function() { var t = window.Element.prototype; if (t.matches) { return "matches" } if (t.matchesSelector) { return "matchesSelector" } var e = ["webkit", "moz", "ms", "o"]; for (var i = 0; i < e.length; i++) { var n = e[i]; var s = n + "MatchesSelector"; if (t[s]) { return s } } }(); return function t(e, i) { return e[n](i) } }); 185(function(e, i) { if (typeof define == "function" && define.amd) { define("fizzy-ui-utils/utils", ["desandro-matches-selector/matches-selector"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("desandro-matches-selector")) } else { e.fizzyUIUtils = i(e, e.matchesSelector) } })(window, function t(h, r) { 186 var c = {}; 187 c.extend = function(t, e) { for (var i in e) { t[i] = e[i] } return t }; 188 c.modulo = function(t, e) { return (t % e + e) % e }; 189 var i = Array.prototype.slice; 190 c.makeArray = function(t) { if (Array.isArray(t)) { return t } if (t === null || t === undefined) { return [] } var e = typeof t == "object" && typeof t.length == "number"; if (e) { return i.call(t) } return [t] }; 191 c.removeFrom = function(t, e) { var i = t.indexOf(e); if (i != -1) { t.splice(i, 1) } }; 192 c.getParent = function(t, e) { while (t.parentNode && t != document.body) { t = t.parentNode; if (r(t, e)) { return t } } }; 193 c.getQueryElement = function(t) { if (typeof t == "string") { return document.querySelector(t) } return t }; 194 c.handleEvent = function(t) { var e = "on" + t.type; if (this[e]) { this[e](t) } }; 195 c.filterFindElements = function(t, n) { 196 t = c.makeArray(t); 197 var s = []; 198 t.forEach(function(t) { if (!(t instanceof HTMLElement)) { return } if (!n) { s.push(t); return } if (r(t, n)) { s.push(t) } var e = t.querySelectorAll(n); for (var i = 0; i < e.length; i++) { s.push(e[i]) } }); 199 return s 200 }; 201 c.debounceMethod = function(t, e, n) { 202 n = n || 100; 203 var s = t.prototype[e]; 204 var r = e + "Timeout"; 205 t.prototype[e] = function() { 206 var t = this[r]; 207 clearTimeout(t); 208 var e = arguments; 209 var i = this; 210 this[r] = setTimeout(function() { 211 s.apply(i, e); 212 delete i[r] 213 }, n) 214 } 215 }; 216 c.docReady = function(t) { var e = document.readyState; if (e == "complete" || e == "interactive") { setTimeout(t) } else { document.addEventListener("DOMContentLoaded", t) } }; 217 c.toDashed = function(t) { return t.replace(/(.)([A-Z])/g, function(t, e, i) { return e + "-" + i }).toLowerCase() }; 218 var u = h.console; 219 c.htmlInit = function(a, l) { 220 c.docReady(function() { 221 var t = c.toDashed(l); 222 var s = "data-" + t; 223 var e = document.querySelectorAll("[" + s + "]"); 224 var i = document.querySelectorAll(".js-" + t); 225 var n = c.makeArray(e).concat(c.makeArray(i)); 226 var r = s + "-options"; 227 var o = h.jQuery;
228 n.forEach(function(e) { var t = e.getAttribute(s) || e.getAttribute(r); var i; try { i = t && JSON.parse(t) } catch (t) { if (u) { u.error("Error parsing " + s + " on " + e.className + ": " + t) } return } var n = new a(e, i); if (o) { o.data(e, l, n) } }) 229 }) 230 }; 231 return c 232}); 233(function(e, i) { 234 if (typeof define == "function" && define.amd) { define("flickity/js/cell", ["get-size/get-size"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("get-size")) } else { 235 e.Flickity = e.Flickity || {}; 236 e.Flickity.Cell = i(e, e.getSize) 237 } 238})(window, function t(e, i) { 239 function n(t, e) { 240 this.element = t; 241 this.parent = e; 242 this.create() 243 } 244 var s = n.prototype; 245 s.create = function() { 246 this.element.style.position = "absolute"; 247 this.element.setAttribute("aria-hidden", "true"); 248 this.x = 0; 249 this.shift = 0; 250 this.element.style[this.parent.originSide] = 0 251 }; 252 s.destroy = function() { 253 this.unselect(); 254 this.element.style.position = ""; 255 var t = this.parent.originSide; 256 this.element.style[t] = ""; 257 this.element.style.transform = ""; 258 this.element.removeAttribute("aria-hidden") 259 }; 260 s.getSize = function() { this.size = i(this.element) }; 261 s.setPosition = function(t) { 262 this.x = t; 263 this.updateTarget(); 264 this.renderPosition(t) 265 }; 266 s.updateTarget = s.setDefaultTarget = function() { 267 var t = this.parent.originSide == "left" ? "marginLeft" : "marginRight"; 268 this.target = this.x + this.size[t] + this.size.width * this.parent.cellAlign 269 }; 270 s.renderPosition = function(t) { 271 var e = this.parent.originSide === "left" ? 1 : -1; 272 var i = this.parent.options.percentPosition ? t * e * (this.parent.size.innerWidth / this.size.width) : t * e; 273 this.element.style.transform = "translateX(" + this.parent.getPositionValue(i) + ")" 274 }; 275 s.select = function() { 276 this.element.classList.add("is-selected"); 277 this.element.removeAttribute("aria-hidden") 278 }; 279 s.unselect = function() { 280 this.element.classList.remove("is-selected"); 281 this.element.setAttribute("aria-hidden", "true") 282 }; 283 s.wrapShift = function(t) { 284 this.shift = t; 285 this.renderPosition(this.x + this.parent.slideableWidth * t) 286 }; 287 s.remove = function() { this.element.parentNode.removeChild(this.element) }; 288 return n 289}); 290(function(t, e) { 291 if (typeof define == "function" && define.amd) { define("flickity/js/slide", e) } else if (typeof module == "object" && module.exports) { module.exports = e() } else { 292 t.Flickity = t.Flickity || {}; 293 t.Flickity.Slide = e() 294 } 295})(window, function t() { 296 "use strict"; 297 298 function e(t) { 299 this.parent = t; 300 this.isOriginLeft = t.originSide == "left"; 301 this.cells = []; 302 this.outerWidth = 0; 303 this.height = 0 304 } 305 var i = e.prototype; 306 i.addCell = function(t) { 307 this.cells.push(t); 308 this.outerWidth += t.size.outerWidth; 309 this.height = Math.max(t.size.outerHeight, this.height); 310 if (this.cells.length == 1) { 311 this.x = t.x; 312 var e = this.isOriginLeft ? "marginLeft" : "marginRight"; 313 this.firstMargin = t.size[e] 314 } 315 }; 316 i.updateTarget = function() { 317 var t = this.isOriginLeft ? "marginRight" : "marginLeft"; 318 var e = this.getLastCell(); 319 var i = e ? e.size[t] : 0; 320 var n = this.outerWidth - (this.firstMargin + i); 321 this.target = this.x + this.firstMargin + n * this.parent.cellAlign 322 }; 323 i.getLastCell = function() { return this.cells[this.cells.length - 1] }; 324 i.select = function() { this.cells.forEach(function(t) { t.select() }) }; 325 i.unselect = function() { this.cells.forEach(function(t) { t.unselect() }) }; 326 i.getCellElements = function() { return this.cells.map(function(t) { return t.element }) }; 327 return e 328}); 329(function(e, i) { 330 if (typeof define == "function" && define.amd) { define("flickity/js/animate", ["fizzy-ui-utils/utils"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("fizzy-ui-utils")) } else { 331 e.Flickity = e.Flickity || {}; 332 e.Flickity.animatePrototype = i(e, e.fizzyUIUtils) 333 } 334})(window, function t(e, i) { 335 var n = {}; 336 n.startAnimation = function() { 337 if (this.isAnimating) { return } 338 this.isAnimating = true; 339 this.restingFrames = 0; 340 this.animate() 341 }; 342 n.animate = function() { 343 this.applyDragForce(); 344 this.applySelectedAttraction(); 345 var t = this.x; 346 this.integratePhysics(); 347 this.positionSlider(); 348 this.settle(t); 349 if (this.isAnimating) { 350 var e = this; 351 requestAnimationFrame(function t() { e.animate() }) 352 } 353 }; 354 n.positionSlider = function() { 355 var t = this.x; 356 if (this.options.wrapAround && this.cells.length > 1) { 357 t = i.modulo(t, this.slideableWidth);
358 t -= this.slideableWidth; 359 this.shiftWrapCells(t) 360 } 361 this.setTranslateX(t, this.isAnimating); 362 this.dispatchScrollEvent() 363 }; 364 n.setTranslateX = function(t, e) { 365 t += this.cursorPosition; 366 t = this.options.rightToLeft ? -t : t; 367 var i = this.getPositionValue(t); 368 this.slider.style.transform = e ? "translate3d(" + i + ",0,0)" : "translateX(" + i + ")" 369 }; 370 n.dispatchScrollEvent = function() { 371 var t = this.slides[0]; 372 if (!t) { return } 373 var e = -this.x - t.target; 374 var i = e / this.slidesWidth; 375 this.dispatchEvent("scroll", null, [i, e]) 376 }; 377 n.positionSliderAtSelected = function() { 378 if (!this.cells.length) { return } 379 this.x = -this.selectedSlide.target; 380 this.velocity = 0; 381 this.positionSlider() 382 }; 383 n.getPositionValue = function(t) { if (this.options.percentPosition) { return Math.round(t / this.size.innerWidth * 1e4) * .01 + "%" } else { return Math.round(t) + "px" } }; 384 n.settle = function(t) { 385 var e = !this.isPointerDown && Math.round(this.x * 100) == Math.round(t * 100); 386 if (e) { this.restingFrames++ } 387 if (this.restingFrames > 2) { 388 this.isAnimating = false; 389 delete this.isFreeScrolling; 390 this.positionSlider(); 391 this.dispatchEvent("settle", null, [this.selectedIndex]) 392 } 393 }; 394 n.shiftWrapCells = function(t) { 395 var e = this.cursorPosition + t; 396 this._shiftCells(this.beforeShiftCells, e, -1); 397 var i = this.size.innerWidth - (t + this.slideableWidth + this.cursorPosition); 398 this._shiftCells(this.afterShiftCells, i, 1) 399 }; 400 n._shiftCells = function(t, e, i) { 401 for (var n = 0; n < t.length; n++) { 402 var s = t[n]; 403 var r = e > 0 ? i : 0; 404 s.wrapShift(r); 405 e -= s.size.outerWidth 406 } 407 }; 408 n._unshiftCells = function(t) { if (!t || !t.length) { return } for (var e = 0; e < t.length; e++) { t[e].wrapShift(0) } }; 409 n.integratePhysics = function() { 410 this.x += this.velocity; 411 this.velocity *= this.getFrictionFactor() 412 }; 413 n.applyForce = function(t) { this.velocity += t }; 414 n.getFrictionFactor = function() { return 1 - this.options[this.isFreeScrolling ? "freeScrollFriction" : "friction"] }; 415 n.getRestingPosition = function() { return this.x + this.velocity / (1 - this.getFrictionFactor()) }; 416 n.applyDragForce = function() { 417 if (!this.isDraggable || !this.isPointerDown) { return } 418 var t = this.dragX - this.x; 419 var e = t - this.velocity; 420 this.applyForce(e) 421 }; 422 n.applySelectedAttraction = function() { 423 var t = this.isDraggable && this.isPointerDown; 424 if (t || this.isFreeScrolling || !this.slides.length) { return } 425 var e = this.selectedSlide.target * -1 - this.x; 426 var i = e * this.options.selectedAttraction; 427 this.applyForce(i) 428 }; 429 return n 430}); 431(function(o, a) { 432 if (typeof define == "function" && define.amd) { define("flickity/js/flickity", ["ev-emitter/ev-emitter", "get-size/get-size", "fizzy-ui-utils/utils", "./cell", "./slide", "./animate"], function(t, e, i, n, s, r) { return a(o, t, e, i, n, s, r) }) } else if (typeof module == "object" && module.exports) { module.exports = a(o, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./cell"), require("./sli
432de"), require("./animate")) } else { 433 var t = o.Flickity; 434 o.Flickity = a(o, o.EvEmitter, o.getSize, o.fizzyUIUtils, t.Cell, t.Slide, t.animatePrototype) 435 } 436})(window, function t(n, e, i, a, s, o, r) { 437 var l = n.jQuery; 438 var h = n.getComputedStyle; 439 var c = n.console; 440 441 function u(t, e) { t = a.makeArray(t); while (t.length) { e.appendChild(t.shift()) } } 442 var d = 0; 443 var f = {}; 444 445 function p(t, e) { 446 var i = a.getQueryElement(t); 447 if (!i) { if (c) { c.error("Bad element for Flickity: " + (i || t)) } return } 448 this.element = i; 449 if (this.element.flickityGUID) { var n = f[this.element.flickityGUID]; if (n) n.option(e); return n } 450 if (l) { this.$element = l(this.element) } 451 this.options = a.extend({}, this.constructor.defaults); 452 this.option(e); 453 this._create() 454 } 455 p.defaults = { accessibility: true, cellAlign: "center", freeScrollFriction: .075, friction: .28, namespaceJQueryEvents: true, percentPosition: true, resize: true, selectedAttraction: .025, setGallerySize: true }; 456 p.createMethods = []; 457 var v = p.prototype; 458 a.extend(v, e.prototype); 459 v._create = function() { 460 var t = this.guid = ++d; 461 this.element.flickityGUID = t; 462 f[t] = this; 463 this.selectedIndex = 0; 464 this.restingFrames = 0; 465 this.x = 0; 466 this.velocity = 0; 467 this.originSide = this.options.rightToLeft ? "right" : "left"; 468 this.viewport = document.createElement("div"); 469 this.viewport.className = "flickity-viewport"; 470 this._createSlider(); 471 if (this.options.resize || this.options.watchCSS) { n.addEventListener("resize", this) } 472 for (var e in this.options.on) { 473 var i = this.options.on[e]; 474 this.on(e, i) 475 } 476 p.createMethods.forEach(function(t) { this[t]() }, this); 477 if (this.options.watchCSS) { this.watchCSS() } else { this.activate() } 478 }; 479 v.option = function(t) { a.extend(this.options, t) }; 480 v.activate = function() { 481 if (this.isActive) { return } 482 this.isActive = true; 483 this.element.classList.add("flickity-enabled"); 484 if (this.options.rightToLeft) { this.element.classList.add("flickity-rtl") }
485 this.getSize(); 486 var t = this._filterFindCellElements(this.element.children); 487 u(t, this.slider); 488 this.viewport.appendChild(this.slider); 489 this.element.appendChild(this.viewport); 490 this.reloadCells(); 491 if (this.options.accessibility) { 492 this.element.tabIndex = 0; 493 this.element.addEventListener("keydown", this) 494 } 495 this.emitEvent("activate"); 496 this.selectInitialIndex(); 497 this.isInitActivated = true; 498 this.dispatchEvent("ready") 499 }; 500 v._createSlider = function() { 501 var t = document.createElement("div"); 502 t.className = "flickity-slider"; 503 t.style[this.originSide] = 0; 504 this.slider = t 505 }; 506 v._filterFindCellElements = function(t) { return a.filterFindElements(t, this.options.cellSelector) }; 507 v.reloadCells = function() { 508 this.cells = this._makeCells(this.slider.children); 509 this.positionCells(); 510 this._getWrapShiftCells(); 511 this.setGallerySize() 512 }; 513 v._makeCells = function(t) { var e = this._filterFindCellElements(t); var i = e.map(function(t) { return new s(t, this) }, this); return i }; 514 v.getLastCell = function() { return this.cells[this.cells.length - 1] }; 515 v.getLastSlide = function() { return this.slides[this.slides.length - 1] }; 516 v.positionCells = function() { 517 this._sizeCells(this.cells); 518 this._positionCells(0) 519 }; 520 v._positionCells = function(t) { 521 t = t || 0; 522 this.maxCellHeight = t ? this.maxCellHeight || 0 : 0; 523 var e = 0; 524 if (t > 0) { 525 var i = this.cells[t - 1]; 526 e = i.x + i.size.outerWidth 527 } 528 var n = this.cells.length; 529 for (var s = t; s < n; s++) { 530 var r = this.cells[s]; 531 r.setPosition(e); 532 e += r.size.outerWidth; 533 this.maxCellHeight = Math.max(r.size.outerHeight, this.maxCellHeight) 534 } 535 this.slideableWidth = e; 536 this.updateSlides(); 537 this._containSlides(); 538 this.slidesWidth = n ? this.getLastSlide().target - this.slides[0].target : 0 539 }; 540 v._sizeCells = function(t) { t.forEach(function(t) { t.getSize() }) }; 541 v.updateSlides = function() { 542 this.slides = []; 543 if (!this.cells.length) { return } 544 var n = new o(this); 545 this.slides.push(n); 546 var t = this.originSide == "left"; 547 var s = t ? "marginRight" : "marginLeft"; 548 var r = this._getCanCellFit(); 549 this.cells.forEach(function(t, e) { 550 if (!n.cells.length) { n.addCell(t); return } 551 var i = n.outerWidth - n.firstMargin + (t.size.outerWidth - t.size[s]); 552 if (r.call(this, e, i)) { n.addCell(t) } else { 553 n.updateTarget(); 554 n = new o(this); 555 this.slides.push(n); 556 n.addCell(t) 557 } 558 }, this); 559 n.updateTarget(); 560 this.updateSelectedSlide() 561 }; 562 v._getCanCellFit = function() { var t = this.options.groupCells; if (!t) { return function() { return false } } else if (typeof t == "number") { var e = parseInt(t, 10); return function(t) { return t % e !== 0 } } var i = typeof t == "string" && t.match(/^(\d+)%$/); var n = i ? parseInt(i[1], 10) / 100 : 1; return function(t, e) { return e <= (this.size.innerWidth + 1) * n } }; 563 v._init = v.reposition = function() { 564 this.positionCells(); 565 this.positionSliderAtSelected() 566 }; 567 v.getSize = function() { 568 this.size = i(this.element); 569 this.setCellAlign(); 570 this.cursorPosition = this.size.innerWidth * this.cellAlign 571 }; 572 var g = { center: { left: .5, right: .5 }, left: { left: 0, right: 1 }, right: { right: 0, left: 1 } }; 573 v.setCellAlign = function() { 574 var t = g[this.options.cellAlign]; 575 this.cellAlign = t ? t[this.originSide] : this.options.cellAlign 576 }; 577 v.setGallerySize = function() { 578 if (this.options.setGallerySize) { 579 var t = this.options.adaptiveHeight && this.selectedSlide ? this.selectedSlide.height : this.maxCellHeight; 580 this.viewport.style.height = t + "px" 581 } 582 }; 583 v._getWrapShiftCells = function() { 584 if (!this.options.wrapAround) { return } 585 this._unshiftCells(this.beforeShiftCells); 586 this._unshiftCells(this.afterShiftCells); 587 var t = this.cursorPosition; 588 var e = this.cells.length - 1; 589 this.beforeShiftCells = this._getGapCells(t, e, -1); 590 t = this.size.innerWidth - this.cursorPosition; 591 this.afterShiftCells = this._getGapCells(t, 0, 1) 592 }; 593 v._getGapCells = function(t, e, i) { 594 var n = []; 595 while (t > 0) { 596 var s = this.cells[e]; 597 if (!s) { break } 598 n.push(s); 599 e += i; 600 t -= s.size.outerWidth 601 } 602 return n 603 }; 604 v._containSlides = function() { 605 if (!this.options.contain || this.options.wrapAround || !this.cells.length) { return } 606 var t = this.options.rightToLeft; 607 var e = t ? "marginRight" : "marginLeft"; 608 var i = t ? "marginLeft" : "marginRight"; 609 var n = this.slideableWidth - this.getLastCell().size[i]; 610 var s = n < this.size.innerWidth; 611 var r = this.cursorPosition + this.cells[0].size[e]; 612 var o = n - this.size.innerWidth * (1 - this.cellAlign);
613 this.slides.forEach(function(t) { 614 if (s) { t.target = n * this.cellAlign } else { 615 t.target = Math.max(t.target, r); 616 t.target = Math.min(t.target, o) 617 } 618 }, this) 619 }; 620 v.dispatchEvent = function(t, e, i) { 621 var n = e ? [e].concat(i) : i; 622 this.emitEvent(t, n); 623 if (l && this.$element) { 624 t += this.options.namespaceJQueryEvents ? ".flickity" : ""; 625 var s = t; 626 if (e) { 627 var r = new l.Event(e); 628 r.type = t; 629 s = r 630 } 631 this.$element.trigger(s, i) 632 } 633 }; 634 v.select = function(t, e, i) { 635 if (!this.isActive) { return } 636 t = parseInt(t, 10); 637 this._wrapSelect(t); 638 if (this.options.wrapAround || e) { t = a.modulo(t, this.slides.length) } 639 if (!this.slides[t]) { return } 640 var n = this.selectedIndex; 641 this.selectedIndex = t; 642 this.updateSelectedSlide(); 643 if (i) { this.positionSliderAtSelected() } else { this.startAnimation() } 644 if (this.options.adaptiveHeight) { this.setGallerySize() } 645 this.dispatchEvent("select", null, [t]); 646 if (t != n) { this.dispatchEvent("change", null, [t]) } 647 this.dispatchEvent("cellSelect") 648 }; 649 v._wrapSelect = function(t) { var e = this.slides.length; var i = this.options.wrapAround && e > 1; if (!i) { return t } var n = a.modulo(t, e); var s = Math.abs(n - this.selectedIndex); var r = Math.abs(n + e - this.selectedIndex); var o = Math.abs(n - e - this.selectedIndex); if (!this.isDragSelect && r < s) { t += e } else if (!this.isDragSelect && o < s) { t -= e } if (t < 0) { this.x -= this.slideableWidth } else if (t >= e) { this.x += this.slideableWidth } }; 650 v.previous = function(t, e) { this.select(this.selectedIndex - 1, t, e) }; 651 v.next = function(t, e) { this.select(this.selectedIndex + 1, t, e) }; 652 v.updateSelectedSlide = function() { 653 var t = this.slides[this.selectedIndex]; 654 if (!t) { return } 655 this.unselectSelectedSlide(); 656 this.selectedSlide = t; 657 t.select(); 658 this.selectedCells = t.cells; 659 this.selectedElements = t.getCellElements(); 660 this.selectedCell = t.cells[0]; 661 this.selectedElement = this.selectedElements[0] 662 }; 663 v.unselectSelectedSlide = function() { if (this.selectedSlide) { this.selectedSlide.unselect() } }; 664 v.selectInitialIndex = function() { 665 var t = this.options.initialIndex; 666 if (this.isInitActivated) { this.select(this.selectedIndex, false, true); return } 667 if (t && typeof t == "string") { var e = this.queryCell(t); if (e) { this.selectCell(t, false, true); return } } 668 var i = 0; 669 if (t && this.slides[t]) { i = t } 670 this.select(i, false, true) 671 }; 672 v.selectCell = function(t, e, i) { 673 var n = this.queryCell(t); 674 if (!n) { return } 675 var s = this.getCellSlideIndex(n); 676 this.select(s, e, i) 677 }; 678 v.getCellSlideIndex = function(t) { for (var e = 0; e < this.slides.length; e++) { var i = this.slides[e]; var n = i.cells.indexOf(t); if (n != -1) { return e } } }; 679 v.getCell = function(t) { for (var e = 0; e < this.cells.length; e++) { var i = this.cells[e]; if (i.element == t) { return i } } }; 680 v.getCells = function(t) { 681 t = a.makeArray(t); 682 var i = []; 683 t.forEach(function(t) { var e = this.getCell(t); if (e) { i.push(e) } }, this); 684 return i 685 }; 686 v.getCellElements = function() { return this.cells.map(function(t) { return t.element }) }; 687 v.getParentCell = function(t) { 688 var e = this.getCell(t); 689 if (e) { return e } 690 t = a.getParent(t, ".flickity-slider > *"); 691 return this.getCell(t) 692 }; 693 v.getAdjacentCellElements = function(t, e) { 694 if (!t) { return this.selectedSlide.getCellElements() } 695 e = e === undefined ? this.selectedIndex : e; 696 var i = this.slides.length; 697 if (1 + t * 2 >= i) { return this.getCellElements() } 698 var n = []; 699 for (var s = e - t; s <= e + t; s++) { var r = this.options.wrapAround ? a.modulo(s, i) : s; var o = this.slides[r]; if (o) { n = n.concat(o.getCellElements()) } } 700 return n 701 }; 702 v.queryCell = function(t) { 703 if (typeof t == "number") { return this.cells[t] } 704 if (typeof t == "string") { 705 if (t.match(/^[#.]?[\d/]/)) { return } 706 t = this.element.querySelector(t) 707 } 708 return this.getCell(t) 709 }; 710 v.uiChange = function() { this.emitEvent("uiChange") }; 711 v.childUIPointerDown = function(t) { 712 if (t.type != "touchstart") { t.preventDefault() } 713 this.focus() 714 }; 715 v.onresize = function() { 716 this.watchCSS(); 717 this.resize() 718 }; 719 a.debounceMethod(p, "onresize", 150); 720 v.resize = function() { 721 if (!this.isActive || this.isAnimating || this.isDragging) { return }
722 this.getSize(); 723 if (this.options.wrapAround) { this.x = a.modulo(this.x, this.slideableWidth) } 724 this.positionCells(); 725 this._getWrapShiftCells(); 726 this.setGallerySize(); 727 this.emitEvent("resize"); 728 var t = this.selectedElements && this.selectedElements[0]; 729 this.selectCell(t, false, true) 730 }; 731 v.watchCSS = function() { var t = this.options.watchCSS; if (!t) { return } var e = h(this.element, ":after").content; if (e.indexOf("flickity") != -1) { this.activate() } else { this.deactivate() } }; 732 v.onkeydown = function(t) { var e = document.activeElement && document.activeElement != this.element; if (!this.options.accessibility || e) { return } var i = p.keyboardHandlers[t.keyCode]; if (i) { i.call(this) } }; 733 p.keyboardHandlers = { 734 37: function() { 735 var t = this.options.rightToLeft ? "next" : "previous"; 736 this.uiChange(); 737 this[t]() 738 }, 739 39: function() { 740 var t = this.options.rightToLeft ? "previous" : "next"; 741 this.uiChange(); 742 this[t]() 743 } 744 }; 745 v.focus = function() { 746 var t = n.pageYOffset; 747 this.element.focus({ preventScroll: true }); 748 if (n.pageYOffset != t) { n.scrollTo(n.pageXOffset, t) } 749 }; 750 v.deactivate = function() { 751 if (!this.isActive) { return } 752 this.element.classList.remove("flickity-enabled"); 753 this.element.classList.remove("flickity-rtl"); 754 this.unselectSelectedSlide(); 755 this.cells.forEach(function(t) { t.destroy() }); 756 this.element.removeChild(this.viewport); 757 u(this.slider.children, this.element); 758 if (this.options.accessibility) { 759 this.element.removeAttribute("tabIndex"); 760 this.element.removeEventListener("keydown", this) 761 } 762 this.isActive = false; 763 this.emitEvent("deactivate") 764 }; 765 v.destroy = function() { 766 this.deactivate(); 767 n.removeEventListener("resize", this); 768 this.allOff(); 769 this.emitEvent("destroy"); 770 if (l && this.$element) { l.removeData(this.element, "flickity") } 771 delete this.element.flickityGUID; 772 delete f[this.guid] 773 }; 774 a.extend(v, r); 775 p.data = function(t) { t = a.getQueryElement(t); var e = t && t.flickityGUID; return e && f[e] }; 776 a.htmlInit(p, "flickity"); 777 if (l && l.bridget) { l.bridget("flickity", p) } 778 p.setJQuery = function(t) { l = t }; 779 p.Cell = s; 780 p.Slide = o; 781 return p 782}); 783/*! 784 * Unipointer v2.4.0 785 * base class for doing one thing with pointer event 786 * MIT license 787 */ 788(function(e, i) { if (typeof define == "function" && define.amd) { define("unipointer/unipointer", ["ev-emitter/ev-emitter"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("ev-emitter")) } else { e.Unipointer = i(e, e.EvEmitter) } })(window, function t(s, e) { 789 function i() {} 790 791 function n() {} 792 var r = n.prototype = Object.create(e.prototype); 793 r.bindStartEvent = function(t) { this._bindStartEvent(t, true) }; 794 r.unbindStartEvent = function(t) { this._bindStartEvent(t, false) }; 795 r._bindStartEvent = function(t, e) { 796 e = e === undefined ? true : e; 797 var i = e ? "addEventListener" : "removeEventListener"; 798 var n = "mousedown"; 799 if ("ontouchstart" in s) { n = "touchstart" } else if (s.PointerEvent) { n = "pointerdown" } 800 t[i](n, this) 801 }; 802 r.handleEvent = function(t) { var e = "on" + t.type; if (this[e]) { this[e](t) } }; 803 r.getTouch = function(t) { for (var e = 0; e < t.length; e++) { var i = t[e]; if (i.identifier == this.pointerIdentifier) { return i } } }; 804 r.onmousedown = function(t) { 805 var e = t.button; 806 if (e && (e !== 0 && e !== 1)) { return } 807 this._pointerDown(t, t) 808 }; 809 r.ontouchstart = function(t) { this._pointerDown(t, t.changedTouches[0]) }; 810 r.onpointerdown = function(t) { this._pointerDown(t, t) }; 811 r._pointerDown = function(t, e) { 812 if (t.button || this.isPointerDown) { return } 813 this.isPointerDown = true; 814 this.pointerIdentifier = e.pointerId !== undefined ? e.pointerId : e.identifier; 815 this.pointerDown(t, e) 816 }; 817 r.pointerDown = function(t, e) { 818 this._bindPostStartEvents(t); 819 this.emitEvent("pointerDown", [t, e]) 820 }; 821 var o = { mousedown: ["mousemove", "mouseup"], touchstart: ["touchmove", "touchend", "touchcancel"], pointerdown: ["pointermove", "pointerup", "pointercancel"] }; 822 r._bindPostStartEvents = function(t) { 823 if (!t) { return } 824 var e = o[t.type]; 825 e.forEach(function(t) { s.addEventListener(t, this) }, this); 826 this._boundPointerEvents = e 827 }; 828 r._unbindPostStartEvents = function() { 829 if (!this._boundPointerEvents) { return }
830 this._boundPointerEvents.forEach(function(t) { s.removeEventListener(t, this) }, this); 831 delete this._boundPointerEvents 832 }; 833 r.onmousemove = function(t) { this._pointerMove(t, t) }; 834 r.onpointermove = function(t) { if (t.pointerId == this.pointerIdentifier) { this._pointerMove(t, t) } }; 835 r.ontouchmove = function(t) { var e = this.getTouch(t.changedTouches); if (e) { this._pointerMove(t, e) } }; 836 r._pointerMove = function(t, e) { this.pointerMove(t, e) }; 837 r.pointerMove = function(t, e) { this.emitEvent("pointerMove", [t, e]) }; 838 r.onmouseup = function(t) { this._pointerUp(t, t) }; 839 r.onpointerup = function(t) { if (t.pointerId == this.pointerIdentifier) { this._pointerUp(t, t) } }; 840 r.ontouchend = function(t) { var e = this.getTouch(t.changedTouches); if (e) { this._pointerUp(t, e) } }; 841 r._pointerUp = function(t, e) { 842 this._pointerDone(); 843 this.pointerUp(t, e) 844 }; 845 r.pointerUp = function(t, e) { this.emitEvent("pointerUp", [t, e]) }; 846 r._pointerDone = function() { 847 this._pointerReset(); 848 this._unbindPostStartEvents(); 849 this.pointerDone() 850 }; 851 r._pointerReset = function() { 852 this.isPointerDown = false; 853 delete this.pointerIdentifier 854 }; 855 r.pointerDone = i; 856 r.onpointercancel = function(t) { if (t.pointerId == this.pointerIdentifier) { this._pointerCancel(t, t) } }; 857 r.ontouchcancel = function(t) { var e = this.getTouch(t.changedTouches); if (e) { this._pointerCancel(t, e) } }; 858 r._pointerCancel = function(t, e) { 859 this._pointerDone(); 860 this.pointerCancel(t, e) 861 }; 862 r.pointerCancel = function(t, e) { this.emitEvent("pointerCancel", [t, e]) }; 863 n.getPointerPoint = function(t) { return { x: t.pageX, y: t.pageY } }; 864 return n 865}); 866/*! 867 * Unidragger v2.4.0 868 * Draggable base class 869 * MIT license 870 */ 871(function(e, i) { if (typeof define == "function" && define.amd) { define("unidragger/unidragger", ["unipointer/unipointer"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("unipointer")) } else { e.Unidragger = i(e, e.Unipointer) } })(window, function t(r, e) { 872 function i() {} 873 var n = i.prototype = Object.create(e.prototype); 874 n.bindHandles = function() { this._bindHandles(true) }; 875 n.unbindHandles = function() { this._bindHandles(false) }; 876 n._bindHandles = function(t) { 877 t = t === undefined ? true : t; 878 var e = t ? "addEventListener" : "removeEventListener"; 879 var i = t ? this._touchActionValue : ""; 880 for (var n = 0; n < this.handles.length; n++) { 881 var s = this.handles[n]; 882 this._bindStartEvent(s, t); 883 s[e]("click", this); 884 if (r.PointerEvent) { s.style.touchAction = i } 885 } 886 }; 887 n._touchActionValue = "none"; 888 n.pointerDown = function(t, e) { 889 var i = this.okayPointerDown(t); 890 if (!i) { return } 891 this.pointerDownPointer = { pageX: e.pageX, pageY: e.pageY }; 892 t.preventDefault(); 893 this.pointerDownBlur(); 894 this._bindPostStartEvents(t); 895 this.emitEvent("pointerDown", [t, e]) 896 }; 897 var s = { TEXTAREA: true, INPUT: true, SELECT: true, OPTION: true }; 898 var o = { radio: true, checkbox: true, button: true, submit: true, image: true, file: true }; 899 n.okayPointerDown = function(t) { var e = s[t.target.nodeName]; var i = o[t.target.type]; var n = !e || i; if (!n) { this._pointerReset() } return n }; 900 n.pointerDownBlur = function() { var t = document.activeElement; var e = t && t.blur && t != document.body; if (e) { t.blur() } }; 901 n.pointerMove = function(t, e) { 902 var i = this._dragPointerMove(t, e); 903 this.emitEvent("pointerMove", [t, e, i]); 904 this._dragMove(t, e, i) 905 }; 906 n._dragPointerMove = function(t, e) { var i = { x: e.pageX - this.pointerDownPointer.pageX, y: e.pageY - this.pointerDownPointer.pageY }; if (!this.isDragging && this.hasDragStarted(i)) { this._dragStart(t, e) } return i }; 907 n.hasDragStarted = function(t) { return Math.abs(t.x) > 3 || Math.abs(t.y) > 3 }; 908 n.pointerUp = function(t, e) { 909 this.emitEvent("pointerUp", [t, e]); 910 this._dragPointerUp(t, e) 911 }; 912 n._dragPointerUp = function(t, e) { if (this.isDragging) { this._dragEnd(t, e) } else { this._staticClick(t, e) } }; 913 n._dragStart = function(t, e) { 914 this.isDragging = true;
915 this.isPreventingClicks = true; 916 this.dragStart(t, e) 917 }; 918 n.dragStart = function(t, e) { this.emitEvent("dragStart", [t, e]) }; 919 n._dragMove = function(t, e, i) { 920 if (!this.isDragging) { return } 921 this.dragMove(t, e, i) 922 }; 923 n.dragMove = function(t, e, i) { 924 t.preventDefault(); 925 this.emitEvent("dragMove", [t, e, i]) 926 }; 927 n._dragEnd = function(t, e) { 928 this.isDragging = false; 929 setTimeout(function() { delete this.isPreventingClicks }.bind(this)); 930 this.dragEnd(t, e) 931 }; 932 n.dragEnd = function(t, e) { this.emitEvent("dragEnd", [t, e]) }; 933 n.onclick = function(t) { if (this.isPreventingClicks) { t.preventDefault() } }; 934 n._staticClick = function(t, e) { 935 if (this.isIgnoringMouseUp && t.type == "mouseup") { return } 936 this.staticClick(t, e); 937 if (t.type != "mouseup") { 938 this.isIgnoringMouseUp = true; 939 setTimeout(function() { delete this.isIgnoringMouseUp }.bind(this), 400) 940 } 941 }; 942 n.staticClick = function(t, e) { this.emitEvent("staticClick", [t, e]) }; 943 i.getPointerPoint = e.getPointerPoint; 944 return i 945}); 946(function(n, s) { if (typeof define == "function" && define.amd) { define("flickity/js/drag", ["./flickity", "unidragger/unidragger", "fizzy-ui-utils/utils"], function(t, e, i) { return s(n, t, e, i) }) } else if (typeof module == "object" && module.exports) { module.exports = s(n, require("./flickity"), require("unidragger"), require("fizzy-ui-utils")) } else { n.Flickity = s(n, n.Flickity, n.Unidragger, n.fizzyUIUtils) } })(window, function t(n, e, i, a) { 947 a.extend(e.defaults, { draggable: ">1", dragThreshold: 3 }); 948 e.createMethods.push("_createDrag"); 949 var s = e.prototype; 950 a.extend(s, i.prototype); 951 s._touchActionValue = "pan-y"; 952 s._createDrag = function() { 953 this.on("activate", this.onActivateDrag); 954 this.on("uiChange", this._uiChangeDrag); 955 this.on("deactivate", this.onDeactivateDrag); 956 this.on("cellChange", this.updateDraggable) 957 }; 958 s.onActivateDrag = function() { 959 this.handles = [this.viewport]; 960 this.bindHandles(); 961 this.updateDraggable() 962 }; 963 s.onDeactivateDrag = function() { 964 this.unbindHandles(); 965 this.element.classList.remove("is-draggable") 966 }; 967 s.updateDraggable = function() { if (this.options.draggable == ">1") { this.isDraggable = this.slides.length > 1 } else { this.isDraggable = this.options.draggable } if (this.isDraggable) { this.element.classList.add("is-draggable") } else { this.element.classList.remove("is-draggable") } }; 968 s.bindDrag = function() { 969 this.options.draggable = true; 970 this.updateDraggable() 971 }; 972 s.unbindDrag = function() { 973 this.options.draggable = false; 974 this.updateDraggable() 975 }; 976 s._uiChangeDrag = function() { delete this.isFreeScrolling }; 977 s.pointerDown = function(t, e) { 978 if (!this.isDraggable) { this._pointerDownDefault(t, e); return } 979 var i = this.okayPointerDown(t); 980 if (!i) { return } 981 this._pointerDownPreventDefault(t); 982 this.pointerDownFocus(t); 983 if (document.activeElement != this.element) { this.pointerDownBlur() } 984 this.dragX = this.x; 985 this.viewport.classList.add("is-pointer-down"); 986 this.pointerDownScroll = o(); 987 n.addEventListener("scroll", this); 988 this._pointerDownDefault(t, e) 989 }; 990 s._pointerDownDefault = function(t, e) { 991 this.pointerDownPointer = { pageX: e.pageX, pageY: e.pageY }; 992 this._bindPostStartEvents(t); 993 this.dispatchEvent("pointerDown", t, [e]) 994 }; 995 var r = { INPUT: true, TEXTAREA: true, SELECT: true }; 996 s.pointerDownFocus = function(t) { var e = r[t.target.nodeName]; if (!e) { this.focus() } }; 997 s._pointerDownPreventDefault = function(t) { var e = t.type == "touchstart"; var i = t.pointerType == "touch"; var n = r[t.target.nodeName]; if (!e && !i && !n) { t.preventDefault() } }; 998 s.hasDragStarted = function(t) { return Math.abs(t.x) > this.options.dragThreshold }; 999 s.pointerUp = function(t, e) { 1000 delete this.isTouchScrolling; 1001 this.viewport.classList.remove("is-pointer-down"); 1002 this.dispatchEvent("pointerUp", t, [e]); 1003 this._dragPointerUp(t, e) 1004 }; 1005 s.pointerDone = function() { 1006 n.removeEventListener("scroll", this); 1007 delete this.pointerDownScroll 1008 }; 1009 s.dragStart = function(t, e) { 1010 if (!this.isDraggable) { return } 1011 this.dragStartPosition = this.x; 1012 this.startAnimation(); 1013 n.removeEventListener("scroll", this); 1014 this.dispatchEvent("dragStart", t, [e]) 1015 }; 1016 s.pointerMove = function(t, e) { 1017 var i = this._dragPointerMove(t, e); 1018 this.dispatchEvent("pointerMove", t, [e, i]); 1019 this._dragMove(t, e, i) 1020 }; 1021 s.dragMove = function(t, e, i) { 1022 if (!this.isDraggable) { return } 1023 t.preventDefault(); 1024 this.previousDragX = this.dragX; 1025 var n = this.options.rightToLeft ? -1 : 1; 1026 if (this.options.wrapAround) { i.x %= this.slideableWidth } 1027 var s = this.dragStartPosition + i.x * n; 1028 if (!this.options.wrapAround && this.slides.length) { 1029 var r = Math.max(-this.slides[0].target, this.dragStartPosition); 1030 s = s > r ? (s + r) * .5 : s; 1031 var o = Math.min(-this.getLastSlide().target, this.dragStartPosition); 1032 s = s < o ? (s + o) * .5 : s 1033 } 1034 this.dragX = s; 1035 this.dragMoveTime = new Date; 1036 this.dispatchEvent("dragMove", t, [e, i]) 1037 }; 1038 s.dragEnd = function(t, e) { 1039 if (!this.isDraggable) { return } 1040 if (this.options.freeScroll) { this.isFreeScrolling = true } 1041 var i = this.dragEndRestingSelect(); 1042 if (this.options.freeScroll && !this.options.wrapAround) { 1043 var n = this.getRestingPosition(); 1044 this.isFreeScrolling = -n > this.slides[0].target && -n < this.getLastSlide().target 1045 } else if (!this.options.freeScroll && i == this.selectedIndex) { i += this.dragEndBoostSelect() } 1046 delete this.previousDragX; 1047 this.isDragSelect = this.options.wrapAround; 1048 this.select(i); 1049 delete this.isDragSelect; 1050 this.dispatchEvent("dragEnd", t, [e]) 1051 }; 1052 s.dragEndRestingSelect = function() { var t = this.getRestingPosition(); var e = Math.abs(this.getSlideDistance(-t, this.selectedIndex)); var i = this._getClosestResting(t, e, 1); var n = this._getClosestResting(t, e, -1); var s = i.distance < n.distance ? i.index : n.index; return s }; 1053 s._getClosestResting = function(t, e, i) { 1054 var n = this.selectedIndex; 1055 var s = Infinity; 1056 var r = this.options.contain && !this.options.wrapAround ? function(t, e) { return t <= e } : function(t, e) { return t < e }; 1057 while (r(e, s)) { 1058 n += i; 1059 s = e;
1060 e = this.getSlideDistance(-t, n); 1061 if (e === null) { break } 1062 e = Math.abs(e) 1063 } 1064 return { distance: s, index: n - i } 1065 }; 1066 s.getSlideDistance = function(t, e) { var i = this.slides.length; var n = this.options.wrapAround && i > 1; var s = n ? a.modulo(e, i) : e; var r = this.slides[s]; if (!r) { return null } var o = n ? this.slideableWidth * Math.floor(e / i) : 0; return t - (r.target + o) }; 1067 s.dragEndBoostSelect = function() { if (this.previousDragX === undefined || !this.dragMoveTime || new Date - this.dragMoveTime > 100) { return 0 } var t = this.getSlideDistance(-this.dragX, this.selectedIndex); var e = this.previousDragX - this.dragX; if (t > 0 && e > 0) { return 1 } else if (t < 0 && e < 0) { return -1 } return 0 }; 1068 s.staticClick = function(t, e) { 1069 var i = this.getParentCell(t.target); 1070 var n = i && i.element; 1071 var s = i && this.cells.indexOf(i); 1072 this.dispatchEvent("staticClick", t, [e, n, s]) 1073 }; 1074 s.onscroll = function() { var t = o(); var e = this.pointerDownScroll.x - t.x; var i = this.pointerDownScroll.y - t.y; if (Math.abs(e) > 3 || Math.abs(i) > 3) { this._pointerDone() } }; 1075 1076 function o() { return { x: n.pageXOffset, y: n.pageYOffset } } 1077 return e 1078}); 1079(function(n, s) { if (typeof define == "function" && define.amd) { define("flickity/js/prev-next-button", ["./flickity", "unipointer/unipointer", "fizzy-ui-utils/utils"], function(t, e, i) { return s(n, t, e, i) }) } else if (typeof module == "object" && module.exports) { module.exports = s(n, require("./flickity"), require("unipointer"), require("fizzy-ui-utils")) } else { s(n, n.Flickity, n.Unipointer, n.fizzyUIUtils) } })(window, function t(e, i, n, s) { 1080 "use strict"; 1081 var r = "http://www.w3.org/2000/svg"; 1082 1083 function o(t, e) { 1084 this.direction = t; 1085 this.parent = e; 1086 this._create() 1087 } 1088 o.prototype = Object.create(n.prototype); 1089 o.prototype._create = function() { 1090 this.isEnabled = true; 1091 this.isPrevious = this.direction == -1; 1092 var t = this.parent.options.rightToLeft ? 1 : -1; 1093 this.isLeft = this.direction == t; 1094 var e = this.element = document.createElement("button"); 1095 e.className = "flickity-button flickity-prev-next-button"; 1096 e.className += this.isPrevious ? " previous" : " next"; 1097 e.setAttribute("type", "button"); 1098 this.disable(); 1099 e.setAttribute("aria-label", this.isPrevious ? "Previous" : "Next"); 1100 var i = this.createSVG(); 1101 e.appendChild(i); 1102 this.parent.on("select", this.update.bind(this)); 1103 this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)) 1104 }; 1105 o.prototype.activate = function() { 1106 this.bindStartEvent(this.element); 1107 this.element.addEventListener("click", this); 1108 this.parent.element.appendChild(this.element) 1109 }; 1110 o.prototype.deactivate = function() { 1111 this.parent.element.removeChild(this.element); 1112 this.unbindStartEvent(this.element); 1113 this.element.removeEventListener("click", this) 1114 }; 1115 o.prototype.createSVG = function() { 1116 var t = document.createElementNS(r, "svg"); 1117 t.setAttribute("class", "flickity-button-icon"); 1118 t.setAttribute("viewBox", "0 0 100 100"); 1119 var e = document.createElementNS(r, "path"); 1120 var i = a(this.parent.options.arrowShape); 1121 e.setAttribute("d", i); 1122 e.setAttribute("class", "arrow"); 1123 if (!this.isLeft) { e.setAttribute("transform", "translate(100, 100) rotate(180) ") } 1124 t.appendChild(e); 1125 return t 1126 }; 1127 1128 function a(t) { if (typeof t == "string") { return t } return "M " + t.x0 + ",50" + " L " + t.x1 + "," + (t.y1 + 50) + " L " + t.x2 + "," + (t.y2 + 50) + " L " + t.x3 + ",50 " + " L " + t.x2 + "," + (50 - t.y2) + " L " + t.x1 + "," + (50 - t.y1) + " Z" } 1129 o.prototype.handleEvent = s.handleEvent; 1130 o.prototype.onclick = function() { 1131 if (!this.isEnabled) { return } 1132 this.parent.uiChange(); 1133 var t = this.isPrevious ? "previous" : "next"; 1134 this.parent[t]() 1135 }; 1136 o.prototype.enable = function() { 1137 if (this.isEnabled) { return } 1138 this.element.disabled = false; 1139 this.isEnabled = true 1140 }; 1141 o.prototype.disable = function() { 1142 if (!this.isEnabled) { return } 1143 this.element.disabled = true; 1144 this.isEnabled = false 1145 }; 1146 o.prototype.update = function() { 1147 var t = this.parent.slides; 1148 if (this.parent.options.wrapAround && t.length > 1) { this.enable(); return } 1149 var e = t.length ? t.length - 1 : 0; 1150 var i = this.isPrevious ? 0 : e; 1151 var n = this.parent.selectedIndex == i ? "disable" : "enable"; 1152 this[n]() 1153 }; 1154 o.prototype.destroy = function() { 1155 this.deactivate(); 1156 this.allOff() 1157 }; 1158 s.extend(i.defaults, { prevNextButtons: true, arrowShape: { x0: 10, x1: 60, y1: 50, x2: 70, y2: 40, x3: 30 } }); 1159 i.createMethods.push("_createPrevNextButtons"); 1160 var l = i.prototype; 1161 l._createPrevNextButtons = function() { 1162 if (!this.options.prevNextButtons) { return } 1163 this.prevButton = new o(-1, this); 1164 this.nextButton = new o(1, this); 1165 this.on("activate", this.activatePrevNextButtons) 1166 }; 1167 l.activatePrevNextButtons = function() { 1168 this.prevButton.activate(); 1169 this.nextButton.activate(); 1170 this.on("deactivate", this.deactivatePrevNextButtons) 1171 }; 1172 l.deactivatePrevNextButtons = function() { 1173 this.prevButton.deactivate(); 1174 this.nextButton.deactivate(); 1175 this.off("deactivate", this.deactivatePrevNextButtons) 1176 }; 1177 i.PrevNextButton = o; 1178 return i 1179}); 1180(function(n, s) { if (typeof define == "function" && define.amd) { define("flickity/js/page-dots", ["./flickity", "unipointer/unipointer", "fizzy-ui-utils/utils"], function(t, e, i) { return s(n, t, e, i) }) } else if (typeof module == "object" && module.exports) { module.exports = s(n, require("./flickity"), require("unipointer"), require("fizzy-ui-utils")) } else { s(n, n.Flickity, n.Unipointer, n.fizzyUIUtils) } })(window, function t(e, i, n, s) { 1181 function r(t) { 1182 this.parent = t; 1183 this._create() 1184 } 1185 r.prototype = Object.create(n.prototype); 1186 r.prototype._create = function() { 1187 this.holder = document.createElement("ol"); 1188 this.holder.className = "flickity-page-dots"; 1189 this.dots = []; 1190 this.handleClick = this.onClick.bind(this); 1191 this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)) 1192 }; 1193 r.prototype.activate = function() { 1194 this.setDots(); 1195 this.holder.addEventListener("click", this.handleClick); 1196 this.bindStartEvent(this.holder); 1197 this.parent.element.appendChild(this.holder) 1198 }; 1199 r.prototype.deactivate = function() { 1200 this.holder.removeEventListener("click", this.handleClick); 1201 this.unbindStartEvent(this.holder); 1202 this.parent.element.removeChild(this.holder) 1203 }; 1204 r.prototype.setDots = function() { var t = this.parent.slides.length - this.dots.length; if (t > 0) { this.addDots(t) } else if (t < 0) { this.removeDots(-t) } }; 1205 r.prototype.addDots = function(t) { 1206 var e = document.createDocumentFragment(); 1207 var i = []; 1208 var n = this.dots.length; 1209 var s = n + t; 1210 for (var r = n; r < s; r++) { 1211 var o = document.createElement("li"); 1212 o.className = "dot"; 1213 o.setAttribute("aria-label", "Page dot " + (r + 1)); 1214 e.appendChild(o); 1215 i.push(o) 1216 } 1217 this.holder.appendChild(e); 1218 this.dots = this.dots.concat(i) 1219 }; 1220 r.prototype.removeDots = function(t) { 1221 var e = this.dots.splice(this.dots.length - t, t); 1222 e.forEach(function(t) { this.holder.removeChild(t) }, this) 1223 }; 1224 r.prototype.updateSelected = function() { 1225 if (this.selectedDot) { 1226 this.selectedDot.className = "dot"; 1227 this.selectedDot.removeAttribute("aria-current") 1228 } 1229 if (!this.dots.length) { return } 1230 this.selectedDot = this.dots[this.parent.selectedIndex]; 1231 this.selectedDot.className = "dot is-selected"; 1232 this.selectedDot.setAttribute("aria-current", "step") 1233 }; 1234 r.prototype.onTap = r.prototype.onClick = function(t) { 1235 var e = t.target; 1236 if (e.nodeName != "LI") { return } 1237 this.parent.uiChange(); 1238 var i = this.dots.indexOf(e); 1239 this.parent.select(i) 1240 }; 1241 r.prototype.destroy = function() { 1242 this.deactivate(); 1243 this.allOff() 1244 }; 1245 i.PageDots = r; 1246 s.extend(i.defaults, { pageDots: true });
1247 i.createMethods.push("_createPageDots"); 1248 var o = i.prototype; 1249 o._createPageDots = function() { 1250 if (!this.options.pageDots) { return } 1251 this.pageDots = new r(this); 1252 this.on("activate", this.activatePageDots); 1253 this.on("select", this.updateSelectedPageDots); 1254 this.on("cellChange", this.updatePageDots); 1255 this.on("resize", this.updatePageDots); 1256 this.on("deactivate", this.deactivatePageDots) 1257 }; 1258 o.activatePageDots = function() { this.pageDots.activate() }; 1259 o.updateSelectedPageDots = function() { this.pageDots.updateSelected() }; 1260 o.updatePageDots = function() { this.pageDots.setDots() }; 1261 o.deactivatePageDots = function() { this.pageDots.deactivate() }; 1262 i.PageDots = r; 1263 return i 1264}); 1265(function(t, n) { if (typeof define == "function" && define.amd) { define("flickity/js/player", ["ev-emitter/ev-emitter", "fizzy-ui-utils/utils", "./flickity"], function(t, e, i) { return n(t, e, i) }) } else if (typeof module == "object" && module.exports) { module.exports = n(require("ev-emitter"), require("fizzy-ui-utils"), require("./flickity")) } else { n(t.EvEmitter, t.fizzyUIUtils, t.Flickity) } })(window, function t(e, i, n) { 1266 function s(t) { 1267 this.parent = t; 1268 this.state = "stopped"; 1269 this.onVisibilityChange = this.visibilityChange.bind(this); 1270 this.onVisibilityPlay = this.visibilityPlay.bind(this) 1271 } 1272 s.prototype = Object.create(e.prototype); 1273 s.prototype.play = function() { 1274 if (this.state == "playing") { return } 1275 var t = document.hidden; 1276 if (t) { document.addEventListener("visibilitychange", this.onVisibilityPlay); return } 1277 this.state = "playing"; 1278 document.addEventListener("visibilitychange", this.onVisibilityChange); 1279 this.tick() 1280 }; 1281 s.prototype.tick = function() { 1282 if (this.state != "playing") { return } 1283 var t = this.parent.options.autoPlay; 1284 t = typeof t == "number" ? t : 3e3; 1285 var e = this; 1286 this.clear(); 1287 this.timeout = setTimeout(function() { 1288 e.parent.next(true); 1289 e.tick() 1290 }, t) 1291 }; 1292 s.prototype.stop = function() { 1293 this.state = "stopped"; 1294 this.clear(); 1295 document.removeEventListener("visibilitychange", this.onVisibilityChange) 1296 }; 1297 s.prototype.clear = function() { clearTimeout(this.timeout) }; 1298 s.prototype.pause = function() { 1299 if (this.state == "playing") { 1300 this.state = "paused"; 1301 this.clear() 1302 } 1303 }; 1304 s.prototype.unpause = function() { if (this.state == "paused") { this.play() } }; 1305 s.prototype.visibilityChange = function() { 1306 var t = document.hidden; 1307 this[t ? "pause" : "unpause"]() 1308 }; 1309 s.prototype.visibilityPlay = function() { 1310 this.play(); 1311 document.removeEventListener("visibilitychange", this.onVisibilityPlay) 1312 }; 1313 i.extend(n.defaults, { pauseAutoPlayOnHover: true }); 1314 n.createMethods.push("_createPlayer"); 1315 var r = n.prototype; 1316 r._createPlayer = function() { 1317 this.player = new s(this); 1318 this.on("activate", this.activatePlayer); 1319 this.on("uiChange", this.stopPlayer); 1320 this.on("pointerDown", this.stopPlayer); 1321 this.on("deactivate", this.deactivatePlayer) 1322 }; 1323 r.activatePlayer = function() { 1324 if (!this.options.autoPlay) { return } 1325 this.player.play(); 1326 this.element.addEventListener("mouseenter", this) 1327 }; 1328 r.playPlayer = function() { this.player.play() }; 1329 r.stopPlayer = function() { this.player.stop() }; 1330 r.pausePlayer = function() { this.player.pause() }; 1331 r.unpausePlayer = function() { this.player.unpause() }; 1332 r.deactivatePlayer = function() { 1333 this.player.stop(); 1334 this.element.removeEventListener("mouseenter", this) 1335 }; 1336 r.onmouseenter = function() { 1337 if (!this.options.pauseAutoPlayOnHover) { return } 1338 this.player.pause(); 1339 this.element.addEventListener("mouseleave", this) 1340 }; 1341 r.onmouseleave = function() { 1342 this.player.unpause(); 1343 this.element.removeEventListener("mouseleave", this) 1344 }; 1345 n.Player = s; 1346 return n 1347}); 1348(function(i, n) { if (typeof define == "function" && define.amd) { define("flickity/js/add-remove-cell", ["./flickity", "fizzy-ui-utils/utils"], function(t, e) { return n(i, t, e) }) } else if (typeof module == "object" && module.exports) { module.exports = n(i, require("./flickity"), require("fizzy-ui-utils")) } else { n(i, i.Flickity, i.fizzyUIUtils) } })(window, function t(e, i, n) { 1349 function l(t) { 1350 var e = document.createDocumentFragment(); 1351 t.forEach(function(t) { e.appendChild(t.element) }); 1352 return e 1353 } 1354 var s = i.prototype; 1355 s.insert = function(t, e) { 1356 var i = this._makeCells(t); 1357 if (!i || !i.length) { return } 1358 var n = this.cells.length; 1359 e = e === undefined ? n : e; 1360 var s = l(i); 1361 var r = e == n; 1362 if (r) { this.slider.appendChild(s) } else { 1363 var o = this.cells[e].element; 1364 this.slider.insertBefore(s, o) 1365 } 1366 if (e === 0) { this.cells = i.concat(this.cells) } else if (r) { this.cells = this.cells.concat(i) } else { 1367 var a = this.cells.splice(e, n - e);
1368 this.cells = this.cells.concat(i).concat(a) 1369 } 1370 this._sizeCells(i); 1371 this.cellChange(e, true) 1372 }; 1373 s.append = function(t) { this.insert(t, this.cells.length) }; 1374 s.prepend = function(t) { this.insert(t, 0) }; 1375 s.remove = function(t) { 1376 var e = this.getCells(t); 1377 if (!e || !e.length) { return } 1378 var i = this.cells.length - 1; 1379 e.forEach(function(t) { 1380 t.remove(); 1381 var e = this.cells.indexOf(t); 1382 i = Math.min(e, i); 1383 n.removeFrom(this.cells, t) 1384 }, this); 1385 this.cellChange(i, true) 1386 }; 1387 s.cellSizeChange = function(t) { 1388 var e = this.getCell(t); 1389 if (!e) { return } 1390 e.getSize(); 1391 var i = this.cells.indexOf(e); 1392 this.cellChange(i) 1393 }; 1394 s.cellChange = function(t, e) { 1395 var i = this.selectedElement; 1396 this._positionCells(t); 1397 this._getWrapShiftCells(); 1398 this.setGallerySize(); 1399 var n = this.getCell(i); 1400 if (n) { this.selectedIndex = this.getCellSlideIndex(n) } 1401 this.selectedIndex = Math.min(this.slides.length - 1, this.selectedIndex); 1402 this.emitEvent("cellChange", [t]); 1403 this.select(this.selectedIndex); 1404 if (e) { this.positionSliderAtSelected() } 1405 }; 1406 return i 1407}); 1408(function(i, n) { if (typeof define == "function" && define.amd) { define("flickity/js/lazyload", ["./flickity", "fizzy-ui-utils/utils"], function(t, e) { return n(i, t, e) }) } else if (typeof module == "object" && module.exports) { module.exports = n(i, require("./flickity"), require("fizzy-ui-utils")) } else { n(i, i.Flickity, i.fizzyUIUtils) } })(window, function t(e, i, o) { 1409 "use strict"; 1410 i.createMethods.push("_createLazyload"); 1411 var n = i.prototype; 1412 n._createLazyload = function() { this.on("select", this.lazyLoad) }; 1413 n.lazyLoad = function() { 1414 var t = this.options.lazyLoad; 1415 if (!t) { return } 1416 var e = typeof t == "number" ? t : 0; 1417 var i = this.getAdjacentCellElements(e); 1418 var n = []; 1419 i.forEach(function(t) { 1420 var e = s(t); 1421 n = n.concat(e) 1422 }); 1423 n.forEach(function(t) { new r(t, this) }, this) 1424 }; 1425 1426 function s(t) { if (t.nodeName == "IMG") { var e = t.getAttribute("data-flickity-lazyload"); var i = t.getAttribute("data-flickity-lazyload-src"); var n = t.getAttribute("data-flickity-lazyload-srcset"); if (e || i || n) { return [t] } } var s = "img[data-flickity-lazyload], " + "img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]"; var r = t.querySelectorAll(s); return o.makeArray(r) } 1427 1428 function r(t, e) { 1429 this.img = t; 1430 this.flickity = e; 1431 this.load() 1432 } 1433 r.prototype.handleEvent = o.handleEvent; 1434 r.prototype.load = function() { 1435 this.img.addEventListener("load", this); 1436 this.img.addEventListener("error", this); 1437 var t = this.img.getAttribute("data-flickity-lazyload") || this.img.getAttribute("data-flickity-lazyload-src"); 1438 var e = this.img.getAttribute("data-flickity-lazyload-srcset"); 1439 this.img.src = t; 1440 if (e) { this.img.setAttribute("srcset", e) } 1441 this.img.removeAttribute("data-flickity-lazyload"); 1442 this.img.removeAttribute("data-flickity-lazyload-src"); 1443 this.img.removeAttribute("data-flickity-lazyload-srcset") 1444 }; 1445 r.prototype.onload = function(t) { this.complete(t, "flickity-lazyloaded") }; 1446 r.prototype.onerror = function(t) { this.complete(t, "flickity-lazyerror") }; 1447 r.prototype.complete = function(t, e) { 1448 this.img.removeEventListener("load", this); 1449 this.img.removeEventListener("error", this); 1450 var i = this.flickity.getParentCell(this.img); 1451 var n = i && i.element; 1452 this.flickity.cellSizeChange(n); 1453 this.img.classList.add(e); 1454 this.flickity.dispatchEvent("lazyLoad", t, n) 1455 }; 1456 i.LazyLoader = r; 1457 return i 1458}); 1459/*! 1460 * Flickity v2.3.0 1461 * Touch, responsive, flickable carousels 1462 * 1463 * Licensed GPLv3 for open source use 1464 * or Flickity Commercial License for commercial use 1465 * 1466 * https://flickity.metafizzy.co 1467 * Copyright 2015-2021 Metafizzy 1468 */ 1469(function(t, e) { if (typeof define == "function" && define.amd) { define("flickity/js/index", ["./flickity", "./drag", "./prev-next-button", "./page-dots", "./player", "./add-remove-cell", "./lazyload"], e) } else if (typeof module == "object" && module.exports) { module.exports = e(require("./flickity"), require("./drag"), require("./prev-next-button"), require("./page-dots"), require("./player"), require("./add-remove-cell"), require("./lazyload")) } })(window, function t(e) { return e }); 1470/*! 1471 * Flickity asNavFor v2.0.2 1472 * enable asNavFor for Flickity 1473 */ 1474(function(t, e) { if (typeof define == "function" && define.amd) { define("flickity-as-nav-for/as-nav-for", ["flickity/js/index", "fizzy-ui-utils/utils"], e) } else if (typeof module == "object" && module.exports) { module.exports = e(require("flickity"), require("fizzy-ui-utils")) } else { t.Flickity = e(t.Flickity, t.fizzyUIUtils) } })(window, function t(n, s) { 1475 n.createMethods.push("_createAsNavFor"); 1476 var e = n.prototype; 1477 e._createAsNavFor = function() { 1478 this.on("activate", this.activateAsNavFor); 1479 this.on("deactivate", this.deactivateAsNavFor); 1480 this.on("destroy", this.destroyAsNavFor); 1481 var e = this.options.asNavFor; 1482 if (!e) { return } 1483 var i = this; 1484 setTimeout(function t() { i.setNavCompanion(e) }) 1485 }; 1486 e.setNavCompanion = function(t) { 1487 t = s.getQueryElement(t); 1488 var e = n.data(t); 1489 if (!e || e == this) { return } 1490 this.navCompanion = e; 1491 var i = this; 1492 this.onNavCompanionSelect = function() { i.navCompanionSelect() }; 1493 e.on("select", this.onNavCompanionSelect); 1494 this.on("staticClick", this.onNavStaticClick); 1495 this.navCompanionSelect(true) 1496 }; 1497 e.navCompanionSelect = function(t) { 1498 var e = this.navCompanion && this.navCompanion.selectedCells; 1499 if (!e) { return } 1500 var i = e[0];
1501 var n = this.navCompanion.cells.indexOf(i); 1502 var s = n + e.length - 1; 1503 var r = Math.floor(a(n, s, this.navCompanion.cellAlign)); 1504 this.selectCell(r, false, t); 1505 this.removeNavSelectedElements(); 1506 if (r >= this.cells.length) { return } 1507 var o = this.cells.slice(n, s + 1); 1508 this.navSelectedElements = o.map(function(t) { return t.element }); 1509 this.changeNavSelectedClass("add") 1510 }; 1511 1512 function a(t, e, i) { return (e - t) * i + t } 1513 e.changeNavSelectedClass = function(e) { this.navSelectedElements.forEach(function(t) { t.classList[e]("is-nav-selected") }) }; 1514 e.activateAsNavFor = function() { this.navCompanionSelect(true) }; 1515 e.removeNavSelectedElements = function() { 1516 if (!this.navSelectedElements) { return } 1517 this.changeNavSelectedClass("remove"); 1518 delete this.navSelectedElements 1519 }; 1520 e.onNavStaticClick = function(t, e, i, n) { if (typeof n == "number") { this.navCompanion.selectCell(n) } }; 1521 e.deactivateAsNavFor = function() { this.removeNavSelectedElements() }; 1522 e.destroyAsNavFor = function() { 1523 if (!this.navCompanion) { return } 1524 this.navCompanion.off("select", this.onNavCompanionSelect); 1525 this.off("staticClick", this.onNavStaticClick); 1526 delete this.navCompanion 1527 }; 1528 return n 1529}); 1530/*! 1531 * imagesLoaded v4.1.4 1532 * JavaScript is all like "You images are done yet or what?" 1533 * MIT License 1534 */ 1535(function(e, i) { "use strict"; if (typeof define == "function" && define.amd) { define("imagesloaded/imagesloaded", ["ev-emitter/ev-emitter"], function(t) { return i(e, t) }) } else if (typeof module == "object" && module.exports) { module.exports = i(e, require("ev-emitter")) } else { e.imagesLoaded = i(e, e.EvEmitter) } })(typeof window !== "undefined" ? window : this, function t(e, i) { 1536 var s = e.jQuery; 1537 var r = e.console; 1538 1539 function o(t, e) { for (var i in e) { t[i] = e[i] } return t } 1540 var n = Array.prototype.slice; 1541 1542 function a(t) { if (Array.isArray(t)) { return t } var e = typeof t == "object" && typeof t.length == "number"; if (e) { return n.call(t) } return [t] } 1543 1544 function l(t, e, i) { 1545 if (!(this instanceof l)) { return new l(t, e, i) } 1546 var n = t; 1547 if (typeof t == "string") { n = document.querySelectorAll(t) } 1548 if (!n) { r.error("Bad element for imagesLoaded " + (n || t)); return } 1549 this.elements = a(n); 1550 this.options = o({}, this.options); 1551 if (typeof e == "function") { i = e } else { o(this.options, e) } 1552 if (i) { this.on("always", i) } 1553 this.getImages(); 1554 if (s) { this.jqDeferred = new s.Deferred } 1555 setTimeout(this.check.bind(this)) 1556 } 1557 l.prototype = Object.create(i.prototype); 1558 l.prototype.options = {}; 1559 l.prototype.getImages = function() { 1560 this.images = []; 1561 this.elements.forEach(this.addElementImages, this) 1562 }; 1563 l.prototype.addElementImages = function(t) { 1564 if (t.nodeName == "IMG") { this.addImage(t) } 1565 if (this.options.background === true) { this.addElementBackgroundImages(t) } 1566 var e = t.nodeType; 1567 if (!e || !h[e]) { return } 1568 var i = t.querySelectorAll("img"); 1569 for (var n = 0; n < i.length; n++) { 1570 var s = i[n]; 1571 this.addImage(s) 1572 } 1573 if (typeof this.options.background == "string") { 1574 var r = t.querySelectorAll(this.options.background); 1575 for (n = 0; n < r.length; n++) { 1576 var o = r[n]; 1577 this.addElementBackgroundImages(o) 1578 } 1579 } 1580 }; 1581 var h = { 1: true, 9: true, 11: true }; 1582 l.prototype.addElementBackgroundImages = function(t) { 1583 var e = getComputedStyle(t); 1584 if (!e) { return } 1585 var i = /url\((['"])?(.*?)\1\)/gi; 1586 var n = i.exec(e.backgroundImage); 1587 while (n !== null) { 1588 var s = n && n[2]; 1589 if (s) { this.addBackground(s, t) } 1590 n = i.exec(e.backgroundImage) 1591 } 1592 }; 1593 l.prototype.addImage = function(t) { 1594 var e = new c(t); 1595 this.images.push(e) 1596 };
1597 l.prototype.addBackground = function(t, e) { 1598 var i = new u(t, e); 1599 this.images.push(i) 1600 }; 1601 l.prototype.check = function() { 1602 var n = this; 1603 this.progressedCount = 0; 1604 this.hasAnyBroken = false; 1605 if (!this.images.length) { this.complete(); return } 1606 1607 function e(t, e, i) { setTimeout(function() { n.progress(t, e, i) }) } 1608 this.images.forEach(function(t) { 1609 t.once("progress", e); 1610 t.check() 1611 }) 1612 }; 1613 l.prototype.progress = function(t, e, i) { 1614 this.progressedCount++; 1615 this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded; 1616 this.emitEvent("progress", [this, t, e]); 1617 if (this.jqDeferred && this.jqDeferred.notify) { this.jqDeferred.notify(this, t) } 1618 if (this.progressedCount == this.images.length) { this.complete() } 1619 if (this.options.debug && r) { r.log("progress: " + i, t, e) } 1620 }; 1621 l.prototype.complete = function() { 1622 var t = this.hasAnyBroken ? "fail" : "done"; 1623 this.isComplete = true; 1624 this.emitEvent(t, [this]); 1625 this.emitEvent("always", [this]); 1626 if (this.jqDeferred) { 1627 var e = this.hasAnyBroken ? "reject" : "resolve"; 1628 this.jqDeferred[e](this) 1629 } 1630 }; 1631 1632 function c(t) { this.img = t } 1633 c.prototype = Object.create(i.prototype); 1634 c.prototype.check = function() { 1635 var t = this.getIsImageComplete(); 1636 if (t) { this.confirm(this.img.naturalWidth !== 0, "naturalWidth"); return } 1637 this.proxyImage = new Image; 1638 this.proxyImage.addEventListener("load", this); 1639 this.proxyImage.addEventListener("error", this); 1640 this.img.addEventListener("load", this); 1641 this.img.addEventListener("error", this); 1642 this.proxyImage.src = this.img.src 1643 }; 1644 c.prototype.getIsImageComplete = function() { return this.img.complete && this.img.naturalWidth }; 1645 c.prototype.confirm = function(t, e) { 1646 this.isLoaded = t; 1647 this.emitEvent("progress", [this, this.img, e]) 1648 }; 1649 c.prototype.handleEvent = function(t) { var e = "on" + t.type; if (this[e]) { this[e](t) } }; 1650 c.prototype.onload = function() { 1651 this.confirm(true, "onload"); 1652 this.unbindEvents() 1653 }; 1654 c.prototype.onerror = function() { 1655 this.confirm(false, "onerror"); 1656 this.unbindEvents() 1657 }; 1658 c.prototype.unbindEvents = function() { 1659 this.proxyImage.removeEventListener("load", this); 1660 this.proxyImage.removeEventListener("error", this); 1661 this.img.removeEventListener("load", this); 1662 this.img.removeEventListener("error", this) 1663 }; 1664 1665 function u(t, e) { 1666 this.url = t; 1667 this.element = e; 1668 this.img = new Image 1669 } 1670 u.prototype = Object.create(c.prototype); 1671 u.prototype.check = function() { 1672 this.img.addEventListener("load", this); 1673 this.img.addEventListener("error", this); 1674 this.img.src = this.url; 1675 var t = this.getIsImageComplete(); 1676 if (t) { 1677 this.confirm(this.img.naturalWidth !== 0, "naturalWidth"); 1678 this.unbindEvents() 1679 } 1680 }; 1681 u.prototype.unbindEvents = function() { 1682 this.img.removeEventListener("load", this); 1683 this.img.removeEventListener("error", this) 1684 }; 1685 u.prototype.confirm = function(t, e) { 1686 this.isLoaded = t; 1687 this.emitEvent("progress", [this, this.element, e]) 1688 }; 1689 l.makeJQueryPlugin = function(t) { 1690 t = t || e.jQuery; 1691 if (!t) { return } 1692 s = t; 1693 s.fn.imagesLoaded = function(t, e) { var i = new l(this, t, e); return i.jqDeferred.promise(s(this)) } 1694 }; 1695 l.makeJQueryPlugin(); 1696 return l 1697}); 1698/*! 1699 * Flickity imagesLoaded v2.0.0 1700 * enables imagesLoaded option for Flickity 1701 */ 1702(function(i, n) { if (typeof define == "function" && define.amd) { define(["flickity/js/index", "imagesloaded/imagesloaded"], function(t, e) { return n(i, t, e) }) } else if (typeof module == "object" && module.exports) { module.exports = n(i, require("flickity"), require("imagesloaded")) } else { i.Flickity = n(i, i.Flickity, i.imagesLoaded) } })(window, function t(e, i, s) { 1703 "use strict"; 1704 i.createMethods.push("_createImagesLoaded"); 1705 var n = i.prototype; 1706 n._createImagesLoaded = function() { this.on("activate", this.imagesLoaded) }; 1707 n.imagesLoaded = function() { 1708 if (!this.options.imagesLoaded) { return } 1709 var n = this; 1710 1711 function t(t, e) { 1712 var i = n.getParentCell(e.img); 1713 n.cellSizeChange(i && i.element); 1714 if (!n.options.freeScroll) { n.positionSliderAtSelected() } 1715 } 1716 s(this.slider).on("progress", t) 1717 }; 1718 return i 1719});
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.