diff --git a/public/product.js b/public/product.js index c5b70d99..cc7dd7c3 100644 --- a/public/product.js +++ b/public/product.js @@ -1 +1 @@ -(()=>{var e={643:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(671),r=n(144),i=function(){function e(){(0,o.Z)(this,e)}return(0,r.Z)(e,[{key:"onReady",value:function(){}},{key:"registerEvents",value:function(){}},{key:"initiate",value:function(e){if(e&&!e.includes(salla.config.get("page.slug")))return app.log("The Class For (".concat(e.join(","),") Skipped."));this.onReady(),this.registerEvents(),app.log("The Class For (".concat((null==e?void 0:e.join(","))||"*",") Loaded🎉"))}}]),e}();i.initiateWhenReady=function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;"ready"===(null===(e=window.app)||void 0===e?void 0:e.status)?(new this).initiate(n):document.addEventListener("theme::ready",(function(){return(new t).initiate(n)}))};const s=i},213:e=>{window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o,r="fslightbox-",i="".concat(r,"styles"),s="".concat(r,"cursor-grabbing"),a="".concat(r,"full-dimension"),c="".concat(r,"flex-centered"),l="".concat(r,"open"),u="".concat(r,"transform-transition"),d="".concat(r,"absoluted"),p="".concat(r,"slide-btn"),f="".concat(p,"-container"),h="".concat(r,"fade-in"),m="".concat(r,"fade-out"),v=h+"-strong",g=m+"-strong",b="".concat(r,"opacity-"),x="".concat(b,"1"),y="".concat(r,"source");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){var t,n=e.props,o=0,r={};this.getSourceTypeFromLocalStorageByUrl=function(e){return t[e]?t[e]:i(e)},this.handleReceivedSourceTypeForUrl=function(e,n){!1===r[n]&&(o--,"invalid"!==e?r[n]=e:delete r[n],0===o&&(function(e,t){for(var n in t)e[n]=t[n]}(t,r),localStorage.setItem("fslightbox-types",JSON.stringify(t))))};var i=function(e){o++,r[e]=!1};n.disableLocalStorage?(this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){}):(t=JSON.parse(localStorage.getItem("fslightbox-types")))||(t={},this.getSourceTypeFromLocalStorageByUrl=i)}function L(e,t,n,o){var r=e.data,i=e.elements.sources,s=n/o,a=0;this.adjustSize=function(){if((a=r.maxSourceWidth/s)r.maxSourceHeight?r.maxSourceHeight:o,c()};var c=function(){i[t].style.width=a*s+"px",i[t].style.height=a+"px"}}function E(e,t){var n=this,o=e.collections.sourceSizers,r=e.elements,i=r.sourceAnimationWrappers,s=r.sourceMainWrappers,a=r.sources,c=e.resolve;function l(e,n){o[t]=c(L,[t,e,n]),o[t].adjustSize()}this.runActions=function(e,o){a[t].classList.add(x),i[t].classList.add(v),s[t].removeChild(s[t].firstChild),l(e,o),n.runActions=l}}function C(e,t){var n,o=this,r=e.elements.sources,i=e.props,s=(0,e.resolve)(E,[t]);this.handleImageLoad=function(e){var t=e.target,n=t.naturalWidth,o=t.naturalHeight;s.runActions(n,o)},this.handleVideoLoad=function(e){var t=e.target,o=t.videoWidth,r=t.videoHeight;n=!0,s.runActions(o,r)},this.handleNotMetaDatedVideoLoad=function(){n||o.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;i.maxYoutubeDimensions&&(e=i.maxYoutubeDimensions.width,t=i.maxYoutubeDimensions.height),s.runActions(e,t)},this.handleCustomLoad=function(){setTimeout((function(){var e=r[t];s.runActions(e.offsetWidth,e.offsetHeight)}))}}function F(e,t,n){var o=e.elements.sources,r=e.props.customClasses,i=r[t]?r[t]:"";o[t].className=n+" "+i}function A(e,t){var n=e.elements.sources,o=e.props.customAttributes;for(var r in o[t])n[t].setAttribute(r,o[t][r])}function P(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props.sources;r[t]=document.createElement("img"),F(e,t,y),r[t].src=s[t],r[t].onload=n[t].handleImageLoad,A(e,t),i[t].appendChild(r[t])}function T(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props,a=s.sources,c=s.videosPosters;r[t]=document.createElement("video"),F(e,t,y),r[t].src=a[t],r[t].onloadedmetadata=function(e){n[t].handleVideoLoad(e)},r[t].controls=!0,A(e,t),c[t]&&(r[t].poster=c[t]);var l=document.createElement("source");l.src=a[t],r[t].appendChild(l),setTimeout(n[t].handleNotMetaDatedVideoLoad,3e3),i[t].appendChild(r[t])}function I(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,s=o.sourceAnimationWrappers,a=e.props.sources;i[t]=document.createElement("iframe"),F(e,t,"".concat(y," ").concat(r,"youtube-iframe"));var c=a[t],l=c.split("?")[1];i[t].src="https://www.youtube.com/embed/".concat(c.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?").concat(l||""),i[t].allowFullscreen=!0,A(e,t),s[t].appendChild(i[t]),n[t].handleYoutubeLoad()}function k(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props.sources;r[t]=s[t],F(e,t,"".concat(r[t].className," ").concat(y)),i[t].appendChild(r[t]),n[t].handleCustomLoad()}function N(e,t){var n=e.elements,o=n.sources,i=n.sourceAnimationWrappers,s=n.sourceMainWrappers;e.props.sources,o[t]=document.createElement("div"),o[t].className="".concat(r,"invalid-file-wrapper ").concat(c),o[t].innerHTML="Invalid source",i[t].classList.add(v),i[t].appendChild(o[t]),s[t].removeChild(s[t].firstChild)}function O(e){var t=e.collections,n=t.sourceLoadHandlers,o=t.sourcesRenderFunctions,r=e.core.sourceDisplayFacade,i=e.resolve;this.runActionsForSourceTypeAndIndex=function(t,s){var a;switch("invalid"!==t&&(n[s]=i(C,[s])),t){case"image":a=P;break;case"video":a=T;break;case"youtube":a=I;break;case"custom":a=k;break;default:a=N}o[s]=function(){return a(e,s)},r.displaySourcesWhichShouldBeDisplayed()}}function W(){var e,t,n,o=function(e){var t=document.createElement("a");return t.href=e,"www.youtube.com"===t.hostname||"youtu.be"===t.hostname},r=function(e){return e.slice(0,e.indexOf("/"))};function i(){if(4!==n.readyState){if(2===n.readyState){var e;switch(r(n.getResponseHeader("content-type"))){case"image":e="image";break;case"video":e="video";break;default:e="invalid"}n.onreadystatechange=null,n.abort(),t(e)}}else t("invalid")}this.setUrlToCheck=function(t){e=t},this.getSourceType=function(r){if(o(e))return r("youtube");t=r,(n=new XMLHttpRequest).onreadystatechange=i,n.open("GET",e,!0),n.send()}}function R(e,t,n){var o=e.props,r=o.types,i=o.type,s=o.sources,a=e.resolve;this.getTypeSetByClientForIndex=function(e){var t;return r&&r[e]?t=r[e]:i&&(t=i),t},this.retrieveTypeWithXhrForIndex=function(e){var o=a(W);o.setUrlToCheck(s[e]),o.getSourceType((function(o){t.handleReceivedSourceTypeForUrl(o,s[e]),n.runActionsForSourceTypeAndIndex(o,e)}))}}function M(e,t){var n=e.componentsServices.hideSourceLoaderIfNotYetCollection,o=e.elements,r=o.sourceWrappersContainer,i=o.sourceMainWrappers;i[t]=document.createElement("div"),i[t].className="".concat(d," ").concat(a," ").concat(c),i[t].innerHTML='
';var s=i[t].firstChild;n[t]=function(){i[t].contains(s)&&i[t].removeChild(s)},r.appendChild(i[t]),function(e,t){var n=e.elements,o=n.sourceMainWrappers,r=n.sourceAnimationWrappers;r[t]=document.createElement("div"),o[t].appendChild(r[t])}(e,t)}function z(e,t,n,o){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"width",t),i.setAttributeNS(null,"height",t),i.setAttributeNS(null,"viewBox",n);var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"class","".concat(r,"svg-path")),s.setAttributeNS(null,"d",o),i.appendChild(s),e.appendChild(i),i}function j(e,t){var n=document.createElement("div");return n.className="".concat(r,"toolbar-button ").concat(c),n.title=t,e.appendChild(n),n}function H(e){var t=e.props.sources,n=e.elements.container,o=document.createElement("div");o.className="".concat(r,"nav"),n.appendChild(o),function(e,t){var n=document.createElement("div");n.className="".concat(r,"toolbar"),t.appendChild(n),function(e,t){var n=e.componentsServices,o=e.core.fullscreenToggler,r=e.data,i="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",s=j(t);s.title="Enter fullscreen";var a=z(s,"20px","0 0 18 18",i);n.enterFullscreen=function(){r.isFullscreenOpen=!0,s.title="Exit fullscreen",a.setAttributeNS(null,"width","24px"),a.setAttributeNS(null,"height","24px"),a.setAttributeNS(null,"viewBox","0 0 950 1024"),a.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},n.exitFullscreen=function(){r.isFullscreenOpen=!1,s.title="Enter fullscreen",a.setAttributeNS(null,"width","20px"),a.setAttributeNS(null,"height","20px"),a.setAttributeNS(null,"viewBox","0 0 18 18"),a.firstChild.setAttributeNS(null,"d",i)},s.onclick=function(){r.isFullscreenOpen?o.exitFullscreen():o.enterFullscreen()}}(e,n),function(e,t){var n=j(t,"Close");n.onclick=e.core.lightboxCloser.closeLightbox,z(n,"20px","0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(e,n)}(e,o),t.length>1&&function(e,t){var n=e.componentsServices,o=e.props.sources,i=(e.stageIndexes,document.createElement("div"));i.className="".concat(r,"slide-number-container");var s=document.createElement("div");s.className=c;var a=document.createElement("span");n.setSlideNumber=function(e){return a.innerHTML=e};var l=document.createElement("span");l.className="".concat(r,"slash");var u=document.createElement("div");u.innerHTML=o.length,i.appendChild(s),s.appendChild(a),s.appendChild(l),s.appendChild(u),t.appendChild(i),setTimeout((function(){s.offsetWidth>55&&(i.style.justifyContent="flex-start")}))}(e,o)}function D(e,t){var n=this,o=e.elements.sourceMainWrappers,r=e.props,i=0;this.byValue=function(e){return i=e,n},this.negative=function(){s(-a())},this.zero=function(){s(0)},this.positive=function(){s(a())};var s=function(e){o[t].style.transform="translateX(".concat(e+i,"px)"),i=0},a=function(){return(1+r.slideDistance)*innerWidth}}function Z(e,t,n,o){var r=e.elements.container,i=n.charAt(0).toUpperCase()+n.slice(1),s=document.createElement("div");s.className="".concat(f," ").concat(f,"-").concat(n),s.title="".concat(i," slide"),s.onclick=t,function(e,t){var n=document.createElement("div");n.className="".concat(p," ").concat(c),z(n,"20px","0 0 20 20",t),e.appendChild(n)}(s,o),r.appendChild(s)}function _(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function B(e){var t=this,n=e.core,o=n.eventsDispatcher,r=n.fullscreenToggler,i=n.globalEventsController,s=n.scrollbarRecompensor,a=e.data,c=e.elements,u=e.props,d=e.sourcePointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){t.isLightboxFadingOut=!0,c.container.classList.add(g),i.removeListeners(),u.exitFullscreenOnClose&&a.isFullscreenOpen&&r.exitFullscreen(),setTimeout((function(){t.isLightboxFadingOut=!1,d.isPointering=!1,c.container.classList.remove(g),document.documentElement.classList.remove(l),s.removeRecompense(),document.body.removeChild(c.container),o.dispatch("onClose")}),270)}}function X(e){var t=e.core,n=t.lightboxCloser,o=t.fullscreenToggler,r=t.slideChangeFacade;this.listener=function(e){switch(e.key){case"Escape":n.closeLightbox();break;case"ArrowLeft":r.changeToPrevious();break;case"ArrowRight":r.changeToNext();break;case"F11":e.preventDefault(),o.enterFullscreen()}}}function U(e){var t=e.collections.sourceMainWrappersTransformers,n=e.elements,o=e.sourcePointerProps,r=e.stageIndexes;function i(e,n){t[e].byValue(o.swipedX)[n]()}this.runActionsForEvent=function(e){var t,a,c;n.container.contains(n.slideSwipingHoverer)||n.container.appendChild(n.slideSwipingHoverer),t=n.container,a=s,(c=t.classList).contains(a)||c.add(a),o.swipedX=e.screenX-o.downScreenX,i(r.current,"zero"),void 0!==r.previous&&o.swipedX>0?i(r.previous,"negative"):void 0!==r.next&&o.swipedX<0&&i(r.next,"positive")}}function q(e){var t=e.props.sources,n=e.resolve,o=e.sourcePointerProps,r=n(U);1===t.length?this.listener=function(){o.swipedX=1}:this.listener=function(e){o.isPointering&&r.runActionsForEvent(e)}}function V(e){var t=e.collections.sourceMainWrappersTransformers,n=e.core.slideIndexChanger,o=e.elements.sourceMainWrappers,r=e.stageIndexes;this.runPositiveSwipedXActions=function(){void 0===r.previous||(i("positive"),n.changeTo(r.previous)),i("zero")},this.runNegativeSwipedXActions=function(){void 0===r.next||(i("negative"),n.changeTo(r.next)),i("zero")};var i=function(e){o[r.current].classList.add(u),t[r.current][e]()}}function Y(e,t){e.contains(t)&&e.removeChild(t)}function $(e){var t=e.core.lightboxCloser,n=e.elements,o=e.resolve,r=e.sourcePointerProps,i=o(V);this.runNoSwipeActions=function(){Y(n.container,n.slideSwipingHoverer),r.isSourceDownEventTarget||t.closeLightbox(),r.isPointering=!1},this.runActions=function(){r.swipedX>0?i.runPositiveSwipedXActions():i.runNegativeSwipedXActions(),Y(n.container,n.slideSwipingHoverer),n.container.classList.remove(s),r.isPointering=!1}}function J(e){var t=e.resolve,n=e.sourcePointerProps,o=t($);this.listener=function(){n.isPointering&&(n.swipedX?o.runActions():o.runNoSwipeActions())}}function G(e){var t,n,o;n=(t=e).core.classFacade,o=t.elements,n.removeFromEachElementClassIfContains=function(e,t){for(var n=0;ninnerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")}n.addRecompense=function(){"complete"===document.readyState?o():addEventListener("load",(function(){o(),n.addRecompense=o}))},n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),function(e){var t=e.core,n=t.slideChangeFacade,o=t.slideIndexChanger,r=t.stageManager;e.props.sources.length>1?(n.changeToPrevious=function(){o.jumpTo(r.getPreviousSlideIndex())},n.changeToNext=function(){o.jumpTo(r.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(e),function(e){var t,n,o=e.collections.sourceMainWrappersTransformers,r=e.componentsServices,i=e.core,s=i.classFacade,a=i.slideIndexChanger,c=i.sourceDisplayFacade,l=i.stageManager,d=e.elements.sourceAnimationWrappers,p=e.stageIndexes,f=(t=function(){s.removeFromEachElementClassIfContains("sourceAnimationWrappers",m)},n=[],function(){n.push(!0),setTimeout((function(){n.pop(),n.length||t()}),300)});a.changeTo=function(e){p.current=e,l.updateStageIndexes(),r.setSlideNumber(e+1),c.displaySourcesWhichShouldBeDisplayed()},a.jumpTo=function(e){var t=p.current;a.changeTo(e),s.removeFromEachElementClassIfContains("sourceMainWrappers",u),_(d[t],v),_(d[t],h),d[t].classList.add(m),_(d[e],v),_(d[e],m),d[e].classList.add(h),f(),o[e].zero(),setTimeout((function(){t!==p.current&&o[t].negative()}),270)}}(e),function(e){var t=e.core,n=t.classFacade,o=t.sourcesPointerDown,r=e.elements.sources,i=e.sourcePointerProps,s=e.stageIndexes;o.listener=function(e){"VIDEO"!==e.target.tagName&&e.preventDefault(),i.isPointering=!0,i.downScreenX=e.screenX,i.swipedX=0;var t=r[s.current];t&&t.contains(e.target)?i.isSourceDownEventTarget=!0:i.isSourceDownEventTarget=!1,n.removeFromEachElementClassIfContains("sourceMainWrappers",u)}}(e),function(e){var t=e.collections.sourcesRenderFunctions,n=e.core.sourceDisplayFacade,o=e.props,r=e.stageIndexes;function i(e){t[e]&&(t[e](),delete t[e])}n.displaySourcesWhichShouldBeDisplayed=function(){if(o.loadOnlyCurrentSource)i(r.current);else for(var e in r)i(r[e])}}(e),function(e){var t=e.stageIndexes,n=e.core.stageManager,o=e.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===t.current?o:t.current-1},n.getNextSlideIndex=function(){return t.current===o?0:t.current+1},n.updateStageIndexes=0===o?function(){}:1===o?function(){0===t.current?(t.next=1,delete t.previous):(t.previous=0,delete t.next)}:function(){t.previous=n.getPreviousSlideIndex(),t.next=n.getNextSlideIndex()},n.isSourceInStage=o<=2?function(){return!0}:function(e){var n=t.current;if(0===n&&e===o||n===o&&0===e)return!0;var r=n-e;return-1===r||0===r||1===r}}(e),function(e){var t=e.collections,n=t.sourceMainWrappersTransformers,o=t.sourceSizers,r=e.core.windowResizeActioner,i=e.data,s=e.elements.sourceMainWrappers,a=e.props,c=e.stageIndexes;r.runActions=function(){innerWidth<992?i.maxSourceWidth=innerWidth:i.maxSourceWidth=.9*innerWidth,i.maxSourceHeight=.9*innerHeight;for(var e=0;e1&&function(e){var t=e.core.slideChangeFacade;Z(e,t.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),Z(e,t.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")}(e),function(e){for(var t=e.props.sources,n=e.resolve,o=n(S),r=n(O),i=n(R,[o,r]),s=0;s0&&void 0!==arguments[0]?arguments[0]:0;h.current=o,p.isInitialized?r.dispatch("onShow"):K(e),u.updateStageIndexes(),c.displaySourcesWhichShouldBeDisplayed(),n.setSlideNumber(o+1),document.body.appendChild(f.container),document.documentElement.classList.add(l),a.addRecompense(),s.attachListeners(),d.runActions(),t[h.current].zero(),r.dispatch("onOpen")}}function ee(e,t,n){return(ee=te()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&ne(r,n.prototype),r}).apply(null,arguments)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ne(e,t){return(ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(e),ee(t,oe(n))},this.collections={sourceMainWrappersTransformers:[],sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={classFacade:{},eventsDispatcher:{},fullscreenToggler:{},globalEventsController:{},lightboxCloser:{},lightboxOpener:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},Q(this),this.open=function(t){return e.core.lightboxOpener.open(t)},this.close=function(){return e.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},ie(),window.refreshFsLightbox=function(){for(var e in fsLightboxInstances){var t=fsLightboxInstances[e].props;fsLightboxInstances[e]=new FsLightbox,fsLightboxInstances[e].props=t,fsLightboxInstances[e].props.sources=[],fsLightboxInstances[e].elements.a=[]}ie()}}])},374:()=>{class e extends HTMLElement{connectedCallback(){this.videoId=this.getAttribute("videoid");let t=this.querySelector(".lty-playbtn");if(this.playLabel=t&&t.textContent.trim()||this.getAttribute("playlabel")||"Play",this.style.backgroundImage||(this.posterUrl=`https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg`,e.addPrefetch("preload",this.posterUrl,"image"),this.style.backgroundImage=`url("${this.posterUrl}")`),t||(t=document.createElement("button"),t.type="button",t.classList.add("lty-playbtn"),this.append(t)),!t.textContent){const e=document.createElement("span");e.className="lyt-visually-hidden",e.textContent=this.playLabel,t.append(e)}this.addEventListener("pointerover",e.warmConnections,{once:!0}),this.addEventListener("click",(e=>this.addIframe()))}static addPrefetch(e,t,n){const o=document.createElement("link");o.rel=e,o.href=t,n&&(o.as=n),document.head.append(o)}static warmConnections(){e.preconnected||(e.addPrefetch("preconnect","https://www.youtube-nocookie.com"),e.addPrefetch("preconnect","https://www.google.com"),e.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),e.addPrefetch("preconnect","https://static.doubleclick.net"),e.preconnected=!0)}addIframe(){const e=new URLSearchParams(this.getAttribute("params")||[]);e.append("autoplay","1");const t=document.createElement("iframe");t.width=560,t.height=315,t.title=this.playLabel,t.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",t.allowFullscreen=!0,t.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${e.toString()}`,this.append(t),this.classList.add("lyt-activated"),this.querySelector("iframe").focus()}}customElements.define("lite-youtube",e)},326:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>o})},671:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>o})},144:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(343);function r(e,t){for(var n=0;n{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{Z:()=>o})},136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(611);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.Z)(e,t)}},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(2),r=n(326);function i(e,t){if(t&&("object"===(0,o.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}},611:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{Z:()=>o})},512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(2);function r(e,t){if("object"!==(0,o.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==(0,o.Z)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},343:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(2),r=n(512);function i(e){var t=(0,r.Z)(e,"string");return"symbol"===(0,o.Z)(t)?t:String(t)}},2:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{Z:()=>o})}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(671),t=n(144),o=n(136),r=n(963),i=n(120),s=(n(374),n(643)),a=n(213),c=n.n(a);window.fslightbox=c(),function(n){(0,o.Z)(l,n);var s,a,c=(s=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,i.Z)(s);if(a){var n=(0,i.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,r.Z)(this,e)});function l(){return(0,e.Z)(this,l),c.apply(this,arguments)}return(0,t.Z)(l,[{key:"onReady",value:function(){app.watchElements({totalPrice:".total-price",beforePrice:".before-price",startingPriceTitle:".starting-price-title"})}},{key:"registerEvents",value:function(){salla.product.event.onPriceUpdated((function(e){var t;null===(t=app.startingPriceTitle)||void 0===t||t.classList.add("hidden"),app.totalPrice.forEach((function(t){return t.innerText=salla.money(e.data.price)})),app.anime(".total-price",{scale:[.88,1]}),e.data.has_sale_price?app.beforePrice.forEach((function(t){t.style.display="inline",t.innerText=salla.money(e.data.regular_price)})):app.beforePrice.length&&app.beforePrice.forEach((function(e){return e.style.display="none"}))})),app.onClick("#btn-show-more",(function(e){return app.all("#more-content",(function(t){e.target.classList.add("is-expanded"),t.style="max-height:".concat(t.scrollHeight,"px")}))||e.target.remove()}))}}]),l}(s.Z).initiateWhenReady(["product.single"])})(),(()=>{"use strict";var e=n(671),t=n(144),o=n(136),r=n(963),i=n(120),s=n(643);const a=function(){function e(e){var t=this;this.listener=function(e){(e.matches?t.matchFns:t.unmatchFns).forEach((function(e){e()}))},this.toggler=window.matchMedia(e),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return e.prototype.add=function(e,t){this.matchFns.push(e),this.unmatchFns.push(t),(this.toggler.matches?e:t)()},e}();var c=function(e){return Array.prototype.slice.call(e)},l=function(e,t){return c((t||document).querySelectorAll(e))},u="mm-spn";const d=function(){function e(e,t,n,o,r){this.node=e,this.title=t,this.slidingSubmenus=o,this.selectedClass=n,this.node.classList.add(u),this.node.classList.add(u+"--"+r),this.node.classList.add(u+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(e.prototype,"prefix",{get:function(){return u},enumerable:!1,configurable:!0}),e.prototype.openPanel=function(e){var t=e.parentElement;if(this.slidingSubmenus){var n=e.dataset.mmSpnTitle;t===this.node?this.node.classList.add(u+"--main"):(this.node.classList.remove(u+"--main"),n||c(t.children).forEach((function(e){e.matches("a, span")&&(n=e.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,l("."+u+"--open",this.node).forEach((function(e){e.classList.remove(u+"--open"),e.classList.remove(u+"--parent")})),e.classList.add(u+"--open"),e.classList.remove(u+"--parent");for(var o=e.parentElement.closest("ul");o;)o.classList.add(u+"--open"),o.classList.add(u+"--parent"),o=o.parentElement.closest("ul")}else{var r=e.matches("."+u+"--open");l("."+u+"--open",this.node).forEach((function(e){e.classList.remove(u+"--open")})),e.classList[r?"remove":"add"](u+"--open");for(var i=e.parentElement.closest("ul");i;)i.classList.add(u+"--open"),i=i.parentElement.closest("ul")}},e.prototype._setSelectedl=function(){var e=l("."+this.selectedClass,this.node),t=e[e.length-1],n=null;t&&(n=t.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},e.prototype._initAnchors=function(){var e=this;this.node.addEventListener("click",(function(t){var n=t.target,o=!1;o=o||function(e){return!!e.matches("a")}(n),o=o||function(t){var n;return!!(n=t.closest("span")?t.parentElement:!!t.closest("li")&&t)&&(c(n.children).forEach((function(t){t.matches("ul")&&e.openPanel(t)})),!0)}(n),o=o||function(t){var n=l("."+u+"--open",t),o=n[n.length-1];if(o){var r=o.parentElement.closest("ul");if(r)return e.openPanel(r),!0}return!1}(n),o&&t.stopImmediatePropagation()}))},e}();var p="mm-ocd";const f=function(){function e(e,t){var n=this;void 0===e&&(e=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add(""+p),this.wrapper.classList.add(p+"--"+t),this.content=document.createElement("div"),this.content.classList.add(p+"__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add(p+"__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),e&&this.content.append(e);var o=function(e){n.close(),e.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",o,{passive:!0}),this.backdrop.addEventListener("mousedown",o,{passive:!0})}return Object.defineProperty(e.prototype,"prefix",{get:function(){return p},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.wrapper.classList.add(p+"--open"),document.body.classList.add(p+"-opened")},e.prototype.close=function(){this.wrapper.classList.remove(p+"--open"),document.body.classList.remove(p+"-opened")},e}(),h=function(){function e(e,t){void 0===t&&(t="all"),this.menu=e,this.toggler=new a(t)}return e.prototype.navigation=function(e){var t=this;if(!this.navigator){var n=(e=e||{}).title,o=void 0===n?"Menu":n,r=e.selectedClass,i=void 0===r?"Selected":r,s=e.slidingSubmenus,a=void 0===s||s,c=e.theme,l=void 0===c?"light":c;this.navigator=new d(this.menu,o,i,a,l),this.toggler.add((function(){return t.menu.classList.add(t.navigator.prefix)}),(function(){return t.menu.classList.remove(t.navigator.prefix)}))}return this.navigator},e.prototype.offcanvas=function(e){var t=this;if(!this.drawer){var n=(e=e||{}).position,o=void 0===n?"left":n;this.drawer=new f(null,o);var r=document.createComment("original menu location");this.menu.after(r),this.toggler.add((function(){t.drawer.content.append(t.menu)}),(function(){t.drawer.close(),r.after(t.menu)}))}return this.drawer},e}(),m=h;window.MmenuLight=h,function(n){(0,o.Z)(l,n);var s,a,c=(s=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,i.Z)(s);if(a){var n=(0,i.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,r.Z)(this,e)});function l(){return(0,e.Z)(this,l),c.apply(this,arguments)}return(0,t.Z)(l,[{key:"onReady",value:function(){var e=app.element("salla-products-list"),t=new URLSearchParams(window.location.search);t.has("sort")&&(app.element("#product-filter").value=t.get("sort")),app.on("change","#product-filter",(function(t){var n=new URL(window.location.href);n.searchParams.set("sort",t.currentTarget.value),window.history.pushState({},"",n),e.sortBy=t.currentTarget.value})),salla.event.once("salla-products-list::products.fetched",(function(e){e.title&&(app.element("#page-main-title").innerHTML=e.title)})),this.initiateMobileMenu()}},{key:"initiateMobileMenu",value:function(){var e=app.element("#filters-menu"),t=app.element("a[href='#filters-menu']"),n=app.element("button.close-filters");if(e){var o=(e=new m(e,"(max-width: 1024px)","( slidingSubmenus: false)")).offcanvas({position:salla.config.get("theme.is_rtl")?"right":"left"});t.addEventListener("click",(function(e){document.body.classList.add("filters-opened"),e.preventDefault()||o.close()||o.open()})),n.addEventListener("click",(function(e){document.body.classList.remove("filters-opened"),e.preventDefault()||o.close()})),salla.event.on("salla-filters::changed",(function(e){Object.entries(e).length&&(document.body.classList.remove("filters-opened"),o.close())}))}}}]),l}(s.Z).initiateWhenReady(["product.index","product.index.latest","product.index.offers","product.index.search","product.index.tag"])})()})(); \ No newline at end of file +(()=>{var e={643:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(671),i=n(144),r=function(){function e(){(0,o.Z)(this,e)}return(0,i.Z)(e,[{key:"onReady",value:function(){}},{key:"registerEvents",value:function(){}},{key:"initiate",value:function(e){if(e&&!e.includes(salla.config.get("page.slug")))return app.log("The Class For (".concat(e.join(","),") Skipped."));this.onReady(),this.registerEvents(),app.log("The Class For (".concat((null==e?void 0:e.join(","))||"*",") Loaded🎉"))}}]),e}();r.initiateWhenReady=function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;"ready"===(null===(e=window.app)||void 0===e?void 0:e.status)?(new this).initiate(n):document.addEventListener("theme::ready",(function(){return(new t).initiate(n)}))};const s=r},213:e=>{window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o,i="fslightbox-",r="".concat(i,"styles"),s="".concat(i,"cursor-grabbing"),a="".concat(i,"full-dimension"),c="".concat(i,"flex-centered"),l="".concat(i,"open"),u="".concat(i,"transform-transition"),d="".concat(i,"absoluted"),p="".concat(i,"slide-btn"),f="".concat(p,"-container"),h="".concat(i,"fade-in"),m="".concat(i,"fade-out"),v=h+"-strong",g=m+"-strong",b="".concat(i,"opacity-"),x="".concat(b,"1"),y="".concat(i,"source");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){var t,n=e.props,o=0,i={};this.getSourceTypeFromLocalStorageByUrl=function(e){return t[e]?t[e]:r(e)},this.handleReceivedSourceTypeForUrl=function(e,n){if(!1===i[n]&&(o--,"invalid"!==e?i[n]=e:delete i[n],0===o)){!function(e,t){for(var n in t)e[n]=t[n]}(t,i);try{localStorage.setItem("fslightbox-types",JSON.stringify(t))}catch(e){}}};var r=function(e){o++,i[e]=!1};if(n.disableLocalStorage)this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){};else{try{t=JSON.parse(localStorage.getItem("fslightbox-types"))}catch(e){}t||(t={},this.getSourceTypeFromLocalStorageByUrl=r)}}function L(e,t,n,o){var i=e.data,r=e.elements.sources,s=n/o,a=0;this.adjustSize=function(){if((a=i.maxSourceWidth/s)i.maxSourceHeight?i.maxSourceHeight:o,c()};var c=function(){r[t].style.width=a*s+"px",r[t].style.height=a+"px"}}function E(e,t){var n=this,o=e.collections.sourceSizers,i=e.elements,r=i.sourceAnimationWrappers,s=i.sources,a=e.isl,c=e.resolve;function l(e,n){o[t]=c(L,[t,e,n]),o[t].adjustSize()}this.runActions=function(e,o){a[t]=!0,s[t].classList.add(x),r[t].classList.add(v),r[t].removeChild(r[t].firstChild),l(e,o),n.runActions=l}}function C(e,t){var n,o=this,i=e.elements.sources,r=e.props,s=(0,e.resolve)(E,[t]);this.handleImageLoad=function(e){var t=e.target,n=t.naturalWidth,o=t.naturalHeight;s.runActions(n,o)},this.handleVideoLoad=function(e){var t=e.target,o=t.videoWidth,i=t.videoHeight;n=!0,s.runActions(o,i)},this.handleNotMetaDatedVideoLoad=function(){n||o.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;r.maxYoutubeDimensions&&(e=r.maxYoutubeDimensions.width,t=r.maxYoutubeDimensions.height),s.runActions(e,t)},this.handleCustomLoad=function(){var e=i[t],n=e.offsetWidth,r=e.offsetHeight;n&&r?s.runActions(n,r):setTimeout(o.handleCustomLoad)}}function A(e,t,n){var o=e.elements.sources,i=e.props.customClasses,r=i[t]?i[t]:"";o[t].className=n+" "+r}function P(e,t){var n=e.elements.sources,o=e.props.customAttributes;for(var i in o[t])n[t].setAttribute(i,o[t][i])}function F(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=document.createElement("img"),A(e,t,y),i[t].src=s[t],i[t].onload=n[t].handleImageLoad,P(e,t),r[t].appendChild(i[t])}function I(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props,a=s.sources,c=s.videosPosters;i[t]=document.createElement("video"),A(e,t,y),i[t].src=a[t],i[t].onloadedmetadata=function(e){n[t].handleVideoLoad(e)},i[t].controls=!0,P(e,t),c[t]&&(i[t].poster=c[t]);var l=document.createElement("source");l.src=a[t],i[t].appendChild(l),setTimeout(n[t].handleNotMetaDatedVideoLoad,3e3),r[t].appendChild(i[t])}function T(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,s=o.sourceAnimationWrappers,a=e.props.sources;r[t]=document.createElement("iframe"),A(e,t,"".concat(y," ").concat(i,"youtube-iframe"));var c=a[t],l=c.split("?")[1];r[t].src="https://www.youtube.com/embed/".concat(c.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?").concat(l||""),r[t].allowFullscreen=!0,P(e,t),s[t].appendChild(r[t]),n[t].handleYoutubeLoad()}function k(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=s[t],A(e,t,"".concat(i[t].className," ").concat(y)),r[t].appendChild(i[t]),n[t].handleCustomLoad()}function N(e,t){var n=e.elements,o=n.sources,r=n.sourceAnimationWrappers;e.props.sources,o[t]=document.createElement("div"),o[t].className="".concat(i,"invalid-file-wrapper ").concat(c),o[t].innerHTML="Invalid source",r[t].classList.add(v),r[t].removeChild(r[t].firstChild),r[t].appendChild(o[t])}function R(e){var t=e.collections,n=t.sourceLoadHandlers,o=t.sourcesRenderFunctions,i=e.core.sourceDisplayFacade,r=e.resolve;this.runActionsForSourceTypeAndIndex=function(t,s){var a;switch("invalid"!==t&&(n[s]=r(C,[s])),t){case"image":a=F;break;case"video":a=I;break;case"youtube":a=T;break;case"custom":a=k;break;default:a=N}o[s]=function(){return a(e,s)},i.displaySourcesWhichShouldBeDisplayed()}}function z(){var e,t,n,o=function(e){var t=document.createElement("a");return t.href=e,"www.youtube.com"===t.hostname||"youtu.be"===t.hostname},i=function(e){return e.slice(0,e.indexOf("/"))};function r(){if(4!==n.readyState){if(2===n.readyState){var e;switch(i(n.getResponseHeader("content-type"))){case"image":e="image";break;case"video":e="video";break;default:e="invalid"}n.onreadystatechange=null,n.abort(),t(e)}}else t("invalid")}this.setUrlToCheck=function(t){e=t},this.getSourceType=function(i){if(o(e))return i("youtube");t=i,(n=new XMLHttpRequest).onreadystatechange=r,n.open("GET",e,!0),n.send()}}function O(e,t,n){var o=e.props,i=o.types,r=o.type,s=o.sources,a=e.resolve;this.getTypeSetByClientForIndex=function(e){var t;return i&&i[e]?t=i[e]:r&&(t=r),t},this.retrieveTypeWithXhrForIndex=function(e){var o=a(z);o.setUrlToCheck(s[e]),o.getSourceType((function(o){t.handleReceivedSourceTypeForUrl(o,s[e]),n.runActionsForSourceTypeAndIndex(o,e)}))}}function j(e,t){var n=e.core.stageManager,o=e.elements,i=o.smw,r=o.sourceWrappersContainer,s=e.props,l=0,p=document.createElement("div");function f(e){p.style.transform="translateX(".concat(e+l,"px)"),l=0}function h(){return(1+s.slideDistance)*innerWidth}p.className="".concat(d," ").concat(a," ").concat(c),p.s=function(){p.style.display="flex"},p.h=function(){p.style.display="none"},p.a=function(){p.classList.add(u)},p.d=function(){p.classList.remove(u)},p.n=function(){p.style.removeProperty("transform")},p.v=function(e){return l=e,p},p.ne=function(){f(-h())},p.z=function(){f(0)},p.p=function(){f(h())},n.i(t)||p.h(),i[t]=p,r.appendChild(p),function(e,t){var n=e.elements,o=n.smw,i=n.sourceAnimationWrappers,r=document.createElement("div"),s=document.createElement("div");s.className="fslightboxl";for(var a=0;a<3;a++){var c=document.createElement("div");s.appendChild(c)}r.appendChild(s),o[t].appendChild(r),i[t]=r}(e,t)}function H(e,t,n,o){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"width",t),r.setAttributeNS(null,"height",t),r.setAttributeNS(null,"viewBox",n);var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"class","".concat(i,"svg-path")),s.setAttributeNS(null,"d",o),r.appendChild(s),e.appendChild(r),r}function W(e,t){var n=document.createElement("div");return n.className="".concat(i,"toolbar-button ").concat(c),n.title=t,e.appendChild(n),n}function M(e){var t=e.props.sources,n=e.elements.container,o=document.createElement("div");o.className="".concat(i,"nav"),n.appendChild(o),function(e,t){var n=document.createElement("div");n.className="".concat(i,"toolbar"),t.appendChild(n),function(e,t){var n=e.componentsServices,o=e.data,i=e.fs,r="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",s=W(t);s.title="Enter fullscreen";var a=H(s,"20px","0 0 18 18",r);n.ofs=function(){o.ifs=!0,s.title="Exit fullscreen",a.setAttributeNS(null,"width","24px"),a.setAttributeNS(null,"height","24px"),a.setAttributeNS(null,"viewBox","0 0 950 1024"),a.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},n.xfs=function(){o.ifs=!1,s.title="Enter fullscreen",a.setAttributeNS(null,"width","20px"),a.setAttributeNS(null,"height","20px"),a.setAttributeNS(null,"viewBox","0 0 18 18"),a.firstChild.setAttributeNS(null,"d",r)},s.onclick=i.t}(e,n),function(e,t){var n=W(t,"Close");n.onclick=e.core.lightboxCloser.closeLightbox,H(n,"20px","0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(e,n)}(e,o),t.length>1&&function(e,t){var n=e.componentsServices,o=e.props.sources,r=(e.stageIndexes,document.createElement("div"));r.className="".concat(i,"slide-number-container");var s=document.createElement("div");s.className=c;var a=document.createElement("span");n.setSlideNumber=function(e){return a.innerHTML=e};var l=document.createElement("span");l.className="".concat(i,"slash");var u=document.createElement("div");u.innerHTML=o.length,r.appendChild(s),s.appendChild(a),s.appendChild(l),s.appendChild(u),t.appendChild(r),setTimeout((function(){s.offsetWidth>55&&(r.style.justifyContent="flex-start")}))}(e,o)}function Z(e,t,n,o){var i=e.elements.container,r=n.charAt(0).toUpperCase()+n.slice(1),s=document.createElement("div");s.className="".concat(f," ").concat(f,"-").concat(n),s.title="".concat(r," slide"),s.onclick=t,function(e,t){var n=document.createElement("div");n.className="".concat(p," ").concat(c),H(n,"20px","0 0 20 20",t),e.appendChild(n)}(s,o),i.appendChild(s)}function D(e){var t=e.core,n=t.lightboxCloser,o=t.slideChangeFacade,i=e.fs;this.listener=function(e){switch(e.key){case"Escape":n.closeLightbox();break;case"ArrowLeft":o.changeToPrevious();break;case"ArrowRight":o.changeToNext();break;case"F11":e.preventDefault(),i.t()}}}function _(e){var t=e.elements,n=e.sourcePointerProps,o=e.stageIndexes;function i(e,o){t.smw[e].v(n.swipedX)[o]()}this.runActionsForEvent=function(e){var r,a,c;t.container.contains(t.slideSwipingHoverer)||t.container.appendChild(t.slideSwipingHoverer),r=t.container,a=s,(c=r.classList).contains(a)||c.add(a),n.swipedX=e.screenX-n.downScreenX;var l=o.previous,u=o.next;i(o.current,"z"),void 0!==l&&n.swipedX>0?i(l,"ne"):void 0!==u&&n.swipedX<0&&i(u,"p")}}function B(e){var t=e.props.sources,n=e.resolve,o=e.sourcePointerProps,i=n(_);1===t.length?this.listener=function(){o.swipedX=1}:this.listener=function(e){o.isPointering&&i.runActionsForEvent(e)}}function X(e){var t=e.core.slideIndexChanger,n=e.elements.smw,o=e.stageIndexes,i=e.sws;function r(e){var t=n[o.current];t.a(),t[e]()}function s(e,t){void 0!==e&&(n[e].s(),n[e][t]())}this.runPositiveSwipedXActions=function(){var e=o.previous;if(void 0===e)r("z");else{r("p");var n=o.next;t.changeTo(e);var a=o.previous;i.d(a),i.b(n),r("z"),s(a,"ne")}},this.runNegativeSwipedXActions=function(){var e=o.next;if(void 0===e)r("z");else{r("ne");var n=o.previous;t.changeTo(e);var a=o.next;i.d(a),i.b(n),r("z"),s(a,"p")}}}function U(e,t){e.contains(t)&&e.removeChild(t)}function q(e){var t=e.core.lightboxCloser,n=e.elements,o=e.resolve,i=e.sourcePointerProps,r=o(X);this.runNoSwipeActions=function(){U(n.container,n.slideSwipingHoverer),i.isSourceDownEventTarget||t.closeLightbox(),i.isPointering=!1},this.runActions=function(){i.swipedX>0?r.runPositiveSwipedXActions():r.runNegativeSwipedXActions(),U(n.container,n.slideSwipingHoverer),n.container.classList.remove(s),i.isPointering=!1}}function V(e){var t=e.resolve,n=e.sourcePointerProps,o=t(q);this.listener=function(){n.isPointering&&(n.swipedX?o.runActions():o.runNoSwipeActions())}}function Y(e){var t=this,n=e.core,o=n.eventsDispatcher,i=n.globalEventsController,r=n.scrollbarRecompensor,s=e.data,a=e.elements,c=e.fs,u=e.props,d=e.sourcePointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){t.isLightboxFadingOut=!0,a.container.classList.add(g),i.removeListeners(),u.exitFullscreenOnClose&&s.ifs&&c.x(),setTimeout((function(){t.isLightboxFadingOut=!1,d.isPointering=!1,a.container.classList.remove(g),document.documentElement.classList.remove(l),r.removeRecompense(),document.body.removeChild(a.container),o.dispatch("onClose")}),270)}}function $(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function J(e){var t,n,o;n=(t=e).core.eventsDispatcher,o=t.props,n.dispatch=function(e){o[e]&&o[e]()},function(e){var t=e.componentsServices,n=e.data,o=e.fs,i=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];function r(e){for(var t=0;tinnerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")}n.addRecompense=function(){"complete"===document.readyState?o():addEventListener("load",(function(){o(),n.addRecompense=o}))},n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),function(e){var t=e.core,n=t.slideChangeFacade,o=t.slideIndexChanger,i=t.stageManager;e.props.sources.length>1?(n.changeToPrevious=function(){o.jumpTo(i.getPreviousSlideIndex())},n.changeToNext=function(){o.jumpTo(i.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(e),function(e){var t=e.componentsServices,n=e.core,o=n.slideIndexChanger,i=n.sourceDisplayFacade,r=n.stageManager,s=e.elements,a=s.smw,c=s.sourceAnimationWrappers,l=e.isl,u=e.stageIndexes,d=e.sws;o.changeTo=function(e){u.current=e,r.updateStageIndexes(),t.setSlideNumber(e+1),i.displaySourcesWhichShouldBeDisplayed()},o.jumpTo=function(e){var t=u.previous,n=u.current,i=u.next,s=l[n],p=l[e];o.changeTo(e);for(var f=0;fe.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(e),G(t,function(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n))},this.collections={sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={eventsDispatcher:{},globalEventsController:{},lightboxCloser:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},this.fs={},this.sws={},function(e){var t=e.componentsServices,n=e.core,o=n.eventsDispatcher,r=n.globalEventsController,s=n.scrollbarRecompensor,c=n.sourceDisplayFacade,u=n.stageManager,p=n.windowResizeActioner,f=e.data,h=e.elements,m=(e.props,e.stageIndexes),g=e.sws;function b(){var t,n;f.i=!0,f.scrollbarWidth=function(){var e=document.createElement("div"),t=e.style,n=document.createElement("div");t.visibility="hidden",t.width="100px",t.msOverflowStyle="scrollbar",t.overflow="scroll",n.style.width="100%",document.body.appendChild(e);var o=e.offsetWidth;e.appendChild(n);var i=n.offsetWidth;return document.body.removeChild(e),o-i}(),J(e),h.container=document.createElement("div"),h.container.className="".concat(i,"container ").concat(a," ").concat(v),function(e){var t=e.elements;t.slideSwipingHoverer=document.createElement("div"),t.slideSwipingHoverer.className="".concat(i,"slide-swiping-hoverer ").concat(a," ").concat(d)}(e),M(e),function(e){var t=e.core.sourcesPointerDown,n=e.elements,o=e.props.sources,i=document.createElement("div");i.className="".concat(d," ").concat(a),n.container.appendChild(i),i.addEventListener("pointerdown",t.listener),n.sourceWrappersContainer=i;for(var r=0;r1&&(n=(t=e).core.slideChangeFacade,Z(t,n.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),Z(t,n.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")),function(e){for(var t=e.props.sources,n=e.resolve,o=n(S),i=n(R),r=n(O,[o,i]),s=0;s0&&void 0!==arguments[0]?arguments[0]:0,i=m.previous,a=m.current,d=m.next;m.current=n,f.i||function(e){var t=e.stageIndexes,n=e.core.stageManager,o=e.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===t.current?o:t.current-1},n.getNextSlideIndex=function(){return t.current===o?0:t.current+1},n.updateStageIndexes=0===o?function(){}:1===o?function(){0===t.current?(t.next=1,delete t.previous):(t.previous=0,delete t.next)}:function(){t.previous=n.getPreviousSlideIndex(),t.next=n.getNextSlideIndex()},n.i=o<=2?function(){return!0}:function(e){var n=t.current;if(0===n&&e===o||n===o&&0===e)return!0;var i=n-e;return-1===i||0===i||1===i}}(e),u.updateStageIndexes(),f.i?(g.c(),g.a(),g.b(i),g.b(a),g.b(d),o.dispatch("onShow")):b(),c.displaySourcesWhichShouldBeDisplayed(),t.setSlideNumber(n+1),document.body.appendChild(h.container),document.documentElement.classList.add(l),s.addRecompense(),r.attachListeners(),p.runActions(),h.smw[m.current].n(),o.dispatch("onOpen")}}(this),this.close=function(){return e.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},ee(),window.refreshFsLightbox=function(){for(var e in fsLightboxInstances){var t=fsLightboxInstances[e].props;fsLightboxInstances[e]=new FsLightbox,fsLightboxInstances[e].props=t,fsLightboxInstances[e].props.sources=[],fsLightboxInstances[e].elements.a=[]}ee()}}])},374:()=>{class e extends HTMLElement{connectedCallback(){this.videoId=this.getAttribute("videoid");let t=this.querySelector(".lty-playbtn");if(this.playLabel=t&&t.textContent.trim()||this.getAttribute("playlabel")||"Play",this.style.backgroundImage||(this.posterUrl=`https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg`,e.addPrefetch("preload",this.posterUrl,"image"),this.style.backgroundImage=`url("${this.posterUrl}")`),t||(t=document.createElement("button"),t.type="button",t.classList.add("lty-playbtn"),this.append(t)),!t.textContent){const e=document.createElement("span");e.className="lyt-visually-hidden",e.textContent=this.playLabel,t.append(e)}this.addEventListener("pointerover",e.warmConnections,{once:!0}),this.addEventListener("click",(e=>this.addIframe()))}static addPrefetch(e,t,n){const o=document.createElement("link");o.rel=e,o.href=t,n&&(o.as=n),document.head.append(o)}static warmConnections(){e.preconnected||(e.addPrefetch("preconnect","https://www.youtube-nocookie.com"),e.addPrefetch("preconnect","https://www.google.com"),e.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),e.addPrefetch("preconnect","https://static.doubleclick.net"),e.preconnected=!0)}addIframe(){const e=new URLSearchParams(this.getAttribute("params")||[]);e.append("autoplay","1");const t=document.createElement("iframe");t.width=560,t.height=315,t.title=this.playLabel,t.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",t.allowFullscreen=!0,t.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${e.toString()}`,this.append(t),this.classList.add("lyt-activated"),this.querySelector("iframe").focus()}}customElements.define("lite-youtube",e)},326:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>o})},671:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>o})},144:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(343);function i(e,t){for(var n=0;n{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{Z:()=>o})},136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(611);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.Z)(e,t)}},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(2),i=n(326);function r(e,t){if(t&&("object"===(0,o.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},611:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{Z:()=>o})},512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(2);function i(e,t){if("object"!==(0,o.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,o.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},343:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(2),i=n(512);function r(e){var t=(0,i.Z)(e,"string");return"symbol"===(0,o.Z)(t)?t:String(t)}},2:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{Z:()=>o})}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(671),t=n(144),o=n(136),i=n(963),r=n(120),s=(n(374),n(643)),a=n(213),c=n.n(a);window.fslightbox=c(),function(n){(0,o.Z)(l,n);var s,a,c=(s=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,r.Z)(s);if(a){var n=(0,r.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,i.Z)(this,e)});function l(){return(0,e.Z)(this,l),c.apply(this,arguments)}return(0,t.Z)(l,[{key:"onReady",value:function(){app.watchElements({totalPrice:".total-price",beforePrice:".before-price",startingPriceTitle:".starting-price-title"})}},{key:"registerEvents",value:function(){salla.product.event.onPriceUpdated((function(e){var t;null===(t=app.startingPriceTitle)||void 0===t||t.classList.add("hidden"),app.totalPrice.forEach((function(t){return t.innerText=salla.money(e.data.price)})),app.anime(".total-price",{scale:[.88,1]}),e.data.has_sale_price?app.beforePrice.forEach((function(t){t.style.display="inline",t.innerText=salla.money(e.data.regular_price)})):app.beforePrice.length&&app.beforePrice.forEach((function(e){return e.style.display="none"}))})),app.onClick("#btn-show-more",(function(e){return app.all("#more-content",(function(t){e.target.classList.add("is-expanded"),t.style="max-height:".concat(t.scrollHeight,"px")}))||e.target.remove()}))}}]),l}(s.Z).initiateWhenReady(["product.single"])})(),(()=>{"use strict";var e=n(671),t=n(144),o=n(136),i=n(963),r=n(120),s=n(643);const a=function(){function e(e){var t=this;this.listener=function(e){(e.matches?t.matchFns:t.unmatchFns).forEach((function(e){e()}))},this.toggler=window.matchMedia(e),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return e.prototype.add=function(e,t){this.matchFns.push(e),this.unmatchFns.push(t),(this.toggler.matches?e:t)()},e}();var c=function(e){return Array.prototype.slice.call(e)},l=function(e,t){return c((t||document).querySelectorAll(e))},u="mm-spn";const d=function(){function e(e,t,n,o,i){this.node=e,this.title=t,this.slidingSubmenus=o,this.selectedClass=n,this.node.classList.add(u),this.node.classList.add(u+"--"+i),this.node.classList.add(u+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(e.prototype,"prefix",{get:function(){return u},enumerable:!1,configurable:!0}),e.prototype.openPanel=function(e){var t=e.parentElement;if(this.slidingSubmenus){var n=e.dataset.mmSpnTitle;t===this.node?this.node.classList.add(u+"--main"):(this.node.classList.remove(u+"--main"),n||c(t.children).forEach((function(e){e.matches("a, span")&&(n=e.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,l("."+u+"--open",this.node).forEach((function(e){e.classList.remove(u+"--open"),e.classList.remove(u+"--parent")})),e.classList.add(u+"--open"),e.classList.remove(u+"--parent");for(var o=e.parentElement.closest("ul");o;)o.classList.add(u+"--open"),o.classList.add(u+"--parent"),o=o.parentElement.closest("ul")}else{var i=e.matches("."+u+"--open");l("."+u+"--open",this.node).forEach((function(e){e.classList.remove(u+"--open")})),e.classList[i?"remove":"add"](u+"--open");for(var r=e.parentElement.closest("ul");r;)r.classList.add(u+"--open"),r=r.parentElement.closest("ul")}},e.prototype._setSelectedl=function(){var e=l("."+this.selectedClass,this.node),t=e[e.length-1],n=null;t&&(n=t.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},e.prototype._initAnchors=function(){var e=this;this.node.addEventListener("click",(function(t){var n=t.target,o=!1;o=o||function(e){return!!e.matches("a")}(n),o=o||function(t){var n;return!!(n=t.closest("span")?t.parentElement:!!t.closest("li")&&t)&&(c(n.children).forEach((function(t){t.matches("ul")&&e.openPanel(t)})),!0)}(n),o=o||function(t){var n=l("."+u+"--open",t),o=n[n.length-1];if(o){var i=o.parentElement.closest("ul");if(i)return e.openPanel(i),!0}return!1}(n),o&&t.stopImmediatePropagation()}))},e}();var p="mm-ocd";const f=function(){function e(e,t){var n=this;void 0===e&&(e=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add(""+p),this.wrapper.classList.add(p+"--"+t),this.content=document.createElement("div"),this.content.classList.add(p+"__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add(p+"__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),e&&this.content.append(e);var o=function(e){n.close(),e.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",o,{passive:!0}),this.backdrop.addEventListener("mousedown",o,{passive:!0})}return Object.defineProperty(e.prototype,"prefix",{get:function(){return p},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.wrapper.classList.add(p+"--open"),document.body.classList.add(p+"-opened")},e.prototype.close=function(){this.wrapper.classList.remove(p+"--open"),document.body.classList.remove(p+"-opened")},e}(),h=function(){function e(e,t){void 0===t&&(t="all"),this.menu=e,this.toggler=new a(t)}return e.prototype.navigation=function(e){var t=this;if(!this.navigator){var n=(e=e||{}).title,o=void 0===n?"Menu":n,i=e.selectedClass,r=void 0===i?"Selected":i,s=e.slidingSubmenus,a=void 0===s||s,c=e.theme,l=void 0===c?"light":c;this.navigator=new d(this.menu,o,r,a,l),this.toggler.add((function(){return t.menu.classList.add(t.navigator.prefix)}),(function(){return t.menu.classList.remove(t.navigator.prefix)}))}return this.navigator},e.prototype.offcanvas=function(e){var t=this;if(!this.drawer){var n=(e=e||{}).position,o=void 0===n?"left":n;this.drawer=new f(null,o);var i=document.createComment("original menu location");this.menu.after(i),this.toggler.add((function(){t.drawer.content.append(t.menu)}),(function(){t.drawer.close(),i.after(t.menu)}))}return this.drawer},e}(),m=h;window.MmenuLight=h,function(n){(0,o.Z)(l,n);var s,a,c=(s=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,r.Z)(s);if(a){var n=(0,r.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,i.Z)(this,e)});function l(){return(0,e.Z)(this,l),c.apply(this,arguments)}return(0,t.Z)(l,[{key:"onReady",value:function(){var e=app.element("salla-products-list"),t=new URLSearchParams(window.location.search);t.has("sort")&&(app.element("#product-filter").value=t.get("sort")),themeApp.on("change","#product-filter",(function(t){window.location.href=salla.helpers.addParamToUrl("sort",t.target.value),e.sortBy=t.target.value})),salla.event.once("salla-products-list::products.fetched",(function(e){e.title&&(app.element("#page-main-title").innerHTML=e.title)})),this.initiateMobileMenu()}},{key:"initiateMobileMenu",value:function(){var e=app.element("#filters-menu"),t=app.element("a[href='#filters-menu']"),n=app.element("button.close-filters");if(e){var o=(e=new m(e,"(max-width: 1024px)","( slidingSubmenus: false)")).offcanvas({position:salla.config.get("theme.is_rtl")?"right":"left"});t.addEventListener("click",(function(e){document.body.classList.add("filters-opened"),e.preventDefault()||o.close()||o.open()})),n.addEventListener("click",(function(e){document.body.classList.remove("filters-opened"),e.preventDefault()||o.close()})),salla.event.on("salla-filters::changed",(function(e){Object.entries(e).length&&(document.body.classList.remove("filters-opened"),o.close())}))}}}]),l}(s.Z).initiateWhenReady(["product.index","product.index.latest","product.index.offers","product.index.search","product.index.tag"])})()})(); \ No newline at end of file diff --git a/src/assets/js/products.js b/src/assets/js/products.js index 5dadedf5..38e3e2ed 100644 --- a/src/assets/js/products.js +++ b/src/assets/js/products.js @@ -13,11 +13,9 @@ class Products extends BasePage { // Sort Products - app.on('change', '#product-filter', event => { - let url = new URL(window.location.href); - url.searchParams.set('sort', event.currentTarget.value); - window.history.pushState({}, '', url); - productsList.sortBy = event.currentTarget.value; + themeApp.on('change', '#product-filter', event => { + window.location.href = salla.helpers.addParamToUrl('sort', event.target.value); + productsList.sortBy = event.target.value; }); salla.event.once('salla-products-list::products.fetched', res=>{