isotope.pkgd.min.js 35 KB

12345678910
  1. /*
  2. * Isotope PACKAGED v3.0.5
  3. *
  4. * Licensed GPLv3 for open source use
  5. * or Isotope Commercial License for commercial use
  6. *
  7. * https://isotope.metafizzy.co
  8. * Copyright 2017 Metafizzy
  9. */
  10. !function(b,a){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(c){return a(b,c)}):"object"==typeof module&&module.exports?module.exports=a(b,require("jquery")):b.jQueryBridget=a(b,b.jQuery)}(window,function(h,a){function b(k,l,e){function m(u,i,q){var p,r="$()."+k+'("'+i+'")';return u.each(function(v,w){var o=e.data(w,k);if(!o){return void f(k+" not initialized. Cannot call methods, i.e. "+r)}var n=o[i];if(!n||"_"==i.charAt(0)){return void f(r+" is not a valid method")}var s=n.apply(o,q);p=void 0===p?s:p}),void 0!==p?p:u}function j(n,i){n.each(function(r,q){var p=e.data(q,k);p?(p.option(i),p._init()):(p=new l(q,i),e.data(q,k,p))})}e=e||a||h.jQuery,e&&(l.prototype.option||(l.prototype.option=function(i){e.isPlainObject(i)&&(this.options=e.extend(!0,this.options,i))}),e.fn[k]=function(n){if("string"==typeof n){var i=c.call(arguments,1);return m(this,n,i)}return j(this,n),this},d(e))}function d(e){!e||e&&e.bridget||(e.bridget=b)}var c=Array.prototype.slice,g=h.console,f="undefined"==typeof g?function(){}:function(e){g.error(e)};return d(a||h.jQuery),b}),function(b,a){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",a):"object"==typeof module&&module.exports?module.exports=a():b.EvEmitter=a()}("undefined"!=typeof window?window:this,function(){function b(){}var a=b.prototype;return a.on=function(g,c){if(g&&c){var d=this._events=this._events||{},f=d[g]=d[g]||[];return f.indexOf(c)==-1&&f.push(c),this}},a.once=function(g,c){if(g&&c){this.on(g,c);var d=this._onceEvents=this._onceEvents||{},f=d[g]=d[g]||{};return f[c]=!0,this}},a.off=function(g,c){var d=this._events&&this._events[g];if(d&&d.length){var f=d.indexOf(c);return f!=-1&&d.splice(f,1),this}},a.emitEvent=function(k,c){var d=this._events&&this._events[k];if(d&&d.length){d=d.slice(0),c=c||[];for(var g=this._onceEvents&&this._onceEvents[k],f=0;f<d.length;f++){var j=d[f],h=g&&g[j];h&&(this.off(k,j),delete g[j]),j.apply(this,c)}return this}},a.allOff=function(){delete this._events,delete this._onceEvents},b}),function(b,a){"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return a()}):"object"==typeof module&&module.exports?module.exports=a():b.getSize=a()}(window,function(){function q(h){var a=parseFloat(h),d=h.indexOf("%")==-1&&!isNaN(a);return d&&a}function f(){}function j(){for(var h={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},a=0;a<g;a++){var d=v[a];h[d]=0}return h}function l(d){var a=getComputedStyle(d);return a||b("Style returned "+a+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),a}function k(){if(!c){c=!0;var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style.boxSizing="border-box";var d=document.body||document.documentElement;d.appendChild(a);var h=l(a);p.isBoxSizeOuter=m=200==q(h.width),d.removeChild(a)}}function p(r){if(k(),"string"==typeof r&&(r=document.querySelector(r)),r&&"object"==typeof r&&r.nodeType){var D=l(r);if("none"==D.display){return j()}var i={};i.width=r.offsetWidth,i.height=r.offsetHeight;for(var o=i.isBorderBox="border-box"==D.boxSizing,A=0;A<g;A++){var t=v[A],n=D[t],B=parseFloat(n);i[t]=isNaN(B)?0:B}var C=i.paddingLeft+i.paddingRight,H=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,F=i.marginTop+i.marginBottom,h=i.borderLeftWidth+i.borderRightWidth,w=i.borderTopWidth+i.borderBottomWidth,J=o&&m,G=q(D.width);G!==!1&&(i.width=G+(J?0:C+h));var E=q(D.height);return E!==!1&&(i.height=E+(J?0:H+w)),i.innerWidth=i.width-(C+h),i.innerHeight=i.height-(H+w),i.outerWidth=i.width+u,i.outerHeight=i.height+F,i}}var m,b="undefined"==typeof console?f:function(a){console.error(a)},v=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],g=v.length,c=!1;return p}),function(b,a){"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",a):"object"==typeof module&&module.exports?module.exports=a():b.matchesSelector=a()}(window,function(){var a=function(){var g=window.Element.prototype;if(g.matches){return"matches"}if(g.matchesSelector){return"matchesSelector"}for(var b=["webkit","moz","ms","o"],c=0;c<b.length;c++){var f=b[c],d=f+"MatchesSelector";if(g[d]){return d}}}();return function(b,c){return b[a](c)}}),function(b,a){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(c){return a(b,c)}):"object"==typeof module&&module.exports?module.exports=a(b,require("desandro-matches-selector")):b.fizzyUIUtils=a(b,b.matchesSelector)}(window,function(d,a){var b={};b.extend=function(h,f){for(var g in f){h[g]=f[g]}return h},b.modulo=function(g,f){return(g%f+f)%f},b.makeArray=function(h){var f=[];if(Array.isArray(h)){f=h}else{if(h&&"object"==typeof h&&"number"==typeof h.length){for(var g=0;g<h.length;g++){f.push(h[g])}}else{f.push(h)}}return f},b.removeFrom=function(h,f){var g=h.indexOf(f);g!=-1&&h.splice(g,1)},b.getParent=function(f,e){for(;f.parentNode&&f!=document.body;){if(f=f.parentNode,a(f,e)){return f}}},b.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},b.handleEvent=function(g){var f="on"+g.type;this[f]&&this[f](g)},b.filterFindElements=function(g,f){g=b.makeArray(g);var e=[];return g.forEach(function(k){if(k instanceof HTMLElement){if(!f){return void e.push(k)}a(k,f)&&e.push(k);for(var h=k.querySelectorAll(f),j=0;j<h.length;j++){e.push(h[j])}}}),e},b.debounceMethod=function(k,f,g){var j=k.prototype[f],h=f+"Timeout";k.prototype[f]=function(){var m=this[h];m&&clearTimeout(m);var i=arguments,l=this;this[h]=setTimeout(function(){j.apply(l,i),delete l[h]},g||100)}},b.docReady=function(g){var f=document.readyState;"complete"==f||"interactive"==f?setTimeout(g):document.addEventListener("DOMContentLoaded",g)},b.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(h,f,g){return f+"-"+g}).toLowerCase()};var c=d.console;return b.htmlInit=function(f,g){b.docReady(function(){var n=b.toDashed(g),m="data-"+n,e=document.querySelectorAll("["+m+"]"),o=document.querySelectorAll(".js-"+n),j=b.makeArray(e).concat(b.makeArray(o)),i=m+"-options",k=d.jQuery;j.forEach(function(q){var l,p=q.getAttribute(m)||q.getAttribute(i);try{l=p&&JSON.parse(p)}catch(h){return void (c&&c.error("Error parsing "+m+" on "+q.className+": "+h))}var r=new f(q,l);k&&k.data(q,g,r)})})},b}),function(b,a){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],a):"object"==typeof module&&module.exports?module.exports=a(require("ev-emitter"),require("get-size")):(b.Outlayer={},b.Outlayer.Item=a(b.EvEmitter,b.getSize))}(window,function(A,k){function q(c){for(var a in c){return !1}return a=null,!0}function x(c,a){c&&(this.element=c,this.layout=a,this.position={x:0,y:0},this._create())}function w(a){return a.replace(/([A-Z])/g,function(c){return"-"+c.toLowerCase()})}var z=document.documentElement.style,y="string"==typeof z.transition?"transition":"WebkitTransition",b="string"==typeof z.transform?"transform":"WebkitTransform",B={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[y],p={transform:b,transition:y,transitionDuration:y+"Duration",transitionProperty:y+"Property",transitionDelay:y+"Delay"},j=x.prototype=Object.create(A.prototype);j.constructor=x,j._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},j.handleEvent=function(c){var a="on"+c.type;this[a]&&this[a](c)},j.getSize=function(){this.size=k(this.element)},j.css=function(f){var a=this.element.style;for(var c in f){var d=p[c]||c;a[d]=f[c]}},j.getPosition=function(){var D=getComputedStyle(this.element),d=this.layout._getOption("originLeft"),f=this.layout._getOption("originTop"),l=D[d?"left":"right"],h=D[f?"top":"bottom"],C=this.layout.size,u=l.indexOf("%")!=-1?parseFloat(l)/100*C.width:parseInt(l,10),c=h.indexOf("%")!=-1?parseFloat(h)/100*C.height:parseInt(h,10);u=isNaN(u)?0:u,c=isNaN(c)?0:c,u-=d?C.paddingLeft:C.paddingRight,c-=f?C.paddingTop:C.paddingBottom,this.position.x=u,this.position.y=c},j.layoutPosition=function(){var K=this.layout.size,C={},E=this.layout._getOption("originLeft"),H=this.layout._getOption("originTop"),G=E?"paddingLeft":"paddingRight",J=E?"left":"right",I=E?"right":"left",c=this.position.x+K[G];C[J]=this.getXValue(c),C[I]="";var L=H?"paddingTop":"paddingBottom",D=H?"top":"bottom",f=H?"bottom":"top",F=this.position.y+K[L];C[D]=this.getYValue(F),C[f]="",this.css(C),this.emitEvent("layout",[this])},j.getXValue=function(c){var a=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!a?c/this.layout.size.width*100+"%":c+"px"},j.getYValue=function(c){var a=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&a?c/this.layout.size.height*100+"%":c+"px"},j._transitionTo=function(G,d){this.getPosition();var l=this.position.x,D=this.position.y,C=parseInt(G,10),F=parseInt(d,10),E=C===this.position.x&&F===this.position.y;if(this.setPosition(G,d),E&&!this.isTransitioning){return void this.layoutPosition()}var c=G-l,H=d-D,f={};f.transform=this.getTranslate(c,H),this.transition({to:f,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},j.getTranslate=function(f,a){var c=this.layout._getOption("originLeft"),d=this.layout._getOption("originTop");return f=c?f:-f,a=d?a:-a,"translate3d("+f+"px, "+a+"px, 0)"},j.goTo=function(c,a){this.setPosition(c,a),this.layoutPosition()},j.moveTo=j._transitionTo,j.setPosition=function(c,a){this.position.x=parseInt(c,10),this.position.y=parseInt(a,10)},j._nonTransition=function(c){this.css(c.to),c.isCleaning&&this._removeStyles(c.to);for(var a in c.onTransitionEnd){c.onTransitionEnd[a].call(this)}},j.transition=function(f){if(!parseFloat(this.layout.options.transitionDuration)){return void this._nonTransition(f)}var a=this._transn;for(var c in f.onTransitionEnd){a.onEnd[c]=f.onTransitionEnd[c]}for(c in f.to){a.ingProperties[c]=!0,f.isCleaning&&(a.clean[c]=!0)}if(f.from){this.css(f.from);var d=this.element.offsetHeight;d=null}this.enableTransition(f.to),this.css(f.to),this.isTransitioning=!0};var v="opacity,"+w(b);j.enableTransition=function(){if(!this.isTransitioning){var a=this.layout.options.transitionDuration;a="number"==typeof a?a+"ms":a,this.css({transitionProperty:v,transitionDuration:a,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(B,this,!1)}},j.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},j.onotransitionend=function(a){this.ontransitionend(a)};var m={"-webkit-transform":"transform"};j.ontransitionend=function(f){if(f.target===this.element){var a=this._transn,d=m[f.propertyName]||f.propertyName;if(delete a.ingProperties[d],q(a.ingProperties)&&this.disableTransition(),d in a.clean&&(this.element.style[f.propertyName]="",delete a.clean[d]),d in a.onEnd){var c=a.onEnd[d];c.call(this),delete a.onEnd[d]}this.emitEvent("transitionEnd",[this])}},j.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(B,this,!1),this.isTransitioning=!1},j._removeStyles=function(d){var a={};for(var c in d){a[c]=""}this.css(a)};var g={transitionProperty:"",transitionDuration:"",transitionDelay:""};return j.removeTransitionStyles=function(){this.css(g)},j.stagger=function(a){a=isNaN(a)?0:a,this.staggerDelay=a+"ms"},j.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},j.remove=function(){return y&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},j.reveal=function(){delete this.isHidden,this.css({display:""});var d=this.layout.options,a={},c=this.getHideRevealTransitionEndProperty("visibleStyle");a[c]=this.onRevealTransitionEnd,this.transition({from:d.hiddenStyle,to:d.visibleStyle,isCleaning:!0,onTransitionEnd:a})},j.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},j.getHideRevealTransitionEndProperty=function(d){var a=this.layout.options[d];if(a.opacity){return"opacity"}for(var c in a){return c}},j.hide=function(){this.isHidden=!0,this.css({display:""});var d=this.layout.options,a={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");a[c]=this.onHideTransitionEnd,this.transition({from:d.visibleStyle,to:d.hiddenStyle,isCleaning:!0,onTransitionEnd:a})},j.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},j.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},x}),function(b,a){"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,e,d,f){return a(b,c,e,d,f)}):"object"==typeof module&&module.exports?module.exports=a(b,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):b.Outlayer=a(b,b.EvEmitter,b.getSize,b.fizzyUIUtils,b.Outlayer.Item)}(window,function(C,k,v,z,y){function B(h,a){var c=z.getQueryElement(h);if(!c){return void (D&&D.error("Bad element for "+this.constructor.namespace+": "+(c||h)))}this.element=c,q&&(this.$element=q(this.element)),this.options=z.extend({},this.constructor.defaults),this.option(a);var d=++w;this.element.outlayerGUID=d,p[d]=this,this._create();var f=this._getOption("initLayout");f&&this.layout()}function A(c){function a(){c.apply(this,arguments)}return a.prototype=Object.create(c.prototype),a.prototype.constructor=a,a}function b(h){if("number"==typeof h){return h}var a=h.match(/(^\d*\.?\d*)(\w*)/),c=a&&a[1],f=a&&a[2];if(!c.length){return 0}c=parseFloat(c);var d=x[f]||1;return c*d}var D=C.console,q=C.jQuery,j=function(){},w=0,p={};B.namespace="outlayer",B.Item=y,B.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var g=B.prototype;z.extend(g,k.prototype),g.option=function(a){z.extend(this.options,a)},g._getOption=function(c){var a=this.constructor.compatOptions[c];return a&&void 0!==this.options[a]?this.options[a]:this.options[c]},B.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},g._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),z.extend(this.element.style,this.options.containerStyle);var a=this._getOption("resize");a&&this.bindResize()},g.reloadItems=function(){this.items=this._itemize(this.element.children)},g._itemize=function(m){for(var a=this._filterFindItemElements(m),c=this.constructor.Item,f=[],d=0;d<a.length;d++){var l=a[d],h=new c(l,this);f.push(h)}return f},g._filterFindItemElements=function(a){return z.filterFindElements(a,this.options.itemSelector)},g.getItemElements=function(){return this.items.map(function(a){return a.element})},g.layout=function(){this._resetLayout(),this._manageStamps();var c=this._getOption("layoutInstant"),a=void 0!==c?c:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g._init=g.layout,g._resetLayout=function(){this.getSize()},g.getSize=function(){this.size=v(this.element)},g._getMeasurement=function(f,a){var d,c=this.options[f];c?("string"==typeof c?d=this.element.querySelector(c):c instanceof HTMLElement&&(d=c),this[f]=d?v(d)[a]:c):this[f]=0},g.layoutItems=function(c,a){c=this._getItemsForLayout(c),this._layoutItems(c,a),this._postLayout()},g._getItemsForLayout=function(a){return a.filter(function(c){return !c.isIgnored})},g._layoutItems=function(d,a){if(this._emitCompleteOnItems("layout",d),d&&d.length){var c=[];d.forEach(function(f){var e=this._getItemLayoutPosition(f);e.item=f,e.isInstant=a||f.isLayoutInstant,c.push(e)},this),this._processLayoutQueue(c)}},g._getItemLayoutPosition=function(){return{x:0,y:0}},g._processLayoutQueue=function(a){this.updateStagger(),a.forEach(function(d,c){this._positionItem(d.item,d.x,d.y,d.isInstant,c)},this)},g.updateStagger=function(){var a=this.options.stagger;return null===a||void 0===a?void (this.stagger=0):(this.stagger=b(a),this.stagger)},g._positionItem=function(h,a,c,f,d){f?h.goTo(a,c):(h.stagger(d*this.stagger),h.moveTo(a,c))},g._postLayout=function(){this.resizeContainer()},g.resizeContainer=function(){var c=this._getOption("resizeContainer");if(c){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g._getContainerSize=j,g._setContainerMeasure=function(d,a){if(void 0!==d){var c=this.size;c.isBorderBox&&(d+=a?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),d=Math.max(d,0),this.element.style[a?"width":"height"]=d+"px"}},g._emitCompleteOnItems=function(m,a){function c(){d.dispatchEvent(m+"Complete",null,[a])}function f(){h++,h==l&&c()}var d=this,l=a.length;if(!a||!l){return void c()}var h=0;a.forEach(function(i){i.once(m,f)})},g.dispatchEvent=function(h,a,c){var f=a?[a].concat(c):c;if(this.emitEvent(h,f),q){if(this.$element=this.$element||q(this.element),a){var d=q.Event(a);d.type=h,this.$element.trigger(d,c)}else{this.$element.trigger(h,c)}}},g.ignore=function(c){var a=this.getItem(c);a&&(a.isIgnored=!0)},g.unignore=function(c){var a=this.getItem(c);a&&delete a.isIgnored},g.stamp=function(a){a=this._find(a),a&&(this.stamps=this.stamps.concat(a),a.forEach(this.ignore,this))},g.unstamp=function(a){a=this._find(a),a&&a.forEach(function(c){z.removeFrom(this.stamps,c),this.unignore(c)},this)},g._find=function(a){if(a){return"string"==typeof a&&(a=this.element.querySelectorAll(a)),a=z.makeArray(a)}},g._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},g._getBoundingRect=function(){var c=this.element.getBoundingClientRect(),a=this.size;this._boundingRect={left:c.left+a.paddingLeft+a.borderLeftWidth,top:c.top+a.paddingTop+a.borderTopWidth,right:c.right-(a.paddingRight+a.borderRightWidth),bottom:c.bottom-(a.paddingBottom+a.borderBottomWidth)}},g._manageStamp=j,g._getElementOffset=function(h){var a=h.getBoundingClientRect(),d=this._boundingRect,c=v(h),f={left:a.left-d.left-c.marginLeft,top:a.top-d.top-c.marginTop,right:d.right-a.right-c.marginRight,bottom:d.bottom-a.bottom-c.marginBottom};return f},g.handleEvent=z.handleEvent,g.bindResize=function(){C.addEventListener("resize",this),this.isResizeBound=!0},g.unbindResize=function(){C.removeEventListener("resize",this),this.isResizeBound=!1},g.onresize=function(){this.resize()},z.debounceMethod(B,"onresize",100),g.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.needsResizeLayout=function(){var c=v(this.element),a=this.size&&c;return a&&c.innerWidth!==this.size.innerWidth},g.addItems=function(c){var a=this._itemize(c);return a.length&&(this.items=this.items.concat(a)),a},g.appended=function(c){var a=this.addItems(c);a.length&&(this.layoutItems(a,!0),this.reveal(a))},g.prepended=function(d){var a=this._itemize(d);if(a.length){var c=this.items.slice(0);this.items=a.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(a,!0),this.reveal(a),this.layoutItems(c)}},g.reveal=function(c){if(this._emitCompleteOnItems("reveal",c),c&&c.length){var a=this.updateStagger();c.forEach(function(e,d){e.stagger(d*a),e.reveal()})}},g.hide=function(c){if(this._emitCompleteOnItems("hide",c),c&&c.length){var a=this.updateStagger();c.forEach(function(e,d){e.stagger(d*a),e.hide()})}},g.revealItemElements=function(c){var a=this.getItems(c);this.reveal(a)},g.hideItemElements=function(c){var a=this.getItems(c);this.hide(a)},g.getItem=function(d){for(var a=0;a<this.items.length;a++){var c=this.items[a];if(c.element==d){return c}}},g.getItems=function(c){c=z.makeArray(c);var a=[];return c.forEach(function(e){var d=this.getItem(e);d&&a.push(d)},this),a},g.remove=function(c){var a=this.getItems(c);this._emitCompleteOnItems("remove",a),a&&a.length&&a.forEach(function(d){d.remove(),z.removeFrom(this.items,d)},this)},g.destroy=function(){var c=this.element.style;c.height="",c.position="",c.width="",this.items.forEach(function(d){d.destroy()}),this.unbindResize();var a=this.element.outlayerGUID;delete p[a],delete this.element.outlayerGUID,q&&q.removeData(this.element,this.constructor.namespace)},B.data=function(c){c=z.getQueryElement(c);var a=c&&c.outlayerGUID;return a&&p[a]},B.create=function(d,a){var c=A(B);return c.defaults=z.extend({},B.defaults),z.extend(c.defaults,a),c.compatOptions=z.extend({},B.compatOptions),c.namespace=d,c.data=B.data,c.Item=A(y),z.htmlInit(c,d),q&&q.bridget&&q.bridget(d,c),c};var x={ms:1,s:1000};return B.Item=y,B}),function(b,a){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],a):"object"==typeof module&&module.exports?module.exports=a(require("outlayer")):(b.Isotope=b.Isotope||{},b.Isotope.Item=a(b.Outlayer))}(window,function(f){function a(){f.Item.apply(this,arguments)}var b=a.prototype=Object.create(f.Item.prototype),d=b._create;b._create=function(){this.id=this.layout.itemGUID++,d.call(this),this.sortData={}},b.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var k=this.layout.options.getSortData,g=this.layout._sorters;for(var h in k){var j=g[h];this.sortData[h]=j(this.element,this)}}};var c=b.destroy;return b.destroy=function(){c.apply(this,arguments),this.css({display:""})},a}),function(b,a){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],a):"object"==typeof module&&module.exports?module.exports=a(require("get-size"),require("outlayer")):(b.Isotope=b.Isotope||{},b.Isotope.LayoutMode=a(b.getSize,b.Outlayer))}(window,function(f,a){function b(e){this.isotope=e,e&&(this.options=e.options[this.namespace],this.element=e.element,this.items=e.filteredItems,this.size=e.size)}var d=b.prototype,c=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return c.forEach(function(e){d[e]=function(){return a.prototype[e].apply(this.isotope,arguments)}}),d.needsVerticalResizeLayout=function(){var g=f(this.isotope.element),h=this.isotope.size&&g;return h&&g.innerHeight!=this.isotope.size.innerHeight},d._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},d.getColumnWidth=function(){this.getSegmentSize("column","Width")},d.getRowHeight=function(){this.getSegmentSize("row","Height")},d.getSegmentSize=function(l,g){var h=l+g,k="outer"+g;if(this._getMeasurement(h,k),!this[h]){var j=this.getFirstItemSize();this[h]=j&&j[k]||this.isotope.size["inner"+g]}},d.getFirstItemSize=function(){var g=this.isotope.filteredItems[0];return g&&g.element&&f(g.element)},d.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},d.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},b.modes={},b.create=function(i,g){function h(){b.apply(this,arguments)}return h.prototype=Object.create(d),h.prototype.constructor=h,g&&(h.options=g),h.prototype.namespace=i,b.modes[i]=h,h},b}),function(b,a){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],a):"object"==typeof module&&module.exports?module.exports=a(require("outlayer"),require("get-size")):b.Masonry=a(b.Outlayer,b.getSize)}(window,function(d,a){var b=d.create("masonry");b.compatOptions.fitWidth="isFitWidth";var c=b.prototype;return c._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e<this.cols;e++){this.colYs.push(0)}this.maxY=0,this.horizontalColIndex=0},c.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var l=this.items[0],f=l&&l.element;this.columnWidth=f&&a(f).outerWidth||this.containerWidth}var h=this.columnWidth+=this.gutter,g=this.containerWidth+this.gutter,k=g/h,j=h-g%h,e=j&&j<1?"round":"floor";k=Math[e](k),this.cols=Math.max(k,1)},c.getContainerWidth=function(){var g=this._getOption("fitWidth"),e=g?this.element.parentNode:this.element,f=a(e);this.containerWidth=f&&f.innerWidth},c._getItemLayoutPosition=function(v){v.getSize();var g=v.size.outerWidth%this.columnWidth,k=g&&g<1?"round":"ceil",m=Math[k](v.size.outerWidth/this.columnWidth);m=Math.min(m,this.cols);for(var l=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",q=this[l](m,v),p={x:this.columnWidth*q.col,y:q.y},f=q.y+v.size.outerHeight,w=m+q.col,j=q.col;j<w;j++){this.colYs[j]=f}return p},c._getTopColPosition=function(h){var f=this._getTopColGroup(h),g=Math.min.apply(Math,f);return{col:f.indexOf(g),y:g}},c._getTopColGroup=function(j){if(j<2){return this.colYs}for(var f=[],g=this.cols+1-j,h=0;h<g;h++){f[h]=this._getColGroupY(h,j)}return f},c._getColGroupY=function(h,f){if(f<2){return this.colYs[h]}var g=this.colYs.slice(h,h+f);return Math.max.apply(Math,g)},c._getHorizontalColPosition=function(k,f){var g=this.horizontalColIndex%this.cols,j=k>1&&g+k>this.cols;g=j?0:g;var h=f.size.outerWidth&&f.size.outerHeight;return this.horizontalColIndex=h?g+k:this.horizontalColIndex,{col:g,y:this._getColGroupY(g,k)}},c._manageStamp=function(w){var j=a(w),p=this._getElementOffset(w),m=this._getOption("originLeft"),v=m?p.left:p.right,q=v+j.outerWidth,e=Math.floor(v/this.columnWidth);e=Math.max(0,e);var x=Math.floor(q/this.columnWidth);x-=q%this.columnWidth?0:1,x=Math.min(this.cols-1,x);for(var g=this._getOption("originTop"),f=(g?p.top:p.bottom)+j.outerHeight,k=e;k<=x;k++){this.colYs[k]=Math.max(f,this.colYs[k])}},c._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},c._getContainerFitWidth=function(){for(var g=0,f=this.cols;--f&&0===this.colYs[f];){g++}return(this.cols-g)*this.columnWidth-this.gutter},c.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},b}),function(b,a){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],a):"object"==typeof module&&module.exports?module.exports=a(require("../layout-mode"),require("masonry-layout")):a(b.Isotope.LayoutMode,b.Masonry)}(window,function(k,c){var d=k.create("masonry"),g=d.prototype,f={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var j in c.prototype){f[j]||(g[j]=c.prototype[j])}var h=g.measureColumns;g.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var b=g._getOption;return g._getOption=function(a){return"fitWidth"==a?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:b.apply(this.isotope,arguments)},d}),function(b,a){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],a):"object"==typeof exports?module.exports=a(require("../layout-mode")):a(b.Isotope.LayoutMode)}(window,function(c){var a=c.create("fitRows"),b=a.prototype;return b._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b._getItemLayoutPosition=function(h){h.getSize();var d=h.size.outerWidth+this.gutter,f=this.isotope.size.innerWidth+this.gutter;0!==this.x&&d+this.x>f&&(this.x=0,this.y=this.maxY);var g={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+h.size.outerHeight),this.x+=d,g},b._getContainerSize=function(){return{height:this.maxY}},a}),function(b,a){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],a):"object"==typeof module&&module.exports?module.exports=a(require("../layout-mode")):a(b.Isotope.LayoutMode)}(window,function(c){var a=c.create("vertical",{horizontalAlignment:0}),b=a.prototype;return b._resetLayout=function(){this.y=0},b._getItemLayoutPosition=function(g){g.getSize();var d=(this.isotope.size.innerWidth-g.size.outerWidth)*this.options.horizontalAlignment,f=this.y;return this.y+=g.size.outerHeight,{x:d,y:f}},b._getContainerSize=function(){return{height:this.y}},a}),function(b,a){"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(d,f,e,h,g,c){return a(b,d,f,e,h,g,c)}):"object"==typeof module&&module.exports?module.exports=a(b,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")):b.Isotope=a(b,b.Outlayer,b.getSize,b.matchesSelector,b.fizzyUIUtils,b.Isotope.Item,b.Isotope.LayoutMode)}(window,function(A,k,q,x,w,z,y){function b(c,a){return function(f,t){for(var l=0;l<c.length;l++){var D=c[l],C=f.sortData[D],d=t.sortData[D];if(C>d||C<d){var E=void 0!==a[D]?a[D]:a,e=E?1:-1;return(C>d?1:-1)*e}}return 0}}var B=A.jQuery,p=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},j=k.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});j.Item=z,j.LayoutMode=y;var v=j.prototype;v._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),k.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in y.modes){this._initLayoutMode(a)}},v.reloadItems=function(){this.itemGUID=0,k.prototype.reloadItems.call(this)},v._itemize=function(){for(var d=k.prototype._itemize.apply(this,arguments),a=0;a<d.length;a++){var c=d[a];c.id=this.itemGUID++}return this._updateItemsSortData(d),d},v._initLayoutMode=function(d){var a=y.modes[d],c=this.options[d]||{};this.options[d]=a.options?w.extend(a.options,c):c,this.modes[d]=new a(this)},v.layout=function(){return !this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},v._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},v.arrange=function(c){this.option(c),this._getIsInstant();var a=this._filter(this.items);this.filteredItems=a.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[a]):this._hideReveal(a),this._sort(),this._layout()},v._init=v.arrange,v._hideReveal=function(a){this.reveal(a.needReveal),this.hide(a.needHide)},v._getIsInstant=function(){var c=this._getOption("layoutInstant"),a=void 0!==c?c:!this._isLayoutInited;return this._isInstant=a,a},v._bindArrangeComplete=function(){function h(){a&&c&&f&&d.dispatchEvent("arrangeComplete",null,[d.filteredItems])}var a,c,f,d=this;this.once("layoutComplete",function(){a=!0,h()}),this.once("hideComplete",function(){c=!0,h()}),this.once("revealComplete",function(){f=!0,h()})},v._filter=function(E){var d=this.options.filter;d=d||"*";for(var f=[],l=[],h=[],D=this._getFilterTest(d),C=0;C<E.length;C++){var c=E[C];if(!c.isIgnored){var F=D(c);F&&f.push(c),F&&c.isHidden?l.push(c):F||c.isHidden||h.push(c)}}return{matches:f,needReveal:l,needHide:h}},v._getFilterTest=function(a){return B&&this.options.isJQueryFiltering?function(c){return B(c.element).is(a)}:"function"==typeof a?function(c){return a(c.element)}:function(c){return x(c.element,a)}},v.updateSortData=function(c){var a;c?(c=w.makeArray(c),a=this.getItems(c)):a=this.items,this._getSorters(),this._updateItemsSortData(a)},v._getSorters=function(){var d=this.options.getSortData;for(var a in d){var c=d[a];this._sorters[a]=m(c)}},v._updateItemsSortData=function(f){for(var a=f&&f.length,c=0;a&&c<a;c++){var d=f[c];d.updateSortData()}};var m=function(){function c(C){if("string"!=typeof C){return C}var e=p(C).split(" "),h=e[0],f=h.match(/^\[(.+)\]$/),u=f&&f[1],l=a(u,h),d=j.sortDataParsers[e[1]];return C=d?function(i){return i&&d(l(i))}:function(i){return i&&l(i)}}function a(f,d){return f?function(h){return h.getAttribute(f)}:function(h){var e=h.querySelector(d);return e&&e.textContent}}return c}();j.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},v._sort=function(){if(this.options.sortBy){var c=w.makeArray(this.options.sortBy);this._getIsSameSortBy(c)||(this.sortHistory=c.concat(this.sortHistory));var a=b(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(a)}},v._getIsSameSortBy=function(c){for(var a=0;a<c.length;a++){if(c[a]!=this.sortHistory[a]){return !1}}return !0},v._mode=function(){var c=this.options.layoutMode,a=this.modes[c];if(!a){throw new Error("No layout mode: "+c)}return a.options=this.options[c],a},v._resetLayout=function(){k.prototype._resetLayout.call(this),this._mode()._resetLayout()},v._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},v._manageStamp=function(a){this._mode()._manageStamp(a)},v._getContainerSize=function(){return this._mode()._getContainerSize()},v.needsResizeLayout=function(){return this._mode().needsResizeLayout()},v.appended=function(d){var a=this.addItems(d);if(a.length){var c=this._filterRevealAdded(a);this.filteredItems=this.filteredItems.concat(c)}},v.prepended=function(d){var a=this._itemize(d);if(a.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(a);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=a.concat(this.items)}},v._filterRevealAdded=function(c){var a=this._filter(c);return this.hide(a.needHide),this.reveal(a.matches),this.layoutItems(a.matches,!0),a.matches},v.insert=function(l){var a=this.addItems(l);if(a.length){var c,f,d=a.length;for(c=0;c<d;c++){f=a[c],this.element.appendChild(f.element)}var h=this._filter(a).matches;for(c=0;c<d;c++){a[c].isLayoutInstant=!0}for(this.arrange(),c=0;c<d;c++){delete a[c].isLayoutInstant}this.reveal(h)}};var g=v.remove;return v.remove=function(h){h=w.makeArray(h);var a=this.getItems(h);g.call(this,h);for(var c=a&&a.length,d=0;c&&d<c;d++){var f=a[d];w.removeFrom(this.filteredItems,f)}},v.shuffle=function(){for(var c=0;c<this.items.length;c++){var a=this.items[c];a.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},v._noTransition=function(f,a){var c=this.options.transitionDuration;this.options.transitionDuration=0;var d=f.apply(this,a);return this.options.transitionDuration=c,d},v.getFilteredItemElements=function(){return this.filteredItems.map(function(a){return a.element})},j});