(()=>{"use strict";function e(){var e;let t;e=function(e){document.documentElement.classList.add(!0===e?"webp":"no-webp")},(t=new Image).onload=t.onerror=function(){e(2==t.height)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}let t={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()}};function i(){window.addEventListener("load",function(){setTimeout(function(){document.documentElement.classList.add("loaded")},0)})}function s(){if(location.hash)return location.hash.replace("#","")}function n(e){e=e?`#${e}`:window.location.href.split("#")[0],history.pushState("","",e)}let a=(e,t=500,i=0)=>{e.classList.contains("_slide")||(e.classList.add("_slide"),e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=`${e.offsetHeight}px`,e.offsetHeight,e.style.overflow="hidden",e.style.height=i?`${i}px`:"0px",e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.hidden=!i,i||e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),i||e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("_slide"),document.dispatchEvent(new CustomEvent("slideUpDone",{detail:{target:e}}))},t))},l=(e,t=500,i=0)=>{if(!e.classList.contains("_slide")){e.classList.add("_slide"),e.hidden=!e.hidden&&null,i&&e.style.removeProperty("height");let s=e.offsetHeight;e.style.overflow="hidden",e.style.height=i?`${i}px`:"0px",e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=s+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("_slide"),document.dispatchEvent(new CustomEvent("slideDownDone",{detail:{target:e}}))},t)}},r=(e,t=500)=>e.hidden?l(e,t):a(e,t),o=!0,d=(e=500)=>{document.documentElement.classList.contains("lock")?c(e):h(e)},c=(e=500)=>{let t=document.querySelector("body");if(o){let i=document.querySelectorAll("[data-lp]");setTimeout(()=>{for(let e=0;e{let t=document.querySelector("body");if(o){let i=document.querySelectorAll("[data-lp]");for(let s=0;s0){let t=Array.from(e).filter(function(e,t,i){return!e.dataset.spollers.split(",")[0]});t.length&&s(t);let i=g(e,"spollers");function s(e,t=!1){e.forEach(e=>{e=t?e.item:e,t.matches||!t?(e.classList.add("_spoller-init"),n(e),e.addEventListener("click",l)):(e.classList.remove("_spoller-init"),n(e,!1),e.removeEventListener("click",l))})}function n(e,t=!0){let i=e.querySelectorAll("[data-spoller]");i.length&&(i=Array.from(i).filter(t=>t.closest("[data-spollers]")===e)).forEach(e=>{t?(e.removeAttribute("tabindex"),e.classList.contains("_spoller-active")||(e.nextElementSibling.hidden=!0)):(e.setAttribute("tabindex","-1"),e.nextElementSibling.hidden=!1)})}function l(e){let t=e.target;if(t.closest("[data-spoller]")){var i;let s=t.closest("[data-spoller]"),n=s.closest("[data-spollers]"),l=n.hasAttribute("data-one-spoller"),o=n.dataset.spollersSpeed?parseInt(n.dataset.spollersSpeed):500,d,c;n.querySelectorAll("._slide").length||(l&&!s.classList.contains("_spoller-active")&&(d=(i=n).querySelector("[data-spoller]._spoller-active"),c=i.dataset.spollersSpeed?parseInt(i.dataset.spollersSpeed):500,d&&!i.querySelectorAll("._slide").length&&(d.classList.remove("_spoller-active"),a(d.nextElementSibling,c))),s.classList.toggle("_spoller-active"),r(s.nextElementSibling,o)),e.preventDefault()}}i&&i.length&&i.forEach(e=>{e.matchMedia.addEventListener("change",function(){s(e.itemsArray,e.matchMedia)}),s(e.itemsArray,e.matchMedia)});let o=document.querySelectorAll("[data-spoller-close]");o.length&&document.addEventListener("click",function(e){e.target.closest("[data-spollers]")||o.forEach(e=>{let t=e.closest("[data-spollers]"),i=t.dataset.spollersSpeed?parseInt(t.dataset.spollersSpeed):500;e.classList.remove("_spoller-active"),a(e.nextElementSibling,i)})})}}function p(){let e=document.querySelectorAll("[data-tabs]"),t=[];if(e.length>0){let i=s();i&&i.startsWith("tab-")&&(t=i.replace("tab-","").split("-")),e.forEach((e,i)=>{e.classList.add("_tab-init"),e.setAttribute("data-tabs-index",i),e.addEventListener("click",d),function e(i){let s=i.querySelectorAll("[data-tabs-titles]>*"),n=i.querySelectorAll("[data-tabs-body]>*"),a=i.dataset.tabsIndex,l=t[0]==a;if(l){let r=i.querySelector("[data-tabs-titles]>._tab-active");r&&r.classList.remove("_tab-active")}n.length&&(n=Array.from(n).filter(e=>e.closest("[data-tabs]")===i),s=Array.from(s).filter(e=>e.closest("[data-tabs]")===i),n.forEach((e,i)=>{s[i].setAttribute("data-tabs-title",""),e.setAttribute("data-tabs-item",""),l&&i==t[1]&&s[i].classList.add("_tab-active"),e.hidden=!s[i].classList.contains("_tab-active")}))}(e)});let r=g(e,"tabs");r&&r.length&&r.forEach(e=>{e.matchMedia.addEventListener("change",function(){o(e.itemsArray,e.matchMedia)}),o(e.itemsArray,e.matchMedia)})}function o(e,t){e.forEach(e=>{let i=(e=e.item).querySelector("[data-tabs-titles]"),s=e.querySelectorAll("[data-tabs-title]"),n=e.querySelector("[data-tabs-body]"),a=e.querySelectorAll("[data-tabs-item]");s=Array.from(s).filter(t=>t.closest("[data-tabs]")===e),(a=Array.from(a).filter(t=>t.closest("[data-tabs]")===e)).forEach((a,l)=>{t.matches?(n.append(s[l]),n.append(a),e.classList.add("_tab-spoller")):(i.append(s[l]),e.classList.remove("_tab-spoller"))})})}function d(e){let t=e.target;if(t.closest("[data-tabs-title]")){let i=t.closest("[data-tabs-title]"),s=i.closest("[data-tabs]");if(!i.classList.contains("_tab-active")&&!s.querySelector("._slide")){let r=s.querySelectorAll("[data-tabs-title]._tab-active");r.length&&(r=Array.from(r).filter(e=>e.closest("[data-tabs]")===s)),r.length&&r[0].classList.remove("_tab-active"),i.classList.add("_tab-active"),function e(t){let i=t.querySelectorAll("[data-tabs-title]"),s=t.querySelectorAll("[data-tabs-item]"),r=t.dataset.tabsIndex,o=function e(t){if(t.hasAttribute("data-tabs-animate"))return t.dataset.tabsAnimate>0?Number(t.dataset.tabsAnimate):500}(t);if(s.length>0){let d=t.hasAttribute("data-tabs-hash");s=Array.from(s).filter(e=>e.closest("[data-tabs]")===t),i=Array.from(i).filter(e=>e.closest("[data-tabs]")===t),s.forEach((e,t)=>{i[t].classList.contains("_tab-active")?(o?l(e,o):e.hidden=!1,d&&!e.closest(".popup")&&n(`tab-${r}-${t}`)):o?a(e,o):e.hidden=!0})}}(s)}e.preventDefault()}}}function f(){document.querySelector(".icon-menu")&&document.addEventListener("click",function(e){o&&e.target.closest(".icon-menu")&&(document.querySelector("[data-cart]")&&document.querySelector("[data-cart]").classList.contains("_open")?(document.querySelector("[data-cart]").closest("[data-cart-wrapper]").click(),setTimeout(()=>{h(),document.documentElement.classList.add("menu-open")},360)):(d(),document.documentElement.classList.toggle("menu-open")))})}function m(e){return e.filter(function(e,t,i){return i.indexOf(e)===t})}function g(e,t){let i=Array.from(e).filter(function(e,i,s){if(e.dataset[t])return e.dataset[t].split(",")[0]});if(i.length){let s=[];i.forEach(e=>{let i=e.dataset[t],n={},a=i.split(",");n.value=a[0],n.type=a[1]?a[1].trim():"max",n.item=e,s.push(n)});let n=s.map(function(e){return"("+e.type+"-width: "+e.value+"px),"+e.value+","+e.type});n=m(n);let a=[];if(n.length)return n.forEach(e=>{let t=e.split(","),i=t[1],n=t[2],l=window.matchMedia(t[0]),r=s.filter(function(e){if(e.value===i&&e.type===n)return!0});a.push({itemsArray:r,matchMedia:l})}),a}}let v={};class b{constructor(e){let t={logging:!0,init:!0,attributeOpenButton:"data-popup",attributeCloseButton:"data-close",fixElementSelector:"[data-lp]",youtubeAttribute:"data-popup-youtube",youtubePlaceAttribute:"data-popup-youtube-place",setAutoplayYoutube:!0,classes:{popup:"popup",popupContent:"popup__content",popupActive:"popup_show",bodyActive:"popup-show"},focusCatch:!0,closeEsc:!0,bodyLock:!0,hashSettings:{location:!0,goHash:!0},on:{beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){}}};this.youTubeCode,this.isOpen=!1,this.targetOpen={selector:!1,element:!1},this.previousOpen={selector:!1,element:!1},this.lastClosed={selector:!1,element:!1},this._dataValue=!1,this.hash=!1,this._reopen=!1,this._selectorOpen=!1,this.lastFocusEl=!1,this._focusEl=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"button:not([disabled]):not([aria-hidden])","select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","area[href]","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],this.options={...t,...e,classes:{...t.classes,...e?.classes},hashSettings:{...t.hashSettings,...e?.hashSettings},on:{...t.on,...e?.on}},this.bodyLock=!1,this.options.init&&this.initPopups()}initPopups(){this.eventsPopup()}eventsPopup(){document.addEventListener("click",(function(e){let t=e.target.closest(`[${this.options.attributeOpenButton}]`);if(t){e.preventDefault(),this._dataValue=t.getAttribute(this.options.attributeOpenButton)?t.getAttribute(this.options.attributeOpenButton):"error",this.youTubeCode=t.getAttribute(this.options.youtubeAttribute)?t.getAttribute(this.options.youtubeAttribute):null,"error"!==this._dataValue&&(this.isOpen||(this.lastFocusEl=t),this.targetOpen.selector=`${this._dataValue}`,this._selectorOpen=!0,this.open());return}if(e.target.closest(`[${this.options.attributeCloseButton}]`)||!e.target.closest(`.${this.options.classes.popupContent}`)&&this.isOpen){e.preventDefault(),this.close();return}}).bind(this)),document.addEventListener("keydown",(function(e){if(this.options.closeEsc&&27==e.which&&"Escape"===e.code&&this.isOpen){e.preventDefault(),this.close();return}if(this.options.focusCatch&&9==e.which&&this.isOpen){this._focusCatch(e);return}}).bind(this)),this.options.hashSettings.goHash&&(window.addEventListener("hashchange",(function(){window.location.hash?this._openToHash():this.close(this.targetOpen.selector)}).bind(this)),window.addEventListener("load",(function(){window.location.hash&&this._openToHash()}).bind(this)))}open(e){if(o&&(this.bodyLock=!!document.documentElement.classList.contains("lock")&&!this.isOpen,e&&"string"==typeof e&&""!==e.trim()&&(this.targetOpen.selector=e,this._selectorOpen=!0),this.isOpen&&(this._reopen=!0,this.close()),this._selectorOpen||(this.targetOpen.selector=this.lastClosed.selector),this._reopen||(this.previousActiveElement=document.activeElement),this.targetOpen.element=document.querySelector(this.targetOpen.selector),this.targetOpen.element)){if(this.youTubeCode){let t=`https://www.youtube.com/embed/${this.youTubeCode}?rel=0&showinfo=0&autoplay=1`,i=document.createElement("iframe");i.setAttribute("allowfullscreen","");let s=this.options.setAutoplayYoutube?"autoplay;":"";i.setAttribute("allow",`${s}; encrypted-media`),i.setAttribute("src",t),this.targetOpen.element.querySelector(`[${this.options.youtubePlaceAttribute}]`)||this.targetOpen.element.querySelector(".popup__text").setAttribute(`${this.options.youtubePlaceAttribute}`,""),this.targetOpen.element.querySelector(`[${this.options.youtubePlaceAttribute}]`).appendChild(i)}this.options.hashSettings.location&&(this._getHash(),this._setHash()),this.options.on.beforeOpen(this),document.dispatchEvent(new CustomEvent("beforePopupOpen",{detail:{popup:this}})),this.targetOpen.element.classList.add(this.options.classes.popupActive),document.documentElement.classList.add(this.options.classes.bodyActive),this._reopen?this._reopen=!1:this.bodyLock||h(),this.targetOpen.element.setAttribute("aria-hidden","false"),this.previousOpen.selector=this.targetOpen.selector,this.previousOpen.element=this.targetOpen.element,this._selectorOpen=!1,this.isOpen=!0,setTimeout(()=>{this._focusTrap()},50),this.options.on.afterOpen(this),document.dispatchEvent(new CustomEvent("afterPopupOpen",{detail:{popup:this}}))}}close(e){e&&"string"==typeof e&&""!==e.trim()&&(this.previousOpen.selector=e),this.isOpen&&o&&(this.options.on.beforeClose(this),document.dispatchEvent(new CustomEvent("beforePopupClose",{detail:{popup:this}})),this.youTubeCode&&this.targetOpen.element.querySelector(`[${this.options.youtubePlaceAttribute}]`)&&(this.targetOpen.element.querySelector(`[${this.options.youtubePlaceAttribute}]`).innerHTML=""),this.previousOpen.element.classList.remove(this.options.classes.popupActive),this.previousOpen.element.setAttribute("aria-hidden","true"),this._reopen||(document.documentElement.classList.remove(this.options.classes.bodyActive),this.bodyLock||c(),this.isOpen=!1),this._removeHash(),this._selectorOpen&&(this.lastClosed.selector=this.previousOpen.selector,this.lastClosed.element=this.previousOpen.element),this.options.on.afterClose(this),document.dispatchEvent(new CustomEvent("afterPopupClose",{detail:{popup:this}})),setTimeout(()=>{this._focusTrap()},50))}_getHash(){this.options.hashSettings.location&&(this.hash=this.targetOpen.selector.includes("#")?this.targetOpen.selector:this.targetOpen.selector.replace(".","#"))}_openToHash(){let e=document.querySelector(`.${window.location.hash.replace("#","")}`)?`.${window.location.hash.replace("#","")}`:document.querySelector(`${window.location.hash}`)?`${window.location.hash}`:null;(document.querySelector(`[${this.options.attributeOpenButton} = "${e}"]`)?document.querySelector(`[${this.options.attributeOpenButton} = "${e}"]`):document.querySelector(`[${this.options.attributeOpenButton} = "${e.replace(".","#")}"]`))&&e&&this.open(e)}_setHash(){history.pushState("","",this.hash)}_removeHash(){history.pushState("","",window.location.href.split("#")[0])}_focusCatch(e){let t=this.targetOpen.element.querySelectorAll(this._focusEl),i=Array.prototype.slice.call(t),s=i.indexOf(document.activeElement);e.shiftKey&&0===s&&(i[i.length-1].focus(),e.preventDefault()),e.shiftKey||s!==i.length-1||(i[0].focus(),e.preventDefault())}_focusTrap(){let e=this.previousOpen.element.querySelectorAll(this._focusEl);!this.isOpen&&this.lastFocusEl?this.lastFocusEl.focus():e[0].focus()}}v.popup=new b({});let y={getErrors(e){let t=0,i=e.querySelectorAll("*[data-required]");return i.length&&i.forEach(e=>{null===e.offsetParent&&"SELECT"!==e.tagName||e.disabled||(t+=this.validateInput(e))}),t},validateInput(e){let t=0;return"email"===e.dataset.required?(e.value=e.value.replace(" ",""),this.emailTest(e)?(this.addError(e),t++):this.removeError(e)):("checkbox"!==e.type||e.checked)&&e.value.trim()?this.removeError(e):(this.addError(e),t++),t},addError(e){e.classList.add("_form-error"),e.parentElement.classList.add("_form-error");let t=e.parentElement.querySelector(".form__error");t&&e.parentElement.removeChild(t),e.dataset.error&&e.parentElement.insertAdjacentHTML("beforeend",`
${e.dataset.error}
`)},removeError(e){e.classList.remove("_form-error"),e.parentElement.classList.remove("_form-error"),e.parentElement.querySelector(".form__error")&&e.parentElement.removeChild(e.parentElement.querySelector(".form__error"))},formClean(e){e.reset(),setTimeout(()=>{let t=e.querySelectorAll("input,textarea");for(let i=0;i0)for(let a=0;a!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,8})+$/.test(e.value)};function _(){let e=new Event("quantityInputChange",{bubbles:!0});document.addEventListener("click",function(t){let i=t.target;if(i.closest(".quantity__button")){let s=parseInt(i.closest(".quantity").querySelector("input").value);i.classList.contains("quantity__button_plus")?s++:--s<1&&(s=1),i.closest(".quantity").querySelector("input").value=s||1,i.closest(".quantity").querySelector("input").dispatchEvent(e)}})}class S{constructor(e,t=null){let i={init:!0,logging:!0};if(this.config=Object.assign(i,e),this.selectClasses={classSelect:"select",classSelectBody:"select__body",classSelectTitle:"select__title",classSelectValue:"select__value",classSelectLabel:"select__label",classSelectInput:"select__input",classSelectText:"select__text",classSelectLink:"select__link",classSelectOptions:"select__options",classSelectOptionsScroll:"select__scroll",classSelectOption:"select__option",classSelectContent:"select__content",classSelectRow:"select__row",classSelectData:"select__asset",classSelectDisabled:"_select-disabled",classSelectTag:"_select-tag",classSelectOpen:"_select-open",classSelectActive:"_select-active",classSelectFocus:"_select-focus",classSelectMultiple:"_select-multiple",classSelectCheckBox:"_select-checkbox",classSelectOptionSelected:"_select-selected",classSelectPseudoLabel:"_select-pseudo-label"},this._this=this,this.config.init){let s=t?document.querySelectorAll(t):document.querySelectorAll("select");s.length&&this.selectsInit(s)}}getSelectClass(e){return`.${e}`}getSelectElement(e,t){return{originalSelect:e.querySelector("select"),selectElement:e.querySelector(this.getSelectClass(t))}}selectsInit(e){e.forEach((e,t)=>{this.selectInit(e,t+1)}),document.addEventListener("click",(function(e){this.selectsActions(e)}).bind(this)),document.addEventListener("keydown",(function(e){this.selectsActions(e)}).bind(this)),document.addEventListener("focusin",(function(e){this.selectsActions(e)}).bind(this)),document.addEventListener("focusout",(function(e){this.selectsActions(e)}).bind(this))}selectInit(e,t){let i=this,s=document.createElement("div");s.classList.add(this.selectClasses.classSelect),e.parentNode.insertBefore(s,e),s.appendChild(e),e.hidden=!0,t&&(e.dataset.id=t),this.getSelectPlaceholder(e)&&(e.dataset.placeholder=this.getSelectPlaceholder(e).value,this.getSelectPlaceholder(e).label.show)&&this.getSelectElement(s,this.selectClasses.classSelectTitle).selectElement.insertAdjacentHTML("afterbegin",`${this.getSelectPlaceholder(e).label.text?this.getSelectPlaceholder(e).label.text:this.getSelectPlaceholder(e).value}`),s.insertAdjacentHTML("beforeend",`
`),this.selectBuild(e),e.dataset.speed=e.dataset.speed?e.dataset.speed:"150",e.addEventListener("change",function(e){i.selectChange(e)})}selectBuild(e){let t=e.parentElement;t.dataset.id=e.dataset.id,e.dataset.classModif&&t.classList.add(`select_${e.dataset.classModif}`),e.multiple?t.classList.add(this.selectClasses.classSelectMultiple):t.classList.remove(this.selectClasses.classSelectMultiple),e.hasAttribute("data-checkbox")&&e.multiple?t.classList.add(this.selectClasses.classSelectCheckBox):t.classList.remove(this.selectClasses.classSelectCheckBox),this.setSelectTitleValue(t,e),this.setOptions(t,e),e.hasAttribute("data-search")&&this.searchActions(t),e.hasAttribute("data-open")&&this.selectAction(t),this.selectDisabled(t,e)}selectsActions(e){let t=e.target,i=e.type;if(t.closest(this.getSelectClass(this.selectClasses.classSelect))||t.closest(this.getSelectClass(this.selectClasses.classSelectTag))){let s=t.closest(".select")?t.closest(".select"):document.querySelector(`.${this.selectClasses.classSelect}[data-id="${t.closest(this.getSelectClass(this.selectClasses.classSelectTag)).dataset.selectId}"]`),n=this.getSelectElement(s).originalSelect;if("click"===i){if(!n.disabled){if(t.closest(this.getSelectClass(this.selectClasses.classSelectTag))){let a=t.closest(this.getSelectClass(this.selectClasses.classSelectTag)),l=document.querySelector(`.${this.selectClasses.classSelect}[data-id="${a.dataset.selectId}"] .select__option[data-value="${a.dataset.value}"]`);this.optionAction(s,n,l)}else if(t.closest(this.getSelectClass(this.selectClasses.classSelectTitle)))this.selectAction(s);else if(t.closest(this.getSelectClass(this.selectClasses.classSelectOption))){let r=t.closest(this.getSelectClass(this.selectClasses.classSelectOption));this.optionAction(s,n,r)}}}else"focusin"===i||"focusout"===i?t.closest(this.getSelectClass(this.selectClasses.classSelect))&&("focusin"===i?s.classList.add(this.selectClasses.classSelectFocus):s.classList.remove(this.selectClasses.classSelectFocus)):"keydown"===i&&"Escape"===e.code&&this.selectsСlose()}else this.selectsСlose()}selectsСlose(e){let t=(e||document).querySelectorAll(`${this.getSelectClass(this.selectClasses.classSelect)}${this.getSelectClass(this.selectClasses.classSelectOpen)}`);t.length&&t.forEach(e=>{this.selectСlose(e)})}selectСlose(e){let t=this.getSelectElement(e).originalSelect,i=this.getSelectElement(e,this.selectClasses.classSelectOptions).selectElement;i.classList.contains("_slide")||(e.classList.remove(this.selectClasses.classSelectOpen),a(i,t.dataset.speed))}selectAction(e){let t=this.getSelectElement(e).originalSelect,i=this.getSelectElement(e,this.selectClasses.classSelectOptions).selectElement;if(t.closest("[data-one-select]")){let s=t.closest("[data-one-select]");this.selectsСlose(s)}i.classList.contains("_slide")||(e.classList.toggle(this.selectClasses.classSelectOpen),r(i,t.dataset.speed))}setSelectTitleValue(e,t){let i=this.getSelectElement(e,this.selectClasses.classSelectBody).selectElement,s=this.getSelectElement(e,this.selectClasses.classSelectTitle).selectElement;s&&s.remove(),i.insertAdjacentHTML("afterbegin",this.getSelectTitleValue(e,t))}getSelectTitleValue(e,t){let i=this.getSelectedOptionsData(t,2).html;t.multiple&&t.hasAttribute("data-tags")&&(i=this.getSelectedOptionsData(t).elements.map(t=>`${this.getSelectElementContent(t)}`).join(""),t.dataset.tags&&document.querySelector(t.dataset.tags)&&(document.querySelector(t.dataset.tags).innerHTML=i,t.hasAttribute("data-search")&&(i=!1))),i=i.length?i:t.dataset.placeholder?t.dataset.placeholder:"";let s="",n="";return(t.hasAttribute("data-pseudo-label")&&(s=t.dataset.pseudoLabel?` data-pseudo-label="${t.dataset.pseudoLabel}"`:' data-pseudo-label="Fill in the attribute"',n=` ${this.selectClasses.classSelectPseudoLabel}`),this.getSelectedOptionsData(t).values.length?e.classList.add(this.selectClasses.classSelectActive):e.classList.remove(this.selectClasses.classSelectActive),t.hasAttribute("data-search"))?`
`:``}getSelectElementContent(e){let t=e.dataset.asset?`${e.dataset.asset}`:"",i=t.indexOf("img")>=0?``:t,s="";return s+=t?``:"",s+=t?``:"",s+=t?i:"",s+=t?"":"",s+=t?``:"",s+=e.textContent,s+=t?"":"",s+=t?"":""}getSelectPlaceholder(e){let t=Array.from(e.options).find(e=>!e.value);if(t)return{value:t.textContent,show:t.hasAttribute("data-show"),label:{show:t.hasAttribute("data-label"),text:t.dataset.label}}}getSelectedOptionsData(e,t){let i=[];return e.multiple?i=Array.from(e.options).filter(e=>e.value).filter(e=>e.selected):i.push(e.options[e.selectedIndex]),{elements:i.map(e=>e),values:i.filter(e=>e.value).map(e=>e.value),html:i.map(e=>this.getSelectElementContent(e))}}getOptions(e){let t=e.hasAttribute("data-scroll")?"data-simplebar":"",i=e.dataset.scroll?`style="max-height:${e.dataset.scroll}px"`:"",s=Array.from(e.options);if(s.length>0){let n="";return(this.getSelectPlaceholder(e)&&!this.getSelectPlaceholder(e).show||e.multiple)&&(s=s.filter(e=>e.value)),n+=t?`
`:"",s.forEach(t=>{n+=this.getOption(t,e)}),n+=t?"
":""}}getOption(e,t){let i=e.selected&&t.multiple?` ${this.selectClasses.classSelectOptionSelected}`:"",s=!e.selected||t.hasAttribute("data-show-selected")||t.multiple?"":"hidden",n=e.dataset.class?` ${e.dataset.class}`:"",a=!!e.dataset.href&&e.dataset.href,l=e.hasAttribute("data-href-blank")?'target="_blank"':"",r="";return r+=a?``:`"}setOptions(e,t){this.getSelectElement(e,this.selectClasses.classSelectOptions).selectElement.innerHTML=this.getOptions(t)}optionAction(e,t,i){if(t.multiple){i.classList.toggle(this.selectClasses.classSelectOptionSelected);this.getSelectedOptionsData(t).elements.forEach(e=>{e.removeAttribute("selected")});e.querySelectorAll(this.getSelectClass(this.selectClasses.classSelectOptionSelected)).forEach(e=>{t.querySelector(`option[value="${e.dataset.value}"]`).setAttribute("selected","selected")})}else t.hasAttribute("data-show-selected")||(e.querySelector(`${this.getSelectClass(this.selectClasses.classSelectOption)}[hidden]`)&&(e.querySelector(`${this.getSelectClass(this.selectClasses.classSelectOption)}[hidden]`).hidden=!1),i.hidden=!0),t.value=i.hasAttribute("data-value")?i.dataset.value:i.textContent,this.selectAction(e);this.setSelectTitleValue(e,t),this.setSelectChange(t)}selectChange(e){let t=e.target;this.selectBuild(t),this.setSelectChange(t)}setSelectChange(e){if(e.hasAttribute("data-validate")&&y.validateInput(e),e.hasAttribute("data-submit")&&e.value){let t=document.createElement("button");t.type="submit",e.closest("form").append(t),t.click(),t.remove()}let i=e.parentElement;this.selectCallback(i,e)}selectDisabled(e,t){t.disabled?(e.classList.add(this.selectClasses.classSelectDisabled),this.getSelectElement(e,this.selectClasses.classSelectTitle).selectElement.disabled=!0):(e.classList.remove(this.selectClasses.classSelectDisabled),this.getSelectElement(e,this.selectClasses.classSelectTitle).selectElement.disabled=!1)}searchActions(e){this.getSelectElement(e).originalSelect;let t=this.getSelectElement(e,this.selectClasses.classSelectInput).selectElement,i=this.getSelectElement(e,this.selectClasses.classSelectOptions).selectElement,s=i.querySelectorAll(`.${this.selectClasses.classSelectOption}`),n=this;t.addEventListener("input",function(){s.forEach(e=>{e.textContent.toUpperCase().indexOf(t.value.toUpperCase())>=0?e.hidden=!1:e.hidden=!0}),!0===i.hidden&&n.selectAction(e)})}selectCallback(e,t){document.dispatchEvent(new CustomEvent("selectCallback",{detail:{select:t}}))}setLogging(e){this.config.logging&&FLS(`[select]: ${e}`)}}function w(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function x(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach(i=>{void 0===e[i]?e[i]=t[i]:w(t[i])&&w(e[i])&&Object.keys(t[i]).length>0&&x(e[i],t[i])})}new S({});let E={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function C(){let e="undefined"!=typeof document?document:{};return x(e,E),e}let T={document:E,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function P(){let e="undefined"!=typeof window?window:{};return x(e,T),e}function L(e){return void 0===e&&(e=""),e.trim().split(" ").filter(e=>!!e.trim())}function A(e){let t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(i){}try{delete t[e]}catch(s){}})}function k(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function I(){return Date.now()}function O(e){let t=P(),i;return t.getComputedStyle&&(i=t.getComputedStyle(e,null)),!i&&e.currentStyle&&(i=e.currentStyle),i||(i=e.style),i}function M(e,t){void 0===t&&(t="x");let i=P(),s,n,a,l=O(e);return i.WebKitCSSMatrix?((n=l.transform||l.webkitTransform).split(",").length>6&&(n=n.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new i.WebKitCSSMatrix("none"===n?"":n)):s=(a=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(n=i.WebKitCSSMatrix?a.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(n=i.WebKitCSSMatrix?a.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),n||0}function z(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function D(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function R(){let e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i0>t.indexOf(e));for(let a=0,l=n.length;aa?"next":"prev",c=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,h=()=>{r=(new Date).getTime(),null===l&&(l=r);let e=a+(.5-Math.cos(Math.max(Math.min((r-l)/o,1),0)*Math.PI)/2)*(i-a);if(c(e,i)&&(e=i),t.wrapperEl.scrollTo({[s]:e}),c(e,i)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[s]:e})}),n.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=n.requestAnimationFrame(h)};h()}function F(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function H(e,t){return void 0===t&&(t=""),[...e.children].filter(e=>e.matches(t))}function N(e){try{console.warn(e);return}catch(t){}}function V(e,t){void 0===t&&(t=[]);let i=document.createElement(e);return i.classList.add(...Array.isArray(t)?t:L(t)),i}function G(e,t){let i=[];for(;e.previousElementSibling;){let s=e.previousElementSibling;t?s.matches(t)&&i.push(s):i.push(s),e=s}return i}function W(e,t){let i=[];for(;e.nextElementSibling;){let s=e.nextElementSibling;t?s.matches(t)&&i.push(s):i.push(s),e=s}return i}function X(e,t){return P().getComputedStyle(e,null).getPropertyValue(t)}function Y(e){let t=e,i;if(t){for(i=0;null!==(t=t.previousSibling);)1===t.nodeType&&(i+=1);return i}}function Z(e,t){let i=[],s=e.parentElement;for(;s;)t?s.matches(t)&&i.push(s):i.push(s),s=s.parentElement;return i}function j(e,t){function i(s){s.target===e&&(t.call(e,s),e.removeEventListener("transitionend",i))}t&&e.addEventListener("transitionend",i)}function U(e,t,i){let s=P();return i?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(s.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(s.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function K(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}let J;function Q(){let e=P(),t=C();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ee(){return J||(J=Q()),J}let et;function ei(e){let{userAgent:t}=void 0===e?{}:e,i=ee(),s=P(),n=s.navigator.platform,a=t||s.navigator.userAgent,l={ios:!1,android:!1},r=s.screen.width,o=s.screen.height,d=a.match(/(Android);?[\s\/]+([\d.]+)?/),c=a.match(/(iPad).*OS\s([\d_]+)/),h=a.match(/(iPod)(.*OS\s([\d_]+))?/),u=!c&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p="MacIntel"===n;return!c&&p&&i.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${r}x${o}`)>=0&&((c=a.match(/(Version)\/([\d.]+)/))||(c=[0,1,"13_0_0"]),p=!1),d&&"Win32"!==n&&(l.os="android",l.android=!0),(c||u||h)&&(l.os="ios",l.ios=!0),l}function es(e){return void 0===e&&(e={}),et||(et=ei(e)),et}let en;function ea(){let e=P(),t=es(),i=!1;function s(){let t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&0>t.indexOf("chrome")&&0>t.indexOf("android")}if(s()){let n=String(e.navigator.userAgent);if(n.includes("Version/")){let[a,l]=n.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));i=a<16||16===a&&l<2}}let r=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=s(),d=o||r&&t.ios;return{isSafari:i||o,needPerspectiveFix:i,need3dFix:d,isWebView:r}}function el(){return en||(en=ea()),en}function er(e){let{swiper:t,on:i,emit:s}=e,n=P(),a=null,l=null,r=()=>{t&&!t.destroyed&&t.initialized&&(s("beforeResize"),s("resize"))},o=()=>{t&&!t.destroyed&&t.initialized&&(a=new ResizeObserver(e=>{l=n.requestAnimationFrame(()=>{let{width:i,height:s}=t,n=i,a=s;e.forEach(e=>{let{contentBoxSize:i,contentRect:s,target:l}=e;l&&l!==t.el||(n=s?s.width:(i[0]||i).inlineSize,a=s?s.height:(i[0]||i).blockSize)}),(n!==i||a!==s)&&r()})})).observe(t.el)},d=()=>{l&&n.cancelAnimationFrame(l),a&&a.unobserve&&t.el&&(a.unobserve(t.el),a=null)},c=()=>{t&&!t.destroyed&&t.initialized&&s("orientationchange")};i("init",()=>{if(t.params.resizeObserver&&void 0!==n.ResizeObserver){o();return}n.addEventListener("resize",r),n.addEventListener("orientationchange",c)}),i("destroy",()=>{d(),n.removeEventListener("resize",r),n.removeEventListener("orientationchange",c)})}function eo(e){let{swiper:t,extendParams:i,on:s,emit:n}=e,a=[],l=P(),r=function(e,i){void 0===i&&(i={});let s=new(l.MutationObserver||l.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length){n("observerUpdate",e[0]);return}let i=function t(){n("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(i):l.setTimeout(i,0)});s.observe(e,{attributes:void 0===i.attributes||i.attributes,childList:void 0===i.childList||i.childList,characterData:void 0===i.characterData||i.characterData}),a.push(s)},o=()=>{if(t.params.observer){if(t.params.observeParents){let e=Z(t.hostEl);for(let i=0;i{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)};i({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",o),s("destroy",d)}var ed,ec,eh,eu,ep,ef,em={on(e,t,i){let s=this;if(!s.eventsListeners||s.destroyed||"function"!=typeof t)return s;let n=i?"unshift":"push";return e.split(" ").forEach(e=>{s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][n](t)}),s},once(e,t,i){let s=this;if(!s.eventsListeners||s.destroyed||"function"!=typeof t)return s;function n(){s.off(e,n),n.__emitterProxy&&delete n.__emitterProxy;for(var i=arguments.length,a=Array(i),l=0;lthis.eventsAnyListeners.indexOf(e)&&this.eventsAnyListeners[t?"unshift":"push"](e),this},offAny(e){if(!this.eventsListeners||this.destroyed||!this.eventsAnyListeners)return this;let t=this.eventsAnyListeners.indexOf(e);return t>=0&&this.eventsAnyListeners.splice(t,1),this},off(e,t){let i=this;return i.eventsListeners&&!i.destroyed&&i.eventsListeners&&e.split(" ").forEach(e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((s,n)=>{(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(n,1)})}),i},emit(){let e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,i,s;for(var n=arguments.length,a=Array(n),l=0;l{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(s,[t,...i])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(s,i)})}),e}};function eg(){let e,t,i=this.el;e=void 0!==this.params.width&&null!==this.params.width?this.params.width:i.clientWidth,t=void 0!==this.params.height&&null!==this.params.height?this.params.height:i.clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(X(i,"padding-left")||0,10)-parseInt(X(i,"padding-right")||0,10),t=t-parseInt(X(i,"padding-top")||0,10)-parseInt(X(i,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(this,{width:e,height:t,size:this.isHorizontal()?e:t}))}function ev(){let e=this;function t(t,i){return parseFloat(t.getPropertyValue(e.getDirectionLabel(i))||0)}let i=e.params,{wrapperEl:s,slidesEl:n,size:a,rtlTranslate:l,wrongRTL:r}=e,o=e.virtual&&i.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,c=H(n,`.${e.params.slideClass}, swiper-slide`),h=o?e.virtual.slides.length:c.length,u=[],p=[],f=[],m=i.slidesOffsetBefore;"function"==typeof m&&(m=i.slidesOffsetBefore.call(e));let g=i.slidesOffsetAfter;"function"==typeof g&&(g=i.slidesOffsetAfter.call(e));let v=e.snapGrid.length,b=e.slidesGrid.length,y=i.spaceBetween,_=-m,S=0,w=0;if(void 0===a)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*a:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,c.forEach(e=>{l?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),i.centeredSlides&&i.cssMode&&(q(s,"--swiper-centered-offset-before",""),q(s,"--swiper-centered-offset-after",""));let x=i.grid&&i.grid.rows>1&&e.grid;x?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();let E,C="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter(e=>void 0!==i.breakpoints[e].slidesPerView).length>0;for(let T=0;TMath.abs(_)&&(_=0),i.roundLengths&&(_=Math.floor(_)),w%i.slidesPerGroup==0&&u.push(_),p.push(_)):(i.roundLengths&&(_=Math.floor(_)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup==0&&u.push(_),p.push(_),_=_+E+y),e.virtualSize+=E+y,S=E,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,a)+g,l&&r&&("slide"===i.effect||"coverflow"===i.effect)&&(s.style.width=`${e.virtualSize+y}px`),i.setWrapperSize&&(s.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),x&&e.grid.updateWrapperSize(E,u),!i.centeredSlides){let N=[];for(let V=0;V1&&u.push(e.virtualSize-a)}if(o&&i.loop){let W=f[0]+y;if(i.slidesPerGroup>1){let Y=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/i.slidesPerGroup),Z=W*i.slidesPerGroup;for(let j=0;j!i.cssMode||!!i.loop||t!==c.length-1).forEach(e=>{e.style[J]=`${y}px`})}if(i.centeredSlides&&i.centeredSlidesBounds){let Q=0;f.forEach(e=>{Q+=e+(y||0)});let ee=(Q-=y)-a;u=u.map(e=>e<=0?-m:e>ee?ee+g:e)}if(i.centerInsufficientSlides){let et=0;f.forEach(e=>{et+=e+(y||0)}),et-=y;let ei=(i.slidesOffsetBefore||0)+(i.slidesOffsetAfter||0);if(et+ei{u[t]=e-es}),p.forEach((e,t)=>{p[t]=e+es})}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:p,slidesSizesGrid:f}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){q(s,"--swiper-centered-offset-before",`${-u[0]}px`),q(s,"--swiper-centered-offset-after",`${e.size/2-f[f.length-1]/2}px`);let en=-e.snapGrid[0],ea=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+en),e.slidesGrid=e.slidesGrid.map(e=>e+ea)}if(h!==d&&e.emit("slidesLengthChange"),u.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==b&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!o&&!i.cssMode&&("slide"===i.effect||"fade"===i.effect)){let el=`${i.containerModifierClass}backface-hidden`,er=e.el.classList.contains(el);h<=i.maxBackfaceHiddenSlides?er||e.el.classList.add(el):er&&e.el.classList.remove(el)}}function e$(e){let t=this,i=[],s=t.virtual&&t.params.virtual.enabled,n=0,a;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);let l=e=>s?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1){if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{i.push(e)});else for(a=0;at.slides.length&&!s)break;i.push(l(r))}}else i.push(l(t.activeIndex));for(a=0;an?o:n}(n||0===n)&&(t.wrapperEl.style.height=`${n}px`)}function eb(){let e=this.slides,t=this.isElement?this.isHorizontal()?this.wrapperEl.offsetLeft:this.wrapperEl.offsetTop:0;for(let i=0;i{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};function e_(e){void 0===e&&(e=this&&this.translate||0);let t=this,i=t.params,{slides:s,rtlTranslate:n,snapGrid:a}=t;if(0===s.length)return;void 0===s[0].swiperSlideOffset&&t.updateSlidesOffset();let l=-e;n&&(l=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let r=i.spaceBetween;"string"==typeof r&&r.indexOf("%")>=0?r=parseFloat(r.replace("%",""))/100*t.size:"string"==typeof r&&(r=parseFloat(r));for(let o=0;o=0&&p<=t.size-t.slidesSizesGrid[o],g=p>=0&&p1&&f<=t.size||p<=0&&f>=t.size;g&&(t.visibleSlides.push(d),t.visibleSlidesIndexes.push(o)),ey(d,g,i.slideVisibleClass),ey(d,m,i.slideFullyVisibleClass),d.progress=n?-h:h,d.originalProgress=n?-u:u}}function eS(e){if(void 0===e){let t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}let i=this.params,s=this.maxTranslate()-this.minTranslate(),{progress:n,isBeginning:a,isEnd:l,progressLoop:r}=this,o=a,d=l;if(0===s)n=0,a=!0,l=!0;else{n=(e-this.minTranslate())/s;let c=1>Math.abs(e-this.minTranslate()),h=1>Math.abs(e-this.maxTranslate());a=c||n<=0,l=h||n>=1,c&&(n=0),h&&(n=1)}if(i.loop){let u=this.getSlideIndexByData(0),p=this.getSlideIndexByData(this.slides.length-1),f=this.slidesGrid[u],m=this.slidesGrid[p],g=this.slidesGrid[this.slidesGrid.length-1],v=Math.abs(e);(r=v>=f?(v-f)/g:(v+g-m)/g)>1&&(r-=1)}Object.assign(this,{progress:n,progressLoop:r,isBeginning:a,isEnd:l}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&this.updateSlidesProgress(e),a&&!o&&this.emit("reachBeginning toEdge"),l&&!d&&this.emit("reachEnd toEdge"),(o&&!a||d&&!l)&&this.emit("fromEdge"),this.emit("progress",n)}let ew=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};function ex(){let{slides:e,params:t,slidesEl:i,activeIndex:s}=this,n=this.virtual&&t.virtual.enabled,a=this.grid&&t.grid&&t.grid.rows>1,l=e=>H(i,`.${t.slideClass}${e}, swiper-slide${e}`)[0],r,o,d;if(n){if(t.loop){let c=s-this.virtual.slidesBefore;c<0&&(c=this.virtual.slides.length+c),c>=this.virtual.slides.length&&(c-=this.virtual.slides.length),r=l(`[data-swiper-slide-index="${c}"]`)}else r=l(`[data-swiper-slide-index="${s}"]`)}else a?(r=e.filter(e=>e.column===s)[0],d=e.filter(e=>e.column===s+1)[0],o=e.filter(e=>e.column===s-1)[0]):r=e[s];r&&!a&&(d=W(r,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!d&&(d=e[0]),o=G(r,`.${t.slideClass}, swiper-slide`)[0],t.loop),e.forEach(e=>{ew(e,e===r,t.slideActiveClass),ew(e,e===d,t.slideNextClass),ew(e,e===o,t.slidePrevClass)}),this.emitSlidesClasses()}let eE=(e,t)=>{if(!e||e.destroyed||!e.params)return;let i=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,s=t.closest(i());if(s){let n=s.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(s.shadowRoot?n=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{s.shadowRoot&&(n=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`))&&n.remove()})),n&&n.remove()}},eC=(e,t)=>{if(!e.slides[t])return;let i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")},eT=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext,i=e.slides.length;if(!i||!t||t<0)return;t=Math.min(t,i);let s="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){let a=n,l=[a-t];l.push(...Array.from({length:t}).map((e,t)=>a+s+t)),e.slides.forEach((t,i)=>{l.includes(t.column)&&eC(e,i)});return}let r=n+s-1;if(e.params.rewind||e.params.loop)for(let o=n-t;o<=r+t;o+=1){let d=(o%i+i)%i;(dr)&&eC(e,d)}else for(let c=Math.max(n-t,0);c<=Math.min(r+t,i-1);c+=1)c!==n&&(c>r||c=t[a]&&s=t[a]&&s=t[a]&&(n=a);return i.normalizeSlideIndex&&(n<0||void 0===n)&&(n=0),n}function eL(e){let t=this,i=t.rtlTranslate?t.translate:-t.translate,{snapGrid:s,params:n,activeIndex:a,realIndex:l,snapIndex:r}=t,o=e,d,c=e=>{let i=e-t.virtual.slidesBefore;return i<0&&(i=t.virtual.slides.length+i),i>=t.virtual.slides.length&&(i-=t.virtual.slides.length),i};if(void 0===o&&(o=eP(t)),s.indexOf(i)>=0)d=s.indexOf(i);else{let h=Math.min(n.slidesPerGroupSkip,o);d=h+Math.floor((o-h)/n.slidesPerGroup)}if(d>=s.length&&(d=s.length-1),o===a&&!t.params.loop){d!==r&&(t.snapIndex=d,t.emit("snapIndexChange"));return}if(o===a&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(o);return}let u=t.grid&&n.grid&&n.grid.rows>1,p;if(t.virtual&&n.virtual.enabled&&n.loop)p=c(o);else if(u){let f=t.slides.filter(e=>e.column===o)[0],m=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(m)&&(m=Math.max(t.slides.indexOf(f),0)),p=Math.floor(m/n.grid.rows)}else if(t.slides[o]){let g=t.slides[o].getAttribute("data-swiper-slide-index");p=g?parseInt(g,10):o}else p=o;Object.assign(t,{previousSnapIndex:r,snapIndex:d,previousRealIndex:l,realIndex:p,previousIndex:a,activeIndex:o}),t.initialized&&eT(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(l!==p&&t.emit("realIndexChange"),t.emit("slideChange"))}function eA(e,t){let i=this,s=i.params,n=e.closest(`.${s.slideClass}, swiper-slide`);!n&&i.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!n&&e.matches&&e.matches(`.${s.slideClass}, swiper-slide`)&&(n=e)});let a=!1,l;if(n){for(let r=0;ro?o:s&&el?"next":a=o.length&&(g=o.length-1);let v=-o[g];if(r.normalizeSlideIndex)for(let b=0;b=_&&y=_&&y=_&&(l=b)}if(a.initialized&&l!==h&&(!a.allowSlideNext&&(u?v>a.translate&&v>a.minTranslate():va.translate&&v>a.maxTranslate()&&(h||0)!==l))return!1;l!==(c||0)&&i&&a.emit("beforeSlideChangeStart"),a.updateProgress(v);let w;if(w=l>h?"next":l0?(a._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[x?"scrollLeft":"scrollTop"]=E})):p[x?"scrollLeft":"scrollTop"]=E,C&&requestAnimationFrame(()=>{a.wrapperEl.style.scrollSnapType="",a._immediateVirtual=!1})}else{if(!a.support.smoothScroll)return B({swiper:a,targetPosition:E,side:x?"left":"top"}),!0;p.scrollTo({[x?"left":"top"]:E,behavior:"smooth"})}return!0}return a.setTransition(t),a.setTranslate(v),a.updateActiveIndex(l),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,w),0===t?a.transitionEnd(i,w):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function e(t){a&&!a.destroyed&&t.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(i,w))}),a.wrapperEl.addEventListener("transitionend",a.onSlideToWrapperTransitionEnd)),!0}function e3(e,t,i,s){void 0===e&&(e=0),void 0===i&&(i=!0),"string"==typeof e&&(e=parseInt(e,10));let n=this;if(n.destroyed)return;void 0===t&&(t=n.params.speed);let a=n.grid&&n.params.grid&&n.params.grid.rows>1,l=e;if(n.params.loop){if(n.virtual&&n.params.virtual.enabled)l+=n.virtual.slidesBefore;else{let r;if(a){let o=l*n.params.grid.rows;r=n.slides.filter(e=>1*e.getAttribute("data-swiper-slide-index")===o)[0].column}else r=n.getSlideIndexByData(l);let d=a?Math.ceil(n.slides.length/n.params.grid.rows):n.slides.length,{centeredSlides:c}=n.params,h=n.params.slidesPerView;"auto"===h?h=n.slidesPerViewDynamic():(h=Math.ceil(parseFloat(n.params.slidesPerView,10)),c&&h%2==0&&(h+=1));let u=d-r1*e.getAttribute("data-swiper-slide-index")===f)[0].column}else l=n.getSlideIndexByData(l)}}return requestAnimationFrame(()=>{n.slideTo(l,t,i,s)}),n}function eH(e,t,i){void 0===t&&(t=!0);let s=this,{enabled:n,params:a,animating:l}=s;if(!n||s.destroyed)return s;void 0===e&&(e=s.params.speed);let r=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(r=Math.max(s.slidesPerViewDynamic("current",!0),1));let o=s.activeIndex{s.slideTo(s.activeIndex+o,e,t,i)}),!0}return a.rewind&&s.isEnd?s.slideTo(0,e,t,i):s.slideTo(s.activeIndex+o,e,t,i)}function eN(e,t,i){void 0===t&&(t=!0);let s=this,{params:n,snapGrid:a,slidesGrid:l,rtlTranslate:r,enabled:o,animating:d}=s;if(!o||s.destroyed)return s;void 0===e&&(e=s.params.speed);let c=s.virtual&&n.virtual.enabled;if(n.loop){if(d&&!c&&n.loopPreventsSliding)return!1;s.loopFix({direction:"prev"}),s._clientLeft=s.wrapperEl.clientLeft}let h=r?s.translate:-s.translate;function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}let p=u(h),f=a[a.map(e=>u(e)).indexOf(p)-1];if(void 0===f&&n.cssMode){let m;a.forEach((e,t)=>{p>=e&&(m=t)}),void 0!==m&&(f=a[m>0?m-1:m])}let g=0;if(void 0!==f&&((g=l.indexOf(f))<0&&(g=s.activeIndex-1),"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(g=Math.max(g=g-s.slidesPerViewDynamic("previous",!0)+1,0))),n.rewind&&s.isBeginning){let v=s.params.virtual&&s.params.virtual.enabled&&s.virtual?s.virtual.slides.length-1:s.slides.length-1;return s.slideTo(v,e,t,i)}return n.loop&&0===s.activeIndex&&n.cssMode?(requestAnimationFrame(()=>{s.slideTo(g,e,t,i)}),!0):s.slideTo(g,e,t,i)}function e1(e,t,i){if(void 0===t&&(t=!0),!this.destroyed)return void 0===e&&(e=this.params.speed),this.slideTo(this.activeIndex,e,t,i)}function eV(e,t,i,s){if(void 0===t&&(t=!0),void 0===s&&(s=.5),this.destroyed)return;void 0===e&&(e=this.params.speed);let n=this.activeIndex,a=Math.min(this.params.slidesPerGroupSkip,n),l=a+Math.floor((n-a)/this.params.slidesPerGroup),r=this.rtlTranslate?this.translate:-this.translate;if(r>=this.snapGrid[l]){let o=this.snapGrid[l];r-o>(this.snapGrid[l+1]-o)*s&&(n+=this.params.slidesPerGroup)}else{let d=this.snapGrid[l-1];r-d<=(this.snapGrid[l]-d)*s&&(n-=this.params.slidesPerGroup)}return n=Math.min(n=Math.max(n,0),this.slidesGrid.length-1),this.slideTo(n,e,t,i)}function eG(){let e=this;if(e.destroyed)return;let{params:t,slidesEl:i}=e,s="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView,n=e.clickedIndex,a,l=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ne.slides.length-e.loopedSlides+s/2?(e.loopFix(),n=e.getSlideIndex(H(i,`${l}[data-swiper-slide-index="${a}"]`)[0]),k(()=>{e.slideTo(n)})):e.slideTo(n):n>e.slides.length-s?(e.loopFix(),n=e.getSlideIndex(H(i,`${l}[data-swiper-slide-index="${a}"]`)[0]),k(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}var eW={slideTo:eF,slideToLoop:e3,slideNext:eH,slidePrev:eN,slideReset:e1,slideToClosest:eV,slideToClickedSlide:eG};function e2(e){let t=this,{params:i,slidesEl:s}=t;if(!i.loop||t.virtual&&t.params.virtual.enabled)return;let n=()=>{H(s,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},a=t.grid&&i.grid&&i.grid.rows>1,l=i.slidesPerGroup*(a?i.grid.rows:1),r=t.slides.length%l!=0,o=a&&t.slides.length%i.grid.rows!=0,d=e=>{for(let s=0;s1;d.lengthe.classList.contains(p.slideActiveClass))[0]):S=a;let w="next"===s||!s,x="prev"===s||!s,E=0,C=0,T=b?Math.ceil(d.length/p.grid.rows):d.length,P=(b?d[a].column:a)+(f&&void 0===n?-m/2+.5:0);if(P=0;I-=1)d[I].column===k&&y.push(I)}else y.push(T-A-1)}}else if(P+m>T-v){C=Math.max(P-(T-2*v),g);for(let O=0;O{e.column===M&&_.push(t)}):_.push(M)}}if(o.__preventObserver__=!0,requestAnimationFrame(()=>{o.__preventObserver__=!1}),x&&y.forEach(e=>{d[e].swiperLoopMoveDOM=!0,u.prepend(d[e]),d[e].swiperLoopMoveDOM=!1}),w&&_.forEach(e=>{d[e].swiperLoopMoveDOM=!0,u.append(d[e]),d[e].swiperLoopMoveDOM=!1}),o.recalcSlides(),"auto"===p.slidesPerView?o.updateSlides():b&&(y.length>0&&x||_.length>0&&w)&&o.slides.forEach((e,t)=>{o.grid.updateSlide(t,e,o.slides)}),p.watchSlidesProgress&&o.updateSlidesOffset(),i){if(y.length>0&&x){if(void 0===t){let z=o.slidesGrid[S],D=o.slidesGrid[S+E]-z;r?o.setTranslate(o.translate-D):(o.slideTo(S+Math.ceil(E),0,!1,!0),n&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-D,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-D))}else if(n){let R=b?y.length/p.grid.rows:y.length;o.slideTo(o.activeIndex+R,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(_.length>0&&w){if(void 0===t){let q=o.slidesGrid[S],B=o.slidesGrid[S-C]-q;r?o.setTranslate(o.translate-B):(o.slideTo(S-C,0,!1,!0),n&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-B,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-B))}else{let F=b?_.length/p.grid.rows:_.length;o.slideTo(o.activeIndex-F,0,!1,!0)}}}if(o.allowSlidePrev=c,o.allowSlideNext=h,o.controller&&o.controller.control&&!l){let H={slideRealIndex:t,direction:s,setTranslate:n,activeSlideIndex:a,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix({...H,slideTo:e.params.slidesPerView===p.slidesPerView&&i})}):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...H,slideTo:o.controller.control.params.slidesPerView===p.slidesPerView&&i})}o.emit("loopFix")}function e4(){let{params:e,slidesEl:t}=this;if(!e.loop||this.virtual&&this.params.virtual.enabled)return;this.recalcSlides();let i=[];this.slides.forEach(e=>{i[void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex]=e}),this.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{t.append(e)}),this.recalcSlides(),this.slideTo(this.realIndex,0)}var eY={loopCreate:e2,loopFix:eX,loopDestroy:e4};function e6(e){let t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;let i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),i.style.cursor="move",i.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function eZ(){let e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var e7={setGrabCursor:e6,unsetGrabCursor:eZ};function ej(e,t){return void 0===t&&(t=this),function t(i){if(!i||i===C()||i===P())return null;i.assignedSlot&&(i=i.assignedSlot);let s=i.closest(e);return s||i.getRootNode?s||t(i.getRootNode().host):null}(t)}function eU(e,t,i){let s=P(),{params:n}=e,a=n.edgeSwipeDetection,l=n.edgeSwipeThreshold;return!a||!(i<=l)&&!(i>=s.innerWidth-l)||"prevent"===a&&(t.preventDefault(),!0)}function e5(e){let t=this,i=C(),s=e;s.originalEvent&&(s=s.originalEvent);let n=t.touchEventsData;if("pointerdown"===s.type){if(null!==n.pointerId&&n.pointerId!==s.pointerId)return;n.pointerId=s.pointerId}else"touchstart"===s.type&&1===s.targetTouches.length&&(n.touchId=s.targetTouches[0].identifier);if("touchstart"===s.type){eU(t,s,s.targetTouches[0].pageX);return}let{params:a,touches:l,enabled:r}=t;if(!r||!a.simulateTouch&&"mouse"===s.pointerType||t.animating&&a.preventInteractionOnTransition)return;!t.animating&&a.cssMode&&a.loop&&t.loopFix();let o=s.target;if("wrapper"===a.touchEventsTarget&&!t.wrapperEl.contains(o)||"which"in s&&3===s.which||"button"in s&&s.button>0||n.isTouched&&n.isMoved)return;let d=!!a.noSwipingClass&&""!==a.noSwipingClass,c=s.composedPath?s.composedPath():s.path;d&&s.target&&s.target.shadowRoot&&c&&(o=c[0]);let h=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,u=!!(s.target&&s.target.shadowRoot);if(a.noSwiping&&(u?ej(h,o):o.closest(h))){t.allowClick=!0;return}if(a.swipeHandler&&!o.closest(a.swipeHandler))return;l.currentX=s.pageX,l.currentY=s.pageY;let p=l.currentX,f=l.currentY;if(!eU(t,s,p))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=p,l.startY=f,n.touchStartTime=I(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,a.threshold>0&&(n.allowThresholdMove=!1);let m=!0;o.matches(n.focusableElements)&&(m=!1,"SELECT"===o.nodeName&&(n.isTouched=!1)),i.activeElement&&i.activeElement.matches(n.focusableElements)&&i.activeElement!==o&&i.activeElement.blur();let g=m&&t.allowTouchMove&&a.touchStartPreventDefault;(a.touchStartForcePreventDefault||g)&&!o.isContentEditable&&s.preventDefault(),a.freeMode&&a.freeMode.enabled&&t.freeMode&&t.animating&&!a.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",s)}function eK(e){let t=C(),i=this,s=i.touchEventsData,{params:n,touches:a,rtlTranslate:l,enabled:r}=i;if(!r||!n.simulateTouch&&"mouse"===e.pointerType)return;let o=e;if(o.originalEvent&&(o=o.originalEvent),"pointermove"===o.type){if(null!==s.touchId)return;if(o.pointerId!==s.pointerId)return}let d;if("touchmove"===o.type){if(!(d=[...o.changedTouches].filter(e=>e.identifier===s.touchId)[0])||d.identifier!==s.touchId)return}else d=o;if(!s.isTouched){s.startMoving&&s.isScrolling&&i.emit("touchMoveOpposite",o);return}let c=d.pageX,h=d.pageY;if(o.preventedByNestedSwiper){a.startX=c,a.startY=h;return}if(!i.allowTouchMove){o.target.matches(s.focusableElements)||(i.allowClick=!1),s.isTouched&&(Object.assign(a,{startX:c,startY:h,currentX:c,currentY:h}),s.touchStartTime=I());return}if(n.touchReleaseOnEdges&&!n.loop){if(i.isVertical()){if(ha.startY&&i.translate>=i.minTranslate()){s.isTouched=!1,s.isMoved=!1;return}}else if(ca.startX&&i.translate>=i.minTranslate())return}if(t.activeElement&&o.target===t.activeElement&&o.target.matches(s.focusableElements)){s.isMoved=!0,i.allowClick=!1;return}s.allowTouchCallbacks&&i.emit("touchMove",o),a.previousX=a.currentX,a.previousY=a.currentY,a.currentX=c,a.currentY=h;let u=a.currentX-a.startX,p=a.currentY-a.startY;if(i.params.threshold&&Math.sqrt(u**2+p**2)=25&&(f=180*Math.atan2(Math.abs(p),Math.abs(u))/Math.PI,s.isScrolling=i.isHorizontal()?f>n.touchAngle:90-f>n.touchAngle)}if(s.isScrolling&&i.emit("touchMoveOpposite",o),void 0===s.startMoving&&(a.currentX!==a.startX||a.currentY!==a.startY)&&(s.startMoving=!0),s.isScrolling||"touchmove"===o.type&&s.preventTouchMoveFromPointerMove){s.isTouched=!1;return}if(!s.startMoving)return;i.allowClick=!1,!n.cssMode&&o.cancelable&&o.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&o.stopPropagation();let m=i.isHorizontal()?u:p,g=i.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;n.oneWayMovement&&(m=Math.abs(m)*(l?1:-1),g=Math.abs(g)*(l?1:-1)),a.diff=m,m*=n.touchRatio,l&&(m=-m,g=-g);let v=i.touchesDirection;i.swipeDirection=m>0?"prev":"next",i.touchesDirection=g>0?"prev":"next";let b=i.params.loop&&!n.cssMode,y="next"===i.touchesDirection&&i.allowSlideNext||"prev"===i.touchesDirection&&i.allowSlidePrev;if(!s.isMoved){if(b&&y&&i.loopFix({direction:i.swipeDirection}),s.startTranslate=i.getTranslate(),i.setTransition(0),i.animating){let _=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});i.wrapperEl.dispatchEvent(_)}s.allowMomentumBounce=!1,n.grabCursor&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!0),i.emit("sliderFirstMove",o)}let S;if((new Date).getTime(),s.isMoved&&s.allowThresholdMove&&v!==i.touchesDirection&&b&&y&&Math.abs(m)>=1){Object.assign(a,{startX:c,startY:h,currentX:c,currentY:h,startTranslate:s.currentTranslate}),s.loopSwapReset=!0,s.startTranslate=s.currentTranslate;return}i.emit("sliderMove",o),s.isMoved=!0,s.currentTranslate=m+s.startTranslate;let w=!0,x=n.resistanceRatio;if(n.touchReleaseOnEdges&&(x=0),m>0?(b&&y&&!S&&s.allowThresholdMove&&s.currentTranslate>(n.centeredSlides?i.minTranslate()-i.slidesSizesGrid[i.activeIndex+1]:i.minTranslate())&&i.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),s.currentTranslate>i.minTranslate()&&(w=!1,n.resistance&&(s.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+s.startTranslate+m)**x))):m<0&&(b&&y&&!S&&s.allowThresholdMove&&s.currentTranslate<(n.centeredSlides?i.maxTranslate()+i.slidesSizesGrid[i.slidesSizesGrid.length-1]:i.maxTranslate())&&i.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i.slides.length-("auto"===n.slidesPerView?i.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),s.currentTranslates.startTranslate&&(s.currentTranslate=s.startTranslate),i.allowSlidePrev||i.allowSlideNext||(s.currentTranslate=s.startTranslate),n.threshold>0){if(Math.abs(m)>n.threshold||s.allowThresholdMove){if(!s.allowThresholdMove){s.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,s.currentTranslate=s.startTranslate,a.diff=i.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY;return}}else{s.currentTranslate=s.startTranslate;return}}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&i.freeMode||n.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(s.currentTranslate),i.setTranslate(s.currentTranslate))}function eJ(e){let t=this,i=t.touchEventsData,s=e;s.originalEvent&&(s=s.originalEvent);let n;if("touchend"===s.type||"touchcancel"===s.type){if(!(n=[...s.changedTouches].filter(e=>e.identifier===i.touchId)[0])||n.identifier!==i.touchId)return}else{if(null!==i.touchId||s.pointerId!==i.pointerId)return;n=s}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(s.type)&&!(["pointercancel","contextmenu"].includes(s.type)&&(t.browser.isSafari||t.browser.isWebView)))return;i.pointerId=null,i.touchId=null;let{params:a,touches:l,rtlTranslate:r,slidesGrid:o,enabled:d}=t;if(!d||!a.simulateTouch&&"mouse"===s.pointerType)return;if(i.allowTouchCallbacks&&t.emit("touchEnd",s),i.allowTouchCallbacks=!1,!i.isTouched){i.isMoved&&a.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,i.startMoving=!1;return}a.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);let c=I(),h=c-i.touchStartTime;if(t.allowClick){let u=s.path||s.composedPath&&s.composedPath();t.updateClickedSlide(u&&u[0]||s.target,u),t.emit("tap click",s),h<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",s)}if(i.lastClickTime=I(),k(()=>{t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===l.diff&&!i.loopSwapReset||i.currentTranslate===i.startTranslate&&!i.loopSwapReset){i.isTouched=!1,i.isMoved=!1,i.startMoving=!1;return}i.isTouched=!1,i.isMoved=!1,i.startMoving=!1;let p;if(p=a.followFinger?r?t.translate:-t.translate:-i.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:p});return}let f=p>=-t.maxTranslate()&&!t.params.loop,m=0,g=t.slidesSizesGrid[0];for(let v=0;v=o[v]&&p=o[v])&&(m=v,g=o[o.length-1]-o[o.length-2])}let y=null,_=null;a.rewind&&(t.isBeginning?_=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(y=0));let S=(p-o[m])/g,w=ma.longSwipesMs){if(!a.longSwipes){t.slideTo(t.activeIndex);return}"next"===t.swipeDirection&&(S>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?y:m+w):t.slideTo(m)),"prev"===t.swipeDirection&&(S>1-a.longSwipesRatio?t.slideTo(m+w):null!==_&&S<0&&Math.abs(S)>a.longSwipesRatio?t.slideTo(_):t.slideTo(m))}else{if(!a.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(s.target===t.navigation.nextEl||s.target===t.navigation.prevEl)?s.target===t.navigation.nextEl?t.slideTo(m+w):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==y?y:m+w),"prev"===t.swipeDirection&&t.slideTo(null!==_?_:m))}}function eQ(){let e=this,{params:t,el:i}=e;if(i&&0===i.offsetWidth)return;t.breakpoints&&e.setBreakpoint();let{allowSlideNext:s,allowSlidePrev:n,snapGrid:a}=e,l=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();let r=l&&t.loop;"auto"!==t.slidesPerView&&!(t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||r?e.params.loop&&!l?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=n,e.allowSlideNext=s,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function te(e){this.enabled&&!this.allowClick&&(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function tt(){let e=this,{wrapperEl:t,rtlTranslate:i,enabled:s}=e;if(!s)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let n,a=e.maxTranslate()-e.minTranslate();(n=0===a?0:(e.translate-e.minTranslate())/a)!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function ti(e){eE(this,e.target),!this.params.cssMode&&("auto"===this.params.slidesPerView||this.params.autoHeight)&&this.update()}function ts(){let e=this;!e.documentTouchHandlerProceeded&&(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}let tn=(e,t)=>{let i=C(),{params:s,el:n,wrapperEl:a,device:l}=e,r=!!s.nested,o="on"===t?"addEventListener":"removeEventListener",d=t;n&&"string"!=typeof n&&(i[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:r}),n[o]("touchstart",e.onTouchStart,{passive:!1}),n[o]("pointerdown",e.onTouchStart,{passive:!1}),i[o]("touchmove",e.onTouchMove,{passive:!1,capture:r}),i[o]("pointermove",e.onTouchMove,{passive:!1,capture:r}),i[o]("touchend",e.onTouchEnd,{passive:!0}),i[o]("pointerup",e.onTouchEnd,{passive:!0}),i[o]("pointercancel",e.onTouchEnd,{passive:!0}),i[o]("touchcancel",e.onTouchEnd,{passive:!0}),i[o]("pointerout",e.onTouchEnd,{passive:!0}),i[o]("pointerleave",e.onTouchEnd,{passive:!0}),i[o]("contextmenu",e.onTouchEnd,{passive:!0}),(s.preventClicks||s.preventClicksPropagation)&&n[o]("click",e.onClick,!0),s.cssMode&&a[o]("scroll",e.onScroll),s.updateOnWindowResize?e[d](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",eQ,!0):e[d]("observerUpdate",eQ,!0),n[o]("load",e.onLoad,{capture:!0}))};function ta(){let e=this,{params:t}=e;e.onTouchStart=e5.bind(e),e.onTouchMove=eK.bind(e),e.onTouchEnd=eJ.bind(e),e.onDocumentTouchStart=ts.bind(e),t.cssMode&&(e.onScroll=tt.bind(e)),e.onClick=te.bind(e),e.onLoad=ti.bind(e),tn(e,"on")}function tl(){tn(this,"off")}var tr={attachEvents:ta,detachEvents:tl};let to=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function td(){let e=this,{realIndex:t,initialized:i,params:s,el:n}=e,a=s.breakpoints;if(!a||a&&0===Object.keys(a).length)return;let l=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!l||e.currentBreakpoint===l)return;let r=(l in a?a[l]:void 0)||e.originalParams,o=to(e,s),d=to(e,r),c=e.params.grabCursor,h=r.grabCursor,u=s.enabled;o&&!d?(n.classList.remove(`${s.containerModifierClass}grid`,`${s.containerModifierClass}grid-column`),e.emitContainerClasses()):!o&&d&&(n.classList.add(`${s.containerModifierClass}grid`),(r.grid.fill&&"column"===r.grid.fill||!r.grid.fill&&"column"===s.grid.fill)&&n.classList.add(`${s.containerModifierClass}grid-column`),e.emitContainerClasses()),c&&!h?e.unsetGrabCursor():!c&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===r[t])return;let i=s[t]&&s[t].enabled,n=r[t]&&r[t].enabled;i&&!n&&e[t].disable(),!i&&n&&e[t].enable()});let p=r.direction&&r.direction!==s.direction,f=s.loop&&(r.slidesPerView!==s.slidesPerView||p),m=s.loop;p&&i&&e.changeDirection(),R(e.params,r);let g=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),u&&!g?e.disable():!u&&g&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",r),i&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!m&&v?(e.loopCreate(t),e.updateSlides()):m&&!v&&e.loopDestroy()),e.emit("breakpoint",r)}function tc(e,t,i){if(void 0===t&&(t="window"),!e||"container"===t&&!i)return;let s=!1,n=P(),a="window"===t?n.innerHeight:i.clientHeight,l=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){let t=parseFloat(e.substr(1));return{value:a*t,point:e}}return{value:e,point:e}});l.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let r=0;r{"object"==typeof e?Object.keys(e).forEach(s=>{e[s]&&i.push(t+s)}):"string"==typeof e&&i.push(t+e)}),i}function tp(){let{classNames:e,params:t,rtl:i,el:s,device:n}=this,a=tu(["initialized",t.direction,{"free-mode":this.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:i},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&"column"===t.grid.fill},{android:n.android},{ios:n.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...a),s.classList.add(...e),this.emitContainerClasses()}function tf(){let{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}var tm={addClasses:tp,removeClasses:tf};function tg(){let e=this,{isLocked:t,params:i}=e,{slidesOffsetBefore:s}=i;if(s){let n=e.slides.length-1,a=e.slidesGrid[n]+e.slidesSizesGrid[n]+2*s;e.isLocked=e.size>a}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var tv={checkOverflow:tg},t$={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function tb(e,t){return function i(s){void 0===s&&(s={});let n=Object.keys(s)[0],a=s[n];if("object"!=typeof a||null===a||(!0===e[n]&&(e[n]={enabled:!0}),"navigation"===n&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),!(n in e&&"enabled"in a))){R(t,s);return}"object"!=typeof e[n]||"enabled"in e[n]||(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),R(t,s)}}let ty={eventsEmitter:em,update:ek,translate:eD,transition:eB,slide:eW,loop:eY,grabCursor:e7,events:tr,breakpoints:th,checkOverflow:tv,classes:tm},t_={};class tS{constructor(){let e,t;for(var i=arguments.length,s=Array(i),n=0;n1){let l=[];return a.querySelectorAll(t.el).forEach(e=>{let i=R({},t,{el:e});l.push(new tS(i))}),l}let r=this;r.__swiper__=!0,r.support=ee(),r.device=es({userAgent:t.userAgent}),r.browser=el(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],t.modules&&Array.isArray(t.modules)&&r.modules.push(...t.modules);let o={};r.modules.forEach(e=>{e({params:t,swiper:r,extendParams:tb(t,o),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});let d=R({},t$,o);return r.params=R({},d,t_,t),r.originalParams=R({},r.params),r.passedParams=R({},t),r.params&&r.params.on&&Object.keys(r.params.on).forEach(e=>{r.on(e,r.params.on[e])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===r.params.direction,isVertical:()=>"vertical"===r.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return 8388608*Math.trunc(this.translate/8388608)},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(e){return this.isHorizontal()?e:({width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"})[e]}getSlideIndex(e){let{slidesEl:t,params:i}=this,s=Y(H(t,`.${i.slideClass}, swiper-slide`)[0]);return Y(e)-s}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter(t=>1*t.getAttribute("data-swiper-slide-index")===e)[0])}recalcSlides(){let e=this,{slidesEl:t,params:i}=e;e.slides=H(t,`.${i.slideClass}, swiper-slide`)}enable(){let e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){let e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);let i=this.minTranslate(),s=(this.maxTranslate()-i)*e+i;this.translateTo(s,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){let e=this;if(!e.params._emitClasses||!e.el)return;let t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){let t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){let e=this;if(!e.params._emitClasses||!e.el)return;let t=[];e.slides.forEach(i=>{let s=e.getSlideClasses(i);t.push({slideEl:i,classNames:s}),e.emit("_slideClass",i,s)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);let{params:i,slides:s,slidesGrid:n,slidesSizesGrid:a,size:l,activeIndex:r}=this,o=1;if("number"==typeof i.slidesPerView)return i.slidesPerView;if(i.centeredSlides){let d=s[r]?Math.ceil(s[r].swiperSlideSize):0,c;for(let h=r+1;hl&&(c=!0));for(let u=r-1;u>=0;u-=1)s[u]&&!c&&(d+=s[u].swiperSlideSize,o+=1,d>l&&(c=!0))}else if("current"===e)for(let p=r+1;p=0;f-=1)n[r]-n[f]{t.complete&&eE(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();let n;if(i.freeMode&&i.freeMode.enabled&&!i.cssMode)s(),i.autoHeight&&e.updateAutoHeight();else{if(("auto"===i.slidesPerView||i.slidesPerView>1)&&e.isEnd&&!i.centeredSlides){let a=e.virtual&&i.virtual.enabled?e.virtual.slides:e.slides;n=e.slideTo(a.length-1,0,!1,!0)}else n=e.slideTo(e.activeIndex,0,!1,!0);n||s()}i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);let i=this,s=i.params.direction;return e||(e="horizontal"===s?"vertical":"horizontal"),e===s||"horizontal"!==e&&"vertical"!==e||(i.el.classList.remove(`${i.params.containerModifierClass}${s}`),i.el.classList.add(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),i.emit("changeDirection"),t&&i.update()),i}changeLanguageDirection(e){let t=this;(!t.rtl||"rtl"!==e)&&(t.rtl||"ltr"!==e)&&(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){let t=this;if(t.mounted)return!0;let i=e||t.params.el;if("string"==typeof i&&(i=document.querySelector(i)),!i)return!1;i.swiper=t,i.parentNode&&i.parentNode.host&&i.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);let s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,n=i&&i.shadowRoot&&i.shadowRoot.querySelector?i.shadowRoot.querySelector(s()):(0,H(i,s())[0]);return!n&&t.params.createElements&&(n=V("div",t.params.wrapperClass),i.append(n),H(i,`.${t.params.slideClass}`).forEach(e=>{n.append(e)})),Object.assign(t,{el:i,wrapperEl:n,slidesEl:t.isElement&&!i.parentNode.host.slideSlots?i.parentNode.host:n,hostEl:t.isElement?i.parentNode.host:i,mounted:!0,rtl:"rtl"===i.dir.toLowerCase()||"rtl"===X(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===X(i,"direction")),wrongRTL:"-webkit-box"===X(n,"display")}),!0}init(e){let t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();let i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(e=>{e.complete?eE(t,e):e.addEventListener("load",e=>{eE(t,e.target)})}),eT(t),t.initialized=!0,eT(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);let i=this,{params:s,el:n,wrapperEl:a,slides:l}=i;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),n&&"string"!=typeof n&&n.removeAttribute("style"),a&&a.removeAttribute("style"),l&&l.length&&l.forEach(e=>{e.classList.remove(s.slideVisibleClass,s.slideFullyVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(e=>{i.off(e)}),!1!==e&&(i.el&&"string"!=typeof i.el&&(i.el.swiper=null),A(i)),i.destroyed=!0),null}static extendDefaults(e){R(t_,e)}static get extendedDefaults(){return t_}static get defaults(){return t$}static installModule(e){tS.prototype.__modules__||(tS.prototype.__modules__=[]);let t=tS.prototype.__modules__;"function"==typeof e&&0>t.indexOf(e)&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>tS.installModule(e)),tS):(tS.installModule(e),tS)}}function tw(e,t,i,s){return e.params.createElements&&Object.keys(s).forEach(n=>{if(!i[n]&&!0===i.auto){let a=H(e.el,`.${s[n]}`)[0];a||((a=V("div",s[n])).className=s[n],e.el.append(a)),i[n]=a,t[n]=a}}),i}function tx(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;function a(e){let i;return e&&"string"==typeof e&&t.isElement&&(i=t.el.querySelector(e))?i:(e&&("string"==typeof e&&(i=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&i&&i.length>1&&1===t.el.querySelectorAll(e).length?i=t.el.querySelector(e):i&&1===i.length&&(i=i[0])),e&&!i)?e:i}function l(e,i){let s=t.params.navigation;(e=K(e)).forEach(e=>{e&&(e.classList[i?"add":"remove"](...s.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=i),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass))})}function r(){let{nextEl:e,prevEl:i}=t.navigation;if(t.params.loop){l(i,!1),l(e,!1);return}l(i,t.isBeginning&&!t.params.rewind),l(e,t.isEnd&&!t.params.rewind)}function o(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),n("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),n("navigationNext"))}function c(){let e=t.params.navigation;if(t.params.navigation=tw(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(e.nextEl||e.prevEl))return;let i=a(e.nextEl),s=a(e.prevEl);Object.assign(t.navigation,{nextEl:i,prevEl:s}),i=K(i),s=K(s);let n=(i,s)=>{i&&i.addEventListener("click","next"===s?d:o),!t.enabled&&i&&i.classList.add(...e.lockClass.split(" "))};i.forEach(e=>n(e,"next")),s.forEach(e=>n(e,"prev"))}function h(){let{nextEl:e,prevEl:i}=t.navigation;e=K(e),i=K(i);let s=(e,i)=>{e.removeEventListener("click","next"===i?d:o),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(e=>s(e,"next")),i.forEach(e=>s(e,"prev"))}i({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},s("init",()=>{!1===t.params.navigation.enabled?p():(c(),r())}),s("toEdge fromEdge lock unlock",()=>{r()}),s("destroy",()=>{h()}),s("enable disable",()=>{let{nextEl:e,prevEl:i}=t.navigation;if(e=K(e),i=K(i),t.enabled){r();return}[...e,...i].filter(e=>!!e).forEach(e=>e.classList.add(t.params.navigation.lockClass))}),s("click",(e,i)=>{let{nextEl:s,prevEl:a}=t.navigation;s=K(s),a=K(a);let l=i.target,r=a.includes(l)||s.includes(l);if(t.isElement&&!r){let o=i.path||i.composedPath&&i.composedPath();o&&(r=o.find(e=>s.includes(e)||a.includes(e)))}if(t.params.navigation.hideOnClick&&!r){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===l||t.pagination.el.contains(l)))return;let d;s.length?d=s[0].classList.contains(t.params.navigation.hiddenClass):a.length&&(d=a[0].classList.contains(t.params.navigation.hiddenClass)),!0===d?n("navigationShow"):n("navigationHide"),[...s,...a].filter(e=>!!e).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});let u=()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),r()},p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),h()};Object.assign(t.navigation,{enable:u,disable:p,update:r,init:c,destroy:h})}function tE(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function tC(e){let{swiper:t,extendParams:i,on:s,emit:n}=e,a="swiper-pagination";i({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),t.pagination={el:null,bullets:[]};let l,r=0;function o(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,i){let{bulletActiveClass:s}=t.params.pagination;e&&(e=e[`${"prev"===i?"previous":"next"}ElementSibling`])&&(e.classList.add(`${s}-${i}`),(e=e[`${"prev"===i?"previous":"next"}ElementSibling`])&&e.classList.add(`${s}-${i}-${i}`))}function c(e){let i=e.target.closest(tE(t.params.pagination.bulletClass));if(!i)return;e.preventDefault();let s=Y(i)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===s)return;t.slideToLoop(s)}else t.slideTo(s)}function h(){let e=t.rtl,i=t.params.pagination;if(o())return;let s=t.pagination.el;s=K(s);let a,c,h=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,u=t.params.loop?Math.ceil(h/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(c=t.previousRealIndex||0,a=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(a=t.snapIndex,c=t.previousSnapIndex):(c=t.previousIndex||0,a=t.activeIndex||0),"bullets"===i.type&&t.pagination.bullets&&t.pagination.bullets.length>0){let p=t.pagination.bullets,f,m,g;if(i.dynamicBullets&&(l=U(p[0],t.isHorizontal()?"width":"height",!0),s.forEach(e=>{e.style[t.isHorizontal()?"width":"height"]=`${l*(i.dynamicMainBullets+4)}px`}),i.dynamicMainBullets>1&&void 0!==c&&((r+=a-(c||0))>i.dynamicMainBullets-1?r=i.dynamicMainBullets-1:r<0&&(r=0)),g=((m=(f=Math.max(a-r,0))+(Math.min(p.length,i.dynamicMainBullets)-1))+f)/2),p.forEach(e=>{let t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${i.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),s.length>1)p.forEach(e=>{let s=Y(e);s===a?e.classList.add(...i.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),i.dynamicBullets&&(s>=f&&s<=m&&e.classList.add(...`${i.bulletActiveClass}-main`.split(" ")),s===f&&d(e,"prev"),s===m&&d(e,"next"))});else{let v=p[a];if(v&&v.classList.add(...i.bulletActiveClass.split(" ")),t.isElement&&p.forEach((e,t)=>{e.setAttribute("part",t===a?"bullet-active":"bullet")}),i.dynamicBullets){let b=p[f],y=p[m];for(let _=f;_<=m;_+=1)p[_]&&p[_].classList.add(...`${i.bulletActiveClass}-main`.split(" "));d(b,"prev"),d(y,"next")}}if(i.dynamicBullets){let S=(l*Math.min(p.length,i.dynamicMainBullets+4)-l)/2-g*l,w=e?"right":"left";p.forEach(e=>{e.style[t.isHorizontal()?w:"top"]=`${S}px`})}}s.forEach((e,s)=>{if("fraction"===i.type&&(e.querySelectorAll(tE(i.currentClass)).forEach(e=>{e.textContent=i.formatFractionCurrent(a+1)}),e.querySelectorAll(tE(i.totalClass)).forEach(e=>{e.textContent=i.formatFractionTotal(u)})),"progressbar"===i.type){let l;l=i.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";let r=(a+1)/u,o=1,d=1;"horizontal"===l?o=r:d=r,e.querySelectorAll(tE(i.progressbarFillClass)).forEach(e=>{e.style.transform=`translate3d(0,0,0) scaleX(${o}) scaleY(${d})`,e.style.transitionDuration=`${t.params.speed}ms`})}"custom"===i.type&&i.renderCustom?(e.innerHTML=i.renderCustom(t,a+1,u),0===s&&n("paginationRender",e)):(0===s&&n("paginationRender",e),n("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](i.lockClass)})}function u(){let e=t.params.pagination;if(o())return;let i=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length,s=t.pagination.el;s=K(s);let a="";if("bullets"===e.type){let l=t.params.loop?Math.ceil(i/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&l>i&&(l=i);for(let r=0;r`}"fraction"===e.type&&(a=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):` / `),"progressbar"===e.type&&(a=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):``),t.pagination.bullets=[],s.forEach(i=>{"custom"!==e.type&&(i.innerHTML=a||""),"bullets"===e.type&&t.pagination.bullets.push(...i.querySelectorAll(tE(e.bulletClass)))}),"custom"!==e.type&&n("paginationRender",s[0])}function p(){t.params.pagination=tw(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});let e=t.params.pagination;if(!e.el)return;let i;"string"==typeof e.el&&t.isElement&&(i=t.el.querySelector(e.el)),i||"string"!=typeof e.el||(i=[...document.querySelectorAll(e.el)]),i||(i=e.el),i&&0!==i.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(i)&&i.length>1&&(i=[...t.el.querySelectorAll(e.el)]).length>1&&(i=i.filter(e=>Z(e,".swiper")[0]===t.el)[0]),Array.isArray(i)&&1===i.length&&(i=i[0]),Object.assign(t.pagination,{el:i}),(i=K(i)).forEach(i=>{"bullets"===e.type&&e.clickable&&i.classList.add(...(e.clickableClass||"").split(" ")),i.classList.add(e.modifierClass+e.type),i.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(i.classList.add(`${e.modifierClass}${e.type}-dynamic`),r=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&i.classList.add(e.progressbarOppositeClass),e.clickable&&i.addEventListener("click",c),t.enabled||i.classList.add(e.lockClass)}))}function f(){let e=t.params.pagination;if(o())return;let i=t.pagination.el;i&&(i=K(i)).forEach(i=>{i.classList.remove(e.hiddenClass),i.classList.remove(e.modifierClass+e.type),i.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(i.classList.remove(...(e.clickableClass||"").split(" ")),i.removeEventListener("click",c))}),t.pagination.bullets&&t.pagination.bullets.forEach(t=>t.classList.remove(...e.bulletActiveClass.split(" ")))}s("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;let e=t.params.pagination,{el:i}=t.pagination;(i=K(i)).forEach(i=>{i.classList.remove(e.horizontalClass,e.verticalClass),i.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)})}),s("init",()=>{!1===t.params.pagination.enabled?g():(p(),u(),h())}),s("activeIndexChange",()=>{void 0===t.snapIndex&&h()}),s("snapIndexChange",()=>{h()}),s("snapGridLengthChange",()=>{u(),h()}),s("destroy",()=>{f()}),s("enable disable",()=>{let{el:e}=t.pagination;e&&(e=K(e)).forEach(e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))}),s("lock unlock",()=>{h()}),s("click",(e,i)=>{let s=i.target,a=K(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&a&&a.length>0&&!s.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&s===t.navigation.nextEl||t.navigation.prevEl&&s===t.navigation.prevEl))return;!0===a[0].classList.contains(t.params.pagination.hiddenClass)?n("paginationShow"):n("paginationHide"),a.forEach(e=>e.classList.toggle(t.params.pagination.hiddenClass))}});let m=()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=K(e)).forEach(e=>e.classList.remove(t.params.pagination.paginationDisabledClass)),p(),u(),h()},g=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=K(e)).forEach(e=>e.classList.add(t.params.pagination.paginationDisabledClass)),f()};Object.assign(t.pagination,{enable:m,disable:g,render:u,update:h,init:p,destroy:f})}function tT(e){let{swiper:t,extendParams:i,on:s,emit:n,params:a}=e;t.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,r,o=a&&a.autoplay?a.autoplay.delay:3e3,d=a&&a.autoplay?a.autoplay.delay:3e3,c,h=(new Date).getTime(),u,p,f,m,g,v,b;function y(e){t&&!t.destroyed&&t.wrapperEl&&e.target===t.wrapperEl&&(t.wrapperEl.removeEventListener("transitionend",y),b||e.detail&&e.detail.bySwiperTouchMove||P())}let _=()=>{if(t.destroyed||!t.autoplay.running)return;t.autoplay.paused?u=!0:u&&(d=c,u=!1);let e=t.autoplay.paused?c:h+d-(new Date).getTime();t.autoplay.timeLeft=e,n("autoplayTimeLeft",e,e/o),r=requestAnimationFrame(()=>{_()})},S=()=>{let e;if(e=t.virtual&&t.params.virtual.enabled?t.slides.filter(e=>e.classList.contains("swiper-slide-active"))[0]:t.slides[t.activeIndex])return parseInt(e.getAttribute("data-swiper-autoplay"),10)},w=e=>{if(t.destroyed||!t.autoplay.running)return;cancelAnimationFrame(r),_();let i=void 0===e?t.params.autoplay.delay:e;o=t.params.autoplay.delay,d=t.params.autoplay.delay;let s=S();!Number.isNaN(s)&&s>0&&void 0===e&&(i=s,o=s,d=s),c=i;let a=t.params.speed,u=()=>{t&&!t.destroyed&&(t.params.autoplay.reverseDirection?!t.isBeginning||t.params.loop||t.params.rewind?(t.slidePrev(a,!0,!0),n("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(t.slides.length-1,a,!0,!0),n("autoplay")):!t.isEnd||t.params.loop||t.params.rewind?(t.slideNext(a,!0,!0),n("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(0,a,!0,!0),n("autoplay")),t.params.cssMode&&(h=(new Date).getTime(),requestAnimationFrame(()=>{w()})))};return i>0?(clearTimeout(l),l=setTimeout(()=>{u()},i)):requestAnimationFrame(()=>{u()}),i},x=()=>{h=(new Date).getTime(),t.autoplay.running=!0,w(),n("autoplayStart")},E=()=>{t.autoplay.running=!1,clearTimeout(l),cancelAnimationFrame(r),n("autoplayStop")},T=(e,i)=>{if(t.destroyed||!t.autoplay.running)return;clearTimeout(l),e||(v=!0);let s=()=>{n("autoplayPause"),t.params.autoplay.waitForTransition?t.wrapperEl.addEventListener("transitionend",y):P()};if(t.autoplay.paused=!0,i){g&&(c=t.params.autoplay.delay),g=!1,s();return}c=(c||t.params.autoplay.delay)-((new Date).getTime()-h),t.isEnd&&c<0&&!t.params.loop||(c<0&&(c=0),s())},P=()=>{t.isEnd&&c<0&&!t.params.loop||t.destroyed||!t.autoplay.running||(h=(new Date).getTime(),v?(v=!1,w(c)):w(),t.autoplay.paused=!1,n("autoplayResume"))},L=()=>{if(t.destroyed||!t.autoplay.running)return;let e=C();"hidden"===e.visibilityState&&(v=!0,T(!0)),"visible"===e.visibilityState&&P()},A=e=>{"mouse"===e.pointerType&&(v=!0,b=!0,t.animating||t.autoplay.paused||T(!0))},k=e=>{"mouse"===e.pointerType&&(b=!1,t.autoplay.paused&&P())},I=()=>{t.params.autoplay.pauseOnMouseEnter&&(t.el.addEventListener("pointerenter",A),t.el.addEventListener("pointerleave",k))},O=()=>{t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("pointerenter",A),t.el.removeEventListener("pointerleave",k))},M=()=>{C().addEventListener("visibilitychange",L)},z=()=>{C().removeEventListener("visibilitychange",L)};s("init",()=>{t.params.autoplay.enabled&&(I(),M(),x())}),s("destroy",()=>{O(),z(),t.autoplay.running&&E()}),s("_freeModeStaticRelease",()=>{(f||v)&&P()}),s("_freeModeNoMomentumRelease",()=>{t.params.autoplay.disableOnInteraction?E():T(!0,!0)}),s("beforeTransitionStart",(e,i,s)=>{!t.destroyed&&t.autoplay.running&&(s||!t.params.autoplay.disableOnInteraction?T(!0,!0):E())}),s("sliderFirstMove",()=>{if(!t.destroyed&&t.autoplay.running){if(t.params.autoplay.disableOnInteraction){E();return}p=!0,f=!1,v=!1,m=setTimeout(()=>{v=!0,f=!0,T(!0)},200)}}),s("touchEnd",()=>{if(!t.destroyed&&t.autoplay.running&&p){if(clearTimeout(m),clearTimeout(l),t.params.autoplay.disableOnInteraction){f=!1,p=!1;return}f&&t.params.cssMode&&P(),f=!1,p=!1}}),s("slideChange",()=>{!t.destroyed&&t.autoplay.running&&(g=!0)}),Object.assign(t.autoplay,{start:x,stop:E,pause:T,resume:P})}function tP(e){let{swiper:t,extendParams:i,on:s}=e;i({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,a=!1;function l(){let e=t.thumbs.swiper;if(!e||e.destroyed)return;let i=e.clickedIndex,s=e.clickedSlide;if(s&&s.classList.contains(t.params.thumbs.slideThumbActiveClass)||null==i)return;let n;n=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):i,t.params.loop?t.slideToLoop(n):t.slideTo(n)}function r(){let{thumbs:e}=t.params;if(n)return!1;n=!0;let i=t.constructor;if(e.swiper instanceof i)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(z(e.swiper)){let s=Object.assign({},e.swiper);Object.assign(s,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new i(s),a=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",l),!0}function o(e){let i=t.thumbs.swiper;if(!i||i.destroyed)return;let s="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView,n=1,a=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(n=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(n=1),n=Math.floor(n),i.slides.forEach(e=>e.classList.remove(a)),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(let l=0;l{e.classList.add(a)});else for(let r=0;re.getAttribute("data-swiper-slide-index")===`${t.realIndex}`)[0];h=i.slides.indexOf(p),u=t.activeIndex>t.previousIndex?"next":"prev"}else u=(h=t.realIndex)>t.previousIndex?"next":"prev";d&&(h+="next"===u?o:-1*o),i.visibleSlidesIndexes&&0>i.visibleSlidesIndexes.indexOf(h)&&(i.params.centeredSlides?h=h>c?h-Math.floor(s/2)+1:h+Math.floor(s/2)-1:h>c&&i.params.slidesPerGroup,i.slideTo(h,e?0:void 0))}}t.thumbs={swiper:null},s("beforeInit",()=>{let{thumbs:e}=t.params;if(e&&e.swiper){if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){let i=C(),s=()=>{let s="string"==typeof e.swiper?i.querySelector(e.swiper):e.swiper;if(s&&s.swiper)e.swiper=s.swiper,r(),o(!0);else if(s){let n=i=>{e.swiper=i.detail[0],s.removeEventListener("init",n),r(),o(!0),e.swiper.update(),t.update()};s.addEventListener("init",n)}return s},n=()=>{if(!t.destroyed)s()||requestAnimationFrame(n)};requestAnimationFrame(n)}else r(),o(!0)}}),s("slideChange update resize observerUpdate",()=>{o()}),s("setTransition",(e,i)=>{let s=t.thumbs.swiper;s&&!s.destroyed&&s.setTransition(i)}),s("beforeDestroy",()=>{let e=t.thumbs.swiper;e&&!e.destroyed&&a&&e.destroy()}),Object.assign(t.thumbs,{init:r,update:o})}function tL(e){let{effect:t,swiper:i,on:s,setTranslate:n,setTransition:a,overwriteParams:l,perspective:r,recreateShadows:o,getEffectParams:d}=e;s("beforeInit",()=>{if(i.params.effect!==t)return;i.classNames.push(`${i.params.containerModifierClass}${t}`),r&&r()&&i.classNames.push(`${i.params.containerModifierClass}3d`);let e=l?l():{};Object.assign(i.params,e),Object.assign(i.originalParams,e)}),s("setTranslate",()=>{i.params.effect===t&&n()}),s("setTransition",(e,s)=>{i.params.effect===t&&a(s)}),s("transitionEnd",()=>{i.params.effect===t&&o&&d&&d().slideShadows&&(i.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),o())});let c;s("virtualUpdate",()=>{i.params.effect===t&&(i.slides.length||(c=!0),requestAnimationFrame(()=>{c&&i.slides&&i.slides.length&&(n(),c=!1)}))})}function tA(e,t){let i=F(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function tk(e){let{swiper:t,duration:i,transformElements:s,allSlides:n}=e,{activeIndex:a}=t,l=e=>e.parentElement?(0,e.parentElement):t.slides.filter(t=>t.shadowRoot&&t.shadowRoot===e.parentNode)[0];if(t.params.virtualTranslate&&0!==i){let r=!1,o;(o=n?s:s.filter(e=>{let i=e.classList.contains("swiper-slide-transform")?l(e):e;return t.getSlideIndex(i)===a})).forEach(e=>{j(e,()=>{if(r||!t||t.destroyed)return;r=!0,t.animating=!1;let e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)})})}}function t8(e){let{swiper:t,extendParams:i,on:s}=e;i({fadeEffect:{crossFade:!1}});let n=()=>{let{slides:e}=t,i=t.params.fadeEffect;for(let s=0;s{let i=t.slides.map(e=>F(e));i.forEach(t=>{t.style.transitionDuration=`${e}ms`}),tk({swiper:t,duration:e,transformElements:i,allSlides:!0})};tL({effect:"fade",swiper:t,on:s,setTranslate:n,setTransition:a,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function tI(){let e=document.querySelector('[data-slider="main-slider"]');if(e){let t=e.querySelector("[data-slider]"),i=e.querySelector("[data-slider-pagination]");t&&new tS(t,{modules:[tC,tT,t8],effect:"fade",observer:!0,observeParents:!0,slidesPerView:1,spaceBetween:0,speed:800,lazy:!0,pagination:{el:i,clickable:!0},autoplay:{delay:5e3}})}}function tO(){let e=document.querySelector('[data-slider="product-slider"]');if(e){let t=e.querySelector('[data-slider="main-slider"]'),i=e.querySelector('[data-slider="thumb-slider"]'),s=e.querySelector("[data-slider-nextbtn]"),n=e.querySelector("[data-slider-prevbtn]"),a=null;i&&(a=new tS(i,{modules:[tC,tx],slidesPerView:3,spaceBetween:22,centerInsufficientSlides:!0,watchOverflow:!0,speed:800,navigation:{prevEl:n,nextEl:s},breakpoints:{300:{slidesPerView:2,spaceBetween:10},490:{slidesPerView:3,spaceBetween:10},768:{slidesPerView:3,spaceBetween:16},992:{slidesPerView:3,spaceBetween:22}},on:{}})).on("click",function(){let e=a.activeIndex,t=a.clickedIndex;window.innerWidth>400?t>e+1?a.slideTo(a.clickedIndex-1):t==e&&a.slideTo(a.clickedIndex-1):t>e?a.slideTo(a.clickedIndex):t==e&&a.slideTo(a.clickedIndex-1)}),t&&new tS(t,{modules:[tP],slidesPerView:1,watchOverflow:!0,spaceBetween:30,speed:800,thumbs:{swiper:a}})}}function tM(){let e=document.querySelector('[data-slider="similar-products"]');if(e){let t=e.querySelector("[data-slider]"),i=e.querySelector("[data-slider-pagination]"),s=e.querySelector("[data-slider-nextbtn]"),n=e.querySelector("[data-slider-prevbtn]");t&&new tS(t,{modules:[tC,tx],observer:!0,observeParents:!0,slidesPerView:4,spaceBetween:26,speed:800,lazy:!0,navigation:{prevEl:n,nextEl:s},pagination:{el:i,clickable:!0},breakpoints:{300:{slidesPerView:1,spaceBetween:10},490:{slidesPerView:1,spaceBetween:16},600:{slidesPerView:2,spaceBetween:18},992:{slidesPerView:3,spaceBetween:20},1250:{slidesPerView:4,spaceBetween:26}}})}}Object.keys(ty).forEach(e=>{Object.keys(ty[e]).forEach(t=>{tS.prototype[t]=ty[e][t]})}),tS.use([er,eo]),tI(),tO(),tM();let tz=(e,t=1e4)=>Math.round(((e=parseFloat(e+"")||0)+Number.EPSILON)*t)/t,tD=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,s=-1!==i.indexOf("hidden"),n=-1!==i.indexOf("visible");return t&&!s&&!n},tR=function(e,t){return!(!e||e===document.body||t&&e===t)&&(tD(e)?e:tR(e.parentElement,t))},t9=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var i=document.createElement("div");t.firstChild;)i.appendChild(t.firstChild);return i}return t.firstChild},tq=e=>`${e||""}`.split(" ").filter(e=>!!e),t0=(e,t,i)=>{e&&tq(t).forEach(t=>{e.classList.toggle(t,i||!1)})};class tB{constructor(e){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}let tF={passive:!1};class t3{constructor(e,{start:t=()=>!0,move:i=()=>{},end:s=()=>{}}){for(let n of(Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=e,this.startCallback=t,this.moveCallback=i,this.endCallback=s,["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"]))this[n]=this[n].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,tF),this.element.addEventListener("touchstart",this.onTouchStart,tF),this.element.addEventListener("touchmove",this.onMove,tF),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;let t=new tB(e);this.currentPointers.some(e=>e.id===t.id)||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(let t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new tB(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){let t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map(e=>new tB(e)):[new tB(e)],s=[];for(let n of i){let a=this.currentPointers.findIndex(e=>e.id===n.id);a<0||(s.push(n),this.currentPointers[a]=n)}s.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new tB(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(let t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new tB(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){let i=this.currentPointers.findIndex(e=>e.id===t.id);i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){let e=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,tF),this.element.removeEventListener("touchstart",this.onTouchStart,tF),this.element.removeEventListener("touchmove",this.onMove,tF),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function tH(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function tN(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}let t1=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),tV=(e,...t)=>{let i=t.length;for(let s=0;s{let s=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:s}),t1(i)?Object.assign(e[t],tV(s,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})});return e},tG=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class tW{constructor(e={}){for(let t of(Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e),Object.getOwnPropertyNames(Object.getPrototypeOf(this))))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){for(let[t,i]of(this.options=e?tV({},this.constructor.defaults,e):{},Object.entries(this.option("on")||{})))this.on(t,i)}option(e,...t){let i=tG(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...s){var n;let a=tG(t,e);"string"!=typeof(n=a)||isNaN(n)||isNaN(parseFloat(n))||(a=parseFloat(a)),"true"===a&&(a=!0),"false"===a&&(a=!1),a&&"function"==typeof a&&(a=a.call(this,this,e,...s));let l=tG(t,this.options);return l&&"function"==typeof l?a=l.call(this,this,e,...s,a):void 0===a&&(a=l),void 0===a?i:a}cn(e){let t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,i)=>{let s="";return i?s=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${i}`):t&&(s=this.option(`l10n.${t}`)),s||(s=e),s});for(let i=0;it)}on(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEach(e=>{let i=this.events.get(e);i||(this.events.set(e,[]),i=[]),i.includes(t)||i.push(t),this.events.set(e,i)})}off(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach(e=>{let i=this.events.get(e);if(Array.isArray(i)){let s=i.indexOf(t);s>-1&&i.splice(s,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(tW,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(tW,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class t2 extends tW{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){let t=new Map;for(let[i,s]of Object.entries(e)){let n=this.option(i),a=this.plugins[i];a||!1===n?a&&!1===n&&(a.detach(),delete this.plugins[i]):t.set(i,new s(this,n||{}))}for(let[l,r]of t)this.plugins[l]=r,r.attach()}detachPlugins(e){for(let t of e=e||Object.keys(this.plugins)){let i=this.plugins[t];i&&i.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}!function(e){e[e.Init=0]="Init",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Panning=3]="Panning",e[e.Mousemove=4]="Mousemove",e[e.Destroy=5]="Destroy"}(ed||(ed={}));let tX=["a","b","c","d","e","f"],t4={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},tY={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:t4},t6='',tZ='
'+t6+t6+"
",t7=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,tj=(e,t)=>{e&&tq(t).forEach(t=>{e.classList.remove(t)})},tU=(e,t)=>{e&&tq(t).forEach(t=>{e.classList.add(t)})},t5={a:1,b:0,c:0,d:1,e:0,f:0},tK="mousemove",tJ="drag",tQ="content",ie="auto",it=null,ii=null;class is extends t2{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===ii&&(ii=window.matchMedia("(hover: none)").matches),ii}get isMobile(){return null===it&&(it=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),it}get panMode(){return this.options.panMode!==tK||this.isTouchDevice?tJ:tK}get panOnlyZoomed(){let e=this.options.panOnlyZoomed;return e===ie?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){let{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){let{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){let{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){let{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){let e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(let e of tX){let t="e"==e||"f"===e?1e-4:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var s;if(super(t),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ed.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},t5)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},t5)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},is.Plugins),i)),this.emit("attachPlugins"),this.emit("init");let n=this.content;if(n.addEventListener("load",this.onLoad),n.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));let a=t9(tZ);!e.contains(n)||n.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(a):this.spinner=(null===(s=n.parentElement)||void 0===s?void 0:s.insertBefore(a,n))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){let{container:e}=this,t=this.cn(tQ),i=this.option(tQ)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild)&&tU(i,t),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw Error("No content found");this.content=i}onLoad(){let{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===ed.Init?this.enable():this.updateMetrics()}onError(){this.state!==ed.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=ed.Error,this.emit("error"))}getNextScale(e){let{fullScale:t,targetScale:i,coverScale:s,maxScale:n,minScale:a}=this,l=a;switch(e){case"toggleMax":l=i-a<.5*(n-a)?n:a;break;case"toggleCover":l=i-a<.5*(s-a)?s:a;break;case"toggleZoom":l=i-a<.5*(t-a)?t:a;break;case"iterateZoom":let r=[1,t,n].sort((e,t)=>e-t);l=r[r.findIndex(e=>e>i+1e-5)]||1}return l}attachObserver(){var e;let t=()=>{let{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout(()=>{t()&&this.onResize(),this.updateTimer=null},500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))})),null===(e=this.resizeObserver)||void 0===e||e.observe(this.container)}detachObserver(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}attachEvents(){let{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new t3(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(tK,this.onMouseMove)}detachEvents(){var e;let{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(tK,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();let e=this.friction,t=this.option("maxVelocity");for(let i of tX)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(let e of tX)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){let{current:i}=this,s=i.e+e,n=i.f+t,a=this.getBounds(),{x:l,y:r}=a,o=l.min,d=l.max,c=r.min,h=r.max,u=0,p=0;return o!==1/0&&sd&&(u=d-s),c!==1/0&&nh&&(p=h-n),1e-4>Math.abs(u)&&(u=0),1e-4>Math.abs(p)&&(p=0),Object.assign(Object.assign({},a),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){let{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){let{content:t,contentRect:i}=this,{fitWidth:s,fitHeight:n,fullWidth:a,fullHeight:l}=i,r=a,o=l;if(this.option("zoom")||0!==this.angle){let d=!(t instanceof HTMLImageElement)&&("none"===window.getComputedStyle(t).maxWidth||"none"===window.getComputedStyle(t).maxHeight),c=d?a:s,h=d?l:n,u=this.getMatrix(e),p=new DOMPoint(0,0).matrixTransform(u),f=new DOMPoint(0+c,0).matrixTransform(u),m=new DOMPoint(0+c,0+h).matrixTransform(u),g=new DOMPoint(0,0+h).matrixTransform(u),v=Math.abs(m.x-p.x),b=Math.abs(m.y-p.y),y=Math.abs(g.x-f.x),_=Math.abs(g.y-f.y);r=Math.max(v,y),o=Math.max(b,_)}return{contentWidth:r,contentHeight:o}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===tK||this.targetScale3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(i.closest("[data-fancybox]"))return;let u=this.content.getBoundingClientRect(),p=this.dragStart;if(p.time&&!this.canZoomOut()&&(Math.abs(u.x-p.x)>2||Math.abs(u.y-p.y)>2))return;this.dragStart.time=0;let f=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},m=this.option("click",e),g=this.option("dblClick",e);g?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&m&&f(m)):(this.emit("dblClick",e),e.defaultPrevented||f(g)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&m&&f(m))}addTrackingPoint(e){let t=this.trackingPoints.filter(e=>e.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var s;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];let n=this.content.getBoundingClientRect();if(this.dragStart={x:n.x,y:n.y,top:n.top,left:n.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===tK&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;let a=e.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(a.nodeName)||a.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(s=window.getSelection())||void 0===s||s.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(a.nodeName)||e.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(t),this.emit("touchStart",e)),!0}onPointerMove(e,t,i){if(!1===this.option("touch",e)||!this.isDragging||t.length<2&&this.panOnlyZoomed&&tz(this.targetScale)<=tz(this.minScale)||(this.emit("touchMove",e),e.defaultPrevented))return;this.addTrackingPoint(t[0]);let{content:s}=this,n=tN(i[0],i[1]),a=tN(t[0],t[1]),l=0,r=0;if(t.length>1){let o=s.getBoundingClientRect();l=n.clientX-o.left-.5*o.width,r=n.clientY-o.top-.5*o.height}let d=tH(i[0],i[1]),c=tH(t[0],t[1]),h=d?c/d:1,u=a.clientX-n.clientX,p=a.clientY-n.clientY;this.dragOffset.x+=u,this.dragOffset.y+=p,this.dragOffset.time=Date.now()-this.dragStart.time;let f=tz(this.targetScale)===tz(this.minScale)&&this.option("lockAxis");if(f&&!this.lockedAxis){if("xy"===f||"y"===f||"touchmove"===e.type){if(6>Math.abs(this.dragOffset.x)&&6>Math.abs(this.dragOffset.y))return void e.preventDefault();let m=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=m>45&&m<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,u=0,p=0}else this.lockedAxis=f}if(tR(e.target,this.content)&&(f="x",this.dragOffset.y=0),f&&"xy"!==f&&this.lockedAxis!==f&&tz(this.targetScale)===tz(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));let g=this.checkBounds(u,p);this.option("rubberband")?("x"!==this.isInfinite&&(g.xDiff>0&&u<0||g.xDiff<0&&u>0)&&(u*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*g.xDiff))),"y"!==this.isInfinite&&(g.yDiff>0&&p<0||g.yDiff<0&&p>0)&&(p*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*g.yDiff)))):(g.xDiff&&(u=0),g.yDiff&&(p=0));let v=this.targetScale,b=this.minScale,y=this.maxScale;v<.5*b&&(h=Math.max(h,b)),v>1.5*y&&(h=Math.min(h,y)),"y"===this.lockedAxis&&tz(v)===tz(b)&&(u=0),"x"===this.lockedAxis&&tz(v)===tz(b)&&(p=0),this.applyChange({originX:l,originY:r,panX:u,panY:p,scale:h,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(t),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),tR(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==ed.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;let t=this.isScaling;for(let i of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,tX))this.velocity[i]=0;this.target.e=this.current.e,this.target.f=this.current.f,tj(this.container,"is-scaling"),tj(this.container,"is-animating"),this.isTicking=!1;let{trackingPoints:s}=this,n=s[0],a=s[s.length-1],l=0,r=0,o=0;a&&n&&(l=a.clientX-n.clientX,r=a.clientY-n.clientY,o=a.time-n.time);let d=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==d&&(l*=d,r*=d);let c=0,h=0,u=0,p=0,f=this.option("decelFriction"),m=this.targetScale;if(o>0){u=Math.abs(l)>3?l/(o/30):0,p=Math.abs(r)>3?r/(o/30):0;let g=this.option("maxVelocity");g&&(u=Math.max(Math.min(u,g),-1*g),p=Math.max(Math.min(p,g),-1*g))}u&&(c=u/(1/(1-f)-1)),p&&(h=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&tz(m)===this.minScale)&&(c=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&tz(m)===this.minScale)&&(h=p=0);let v=this.dragOffset.x,b=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(v)this.maxScale+1e-5)||t&&!c&&!h)&&(f=.35),this.applyChange({panX:c,panY:h,friction:f}),this.emit("decel",u,p,v,b)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e});if(this.emit("wheel",e,Math.max(-1,Math.min(1,t))),this.panMode===tK||e.defaultPrevented)return;let i=this.option("wheel");"pan"===i?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:-(2*e.deltaX),panY:-(2*e.deltaY),bounce:!1})):"zoom"===i&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");let{current:e,target:t,content:i,contentRect:s}=this,n=Object.assign({},t5);for(let a of tX){let l="e"==a||"f"===a?1e4:1e5;n[a]=tz(e[a],l),Math.abs(t[a]-e[a])<("e"==a||"f"===a?.51:.001)&&(e[a]=t[a])}let{a:r,b:o,c:d,d:c,e:h,f:u}=n,p=`matrix(${r}, ${o}, ${d}, ${c}, ${h}, ${u})`,f=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===p)return;f.style.transform=p;let{contentWidth:m,contentHeight:g}=this.calculateContentDim();s.width=m,s.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var t,i,s,n,a,l,r;if(!this||this.state===ed.Destroy||this.isContentLoading)return;let o=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1),{container:d,content:c}=this,h=c instanceof HTMLImageElement,u=d.getBoundingClientRect(),p=getComputedStyle(this.container),f=u.width*o,m=u.height*o,g=parseFloat(p.paddingTop)+parseFloat(p.paddingBottom),v=f-(parseFloat(p.paddingLeft)+parseFloat(p.paddingRight));this.containerRect={width:f,height:m,innerWidth:v,innerHeight:m-g};let b,y,_=parseFloat(c.dataset.width||"")||(b=(i=c)instanceof HTMLImageElement?i.naturalWidth:i instanceof SVGElement?i.width.baseVal.value:Math.max(i.offsetWidth,i.scrollWidth))||0,S=parseFloat(c.dataset.height||"")||(y=(s=c)instanceof HTMLImageElement?s.naturalHeight:s instanceof SVGElement?s.height.baseVal.value:Math.max(s.offsetHeight,s.scrollHeight))||0,w=this.option("width",_)||ie,x=this.option("height",S)||ie,E=w===ie,C=x===ie;"number"!=typeof w&&(w=_),"number"!=typeof x&&(x=S),E&&(w=_*(x/S)),C&&(x=S/(_/w));let T=c.parentElement instanceof HTMLPictureElement?c.parentElement:c;this.option("transformParent")&&(T=T.parentElement||T);let P=T.getAttribute("style")||"";T.style.setProperty("transform","none","important"),h&&(T.style.width="",T.style.height=""),T.offsetHeight;let L=c.getBoundingClientRect(),A=L.width*o,k=L.height*o,I=A,O=k,M;A=Math.min(A,w),k=Math.min(k,x),h?{width:A,height:k}=(n=w,a=x,l=A,M=Math.min(l/n,(r=k)/a),{width:n*=M,height:a*=M}):(A=Math.min(A,w),k=Math.min(k,x));let z=.5*(O-k),D=.5*(I-A);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:L.top-u.top+z,bottom:u.bottom-L.bottom+z,left:L.left-u.left+D,right:u.right-L.right+D,fitWidth:A,fitHeight:k,width:A,height:k,fullWidth:w,fullHeight:x}),T.style.cssText=P,h&&(T.style.width=`${A}px`,T.style.height=`${k}px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(tz(this.targetScale)this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===ed.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){let{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:s}=this,{fitWidth:n,fitHeight:a}=this.contentRect,l=0,r=0,o=0,d=0,c=this.option("infinite");if(!0===c||s&&c===s)l=-1/0,o=1/0,r=-1/0,d=1/0;else{let{containerRect:h,contentRect:u}=this,p=tz(n*i,1e4),f=tz(a*i,1e4),{innerWidth:m,innerHeight:g}=h;if(h.width===p&&(m=h.width),h.width===f&&(g=h.height),e>m){l=-1*(o=.5*(e-m));let v=.5*(u.right-u.left);l+=v,o+=v}if(n>m&&eg){r=-1*(d=.5*(t-g));let b=.5*(u.bottom-u.top);r+=b,d+=b}a>g&&ttz(i.fitWidth,1)||tz(i.height,1)>tz(i.fitHeight,1))&&(c=!0)),tz(i.width*s,1)tz(s),u=!h&&!c&&o&&tz(a)y&&(i=y/v)}g=g.scale(i)}for(let _ of(g=g.translate(-n,-a).translate(-p,-f).multiply(m),s&&(g=g.rotate(s)),r&&(g=g.scale(-1,1)),o&&(g=g.scale(1,-1)),tX))"e"!==_&&"f"!==_&&(g[_]>this.minScale+1e-5||g[_].1||this.panMode===tK||!1===c)&&!d&&this.clampTargetBounds(),h===ed.Init?this.animate():this.isResting||(this.state=ed.Panning,this.requestTick())}stop(e=!1){if(this.state===ed.Init||this.state===ed.Destroy)return;let t=this.isTicking;for(let i of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,tX))this.velocity[i]=0,"current"===e?this.current[i]=this.target[i]:"target"===e&&(this.target[i]=this.current[i]);this.setTransform(),tj(this.container,"is-scaling"),tj(this.container,"is-animating"),this.isTicking=!1,this.state=ed.Ready,t&&(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),tU(this.container,"is-animating"),this.isScaling&&tU(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==tK||!e||tz(this.targetScale)<=tz(this.minScale))return;this.emit("mouseMove",e);let{container:i,containerRect:s,contentRect:n}=this,a=s.width,l=s.height,r=i.getBoundingClientRect(),o=(e.clientX||0)-r.left,d=(e.clientY||0)-r.top,{contentWidth:c,contentHeight:h}=this.calculateContentDim(this.target),u=this.option("mouseMoveFactor");u>1&&(c!==a&&(c*=u),h!==l&&(h*=u));let p=.5*(c-a)-o/a*100/100*(c-a);p+=.5*(n.right-n.left);let f=.5*(h-l)-d/l*100/100*(h-l);f+=.5*(n.bottom-n.top),this.applyChange({panX:p-this.target.e,panY:f-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===ed.Destroy||this.state===ed.Init)return;let t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;let i=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),{targetScale:s,maxScale:n,minScale:a}=this,l=s*(100+45*i)/100;tz(l)tz(n)&&tz(s)>=tz(n)?(this.cwd+=Math.abs(i),l=n):(this.cwd=0,l=Math.max(Math.min(l,n),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),tz(l)!==tz(s)&&this.zoomTo(l,{event:e}))}canZoomIn(){return this.option("zoom")&&(tz(this.contentRect.width,1)tz(this.minScale)}zoomIn(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.getNextScale("toggleZoom"),e)}toggleMax(e){this.zoomTo(this.getNextScale("toggleMax"),e)}toggleCover(e){this.zoomTo(this.getNextScale("toggleCover"),e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t=ie,originX:i=ie,originY:s=ie,event:n}={}){if(this.isContentLoading||this.state===ed.Destroy)return;let{targetScale:a,fullScale:l,maxScale:r,coverScale:o}=this;if(this.stop(),this.panMode===tK&&(n=this.pmme||n),n||i===ie||s===ie){let d=this.content.getBoundingClientRect(),c=this.container.getBoundingClientRect(),h=n?n.clientX:c.left+.5*c.width,u=n?n.clientY:c.top+.5*c.height;i=h-d.left-.5*d.width,s=u-d.top-.5*d.height}let p=1;"number"==typeof e?p=e:"full"===e?p=l:"cover"===e?p=o:"max"===e?p=r:"fit"===e?p=1:"next"===e&&(p=this.getNextScale("iterateZoom")),p=p/a||1,t=t===ie?p>1?.15:.25:t,this.applyChange({scale:p,originX:i,originY:s,friction:t}),n&&this.panMode===tK&&this.panWithMouse(n,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");let{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");let{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){let{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);let s=e.classList.contains(t);s?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(s?"enterFS":"exitFS")}getMatrix(e=this.current){let{a:t,b:i,c:s,d:n,e:a,f:l}=e;return new DOMMatrix([t,i,s,n,a,l])}reset(e){if(this.state!==ed.Init&&this.state!==ed.Destroy){for(let t of(this.stop("current"),tX))this.target[t]=t5[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=ed.Panning,this.requestTick())}}destroy(){this.stop(),this.state=ed.Destroy,this.detachEvents(),this.detachObserver();let{container:e,content:t}=this,i=this.option("classes")||{};for(let s of Object.values(i))e.classList.remove(s+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(is,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:tY}),Object.defineProperty(is,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});let ia=function(e,t){let i=!0;return(...s)=>{i&&(i=!1,e(...s),setTimeout(()=>{i=!0},t))}},il=(e,t)=>{let i=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)}),i},ir={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(ec||(ec={}));let io=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{let t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},id=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class ic extends tW{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}let ih={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'',dynamicFrom:11,maxCount:1/0,minCount:2};class iu extends ic{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;if(!e){tU(e=document.createElement("ul"),this.cn("list")),e.setAttribute("role","tablist");let t=this.instance.container;t.appendChild(e),tU(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;let t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),s=Math.max(2e3,this.option("maxCount")),n=this.option("dynamicFrom");if(ts)return void this.cleanup();let a="number"==typeof n&&t>5&&t>=n,l=!this.list||this.isDynamic!==a||this.list.children.length!==t;l&&this.cleanup();let r=this.build();if(t0(r,this.cn("isDynamic"),!!a),l)for(let o=0;o=t-1&&n.setAttribute(ip,"")))}addBtn(e){var t,i;let s=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",s.localize(`{{${e.toUpperCase()}}}`)),tU(n,this.cn("button")+" "+this.cn(e===im?"isNext":"isPrev"));let a=s.isRTL?e===im?ig:im:e;return n.innerHTML=s.localize(this.option(`${a}Tpl`)),n.dataset[`carousel${(i=e)?i.match("^[a-z]")?i.charAt(0).toUpperCase()+i.substring(1):i:""}`]="true",null===(t=this.container)||void 0===t||t.appendChild(n),n}build(){let e=this.instance.container,t=this.cn("container"),{container:i,prev:s,next:n}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(tU(i=document.createElement("div"),t),e.appendChild(i)),this.container=i,n||(n=i.querySelector("[data-carousel-next]")),n||(n=this.addBtn(im)),this.next=n,s||(s=i.querySelector("[data-carousel-prev]")),s||(s=this.addBtn(ig)),this.prev=s}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(iv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'',prevTpl:''}});class i$ extends ic{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){let{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===ec.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===ec.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var s,n;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;let a=i.target,{nav:l,target:r}=this;if(!l||!r||!a)return;let o=a.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!o)return;let d=parseInt(o.dataset.index||"",10)||0,c=r.getPageForSlide(d),h=l.getPageForSlide(d);l.slideTo(h),r.slideTo(c,{friction:(null===(n=null===(s=this.nav)||void 0===s?void 0:s.plugins)||void 0===n?void 0:n.Sync.option("friction"))||0}),this.markSelectedSlide(d)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;let{target:i,nav:s}=this;if(!i||!s||s.state!==ec.Ready||i.state!==ec.Ready)return;let n=null===(t=null===(e=i.pages[i.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,a=s.getPageForSlide(n);this.markSelectedSlide(n),s.slideTo(a,null===s.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(e){let t=this.nav;t&&t.state===ec.Ready&&(this.selectedIndex=e,[...t.slides].map(t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")}))}attach(){let e=this.options.target,t=this.options.nav;e?this.addAsNavFor(e):t&&this.addAsTargetFor(t)}detach(){let e=this,t=e.nav,i=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,i&&(i.off("ready",e.onTargetReady),i.off("refresh",e.onTargetChange),i.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(i$,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});let ib={Navigation:iv,Dots:iu,Sync:i$},iy="animationend",i_="isSelected",iS="slide";class iw extends t2{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===ec.Ready}get isInfinite(){let e=!1,{contentDim:t,viewportDim:i,pages:s,slides:n}=this,a=n[0];return s.length>=2&&a&&t+a.dim>=i&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ec.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof e&&(e=document.querySelector(e)),!e||!t7(e))throw Error("No Element found");this.container=e,this.slideNext=ia(this.slideNext.bind(this),150),this.slidePrev=ia(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;let i=tV({},iw.defaults,this.userOptions),s="",n=i.breakpoints;if(n&&t1(n))for(let[a,l]of Object.entries(n))window.matchMedia(a).matches&&t1(l)&&(s+=a,tV(i,l));s===this.bp&&this.state!==ec.Init||(this.bp=s,this.state===ec.Ready&&(i.initialSlide=(null===(t=null===(e=this.pages[this.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index)||0),this.state!==ec.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}init(){this.state=ec.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},iw.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=ec.Ready,this.emit("ready")}initLayout(){let{container:e}=this,t=this.option("classes");tU(e,this.cn("container")),t0(e,t.isLTR,!this.isRTL),t0(e,t.isRTL,this.isRTL),t0(e,t.isVertical,!this.isHorizontal),t0(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(tU(i=document.createElement("div"),t.viewport),i.append(...il(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let s=this.option("track")||e.querySelector(`.${t.track}`);s||(tU(s=document.createElement("div"),t.track),s.append(...Array.from(i.childNodes))),s.setAttribute("aria-live","polite"),i.contains(s)||i.prepend(s),this.viewport=i,this.track=s,this.emit("initLayout")}initSlides(){let{track:e}=this;if(!e)return;let t=[...this.slides],i=[];for(let s of([...il(e,`.${this.cn(iS)}`)].forEach(e=>{if(t7(e)){let t=io({el:e,isDom:!0,index:this.slides.length});i.push(t)}}),[...this.option("slides",[])||[],...t]))i.push(io(s));this.slides=i;for(let n=0;n!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",(e,t,...i)=>{this.emit(`Panzoom.${t}`,e,...i)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){let e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[],{contentDim:t,viewportDim:i}=this,s=this.option("slidesPerPage");s=("auto"===s||t<=i)&&!1!==this.option("fill")?1/0:parseFloat(s+"");let n=0,a=0,l=0;for(let r of this.slides)(!e.length||a+r.dim-i>.05||l>=s)&&(e.push(id()),n=e.length-1,a=0,l=0),e[n].slides.push(r),a+=r.dim+r.gap,l++;return e}processPages(){let e=this.pages,{contentDim:t,viewportDim:i,isInfinite:s}=this,n=this.option("center"),a=this.option("fill"),l=a&&n&&t>i&&!s;if(e.forEach((e,s)=>{var a;for(let[r,o]of(e.index=s,e.pos=(null===(a=e.slides[0])||void 0===a?void 0:a.pos)||0,e.dim=0,e.slides.entries()))e.dim+=o.dim,r=t-.5*i?e.pos=t-i:n&&(e.pos+=-.5*(i-e.dim))}),e.forEach(e=>{a&&!s&&t>i&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,t-i)),e.pos=tz(e.pos,1e3),e.dim=tz(e.dim,1e3),.1>=Math.abs(e.pos)&&(e.pos=0)}),s)return e;let r=[],o;return e.forEach(e=>{let t=Object.assign({},e);o&&t.pos===o.pos?(o.dim+=t.dim,o.slides=[...o.slides,...t.slides]):(t.index=r.length,o=t,r.push(t))}),r}getPageFromIndex(e=0){let t=this.pages.length,i;return e=parseInt((e||0).toString())||0,i=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0)}getSlideMetrics(e){var t,i;let s=this.isHorizontal?"width":"height",n=0,a=0,l=e.el,r=!(!l||l.parentNode);if(l?n=parseFloat(l.dataset[s]||"")||0:((l=document.createElement("div")).style.visibility="hidden",(this.track||document.body).prepend(l)),tU(l,this.cn(iS)+" "+e.class+" "+e.customClass),n)l.style[s]=`${n}px`,l.style["width"===s?"height":"width"]="";else{r&&(this.track||document.body).prepend(l),n=l.getBoundingClientRect()[s]*Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1);let o=l[this.isHorizontal?"offsetWidth":"offsetHeight"];o-1>n&&(n=o)}let d=getComputedStyle(l);return"content-box"===d.boxSizing&&(this.isHorizontal?(n+=parseFloat(d.paddingLeft)||0,n+=parseFloat(d.paddingRight)||0):(n+=parseFloat(d.paddingTop)||0,n+=parseFloat(d.paddingBottom)||0)),a=parseFloat(d[this.isHorizontal?"marginRight":"marginBottom"])||0,r?null===(i=l.parentElement)||void 0===i||i.removeChild(l):e.el||l.remove(),{dim:tz(n,1e3),gap:tz(a,1e3)}}getBounds(){let{isInfinite:e,isRTL:t,isHorizontal:i,pages:s}=this,n={min:0,max:0};if(e)n={min:-1/0,max:1/0};else if(s.length){let a=s[0].pos,l=s[s.length-1].pos;n=t&&i?{min:a,max:l}:{min:-1*l,max:-1*a}}return{x:i?n:{min:0,max:0},y:i?{min:0,max:0}:n}}repositionSlides(){let e,{isHorizontal:t,isRTL:i,isInfinite:s,viewport:n,viewportDim:a,contentDim:l,page:r,pages:o,slides:d,panzoom:c}=this,h=0,u=0,p=0,f=0;for(let m of(c?f=-1*c.current[this.axis]:o[r]&&(f=o[r].pos||0),e=t?i?"right":"left":"top",i&&t&&(f*=-1),d)){let g=m.el;g?("top"===e?(g.style.right="",g.style.left=""):g.style.top="",m.index!==h?g.style[e]=0===u?"":`${tz(u,1e3)}px`:g.style[e]="",p+=m.dim+m.gap,h++):u+=m.dim+m.gap}if(s&&p&&n){let v=getComputedStyle(n),b="padding",y=parseFloat(v[b+(t?"Left":"Top")]);for(let _ of(f-=y,a+=y,a+=parseFloat(v[b+(t?"Right":"Bottom")]),d))_.el&&(tz(_.pos)tz(l-a)&&(_.el.style[e]=`${tz(u+p,1e3)}px`),tz(_.pos+_.gap)>=tz(l-a)&&tz(_.pos)>tz(f+a)&&tz(f)1&&(S=o[x[0]],w=o[x[1]]),S&&w){let E=0;for(let C of d)C.el?this.inTransition.has(C.index)&&0>S.slides.indexOf(C)&&(C.el.style[e]=`${tz(E+(S.pos-w.pos),1e3)}px`):E+=C.dim+C.gap}}createSlideEl(e){let{track:t,slides:i}=this;if(!t||!e||e.el&&e.el.parentNode)return;let s=e.el||document.createElement("div");tU(s,this.cn(iS)),tU(s,e.class),tU(s,e.customClass);let n=e.html;n&&(n instanceof HTMLElement?s.appendChild(n):s.innerHTML=e.html+"");let a=[];i.forEach((e,t)=>{e.el&&a.push(t)});let l=e.index,r=null;a.length&&(r=i[a.reduce((e,t)=>Math.abs(t-l)1)return!1;let c=e>l?1:-1;this.isInfinite&&(0===l&&e===r.length-1&&(c=-1),l===r.length-1&&0===e&&(c=1));let h=r[d].pos*(this.isRTL?1:-1);if(l===d&&1>Math.abs(h-o.target[this.axis]))return!1;this.clearTransitions();let u=o.isResting;tU(this.container,this.cn("inTransition"));let p=(null===(n=r[l])||void 0===n?void 0:n.slides[0])||null,f=(null===(a=r[d])||void 0===a?void 0:a.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);let m=p.el,g=f.el;u||t===iS||(t="fadeFast",m=null);let v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return m&&(this.inTransition.add(p.index),p.transition=t,m.addEventListener(iy,this.onAnimationEnd),m.classList.add(`f-${t}Out`,`to-${c>0?b:v}`)),g&&(f.transition=t,g.addEventListener(iy,this.onAnimationEnd),g.classList.add(`f-${t}In`,`from-${c>0?v:b}`)),o.current[this.axis]=h,o.target[this.axis]=h,o.requestTick(),this.onChange(d),!0}manageSlideVisiblity(){let e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(let s of this.slides)i.has(s)?e.add(s):t.add(s);for(let n of this.inTransition)e.add(this.slides[n]);for(let a of e)this.createSlideEl(a),this.lazyLoadSlide(a);for(let l of t)e.has(l)||this.removeSlideEl(l);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;let e="aria-hidden",t=this.cn(i_);if(t)for(let i of this.slides){let s=i.el;s&&(s.dataset.index=`${i.index}`,s.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?s.removeAttribute(e):s.setAttribute(e,"true"):this.pages[this.page].slides.includes(i)?(s.classList.contains(t)||(tU(s,t),this.emit("selectSlide",i)),s.removeAttribute(e)):(s.classList.contains(t)&&(tj(s,t),this.emit("unselectSlide",i)),s.setAttribute(e,"true")))}}flipInfiniteTrack(){let{axis:e,isHorizontal:t,isInfinite:i,isRTL:s,viewportDim:n,contentDim:a}=this,l=this.panzoom;if(!l||!i)return;let r=l.current[e],o=l.target[e]-r,d=0,c=.5*n;s&&t?(r<-c&&(d=-1,r+=a),r>a-c&&(d=1,r-=a)):(r>c&&(d=1,r-=a),r<-a+c&&(d=-1,r+=a)),d&&(l.current[e]=r,l.target[e]=r+o)}lazyLoadImg(e,t){let i=this,s="f-fadeIn",n="is-preloading",a=!1,l=null,r=()=>{a||(a=!0,l&&(l.remove(),l=null),tj(t,n),t.complete&&(tU(t,s),setTimeout(()=>{tj(t,s)},350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",e))};tU(t,n),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",()=>{r()}),t.addEventListener("load",()=>{r()}),setTimeout(()=>{let i=t.parentNode;i&&e.el&&(t.complete?r():a||(l=t9(tZ),i.insertBefore(l,t)))},300)}lazyLoadSlide(e){let t=e&&e.el;if(!t)return;let i=new Set,s=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));for(let n of(t.dataset.lazySrc&&s.push(t),s.map(e=>{e instanceof HTMLImageElement?i.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)}),i))this.lazyLoadImg(e,n)}onAnimationEnd(e){var t;let i=e.target,s=i?parseInt(i.dataset.index||"",10)||0:-1,n=this.slides[s],a=e.animationName;if(!i||!n||!a)return;let l=!!this.inTransition.has(s)&&n.transition;l&&a.substring(0,l.length+2)===`f-${l}`&&this.inTransition.delete(s),this.inTransition.size||this.clearTransitions(),s===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit("settle")}onDecel(e,t=0,i=0,s=0,n=0){if(this.option("dragFree"))return void this.setPageFromPosition();let{isRTL:a,isHorizontal:l,axis:r,pages:o}=this,d=o.length,c=Math.abs(Math.atan2(i,t)/(Math.PI/180)),h=0;if(h=c>45&&c<135?l?0:i:l?t:0,!d)return;let u=this.page,p=e.current[r]*(a&&l?1:-1),{pageIndex:f}=this.getPageFromPosition(p);Math.abs(h)>5?(o[u].dimMath.abs(o.target[n]-u)||(o.panTo({x:a?u:0,y:a?0:u,friction:t}),this.onChange(s))}slideToClosest(e){if(this.panzoom){let{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),tj(this.container,this.cn("inTransition"));let e=["to-prev","to-next","from-prev","from-next"];for(let t of this.slides){let i=t.el;if(i){i.removeEventListener(iy,this.onAnimationEnd),i.classList.remove(...e);let s=t.transition;s&&i.classList.remove(`f-${s}Out`,`f-${s}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,s,n,a;let l=this.panzoom,r=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,o=(null===(s=this.pages[this.page])||void 0===s?void 0:s.dim)||0,d=this.contentDim=e&&(this.page+=h.length),this.updateMetrics(),l){let m=(null===(n=this.pages[this.page])||void 0===n?void 0:n.pos)||0,g=(null===(a=this.pages[this.page])||void 0===a?void 0:a.dim)||0,v=this.pages.length||1,b=this.isRTL?o-g:g-o,y=this.isRTL?r-m:m-r;d&&1===v?(e<=this.page&&(l.current[this.axis]-=b,l.target[this.axis]-=b),l.panTo({[this.isHorizontal?"x":"y"]:-1*m})):y&&e<=this.page&&(l.target[this.axis]-=y,l.current[this.axis]-=y,l.requestTick())}for(let _ of h)this.emit("initSlide",_,_.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){let t=this.slides.length;e=(e%t+t)%t;let i=this.slides[e];if(i){this.removeSlideEl(i,!0),this.slides.splice(e,1);for(let s=0;sthis.page?-1:1;let l=-1*s.current.e,r=tz((l-a.pos)/(1*a.dim),1e3),o=r,d=r;this.isInfinite&&!0!==i&&(o=tz((l-a.pos+n)/(1*a.dim),1e3),d=tz((l-a.pos-n)/(1*a.dim),1e3));let c=[r,o,d].reduce(function(e,t){return Math.abs(t)1?1:c<-1?-1:c}setViewportHeight(){let{page:e,pages:t,viewport:i,isHorizontal:s}=this;if(!i||!t[e])return;let n=0;s&&this.track&&(this.track.style.height="auto",t[e].slides.forEach(e=>{e.el&&(n=Math.max(n,e.el.offsetHeight))})),i.style.height=n?`${n}px`:""}getPageForSlide(e){for(let t of this.pages)for(let i of t.slides)if(i.index===e)return t.index;return -1}getVisibleSlides(e=0){var t;let i=new Set,{panzoom:s,contentDim:n,viewportDim:a,pages:l,page:r}=this;if(a){n=n+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let o=0;o=s&&s.state!==ed.Init&&s.state!==ed.Destroy?-1*s.current[this.axis]:l[r]&&l[r].pos||0,this.isInfinite&&(o-=Math.floor(o/n)*n),this.isRTL&&this.isHorizontal&&(o*=-1);let d=o-a*e,c=o+a*(e+1),h=this.isInfinite?[-1,0,1]:[0];for(let u of this.slides)for(let p of h){let f=u.pos+p*n,m=f+u.dim+u.gap;fd&&i.add(u)}}return i}getPageFromPosition(e){let{viewportDim:t,contentDim:i,slides:s,pages:n,panzoom:a}=this,l=n.length,r=s.length,o=s[0],d=s[r-1],c=this.option("center"),h=0,u=0,p=0,f=void 0===e?-1*((null==a?void 0:a.target[this.axis])||0):e;c&&(f+=.5*t),this.isInfinite?(fd.pos+d.dim+.5*d.gap&&(f-=i,p=1)):f=Math.max(o.pos||0,Math.min(f,d.pos));let m=d,g=s.find(e=>{let t=e.pos-.5*m.gap,i=e.pos+e.dim+.5*e.gap;return m=e,f>=t&&f{this.removeSlideEl(e)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes)),Object.entries(a)))"container"!==l&&r&&e.classList.remove(r);this.track=null,this.viewport=null,this.page=0,this.slides=[];let o=this.events.get("ready");this.events=new Map,o&&this.events.set("ready",o)}}Object.defineProperty(iw,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:is}),Object.defineProperty(iw,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ir}),Object.defineProperty(iw,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:ib});let ix=function(e){if(!t7(e))return 0;let t=window.scrollY,i=window.innerHeight,s=t+i,n=e.getBoundingClientRect(),a=n.y+t,l=n.height,r=a+l;if(t>r||sr||as)return 100;let o=l;return as&&(o-=r-s),Math.round(o/i*100)},iE=!("undefined"==typeof window||!window.document||!window.document.createElement),iC,iT='a[href],area[href],input:not([disabled]):not([type="hidden"]):not([aria-hidden]),select:not([disabled]):not([aria-hidden]),textarea:not([disabled]):not([aria-hidden]),button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard),iframe,object,embed,video,audio,[contenteditable],[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])',iP=e=>{if(e&&iE){void 0===iC&&document.createElement("div").focus({get preventScroll(){return iC=!0,!1}});try{if(iC)e.focus({preventScroll:!0});else{let t=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(s){}}},iL=()=>{let e=document,t,i="",s="",n="";return e.fullscreenEnabled?(i="requestFullscreen",s="exitFullscreen",n="fullscreenElement"):e.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",s="webkitExitFullscreen",n="webkitFullscreenElement"),i&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===i?t[i](Element.ALLOW_KEYBOARD_INPUT):t[i]()},exit:function(){return e[n]&&e[s]()},isFullscreen:function(){return e[n]}}),t},iA={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},t4),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,tpl:{closeButton:'',main:''},trapFocus:!0,wheel:"zoom"};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.CustomClosing=3]="CustomClosing",e[e.Destroy=4]="Destroy"}(eh||(eh={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(eu||(eu={}));let ik="",i8=!1,iI=!1,iO=null,iM=()=>{let e="",t="",i=sz.getInstance();if(i){let s=i.carousel,n=i.getSlide();if(s&&n){let a=n.slug||void 0,l=n.triggerEl||void 0;(t=a||i.option("slug")||"")||!l||!l.dataset||(t=l.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!a&&s.slides.length>1?"-"+(n.index+1):""))}}return{hash:e,slug:t,index:1}},iz=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split("-"),i=t[t.length-1],s=i&&/^\+?\d+$/.test(i)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:s}},iD=()=>{let{slug:e,index:t}=iz();if(!e)return;let i=document.querySelector(`[data-slug="${e}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),sz.getInstance())return;let s=document.querySelectorAll(`[data-fancybox="${e}"]`);s.length&&(i=s[t-1])&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))},iR=()=>{if(!1===sz.defaults.Hash)return;let e=sz.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;let{slug:t,index:i}=iz(),{slug:s}=iM();e&&(t===s?e.jumpTo(i-1):(i8=!0,e.close())),iD()},i9=()=>{iO&&clearTimeout(iO),queueMicrotask(()=>{iR()})},iq=()=>{window.addEventListener("hashchange",i9,!1),setTimeout(()=>{iR()},500)};iE&&(/complete|interactive|loaded/.test(document.readyState)?iq():document.addEventListener("DOMContentLoaded",iq));let i0="is-zooming-in";class iB extends ic{onCreateSlide(e,t,i){let s=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof s&&this.setImage(i,s)}onRemoveSlide(e,t,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(e,t,i,s){for(let n of(tj(this.instance.container,i0),t.slides)){let a=n.panzoom;a&&n.index!==i&&a.reset(.35)}}onClose(){var e,t,i;let s=this.instance,n=s.container,a=s.getSlide();if(!n||!n.parentElement||!a)return;let{el:l,contentEl:r,panzoom:o,thumbElSrc:d}=a;if(!l||!d||!r||!o||o.isContentLoading||o.state===ed.Init||o.state===ed.Destroy)return;o.updateMetrics();let c=this.getZoomInfo(a);if(!c)return;this.instance.state=eh.CustomClosing,n.classList.remove(i0),n.classList.add("is-zooming-out"),r.style.backgroundImage=`url('${d}')`;let h=n.getBoundingClientRect();1===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(n.style,{position:"absolute",top:`${n.offsetTop+window.scrollY}px`,left:`${n.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${h.width}px`,height:`${h.height}px`,overflow:"hidden"});let{x:u,y:p,scale:f,opacity:m}=c;if(m){let g,v,b=(t=o.scale,g=(i=f)-t,v=-1,e=>1+((e-t)/g*v||0));o.on("afterTransform",()=>{r.style.opacity=b(o.scale)+""})}o.on("endAnimation",()=>{s.destroy()}),o.target.a=f,o.target.b=0,o.target.c=0,o.target.d=f,o.panTo({x:u,y:p,scale:f,friction:m?.2:.33,ignoreBounds:!0}),o.isResting&&s.destroy()}setImage(e,t){let i=this.instance;e.src=t,this.process(e,t).then(t=>{var s;let{contentEl:n,imageEl:a,thumbElSrc:l,el:r}=e;if(i.isClosing()||!n||!a)return;n.offsetHeight;let o=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&r){r.addEventListener("contextmenu",e=>{e.preventDefault()});let d=document.createElement("div");tU(d,"fancybox-protected"),n.appendChild(d)}if(l&&o){let c=t.contentRect,h=Math.max(c.fullWidth,c.fullHeight),u=null;!o.opacity&&h>1200&&(tU(u=document.createElement("img"),"fancybox-ghost"),u.src=l,n.appendChild(u));let p=()=>{u&&(tU(u,"f-fadeFastOut"),setTimeout(()=>{u&&(u.remove(),u=null)},200))};(s=l,new Promise((e,t)=>{let i=new Image;i.onload=e,i.onerror=t,i.src=s})).then(()=>{i.hideLoading(e),e.state=eu.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{p(),this.instance.done(e)},()=>{}),u&&setTimeout(()=>{p()},h>2500?800:200)},()=>{i.hideLoading(e),i.revealContent(e)})}else{let f=this.optionFor(e,"initialSize"),m=this.optionFor(e,"zoom"),g={event:i.prevMouseMoveEvent||i.options.event,friction:m?.12:0},v=i.optionFor(e,"showClass")||void 0,b=!0;i.isOpeningSlide(e)&&("full"===f?t.zoomToFull(g):"cover"===f?t.zoomToCover(g):"max"===f?t.zoomToMax(g):b=!1,t.stop("current")),b&&v&&(v=t.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,v)}},()=>{i.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((i,s)=>{var n;let a=this.instance,l=e.el;a.clearContent(e),a.showLoading(e);let r=this.optionFor(e,"content");if("string"==typeof r&&(r=t9(r)),!r||!t7(r)){if((r=document.createElement("img"))instanceof HTMLImageElement){let o="",d=e.caption;o="string"==typeof d&&d?d.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(n=a.carousel)||void 0===n?void 0:n.pages.length)||1}`,r.src=t||"",r.alt=o,r.draggable=!1,e.srcset&&r.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(r.fetchPriority="high")}e.sizes&&r.setAttribute("sizes",e.sizes)}tU(r,"fancybox-image"),e.imageEl=r,a.setContent(e,r,!1),e.panzoom=new is(l,tV({transformParent:!0},this.option("Panzoom")||{},{content:r,width:(t,i)=>a.optionFor(e,"width","auto",i)||"auto",height:(t,i)=>a.optionFor(e,"height","auto",i)||"auto",wheel(){let e=a.option("wheel");return("zoom"===e||"pan"==e)&&e},click(t,i){var s,n;if(a.isCompact||a.isClosing()||e.index!==(null===(s=a.getSlide())||void 0===s?void 0:s.index)||i&&["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(i.composedPath()[0].nodeName))return!1;let l=!i||i.target&&(null===(n=e.contentEl)||void 0===n?void 0:n.contains(i.target));return a.option(l?"contentClick":"backdropClick")||!1},dblClick:()=>a.isCompact?"toggleZoom":a.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready(e){i(e)},error(){s()},destroy(){s()}}}))})}zoomIn(e){return new Promise((t,i)=>{let s=this.instance,n=s.container,{panzoom:a,contentEl:l,el:r}=e;a&&a.updateMetrics();let o=this.getZoomInfo(e);if(!(o&&r&&l&&a&&n))return void i();let{x:d,y:c,scale:h,opacity:u}=o,p=()=>{e.state!==eu.Closing&&(u&&(l.style.opacity=Math.max(Math.min(1,1-(1-a.scale)/(1-h)),0)+""),a.scale>=1&&a.scale>a.targetScale-.1&&t(a))},f=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(tj(n,i0),l.style.opacity="",e.off("endAnimation",f),e.off("touchStart",f),e.off("afterTransform",p),t(e))};a.on("endAnimation",f),a.on("touchStart",f),a.on("afterTransform",p),a.on(["error","destroy"],()=>{i()}),a.panTo({x:d,y:c,scale:h,friction:0,ignoreBounds:!0}),a.stop("current");let m={event:"mousemove"===a.panMode?s.prevMouseMoveEvent||s.options.event:void 0},g=this.optionFor(e,"initialSize");tU(n,i0),s.hideLoading(e),"full"===g?a.zoomToFull(m):"cover"===g?a.zoomToCover(m):"max"===g?a.zoomToMax(m):a.reset(.172)})}getZoomInfo(e){let{el:t,imageEl:i,thumbEl:s,panzoom:n}=e,a=this.instance,l=a.container;if(!t||!i||!s||!n||3>ix(s)||!this.optionFor(e,"zoom")||!l||a.state===eh.Destroy||"0"===getComputedStyle(l).getPropertyValue("--f-images-zoom"))return!1;let r=window.visualViewport||null;if(1!==(r?r.scale:1))return!1;let{top:o,left:d,width:c,height:h}=s.getBoundingClientRect(),{top:u,left:p,fitWidth:f,fitHeight:m}=n.contentRect;if(!(c&&h&&f&&m))return!1;let g=n.container.getBoundingClientRect();p+=g.left,u+=g.top;let v=-1*(p+.5*f-(d+.5*c)),b=-1*(u+.5*m-(o+.5*h)),y=this.option("zoomOpacity")||!1;return"auto"===y&&(y=Math.abs(c/h-f/m)>.1),{x:v,y:b,scale:c/f,opacity:y}}attach(){let e=this.instance;e.on("Carousel.change",this.onChange),e.on("Carousel.createSlide",this.onCreateSlide),e.on("Carousel.removeSlide",this.onRemoveSlide),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("Carousel.change",this.onChange),e.off("Carousel.createSlide",this.onCreateSlide),e.off("Carousel.removeSlide",this.onRemoveSlide),e.off("close",this.onClose)}}Object.defineProperty(iB,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;let iF="html",i3="image",iH="youtube",iN="vimeo",i1="html5video",iV=(e,t={})=>{let i=new URL(e),s=new URLSearchParams(i.search),n=new URLSearchParams;for(let[a,l]of[...s,...Object.entries(t)]){let r=l+"";if("t"===a){let o=r.match(/((\d*)m)?(\d*)s?/);o&&n.set("start",60*parseInt(o[2]||"0")+parseInt(o[3]||"0")+"")}else n.set(a,r)}let d=n+"",c=e.match(/#t=((.*)?\d+s)/);return c&&(d+=`#t=${c[1]}`),d},iG={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},iW=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class i2 extends ic{onBeforeInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);let i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);let s=t.contentEl,n=t.placeholderEl;if("inline"===t.type&&s&&n)s.classList.remove("fancybox__content"),"none"!==getComputedStyle(s).getPropertyValue("display")&&(s.style.display="none"),setTimeout(()=>{n&&(s&&n.parentNode&&n.parentNode.insertBefore(s,n),n.remove())},0),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,i){i.state===eu.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var s,n;if(i.type===i1){try{null===(n=null===(s=i.el)||void 0===s?void 0:s.querySelector("video"))||void 0===n||n.pause()}catch(a){}return}let l;i.type===iN?l={method:"pause",value:"true"}:i.type===iH&&(l={event:"command",func:"pauseVideo"}),l&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(l),"*"),i.poller&&clearTimeout(i.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach(e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))})}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let i of Array.from(document.getElementsByClassName("fancybox__iframe")))i instanceof HTMLIFrameElement&&i.contentWindow===e.source&&(i.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){let s=document.getElementById(t.id);s&&(s.dataset.ready="true")}}catch(n){}}loadAjaxContent(e){let t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);let i=this.instance,s=new XMLHttpRequest;i.showLoading(e),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&i.state===eh.Ready&&(i.hideLoading(e),200===s.status?i.setContent(e,s.responseText):i.setError(e,404===s.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};let n=e.ajax||null;s.open(n?"POST":"GET",t+""),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(n),e.xhr=s}setInlineContent(e){let t=null;if(t7(e.src))t=e.src;else if("string"==typeof e.src){let i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){let s=(t=t.cloneNode(!0)).dataset.animationName;s&&(t.classList.remove(s),delete t.dataset.animationName);let n=t.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",n)}else if(t.parentNode){let a=document.createElement("div");a.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(a,t),e.placeholderEl=a}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){let{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");let s=this.instance,n=document.createElement("iframe");for(let[a,l]of(n.className="fancybox__iframe",n.setAttribute("id",`fancybox__iframe_${s.id}_${e.index}`),Object.entries(this.optionFor(e,"iframeAttr")||{})))n.setAttribute(a,l);n.onerror=()=>{s.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=n;let r=this.optionFor(e,"preload");if("iframe"!==e.type||!1===r)return n.setAttribute("src",e.src+""),s.setContent(e,n,!1),this.resizeIframe(e),void s.revealContent(e);s.showLoading(e),n.onload=()=>{if(!n.src.length)return;let t="true"!==n.dataset.ready;n.dataset.ready="true",this.resizeIframe(e),t?s.revealContent(e):s.hideLoading(e)},n.setAttribute("src",t),s.setContent(e,n,!1)}resizeIframe(e){let{type:t,iframeEl:i}=e;if(t===iH||t===iN)return;let s=null==i?void 0:i.parentElement;if(!i||!s)return;let n=e.autoSize;void 0===n&&(n=this.optionFor(e,"autoSize"));let a=e.width||0,l=e.height||0;a&&l&&(n=!1);let r=s&&s.style;if(!1!==e.preload&&!1!==n&&r)try{let o=window.getComputedStyle(s),d=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),c=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),h=i.contentWindow;if(h){let u=h.document,p=u.getElementsByTagName(iF)[0],f=u.body;r.width="",f.style.overflow="hidden",a=a||p.scrollWidth+d,r.width=`${a}px`,f.style.overflow="",r.flex="0 0 auto",r.height=`${f.scrollHeight}px`,l=p.scrollHeight+c}}catch(m){}if(a||l){let g={flex:"0 1 auto",width:"",height:""};a&&"auto"!==a&&(g.width=`${a}px`),l&&"auto"!==l&&(g.height=`${l}px`),Object.assign(r,g)}}playVideo(){let e=this.instance.getSlide();if(!e)return;let{el:t}=e;if(!t||!t.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===i1)try{let i=t.querySelector("video");if(i){let s=i.play();void 0!==s&&s.then(()=>{}).catch(e=>{i.muted=!0,i.play()})}}catch(n){}if(e.type!==iH&&e.type!==iN)return;let a=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return(t=e.type===iH?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===iH&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(a,250)};a()}processType(e){if(e.html)return e.type=iF,e.src=e.html,void(e.html="");let t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let i=e.type,s=null;if(s=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){let n=this.optionFor(e,iH),{nocookie:a}=n,l=function(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(e);nt.indexOf(s[n])&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(i[s[n]]=e[s[n]])}return i}(n,["nocookie"]),r=`www.youtube${a?"-nocookie":""}.com`,o=iV(t,l),d=encodeURIComponent(s[2]);e.videoId=d,e.src=`https://${r}/embed/${d}?${o}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${d}/mqdefault.jpg`,i=iH}else if(s=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){let c=iV(t,this.optionFor(e,iN)),h=encodeURIComponent(s[1]),u=s[4]||"";e.videoId=h,e.src=`https://player.vimeo.com/video/${h}?${u?`h=${u}${c?"&":""}`:""}${c}`,i=iN}if(!i&&e.triggerEl){let p=e.triggerEl.dataset.type;iW.includes(p)&&(i=p)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(s=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=i1,e.videoFormat=e.videoFormat||"video/"+("ogv"===s[1]?"ogg":s[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=i3:t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${s[1]}/?ll=${(s[2]?s[2]+"&z="+Math.floor(parseFloat(s[3]))+(s[4]?s[4].replace(/^\//,"&"):""):s[4]+"").replace(/\?/,"&")}&output=${s[4]&&s[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="map"):(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${s[1]}/maps?q=${s[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="map"),i=i||this.instance.option("defaultType"),e.type=i,i===i3&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){let t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case iF:this.instance.setContent(e,t);break;case i1:let i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"map":case iH:case iN:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){let t=e.contentEl;if(!(e.el&&t&&e.type&&[iH,iN,i1].includes(e.type)))return;let i,s=e.width||"auto",n=e.height||"auto";if("auto"===s||"auto"===n){let a=((i=this.optionFor(e,"videoRatio"))+"").match(/(\d+)\s*\/\s?(\d+)/);i=a&&a.length>2?parseFloat(a[1])/parseFloat(a[2]):parseFloat(i+"")}else s&&n&&(i=s/n);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;let l=t.getBoundingClientRect(),r=l.width||1,o=l.height||1;t.style.aspectRatio=i+"",i{e.timer=null,e.inHover||e.onTimerEnd()},i),e.emit("set")}clear(){let e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){if(this.set(),this.state!==iY){if(this.option("pauseOnHover")){let e=this.instance.container;e.addEventListener("mouseenter",this.onMouseEnter,!1),e.addEventListener("mouseleave",this.onMouseLeave,!1)}document.addEventListener("visibilitychange",this.onVisibilityChange,!1),this.emit("start")}}stop(){let e=this,t=e.state,i=e.instance.container;e.clear(),e.state=iY,i.removeEventListener("mouseenter",e.onMouseEnter,!1),i.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),tj(i,"has-autoplay"),t!==iY&&e.emit("stop")}pause(){let e=this;e.state===iX&&(e.state=i4,e.clear(),e.emit(i4))}resume(){let e=this.instance;if(e.isInfinite||e.page!==e.pages.length-1){if(this.state!==iX){if(this.state===i4&&!this.inHover){let t=new Event("resume",{bubbles:!0,cancelable:!0});this.emit("resume",t),t.defaultPrevented||this.set()}}else this.set()}else this.stop()}toggle(){this.state===iX||this.state===i4?this.stop():this.start()}attach(){let e=this.instance;e.on("ready",this.onReady),e.on("Panzoom.startAnimation",this.onChange),e.on("Panzoom.endAnimation",this.onSettle),e.on("Panzoom.touchMove",this.onChange)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off("Panzoom.startAnimation",this.onChange),e.off("Panzoom.endAnimation",this.onSettle),e.off("Panzoom.touchMove",this.onChange),this.stop()}}Object.defineProperty(i6,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class iZ extends ic{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){let t=e.carousel;if(!t)return;let i=e.container;i&&(t.options.Autoplay=tV({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start(){e.emit("startSlideshow")},set(t){var s;i.classList.add("has-slideshow"),(null===(s=e.getSlide())||void 0===s?void 0:s.state)!==eu.Ready&&t.pause()},stop(){i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume(t,i){var s,n,a;!i||!i.cancelable||(null===(s=e.getSlide())||void 0===s?void 0:s.state)===eu.Ready&&(null===(a=null===(n=e.carousel)||void 0===n?void 0:n.panzoom)||void 0===a?void 0:a.isResting)||i.preventDefault()}}}),t.attachPlugins({Autoplay:i6}),this.ref=t.plugins.Autoplay)}onReady(e){let t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page{e.isCurrentSlide(t)&&i.stop()}),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;let s=this.ref;s&&t===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&s.toggle()}attach(){let e=this.instance;e.on("Carousel.init",this.onPrepare),e.on("Carousel.ready",this.onReady),e.on("done",this.onDone),e.on("keydown",this.onKeydown)}detach(){let e=this.instance;e.off("Carousel.init",this.onPrepare),e.off("Carousel.ready",this.onReady),e.off("done",this.onDone),e.off("keydown",this.onKeydown)}}Object.defineProperty(iZ,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl(e){var t;return(null===(t=e.instance.container)||void 0===t?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});let i7={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'',type:"modern"};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(ep||(ep={}));let ij="isResting",iU="thumbWidth",i5="thumbHeight",iK="thumbClipWidth",iJ=class extends ic{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ep.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){let i=t.el?t.el.dataset:void 0;i&&(t.thumbSrc=i.thumbSrc||t.thumbSrc||"",t[iK]=parseFloat(i[iK]||"")||t[iK]||0,t[i5]=parseFloat(i.thumbHeight||"")||t[i5]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;let t=this.container,i=this.instance,s=i.panzoom,n=this.carousel,a=n?n.panzoom:null,l=i.page;if(s&&n&&a){if(s.isDragging){tj(t,this.cn(ij));let r=(null===(e=n.pages[l])||void 0===e?void 0:e.pos)||0;r+=i.getProgress(l)*(this[iK]+this.thumbGap);let o=a.getBounds();-1*r>o.x.min&&-1*r["modern","classic"].indexOf(this.option("type"))}getThumb(e){let t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(e){let t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){let e=[];for(let t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[iU]=e[iK]&&e[i5]?Math.round(this[i5]*(e[iK]/e[i5])):this[iU])}updateProps(){let e=this.container;if(!e)return;let t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[iU]=t("width")||40,this[iK]=t("clip-width")||40,this[i5]=t("height")||40}build(){let e=this;if(e.state!==ep.Init)return;if(e.isDisabled())return void e.emit("disabled");let t=e.instance,i=t.container,s=e.getSlides(),n=e.option("type");e.type=n;let a=e.option("parentEl"),l=e.cn("container"),r=e.cn("track"),o=null==a?void 0:a.querySelector("."+l);o||(tU(o=document.createElement("div"),l),a?a.appendChild(o):i.after(o)),tU(o,`is-${n}`),tU(i,e.cn("hasThumbs")),e.container=o,e.updateProps();let d=o.querySelector("."+r);d||(tU(d=document.createElement("div"),e.cn("track")),o.appendChild(d)),e.track=d;let c=tV({},{track:d,infinite:!1,center:!0,fill:"classic"===n,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},e.option("Carousel")||{},{Sync:{target:t},slides:s}),h=new t.constructor(o,c);h.on("createSlide",(t,i)=>{e.setProps(i.index),e.emit("createSlide",i,i.el)}),h.on("ready",()=>{e.shiftModern(),e.emit("ready")}),h.on("refresh",()=>{e.shiftModern()}),h.on("Panzoom.click",(t,i,s)=>{e.onClick(s)}),e.carousel=h,e.state=ep.Ready}onClick(e){e.preventDefault(),e.stopPropagation();let t=this.instance,{pages:i,page:s}=t,n=e=>{if(e){let t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},a=(e,t)=>{let i=document.elementFromPoint(e,t);return i?n(i):[-1,void 0]},[l,r]=n(e.target);if(l>-1)return;let o=this[iK],d=e.clientX,c=e.clientY,[h,u]=a(d-o,c),[p,f]=a(d+o,c);u&&f?(l=Math.abs(d-u.getBoundingClientRect().right)-1&&i[l]&&t.slideTo(l)}getShift(e){var t;let{instance:i}=this,s=this.carousel;if(!i||!s)return 0;let n=this[iU],a=this[iK],l=this.thumbGap,r=this.thumbExtraGap;if(!(null===(t=s.slides[e])||void 0===t?void 0:t.el))return 0;let o=i.pages.length-1,d=i.getProgress(0),c=i.getProgress(o),h=i.getProgress(e,!1,!0),u=0,p=.5*(n-a)+r+l,f=d<0&&d>-1,m=c>0&&c<1;return 0===e?(u=p*Math.abs(d),m&&1===d&&(u-=p*Math.abs(c))):e===o?(u=-(p*Math.abs(c)*1),f&&-1===c&&(u+=p*Math.abs(d))):f||m?(u=-1*p,u+=p*Math.abs(d),u+=p*(1-Math.abs(c))):u=p*h,u}setProps(e){var t;if(!this.isModern)return;let{instance:i}=this,s=this.carousel;if(i&&s){let n=null===(t=s.slides[e])||void 0===t?void 0:t.el;if(n&&n.childNodes.length){let a=tz(1-Math.abs(i.getProgress(e))),l=tz(this.getShift(e));n.style.setProperty("--progress",a?a+"":""),n.style.setProperty("--shift",l+"")}}}shiftModern(){if(!this.isModern)return;let{instance:e,track:t}=this,i=e.panzoom,s=this.carousel;if(!(e&&t&&i&&s)||i.state===ed.Init||i.state===ed.Destroy)return;for(let n of e.slides)this.setProps(n.index);let a=(this[iK]+this.thumbGap)*(s.slides.length||0);t.style.setProperty("--width",a+"")}cleanup(){let e=this;e.carousel&&e.carousel.destroy(),e.carousel=null,e.container&&e.container.remove(),e.container=null,e.track&&e.track.remove(),e.track=null,e.state=ep.Init,tj(e.instance.container,e.cn("hasThumbs"))}attach(){let e=this.instance;e.on("initSlide",this.onInitSlide),e.state===ec.Init?e.on("initSlides",this.onInitSlides):this.onInitSlides(),e.on(["change","Panzoom.afterTransform"],this.onChange),e.on("Panzoom.refresh",this.onRefresh)}detach(){let e=this.instance;e.off("initSlide",this.onInitSlide),e.off("initSlides",this.onInitSlides),e.off(["change","Panzoom.afterTransform"],this.onChange),e.off("Panzoom.refresh",this.onRefresh),this.cleanup()}};Object.defineProperty(iJ,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:i7});let iQ=Object.assign(Object.assign({},i7),{key:"t",showOnStart:!0,parentEl:null}),se="is-masked",st="aria-hidden";class si extends ic{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){let e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,s,n;let a=(null===(n=null===(s=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===s?void 0:s.slides[t.index])||void 0===n?void 0:n.type)||"",l=t.el;if(l&&a){let r=`for-${a}`;["video","youtube","vimeo","html5video"].includes(a)&&(r+=" for-video"),tU(l,r)}}onInit(){var e;let t=this,i=t.instance,s=i.carousel;if(t.ref||!s)return;let n=t.option("parentEl")||i.footer||i.container;if(!n)return;let a=tV({},t.options,{parentEl:n,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{let i=e.container;i&&this.hidden&&(t.refresh(),i.style.transition="none",t.hide(),i.offsetHeight,queueMicrotask(()=>{i.style.transition="",t.show()}))}}});a.Carousel=a.Carousel||{},a.Carousel.on=tV((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),s.options.Thumbs=a,s.attachPlugins({Thumbs:iJ}),t.ref=s.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=ep.Hidden,t.hidden=!0)}onResize(){var e;let t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){let i=this.option("key");i&&i===t&&this.toggle()}toggle(){let e=this.ref;if(e&&!e.isDisabled())return e.state===ep.Hidden?(e.state=ep.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){let e=this.ref;if(!e||e.isDisabled())return;let t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(st),t.classList.remove(se),this.hidden=!1)}hide(){let e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(se),t.setAttribute(st,"true")),this.hidden=!0}refresh(){let e=this.ref;if(!e||!e.state)return;let t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){let e=this.instance;e.state===eh.Init?e.on("Carousel.init",this.onInit):this.onInit(),e.on("resize",this.onResize),e.on("keydown",this.onKeydown)}detach(){var e;let t=this,i=t.instance;i.off("Carousel.init",t.onInit),i.off("resize",t.onResize),i.off("keydown",t.onKeydown),null===(e=i.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(si,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:iQ});let ss={panLeft:{icon:'',change:{panX:-100}},panRight:{icon:'',change:{panX:100}},panUp:{icon:'',change:{panY:-100}},panDown:{icon:'',change:{panY:100}},zoomIn:{icon:'',action:"zoomIn"},zoomOut:{icon:'',action:"zoomOut"},toggle1to1:{icon:'',action:"toggleZoom"},toggleZoom:{icon:'',action:"toggleZoom"},iterateZoom:{icon:'',action:"iterateZoom"},rotateCCW:{icon:'',action:"rotateCCW"},rotateCW:{icon:'',action:"rotateCW"},flipX:{icon:'',action:"flipX"},flipY:{icon:'',action:"flipY"},fitX:{icon:'',action:"fitX"},fitY:{icon:'',action:"fitY"},reset:{icon:'',action:"reset"},toggleFS:{icon:'',action:"toggleFS"}};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(ef||(ef={}));let sn={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'
/
'},download:{tpl:''},prev:{tpl:''},next:{tpl:''},slideshow:{tpl:''},fullscreen:{tpl:''},thumbs:{tpl:''},close:{tpl:''}},parentEl:null},sa={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},sl="has-toolbar",sr="fancybox__toolbar";class so extends ic{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ef.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let i=this.option("display"),s=this.option("absolute"),n=this.option("enabled");if("auto"===n){let a=this.instance.carousel,l=0;if(a)for(let r of a.slides)(r.panzoom||"image"===r.type)&&l++;l||(n=!1)}n||(i=void 0);let o=0,d={left:[],middle:[],right:[]};if(i)for(let c of["left","middle","right"])for(let h of i[c]){let u=this.createEl(h);u&&(null===(t=d[c])||void 0===t||t.push(u),o++)}let p=null;if(o&&(p=this.createContainer()),p){for(let[f,m]of Object.entries(d)){let g=document.createElement("div");for(let v of(tU(g,sr+"__column is-"+f),m))g.appendChild(v);"auto"!==s||"middle"!==f||m.length||(s=!0),p.appendChild(g)}!0===s&&tU(p,"is-absolute"),this.state=ef.Ready,this.onRefresh()}else this.state=ef.Disabled}onClick(e){var t,i;let s=this.instance,n=s.getSlide(),a=null==n?void 0:n.panzoom,l=e.target,r=l&&t7(l)?l.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=s.plugins.Thumbs)||void 0===t||t.toggle());if(void 0!==r.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();let o=null===(i=s.carousel)||void 0===i?void 0:i.plugins.Autoplay,d=o.isActive;return a&&"mousemove"===a.panMode&&!d&&a.reset(),void(d?o.stop():o.start())}let c=r.panzoomAction,h=r.panzoomChange;if((h||c)&&(e.preventDefault(),e.stopPropagation()),h){let u={};try{u=JSON.parse(h)}catch(p){}a&&a.applyChange(u)}else c&&a&&a[c]&&a[c]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;let e=this.container;if(!e)return;let t=this.instance.getSlide();if(!t||t.state!==eu.Ready)return;let i=t&&!t.error&&t.panzoom;for(let s of e.querySelectorAll("[data-panzoom-action]"))i?(s.removeAttribute("disabled"),s.removeAttribute("tabindex")):(s.setAttribute("disabled",""),s.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),a=i&&i.canZoomOut();for(let l of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(l.removeAttribute("disabled"),l.removeAttribute("tabindex")):(l.setAttribute("disabled",""),l.setAttribute("tabindex","-1"));for(let r of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))a?(r.removeAttribute("disabled"),r.removeAttribute("tabindex")):(r.setAttribute("disabled",""),r.setAttribute("tabindex","-1"));for(let o of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){a||n?(o.removeAttribute("disabled"),o.removeAttribute("tabindex")):(o.setAttribute("disabled",""),o.setAttribute("tabindex","-1"));let d=o.querySelector("g");d&&(d.style.display=n?"":"none")}}onDone(e,t){var i;null===(i=t.panzoom)||void 0===i||i.on("afterTransform",()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()}),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){let e=this.instance.container;if(!e)return null;let t=this.option("parentEl")||e,i=t.querySelector("."+sr);return i||(tU(i=document.createElement("div"),sr),t.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&tU(e,sl),this.container=i,i}createEl(e){let t=this.instance,i=t.carousel;if(!i||"toggleFS"===e||"fullscreen"===e&&!iL())return null;let s=null,n=i.slides.length||0,a=0,l=0;for(let r of i.slides)(r.panzoom||"image"===r.type)&&a++,("image"===r.type||r.downloadSrc)&&l++;if(n<2&&["infobar","prev","next"].includes(e))return s;if(void 0!==ss[e]&&!a||"download"===e&&!l)return null;if("thumbs"===e){let o=t.plugins.Thumbs;if(!o||!o.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||n<2))return null;if(void 0!==ss[e]){let d=ss[e];(s=document.createElement("button")).setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),tU(s,"f-button"),d.action&&(s.dataset.panzoomAction=d.action),d.change&&(s.dataset.panzoomChange=JSON.stringify(d.change)),s.appendChild(t9(this.instance.localize(d.icon)))}else{let c=(this.option("items")||[])[e];c&&(s=t9(this.instance.localize(c.tpl)),"function"==typeof c.click&&s.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof c.click&&c.click.call(this,this,e)}))}let h=null==s?void 0:s.querySelector("svg");if(h)for(let[u,p]of Object.entries(sa))h.getAttribute(u)||h.setAttribute(u,String(p));return s}removeContainer(){let e=this.container;e&&e.remove(),this.container=null,this.state=ef.Disabled;let t=this.instance.container;t&&tj(t,sl)}attach(){let e=this.instance;e.on("Carousel.initSlides",this.onReady),e.on("done",this.onDone),e.on(["reveal","Carousel.change"],this.onChange),this.onReady(this.instance)}detach(){let e=this.instance;e.off("Carousel.initSlides",this.onReady),e.off("done",this.onDone),e.off(["reveal","Carousel.change"],this.onChange),this.removeContainer()}}Object.defineProperty(so,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:sn});let sd={Hash:class extends ic{onReady(){i8=!1}onChange(e){iO&&clearTimeout(iO);let{hash:t}=iM(),{hash:i}=iz(),s=e.isOpeningSlide(e.getSlide());s&&(ik=i===t?"":i),t&&t!==i&&(iO=setTimeout(()=>{try{if(e.state===eh.Ready){let i="replaceState";s&&!iI&&(i="pushState",iI=!0),window.history[i]({},document.title,window.location.pathname+window.location.search+t)}}catch(n){}},300))}onClose(e){if(iO&&clearTimeout(iO),!i8&&iI)return iI=!1,i8=!1,void window.history.back();if(!i8)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ik||""))}catch(t){}}attach(){let e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return iz()}static startFromUrl(){iD()}static destroy(){window.removeEventListener("hashchange",i9,!1)}},Html:i2,Images:iB,Slideshow:iZ,Thumbs:si,Toolbar:so},sc="with-fancybox",sh="hide-scrollbar",su="--fancybox-scrollbar-compensate",sp="--fancybox-body-margin",sf="aria-hidden",sm="is-using-tab",sg="is-animated",sv="is-compact",s$="is-loading",sb="is-opening",sy="has-caption",s_="disabled",sS="tabindex",sw="download",sx="href",sE=e=>"string"==typeof e,sC=function(){var e=window.getSelection();return!!e&&"Range"===e.type},sT,sP=null,sL=null,sA=0,sk=0,s8=0,sI=0,sO=new Map,sM=0;class sz extends t2{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},i={}){super(t),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:eh.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),sT||(sT=iL()),this.id=t.id||++sM,sO.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask(()=>{this.init()})}init(){if(this.state===eh.Destroy)return;this.state=eh.Init,this.attachPlugins(Object.assign(Object.assign({},sz.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!iE)return;let e=document,t=e.body,i=e.documentElement;if(t.classList.contains(sh))return;let s=window.innerWidth-i.getBoundingClientRect().width,n=parseFloat(window.getComputedStyle(t).marginRight);s<0&&(s=0),i.style.setProperty(su,`${s}px`),n&&t.style.setProperty(sp,`${n}px`),t.classList.add(sh)})(),this.initLayout(),this.scale();let e=()=>{this.initCarousel(this.userSlides),this.state=eh.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(sf,"false")},16)};this.option("Fullscreen.autoStart")&&sT&&!sT.isFullscreen()?sT.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,t;let i=this.option("parentEl")||document.body,s=t9(this.localize(this.option("tpl.main")||""));if(s){if(s.setAttribute("id",`fancybox-${this.id}`),s.setAttribute("aria-label",this.localize("{{MODAL}}")),s.classList.toggle(sv,this.isCompact),tU(s,this.option("mainClass")||""),tU(s,sb),this.container=s,this.footer=s.querySelector(".fancybox__footer"),i.appendChild(s),tU(document.documentElement,sc),sP&&sL||(tU(sP=document.createElement("span"),"fancybox-focus-guard"),sP.setAttribute(sS,"0"),sP.setAttribute(sf,"true"),sP.setAttribute("aria-label","Focus guard"),sL=sP.cloneNode(),null===(e=s.parentElement)||void 0===e||e.insertBefore(sP,s),null===(t=s.parentElement)||void 0===t||t.append(sL)),s.addEventListener("mousedown",e=>{sA=e.pageX,sk=e.pageY,tj(s,sm)}),this.option("closeExisting"))for(let n of sO.values())n.id!==this.id&&n.close();else this.option("animated")&&(tU(s,sg),setTimeout(()=>{this.isClosing()||tj(s,sg)},350));this.emit("initLayout")}}initCarousel(e){let t=this.container;if(!t)return;let i=t.querySelector(".fancybox__carousel");if(!i)return;let s=this.carousel=new iw(i,tV({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));s.on("*",(e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)}),s.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(e,t,i)=>{this.clearContent(i),i.state=void 0}),s.on("Panzoom.touchStart",()=>{var e,t;this.isCompact||this.endIdle(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=this.container)||void 0===t||t.focus())}),s.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",(e,t)=>{let i=this.getSlide();if(i&&tD(i.el))return;let s=this.container;if(s){let n=Math.abs(t.current.f),a=n<1?"":Math.max(.5,Math.min(1,1-n/t.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",a?"0s":""),s.style.setProperty("--fancybox-opacity",a+"")}}),s.on("Panzoom.touchEnd",(e,t,i)=>{var s;let n=this.getSlide();if(n&&tD(n.el)||t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;let a=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(a>=200||a>=50&&t.dragOffset.time<300)&&(i&&i.cancelable&&i.preventDefault(),this.close(i,"f-throwOut"+(t.current.f<0?"Up":"Down")))})),s.on("change",e=>{var t;let i=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(i){let s=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(s)}}),s.on(["refresh","change"],e=>{let t=this.container;if(!t)return;for(let i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(let s of t.querySelectorAll("[data-fancybox-count]"))s.innerHTML=e.pages.length;if(!e.isInfinite){for(let n of t.querySelectorAll("[data-fancybox-next]"))e.page0?(a.removeAttribute(s_),a.removeAttribute(sS)):(a.setAttribute(s_,""),a.setAttribute(sS,"-1"))}let l=this.getSlide();if(!l)return;let r=l.downloadSrc||"";for(let o of(r||"image"!==l.type||l.error||!sE(l.src)||(r=l.src),t.querySelectorAll("[data-fancybox-download]"))){let d=l.downloadFilename;r?(o.removeAttribute(s_),o.removeAttribute(sS),o.setAttribute(sx,r),o.setAttribute(sw,d||r),o.setAttribute("target","_blank")):(o.setAttribute(s_,""),o.setAttribute(sS,"-1"),o.removeAttribute(sx),o.removeAttribute(sw))}}),this.emit("initCarousel")}attachEvents(){let e=this.container;if(!e)return;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",this.onVisibilityChange,!1),document.addEventListener("mousemove",this.onMousemove),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),window.addEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.addEventListener("scroll",this.onResize),t.addEventListener("resize",this.onResize))}detachEvents(){let e=this.container;if(!e)return;document.removeEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.removeEventListener("resize",this.onResize),t.removeEventListener("scroll",this.onResize)),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),document.removeEventListener("focus",this.onFocus,!0)}scale(){let e=this.container;if(!e)return;let t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1),s="",n="",a="";if(t&&i>1){let l=`${t.offsetLeft}px`,r=`${t.offsetTop}px`;s=t.width*i+"px",n=t.height*i+"px",a=`translate3d(${l}, ${r}, 0) scale(${1/i})`}e.style.transform=a,e.style.width=s,e.style.height=n}onClick(e){var t;let{container:i,isCompact:s}=this;if(!i||this.isClosing())return;!s&&this.option("idle")&&this.resetIdle();let n=e.composedPath()[0];if(n.closest(".fancybox-spinner")||n.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(n.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(n.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail||Math.abs(e.pageX-sA)>30||Math.abs(e.pageY-sk)>30)return;let a=document.activeElement;if(sC()&&a&&i.contains(a))return;if(s&&"image"===(null===(t=this.getSlide())||void 0===t?void 0:t.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let l=!1;if(n.closest(".fancybox__content")){if(a){if(a.closest("[contenteditable]"))return;n.matches(iT)||a.blur()}if(sC())return;l=this.option("contentClick")}else n.closest(".fancybox__carousel")&&!n.matches(iT)&&(l=this.option("backdropClick"));"close"===l?(e.preventDefault(),this.close(e)):"next"===l?(e.preventDefault(),this.next()):"prev"===l&&(e.preventDefault(),this.prev())}onWheel(e){let t=e.target,i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");let s="slide"===i,n=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),a=Date.now();this.pwt&&a-this.pwt<300?s&&e.preventDefault():(this.pwt=a,this.emit("wheel",e,n),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(tR(t)||(e.preventDefault(),this[n>0?"prev":"next"]()))))}onScroll(){window.scrollTo(s8,sI)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();let t=e.key,i=this.option("keyboard");if(!i)return;let s=e.composedPath()[0],n=document.activeElement&&document.activeElement.classList,a=n&&n.contains("f-button")||s.dataset.carouselPage||s.dataset.carouselIndex;if("Escape"!==t&&!a&&t7(s)&&(s.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName))||("Tab"===e.key?tU(this.container,sm):tj(this.container,sm),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",t,e);let l=i[t];l&&"function"==typeof this[l]&&(e.preventDefault(),this[l]())}onResize(){let e=this.container;if(!e)return;let t=this.isCompact;e.classList.toggle(sv,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){let t=this.optionFor(e,"closeButton")||!1;if("auto"===t){let i=this.plugins.Toolbar;if(i&&i.state===ef.Ready)return}if(!t||!e.contentEl||e.closeBtnEl)return;let s=this.option("tpl.closeButton");if(s){let n=t9(this.localize(s));e.closeBtnEl=e.contentEl.appendChild(n),e.el&&tU(e.el,"has-close-btn")}}manageCaption(e){var t,i;let s="fancybox__caption",n=this.container;if(!n)return;tj(n,sy);let a=this.isCompact||this.option("commonCaption"),l=!a;if(this.caption&&this.stop(this.caption),l&&this.caption&&(this.caption.remove(),this.caption=null),a&&!this.caption)for(let r of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])r.captionEl&&(r.captionEl.remove(),r.captionEl=void 0,tj(r.el,sy),null===(i=r.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||a&&!this.isCurrentSlide(e))return;let o=e.el,d=this.optionFor(e,"caption","");if(!d)return void(a&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let c=null;if(l){if(c=e.captionEl||null,o&&!c){let h=s+`_${this.id}_${e.index}`;tU(c=document.createElement("div"),s),c.setAttribute("id",h),e.captionEl=o.appendChild(c),tU(o,sy),o.setAttribute("aria-labelledby",h)}}else(c=this.caption)||(c=n.querySelector("."+s)),c||((c=document.createElement("div")).dataset.fancyboxCaption="",tU(c,s),(this.footer||n).prepend(c)),tU(n,sy),this.caption=c;c&&(c.innerHTML="",sE(d)||"number"==typeof d?c.innerHTML=d+"":d instanceof HTMLElement&&c.appendChild(d))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;let i=document.activeElement||null,s=(null==e?void 0:e.target)||null,n=this.container,a=null===(t=this.carousel)||void 0===t?void 0:t.viewport;if(!n||!a||!e&&i&&n.contains(i))return;let l=this.getSlide(),r=l&&l.state===eu.Ready?l.el:null;if(!r||r.contains(i)||n===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;let o=Array.from(n.querySelectorAll(iT)),d=[],c=null;for(let h of o){let u=!h.offsetParent||!!h.closest('[aria-hidden="true"]'),p=r&&r.contains(h),f=!a.contains(h);if(h===n||(p||f)&&!u){d.push(h);let m=h.dataset.origTabindex;void 0!==m&&m&&(h.tabIndex=parseFloat(m)),h.removeAttribute("data-orig-tabindex"),!h.hasAttribute("autoFocus")&&c||(c=h)}else{let g=void 0===h.dataset.origTabindex?h.getAttribute("tabindex")||"":h.dataset.origTabindex;g&&(h.dataset.origTabindex=g),h.tabIndex=-1}}let v=null;e?(!s||0>d.indexOf(s))&&(v=c||n,d.length&&(i===sL?v=d[0]:this.lastFocus!==n&&i!==sP||(v=d[d.length-1]))):v=l&&"image"===l.type?n:c||n,v&&iP(v),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){let e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){let e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=sz.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);let s=n=>{n.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",s),delete e.dataset.animationName,i&&i(),tj(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",s),tU(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;let s=e.el;if(!s)return;let n=null;if(t7(t)?n=t:t7(n=t9(t+""))||((n=document.createElement("div")).innerHTML=t+""),["img","picture","iframe","video","audio"].includes(n.nodeName.toLowerCase())){let a=document.createElement("div");a.appendChild(n),n=a}t7(n)&&e.filter&&!e.error&&(n=n.querySelector(e.filter)),n&&t7(n)?(tU(n,"fancybox__content"),e.id&&n.setAttribute("id",e.id),s.classList.add(`has-${e.error?"error":e.type||"unknown"}`),s.prepend(n),"none"===n.style.display&&(n.style.display=""),"none"===getComputedStyle(n).getPropertyValue("display")&&(n.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=n,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){let i=e.el,s=e.contentEl;i&&s&&(this.emit("reveal",e),this.hideLoading(e),e.state=eu.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(s,t,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=eu.Ready,this.emit("done",e),tU(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var t;null===(t=e.panzoom)||void 0===t||t.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(tj(this.container,sb),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){let t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e&&e.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(e){e.state=eu.Loading;let t=e.el;t&&(tU(t,s$),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===eu.Loading){let i=t9(tZ);tU(i,"fancybox-spinner"),e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}},250))}hideLoading(e){let t=e.el;if(!t)return;let i=e.spinnerEl;this.isClosing()?null==i||i.remove():(tj(t,s$),i&&this.animate(i,"f-fadeOut",()=>{i.remove()}),e.state===eu.Loading&&(this.emit("loaded",e),e.state=eu.Ready))}setError(e,t){if(this.isClosing())return;let i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);let s=document.createElement("div");s.classList.add("fancybox-error"),s.innerHTML=this.localize(t||"

{{ERROR}}

"),this.setContent(e,s)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);let t=e.el;t&&(tj(t,"has-error"),tj(t,"has-unknown"),tj(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;let t=this.carousel;return(null===(e=null==t?void 0:t.pages[null==t?void 0:t.page])||void 0===e?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;let i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());let s=()=>{this.proceedClose(e,t)};this.startedFs&&sT&&sT.isFullscreen()?Promise.resolve(sT.exit()).then(()=>s()):s()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){let t=()=>{this.clearIdle(),this.idle=!0,tU(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing()){if(e)t();else{let i=this.option("idle");i&&(this.idleTimer=setTimeout(t,i))}}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,tj(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){sT&&(sT.isFullscreen()?sT.exit():sT.request().then(()=>{this.startedFs=!0}))}isClosing(){return[eh.Closing,eh.CustomClosing,eh.Destroy].includes(this.state)}proceedClose(e,t){var i,s;this.state=eh.Closing,this.clearIdle(),this.detachEvents();let n=this.container,a=this.carousel,l=this.getSlide(),r=l&&this.option("placeFocusBack")?l.triggerEl||this.option("triggerEl"):null;if(r&&(ix(r)?iP(r):r.focus()),n&&(tj(n,sb),tU(n,"is-closing"),n.setAttribute(sf,"true"),this.option("animated")&&tU(n,sg),n.style.pointerEvents="none"),a)for(let o of(a.clearTransitions(),null===(i=a.panzoom)||void 0===i||i.destroy(),null===(s=a.plugins.Navigation)||void 0===s||s.detach(),a.slides)){o.state=eu.Closing,this.hideLoading(o);let d=o.contentEl;d&&this.stop(d);let c=null==o?void 0:o.panzoom;c&&(c.stop(),c.detachEvents(),c.detachObserver()),this.isCurrentSlide(o)||a.emit("removeSlide",o)}s8=window.scrollX,sI=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==eh.CustomClosing?(void 0===t&&l&&(t=this.optionFor(l,"hideClass")),t&&l?(this.animate(l.contentEl,t,()=>{a&&a.emit("removeSlide",l)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===eh.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=eh.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();let t=this.container;t&&t.remove(),sO.delete(this.id);let i=sz.getInstance();i?i.focus():(sP&&(sP.remove(),sP=null),sL&&(sL.remove(),sL=null),tj(document.documentElement,sc),(()=>{if(!iE)return;let e=document,t=e.body;t.classList.remove(sh),t.style.setProperty(sp,""),e.documentElement.style.setProperty(su,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!iE)return;let s,n="",a={};if(void 0===e?s=document.body:sE(e)?(s=document.body,n=e,"object"==typeof t&&(a=t||{})):(s=e,sE(t)&&(n=t),"object"==typeof i&&(a=i||{})),!s||!t7(s))return;n=n||"[data-fancybox]";let l=sz.openers.get(s)||new Map;l.set(n,a),sz.openers.set(s,l),1===l.size&&s.addEventListener("click",sz.fromEvent)}static unbind(e,t){let i,s="";if(sE(e)?(i=document.body,s=e):(i=e,sE(t)&&(s=t)),!i)return;let n=sz.openers.get(i);n&&s&&n.delete(s),s&&n||(sz.openers.delete(i),i.removeEventListener("click",sz.fromEvent))}static destroy(){let e;for(;e=sz.getInstance();)e.destroy();for(let t of sz.openers.keys())t.removeEventListener("click",sz.fromEvent);sz.openers=new Map}static fromEvent(e){if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0],i=t.closest("[data-fancybox-trigger]");if(i){let s=i.dataset.fancyboxTrigger||"",n;t=document.querySelectorAll(`[data-fancybox="${s}"]`)[parseInt(i.dataset.fancyboxIndex||"",10)||0]||t}if(!(t&&t instanceof Element))return;let a,l,r,o;if([...sz.openers].reverse().find(([e,i])=>!(!e.contains(t)||![...i].reverse().find(([i,s])=>{let n=t.closest(i);return!!n&&(a=e,l=i,r=n,o=s,!0)}))),!a||!l||!r)return;o=o||{},e.preventDefault(),t=r;let d=[],c=tV({},iA,o);c.event=e,c.triggerEl=t,c.delegate=i;let h=c.groupAll,u=c.groupAttr,p=u&&t?t.getAttribute(`${u}`):"";if((!t||p||h)&&(d=[].slice.call(a.querySelectorAll(l))),t&&!h&&(d=p?d.filter(e=>e.getAttribute(`${u}`)===p):[t]),!d.length)return;let f=sz.getInstance();return f&&f.options.triggerEl&&d.indexOf(f.options.triggerEl)>-1?void 0:(t&&(c.startIndex=d.indexOf(t)),sz.fromNodes(d,c))}static fromSelector(e,t,i){let s=null,n="",a={};if(sE(e)?(s=document.body,n=e,"object"==typeof t&&(a=t||{})):e instanceof HTMLElement&&sE(t)&&(s=e,n=t,"object"==typeof i&&(a=i||{})),!s||!n)return!1;let l=sz.openers.get(s);return!!l&&!!(a=tV({},l.get(n)||{},a))&&sz.fromNodes(Array.from(s.querySelectorAll(n)),a)}static fromNodes(e,t){t=tV({},iA,t||{});let i=[];for(let s of e){let n=s.dataset||{},a=n.src||s.getAttribute(sx)||s.getAttribute("currentSrc")||s.getAttribute("src")||void 0,l,r=t.delegate,o;r&&i.length===t.startIndex&&(l=r instanceof HTMLImageElement?r:r.querySelector("img:not([aria-hidden])")),l||(l=s instanceof HTMLImageElement?s:s.querySelector("img:not([aria-hidden])")),!l||(o=l.currentSrc||l.src||void 0)||!l.dataset||(o=l.dataset.lazySrc||l.dataset.src||void 0);let d={src:a,triggerEl:s,thumbEl:l,thumbElSrc:o,thumbSrc:o};for(let c in n){let h=n[c]+"";h="false"!==h&&("true"===h||h),d[c]=h}i.push(d)}return new sz(i,t)}static getInstance(e){return e?sO.get(e):Array.from(sO.values()).reverse().find(e=>!e.isClosing()&&e)||null}static getSlide(){var e;return(null===(e=sz.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new sz(e,t)}static next(){let e=sz.getInstance();e&&e.next()}static prev(){let e=sz.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(let i of sO.values())i.close(...t);else{let s=sz.getInstance();s&&s.close(...t)}}}Object.defineProperty(sz,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(sz,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:iA}),Object.defineProperty(sz,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:sd}),Object.defineProperty(sz,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),$(document).ready(function(){function e(){let e=document.querySelector("[data-cart-wrapper]");if(e){let t=e.querySelector("[data-cart-quantity]"),i=e.querySelectorAll("[data-product-item]");if(t&&i){let s=0;i.length&&(s=Array.from(i).reduce((e,t)=>e+Number(t.querySelector("input").value),0)),t.textContent=s>0?s:""}let n=e.querySelector("[data-cart-link]");i&&i.length>0&&n.classList.add("_active")}}function i(){let e=document.querySelector("[data-cart-wrapper]");if(e){let t=e.querySelectorAll("[data-total-value] span"),i=e.querySelectorAll("[data-total-value-no-tax] span"),s=e.querySelectorAll("[data-product-item]"),a=0;s.length&&(a=Array.from(s).reduce((e,t)=>{let i=t.querySelector("input").value,s=Number(n(t.querySelector("[data-price]").textContent))*Number(i);return e+s},0)),t.forEach(e=>{s.length&&a?e.textContent=o(e.textContent,a.toFixed(2)):e.textContent=o(e.textContent,a)}),i.forEach(e=>{s.length&&a?e.textContent=o(e.textContent,(a/122*100).toFixed(2)):e.textContent=o(e.textContent,a/122*100)})}}function s(){let e=document.querySelector("[data-page-cart-list]");if(e){let t=document.querySelectorAll(".cart-payment [data-price]"),i=document.querySelectorAll(".cart-payment [data-price-no-tax]"),s=document.querySelectorAll(".cart-payment [data-sped-price]"),a=document.querySelectorAll(".cart-payment [data-total-price]"),l=e.querySelectorAll("[data-product-id]"),r=0;l.length&&(r=Array.from(l).reduce((e,t)=>{let i=t.querySelector(".quantity__input input").value,s=t.querySelector(".cart-item__price [data-price]"),a=t.querySelector(".cart-item__total mark"),l=Number(n(s.textContent))*Number(i);return a.textContent=o(a.textContent,l.toFixed(2)),e+l},0)),t.forEach(e=>{l.length&&r?e.textContent=o(e.textContent,r.toFixed(2)):e.textContent=o(e.textContent,r)});var d=0;$(".hideable_totals mark").hide("fast"),$.ajax({url:"/ajax/carrello_calcola_spese.php",method:"GET",success:function(e){d=parseFloat(e),console.log("SpedPrice aggiornato:",d),s.forEach(e=>{l.length&&d?e.textContent=o(e.textContent,d.toFixed(2)):e.textContent=o(e.textContent,d)}),i.forEach(e=>{l.length,e.textContent=o(e.textContent,((r+d)/122*100).toFixed(2))}),a.forEach(e=>{l.length,e.textContent=o(e.textContent,(r+d).toFixed(2))}),$(".hideable_totals mark").show("fast")},error:function(e,t,i){console.error("Errore nella richiesta AJAX:",t,i)}})}}function n(e){let t=e.match(/\d+[,.]?\d*/);return t?parseFloat(t[0].replace(",",".")):null}function o(e,t){let i=e.match(/\d+[,.]?\d*/);if(i){let s=t.toString().replace(".",",");return e.replace(i[0],s)}return e}function u(t){let s=document.querySelector("[data-cart-wrapper]");if(s){let n=s.querySelector("[data-cart-link]"),a=s.querySelector("[data-product-list]"),l=document.querySelector(`[data-product-id="${t}"]`),r=l.querySelector(".quantity__input input");var o=`${t}`,d=r?Number(r.value):1,c=document.querySelector(".citta"),h=c?c.value:"",u=document.querySelector(".provincia");cart_add(o,d,h,u?u.value:""),console.log("updateHeaderCart, product ==>",l);let p=a.querySelector(`[data-product-item="${t}"]`);if(p){let f=p.querySelector("input"),g=s.querySelector("[data-cart-quantity]"),v=Number(f.value)+(r?Number(r.value):1);f.value=v,g.textContent=Number(g.textContent)+(r?Number(r.value):1),console.log(`Product ID ==> ${t}, New Quantity of product ==> ${v}`),$(document).ready(function(){console.log("jQuery is working inside app.js and function! Make some AJAX query.")})}else{if(!s.querySelector("[data-product-item]")){s.querySelector(".attention").remove();s.querySelector("[data-h-cart-link]").classList.remove("d-none")}let b=l.querySelector(".product-card__image-ibg")?l.querySelector(".product-card__image-ibg"):l.querySelector("[data-product-image] img"),y=l.querySelector(".product-card__title")?l.querySelector(".product-card__title"):l.querySelector("[data-product-title]"),_=l.querySelector(".product-card__price")?l.querySelector(".product-card__price"):l.querySelector("[data-product-price]");if(b&&y&&_){let S=`
  • `;a.insertAdjacentHTML("beforeend",S),e();m(a.querySelector('[data-product-item="${productId}"] input'))}else console.log("Not enough data to add item to cart")}n.classList.contains("_blink")||(n.classList.add("_blink"),setTimeout(()=>{n.classList.remove("_blink")},2e3)),i()}}function p(){let e=document.querySelector("[data-cart-wrapper]");if(e){let t=e.querySelector("[data-empty-cart]");if(t&&!e.querySelectorAll("[data-product-item]").length){let i=e.querySelector("[data-h-cart-link]"),s=document.querySelector("[data-cart]"),n=document.createElement("div");n.textContent=t.dataset.emptyCart,n.classList.add("sub-title"),n.classList.add("attention"),s.firstElementChild.prepend(n),i.classList.add("d-none")}}}function f(){let e=document.querySelector("[data-page-cart-list]");if(e){let t=e.dataset.emptyCart;if(t){let i=e.querySelectorAll("[data-product-id]"),s=document.querySelector("[data-cart-wrapper] [data-cart-link]");if(!i.length){let n=document.createElement("div");n.textContent=t,n.classList.add("title"),n.classList.add("attention"),e.prepend(n),s&&s.classList.remove("_active"),location.reload()}}}}function m(t){if(t)t.addEventListener("quantityInputChange",a),t.addEventListener("change",a);else{let n=document.querySelectorAll(".quantity__input input");n.length&&n.forEach(e=>{e.addEventListener("quantityInputChange",a),e.addEventListener("change",a)})}function a(t){let n=t.target;n.value=n.value&&""!==n.value&&Number(n.value)>0?n.value:1,console.log("Input changed",n,"Product ==>",n.closest("[data-product-item]")||n.closest("[data-product-id]")),i(),e(),function e(t){if(document.querySelector("[data-cart-wrapper]")){let i=document.querySelector("[data-page-cart-list]");if(t&&t.closest("[data-cart-wrapper]")){let n=t.closest("[data-product-item]"),a=n.dataset.productItem,l=t.value;if(console.log("New product quanity ==>",l,"of product ==>",n),cart_mod(`${a}`,l),i){let r=i.querySelector(`[data-product-id="${a}"]`);r&&(r.querySelector(".quantity__input input").value=l,s())}}}}(n),function t(n){if(document.querySelector("[data-page-cart-list]")){let a=document.querySelector("[data-cart-wrapper] [data-product-list]");if(n&&n.closest("[data-page-cart-list]")){let l=n.closest("[data-product-id]"),r=l.dataset.productId,o=n.value;console.log("New product quanity ==>",o,"of product ==>",l),cart_mod(`${r}`,o);a.querySelector(`[data-product-item="${r}"]`).querySelector(".quantity__input input").value=o,s(),i(),e()}}}(n)}}window.addEventListener("click",t=>{var n;let a,l;(function e(t){let i=document.querySelector("[data-cart]"),s=document.querySelector("[data-cart-link]");if(t.target.closest("[data-cart-wrapper]")&&!t.target.closest("[data-cart]")||t.target.closest("[data-h-cart-close]")&&!t.target.closest(".icon-menu")){if(i&&!s.classList.contains("_delay")){function n(){i.classList.toggle("_open"),s.classList.contains("_active")?s.querySelector("span")&&""===s.querySelector("span").innerText.replace(/\D/g,"")&&s.classList.remove("_active"):s.classList.add("_active")}window.innerWidth<=800?(s.classList.add("_delay"),document.querySelector(".icon-menu")&&document.documentElement.classList.contains("menu-open")?(document.documentElement.classList.remove("menu-open"),setTimeout(()=>{h(),n()},500)):(d(350),n()),setTimeout(()=>{s.classList.remove("_delay")},350)):n()}}else t.target.closest("[data-cart-wrapper]")||t.target.closest(".icon-menu")||!i||(i.classList.remove("_open"),s.querySelector("span")&&""===s.querySelector("span").innerText.replace(/\D/g,"")&&(s.classList.remove("_active"),s.classList.remove("_delay")),!(window.innerWidth<=800)||t.target.closest(".icon-menu")||document.documentElement.closest(".menu-open")||c(350))})(t),function t(n){if(n.target.closest("[data-remove]")){let a=document.querySelector("[data-cart-wrapper]"),l=n.target.closest("[data-product-item]");if(l&&a){let r=l.dataset.productItem;l.classList.add("_removing"),setTimeout(()=>{console.log("Deleted product from cart",l),cart_del(`${r}`),l.remove(),function e(t){let i=document.querySelector("[data-page-cart-list]");if(i){let n=i.querySelector(`[data-product-id="${t}"]`);n&&(n.remove(),f(),console.log("Recalculation of total amount of goods"),s())}}(r),e(),p(),console.log("Recalculation of total amount of goods"),i()},350)}}}(t),function e(t,i){if(!t.target.closest(".about-product")&&t.target.closest("[data-add-to-cart]")||i){t.preventDefault();let s=t.target.closest("[data-product-id]")?t.target.closest("[data-product-id]").dataset.productId:null,n=t.target.closest("[data-add-to-cart]"),a=document.querySelector("[data-cart-wrapper]");if(!n.classList.contains("_hold")&&a){n.classList.add("_hold"),n.classList.add("_fly");let l=a.querySelector("[data-cart-link]"),r=document.querySelector(`[data-product-id="${i||s}"]`).querySelector(".product-card__image-ibg"),o=r.cloneNode(!0),d=r.offsetWidth,c=r.offsetHeight,h=r.getBoundingClientRect().top,p=r.getBoundingClientRect().left;o.setAttribute("class","fly-image-ibg"),o.style.cssText=` left: ${p}px; top: ${h}px; width: ${d}px; height: ${c}px; `,document.body.append(o);let f=l.getBoundingClientRect().left+l.offsetWidth/2,m=l.getBoundingClientRect().top;o.style.cssText=` left: ${f}px; top: ${m}px; width: 0px; height: 0px; opacity:0; `,o.addEventListener("transitionend",function(){n.classList.contains("_fly")&&(o.remove(),u(i||s),n.classList.remove("_fly"),n.classList.remove("_hold"))})}}}(t),n=t,a=document.querySelector("[data-header-search]"),l=document.querySelector("[data-search]"),a&&l&&(n.target.closest("[data-header-search]")&&!n.target.closest("[data-search]")?(a.classList.toggle("_active"),l.classList.toggle("_open")):n.target.closest("[data-header-search]")||n.target.closest(".header-search__body")||(a.classList.remove("_active"),l.classList.remove("_open"))),function e(t,i){if(t.target.closest("[data-add-to-cart]")||i){t.preventDefault();let s=document.querySelector(".about-product [data-product-id]")?document.querySelector(".about-product [data-product-id]").dataset.productId:null,n=t.target.closest("[data-add-to-cart]"),a=document.querySelector("[data-cart-wrapper]");if(!n.classList.contains("_hold")&&a){n.classList.add("_hold"),n.classList.add("_fly");let l=a.querySelector("[data-cart-link]"),r=document.querySelector(`[data-product-id="${i||s}"]`).querySelector(".about-product-images__img-ibg"),o=r.cloneNode(!0),d=r.offsetWidth,c=r.offsetHeight,h=r.getBoundingClientRect().top,p=r.getBoundingClientRect().left;o.setAttribute("class","fly-image-ibg"),o.style.cssText=` left: ${p}px; top: ${h}px; width: ${d}px; height: ${c}px; `,document.body.append(o);let f=l.getBoundingClientRect().left+l.offsetWidth/2,m=l.getBoundingClientRect().top;o.style.cssText=` left: ${f}px; top: ${m}px; width: 0px; height: 0px; opacity:0; `,o.addEventListener("transitionend",function(){n.classList.contains("_fly")&&(o.remove(),u(i||s),n.classList.remove("_fly"),n.classList.remove("_hold"))})}}}(t),function e(t){let i=t.target;if(i.hasAttribute("data-spoller-checkbox")){let s=i.parentElement.nextElementSibling,n=s.querySelectorAll("input,select");r(s,500),i.disabled=!0,setTimeout(()=>{s.classList.contains("_open")?n.forEach(e=>e.setAttribute("disabled","")):n.forEach(e=>e.removeAttribute("disabled")),s.classList.toggle("_open"),i.disabled=!1},500)}}(t),function t(n){if(n.target.closest(".cart-item__btn-remove")){let a=n.target.closest("[data-product-id]");a&&document.querySelector("[data-page-cart-list]")&&(a.classList.add("_removing"),setTimeout(()=>{cart_del(a.dataset.productId),console.log("Deleted product from cart",a),a.remove(),function t(s){let n=document.querySelector("[data-cart-wrapper]");if(n){let a=n.querySelector("[data-product-list]").querySelector(`[data-product-item="${s}"]`);a&&(a.remove(),p(),console.log("Recalculation of total amount of goods"),i(),e())}}(a.dataset.productId),f(),s()},350))}}(t)}),m(),i(),s(),e(),document.addEventListener("selectCallback",function(e){let t=e.detail.select;console.log("Select ==>",t,"Value ==>",t.value)}),sz.bind("[data-fancybox]",{contentClick:"iterateZoom",Images:{Panzoom:{maxScale:2}}});let g=document.querySelector('[data-form="modifi-profile"]');g&&y(g,function e(t,i){let s=i.querySelectorAll("select"),n=i.querySelector("input[data-input-agree]");s.forEach(e=>{""===e.value&&(t[e.name]=e.dataset.errorMs)}),n.checked||(t[n.name]=n.dataset.errorMs)});let b=document.querySelector('[data-form="payment"]');function y(e,t){e.addEventListener("submit",i=>{i.preventDefault();let s={};t(s,e);let n=document.querySelector(".custom-alert__text");for(let a in n.textContent="",s){n.textContent=s[a],v.popup.open("#custom-alert");break}0===Object.keys(s).length&&e.submit()})}let _;b&&y(b,function e(t,i){var s;let n,a=(s=i,n=new Map,s.querySelectorAll('input[type="radio"]').forEach(e=>{let t=e.getAttribute("name");n.has(t)||n.set(t,[]),n.get(t).push(e)}),n);0!==a.size&&a.forEach((e,i,s)=>{e.some(e=>!0===e.checked)||(t[i]=e[0].closest("[data-radio-group-error-ms]").dataset.radioGroupErrorMs)})}),(_=document.querySelector(".btn-go-up"))&&setTimeout(()=>{window.addEventListener("scroll",function(e){window.scrollY>=50?_.classList.contains("_show")||_.classList.add("_show"):_.classList.contains("_show")&&_.classList.remove("_show")}),_.addEventListener("click",e=>{window.scrollTo({top:0,left:0,behavior:"smooth"})})},0),function e(){let i=document.querySelector("[data-submenu-spollers]");if(i){let s=i.getAttribute("data-submenu-spollers").split(","),n=s[0]?s[0]:991.98,r=s[1]?s[1]:400,o=i.hasAttribute("data-is-popperjs"),d=i.querySelectorAll("[data-submenu-spoller]"),c=i.querySelectorAll("[data-submenu]"),h=window.matchMedia(`(max-width: ${n}px)`),u=new Event("resize"),p=document.querySelectorAll("[data-toggle]");function f(e){if(e.matches)document.querySelectorAll("[data-submenu-link]").forEach(e=>{e.classList.remove("_active")}),c.forEach(e=>e.setAttribute("hidden",""));else if(c.forEach(e=>e.removeAttribute("hidden")),o){let t=new Event("initPopperPosition");window.dispatchEvent(t)}m(d)}function m(e){e.forEach(e=>e.classList.remove("_open"))}h.addEventListener("change",()=>f(h)),f(h),d.length&&d.forEach(e=>{let i=e.querySelector("[data-submenu]");window.dispatchEvent(u),e.addEventListener("mouseenter",()=>{!t.any()&&i&&window.innerWidth>n&&e.classList.add("_open"),o&&window.dispatchEvent(u)}),e.addEventListener("mouseleave",()=>{!t.any()&&i&&window.innerWidth>n&&e.classList.remove("_open")})}),document.addEventListener("click",e=>{let t=e.target;if(t.closest("[data-submenu-link]")){e.preventDefault();let i=t.closest("[data-submenu-link]"),s=i.nextElementSibling,o=s.closest("[data-submenu-spoller]"),c=o.classList.contains("_open");window.innerWidth>n&&m(d),c&&!o.classList.contains("_slide")?(i.classList.remove("_active"),window.innerWidth{o.classList.remove("_slide")},r)):o.classList.remove("_open")):o.classList.contains("_slide")||(window.dispatchEvent(u),o.classList.add("_slide"),o.classList.add("_open"),i.classList.add("_active"),window.innerWidth{o.classList.remove("_slide")},r)):o.classList.remove("_slide"))}else!t.closest("[data-submenu-spoller]")&&window.innerWidth>n&&m(d);t.closest("[data-toggle]")?t.classList.toggle("_open"):t.closest("[data-toggle]")||t.closest(".sub-menu")||p.forEach(e=>e.classList.remove("_open"))})}}(),$(document).ready(function(){console.log("jQuery is working!")})}),e(),i(),f(),u(),p(),_()})();