!function(e){function t(t){for(var n,r,o=t[0],s=t[1],a=0,c=[];a-1}).map(function(e,t){e.dataset.reveal="yes:".concat(t+1)})}),o=function(e){var t=e.querySelectorAll('[data-reveal*="no"]');0!==t.length&&t[0].dataset.reveal&&i(t).map(function(e){return r.observe(e)})}},function(e,t,n){var i,r,o; /*! * $script.js JS loader & dependency manager * https://github.com/ded/script.js * (c) Dustin Diaz 2014 | License MIT */ /*! * $script.js JS loader & dependency manager * https://github.com/ded/script.js * (c) Dustin Diaz 2014 | License MIT */ o=function(){var e,t,n=document,i=n.getElementsByTagName("head")[0],r=!1,o="push",s="readyState",a="onreadystatechange",l={},c={},d={},h={};function u(e,t){for(var n=0,i=e.length;n-1},startsWith:function(e,t){return e.substr(0,t.length)===t},truncate:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}};function i(e,t){return e.hasOwnProperty(t)&&(!0===e[t]||e[t].length)}function r(e,t,i){e.parentNode?e.parentNode.parentNode||t.appendChild(e.parentNode):t.appendChild(e),n.removeClass(e,"excluded"),i||(e.innerHTML=e.textContent)}var o=function(){if(this.items.length){var e=document.createDocumentFragment();if(this.config.pagination){var t=this.pages.slice(0,this.pageIndex);n.each(t,function(t,i){n.each(i,function(t,n){r(n,e,this.customOption)},this)},this)}else n.each(this.items,function(t,n){r(n,e,this.customOption)},this);e.childElementCount&&(n.removeClass(this.items[this.navIndex],"active"),this.navIndex=(e.querySelector(".selectr-option.selected")||e.querySelector(".selectr-option")).idx,n.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(e)}},s=function(e,t){t=t||e;var i={class:"selectr-option",role:"treeitem","aria-selected":!1};this.customOption?i.html=this.config.renderOption(t):i.textContent=e.textContent;var r=n.createElement("div",i);return r.idx=e.idx,this.items.push(r),e.defaultSelected&&this.defaultSelected.push(e.idx),e.disabled&&(r.disabled=!0,n.addClass(r,"disabled")),r},a=function(){var e=this.tree,t=e.scrollTop,i=e.scrollHeight,o=e.offsetHeight,s=t>=i-o;if(s&&this.pageIndex0,i(this.config,"width")&&(n.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":n.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=n.createElement("div",{class:"selectr-container"}),this.config.customClass&&n.addClass(this.container,this.config.customClass),this.mobileDevice?n.addClass(this.container,"selectr-mobile"):n.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?n.addClass(this.el,"selectr-visible"):n.addClass(this.el,"selectr-hidden"),this.selected=n.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=n.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var e=n.createElement("div",{class:"selectr-options-container"});if(this.tree=n.createElement("div",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=n.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(n.addClass(this.label,"selectr-tags"),n.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.config.defaultSelected?this.getSelectedProperties("value"):[],this.selectedIndexes=this.getSelectedProperties("idx")):(this.selectedValue=null,this.selectedIndex=-1),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=n.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),n.addClass(this.container,"clearable")),this.config.taggable){var t=n.createElement("div",{class:"input-tag"});if(this.input=n.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox"}),t.appendChild(this.input),this.label.appendChild(t),n.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var r=[],o=0;o"+t.label+""}),n.each(t.children,function(e,t){t.idx=c,l.appendChild(s.call(this,t,l)),c++},this)):(t.idx=c,s.call(this,t),c++)},this),this.config.data&&Array.isArray(this.config.data)){this.data=[];var d,h=!1;l=!1,c=0,n.each(this.config.data,function(e,t){i(t,"children")?(h=n.createElement("optgroup",{label:t.text}),l=n.createElement("div",{class:"selectr-optgroup",role:"group",html:"
"+t.text+"
"}),n.each(t.children,function(e,t){(d=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(d),h.appendChild(d),d.idx=c,l.appendChild(s.call(this,d,t)),this.data[c]=t,c++},this),this.el.appendChild(h)):((d=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(d),d.idx=c,s.call(this,d,t),this.data[c]=t,c++)},this)}this.setSelected(!0,!0),this.navIndex=0;for(var u=0;u0)&&this.change(this.navIndex);var t,i=this.items[this.navIndex],r=this.navIndex;switch(e.which){case 38:t=0,this.navIndex>0&&this.navIndex--;break;case 40:t=1,this.navIndex0&&this.navIndexthis.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndexthis.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(o.top+o.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&a.call(this)):0===this.navIndex?this.tree.scrollTop=0:o.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(o.top-this.optsRect.top)),i&&n.removeClass(i,"active"),n.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",function(t){t.changedTouches[0].target===e.el&&e.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(t){t.target===e.el&&e.toggle()}),this.el.addEventListener("change",function(t){if(e.el.multiple){var i=e.getSelectedProperties("idx"),r=function(e,t){for(var n,i=[],r=e.slice(0),o=0;o-1?r.splice(n,1):i.push(t[o]);return[i,r]}(e.selectedIndexes,i);n.each(r[0],function(t,n){e.select(n)},e),n.each(r[1],function(t,n){e.deselect(n)},e)}else e.el.selectedIndex>-1&&e.select(e.el.selectedIndex)})),this.container.addEventListener("keydown",function(t){"Escape"===t.key&&e.close(),"Enter"===t.key&&e.selected===document.activeElement&&e.el.form&&void 0!==e.el.form.submit&&e.el.form.submit()," "!==t.key&&"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.selected!==document.activeElement||(" "===t.key&&t.preventDefault(),setTimeout(function(){e[" "===t.key?"toggle":"open"]()},200),e.config.nativeDropdown&&setTimeout(function(){e.el.focus()},200))}),this.selected.addEventListener("click",function(t){e.disabled||e.toggle(),t.preventDefault()}),this.config.nativeKeyboard){var t="";this.selected.addEventListener("keydown",function(n){if(!(e.disabled||e.selected!==document.activeElement||n.altKey||n.ctrlKey||n.metaKey)){if(" "===n.key||!e.opened&&["Enter","ArrowUp","ArrowDown"].indexOf(n.key)>-1)return e.toggle(),n.preventDefault(),void n.stopPropagation();if(n.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](n.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===n.key){if(e.config.multiple)e.open(),e.config.searchable&&(e.input.value=n.key,e.input.focus(),e.search(null,!0));else{t+=n.key;var i=e.search(t,!0);i&&i.length&&(e.clear(),e.setValue(i[0].value)),setTimeout(function(){t=""},1e3)}return n.preventDefault(),void n.stopPropagation()}}}),this.container.addEventListener("keyup",function(t){e.opened&&"Escape"===t.key&&(e.close(),t.stopPropagation(),e.selected.focus())})}this.label.addEventListener("click",function(t){n.hasClass(t.target,"selectr-tag-remove")&&e.deselect(t.target.parentNode.idx)}),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",function(e){e.preventDefault()}),this.tree.addEventListener("click",function(t){var i=n.closest(t.target,function(e){return e&&n.hasClass(e,"selectr-option")});i&&(n.hasClass(i,"disabled")||(n.hasClass(i,"selected")?(e.el.multiple||!e.el.multiple&&e.config.allowDeselect)&&e.deselect(i.idx):e.select(i.idx),e.opened&&!e.el.multiple&&e.close())),t.preventDefault(),t.stopPropagation()}),this.tree.addEventListener("mouseover",function(t){n.hasClass(t.target,"selectr-option")&&(n.hasClass(t.target,"disabled")||(n.removeClass(e.items[e.navIndex],"active"),n.addClass(t.target,"active"),e.navIndex=[].slice.call(e.items).indexOf(t.target)))}),this.config.searchable&&(this.input.addEventListener("focus",function(t){e.searching=!0}),this.input.addEventListener("blur",function(t){e.searching=!1}),this.input.addEventListener("keyup",function(t){e.search(),e.config.taggable||(this.value.length?n.addClass(this.parentNode,"active"):n.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(t){e.input.value=null,l.call(e),e.tree.childElementCount||o.call(e)})),this.config.taggable&&this.input.addEventListener("keyup",function(t){if(e.search(),e.config.taggable&&this.value.length){var i=this.value.trim();if(i.length&&(13===t.which||e.tagSeperatorsRegex.test(i))){var r,o=i.replace(e.tagSeperatorsRegex,"");(o=(o=n.escapeRegExp(o)).trim()).length&&(r=e.add({value:o,textContent:o,selected:!0},!0)),r?(e.close(),l.call(e)):(this.value="",e.setMessage(e.config.messages.tagDuplicate))}}}),this.update=n.debounce(function(){e.opened&&e.config.closeOnScroll&&e.close(),e.width&&(e.container.style.width=e.width),e.invert()},50),this.requiresPagination&&(this.paginateItems=n.debounce(function(){a.call(this)},50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.on("selectr.destroy",function(){document.removeEventListener("click",this.events.dismiss),window.removeEventListener("keydown",this.events.navigate),window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update)}),this.el.form&&(this.el.form.addEventListener("reset",this.events.reset),this.on("selectr.destroy",function(){this.el.form.removeEventListener("reset",this.events.reset)}))},c.prototype.setSelected=function(e,t){if(this.config.data||this.el.multiple||!this.el.options.length||(0===this.el.selectedIndex&&(this.el.options[0].defaultSelected||this.config.defaultSelected||(this.el.selectedIndex=-1)),this.selectedIndex=this.el.selectedIndex,this.selectedIndex>-1&&this.select(this.selectedIndex,t)),this.config.multiple&&"select-one"===this.originalType&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),n.each(this.options,function(e,n){n.selected&&n.defaultSelected&&this.select(n.idx,t)},this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data){!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&this.config.data.length>0&&this.select(0,t);var r=0;n.each(this.config.data,function(e,o){i(o,"children")?n.each(o.children,function(e,n){n.hasOwnProperty("selected")&&!0===n.selected&&this.select(r,t),r++},this):(o.hasOwnProperty("selected")&&!0===o.selected&&this.select(r,t),r++)},this)}},c.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),"select-one"===this.originalType&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),n.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},c.prototype.change=function(e){var t=this.items[e],i=this.options[e];i.disabled||(i.selected&&n.hasClass(t,"selected")?this.deselect(e):this.select(e),this.opened&&!this.el.multiple&&this.close())},c.prototype.select=function(e,t){var i=this.items[e],r=[].slice.call(this.el.options),o=this.options[e];if(this.el.multiple){if(n.includes(this.selectedIndexes,e))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage(this.config.messages.maxSelections.replace("{max}",this.config.maxSelections),!0),!1;this.selectedValues.push(o.value),this.selectedIndexes.push(e),function(e){var t,i=this,r=document.createDocumentFragment(),o=this.options[e.idx],s=this.data?this.data[e.idx]:o,a={class:"selectr-tag"};this.customSelected?a.html=this.config.renderSelection(s):a.textContent=o.textContent;var l=n.createElement("div",a),c=n.createElement("button",{class:"selectr-tag-remove",type:"button"});if(l.appendChild(c),l.idx=e.idx,l.tag=o.value,this.tags.push(l),this.config.sortSelected){var d=this.tags.slice();t=function(e,t){e.replace(/(\d+)|(\D+)/g,function(e,n,i){t.push([n||1/0,i||""])})},d.sort(function(e,n){var r,o,s=[],a=[];for(!0===i.config.sortSelected?(r=e.tag,o=n.tag):"text"===i.config.sortSelected&&(r=e.textContent,o=n.textContent),t(r,s),t(o,a);s.length&&a.length;){var l=s.shift(),c=a.shift(),d=l[0]-c[0]||l[1].localeCompare(c[1]);if(d)return d}return s.length-a.length}),n.each(d,function(e,t){r.appendChild(t)}),this.label.innerHTML=""}else r.appendChild(l);this.config.taggable?this.label.insertBefore(r,this.input.parentNode):this.label.appendChild(r)}.call(this,i)}else{var s=this.data?this.data[e]:o;this.label.innerHTML=this.customSelected?this.config.renderSelection(s):o.textContent,this.selectedValue=o.value,this.selectedIndex=e,n.each(this.options,function(t,i){var r=this.items[t];t!==e&&(r&&n.removeClass(r,"selected"),i.selected=!1,i.removeAttribute("selected"))},this)}if(n.includes(r,o)||this.el.add(o),i.setAttribute("aria-selected",!0),n.addClass(i,"selected"),n.addClass(this.container,"has-selected"),o.selected=!0,o.setAttribute("selected",""),this.emit("selectr.change",o),this.emit("selectr.select",o),!t)if("createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!0,!0),this.el.dispatchEvent(a)}else this.el.fireEvent("onchange")},c.prototype.deselect=function(e,t){var i=this.items[e],r=this.options[e];if(this.el.multiple){var o=this.selectedIndexes.indexOf(e);this.selectedIndexes.splice(o,1);var s=this.selectedValues.indexOf(r.value);this.selectedValues.splice(s,1),function(e){var t=!1;n.each(this.tags,function(n,i){i.idx===e.idx&&(t=i)},this),t&&(this.label.removeChild(t),this.tags.splice(this.tags.indexOf(t),1))}.call(this,i),this.tags.length||n.removeClass(this.container,"has-selected")}else{if(!t&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,n.removeClass(this.container,"has-selected")}if(this.items[e].setAttribute("aria-selected",!1),n.removeClass(this.items[e],"selected"),r.selected=!1,r.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",r),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!0,!0),this.el.dispatchEvent(a)}else this.el.fireEvent("onchange")},c.prototype.setValue=function(e){var t=Array.isArray(e);if(t||(e=e.toString().trim()),!this.el.multiple&&t)return!1;n.each(this.options,function(n,i){(t&&e.indexOf(i.value)>-1||i.value===e)&&this.change(i.idx)},this)},c.prototype.getValue=function(e,t){var i;if(this.el.multiple)e?this.selectedIndexes.length&&((i={}).values=[],n.each(this.selectedIndexes,function(e,t){var n=this.options[t];i.values[e]={value:n.value,text:n.textContent}},this)):i=this.selectedValues.slice();else if(e){var r=this.options[this.selectedIndex];i={value:r.value,text:r.textContent}}else i=this.selectedValue;return e&&t&&(i=JSON.stringify(i)),i},c.prototype.add=function(e,t){if(e){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(e))n.each(e,function(e,n){this.add(n,t)},this);else if("[object Object]"===Object.prototype.toString.call(e)){if(t){var i=!1;if(n.each(this.options,function(t,n){n.value.toLowerCase()===e.value.toLowerCase()&&(i=!0)}),i)return!1}var r=n.createElement("option",e);return this.data.push(e),this.options.push(r),r.idx=this.options.length>0?this.options.length-1:0,s.call(this,r),e.selected&&this.select(r.idx),this.setPlaceholder(),r}return this.config.pagination&&this.paginate(),!0}},c.prototype.remove=function(e){var t,i=[];Array.isArray(e)?n.each(e,function(e,t){n.isInt(t)?i.push(this.getOptionByIndex(t)):"string"==typeof t&&i.push(this.getOptionByValue(t))},this):n.isInt(e)?i.push(this.getOptionByIndex(e)):"string"==typeof e&&i.push(this.getOptionByValue(e)),i.length&&(n.each(i,function(e,i){t=i.idx,this.el.remove(i),this.options.splice(t,1);var r=this.items[t].parentNode;r&&r.removeChild(this.items[t]),this.items.splice(t,1),n.each(this.options,function(e,t){t.idx=e,this.items[e].idx=e},this)},this),this.setPlaceholder(),this.config.pagination&&this.paginate())},c.prototype.removeAll=function(){this.clear(!0),n.each(this.el.options,function(e,t){this.el.remove(t)},this),n.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},c.prototype.search=function(e,t){if(!this.navigating){var i=!1;e||(e=this.input.value,i=!0,this.removeMessage(),n.truncate(this.tree));var s=[],a=document.createDocumentFragment();if((e=e.trim().toLowerCase()).length>0){var l=t?n.startsWith:n.includes;if(n.each(this.options,function(t,o){var c=this.items[o.idx];l(o.textContent.trim().toLowerCase(),e)&&!o.disabled?(s.push({text:o.textContent,value:o.value}),i&&(r(c,a,this.customOption),n.removeClass(c,"excluded"),this.customOption||(c.innerHTML=function(e,t){var n=new RegExp(e,"i").exec(t.textContent);return!!n&&t.textContent.replace(n[0],""+n[0]+"")}(e,o)))):i&&n.addClass(c,"excluded")},this),i){if(a.childElementCount){var c=this.items[this.navIndex],d=a.querySelector(".selectr-option:not(.excluded)");this.noResults=!1,n.removeClass(c,"active"),this.navIndex=d.idx,n.addClass(d,"active")}else this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults));this.tree.appendChild(a)}}else o.call(this);return s}},c.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},c.prototype.open=function(){var e=this;return!!this.options.length&&(this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(n.addClass(this.container,"native-open"),void(this.config.data&&n.each(this.options,function(e,t){this.el.add(t)},this))):(n.addClass(this.container,"open"),o.call(this),this.invert(),this.tree.scrollTop=0,n.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),void(this.config.searchable&&!this.config.taggable&&setTimeout(function(){e.input.focus(),e.input.tabIndex=0},10))))},c.prototype.close=function(){if(this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown)n.removeClass(this.container,"native-open");else{var e=n.hasClass(this.container,"notice");this.config.searchable&&!e&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),e&&(n.removeClass(this.container,"notice"),this.notice.textContent=""),n.removeClass(this.container,"open"),n.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),n.truncate(this.tree),l.call(this),this.selected.focus()}},c.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&n.each(this.tags,function(e,t){t.lastElementChild.tabIndex=0}),n.removeClass(this.container,"selectr-disabled")},c.prototype.disable=function(e){e||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&n.each(this.tags,function(e,t){t.lastElementChild.tabIndex=-1}),this.disabled=!0,n.addClass(this.container,"selectr-disabled")},c.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),n.each(this.defaultSelected,function(e,t){this.select(t)},this),this.emit("selectr.reset"))},c.prototype.clear=function(e){if(this.el.multiple){if(this.selectedIndexes.length){var t=this.selectedIndexes.slice();n.each(t,function(e,t){this.deselect(t)},this)}}else this.selectedIndex>-1&&this.deselect(this.selectedIndex,e);this.emit("selectr.clear")},c.prototype.serialise=function(e){var t=[];return n.each(this.options,function(e,n){var i={value:n.value,text:n.textContent};n.selected&&(i.selected=!0),n.disabled&&(i.disabled=!0),t[e]=i}),e?JSON.stringify(t):t},c.prototype.serialize=function(e){return this.serialise(e)},c.prototype.setPlaceholder=function(e){e=e||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(e=this.config.messages.noOptions),this.placeEl.innerHTML=e},c.prototype.paginate=function(){if(this.items.length){var e=this;return this.pages=this.items.map(function(t,n){return n%e.config.pagination==0?e.items.slice(n,n+e.config.pagination):null}).filter(function(e){return e}),this.pages}},c.prototype.setMessage=function(e,t){t&&this.close(),n.addClass(this.container,"notice"),this.notice.textContent=e},c.prototype.removeMessage=function(){n.removeClass(this.container,"notice"),this.notice.innerHTML=""},c.prototype.invert=function(){var e=n.rect(this.selected),t=this.tree.parentNode.offsetHeight,i=window.innerHeight;e.top+e.height+t>i?(n.addClass(this.container,"inverted"),this.isInverted=!0):(n.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=n.rect(this.tree)},c.prototype.getOptionByIndex=function(e){return this.options[e]},c.prototype.getOptionByValue=function(e){for(var t=!1,n=0,i=this.options.length;n0}});else{var n=[];r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},r.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(o(e,"resize",this._checkForIntersections,!0),o(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,s(e,"resize",this._checkForIntersections,!0),s(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),n=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(r){var o=r.element,s=a(o),l=this._rootContainsTarget(o),c=r.entry,d=t&&l&&this._computeTargetAndRootIntersection(o,n),h=r.entry=new i({time:e.performance&&performance.now&&performance.now(),target:o,boundingClientRect:s,rootBounds:n,intersectionRect:d});c?t&&l?this._hasCrossedThreshold(c,h)&&this._queuedEntries.push(h):c&&c.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,i){if("none"!=e.getComputedStyle(n).display){for(var r,o,s,l,d,h,u,f,p=a(n),m=c(n),g=!1;!g;){var v=null,y=1==m.nodeType?e.getComputedStyle(m):{};if("none"==y.display)return;if(m==this.root||m==t?(g=!0,v=i):m!=t.body&&m!=t.documentElement&&"visible"!=y.overflow&&(v=a(m)),v&&(r=v,o=p,s=void 0,l=void 0,d=void 0,h=void 0,u=void 0,f=void 0,s=Math.max(r.top,o.top),l=Math.min(r.bottom,o.bottom),d=Math.max(r.left,o.left),h=Math.min(r.right,o.right),f=l-s,!(p=(u=h-d)>=0&&f>=0&&{top:s,bottom:l,left:d,right:h,width:u,height:f})))break;m=c(m)}return p}},r.prototype._getRootRect=function(){var e;if(this.root)e=a(this.root);else{var n=t.documentElement,i=t.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;rt.clientWidth?(e.style.top="0",e.style.marginTop="0",e.style.left="50%",e.style.marginLeft=e.clientWidth/-2+"px"):(e.style.width="100%",e.style.height="auto",e.style.left="0",e.style.marginLeft="0",e.style.top="50%",e.style.marginTop=e.clientHeight/-2+"px")},i=function(e){if(void 0===e||e instanceof Event)e=document.querySelectorAll("[data-object-fit]");else if(e&&e.nodeName)e=[e];else{if("object"!=typeof e||!e.length||!e[0].nodeName)return!1;e=e}for(var i=0;i-1?setTimeout(n,500):n()}})}),r.a.on("ct:images:lazyload:update",function(){s.a&&s()("body").trigger("jetpack-lazy-images-load"),e&&e.update()})}),h(function(){if(document.querySelector(".ct-comments")){var e=u(document.querySelectorAll('.ct-comments input[type="text"], .ct-comments input[type="email"], .ct-comments textarea')),t=function(){e.map(function(e){e.classList.remove("ct-not-empty"),e.value.trim().length>0&&e.classList.add("ct-not-empty")})};t(),e.map(function(e){return e.addEventListener("input",t)})}}),h(function(){if(window.addComment&&window.addComment.moveForm){var e=addComment.moveForm;addComment.moveForm=function(){for(var t=arguments.length,n=new Array(t),i=0;i1&&void 0!==arguments[1]&&arguments[1];if(!e.selectr&&!(e.matches(".comment-form #rating")||e.matches(".product-type-variable .variations select")&&!t)){var n=e.matches(".woocommerce-address-fields .country_select")||e.matches(".woocommerce-address-fields .state_select")||e.matches(".woocommerce-billing-fields .country_select")||e.matches(".woocommerce-billing-fields .state_select");s.a&&s.a.fn&&s()(e).on("change",function(t){t.target.value||e.selectr.change(0)});new b.a(e,{nativeDropdown:!1,searchable:n})}};r.a.on("ct:custom-select:init",function(){return E()}),r.a.on("ct:custom-select-allow:init",function(){setTimeout(function(){s()(".product-type-variable .variations select").toArray().map(function(e){return C(e,!0)})})}),h(function(){E(),s.a&&s()(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/global",function(){r.a.trigger("ct:custom-select:init"),r.a.trigger("ct:custom-select-allow:init")})}),s.a&&s.a.fn&&(s()(document.body).bind("woocommerce_update_variation_values",function(e,t,n){setTimeout(function(){return w(document.querySelectorAll(".product-type-variable .variations select")).map(function(e){return C(e,!0)})})}),s()(document.body).bind("country_to_state_changed",function(e,t,n){E()}),s()(document.body).bind("updated_wc_div",function(){return E()}),s()(".product-type-variable .reset_variations").on("click",function(){s()(".product-type-variable .variations select").toArray().map(function(e){return e.selectr&&e.selectr.setValue("")})}))});var x=n(3),O=null,T=matchMedia("all and (max-width: 689px)"),_=matchMedia("all and (max-width: 999px)"),S=function(){return O=T.matches?"mobile":_.matches?"tablet":"desktop"};S(),T.addListener(function(){return S()}),_.addListener(function(){return S()});var I=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).withTablet;return void 0!==e&&e?O:"tablet"===O?"mobile":O};function A(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){for(var n=0;n=5?5:r,s&&d){var f=0;f=r>0?j(.5,r):j(window.innerHeight/(s.clientHeight+window.innerHeight),r)-j(.5,r),f=2*Math.abs(f),n.parentNode.style.height="calc(100% + ".concat(f,"px)")}var p=D(s||n),m=p.top,g=p.height;return{parallaxBehavior:u,shouldSetHeightToIncrease:d,fitInsideContainer:s,el:n,top:pageYOffset+m,height:g,speed:r,isVisible:l}};function k(e){var t=e.getBoundingClientRect();return t.bottom>-450&&t.top-450<(window.innerHeight||document.documentElement.clientHeight)}function D(e){if(!e)return null;var t=e.getBoundingClientRect(),n=t.top,i=t.left,r=t.right,o=t.width,s=t.height,a=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map(function(e){return parseFloat(e)});if(6!=a.length)return e.getBoundingClientRect();var l=a,c=l[0]*l[3]-l[1]*l[2];return{width:o/l[0],height:s/l[3],left:(i*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,right:(r*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,top:(-i*l[1]+n*l[0]+l[4]*l[1]-l[0]*l[5])/c}}function R(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t-1,t.blocks=t.blocks.map(function(t){return t.el===e.el?e:t}),e.isVisible||e.el.removeAttribute("style")})})},{rootMargin:"450px"}),window.addEventListener("resize",function(){t.oldPosY=!1,t.blocks=t.blocks.map(function(e){return M(function(e){for(var t=1;t-1}))}),t.animate()}),this.update(),this.animate()}var t,n,i;return t=e,(n=[{key:"addEl",value:function(e){var t=e.el,n=e.speed,i=e.fitInsideContainer,r=void 0===i?null:i,o=e.shouldSetHeightToIncrease,s=void 0===o||o,a=e.parallaxBehavior,l=void 0===a?"desktop:tablet:mobile":a;r?this.intersectionObserver.observe(r):this.intersectionObserver.observe(t.closest("svg")?t.closest("svg"):t),this.blocks.push(M({el:t,speed:n,fitInsideContainer:r,isVisible:k(r||t)&&l.indexOf(I({withTablet:!0}))>-1,shouldSetHeightToIncrease:s,parallaxBehavior:l}))}},{key:"update",value:function(){this.oldPosY||0===this.oldPosY||this.animate(),this.setPosition()&&this.animate(),requestAnimationFrame(this.update.bind(this))}},{key:"setPosition",value:function(){if(0===this.blocks.length)return!1;var e=this.oldPosY;return this.oldPosY=pageYOffset,e!=pageYOffset}},{key:"animate",value:function(){this.blocks.map(function(e){if(e.isVisible){var t=(pageYOffset-e.top+window.innerHeight)/(e.height+window.innerHeight),n=D(e.fitInsideContainer?e.fitInsideContainer:e.el),i=n.top,r=n.height;r||(r=(e.fitInsideContainer?e.fitInsideContainer:e.el).getBoundingClientRect().height);var o=1-(i+(e.el.dataset.percentage&&0===parseInt(e.el.dataset.percentage,10)?0:r/2))/innerHeight,s=j(e.fitInsideContainer?t:o,e.speed)-j(e.el.dataset.percentage?parseInt(e.el.dataset.percentage,10):.5,e.speed);e.el.style.transform="translate3d(0, ".concat(s,"px, 0)")}})}}])&&P(t.prototype,n),i&&P(t,i),e}()),X=function(){return N(document.querySelectorAll("[data-parallax]")).map(function(e){e.ctHasParallax||(e.ctHasParallax=!0,e.querySelector(".ct-image-container > img")?setTimeout(function(){H.addEl(function(e){for(var t=1;t img"),speed:-5,fitInsideContainer:e},e.dataset.parallax?{parallaxBehavior:e.dataset.parallax}:{}))},0):H.addEl({el:e,speed:+e.dataset.parallax,shouldSetHeightToIncrease:!1}))})};function B(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"left",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"container",r=e.sliderContainer,o=0;if("left"===n){var s=W(r.children).reduce(function(t,n){var i=K(t,e.options.nullifyTransformEl),r=i.left,o=(i.right,K(n,e.options.nullifyTransformEl)),s=o.left;o.right;return s("container"===i?K(r,e.options.nullifyTransformEl).left:0)&&(o=-1*K(r.firstElementChild,e.options.nullifyTransformEl).width,t=t===r.children.length?1:t+1)}if("right"===n){var a=W(r.children).reduce(function(t,n){var i=K(t,e.options.nullifyTransformEl),r=(i.left,i.right),o=K(n,e.options.nullifyTransformEl);o.left;return r>o.right?t:n},{getBoundingClientRect:function(){return{left:-1}}});K(a,e.options.nullifyTransformEl).right<("container"===i?K(r,e.options.nullifyTransformEl).right:window.innerWidth)&&(o=K(r.firstElementChild,e.options.nullifyTransformEl).width,t=1===t?r.children.length:t-1)}return{relativeDelta:o,elementsOnTheLeft:t}};function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return null;if(e.getBoundingClientRect&&!e.firstElementChild)return e.getBoundingClientRect();t||(t=e);var n=e.getBoundingClientRect(),i=n.top,r=n.left,o=n.right,s=n.width,a=n.height,l=window.getComputedStyle(t).transform.split(/\(|,|\)/).slice(1,-1).map(function(e){return parseFloat(e)});if(6!=l.length)return e.getBoundingClientRect();var c=l,d=c[0]*c[3]-c[1]*c[2];return{width:s/c[0],height:a/c[3],left:(r*c[3]-i*c[2]+c[2]*c[5]-c[4]*c[3])/d,right:(o*c[3]-i*c[2]+c[2]*c[5]-c[4]*c[3])/d,top:(-r*c[1]+i*c[0]+c[4]*c[1]-c[0]*c[5])/d}}var $=function(e){if(e.options.scaleRotateEffect){W(e.sliderContainer.children);W(e.sliderContainer.children).map(function(t){var n=K(e.sliderContainer,e.options.nullifyTransformEl).left,i=(K(e.sliderContainer,e.options.nullifyTransformEl).right,K(e.sliderContainer,e.options.nullifyTransformEl).width,K(t,e.options.nullifyTransformEl).width),r=0,o=0,s=1,a=K(t,e.options.nullifyTransformEl),l=a.left,c=a.right,d=1;c=window.innerWidth-c;var h=window.innerWidth>=1e3,u=10;h&&W(e.sliderContainer.children).find(function(t){return K(t.parentElement,e.options.nullifyTransformEl).left-K(t,e.options.nullifyTransformEl).left>0&&K(t.parentElement,e.options.nullifyTransformEl).left-K(t,e.options.nullifyTransformEl).left<=K(t,e.options.nullifyTransformEl).width})===t&&(s=1+(l-n+70)/550,r=-1*(l-n),o=(l-n)/25*-1,d=1+(l-n)/1500,u=5),h&&W(e.sliderContainer.children).find(function(t){return K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right<0&&K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right>=-1*K(t,e.options.nullifyTransformEl).width})===t&&(s=1+(K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right+70)/550,r=K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right,o=(K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right)/25,d=1+(K(t.parentElement,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right)/1500,u=5),h&&(n-l>i||K(e.sliderContainer,e.options.nullifyTransformEl).right-K(t,e.options.nullifyTransformEl).right<-1*i)&&(s=0),t.style.zIndex=u,t.firstElementChild.style.transform="perspective(800px) translateX(".concat(r,"px) rotateY(").concat(o,"deg) translateZ(0)"),t.firstElementChild.style.opacity=s,t.firstElementChild.firstElementChild.style.transform="scale(".concat(d,") translateZ(0)")})}},J=function(e){e.options.pillsContainerSelector&&(e.options.pillsContainerSelector.querySelector(".active")&&e.options.pillsContainerSelector.querySelector(".active").classList.remove("active"),e.options.pillsContainerSelector.children[e.state.previousCurrentIndex].classList.add("active"))},G=function(e){if(e.options.pillsContainerSelector){var t=W(e.options.pillsContainerSelector.children);t.map(function(n){return n.addEventListener("click",function(i){i.preventDefault();var r=W(e.sliderContainer.children).indexOf(W(e.sliderContainer.children).reduce(function(t,n){var i=K(t,e.options.nullifyTransformEl),r=i.left,o=(i.right,K(n,e.options.nullifyTransformEl)),s=o.left;o.right;return Math.abs(s-K(e.sliderContainer,e.options.nullifyTransformEl).left)s?r>o?1:-1:r>o?-1:1),c=100*Math.round(100*e.state.positionX/K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width/100)*K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width/100+K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width*l;e.state=V({},e.state,{positionTarget:c})})})}},Z=function(e,t){var n=W(e.sliderContainer.children).indexOf(W(e.sliderContainer.children).reduce(function(t,n){var i=K(t,e.options.nullifyTransformEl),r=i.left,o=(i.right,K(n,e.options.nullifyTransformEl)),s=o.left;o.right;return Math.abs(s-K(e.sliderContainer,e.options.nullifyTransformEl).left)e.sliderContainer.children.length-1&&(i=0);var r=Math.abs(i-n),o=Math.min(n,i)+(e.sliderContainer.children.length-Math.max(n,i)),s=Math.min(r,o)*(o>r?n>i?1:-1:n>i?-1:1),a=100*Math.round(100*e.state.positionX/K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width/100)*K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width/100+K(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl).width*s;e.state=V({},e.state,{positionTarget:a})},Q=function(e){e.options.leftArrow&&e.options.leftArrow.addEventListener("click",function(t){t.preventDefault(),Z(e,function(e){return e-1})}),e.options.rightArrow&&e.options.rightArrow.addEventListener("click",function(t){t.preventDefault(),Z(e,function(e){return e+1})})},ee=function(e){var t=e.sliderContainer;e.options.autoplay&&(t.addEventListener("mouseenter",function(){return e.options=V({},e.options,{autoplay:!1,_autoplay:e.options.autoplay})}),t.addEventListener("mouseleave",function(){e.options=V({},e.options,{autoplay:e.options._autoplay,_autoplay:!1}),e.state=V({},e.state,{lastTimeAnimated:(new Date).getTime()})}))},te=function(e,t,n){var i=e.sliderContainer,r=function(r){if(t().sliderActivated&&!e.options.elementsThatDoNotStartDrag.reduce(function(e,t){return!!e||(r.target.matches(t)||r.target.closest(t))},!1)){r.stopPropagation(),"touchstart"!==r.type&&r.preventDefault(),n(V({},t(),{startX:r.pageX||r.touches[0].pageX,endX:r.pageX||r.touches[0].pageX,mouseDown:!0,downScrollPosition:{x:window.pageXOffset,y:window.pageYOffset},positionSnapshot:t().positionX}));var o=function r(o){if(t().mouseDown){o.stopPropagation(),n(V({},t(),{mouseDown:!1})),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",r);var a=t(),l=100*a.positionX/K(i.firstElementChild,e.options.nullifyTransformEl).width;n(V({},t(),{positionTarget:K(i.firstElementChild,e.options.nullifyTransformEl).width*(Math.abs(a.endX-a.startX)>50?a.endX-a.startX<0?100*Math.floor(l/100):100*Math.ceil(l/100):100*Math.round(l/100))/100}))}},s=function(e){var i=e.pageX;if(i||(i=e.touches[0].pageX),t().mouseDown){var r=t();n(V({},r,{endX:i})),(Math.abs(r.downScrollPosition.x-r.scrollPosition.x)>3||Math.abs(r.downScrollPosition.y-r.scrollPosition.y)>5)&&o(e)}};document.addEventListener("mousemove",s),document.addEventListener("mouseup",o),document.addEventListener("touchmove",s),document.addEventListener("touchend",o)}};i.addEventListener("mousedown",r),i.addEventListener("touchstart",r)},ne=function(e,t,n){return Math.min(Math.max(e,t),n)},ie="__DESTROYED__",re=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y(this,"getDefaultState",function(){return{elementsOnTheLeft:1,positionSnapshot:0,positionX:0,positionTarget:0,velocity:0,containerInnerWidth:n.sliderContainer?K(n.sliderContainer,n.nullifyTransformEl).width:0,slideWidth:n.sliderContainer?K(n.sliderContainer.firstElementChild,n.sliderContainer).width:0,previousCurrentIndex:0,startX:0,endX:0,mouseDown:!1,lastTimeAnimated:1/0}}),Y(this,"state",this.getDefaultState()),Y(this,"options",{autoplay:!1,scaleRotateEffect:!1,pillsContainerSelector:null,flexyAttributeEl:null,wrapAroundMode:"container",nullifyTransformEl:null,elementsThatDoNotStartDrag:[]}),Y(this,"sliderContainer",null),Y(this,"drawLoop",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?1/0:n.state.positionX;if(n.state.sliderActivated!==ie){var i,r;if(n.state.containerInnerWidth!==K(n.sliderContainer,n.nullifyTransformEl).width&&n.refreshActivation(),n.state=V({},n.state,{},n.state.sliderActivated?(i=n.state.velocity+(n.state.mouseDown?n.state.positionSnapshot+(n.state.endX-n.state.startX)-n.state.positionX-n.state.velocity:.02*(n.state.positionTarget-n.state.positionX)),{velocity:.72*(r=i),positionX:n.state.positionX+r}):{},{},n.state.sliderActivated&&Math.abs(n.state.containerInnerWidth-K(n.sliderContainer,n.nullifyTransformEl).width)>1?{positionX:Math.round(K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width*(100*Math.round(n.state.positionX/n.state.slideWidth))/100),positionTarget:Math.round(K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width*(100*Math.round(n.state.positionX/n.state.slideWidth))/100)}:{},{scrollPosition:{x:window.pageXOffset,y:window.pageYOffset},containerInnerWidth:K(n.sliderContainer,n.nullifyTransformEl).width,slideWidth:K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width}),(t!==n.state.positionX||Math.abs(n.state.positionX-n.state.positionTarget)>.1)&&!e&&n.state.sliderActivated){var o=U(n,n.state.elementsOnTheLeft,n.state.mouseDown?n.state.endX<=n.state.startX?"right":"left":n.state.positionX>=n.state.positionTarget?"right":"left",n.options.wrapAroundMode),s=o.relativeDelta,a=o.elementsOnTheLeft;n.state=V({},n.state,{elementsOnTheLeft:a,positionTarget:n.state.positionTarget+s,positionX:n.state.positionX+s,positionSnapshot:n.state.positionSnapshot+s})}if(n.options.autoplay&&n.state.sliderActivated&&Math.abs(n.state.positionX-n.state.positionTarget)<.5&&(new Date).getTime()/1e3-n.state.lastTimeAnimated/1e3>(parseFloat(n.options.autoplay,10)?parseFloat(n.options.autoplay,10):3)&&(n.state=V({},n.state,{positionTarget:n.state.positionX-K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width})),!n.state.mouseDown&&n.state.sliderActivated){Math.abs(n.state.positionX-n.state.positionTarget)<.2&&(n.state=V({},n.state,{positionX:n.state.positionTarget,velocity:0}));var l=n.state.previousCurrentIndex;n.state=V({},n.state,{previousCurrentIndex:ne(n.state.elementsOnTheLeft>Math.round(Math.abs(n.state.positionTarget)/K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width)?Math.round(Math.abs(n.state.positionTarget)/K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width)+(n.sliderContainer.children.length-n.state.elementsOnTheLeft):Math.abs(Math.round(Math.abs(n.state.positionTarget)/K(n.sliderContainer.firstElementChild,n.options.nullifyTransformEl).width)-n.state.elementsOnTheLeft),0,n.sliderContainer.children.length-1)}),l!==n.state.previousCurrentIndex&&J(n)}n.state.positionX!==t&&n.state.sliderActivated&&(n.render(),$(n),n.state=V({},n.state,{lastTimeAnimated:(new Date).getTime()})),requestAnimationFrame(function(){return n.drawLoop()})}}),this.options=V({},this.options,{flexyAttributeEl:t,nullifyTransformEl:t},i),this.sliderContainer=t,G(this),Q(this),ee(this),te(this,function(){return n.state},function(e){return n.state=e}),W(this.sliderContainer.children).map(function(e){return e.addEventListener("click",function(e){return Math.abs(n.state.startX-n.state.endX)>3&&e.preventDefault()})}),this.state=V({},this.state,{elementsOnTheLeft:1,positionX:-1*K(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl).width,positionTarget:-1*K(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl).width,containerInnerWidth:K(this.sliderContainer,this.nullifyTransformEl).width,slideWidth:K(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl).width}),this.refreshActivation(),requestAnimationFrame(function(){return n.drawLoop(!0)})}var t,n,i;return t=e,(n=[{key:"destroy",value:function(){this.state=V({},this.state,{sliderActivated:ie})}},{key:"refreshActivation",value:function(){var e=(K(this.sliderContainer.children[0],this.options.nullifyTransformEl)||{width:0}).width*this.sliderContainer.children.length;this.state=V({},this.state,{sliderActivated:!!this.sliderContainer&&(-1===getComputedStyle(this.sliderContainer,":after").content.indexOf("no-flexy")&&e>K(this.sliderContainer,this.options.nullifyTransformEl).width+10)}),this.state.sliderActivated?this.options.flexyAttributeEl.dataset.flexy="":(this.options.flexyAttributeEl.removeAttribute("data-flexy"),W(this.sliderContainer.children).map(function(e){return e.removeAttribute("style")}))}},{key:"render",value:function(){var e=this;W(this.sliderContainer.children).map(function(t){return t.style.transform="translate3d(".concat(e.state.positionX,"px, 0, 0)")}),this.state.mouseDown?this.options.flexyAttributeEl.dataset.flexyDragging="":this.options.flexyAttributeEl.removeAttribute("data-flexy-dragging"),this.state.elementsOnTheLeft>0?(W(this.sliderContainer.children).slice(0,-1*this.state.elementsOnTheLeft).map(function(e){return e.style.order=2}),W(this.sliderContainer.children).slice(-1*this.state.elementsOnTheLeft).map(function(e){return e.style.order=1})):W(this.sliderContainer.children).map(function(e){return e.style.order=1})}}])&&B(t.prototype,n),i&&B(t,i),e}();function oe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t .ct-image-container")).map(function(t){return t.addEventListener("click",function(n){n.preventDefault(),window.PhotoSwipe&&function(t){var n=s()(".pswp")[0],i=s()(t),r=oe(t.closest(".ct-product-view").querySelectorAll(".flexy-items .ct-image-container img, .ct-product-view > .ct-image-container img")).map(function(e){return{src:e.src,w:e.width,h:e.height,title:e.getAttribute("title")}}),o=s.a.extend({index:s()(i).index(),addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].textContent=e.title,!0):(t.children[0].textContent="",!1)}},e);new PhotoSwipe(n,PhotoSwipeUI_Default,r,o).init()}(t)})});var t=function(){return oe(document.querySelectorAll('.flexy-container[data-flexy*="no"]')).map(function(e){e=e.parentNode;var t=new re(e.querySelector(".flexy-items"),{flexyAttributeEl:e.querySelector(".flexy-container"),elementsThatDoNotStartDrag:[".twentytwenty-handle"],pillsContainerSelector:e.querySelector(".flexy-pills"),scaleRotateEffect:!1,wrapAroundMode:"viewport"===e.querySelector(".flexy-container").dataset.wrap?"viewport":"container"});e.flexy=t})};if(t(),ctEvents.on("ct:flexy:update",function(){t()}),s.a&&s.a.fn&&s.a.fn.wc_variations_image_update){var n=s.a.fn.wc_variations_image_update;s.a.fn.wc_variations_image_update=function(e){if(e){if(this[0].closest(".product").querySelector(".flexy-pills")){var t=this[0].closest(".product").querySelector('.flexy-items [srcset*="'.concat(e.image.src,'"]'));if(t){var i=this[0].closest(".product").querySelector(".flexy-pills").children[oe(this[0].closest(".product").querySelector(".flexy-items").children).indexOf(t.closest("div"))];i&&i.click()}}}else this[0].closest(".product").querySelector(".flexy-pills")&&this[0].closest(".product").querySelector(".flexy-pills").firstElementChild.click();n&&n.apply(this,arguments)}}}),window.__TEMPLATES_MAP__={offcanvas:{},headers:{}};var le=function e(){var t=document.querySelector("#main-container > header");if(t&&(!I()||t.dataset.device!==I())){if(__TEMPLATES_MAP__.headers[I()]){var n=document.createElement("div");n.innerHTML=__TEMPLATES_MAP__.headers[I()],t.parentNode.replaceChild(n.childNodes[0],t)}if(__TEMPLATES_MAP__.offcanvas[I()]){var i=document.querySelector(".ct-offcanvas-container");i&&(i.innerHTML=__TEMPLATES_MAP__.offcanvas[I()],i.dataset.mode=I())}r.a.trigger("ct:header:update")}r.a.trigger("ct:header:render-frame"),requestAnimationFrame(e)},ce=function(){document.querySelector('script[id*="ct-header-template"]')&&(ae(document.querySelectorAll('script[id*="ct-header-template"]')).map(function(e){__TEMPLATES_MAP__.headers[e.id.replace("ct-header-template-","")]=e.innerHTML,e.parentNode.removeChild(e)}),ae(document.querySelectorAll('script[id*="ct-header-offcanvas-template"]')).map(function(e){__TEMPLATES_MAP__.offcanvas[e.id.replace("ct-header-offcanvas-template-","")]=e.innerHTML,e.parentNode.removeChild(e)}),1)&&(wp&&wp.customize&&wp.customize.selectiveRefresh&&(wp.customize.selectiveRefresh.bind("render-partials-response",function(e){var t={};if(e.contents&&Object.keys(e.contents).find(function(e){return e.indexOf(":")>-1&&e.indexOf("header_placements_item")>-1})){var n=Object.keys(e.contents).find(function(e){return e.indexOf(":")>-1&&e.indexOf("header_placements_item")>-1});t[n]=e.contents[n]}e.partial&&e.partial.params.settings.indexOf("header_placements")>-1&&e.partial.id.indexOf(":")>-1&&(t[e.partial.id]=e.addedContent),Object.keys(t).map(function(e){var n=se(e.split(":"),3),i=(n[0],n[1]),r=n[2];(r?[r]:["desktop","mobile"]).map(function(n){var r=document.createElement("div");r.innerHTML=__TEMPLATES_MAP__.headers[n];var o=r.querySelector('[data-id="'.concat(i,'"]'));if(o){var s=document.createElement("div");s.innerHTML=t[e],o.parentNode.replaceChild(s.firstElementChild,o),__TEMPLATES_MAP__.headers[n]=r.innerHTML}})}),e.contents&&(e.contents.header_placements_1&&(__TEMPLATES_MAP__.headers.desktop=e.contents.header_placements_1),e.contents.header_placements_2&&(__TEMPLATES_MAP__.headers.mobile=e.contents.header_placements_2))}),wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){r.a.trigger("ct:header:update"),r.a.trigger("ct:header:render-frame")})),requestAnimationFrame(le))};function de(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t .menu',load:function(){return Promise.all([n.e(2),n.e(3)]).then(n.bind(null,15))},mount:function(e){return(0,e.handleFirstLevelForMenu)(e.el)},events:["ct:header:update","ct:header:render-frame"]},{els:['header[data-device="desktop"] [data-id*="menu"] > .menu .menu-item-has-children > .sub-menu','header[data-device="desktop"] [data-id*="menu"] > .menu .page_item_has_children > .sub-menu'],load:function(){return Promise.all([n.e(2),n.e(3)]).then(n.bind(null,15))},mount:function(e){return(0,e.handleUpdate)(e.el)},events:["ct:header:update"]},{els:'header[data-device="desktop"] [data-id^="menu"]',load:function(){return Promise.all([n.e(2),n.e(8)]).then(n.bind(null,49))},events:["ct:header:render-frame"]},{els:"#offcanvas .child-indicator",load:function(){return n.e(12).then(n.bind(null,50))}},{els:[".ct-modal-action","#main-container > header .ct-header-search > a[href]"],load:function(){return n.e(1).then(n.bind(null,51))},events:["ct:header:update"]},{els:".ct-header-cart",load:function(){return Promise.all([n.e(2),n.e(15)]).then(n.bind(null,52))},events:["ct:header:update"]}]).filter(function(e){var t=e.onLoad;return!(void 0!==t&&!t)}).map(d),c(new Set(e.reduce(function(e,t){return[].concat(c(e),c(t.events||[]))},[]))).map(function(t){return r.a.on(t,function(){return e.filter(function(e){var n=e.events;return(void 0===n?[]:n).indexOf(t)>-1}).map(d)})}),setTimeout(function(){return document.body.classList.remove("ct-loading")},1500),ce()}),r.a.on("ct:overlay:handle-click",function(e){var t=e.e,i=e.el,r=e.options,o=void 0===r?{}:r;n.e(1).then(n.bind(null,51)).then(function(e){(0,e.handleClick)(t,function(e){for(var t=1;t