1/**! 2 * MixItUp v2.1.11 3 * 4 * @copyright Copyright 2015 KunkaLabs Limited. 5 * @author KunkaLabs Limited. 6 * @link https://mixitup.kunkalabs.com 7 * 8 * @license Commercial use requires a commercial license. 9 * https://mixitup.kunkalabs.com/licenses/ 10 * 11 * Non-commercial use permitted under terms of CC-BY-NC license. 12 * http://creativecommons.org/licenses/by-nc/3.0/ 13 */ 14! function(a, b) { 15 "use strict"; 16 a.MixItUp = function() { 17 var b = this; 18 b._execAction("_constructor", 0), a.extend(b, { 19 selectors: { 20 target: ".mix", 21 filter: ".filter", 22 sort: ".sort" 23 }, 24 animation: { 25 enable: !0, 26 effects: "fade scale", 27 duration: 600, 28 easing: "ease", 29 perspectiveDistance: "3000", 30 perspectiveOrigin: "50% 50%", 31 queue: !0, 32 queueLimit: 1, 33 animateChangeLayout: !1, 34 animateResizeContainer: !0, 35 animateResizeTargets: !1, 36 staggerSequence: !1, 37 reverseOut: !1 38 }, 39 callbacks: { 40 onMixLoad: !1, 41 onMixStart: !1, 42 onMixBusy: !1, 43 onMixEnd: !1, 44 onMixFail: !1, 45 _user: !1 46 }, 47 controls: { 48 enable: !0, 49 live: !1, 50 toggleFilterButtons: !1, 51 toggleLogic: "or", 52 activeClass: "active" 53 }, 54 layout: { 55 display: "inline-block", 56 containerClass: "", 57 containerClassFail: "fail" 58 }, 59 load: { 60 filter: "all", 61 sort: !1 62 }, 63 _$body: null, 64 _$container: null, 65 _$targets: null, 66 _$parent: null, 67 _$sortButtons: null, 68 _$filterButtons: null, 69 _suckMode: !1, 70 _mixing: !1, 71 _sorting: !1, 72 _clicking: !1, 73 _loading: !0, 74 _changingLayout: !1, 75 _changingClass: !1, 76 _changingDisplay: !1, 77 _origOrder: [], 78 _startOrder: [], 79 _newOrder: [], 80 _activeFilter: null, 81 _toggleArray: [], 82 _toggleString: "", 83 _activeSort: "default:asc", 84 _newSort: null, 85 _startHeight: null, 86 _newHeight: null, 87 _incPadding: !0, 88 _newDisplay: null, 89 _newClass: null, 90 _targetsBound: 0, 91 _targetsDone: 0, 92 _queue: [], 93 _$show: a(), 94 _$hide: a() 95 }), b._execAction("_constructor", 1) 96 }, a.MixItUp.prototype = { 97 constructor: a.MixItUp, 98 _instances: {}, 99 _handled: { 100 _filter: {}, 101 _sort: {} 102 }, 103 _bound: { 104 _filter: {}, 105 _sort: {} 106 }, 107 _actions: {}, 108 _filters: {}, 109 extend: function(b) { 110 for (var c in b) a.MixItUp.prototype[c] = b[c] 111 }, 112 addAction: function(b, c, d, e) { 113 a.MixItUp.prototype._addHook("_actions", b, c, d, e) 114 }, 115 addFilter: function(b, c, d, e) { 116 a.MixItUp.prototype._addHook("_filters", b, c, d, e) 117 }, 118 _addHook: function(b, c, d, e, f) { 119 var g = a.MixItUp.prototype[b], 120 h = {}; 121 f = 1 === f || "post" === f ? "post" : "pre", h[c] = {}, h[c][f] = {}, h[c][f][d] = e, a.extend(!0, g, h) 122 }, 123 _init: function(b, c) { 124 var d = this; 125 if (d._execAction("_init", 0, arguments), c && a.extend(!0, d, c), d._$body = a("body"), d._domNode = b, d._$container = a(b), d._$container.addClass(d.layout.containerClass), d._id = b.id, d._platformDetect(), d._brake = d._getPrefixedCSS("transition", "none"), d._refresh(!0), d._$parent = d._$targets.parent().length ? d._$targets.parent() : d._$container, d.load.sort && (d._newSort = d._parseSort(d.load.sort), d._newSortString = d.load.sort, d._activeSort = d.load.sort, d._sort(), d._printSort()), d._activeFilter = "all" === d.load.filter ? d.selectors.target : "none" === d.load.filter ? "" : d.load.filter, d.controls.enable && d._bindHandlers(), d.controls.toggleFilterButtons) { 126 d._buildToggleArray(); 127 for (var e = 0; e < d._toggleArray.length; e++) d._updateControls({ 128 filter: d._toggleArray[e], 129 sort: d._activeSort 130 }, !0) 131 } else d.controls.enable && d._updateControls({ 132 filter: d._activeFilter, 133 sort: d._activeSort 134 }); 135 d._filter(), d._init = !0, d._$container.data("mixItUp", d), d._execAction("_init", 1, arguments), d._buildState(), d._$targets.css(d._brake), d._goMix(d.animation.enable) 136 }, 137 _platformDetect: function() { 138 var a = this, 139 c = ["Webkit", "Moz", "O", "ms"], 140 d = ["webkit", "moz"], 141 e = window.navigator.appVersion.match(/Chrome\/(\d+)\./) || !1, 142 f = "undefined" != typeof InstallTrigger, 143 g = function(a) { 144 for (var b = 0; b < c.length; b++) 145 if (c[b] + "Transition" in a.style) return { 146 prefix: "-" + c[b].toLowerCase() + "-", 147 vendor: c[b] 148 }; 149 return "transition" in a.style ? "" : !1 150 }, 151 h = g(a._domNode);
152 a._execAction("_platformDetect", 0), a._chrome = e ? parseInt(e[1], 10) : !1, a._ff = f ? parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]) : !1, a._prefix = h.prefix, a._vendor = h.vendor, a._suckMode = window.atob && a._prefix ? !1 : !0, a._suckMode && (a.animation.enable = !1), a._ff && a._ff <= 4 && (a.animation.enable = !1); 153 for (var i = 0; i < d.length && !window.requestAnimationFrame; i++) window.requestAnimationFrame = window[d[i] + "RequestAnimationFrame"]; 154 "function" != typeof Object.getPrototypeOf && ("object" == typeof "test".__proto__ ? Object.getPrototypeOf = function(a) { 155 return a.__proto__ 156 } : Object.getPrototypeOf = function(a) { 157 return a.constructor.prototype 158 }), a._domNode.nextElementSibling === b && Object.defineProperty(Element.prototype, "nextElementSibling", { 159 get: function() { 160 for (var a = this.nextSibling; a;) { 161 if (1 === a.nodeType) return a; 162 a = a.nextSibling 163 } 164 return null 165 } 166 }), a._execAction("_platformDetect", 1) 167 }, 168 _refresh: function(a, c) { 169 var d = this; 170 d._execAction("_refresh", 0, arguments), d._$targets = d._$container.find(d.selectors.target); 171 for (var e = 0; e < d._$targets.length; e++) { 172 var f = d._$targets[e]; 173 if (f.dataset === b || c) { 174 f.dataset = {}; 175 for (var g = 0; g < f.attributes.length; g++) { 176 var h = f.attributes[g], 177 i = h.name, 178 j = h.value; 179 if (i.indexOf("data-") > -1) { 180 var k = d._helpers._camelCase(i.substring(5, i.length)); 181 f.dataset[k] = j 182 } 183 } 184 } 185 f.mixParent === b && (f.mixParent = d._id) 186 } 187 if (d._$targets.length && a || !d._origOrder.length && d._$targets.length) { 188 d._origOrder = []; 189 for (var e = 0; e < d._$targets.length; e++) { 190 var f = d._$targets[e]; 191 d._origOrder.push(f) 192 } 193 } 194 d._execAction("_refresh", 1, arguments) 195 }, 196 _bindHandlers: function() { 197 var c = this, 198 d = a.MixItUp.prototype._bound._filter, 199 e = a.MixItUp.prototype._bound._sort; 200 c._execAction("_bindHandlers", 0), c.controls.live ? c._$body.on("click.mixItUp." + c._id, c.selectors.sort, function() { 201 c._processClick(a(this), "sort") 202 }).on("click.mixItUp." + c._id, c.selectors.filter, function() { 203 c._processClick(a(this), "filter") 204 }) : (c._$sortButtons = a(c.selectors.sort), c._$filterButtons = a(c.selectors.filter), c._$sortButtons.on("click.mixItUp." + c._id, function() { 205 c._processClick(a(this), "sort") 206 }), c._$filterButtons.on("click.mixItUp." + c._id, function() { 207 c._processClick(a(this), "filter") 208 })), d[c.selectors.filter] = d[c.selectors.filter] === b ? 1 : d[c.selectors.filter] + 1, e[c.selectors.sort] = e[c.selectors.sort] === b ? 1 : e[c.selectors.sort] + 1, c._execAction("_bindHandlers", 1) 209 }, 210 _processClick: function(c, d) { 211 var e = this, 212 f = function(c, d, f) { 213 var g = a.MixItUp.prototype; 214 g._handled["_" + d][e.selectors[d]] = g._handled["_" + d][e.selectors[d]] === b ? 1 : g._handled["_" + d][e.selectors[d]] + 1, g._handled["_" + d][e.selectors[d]] === g._bound["_" + d][e.selectors[d]] && (c[(f ? "remove" : "add") + "Class"](e.controls.activeClass), delete g._handled["_" + d][e.selectors[d]]) 215 }; 216 if (e._execAction("_processClick", 0, arguments), !e._mixing || e.animation.queue && e._queue.length < e.animation.queueLimit) { 217 if (e._clicking = !0, "sort" === d) { 218 var g = c.attr("data-sort"); 219 (!c.hasClass(e.controls.activeClass) || g.indexOf("random") > -1) && (a(e.selectors.sort).removeClass(e.controls.activeClass), f(c, d), e.sort(g)) 220 } 221 if ("filter" === d) { 222 var h, i = c.attr("data-filter"), 223 j = "or" === e.controls.toggleLogic ? "," : ""; 224 e.controls.toggleFilterButtons ? (e._buildToggleArray(), c.hasClass(e.controls.activeClass) ? (f(c, d, !0), h = e._toggleArray.indexOf(i), e._toggleArray.splice(h, 1
224)) : (f(c, d), e._toggleArray.push(i)), e._toggleArray = a.grep(e._toggleArray, function(a) { 225 return a 226 }), e._toggleString = e._toggleArray.join(j), e.filter(e._toggleString)) : c.hasClass(e.controls.activeClass) || (a(e.selectors.filter).removeClass(e.controls.activeClass), f(c, d), e.filter(i)) 227 } 228 e._execAction("_processClick", 1, arguments) 229 } else "function" == typeof e.callbacks.onMixBusy && e.callbacks.onMixBusy.call(e._domNode, e._state, e), e._execAction("_processClickBusy", 1, arguments) 230 }, 231 _buildToggleArray: function() { 232 var a = this, 233 b = a._activeFilter.replace(/\s/g, ""); 234 if (a._execAction("_buildToggleArray", 0, arguments), "or" === a.controls.toggleLogic) a._toggleArray = b.split(","); 235 else { 236 a._toggleArray = b.split("."), !a._toggleArray[0] && a._toggleArray.shift(); 237 for (var c, d = 0; c = a._toggleArray[d]; d++) a._toggleArray[d] = "." + c 238 } 239 a._execAction("_buildToggleArray", 1, arguments) 240 }, 241 _updateControls: function(c, d) { 242 var e = this, 243 f = { 244 filter: c.filter, 245 sort: c.sort 246 }, 247 g = function(a, b) { 248 try { 249 d && "filter" === h && "none" !== f.filter && "" !== f.filter ? a.filter(b).addClass(e.controls.activeClass) : a.removeClass(e.controls.activeClass).filter(b).addClass(e.controls.activeClass) 250 } catch (c) {} 251 }, 252 h = "filter", 253 i = null; 254 e._execAction("_updateControls", 0, arguments), c.filter === b && (f.filter = e._activeFilter), c.sort === b && (f.sort = e._activeSort), f.filter === e.selectors.target && (f.filter = "all"); 255 for (var j = 0; 2 > j; j++) i = e.controls.live ? a(e.selectors[h]) : e["_$" + h + "Buttons"], i && g(i, "[data-" + h + '="' + f[h] + '"]'), h = "sort"; 256 e._execAction("_updateControls", 1, arguments) 257 }, 258 _filter: function() { 259 var b = this; 260 b._execAction("_filter", 0); 261 for (var c = 0; c < b._$targets.length; c++) { 262 var d = a(b._$targets[c]); 263 d.is(b._activeFilter) ? b._$show = b._$show.add(d) : b._$hide = b._$hide.add(d) 264 } 265 b._execAction("_filter", 1) 266 }, 267 _sort: function() { 268 var a = this, 269 b = function(a) { 270 for (var b = a.slice(), c = b.length, d = c; d--;) { 271 var e = parseInt(Math.random() * c), 272 f = b[d]; 273 b[d] = b[e], b[e] = f 274 } 275 return b 276 }; 277 a._execAction("_sort", 0), a._startOrder = []; 278 for (var c = 0; c < a._$targets.length; c++) { 279 var d = a._$targets[c]; 280 a._startOrder.push(d) 281 } 282 switch (a._newSort[0].sortBy) { 283 case "default": 284 a._newOrder = a._origOrder; 285 break; 286 case "random": 287 a._newOrder = b(a._startOrder); 288 break; 289 case "custom": 290 a._newOrder = a._newSort[0].order; 291 break; 292 default: 293 a._newOrder = a._startOrder.concat().sort(function(b, c) { 294 return a._compare(b, c) 295 }) 296 } 297 a._execAction("_sort", 1) 298 }, 299 _compare: function(a, b, c) { 300 c = c ? c : 0; 301 var d = this, 302 e = d._newSort[c].order, 303 f = function(a) { 304 return a.dataset[d._newSort[c].sortBy] || 0 305 }, 306 g = isNaN(1 * f(a)) ? f(a).toLowerCase() : 1 * f(a), 307 h = isNaN(1 * f(b)) ? f(b).toLowerCase() : 1 * f(b); 308 return h > g ? "asc" === e ? -1 : 1 : g > h ? "asc" === e ? 1 : -1 : g === h && d._newSort.length > c + 1 ? d._compare(a, b, c + 1) : 0 309 }, 310 _printSort: function(a) { 311 var b = this, 312 c = a ? b._startOrder : b._newOrder,
313 d = b._$parent[0].querySelectorAll(b.selectors.target), 314 e = d.length ? d[d.length - 1].nextElementSibling : null, 315 f = document.createDocumentFragment(); 316 b._execAction("_printSort", 0, arguments); 317 for (var g = 0; g < d.length; g++) { 318 var h = d[g], 319 i = h.nextSibling; 320 "absolute" !== h.style.position && (i && "#text" === i.nodeName && b._$parent[0].removeChild(i), b._$parent[0].removeChild(h)) 321 } 322 for (var g = 0; g < c.length; g++) { 323 var j = c[g]; 324 if ("default" !== b._newSort[0].sortBy || "desc" !== b._newSort[0].order || a) f.appendChild(j), f.appendChild(document.createTextNode(" ")); 325 else { 326 var k = f.firstChild; 327 f.insertBefore(j, k), f.insertBefore(document.createTextNode(" "), j) 328 } 329 } 330 e ? b._$parent[0].insertBefore(f, e) : b._$parent[0].appendChild(f), b._execAction("_printSort", 1, arguments) 331 }, 332 _parseSort: function(a) { 333 for (var b = this, c = "string" == typeof a ? a.split(" ") : [a], d = [], e = 0; e < c.length; e++) { 334 var f = "string" == typeof a ? c[e].split(":") : ["custom", c[e]], 335 g = { 336 sortBy: b._helpers._camelCase(f[0]), 337 order: f[1] || "asc" 338 }; 339 if (d.push(g), "default" === g.sortBy || "random" === g.sortBy) break 340 } 341 return b._execFilter("_parseSort", d, arguments) 342 }, 343 _parseEffects: function() { 344 var a = this, 345 b = { 346 opacity: "", 347 transformIn: "", 348 transformOut: "", 349 filter: "" 350 }, 351 c = function(b, c, d) { 352 if (a.animation.effects.indexOf(b) > -1) { 353 if (c) { 354 var e = a.animation.effects.indexOf(b + "("); 355 if (e > -1) { 356 var f = a.animation.effects.substring(e), 357 g = /\(([^)]+)\)/.exec(f), 358 h = g[1]; 359 return { 360 val: h 361 } 362 } 363 } 364 return !0 365 } 366 return !1 367 }, 368 d = function(a, b) { 369 return b ? "-" === a.charAt(0) ? a.substr(1, a.length) : "-" + a : a 370 }, 371 e = function(a, e) { 372 for (var f = [ 373 ["scale", ".01"], 374 ["translateX", "20px"], 375 ["translateY", "20px"], 376 ["translateZ", "20px"], 377 ["rotateX", "90deg"], 378 ["rotateY", "90deg"], 379 ["rotateZ", "180deg"] 380 ], g = 0; g < f.length; g++) { 381 var h = f[g][0], 382 i = f[g][1], 383 j = e && "scale" !== h; 384 b[a] += c(h) ? h + "(" + d(c(h, !0).val || i, j) + ") " : "" 385 } 386 }; 387 return b.opacity = c("fade") ? c("fade", !0).val || "0" : "1", e("transformIn"), a.animation.reverseOut ? e("transformOut", !0) : b.transformOut = b.transformIn, b.transition = {}, b.transition = a._getPrefixedCSS("transition", "all " + a.animation.duration + "ms " + a.animation.easing + ", opacity " + a.animation.duration + "ms linear"), a.animation.stagger = c("stagger") ? !0 : !1, a.animation.staggerDuration = parseInt(c("stagger") && c("stagger", !0).val ? c("stagger", !0).val : 100), a._execFilter("_parseEffects", b) 388 }, 389 _buildState: function(a) { 390 var b = this, 391 c = {}; 392 return b._execAction("_buildState", 0), c = { 393 activeFilter: "" === b._activeFilter ? "none" : b._activeFilter, 394 activeSort: a && b._newSortString ? b._newSortString : b._activeSort, 395 fail: !b._$show.length && "" !== b._activeFilter, 396 $targets: b._$targets, 397 $show: b._$show, 398 $hide: b._$hide, 399 totalTargets: b._$targets.length, 400 totalShow: b._$show.length, 401 totalHide: b._$hide.length, 402 display: a && b._newDisplay ? b._newDisplay : b.layout.display 403 }, a ? b._execFilter("_buildState", c) : (b._state = c, void b._execAction("_buildState", 1)) 404 }, 405 _goMix: function(a) { 406 var b = this, 407 c = function() { 408 b._chrome && 31 === b._chrome && f(b._$parent[0]), b._setInter(), d() 409 }, 410 d = function() { 411 var a = window.pageYOffset, 412 c = window.pageXOffset; 413 document.documentElement.scrollHeight; 414 b._getInterMixData(), b._setFinal(), b._getFinalMixData(), window.pageYOffset !== a && window.scrollTo(c, a), b._prepTargets(), window.requestAnimationFrame ? requestAnimationFrame(e) : setTimeout(function() { 415 e() 416 }, 20) 417 }, 418 e = function() { 419 b._animateTargets(), 0 === b._targetsBound && b._cleanUp() 420 }, 421 f = function(a) { 422 var b = a.parentElement, 423 c = document.createElement("div"), 424 d = document.createDocumentFragment(); 425 b.insertBefore(c, a), d.appendChild(a), b.replaceChild(a, c) 426 }, 427 g = b._buildState(!0); 428 b._execAction("_goMix", 0, arguments), !b.animation.duration && (a = !1), b._mixing = !0, b._$container.removeClass(b.layout.containerClassFail), "function" == typeof b.callbacks.onMixStart && b.callbacks.onMixStart.call(b._domNode, b._state, g, b), b._$container.trigger("mixStart", [b._state, g, b]), b._getOrigMixData(), a && !b._suckMode ? window.requestAnimationFrame ? requestAnimationFrame(c) : c() : b._cleanUp(), b._execAction("_goMix", 1, arguments) 429 }, 430 _getTargetData: function(a, b) { 431 var c, d = this; 432 a.dataset[b + "PosX"] = a.offsetLeft, a.dataset[b + "PosY"] = a.offsetTop, d.animation.animateResizeTargets && (c = d._suckMode ? { 433 marginBottom: "", 434 marginRight: "" 435 } : window.getComputedStyle(a), a.dataset[b + "MarginBottom"] = parseInt(c.marginBottom), a.dataset[b + "MarginRight"] = parseInt(c.marginRight), a.dataset[b + "Width"] = a.offsetWidth, a.dataset[b + "Height"] = a.offsetHeight) 436 }, 437 _getOrigMixData: function() { 438 var a = this, 439 b = a._suckMode ? { 440 boxSizing: "" 441 } : window.getComputedStyle(a._$parent[0]), 442 c = b.boxSizing || b[a._vendor + "BoxSizing"]; 443 a._incPadding = "border-box" === c, a._execAction("_getOrigMixData", 0), !a._suckMode && (a.effects = a._parseEffects()), a._$toHide = a._$hide.filter(":visible"), a._$toShow = a._$show.filter(":hidden"), a._$pre = a._$targets.filter(":visible"), a._startHeight = a._incPadding ? a._$parent.outerHeight() : a._$parent.height(); 444 for (var d = 0; d < a._$pre.length; d++) { 445 var e = a._$pre[d]; 446 a._getTargetData(e, "orig") 447 } 448 a._execAction("_getOrigMixData", 1) 449 }, 450 _setInter: function() { 451 var a = this; 452 a._execAction("_setInter", 0), a._changingLayout && a.animation.animateChangeLayout ? (a._$toShow.css("display", a._newDisplay), a._changingClass && a._$container.removeClass(a.layout.containerClass).addClass(a._newClass)) : a._$toShow.css("display", a.layout.display), a._execAction("_setInter", 1) 453 }, 454 _getInterMixData: function() { 455 var a = this; 456 a._execAction("_getInterMixData", 0); 457 for (var b = 0; b < a._$toShow.length; b++) { 458 var c = a._$toShow[b]; 459 a._getTargetData(c, "inter") 460 } 461 for (var b = 0; b < a._$pre.length; b++) { 462 var c = a._$pre[b]; 463 a._getTargetData(c, "inter") 464 } 465 a._execAction("_getInterMixData", 1) 466 }, 467 _setFinal: function() { 468 var a = this; 469 a._execAction("_setFinal", 0), a._sorting && a._printSort(), a._$toHide.removeStyle("display"), a._changingLayout && a.animation.animateChangeLayout && a._$pre.css("display", a._newDisplay), a._execAction("_setFinal", 1) 470 }, 471 _getFinalMixData: function() { 472 var a = this; 473 a._execAction("_getFinalMixData", 0); 474 for (var b = 0; b < a._$toShow.length; b++) { 475 var c = a._$toShow[b]; 476 a._getTargetData(c, "final") 477 } 478 for (var b = 0; b < a._$pre.length; b++) { 479 var c = a._$pre[b]; 480 a._getTargetData(c, "final") 481 } 482 a._newHeight = a._incPadding ? a._$parent.outerHeight() : a._$parent.height(), a._sorting && a._printSort(!0), a._$toShow.removeStyle("display"), a._$pre.css("display", a.layout.display), a._changingClass && a.animation.animateChangeLayout && a._$container.removeClass(a._newClass).addClass(a.layout.containerClass), a._execAction("_getFinalMixData", 1) 483 }, 484 _prepTargets: function() { 485 var b = this, 486 c = { 487 _in: b._getPrefixedCSS("transform", b.effects.transformIn), 488 _out: b._getPrefixedCSS("transform", b.effects.transformOut) 489 }; 490 b._execAction("_prepTargets", 0), b.animation.animateResizeContainer && b._$parent.css("height", b._startHeight + "px"); 491 for (var d = 0; d < b._$toShow.length; d++) { 492 var e = b._$toShow[d], 493 f = a(e); 494 e.style.opacity = b.effects.opacity, e.style.display = b._changingLayout && b.animation.animateChangeLayout ? b._newDisplay : b.layout.display, f.css(c._in), b.animation.animateResizeTargets && (e.style.width = e.dataset.f
494inalWidth + "px", e.style.height = e.dataset.finalHeight + "px", e.style.marginRight = -(e.dataset.finalWidth - e.dataset.interWidth) + 1 * e.dataset.finalMarginRight + "px", e.style.marginBottom = -(e.dataset.finalHeight - e.dataset.interHeight) + 1 * e.dataset.finalMarginBottom + "px") 495 } 496 for (var d = 0; d < b._$pre.length; d++) { 497 var e = b._$pre[d], 498 f = a(e), 499 g = { 500 x: e.dataset.origPosX - e.dataset.interPosX, 501 y: e.dataset.origPosY - e.dataset.interPosY 502 }, 503 c = b._getPrefixedCSS("transform", "translate(" + g.x + "px," + g.y + "px)"); 504 f.css(c), b.animation.animateResizeTargets && (e.style.width = e.dataset.origWidth + "px", e.style.height = e.dataset.origHeight + "px", e.dataset.origWidth - e.dataset.finalWidth && (e.style.marginRight = -(e.dataset.origWidth - e.dataset.interWidth) + 1 * e.dataset.origMarginRight + "px"), e.dataset.origHeight - e.dataset.finalHeight && (e.style.marginBottom = -(e.dataset.origHeight - e.dataset.interHeight) + 1 * e.dataset.origMarginBottom + "px")) 505 } 506 b._execAction("_prepTargets", 1) 507 }, 508 _animateTargets: function() { 509 var b = this; 510 b._execAction("_animateTargets", 0), b._targetsDone = 0, b._targetsBound = 0, b._$parent.css(b._getPrefixedCSS("perspective", b.animation.perspectiveDistance + "px")).css(b._getPrefixedCSS("perspective-origin", b.animation.perspectiveOrigin)), b.animation.animateResizeContainer && b._$parent.css(b._getPrefixedCSS("transition", "height " + b.animation.duration + "ms ease")).css("height", b._newHeight + "px"); 511 for (var c = 0; c < b._$toShow.length; c++) { 512 var d = b._$toShow[c], 513 e = a(d), 514 f = { 515 x: d.dataset.finalPosX - d.dataset.interPosX, 516 y: d.dataset.finalPosY - d.dataset.interPosY 517 }, 518 g = b._getDelay(c), 519 h = {}; 520 d.style.opacity = ""; 521 for (var i = 0; 2 > i; i++) { 522 var j = 0 === i ? j = b._prefix : ""; 523 b._ff && b._ff <= 20 && (h[j + "transition-property"] = "all", h[j + "transition-timing-function"] = b.animation.easing + "ms", h[j + "transition-duration"] = b.animation.duration + "ms"), h[j + "transition-delay"] = g + "ms", h[j + "transform"] = "translate(" + f.x + "px," + f.y + "px)" 524 }(b.effects.transform || b.effects.opacity) && b._bindTargetDone(e), b._ff && b._ff <= 20 ? e.css(h) : e.css(b.effects.transition).css(h) 525 } 526 for (var c = 0; c < b._$pre.length; c++) { 527 var d = b._$pre[c], 528 e = a(d), 529 f = { 530 x: d.dataset.finalPosX - d.dataset.interPosX, 531 y: d.dataset.finalPosY - d.dataset.interPosY 532 }, 533 g = b._getDelay(c);
534 (d.dataset.finalPosX !== d.dataset.origPosX || d.dataset.finalPosY !== d.dataset.origPosY) && b._bindTargetDone(e), e.css(b._getPrefixedCSS("transition", "all " + b.animation.duration + "ms " + b.animation.easing + " " + g + "ms")), e.css(b._getPrefixedCSS("transform", "translate(" + f.x + "px," + f.y + "px)")), b.animation.animateResizeTargets && (d.dataset.origWidth - d.dataset.finalWidth && 1 * d.dataset.finalWidth && (d.style.width = d.dataset.finalWidth + "px", d.style.marginRight = -(d.dataset.finalWidth - d.dataset.interWidth) + 1 * d.dataset.finalMarginRight + "px"), d.dataset.origHeight - d.dataset.finalHeight && 1 * d.dataset.finalHeight && (d.style.height = d.dataset.finalHeight + "px", d.style.marginBottom = -(d.dataset.finalHeight - d.dataset.interHeight) + 1 * d.dataset.finalMarginBottom + "px")) 535 } 536 b._changingClass && b._$container.removeClass(b.layout.containerClass).addClass(b._newClass); 537 for (var c = 0; c < b._$toHide.length; c++) { 538 for (var d = b._$toHide[c], e = a(d), g = b._getDelay(c), k = {}, i = 0; 2 > i; i++) { 539 var j = 0 === i ? j = b._prefix : ""; 540 k[j + "transition-delay"] = g + "ms", k[j + "transform"] = b.effects.transformOut, k.opacity = b.effects.opacity 541 } 542 e.css(b.effects.transition).css(k), (b.effects.transform || b.effects.opacity) && b._bindTargetDone(e) 543 } 544 b._execAction("_animateTargets", 1) 545 }, 546 _bindTargetDone: function(b) { 547 var c = this, 548 d = b[0]; 549 c._execAction("_bindTargetDone", 0, arguments), d.dataset.bound || (d.dataset.bound = !0, c._targetsBound++, b.on("webkitTransitionEnd.mixItUp transitionend.mixItUp", function(e) { 550 (e.originalEvent.propertyName.indexOf("transform") > -1 || e.originalEvent.propertyName.indexOf("opacity") > -1) && a(e.originalEvent.target).is(c.selectors.target) && (b.off(".mixItUp"), d.dataset.bound = "", c._targetDone()) 551 })), c._execAction("_bindTargetDone", 1, arguments) 552 }, 553 _targetDone: function() { 554 var a = this; 555 a._execAction("_targetDone", 0), a._targetsDone++, a._targetsDone === a._targetsBound && a._cleanUp(), a._execAction("_targetDone", 1) 556 }, 557 _cleanUp: function() { 558 var b = this, 559 c = b.animation.animateResizeTargets ? "transform opacity width height margin-bottom margin-right" : "transform opacity", 560 d = function() { 561 b._$targets.removeStyle("transition", b._prefix) 562 }; 563 b._execAction("_cleanUp", 0), b._changingLayout ? b._$show.css("display", b._newDisplay) : b._$show.css("display", b.layout.display), b._$targets.css(b._brake), b._$targets.removeStyle(c, b._prefix).removeAttr("data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom"), b._$hide.removeStyle("display"), b._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin", b._prefix), b._sorting && (b._printSort(), b._activeSort = b._newSortString, b._sorting = !1), b._changingLayout && (b._changingDisplay && (b.layout.display = b._newDisplay, b._changingDisplay = !1), b._changingClass && (b._$parent.removeClass(b.layout.containerClass).addClass(b._newClass), b.layout.containerClass = b._newClass, b._changingClass = !1), b._changingLayout = !1), b._refresh(), b._buildState(), b._state.fail && b._$container.addClass(b.layout.containerClassFail), b._$show = a(), b._$hide = a(), window.requestAnimationFrame && requestAnimationFrame(d), b._mixing = !1, "function" == typeof b.callbacks._user && b.callbacks._user.call(b._domNode, b._state, b), "function" == typeof b.callbacks.onMixEnd && b.callbacks.onMixEnd.call(b._domNode, b._state, b), b._$container.trigger("mixEnd", [b._state, b]), b._state.fail && ("function" == typeof b.callbacks.onMixFail && b.callbacks.onMixFail.call(b._domNode, b._state, b), b._$container.trigger("mixFail", [b._state, b])), b._loading && ("function" == typeof b.callbacks.onMixLoad && b.callbacks.onMixLoad.call(b._domNode, b._state, b), b._$container.trigger("mixLoad", [b._state, b])), b._queue.length && (b._execAction("_queue", 0), b.multiMix(b._queue[0][0], b._queue[0][1], b._queue[0][2]), b._queue.splice(0, 1)), b._execAction("_cleanUp", 1), b._loading = !1 564 }, 565 _getPrefixedCSS: function(a, b, c) { 566 var d = this, 567 e = {}, 568 f = "", 569 g = -1; 570 for (g = 0; 2 > g; g++) f = 0 === g ? d._prefix : "", c ? e[f + a] = f + b : e[f + a] = b; 571 return d._execFilter("_getPrefixedCSS", e, arguments) 572 }, 573 _getDelay: function(a) { 574 var b = this, 575 c = "function" == typeof b.animation.staggerSequence ? b.animation.staggerSequence.call(b._domNode, a, b._state) : a, 576 d = b.animation.stagger ? c * b.animation.staggerDuration : 0; 577 return b._execFilter("_getDelay", d, arguments) 578 }, 579 _parseMultiMixArgs: function(a) { 580 for (var b = this, c = { 581 command: null, 582 animate: b.animation.enable, 583 callback: null 584 }, d = 0; d < a.length; d++) { 585 var e = a[d]; 586 null !== e && ("object" == typeof e || "string" == typeof e ? c.command = e : "boolean" == typeof e ? c.animate = e : "function" == typeof e && (c.callback = e)) 587 } 588 return b._execFilter("_parseMultiMixArgs", c, arguments) 589 }, 590 _parseInsertArgs: function(b) { 591 for (var c = this, d = { 592 index: 0, 593 $object: a(), 594 multiMix: { 595 filter: c._state.activeFilter 596 }, 597 callback: null 598 }, e = 0; e < b.length; e++) { 599 var f = b[e]; 600 "number" == typeof f ? d.index = f : "object" == typeof f && f instanceof a ? d.$object = f : "object" == typeof f && c._helpers._isElement(f) ? d.$object = a(f) : "object" == typeof f && null !== f ? d.multiMix = f : "boolean" != typeof f || f ? "function" == typeof f && (d.c
600allback = f) : d.multiMix = !1 601 } 602 return c._execFilter("_parseInsertArgs", d, arguments) 603 }, 604 _execAction: function(a, b, c) { 605 var d = this, 606 e = b ? "post" : "pre"; 607 if (!d._actions.isEmptyObject && d._actions.hasOwnProperty(a)) 608 for (var f in d._actions[a][e]) d._actions[a][e][f].call(d, c) 609 }, 610 _execFilter: function(a, b, c) { 611 var d = this; 612 if (d._filters.isEmptyObject || !d._filters.hasOwnProperty(a)) return b; 613 for (var e in d._filters[a]) return d._filters[a][e].call(d, c) 614 }, 615 _helpers: { 616 _camelCase: function(a) { 617 return a.replace(/-([a-z])/g, function(a) { 618 return a[1].toUpperCase() 619 }) 620 }, 621 _isElement: function(a) { 622 return window.HTMLElement ? a instanceof HTMLElement : null !== a && 1 === a.nodeType && "string" === a.nodeName 623 } 624 }, 625 isMixing: function() { 626 var a = this; 627 return a._execFilter("isMixing", a._mixing) 628 }, 629 filter: function() { 630 var a = this, 631 b = a._parseMultiMixArgs(arguments); 632 a._clicking && (a._toggleString = ""), a.multiMix({ 633 filter: b.command 634 }, b.animate, b.callback) 635 }, 636 sort: function() { 637 var a = this, 638 b = a._parseMultiMixArgs(arguments); 639 a.multiMix({ 640 sort: b.command 641 }, b.animate, b.callback) 642 }, 643 changeLayout: function() { 644 var a = this, 645 b = a._parseMultiMixArgs(arguments); 646 a.multiMix({ 647 changeLayout: b.command 648 }, b.animate, b.callback) 649 }, 650 multiMix: function() { 651 var a = this, 652 c = a._parseMultiMixArgs(arguments); 653 if (a._execAction("multiMix", 0, arguments), a._mixing) a.animation.queue && a._queue.length < a.animation.queueLimit ? (a._queue.push(arguments), a.controls.enable && !a._clicking && a._updateControls(c.command), a._execAction("multiMixQueue", 1, arguments)) : ("function" == typeof a.callbacks.onMixBusy && a.callbacks.onMixBusy.call(a._domNode, a._state, a), a._$container.trigger("mixBusy", [a._state, a]), a._execAction("multiMixBusy", 1, arguments)); 654 else { 655 a.controls.enable && !a._clicking && (a.controls.toggleFilterButtons && a._buildToggleArray(), a._updateControls(c.command, a.controls.toggleFilterButtons)), a._queue.length < 2 && (a._clicking = !1), delete a.callbacks._user, c.callback && (a.callbacks._user = c.callback); 656 var d = c.command.sort, 657 e = c.command.filter, 658 f = c.command.changeLayout; 659 a._refresh(), d && (a._newSort = a._parseSort(d), a._newSortString = d, a._sorting = !0, a._sort()), e !== b && (e = "all" === e ? a.selectors.target : e, a._activeFilter = e), a._filter(), f && (a._newDisplay = "string" == typeof f ? f : f.display || a.layout.display, a._newClass = f.containerClass || "", (a._newDisplay !== a.layout.display || a._newClass !== a.layout.containerClass) && (a._changingLayout = !0, a._changingClass = a._newClass !== a.layout.containerClass, a._changingDisplay = a._newDisplay !== a.layout.display)), a._$targets.css(a._brake), a._goMix(c.animate ^ a.animation.enable ? c.animate : a.animation.enable), a._execAction("multiMix", 1, arguments) 660 } 661 }, 662 insert: function() { 663 var a = this, 664 b = a._parseInsertArgs(arguments), 665 c = "function" == typeof b.callback ? b.callback : null, 666 d = document.createDocumentFragment(), 667 e = function() { 668 return a._refresh(), a._$targets.length ? b.index < a._$targets.length || !a._$targets.length ? a._$targets[b.index] : a._$targets[a._$targets.length - 1].nextElementSibling : a._$parent[0].children[0] 669 }(); 670 if (a._execAction("insert", 0, arguments), b.$object) { 671 for (var f = 0; f < b.$object.length; f++) { 672 var g = b.$object[f]; 673 d.appendChild(g), d.appendChild(document.createTextNode(" ")) 674 } 675 a._$parent[0].insertBefore(d, e) 676 } 677 a._execAction("insert", 1, arguments), "object" == typeof b.multiMix && a.multiMix(b.multiMix, c) 678 }, 679 prepend: function() { 680 var a = this, 681 b = a._parseInsertArgs(arguments); 682 a.insert(0, b.$object, b.multiMix, b.callback) 683 }, 684 append: function() { 685 var a = this, 686 b = a._parseInsertArgs(arguments); 687 a.insert(a._state.totalTargets, b.$object, b.multiMix, b.callback) 688 }, 689 getOption: function(a) { 690 var c = this, 691 d = function(a, c) { 692 for (var d = c.split("."), e = d.pop(), f = d.length, g = 1, h = d[0] || c; 693 (a = a[h]) && f > g;) h = d[g], g++;
694 return a !== b ? a[e] !== b ? a[e] : a : void 0 695 }; 696 return a ? c._execFilter("getOption", d(c, a), arguments) : c 697 }, 698 setOptions: function(b) { 699 var c = this; 700 c._execAction("setOptions", 0, arguments), "object" == typeof b && a.extend(!0, c, b), c._execAction("setOptions", 1, arguments) 701 }, 702 getState: function() { 703 var a = this; 704 return a._execFilter("getState", a._state, a) 705 }, 706 forceRefresh: function() { 707 var a = this; 708 a._refresh(!1, !0) 709 }, 710 destroy: function(b) { 711 var c = this, 712 d = a.MixItUp.prototype._bound._filter, 713 e = a.MixItUp.prototype._bound._sort; 714 c._execAction("destroy", 0, arguments), c._$body.add(a(c.selectors.sort)).add(a(c.selectors.filter)).off(".mixItUp"); 715 for (var f = 0; f < c._$targets.length; f++) { 716 var g = c._$targets[f]; 717 b && (g.style.display = ""), delete g.mixParent 718 } 719 c._execAction("destroy", 1, arguments), d[c.selectors.filter] && d[c.selectors.filter] > 1 ? d[c.selectors.filter]-- : 1 === d[c.selectors.filter] && delete d[c.selectors.filter], e[c.selectors.sort] && e[c.selectors.sort] > 1 ? e[c.selectors.sort]-- : 1 === e[c.selectors.sort] && delete e[c.selectors.sort], delete a.MixItUp.prototype._instances[c._id] 720 } 721 }
721, a.fn.mixItUp = function() { 722 var c, d = arguments, 723 e = [], 724 f = function(b, c) { 725 var d = new a.MixItUp, 726 e = function() { 727 return ("00000" + (16777216 * Math.random() << 0).toString(16)).substr(-6).toUpperCase() 728 }; 729 d._execAction("_instantiate", 0, arguments), b.id = b.id ? b.id : "MixItUp" + e(), d._instances[b.id] || (d._instances[b.id] = d, d._init(b, c)), d._execAction("_instantiate", 1, arguments) 730 }; 731 return c = this.each(function() { 732 if (d && "string" == typeof d[0]) { 733 var c = a.MixItUp.prototype._instances[this.id]; 734 if ("isLoaded" === d[0]) e.push(c ? !0 : !1); 735 else { 736 var g = c[d[0]](d[1], d[2], d[3]); 737 g !== b && e.push(g) 738 } 739 } else f(this, d[0]) 740 }), e.length ? e.length > 1 ? e : e[0] : c 741 }, a.fn.removeStyle = function(c, d) { 742 return d = d ? d : "", this.each(function() { 743 for (var e = this, f = c.split(" "), g = 0; g < f.length; g++) 744 for (var h = 0; 4 > h; h++) { 745 switch (h) { 746 case 0: 747 var i = f[g]; 748 break; 749 case 1: 750 var i = a.MixItUp.prototype._helpers._camelCase(i); 751 break; 752 case 2: 753 var i = d + f[g]; 754 break; 755 case 3: 756 var i = a.MixItUp.prototype._helpers._camelCase(d + f[g]) 757 } 758 if (e.style[i] !== b && "unknown" != typeof e.style[i] && e.style[i].length > 0 && (e.style[i] = ""), !d && 1 === h) break 759 } 760 e.attributes && e.attributes.style && e.attributes.style !== b && "" === e.attributes.style.value && e.attributes.removeNamedItem("style") 761 }) 762 } 763}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.