| @@ -1,4266 +1,0 @@ | ||
| 1 | -/* jQuery Appear - 1.0 */ | |
| 2 | -(function ($) { | |
| 3 | - $.fn.appear = function (f, o) { | |
| 4 | - var s = $.extend({ | |
| 5 | - one: true | |
| 6 | - }, o); | |
| 7 | - return this.each(function () { | |
| 8 | - var t = $(this); | |
| 9 | - t.appeared = false; | |
| 10 | - | |
| 11 | - if (!f) { | |
| 12 | - t.trigger('appear', s.data); | |
| 13 | - return; | |
| 14 | - } | |
| 15 | - | |
| 16 | - var w = $(window); | |
| 17 | - | |
| 18 | - var c = function () { | |
| 19 | - if (!t.is(':visible')) { | |
| 20 | - t.appeared = false; | |
| 21 | - return; | |
| 22 | - } | |
| 23 | - | |
| 24 | - var a = w.scrollLeft(); | |
| 25 | - var b = w.scrollTop(); | |
| 26 | - var o = t.offset(); | |
| 27 | - var x = o.left; | |
| 28 | - var y = o.top; | |
| 29 | - | |
| 30 | - if (y + t.height() >= b && y <= b + w.height() && x + t.width() >= a && x <= a + w.width()) { | |
| 31 | - if (!t.appeared) t.trigger('appear', s.data); | |
| 32 | - } else { | |
| 33 | - t.appeared = false; | |
| 34 | - } | |
| 35 | - }; | |
| 36 | - | |
| 37 | - var m = function () { | |
| 38 | - t.appeared = true; | |
| 39 | - | |
| 40 | - if (s.one) { | |
| 41 | - w.unbind('scroll', c); | |
| 42 | - var i = $.inArray(c, $.fn.appear.checks); | |
| 43 | - if (i >= 0) $.fn.appear.checks.splice(i, 1); | |
| 44 | - } | |
| 45 | - | |
| 46 | - f.apply(this, arguments); | |
| 47 | - }; | |
| 48 | - | |
| 49 | - if (s.one) t.one('appear', s.data, m);else t.bind('appear', s.data, m); | |
| 50 | - w.scroll(c); | |
| 51 | - $.fn.appear.checks.push(c); | |
| 52 | - c(); | |
| 53 | - }); | |
| 54 | - }; | |
| 55 | - | |
| 56 | - $.extend($.fn.appear, { | |
| 57 | - checks: [], | |
| 58 | - timeout: null, | |
| 59 | - checkAll: function () { | |
| 60 | - var l = $.fn.appear.checks.length; | |
| 61 | - if (l > 0) while (l--) $.fn.appear.checks[l](); | |
| 62 | - }, | |
| 63 | - run: function () { | |
| 64 | - if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); | |
| 65 | - $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); | |
| 66 | - } | |
| 67 | - }); | |
| 68 | - $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function (i, n) { | |
| 69 | - var u = $.fn[n]; | |
| 70 | - | |
| 71 | - if (u) { | |
| 72 | - $.fn[n] = function () { | |
| 73 | - var r = u.apply(this, arguments); | |
| 74 | - $.fn.appear.run(); | |
| 75 | - return r; | |
| 76 | - }; | |
| 77 | - } | |
| 78 | - }); | |
| 79 | -})(jQuery); | |
| 80 | -/* Count To */ | |
| 81 | -(function (e) { | |
| 82 | - function t(e, t) { | |
| 83 | - return e.toFixed(t.decimals); | |
| 84 | - } | |
| 85 | - | |
| 86 | - e.fn.countTo = function (t) { | |
| 87 | - t = t || {}; | |
| 88 | - return e(this).each(function () { | |
| 89 | - function l() { | |
| 90 | - a += i; | |
| 91 | - u++; | |
| 92 | - c(a); | |
| 93 | - | |
| 94 | - if (typeof n.onUpdate == "function") { | |
| 95 | - n.onUpdate.call(s, a); | |
| 96 | - } | |
| 97 | - | |
| 98 | - if (u >= r) { | |
| 99 | - o.removeData("countTo"); | |
| 100 | - clearInterval(f.interval); | |
| 101 | - a = n.to; | |
| 102 | - | |
| 103 | - if (typeof n.onComplete == "function") { | |
| 104 | - n.onComplete.call(s, a); | |
| 105 | - } | |
| 106 | - } | |
| 107 | - } | |
| 108 | - | |
| 109 | - function c(e) { | |
| 110 | - var t = n.formatter.call(s, e, n); | |
| 111 | - o.html(t); | |
| 112 | - } | |
| 113 | - | |
| 114 | - var n = e.extend({}, e.fn.countTo.defaults, { | |
| 115 | - from: e(this).data("from"), | |
| 116 | - to: e(this).data("to"), | |
| 117 | - speed: e(this).data("speed"), | |
| 118 | - refreshInterval: e(this).data("refresh-interval"), | |
| 119 | - decimals: e(this).data("decimals") | |
| 120 | - }, t); | |
| 121 | - var r = Math.ceil(n.speed / n.refreshInterval), | |
| 122 | - i = (n.to - n.from) / r; | |
| 123 | - var s = this, | |
| 124 | - o = e(this), | |
| 125 | - u = 0, | |
| 126 | - a = n.from, | |
| 127 | - f = o.data("countTo") || {}; | |
| 128 | - o.data("countTo", f); | |
| 129 | - | |
| 130 | - if (f.interval) { | |
| 131 | - clearInterval(f.interval); | |
| 132 | - } | |
| 133 | - | |
| 134 | - f.interval = setInterval(l, n.refreshInterval); | |
| 135 | - c(a); | |
| 136 | - }); | |
| 137 | - }; | |
| 138 | - | |
| 139 | - e.fn.countTo.defaults = { | |
| 140 | - from: 0, | |
| 141 | - to: 0, | |
| 142 | - speed: 1e3, | |
| 143 | - refreshInterval: 100, | |
| 144 | - decimals: 0, | |
| 145 | - formatter: t, | |
| 146 | - onUpdate: null, | |
| 147 | - onComplete: null | |
| 148 | - }; | |
| 149 | -})(jQuery); | |
| 150 | -/*! | |
| 151 | - * Flickity PACKAGED v2.2.1 | |
| 152 | - * Touch, responsive, flickable carousels | |
| 153 | - * | |
| 154 | - * Licensed GPLv3 for open source use | |
| 155 | - * or Flickity Commercial License for commercial use | |
| 156 | - * | |
| 157 | - * https://flickity.metafizzy.co | |
| 158 | - * Copyright 2015-2019 Metafizzy | |
| 159 | - */ | |
| 160 | -!function (e, i) { | |
| 161 | - "function" == typeof define && define.amd ? define("jquery-bridget/jquery-bridget", ["jquery"], function (t) { | |
| 162 | - return i(e, t); | |
| 163 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("jquery")) : e.jQueryBridget = i(e, e.jQuery); | |
| 164 | -}(window, function (t, e) { | |
| 165 | - "use strict"; | |
| 166 | - | |
| 167 | - var i = Array.prototype.slice, | |
| 168 | - n = t.console, | |
| 169 | - d = void 0 === n ? function () {} : function (t) { | |
| 170 | - n.error(t); | |
| 171 | - }; | |
| 172 | - | |
| 173 | - function s(h, s, c) { | |
| 174 | - (c = c || e || t.jQuery) && (s.prototype.option || (s.prototype.option = function (t) { | |
| 175 | - c.isPlainObject(t) && (this.options = c.extend(!0, this.options, t)); | |
| 176 | - }), c.fn[h] = function (t) { | |
| 177 | - return "string" == typeof t ? function (t, o, r) { | |
| 178 | - var a, | |
| 179 | - l = "$()." + h + '("' + o + '")'; | |
| 180 | - return t.each(function (t, e) { | |
| 181 | - var i = c.data(e, h); | |
| 182 | - | |
| 183 | - if (i) { | |
| 184 | - var n = i[o]; | |
| 185 | - | |
| 186 | - if (n && "_" != o.charAt(0)) { | |
| 187 | - var s = n.apply(i, r); | |
| 188 | - a = void 0 === a ? s : a; | |
| 189 | - } else d(l + " is not a valid method"); | |
| 190 | - } else d(h + " not initialized. Cannot call methods, i.e. " + l); | |
| 191 | - }), void 0 !== a ? a : t; | |
| 192 | - }(this, t, i.call(arguments, 1)) : (function (t, n) { | |
| 193 | - t.each(function (t, e) { | |
| 194 | - var i = c.data(e, h); | |
| 195 | - i ? (i.option(n), i._init()) : (i = new s(e, n), c.data(e, h, i)); | |
| 196 | - }); | |
| 197 | - }(this, t), this); | |
| 198 | - }, o(c)); | |
| 199 | - } | |
| 200 | - | |
| 201 | - function o(t) { | |
| 202 | - !t || t && t.bridget || (t.bridget = s); | |
| 203 | - } | |
| 204 | - | |
| 205 | - return o(e || t.jQuery), s; | |
| 206 | -}), function (t, e) { | |
| 207 | - "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e(); | |
| 208 | -}("undefined" != typeof window ? window : this, function () { | |
| 209 | - function t() {} | |
| 210 | - | |
| 211 | - var e = t.prototype; | |
| 212 | - return e.on = function (t, e) { | |
| 213 | - if (t && e) { | |
| 214 | - var i = this._events = this._events || {}, | |
| 215 | - n = i[t] = i[t] || []; | |
| 216 | - return -1 == n.indexOf(e) && n.push(e), this; | |
| 217 | - } | |
| 218 | - }, e.once = function (t, e) { | |
| 219 | - if (t && e) { | |
| 220 | - this.on(t, e); | |
| 221 | - var i = this._onceEvents = this._onceEvents || {}; | |
| 222 | - return (i[t] = i[t] || {})[e] = !0, this; | |
| 223 | - } | |
| 224 | - }, e.off = function (t, e) { | |
| 225 | - var i = this._events && this._events[t]; | |
| 226 | - | |
| 227 | - if (i && i.length) { | |
| 228 | - var n = i.indexOf(e); | |
| 229 | - return -1 != n && i.splice(n, 1), this; | |
| 230 | - } | |
| 231 | - }, e.emitEvent = function (t, e) { | |
| 232 | - var i = this._events && this._events[t]; | |
| 233 | - | |
| 234 | - if (i && i.length) { | |
| 235 | - i = i.slice(0), e = e || []; | |
| 236 | - | |
| 237 | - for (var n = this._onceEvents && this._onceEvents[t], s = 0; s < i.length; s++) { | |
| 238 | - var o = i[s]; | |
| 239 | - n && n[o] && (this.off(t, o), delete n[o]), o.apply(this, e); | |
| 240 | - } | |
| 241 | - | |
| 242 | - return this; | |
| 243 | - } | |
| 244 | - }, e.allOff = function () { | |
| 245 | - delete this._events, delete this._onceEvents; | |
| 246 | - }, t; | |
| 247 | -}), function (t, e) { | |
| 248 | - "function" == typeof define && define.amd ? define("get-size/get-size", e) : "object" == typeof module && module.exports ? module.exports = e() : t.getSize = e(); | |
| 249 | -}(window, function () { | |
| 250 | - "use strict"; | |
| 251 | - | |
| 252 | - function m(t) { | |
| 253 | - var e = parseFloat(t); | |
| 254 | - return -1 == t.indexOf("%") && !isNaN(e) && e; | |
| 255 | - } | |
| 256 | - | |
| 257 | - var i = "undefined" == typeof console ? function () {} : function (t) { | |
| 258 | - console.error(t); | |
| 259 | - }, | |
| 260 | - y = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"], | |
| 261 | - b = y.length; | |
| 262 | - | |
| 263 | - function E(t) { | |
| 264 | - var e = getComputedStyle(t); | |
| 265 | - return e || i("Style returned " + e + ". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"), e; | |
| 266 | - } | |
| 267 | - | |
| 268 | - var S, | |
| 269 | - C = !1; | |
| 270 | - | |
| 271 | - function x(t) { | |
| 272 | - if (function () { | |
| 273 | - if (!C) { | |
| 274 | - C = !0; | |
| 275 | - var t = document.createElement("div"); | |
| 276 | - t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style.boxSizing = "border-box"; | |
| 277 | - var e = document.body || document.documentElement; | |
| 278 | - e.appendChild(t); | |
| 279 | - var i = E(t); | |
| 280 | - S = 200 == Math.round(m(i.width)), x.isBoxSizeOuter = S, e.removeChild(t); | |
| 281 | - } | |
| 282 | - }(), "string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { | |
| 283 | - var e = E(t); | |
| 284 | - if ("none" == e.display) return function () { | |
| 285 | - for (var t = { | |
| 286 | - width: 0, | |
| 287 | - height: 0, | |
| 288 | - innerWidth: 0, | |
| 289 | - innerHeight: 0, | |
| 290 | - outerWidth: 0, | |
| 291 | - outerHeight: 0 | |
| 292 | - }, e = 0; e < b; e++) { | |
| 293 | - t[y[e]] = 0; | |
| 294 | - } | |
| 295 | - | |
| 296 | - return t; | |
| 297 | - }(); | |
| 298 | - var i = {}; | |
| 299 | - i.width = t.offsetWidth, i.height = t.offsetHeight; | |
| 300 | - | |
| 301 | - for (var n = i.isBorderBox = "border-box" == e.boxSizing, s = 0; s < b; s++) { | |
| 302 | - var o = y[s], | |
| 303 | - r = e[o], | |
| 304 | - a = parseFloat(r); | |
| 305 | - i[o] = isNaN(a) ? 0 : a; | |
| 306 | - } | |
| 307 | - | |
| 308 | - var l = i.paddingLeft + i.paddingRight, | |
| 309 | - h = i.paddingTop + i.paddingBottom, | |
| 310 | - c = i.marginLeft + i.marginRight, | |
| 311 | - d = i.marginTop + i.marginBottom, | |
| 312 | - u = i.borderLeftWidth + i.borderRightWidth, | |
| 313 | - f = i.borderTopWidth + i.borderBottomWidth, | |
| 314 | - p = n && S, | |
| 315 | - g = m(e.width); | |
| 316 | - !1 !== g && (i.width = g + (p ? 0 : l + u)); | |
| 317 | - var v = m(e.height); | |
| 318 | - return !1 !== v && (i.height = v + (p ? 0 : h + f)), i.innerWidth = i.width - (l + u), i.innerHeight = i.height - (h + f), i.outerWidth = i.width + c, i.outerHeight = i.height + d, i; | |
| 319 | - } | |
| 320 | - } | |
| 321 | - | |
| 322 | - return x; | |
| 323 | -}), function (t, e) { | |
| 324 | - "use strict"; | |
| 325 | - | |
| 326 | - "function" == typeof define && define.amd ? define("desandro-matches-selector/matches-selector", e) : "object" == typeof module && module.exports ? module.exports = e() : t.matchesSelector = e(); | |
| 327 | -}(window, function () { | |
| 328 | - "use strict"; | |
| 329 | - | |
| 330 | - var i = function () { | |
| 331 | - var t = window.Element.prototype; | |
| 332 | - if (t.matches) return "matches"; | |
| 333 | - if (t.matchesSelector) return "matchesSelector"; | |
| 334 | - | |
| 335 | - for (var e = ["webkit", "moz", "ms", "o"], i = 0; i < e.length; i++) { | |
| 336 | - var n = e[i] + "MatchesSelector"; | |
| 337 | - if (t[n]) return n; | |
| 338 | - } | |
| 339 | - }(); | |
| 340 | - | |
| 341 | - return function (t, e) { | |
| 342 | - return t[i](e); | |
| 343 | - }; | |
| 344 | -}), function (e, i) { | |
| 345 | - "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["desandro-matches-selector/matches-selector"], function (t) { | |
| 346 | - return i(e, t); | |
| 347 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("desandro-matches-selector")) : e.fizzyUIUtils = i(e, e.matchesSelector); | |
| 348 | -}(window, function (h, o) { | |
| 349 | - var c = { | |
| 350 | - extend: function (t, e) { | |
| 351 | - for (var i in e) t[i] = e[i]; | |
| 352 | - | |
| 353 | - return t; | |
| 354 | - }, | |
| 355 | - modulo: function (t, e) { | |
| 356 | - return (t % e + e) % e; | |
| 357 | - } | |
| 358 | - }, | |
| 359 | - e = Array.prototype.slice; | |
| 360 | - c.makeArray = function (t) { | |
| 361 | - return Array.isArray(t) ? t : null == t ? [] : "object" == typeof t && "number" == typeof t.length ? e.call(t) : [t]; | |
| 362 | - }, c.removeFrom = function (t, e) { | |
| 363 | - var i = t.indexOf(e); | |
| 364 | - -1 != i && t.splice(i, 1); | |
| 365 | - }, c.getParent = function (t, e) { | |
| 366 | - for (; t.parentNode && t != document.body;) if (t = t.parentNode, o(t, e)) return t; | |
| 367 | - }, c.getQueryElement = function (t) { | |
| 368 | - return "string" == typeof t ? document.querySelector(t) : t; | |
| 369 | - }, c.handleEvent = function (t) { | |
| 370 | - var e = "on" + t.type; | |
| 371 | - this[e] && this[e](t); | |
| 372 | - }, c.filterFindElements = function (t, n) { | |
| 373 | - t = c.makeArray(t); | |
| 374 | - var s = []; | |
| 375 | - return t.forEach(function (t) { | |
| 376 | - if (t instanceof HTMLElement) if (n) { | |
| 377 | - o(t, n) && s.push(t); | |
| 378 | - | |
| 379 | - for (var e = t.querySelectorAll(n), i = 0; i < e.length; i++) s.push(e[i]); | |
| 380 | - } else s.push(t); | |
| 381 | - }), s; | |
| 382 | - }, c.debounceMethod = function (t, e, n) { | |
| 383 | - n = n || 100; | |
| 384 | - var s = t.prototype[e], | |
| 385 | - o = e + "Timeout"; | |
| 386 | - | |
| 387 | - t.prototype[e] = function () { | |
| 388 | - var t = this[o]; | |
| 389 | - clearTimeout(t); | |
| 390 | - var e = arguments, | |
| 391 | - i = this; | |
| 392 | - this[o] = setTimeout(function () { | |
| 393 | - s.apply(i, e), delete i[o]; | |
| 394 | - }, n); | |
| 395 | - }; | |
| 396 | - }, c.docReady = function (t) { | |
| 397 | - var e = document.readyState; | |
| 398 | - "complete" == e || "interactive" == e ? setTimeout(t) : document.addEventListener("DOMContentLoaded", t); | |
| 399 | - }, c.toDashed = function (t) { | |
| 400 | - return t.replace(/(.)([A-Z])/g, function (t, e, i) { | |
| 401 | - return e + "-" + i; | |
| 402 | - }).toLowerCase(); | |
| 403 | - }; | |
| 404 | - var d = h.console; | |
| 405 | - return c.htmlInit = function (a, l) { | |
| 406 | - c.docReady(function () { | |
| 407 | - var t = c.toDashed(l), | |
| 408 | - s = "data-" + t, | |
| 409 | - e = document.querySelectorAll("[" + s + "]"), | |
| 410 | - i = document.querySelectorAll(".js-" + t), | |
| 411 | - n = c.makeArray(e).concat(c.makeArray(i)), | |
| 412 | - o = s + "-options", | |
| 413 | - r = h.jQuery; | |
| 414 | - n.forEach(function (e) { | |
| 415 | - var t, | |
| 416 | - i = e.getAttribute(s) || e.getAttribute(o); | |
| 417 | - | |
| 418 | - try { | |
| 419 | - t = i && JSON.parse(i); | |
| 420 | - } catch (t) { | |
| 421 | - return void (d && d.error("Error parsing " + s + " on " + e.className + ": " + t)); | |
| 422 | - } | |
| 423 | - | |
| 424 | - var n = new a(e, t); | |
| 425 | - r && r.data(e, l, n); | |
| 426 | - }); | |
| 427 | - }); | |
| 428 | - }, c; | |
| 429 | -}), function (e, i) { | |
| 430 | - "function" == typeof define && define.amd ? define("flickity/js/cell", ["get-size/get-size"], function (t) { | |
| 431 | - return i(e, t); | |
| 432 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("get-size")) : (e.Flickity = e.Flickity || {}, e.Flickity.Cell = i(e, e.getSize)); | |
| 433 | -}(window, function (t, e) { | |
| 434 | - function i(t, e) { | |
| 435 | - this.element = t, this.parent = e, this.create(); | |
| 436 | - } | |
| 437 | - | |
| 438 | - var n = i.prototype; | |
| 439 | - return n.create = function () { | |
| 440 | - this.element.style.position = "absolute", this.element.setAttribute("aria-hidden", "true"), this.x = 0, this.shift = 0; | |
| 441 | - }, n.destroy = function () { | |
| 442 | - this.unselect(), this.element.style.position = ""; | |
| 443 | - var t = this.parent.originSide; | |
| 444 | - this.element.style[t] = ""; | |
| 445 | - }, n.getSize = function () { | |
| 446 | - this.size = e(this.element); | |
| 447 | - }, n.setPosition = function (t) { | |
| 448 | - this.x = t, this.updateTarget(), this.renderPosition(t); | |
| 449 | - }, n.updateTarget = n.setDefaultTarget = function () { | |
| 450 | - var t = "left" == this.parent.originSide ? "marginLeft" : "marginRight"; | |
| 451 | - this.target = this.x + this.size[t] + this.size.width * this.parent.cellAlign; | |
| 452 | - }, n.renderPosition = function (t) { | |
| 453 | - var e = this.parent.originSide; | |
| 454 | - this.element.style[e] = this.parent.getPositionValue(t); | |
| 455 | - }, n.select = function () { | |
| 456 | - this.element.classList.add("is-selected"), this.element.removeAttribute("aria-hidden"); | |
| 457 | - }, n.unselect = function () { | |
| 458 | - this.element.classList.remove("is-selected"), this.element.setAttribute("aria-hidden", "true"); | |
| 459 | - }, n.wrapShift = function (t) { | |
| 460 | - this.shift = t, this.renderPosition(this.x + this.parent.slideableWidth * t); | |
| 461 | - }, n.remove = function () { | |
| 462 | - this.element.parentNode.removeChild(this.element); | |
| 463 | - }, i; | |
| 464 | -}), function (t, e) { | |
| 465 | - "function" == typeof define && define.amd ? define("flickity/js/slide", e) : "object" == typeof module && module.exports ? module.exports = e() : (t.Flickity = t.Flickity || {}, t.Flickity.Slide = e()); | |
| 466 | -}(window, function () { | |
| 467 | - "use strict"; | |
| 468 | - | |
| 469 | - function t(t) { | |
| 470 | - this.parent = t, this.isOriginLeft = "left" == t.originSide, this.cells = [], this.outerWidth = 0, this.height = 0; | |
| 471 | - } | |
| 472 | - | |
| 473 | - var e = t.prototype; | |
| 474 | - return e.addCell = function (t) { | |
| 475 | - if (this.cells.push(t), this.outerWidth += t.size.outerWidth, this.height = Math.max(t.size.outerHeight, this.height), 1 == this.cells.length) { | |
| 476 | - this.x = t.x; | |
| 477 | - var e = this.isOriginLeft ? "marginLeft" : "marginRight"; | |
| 478 | - this.firstMargin = t.size[e]; | |
| 479 | - } | |
| 480 | - }, e.updateTarget = function () { | |
| 481 | - var t = this.isOriginLeft ? "marginRight" : "marginLeft", | |
| 482 | - e = this.getLastCell(), | |
| 483 | - i = e ? e.size[t] : 0, | |
| 484 | - n = this.outerWidth - (this.firstMargin + i); | |
| 485 | - this.target = this.x + this.firstMargin + n * this.parent.cellAlign; | |
| 486 | - }, e.getLastCell = function () { | |
| 487 | - return this.cells[this.cells.length - 1]; | |
| 488 | - }, e.select = function () { | |
| 489 | - this.cells.forEach(function (t) { | |
| 490 | - t.select(); | |
| 491 | - }); | |
| 492 | - }, e.unselect = function () { | |
| 493 | - this.cells.forEach(function (t) { | |
| 494 | - t.unselect(); | |
| 495 | - }); | |
| 496 | - }, e.getCellElements = function () { | |
| 497 | - return this.cells.map(function (t) { | |
| 498 | - return t.element; | |
| 499 | - }); | |
| 500 | - }, t; | |
| 501 | -}), function (e, i) { | |
| 502 | - "function" == typeof define && define.amd ? define("flickity/js/animate", ["fizzy-ui-utils/utils"], function (t) { | |
| 503 | - return i(e, t); | |
| 504 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("fizzy-ui-utils")) : (e.Flickity = e.Flickity || {}, e.Flickity.animatePrototype = i(e, e.fizzyUIUtils)); | |
| 505 | -}(window, function (t, e) { | |
| 506 | - var i = { | |
| 507 | - startAnimation: function () { | |
| 508 | - this.isAnimating || (this.isAnimating = !0, this.restingFrames = 0, this.animate()); | |
| 509 | - }, | |
| 510 | - animate: function () { | |
| 511 | - this.applyDragForce(), this.applySelectedAttraction(); | |
| 512 | - var t = this.x; | |
| 513 | - | |
| 514 | - if (this.integratePhysics(), this.positionSlider(), this.settle(t), this.isAnimating) { | |
| 515 | - var e = this; | |
| 516 | - requestAnimationFrame(function () { | |
| 517 | - e.animate(); | |
| 518 | - }); | |
| 519 | - } | |
| 520 | - }, | |
| 521 | - positionSlider: function () { | |
| 522 | - var t = this.x; | |
| 523 | - this.options.wrapAround && 1 < this.cells.length && (t = e.modulo(t, this.slideableWidth), t -= this.slideableWidth, this.shiftWrapCells(t)), this.setTranslateX(t, this.isAnimating), this.dispatchScrollEvent(); | |
| 524 | - }, | |
| 525 | - setTranslateX: function (t, e) { | |
| 526 | - t += this.cursorPosition, t = this.options.rightToLeft ? -t : t; | |
| 527 | - var i = this.getPositionValue(t); | |
| 528 | - this.slider.style.transform = e ? "translate3d(" + i + ",0,0)" : "translateX(" + i + ")"; | |
| 529 | - }, | |
| 530 | - dispatchScrollEvent: function () { | |
| 531 | - var t = this.slides[0]; | |
| 532 | - | |
| 533 | - if (t) { | |
| 534 | - var e = -this.x - t.target, | |
| 535 | - i = e / this.slidesWidth; | |
| 536 | - this.dispatchEvent("scroll", null, [i, e]); | |
| 537 | - } | |
| 538 | - }, | |
| 539 | - positionSliderAtSelected: function () { | |
| 540 | - this.cells.length && (this.x = -this.selectedSlide.target, this.velocity = 0, this.positionSlider()); | |
| 541 | - }, | |
| 542 | - getPositionValue: function (t) { | |
| 543 | - return this.options.percentPosition ? .01 * Math.round(t / this.size.innerWidth * 1e4) + "%" : Math.round(t) + "px"; | |
| 544 | - }, | |
| 545 | - settle: function (t) { | |
| 546 | - this.isPointerDown || Math.round(100 * this.x) != Math.round(100 * t) || this.restingFrames++, 2 < this.restingFrames && (this.isAnimating = !1, delete this.isFreeScrolling, this.positionSlider(), this.dispatchEvent("settle", null, [this.selectedIndex])); | |
| 547 | - }, | |
| 548 | - shiftWrapCells: function (t) { | |
| 549 | - var e = this.cursorPosition + t; | |
| 550 | - | |
| 551 | - this._shiftCells(this.beforeShiftCells, e, -1); | |
| 552 | - | |
| 553 | - var i = this.size.innerWidth - (t + this.slideableWidth + this.cursorPosition); | |
| 554 | - | |
| 555 | - this._shiftCells(this.afterShiftCells, i, 1); | |
| 556 | - }, | |
| 557 | - _shiftCells: function (t, e, i) { | |
| 558 | - for (var n = 0; n < t.length; n++) { | |
| 559 | - var s = t[n], | |
| 560 | - o = 0 < e ? i : 0; | |
| 561 | - s.wrapShift(o), e -= s.size.outerWidth; | |
| 562 | - } | |
| 563 | - }, | |
| 564 | - _unshiftCells: function (t) { | |
| 565 | - if (t && t.length) for (var e = 0; e < t.length; e++) t[e].wrapShift(0); | |
| 566 | - }, | |
| 567 | - integratePhysics: function () { | |
| 568 | - this.x += this.velocity, this.velocity *= this.getFrictionFactor(); | |
| 569 | - }, | |
| 570 | - applyForce: function (t) { | |
| 571 | - this.velocity += t; | |
| 572 | - }, | |
| 573 | - getFrictionFactor: function () { | |
| 574 | - return 1 - this.options[this.isFreeScrolling ? "freeScrollFriction" : "friction"]; | |
| 575 | - }, | |
| 576 | - getRestingPosition: function () { | |
| 577 | - return this.x + this.velocity / (1 - this.getFrictionFactor()); | |
| 578 | - }, | |
| 579 | - applyDragForce: function () { | |
| 580 | - if (this.isDraggable && this.isPointerDown) { | |
| 581 | - var t = this.dragX - this.x - this.velocity; | |
| 582 | - this.applyForce(t); | |
| 583 | - } | |
| 584 | - }, | |
| 585 | - applySelectedAttraction: function () { | |
| 586 | - if (!(this.isDraggable && this.isPointerDown) && !this.isFreeScrolling && this.slides.length) { | |
| 587 | - var t = (-1 * this.selectedSlide.target - this.x) * this.options.selectedAttraction; | |
| 588 | - this.applyForce(t); | |
| 589 | - } | |
| 590 | - } | |
| 591 | - }; | |
| 592 | - return i; | |
| 593 | -}), function (r, a) { | |
| 594 | - if ("function" == typeof define && 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, o) { | |
| 595 | - return a(r, t, e, i, n, s, o); | |
| 596 | - });else if ("object" == typeof module && module.exports) module.exports = a(r, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./cell"), require("./slide"), require("./animate"));else { | |
| 597 | - var t = r.Flickity; | |
| 598 | - r.Flickity = a(r, r.EvEmitter, r.getSize, r.fizzyUIUtils, t.Cell, t.Slide, t.animatePrototype); | |
| 599 | - } | |
| 600 | -}(window, function (n, t, e, a, i, r, s) { | |
| 601 | - var l = n.jQuery, | |
| 602 | - o = n.getComputedStyle, | |
| 603 | - h = n.console; | |
| 604 | - | |
| 605 | - function c(t, e) { | |
| 606 | - for (t = a.makeArray(t); t.length;) e.appendChild(t.shift()); | |
| 607 | - } | |
| 608 | - | |
| 609 | - var d = 0, | |
| 610 | - u = {}; | |
| 611 | - | |
| 612 | - function f(t, e) { | |
| 613 | - var i = a.getQueryElement(t); | |
| 614 | - | |
| 615 | - if (i) { | |
| 616 | - if (this.element = i, this.element.flickityGUID) { | |
| 617 | - var n = u[this.element.flickityGUID]; | |
| 618 | - return n.option(e), n; | |
| 619 | - } | |
| 620 | - | |
| 621 | - l && (this.$element = l(this.element)), this.options = a.extend({}, this.constructor.defaults), this.option(e), this._create(); | |
| 622 | - } else h && h.error("Bad element for Flickity: " + (i || t)); | |
| 623 | - } | |
| 624 | - | |
| 625 | - f.defaults = { | |
| 626 | - accessibility: !0, | |
| 627 | - cellAlign: "center", | |
| 628 | - freeScrollFriction: .075, | |
| 629 | - friction: .28, | |
| 630 | - namespaceJQueryEvents: !0, | |
| 631 | - percentPosition: !0, | |
| 632 | - resize: !0, | |
| 633 | - selectedAttraction: .025, | |
| 634 | - setGallerySize: !0 | |
| 635 | - }, f.createMethods = []; | |
| 636 | - var p = f.prototype; | |
| 637 | - a.extend(p, t.prototype), p._create = function () { | |
| 638 | - var t = this.guid = ++d; | |
| 639 | - | |
| 640 | - for (var e in this.element.flickityGUID = t, (u[t] = this).selectedIndex = 0, this.restingFrames = 0, this.x = 0, this.velocity = 0, this.originSide = this.options.rightToLeft ? "right" : "left", this.viewport = document.createElement("div"), this.viewport.className = "flickity-viewport", this._createSlider(), (this.options.resize || this.options.watchCSS) && n.addEventListener("resize", this), this.options.on) { | |
| 641 | - var i = this.options.on[e]; | |
| 642 | - this.on(e, i); | |
| 643 | - } | |
| 644 | - | |
| 645 | - f.createMethods.forEach(function (t) { | |
| 646 | - this[t](); | |
| 647 | - }, this), this.options.watchCSS ? this.watchCSS() : this.activate(); | |
| 648 | - }, p.option = function (t) { | |
| 649 | - a.extend(this.options, t); | |
| 650 | - }, p.activate = function () { | |
| 651 | - this.isActive || (this.isActive = !0, this.element.classList.add("flickity-enabled"), this.options.rightToLeft && this.element.classList.add("flickity-rtl"), this.getSize(), c(this._filterFindCellElements(this.element.children), this.slider), this.viewport.appendChild(this.slider), this.element.appendChild(this.viewport), this.reloadCells(), this.options.accessibility && (this.element.tabIndex = 0, this.element.addEventListener("keydown", this)), this.emitEvent("activate"), this.selectInitialIndex(), this.isInitActivated = !0, this.dispatchEvent("ready")); | |
| 652 | - }, p._createSlider = function () { | |
| 653 | - var t = document.createElement("div"); | |
| 654 | - t.className = "flickity-slider", t.style[this.originSide] = 0, this.slider = t; | |
| 655 | - }, p._filterFindCellElements = function (t) { | |
| 656 | - return a.filterFindElements(t, this.options.cellSelector); | |
| 657 | - }, p.reloadCells = function () { | |
| 658 | - this.cells = this._makeCells(this.slider.children), this.positionCells(), this._getWrapShiftCells(), this.setGallerySize(); | |
| 659 | - }, p._makeCells = function (t) { | |
| 660 | - return this._filterFindCellElements(t).map(function (t) { | |
| 661 | - return new i(t, this); | |
| 662 | - }, this); | |
| 663 | - }, p.getLastCell = function () { | |
| 664 | - return this.cells[this.cells.length - 1]; | |
| 665 | - }, p.getLastSlide = function () { | |
| 666 | - return this.slides[this.slides.length - 1]; | |
| 667 | - }, p.positionCells = function () { | |
| 668 | - this._sizeCells(this.cells), this._positionCells(0); | |
| 669 | - }, p._positionCells = function (t) { | |
| 670 | - t = t || 0, this.maxCellHeight = t && this.maxCellHeight || 0; | |
| 671 | - var e = 0; | |
| 672 | - | |
| 673 | - if (0 < t) { | |
| 674 | - var i = this.cells[t - 1]; | |
| 675 | - e = i.x + i.size.outerWidth; | |
| 676 | - } | |
| 677 | - | |
| 678 | - for (var n = this.cells.length, s = t; s < n; s++) { | |
| 679 | - var o = this.cells[s]; | |
| 680 | - o.setPosition(e), e += o.size.outerWidth, this.maxCellHeight = Math.max(o.size.outerHeight, this.maxCellHeight); | |
| 681 | - } | |
| 682 | - | |
| 683 | - this.slideableWidth = e, this.updateSlides(), this._containSlides(), this.slidesWidth = n ? this.getLastSlide().target - this.slides[0].target : 0; | |
| 684 | - }, p._sizeCells = function (t) { | |
| 685 | - t.forEach(function (t) { | |
| 686 | - t.getSize(); | |
| 687 | - }); | |
| 688 | - }, p.updateSlides = function () { | |
| 689 | - if (this.slides = [], this.cells.length) { | |
| 690 | - var n = new r(this); | |
| 691 | - this.slides.push(n); | |
| 692 | - | |
| 693 | - var s = "left" == this.originSide ? "marginRight" : "marginLeft", | |
| 694 | - o = this._getCanCellFit(); | |
| 695 | - | |
| 696 | - this.cells.forEach(function (t, e) { | |
| 697 | - if (n.cells.length) { | |
| 698 | - var i = n.outerWidth - n.firstMargin + (t.size.outerWidth - t.size[s]); | |
| 699 | - o.call(this, e, i) || (n.updateTarget(), n = new r(this), this.slides.push(n)), n.addCell(t); | |
| 700 | - } else n.addCell(t); | |
| 701 | - }, this), n.updateTarget(), this.updateSelectedSlide(); | |
| 702 | - } | |
| 703 | - }, p._getCanCellFit = function () { | |
| 704 | - var t = this.options.groupCells; | |
| 705 | - if (!t) return function () { | |
| 706 | - return !1; | |
| 707 | - }; | |
| 708 | - | |
| 709 | - if ("number" == typeof t) { | |
| 710 | - var e = parseInt(t, 10); | |
| 711 | - return function (t) { | |
| 712 | - return t % e != 0; | |
| 713 | - }; | |
| 714 | - } | |
| 715 | - | |
| 716 | - var i = "string" == typeof t && t.match(/^(\d+)%$/), | |
| 717 | - n = i ? parseInt(i[1], 10) / 100 : 1; | |
| 718 | - return function (t, e) { | |
| 719 | - return e <= (this.size.innerWidth + 1) * n; | |
| 720 | - }; | |
| 721 | - }, p._init = p.reposition = function () { | |
| 722 | - this.positionCells(), this.positionSliderAtSelected(); | |
| 723 | - }, p.getSize = function () { | |
| 724 | - this.size = e(this.element), this.setCellAlign(), this.cursorPosition = this.size.innerWidth * this.cellAlign; | |
| 725 | - }; | |
| 726 | - var g = { | |
| 727 | - center: { | |
| 728 | - left: .5, | |
| 729 | - right: .5 | |
| 730 | - }, | |
| 731 | - left: { | |
| 732 | - left: 0, | |
| 733 | - right: 1 | |
| 734 | - }, | |
| 735 | - right: { | |
| 736 | - right: 0, | |
| 737 | - left: 1 | |
| 738 | - } | |
| 739 | - }; | |
| 740 | - return p.setCellAlign = function () { | |
| 741 | - var t = g[this.options.cellAlign]; | |
| 742 | - this.cellAlign = t ? t[this.originSide] : this.options.cellAlign; | |
| 743 | - }, p.setGallerySize = function () { | |
| 744 | - if (this.options.setGallerySize) { | |
| 745 | - var t = this.options.adaptiveHeight && this.selectedSlide ? this.selectedSlide.height : this.maxCellHeight; | |
| 746 | - this.viewport.style.height = t + "px"; | |
| 747 | - } | |
| 748 | - }, p._getWrapShiftCells = function () { | |
| 749 | - if (this.options.wrapAround) { | |
| 750 | - this._unshiftCells(this.beforeShiftCells), this._unshiftCells(this.afterShiftCells); | |
| 751 | - var t = this.cursorPosition, | |
| 752 | - e = this.cells.length - 1; | |
| 753 | - this.beforeShiftCells = this._getGapCells(t, e, -1), t = this.size.innerWidth - this.cursorPosition, this.afterShiftCells = this._getGapCells(t, 0, 1); | |
| 754 | - } | |
| 755 | - }, p._getGapCells = function (t, e, i) { | |
| 756 | - for (var n = []; 0 < t;) { | |
| 757 | - var s = this.cells[e]; | |
| 758 | - if (!s) break; | |
| 759 | - n.push(s), e += i, t -= s.size.outerWidth; | |
| 760 | - } | |
| 761 | - | |
| 762 | - return n; | |
| 763 | - }, p._containSlides = function () { | |
| 764 | - if (this.options.contain && !this.options.wrapAround && this.cells.length) { | |
| 765 | - var t = this.options.rightToLeft, | |
| 766 | - e = t ? "marginRight" : "marginLeft", | |
| 767 | - i = t ? "marginLeft" : "marginRight", | |
| 768 | - n = this.slideableWidth - this.getLastCell().size[i], | |
| 769 | - s = n < this.size.innerWidth, | |
| 770 | - o = this.cursorPosition + this.cells[0].size[e], | |
| 771 | - r = n - this.size.innerWidth * (1 - this.cellAlign); | |
| 772 | - this.slides.forEach(function (t) { | |
| 773 | - s ? t.target = n * this.cellAlign : (t.target = Math.max(t.target, o), t.target = Math.min(t.target, r)); | |
| 774 | - }, this); | |
| 775 | - } | |
| 776 | - }, p.dispatchEvent = function (t, e, i) { | |
| 777 | - var n = e ? [e].concat(i) : i; | |
| 778 | - | |
| 779 | - if (this.emitEvent(t, n), l && this.$element) { | |
| 780 | - var s = t += this.options.namespaceJQueryEvents ? ".flickity" : ""; | |
| 781 | - | |
| 782 | - if (e) { | |
| 783 | - var o = l.Event(e); | |
| 784 | - o.type = t, s = o; | |
| 785 | - } | |
| 786 | - | |
| 787 | - this.$element.trigger(s, i); | |
| 788 | - } | |
| 789 | - }, p.select = function (t, e, i) { | |
| 790 | - if (this.isActive && (t = parseInt(t, 10), this._wrapSelect(t), (this.options.wrapAround || e) && (t = a.modulo(t, this.slides.length)), this.slides[t])) { | |
| 791 | - var n = this.selectedIndex; | |
| 792 | - this.selectedIndex = t, this.updateSelectedSlide(), i ? this.positionSliderAtSelected() : this.startAnimation(), this.options.adaptiveHeight && this.setGallerySize(), this.dispatchEvent("select", null, [t]), t != n && this.dispatchEvent("change", null, [t]), this.dispatchEvent("cellSelect"); | |
| 793 | - } | |
| 794 | - }, p._wrapSelect = function (t) { | |
| 795 | - var e = this.slides.length; | |
| 796 | - if (!(this.options.wrapAround && 1 < e)) return t; | |
| 797 | - var i = a.modulo(t, e), | |
| 798 | - n = Math.abs(i - this.selectedIndex), | |
| 799 | - s = Math.abs(i + e - this.selectedIndex), | |
| 800 | - o = Math.abs(i - e - this.selectedIndex); | |
| 801 | - !this.isDragSelect && s < n ? t += e : !this.isDragSelect && o < n && (t -= e), t < 0 ? this.x -= this.slideableWidth : e <= t && (this.x += this.slideableWidth); | |
| 802 | - }, p.previous = function (t, e) { | |
| 803 | - this.select(this.selectedIndex - 1, t, e); | |
| 804 | - }, p.next = function (t, e) { | |
| 805 | - this.select(this.selectedIndex + 1, t, e); | |
| 806 | - }, p.updateSelectedSlide = function () { | |
| 807 | - var t = this.slides[this.selectedIndex]; | |
| 808 | - t && (this.unselectSelectedSlide(), (this.selectedSlide = t).select(), this.selectedCells = t.cells, this.selectedElements = t.getCellElements(), this.selectedCell = t.cells[0], this.selectedElement = this.selectedElements[0]); | |
| 809 | - }, p.unselectSelectedSlide = function () { | |
| 810 | - this.selectedSlide && this.selectedSlide.unselect(); | |
| 811 | - }, p.selectInitialIndex = function () { | |
| 812 | - var t = this.options.initialIndex; | |
| 813 | - if (this.isInitActivated) this.select(this.selectedIndex, !1, !0);else { | |
| 814 | - if (t && "string" == typeof t) if (this.queryCell(t)) return void this.selectCell(t, !1, !0); | |
| 815 | - var e = 0; | |
| 816 | - t && this.slides[t] && (e = t), this.select(e, !1, !0); | |
| 817 | - } | |
| 818 | - }, p.selectCell = function (t, e, i) { | |
| 819 | - var n = this.queryCell(t); | |
| 820 | - | |
| 821 | - if (n) { | |
| 822 | - var s = this.getCellSlideIndex(n); | |
| 823 | - this.select(s, e, i); | |
| 824 | - } | |
| 825 | - }, p.getCellSlideIndex = function (t) { | |
| 826 | - for (var e = 0; e < this.slides.length; e++) { | |
| 827 | - if (-1 != this.slides[e].cells.indexOf(t)) return e; | |
| 828 | - } | |
| 829 | - }, p.getCell = function (t) { | |
| 830 | - for (var e = 0; e < this.cells.length; e++) { | |
| 831 | - var i = this.cells[e]; | |
| 832 | - if (i.element == t) return i; | |
| 833 | - } | |
| 834 | - }, p.getCells = function (t) { | |
| 835 | - t = a.makeArray(t); | |
| 836 | - var i = []; | |
| 837 | - return t.forEach(function (t) { | |
| 838 | - var e = this.getCell(t); | |
| 839 | - e && i.push(e); | |
| 840 | - }, this), i; | |
| 841 | - }, p.getCellElements = function () { | |
| 842 | - return this.cells.map(function (t) { | |
| 843 | - return t.element; | |
| 844 | - }); | |
| 845 | - }, p.getParentCell = function (t) { | |
| 846 | - var e = this.getCell(t); | |
| 847 | - return e || (t = a.getParent(t, ".flickity-slider > *"), this.getCell(t)); | |
| 848 | - }, p.getAdjacentCellElements = function (t, e) { | |
| 849 | - if (!t) return this.selectedSlide.getCellElements(); | |
| 850 | - e = void 0 === e ? this.selectedIndex : e; | |
| 851 | - var i = this.slides.length; | |
| 852 | - if (i <= 1 + 2 * t) return this.getCellElements(); | |
| 853 | - | |
| 854 | - for (var n = [], s = e - t; s <= e + t; s++) { | |
| 855 | - var o = this.options.wrapAround ? a.modulo(s, i) : s, | |
| 856 | - r = this.slides[o]; | |
| 857 | - r && (n = n.concat(r.getCellElements())); | |
| 858 | - } | |
| 859 | - | |
| 860 | - return n; | |
| 861 | - }, p.queryCell = function (t) { | |
| 862 | - if ("number" == typeof t) return this.cells[t]; | |
| 863 | - | |
| 864 | - if ("string" == typeof t) { | |
| 865 | - if (t.match(/^[#\.]?[\d\/]/)) return; | |
| 866 | - t = this.element.querySelector(t); | |
| 867 | - } | |
| 868 | - | |
| 869 | - return this.getCell(t); | |
| 870 | - }, p.uiChange = function () { | |
| 871 | - this.emitEvent("uiChange"); | |
| 872 | - }, p.childUIPointerDown = function (t) { | |
| 873 | - "touchstart" != t.type && t.preventDefault(), this.focus(); | |
| 874 | - }, p.onresize = function () { | |
| 875 | - this.watchCSS(), this.resize(); | |
| 876 | - }, a.debounceMethod(f, "onresize", 150), p.resize = function () { | |
| 877 | - if (this.isActive) { | |
| 878 | - this.getSize(), this.options.wrapAround && (this.x = a.modulo(this.x, this.slideableWidth)), this.positionCells(), this._getWrapShiftCells(), this.setGallerySize(), this.emitEvent("resize"); | |
| 879 | - var t = this.selectedElements && this.selectedElements[0]; | |
| 880 | - this.selectCell(t, !1, !0); | |
| 881 | - } | |
| 882 | - }, p.watchCSS = function () { | |
| 883 | - this.options.watchCSS && (-1 != o(this.element, ":after").content.indexOf("flickity") ? this.activate() : this.deactivate()); | |
| 884 | - }, p.onkeydown = function (t) { | |
| 885 | - var e = document.activeElement && document.activeElement != this.element; | |
| 886 | - | |
| 887 | - if (this.options.accessibility && !e) { | |
| 888 | - var i = f.keyboardHandlers[t.keyCode]; | |
| 889 | - i && i.call(this); | |
| 890 | - } | |
| 891 | - }, f.keyboardHandlers = { | |
| 892 | - 37: function () { | |
| 893 | - var t = this.options.rightToLeft ? "next" : "previous"; | |
| 894 | - this.uiChange(), this[t](); | |
| 895 | - }, | |
| 896 | - 39: function () { | |
| 897 | - var t = this.options.rightToLeft ? "previous" : "next"; | |
| 898 | - this.uiChange(), this[t](); | |
| 899 | - } | |
| 900 | - }, p.focus = function () { | |
| 901 | - var t = n.pageYOffset; | |
| 902 | - this.element.focus({ | |
| 903 | - preventScroll: !0 | |
| 904 | - }), n.pageYOffset != t && n.scrollTo(n.pageXOffset, t); | |
| 905 | - }, p.deactivate = function () { | |
| 906 | - this.isActive && (this.element.classList.remove("flickity-enabled"), this.element.classList.remove("flickity-rtl"), this.unselectSelectedSlide(), this.cells.forEach(function (t) { | |
| 907 | - t.destroy(); | |
| 908 | - }), this.element.removeChild(this.viewport), c(this.slider.children, this.element), this.options.accessibility && (this.element.removeAttribute("tabIndex"), this.element.removeEventListener("keydown", this)), this.isActive = !1, this.emitEvent("deactivate")); | |
| 909 | - }, p.destroy = function () { | |
| 910 | - this.deactivate(), n.removeEventListener("resize", this), this.allOff(), this.emitEvent("destroy"), l && this.$element && l.removeData(this.element, "flickity"), delete this.element.flickityGUID, delete u[this.guid]; | |
| 911 | - }, a.extend(p, s), f.data = function (t) { | |
| 912 | - var e = (t = a.getQueryElement(t)) && t.flickityGUID; | |
| 913 | - return e && u[e]; | |
| 914 | - }, a.htmlInit(f, "flickity"), l && l.bridget && l.bridget("flickity", f), f.setJQuery = function (t) { | |
| 915 | - l = t; | |
| 916 | - }, f.Cell = i, f.Slide = r, f; | |
| 917 | -}), function (e, i) { | |
| 918 | - "function" == typeof define && define.amd ? define("unipointer/unipointer", ["ev-emitter/ev-emitter"], function (t) { | |
| 919 | - return i(e, t); | |
| 920 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("ev-emitter")) : e.Unipointer = i(e, e.EvEmitter); | |
| 921 | -}(window, function (s, t) { | |
| 922 | - function e() {} | |
| 923 | - | |
| 924 | - var i = e.prototype = Object.create(t.prototype); | |
| 925 | - i.bindStartEvent = function (t) { | |
| 926 | - this._bindStartEvent(t, !0); | |
| 927 | - }, i.unbindStartEvent = function (t) { | |
| 928 | - this._bindStartEvent(t, !1); | |
| 929 | - }, i._bindStartEvent = function (t, e) { | |
| 930 | - var i = (e = void 0 === e || e) ? "addEventListener" : "removeEventListener", | |
| 931 | - n = "mousedown"; | |
| 932 | - s.PointerEvent ? n = "pointerdown" : "ontouchstart" in s && (n = "touchstart"), t[i](n, this); | |
| 933 | - }, i.handleEvent = function (t) { | |
| 934 | - var e = "on" + t.type; | |
| 935 | - this[e] && this[e](t); | |
| 936 | - }, i.getTouch = function (t) { | |
| 937 | - for (var e = 0; e < t.length; e++) { | |
| 938 | - var i = t[e]; | |
| 939 | - if (i.identifier == this.pointerIdentifier) return i; | |
| 940 | - } | |
| 941 | - }, i.onmousedown = function (t) { | |
| 942 | - var e = t.button; | |
| 943 | - e && 0 !== e && 1 !== e || this._pointerDown(t, t); | |
| 944 | - }, i.ontouchstart = function (t) { | |
| 945 | - this._pointerDown(t, t.changedTouches[0]); | |
| 946 | - }, i.onpointerdown = function (t) { | |
| 947 | - this._pointerDown(t, t); | |
| 948 | - }, i._pointerDown = function (t, e) { | |
| 949 | - t.button || this.isPointerDown || (this.isPointerDown = !0, this.pointerIdentifier = void 0 !== e.pointerId ? e.pointerId : e.identifier, this.pointerDown(t, e)); | |
| 950 | - }, i.pointerDown = function (t, e) { | |
| 951 | - this._bindPostStartEvents(t), this.emitEvent("pointerDown", [t, e]); | |
| 952 | - }; | |
| 953 | - var n = { | |
| 954 | - mousedown: ["mousemove", "mouseup"], | |
| 955 | - touchstart: ["touchmove", "touchend", "touchcancel"], | |
| 956 | - pointerdown: ["pointermove", "pointerup", "pointercancel"] | |
| 957 | - }; | |
| 958 | - return i._bindPostStartEvents = function (t) { | |
| 959 | - if (t) { | |
| 960 | - var e = n[t.type]; | |
| 961 | - e.forEach(function (t) { | |
| 962 | - s.addEventListener(t, this); | |
| 963 | - }, this), this._boundPointerEvents = e; | |
| 964 | - } | |
| 965 | - }, i._unbindPostStartEvents = function () { | |
| 966 | - this._boundPointerEvents && (this._boundPointerEvents.forEach(function (t) { | |
| 967 | - s.removeEventListener(t, this); | |
| 968 | - }, this), delete this._boundPointerEvents); | |
| 969 | - }, i.onmousemove = function (t) { | |
| 970 | - this._pointerMove(t, t); | |
| 971 | - }, i.onpointermove = function (t) { | |
| 972 | - t.pointerId == this.pointerIdentifier && this._pointerMove(t, t); | |
| 973 | - }, i.ontouchmove = function (t) { | |
| 974 | - var e = this.getTouch(t.changedTouches); | |
| 975 | - e && this._pointerMove(t, e); | |
| 976 | - }, i._pointerMove = function (t, e) { | |
| 977 | - this.pointerMove(t, e); | |
| 978 | - }, i.pointerMove = function (t, e) { | |
| 979 | - this.emitEvent("pointerMove", [t, e]); | |
| 980 | - }, i.onmouseup = function (t) { | |
| 981 | - this._pointerUp(t, t); | |
| 982 | - }, i.onpointerup = function (t) { | |
| 983 | - t.pointerId == this.pointerIdentifier && this._pointerUp(t, t); | |
| 984 | - }, i.ontouchend = function (t) { | |
| 985 | - var e = this.getTouch(t.changedTouches); | |
| 986 | - e && this._pointerUp(t, e); | |
| 987 | - }, i._pointerUp = function (t, e) { | |
| 988 | - this._pointerDone(), this.pointerUp(t, e); | |
| 989 | - }, i.pointerUp = function (t, e) { | |
| 990 | - this.emitEvent("pointerUp", [t, e]); | |
| 991 | - }, i._pointerDone = function () { | |
| 992 | - this._pointerReset(), this._unbindPostStartEvents(), this.pointerDone(); | |
| 993 | - }, i._pointerReset = function () { | |
| 994 | - this.isPointerDown = !1, delete this.pointerIdentifier; | |
| 995 | - }, i.pointerDone = function () {}, i.onpointercancel = function (t) { | |
| 996 | - t.pointerId == this.pointerIdentifier && this._pointerCancel(t, t); | |
| 997 | - }, i.ontouchcancel = function (t) { | |
| 998 | - var e = this.getTouch(t.changedTouches); | |
| 999 | - e && this._pointerCancel(t, e); | |
| 1000 | - }, i._pointerCancel = function (t, e) { | |
| 1001 | - this._pointerDone(), this.pointerCancel(t, e); | |
| 1002 | - }, i.pointerCancel = function (t, e) { | |
| 1003 | - this.emitEvent("pointerCancel", [t, e]); | |
| 1004 | - }, e.getPointerPoint = function (t) { | |
| 1005 | - return { | |
| 1006 | - x: t.pageX, | |
| 1007 | - y: t.pageY | |
| 1008 | - }; | |
| 1009 | - }, e; | |
| 1010 | -}), function (e, i) { | |
| 1011 | - "function" == typeof define && define.amd ? define("unidragger/unidragger", ["unipointer/unipointer"], function (t) { | |
| 1012 | - return i(e, t); | |
| 1013 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("unipointer")) : e.Unidragger = i(e, e.Unipointer); | |
| 1014 | -}(window, function (o, t) { | |
| 1015 | - function e() {} | |
| 1016 | - | |
| 1017 | - var i = e.prototype = Object.create(t.prototype); | |
| 1018 | - i.bindHandles = function () { | |
| 1019 | - this._bindHandles(!0); | |
| 1020 | - }, i.unbindHandles = function () { | |
| 1021 | - this._bindHandles(!1); | |
| 1022 | - }, i._bindHandles = function (t) { | |
| 1023 | - for (var e = (t = void 0 === t || t) ? "addEventListener" : "removeEventListener", i = t ? this._touchActionValue : "", n = 0; n < this.handles.length; n++) { | |
| 1024 | - var s = this.handles[n]; | |
| 1025 | - this._bindStartEvent(s, t), s[e]("click", this), o.PointerEvent && (s.style.touchAction = i); | |
| 1026 | - } | |
| 1027 | - }, i._touchActionValue = "none", i.pointerDown = function (t, e) { | |
| 1028 | - this.okayPointerDown(t) && (this.pointerDownPointer = e, t.preventDefault(), this.pointerDownBlur(), this._bindPostStartEvents(t), this.emitEvent("pointerDown", [t, e])); | |
| 1029 | - }; | |
| 1030 | - var s = { | |
| 1031 | - TEXTAREA: !0, | |
| 1032 | - INPUT: !0, | |
| 1033 | - SELECT: !0, | |
| 1034 | - OPTION: !0 | |
| 1035 | - }, | |
| 1036 | - r = { | |
| 1037 | - radio: !0, | |
| 1038 | - checkbox: !0, | |
| 1039 | - button: !0, | |
| 1040 | - submit: !0, | |
| 1041 | - image: !0, | |
| 1042 | - file: !0 | |
| 1043 | - }; | |
| 1044 | - return i.okayPointerDown = function (t) { | |
| 1045 | - var e = s[t.target.nodeName], | |
| 1046 | - i = r[t.target.type], | |
| 1047 | - n = !e || i; | |
| 1048 | - return n || this._pointerReset(), n; | |
| 1049 | - }, i.pointerDownBlur = function () { | |
| 1050 | - var t = document.activeElement; | |
| 1051 | - t && t.blur && t != document.body && t.blur(); | |
| 1052 | - }, i.pointerMove = function (t, e) { | |
| 1053 | - var i = this._dragPointerMove(t, e); | |
| 1054 | - | |
| 1055 | - this.emitEvent("pointerMove", [t, e, i]), this._dragMove(t, e, i); | |
| 1056 | - }, i._dragPointerMove = function (t, e) { | |
| 1057 | - var i = { | |
| 1058 | - x: e.pageX - this.pointerDownPointer.pageX, | |
| 1059 | - y: e.pageY - this.pointerDownPointer.pageY | |
| 1060 | - }; | |
| 1061 | - return !this.isDragging && this.hasDragStarted(i) && this._dragStart(t, e), i; | |
| 1062 | - }, i.hasDragStarted = function (t) { | |
| 1063 | - return 3 < Math.abs(t.x) || 3 < Math.abs(t.y); | |
| 1064 | - }, i.pointerUp = function (t, e) { | |
| 1065 | - this.emitEvent("pointerUp", [t, e]), this._dragPointerUp(t, e); | |
| 1066 | - }, i._dragPointerUp = function (t, e) { | |
| 1067 | - this.isDragging ? this._dragEnd(t, e) : this._staticClick(t, e); | |
| 1068 | - }, i._dragStart = function (t, e) { | |
| 1069 | - this.isDragging = !0, this.isPreventingClicks = !0, this.dragStart(t, e); | |
| 1070 | - }, i.dragStart = function (t, e) { | |
| 1071 | - this.emitEvent("dragStart", [t, e]); | |
| 1072 | - }, i._dragMove = function (t, e, i) { | |
| 1073 | - this.isDragging && this.dragMove(t, e, i); | |
| 1074 | - }, i.dragMove = function (t, e, i) { | |
| 1075 | - t.preventDefault(), this.emitEvent("dragMove", [t, e, i]); | |
| 1076 | - }, i._dragEnd = function (t, e) { | |
| 1077 | - this.isDragging = !1, setTimeout(function () { | |
| 1078 | - delete this.isPreventingClicks; | |
| 1079 | - }.bind(this)), this.dragEnd(t, e); | |
| 1080 | - }, i.dragEnd = function (t, e) { | |
| 1081 | - this.emitEvent("dragEnd", [t, e]); | |
| 1082 | - }, i.onclick = function (t) { | |
| 1083 | - this.isPreventingClicks && t.preventDefault(); | |
| 1084 | - }, i._staticClick = function (t, e) { | |
| 1085 | - this.isIgnoringMouseUp && "mouseup" == t.type || (this.staticClick(t, e), "mouseup" != t.type && (this.isIgnoringMouseUp = !0, setTimeout(function () { | |
| 1086 | - delete this.isIgnoringMouseUp; | |
| 1087 | - }.bind(this), 400))); | |
| 1088 | - }, i.staticClick = function (t, e) { | |
| 1089 | - this.emitEvent("staticClick", [t, e]); | |
| 1090 | - }, e.getPointerPoint = t.getPointerPoint, e; | |
| 1091 | -}), function (n, s) { | |
| 1092 | - "function" == typeof define && define.amd ? define("flickity/js/drag", ["./flickity", "unidragger/unidragger", "fizzy-ui-utils/utils"], function (t, e, i) { | |
| 1093 | - return s(n, t, e, i); | |
| 1094 | - }) : "object" == typeof module && module.exports ? module.exports = s(n, require("./flickity"), require("unidragger"), require("fizzy-ui-utils")) : n.Flickity = s(n, n.Flickity, n.Unidragger, n.fizzyUIUtils); | |
| 1095 | -}(window, function (i, t, e, a) { | |
| 1096 | - a.extend(t.defaults, { | |
| 1097 | - draggable: ">1", | |
| 1098 | - dragThreshold: 3 | |
| 1099 | - }), t.createMethods.push("_createDrag"); | |
| 1100 | - var n = t.prototype; | |
| 1101 | - a.extend(n, e.prototype), n._touchActionValue = "pan-y"; | |
| 1102 | - var s = ("createTouch" in document), | |
| 1103 | - o = !1; | |
| 1104 | - n._createDrag = function () { | |
| 1105 | - this.on("activate", this.onActivateDrag), this.on("uiChange", this._uiChangeDrag), this.on("deactivate", this.onDeactivateDrag), this.on("cellChange", this.updateDraggable), s && !o && (i.addEventListener("touchmove", function () {}), o = !0); | |
| 1106 | - }, n.onActivateDrag = function () { | |
| 1107 | - this.handles = [this.viewport], this.bindHandles(), this.updateDraggable(); | |
| 1108 | - }, n.onDeactivateDrag = function () { | |
| 1109 | - this.unbindHandles(), this.element.classList.remove("is-draggable"); | |
| 1110 | - }, n.updateDraggable = function () { | |
| 1111 | - ">1" == this.options.draggable ? this.isDraggable = 1 < this.slides.length : this.isDraggable = this.options.draggable, this.isDraggable ? this.element.classList.add("is-draggable") : this.element.classList.remove("is-draggable"); | |
| 1112 | - }, n.bindDrag = function () { | |
| 1113 | - this.options.draggable = !0, this.updateDraggable(); | |
| 1114 | - }, n.unbindDrag = function () { | |
| 1115 | - this.options.draggable = !1, this.updateDraggable(); | |
| 1116 | - }, n._uiChangeDrag = function () { | |
| 1117 | - delete this.isFreeScrolling; | |
| 1118 | - }, n.pointerDown = function (t, e) { | |
| 1119 | - this.isDraggable ? this.okayPointerDown(t) && (this._pointerDownPreventDefault(t), this.pointerDownFocus(t), document.activeElement != this.element && this.pointerDownBlur(), this.dragX = this.x, this.viewport.classList.add("is-pointer-down"), this.pointerDownScroll = l(), i.addEventListener("scroll", this), this._pointerDownDefault(t, e)) : this._pointerDownDefault(t, e); | |
| 1120 | - }, n._pointerDownDefault = function (t, e) { | |
| 1121 | - this.pointerDownPointer = { | |
| 1122 | - pageX: e.pageX, | |
| 1123 | - pageY: e.pageY | |
| 1124 | - }, this._bindPostStartEvents(t), this.dispatchEvent("pointerDown", t, [e]); | |
| 1125 | - }; | |
| 1126 | - var r = { | |
| 1127 | - INPUT: !0, | |
| 1128 | - TEXTAREA: !0, | |
| 1129 | - SELECT: !0 | |
| 1130 | - }; | |
| 1131 | - | |
| 1132 | - function l() { | |
| 1133 | - return { | |
| 1134 | - x: i.pageXOffset, | |
| 1135 | - y: i.pageYOffset | |
| 1136 | - }; | |
| 1137 | - } | |
| 1138 | - | |
| 1139 | - return n.pointerDownFocus = function (t) { | |
| 1140 | - r[t.target.nodeName] || this.focus(); | |
| 1141 | - }, n._pointerDownPreventDefault = function (t) { | |
| 1142 | - var e = "touchstart" == t.type, | |
| 1143 | - i = "touch" == t.pointerType, | |
| 1144 | - n = r[t.target.nodeName]; | |
| 1145 | - e || i || n || t.preventDefault(); | |
| 1146 | - }, n.hasDragStarted = function (t) { | |
| 1147 | - return Math.abs(t.x) > this.options.dragThreshold; | |
| 1148 | - }, n.pointerUp = function (t, e) { | |
| 1149 | - delete this.isTouchScrolling, this.viewport.classList.remove("is-pointer-down"), this.dispatchEvent("pointerUp", t, [e]), this._dragPointerUp(t, e); | |
| 1150 | - }, n.pointerDone = function () { | |
| 1151 | - i.removeEventListener("scroll", this), delete this.pointerDownScroll; | |
| 1152 | - }, n.dragStart = function (t, e) { | |
| 1153 | - this.isDraggable && (this.dragStartPosition = this.x, this.startAnimation(), i.removeEventListener("scroll", this), this.dispatchEvent("dragStart", t, [e])); | |
| 1154 | - }, n.pointerMove = function (t, e) { | |
| 1155 | - var i = this._dragPointerMove(t, e); | |
| 1156 | - | |
| 1157 | - this.dispatchEvent("pointerMove", t, [e, i]), this._dragMove(t, e, i); | |
| 1158 | - }, n.dragMove = function (t, e, i) { | |
| 1159 | - if (this.isDraggable) { | |
| 1160 | - t.preventDefault(), this.previousDragX = this.dragX; | |
| 1161 | - var n = this.options.rightToLeft ? -1 : 1; | |
| 1162 | - this.options.wrapAround && (i.x = i.x % this.slideableWidth); | |
| 1163 | - var s = this.dragStartPosition + i.x * n; | |
| 1164 | - | |
| 1165 | - if (!this.options.wrapAround && this.slides.length) { | |
| 1166 | - var o = Math.max(-this.slides[0].target, this.dragStartPosition); | |
| 1167 | - s = o < s ? .5 * (s + o) : s; | |
| 1168 | - var r = Math.min(-this.getLastSlide().target, this.dragStartPosition); | |
| 1169 | - s = s < r ? .5 * (s + r) : s; | |
| 1170 | - } | |
| 1171 | - | |
| 1172 | - this.dragX = s, this.dragMoveTime = new Date(), this.dispatchEvent("dragMove", t, [e, i]); | |
| 1173 | - } | |
| 1174 | - }, n.dragEnd = function (t, e) { | |
| 1175 | - if (this.isDraggable) { | |
| 1176 | - this.options.freeScroll && (this.isFreeScrolling = !0); | |
| 1177 | - var i = this.dragEndRestingSelect(); | |
| 1178 | - | |
| 1179 | - if (this.options.freeScroll && !this.options.wrapAround) { | |
| 1180 | - var n = this.getRestingPosition(); | |
| 1181 | - this.isFreeScrolling = -n > this.slides[0].target && -n < this.getLastSlide().target; | |
| 1182 | - } else this.options.freeScroll || i != this.selectedIndex || (i += this.dragEndBoostSelect()); | |
| 1183 | - | |
| 1184 | - delete this.previousDragX, this.isDragSelect = this.options.wrapAround, this.select(i), delete this.isDragSelect, this.dispatchEvent("dragEnd", t, [e]); | |
| 1185 | - } | |
| 1186 | - }, n.dragEndRestingSelect = function () { | |
| 1187 | - var t = this.getRestingPosition(), | |
| 1188 | - e = Math.abs(this.getSlideDistance(-t, this.selectedIndex)), | |
| 1189 | - i = this._getClosestResting(t, e, 1), | |
| 1190 | - n = this._getClosestResting(t, e, -1); | |
| 1191 | - | |
| 1192 | - return i.distance < n.distance ? i.index : n.index; | |
| 1193 | - }, n._getClosestResting = function (t, e, i) { | |
| 1194 | - for (var n = this.selectedIndex, s = 1 / 0, o = this.options.contain && !this.options.wrapAround ? function (t, e) { | |
| 1195 | - return t <= e; | |
| 1196 | - } : function (t, e) { | |
| 1197 | - return t < e; | |
| 1198 | - }; o(e, s) && (n += i, s = e, null !== (e = this.getSlideDistance(-t, n)));) e = Math.abs(e); | |
| 1199 | - | |
| 1200 | - return { | |
| 1201 | - distance: s, | |
| 1202 | - index: n - i | |
| 1203 | - }; | |
| 1204 | - }, n.getSlideDistance = function (t, e) { | |
| 1205 | - var i = this.slides.length, | |
| 1206 | - n = this.options.wrapAround && 1 < i, | |
| 1207 | - s = n ? a.modulo(e, i) : e, | |
| 1208 | - o = this.slides[s]; | |
| 1209 | - if (!o) return null; | |
| 1210 | - var r = n ? this.slideableWidth * Math.floor(e / i) : 0; | |
| 1211 | - return t - (o.target + r); | |
| 1212 | - }, n.dragEndBoostSelect = function () { | |
| 1213 | - if (void 0 === this.previousDragX || !this.dragMoveTime || 100 < new Date() - this.dragMoveTime) return 0; | |
| 1214 | - var t = this.getSlideDistance(-this.dragX, this.selectedIndex), | |
| 1215 | - e = this.previousDragX - this.dragX; | |
| 1216 | - return 0 < t && 0 < e ? 1 : t < 0 && e < 0 ? -1 : 0; | |
| 1217 | - }, n.staticClick = function (t, e) { | |
| 1218 | - var i = this.getParentCell(t.target), | |
| 1219 | - n = i && i.element, | |
| 1220 | - s = i && this.cells.indexOf(i); | |
| 1221 | - this.dispatchEvent("staticClick", t, [e, n, s]); | |
| 1222 | - }, n.onscroll = function () { | |
| 1223 | - var t = l(), | |
| 1224 | - e = this.pointerDownScroll.x - t.x, | |
| 1225 | - i = this.pointerDownScroll.y - t.y; | |
| 1226 | - (3 < Math.abs(e) || 3 < Math.abs(i)) && this._pointerDone(); | |
| 1227 | - }, t; | |
| 1228 | -}), function (n, s) { | |
| 1229 | - "function" == typeof define && define.amd ? define("flickity/js/prev-next-button", ["./flickity", "unipointer/unipointer", "fizzy-ui-utils/utils"], function (t, e, i) { | |
| 1230 | - return s(n, t, e, i); | |
| 1231 | - }) : "object" == typeof module && module.exports ? module.exports = s(n, require("./flickity"), require("unipointer"), require("fizzy-ui-utils")) : s(n, n.Flickity, n.Unipointer, n.fizzyUIUtils); | |
| 1232 | -}(window, function (t, e, i, n) { | |
| 1233 | - "use strict"; | |
| 1234 | - | |
| 1235 | - var s = "http://www.w3.org/2000/svg"; | |
| 1236 | - | |
| 1237 | - function o(t, e) { | |
| 1238 | - this.direction = t, this.parent = e, this._create(); | |
| 1239 | - } | |
| 1240 | - | |
| 1241 | - (o.prototype = Object.create(i.prototype))._create = function () { | |
| 1242 | - this.isEnabled = !0, this.isPrevious = -1 == this.direction; | |
| 1243 | - var t = this.parent.options.rightToLeft ? 1 : -1; | |
| 1244 | - this.isLeft = this.direction == t; | |
| 1245 | - var e = this.element = document.createElement("button"); | |
| 1246 | - e.className = "flickity-button flickity-prev-next-button", e.className += this.isPrevious ? " previous" : " next", e.setAttribute("type", "button"), this.disable(), e.setAttribute("aria-label", this.isPrevious ? "Previous" : "Next"); | |
| 1247 | - var i = this.createSVG(); | |
| 1248 | - e.appendChild(i), this.parent.on("select", this.update.bind(this)), this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)); | |
| 1249 | - }, o.prototype.activate = function () { | |
| 1250 | - this.bindStartEvent(this.element), this.element.addEventListener("click", this), this.parent.element.appendChild(this.element); | |
| 1251 | - }, o.prototype.deactivate = function () { | |
| 1252 | - this.parent.element.removeChild(this.element), this.unbindStartEvent(this.element), this.element.removeEventListener("click", this); | |
| 1253 | - }, o.prototype.createSVG = function () { | |
| 1254 | - var t = document.createElementNS(s, "svg"); | |
| 1255 | - t.setAttribute("class", "flickity-button-icon"), t.setAttribute("viewBox", "0 0 100 100"); | |
| 1256 | - | |
| 1257 | - var e = document.createElementNS(s, "path"), | |
| 1258 | - i = function (t) { | |
| 1259 | - return "string" != typeof t ? "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" : t; | |
| 1260 | - }(this.parent.options.arrowShape); | |
| 1261 | - | |
| 1262 | - return e.setAttribute("d", i), e.setAttribute("class", "arrow"), this.isLeft || e.setAttribute("transform", "translate(100, 100) rotate(180) "), t.appendChild(e), t; | |
| 1263 | - }, o.prototype.handleEvent = n.handleEvent, o.prototype.onclick = function () { | |
| 1264 | - if (this.isEnabled) { | |
| 1265 | - this.parent.uiChange(); | |
| 1266 | - var t = this.isPrevious ? "previous" : "next"; | |
| 1267 | - this.parent[t](); | |
| 1268 | - } | |
| 1269 | - }, o.prototype.enable = function () { | |
| 1270 | - this.isEnabled || (this.element.disabled = !1, this.isEnabled = !0); | |
| 1271 | - }, o.prototype.disable = function () { | |
| 1272 | - this.isEnabled && (this.element.disabled = !0, this.isEnabled = !1); | |
| 1273 | - }, o.prototype.update = function () { | |
| 1274 | - var t = this.parent.slides; | |
| 1275 | - if (this.parent.options.wrapAround && 1 < t.length) this.enable();else { | |
| 1276 | - var e = t.length ? t.length - 1 : 0, | |
| 1277 | - i = this.isPrevious ? 0 : e; | |
| 1278 | - this[this.parent.selectedIndex == i ? "disable" : "enable"](); | |
| 1279 | - } | |
| 1280 | - }, o.prototype.destroy = function () { | |
| 1281 | - this.deactivate(), this.allOff(); | |
| 1282 | - }, n.extend(e.defaults, { | |
| 1283 | - prevNextButtons: !0, | |
| 1284 | - arrowShape: { | |
| 1285 | - x0: 10, | |
| 1286 | - x1: 60, | |
| 1287 | - y1: 50, | |
| 1288 | - x2: 70, | |
| 1289 | - y2: 40, | |
| 1290 | - x3: 30 | |
| 1291 | - } | |
| 1292 | - }), e.createMethods.push("_createPrevNextButtons"); | |
| 1293 | - var r = e.prototype; | |
| 1294 | - return r._createPrevNextButtons = function () { | |
| 1295 | - this.options.prevNextButtons && (this.prevButton = new o(-1, this), this.nextButton = new o(1, this), this.on("activate", this.activatePrevNextButtons)); | |
| 1296 | - }, r.activatePrevNextButtons = function () { | |
| 1297 | - this.prevButton.activate(), this.nextButton.activate(), this.on("deactivate", this.deactivatePrevNextButtons); | |
| 1298 | - }, r.deactivatePrevNextButtons = function () { | |
| 1299 | - this.prevButton.deactivate(), this.nextButton.deactivate(), this.off("deactivate", this.deactivatePrevNextButtons); | |
| 1300 | - }, e.PrevNextButton = o, e; | |
| 1301 | -}), function (n, s) { | |
| 1302 | - "function" == typeof define && define.amd ? define("flickity/js/page-dots", ["./flickity", "unipointer/unipointer", "fizzy-ui-utils/utils"], function (t, e, i) { | |
| 1303 | - return s(n, t, e, i); | |
| 1304 | - }) : "object" == typeof module && module.exports ? module.exports = s(n, require("./flickity"), require("unipointer"), require("fizzy-ui-utils")) : s(n, n.Flickity, n.Unipointer, n.fizzyUIUtils); | |
| 1305 | -}(window, function (t, e, i, n) { | |
| 1306 | - function s(t) { | |
| 1307 | - this.parent = t, this._create(); | |
| 1308 | - } | |
| 1309 | - | |
| 1310 | - (s.prototype = Object.create(i.prototype))._create = function () { | |
| 1311 | - this.holder = document.createElement("ol"), this.holder.className = "flickity-page-dots", this.dots = [], this.handleClick = this.onClick.bind(this), this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)); | |
| 1312 | - }, s.prototype.activate = function () { | |
| 1313 | - this.setDots(), this.holder.addEventListener("click", this.handleClick), this.bindStartEvent(this.holder), this.parent.element.appendChild(this.holder); | |
| 1314 | - }, s.prototype.deactivate = function () { | |
| 1315 | - this.holder.removeEventListener("click", this.handleClick), this.unbindStartEvent(this.holder), this.parent.element.removeChild(this.holder); | |
| 1316 | - }, s.prototype.setDots = function () { | |
| 1317 | - var t = this.parent.slides.length - this.dots.length; | |
| 1318 | - 0 < t ? this.addDots(t) : t < 0 && this.removeDots(-t); | |
| 1319 | - }, s.prototype.addDots = function (t) { | |
| 1320 | - for (var e = document.createDocumentFragment(), i = [], n = this.dots.length, s = n + t, o = n; o < s; o++) { | |
| 1321 | - var r = document.createElement("li"); | |
| 1322 | - r.className = "dot", r.setAttribute("aria-label", "Page dot " + (o + 1)), e.appendChild(r), i.push(r); | |
| 1323 | - } | |
| 1324 | - | |
| 1325 | - this.holder.appendChild(e), this.dots = this.dots.concat(i); | |
| 1326 | - }, s.prototype.removeDots = function (t) { | |
| 1327 | - this.dots.splice(this.dots.length - t, t).forEach(function (t) { | |
| 1328 | - this.holder.removeChild(t); | |
| 1329 | - }, this); | |
| 1330 | - }, s.prototype.updateSelected = function () { | |
| 1331 | - this.selectedDot && (this.selectedDot.className = "dot", this.selectedDot.removeAttribute("aria-current")), this.dots.length && (this.selectedDot = this.dots[this.parent.selectedIndex], this.selectedDot.className = "dot is-selected", this.selectedDot.setAttribute("aria-current", "step")); | |
| 1332 | - }, s.prototype.onTap = s.prototype.onClick = function (t) { | |
| 1333 | - var e = t.target; | |
| 1334 | - | |
| 1335 | - if ("LI" == e.nodeName) { | |
| 1336 | - this.parent.uiChange(); | |
| 1337 | - var i = this.dots.indexOf(e); | |
| 1338 | - this.parent.select(i); | |
| 1339 | - } | |
| 1340 | - }, s.prototype.destroy = function () { | |
| 1341 | - this.deactivate(), this.allOff(); | |
| 1342 | - }, e.PageDots = s, n.extend(e.defaults, { | |
| 1343 | - pageDots: !0 | |
| 1344 | - }), e.createMethods.push("_createPageDots"); | |
| 1345 | - var o = e.prototype; | |
| 1346 | - return o._createPageDots = function () { | |
| 1347 | - this.options.pageDots && (this.pageDots = new s(this), this.on("activate", this.activatePageDots), this.on("select", this.updateSelectedPageDots), this.on("cellChange", this.updatePageDots), this.on("resize", this.updatePageDots), this.on("deactivate", this.deactivatePageDots)); | |
| 1348 | - }, o.activatePageDots = function () { | |
| 1349 | - this.pageDots.activate(); | |
| 1350 | - }, o.updateSelectedPageDots = function () { | |
| 1351 | - this.pageDots.updateSelected(); | |
| 1352 | - }, o.updatePageDots = function () { | |
| 1353 | - this.pageDots.setDots(); | |
| 1354 | - }, o.deactivatePageDots = function () { | |
| 1355 | - this.pageDots.deactivate(); | |
| 1356 | - }, e.PageDots = s, e; | |
| 1357 | -}), function (t, n) { | |
| 1358 | - "function" == typeof define && define.amd ? define("flickity/js/player", ["ev-emitter/ev-emitter", "fizzy-ui-utils/utils", "./flickity"], function (t, e, i) { | |
| 1359 | - return n(t, e, i); | |
| 1360 | - }) : "object" == typeof module && module.exports ? module.exports = n(require("ev-emitter"), require("fizzy-ui-utils"), require("./flickity")) : n(t.EvEmitter, t.fizzyUIUtils, t.Flickity); | |
| 1361 | -}(window, function (t, e, i) { | |
| 1362 | - function n(t) { | |
| 1363 | - this.parent = t, this.state = "stopped", this.onVisibilityChange = this.visibilityChange.bind(this), this.onVisibilityPlay = this.visibilityPlay.bind(this); | |
| 1364 | - } | |
| 1365 | - | |
| 1366 | - (n.prototype = Object.create(t.prototype)).play = function () { | |
| 1367 | - "playing" != this.state && (document.hidden ? document.addEventListener("visibilitychange", this.onVisibilityPlay) : (this.state = "playing", document.addEventListener("visibilitychange", this.onVisibilityChange), this.tick())); | |
| 1368 | - }, n.prototype.tick = function () { | |
| 1369 | - if ("playing" == this.state) { | |
| 1370 | - var t = this.parent.options.autoPlay; | |
| 1371 | - t = "number" == typeof t ? t : 3e3; | |
| 1372 | - var e = this; | |
| 1373 | - this.clear(), this.timeout = setTimeout(function () { | |
| 1374 | - e.parent.next(!0), e.tick(); | |
| 1375 | - }, t); | |
| 1376 | - } | |
| 1377 | - }, n.prototype.stop = function () { | |
| 1378 | - this.state = "stopped", this.clear(), document.removeEventListener("visibilitychange", this.onVisibilityChange); | |
| 1379 | - }, n.prototype.clear = function () { | |
| 1380 | - clearTimeout(this.timeout); | |
| 1381 | - }, n.prototype.pause = function () { | |
| 1382 | - "playing" == this.state && (this.state = "paused", this.clear()); | |
| 1383 | - }, n.prototype.unpause = function () { | |
| 1384 | - "paused" == this.state && this.play(); | |
| 1385 | - }, n.prototype.visibilityChange = function () { | |
| 1386 | - this[document.hidden ? "pause" : "unpause"](); | |
| 1387 | - }, n.prototype.visibilityPlay = function () { | |
| 1388 | - this.play(), document.removeEventListener("visibilitychange", this.onVisibilityPlay); | |
| 1389 | - }, e.extend(i.defaults, { | |
| 1390 | - pauseAutoPlayOnHover: !0 | |
| 1391 | - }), i.createMethods.push("_createPlayer"); | |
| 1392 | - var s = i.prototype; | |
| 1393 | - return s._createPlayer = function () { | |
| 1394 | - this.player = new n(this), this.on("activate", this.activatePlayer), this.on("uiChange", this.stopPlayer), this.on("pointerDown", this.stopPlayer), this.on("deactivate", this.deactivatePlayer); | |
| 1395 | - }, s.activatePlayer = function () { | |
| 1396 | - this.options.autoPlay && (this.player.play(), this.element.addEventListener("mouseenter", this)); | |
| 1397 | - }, s.playPlayer = function () { | |
| 1398 | - this.player.play(); | |
| 1399 | - }, s.stopPlayer = function () { | |
| 1400 | - this.player.stop(); | |
| 1401 | - }, s.pausePlayer = function () { | |
| 1402 | - this.player.pause(); | |
| 1403 | - }, s.unpausePlayer = function () { | |
| 1404 | - this.player.unpause(); | |
| 1405 | - }, s.deactivatePlayer = function () { | |
| 1406 | - this.player.stop(), this.element.removeEventListener("mouseenter", this); | |
| 1407 | - }, s.onmouseenter = function () { | |
| 1408 | - this.options.pauseAutoPlayOnHover && (this.player.pause(), this.element.addEventListener("mouseleave", this)); | |
| 1409 | - }, s.onmouseleave = function () { | |
| 1410 | - this.player.unpause(), this.element.removeEventListener("mouseleave", this); | |
| 1411 | - }, i.Player = n, i; | |
| 1412 | -}), function (i, n) { | |
| 1413 | - "function" == typeof define && define.amd ? define("flickity/js/add-remove-cell", ["./flickity", "fizzy-ui-utils/utils"], function (t, e) { | |
| 1414 | - return n(i, t, e); | |
| 1415 | - }) : "object" == typeof module && module.exports ? module.exports = n(i, require("./flickity"), require("fizzy-ui-utils")) : n(i, i.Flickity, i.fizzyUIUtils); | |
| 1416 | -}(window, function (t, e, n) { | |
| 1417 | - var i = e.prototype; | |
| 1418 | - return i.insert = function (t, e) { | |
| 1419 | - var i = this._makeCells(t); | |
| 1420 | - | |
| 1421 | - if (i && i.length) { | |
| 1422 | - var n = this.cells.length; | |
| 1423 | - e = void 0 === e ? n : e; | |
| 1424 | - | |
| 1425 | - var s = function (t) { | |
| 1426 | - var e = document.createDocumentFragment(); | |
| 1427 | - return t.forEach(function (t) { | |
| 1428 | - e.appendChild(t.element); | |
| 1429 | - }), e; | |
| 1430 | - }(i), | |
| 1431 | - o = e == n; | |
| 1432 | - | |
| 1433 | - if (o) this.slider.appendChild(s);else { | |
| 1434 | - var r = this.cells[e].element; | |
| 1435 | - this.slider.insertBefore(s, r); | |
| 1436 | - } | |
| 1437 | - if (0 === e) this.cells = i.concat(this.cells);else if (o) this.cells = this.cells.concat(i);else { | |
| 1438 | - var a = this.cells.splice(e, n - e); | |
| 1439 | - this.cells = this.cells.concat(i).concat(a); | |
| 1440 | - } | |
| 1441 | - this._sizeCells(i), this.cellChange(e, !0); | |
| 1442 | - } | |
| 1443 | - }, i.append = function (t) { | |
| 1444 | - this.insert(t, this.cells.length); | |
| 1445 | - }, i.prepend = function (t) { | |
| 1446 | - this.insert(t, 0); | |
| 1447 | - }, i.remove = function (t) { | |
| 1448 | - var e = this.getCells(t); | |
| 1449 | - | |
| 1450 | - if (e && e.length) { | |
| 1451 | - var i = this.cells.length - 1; | |
| 1452 | - e.forEach(function (t) { | |
| 1453 | - t.remove(); | |
| 1454 | - var e = this.cells.indexOf(t); | |
| 1455 | - i = Math.min(e, i), n.removeFrom(this.cells, t); | |
| 1456 | - }, this), this.cellChange(i, !0); | |
| 1457 | - } | |
| 1458 | - }, i.cellSizeChange = function (t) { | |
| 1459 | - var e = this.getCell(t); | |
| 1460 | - | |
| 1461 | - if (e) { | |
| 1462 | - e.getSize(); | |
| 1463 | - var i = this.cells.indexOf(e); | |
| 1464 | - this.cellChange(i); | |
| 1465 | - } | |
| 1466 | - }, i.cellChange = function (t, e) { | |
| 1467 | - var i = this.selectedElement; | |
| 1468 | - this._positionCells(t), this._getWrapShiftCells(), this.setGallerySize(); | |
| 1469 | - var n = this.getCell(i); | |
| 1470 | - n && (this.selectedIndex = this.getCellSlideIndex(n)), this.selectedIndex = Math.min(this.slides.length - 1, this.selectedIndex), this.emitEvent("cellChange", [t]), this.select(this.selectedIndex), e && this.positionSliderAtSelected(); | |
| 1471 | - }, e; | |
| 1472 | -}), function (i, n) { | |
| 1473 | - "function" == typeof define && define.amd ? define("flickity/js/lazyload", ["./flickity", "fizzy-ui-utils/utils"], function (t, e) { | |
| 1474 | - return n(i, t, e); | |
| 1475 | - }) : "object" == typeof module && module.exports ? module.exports = n(i, require("./flickity"), require("fizzy-ui-utils")) : n(i, i.Flickity, i.fizzyUIUtils); | |
| 1476 | -}(window, function (t, e, o) { | |
| 1477 | - "use strict"; | |
| 1478 | - | |
| 1479 | - e.createMethods.push("_createLazyload"); | |
| 1480 | - var i = e.prototype; | |
| 1481 | - | |
| 1482 | - function s(t, e) { | |
| 1483 | - this.img = t, this.flickity = e, this.load(); | |
| 1484 | - } | |
| 1485 | - | |
| 1486 | - return i._createLazyload = function () { | |
| 1487 | - this.on("select", this.lazyLoad); | |
| 1488 | - }, i.lazyLoad = function () { | |
| 1489 | - var t = this.options.lazyLoad; | |
| 1490 | - | |
| 1491 | - if (t) { | |
| 1492 | - var e = "number" == typeof t ? t : 0, | |
| 1493 | - i = this.getAdjacentCellElements(e), | |
| 1494 | - n = []; | |
| 1495 | - i.forEach(function (t) { | |
| 1496 | - var e = function (t) { | |
| 1497 | - if ("IMG" == t.nodeName) { | |
| 1498 | - var e = t.getAttribute("data-flickity-lazyload"), | |
| 1499 | - i = t.getAttribute("data-flickity-lazyload-src"), | |
| 1500 | - n = t.getAttribute("data-flickity-lazyload-srcset"); | |
| 1501 | - if (e || i || n) return [t]; | |
| 1502 | - } | |
| 1503 | - | |
| 1504 | - var s = t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]"); | |
| 1505 | - return o.makeArray(s); | |
| 1506 | - }(t); | |
| 1507 | - | |
| 1508 | - n = n.concat(e); | |
| 1509 | - }), n.forEach(function (t) { | |
| 1510 | - new s(t, this); | |
| 1511 | - }, this); | |
| 1512 | - } | |
| 1513 | - }, s.prototype.handleEvent = o.handleEvent, s.prototype.load = function () { | |
| 1514 | - this.img.addEventListener("load", this), this.img.addEventListener("error", this); | |
| 1515 | - var t = this.img.getAttribute("data-flickity-lazyload") || this.img.getAttribute("data-flickity-lazyload-src"), | |
| 1516 | - e = this.img.getAttribute("data-flickity-lazyload-srcset"); | |
| 1517 | - this.img.src = t, e && this.img.setAttribute("srcset", e), this.img.removeAttribute("data-flickity-lazyload"), this.img.removeAttribute("data-flickity-lazyload-src"), this.img.removeAttribute("data-flickity-lazyload-srcset"); | |
| 1518 | - }, s.prototype.onload = function (t) { | |
| 1519 | - this.complete(t, "flickity-lazyloaded"); | |
| 1520 | - }, s.prototype.onerror = function (t) { | |
| 1521 | - this.complete(t, "flickity-lazyerror"); | |
| 1522 | - }, s.prototype.complete = function (t, e) { | |
| 1523 | - this.img.removeEventListener("load", this), this.img.removeEventListener("error", this); | |
| 1524 | - var i = this.flickity.getParentCell(this.img), | |
| 1525 | - n = i && i.element; | |
| 1526 | - this.flickity.cellSizeChange(n), this.img.classList.add(e), this.flickity.dispatchEvent("lazyLoad", t, n); | |
| 1527 | - }, e.LazyLoader = s, e; | |
| 1528 | -}), function (t, e) { | |
| 1529 | - "function" == typeof define && define.amd ? define("flickity/js/index", ["./flickity", "./drag", "./prev-next-button", "./page-dots", "./player", "./add-remove-cell", "./lazyload"], e) : "object" == typeof module && module.exports && (module.exports = e(require("./flickity"), require("./drag"), require("./prev-next-button"), require("./page-dots"), require("./player"), require("./add-remove-cell"), require("./lazyload"))); | |
| 1530 | -}(window, function (t) { | |
| 1531 | - return t; | |
| 1532 | -}), function (t, e) { | |
| 1533 | - "function" == typeof define && define.amd ? define("flickity-as-nav-for/as-nav-for", ["flickity/js/index", "fizzy-ui-utils/utils"], e) : "object" == typeof module && module.exports ? module.exports = e(require("flickity"), require("fizzy-ui-utils")) : t.Flickity = e(t.Flickity, t.fizzyUIUtils); | |
| 1534 | -}(window, function (n, s) { | |
| 1535 | - n.createMethods.push("_createAsNavFor"); | |
| 1536 | - var t = n.prototype; | |
| 1537 | - return t._createAsNavFor = function () { | |
| 1538 | - this.on("activate", this.activateAsNavFor), this.on("deactivate", this.deactivateAsNavFor), this.on("destroy", this.destroyAsNavFor); | |
| 1539 | - var t = this.options.asNavFor; | |
| 1540 | - | |
| 1541 | - if (t) { | |
| 1542 | - var e = this; | |
| 1543 | - setTimeout(function () { | |
| 1544 | - e.setNavCompanion(t); | |
| 1545 | - }); | |
| 1546 | - } | |
| 1547 | - }, t.setNavCompanion = function (t) { | |
| 1548 | - t = s.getQueryElement(t); | |
| 1549 | - var e = n.data(t); | |
| 1550 | - | |
| 1551 | - if (e && e != this) { | |
| 1552 | - this.navCompanion = e; | |
| 1553 | - var i = this; | |
| 1554 | - this.onNavCompanionSelect = function () { | |
| 1555 | - i.navCompanionSelect(); | |
| 1556 | - }, e.on("select", this.onNavCompanionSelect), this.on("staticClick", this.onNavStaticClick), this.navCompanionSelect(!0); | |
| 1557 | - } | |
| 1558 | - }, t.navCompanionSelect = function (t) { | |
| 1559 | - var e = this.navCompanion && this.navCompanion.selectedCells; | |
| 1560 | - | |
| 1561 | - if (e) { | |
| 1562 | - var i = e[0], | |
| 1563 | - n = this.navCompanion.cells.indexOf(i), | |
| 1564 | - s = n + e.length - 1, | |
| 1565 | - o = Math.floor(function (t, e, i) { | |
| 1566 | - return (e - t) * i + t; | |
| 1567 | - }(n, s, this.navCompanion.cellAlign)); | |
| 1568 | - | |
| 1569 | - if (this.selectCell(o, !1, t), this.removeNavSelectedElements(), !(o >= this.cells.length)) { | |
| 1570 | - var r = this.cells.slice(n, 1 + s); | |
| 1571 | - this.navSelectedElements = r.map(function (t) { | |
| 1572 | - return t.element; | |
| 1573 | - }), this.changeNavSelectedClass("add"); | |
| 1574 | - } | |
| 1575 | - } | |
| 1576 | - }, t.changeNavSelectedClass = function (e) { | |
| 1577 | - this.navSelectedElements.forEach(function (t) { | |
| 1578 | - t.classList[e]("is-nav-selected"); | |
| 1579 | - }); | |
| 1580 | - }, t.activateAsNavFor = function () { | |
| 1581 | - this.navCompanionSelect(!0); | |
| 1582 | - }, t.removeNavSelectedElements = function () { | |
| 1583 | - this.navSelectedElements && (this.changeNavSelectedClass("remove"), delete this.navSelectedElements); | |
| 1584 | - }, t.onNavStaticClick = function (t, e, i, n) { | |
| 1585 | - "number" == typeof n && this.navCompanion.selectCell(n); | |
| 1586 | - }, t.deactivateAsNavFor = function () { | |
| 1587 | - this.removeNavSelectedElements(); | |
| 1588 | - }, t.destroyAsNavFor = function () { | |
| 1589 | - this.navCompanion && (this.navCompanion.off("select", this.onNavCompanionSelect), this.off("staticClick", this.onNavStaticClick), delete this.navCompanion); | |
| 1590 | - }, n; | |
| 1591 | -}), function (e, i) { | |
| 1592 | - "use strict"; | |
| 1593 | - | |
| 1594 | - "function" == typeof define && define.amd ? define("imagesloaded/imagesloaded", ["ev-emitter/ev-emitter"], function (t) { | |
| 1595 | - return i(e, t); | |
| 1596 | - }) : "object" == typeof module && module.exports ? module.exports = i(e, require("ev-emitter")) : e.imagesLoaded = i(e, e.EvEmitter); | |
| 1597 | -}("undefined" != typeof window ? window : this, function (e, t) { | |
| 1598 | - var s = e.jQuery, | |
| 1599 | - o = e.console; | |
| 1600 | - | |
| 1601 | - function r(t, e) { | |
| 1602 | - for (var i in e) t[i] = e[i]; | |
| 1603 | - | |
| 1604 | - return t; | |
| 1605 | - } | |
| 1606 | - | |
| 1607 | - var a = Array.prototype.slice; | |
| 1608 | - | |
| 1609 | - function l(t, e, i) { | |
| 1610 | - if (!(this instanceof l)) return new l(t, e, i); | |
| 1611 | - var n = t; | |
| 1612 | - "string" == typeof t && (n = document.querySelectorAll(t)), n ? (this.elements = function (t) { | |
| 1613 | - return Array.isArray(t) ? t : "object" == typeof t && "number" == typeof t.length ? a.call(t) : [t]; | |
| 1614 | - }(n), this.options = r({}, this.options), "function" == typeof e ? i = e : r(this.options, e), i && this.on("always", i), this.getImages(), s && (this.jqDeferred = new s.Deferred()), setTimeout(this.check.bind(this))) : o.error("Bad element for imagesLoaded " + (n || t)); | |
| 1615 | - } | |
| 1616 | - | |
| 1617 | - (l.prototype = Object.create(t.prototype)).options = {}, l.prototype.getImages = function () { | |
| 1618 | - this.images = [], this.elements.forEach(this.addElementImages, this); | |
| 1619 | - }, l.prototype.addElementImages = function (t) { | |
| 1620 | - "IMG" == t.nodeName && this.addImage(t), !0 === this.options.background && this.addElementBackgroundImages(t); | |
| 1621 | - var e = t.nodeType; | |
| 1622 | - | |
| 1623 | - if (e && h[e]) { | |
| 1624 | - for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) { | |
| 1625 | - var s = i[n]; | |
| 1626 | - this.addImage(s); | |
| 1627 | - } | |
| 1628 | - | |
| 1629 | - if ("string" == typeof this.options.background) { | |
| 1630 | - var o = t.querySelectorAll(this.options.background); | |
| 1631 | - | |
| 1632 | - for (n = 0; n < o.length; n++) { | |
| 1633 | - var r = o[n]; | |
| 1634 | - this.addElementBackgroundImages(r); | |
| 1635 | - } | |
| 1636 | - } | |
| 1637 | - } | |
| 1638 | - }; | |
| 1639 | - var h = { | |
| 1640 | - 1: !0, | |
| 1641 | - 9: !0, | |
| 1642 | - 11: !0 | |
| 1643 | - }; | |
| 1644 | - | |
| 1645 | - function i(t) { | |
| 1646 | - this.img = t; | |
| 1647 | - } | |
| 1648 | - | |
| 1649 | - function n(t, e) { | |
| 1650 | - this.url = t, this.element = e, this.img = new Image(); | |
| 1651 | - } | |
| 1652 | - | |
| 1653 | - return l.prototype.addElementBackgroundImages = function (t) { | |
| 1654 | - var e = getComputedStyle(t); | |
| 1655 | - if (e) for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) { | |
| 1656 | - var s = n && n[2]; | |
| 1657 | - s && this.addBackground(s, t), n = i.exec(e.backgroundImage); | |
| 1658 | - } | |
| 1659 | - }, l.prototype.addImage = function (t) { | |
| 1660 | - var e = new i(t); | |
| 1661 | - this.images.push(e); | |
| 1662 | - }, l.prototype.addBackground = function (t, e) { | |
| 1663 | - var i = new n(t, e); | |
| 1664 | - this.images.push(i); | |
| 1665 | - }, l.prototype.check = function () { | |
| 1666 | - var n = this; | |
| 1667 | - | |
| 1668 | - function e(t, e, i) { | |
| 1669 | - setTimeout(function () { | |
| 1670 | - n.progress(t, e, i); | |
| 1671 | - }); | |
| 1672 | - } | |
| 1673 | - | |
| 1674 | - this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? this.images.forEach(function (t) { | |
| 1675 | - t.once("progress", e), t.check(); | |
| 1676 | - }) : this.complete(); | |
| 1677 | - }, l.prototype.progress = function (t, e, i) { | |
| 1678 | - this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded, this.emitEvent("progress", [this, t, e]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, t), this.progressedCount == this.images.length && this.complete(), this.options.debug && o && o.log("progress: " + i, t, e); | |
| 1679 | - }, l.prototype.complete = function () { | |
| 1680 | - var t = this.hasAnyBroken ? "fail" : "done"; | |
| 1681 | - | |
| 1682 | - if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) { | |
| 1683 | - var e = this.hasAnyBroken ? "reject" : "resolve"; | |
| 1684 | - this.jqDeferred[e](this); | |
| 1685 | - } | |
| 1686 | - }, (i.prototype = Object.create(t.prototype)).check = function () { | |
| 1687 | - this.getIsImageComplete() ? this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image(), this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.proxyImage.src = this.img.src); | |
| 1688 | - }, i.prototype.getIsImageComplete = function () { | |
| 1689 | - return this.img.complete && this.img.naturalWidth; | |
| 1690 | - }, i.prototype.confirm = function (t, e) { | |
| 1691 | - this.isLoaded = t, this.emitEvent("progress", [this, this.img, e]); | |
| 1692 | - }, i.prototype.handleEvent = function (t) { | |
| 1693 | - var e = "on" + t.type; | |
| 1694 | - this[e] && this[e](t); | |
| 1695 | - }, i.prototype.onload = function () { | |
| 1696 | - this.confirm(!0, "onload"), this.unbindEvents(); | |
| 1697 | - }, i.prototype.onerror = function () { | |
| 1698 | - this.confirm(!1, "onerror"), this.unbindEvents(); | |
| 1699 | - }, i.prototype.unbindEvents = function () { | |
| 1700 | - this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this); | |
| 1701 | - }, (n.prototype = Object.create(i.prototype)).check = function () { | |
| 1702 | - this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url, this.getIsImageComplete() && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()); | |
| 1703 | - }, n.prototype.unbindEvents = function () { | |
| 1704 | - this.img.removeEventListener("load", this), this.img.removeEventListener("error", this); | |
| 1705 | - }, n.prototype.confirm = function (t, e) { | |
| 1706 | - this.isLoaded = t, this.emitEvent("progress", [this, this.element, e]); | |
| 1707 | - }, l.makeJQueryPlugin = function (t) { | |
| 1708 | - (t = t || e.jQuery) && ((s = t).fn.imagesLoaded = function (t, e) { | |
| 1709 | - return new l(this, t, e).jqDeferred.promise(s(this)); | |
| 1710 | - }); | |
| 1711 | - }, l.makeJQueryPlugin(), l; | |
| 1712 | -}), function (i, n) { | |
| 1713 | - "function" == typeof define && define.amd ? define(["flickity/js/index", "imagesloaded/imagesloaded"], function (t, e) { | |
| 1714 | - return n(i, t, e); | |
| 1715 | - }) : "object" == typeof module && module.exports ? module.exports = n(i, require("flickity"), require("imagesloaded")) : i.Flickity = n(i, i.Flickity, i.imagesLoaded); | |
| 1716 | -}(window, function (t, e, i) { | |
| 1717 | - "use strict"; | |
| 1718 | - | |
| 1719 | - e.createMethods.push("_createImagesLoaded"); | |
| 1720 | - var n = e.prototype; | |
| 1721 | - return n._createImagesLoaded = function () { | |
| 1722 | - this.on("activate", this.imagesLoaded); | |
| 1723 | - }, n.imagesLoaded = function () { | |
| 1724 | - if (this.options.imagesLoaded) { | |
| 1725 | - var n = this; | |
| 1726 | - i(this.slider).on("progress", function (t, e) { | |
| 1727 | - var i = n.getParentCell(e.img); | |
| 1728 | - n.cellSizeChange(i && i.element), n.options.freeScroll || n.positionSliderAtSelected(); | |
| 1729 | - }); | |
| 1730 | - } | |
| 1731 | - }, e; | |
| 1732 | -}); | |
| 1733 | -/*! | |
| 1734 | - * Isotope PACKAGED v3.0.6 | |
| 1735 | - * | |
| 1736 | - * Licensed GPLv3 for open source use | |
| 1737 | - * or Isotope Commercial License for commercial use | |
| 1738 | - * | |
| 1739 | - * https://isotope.metafizzy.co | |
| 1740 | - * Copyright 2010-2018 Metafizzy | |
| 1741 | - */ | |
| 1742 | -!function (t, e) { | |
| 1743 | - "function" == typeof define && define.amd ? define("jquery-bridget/jquery-bridget", ["jquery"], function (i) { | |
| 1744 | - return e(t, i); | |
| 1745 | - }) : "object" == typeof module && module.exports ? module.exports = e(t, require("jquery")) : t.jQueryBridget = e(t, t.jQuery); | |
| 1746 | -}(window, function (t, e) { | |
| 1747 | - "use strict"; | |
| 1748 | - | |
| 1749 | - function i(i, s, a) { | |
| 1750 | - function u(t, e, o) { | |
| 1751 | - var n, | |
| 1752 | - s = "$()." + i + '("' + e + '")'; | |
| 1753 | - return t.each(function (t, u) { | |
| 1754 | - var h = a.data(u, i); | |
| 1755 | - if (!h) return void r(i + " not initialized. Cannot call methods, i.e. " + s); | |
| 1756 | - var d = h[e]; | |
| 1757 | - if (!d || "_" == e.charAt(0)) return void r(s + " is not a valid method"); | |
| 1758 | - var l = d.apply(h, o); | |
| 1759 | - n = void 0 === n ? l : n; | |
| 1760 | - }), void 0 !== n ? n : t; | |
| 1761 | - } | |
| 1762 | - | |
| 1763 | - function h(t, e) { | |
| 1764 | - t.each(function (t, o) { | |
| 1765 | - var n = a.data(o, i); | |
| 1766 | - n ? (n.option(e), n._init()) : (n = new s(o, e), a.data(o, i, n)); | |
| 1767 | - }); | |
| 1768 | - } | |
| 1769 | - | |
| 1770 | - a = a || e || t.jQuery, a && (s.prototype.option || (s.prototype.option = function (t) { | |
| 1771 | - a.isPlainObject(t) && (this.options = a.extend(!0, this.options, t)); | |
| 1772 | - }), a.fn[i] = function (t) { | |
| 1773 | - if ("string" == typeof t) { | |
| 1774 | - var e = n.call(arguments, 1); | |
| 1775 | - return u(this, t, e); | |
| 1776 | - } | |
| 1777 | - | |
| 1778 | - return h(this, t), this; | |
| 1779 | - }, o(a)); | |
| 1780 | - } | |
| 1781 | - | |
| 1782 | - function o(t) { | |
| 1783 | - !t || t && t.bridget || (t.bridget = i); | |
| 1784 | - } | |
| 1785 | - | |
| 1786 | - var n = Array.prototype.slice, | |
| 1787 | - s = t.console, | |
| 1788 | - r = "undefined" == typeof s ? function () {} : function (t) { | |
| 1789 | - s.error(t); | |
| 1790 | - }; | |
| 1791 | - return o(e || t.jQuery), i; | |
| 1792 | -}), function (t, e) { | |
| 1793 | - "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e(); | |
| 1794 | -}("undefined" != typeof window ? window : this, function () { | |
| 1795 | - function t() {} | |
| 1796 | - | |
| 1797 | - var e = t.prototype; | |
| 1798 | - return e.on = function (t, e) { | |
| 1799 | - if (t && e) { | |
| 1800 | - var i = this._events = this._events || {}, | |
| 1801 | - o = i[t] = i[t] || []; | |
| 1802 | - return o.indexOf(e) == -1 && o.push(e), this; | |
| 1803 | - } | |
| 1804 | - }, e.once = function (t, e) { | |
| 1805 | - if (t && e) { | |
| 1806 | - this.on(t, e); | |
| 1807 | - var i = this._onceEvents = this._onceEvents || {}, | |
| 1808 | - o = i[t] = i[t] || {}; | |
| 1809 | - return o[e] = !0, this; | |
| 1810 | - } | |
| 1811 | - }, e.off = function (t, e) { | |
| 1812 | - var i = this._events && this._events[t]; | |
| 1813 | - | |
| 1814 | - if (i && i.length) { | |
| 1815 | - var o = i.indexOf(e); | |
| 1816 | - return o != -1 && i.splice(o, 1), this; | |
| 1817 | - } | |
| 1818 | - }, e.emitEvent = function (t, e) { | |
| 1819 | - var i = this._events && this._events[t]; | |
| 1820 | - | |
| 1821 | - if (i && i.length) { | |
| 1822 | - i = i.slice(0), e = e || []; | |
| 1823 | - | |
| 1824 | - for (var o = this._onceEvents && this._onceEvents[t], n = 0; n < i.length; n++) { | |
| 1825 | - var s = i[n], | |
| 1826 | - r = o && o[s]; | |
| 1827 | - r && (this.off(t, s), delete o[s]), s.apply(this, e); | |
| 1828 | - } | |
| 1829 | - | |
| 1830 | - return this; | |
| 1831 | - } | |
| 1832 | - }, e.allOff = function () { | |
| 1833 | - delete this._events, delete this._onceEvents; | |
| 1834 | - }, t; | |
| 1835 | -}), function (t, e) { | |
| 1836 | - "function" == typeof define && define.amd ? define("get-size/get-size", e) : "object" == typeof module && module.exports ? module.exports = e() : t.getSize = e(); | |
| 1837 | -}(window, function () { | |
| 1838 | - "use strict"; | |
| 1839 | - | |
| 1840 | - function t(t) { | |
| 1841 | - var e = parseFloat(t), | |
| 1842 | - i = t.indexOf("%") == -1 && !isNaN(e); | |
| 1843 | - return i && e; | |
| 1844 | - } | |
| 1845 | - | |
| 1846 | - function e() {} | |
| 1847 | - | |
| 1848 | - function i() { | |
| 1849 | - for (var t = { | |
| 1850 | - width: 0, | |
| 1851 | - height: 0, | |
| 1852 | - innerWidth: 0, | |
| 1853 | - innerHeight: 0, | |
| 1854 | - outerWidth: 0, | |
| 1855 | - outerHeight: 0 | |
| 1856 | - }, e = 0; e < h; e++) { | |
| 1857 | - var i = u[e]; | |
| 1858 | - t[i] = 0; | |
| 1859 | - } | |
| 1860 | - | |
| 1861 | - return t; | |
| 1862 | - } | |
| 1863 | - | |
| 1864 | - function o(t) { | |
| 1865 | - var e = getComputedStyle(t); | |
| 1866 | - return e || a("Style returned " + e + ". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"), e; | |
| 1867 | - } | |
| 1868 | - | |
| 1869 | - function n() { | |
| 1870 | - if (!d) { | |
| 1871 | - d = !0; | |
| 1872 | - var e = document.createElement("div"); | |
| 1873 | - e.style.width = "200px", e.style.padding = "1px 2px 3px 4px", e.style.borderStyle = "solid", e.style.borderWidth = "1px 2px 3px 4px", e.style.boxSizing = "border-box"; | |
| 1874 | - var i = document.body || document.documentElement; | |
| 1875 | - i.appendChild(e); | |
| 1876 | - var n = o(e); | |
| 1877 | - r = 200 == Math.round(t(n.width)), s.isBoxSizeOuter = r, i.removeChild(e); | |
| 1878 | - } | |
| 1879 | - } | |
| 1880 | - | |
| 1881 | - function s(e) { | |
| 1882 | - if (n(), "string" == typeof e && (e = document.querySelector(e)), e && "object" == typeof e && e.nodeType) { | |
| 1883 | - var s = o(e); | |
| 1884 | - if ("none" == s.display) return i(); | |
| 1885 | - var a = {}; | |
| 1886 | - a.width = e.offsetWidth, a.height = e.offsetHeight; | |
| 1887 | - | |
| 1888 | - for (var d = a.isBorderBox = "border-box" == s.boxSizing, l = 0; l < h; l++) { | |
| 1889 | - var f = u[l], | |
| 1890 | - c = s[f], | |
| 1891 | - m = parseFloat(c); | |
| 1892 | - a[f] = isNaN(m) ? 0 : m; | |
| 1893 | - } | |
| 1894 | - | |
| 1895 | - var p = a.paddingLeft + a.paddingRight, | |
| 1896 | - y = a.paddingTop + a.paddingBottom, | |
| 1897 | - g = a.marginLeft + a.marginRight, | |
| 1898 | - v = a.marginTop + a.marginBottom, | |
| 1899 | - _ = a.borderLeftWidth + a.borderRightWidth, | |
| 1900 | - z = a.borderTopWidth + a.borderBottomWidth, | |
| 1901 | - I = d && r, | |
| 1902 | - x = t(s.width); | |
| 1903 | - | |
| 1904 | - x !== !1 && (a.width = x + (I ? 0 : p + _)); | |
| 1905 | - var S = t(s.height); | |
| 1906 | - return S !== !1 && (a.height = S + (I ? 0 : y + z)), a.innerWidth = a.width - (p + _), a.innerHeight = a.height - (y + z), a.outerWidth = a.width + g, a.outerHeight = a.height + v, a; | |
| 1907 | - } | |
| 1908 | - } | |
| 1909 | - | |
| 1910 | - var r, | |
| 1911 | - a = "undefined" == typeof console ? e : function (t) { | |
| 1912 | - console.error(t); | |
| 1913 | - }, | |
| 1914 | - u = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"], | |
| 1915 | - h = u.length, | |
| 1916 | - d = !1; | |
| 1917 | - return s; | |
| 1918 | -}), function (t, e) { | |
| 1919 | - "use strict"; | |
| 1920 | - | |
| 1921 | - "function" == typeof define && define.amd ? define("desandro-matches-selector/matches-selector", e) : "object" == typeof module && module.exports ? module.exports = e() : t.matchesSelector = e(); | |
| 1922 | -}(window, function () { | |
| 1923 | - "use strict"; | |
| 1924 | - | |
| 1925 | - var t = function () { | |
| 1926 | - var t = window.Element.prototype; | |
| 1927 | - if (t.matches) return "matches"; | |
| 1928 | - if (t.matchesSelector) return "matchesSelector"; | |
| 1929 | - | |
| 1930 | - for (var e = ["webkit", "moz", "ms", "o"], i = 0; i < e.length; i++) { | |
| 1931 | - var o = e[i], | |
| 1932 | - n = o + "MatchesSelector"; | |
| 1933 | - if (t[n]) return n; | |
| 1934 | - } | |
| 1935 | - }(); | |
| 1936 | - | |
| 1937 | - return function (e, i) { | |
| 1938 | - return e[t](i); | |
| 1939 | - }; | |
| 1940 | -}), function (t, e) { | |
| 1941 | - "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["desandro-matches-selector/matches-selector"], function (i) { | |
| 1942 | - return e(t, i); | |
| 1943 | - }) : "object" == typeof module && module.exports ? module.exports = e(t, require("desandro-matches-selector")) : t.fizzyUIUtils = e(t, t.matchesSelector); | |
| 1944 | -}(window, function (t, e) { | |
| 1945 | - var i = {}; | |
| 1946 | - i.extend = function (t, e) { | |
| 1947 | - for (var i in e) t[i] = e[i]; | |
| 1948 | - | |
| 1949 | - return t; | |
| 1950 | - }, i.modulo = function (t, e) { | |
| 1951 | - return (t % e + e) % e; | |
| 1952 | - }; | |
| 1953 | - var o = Array.prototype.slice; | |
| 1954 | - i.makeArray = function (t) { | |
| 1955 | - if (Array.isArray(t)) return t; | |
| 1956 | - if (null === t || void 0 === t) return []; | |
| 1957 | - var e = "object" == typeof t && "number" == typeof t.length; | |
| 1958 | - return e ? o.call(t) : [t]; | |
| 1959 | - }, i.removeFrom = function (t, e) { | |
| 1960 | - var i = t.indexOf(e); | |
| 1961 | - i != -1 && t.splice(i, 1); | |
| 1962 | - }, i.getParent = function (t, i) { | |
| 1963 | - for (; t.parentNode && t != document.body;) if (t = t.parentNode, e(t, i)) return t; | |
| 1964 | - }, i.getQueryElement = function (t) { | |
| 1965 | - return "string" == typeof t ? document.querySelector(t) : t; | |
| 1966 | - }, i.handleEvent = function (t) { | |
| 1967 | - var e = "on" + t.type; | |
| 1968 | - this[e] && this[e](t); | |
| 1969 | - }, i.filterFindElements = function (t, o) { | |
| 1970 | - t = i.makeArray(t); | |
| 1971 | - var n = []; | |
| 1972 | - return t.forEach(function (t) { | |
| 1973 | - if (t instanceof HTMLElement) { | |
| 1974 | - if (!o) return void n.push(t); | |
| 1975 | - e(t, o) && n.push(t); | |
| 1976 | - | |
| 1977 | - for (var i = t.querySelectorAll(o), s = 0; s < i.length; s++) n.push(i[s]); | |
| 1978 | - } | |
| 1979 | - }), n; | |
| 1980 | - }, i.debounceMethod = function (t, e, i) { | |
| 1981 | - i = i || 100; | |
| 1982 | - var o = t.prototype[e], | |
| 1983 | - n = e + "Timeout"; | |
| 1984 | - | |
| 1985 | - t.prototype[e] = function () { | |
| 1986 | - var t = this[n]; | |
| 1987 | - clearTimeout(t); | |
| 1988 | - var e = arguments, | |
| 1989 | - s = this; | |
| 1990 | - this[n] = setTimeout(function () { | |
| 1991 | - o.apply(s, e), delete s[n]; | |
| 1992 | - }, i); | |
| 1993 | - }; | |
| 1994 | - }, i.docReady = function (t) { | |
| 1995 | - var e = document.readyState; | |
| 1996 | - "complete" == e || "interactive" == e ? setTimeout(t) : document.addEventListener("DOMContentLoaded", t); | |
| 1997 | - }, i.toDashed = function (t) { | |
| 1998 | - return t.replace(/(.)([A-Z])/g, function (t, e, i) { | |
| 1999 | - return e + "-" + i; | |
| 2000 | - }).toLowerCase(); | |
| 2001 | - }; | |
| 2002 | - var n = t.console; | |
| 2003 | - return i.htmlInit = function (e, o) { | |
| 2004 | - i.docReady(function () { | |
| 2005 | - var s = i.toDashed(o), | |
| 2006 | - r = "data-" + s, | |
| 2007 | - a = document.querySelectorAll("[" + r + "]"), | |
| 2008 | - u = document.querySelectorAll(".js-" + s), | |
| 2009 | - h = i.makeArray(a).concat(i.makeArray(u)), | |
| 2010 | - d = r + "-options", | |
| 2011 | - l = t.jQuery; | |
| 2012 | - h.forEach(function (t) { | |
| 2013 | - var i, | |
| 2014 | - s = t.getAttribute(r) || t.getAttribute(d); | |
| 2015 | - | |
| 2016 | - try { | |
| 2017 | - i = s && JSON.parse(s); | |
| 2018 | - } catch (a) { | |
| 2019 | - return void (n && n.error("Error parsing " + r + " on " + t.className + ": " + a)); | |
| 2020 | - } | |
| 2021 | - | |
| 2022 | - var u = new e(t, i); | |
| 2023 | - l && l.data(t, o, u); | |
| 2024 | - }); | |
| 2025 | - }); | |
| 2026 | - }, i; | |
| 2027 | -}), function (t, e) { | |
| 2028 | - "function" == typeof define && define.amd ? define("outlayer/item", ["ev-emitter/ev-emitter", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("ev-emitter"), require("get-size")) : (t.Outlayer = {}, t.Outlayer.Item = e(t.EvEmitter, t.getSize)); | |
| 2029 | -}(window, function (t, e) { | |
| 2030 | - "use strict"; | |
| 2031 | - | |
| 2032 | - function i(t) { | |
| 2033 | - for (var e in t) return !1; | |
| 2034 | - | |
| 2035 | - return e = null, !0; | |
| 2036 | - } | |
| 2037 | - | |
| 2038 | - function o(t, e) { | |
| 2039 | - t && (this.element = t, this.layout = e, this.position = { | |
| 2040 | - x: 0, | |
| 2041 | - y: 0 | |
| 2042 | - }, this._create()); | |
| 2043 | - } | |
| 2044 | - | |
| 2045 | - function n(t) { | |
| 2046 | - return t.replace(/([A-Z])/g, function (t) { | |
| 2047 | - return "-" + t.toLowerCase(); | |
| 2048 | - }); | |
| 2049 | - } | |
| 2050 | - | |
| 2051 | - var s = document.documentElement.style, | |
| 2052 | - r = "string" == typeof s.transition ? "transition" : "WebkitTransition", | |
| 2053 | - a = "string" == typeof s.transform ? "transform" : "WebkitTransform", | |
| 2054 | - u = { | |
| 2055 | - WebkitTransition: "webkitTransitionEnd", | |
| 2056 | - transition: "transitionend" | |
| 2057 | - }[r], | |
| 2058 | - h = { | |
| 2059 | - transform: a, | |
| 2060 | - transition: r, | |
| 2061 | - transitionDuration: r + "Duration", | |
| 2062 | - transitionProperty: r + "Property", | |
| 2063 | - transitionDelay: r + "Delay" | |
| 2064 | - }, | |
| 2065 | - d = o.prototype = Object.create(t.prototype); | |
| 2066 | - d.constructor = o, d._create = function () { | |
| 2067 | - this._transn = { | |
| 2068 | - ingProperties: {}, | |
| 2069 | - clean: {}, | |
| 2070 | - onEnd: {} | |
| 2071 | - }, this.css({ | |
| 2072 | - position: "absolute" | |
| 2073 | - }); | |
| 2074 | - }, d.handleEvent = function (t) { | |
| 2075 | - var e = "on" + t.type; | |
| 2076 | - this[e] && this[e](t); | |
| 2077 | - }, d.getSize = function () { | |
| 2078 | - this.size = e(this.element); | |
| 2079 | - }, d.css = function (t) { | |
| 2080 | - var e = this.element.style; | |
| 2081 | - | |
| 2082 | - for (var i in t) { | |
| 2083 | - var o = h[i] || i; | |
| 2084 | - e[o] = t[i]; | |
| 2085 | - } | |
| 2086 | - }, d.getPosition = function () { | |
| 2087 | - var t = getComputedStyle(this.element), | |
| 2088 | - e = this.layout._getOption("originLeft"), | |
| 2089 | - i = this.layout._getOption("originTop"), | |
| 2090 | - o = t[e ? "left" : "right"], | |
| 2091 | - n = t[i ? "top" : "bottom"], | |
| 2092 | - s = parseFloat(o), | |
| 2093 | - r = parseFloat(n), | |
| 2094 | - a = this.layout.size; | |
| 2095 | - | |
| 2096 | - o.indexOf("%") != -1 && (s = s / 100 * a.width), n.indexOf("%") != -1 && (r = r / 100 * a.height), s = isNaN(s) ? 0 : s, r = isNaN(r) ? 0 : r, s -= e ? a.paddingLeft : a.paddingRight, r -= i ? a.paddingTop : a.paddingBottom, this.position.x = s, this.position.y = r; | |
| 2097 | - }, d.layoutPosition = function () { | |
| 2098 | - var t = this.layout.size, | |
| 2099 | - e = {}, | |
| 2100 | - i = this.layout._getOption("originLeft"), | |
| 2101 | - o = this.layout._getOption("originTop"), | |
| 2102 | - n = i ? "paddingLeft" : "paddingRight", | |
| 2103 | - s = i ? "left" : "right", | |
| 2104 | - r = i ? "right" : "left", | |
| 2105 | - a = this.position.x + t[n]; | |
| 2106 | - | |
| 2107 | - e[s] = this.getXValue(a), e[r] = ""; | |
| 2108 | - var u = o ? "paddingTop" : "paddingBottom", | |
| 2109 | - h = o ? "top" : "bottom", | |
| 2110 | - d = o ? "bottom" : "top", | |
| 2111 | - l = this.position.y + t[u]; | |
| 2112 | - e[h] = this.getYValue(l), e[d] = "", this.css(e), this.emitEvent("layout", [this]); | |
| 2113 | - }, d.getXValue = function (t) { | |
| 2114 | - var e = this.layout._getOption("horizontal"); | |
| 2115 | - | |
| 2116 | - return this.layout.options.percentPosition && !e ? t / this.layout.size.width * 100 + "%" : t + "px"; | |
| 2117 | - }, d.getYValue = function (t) { | |
| 2118 | - var e = this.layout._getOption("horizontal"); | |
| 2119 | - | |
| 2120 | - return this.layout.options.percentPosition && e ? t / this.layout.size.height * 100 + "%" : t + "px"; | |
| 2121 | - }, d._transitionTo = function (t, e) { | |
| 2122 | - this.getPosition(); | |
| 2123 | - var i = this.position.x, | |
| 2124 | - o = this.position.y, | |
| 2125 | - n = t == this.position.x && e == this.position.y; | |
| 2126 | - if (this.setPosition(t, e), n && !this.isTransitioning) return void this.layoutPosition(); | |
| 2127 | - var s = t - i, | |
| 2128 | - r = e - o, | |
| 2129 | - a = {}; | |
| 2130 | - a.transform = this.getTranslate(s, r), this.transition({ | |
| 2131 | - to: a, | |
| 2132 | - onTransitionEnd: { | |
| 2133 | - transform: this.layoutPosition | |
| 2134 | - }, | |
| 2135 | - isCleaning: !0 | |
| 2136 | - }); | |
| 2137 | - }, d.getTranslate = function (t, e) { | |
| 2138 | - var i = this.layout._getOption("originLeft"), | |
| 2139 | - o = this.layout._getOption("originTop"); | |
| 2140 | - | |
| 2141 | - return t = i ? t : -t, e = o ? e : -e, "translate3d(" + t + "px, " + e + "px, 0)"; | |
| 2142 | - }, d.goTo = function (t, e) { | |
| 2143 | - this.setPosition(t, e), this.layoutPosition(); | |
| 2144 | - }, d.moveTo = d._transitionTo, d.setPosition = function (t, e) { | |
| 2145 | - this.position.x = parseFloat(t), this.position.y = parseFloat(e); | |
| 2146 | - }, d._nonTransition = function (t) { | |
| 2147 | - this.css(t.to), t.isCleaning && this._removeStyles(t.to); | |
| 2148 | - | |
| 2149 | - for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this); | |
| 2150 | - }, d.transition = function (t) { | |
| 2151 | - if (!parseFloat(this.layout.options.transitionDuration)) return void this._nonTransition(t); | |
| 2152 | - var e = this._transn; | |
| 2153 | - | |
| 2154 | - for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i]; | |
| 2155 | - | |
| 2156 | - for (i in t.to) e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); | |
| 2157 | - | |
| 2158 | - if (t.from) { | |
| 2159 | - this.css(t.from); | |
| 2160 | - var o = this.element.offsetHeight; | |
| 2161 | - o = null; | |
| 2162 | - } | |
| 2163 | - | |
| 2164 | - this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0; | |
| 2165 | - }; | |
| 2166 | - var l = "opacity," + n(a); | |
| 2167 | - d.enableTransition = function () { | |
| 2168 | - if (!this.isTransitioning) { | |
| 2169 | - var t = this.layout.options.transitionDuration; | |
| 2170 | - t = "number" == typeof t ? t + "ms" : t, this.css({ | |
| 2171 | - transitionProperty: l, | |
| 2172 | - transitionDuration: t, | |
| 2173 | - transitionDelay: this.staggerDelay || 0 | |
| 2174 | - }), this.element.addEventListener(u, this, !1); | |
| 2175 | - } | |
| 2176 | - }, d.onwebkitTransitionEnd = function (t) { | |
| 2177 | - this.ontransitionend(t); | |
| 2178 | - }, d.onotransitionend = function (t) { | |
| 2179 | - this.ontransitionend(t); | |
| 2180 | - }; | |
| 2181 | - var f = { | |
| 2182 | - "-webkit-transform": "transform" | |
| 2183 | - }; | |
| 2184 | - d.ontransitionend = function (t) { | |
| 2185 | - if (t.target === this.element) { | |
| 2186 | - var e = this._transn, | |
| 2187 | - o = f[t.propertyName] || t.propertyName; | |
| 2188 | - | |
| 2189 | - if (delete e.ingProperties[o], i(e.ingProperties) && this.disableTransition(), o in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[o]), o in e.onEnd) { | |
| 2190 | - var n = e.onEnd[o]; | |
| 2191 | - n.call(this), delete e.onEnd[o]; | |
| 2192 | - } | |
| 2193 | - | |
| 2194 | - this.emitEvent("transitionEnd", [this]); | |
| 2195 | - } | |
| 2196 | - }, d.disableTransition = function () { | |
| 2197 | - this.removeTransitionStyles(), this.element.removeEventListener(u, this, !1), this.isTransitioning = !1; | |
| 2198 | - }, d._removeStyles = function (t) { | |
| 2199 | - var e = {}; | |
| 2200 | - | |
| 2201 | - for (var i in t) e[i] = ""; | |
| 2202 | - | |
| 2203 | - this.css(e); | |
| 2204 | - }; | |
| 2205 | - var c = { | |
| 2206 | - transitionProperty: "", | |
| 2207 | - transitionDuration: "", | |
| 2208 | - transitionDelay: "" | |
| 2209 | - }; | |
| 2210 | - return d.removeTransitionStyles = function () { | |
| 2211 | - this.css(c); | |
| 2212 | - }, d.stagger = function (t) { | |
| 2213 | - t = isNaN(t) ? 0 : t, this.staggerDelay = t + "ms"; | |
| 2214 | - }, d.removeElem = function () { | |
| 2215 | - this.element.parentNode.removeChild(this.element), this.css({ | |
| 2216 | - display: "" | |
| 2217 | - }), this.emitEvent("remove", [this]); | |
| 2218 | - }, d.remove = function () { | |
| 2219 | - return r && parseFloat(this.layout.options.transitionDuration) ? (this.once("transitionEnd", function () { | |
| 2220 | - this.removeElem(); | |
| 2221 | - }), void this.hide()) : void this.removeElem(); | |
| 2222 | - }, d.reveal = function () { | |
| 2223 | - delete this.isHidden, this.css({ | |
| 2224 | - display: "" | |
| 2225 | - }); | |
| 2226 | - var t = this.layout.options, | |
| 2227 | - e = {}, | |
| 2228 | - i = this.getHideRevealTransitionEndProperty("visibleStyle"); | |
| 2229 | - e[i] = this.onRevealTransitionEnd, this.transition({ | |
| 2230 | - from: t.hiddenStyle, | |
| 2231 | - to: t.visibleStyle, | |
| 2232 | - isCleaning: !0, | |
| 2233 | - onTransitionEnd: e | |
| 2234 | - }); | |
| 2235 | - }, d.onRevealTransitionEnd = function () { | |
| 2236 | - this.isHidden || this.emitEvent("reveal"); | |
| 2237 | - }, d.getHideRevealTransitionEndProperty = function (t) { | |
| 2238 | - var e = this.layout.options[t]; | |
| 2239 | - if (e.opacity) return "opacity"; | |
| 2240 | - | |
| 2241 | - for (var i in e) return i; | |
| 2242 | - }, d.hide = function () { | |
| 2243 | - this.isHidden = !0, this.css({ | |
| 2244 | - display: "" | |
| 2245 | - }); | |
| 2246 | - var t = this.layout.options, | |
| 2247 | - e = {}, | |
| 2248 | - i = this.getHideRevealTransitionEndProperty("hiddenStyle"); | |
| 2249 | - e[i] = this.onHideTransitionEnd, this.transition({ | |
| 2250 | - from: t.visibleStyle, | |
| 2251 | - to: t.hiddenStyle, | |
| 2252 | - isCleaning: !0, | |
| 2253 | - onTransitionEnd: e | |
| 2254 | - }); | |
| 2255 | - }, d.onHideTransitionEnd = function () { | |
| 2256 | - this.isHidden && (this.css({ | |
| 2257 | - display: "none" | |
| 2258 | - }), this.emitEvent("hide")); | |
| 2259 | - }, d.destroy = function () { | |
| 2260 | - this.css({ | |
| 2261 | - position: "", | |
| 2262 | - left: "", | |
| 2263 | - right: "", | |
| 2264 | - top: "", | |
| 2265 | - bottom: "", | |
| 2266 | - transition: "", | |
| 2267 | - transform: "" | |
| 2268 | - }); | |
| 2269 | - }, o; | |
| 2270 | -}), function (t, e) { | |
| 2271 | - "use strict"; | |
| 2272 | - | |
| 2273 | - "function" == typeof define && define.amd ? define("outlayer/outlayer", ["ev-emitter/ev-emitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function (i, o, n, s) { | |
| 2274 | - return e(t, i, o, n, s); | |
| 2275 | - }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : t.Outlayer = e(t, t.EvEmitter, t.getSize, t.fizzyUIUtils, t.Outlayer.Item); | |
| 2276 | -}(window, function (t, e, i, o, n) { | |
| 2277 | - "use strict"; | |
| 2278 | - | |
| 2279 | - function s(t, e) { | |
| 2280 | - var i = o.getQueryElement(t); | |
| 2281 | - if (!i) return void (u && u.error("Bad element for " + this.constructor.namespace + ": " + (i || t))); | |
| 2282 | - this.element = i, h && (this.$element = h(this.element)), this.options = o.extend({}, this.constructor.defaults), this.option(e); | |
| 2283 | - var n = ++l; | |
| 2284 | - this.element.outlayerGUID = n, f[n] = this, this._create(); | |
| 2285 | - | |
| 2286 | - var s = this._getOption("initLayout"); | |
| 2287 | - | |
| 2288 | - s && this.layout(); | |
| 2289 | - } | |
| 2290 | - | |
| 2291 | - function r(t) { | |
| 2292 | - function e() { | |
| 2293 | - t.apply(this, arguments); | |
| 2294 | - } | |
| 2295 | - | |
| 2296 | - return e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e; | |
| 2297 | - } | |
| 2298 | - | |
| 2299 | - function a(t) { | |
| 2300 | - if ("number" == typeof t) return t; | |
| 2301 | - var e = t.match(/(^\d*\.?\d*)(\w*)/), | |
| 2302 | - i = e && e[1], | |
| 2303 | - o = e && e[2]; | |
| 2304 | - if (!i.length) return 0; | |
| 2305 | - i = parseFloat(i); | |
| 2306 | - var n = m[o] || 1; | |
| 2307 | - return i * n; | |
| 2308 | - } | |
| 2309 | - | |
| 2310 | - var u = t.console, | |
| 2311 | - h = t.jQuery, | |
| 2312 | - d = function () {}, | |
| 2313 | - l = 0, | |
| 2314 | - f = {}; | |
| 2315 | - | |
| 2316 | - s.namespace = "outlayer", s.Item = n, s.defaults = { | |
| 2317 | - containerStyle: { | |
| 2318 | - position: "relative" | |
| 2319 | - }, | |
| 2320 | - initLayout: !0, | |
| 2321 | - originLeft: !0, | |
| 2322 | - originTop: !0, | |
| 2323 | - resize: !0, | |
| 2324 | - resizeContainer: !0, | |
| 2325 | - transitionDuration: "0.4s", | |
| 2326 | - hiddenStyle: { | |
| 2327 | - opacity: 0, | |
| 2328 | - transform: "scale(0.001)" | |
| 2329 | - }, | |
| 2330 | - visibleStyle: { | |
| 2331 | - opacity: 1, | |
| 2332 | - transform: "scale(1)" | |
| 2333 | - } | |
| 2334 | - }; | |
| 2335 | - var c = s.prototype; | |
| 2336 | - o.extend(c, e.prototype), c.option = function (t) { | |
| 2337 | - o.extend(this.options, t); | |
| 2338 | - }, c._getOption = function (t) { | |
| 2339 | - var e = this.constructor.compatOptions[t]; | |
| 2340 | - return e && void 0 !== this.options[e] ? this.options[e] : this.options[t]; | |
| 2341 | - }, s.compatOptions = { | |
| 2342 | - initLayout: "isInitLayout", | |
| 2343 | - horizontal: "isHorizontal", | |
| 2344 | - layoutInstant: "isLayoutInstant", | |
| 2345 | - originLeft: "isOriginLeft", | |
| 2346 | - originTop: "isOriginTop", | |
| 2347 | - resize: "isResizeBound", | |
| 2348 | - resizeContainer: "isResizingContainer" | |
| 2349 | - }, c._create = function () { | |
| 2350 | - this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), o.extend(this.element.style, this.options.containerStyle); | |
| 2351 | - | |
| 2352 | - var t = this._getOption("resize"); | |
| 2353 | - | |
| 2354 | - t && this.bindResize(); | |
| 2355 | - }, c.reloadItems = function () { | |
| 2356 | - this.items = this._itemize(this.element.children); | |
| 2357 | - }, c._itemize = function (t) { | |
| 2358 | - for (var e = this._filterFindItemElements(t), i = this.constructor.Item, o = [], n = 0; n < e.length; n++) { | |
| 2359 | - var s = e[n], | |
| 2360 | - r = new i(s, this); | |
| 2361 | - o.push(r); | |
| 2362 | - } | |
| 2363 | - | |
| 2364 | - return o; | |
| 2365 | - }, c._filterFindItemElements = function (t) { | |
| 2366 | - return o.filterFindElements(t, this.options.itemSelector); | |
| 2367 | - }, c.getItemElements = function () { | |
| 2368 | - return this.items.map(function (t) { | |
| 2369 | - return t.element; | |
| 2370 | - }); | |
| 2371 | - }, c.layout = function () { | |
| 2372 | - this._resetLayout(), this._manageStamps(); | |
| 2373 | - | |
| 2374 | - var t = this._getOption("layoutInstant"), | |
| 2375 | - e = void 0 !== t ? t : !this._isLayoutInited; | |
| 2376 | - | |
| 2377 | - this.layoutItems(this.items, e), this._isLayoutInited = !0; | |
| 2378 | - }, c._init = c.layout, c._resetLayout = function () { | |
| 2379 | - this.getSize(); | |
| 2380 | - }, c.getSize = function () { | |
| 2381 | - this.size = i(this.element); | |
| 2382 | - }, c._getMeasurement = function (t, e) { | |
| 2383 | - var o, | |
| 2384 | - n = this.options[t]; | |
| 2385 | - n ? ("string" == typeof n ? o = this.element.querySelector(n) : n instanceof HTMLElement && (o = n), this[t] = o ? i(o)[e] : n) : this[t] = 0; | |
| 2386 | - }, c.layoutItems = function (t, e) { | |
| 2387 | - t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout(); | |
| 2388 | - }, c._getItemsForLayout = function (t) { | |
| 2389 | - return t.filter(function (t) { | |
| 2390 | - return !t.isIgnored; | |
| 2391 | - }); | |
| 2392 | - }, c._layoutItems = function (t, e) { | |
| 2393 | - if (this._emitCompleteOnItems("layout", t), t && t.length) { | |
| 2394 | - var i = []; | |
| 2395 | - t.forEach(function (t) { | |
| 2396 | - var o = this._getItemLayoutPosition(t); | |
| 2397 | - | |
| 2398 | - o.item = t, o.isInstant = e || t.isLayoutInstant, i.push(o); | |
| 2399 | - }, this), this._processLayoutQueue(i); | |
| 2400 | - } | |
| 2401 | - }, c._getItemLayoutPosition = function () { | |
| 2402 | - return { | |
| 2403 | - x: 0, | |
| 2404 | - y: 0 | |
| 2405 | - }; | |
| 2406 | - }, c._processLayoutQueue = function (t) { | |
| 2407 | - this.updateStagger(), t.forEach(function (t, e) { | |
| 2408 | - this._positionItem(t.item, t.x, t.y, t.isInstant, e); | |
| 2409 | - }, this); | |
| 2410 | - }, c.updateStagger = function () { | |
| 2411 | - var t = this.options.stagger; | |
| 2412 | - return null === t || void 0 === t ? void (this.stagger = 0) : (this.stagger = a(t), this.stagger); | |
| 2413 | - }, c._positionItem = function (t, e, i, o, n) { | |
| 2414 | - o ? t.goTo(e, i) : (t.stagger(n * this.stagger), t.moveTo(e, i)); | |
| 2415 | - }, c._postLayout = function () { | |
| 2416 | - this.resizeContainer(); | |
| 2417 | - }, c.resizeContainer = function () { | |
| 2418 | - var t = this._getOption("resizeContainer"); | |
| 2419 | - | |
| 2420 | - if (t) { | |
| 2421 | - var e = this._getContainerSize(); | |
| 2422 | - | |
| 2423 | - e && (this._setContainerMeasure(e.width, !0), this._setContainerMeasure(e.height, !1)); | |
| 2424 | - } | |
| 2425 | - }, c._getContainerSize = d, c._setContainerMeasure = function (t, e) { | |
| 2426 | - if (void 0 !== t) { | |
| 2427 | - var i = this.size; | |
| 2428 | - i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px"; | |
| 2429 | - } | |
| 2430 | - }, c._emitCompleteOnItems = function (t, e) { | |
| 2431 | - function i() { | |
| 2432 | - n.dispatchEvent(t + "Complete", null, [e]); | |
| 2433 | - } | |
| 2434 | - | |
| 2435 | - function o() { | |
| 2436 | - r++, r == s && i(); | |
| 2437 | - } | |
| 2438 | - | |
| 2439 | - var n = this, | |
| 2440 | - s = e.length; | |
| 2441 | - if (!e || !s) return void i(); | |
| 2442 | - var r = 0; | |
| 2443 | - e.forEach(function (e) { | |
| 2444 | - e.once(t, o); | |
| 2445 | - }); | |
| 2446 | - }, c.dispatchEvent = function (t, e, i) { | |
| 2447 | - var o = e ? [e].concat(i) : i; | |
| 2448 | - if (this.emitEvent(t, o), h) if (this.$element = this.$element || h(this.element), e) { | |
| 2449 | - var n = h.Event(e); | |
| 2450 | - n.type = t, this.$element.trigger(n, i); | |
| 2451 | - } else this.$element.trigger(t, i); | |
| 2452 | - }, c.ignore = function (t) { | |
| 2453 | - var e = this.getItem(t); | |
| 2454 | - e && (e.isIgnored = !0); | |
| 2455 | - }, c.unignore = function (t) { | |
| 2456 | - var e = this.getItem(t); | |
| 2457 | - e && delete e.isIgnored; | |
| 2458 | - }, c.stamp = function (t) { | |
| 2459 | - t = this._find(t), t && (this.stamps = this.stamps.concat(t), t.forEach(this.ignore, this)); | |
| 2460 | - }, c.unstamp = function (t) { | |
| 2461 | - t = this._find(t), t && t.forEach(function (t) { | |
| 2462 | - o.removeFrom(this.stamps, t), this.unignore(t); | |
| 2463 | - }, this); | |
| 2464 | - }, c._find = function (t) { | |
| 2465 | - if (t) return "string" == typeof t && (t = this.element.querySelectorAll(t)), t = o.makeArray(t); | |
| 2466 | - }, c._manageStamps = function () { | |
| 2467 | - this.stamps && this.stamps.length && (this._getBoundingRect(), this.stamps.forEach(this._manageStamp, this)); | |
| 2468 | - }, c._getBoundingRect = function () { | |
| 2469 | - var t = this.element.getBoundingClientRect(), | |
| 2470 | - e = this.size; | |
| 2471 | - this._boundingRect = { | |
| 2472 | - left: t.left + e.paddingLeft + e.borderLeftWidth, | |
| 2473 | - top: t.top + e.paddingTop + e.borderTopWidth, | |
| 2474 | - right: t.right - (e.paddingRight + e.borderRightWidth), | |
| 2475 | - bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) | |
| 2476 | - }; | |
| 2477 | - }, c._manageStamp = d, c._getElementOffset = function (t) { | |
| 2478 | - var e = t.getBoundingClientRect(), | |
| 2479 | - o = this._boundingRect, | |
| 2480 | - n = i(t), | |
| 2481 | - s = { | |
| 2482 | - left: e.left - o.left - n.marginLeft, | |
| 2483 | - top: e.top - o.top - n.marginTop, | |
| 2484 | - right: o.right - e.right - n.marginRight, | |
| 2485 | - bottom: o.bottom - e.bottom - n.marginBottom | |
| 2486 | - }; | |
| 2487 | - return s; | |
| 2488 | - }, c.handleEvent = o.handleEvent, c.bindResize = function () { | |
| 2489 | - t.addEventListener("resize", this), this.isResizeBound = !0; | |
| 2490 | - }, c.unbindResize = function () { | |
| 2491 | - t.removeEventListener("resize", this), this.isResizeBound = !1; | |
| 2492 | - }, c.onresize = function () { | |
| 2493 | - this.resize(); | |
| 2494 | - }, o.debounceMethod(s, "onresize", 100), c.resize = function () { | |
| 2495 | - this.isResizeBound && this.needsResizeLayout() && this.layout(); | |
| 2496 | - }, c.needsResizeLayout = function () { | |
| 2497 | - var t = i(this.element), | |
| 2498 | - e = this.size && t; | |
| 2499 | - return e && t.innerWidth !== this.size.innerWidth; | |
| 2500 | - }, c.addItems = function (t) { | |
| 2501 | - var e = this._itemize(t); | |
| 2502 | - | |
| 2503 | - return e.length && (this.items = this.items.concat(e)), e; | |
| 2504 | - }, c.appended = function (t) { | |
| 2505 | - var e = this.addItems(t); | |
| 2506 | - e.length && (this.layoutItems(e, !0), this.reveal(e)); | |
| 2507 | - }, c.prepended = function (t) { | |
| 2508 | - var e = this._itemize(t); | |
| 2509 | - | |
| 2510 | - if (e.length) { | |
| 2511 | - var i = this.items.slice(0); | |
| 2512 | - this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i); | |
| 2513 | - } | |
| 2514 | - }, c.reveal = function (t) { | |
| 2515 | - if (this._emitCompleteOnItems("reveal", t), t && t.length) { | |
| 2516 | - var e = this.updateStagger(); | |
| 2517 | - t.forEach(function (t, i) { | |
| 2518 | - t.stagger(i * e), t.reveal(); | |
| 2519 | - }); | |
| 2520 | - } | |
| 2521 | - }, c.hide = function (t) { | |
| 2522 | - if (this._emitCompleteOnItems("hide", t), t && t.length) { | |
| 2523 | - var e = this.updateStagger(); | |
| 2524 | - t.forEach(function (t, i) { | |
| 2525 | - t.stagger(i * e), t.hide(); | |
| 2526 | - }); | |
| 2527 | - } | |
| 2528 | - }, c.revealItemElements = function (t) { | |
| 2529 | - var e = this.getItems(t); | |
| 2530 | - this.reveal(e); | |
| 2531 | - }, c.hideItemElements = function (t) { | |
| 2532 | - var e = this.getItems(t); | |
| 2533 | - this.hide(e); | |
| 2534 | - }, c.getItem = function (t) { | |
| 2535 | - for (var e = 0; e < this.items.length; e++) { | |
| 2536 | - var i = this.items[e]; | |
| 2537 | - if (i.element == t) return i; | |
| 2538 | - } | |
| 2539 | - }, c.getItems = function (t) { | |
| 2540 | - t = o.makeArray(t); | |
| 2541 | - var e = []; | |
| 2542 | - return t.forEach(function (t) { | |
| 2543 | - var i = this.getItem(t); | |
| 2544 | - i && e.push(i); | |
| 2545 | - }, this), e; | |
| 2546 | - }, c.remove = function (t) { | |
| 2547 | - var e = this.getItems(t); | |
| 2548 | - this._emitCompleteOnItems("remove", e), e && e.length && e.forEach(function (t) { | |
| 2549 | - t.remove(), o.removeFrom(this.items, t); | |
| 2550 | - }, this); | |
| 2551 | - }, c.destroy = function () { | |
| 2552 | - var t = this.element.style; | |
| 2553 | - t.height = "", t.position = "", t.width = "", this.items.forEach(function (t) { | |
| 2554 | - t.destroy(); | |
| 2555 | - }), this.unbindResize(); | |
| 2556 | - var e = this.element.outlayerGUID; | |
| 2557 | - delete f[e], delete this.element.outlayerGUID, h && h.removeData(this.element, this.constructor.namespace); | |
| 2558 | - }, s.data = function (t) { | |
| 2559 | - t = o.getQueryElement(t); | |
| 2560 | - var e = t && t.outlayerGUID; | |
| 2561 | - return e && f[e]; | |
| 2562 | - }, s.create = function (t, e) { | |
| 2563 | - var i = r(s); | |
| 2564 | - return i.defaults = o.extend({}, s.defaults), o.extend(i.defaults, e), i.compatOptions = o.extend({}, s.compatOptions), i.namespace = t, i.data = s.data, i.Item = r(n), o.htmlInit(i, t), h && h.bridget && h.bridget(t, i), i; | |
| 2565 | - }; | |
| 2566 | - var m = { | |
| 2567 | - ms: 1, | |
| 2568 | - s: 1e3 | |
| 2569 | - }; | |
| 2570 | - return s.Item = n, s; | |
| 2571 | -}), function (t, e) { | |
| 2572 | - "function" == typeof define && define.amd ? define("isotope-layout/js/item", ["outlayer/outlayer"], e) : "object" == typeof module && module.exports ? module.exports = e(require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.Item = e(t.Outlayer)); | |
| 2573 | -}(window, function (t) { | |
| 2574 | - "use strict"; | |
| 2575 | - | |
| 2576 | - function e() { | |
| 2577 | - t.Item.apply(this, arguments); | |
| 2578 | - } | |
| 2579 | - | |
| 2580 | - var i = e.prototype = Object.create(t.Item.prototype), | |
| 2581 | - o = i._create; | |
| 2582 | - i._create = function () { | |
| 2583 | - this.id = this.layout.itemGUID++, o.call(this), this.sortData = {}; | |
| 2584 | - }, i.updateSortData = function () { | |
| 2585 | - if (!this.isIgnored) { | |
| 2586 | - this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); | |
| 2587 | - var t = this.layout.options.getSortData, | |
| 2588 | - e = this.layout._sorters; | |
| 2589 | - | |
| 2590 | - for (var i in t) { | |
| 2591 | - var o = e[i]; | |
| 2592 | - this.sortData[i] = o(this.element, this); | |
| 2593 | - } | |
| 2594 | - } | |
| 2595 | - }; | |
| 2596 | - var n = i.destroy; | |
| 2597 | - return i.destroy = function () { | |
| 2598 | - n.apply(this, arguments), this.css({ | |
| 2599 | - display: "" | |
| 2600 | - }); | |
| 2601 | - }, e; | |
| 2602 | -}), function (t, e) { | |
| 2603 | - "function" == typeof define && define.amd ? define("isotope-layout/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], e) : "object" == typeof module && module.exports ? module.exports = e(require("get-size"), require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.LayoutMode = e(t.getSize, t.Outlayer)); | |
| 2604 | -}(window, function (t, e) { | |
| 2605 | - "use strict"; | |
| 2606 | - | |
| 2607 | - function i(t) { | |
| 2608 | - this.isotope = t, t && (this.options = t.options[this.namespace], this.element = t.element, this.items = t.filteredItems, this.size = t.size); | |
| 2609 | - } | |
| 2610 | - | |
| 2611 | - var o = i.prototype, | |
| 2612 | - n = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout", "_getOption"]; | |
| 2613 | - return n.forEach(function (t) { | |
| 2614 | - o[t] = function () { | |
| 2615 | - return e.prototype[t].apply(this.isotope, arguments); | |
| 2616 | - }; | |
| 2617 | - }), o.needsVerticalResizeLayout = function () { | |
| 2618 | - var e = t(this.isotope.element), | |
| 2619 | - i = this.isotope.size && e; | |
| 2620 | - return i && e.innerHeight != this.isotope.size.innerHeight; | |
| 2621 | - }, o._getMeasurement = function () { | |
| 2622 | - this.isotope._getMeasurement.apply(this, arguments); | |
| 2623 | - }, o.getColumnWidth = function () { | |
| 2624 | - this.getSegmentSize("column", "Width"); | |
| 2625 | - }, o.getRowHeight = function () { | |
| 2626 | - this.getSegmentSize("row", "Height"); | |
| 2627 | - }, o.getSegmentSize = function (t, e) { | |
| 2628 | - var i = t + e, | |
| 2629 | - o = "outer" + e; | |
| 2630 | - | |
| 2631 | - if (this._getMeasurement(i, o), !this[i]) { | |
| 2632 | - var n = this.getFirstItemSize(); | |
| 2633 | - this[i] = n && n[o] || this.isotope.size["inner" + e]; | |
| 2634 | - } | |
| 2635 | - }, o.getFirstItemSize = function () { | |
| 2636 | - var e = this.isotope.filteredItems[0]; | |
| 2637 | - return e && e.element && t(e.element); | |
| 2638 | - }, o.layout = function () { | |
| 2639 | - this.isotope.layout.apply(this.isotope, arguments); | |
| 2640 | - }, o.getSize = function () { | |
| 2641 | - this.isotope.getSize(), this.size = this.isotope.size; | |
| 2642 | - }, i.modes = {}, i.create = function (t, e) { | |
| 2643 | - function n() { | |
| 2644 | - i.apply(this, arguments); | |
| 2645 | - } | |
| 2646 | - | |
| 2647 | - return n.prototype = Object.create(o), n.prototype.constructor = n, e && (n.options = e), n.prototype.namespace = t, i.modes[t] = n, n; | |
| 2648 | - }, i; | |
| 2649 | -}), function (t, e) { | |
| 2650 | - "function" == typeof define && define.amd ? define("masonry-layout/masonry", ["outlayer/outlayer", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("outlayer"), require("get-size")) : t.Masonry = e(t.Outlayer, t.getSize); | |
| 2651 | -}(window, function (t, e) { | |
| 2652 | - var i = t.create("masonry"); | |
| 2653 | - i.compatOptions.fitWidth = "isFitWidth"; | |
| 2654 | - var o = i.prototype; | |
| 2655 | - return o._resetLayout = function () { | |
| 2656 | - this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(), this.colYs = []; | |
| 2657 | - | |
| 2658 | - for (var t = 0; t < this.cols; t++) this.colYs.push(0); | |
| 2659 | - | |
| 2660 | - this.maxY = 0, this.horizontalColIndex = 0; | |
| 2661 | - }, o.measureColumns = function () { | |
| 2662 | - if (this.getContainerWidth(), !this.columnWidth) { | |
| 2663 | - var t = this.items[0], | |
| 2664 | - i = t && t.element; | |
| 2665 | - this.columnWidth = i && e(i).outerWidth || this.containerWidth; | |
| 2666 | - } | |
| 2667 | - | |
| 2668 | - var o = this.columnWidth += this.gutter, | |
| 2669 | - n = this.containerWidth + this.gutter, | |
| 2670 | - s = n / o, | |
| 2671 | - r = o - n % o, | |
| 2672 | - a = r && r < 1 ? "round" : "floor"; | |
| 2673 | - s = Math[a](s), this.cols = Math.max(s, 1); | |
| 2674 | - }, o.getContainerWidth = function () { | |
| 2675 | - var t = this._getOption("fitWidth"), | |
| 2676 | - i = t ? this.element.parentNode : this.element, | |
| 2677 | - o = e(i); | |
| 2678 | - | |
| 2679 | - this.containerWidth = o && o.innerWidth; | |
| 2680 | - }, o._getItemLayoutPosition = function (t) { | |
| 2681 | - t.getSize(); | |
| 2682 | - var e = t.size.outerWidth % this.columnWidth, | |
| 2683 | - i = e && e < 1 ? "round" : "ceil", | |
| 2684 | - o = Math[i](t.size.outerWidth / this.columnWidth); | |
| 2685 | - o = Math.min(o, this.cols); | |
| 2686 | - | |
| 2687 | - for (var n = this.options.horizontalOrder ? "_getHorizontalColPosition" : "_getTopColPosition", s = this[n](o, t), r = { | |
| 2688 | - x: this.columnWidth * s.col, | |
| 2689 | - y: s.y | |
| 2690 | - }, a = s.y + t.size.outerHeight, u = o + s.col, h = s.col; h < u; h++) this.colYs[h] = a; | |
| 2691 | - | |
| 2692 | - return r; | |
| 2693 | - }, o._getTopColPosition = function (t) { | |
| 2694 | - var e = this._getTopColGroup(t), | |
| 2695 | - i = Math.min.apply(Math, e); | |
| 2696 | - | |
| 2697 | - return { | |
| 2698 | - col: e.indexOf(i), | |
| 2699 | - y: i | |
| 2700 | - }; | |
| 2701 | - }, o._getTopColGroup = function (t) { | |
| 2702 | - if (t < 2) return this.colYs; | |
| 2703 | - | |
| 2704 | - for (var e = [], i = this.cols + 1 - t, o = 0; o < i; o++) e[o] = this._getColGroupY(o, t); | |
| 2705 | - | |
| 2706 | - return e; | |
| 2707 | - }, o._getColGroupY = function (t, e) { | |
| 2708 | - if (e < 2) return this.colYs[t]; | |
| 2709 | - var i = this.colYs.slice(t, t + e); | |
| 2710 | - return Math.max.apply(Math, i); | |
| 2711 | - }, o._getHorizontalColPosition = function (t, e) { | |
| 2712 | - var i = this.horizontalColIndex % this.cols, | |
| 2713 | - o = t > 1 && i + t > this.cols; | |
| 2714 | - i = o ? 0 : i; | |
| 2715 | - var n = e.size.outerWidth && e.size.outerHeight; | |
| 2716 | - return this.horizontalColIndex = n ? i + t : this.horizontalColIndex, { | |
| 2717 | - col: i, | |
| 2718 | - y: this._getColGroupY(i, t) | |
| 2719 | - }; | |
| 2720 | - }, o._manageStamp = function (t) { | |
| 2721 | - var i = e(t), | |
| 2722 | - o = this._getElementOffset(t), | |
| 2723 | - n = this._getOption("originLeft"), | |
| 2724 | - s = n ? o.left : o.right, | |
| 2725 | - r = s + i.outerWidth, | |
| 2726 | - a = Math.floor(s / this.columnWidth); | |
| 2727 | - | |
| 2728 | - a = Math.max(0, a); | |
| 2729 | - var u = Math.floor(r / this.columnWidth); | |
| 2730 | - u -= r % this.columnWidth ? 0 : 1, u = Math.min(this.cols - 1, u); | |
| 2731 | - | |
| 2732 | - for (var h = this._getOption("originTop"), d = (h ? o.top : o.bottom) + i.outerHeight, l = a; l <= u; l++) this.colYs[l] = Math.max(d, this.colYs[l]); | |
| 2733 | - }, o._getContainerSize = function () { | |
| 2734 | - this.maxY = Math.max.apply(Math, this.colYs); | |
| 2735 | - var t = { | |
| 2736 | - height: this.maxY | |
| 2737 | - }; | |
| 2738 | - return this._getOption("fitWidth") && (t.width = this._getContainerFitWidth()), t; | |
| 2739 | - }, o._getContainerFitWidth = function () { | |
| 2740 | - for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];) t++; | |
| 2741 | - | |
| 2742 | - return (this.cols - t) * this.columnWidth - this.gutter; | |
| 2743 | - }, o.needsResizeLayout = function () { | |
| 2744 | - var t = this.containerWidth; | |
| 2745 | - return this.getContainerWidth(), t != this.containerWidth; | |
| 2746 | - }, i; | |
| 2747 | -}), function (t, e) { | |
| 2748 | - "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/masonry", ["../layout-mode", "masonry-layout/masonry"], e) : "object" == typeof module && module.exports ? module.exports = e(require("../layout-mode"), require("masonry-layout")) : e(t.Isotope.LayoutMode, t.Masonry); | |
| 2749 | -}(window, function (t, e) { | |
| 2750 | - "use strict"; | |
| 2751 | - | |
| 2752 | - var i = t.create("masonry"), | |
| 2753 | - o = i.prototype, | |
| 2754 | - n = { | |
| 2755 | - _getElementOffset: !0, | |
| 2756 | - layout: !0, | |
| 2757 | - _getMeasurement: !0 | |
| 2758 | - }; | |
| 2759 | - | |
| 2760 | - for (var s in e.prototype) n[s] || (o[s] = e.prototype[s]); | |
| 2761 | - | |
| 2762 | - var r = o.measureColumns; | |
| 2763 | - | |
| 2764 | - o.measureColumns = function () { | |
| 2765 | - this.items = this.isotope.filteredItems, r.call(this); | |
| 2766 | - }; | |
| 2767 | - | |
| 2768 | - var a = o._getOption; | |
| 2769 | - return o._getOption = function (t) { | |
| 2770 | - return "fitWidth" == t ? void 0 !== this.options.isFitWidth ? this.options.isFitWidth : this.options.fitWidth : a.apply(this.isotope, arguments); | |
| 2771 | - }, i; | |
| 2772 | -}), function (t, e) { | |
| 2773 | - "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/fit-rows", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode); | |
| 2774 | -}(window, function (t) { | |
| 2775 | - "use strict"; | |
| 2776 | - | |
| 2777 | - var e = t.create("fitRows"), | |
| 2778 | - i = e.prototype; | |
| 2779 | - return i._resetLayout = function () { | |
| 2780 | - this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth"); | |
| 2781 | - }, i._getItemLayoutPosition = function (t) { | |
| 2782 | - t.getSize(); | |
| 2783 | - var e = t.size.outerWidth + this.gutter, | |
| 2784 | - i = this.isotope.size.innerWidth + this.gutter; | |
| 2785 | - 0 !== this.x && e + this.x > i && (this.x = 0, this.y = this.maxY); | |
| 2786 | - var o = { | |
| 2787 | - x: this.x, | |
| 2788 | - y: this.y | |
| 2789 | - }; | |
| 2790 | - return this.maxY = Math.max(this.maxY, this.y + t.size.outerHeight), this.x += e, o; | |
| 2791 | - }, i._getContainerSize = function () { | |
| 2792 | - return { | |
| 2793 | - height: this.maxY | |
| 2794 | - }; | |
| 2795 | - }, e; | |
| 2796 | -}), function (t, e) { | |
| 2797 | - "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/vertical", ["../layout-mode"], e) : "object" == typeof module && module.exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode); | |
| 2798 | -}(window, function (t) { | |
| 2799 | - "use strict"; | |
| 2800 | - | |
| 2801 | - var e = t.create("vertical", { | |
| 2802 | - horizontalAlignment: 0 | |
| 2803 | - }), | |
| 2804 | - i = e.prototype; | |
| 2805 | - return i._resetLayout = function () { | |
| 2806 | - this.y = 0; | |
| 2807 | - }, i._getItemLayoutPosition = function (t) { | |
| 2808 | - t.getSize(); | |
| 2809 | - var e = (this.isotope.size.innerWidth - t.size.outerWidth) * this.options.horizontalAlignment, | |
| 2810 | - i = this.y; | |
| 2811 | - return this.y += t.size.outerHeight, { | |
| 2812 | - x: e, | |
| 2813 | - y: i | |
| 2814 | - }; | |
| 2815 | - }, i._getContainerSize = function () { | |
| 2816 | - return { | |
| 2817 | - height: this.y | |
| 2818 | - }; | |
| 2819 | - }, e; | |
| 2820 | -}), function (t, e) { | |
| 2821 | - "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "desandro-matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope-layout/js/item", "isotope-layout/js/layout-mode", "isotope-layout/js/layout-modes/masonry", "isotope-layout/js/layout-modes/fit-rows", "isotope-layout/js/layout-modes/vertical"], function (i, o, n, s, r, a) { | |
| 2822 | - return e(t, i, o, n, s, r, a); | |
| 2823 | - }) : "object" == typeof module && module.exports ? module.exports = e(t, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("isotope-layout/js/item"), require("isotope-layout/js/layout-mode"), require("isotope-layout/js/layout-modes/masonry"), require("isotope-layout/js/layout-modes/fit-rows"), require("isotope-layout/js/layout-modes/vertical")) : t.Isotope = e(t, t.Outlayer, t.getSize, t.matchesSelector, t.fizzyUIUtils, t.Isotope.Item, t.Isotope.LayoutMode); | |
| 2824 | -}(window, function (t, e, i, o, n, s, r) { | |
| 2825 | - function a(t, e) { | |
| 2826 | - return function (i, o) { | |
| 2827 | - for (var n = 0; n < t.length; n++) { | |
| 2828 | - var s = t[n], | |
| 2829 | - r = i.sortData[s], | |
| 2830 | - a = o.sortData[s]; | |
| 2831 | - | |
| 2832 | - if (r > a || r < a) { | |
| 2833 | - var u = void 0 !== e[s] ? e[s] : e, | |
| 2834 | - h = u ? 1 : -1; | |
| 2835 | - return (r > a ? 1 : -1) * h; | |
| 2836 | - } | |
| 2837 | - } | |
| 2838 | - | |
| 2839 | - return 0; | |
| 2840 | - }; | |
| 2841 | - } | |
| 2842 | - | |
| 2843 | - var u = t.jQuery, | |
| 2844 | - h = String.prototype.trim ? function (t) { | |
| 2845 | - return t.trim(); | |
| 2846 | - } : function (t) { | |
| 2847 | - return t.replace(/^\s+|\s+$/g, ""); | |
| 2848 | - }, | |
| 2849 | - d = e.create("isotope", { | |
| 2850 | - layoutMode: "masonry", | |
| 2851 | - isJQueryFiltering: !0, | |
| 2852 | - sortAscending: !0 | |
| 2853 | - }); | |
| 2854 | - d.Item = s, d.LayoutMode = r; | |
| 2855 | - var l = d.prototype; | |
| 2856 | - l._create = function () { | |
| 2857 | - this.itemGUID = 0, this._sorters = {}, this._getSorters(), e.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; | |
| 2858 | - | |
| 2859 | - for (var t in r.modes) this._initLayoutMode(t); | |
| 2860 | - }, l.reloadItems = function () { | |
| 2861 | - this.itemGUID = 0, e.prototype.reloadItems.call(this); | |
| 2862 | - }, l._itemize = function () { | |
| 2863 | - for (var t = e.prototype._itemize.apply(this, arguments), i = 0; i < t.length; i++) { | |
| 2864 | - var o = t[i]; | |
| 2865 | - o.id = this.itemGUID++; | |
| 2866 | - } | |
| 2867 | - | |
| 2868 | - return this._updateItemsSortData(t), t; | |
| 2869 | - }, l._initLayoutMode = function (t) { | |
| 2870 | - var e = r.modes[t], | |
| 2871 | - i = this.options[t] || {}; | |
| 2872 | - this.options[t] = e.options ? n.extend(e.options, i) : i, this.modes[t] = new e(this); | |
| 2873 | - }, l.layout = function () { | |
| 2874 | - return !this._isLayoutInited && this._getOption("initLayout") ? void this.arrange() : void this._layout(); | |
| 2875 | - }, l._layout = function () { | |
| 2876 | - var t = this._getIsInstant(); | |
| 2877 | - | |
| 2878 | - this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, t), this._isLayoutInited = !0; | |
| 2879 | - }, l.arrange = function (t) { | |
| 2880 | - this.option(t), this._getIsInstant(); | |
| 2881 | - | |
| 2882 | - var e = this._filter(this.items); | |
| 2883 | - | |
| 2884 | - this.filteredItems = e.matches, this._bindArrangeComplete(), this._isInstant ? this._noTransition(this._hideReveal, [e]) : this._hideReveal(e), this._sort(), this._layout(); | |
| 2885 | - }, l._init = l.arrange, l._hideReveal = function (t) { | |
| 2886 | - this.reveal(t.needReveal), this.hide(t.needHide); | |
| 2887 | - }, l._getIsInstant = function () { | |
| 2888 | - var t = this._getOption("layoutInstant"), | |
| 2889 | - e = void 0 !== t ? t : !this._isLayoutInited; | |
| 2890 | - | |
| 2891 | - return this._isInstant = e, e; | |
| 2892 | - }, l._bindArrangeComplete = function () { | |
| 2893 | - function t() { | |
| 2894 | - e && i && o && n.dispatchEvent("arrangeComplete", null, [n.filteredItems]); | |
| 2895 | - } | |
| 2896 | - | |
| 2897 | - var e, | |
| 2898 | - i, | |
| 2899 | - o, | |
| 2900 | - n = this; | |
| 2901 | - this.once("layoutComplete", function () { | |
| 2902 | - e = !0, t(); | |
| 2903 | - }), this.once("hideComplete", function () { | |
| 2904 | - i = !0, t(); | |
| 2905 | - }), this.once("revealComplete", function () { | |
| 2906 | - o = !0, t(); | |
| 2907 | - }); | |
| 2908 | - }, l._filter = function (t) { | |
| 2909 | - var e = this.options.filter; | |
| 2910 | - e = e || "*"; | |
| 2911 | - | |
| 2912 | - for (var i = [], o = [], n = [], s = this._getFilterTest(e), r = 0; r < t.length; r++) { | |
| 2913 | - var a = t[r]; | |
| 2914 | - | |
| 2915 | - if (!a.isIgnored) { | |
| 2916 | - var u = s(a); | |
| 2917 | - u && i.push(a), u && a.isHidden ? o.push(a) : u || a.isHidden || n.push(a); | |
| 2918 | - } | |
| 2919 | - } | |
| 2920 | - | |
| 2921 | - return { | |
| 2922 | - matches: i, | |
| 2923 | - needReveal: o, | |
| 2924 | - needHide: n | |
| 2925 | - }; | |
| 2926 | - }, l._getFilterTest = function (t) { | |
| 2927 | - return u && this.options.isJQueryFiltering ? function (e) { | |
| 2928 | - return u(e.element).is(t); | |
| 2929 | - } : "function" == typeof t ? function (e) { | |
| 2930 | - return t(e.element); | |
| 2931 | - } : function (e) { | |
| 2932 | - return o(e.element, t); | |
| 2933 | - }; | |
| 2934 | - }, l.updateSortData = function (t) { | |
| 2935 | - var e; | |
| 2936 | - t ? (t = n.makeArray(t), e = this.getItems(t)) : e = this.items, this._getSorters(), this._updateItemsSortData(e); | |
| 2937 | - }, l._getSorters = function () { | |
| 2938 | - var t = this.options.getSortData; | |
| 2939 | - | |
| 2940 | - for (var e in t) { | |
| 2941 | - var i = t[e]; | |
| 2942 | - this._sorters[e] = f(i); | |
| 2943 | - } | |
| 2944 | - }, l._updateItemsSortData = function (t) { | |
| 2945 | - for (var e = t && t.length, i = 0; e && i < e; i++) { | |
| 2946 | - var o = t[i]; | |
| 2947 | - o.updateSortData(); | |
| 2948 | - } | |
| 2949 | - }; | |
| 2950 | - | |
| 2951 | - var f = function () { | |
| 2952 | - function t(t) { | |
| 2953 | - if ("string" != typeof t) return t; | |
| 2954 | - var i = h(t).split(" "), | |
| 2955 | - o = i[0], | |
| 2956 | - n = o.match(/^\[(.+)\]$/), | |
| 2957 | - s = n && n[1], | |
| 2958 | - r = e(s, o), | |
| 2959 | - a = d.sortDataParsers[i[1]]; | |
| 2960 | - return t = a ? function (t) { | |
| 2961 | - return t && a(r(t)); | |
| 2962 | - } : function (t) { | |
| 2963 | - return t && r(t); | |
| 2964 | - }; | |
| 2965 | - } | |
| 2966 | - | |
| 2967 | - function e(t, e) { | |
| 2968 | - return t ? function (e) { | |
| 2969 | - return e.getAttribute(t); | |
| 2970 | - } : function (t) { | |
| 2971 | - var i = t.querySelector(e); | |
| 2972 | - return i && i.textContent; | |
| 2973 | - }; | |
| 2974 | - } | |
| 2975 | - | |
| 2976 | - return t; | |
| 2977 | - }(); | |
| 2978 | - | |
| 2979 | - d.sortDataParsers = { | |
| 2980 | - parseInt: function (t) { | |
| 2981 | - return parseInt(t, 10); | |
| 2982 | - }, | |
| 2983 | - parseFloat: function (t) { | |
| 2984 | - return parseFloat(t); | |
| 2985 | - } | |
| 2986 | - }, l._sort = function () { | |
| 2987 | - if (this.options.sortBy) { | |
| 2988 | - var t = n.makeArray(this.options.sortBy); | |
| 2989 | - this._getIsSameSortBy(t) || (this.sortHistory = t.concat(this.sortHistory)); | |
| 2990 | - var e = a(this.sortHistory, this.options.sortAscending); | |
| 2991 | - this.filteredItems.sort(e); | |
| 2992 | - } | |
| 2993 | - }, l._getIsSameSortBy = function (t) { | |
| 2994 | - for (var e = 0; e < t.length; e++) if (t[e] != this.sortHistory[e]) return !1; | |
| 2995 | - | |
| 2996 | - return !0; | |
| 2997 | - }, l._mode = function () { | |
| 2998 | - var t = this.options.layoutMode, | |
| 2999 | - e = this.modes[t]; | |
| 3000 | - if (!e) throw new Error("No layout mode: " + t); | |
| 3001 | - return e.options = this.options[t], e; | |
| 3002 | - }, l._resetLayout = function () { | |
| 3003 | - e.prototype._resetLayout.call(this), this._mode()._resetLayout(); | |
| 3004 | - }, l._getItemLayoutPosition = function (t) { | |
| 3005 | - return this._mode()._getItemLayoutPosition(t); | |
| 3006 | - }, l._manageStamp = function (t) { | |
| 3007 | - this._mode()._manageStamp(t); | |
| 3008 | - }, l._getContainerSize = function () { | |
| 3009 | - return this._mode()._getContainerSize(); | |
| 3010 | - }, l.needsResizeLayout = function () { | |
| 3011 | - return this._mode().needsResizeLayout(); | |
| 3012 | - }, l.appended = function (t) { | |
| 3013 | - var e = this.addItems(t); | |
| 3014 | - | |
| 3015 | - if (e.length) { | |
| 3016 | - var i = this._filterRevealAdded(e); | |
| 3017 | - | |
| 3018 | - this.filteredItems = this.filteredItems.concat(i); | |
| 3019 | - } | |
| 3020 | - }, l.prepended = function (t) { | |
| 3021 | - var e = this._itemize(t); | |
| 3022 | - | |
| 3023 | - if (e.length) { | |
| 3024 | - this._resetLayout(), this._manageStamps(); | |
| 3025 | - | |
| 3026 | - var i = this._filterRevealAdded(e); | |
| 3027 | - | |
| 3028 | - this.layoutItems(this.filteredItems), this.filteredItems = i.concat(this.filteredItems), this.items = e.concat(this.items); | |
| 3029 | - } | |
| 3030 | - }, l._filterRevealAdded = function (t) { | |
| 3031 | - var e = this._filter(t); | |
| 3032 | - | |
| 3033 | - return this.hide(e.needHide), this.reveal(e.matches), this.layoutItems(e.matches, !0), e.matches; | |
| 3034 | - }, l.insert = function (t) { | |
| 3035 | - var e = this.addItems(t); | |
| 3036 | - | |
| 3037 | - if (e.length) { | |
| 3038 | - var i, | |
| 3039 | - o, | |
| 3040 | - n = e.length; | |
| 3041 | - | |
| 3042 | - for (i = 0; i < n; i++) o = e[i], this.element.appendChild(o.element); | |
| 3043 | - | |
| 3044 | - var s = this._filter(e).matches; | |
| 3045 | - | |
| 3046 | - for (i = 0; i < n; i++) e[i].isLayoutInstant = !0; | |
| 3047 | - | |
| 3048 | - for (this.arrange(), i = 0; i < n; i++) delete e[i].isLayoutInstant; | |
| 3049 | - | |
| 3050 | - this.reveal(s); | |
| 3051 | - } | |
| 3052 | - }; | |
| 3053 | - var c = l.remove; | |
| 3054 | - return l.remove = function (t) { | |
| 3055 | - t = n.makeArray(t); | |
| 3056 | - var e = this.getItems(t); | |
| 3057 | - c.call(this, t); | |
| 3058 | - | |
| 3059 | - for (var i = e && e.length, o = 0; i && o < i; o++) { | |
| 3060 | - var s = e[o]; | |
| 3061 | - n.removeFrom(this.filteredItems, s); | |
| 3062 | - } | |
| 3063 | - }, l.shuffle = function () { | |
| 3064 | - for (var t = 0; t < this.items.length; t++) { | |
| 3065 | - var e = this.items[t]; | |
| 3066 | - e.sortData.random = Math.random(); | |
| 3067 | - } | |
| 3068 | - | |
| 3069 | - this.options.sortBy = "random", this._sort(), this._layout(); | |
| 3070 | - }, l._noTransition = function (t, e) { | |
| 3071 | - var i = this.options.transitionDuration; | |
| 3072 | - this.options.transitionDuration = 0; | |
| 3073 | - var o = t.apply(this, e); | |
| 3074 | - return this.options.transitionDuration = i, o; | |
| 3075 | - }, l.getFilteredItemElements = function () { | |
| 3076 | - return this.filteredItems.map(function (t) { | |
| 3077 | - return t.element; | |
| 3078 | - }); | |
| 3079 | - }, d; | |
| 3080 | -}); | |
| 3081 | -// ProgressBar.js 1.1.0 | |
| 3082 | -// https://kimmobrunfeldt.github.io/progressbar.js | |
| 3083 | -// License: MIT | |
| 3084 | - | |
| 3085 | -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ProgressBar = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | |
| 3086 | - /*! Shifty 2.8.0 - https://github.com/jeremyckahn/shifty */ | |
| 3087 | - !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("shifty",[],n):"object"==typeof exports?exports.shifty=n():t.shifty=n()}(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=3)}([function(t,n,e){"use strict";(function(t){e.d(n,"e",function(){return d}),e.d(n,"c",function(){return y}),e.d(n,"b",function(){return _}),e.d(n,"a",function(){return g}),e.d(n,"d",function(){return w});var r=e(1);function i(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.forEach(function(n){a(t,n,e[n])})}return t}function a(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var c="undefined"!=typeof window?window:t,f=c.requestAnimationFrame||c.webkitRequestAnimationFrame||c.oRequestAnimationFrame||c.msRequestAnimationFrame||c.mozCancelRequestAnimationFrame&&c.mozRequestAnimationFrame||setTimeout,s=function(){},l=null,h=null,p=o({},r),d=function(t,n,e,r,i,u,o){var a=t<u?0:(t-u)/i;for(var c in n){var f=o[c],s=f.call?f:p[f],l=e[c];n[c]=l+(r[c]-l)*s(a)}return n},v=function(t,n){var e=t._attachment,r=t._currentState,i=t._delay,u=t._easing,o=t._originalState,a=t._duration,c=t._step,f=t._targetState,s=t._timestamp,l=s+i+a,h=n>l?l:n,p=a-(l-h);h>=l?(c(f,e,p),t.stop(!0)):(t._applyFilter("beforeTween"),h<s+i?(h=1,a=1,s=1):s+=i,d(h,r,o,f,a,s,u),t._applyFilter("afterTween"),c(r,e,p))},y=function(){for(var t=g.now(),n=l;n;){var e=n._next;v(n,t),n=e}},_=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"linear",e={},r=u(n);if("string"===r||"function"===r)for(var i in t)e[i]=n;else for(var o in t)e[o]=n[o]||"linear";return e},m=function(t){if(t===l)(l=t._next)?l._previous=null:h=null;else if(t===h)(h=t._previous)?h._next=null:l=null;else{var n=t._previous,e=t._next;n._next=e,e._previous=n}t._previous=t._next=null},g=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._currentState=n,this._configured=!1,this._filters=[],this._timestamp=null,this._next=null,this._previous=null,e&&this.setConfig(e)}var n,e,r;return n=t,(e=[{key:"_applyFilter",value:function(t){var n=!0,e=!1,r=void 0;try{for(var i,u=this._filters[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var o=i.value[t];o&&o(this)}}catch(t){e=!0,r=t}finally{try{n||null==u.return||u.return()}finally{if(e)throw r}}}},{key:"tween",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this._attachment,r=this._configured;return!n&&r||this.setConfig(n),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),e),this.resume()}},{key:"setConfig",value:function(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.attachment,i=e.delay,u=void 0===i?0:i,a=e.duration,c=void 0===a?500:a,f=e.easing,l=e.from,h=e.promise,p=void 0===h?Promise:h,d=e.start,v=void 0===d?s:d,y=e.step,m=void 0===y?s:y,g=e.to;this._configured=!0,this._attachment=r,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=u,this._start=v,this._step=m,this._duration=c,this._currentState=o({},l||this.get()),this._originalState=this.get(),this._targetState=o({},g||this.get());var w=this._currentState;this._targetState=o({},w,this._targetState),this._easing=_(w,f);var b=t.filters;for(var S in this._filters.length=0,b)b[S].doesApply(this)&&this._filters.push(b[S]);return this._applyFilter("tweenCreated"),this._promise=new p(function(t,e){n._resolve=t,n._reject=e}),this._promise.catch(s),this}},{key:"get",value:function(){return o({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,m(this),this}},{key:"resume",value:function(){if(null===this._timestamp)return this.tween();if(this._isPlaying)return this._promise;var n=t.now();return this._pausedAtTime&&(this._timestamp+=n-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===l?(l=this,h=this,function t(){l&&(f.call(c,t,1e3/60),y())}()):(this._previous=h,h._next=this,h=this),this._promise}},{key:"seek",value:function(n){n=Math.max(n,0);var e=t.now();return this._timestamp+n===0?this:(this._timestamp=e-n,this._isPlaying||v(this,e),this)}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._attachment,e=this._currentState,r=this._easing,i=this._originalState,u=this._targetState;if(this._isPlaying)return this._isPlaying=!1,m(this),t?(this._applyFilter("beforeTween"),d(1,e,i,u,1,0,r),this._applyFilter("afterTween"),this._applyFilter("afterTweenEnd"),this._resolve(e,n)):this._reject(e,n),this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(n){t.setScheduleFunction(n)}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&i(n.prototype,e),r&&i(n,r),t}();function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new g,e=n.tween(t);return e.tweenable=n,e}g.setScheduleFunction=function(t){return f=t},g.formulas=p,g.filters={},g.now=Date.now||function(){return+new Date}}).call(this,e(2))},function(t,n,e){"use strict";e.r(n),e.d(n,"linear",function(){return r}),e.d(n,"easeInQuad",function(){return i}),e.d(n,"easeOutQuad",function(){return u}),e.d(n,"easeInOutQuad",function(){return o}),e.d(n,"easeInCubic",function(){return a}),e.d(n,"easeOutCubic",function(){return c}),e.d(n,"easeInOutCubic",function(){return f}),e.d(n,"easeInQuart",function(){return s}),e.d(n,"easeOutQuart",function(){return l}),e.d(n,"easeInOutQuart",function(){return h}),e.d(n,"easeInQuint",function(){return p}),e.d(n,"easeOutQuint",function(){return d}),e.d(n,"easeInOutQuint",function(){return v}),e.d(n,"easeInSine",function(){return y}),e.d(n,"easeOutSine",function(){return _}),e.d(n,"easeInOutSine",function(){return m}),e.d(n,"easeInExpo",function(){return g}),e.d(n,"easeOutExpo",function(){return w}),e.d(n,"easeInOutExpo",function(){return b}),e.d(n,"easeInCirc",function(){return S}),e.d(n,"easeOutCirc",function(){return O}),e.d(n,"easeInOutCirc",function(){return M}),e.d(n,"easeOutBounce",function(){return k}),e.d(n,"easeInBack",function(){return j}),e.d(n,"easeOutBack",function(){return P}),e.d(n,"easeInOutBack",function(){return x}),e.d(n,"elastic",function(){return T}),e.d(n,"swingFromTo",function(){return F}),e.d(n,"swingFrom",function(){return A}),e.d(n,"swingTo",function(){return E}),e.d(n,"bounce",function(){return I}),e.d(n,"bouncePast",function(){return C}),e.d(n,"easeFromTo",function(){return q}),e.d(n,"easeFrom",function(){return Q}),e.d(n,"easeTo",function(){return D}); | |
| 3088 | - /*! | |
| 3089 | - * All equations are adapted from Thomas Fuchs' | |
| 3090 | - * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js). | |
| 3091 | - * | |
| 3092 | - * Based on Easing Equations (c) 2003 [Robert | |
| 3093 | - * Penner](http://www.robertpenner.com/), all rights reserved. This work is | |
| 3094 | - * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html). | |
| 3095 | - */ | |
| 3096 | - /*! | |
| 3097 | - * TERMS OF USE - EASING EQUATIONS | |
| 3098 | - * Open source under the BSD License. | |
| 3099 | - * Easing Equations (c) 2003 Robert Penner, all rights reserved. | |
| 3100 | - */ | |
| 3101 | - var r=function(t){return t},i=function(t){return Math.pow(t,2)},u=function(t){return-(Math.pow(t-1,2)-1)},o=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},a=function(t){return Math.pow(t,3)},c=function(t){return Math.pow(t-1,3)+1},f=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},s=function(t){return Math.pow(t,4)},l=function(t){return-(Math.pow(t-1,4)-1)},h=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},p=function(t){return Math.pow(t,5)},d=function(t){return Math.pow(t-1,5)+1},v=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},_=function(t){return Math.sin(t*(Math.PI/2))},m=function(t){return-.5*(Math.cos(Math.PI*t)-1)},g=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},b=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},k=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},j=function(t){var n=1.70158;return t*t*((n+1)*t-n)},P=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},x=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},F=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},A=function(t){var n=1.70158;return t*t*((n+1)*t-n)},E=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},C=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},q=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},Q=function(t){return Math.pow(t,4)},D=function(t){return Math.pow(t,.25)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"doesApply",function(){return x}),e.d(r,"tweenCreated",function(){return T}),e.d(r,"beforeTween",function(){return F}),e.d(r,"afterTween",function(){return A});var i,u,o=e(0),a=/(\d|-|\.)/,c=/([^\-0-9.]+)/g,f=/[0-9.-]+/g,s=(i=f.source,u=/,\s*/.source,new RegExp("rgb\\(".concat(i).concat(u).concat(i).concat(u).concat(i,"\\)"),"g")),l=/^.*\(/,h=/#([0-9]|[a-f]){3,6}/gi,p=function(t,n){return t.map(function(t,e){return"_".concat(n,"_").concat(e)})};function d(t){return parseInt(t,16)}var v=function(t){return"rgb(".concat((n=t,3===(n=n.replace(/#/,"")).length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]),[d(n.substr(0,2)),d(n.substr(2,2)),d(n.substr(4,2))]).join(","),")");var n},y=function(t,n,e){var r=n.match(t),i=n.replace(t,"VAL");return r&&r.forEach(function(t){return i=i.replace("VAL",e(t))}),i},_=function(t){for(var n in t){var e=t[n];"string"==typeof e&&e.match(h)&&(t[n]=y(h,e,v))}},m=function(t){var n=t.match(f).map(Math.floor),e=t.match(l)[0];return"".concat(e).concat(n.join(","),")")},g=function(t){return t.match(f)},w=function(t){var n,e,r={};for(var i in t){var u=t[i];"string"==typeof u&&(r[i]={formatString:(n=u,e=void 0,e=n.match(c),e?(1===e.length||n.charAt(0).match(a))&&e.unshift(""):e=["",""],e.join("VAL")),chunkNames:p(g(u),i)})}return r},b=function(t,n){var e=function(e){g(t[e]).forEach(function(r,i){return t[n[e].chunkNames[i]]=+r}),delete t[e]};for(var r in n)e(r)},S=function(t,n){var e={};return n.forEach(function(n){e[n]=t[n],delete t[n]}),e},O=function(t,n){return n.map(function(n){return t[n]})},M=function(t,n){return n.forEach(function(n){return t=t.replace("VAL",+n.toFixed(4))}),t},k=function(t,n){for(var e in n){var r=n[e],i=r.chunkNames,u=r.formatString,o=M(u,O(S(t,i),i));t[e]=y(s,o,m)}},j=function(t,n){var e=function(e){var r=n[e].chunkNames,i=t[e];if("string"==typeof i){var u=i.split(" "),o=u[u.length-1];r.forEach(function(n,e){return t[n]=u[e]||o})}else r.forEach(function(n){return t[n]=i});delete t[e]};for(var r in n)e(r)},P=function(t,n){for(var e in n){var r=n[e].chunkNames,i=t[r[0]];t[e]="string"==typeof i?r.map(function(n){var e=t[n];return delete t[n],e}).join(" "):i}},x=function(t){var n=t._currentState;return Object.keys(n).some(function(t){return"string"==typeof n[t]})};function T(t){var n=t._currentState;[n,t._originalState,t._targetState].forEach(_),t._tokenData=w(n)}function F(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,u=t._tokenData;j(i,u),[n,e,r].forEach(function(t){return b(t,u)})}function A(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,u=t._tokenData;[n,e,r].forEach(function(t){return k(t,u)}),P(i,u)}function E(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var I=new o.a,C=o.a.filters,q=function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=function(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.forEach(function(n){E(t,n,e[n])})}return t}({},t),a=Object(o.b)(t,r);for(var c in I._filters.length=0,I.set({}),I._currentState=u,I._originalState=t,I._targetState=n,I._easing=a,C)C[c].doesApply(I)&&I._filters.push(C[c]);I._applyFilter("tweenCreated"),I._applyFilter("beforeTween");var f=Object(o.e)(e,u,t,n,1,i,a);return I._applyFilter("afterTween"),f};function Q(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function D(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function B(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");var e=n.get(t);return e.get?e.get.call(t):e.value}var N=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),R.set(this,{writable:!0,value:[]});for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(this.add.bind(this))}var n,e,r;return n=t,(e=[{key:"add",value:function(t){return B(this,R).push(t),t}},{key:"remove",value:function(t){var n=B(this,R).indexOf(t);return~n&&B(this,R).splice(n,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return B(this,R).some(function(t){return t.isPlaying()})}},{key:"play",value:function(){return B(this,R).forEach(function(t){return t.tween()}),this}},{key:"pause",value:function(){return B(this,R).forEach(function(t){return t.pause()}),this}},{key:"resume",value:function(){return B(this,R).forEach(function(t){return t.resume()}),this}},{key:"stop",value:function(t){return B(this,R).forEach(function(n){return n.stop(t)}),this}},{key:"tweenables",get:function(){return Q(B(this,R))}},{key:"promises",get:function(){return B(this,R).map(function(t){return t._promise})}}])&&D(n.prototype,e),r&&D(n,r),t}(),R=new WeakMap;function z(t,n,e,r,i,u){var o=0,a=0,c=0,f=0,s=0,l=0,h=function(t){return((o*t+a)*t+c)*t},p=function(t){return t>=0?t:0-t};return o=1-(c=3*n)-(a=3*(r-n)-c),f=1-(l=3*e)-(s=3*(i-e)-l),function(t,n){return e=function(t,n){var e,r,i,u,f,s,l;for(i=t,s=0;s<8;s++){if(u=h(i)-t,p(u)<n)return i;if(p(f=(3*o*(l=i)+2*a)*l+c)<1e-6)break;i-=u/f}if((i=t)<(e=0))return e;if(i>(r=1))return r;for(;e<r;){if(u=h(i),p(u-t)<n)return i;t>u?e=i:r=i,i=.5*(r-e)+e}return i}(t,n),((f*e+s)*e+l)*e;var e}(t,function(t){return 1/(200*t)}(u))}var L=function(t,n,e,r,i){var u=function(t,n,e,r){return function(i){return z(i,t,n,e,r,1)}}(n,e,r,i);return u.displayName=t,u.x1=n,u.y1=e,u.x2=r,u.y2=i,o.a.formulas[t]=u},V=function(t){return delete o.a.formulas[t]};e.d(n,"processTweens",function(){return o.c}),e.d(n,"Tweenable",function(){return o.a}),e.d(n,"tween",function(){return o.d}),e.d(n,"interpolate",function(){return q}),e.d(n,"Scene",function(){return N}),e.d(n,"setBezierFunction",function(){return L}),e.d(n,"unsetBezierFunction",function(){return V}),o.a.filters.token=r}])}); | |
| 3102 | - | |
| 3103 | - },{}],2:[function(require,module,exports){ | |
| 3104 | - // Circle shaped progress bar | |
| 3105 | - | |
| 3106 | - var Shape = require('./shape'); | |
| 3107 | - var utils = require('./utils'); | |
| 3108 | - | |
| 3109 | - var Circle = function Circle(container, options) { | |
| 3110 | - // Use two arcs to form a circle | |
| 3111 | - // See this answer http://stackoverflow.com/a/10477334/1446092 | |
| 3112 | - this._pathTemplate = | |
| 3113 | - 'M 50,50 m 0,-{radius}' + | |
| 3114 | - ' a {radius},{radius} 0 1 1 0,{2radius}' + | |
| 3115 | - ' a {radius},{radius} 0 1 1 0,-{2radius}'; | |
| 3116 | - | |
| 3117 | - this.containerAspectRatio = 1; | |
| 3118 | - | |
| 3119 | - Shape.apply(this, arguments); | |
| 3120 | - }; | |
| 3121 | - | |
| 3122 | - Circle.prototype = new Shape(); | |
| 3123 | - Circle.prototype.constructor = Circle; | |
| 3124 | - | |
| 3125 | - Circle.prototype._pathString = function _pathString(opts) { | |
| 3126 | - var widthOfWider = opts.strokeWidth; | |
| 3127 | - if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) { | |
| 3128 | - widthOfWider = opts.trailWidth; | |
| 3129 | - } | |
| 3130 | - | |
| 3131 | - var r = 50 - widthOfWider / 2; | |
| 3132 | - | |
| 3133 | - return utils.render(this._pathTemplate, { | |
| 3134 | - radius: r, | |
| 3135 | - '2radius': r * 2 | |
| 3136 | - }); | |
| 3137 | - }; | |
| 3138 | - | |
| 3139 | - Circle.prototype._trailString = function _trailString(opts) { | |
| 3140 | - return this._pathString(opts); | |
| 3141 | - }; | |
| 3142 | - | |
| 3143 | - module.exports = Circle; | |
| 3144 | - | |
| 3145 | - },{"./shape":7,"./utils":9}],3:[function(require,module,exports){ | |
| 3146 | - // Line shaped progress bar | |
| 3147 | - | |
| 3148 | - var Shape = require('./shape'); | |
| 3149 | - var utils = require('./utils'); | |
| 3150 | - | |
| 3151 | - var Line = function Line(container, options) { | |
| 3152 | - this._pathTemplate = 'M 0,{center} L 100,{center}'; | |
| 3153 | - Shape.apply(this, arguments); | |
| 3154 | - }; | |
| 3155 | - | |
| 3156 | - Line.prototype = new Shape(); | |
| 3157 | - Line.prototype.constructor = Line; | |
| 3158 | - | |
| 3159 | - Line.prototype._initializeSvg = function _initializeSvg(svg, opts) { | |
| 3160 | - svg.setAttribute('viewBox', '0 0 100 ' + opts.strokeWidth); | |
| 3161 | - svg.setAttribute('preserveAspectRatio', 'none'); | |
| 3162 | - }; | |
| 3163 | - | |
| 3164 | - Line.prototype._pathString = function _pathString(opts) { | |
| 3165 | - return utils.render(this._pathTemplate, { | |
| 3166 | - center: opts.strokeWidth / 2 | |
| 3167 | - }); | |
| 3168 | - }; | |
| 3169 | - | |
| 3170 | - Line.prototype._trailString = function _trailString(opts) { | |
| 3171 | - return this._pathString(opts); | |
| 3172 | - }; | |
| 3173 | - | |
| 3174 | - module.exports = Line; | |
| 3175 | - | |
| 3176 | - },{"./shape":7,"./utils":9}],4:[function(require,module,exports){ | |
| 3177 | - module.exports = { | |
| 3178 | - // Higher level API, different shaped progress bars | |
| 3179 | - Line: require('./line'), | |
| 3180 | - Circle: require('./circle'), | |
| 3181 | - SemiCircle: require('./semicircle'), | |
| 3182 | - Square: require('./square'), | |
| 3183 | - | |
| 3184 | - // Lower level API to use any SVG path | |
| 3185 | - Path: require('./path'), | |
| 3186 | - | |
| 3187 | - // Base-class for creating new custom shapes | |
| 3188 | - // to be in line with the API of built-in shapes | |
| 3189 | - // Undocumented. | |
| 3190 | - Shape: require('./shape'), | |
| 3191 | - | |
| 3192 | - // Internal utils, undocumented. | |
| 3193 | - utils: require('./utils') | |
| 3194 | - }; | |
| 3195 | - | |
| 3196 | - },{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(require,module,exports){ | |
| 3197 | - // Lower level API to animate any kind of svg path | |
| 3198 | - | |
| 3199 | - var shifty = require('shifty'); | |
| 3200 | - var utils = require('./utils'); | |
| 3201 | - | |
| 3202 | - var Tweenable = shifty.Tweenable; | |
| 3203 | - | |
| 3204 | - var EASING_ALIASES = { | |
| 3205 | - easeIn: 'easeInCubic', | |
| 3206 | - easeOut: 'easeOutCubic', | |
| 3207 | - easeInOut: 'easeInOutCubic' | |
| 3208 | - }; | |
| 3209 | - | |
| 3210 | - var Path = function Path(path, opts) { | |
| 3211 | - // Throw a better error if not initialized with `new` keyword | |
| 3212 | - if (!(this instanceof Path)) { | |
| 3213 | - throw new Error('Constructor was called without new keyword'); | |
| 3214 | - } | |
| 3215 | - | |
| 3216 | - // Default parameters for animation | |
| 3217 | - opts = utils.extend({ | |
| 3218 | - delay: 0, | |
| 3219 | - duration: 800, | |
| 3220 | - easing: 'linear', | |
| 3221 | - from: {}, | |
| 3222 | - to: {}, | |
| 3223 | - step: function() {} | |
| 3224 | - }, opts); | |
| 3225 | - | |
| 3226 | - var element; | |
| 3227 | - if (utils.isString(path)) { | |
| 3228 | - element = document.querySelector(path); | |
| 3229 | - } else { | |
| 3230 | - element = path; | |
| 3231 | - } | |
| 3232 | - | |
| 3233 | - // Reveal .path as public attribute | |
| 3234 | - this.path = element; | |
| 3235 | - this._opts = opts; | |
| 3236 | - this._tweenable = null; | |
| 3237 | - | |
| 3238 | - // Set up the starting positions | |
| 3239 | - var length = this.path.getTotalLength(); | |
| 3240 | - this.path.style.strokeDasharray = length + ' ' + length; | |
| 3241 | - this.set(0); | |
| 3242 | - }; | |
| 3243 | - | |
| 3244 | - Path.prototype.value = function value() { | |
| 3245 | - var offset = this._getComputedDashOffset(); | |
| 3246 | - var length = this.path.getTotalLength(); | |
| 3247 | - | |
| 3248 | - var progress = 1 - offset / length; | |
| 3249 | - // Round number to prevent returning very small number like 1e-30, which | |
| 3250 | - // is practically 0 | |
| 3251 | - return parseFloat(progress.toFixed(6), 10); | |
| 3252 | - }; | |
| 3253 | - | |
| 3254 | - Path.prototype.set = function set(progress) { | |
| 3255 | - this.stop(); | |
| 3256 | - | |
| 3257 | - this.path.style.strokeDashoffset = this._progressToOffset(progress); | |
| 3258 | - | |
| 3259 | - var step = this._opts.step; | |
| 3260 | - if (utils.isFunction(step)) { | |
| 3261 | - var easing = this._easing(this._opts.easing); | |
| 3262 | - var values = this._calculateTo(progress, easing); | |
| 3263 | - var reference = this._opts.shape || this; | |
| 3264 | - step(values, reference, this._opts.attachment); | |
| 3265 | - } | |
| 3266 | - }; | |
| 3267 | - | |
| 3268 | - Path.prototype.stop = function stop() { | |
| 3269 | - this._stopTween(); | |
| 3270 | - this.path.style.strokeDashoffset = this._getComputedDashOffset(); | |
| 3271 | - }; | |
| 3272 | - | |
| 3273 | - // Method introduced here: | |
| 3274 | - // http://jakearchibald.com/2013/animated-line-drawing-svg/ | |
| 3275 | - Path.prototype.animate = function animate(progress, opts, cb) { | |
| 3276 | - opts = opts || {}; | |
| 3277 | - | |
| 3278 | - if (utils.isFunction(opts)) { | |
| 3279 | - cb = opts; | |
| 3280 | - opts = {}; | |
| 3281 | - } | |
| 3282 | - | |
| 3283 | - var passedOpts = utils.extend({}, opts); | |
| 3284 | - | |
| 3285 | - // Copy default opts to new object so defaults are not modified | |
| 3286 | - var defaultOpts = utils.extend({}, this._opts); | |
| 3287 | - opts = utils.extend(defaultOpts, opts); | |
| 3288 | - | |
| 3289 | - var shiftyEasing = this._easing(opts.easing); | |
| 3290 | - var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts); | |
| 3291 | - | |
| 3292 | - this.stop(); | |
| 3293 | - | |
| 3294 | - // Trigger a layout so styles are calculated & the browser | |
| 3295 | - // picks up the starting position before animating | |
| 3296 | - this.path.getBoundingClientRect(); | |
| 3297 | - | |
| 3298 | - var offset = this._getComputedDashOffset(); | |
| 3299 | - var newOffset = this._progressToOffset(progress); | |
| 3300 | - | |
| 3301 | - var self = this; | |
| 3302 | - this._tweenable = new Tweenable(); | |
| 3303 | - this._tweenable.tween({ | |
| 3304 | - from: utils.extend({ offset: offset }, values.from), | |
| 3305 | - to: utils.extend({ offset: newOffset }, values.to), | |
| 3306 | - duration: opts.duration, | |
| 3307 | - delay: opts.delay, | |
| 3308 | - easing: shiftyEasing, | |
| 3309 | - step: function(state) { | |
| 3310 | - self.path.style.strokeDashoffset = state.offset; | |
| 3311 | - var reference = opts.shape || self; | |
| 3312 | - opts.step(state, reference, opts.attachment); | |
| 3313 | - } | |
| 3314 | - }).then(function(state) { | |
| 3315 | - if (utils.isFunction(cb)) { | |
| 3316 | - cb(); | |
| 3317 | - } | |
| 3318 | - }); | |
| 3319 | - }; | |
| 3320 | - | |
| 3321 | - Path.prototype._getComputedDashOffset = function _getComputedDashOffset() { | |
| 3322 | - var computedStyle = window.getComputedStyle(this.path, null); | |
| 3323 | - return parseFloat(computedStyle.getPropertyValue('stroke-dashoffset'), 10); | |
| 3324 | - }; | |
| 3325 | - | |
| 3326 | - Path.prototype._progressToOffset = function _progressToOffset(progress) { | |
| 3327 | - var length = this.path.getTotalLength(); | |
| 3328 | - return length - progress * length; | |
| 3329 | - }; | |
| 3330 | - | |
| 3331 | - // Resolves from and to values for animation. | |
| 3332 | - Path.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) { | |
| 3333 | - if (opts.from && opts.to) { | |
| 3334 | - return { | |
| 3335 | - from: opts.from, | |
| 3336 | - to: opts.to | |
| 3337 | - }; | |
| 3338 | - } | |
| 3339 | - | |
| 3340 | - return { | |
| 3341 | - from: this._calculateFrom(easing), | |
| 3342 | - to: this._calculateTo(progress, easing) | |
| 3343 | - }; | |
| 3344 | - }; | |
| 3345 | - | |
| 3346 | - // Calculate `from` values from options passed at initialization | |
| 3347 | - Path.prototype._calculateFrom = function _calculateFrom(easing) { | |
| 3348 | - return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing); | |
| 3349 | - }; | |
| 3350 | - | |
| 3351 | - // Calculate `to` values from options passed at initialization | |
| 3352 | - Path.prototype._calculateTo = function _calculateTo(progress, easing) { | |
| 3353 | - return shifty.interpolate(this._opts.from, this._opts.to, progress, easing); | |
| 3354 | - }; | |
| 3355 | - | |
| 3356 | - Path.prototype._stopTween = function _stopTween() { | |
| 3357 | - if (this._tweenable !== null) { | |
| 3358 | - this._tweenable.stop(); | |
| 3359 | - this._tweenable = null; | |
| 3360 | - } | |
| 3361 | - }; | |
| 3362 | - | |
| 3363 | - Path.prototype._easing = function _easing(easing) { | |
| 3364 | - if (EASING_ALIASES.hasOwnProperty(easing)) { | |
| 3365 | - return EASING_ALIASES[easing]; | |
| 3366 | - } | |
| 3367 | - | |
| 3368 | - return easing; | |
| 3369 | - }; | |
| 3370 | - | |
| 3371 | - module.exports = Path; | |
| 3372 | - | |
| 3373 | - },{"./utils":9,"shifty":1}],6:[function(require,module,exports){ | |
| 3374 | - // Semi-SemiCircle shaped progress bar | |
| 3375 | - | |
| 3376 | - var Shape = require('./shape'); | |
| 3377 | - var Circle = require('./circle'); | |
| 3378 | - var utils = require('./utils'); | |
| 3379 | - | |
| 3380 | - var SemiCircle = function SemiCircle(container, options) { | |
| 3381 | - // Use one arc to form a SemiCircle | |
| 3382 | - // See this answer http://stackoverflow.com/a/10477334/1446092 | |
| 3383 | - this._pathTemplate = | |
| 3384 | - 'M 50,50 m -{radius},0' + | |
| 3385 | - ' a {radius},{radius} 0 1 1 {2radius},0'; | |
| 3386 | - | |
| 3387 | - this.containerAspectRatio = 2; | |
| 3388 | - | |
| 3389 | - Shape.apply(this, arguments); | |
| 3390 | - }; | |
| 3391 | - | |
| 3392 | - SemiCircle.prototype = new Shape(); | |
| 3393 | - SemiCircle.prototype.constructor = SemiCircle; | |
| 3394 | - | |
| 3395 | - SemiCircle.prototype._initializeSvg = function _initializeSvg(svg, opts) { | |
| 3396 | - svg.setAttribute('viewBox', '0 0 100 50'); | |
| 3397 | - }; | |
| 3398 | - | |
| 3399 | - SemiCircle.prototype._initializeTextContainer = function _initializeTextContainer( | |
| 3400 | - opts, | |
| 3401 | - container, | |
| 3402 | - textContainer | |
| 3403 | - ) { | |
| 3404 | - if (opts.text.style) { | |
| 3405 | - // Reset top style | |
| 3406 | - textContainer.style.top = 'auto'; | |
| 3407 | - textContainer.style.bottom = '0'; | |
| 3408 | - | |
| 3409 | - if (opts.text.alignToBottom) { | |
| 3410 | - utils.setStyle(textContainer, 'transform', 'translate(-50%, 0)'); | |
| 3411 | - } else { | |
| 3412 | - utils.setStyle(textContainer, 'transform', 'translate(-50%, 50%)'); | |
| 3413 | - } | |
| 3414 | - } | |
| 3415 | - }; | |
| 3416 | - | |
| 3417 | - // Share functionality with Circle, just have different path | |
| 3418 | - SemiCircle.prototype._pathString = Circle.prototype._pathString; | |
| 3419 | - SemiCircle.prototype._trailString = Circle.prototype._trailString; | |
| 3420 | - | |
| 3421 | - module.exports = SemiCircle; | |
| 3422 | - | |
| 3423 | - },{"./circle":2,"./shape":7,"./utils":9}],7:[function(require,module,exports){ | |
| 3424 | - // Base object for different progress bar shapes | |
| 3425 | - | |
| 3426 | - var Path = require('./path'); | |
| 3427 | - var utils = require('./utils'); | |
| 3428 | - | |
| 3429 | - var DESTROYED_ERROR = 'Object is destroyed'; | |
| 3430 | - | |
| 3431 | - var Shape = function Shape(container, opts) { | |
| 3432 | - // Throw a better error if progress bars are not initialized with `new` | |
| 3433 | - // keyword | |
| 3434 | - if (!(this instanceof Shape)) { | |
| 3435 | - throw new Error('Constructor was called without new keyword'); | |
| 3436 | - } | |
| 3437 | - | |
| 3438 | - // Prevent calling constructor without parameters so inheritance | |
| 3439 | - // works correctly. To understand, this is how Shape is inherited: | |
| 3440 | - // | |
| 3441 | - // Line.prototype = new Shape(); | |
| 3442 | - // | |
| 3443 | - // We just want to set the prototype for Line. | |
| 3444 | - if (arguments.length === 0) { | |
| 3445 | - return; | |
| 3446 | - } | |
| 3447 | - | |
| 3448 | - // Default parameters for progress bar creation | |
| 3449 | - this._opts = utils.extend({ | |
| 3450 | - color: '#555', | |
| 3451 | - strokeWidth: 1.0, | |
| 3452 | - trailColor: null, | |
| 3453 | - trailWidth: null, | |
| 3454 | - fill: null, | |
| 3455 | - text: { | |
| 3456 | - style: { | |
| 3457 | - color: null, | |
| 3458 | - position: 'absolute', | |
| 3459 | - left: '50%', | |
| 3460 | - top: '50%', | |
| 3461 | - padding: 0, | |
| 3462 | - margin: 0, | |
| 3463 | - transform: { | |
| 3464 | - prefix: true, | |
| 3465 | - value: 'translate(-50%, -50%)' | |
| 3466 | - } | |
| 3467 | - }, | |
| 3468 | - autoStyleContainer: true, | |
| 3469 | - alignToBottom: true, | |
| 3470 | - value: null, | |
| 3471 | - className: 'progressbar-text' | |
| 3472 | - }, | |
| 3473 | - svgStyle: { | |
| 3474 | - display: 'block', | |
| 3475 | - width: '100%' | |
| 3476 | - }, | |
| 3477 | - warnings: false | |
| 3478 | - }, opts, true); // Use recursive extend | |
| 3479 | - | |
| 3480 | - // If user specifies e.g. svgStyle or text style, the whole object | |
| 3481 | - // should replace the defaults to make working with styles easier | |
| 3482 | - if (utils.isObject(opts) && opts.svgStyle !== undefined) { | |
| 3483 | - this._opts.svgStyle = opts.svgStyle; | |
| 3484 | - } | |
| 3485 | - if (utils.isObject(opts) && utils.isObject(opts.text) && opts.text.style !== undefined) { | |
| 3486 | - this._opts.text.style = opts.text.style; | |
| 3487 | - } | |
| 3488 | - | |
| 3489 | - var svgView = this._createSvgView(this._opts); | |
| 3490 | - | |
| 3491 | - var element; | |
| 3492 | - if (utils.isString(container)) { | |
| 3493 | - element = document.querySelector(container); | |
| 3494 | - } else { | |
| 3495 | - element = container; | |
| 3496 | - } | |
| 3497 | - | |
| 3498 | - if (!element) { | |
| 3499 | - throw new Error('Container does not exist: ' + container); | |
| 3500 | - } | |
| 3501 | - | |
| 3502 | - this._container = element; | |
| 3503 | - this._container.appendChild(svgView.svg); | |
| 3504 | - if (this._opts.warnings) { | |
| 3505 | - this._warnContainerAspectRatio(this._container); | |
| 3506 | - } | |
| 3507 | - | |
| 3508 | - if (this._opts.svgStyle) { | |
| 3509 | - utils.setStyles(svgView.svg, this._opts.svgStyle); | |
| 3510 | - } | |
| 3511 | - | |
| 3512 | - // Expose public attributes before Path initialization | |
| 3513 | - this.svg = svgView.svg; | |
| 3514 | - this.path = svgView.path; | |
| 3515 | - this.trail = svgView.trail; | |
| 3516 | - this.text = null; | |
| 3517 | - | |
| 3518 | - var newOpts = utils.extend({ | |
| 3519 | - attachment: undefined, | |
| 3520 | - shape: this | |
| 3521 | - }, this._opts); | |
| 3522 | - this._progressPath = new Path(svgView.path, newOpts); | |
| 3523 | - | |
| 3524 | - if (utils.isObject(this._opts.text) && this._opts.text.value !== null) { | |
| 3525 | - this.setText(this._opts.text.value); | |
| 3526 | - } | |
| 3527 | - }; | |
| 3528 | - | |
| 3529 | - Shape.prototype.animate = function animate(progress, opts, cb) { | |
| 3530 | - if (this._progressPath === null) { | |
| 3531 | - throw new Error(DESTROYED_ERROR); | |
| 3532 | - } | |
| 3533 | - | |
| 3534 | - this._progressPath.animate(progress, opts, cb); | |
| 3535 | - }; | |
| 3536 | - | |
| 3537 | - Shape.prototype.stop = function stop() { | |
| 3538 | - if (this._progressPath === null) { | |
| 3539 | - throw new Error(DESTROYED_ERROR); | |
| 3540 | - } | |
| 3541 | - | |
| 3542 | - // Don't crash if stop is called inside step function | |
| 3543 | - if (this._progressPath === undefined) { | |
| 3544 | - return; | |
| 3545 | - } | |
| 3546 | - | |
| 3547 | - this._progressPath.stop(); | |
| 3548 | - }; | |
| 3549 | - | |
| 3550 | - Shape.prototype.pause = function pause() { | |
| 3551 | - if (this._progressPath === null) { | |
| 3552 | - throw new Error(DESTROYED_ERROR); | |
| 3553 | - } | |
| 3554 | - | |
| 3555 | - if (this._progressPath === undefined) { | |
| 3556 | - return; | |
| 3557 | - } | |
| 3558 | - | |
| 3559 | - if (!this._progressPath._tweenable) { | |
| 3560 | - // It seems that we can't pause this | |
| 3561 | - return; | |
| 3562 | - } | |
| 3563 | - | |
| 3564 | - this._progressPath._tweenable.pause(); | |
| 3565 | - }; | |
| 3566 | - | |
| 3567 | - Shape.prototype.resume = function resume() { | |
| 3568 | - if (this._progressPath === null) { | |
| 3569 | - throw new Error(DESTROYED_ERROR); | |
| 3570 | - } | |
| 3571 | - | |
| 3572 | - if (this._progressPath === undefined) { | |
| 3573 | - return; | |
| 3574 | - } | |
| 3575 | - | |
| 3576 | - if (!this._progressPath._tweenable) { | |
| 3577 | - // It seems that we can't resume this | |
| 3578 | - return; | |
| 3579 | - } | |
| 3580 | - | |
| 3581 | - this._progressPath._tweenable.resume(); | |
| 3582 | - }; | |
| 3583 | - | |
| 3584 | - Shape.prototype.destroy = function destroy() { | |
| 3585 | - if (this._progressPath === null) { | |
| 3586 | - throw new Error(DESTROYED_ERROR); | |
| 3587 | - } | |
| 3588 | - | |
| 3589 | - this.stop(); | |
| 3590 | - this.svg.parentNode.removeChild(this.svg); | |
| 3591 | - this.svg = null; | |
| 3592 | - this.path = null; | |
| 3593 | - this.trail = null; | |
| 3594 | - this._progressPath = null; | |
| 3595 | - | |
| 3596 | - if (this.text !== null) { | |
| 3597 | - this.text.parentNode.removeChild(this.text); | |
| 3598 | - this.text = null; | |
| 3599 | - } | |
| 3600 | - }; | |
| 3601 | - | |
| 3602 | - Shape.prototype.set = function set(progress) { | |
| 3603 | - if (this._progressPath === null) { | |
| 3604 | - throw new Error(DESTROYED_ERROR); | |
| 3605 | - } | |
| 3606 | - | |
| 3607 | - this._progressPath.set(progress); | |
| 3608 | - }; | |
| 3609 | - | |
| 3610 | - Shape.prototype.value = function value() { | |
| 3611 | - if (this._progressPath === null) { | |
| 3612 | - throw new Error(DESTROYED_ERROR); | |
| 3613 | - } | |
| 3614 | - | |
| 3615 | - if (this._progressPath === undefined) { | |
| 3616 | - return 0; | |
| 3617 | - } | |
| 3618 | - | |
| 3619 | - return this._progressPath.value(); | |
| 3620 | - }; | |
| 3621 | - | |
| 3622 | - Shape.prototype.setText = function setText(newText) { | |
| 3623 | - if (this._progressPath === null) { | |
| 3624 | - throw new Error(DESTROYED_ERROR); | |
| 3625 | - } | |
| 3626 | - | |
| 3627 | - if (this.text === null) { | |
| 3628 | - // Create new text node | |
| 3629 | - this.text = this._createTextContainer(this._opts, this._container); | |
| 3630 | - this._container.appendChild(this.text); | |
| 3631 | - } | |
| 3632 | - | |
| 3633 | - // Remove previous text and add new | |
| 3634 | - if (utils.isObject(newText)) { | |
| 3635 | - utils.removeChildren(this.text); | |
| 3636 | - this.text.appendChild(newText); | |
| 3637 | - } else { | |
| 3638 | - this.text.innerHTML = newText; | |
| 3639 | - } | |
| 3640 | - }; | |
| 3641 | - | |
| 3642 | - Shape.prototype._createSvgView = function _createSvgView(opts) { | |
| 3643 | - var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); | |
| 3644 | - this._initializeSvg(svg, opts); | |
| 3645 | - | |
| 3646 | - var trailPath = null; | |
| 3647 | - // Each option listed in the if condition are 'triggers' for creating | |
| 3648 | - // the trail path | |
| 3649 | - if (opts.trailColor || opts.trailWidth) { | |
| 3650 | - trailPath = this._createTrail(opts); | |
| 3651 | - svg.appendChild(trailPath); | |
| 3652 | - } | |
| 3653 | - | |
| 3654 | - var path = this._createPath(opts); | |
| 3655 | - svg.appendChild(path); | |
| 3656 | - | |
| 3657 | - return { | |
| 3658 | - svg: svg, | |
| 3659 | - path: path, | |
| 3660 | - trail: trailPath | |
| 3661 | - }; | |
| 3662 | - }; | |
| 3663 | - | |
| 3664 | - Shape.prototype._initializeSvg = function _initializeSvg(svg, opts) { | |
| 3665 | - svg.setAttribute('viewBox', '0 0 100 100'); | |
| 3666 | - }; | |
| 3667 | - | |
| 3668 | - Shape.prototype._createPath = function _createPath(opts) { | |
| 3669 | - var pathString = this._pathString(opts); | |
| 3670 | - return this._createPathElement(pathString, opts); | |
| 3671 | - }; | |
| 3672 | - | |
| 3673 | - Shape.prototype._createTrail = function _createTrail(opts) { | |
| 3674 | - // Create path string with original passed options | |
| 3675 | - var pathString = this._trailString(opts); | |
| 3676 | - | |
| 3677 | - // Prevent modifying original | |
| 3678 | - var newOpts = utils.extend({}, opts); | |
| 3679 | - | |
| 3680 | - // Defaults for parameters which modify trail path | |
| 3681 | - if (!newOpts.trailColor) { | |
| 3682 | - newOpts.trailColor = '#eee'; | |
| 3683 | - } | |
| 3684 | - if (!newOpts.trailWidth) { | |
| 3685 | - newOpts.trailWidth = newOpts.strokeWidth; | |
| 3686 | - } | |
| 3687 | - | |
| 3688 | - newOpts.color = newOpts.trailColor; | |
| 3689 | - newOpts.strokeWidth = newOpts.trailWidth; | |
| 3690 | - | |
| 3691 | - // When trail path is set, fill must be set for it instead of the | |
| 3692 | - // actual path to prevent trail stroke from clipping | |
| 3693 | - newOpts.fill = null; | |
| 3694 | - | |
| 3695 | - return this._createPathElement(pathString, newOpts); | |
| 3696 | - }; | |
| 3697 | - | |
| 3698 | - Shape.prototype._createPathElement = function _createPathElement(pathString, opts) { | |
| 3699 | - var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); | |
| 3700 | - path.setAttribute('d', pathString); | |
| 3701 | - path.setAttribute('stroke', opts.color); | |
| 3702 | - path.setAttribute('stroke-width', opts.strokeWidth); | |
| 3703 | - | |
| 3704 | - if (opts.fill) { | |
| 3705 | - path.setAttribute('fill', opts.fill); | |
| 3706 | - } else { | |
| 3707 | - path.setAttribute('fill-opacity', '0'); | |
| 3708 | - } | |
| 3709 | - | |
| 3710 | - return path; | |
| 3711 | - }; | |
| 3712 | - | |
| 3713 | - Shape.prototype._createTextContainer = function _createTextContainer(opts, container) { | |
| 3714 | - var textContainer = document.createElement('div'); | |
| 3715 | - textContainer.className = opts.text.className; | |
| 3716 | - | |
| 3717 | - var textStyle = opts.text.style; | |
| 3718 | - if (textStyle) { | |
| 3719 | - if (opts.text.autoStyleContainer) { | |
| 3720 | - container.style.position = 'relative'; | |
| 3721 | - } | |
| 3722 | - | |
| 3723 | - utils.setStyles(textContainer, textStyle); | |
| 3724 | - // Default text color to progress bar's color | |
| 3725 | - if (!textStyle.color) { | |
| 3726 | - textContainer.style.color = opts.color; | |
| 3727 | - } | |
| 3728 | - } | |
| 3729 | - | |
| 3730 | - this._initializeTextContainer(opts, container, textContainer); | |
| 3731 | - return textContainer; | |
| 3732 | - }; | |
| 3733 | - | |
| 3734 | - // Give custom shapes possibility to modify text element | |
| 3735 | - Shape.prototype._initializeTextContainer = function(opts, container, element) { | |
| 3736 | - // By default, no-op | |
| 3737 | - // Custom shapes should respect API options, such as text.style | |
| 3738 | - }; | |
| 3739 | - | |
| 3740 | - Shape.prototype._pathString = function _pathString(opts) { | |
| 3741 | - throw new Error('Override this function for each progress bar'); | |
| 3742 | - }; | |
| 3743 | - | |
| 3744 | - Shape.prototype._trailString = function _trailString(opts) { | |
| 3745 | - throw new Error('Override this function for each progress bar'); | |
| 3746 | - }; | |
| 3747 | - | |
| 3748 | - Shape.prototype._warnContainerAspectRatio = function _warnContainerAspectRatio(container) { | |
| 3749 | - if (!this.containerAspectRatio) { | |
| 3750 | - return; | |
| 3751 | - } | |
| 3752 | - | |
| 3753 | - var computedStyle = window.getComputedStyle(container, null); | |
| 3754 | - var width = parseFloat(computedStyle.getPropertyValue('width'), 10); | |
| 3755 | - var height = parseFloat(computedStyle.getPropertyValue('height'), 10); | |
| 3756 | - if (!utils.floatEquals(this.containerAspectRatio, width / height)) { | |
| 3757 | - console.warn( | |
| 3758 | - 'Incorrect aspect ratio of container', | |
| 3759 | - '#' + container.id, | |
| 3760 | - 'detected:', | |
| 3761 | - computedStyle.getPropertyValue('width') + '(width)', | |
| 3762 | - '/', | |
| 3763 | - computedStyle.getPropertyValue('height') + '(height)', | |
| 3764 | - '=', | |
| 3765 | - width / height | |
| 3766 | - ); | |
| 3767 | - | |
| 3768 | - console.warn( | |
| 3769 | - 'Aspect ratio of should be', | |
| 3770 | - this.containerAspectRatio | |
| 3771 | - ); | |
| 3772 | - } | |
| 3773 | - }; | |
| 3774 | - | |
| 3775 | - module.exports = Shape; | |
| 3776 | - | |
| 3777 | - },{"./path":5,"./utils":9}],8:[function(require,module,exports){ | |
| 3778 | - // Square shaped progress bar | |
| 3779 | - // Note: Square is not core part of API anymore. It's left here | |
| 3780 | - // for reference. square is not included to the progressbar | |
| 3781 | - // build anymore | |
| 3782 | - | |
| 3783 | - var Shape = require('./shape'); | |
| 3784 | - var utils = require('./utils'); | |
| 3785 | - | |
| 3786 | - var Square = function Square(container, options) { | |
| 3787 | - this._pathTemplate = | |
| 3788 | - 'M 0,{halfOfStrokeWidth}' + | |
| 3789 | - ' L {width},{halfOfStrokeWidth}' + | |
| 3790 | - ' L {width},{width}' + | |
| 3791 | - ' L {halfOfStrokeWidth},{width}' + | |
| 3792 | - ' L {halfOfStrokeWidth},{strokeWidth}'; | |
| 3793 | - | |
| 3794 | - this._trailTemplate = | |
| 3795 | - 'M {startMargin},{halfOfStrokeWidth}' + | |
| 3796 | - ' L {width},{halfOfStrokeWidth}' + | |
| 3797 | - ' L {width},{width}' + | |
| 3798 | - ' L {halfOfStrokeWidth},{width}' + | |
| 3799 | - ' L {halfOfStrokeWidth},{halfOfStrokeWidth}'; | |
| 3800 | - | |
| 3801 | - Shape.apply(this, arguments); | |
| 3802 | - }; | |
| 3803 | - | |
| 3804 | - Square.prototype = new Shape(); | |
| 3805 | - Square.prototype.constructor = Square; | |
| 3806 | - | |
| 3807 | - Square.prototype._pathString = function _pathString(opts) { | |
| 3808 | - var w = 100 - opts.strokeWidth / 2; | |
| 3809 | - | |
| 3810 | - return utils.render(this._pathTemplate, { | |
| 3811 | - width: w, | |
| 3812 | - strokeWidth: opts.strokeWidth, | |
| 3813 | - halfOfStrokeWidth: opts.strokeWidth / 2 | |
| 3814 | - }); | |
| 3815 | - }; | |
| 3816 | - | |
| 3817 | - Square.prototype._trailString = function _trailString(opts) { | |
| 3818 | - var w = 100 - opts.strokeWidth / 2; | |
| 3819 | - | |
| 3820 | - return utils.render(this._trailTemplate, { | |
| 3821 | - width: w, | |
| 3822 | - strokeWidth: opts.strokeWidth, | |
| 3823 | - halfOfStrokeWidth: opts.strokeWidth / 2, | |
| 3824 | - startMargin: opts.strokeWidth / 2 - opts.trailWidth / 2 | |
| 3825 | - }); | |
| 3826 | - }; | |
| 3827 | - | |
| 3828 | - module.exports = Square; | |
| 3829 | - | |
| 3830 | - },{"./shape":7,"./utils":9}],9:[function(require,module,exports){ | |
| 3831 | - // Utility functions | |
| 3832 | - | |
| 3833 | - var PREFIXES = 'Webkit Moz O ms'.split(' '); | |
| 3834 | - var FLOAT_COMPARISON_EPSILON = 0.001; | |
| 3835 | - | |
| 3836 | - // Copy all attributes from source object to destination object. | |
| 3837 | - // destination object is mutated. | |
| 3838 | - function extend(destination, source, recursive) { | |
| 3839 | - destination = destination || {}; | |
| 3840 | - source = source || {}; | |
| 3841 | - recursive = recursive || false; | |
| 3842 | - | |
| 3843 | - for (var attrName in source) { | |
| 3844 | - if (source.hasOwnProperty(attrName)) { | |
| 3845 | - var destVal = destination[attrName]; | |
| 3846 | - var sourceVal = source[attrName]; | |
| 3847 | - if (recursive && isObject(destVal) && isObject(sourceVal)) { | |
| 3848 | - destination[attrName] = extend(destVal, sourceVal, recursive); | |
| 3849 | - } else { | |
| 3850 | - destination[attrName] = sourceVal; | |
| 3851 | - } | |
| 3852 | - } | |
| 3853 | - } | |
| 3854 | - | |
| 3855 | - return destination; | |
| 3856 | - } | |
| 3857 | - | |
| 3858 | - // Renders templates with given variables. Variables must be surrounded with | |
| 3859 | - // braces without any spaces, e.g. {variable} | |
| 3860 | - // All instances of variable placeholders will be replaced with given content | |
| 3861 | - // Example: | |
| 3862 | - // render('Hello, {message}!', {message: 'world'}) | |
| 3863 | - function render(template, vars) { | |
| 3864 | - var rendered = template; | |
| 3865 | - | |
| 3866 | - for (var key in vars) { | |
| 3867 | - if (vars.hasOwnProperty(key)) { | |
| 3868 | - var val = vars[key]; | |
| 3869 | - var regExpString = '\\{' + key + '\\}'; | |
| 3870 | - var regExp = new RegExp(regExpString, 'g'); | |
| 3871 | - | |
| 3872 | - rendered = rendered.replace(regExp, val); | |
| 3873 | - } | |
| 3874 | - } | |
| 3875 | - | |
| 3876 | - return rendered; | |
| 3877 | - } | |
| 3878 | - | |
| 3879 | - function setStyle(element, style, value) { | |
| 3880 | - var elStyle = element.style; // cache for performance | |
| 3881 | - | |
| 3882 | - for (var i = 0; i < PREFIXES.length; ++i) { | |
| 3883 | - var prefix = PREFIXES[i]; | |
| 3884 | - elStyle[prefix + capitalize(style)] = value; | |
| 3885 | - } | |
| 3886 | - | |
| 3887 | - elStyle[style] = value; | |
| 3888 | - } | |
| 3889 | - | |
| 3890 | - function setStyles(element, styles) { | |
| 3891 | - forEachObject(styles, function(styleValue, styleName) { | |
| 3892 | - // Allow disabling some individual styles by setting them | |
| 3893 | - // to null or undefined | |
| 3894 | - if (styleValue === null || styleValue === undefined) { | |
| 3895 | - return; | |
| 3896 | - } | |
| 3897 | - | |
| 3898 | - // If style's value is {prefix: true, value: '50%'}, | |
| 3899 | - // Set also browser prefixed styles | |
| 3900 | - if (isObject(styleValue) && styleValue.prefix === true) { | |
| 3901 | - setStyle(element, styleName, styleValue.value); | |
| 3902 | - } else { | |
| 3903 | - element.style[styleName] = styleValue; | |
| 3904 | - } | |
| 3905 | - }); | |
| 3906 | - } | |
| 3907 | - | |
| 3908 | - function capitalize(text) { | |
| 3909 | - return text.charAt(0).toUpperCase() + text.slice(1); | |
| 3910 | - } | |
| 3911 | - | |
| 3912 | - function isString(obj) { | |
| 3913 | - return typeof obj === 'string' || obj instanceof String; | |
| 3914 | - } | |
| 3915 | - | |
| 3916 | - function isFunction(obj) { | |
| 3917 | - return typeof obj === 'function'; | |
| 3918 | - } | |
| 3919 | - | |
| 3920 | - function isArray(obj) { | |
| 3921 | - return Object.prototype.toString.call(obj) === '[object Array]'; | |
| 3922 | - } | |
| 3923 | - | |
| 3924 | - // Returns true if `obj` is object as in {a: 1, b: 2}, not if it's function or | |
| 3925 | - // array | |
| 3926 | - function isObject(obj) { | |
| 3927 | - if (isArray(obj)) { | |
| 3928 | - return false; | |
| 3929 | - } | |
| 3930 | - | |
| 3931 | - var type = typeof obj; | |
| 3932 | - return type === 'object' && !!obj; | |
| 3933 | - } | |
| 3934 | - | |
| 3935 | - function forEachObject(object, callback) { | |
| 3936 | - for (var key in object) { | |
| 3937 | - if (object.hasOwnProperty(key)) { | |
| 3938 | - var val = object[key]; | |
| 3939 | - callback(val, key); | |
| 3940 | - } | |
| 3941 | - } | |
| 3942 | - } | |
| 3943 | - | |
| 3944 | - function floatEquals(a, b) { | |
| 3945 | - return Math.abs(a - b) < FLOAT_COMPARISON_EPSILON; | |
| 3946 | - } | |
| 3947 | - | |
| 3948 | - // https://coderwall.com/p/nygghw/don-t-use-innerhtml-to-empty-dom-elements | |
| 3949 | - function removeChildren(el) { | |
| 3950 | - while (el.firstChild) { | |
| 3951 | - el.removeChild(el.firstChild); | |
| 3952 | - } | |
| 3953 | - } | |
| 3954 | - | |
| 3955 | - module.exports = { | |
| 3956 | - extend: extend, | |
| 3957 | - render: render, | |
| 3958 | - setStyle: setStyle, | |
| 3959 | - setStyles: setStyles, | |
| 3960 | - capitalize: capitalize, | |
| 3961 | - isString: isString, | |
| 3962 | - isFunction: isFunction, | |
| 3963 | - isObject: isObject, | |
| 3964 | - forEachObject: forEachObject, | |
| 3965 | - floatEquals: floatEquals, | |
| 3966 | - removeChildren: removeChildren | |
| 3967 | - }; | |
| 3968 | - | |
| 3969 | - },{}]},{},[4])(4) | |
| 3970 | - }); | |
| 3971 | - | |
| 3972 | -jQuery(function ($) { | |
| 3973 | - 'use strict'; | |
| 3974 | - | |
| 3975 | - /*-----------------------------------------------------------------------------------*/ | |
| 3976 | -/* *. WPBakery | |
| 3977 | -/*-----------------------------------------------------------------------------------*/ | |
| 3978 | - | |
| 3979 | - | |
| 3980 | - /* ================================================== | |
| 3981 | - WPBakery - Counter | |
| 3982 | - ================================================== */ | |
| 3983 | - | |
| 3984 | - $(document).ready(function () { | |
| 3985 | - const counter = $('.borderless-wpbakery-counter'); | |
| 3986 | - $(counter).each(function () { | |
| 3987 | - $(this).appear(function () { | |
| 3988 | - const value = $(this).find('div.borderless-wpbakery-counter-paramns').attr('value'); | |
| 3989 | - const speed = $(this).find('div.borderless-wpbakery-counter-paramns').attr('value-speed'); | |
| 3990 | - const interval = $(this).find('div.borderless-wpbakery-counter-paramns').attr('value-interval'); | |
| 3991 | - $(this).find('.borderless-wpbakery-counter-paramns').countTo({ | |
| 3992 | - from: 0, | |
| 3993 | - to: value, | |
| 3994 | - speed: speed, | |
| 3995 | - refreshInterval: interval, | |
| 3996 | - onComplete: function () {} | |
| 3997 | - }); | |
| 3998 | - }); | |
| 3999 | - }); | |
| 4000 | - }); | |
| 4001 | - /* ================================================== | |
| 4002 | - WPBakery - Testimonial | |
| 4003 | - ================================================== */ | |
| 4004 | - | |
| 4005 | - $(document).ready(function () { | |
| 4006 | - if ($('.borderless-wpbakery-testimonial').length > 0) { | |
| 4007 | - const elem = document.querySelector('.main-carousel'); | |
| 4008 | - var flkty = new Flickity(elem, { | |
| 4009 | - // options | |
| 4010 | - prevNextButtons: false, | |
| 4011 | - wrapAround: true, | |
| 4012 | - autoPlay: true, | |
| 4013 | - contain: true | |
| 4014 | - }); // element argument can be a selector string | |
| 4015 | - // for an individual element | |
| 4016 | - | |
| 4017 | - var flkty = new Flickity('.main-carousel', {// options | |
| 4018 | - }); | |
| 4019 | - } | |
| 4020 | - }); | |
| 4021 | - /* ================================================== | |
| 4022 | - WPBakery - Progress Bar | |
| 4023 | - ================================================== */ | |
| 4024 | - | |
| 4025 | - $(document).ready(function () { | |
| 4026 | - $('.borderless-wpbakery-progress-bar-params').each(function () { | |
| 4027 | - $(this).appear(function () { | |
| 4028 | - const percentage_color = $(this).attr('percentage_color'); | |
| 4029 | - const bar_color = $(this).attr('bar_color'); | |
| 4030 | - const track_color = $(this).attr('track_color'); | |
| 4031 | - const percentage = $(this).attr('percentage') / 100; | |
| 4032 | - const bar = new ProgressBar.Line(this, { | |
| 4033 | - strokeWidth: 4, | |
| 4034 | - easing: 'easeInOut', | |
| 4035 | - duration: 1400, | |
| 4036 | - color: bar_color, | |
| 4037 | - trailColor: track_color, | |
| 4038 | - trailWidth: 8, | |
| 4039 | - svgStyle: { | |
| 4040 | - width: '100%', | |
| 4041 | - height: '100%' | |
| 4042 | - }, | |
| 4043 | - text: { | |
| 4044 | - style: { | |
| 4045 | - // Text color. | |
| 4046 | - // Default: same as stroke color (options.color) | |
| 4047 | - color: percentage_color, | |
| 4048 | - position: 'absolute', | |
| 4049 | - right: '0', | |
| 4050 | - top: '-31px', | |
| 4051 | - padding: 0, | |
| 4052 | - margin: 0, | |
| 4053 | - transform: null | |
| 4054 | - }, | |
| 4055 | - autoStyleContainer: true | |
| 4056 | - }, | |
| 4057 | - from: { | |
| 4058 | - color: '#FFEA82' | |
| 4059 | - }, | |
| 4060 | - to: { | |
| 4061 | - color: '#ED6A5A' | |
| 4062 | - }, | |
| 4063 | - step: (state, bar) => { | |
| 4064 | - bar.setText(Math.round(bar.value() * 100) + ' %'); | |
| 4065 | - } | |
| 4066 | - }); | |
| 4067 | - bar.animate(percentage); // Number from 0.0 to 1.0 | |
| 4068 | - }); | |
| 4069 | - }); | |
| 4070 | - }); | |
| 4071 | - /* ================================================== | |
| 4072 | - WPBakery - Circular Progress Bar | |
| 4073 | - ================================================== */ | |
| 4074 | - | |
| 4075 | - $(document).ready(function () { | |
| 4076 | - $('.borderless-wpbakery-circular-progress-bar-params').each(function () { | |
| 4077 | - $(this).appear(function () { | |
| 4078 | - // Custom Colors | |
| 4079 | - const percentage_color = $(this).attr('percentage_color'); | |
| 4080 | - const bar_color = $(this).attr('bar_color'); | |
| 4081 | - const track_color = $(this).attr('track_color'); // Thickness | |
| 4082 | - | |
| 4083 | - const bar_thickness = $(this).attr('bar_thickness'); | |
| 4084 | - const track_thickness = $(this).attr('track_thickness'); // Percentage Value | |
| 4085 | - | |
| 4086 | - const percentage = $(this).attr('percentage') / 100; | |
| 4087 | - const bar = new ProgressBar.Circle(this, { | |
| 4088 | - strokeWidth: bar_thickness, | |
| 4089 | - easing: 'easeInOut', | |
| 4090 | - duration: 1400, | |
| 4091 | - color: bar_color, | |
| 4092 | - trailColor: track_color, | |
| 4093 | - trailWidth: track_thickness, | |
| 4094 | - svgStyle: null, | |
| 4095 | - text: { | |
| 4096 | - style: { | |
| 4097 | - // Text color. | |
| 4098 | - // Default: same as stroke color (options.color) | |
| 4099 | - color: percentage_color, | |
| 4100 | - position: 'absolute', | |
| 4101 | - right: '0', | |
| 4102 | - top: '0px', | |
| 4103 | - padding: 0, | |
| 4104 | - margin: 0, | |
| 4105 | - transform: null | |
| 4106 | - }, | |
| 4107 | - autoStyleContainer: true | |
| 4108 | - }, | |
| 4109 | - from: { | |
| 4110 | - color: '#FFEA82' | |
| 4111 | - }, | |
| 4112 | - to: { | |
| 4113 | - color: '#ED6A5A' | |
| 4114 | - }, | |
| 4115 | - step: (state, bar) => { | |
| 4116 | - bar.setText(Math.round(bar.value() * 100)); | |
| 4117 | - } | |
| 4118 | - }); | |
| 4119 | - bar.animate(percentage); // Number from 0.0 to 1.0 | |
| 4120 | - }); | |
| 4121 | - }); | |
| 4122 | - }); | |
| 4123 | - /* ================================================== | |
| 4124 | - WPBakery - Semi Circular Progress Bar | |
| 4125 | - ================================================== */ | |
| 4126 | - | |
| 4127 | - $(document).ready(function () { | |
| 4128 | - $('.borderless-wpbakery-semi-circular-progress-bar-params').each(function () { | |
| 4129 | - $(this).appear(function () { | |
| 4130 | - // Custom Colors | |
| 4131 | - const percentage_color = $(this).attr('percentage_color'); | |
| 4132 | - const bar_color = $(this).attr('bar_color'); | |
| 4133 | - const track_color = $(this).attr('track_color'); // Thickness | |
| 4134 | - | |
| 4135 | - const bar_thickness = $(this).attr('bar_thickness'); | |
| 4136 | - const track_thickness = $(this).attr('track_thickness'); // Percentage Value | |
| 4137 | - | |
| 4138 | - const percentage = $(this).attr('percentage') / 100; | |
| 4139 | - const bar = new ProgressBar.SemiCircle(this, { | |
| 4140 | - strokeWidth: bar_thickness, | |
| 4141 | - easing: 'easeInOut', | |
| 4142 | - duration: 1400, | |
| 4143 | - color: bar_color, | |
| 4144 | - trailColor: track_color, | |
| 4145 | - trailWidth: track_thickness, | |
| 4146 | - svgStyle: null, | |
| 4147 | - text: { | |
| 4148 | - style: { | |
| 4149 | - // Text color. | |
| 4150 | - // Default: same as stroke color (options.color) | |
| 4151 | - color: percentage_color, | |
| 4152 | - position: 'absolute', | |
| 4153 | - right: '0', | |
| 4154 | - top: '0px', | |
| 4155 | - padding: 0, | |
| 4156 | - margin: 0, | |
| 4157 | - transform: null | |
| 4158 | - }, | |
| 4159 | - autoStyleContainer: true | |
| 4160 | - }, | |
| 4161 | - from: { | |
| 4162 | - color: '#FFEA82' | |
| 4163 | - }, | |
| 4164 | - to: { | |
| 4165 | - color: '#ED6A5A' | |
| 4166 | - }, | |
| 4167 | - step: (state, bar) => { | |
| 4168 | - bar.setText(Math.round(bar.value() * 100)); | |
| 4169 | - } | |
| 4170 | - }); | |
| 4171 | - bar.animate(percentage); // Number from 0.0 to 1.0 | |
| 4172 | - }); | |
| 4173 | - }); | |
| 4174 | - }); | |
| 4175 | - /* ================================================== | |
| 4176 | - WPBakery - Modal | |
| 4177 | - ================================================== */ | |
| 4178 | - | |
| 4179 | - $(document).ready(function () { | |
| 4180 | - const modalBtns = [...document.querySelectorAll('.borderless-wpbakery-modal-button, .borderless-wpbakery-modal-icon, .borderless-wpbakery-modal-text')]; | |
| 4181 | - modalBtns.forEach(function (btn) { | |
| 4182 | - btn.onclick = function () { | |
| 4183 | - const modal = btn.getAttribute('data-modal'); | |
| 4184 | - document.getElementById(modal).style.visibility = 'visible'; | |
| 4185 | - document.getElementById(modal).style.opacity = '1'; | |
| 4186 | - document.getElementById(modal).style.transition = 'all 0.25s'; | |
| 4187 | - }; | |
| 4188 | - }); | |
| 4189 | - const closeBtns = [...document.querySelectorAll('.borderless-wpbakery-modal-close')]; | |
| 4190 | - closeBtns.forEach(function (btn) { | |
| 4191 | - btn.onclick = function () { | |
| 4192 | - const modal = btn.closest('.borderless-wpbakery-modal'); | |
| 4193 | - modal.style.visibility = 'hidden'; | |
| 4194 | - modal.style.opacity = '0'; | |
| 4195 | - }; | |
| 4196 | - }); | |
| 4197 | - | |
| 4198 | - window.onclick = function (event) { | |
| 4199 | - if (event.target.className === 'borderless-wpbakery-modal') { | |
| 4200 | - event.target.style.visibility = 'hidden'; | |
| 4201 | - event.target.style.opacity = '0'; | |
| 4202 | - } | |
| 4203 | - }; | |
| 4204 | - }); | |
| 4205 | - | |
| 4206 | - | |
| 4207 | - /*-----------------------------------------------------------------------------------*/ | |
| 4208 | -/* *. Elementor | |
| 4209 | -/*-----------------------------------------------------------------------------------*/ | |
| 4210 | - | |
| 4211 | - | |
| 4212 | - /* ================================================== | |
| 4213 | - Elementor - Circular Progress Bar | |
| 4214 | - ================================================== */ | |
| 4215 | - | |
| 4216 | - $(document).ready(function () { | |
| 4217 | - $('.borderless-elementor-circular-progress-bar').each(function () { | |
| 4218 | - $(this).appear(function () { | |
| 4219 | - const title = $(this).attr('title'); | |
| 4220 | - const counter_color = $(this).attr('counter_color'); | |
| 4221 | - const stroke_color_mode = $(this).attr('stroke_color_mode'); | |
| 4222 | - const stroke_color = $(this).attr('stroke_color'); | |
| 4223 | - const stroke_color_from = $(this).attr('stroke_color_from'); | |
| 4224 | - const stroke_color_to = $(this).attr('stroke_color_to'); | |
| 4225 | - const trail_color = $(this).attr('trail_color'); | |
| 4226 | - const stroke_width = $(this).attr('stroke_width'); | |
| 4227 | - const trail_width = $(this).attr('trail_width'); | |
| 4228 | - const animation_duration = parseFloat($(this).attr('animation_duration')); | |
| 4229 | - const counter_value = $(this).attr('counter_value') / 100; | |
| 4230 | - const bar = new ProgressBar.Circle(this, { | |
| 4231 | - strokeWidth: stroke_width, | |
| 4232 | - easing: 'easeInOut', | |
| 4233 | - duration: animation_duration, | |
| 4234 | - color: stroke_color, | |
| 4235 | - trailColor: trail_color, | |
| 4236 | - trailWidth: trail_width, | |
| 4237 | - svgStyle: null, | |
| 4238 | - text: { | |
| 4239 | - style: { | |
| 4240 | - // Text color. | |
| 4241 | - // Default: same as stroke color (options.color) | |
| 4242 | - color: counter_color | |
| 4243 | - }, | |
| 4244 | - autoStyleContainer: true | |
| 4245 | - }, | |
| 4246 | - from: {color: stroke_color_from}, | |
| 4247 | - to: {color: stroke_color_to}, | |
| 4248 | - step: function(state, circle) { | |
| 4249 | - if (stroke_color_mode == 'gradient') { | |
| 4250 | - circle.path.setAttribute('stroke', state.color); | |
| 4251 | - } | |
| 4252 | - | |
| 4253 | - var value = '<h4 class="borderless-elementor-circular-progress-bar-title">'+title+'</h4>' + '<span class="borderless-elementor-circular-progress-bar-counter-value">' + Math.round(circle.value() * 100) + '</span>' + '<span class="borderless-elementor-circular-progress-bar-counter-postfix">%</span>'; | |
| 4254 | - if (value === 0) { | |
| 4255 | - circle.setText(''); | |
| 4256 | - } else { | |
| 4257 | - circle.setText(value); | |
| 4258 | - } | |
| 4259 | - | |
| 4260 | - } | |
| 4261 | - }); | |
| 4262 | - bar.animate(counter_value); // Number from 0.0 to 1.0 | |
| 4263 | - }); | |
| 4264 | - }); | |
| 4265 | - }); | |
| 4266 | -}); // End Strict | |