mixitup.min.js 28 KB

1
  1. !function(c,d){c.MixItUp=function(){var a=this;a._execAction("_constructor",0),c.extend(a,{selectors:{target:".mix",filter:".filter",sort:".sort"},animation:{enable:!0,effects:"fade scale",duration:600,easing:"ease",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",queue:!0,queueLimit:1,animateChangeLayout:!1,animateResizeContainer:!0,animateResizeTargets:!1,staggerSequence:!1,reverseOut:!1},callbacks:{onMixLoad:!1,onMixStart:!1,onMixBusy:!1,onMixEnd:!1,onMixFail:!1,_user:!1},controls:{enable:!0,live:!1,toggleFilterButtons:!1,toggleLogic:"or",activeClass:"active"},layout:{display:"inline-block",containerClass:"",containerClassFail:"fail"},load:{filter:"all",sort:!1},_$body:null,_$container:null,_$targets:null,_$parent:null,_$sortButtons:null,_$filterButtons:null,_suckMode:!1,_mixing:!1,_sorting:!1,_clicking:!1,_loading:!0,_changingLayout:!1,_changingClass:!1,_changingDisplay:!1,_origOrder:[],_startOrder:[],_newOrder:[],_activeFilter:null,_toggleArray:[],_toggleString:"",_activeSort:"default:asc",_newSort:null,_startHeight:null,_newHeight:null,_incPadding:!0,_newDisplay:null,_newClass:null,_targetsBound:0,_targetsDone:0,_queue:[],_$show:c(),_$hide:c()}),a._execAction("_constructor",1)},c.MixItUp.prototype={constructor:c.MixItUp,_instances:{},_handled:{_filter:{},_sort:{}},_bound:{_filter:{},_sort:{}},_actions:{},_filters:{},extend:function(a){for(var e in a){c.MixItUp.prototype[e]=a[e]}},addAction:function(a,f,g,h){c.MixItUp.prototype._addHook("_actions",a,f,g,h)},addFilter:function(a,f,g,h){c.MixItUp.prototype._addHook("_filters",a,f,g,h)},_addHook:function(a,i,j,k,l){var m=c.MixItUp.prototype[a],n={};l=1===l||"post"===l?"post":"pre",n[i]={},n[i][l]={},n[i][l][j]=k,c.extend(!0,m,n)},_init:function(a,f){var g=this;if(g._execAction("_init",0,arguments),f&&c.extend(!0,g,f),g._$body=c("body"),g._domNode=a,g._$container=c(a),g._$container.addClass(g.layout.containerClass),g._id=a.id,g._platformDetect(),g._brake=g._getPrefixedCSS("transition","none"),g._refresh(!0),g._$parent=g._$targets.parent().length?g._$targets.parent():g._$container,g.load.sort&&(g._newSort=g._parseSort(g.load.sort),g._newSortString=g.load.sort,g._activeSort=g.load.sort,g._sort(),g._printSort()),g._activeFilter="all"===g.load.filter?g.selectors.target:"none"===g.load.filter?"":g.load.filter,g.controls.enable&&g._bindHandlers(),g.controls.toggleFilterButtons){g._buildToggleArray();for(var h=0;h<g._toggleArray.length;h++){g._updateControls({filter:g._toggleArray[h],sort:g._activeSort},!0)}}else{g.controls.enable&&g._updateControls({filter:g._activeFilter,sort:g._activeSort})}g._filter(),g._init=!0,g._$container.data("mixItUp",g),g._execAction("_init",1,arguments),g._buildState(),g._$targets.css(g._brake),g._goMix(g.animation.enable)},_platformDetect:function(){var b=this,j=["Webkit","Moz","O","ms"],k=["webkit","moz"],l=window.navigator.appVersion.match(/Chrome\/(\d+)\./)||!1,m="undefined"!=typeof InstallTrigger,n=function(e){for(var f=0;f<j.length;f++){if(j[f]+"Transition" in e.style){return{prefix:"-"+j[f].toLowerCase()+"-",vendor:j[f]}}}return"transition" in e.style?"":!1},o=n(b._domNode);b._execAction("_platformDetect",0),b._chrome=l?parseInt(l[1],10):!1,b._ff=m?parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]):!1,b._prefix=o.prefix,b._vendor=o.vendor,b._suckMode=window.atob&&b._prefix?!1:!0,b._suckMode&&(b.animation.enable=!1),b._ff&&b._ff<=4&&(b.animation.enable=!1);for(var p=0;p<k.length&&!window.requestAnimationFrame;p++){window.requestAnimationFrame=window[k[p]+"RequestAnimationFrame"]}"function"!=typeof Object.getPrototypeOf&&("object"==typeof"test".__proto__?Object.getPrototypeOf=function(e){return e.__proto__}:Object.getPrototypeOf=function(e){return e.constructor.prototype}),b._domNode.nextElementSibling===d&&Object.defineProperty(Element.prototype,"nextElementSibling",{get:function(){for(var e=this.nextSibling;e;){if(1===e.nodeType){return e}e=e.nextSibling}return null}}),b._execAction("_platformDetect",1)},_refresh:function(b,l){var m=this;m._execAction("_refresh",0,arguments),m._$targets=m._$container.find(m.selectors.target);for(var n=0;n<m._$targets.length;n++){var o=m._$targets[n];if(o.dataset===d||l){o.dataset={};for(var p=0;p<o.attributes.length;p++){var q=o.attributes[p],r=q.name,s=q.value;if(r.indexOf("data-")>-1){var t=m._helpers._camelCase(r.substring(5,r.length));o.dataset[t]=s}}}o.mixParent===d&&(o.mixParent=m._id)}if(m._$targets.length&&b||!m._origOrder.length&&m._$targets.length){m._origOrder=[];for(var n=0;n<m._$targets.length;n++){var o=m._$targets[n];m._origOrder.push(o)}}m._execAction("_refresh",1,arguments)},_bindHandlers:function(){var a=this,b=c.MixItUp.prototype._bound._filter,f=c.MixItUp.prototype._bound._sort;a._execAction("_bindHandlers",0),a.controls.live?a._$body.on("click.mixItUp."+a._id,a.selectors.sort,function(){a._processClick(c(this),"sort")}).on("click.mixItUp."+a._id,a.selectors.filter,function(){a._processClick(c(this),"filter")}):(a._$sortButtons=c(a.selectors.sort),a._$filterButtons=c(a.selectors.filter),a._$sortButtons.on("click.mixItUp."+a._id,function(){a._processClick(c(this),"sort")}),a._$filterButtons.on("click.mixItUp."+a._id,function(){a._processClick(c(this),"filter")})),b[a.selectors.filter]=b[a.selectors.filter]===d?1:b[a.selectors.filter]+1,f[a.selectors.sort]=f[a.selectors.sort]===d?1:f[a.selectors.sort]+1,a._execAction("_bindHandlers",1)},_processClick:function(a,b){var k=this,l=function(e,h,i){var j=c.MixItUp.prototype;j._handled["_"+h][k.selectors[h]]=j._handled["_"+h][k.selectors[h]]===d?1:j._handled["_"+h][k.selectors[h]]+1,j._handled["_"+h][k.selectors[h]]===j._bound["_"+h][k.selectors[h]]&&(e[(i?"remove":"add")+"Class"](k.controls.activeClass),delete j._handled["_"+h][k.selectors[h]])};if(k._execAction("_processClick",0,arguments),!k._mixing||k.animation.queue&&k._queue.length<k.animation.queueLimit){if(k._clicking=!0,"sort"===b){var m=a.attr("data-sort");(!a.hasClass(k.controls.activeClass)||m.indexOf("random")>-1)&&(c(k.selectors.sort).removeClass(k.controls.activeClass),l(a,b),k.sort(m))}if("filter"===b){var n,o=a.attr("data-filter"),p="or"===k.controls.toggleLogic?",":"";k.controls.toggleFilterButtons?(k._buildToggleArray(),a.hasClass(k.controls.activeClass)?(l(a,b,!0),n=k._toggleArray.indexOf(o),k._toggleArray.splice(n,1)):(l(a,b),k._toggleArray.push(o)),k._toggleArray=c.grep(k._toggleArray,function(e){return e}),k._toggleString=k._toggleArray.join(p),k.filter(k._toggleString)):a.hasClass(k.controls.activeClass)||(c(k.selectors.filter).removeClass(k.controls.activeClass),l(a,b),k.filter(o))}k._execAction("_processClick",1,arguments)}else{"function"==typeof k.callbacks.onMixBusy&&k.callbacks.onMixBusy.call(k._domNode,k._state,k),k._execAction("_processClickBusy",1,arguments)}},_buildToggleArray:function(){var e=this,f=e._activeFilter.replace(/\s/g,"");if(e._execAction("_buildToggleArray",0,arguments),"or"===e.controls.toggleLogic){e._toggleArray=f.split(",")}else{e._toggleArray=f.split("."),!e._toggleArray[0]&&e._toggleArray.shift();for(var g,h=0;g=e._toggleArray[h];h++){e._toggleArray[h]="."+g}}e._execAction("_buildToggleArray",1,arguments)},_updateControls:function(a,b){var k=this,l={filter:a.filter,sort:a.sort},m=function(e,f){try{b&&"filter"===n&&"none"!==l.filter&&""!==l.filter?e.filter(f).addClass(k.controls.activeClass):e.removeClass(k.controls.activeClass).filter(f).addClass(k.controls.activeClass)}catch(g){}},n="filter",o=null;k._execAction("_updateControls",0,arguments),a.filter===d&&(l.filter=k._activeFilter),a.sort===d&&(l.sort=k._activeSort),l.filter===k.selectors.target&&(l.filter="all");for(var p=0;2>p;p++){o=k.controls.live?c(k.selectors[n]):k["_$"+n+"Buttons"],o&&m(o,"[data-"+n+'="'+l[n]+'"]'),n="sort"}k._execAction("_updateControls",1,arguments)},_filter:function(){var a=this;a._execAction("_filter",0);for(var e=0;e<a._$targets.length;e++){var f=c(a._$targets[e]);f.is(a._activeFilter)?a._$show=a._$show.add(f):a._$hide=a._$hide.add(f)}a._execAction("_filter",1)},_sort:function(){var e=this,f=function(i){for(var j=i.slice(),k=j.length,l=k;l--;){var m=parseInt(Math.random()*k),n=j[l];j[l]=j[m],j[m]=n}return j};e._execAction("_sort",0),e._startOrder=[];for(var g=0;g<e._$targets.length;g++){var h=e._$targets[g];e._startOrder.push(h)}switch(e._newSort[0].sortBy){case"default":e._newOrder=e._origOrder;break;case"random":e._newOrder=f(e._startOrder);break;case"custom":e._newOrder=e._newSort[0].order;break;default:e._newOrder=e._startOrder.concat().sort(function(a,i){return e._compare(a,i)})}e._execAction("_sort",1)},_compare:function(i,j,k){k=k?k:0;var l=this,m=l._newSort[k].order,n=function(b){return b.dataset[l._newSort[k].sortBy]||0},o=isNaN(1*n(i))?n(i).toLowerCase():1*n(i),p=isNaN(1*n(j))?n(j).toLowerCase():1*n(j);return p>o?"asc"===m?-1:1:o>p?"asc"===m?1:-1:o===p&&l._newSort.length>k+1?l._compare(i,j,k+1):0},_printSort:function(l){var m=this,n=l?m._startOrder:m._newOrder,o=m._$parent[0].querySelectorAll(m.selectors.target),p=o.length?o[o.length-1].nextElementSibling:null,q=document.createDocumentFragment();m._execAction("_printSort",0,arguments);for(var r=0;r<o.length;r++){var s=o[r],t=s.nextSibling;"absolute"!==s.style.position&&(t&&"#text"===t.nodeName&&m._$parent[0].removeChild(t),m._$parent[0].removeChild(s))}for(var r=0;r<n.length;r++){var u=n[r];if("default"!==m._newSort[0].sortBy||"desc"!==m._newSort[0].order||l){q.appendChild(u),q.appendChild(document.createTextNode(" "))}else{var v=q.firstChild;q.insertBefore(u,v),q.insertBefore(document.createTextNode(" "),u)}}p?m._$parent[0].insertBefore(q,p):m._$parent[0].appendChild(q),m._execAction("_printSort",1,arguments)},_parseSort:function(h){for(var i=this,j="string"==typeof h?h.split(" "):[h],k=[],l=0;l<j.length;l++){var m="string"==typeof h?j[l].split(":"):["custom",j[l]],n={sortBy:i._helpers._camelCase(m[0]),order:m[1]||"asc"};if(k.push(n),"default"===n.sortBy||"random"===n.sortBy){break}}return i._execFilter("_parseSort",k,arguments)},_parseEffects:function(){var f=this,g={opacity:"",transformIn:"",transformOut:"",filter:""},h=function(a,k,l){if(f.animation.effects.indexOf(a)>-1){if(k){var m=f.animation.effects.indexOf(a+"(");if(m>-1){var n=f.animation.effects.substring(m),o=/\(([^)]+)\)/.exec(n),p=o[1];return{val:p}}}return !0}return !1},i=function(e,k){return k?"-"===e.charAt(0)?e.substr(1,e.length):"-"+e:e},j=function(b,k){for(var l=[["scale",".01"],["translateX","20px"],["translateY","20px"],["translateZ","20px"],["rotateX","90deg"],["rotateY","90deg"],["rotateZ","180deg"]],m=0;m<l.length;m++){var n=l[m][0],o=l[m][1],p=k&&"scale"!==n;g[b]+=h(n)?n+"("+i(h(n,!0).val||o,p)+") ":""}};return g.opacity=h("fade")?h("fade",!0).val||"0":"1",j("transformIn"),f.animation.reverseOut?j("transformOut",!0):g.transformOut=g.transformIn,g.transition={},g.transition=f._getPrefixedCSS("transition","all "+f.animation.duration+"ms "+f.animation.easing+", opacity "+f.animation.duration+"ms linear"),f.animation.stagger=h("stagger")?!0:!1,f.animation.staggerDuration=parseInt(h("stagger")&&h("stagger",!0).val?h("stagger",!0).val:100),f._execFilter("_parseEffects",g)},_buildState:function(e){var f=this,g={};return f._execAction("_buildState",0),g={activeFilter:""===f._activeFilter?"none":f._activeFilter,activeSort:e&&f._newSortString?f._newSortString:f._activeSort,fail:!f._$show.length&&""!==f._activeFilter,$targets:f._$targets,$show:f._$show,$hide:f._$hide,totalTargets:f._$targets.length,totalShow:f._$show.length,totalHide:f._$hide.length,display:e&&f._newDisplay?f._newDisplay:f.layout.display},e?f._execFilter("_buildState",g):(f._state=g,void f._execAction("_buildState",1))},_goMix:function(h){var i=this,j=function(){i._chrome&&31===i._chrome&&m(i._$parent[0]),i._setInter(),k()},k=function(){var b=window.pageYOffset,e=window.pageXOffset;document.documentElement.scrollHeight;i._getInterMixData(),i._setFinal(),i._getFinalMixData(),window.pageYOffset!==b&&window.scrollTo(e,b),i._prepTargets(),window.requestAnimationFrame?requestAnimationFrame(l):setTimeout(function(){l()},20)},l=function(){i._animateTargets(),0===i._targetsBound&&i._cleanUp()},m=function(e){var f=e.parentElement,g=document.createElement("div"),o=document.createDocumentFragment();f.insertBefore(g,e),o.appendChild(e),f.replaceChild(e,g)},n=i._buildState(!0);i._execAction("_goMix",0,arguments),!i.animation.duration&&(h=!1),i._mixing=!0,i._$container.removeClass(i.layout.containerClassFail),"function"==typeof i.callbacks.onMixStart&&i.callbacks.onMixStart.call(i._domNode,i._state,n,i),i._$container.trigger("mixStart",[i._state,n,i]),i._getOrigMixData(),h&&!i._suckMode?window.requestAnimationFrame?requestAnimationFrame(j):j():i._cleanUp(),i._execAction("_goMix",1,arguments)},_getTargetData:function(e,f){var g,h=this;e.dataset[f+"PosX"]=e.offsetLeft,e.dataset[f+"PosY"]=e.offsetTop,h.animation.animateResizeTargets&&(g=h._suckMode?{marginBottom:"",marginRight:""}:window.getComputedStyle(e),e.dataset[f+"MarginBottom"]=parseInt(g.marginBottom),e.dataset[f+"MarginRight"]=parseInt(g.marginRight),e.dataset[f+"Width"]=e.offsetWidth,e.dataset[f+"Height"]=e.offsetHeight)},_getOrigMixData:function(){var f=this,g=f._suckMode?{boxSizing:""}:window.getComputedStyle(f._$parent[0]),h=g.boxSizing||g[f._vendor+"BoxSizing"];f._incPadding="border-box"===h,f._execAction("_getOrigMixData",0),!f._suckMode&&(f.effects=f._parseEffects()),f._$toHide=f._$hide.filter(":visible"),f._$toShow=f._$show.filter(":hidden"),f._$pre=f._$targets.filter(":visible"),f._startHeight=f._incPadding?f._$parent.outerHeight():f._$parent.height();for(var i=0;i<f._$pre.length;i++){var j=f._$pre[i];f._getTargetData(j,"orig")}f._execAction("_getOrigMixData",1)},_setInter:function(){var b=this;b._execAction("_setInter",0),b._changingLayout&&b.animation.animateChangeLayout?(b._$toShow.css("display",b._newDisplay),b._changingClass&&b._$container.removeClass(b.layout.containerClass).addClass(b._newClass)):b._$toShow.css("display",b.layout.display),b._execAction("_setInter",1)},_getInterMixData:function(){var e=this;e._execAction("_getInterMixData",0);for(var f=0;f<e._$toShow.length;f++){var g=e._$toShow[f];e._getTargetData(g,"inter")}for(var f=0;f<e._$pre.length;f++){var g=e._$pre[f];e._getTargetData(g,"inter")}e._execAction("_getInterMixData",1)},_setFinal:function(){var b=this;b._execAction("_setFinal",0),b._sorting&&b._printSort(),b._$toHide.removeStyle("display"),b._changingLayout&&b.animation.animateChangeLayout&&b._$pre.css("display",b._newDisplay),b._execAction("_setFinal",1)},_getFinalMixData:function(){var e=this;e._execAction("_getFinalMixData",0);for(var f=0;f<e._$toShow.length;f++){var g=e._$toShow[f];e._getTargetData(g,"final")}for(var f=0;f<e._$pre.length;f++){var g=e._$pre[f];e._getTargetData(g,"final")}e._newHeight=e._incPadding?e._$parent.outerHeight():e._$parent.height(),e._sorting&&e._printSort(!0),e._$toShow.removeStyle("display"),e._$pre.css("display",e.layout.display),e._changingClass&&e.animation.animateChangeLayout&&e._$container.removeClass(e._newClass).addClass(e.layout.containerClass),e._execAction("_getFinalMixData",1)},_prepTargets:function(){var a=this,h={_in:a._getPrefixedCSS("transform",a.effects.transformIn),_out:a._getPrefixedCSS("transform",a.effects.transformOut)};a._execAction("_prepTargets",0),a.animation.animateResizeContainer&&a._$parent.css("height",a._startHeight+"px");for(var i=0;i<a._$toShow.length;i++){var j=a._$toShow[i],k=c(j);j.style.opacity=a.effects.opacity,j.style.display=a._changingLayout&&a.animation.animateChangeLayout?a._newDisplay:a.layout.display,k.css(h._in),a.animation.animateResizeTargets&&(j.style.width=j.dataset.finalWidth+"px",j.style.height=j.dataset.finalHeight+"px",j.style.marginRight=-(j.dataset.finalWidth-j.dataset.interWidth)+1*j.dataset.finalMarginRight+"px",j.style.marginBottom=-(j.dataset.finalHeight-j.dataset.interHeight)+1*j.dataset.finalMarginBottom+"px")}for(var i=0;i<a._$pre.length;i++){var j=a._$pre[i],k=c(j),l={x:j.dataset.origPosX-j.dataset.interPosX,y:j.dataset.origPosY-j.dataset.interPosY},h=a._getPrefixedCSS("transform","translate("+l.x+"px,"+l.y+"px)");k.css(h),a.animation.animateResizeTargets&&(j.style.width=j.dataset.origWidth+"px",j.style.height=j.dataset.origHeight+"px",j.dataset.origWidth-j.dataset.finalWidth&&(j.style.marginRight=-(j.dataset.origWidth-j.dataset.interWidth)+1*j.dataset.origMarginRight+"px"),j.dataset.origHeight-j.dataset.finalHeight&&(j.style.marginBottom=-(j.dataset.origHeight-j.dataset.interHeight)+1*j.dataset.origMarginBottom+"px"))}a._execAction("_prepTargets",1)},_animateTargets:function(){var a=this;a._execAction("_animateTargets",0),a._targetsDone=0,a._targetsBound=0,a._$parent.css(a._getPrefixedCSS("perspective",a.animation.perspectiveDistance+"px")).css(a._getPrefixedCSS("perspective-origin",a.animation.perspectiveOrigin)),a.animation.animateResizeContainer&&a._$parent.css(a._getPrefixedCSS("transition","height "+a.animation.duration+"ms ease")).css("height",a._newHeight+"px");for(var l=0;l<a._$toShow.length;l++){var m=a._$toShow[l],n=c(m),o={x:m.dataset.finalPosX-m.dataset.interPosX,y:m.dataset.finalPosY-m.dataset.interPosY},p=a._getDelay(l),q={};m.style.opacity="";for(var r=0;2>r;r++){var s=0===r?s=a._prefix:"";a._ff&&a._ff<=20&&(q[s+"transition-property"]="all",q[s+"transition-timing-function"]=a.animation.easing+"ms",q[s+"transition-duration"]=a.animation.duration+"ms"),q[s+"transition-delay"]=p+"ms",q[s+"transform"]="translate("+o.x+"px,"+o.y+"px)"}(a.effects.transform||a.effects.opacity)&&a._bindTargetDone(n),a._ff&&a._ff<=20?n.css(q):n.css(a.effects.transition).css(q)}for(var l=0;l<a._$pre.length;l++){var m=a._$pre[l],n=c(m),o={x:m.dataset.finalPosX-m.dataset.interPosX,y:m.dataset.finalPosY-m.dataset.interPosY},p=a._getDelay(l);(m.dataset.finalPosX!==m.dataset.origPosX||m.dataset.finalPosY!==m.dataset.origPosY)&&a._bindTargetDone(n),n.css(a._getPrefixedCSS("transition","all "+a.animation.duration+"ms "+a.animation.easing+" "+p+"ms")),n.css(a._getPrefixedCSS("transform","translate("+o.x+"px,"+o.y+"px)")),a.animation.animateResizeTargets&&(m.dataset.origWidth-m.dataset.finalWidth&&1*m.dataset.finalWidth&&(m.style.width=m.dataset.finalWidth+"px",m.style.marginRight=-(m.dataset.finalWidth-m.dataset.interWidth)+1*m.dataset.finalMarginRight+"px"),m.dataset.origHeight-m.dataset.finalHeight&&1*m.dataset.finalHeight&&(m.style.height=m.dataset.finalHeight+"px",m.style.marginBottom=-(m.dataset.finalHeight-m.dataset.interHeight)+1*m.dataset.finalMarginBottom+"px"))}a._changingClass&&a._$container.removeClass(a.layout.containerClass).addClass(a._newClass);for(var l=0;l<a._$toHide.length;l++){for(var m=a._$toHide[l],n=c(m),p=a._getDelay(l),t={},r=0;2>r;r++){var s=0===r?s=a._prefix:"";t[s+"transition-delay"]=p+"ms",t[s+"transform"]=a.effects.transformOut,t.opacity=a.effects.opacity}n.css(a.effects.transition).css(t),(a.effects.transform||a.effects.opacity)&&a._bindTargetDone(n)}a._execAction("_animateTargets",1)},_bindTargetDone:function(a){var e=this,f=a[0];e._execAction("_bindTargetDone",0,arguments),f.dataset.bound||(f.dataset.bound=!0,e._targetsBound++,a.on("webkitTransitionEnd.mixItUp transitionend.mixItUp",function(b){(b.originalEvent.propertyName.indexOf("transform")>-1||b.originalEvent.propertyName.indexOf("opacity")>-1)&&c(b.originalEvent.target).is(e.selectors.target)&&(a.off(".mixItUp"),f.dataset.bound="",e._targetDone())})),e._execAction("_bindTargetDone",1,arguments)},_targetDone:function(){var b=this;b._execAction("_targetDone",0),b._targetsDone++,b._targetsDone===b._targetsBound&&b._cleanUp(),b._execAction("_targetDone",1)},_cleanUp:function(){var a=this,e=a.animation.animateResizeTargets?"transform opacity width height margin-bottom margin-right":"transform opacity",f=function(){a._$targets.removeStyle("transition",a._prefix)};a._execAction("_cleanUp",0),a._changingLayout?a._$show.css("display",a._newDisplay):a._$show.css("display",a.layout.display),a._$targets.css(a._brake),a._$targets.removeStyle(e,a._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"),a._$hide.removeStyle("display"),a._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin",a._prefix),a._sorting&&(a._printSort(),a._activeSort=a._newSortString,a._sorting=!1),a._changingLayout&&(a._changingDisplay&&(a.layout.display=a._newDisplay,a._changingDisplay=!1),a._changingClass&&(a._$parent.removeClass(a.layout.containerClass).addClass(a._newClass),a.layout.containerClass=a._newClass,a._changingClass=!1),a._changingLayout=!1),a._refresh(),a._buildState(),a._state.fail&&a._$container.addClass(a.layout.containerClassFail),a._$show=c(),a._$hide=c(),window.requestAnimationFrame&&requestAnimationFrame(f),a._mixing=!1,"function"==typeof a.callbacks._user&&a.callbacks._user.call(a._domNode,a._state,a),"function"==typeof a.callbacks.onMixEnd&&a.callbacks.onMixEnd.call(a._domNode,a._state,a),a._$container.trigger("mixEnd",[a._state,a]),a._state.fail&&("function"==typeof a.callbacks.onMixFail&&a.callbacks.onMixFail.call(a._domNode,a._state,a),a._$container.trigger("mixFail",[a._state,a])),a._loading&&("function"==typeof a.callbacks.onMixLoad&&a.callbacks.onMixLoad.call(a._domNode,a._state,a),a._$container.trigger("mixLoad",[a._state,a])),a._queue.length&&(a._execAction("_queue",0),a.multiMix(a._queue[0][0],a._queue[0][1],a._queue[0][2]),a._queue.splice(0,1)),a._execAction("_cleanUp",1),a._loading=!1},_getPrefixedCSS:function(h,i,j){var k=this,l={},m="",n=-1;for(n=0;2>n;n++){m=0===n?k._prefix:"",j?l[m+h]=m+i:l[m+h]=i}return k._execFilter("_getPrefixedCSS",l,arguments)},_getDelay:function(e){var f=this,g="function"==typeof f.animation.staggerSequence?f.animation.staggerSequence.call(f._domNode,e,f._state):e,h=f.animation.stagger?g*f.animation.staggerDuration:0;return f._execFilter("_getDelay",h,arguments)},_parseMultiMixArgs:function(f){for(var g=this,h={command:null,animate:g.animation.enable,callback:null},i=0;i<f.length;i++){var j=f[i];null!==j&&("object"==typeof j||"string"==typeof j?h.command=j:"boolean"==typeof j?h.animate=j:"function"==typeof j&&(h.callback=j))}return g._execFilter("_parseMultiMixArgs",h,arguments)},_parseInsertArgs:function(a){for(var g=this,h={index:0,$object:c(),multiMix:{filter:g._state.activeFilter},callback:null},i=0;i<a.length;i++){var j=a[i];"number"==typeof j?h.index=j:"object"==typeof j&&j instanceof c?h.$object=j:"object"==typeof j&&g._helpers._isElement(j)?h.$object=c(j):"object"==typeof j&&null!==j?h.multiMix=j:"boolean"!=typeof j||j?"function"==typeof j&&(h.callback=j):h.multiMix=!1}return g._execFilter("_parseInsertArgs",h,arguments)},_execAction:function(g,h,i){var j=this,k=h?"post":"pre";if(!j._actions.isEmptyObject&&j._actions.hasOwnProperty(g)){for(var l in j._actions[g][k]){j._actions[g][k][l].call(j,i)}}},_execFilter:function(f,g,h){var i=this;if(i._filters.isEmptyObject||!i._filters.hasOwnProperty(f)){return g}for(var j in i._filters[f]){return i._filters[f][j].call(i,h)}},_helpers:{_camelCase:function(b){return b.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},_isElement:function(b){return window.HTMLElement?b instanceof HTMLElement:null!==b&&1===b.nodeType&&"string"===b.nodeName}},isMixing:function(){var b=this;return b._execFilter("isMixing",b._mixing)},filter:function(){var e=this,f=e._parseMultiMixArgs(arguments);e._clicking&&(e._toggleString=""),e.multiMix({filter:f.command},f.animate,f.callback)},sort:function(){var e=this,f=e._parseMultiMixArgs(arguments);e.multiMix({sort:f.command},f.animate,f.callback)},changeLayout:function(){var e=this,f=e._parseMultiMixArgs(arguments);e.multiMix({changeLayout:f.command},f.animate,f.callback)},multiMix:function(){var b=this,g=b._parseMultiMixArgs(arguments);if(b._execAction("multiMix",0,arguments),b._mixing){b.animation.queue&&b._queue.length<b.animation.queueLimit?(b._queue.push(arguments),b.controls.enable&&!b._clicking&&b._updateControls(g.command),b._execAction("multiMixQueue",1,arguments)):("function"==typeof b.callbacks.onMixBusy&&b.callbacks.onMixBusy.call(b._domNode,b._state,b),b._$container.trigger("mixBusy",[b._state,b]),b._execAction("multiMixBusy",1,arguments))}else{b.controls.enable&&!b._clicking&&(b.controls.toggleFilterButtons&&b._buildToggleArray(),b._updateControls(g.command,b.controls.toggleFilterButtons)),b._queue.length<2&&(b._clicking=!1),delete b.callbacks._user,g.callback&&(b.callbacks._user=g.callback);var h=g.command.sort,i=g.command.filter,j=g.command.changeLayout;b._refresh(),h&&(b._newSort=b._parseSort(h),b._newSortString=h,b._sorting=!0,b._sort()),i!==d&&(i="all"===i?b.selectors.target:i,b._activeFilter=i),b._filter(),j&&(b._newDisplay="string"==typeof j?j:j.display||b.layout.display,b._newClass=j.containerClass||"",(b._newDisplay!==b.layout.display||b._newClass!==b.layout.containerClass)&&(b._changingLayout=!0,b._changingClass=b._newClass!==b.layout.containerClass,b._changingDisplay=b._newDisplay!==b.layout.display)),b._$targets.css(b._brake),b._goMix(g.animate^b.animation.enable?g.animate:b.animation.enable),b._execAction("multiMix",1,arguments)}},insert:function(){var h=this,i=h._parseInsertArgs(arguments),j="function"==typeof i.callback?i.callback:null,k=document.createDocumentFragment(),l=function(){return h._refresh(),h._$targets.length?i.index<h._$targets.length||!h._$targets.length?h._$targets[i.index]:h._$targets[h._$targets.length-1].nextElementSibling:h._$parent[0].children[0]}();if(h._execAction("insert",0,arguments),i.$object){for(var m=0;m<i.$object.length;m++){var n=i.$object[m];k.appendChild(n),k.appendChild(document.createTextNode(" "))}h._$parent[0].insertBefore(k,l)}h._execAction("insert",1,arguments),"object"==typeof i.multiMix&&h.multiMix(i.multiMix,j)},prepend:function(){var e=this,f=e._parseInsertArgs(arguments);e.insert(0,f.$object,f.multiMix,f.callback)},append:function(){var e=this,f=e._parseInsertArgs(arguments);e.insert(e._state.totalTargets,f.$object,f.multiMix,f.callback)},getOption:function(b){var e=this,f=function(i,j){for(var k=j.split("."),l=k.pop(),m=k.length,n=1,o=k[0]||j;(i=i[o])&&m>n;){o=k[n],n++}return i!==d?i[l]!==d?i[l]:i:void 0};return b?e._execFilter("getOption",f(e,b),arguments):e},setOptions:function(a){var e=this;e._execAction("setOptions",0,arguments),"object"==typeof a&&c.extend(!0,e,a),e._execAction("setOptions",1,arguments)},getState:function(){var b=this;return b._execFilter("getState",b._state,b)},forceRefresh:function(){var b=this;b._refresh(!1,!0)},destroy:function(a){var h=this,i=c.MixItUp.prototype._bound._filter,j=c.MixItUp.prototype._bound._sort;h._execAction("destroy",0,arguments),h._$body.add(c(h.selectors.sort)).add(c(h.selectors.filter)).off(".mixItUp");for(var k=0;k<h._$targets.length;k++){var l=h._$targets[k];a&&(l.style.display=""),delete l.mixParent}h._execAction("destroy",1,arguments),i[h.selectors.filter]&&i[h.selectors.filter]>1?i[h.selectors.filter]--:1===i[h.selectors.filter]&&delete i[h.selectors.filter],j[h.selectors.sort]&&j[h.selectors.sort]>1?j[h.selectors.sort]--:1===j[h.selectors.sort]&&delete j[h.selectors.sort],delete c.MixItUp.prototype._instances[h._id]}},c.fn.mixItUp=function(){var a,b=arguments,g=[],h=function(f,i){var j=new c.MixItUp,k=function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()};j._execAction("_instantiate",0,arguments),f.id=f.id?f.id:"MixItUp"+k(),j._instances[f.id]||(j._instances[f.id]=j,j._init(f,i)),j._execAction("_instantiate",1,arguments)};return a=this.each(function(){if(b&&"string"==typeof b[0]){var e=c.MixItUp.prototype._instances[this.id];if("isLoaded"===b[0]){g.push(e?!0:!1)}else{var f=e[b[0]](b[1],b[2],b[3]);f!==d&&g.push(f)}}else{h(this,b[0])}}),g.length?g.length>1?g:g[0]:a},c.fn.removeStyle=function(a,b){return b=b?b:"",this.each(function(){for(var j=this,k=a.split(" "),l=0;l<k.length;l++){for(var m=0;4>m;m++){switch(m){case 0:var n=k[l];break;case 1:var n=c.MixItUp.prototype._helpers._camelCase(n);break;case 2:var n=b+k[l];break;case 3:var n=c.MixItUp.prototype._helpers._camelCase(b+k[l])}if(j.style[n]!==d&&"unknown"!=typeof j.style[n]&&j.style[n].length>0&&(j.style[n]=""),!b&&1===m){break}}}j.attributes&&j.attributes.style&&j.attributes.style!==d&&""===j.attributes.style.value&&j.attributes.removeNamedItem("style")})}}(jQuery);