blazy-8.x-2.x-dev/js/components/grid/blazy.masonry.min.js
js/components/grid/blazy.masonry.min.js
!function(c,s){"use strict";var r="grid",a="flex",l="nativegrid",i=["is-b-loading","is-b-visible"];c.masonry={options:{},resized:!1,columnCount:function(e){var t=this.options.engine;if(t===l)return getComputedStyle(e).gridTemplateColumns.split(" ").length;if(t!==a)return 1;var n=c.find(e,".grid"),t=c.rect(e).width,e=c.rect(n).width,n=c.computeStyle(n),n=e+(parseFloat(n.marginLeft)+parseFloat(n.marginRight));return Math.round(1/(n/t))},toObject:function(e,n){var o,t=this.options,i=t.engine;return i===a&&(o=c.computeStyle(s,t.gap,!0)),e.map(function(e){var t=c.slice(e.childNodes);return i===l&&(o=getComputedStyle(e).gridRowGap),{_el:e,event:n||{},gap:o?parseFloat(o):0,items:t.filter(function(e){return c.hasClass(e,r)&&!c.hasClass(e,"region--bg")}),ncol:0,count:t.length}})},subprocess:function(o){var e,t=this.options,n=this.columnCount(o._el);o.ncol===n&&!o.mod||(c.addClass(o._el,i),o.ncol=n,(e=function(){c.each(o.items,function(e){e.style.removeProperty("margin-top")})})(),1<o.ncol?(c.removeClass(o._el,t.cDisabled),c.each(o.items.slice(n),function(e,t){var n=c.rect(o.items[t]).bottom,t=c.rect(e).top;e.style.marginTop=n+o.gap-t+"px"})):(c.addClass(o._el,t.cDisabled),e()),o.mod=!1,setTimeout(function(){c.removeClass(o._el,i)},300))},init:function(t,n){var o=this;o.options=n;function i(t){s.find(function(e){return e._el===t.target.parentElement&&(o.resized&&o.subprocess(e),!0)}).mod=!0}var s=o.toObject(t),r=new ResizeObserver(function(e){c.each(e,i),o.resized||(o.resized=!0)});var a;a=o.options.unload,setTimeout(function(){var e;c.each(s,function(e){c.each(e.items,function(e){r.observe(e)})}),(e=a)&&(!(t=c.toElms(n.selector)).length||(e=(s=o.toObject(t,e)).find(function(e){return c.hasClass(e._el,n.cName)}))&&(e.mod=!0),o.options.unload=!1),c.each(s,o.subprocess,o)},a===o.options.unload?101:1)}}}(dBlazy,(Drupal,this.document,this.document.documentElement));