/*! * WP Grid Builder Plugin * * @package WP Grid Builder * @author Loïc Blascos * @link https://www.wpgridbuilder.com * @copyright 2019-2023 Loïc Blascos * */ !function(){var t={281:function(){function t(){var t=elementorFrontend,e=t.elements&&t.elements.$document,i=t.utils&&t.utils.lightbox,n=wpgb_settings&&wpgb_settings.lightbox.plugin;if(e&&i&&n){var s=!1,r=i.showModal;r&&(e.on("click",".wpgb-handle-lb",(function(){return s=!0})),i.showModal=function(){!s&&r.apply(void 0,arguments),s=!1})}}window.elementorFrontend&&elementorFrontend.utils&&elementorFrontend.utils.lightbox&&t(),window.jQuery&&jQuery(window).on("elementor/frontend/init",(function(){return elementorFrontend.on("components:init",t)}))},150:function(){"undefined"!=typeof jQuery&&jQuery(document.body).on("wc_cart_button_updated",(function(t,e){var i=e.next();if(e.is('[class*="wpgb-block-"]')&&i.is('[class*="added_to_cart wc-forward"]')){var n=jQuery.grep(e[0].className.split(" "),(function(t){return 0===t.indexOf("wpgb-")})).join(" ");i[0].className=n+" "+i[0].className}}))}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=function(t){var e;"function"==typeof Event?e=new CustomEvent(t):(e=document.createEvent("CustomEvent")).initEvent(t,!0,!0),window.dispatchEvent(e)},e=function(t){if("complete"===document.readyState||"interactive"===document.readyState)return t();document.addEventListener("DOMContentLoaded",t)};function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}function o(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return this.canListen(t,e)?(this.listeners.has(t)||this.listeners.set(t,[]),this.exists(t,e)||this.listeners.get(t).push({listener:e,once:i}),this):this}},{key:"once",value:function(t,e){return this.on(t,e,!0)}},{key:"off",value:function(t,e){var i=this.listeners.get(t)||[],n=i.findIndex((function(t){return t.listener===e}));return n>-1&&i.splice(n,1),i.length<1&&this.listeners.delete(t),this}},{key:"offAll",value:function(){return this.listeners.clear(),this}},{key:"emit",value:function(t){for(var e=this,i=arguments.length,n=new Array(i>1?i-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:0,e=this.instances,i=[];if(!Object.keys(e).length)return[];for(var n in e)(e[n].id||"").toString()===t.toString()&&i.push(e[n]);return i}},{key:"instance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Object.keys(this.instances).length&&this.instances[t]?this.instances[t]:{}}}]),i}(k),S=Math.sign&&Array.from&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.includes&&Element.prototype.matches&&Element.prototype.closest&&NodeList.prototype.forEach&&window.Map&&window.URLSearchParams;function I(){!function(){var t=P();if(!t)return;t.getGalleries()}(),w&&window.easy_fancybox_handler&&window.easy_fancybox_auto&&(jQuery(easy_fancybox_handler),jQuery(easy_fancybox_auto)),b&&"undefined"!=typeof FOOBOX&&"function"==typeof FOOBOX.init&&FOOBOX.init()}function E(){y=window.wpgb_settings&&window.wpgb_settings.lightbox&&window.wpgb_settings.lightbox.plugin?wpgb_settings.lightbox.plugin:"",m=["modulobox","modulobox_lite"].includes(y),w="easy_fancybox"===y,b="foobox"===y,m&&"ModuloBox"in window&&(ModuloBox.prototype.openFromQuery=function(){})}function P(){if(m&&"ModuloBox"in window)return g||((g=new ModuloBox).init(),g)}window.WP_Grid_Builder||(window.WP_Grid_Builder=S?new x:{get:function(){return[]},instance:function(){return[]},instances:function(){return[]},instantiate:function(){return[]},on:function(){return null},off:function(){return null},once:function(){return null},offAll:function(){return null},emit:function(){return null},vendors:{},unsupported:!0}),WP_Grid_Builder.unsupported||(E(),e((function(){E();var t=P();t&&(t.options.history=!1),!w&&window.easy_fancybox_handler&&window.easy_fancybox_auto&&jQuery("a.wpgb-handle-lb").off("click")})));i(281);var A=i(150);i.n(A)();function L(t,e,i){return(e=r(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function O(t){for(var e=1;e=e||i<0||d&&t-u>=o}function g(){var t=Date.now();if(f(t))return y(t);h=setTimeout(g,function(t){var i=e-(t-l);return d?M(i,o-(t-u)):i}(t))}function y(t){return h=void 0,v&&n?p(t):(n=r=void 0,a)}function m(){var t=Date.now(),i=f(t);if(n=arguments,r=this,l=t,i){if(void 0===h)return function(t){return u=t,h=setTimeout(g,e),c?p(t):a}(l);if(d)return h=setTimeout(g,e),p(l)}return void 0===h&&(h=setTimeout(g,e)),a}return e=Number(e)||0,"object"===s(i)&&(c=!!i.leading,v="trailing"in i?!!i.trailing:v),m.cancel=function(){void 0!==h&&clearTimeout(h),u=0,n=l=r=h=void 0},m}var C=function(t){l(i,t);var e=v(i);function i(){var t;n(this,i);for(var s=arguments.length,r=new Array(s),o=0;o0&&void 0!==arguments[0])||arguments[0];t=t?"addEventListener":"removeEventListener",window[t]("load",this),window[t]("resize",this),window[t]("orientationchange",this)}},{key:"onload",value:function(){this.layout()}},{key:"orientationchange",value:function(){this.onresize()}}]),i}(k),B=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"layoutItems",value:function(t){var e=this,i=t.length;this.emit("beforeLayout",[t]),t.forEach((function(t,n){e.lastItem=i-1===n,e.getItemPosition(t)})),delete this.lastItem,this.setLayoutHeight(),this.renderLayout(),this.emit("layout",[this.items])}},{key:"getItems",value:function(){var t=this.element.querySelectorAll(this.options.items);if(this.items=[],t)return this.items=this.setItems(t),t}},{key:"addItems",value:function(t){if(t.length){var e=this.setItems(t);this.items=[].concat(f(this.items),f(e)),this.layoutItems(e),this.emit("added",[t])}}},{key:"removeItems",value:function(t){this.items=this.items.filter((function(e){return!(!t||e.node===e)||(e.node.parentElement.removeChild(e.node),!1)})),this.resetLayout(),this.emit("removed",[t])}},{key:"setItems",value:function(t){return f(t).map((function(t,e){var i=t.querySelector("svg[data-ratio]"),n=i?i.viewBox.baseVal:null;return{node:t,rows:parseInt(t.getAttribute("data-row"),10)||1,columns:parseInt(t.getAttribute("data-col"),10)||1,ratio:n?n.width/n.height:1.5625}}))}},{key:"getItemSizes",value:function(){var t=this.getViewportWidth(),e=this.options.cardSizes,i=Object.keys(e).sort((function(t,e){return t-e})).filter((function(e){return e>=t}));for(var n in e[i=Math.min.apply(Math,f(i))])this[n]=e[i][n]}},{key:"getItemCol",value:function(t){return Math.min(t.columns||1,this.columns)}},{key:"getItemRow",value:function(t){return"horizontal"===this.options.layout?Math.min(t.rows||1,this.options.rowsNumber):t.rows||1}}]),i}(C),R=function(t){l(i,t);var e=v(i);function i(t,s){var r;return n(this,i),(r=e.call(this)).element=t,r.options=s,r.wrapper=t.querySelector(".wpgb-wrapper"),r.viewport=t.querySelector(".wpgb-viewport"),r}return a(i,[{key:"init",value:function(){var t=this.getItems();if(!this.items.length)return!1;this.layout(),this.bindEvents(),this.emit("init",[t])}},{key:"destroy",value:function(){this.bindEvents(!1),this.wrapper.removeAttribute("style"),this.viewport.removeAttribute("style"),this.items.forEach((function(t){return t.node.removeAttribute("style")})),this.items=[]}},{key:"layout",value:function(){this.getMeasurement(),this.setLayoutWidth(),this.resetLayout(),this.layoutItems(this.items)}},{key:"renderLayout",value:function(){var t=this;this.items.forEach((function(e){t.css(e.node,{left:e.x+"px",top:e.y+"px"})}))}},{key:"setLayoutHeight",value:function(){"horizontal"===this.options.layout?this.viewport.style.height=this.maxY-this.gutter+500+"px":this.viewport.style.height=this.maxY-this.gutter+"px"}},{key:"setLayoutWidth",value:function(){if(this.body=this.getStyle(document.body),this.options.fullWidth){var t=this.getStyle(this.wrapper);this.css(this.wrapper,{left:this.body.left-t.left+t.marginLeft+"px",width:this.body.width-t.marginLeft-t.marginRight+"px"}),this.grid=this.getSize(this.viewport)}}},{key:"getMeasurement",value:function(){this.wrapper.removeAttribute("style"),this.grid=this.getSize(this.viewport),this.getItemSizes()}},{key:"getViewportWidth",value:function(){return(document.documentElement||document.body).clientWidth}},{key:"getSize",value:function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom}}},{key:"getStyle",value:function(t){var e=t.getBoundingClientRect(),i=e.left,n=e.top,s=e.right,r=e.bottom,o=getComputedStyle(t),a=["Top","Right","Bottom","Left"],h={left:i,top:n,right:s,bottom:r};return["margin","padding"].forEach((function(t){a.forEach((function(e){var i=parseFloat(o[t+e]);h[t+e]=i||0}))})),h.width=Math.max(0,t.clientWidth-(h.marginLeft+h.marginRight)),h.height=Math.max(0,t.clientHeight-(h.paddingLeft+h.paddingRight)),h}},{key:"css",value:function(t,e){var i=this.options.rightToLeft;for(var n in e)t.style[i&&"left"===n?"right":n]=e[n]}}]),i}(B),F=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"resetLayout",value:function(){this.maxX=0,this.maxY=0,this.placed=[]}},{key:"getItemPosition",value:function(t){var e=(this.grid.width+this.gutter)/this.columns,i=this.getItemCol(t);t.x=this.maxX,t.y=0,t.width=Math.ceil(10*(e*i-this.gutter))/10,this.css(t.node,{width:t.width+"px",height:""});var n=this.getSize(t.node);n.height||(n.height=3*e/4,this.css(t.node,{height:n.height+"px"})),this.placed.push(t),this.maxX+=e*i,this.maxY=Math.max(this.maxY,n.height+this.gutter),this.lastItem&&0!==this.x&&this.equalColumns()}},{key:"equalColumns",value:function(){var t=this;this.options.equalColumns&&this.placed.forEach((function(e){t.css(e.node,{height:t.maxY-t.gutter+"px"})}))}}]),i}(R),T=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"resetLayout",value:function(){this.maxX=0,this.maxY=0,this.rowY=0,this.rowItems=[],this.rowWidth=0,this.prevProg=0,this.prevItem=null}},{key:"getItemPosition",value:function(t){"horizontal"===this.options.layout?this.layoutHorizontal(t):this.layoutVertical(t)}},{key:"layoutHorizontal",value:function(t){var e=t.ratio*this.height,i=this.rowItems.index;(!i||i>this.options.rowsNumber-1)&&(i=this.rowItems.index=0),t.x=this.rowItems[i]?this.rowItems[i].x:0,t.y=i*(this.height+this.gutter),t.width=e,t.height=this.height,this.rowItems[i]={x:t.x+e+this.gutter},this.maxY=this.options.rowsNumber*(this.height+this.gutter),this.maxX=this.maxX=this.getMaxRowWidth())return this.layoutRow(),void this.resetRow();this.lastItem&&this.layoutRow(!0),this.prevProg=this.getRowProgress()}},{key:"layoutRow",value:function(t){var e=this.getClosestHeigth(),i=!this.options.fillLastRow&&t||this.options.equalRows?this.height:e,n=this.options.equalRows&&!t||this.options.fillLastRow?e/i:1;this.maxX=t?this.getCenterOffset():0;for(var s=0,r=this.rowItems.length;s1&&Math.abs(n-this.height)e&&(this.equalColumns(),this.x=0,this.y=this.maxY,this.placed=[]),t.x=this.x,t.y=this.y,this.css(t.node,{width:Math.ceil(10*(n-this.gutter))/10+"px",height:""});var s=this.getSize(t.node);s.height||(s.height=3*i/4,this.css(t.node,{height:s.height+"px"})),this.placed.push(t),this.maxY=Math.max(this.maxY,this.y+s.height+this.gutter),this.x+=n,this.lastItem&&0!==this.x&&this.equalColumns()}},{key:"equalColumns",value:function(){var t=this;this.options.equalColumns&&this.placed.forEach((function(e){t.css(e.node,{height:t.maxY-t.y-t.gutter+"px"})}))}}]),i}(R),j=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"resetLayout",value:function(){this.x=0,this.y=0,this.maxY=0,this.maxX=0,this.colId=0,this.colYs=Array(this.columns).fill(0)}},{key:"getItemPosition",value:function(t){var e=(this.grid.width+this.gutter)/this.columns,i=this.getItemCol(t),n=this[this.options.horizontalOrder?"getHorColPosition":"getTopColPosition"](i),s=i+n.col;this.css(t.node,{width:e*i-this.gutter+"px"});var r=this.getSize(t.node);r.height||(r.height=3*e/4);for(var o=n.y+r.height+this.gutter,a=n.col;a1&&e+t>this.columns&&(e=0),this.colId=e+t,{col:e,y:this.getColGroupY(e,t)}}}]),i}(R),q=function(){function t(e){n(this,t);var i={x:0,y:0,width:0,height:0};for(var s in i)this[s]=i[s];for(var r in e)this[r]=e[r]}return a(t,[{key:"contains",value:function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i}},{key:"overlaps",value:function(t){var e=this.x+this.width,i=this.y+this.height,n=t.x+t.width,s=t.y+t.height;return this.xt.x&&this.yt.y}},{key:"getMaximalFreeRects",value:function(e){if(!this.overlaps(e))return!1;var i,n=[],s=this.x+this.width,r=this.y+this.height,o=e.x+e.width,a=e.y+e.height;return this.yo&&(i=new t({x:o,y:this.y,width:s-o,height:this.height}),n.push(i)),r>a&&(i=new t({x:this.x,y:a,width:this.width,height:r-a}),n.push(i)),this.x=t.width&&this.height>=t.height}}]),t}(),W=function(){function t(){n(this,t)}return a(t,[{key:"reset",value:function(){var t={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};this.spaces=[],this.spaces.push(new q({x:0,y:0,width:this.width,height:this.height})),this.sorter=t[this.direct]||t.downwardLeftToRight}},{key:"pack",value:function(t){for(var e=0;e=t.x+t.width&&i.height>=t.height-.01){t.y=i.y,this.placed(t);break}}}},{key:"rowPack",value:function(t){for(var e=0;e=t.y+t.height&&i.width>=t.width-.01){t.x=i.x,this.placed(t);break}}}},{key:"placeInSpace",value:function(t,e){t.x=e.x,t.y=e.y,this.placed(t)}},{key:"placed",value:function(t){for(var e=[],i=0;i0&&void 0!==arguments[0])||arguments[0];t=t?"addEventListener":"removeEventListener",this.image[t]("load",this),this.image[t]("error",this)}},{key:"handleEvent",value:function(t){this.onload("load"===t.type)}}]),t}(),Q={selector:"[data-wpgb-src]",source:"data-wpgb-src",thumb:"data-wpgb-thumb",spinner:"wpgb-lazy-spinner",treshold:300},U=function(t){l(i,t);var e=v(i);function i(t){var s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),L(c(s=e.call(this)),"handleEvent",G((function(t){s.check()}),60)),s.options=O(O({},Q),r),s}return a(i,[{key:"query",value:function(t){this.items=f(t.querySelectorAll(this.options.selector))}},{key:"addItems",value:function(t){this.unObserve(),this.query(t),this.observe()}},{key:"canObserve",value:function(){return"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}},{key:"observe",value:function(){var t=this;if(this.items.length){if(this.canObserve())return this.observer(),void this.items.forEach((function(e){return t.intersection.observe(e)}));this.bindEvents(),requestAnimationFrame((function(){return setTimeout((function(){return t.check()}))}))}}},{key:"unObserve",value:function(){if(this.intersection)return this.intersection.disconnect(),void delete this.intersection;this.bindEvents(!1)}},{key:"observer",value:function(){var t=this;this.intersection=new IntersectionObserver((function(e,i){e.forEach((function(e,n){if(e.isIntersecting){var s=t.items.indexOf(e.target);t.items.splice(s,1),i.unobserve(e.target),t.loadImage(e.target)}}))}),{rootMargin:this.options.treshold+"px"})}},{key:"bindEvents",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t=t?"addEventListener":"removeEventListener",window[t]("load",this),window[t]("resize",this),document[t]("scroll",this),window[t]("orientationchange",this)}},{key:"check",value:function(){var t=this;this.items=this.items.filter((function(e,i){return!t.inView(e)||(t.loadImage(e),!1)})),this.isComplete()}},{key:"inView",value:function(t){var e=t.getBoundingClientRect(),i=e.top,n=e.bottom,s=window.innerHeight;return i>=this.options.treshold&&i<=s||n>=0&&n<=s}},{key:"loadImage",value:function(t){var e=this.imageLoaded.bind(this),i=t.getAttribute(this.options.source),n=t.getAttribute(this.options.thumb);i&&(n&&(t.style.backgroundImage="url("+n+")"),t.removeAttribute(this.options.source),t.removeAttribute(this.options.thumb),this.emit("load",[i]),new V(i,t,e))}},{key:"imageLoaded",value:function(t,e,i){if("IMG"===t.nodeName)t.src=e;else{if(t.parentNode){var n=document.createElement(t.tagName);n.className=t.className,n.style.backgroundImage="url("+e+")",n.classList.remove("wpgb-lazy-load",this.options.thumb,this.options.spinner),""===n.className&&n.removeAttribute("class"),t.parentNode.insertBefore(n,t.nextElementSibling)}setTimeout((function(){t.parentNode&&t.parentNode.removeChild(t)}),600)}t.classList.remove(this.options.spinner),this.emit("loaded",[e,i])}},{key:"isComplete",value:function(){this.items.length||this.bindEvents(!1)}}]),i}(k),H=U,J={draggable:1,threshold:3,slideAlign:"center",groupCells:"50%",rightToLeft:0,initialIndex:0,contain:0,freeScroll:0,freeFriction:.075,friction:.285,attraction:.025,autoPlay:0,arrowShape:"M18,12 L10,20 L18,28 M10,20 L30,20",sliderSelector:".wpgb-viewport",pageDotsSelector:".wpgb-page-dots",prevButtonSelector:".wpgb-prev-button",nextButtonSelector:".wpgb-next-button",carouselClass:"wpgb-carousel",draggingClass:"wpgb-is-dragging",pageDotAriaLabel:"Page dot %d"},$=!1;try{var Z=Object.defineProperty({},"passive",{get:function(){return $=!0}});window.addEventListener("test",null,Z),window.removeEventListener("test",null,Z)}catch(t){}var K,tt,et=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"attachPointers",value:function(t){this.pointer={},this.pointedElement=t,this.passiveListener=$,this._getEvents(),this._unifyEvents(),this._bindEvents()}},{key:"_getEvents",value:function(){this.events={down:"mousedown",move:"mousemove",up:"mouseup"},window.PointerEvent?this.events={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel"}:"ontouchstart"in window&&(this.events={down:"touchstart",move:"touchmove",up:"touchend",cancel:"touchcancel"})}},{key:"_unifyEvents",value:function(){for(var t in this.events)this["on".concat(this.events[t])]=this._handleEvent}},{key:"_bindEvents",value:function(){var t=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e=e?"add":"remove",(arguments.length>0&&void 0!==arguments[0]?arguments[0]:["down"]).forEach((function(i){("down"===i?t.pointedElement:window)["".concat(e,"EventListener")](t.events[i],t,!!t.passiveListener&&{passive:!1})}))}},{key:"handleEvent",value:function(t){var e="on"+t.type;this[e]&&this[e](t)}},{key:"_handleEvent",value:function(t){if(this.isPointer(t)&&this.hasPointer(t))for(var e in this.events)if(this.events[e]===t.type)return this["_pointer".concat(e)](t)}},{key:"isPointer",value:function(t){return!t.button||t.button<1}},{key:"hasPointer",value:function(t){for(var e=t.changedTouches||[t],i=0;i1&&void 0!==arguments[1]?arguments[1]:{x:3,y:3},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.threshold=e,this.attachPointers(t),t.addEventListener("click",this),i&&window.addEventListener("touchmove",this.preventScrolling.bind(this),!!this.passiveListener&&{passive:!1})}},{key:"canDragTarget",value:function(t){var e=t.target,i=e.nodeName,n=e.type;return!(it.nodes.includes(i)||it.types.includes(n))}},{key:"canDragStart",value:function(t,e){var i=this.threshold,n=i.x,s=i.y,r=180*Math.atan2(Math.abs(e),Math.abs(t))/Math.PI,o=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return!1!==n&&o>n&&r<=45||!1!==s&&o>s&&r>=45}},{key:"canPreventDefault",value:function(t){var e=t.type,i=t.pointerType;return"touchstart"!==e&&"touch"!==i}},{key:"getPointerVector",value:function(t){return{x:t.pageX-this.pointerStart.x,y:t.pageY-this.pointerStart.y}}},{key:"pointerDown",value:function(t,e){this.preventClick=!1,this.canDragTarget(t)?(this.pointerStart={x:e.pageX,y:e.pageY},this.canPreventDefault(t)&&t.preventDefault(),this._callBack("dragDown",t)):this._pointerReset()}},{key:"pointerMove",value:function(t,e){var i=this.getPointerVector(e),n=i.x,s=i.y;this.dragging?(t.preventDefault(),this._callBack("dragMove",t,{x:n,y:s})):this.canDragStart(n,s)&&(this.pointerStart.x+=n,this.pointerStart.y+=s,this.preventClick=!0,this.dragging=!0,this._callBack("dragStart",t,this.getPointerVector(e)))}},{key:"pointerUp",value:function(t,e){this.dragging&&this._callBack("dragEnd",t,this.getPointerVector(e))}},{key:"pointerCancel",value:function(t,e){this.dragging&&this._callBack("dragCancel",t,this.getPointerVector(e))}},{key:"pointerDone",value:function(t,e){this._callBack("dragUp",t,this.getPointerVector(e)),this.dragging&&(this.dragging=!1,this._callBack("dragDone",t,this.getPointerVector(e)))}},{key:"onclick",value:function(t){this.preventClick&&t.preventDefault()}},{key:"preventScrolling",value:function(t){this.dragging&&t.preventDefault()}}]),i}(et),st=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"initDragger",value:function(){this.drag(this.element.parentElement,{x:this.options.threshold,y:!1},!0)}},{key:"dragDown",value:function(){this.element.classList.add(this.options.draggingClass),this.isPointerDown=!0,this.dragX=this.x}},{key:"dragStart",value:function(t,e){this.startDragX=this.x,this.startAnimation(),this.emit("dragStart",[t])}},{key:"dragMove",value:function(t,e,i){var n=Math.max(-this.getFirstSlide().x,this.startDragX),s=Math.min(-this.getLastSlide().x,this.startDragX);this.prevDragX=this.dragX,this.dragTime=Date.now();var r=this.options.rightToLeft?-1:1,o=this.startDragX+i.x*r;o=(o=o>n?(o+n)/2:o)this.getFirstSlide().x,r=-n100||(n>0&&s>0?this.selectedIndex+=1:n<0&&s<0&&(this.selectedIndex-=1))}},{key:"dragEnd",value:function(){}},{key:"dragDone",value:function(){}},{key:"dragCancel",value:function(){}}]),i}(nt),rt=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"getFrictionFactor",value:function(){return 1-this.options[this.isFreeScrolling?"freeFriction":"friction"]}},{key:"getRestingPosition",value:function(){return this.x+this.velocity/(1-this.getFrictionFactor())}},{key:"applyPhysics",value:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()}},{key:"applyForce",value:function(t){this.velocity+=t}},{key:"applyDragForce",value:function(){if(this.isPointerDown){var t=this.dragX-this.x-this.velocity;this.applyForce(t)}}},{key:"applyAttraction",value:function(){if(!this.isPointerDown&&!this.isFreeScrolling){var t=(-1*this.selectedSlide.x-this.x)*this.options.attraction;this.applyForce(t)}}}]),i}(st),ot=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"startAnimation",value:function(){this.isAnimating||(this.restingFrames=0,this.isAnimating=!0,this.animate())}},{key:"animate",value:function(){var t=this;this.prevX=this.x,this.applyDragForce(),this.applyAttraction(),this.applyPhysics(),this.moveSlider(),this.settle(),this.isAnimating&&(this.frame=requestAnimationFrame((function(){return t.animate()})))}},{key:"moveSlider",value:function(){var t=this.x,e=this.slider.style;t=this.options.rightToLeft?-t:t,this.isAnimating?e.transform="translate3d(".concat(t,"px,0,0)"):(t=Math.round(t),e.transform="translateX(".concat(t,"px)")),this.progress()}},{key:"settleSlider",value:function(){this.x=-this.selectedSlide.x,this.velocity=0,this.moveSlider()}},{key:"progress",value:function(){if(this.x!==this.prevX){var t=-this.x-this.getFirstSlide().x,e=t/this.slidesWidth;this.emit("scroll",[e,t])}}},{key:"settle",value:function(){this.isPointerDown||Math.round(100*this.x)!==Math.round(100*this.prevX)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,this.isFreeScrolling?this.moveSlider():this.settleSlider(),delete this.isFreeScrolling,this.emit("settle",[this.selectedIndex]))}}]),i}(rt),at=function(t){l(i,t);var e=v(i);function i(){var t;n(this,i);for(var s=arguments.length,r=new Array(s),o=0;o0&&void 0!==arguments[0])||arguments[0];t=t?"addEventListener":"removeEventListener",this.slider[t]("click",this),this.prevButton&&this.prevButton[t]("click",this),this.nextButton&&this.nextButton[t]("click",this),this.pageDots&&this.pageDots[t]("click",this),this.options.autoPlay&&(this.layout.element[t]("mouseenter",this),this.layout.element[t]("mouseleave",this)),window[t]("load",this),window[t]("keydown",this),window[t]("resize",this),window[t]("orientationchange",this)}},{key:"onclick",value:function(t){switch(t.currentTarget){case this.prevButton:t.stopPropagation(),this.previous();break;case this.nextButton:t.stopPropagation(),this.next();break;case this.pageDots:var e=Array.isArray(this.dots)?this.dots.indexOf(t.target):null;this.select(e);break;default:var i=t.target.closest("a, input, select, textarea, checkbox, radio, button, submit, file");if(!i&&this.focus(),this.isAnimating)t.preventDefault(),t.stopPropagation();else if(i)return void this.element.blur()}}},{key:"focus",value:function(){document.activeElement!==this.element&&this.element.focus({preventScroll:!0})}},{key:"onmouseenter",value:function(){clearInterval(this.player)}},{key:"onmouseleave",value:function(){this.autoPlay()}},{key:"onkeydown",value:function(t){var e=t.keyCode,i=this.options.rightToLeft,n=document.activeElement;if(n===this.element||t.target.parentElement===this.pageDots){var s=this.dots&&this.dots.includes(n);37===e?(this[i?"next":"previous"](),s&&this.dots[this.selectedIndex].focus()):39===e&&(this[i?"previous":"next"](),s&&this.dots[this.selectedIndex].focus())}}},{key:"onload",value:function(t){this.resize(),this.reposition()}},{key:"onorientationchange",value:function(t){this.resize(),this.reposition()}}]),i}(ot),ht=function(t){l(i,t);var e=v(i);function i(){return n(this,i),e.apply(this,arguments)}return a(i,[{key:"updateSlides",value:function(){this.viewportWidth=this.layout.grid.width,this.cells=f(this.layout.items),this.getcells(),this.setSlides(),this.setSlider(),this.filterSlides(),this.selectSlide()}},{key:"getcells",value:function(){var t=this.options.slideAlign;"left"===t?this.cells=this.cells.sort((function(t,e){return t.x-e.x})):"center"===t?this.cells=this.cells.sort((function(t,e){return t.x+t.width/2-(e.x+e.width/2)})):"right"===t&&(this.cells=this.cells.sort((function(t,e){return t.x+t.width-(e.x+e.width)})))}},{key:"setSlides",value:function(){var t,e=this;this.slides=[],this.cells.forEach((function(i,n){var s=i.x,r=i.width,o=i.node;e.slideCanFit(t,i)||e.slides.push(t={cells:[],width:0,x:s}),sMath.round(this.viewportWidth)?void 0:this.groupSlides(t.cells.length,i)}},{key:"groupSlides",value:function(t,e){var i=this.viewportWidth,n=this.options.groupCells;if(!n)return!1;if("number"==typeof n)return te&&(t.x=e))}},{key:"selectSlide",value:function(t){this.selectedIndex=Math.max(0,Math.min(this.selectedIndex,this.slides.length-1)),this.selectedSlide=this.slides[this.selectedIndex],this.isAnimating&&(this.emit("select",[this.selectedIndex]),this.selectedIndex!==t&&this.emit("change",[this.selectedIndex]))}},{key:"getFirstSlide",value:function(){return this.slides[0]}},{key:"getLastSlide",value:function(){return f(this.slides).pop()}}]),i}(at),lt=function(t){l(i,t);var e=v(i);function i(){var t,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return n(this,i),(t=e.call(this)).options=O(O({},J),s),t.layout=r,t.element=r.element.querySelector(t.options.sliderSelector),t.slider=t.element.firstElementChild,t.pageDots=r.element.querySelector(t.options.pageDotsSelector),t.prevButton=r.element.querySelector(t.options.prevButtonSelector),t.nextButton=r.element.querySelector(t.options.nextButtonSelector),t}return a(i,[{key:"init",value:function(){this.element.tabIndex=0,this.element.classList.add(this.options.carouselClass),this.updateSlides(),this.setDots();var t=this.options.initialIndex||0,e=this.slides.length-1,i=Math.max(0,Math.min(t,e));this.cells&&this.cells.length&&this.cells.forEach((function(t){return t.node.setAttribute("aria-hidden",!0)})),this.select(i,!0),this.options.draggable&&this.initDragger(),this.bindEvents(),this.autoPlay()}},{key:"destroy",value:function(){var t=this;this.bindEvents(!1),this._bindEvents(["down","move","up","cancel"],!1),this.isAnimating=!1,cancelAnimationFrame(this.frame),this.cells&&(this.cells.forEach((function(t){t.node.removeAttribute("aria-hidden")})),this.cells=[],this.slides=[]),this.dots&&(this.dots.forEach((function(e){t.pageDots.removeChild(e)})),this.dots=[],this.pageDots.removeAttribute("role")),this.prevButton&&(this.prevButton.disabled=!0,this.prevButton.hidden=!0),this.nextButton&&(this.nextButton.disabled=!0,this.nextButton.hidden=!0),this.slider.removeAttribute("style"),this.element.removeAttribute("style"),this.element.removeAttribute("tabIndex"),this.element.classList.remove(this.options.carouselClass)}},{key:"previous",value:function(){this.select(this.selectedIndex-1)}},{key:"next",value:function(){this.select(this.selectedIndex+1)}},{key:"select",value:function(t,e){var i=this.selectedIndex;this.cells.length&&this.slides[t]&&(this.isFreeScrolling=!1,this.selectedIndex=t,this.selectedSlide=this.slides[t],this.updateUI(),e?this.settleSlider():this.startAnimation(),this.emit("select",[t]),t!==i&&this.emit("change",[t]))}},{key:"autoPlay",value:function(){var t=this;this.options.autoPlay&&(this.player=setInterval((function(){if(!t.hovered){var e=t.selectedIndex+1,i=t.slides.length,n=(i+e%i)%i;t.select(n)}}),this.options.autoPlay))}},{key:"setDots",value:function(){if(this.cells.length&&this.pageDots){this.dots||(this.dots=[]);var t=this.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(t),this.dots=f(this.pageDots.children)}}},{key:"addDots",value:function(t){for(var e=document.createDocumentFragment(),i=this.dots.length,n=i;ne+t;i--)this.pageDots.removeChild(this.dots[i])}},{key:"updateUI",value:function(){this.cells.length&&(this.updateDots(),this.updateCells(),this.updateButtons())}},{key:"updateButtons",value:function(){this.prevButton&&(this.prevButton.disabled=!1,this.prevButton.hidden=!1,this.selectedSlide===this.getFirstSlide()&&(this.prevButton.disabled=!0)),this.nextButton&&(this.nextButton.disabled=!1,this.nextButton.hidden=!1,(this.selectedSlide===this.getLastSlide()||this.slides.length<2)&&(this.nextButton.disabled=!0))}},{key:"updateCells",value:function(){var t=this.cell,e=this.cells;this.selectedIndex;e.length&&(t&&t.forEach((function(t){t.setAttribute("aria-hidden",!0)})),(t=this.selectedSlide.cells)&&(t.forEach((function(t){t.setAttribute("aria-hidden",!1)})),this.cell=t))}},{key:"updateDots",value:function(){var t=this.dot,e=this.dots,i=this.selectedIndex;t&&(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex",-1)),e&&e.length&&((t=e[i]).setAttribute("aria-selected",!0),t.setAttribute("tabindex",0),this.dot=t)}},{key:"reposition",value:function(){this.select(this.selectedIndex,!0)}},{key:"resize",value:function(t){var e=this.viewportWidth;this.updateSlides(),t&&e===this.viewportWidth||(this.setDots(),this.updateUI())}}]),i}(ht),ut=lt,ct={class:"wpgb-card-hidden",treshold:0,delay:300},dt=function(t){l(i,t);var e=v(i);function i(){var t,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),L(c(t=e.call(this)),"handleEvent",G((function(){t.check()}),60)),t.options=O(O({},ct),s),t.items=[],t.queue=[],t}return a(i,[{key:"addItems",value:function(t){var e=this;t.length&&(this.unObserve(),this.items=[].concat(f(this.items),f(t)),this.items=this.items.filter((function(t){return!e.queue.includes(t)&&t.classList.contains(e.options.class)})),this.observe())}},{key:"canObserve",value:function(){return"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}},{key:"observe",value:function(){var t=this;if(this.items.length){if(this.canObserve())return this.observer(),void this.items.forEach((function(e){return t.intersection.observe(e)}));this.bindEvents(),requestAnimationFrame((function(){return setTimeout((function(){return t.check()}))}))}}},{key:"unObserve",value:function(){if(this.intersection)return this.intersection.disconnect(),void delete this.intersection;this.bindEvents(!1)}},{key:"observer",value:function(){var t=this;this.intersection=new IntersectionObserver((function(e,i){e.forEach((function(e,n){if(e.isIntersecting){var s=t.items.indexOf(e.target);t.items.splice(s,1),i.unobserve(e.target),t.addToQueue(e.target)}}))}),{rootMargin:this.options.treshold+"px"})}},{key:"bindEvents",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t=t?"addEventListener":"removeEventListener",window[t]("load",this),window[t]("resize",this),document[t]("scroll",this),window[t]("orientationchange",this)}},{key:"check",value:function(){var t=this;this.items=this.items.filter((function(e,i){return!t.inView(e)||(t.addToQueue(e),!1)})),this.isComplete()}},{key:"inView",value:function(t){var e=t.getBoundingClientRect(),i=e.top,n=e.bottom,s=window.innerHeight;return i>=this.options.treshold&&i<=s||n>=0&&n<=s}},{key:"addToQueue",value:function(t){var e=this;this.queue.push(t),this.isProcessing||(this.options.delay>0?this.processQueue():requestAnimationFrame((function(){return e.reveal()})))}},{key:"processQueue",value:function(){var t=this;if(!this.queue.length)return Date.now()-this.time0&&void 0!==arguments[0])||arguments[0],e=vt[this.instance];t=t?"on":"off",this.grid&&(this.grid[t]("init",e.initGrid),this.grid[t]("beforeLayout",e.beforeLayout),this.grid[t]("added",e.itemsAdded),this.grid[t]("removed",e.itemsRemoved),this.facets&&this.facets[t]("appended",e.itemsAppended)),this.carousel&&this.carousel[t]("scroll",e.onProgress)}},{key:"_initGrid",value:function(t){var e=this;this.reveal&&this.reveal.addItems(t),this.lazyLoad&&(this.lazyLoad.addItems(this.element),this.reveal&&!this.reveal.canObserve()&&this.reveal.on("revealed",(function(){return setTimeout((function(){return e.lazyLoad.check()}),150)})))}},{key:"_itemsAppended",value:function(t,e){"append"!==e&&this.grid.removeItems(),this.grid.addItems(t),I()}},{key:"_itemsRemoved",value:function(t){this.lazyLoad&&(this.lazyLoad.items=[]),this.reveal&&(this.reveal.items=[],this.reveal.queue=[]),"horizontal"===this.options.layout&&this.carousel&&this.carousel.select(0,!0)}},{key:"_itemsAdded",value:function(t){this.slideShow.init(),this.lazyLoad&&this.lazyLoad.addItems(this.element),this.reveal&&this.reveal.addItems(t),"horizontal"===this.options.layout&&this.carousel&&(this.carousel.resize(),this.carousel.on("scroll",vt[this.instance].onProgress))}},{key:"_beforeLayout",value:function(t){var e=this.grid,i=e.gutter,n=e.columns,s=e.grid;this.styleSheet.width=(s.width+i)/n-i,this.styleSheet.setFontSize()}},{key:"_onProgress",value:function(t,e){this.facets&&t>.8&&this.facets.loader&&this.facets.loader.onScroll&&(this.carousel.off("scroll",vt[this.instance].onProgress),this.facets.loader.click())}}]),i}(k),yt=0,mt=function(t){l(i,t);var e=v(i);function i(t){var s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),s=e.call(this),t?t.instance?d(s,pt[t.instance]):(s.element=t,s.options=O(O({},ft),r),s.htmlInit(),s.id=s.options.id,s.setInstance(),s.setEvents(),s.initGrid(),s.initCarousel(),s.initLazyLoad(),s.initReveal(),s.initDependencies(),s.bindEvents(),s):d(s)}return a(i,[{key:"setInstance",value:function(){this.instance=++yt,this.element.instance=this.instance,pt[this.instance]=this}},{key:"htmlInit",value:function(){var t=this.element.getAttribute("data-options");t&&(t=JSON.parse(t),this.options=O(O({},this.options),t),this.element.removeAttribute("data-options"))}},{key:"initGrid",value:function(){var t=this.element,e=this.options;e.isShadow||e.isTemplate||("masonry"===e.type?"horizontal"===e.layout?this.grid=new F(t,e):e.fitRows||e.equalColumns?this.grid=new z(t,e):this.grid=new j(t,e):"metro"===e.type?this.grid=new X(t,e):this.grid=new T(t,e))}},{key:"initCarousel",value:function(){"horizontal"===this.options.layout&&(this.carousel=new ut(this.options,this.grid))}},{key:"initLazyLoad",value:function(){this.options.lazyLoad&&(this.lazyLoad=new H(this.element))}},{key:"initReveal",value:function(){this.options.reveal&&(this.reveal=new dt({delay:this.options.transitionDelay}))}},{key:"initDependencies",value:function(){var t=this.element,e=this.options,i=(window.wpgb_settings?wpgb_settings:{}).lightbox,n='[data-instance="'.concat(this.instance,'"] .wpgb-lightbox');WP_Grid_Builder.Facets&&(this.facets=WP_Grid_Builder.Facets(t,e)),e.isShadow||e.isTemplate||(WP_Grid_Builder.Lightbox&&(this.lightbox=WP_Grid_Builder.Lightbox(O(O({},i),{},{selector:n}))),this.slideShow=new Y(t),this.styleSheet=new N(e.id,this.instance))}},{key:"toggleLayout",value:function(t,e){this.bindEvents(!1),this.grid&&this.grid.destroy(),this.carousel&&this.carousel.destroy(),this.options.type=t,this.options.layout=e,this.initGrid(),this.initCarousel(),this.bindEvents(),this.emit("beforeToggleLayout"),this.element.querySelector(".wpgb-viewport > div").className="wpgb-".concat(t),this.grid&&this.grid.init(),"horizontal"===e&&this.carousel.init()}},{key:"init",value:function(){this.element&&(this.element.classList.add("wpgb-enabled"),this.element.setAttribute("data-instance",this.instance),window.WP_Grid_Builder.emit("init",[this]),this.styleSheet&&this.styleSheet.init(),this.facets&&this.facets.init(),this.grid&&this.grid.init(),this.carousel&&this.carousel.init(),this.lightbox&&this.lightbox.init(),this.slideShow&&this.slideShow.init())}},{key:"destroy",value:function(){var t=Object.getOwnPropertyNames(this);if(this.element){this.grid&&this.grid.items.map((function(t){return t.node.classList.remove("wpgb-card-hidden")})),this.styleSheet&&this.styleSheet.destroy(),this.grid&&this.grid.destroy(),this.facets&&this.facets.destroy(),this.lightbox&&this.lightbox.destroy(),this.slideShow&&this.slideShow.destroy(),this.carousel&&this.carousel.destroy(),this.lazyLoad&&this.lazyLoad.unObserve(),this.reveal&&this.reveal.unObserve(),this.element.classList.remove("wpgb-enabled"),this.element.setAttribute("data-options",JSON.stringify(this.options)),this.bindEvents(!1),delete WP_Grid_Builder.instances[this.instance],delete this.element.instance,delete vt[this.instance],delete pt[this.instance];for(var e=0;e1||Math.abs(n)>1)&&(this.move=!0)}},{key:"pointerEnd",value:function(){}},{key:"pointerCancel",value:function(){}},{key:"pointerDone",value:function(){}},{key:"onplay",value:function(t){var e=t.target;e&&e.closest(".wpgb-card")&&this.pauseAll(e)}},{key:"onclick",value:function(t){if(t.button||!t.target||this.move)this.move=!1;else if(t.target.closest(".wpgb-handle-lb"))this.pauseAll();else if(this.isClickable(t))if(t.target.closest(".wpgb-card-media-button")){var e=t.target.closest(".wpgb-card");if(!e)return;this.onLightboxClick(t,e),this.onPlayButtonClick(t,e)}else t.target.closest("[data-action]")&&this.onActionLink(t)}},{key:"isClickable",value:function(t){var e=t.target.type,i=bt,n=kt,s=t.target.closest(i.join(","));return!(s&&!s.classList.contains("wpgb-card-media-button")||n.includes(e))}},{key:"onActionLink",value:function(t){var e=t.target.closest("[data-action]").querySelector(".wpgb-card-layer-link");e&&e.click()}},{key:"onLightboxClick",value:function(t,e){var i=e.querySelector("[data-active] .wpgb-handle-lb");i||(i=e.querySelector(".wpgb-handle-lb")),i&&(t.preventDefault(),t.stopPropagation(),i.click())}},{key:"onPlayButtonClick",value:function(t,e){var i=e.querySelector(".wpgb-card-media-player > *:not(div), .wpgb-card-media-player .wpgb-card-media-iframe");i&&(t.preventDefault(),t.stopPropagation(),this.pauseAll(i),this.player=i,this.play())}},{key:"play",value:function(){"AUDIO"===this.player.nodeName||"VIDEO"===this.player.nodeName?(this.revealPoster(),this.player.controlsList="nodownload",this.player.play()):this.playIframe(),this.reveal()}},{key:"revealPoster",value:function(){var t=this.player.previousElementSibling;t&&t.getAttribute("data-wpgb-poster")&&(t.style.backgroundImage="url("+t.getAttribute("data-wpgb-poster")+")",t.removeAttribute("data-wpgb-poster"))}},{key:"playIframe",value:function(){var t=this.getIframeProvider();t?this.player.contentWindow.postMessage(JSON.stringify(t.play),"*"):this.createIframe()}},{key:"pause",value:function(){"AUDIO"===this.player.nodeName||"VIDEO"===this.player.nodeName?this.player.pause():this.pauseIframe(),this.hide()}},{key:"pauseIframe",value:function(){var t=this.getIframeProvider();t?this.player.contentWindow.postMessage(JSON.stringify(t.pause),"*"):this.removeIframe()}},{key:"pauseAll",value:function(t){for(var e=document.querySelectorAll(".wpgb-card audio, .wpgb-card video, .wpgb-card iframe"),i=0,n=e.length;i1&&void 0!==arguments[1]?arguments[1]:{};return this.instances[++St]=new mt(t,e)},e((function(){var t=wpgb_settings.hasFacets,e=wpgb_settings.hasLightbox,i=!t||t&&WP_Grid_Builder.Facets,n=!e||e&&WP_Grid_Builder.Lightbox;i&&n?It():!i&&n?window.addEventListener("wpgb.facets.loaded",It):i&&!n?window.addEventListener("wpgb.lightbox.loaded",It):(window.addEventListener("wpgb.facets.loaded",(function(){return window.addEventListener("wpgb.lightbox.loaded",It)})),window.addEventListener("wpgb.lightbox.loaded",(function(){return window.addEventListener("wpgb.facets.loaded",It)})))})))}()}();