/*
 Packery PACKAGED v2.1.1
 Gapless, draggable grid layouts

 Licensed GPLv3 for open source use
 or Packery Commercial License for commercial use

 http://packery.metafizzy.co
 Copyright 2016 Metafizzy
*/
!function(b,d){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(f){d(b,f)}):"object"==typeof module&&module.exports?module.exports=d(b,require("jquery")):b.jQueryBridget=d(b,b.jQuery)}(window,function(b,d){function f(l,f,c){function e(g,a,k){var h,e="$()."+l+'("'+a+'")';return g.each(function(g,r){var f=c.data(r,l);if(!f)return void q(l+" not initialized. Cannot call methods, i.e. "+e);var n=f[a];if(!n||"_"==a.charAt(0))return void q(e+" is not a valid method");
f=n.apply(f,k);h=void 0===h?f:h}),void 0!==h?h:g}function g(g,a){g.each(function(k,g){var h=c.data(g,l);h?(h.option(a),h._init()):(h=new f(g,a),c.data(g,l,h))})}(c=c||d||b.jQuery)&&(f.prototype.option||(f.prototype.option=function(g){c.isPlainObject(g)&&(this.options=c.extend(!0,this.options,g))}),c.fn[l]=function(h){if("string"==typeof h){var c=a.call(arguments,1);return e(this,h,c)}return g(this,h),this},m(c))}function m(a){!a||a&&a.bridget||(a.bridget=f)}var a=Array.prototype.slice,l=b.console,
q="undefined"==typeof l?function(){}:function(a){l.error(a)};return m(d||b.jQuery),f});
(function(b,d){"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return d()}):"object"==typeof module&&module.exports?module.exports=d():b.getSize=d()})(window,function(){function b(a){var c=parseFloat(a);return-1==a.indexOf("%")&&!isNaN(c)&&c}function d(){}function f(a){a=getComputedStyle(a);return a||l("Style returned "+a+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),a}function m(c){if(!p){p=!0;var e=document.createElement("div");
e.style.width="200px";e.style.padding="1px 2px 3px 4px";e.style.borderStyle="solid";e.style.borderWidth="1px 2px 3px 4px";e.style.boxSizing="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=f(e);m.isBoxSizeOuter=a=200==b(h.width);g.removeChild(e)}if("string"==typeof c&&(c=document.querySelector(c)),c&&"object"==typeof c&&c.nodeType){g=f(c);if("none"==g.display){e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(g=0;n>g;g++)e[q[g]]=0;return e}e=
{};e.width=c.offsetWidth;e.height=c.offsetHeight;c=e.isBorderBox="border-box"==g.boxSizing;for(h=0;n>h;h++){var l=q[h],k=parseFloat(g[l]);e[l]=isNaN(k)?0:k}h=e.paddingLeft+e.paddingRight;l=e.paddingTop+e.paddingBottom;k=e.marginLeft+e.marginRight;var r=e.marginTop+e.marginBottom,t=e.borderLeftWidth+e.borderRightWidth,d=e.borderTopWidth+e.borderBottomWidth;c=c&&a;var u=b(g.width);!1!==u&&(e.width=u+(c?0:h+t));g=b(g.height);return!1!==g&&(e.height=g+(c?0:l+d)),e.innerWidth=e.width-(h+t),e.innerHeight=
e.height-(l+d),e.outerWidth=e.width+k,e.outerHeight=e.height+r,e}}var a,l="undefined"==typeof console?d:function(a){console.error(a)},q="paddingLeft paddingRight paddingTop paddingBottom marginLeft marginRight marginTop marginBottom borderLeftWidth borderRightWidth borderTopWidth borderBottomWidth".split(" "),n=q.length,p=!1;return m});
(function(b,d){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",d):"object"==typeof module&&module.exports?module.exports=d():b.EvEmitter=d()})(this,function(){function b(){}var d=b.prototype;return d.on=function(f,b){if(f&&b){var a=this._events=this._events||{};a=a[f]=a[f]||[];return-1==a.indexOf(b)&&a.push(b),this}},d.once=function(f,b){if(f&&b){this.on(f,b);var a=this._onceEvents=this._onceEvents||{};return(a[f]=a[f]||{})[b]=!0,this}},d.off=function(f,b){var a=this._events&&
this._events[f];if(a&&a.length){var l=a.indexOf(b);return-1!=l&&a.splice(l,1),this}},d.emitEvent=function(f,b){var a=this._events&&this._events[f];if(a&&a.length){var l=0,d=a[l];b=b||[];for(var n=this._onceEvents&&this._onceEvents[f];d;){var m=n&&n[d];m&&(this.off(f,d),delete n[d]);d.apply(this,b);l+=m?0:1;d=a[l]}return this}},b});
(function(b,d){"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",d):"object"==typeof module&&module.exports?module.exports=d():b.matchesSelector=d()})(window,function(){var b=function(){var b=Element.prototype;if(b.matches)return"matches";if(b.matchesSelector)return"matchesSelector";for(var f=["webkit","moz","ms","o"],m=0;m<f.length;m++){var a=f[m]+"MatchesSelector";if(b[a])return a}}();return function(d,f){return d[b](f)}});
(function(b,d){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(f){return d(b,f)}):"object"==typeof module&&module.exports?module.exports=d(b,require("desandro-matches-selector")):b.fizzyUIUtils=d(b,b.matchesSelector)})(window,function(b,d){var f={extend:function(a,l){for(var b in l)a[b]=l[b];return a},modulo:function(a,l){return(a%l+l)%l},makeArray:function(a){var l=[];if(Array.isArray(a))l=a;else if(a&&"number"==typeof a.length)for(var b=
0;b<a.length;b++)l.push(a[b]);else l.push(a);return l},removeFrom:function(a,l){var b=a.indexOf(l);-1!=b&&a.splice(b,1)},getParent:function(a,l){for(;a!=document.body;)if(a=a.parentNode,d(a,l))return a},getQueryElement:function(a){return"string"==typeof a?document.querySelector(a):a},handleEvent:function(a){var l="on"+a.type;this[l]&&this[l](a)},filterFindElements:function(a,l){a=f.makeArray(a);var b=[];return a.forEach(function(a){if(a instanceof HTMLElement){if(!l)return void b.push(a);d(a,l)&&
b.push(a);a=a.querySelectorAll(l);for(var f=0;f<a.length;f++)b.push(a[f])}}),b},debounceMethod:function(a,b,f){var l=a.prototype[b],d=b+"Timeout";a.prototype[b]=function(){var a=this[d];a&&clearTimeout(a);var e=arguments,g=this;this[d]=setTimeout(function(){l.apply(g,e);delete g[d]},f||100)}},docReady:function(a){"complete"==document.readyState?a():document.addEventListener("DOMContentLoaded",a)},toDashed:function(a){return a.replace(/(.)([A-Z])/g,function(a,b,f){return b+"-"+f}).toLowerCase()}},
m=b.console;return f.htmlInit=function(a,l){f.docReady(function(){var d=f.toDashed(l),n="data-"+d,p=document.querySelectorAll("["+n+"]");d=document.querySelectorAll(".js-"+d);p=f.makeArray(p).concat(f.makeArray(d));var c=n+"-options",e=b.jQuery;p.forEach(function(g){var h=g.getAttribute(n)||g.getAttribute(c);try{var b=h&&JSON.parse(h)}catch(k){return void(m&&m.error("Error parsing "+n+" on "+g.className+": "+k))}b=new a(g,b);e&&e.data(g,l,b)})})},f});
(function(b,d){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],d):"object"==typeof module&&module.exports?module.exports=d(require("ev-emitter"),require("get-size")):(b.Outlayer={},b.Outlayer.Item=d(b.EvEmitter,b.getSize))})(window,function(b,d){function f(a,h){a&&(this.element=a,this.layout=h,this.position={x:0,y:0},this._create())}var m=document.documentElement.style,a="string"==typeof m.transition?"transition":"WebkitTransition";m="string"==
typeof m.transform?"transform":"WebkitTransform";var l={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[a],q={transform:m,transition:a,transitionDuration:a+"Duration",transitionProperty:a+"Property",transitionDelay:a+"Delay"},n=f.prototype=Object.create(b.prototype);n.constructor=f;n._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})};n.handleEvent=function(a){var g="on"+a.type;this[g]&&this[g](a)};n.getSize=function(){this.size=
d(this.element)};n.css=function(a){var g=this.element.style,c;for(c in a)g[q[c]||c]=a[c]};n.getPosition=function(){var a=getComputedStyle(this.element),h=this.layout._getOption("originLeft"),c=this.layout._getOption("originTop"),k=a[h?"left":"right"],e=a[c?"top":"bottom"];a=this.layout.size;k=-1!=k.indexOf("%")?parseFloat(k)/100*a.width:parseInt(k,10);e=-1!=e.indexOf("%")?parseFloat(e)/100*a.height:parseInt(e,10);k=isNaN(k)?0:k;e=isNaN(e)?0:e;k-=h?a.paddingLeft:a.paddingRight;e-=c?a.paddingTop:a.paddingBottom;
this.position.x=k;this.position.y=e};n.layoutPosition=function(){var a=this.layout.size,h={},c=this.layout._getOption("originLeft"),k=this.layout._getOption("originTop"),e=c?"right":"left";h[c?"left":"right"]=this.getXValue(this.position.x+a[c?"paddingLeft":"paddingRight"]);h[e]="";c=k?"bottom":"top";h[k?"top":"bottom"]=this.getYValue(this.position.y+a[k?"paddingTop":"paddingBottom"]);h[c]="";this.css(h);this.emitEvent("layout",[this])};n.getXValue=function(a){var g=this.layout._getOption("horizontal");
return this.layout.options.percentPosition&&!g?a/this.layout.size.width*100+"%":a+"px"};n.getYValue=function(a){var g=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&g?a/this.layout.size.height*100+"%":a+"px"};n._transitionTo=function(a,h){this.getPosition();var g=this.position.x,k=this.position.y,c=parseInt(a,10),e=parseInt(h,10);c=c===this.position.x&&e===this.position.y;if(this.setPosition(a,h),c&&!this.isTransitioning)return void this.layoutPosition();c={};c.transform=
this.getTranslate(a-g,h-k);this.transition({to:c,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})};n.getTranslate=function(a,c){var g=this.layout._getOption("originLeft"),k=this.layout._getOption("originTop");return a=g?a:-a,c=k?c:-c,"translate3d("+a+"px, "+c+"px, 0)"};n.goTo=function(a,c){this.setPosition(a,c);this.layoutPosition()};n.moveTo=n._transitionTo;n.setPosition=function(a,c){this.position.x=parseInt(a,10);this.position.y=parseInt(c,10)};n._nonTransition=function(a){this.css(a.to);
a.isCleaning&&this._removeStyles(a.to);for(var c in a.onTransitionEnd)a.onTransitionEnd[c].call(this)};n.transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var c=this._transn,g;for(g in a.onTransitionEnd)c.onEnd[g]=a.onTransitionEnd[g];for(g in a.to)c.ingProperties[g]=!0,a.isCleaning&&(c.clean[g]=!0);a.from&&this.css(a.from);this.enableTransition(a.to);this.css(a.to);this.isTransitioning=!0};var p="opacity,"+function(a){return a.replace(/([A-Z])/g,
function(a){return"-"+a.toLowerCase()})}(m);n.enableTransition=function(){if(!this.isTransitioning){var a=this.layout.options.transitionDuration;this.css({transitionProperty:p,transitionDuration:"number"==typeof a?a+"ms":a,transitionDelay:this.staggerDelay||0});this.element.addEventListener(l,this,!1)}};n.onwebkitTransitionEnd=function(a){this.ontransitionend(a)};n.onotransitionend=function(a){this.ontransitionend(a)};var c={"-webkit-transform":"transform"};n.ontransitionend=function(a){if(a.target===
this.element){var e=this._transn,g=c[a.propertyName]||a.propertyName;delete e.ingProperties[g];a:{for(k in e.ingProperties){var k=!1;break a}k=!0}if(k&&this.disableTransition(),g in e.clean&&(this.element.style[a.propertyName]="",delete e.clean[g]),g in e.onEnd)e.onEnd[g].call(this),delete e.onEnd[g];this.emitEvent("transitionEnd",[this])}};n.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(l,this,!1);this.isTransitioning=!1};n._removeStyles=function(a){var c=
{},e;for(e in a)c[e]="";this.css(c)};var e={transitionProperty:"",transitionDuration:"",transitionDelay:""};return n.removeTransitionStyles=function(){this.css(e)},n.stagger=function(a){a=isNaN(a)?0:a;this.staggerDelay=a+"ms"},n.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])},n.remove=function(){return a&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):
void this.removeElem()},n.reveal=function(){delete this.isHidden;this.css({display:""});var a=this.layout.options,c={},e=this.getHideRevealTransitionEndProperty("visibleStyle");c[e]=this.onRevealTransitionEnd;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:c})},n.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},n.getHideRevealTransitionEndProperty=function(a){a=this.layout.options[a];if(a.opacity)return"opacity";for(var c in a)return c},
n.hide=function(){this.isHidden=!0;this.css({display:""});var a=this.layout.options,c={},e=this.getHideRevealTransitionEndProperty("hiddenStyle");c[e]=this.onHideTransitionEnd;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:c})},n.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},n.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},f});
(function(b,d){"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(f,m,a,l){return d(b,f,m,a,l)}):"object"==typeof module&&module.exports?module.exports=d(b,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):b.Outlayer=d(b,b.EvEmitter,b.getSize,b.fizzyUIUtils,b.Outlayer.Item)})(window,function(b,d,f,m,a){function l(a,c){var k=m.getQueryElement(a);if(!k)return void(n&&
n.error("Bad element for "+this.constructor.namespace+": "+(k||a)));this.element=k;p&&(this.$element=p(this.element));this.options=m.extend({},this.constructor.defaults);this.option(c);k=++e;this.element.outlayerGUID=k;g[k]=this;this._create();this._getOption("initLayout")&&this.layout()}function q(a){function k(){a.apply(this,arguments)}return k.prototype=Object.create(a.prototype),k.prototype.constructor=k,k}var n=b.console,p=b.jQuery,c=function(){},e=0,g={};l.namespace="outlayer";l.Item=a;l.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 h=l.prototype;m.extend(h,d.prototype);h.option=function(a){m.extend(this.options,a)};h._getOption=function(a){var k=this.constructor.compatOptions[a];return k&&void 0!==this.options[k]?this.options[k]:this.options[a]};l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",
layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"};h._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);m.extend(this.element.style,this.options.containerStyle);this._getOption("resize")&&this.bindResize()};h.reloadItems=function(){this.items=this._itemize(this.element.children)};h._itemize=function(a){a=this._filterFindItemElements(a);for(var k=this.constructor.Item,c=[],
e=0;e<a.length;e++){var g=new k(a[e],this);c.push(g)}return c};h._filterFindItemElements=function(a){return m.filterFindElements(a,this.options.itemSelector)};h.getItemElements=function(){return this.items.map(function(a){return a.element})};h.layout=function(){this._resetLayout();this._manageStamps();var a=this._getOption("layoutInstant");this.layoutItems(this.items,void 0!==a?a:!this._isLayoutInited);this._isLayoutInited=!0};h._init=h.layout;h._resetLayout=function(){this.getSize()};h.getSize=function(){this.size=
f(this.element)};h._getMeasurement=function(a,c){var k,e=this.options[a];e?("string"==typeof e?k=this.element.querySelector(e):e instanceof HTMLElement&&(k=e),this[a]=k?f(k)[c]:e):this[a]=0};h.layoutItems=function(a,c){a=this._getItemsForLayout(a);this._layoutItems(a,c);this._postLayout()};h._getItemsForLayout=function(a){return a.filter(function(a){return!a.isIgnored})};h._layoutItems=function(a,c){if(this._emitCompleteOnItems("layout",a),a&&a.length){var k=[];a.forEach(function(a){var e=this._getItemLayoutPosition(a);
e.item=a;e.isInstant=c||a.isLayoutInstant;k.push(e)},this);this._processLayoutQueue(k)}};h._getItemLayoutPosition=function(){return{x:0,y:0}};h._processLayoutQueue=function(a){this.updateStagger();a.forEach(function(a,k){this._positionItem(a.item,a.x,a.y,a.isInstant,k)},this)};h.updateStagger=function(){var a=this.options.stagger;if(null===a||void 0===a)a=void(this.stagger=0);else{if("number"!=typeof a){var c=a.match(/(^\d*\.?\d*)(\w*)/);a=c&&c[1];c=c&&c[2];a.length?(a=parseFloat(a),a*=v[c]||1):a=
0}a=(this.stagger=a,this.stagger)}return a};h._positionItem=function(a,c,e,g,b){g?a.goTo(c,e):(a.stagger(b*this.stagger),a.moveTo(c,e))};h._postLayout=function(){this.resizeContainer()};h.resizeContainer=function(){if(this._getOption("resizeContainer")){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}};h._getContainerSize=c;h._setContainerMeasure=function(a,c){if(void 0!==a){var k=this.size;k.isBorderBox&&(a+=c?k.paddingLeft+k.paddingRight+
k.borderLeftWidth+k.borderRightWidth:k.paddingBottom+k.paddingTop+k.borderTopWidth+k.borderBottomWidth);a=Math.max(a,0);this.element.style[c?"width":"height"]=a+"px"}};h._emitCompleteOnItems=function(a,c){function k(){g.dispatchEvent(a+"Complete",null,[c])}function e(){h++;h==b&&k()}var g=this,b=c.length;if(!c||!b)return void k();var h=0;c.forEach(function(c){c.once(a,e)})};h.dispatchEvent=function(a,c,e){var k=c?[c].concat(e):e;if(this.emitEvent(a,k),p)(this.$element=this.$element||p(this.element),
c)?(c=p.Event(c),c.type=a,this.$element.trigger(c,e)):this.$element.trigger(a,e)};h.ignore=function(a){(a=this.getItem(a))&&(a.isIgnored=!0)};h.unignore=function(a){(a=this.getItem(a))&&delete a.isIgnored};h.stamp=function(a){(a=this._find(a))&&(this.stamps=this.stamps.concat(a),a.forEach(this.ignore,this))};h.unstamp=function(a){(a=this._find(a))&&a.forEach(function(a){m.removeFrom(this.stamps,a);this.unignore(a)},this)};h._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),
m.makeArray(a)):void 0};h._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))};h._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),c=this.size;this._boundingRect={left:a.left+c.paddingLeft+c.borderLeftWidth,top:a.top+c.paddingTop+c.borderTopWidth,right:a.right-(c.paddingRight+c.borderRightWidth),bottom:a.bottom-(c.paddingBottom+c.borderBottomWidth)}};h._manageStamp=c;h._getElementOffset=function(a){var c=
a.getBoundingClientRect(),e=this._boundingRect;a=f(a);return{left:c.left-e.left-a.marginLeft,top:c.top-e.top-a.marginTop,right:e.right-c.right-a.marginRight,bottom:e.bottom-c.bottom-a.marginBottom}};h.handleEvent=m.handleEvent;h.bindResize=function(){b.addEventListener("resize",this);this.isResizeBound=!0};h.unbindResize=function(){b.removeEventListener("resize",this);this.isResizeBound=!1};h.onresize=function(){this.resize()};m.debounceMethod(l,"onresize",100);h.resize=function(){this.isResizeBound&&
this.needsResizeLayout()&&this.layout()};h.needsResizeLayout=function(){var a=f(this.element);return this.size&&a&&a.innerWidth!==this.size.innerWidth};h.addItems=function(a){a=this._itemize(a);return a.length&&(this.items=this.items.concat(a)),a};h.appended=function(a){a=this.addItems(a);a.length&&(this.layoutItems(a,!0),this.reveal(a))};h.prepended=function(a){a=this._itemize(a);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)}};h.reveal=function(a){if(this._emitCompleteOnItems("reveal",a),a&&a.length){var c=this.updateStagger();a.forEach(function(a,e){a.stagger(e*c);a.reveal()})}};h.hide=function(a){if(this._emitCompleteOnItems("hide",a),a&&a.length){var c=this.updateStagger();a.forEach(function(a,e){a.stagger(e*c);a.hide()})}};h.revealItemElements=function(a){a=this.getItems(a);this.reveal(a)};h.hideItemElements=function(a){a=this.getItems(a);this.hide(a)};h.getItem=function(a){for(var c=
0;c<this.items.length;c++){var e=this.items[c];if(e.element==a)return e}};h.getItems=function(a){a=m.makeArray(a);var c=[];return a.forEach(function(a){(a=this.getItem(a))&&c.push(a)},this),c};h.remove=function(a){a=this.getItems(a);this._emitCompleteOnItems("remove",a);a&&a.length&&a.forEach(function(a){a.remove();m.removeFrom(this.items,a)},this)};h.destroy=function(){var a=this.element.style;a.height="";a.position="";a.width="";this.items.forEach(function(a){a.destroy()});this.unbindResize();delete g[this.element.outlayerGUID];
delete this.element.outlayerGUID;p&&p.removeData(this.element,this.constructor.namespace)};l.data=function(a){return(a=(a=m.getQueryElement(a))&&a.outlayerGUID)&&g[a]};l.create=function(c,e){var g=q(l);return g.defaults=m.extend({},l.defaults),m.extend(g.defaults,e),g.compatOptions=m.extend({},l.compatOptions),g.namespace=c,g.data=l.data,g.Item=q(a),m.htmlInit(g,c),p&&p.bridget&&p.bridget(c,g),g};var v={ms:1,s:1E3};return l.Item=a,l});
(function(b,d){"function"==typeof define&&define.amd?define("packery/js/rect",d):"object"==typeof module&&module.exports?module.exports=d():(b.Packery=b.Packery||{},b.Packery.Rect=d())})(window,function(){function b(f){for(var d in b.defaults)this[d]=b.defaults[d];for(d in f)this[d]=f[d]}b.defaults={x:0,y:0,width:0,height:0};var d=b.prototype;return d.contains=function(b){var f=b.width||0,a=b.height||0;return this.x<=b.x&&this.y<=b.y&&this.x+this.width>=b.x+f&&this.y+this.height>=b.y+a},d.overlaps=
function(b){var f=this.x+this.width,a=this.y+this.height,l=b.y+b.height;return this.x<b.x+b.width&&f>b.x&&this.y<l&&a>b.y},d.getMaximalFreeRects=function(f){if(!this.overlaps(f))return!1;var d,a=[],l=this.x+this.width,q=this.y+this.height,n=f.x+f.width,p=f.y+f.height;return this.y<f.y&&(d=new b({x:this.x,y:this.y,width:this.width,height:f.y-this.y}),a.push(d)),l>n&&(d=new b({x:n,y:this.y,width:l-n,height:this.height}),a.push(d)),q>p&&(d=new b({x:this.x,y:p,width:this.width,height:q-p}),a.push(d)),
this.x<f.x&&(d=new b({x:this.x,y:this.y,width:f.x-this.x,height:this.height}),a.push(d)),a},d.canFit=function(b){return this.width>=b.width&&this.height>=b.height},b});
(function(b,d){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],d);else if("object"==typeof module&&module.exports)module.exports=d(require("./rect"));else{var f=b.Packery=b.Packery||{};f.Packer=d(f.Rect)}})(window,function(b){function d(a,b,d){this.width=a||0;this.height=b||0;this.sortDirection=d||"downwardLeftToRight";this.reset()}var f=d.prototype;f.reset=function(){this.spaces=[];var a=new b({x:0,y:0,width:this.width,height:this.height});this.spaces.push(a);this.sorter=
m[this.sortDirection]||m.downwardLeftToRight};f.pack=function(a){for(var b=0;b<this.spaces.length;b++){var d=this.spaces[b];if(d.canFit(a)){this.placeInSpace(a,d);break}}};f.columnPack=function(a){for(var b=0;b<this.spaces.length;b++){var d=this.spaces[b];if(d.x<=a.x&&d.x+d.width>=a.x+a.width&&d.height>=a.height-.01){a.y=d.y;this.placed(a);break}}};f.rowPack=function(a){for(var b=0;b<this.spaces.length;b++){var d=this.spaces[b];if(d.y<=a.y&&d.y+d.height>=a.y+a.height&&d.width>=a.width-.01){a.x=d.x;
this.placed(a);break}}};f.placeInSpace=function(a,b){a.x=b.x;a.y=b.y;this.placed(a)};f.placed=function(a){for(var b=[],d=0;d<this.spaces.length;d++){var f=this.spaces[d],m=f.getMaximalFreeRects(a);m?b.push.apply(b,m):b.push(f)}this.spaces=b;this.mergeSortSpaces()};f.mergeSortSpaces=function(){d.mergeRects(this.spaces);this.spaces.sort(this.sorter)};f.addSpace=function(a){this.spaces.push(a);this.mergeSortSpaces()};d.mergeRects=function(a){var b=0,d=a[b];a:for(;d;){for(var f=0,m=a[b+f];m;){if(m==d)f++;
else{if(m.contains(d)){a.splice(b,1);d=a[b];continue a}d.contains(m)?a.splice(b+f,1):f++}m=a[b+f]}b++;d=a[b]}return a};var m={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return d});
(function(b,d){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],d):"object"==typeof module&&module.exports?module.exports=d(require("outlayer"),require("./rect")):b.Packery.Item=d(b.Outlayer,b.Packery.Rect)})(window,function(b,d){var f="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",m=function(){b.Item.apply(this,arguments)},a=m.prototype=Object.create(b.Item.prototype),l=a._create;a._create=function(){l.call(this);
this.rect=new d};var q=a.moveTo;return a.moveTo=function(a,b){var c=Math.abs(this.position.x-a),e=Math.abs(this.position.y-b);return this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>c&&1>e?void this.goTo(a,b):void q.apply(this,arguments)},a.enablePlacing=function(){this.removeTransitionStyles();this.isTransitioning&&f&&(this.element.style[f]="none");this.isTransitioning=!1;this.getSize();this.layout._setRectSize(this.element,this.rect);this.isPlacing=!0},a.disablePlacing=function(){this.isPlacing=
!1},a.removeElem=function(){this.element.parentNode.removeChild(this.element);this.layout.packer.addSpace(this.rect);this.emitEvent("remove",[this])},a.showDropPlaceholder=function(){var a=this.dropPlaceholder;a||(a=this.dropPlaceholder=document.createElement("div"),a.className="packery-drop-placeholder",a.style.position="absolute");a.style.width=this.size.width+"px";a.style.height=this.size.height+"px";this.positionDropPlaceholder();this.layout.element.appendChild(a)},a.positionDropPlaceholder=function(){this.dropPlaceholder.style[f]=
"translate("+this.rect.x+"px, "+this.rect.y+"px)"},a.hideDropPlaceholder=function(){var a=this.dropPlaceholder.parentNode;a&&a.removeChild(this.dropPlaceholder)},m});
(function(b,d){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],d):"object"==typeof module&&module.exports?module.exports=d(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):b.Packery=d(b.getSize,b.Outlayer,b.Packery.Rect,b.Packery.Packer,b.Packery.Item)})(window,function(b,d,f,m,a){function l(a,e){return a.position.y-e.position.y||a.position.x-e.position.x}
function q(a,e){return a.position.x-e.position.x||a.position.y-e.position.y}f.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var n=d.create("packery");n.Item=a;a=n.prototype;a._create=function(){d.prototype._create.call(this);this.packer=new m;this.shiftPacker=new m;this.isEnabled=!0;this.dragItemCount=0;var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},
dragEnd:function(){a.itemDragEnd(this.element)}};this.handleUIDraggable={start:function(c,b){b&&a.itemDragStart(c.currentTarget)},drag:function(c,b){b&&a.itemDragMove(c.currentTarget,b.position.left,b.position.top)},stop:function(c,b){b&&a.itemDragEnd(c.currentTarget)}}};a._resetLayout=function(){this.getSize();this._getMeasurements();var a,b,g;this._getOption("horizontal")?(a=1/0,b=this.size.innerHeight+this.gutter,g="rightwardTopToBottom"):(a=this.size.innerWidth+this.gutter,b=1/0,g="downwardLeftToRight");
this.packer.width=this.shiftPacker.width=a;this.packer.height=this.shiftPacker.height=b;this.packer.sortDirection=this.shiftPacker.sortDirection=g;this.packer.reset();this.maxX=this.maxY=0};a._getMeasurements=function(){this._getMeasurement("columnWidth","width");this._getMeasurement("rowHeight","height");this._getMeasurement("gutter","width")};a._getItemLayoutPosition=function(a){if(this._setRectSize(a.element,a.rect),this.isShifting||0<this.dragItemCount){var c=this._getPackMethod();this.packer[c](a.rect)}else this.packer.pack(a.rect);
return this._setMaxXY(a.rect),a.rect};a.shiftLayout=function(){this.isShifting=!0;this.layout();delete this.isShifting};a._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"};a._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX);this.maxY=Math.max(a.y+a.height,this.maxY)};a._setRectSize=function(a,e){var c=b(a),d=c.outerWidth;c=c.outerHeight;(d||c)&&(d=this._applyGridGutter(d,this.columnWidth),c=this._applyGridGutter(c,this.rowHeight));e.width=Math.min(d,
this.packer.width);e.height=Math.min(c,this.packer.height)};a._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b;return Math[c&&1>c?"round":"ceil"](a/b)*b};a._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}};a._manageStamp=function(a){var c;(c=this.getItem(a))&&c.isPlacing?c=c.rect:(c=this._getElementOffset(a),c=new f({x:this._getOption("originLeft")?c.left:c.right,y:this._getOption("originTop")?
c.top:c.bottom}));this._setRectSize(a,c);this.packer.placed(c);this._setMaxXY(c)};a.sortItemsByPosition=function(){var a=this._getOption("horizontal")?q:l;this.items.sort(a)};a.fit=function(a,b,d){(a=this.getItem(a))&&(this.stamp(a.element),a.enablePlacing(),this.updateShiftTargets(a),b=void 0===b?a.rect.x:b,d=void 0===d?a.rect.y:d,this.shift(a,b,d),this._bindFitEvents(a),a.moveTo(a.rect.x,a.rect.y),this.shiftLayout(),this.unstamp(a.element),this.sortItemsByPosition(),a.disablePlacing())};a._bindFitEvents=
function(a){function c(){d++;2==d&&b.dispatchEvent("fitComplete",null,[a])}var b=this,d=0;a.once("layout",c);this.once("layoutComplete",c)};a.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())};a.needsResizeLayout=function(){var a=b(this.element),e=this._getOption("horizontal")?"innerHeight":"innerWidth";return a[e]!=this.size[e]};a.resizeShiftPercentLayout=function(){var a=this._getItemsForLayout(this.items),
e=this._getOption("horizontal"),d=e?"y":"x",h=e?"height":"width",f=e?"rowHeight":"columnWidth";e=e?"innerHeight":"innerWidth";var k=this[f];if(k=k&&k+this.gutter){this._getMeasurements();var l=this[f]+this.gutter;a.forEach(function(a){a.rect[d]=Math.round(a.rect[d]/k)*l})}else{var n=b(this.element)[e]+this.gutter,m=this.packer[h];a.forEach(function(a){a.rect[d]=a.rect[d]/m*n})}this.shiftLayout()};a.itemDragStart=function(a){this.isEnabled&&(this.stamp(a),(a=this.getItem(a))&&(a.enablePlacing(),a.showDropPlaceholder(),
this.dragItemCount++,this.updateShiftTargets(a)))};a.updateShiftTargets=function(a){this.shiftPacker.reset();this._getBoundingRect();var b=this._getOption("originLeft"),c=this._getOption("originTop");this.stamps.forEach(function(a){var d=this.getItem(a);d&&d.isPlacing||(d=this._getElementOffset(a),d=new f({x:b?d.left:d.right,y:c?d.top:d.bottom}),this._setRectSize(a,d),this.shiftPacker.placed(d))},this);var d=this._getOption("horizontal"),l=d?"height":"width";this.shiftTargetKeys=[];this.shiftTargets=
[];var k=this[d?"rowHeight":"columnWidth"];if(k=k&&k+this.gutter){var n=Math.floor((this.shiftPacker[l]+this.gutter)/k);var m=(n-Math.ceil(a.rect[l]/k))*k;for(a=0;n>a;a++)this._addShiftTarget(d?0:a*k,d?a*k:0,m)}else m=this.shiftPacker[l]+this.gutter-a.rect[l],this._addShiftTarget(0,0,m);n=this._getItemsForLayout(this.items);var p=this._getPackMethod();n.forEach(function(a){var b=a.rect;this._setRectSize(a.element,b);this.shiftPacker[p](b);this._addShiftTarget(b.x,b.y,m);a=d?b.x+b.width:b.x;var c=
d?b.y:b.y+b.height;if(this._addShiftTarget(a,c,m),k)for(var e=Math.round(b[l]/k),g=1;e>g;g++)this._addShiftTarget(d?a:b.x+k*g,d?b.y+k*g:c,m)},this)};a._addShiftTarget=function(a,b,d){var c=this._getOption("horizontal")?b:a;0!==c&&c>d||(d=a+","+b,-1!=this.shiftTargetKeys.indexOf(d)||(this.shiftTargetKeys.push(d),this.shiftTargets.push({x:a,y:b})))};a.shift=function(a,b,d){var c,e=1/0;this.shiftTargets.forEach(function(a){var g=b-a.x;var f=d-a.y;g=Math.sqrt(g*g+f*f);e>g&&(c=a,e=g)});a.rect.x=c.x;a.rect.y=
c.y};a.itemDragMove=function(a,b,d){function c(){g.shift(e,b,d);e.positionDropPlaceholder();g.layout()}var e=this.isEnabled&&this.getItem(a);if(e){b-=this.size.paddingLeft;d-=this.size.paddingTop;var g=this;a=new Date;this._itemDragTime&&120>a-this._itemDragTime?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(c,120)):(c(),this._itemDragTime=a)}};a.itemDragEnd=function(a){function b(){d++;2==d&&(c.element.classList.remove("is-positioning-post-drag"),c.hideDropPlaceholder(),f.dispatchEvent("dragItemPositioned",
null,[c]))}var c=this.isEnabled&&this.getItem(a);if(c){clearTimeout(this.dragTimeout);c.element.classList.add("is-positioning-post-drag");var d=0,f=this;c.once("layout",b);this.once("layoutComplete",b);c.moveTo(c.rect.x,c.rect.y);this.layout();this.dragItemCount=Math.max(0,this.dragItemCount-1);this.sortItemsByPosition();c.disablePlacing();this.unstamp(c.element)}};a.bindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"on")};a.unbindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,
"off")};a._bindDraggabillyEvents=function(a,b){var c=this.handleDraggabilly;a[b]("dragStart",c.dragStart);a[b]("dragMove",c.dragMove);a[b]("dragEnd",c.dragEnd)};a.bindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"on")};a.unbindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"off")};a._bindUIDraggableEvents=function(a,b){var c=this.handleUIDraggable;a[b]("dragstart",c.start)[b]("drag",c.drag)[b]("dragstop",c.stop)};var p=a.destroy;return a.destroy=function(){p.apply(this,
arguments);this.isEnabled=!1},n.Rect=f,n.Packer=m,n});