!function(){var t={7345:function(t,e,i){"use strict";var o=i(4942),n=i(4558).GQ;const s=window.__i18n||new class{constructor(){var t,e=this;(0,o.Z)(this,"shop_locale",(null===(t=n.shop_locale)||void 0===t?void 0:t.current)||"en"),(0,o.Z)(this,"locales",{default:{date_format:"MM/dd/yyyy",add_button:"Add",added_button:"Added",bundle_button:"Add selected item(s)",bundle_saved:"Saved",bundle_select:"Select",bundle_selected:"Selected",bundle_this_item:"This item",bundle_total:"Total price",checkout:"Checkout",discount_summary:"You will get {discount_value} OFF on each product",discount_title:"SPECIAL OFFER",free:"FREE",incart_title:'Customers also bought with "{product_title}"',prepurchase_added:"You just added",prepurchase_title:'Frequently bought with "{product_title}"',qty_discount_note:"on each product",qty_discount_title:"{item_count} item(s) get {discount_value} OFF",sizechart_button:"Size chart",field_name:"Enter your name",field_email:"Enter your email",field_birthday:"Date of birth",discount_noti:"* Discount will be calculated and applied at checkout",fox_discount_noti:"* You are entitled to 1 discount offer of {price} ({discount_title}). This offer can't be combined with any other discount you add here!",bis_open:"Notify me when available",bis_heading:"Back in stock alert 📬",bis_desc:"We will send you a notification as soon as this product is available again.",bis_submit:"Notify me",bis_email:"Your email",bis_name:"Your name",bis_phone:"Your phone number",bis_note:"Your note",bis_signup:"Email me with news and offers",bis_thankyou:"Thank you! We'll send you an email when this product is available!",preorder_discount_title:"🎁 Preorder now to get {discount_value} OFF",preorder_shipping_note:"🚚 Item will be delivered on or before {eta}",preorder_end_note:"🔥 Preorder will end at {end_time}"}}),(0,o.Z)(this,"tr",(function(t){var i;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{locales:n,shop_locale:s}=e;let r=(null===(i=n[s])||void 0===i?void 0:i[t])||n.default[t]||`Foxkit: translation missing for ${t}!`;return Object.keys(o).length&&Object.entries(o).forEach((t=>{let[e,i]=t;return r=r.replace(`{${e}}`,i)})),r})),(0,o.Z)(this,"setLocales",((t,e)=>{this.locales[t]=e}))}};window.__i18n=window.__i18n||s,e.Z=s},4558:function(t,e,i){"use strict";i.d(e,{GQ:function(){return r},LE:function(){return s},gM:function(){return l},rZ:function(){return a},s0:function(){return n}});var o=i(8971);i(9280);window.MinimogEvents=window.MinimogEvents||new o.Z,window._ThemeEvent=window.MinimogEvents,window.MinimogLibs.loadjs=__loadjs;const n=window.MinimogEvents,s=window.MinimogTheme||{},r=window.MinimogSettings||{},a=window.MinimogStrings||{},l=window.MinimogLibs||{}},9280:function(){__loadjs=function(){var t=function(){},e={},i={},o={};function n(t,e){if(t){var n=o[t];if(i[t]=e,n)for(;n.length;)n[0](t,e),n.splice(0,1)}}function s(e,i){e.call&&(e={success:e}),i.length?(e.error||t)(i):(e.success||t)(e)}function r(e,i,o,n){var s,a,l=document,d=o.async,c=(o.numRetries||0)+1,u=o.before||t,p=e.replace(/[\?|#].*$/,""),h=e.replace(/^(css|img)!/,"");n=n||0,/(^css!|\.css$)/.test(p)?((a=l.createElement("link")).rel="stylesheet",a.href=h,(s="hideFocus"in a)&&a.relList&&(s=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(p)?(a=l.createElement("img")).src=h:((a=l.createElement("script")).src=e,a.async=void 0===d||d),!(a.onload=a.onerror=a.onbeforeload=function(t){var l=t.type[0];if(s)try{a.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((n+=1)2?i-2:0),n=2;nnull!==t))),e&&(e.class&&(e.className=e.class),delete e.children);let s="fragment"!==t?function(t,e){e=e||{};let i=document.createElement(t);try{i=Object.assign(i,e)}catch{const t=Object.keys(e);for(let o=0;ot.match(/^data-/)))&&(alert("Do not use data-* in your JSX component! Use dataSet instead!! - Check the console.trace for more info"),window.__aleartedJSXData=!0),null!=e&&e.ref&&("function"==typeof e.ref?e.ref(s):e.ref=s),null!=e&&e.on&&Object.entries(e.on).forEach((t=>{let[e,i]=t;s.addEventListener(e,i)})),null!=e&&e.style&&Object.entries(e.style).forEach((t=>{let[e,i]=t;s.style.setProperty(e,i)})),s}}},8971:function(t,e,i){"use strict";i.d(e,{X:function(){return o},Z:function(){return n}});const o=t=>{let{context:e=document.documentElement,event:i="click",selector:o,handler:n,capture:s=!1}=t;const r=function(t){for(let e=t.target;e&&e!==this;e=e.parentNode)if(e.matches(o)){n.call(e,t,e);break}};return e.addEventListener(i,r,s),()=>{e.removeEventListener(i,r,s)}};class n{constructor(){this.events={}}get evts(){return Object.keys(this.events)}subscribe(t,e){return this.events[t]=this.events[t]||[],this.events[t].push(e),()=>this.unSubscribe(t,e)}unSubscribe(t,e){const i=this.events[t];if(i&&Array.isArray(i))for(let t=0;t1?e-1:0),o=1;o{t(...i)}))}}},3578:function(t,e,i){var o=i(3745),n=i(2178).each;function s(t,e){this.query=t,this.isUnconditional=e,this.handlers=[],this.mql=window.matchMedia(t);var i=this;this.listener=function(t){i.mql=t.currentTarget||t,i.assess()},this.mql.addListener(this.listener)}s.prototype={constuctor:s,addHandler:function(t){var e=new o(t);this.handlers.push(e),this.matches()&&e.on()},removeHandler:function(t){var e=this.handlers;n(e,(function(i,o){if(i.equals(t))return i.destroy(),!e.splice(o,1)}))},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){n(this.handlers,(function(t){t.destroy()})),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";n(this.handlers,(function(e){e[t]()}))}},t.exports=s},6779:function(t,e,i){var o=i(3578),n=i(2178),s=n.each,r=n.isFunction,a=n.isArray;function l(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}l.prototype={constructor:l,register:function(t,e,i){var n=this.queries,l=i&&this.browserIsIncapable;return n[t]||(n[t]=new o(t,l)),r(e)&&(e={match:e}),a(e)||(e=[e]),s(e,(function(e){r(e)&&(e={match:e}),n[t].addHandler(e)})),this},unregister:function(t,e){var i=this.queries[t];return i&&(e?i.removeHandler(e):(i.clear(),delete this.queries[t])),this}},t.exports=l},3745:function(t){function e(t){this.options=t,!t.deferSetup&&this.setup()}e.prototype={constructor:e,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},t.exports=e},2178:function(t){t.exports={isFunction:function(t){return"function"==typeof t},isArray:function(t){return"[object Array]"===Object.prototype.toString.apply(t)},each:function(t,e){for(var i=0,o=t.length;i=s)return o(t,r.x,r.y),t._scrollSettings=null,i.end(e);var d=1-i.ease(l);if(o(t,r.x-r.differenceX*d,r.y-r.differenceY*d),a>=i.time)return i.endIterations++,i.scrollAncestor&&n(i.scrollAncestor),void n(t);!function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(n.bind(null,t))}}function s(t){return t.self===t}function r(t){return"pageXOffset"in t||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function a(){return!0}function l(t){if(t.assignedSlot)return l(t.assignedSlot);if(t.parentElement)return"body"===t.parentElement.tagName.toLowerCase()?t.parentElement.ownerDocument.defaultView||t.parentElement.ownerDocument.ownerWindow:t.parentElement;if(t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e.host}}t.exports=function(t,o,d){if(t){"function"==typeof o&&(d=o,o=null),o||(o={}),o.time=isNaN(o.time)?1e3:o.time,o.ease=o.ease||function(t){return 1-Math.pow(1-t,t/2)},o.align=o.align||{};var c=l(t),u=1,p=o.validTarget||a,h=o.isScrollable;o.debug;for(var m=[];c;)if(o.debug,p(c,u)&&(h?h(c,r):r(c))&&(u++,m.push(c)),!(c=l(c))){v(e);break}return m.reduce(((e,r,a)=>function(t,e,o,r,a){var l,d=!e._scrollSettings,c=e._scrollSettings,u=Date.now(),p={passive:!0};function h(t){e._scrollSettings=null,e.parentElement&&e.parentElement._scrollSettings&&e.parentElement._scrollSettings.end(t),o.debug,a(t),l&&(e.removeEventListener("touchstart",l,p),e.removeEventListener("wheel",l,p))}c&&c.end(i);var m=o.maxSynchronousAlignments;return null==m&&(m=3),e._scrollSettings={startTime:u,endIterations:0,target:t,time:o.time,ease:o.ease,align:o.align,isWindow:o.isWindow||s,maxSynchronousAlignments:m,end:h,scrollAncestor:r},"cancellable"in o&&!o.cancellable||(l=h.bind(null,i),e.addEventListener("touchstart",l,p),e.addEventListener("wheel",l,p)),d&&n(e),l}(t,r,o,m[a+1],v)),null)}function v(t){--u||d&&d(t)}}},4942:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var o=i(7343);function n(t,e,i){return(e=(0,o.Z)(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}},5512:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var o=i(1002);function n(t,e){if("object"!==(0,o.Z)(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==(0,o.Z)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}},7343:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});var o=i(1002),n=i(5512);function s(t){var e=(0,n.Z)(t,"string");return"symbol"===(0,o.Z)(e)?e:String(e)}},1002:function(t,e,i){"use strict";function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}i.d(e,{Z:function(){return o}})}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=i(4942),e=i(6295).Z;function o(t){let{wrapper_class:i=""}=t;return e("div",{style:{"--tw-bg-opacity":"0.3"},className:`sf-modal sf-modal__wrapper fixed inset-0 px-5 bg-black flex items-center justify-center transition-opacity opacity-0 duration-200 ease-out ${i}`},e("div",{className:"sf-modal__content bg-white relative rounded max-h-[90vh]"},e("button",{className:"sf-modal__close text-black absolute p-2 bg-white hover:bg-gray-300 rounded-full z-10"},e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}))),e("div",{className:"sf-modal__content-inner"})))}var n=i(8971),s=i(6295).Z;var r=class{constructor(e){var i,r,a=this;(0,t.Z)(this,"init",(()=>{(0,n.X)({selector:".sf-modal__wrapper",handler:t=>{var e;((null==t?void 0:t.target)===this.modal||null!=t&&null!==(e=t.target)&&void 0!==e&&e.closest(".sf-modal__close"))&&this.close(t)}})})),(0,t.Z)(this,"setSizes",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";a.resetSize(),a.sizes=t,t.split(" ").forEach((t=>{var e,i;null===(e=a.modalContent)||void 0===e||null===(i=e.classList)||void 0===i||i.add(t)}))})),(0,t.Z)(this,"setWidth",(t=>{this.modalContent.style.width=t})),(0,t.Z)(this,"resetSize",(()=>{this.sizes&&(this.sizes.split(" ").forEach((t=>{var e,i;null===(e=this.modalContent)||void 0===e||null===(i=e.classList)||void 0===i||i.remove(t)})),this.sizes="")})),(0,t.Z)(this,"appendChild",(t=>{var e;null==this||null===(e=this.modalContentInner)||void 0===e||e.appendChild(t),this.children=t})),(0,t.Z)(this,"removeChild",(()=>{var t;null==this||null===(t=this.children)||void 0===t||t.remove()})),(0,t.Z)(this,"open",(()=>{document.documentElement.classList.add("prevent-scroll"),document.body.appendChild(this.modal),setTimeout((()=>this.modal.classList.add("opacity-100"))),window.addEventListener("keydown",this.handleKeyDown)})),(0,t.Z)(this,"close",(t=>{null==t||t.preventDefault(),this.modal.classList.remove("opacity-100"),window.removeEventListener("keydown",this.handleKeyDown),setTimeout((()=>{this.modal.remove(),this.removeChild(),this.resetSize(),this.modalContent.style.removeProperty("width"),document.documentElement.classList.remove("prevent-scroll")}),this.transitionDuration)})),(0,t.Z)(this,"handleKeyDown",(t=>{27===t.keyCode&&this.close()})),this.modal=s(o,{wrapper_class:e||void 0}),this.modalContent=null===(i=this.modal)||void 0===i?void 0:i.querySelector(".sf-modal__content"),this.modalContentInner=null===(r=this.modal)||void 0===r?void 0:r.querySelector(".sf-modal__content-inner"),this.transitionDuration=200,this.init()}};function a(t,e){if(null===e)return t;if("master"===e)return l(t);const i=t.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(i){const o=t.split(i[0]),n=i[0];return l(`${o[0]}_${e}${n}`)}return null}function l(t){return t.replace(/http(s)?:/,"")}var d=i(4558).GQ,c=i(6295).Z,u=i(7345).Z;i(4558).LE;function p(t){return`${Shopify.routes.root}products/${t}`}String.prototype.capitalize||(String.prototype.capitalize=function(){var t,e;return this.replace(this[0],null===(t=this[0])||void 0===t||null===(e=t.toUpperCase)||void 0===e?void 0:e.call(t))});var h=i(4558).LE,m=i(6295).Z,v=i(4558).GQ,f=i(4558).rZ,y=i(7345).Z;function _(t){var e;let{product:i,recommended_products:o,settings:n}=t;const{item_count:s,total_price:r}=null===(e=h)||void 0===e?void 0:e.Cart.cart,{discount:l,active_discount:_}=n,g=m("span",{className:"f-upsell__footer-cart-total"});g.innerHTML=formatMoney(r,v.money_format);const{addToCart:w,soldOut:b,viewCart:S}=f;return m("div",{className:"f-upsell"},m("div",{className:"f-upsell__header"},i.featured_image?m("div",{className:"f-upsell__header-image"},m("img",{src:a(i.featured_image,"100x"),alt:""})):"",m("div",{className:"f-upsell__header-info"},m("p",null,m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",fill:"none",viewBox:"0 0 14 15"},m("path",{fill:"#000",d:"M2.1875 2.96484C3.51823 1.63411 5.1224.96875 7 .96875c1.8776 0 3.4727.66536 4.7852 1.99609 1.3307 1.3125 1.996 2.90756 1.996 4.78516 0 1.8776-.6653 3.4818-1.996 4.8125C10.4727 13.875 8.8776 14.5312 7 14.5312c-1.8776 0-3.48177-.6562-4.8125-1.9687C.875 11.2318.21875 9.6276.21875 7.75c0-1.8776.65625-3.47266 1.96875-4.78516zm8.668.92969C9.79818 2.81901 8.51302 2.28125 7 2.28125s-2.80729.53776-3.88281 1.61328C2.0599 4.95182 1.53125 6.23698 1.53125 7.75s.52865 2.8073 1.58594 3.8828C4.19271 12.6901 5.48698 13.2188 7 13.2188s2.79818-.5287 3.8555-1.586c1.0755-1.0755 1.6133-2.36978 1.6133-3.8828s-.5378-2.79818-1.6133-3.85547zm-.0274 1.94141c.1641.16406.1641.31901 0 .46484L6.125 10.9766c-.16406.164-.31901.164-.46484 0L3.17188 8.48828c-.16407-.16406-.16407-.31901 0-.46484l.6289-.62891c.14583-.14583.30078-.14583.46484 0L5.87891 9.0625l3.88281-3.85547c.14583-.14583.30078-.13672.46488.02735l.6015.60156z"}))," ",y.tr("prepurchase_added")),m("h4",null,null==i?void 0:i.title))),m("div",{className:"f-upsell__body"},m("h4",null,y.tr("prepurchase_title",{product_title:null==i?void 0:i.title})),_?m("div",{className:"f-upsell__discount mb-4"},m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"19",fill:"none",viewBox:"0 0 18 19"},m("path",{fill:"#DA3F3F",d:"M17.4375 7.49219C17.8125 8.00781 18 8.59375 18 9.25s-.1875 1.2539-.5625 1.793c-.375.5156-.8555.8789-1.4414 1.0898.2578.5625.3281 1.1719.2109 1.8281-.0937.6329-.375 1.1836-.8437 1.6524-.4688.4687-1.0195.75-1.6524.8437-.6328.1172-1.2421.0469-1.8281-.2109-.1406.3984-.3516.7383-.6328 1.0195-.2812.3047-.6211.5391-1.0195.7032-.37503.1874-.78519.2812-1.2305.2812-.65625 0-1.25391-.1875-1.79297-.5625-.51562-.375-.87891-.8555-1.08984-1.4414-.58594.2578-1.19531.3281-1.82813.2109-.63281-.0937-1.18359-.375-1.65234-.8437-.46875-.4688-.76172-1.0195-.87891-1.6524-.09375-.6562-.01172-1.2656.2461-1.8281C1.41797 11.9219.9375 11.5586.5625 11.043.1875 10.5039 0 9.90625 0 9.25s.1875-1.24219.5625-1.75781c.375-.53906.85547-.91407 1.44141-1.125-.25782-.5625-.33985-1.16016-.2461-1.79297.11719-.65625.41016-1.21875.87891-1.6875.46875-.46875 1.01953-.75 1.65234-.84375.65625-.11719 1.26563-.04688 1.82813.21094.21093-.58594.57422-1.06641 1.08984-1.44141C7.74609.4375 8.34375.25 9 .25s1.2422.1875 1.7578.5625c.5391.375.9141.85547 1.125 1.44141.5625-.25782 1.1602-.32813 1.793-.21094.6562.09375 1.2187.375 1.6875.84375.4687.46875.75 1.03125.8437 1.6875.1172.63281.0469 1.23047-.2109 1.79297.5859.21093 1.0664.58594 1.4414 1.125zM7.52344 6.22656C7.3125 5.99219 7.05469 5.875 6.75 5.875s-.57422.11719-.80859.35156C5.73047 6.4375 5.625 6.69531 5.625 7s.10547.57422.31641.80859c.23437.21094.5039.31641.80859.31641s.5625-.10547.77344-.31641C7.75781 7.57422 7.875 7.30469 7.875 7s-.11719-.5625-.35156-.77344zm-.35156 6.04684l4.85152-4.85152c.2578-.25782.2578-.51563 0-.77344l-.4218-.42188c-.2578-.25781-.5157-.25781-.7735 0L5.97656 11.0781c-.25781.2578-.25781.5157 0 .7735l.42188.4218c.25781.2578.51562.2578.77344 0zm3.26952.0352c.2344.2109.5039.3164.8086.3164.3047 0 .5625-.1055.7734-.3164.2344-.2344.3516-.5039.3516-.8086 0-.3047-.1172-.5625-.3516-.7734-.2109-.2344-.4687-.3516-.7734-.3516-.3047 0-.5742.1172-.8086.3516-.2109.2109-.3164.4687-.3164.7734 0 .3047.1055.5742.3164.8086z"})),function(t){var e,i;const o=c("span",null),n="PERCENTAGE"===(null==t?void 0:t.type)?`${null==t?void 0:t.value}%`:formatMoney(100*(null==t?void 0:t.value)*Number((null===(e=window.Shopify)||void 0===e||null===(i=e.currency)||void 0===i?void 0:i.rate)||1),d.money_format);return o.innerHTML=u.tr("discount_summary",{discount_value:n}),o}(l)):"",m("div",{className:"f-upsell__products"},(null==o?void 0:o.length)&&(null==o?void 0:o.map((t=>{var e;const i=m("div",{className:"f-upsell__product-prices prod__price"}),{price_max:o,price_min:s,available:r}=t;i.innerHTML=o===s?formatMoney(o,v.money_format):`from ${formatMoney(s,v.money_format)}`;const d=t.selected_or_first_available_variant,c=t.has_only_default_variant&&"default title"===d.title.toLowerCase();return m("div",{className:"f-upsell__product sf-prod__block",dataSet:{view:"card"}},m("form",{className:"f-upsell__product-inner product-form form",noValidate:!0,dataSet:{productId:t.id,productHandle:t.handle}},m("input",{type:"hidden",name:"form_type",value:"product"}),m("input",{type:"hidden",name:"utf8",value:"✓"}),m("input",{type:"hidden",name:"id",value:d.id}),m("input",{type:"hidden",name:"source_event",value:"prepurchase-upsell"}),_?m("input",{type:"hidden",name:"properties[_foxDiscount]",value:`{"discount_value": ${l.value}, "discount_type": "${l.type}", "offer_id": "${n._id}", "plugin": "PrePurchase"}`}):"",m("div",{className:"f-upsell__product-image spc__main-img"},m("a",{href:p(t.handle)},m("img",{src:t.featured_image?a(t.featured_image,"300x"):"https://dummyimage.com/300x/ddd/aaa",alt:t.title}))),m("div",{className:"f-upsell__product-info"},m("h3",{className:"h4"},m("a",{href:p(t.handle)},t.title)),i,c?"":m("div",{className:"f-upsell__product-options"},m("select",{className:"sf-product-variant-option-dropdown form-control combined-variant"},null===(e=t.variants)||void 0===e?void 0:e.map((t=>m("option",{value:t.id,disabled:!t.available},null==t?void 0:t.title))))),m("button",{type:"submit",className:"add-to-cart sf__btn sf__btn-primary btn-atc relative",disabled:!r},m("span",{className:"atc-spinner inset-0 absolute items-center justify-center"},m("svg",{className:"animate-spin medium",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},m("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))),m("span",{className:"atc-text"},r?w:b)))))}))))),m("div",{className:"f-upsell__footer"},m("div",{className:"f-upsell__footer-cart"},m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"21",fill:"none",viewBox:"0 0 18 21"},m("path",{fill:"#000",d:"M13.75 5.5h3.75v11.875c0 .8594-.3125 1.5885-.9375 2.1875-.599.625-1.3281.9375-2.1875.9375H3.125c-.85938 0-1.60156-.3125-2.226562-.9375C.299479 18.9635 0 18.2344 0 17.375V5.5h3.75c0-1.38021.48177-2.55208 1.44531-3.51562C6.1849.994792 7.36979.5 8.75.5c1.3802 0 2.5521.494792 3.5156 1.48438C13.2552 2.94792 13.75 4.11979 13.75 5.5zm-2.8125-2.1875c-.599-.625-1.32812-.9375-2.1875-.9375s-1.60156.3125-2.22656.9375C5.92448 3.91146 5.625 4.64062 5.625 5.5h6.25c0-.85938-.3125-1.58854-.9375-2.1875zM15.625 17.375v-10H13.75v1.5625c0 .26042-.0911.48177-.2734.66406-.1823.18229-.4037.27344-.6641.27344s-.4818-.09115-.6641-.27344c-.1823-.18229-.2734-.40364-.2734-.66406V7.375h-6.25v1.5625c0 .26042-.09115.48177-.27344.66406s-.40364.27344-.66406.27344-.48177-.09115-.66406-.27344S3.75 9.19792 3.75 8.9375V7.375H1.875v10c0 .3385.11719.625.35156.8594.26042.2604.5599.3906.89844.3906h11.25c.3385 0 .625-.1302.8594-.3906.2604-.2344.3906-.5209.3906-.8594z"})),m("span",{className:"f-upsell__footer-cartcount"},s),g||""),m("div",{className:"f-upsell__footer-action"},m("a",{href:v.routes.cart,className:"sf__btn sf__btn-primary"},S))))}var g=i(643),w=i.n(g),b=i(4558).GQ;i(6295).Z;function S(t){const e=t.querySelectorAll('[data-theme-fields] [name][required]:not([hidden]):not([type="hidden"])'),i=[];return e.forEach((e=>{if("radio"===e.type){const o=t.querySelectorAll(`input[name="${e.name}"]`);Array.from(o).some((t=>t.checked))||i.push(e)}else e.value||i.push(e)})),i}window.__getSectionInstanceByType=t=>window.Shopify.theme.sections.instances.find((e=>e.type===t));function N(t,e){return"youtube"===e?`https://www.youtube.com/watch?v=${t}&gl=true`:"vimeo"===e?`https://vimeo.com/${t}`:""}const E=document.querySelector("#scroll-to-top-target");function C(t){w()(E,t)}const L=(t,e,i)=>{let o;const{routes:n}=b;return o=`${n.root.endsWith("/")?"":n.root}/${t}/${e}`,i&&(o+=`?${i}`),o};window.MinimogLibs.getVideoURL=N,window.MinimogLibs.scrollToTop=C;var x=i(6295).Z,P=i(4558).LE;const k=window._themeProducts||{},Z=async t=>{let{productId:e,productHandle:i}=t,o=k[e];var n,s;(o||(o=await(async t=>{const e=L("products",t+".js"),i=await fetchJsonCache(e).catch(console.error);return!!i&&(k[i.id]=i,i)})(i).catch(console.error)),o)&&(o.has_only_default_variant=(null===(n=o)||void 0===n?void 0:n.has_only_default_variant)||A(null===(s=o)||void 0===s?void 0:s.options));return Object.assign({},o)},O=async t=>{const e={},i=t.map((async t=>{e[t]=await(async t=>{const e=L("products",t,"section_id=product-json"),i=await fetchCache(e);if(i&&!/^/.test(i)){const t=x("div",null);t.innerHTML=i;const e=t.querySelector("script.product-json");if(e){const i=JSON.parse(e.innerText);if(i){const{dataset:o}=e;Object.entries(o).forEach((t=>{let[e,o]=t;return i[(n=e,n.replace(/[A-Z]/g,(t=>`_${t.toLowerCase()}`)))]=["true","false"].indexOf(o)+1?"true"===o:o;var n}));const n=t.querySelector("script.selected-variant-json");n&&(i.selected_variant=JSON.parse(n.innerText));const s=t.querySelector("script.selected-or-first-available-variant-json");return s&&(i.selected_or_first_available_variant=JSON.parse(s.innerText)),i}}}return null})(t)}));return await Promise.all(i),t.map((t=>e[t]))},A=t=>{if(Array.isArray(t)&&1===t.length){var e;const i=t[0];if("Title"===(null==i?void 0:i.name)&&"Default Title"===(null==i||null===(e=i.values)||void 0===e?void 0:e.join()))return!0}return!1};window._getProductInstances=t=>{let e="id";return"string"==typeof t&&(e="handle"),P.Products.productInstances.filter((i=>{var o;return(null===(o=i.productData)||void 0===o?void 0:o[e])===t}))};function T(t,e){M(t);var i=function(t,e){M(t),function(t){if(!Array.isArray(t))throw new TypeError(t+" is not an array.");if(0===t.length)return[];if(!t[0].hasOwnProperty("name"))throw new Error(t[0]+"does not contain name key.");if("string"!=typeof t[0].name)throw new TypeError("Invalid value type passed for name of option "+t[0].name+". Value should be string.")}(e);var i=[];return e.forEach((function(e){for(var o=0;o{var t,e,i,o;switch(this.view){case"product-template":this.layout=(null===(t=this.container)||void 0===t||null===(e=t.closest)||void 0===e||null===(i=e.call(t,'div[data-section-type="product-page"]'))||void 0===i||null===(o=i.dataset)||void 0===o?void 0:o.layout)||"layout-1",window.__sfWindowLoaded?(this.initLightbox(),this.initPlyrs()):window.addEventListener("load",(()=>{this.initPlyrs(),this.initLightbox()})),this.addEventToMainMedias(),await this.initSlider(),"slider"!==this.mediaMode&&(this.mediaMode="gallery");break;case"featured-product":this.initSlider();break;case"card":case"sticky-atc":this.mediaMode="featured-image";break;case"quick-view":this.mediaMode="featured-image",this.initSlider()}})),(0,t.Z)(this,"initPlyrs",(()=>{var t,e;null!==(t=this.domNodes)&&void 0!==t&&null!==(e=t.videos)&&void 0!==e&&e.length&&loadAssets(["plyr.css","plyr.js"]).then((()=>{var t,e;null===(t=[...null===(e=this.domNodes)||void 0===e?void 0:e.videos])||void 0===t||t.forEach((t=>{var e;const i=null!=t&&null!==(e=t.classList)&&void 0!==e&&e.contains("local-video")?null==t?void 0:t.querySelector("video"):t,o=new H.Plyr(i);if(o.on("playing",(()=>{var t,e;(null==this?void 0:this.currPlayer)!==o&&(null==this||null===(t=this.currPlayer)||void 0===t||null===(e=t.pause)||void 0===e||e.call(t),this.currPlayer=o)})),t.plyr=o,this.enableVideoAutoplay){if(!i.closest(".product-mb__media")){const t=i.closest(".sf-prod-media-item"),e=new IntersectionObserver((t=>{t.forEach((t=>{var e,i;1===t.intersectionRatio?(null==this||null===(e=this.currPlayer)||void 0===e||null===(i=e.pause)||void 0===i||i.call(e),o.play(),this.currPlayer=o):o.pause()}))}),{threshold:1});e.observe(t),o.on("pause",(()=>e.unobserve(t)))}}}))})).catch((t=>{}))})),(0,t.Z)(this,"initLightbox",(()=>{this.enableImageZoom&&loadAssets(["glightbox.css","glightbox.js"]).then((()=>{var t,e;const i=null==this||null===(t=this.productData)||void 0===t||null===(e=t.media)||void 0===e?void 0:e.map((t=>{if("image"===t.media_type)return{href:t.src,type:"image"};if("external_video"===t.media_type){return{href:N(t.external_id,t.host),type:"video",source:t.host}}if("video"===t.media_type){var e,i;return{href:null==t||null===(e=t.sources)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.url,type:"video"}}if("model"===t.media_type){var o;const e=null===(o=document.querySelector(`.media-model[data-media-id="${t.id}"]`))||void 0===o?void 0:o.cloneNode(!0);return e.classList.remove("hidden"),e.classList.add("model-in-lightbox"),{content:e,width:"80vw",height:"70vh"}}}));this.lightbox=new H.GLightbox({elements:i,openEffect:"fade",closeEffect:"fade",draggable:!1,autofocusVideos:!0})})).catch((t=>{}))})),(0,t.Z)(this,"initSlider",(async()=>{var t;null!=this&&null!==(t=this.domNodes)&&void 0!==t&&t.slider&&(this.mediaMode="slider",loadAssets(["swiper.css","swiper.js"]).then((()=>{const{view:t,domNodes:{slider:e,sliderPagination:i,navSlider:o,sliderNextEl:n,sliderPrevEl:s}}=this,r="product-template"===t?this.layout:t;let a=0;var l;this.productData.initialVariant&&this.productData.selected_variant&&(a=(null===(l=this.productData.initialVariant.featured_media)||void 0===l?void 0:l.position)-1||0);this.navSlider=o?new H.Swiper(o,{initialSlide:a,slidesPerView:5,freeMode:!0,spaceBetween:10,watchSlidesVisibility:!0,watchSlidesProgress:!0,direction:"layout-6"===r?"vertical":"horizontal",on:{init:()=>o.style.opacity=1}}):null;const d=this.navSlider?{thumbs:{swiper:this.navSlider}}:{},c=Object.assign({},function(t){const e=V[t]||V["layout-4"];return Object.assign({},j,e)}(r),{initialSlide:a,autoHeight:!0,navigation:{nextEl:n,prevEl:s},pagination:{el:i,clickable:!0,type:"bullets"},...d,on:{init:()=>{e.style.opacity=1,this.domNodes=queryDomNodes(this.selectors,this.container)}}});"product-template"===this.view?($().register("screen and (max-width: 767px)",{match:this.initMobileSlider}),$().register("screen and (min-width: 768px)",{match:()=>this.slider=new H.Swiper(e,c)})):this.slider=new H.Swiper(e,c),this.handleSlideChange()})).catch((t=>{})))})),(0,t.Z)(this,"initMobileSlider",(()=>{const{domNodes:{navSliderMobile:t}}=this;let e=0;var i;this.productData.initialVariant&&this.productData.selected_variant&&(e=(null===(i=this.productData.initialVariant.featured_media)||void 0===i?void 0:i.position)-1||0);this.navSliderMobile=t?new H.Swiper(t,{initialSlide:e,slidesPerView:3,spaceBetween:10,on:{init:()=>t.style.opacity=1}}):null;const o=this.domNodes.mediaMobile.querySelector(this.selectors.slider);this.mobileSlider=new H.Swiper(o,{initialSlide:e,autoHeight:!0,pagination:{el:this.domNodes.mediaMobile.querySelector(this.selectors.sliderPagination),clickable:!0,type:"bullets"},thumbs:{swiper:this.navSliderMobile,autoScrollOffset:1},on:{init:()=>o.style.opacity=1}})})),(0,t.Z)(this,"handleSlideChange",(()=>{if(!this.slider)return;let t=!0,e="",i=[];const{previewWrapper:o}=this.domNodes;this.slider.on("slideChange",(n=>{try{var s,r;const{slides:l,activeIndex:d}=n;if(o){const t=l[d].dataset.aspectRatio||1,e="layout-5"===("product-template"===this.view?this.layout:this.view)?2:1;o.style.setProperty("--aspect-ratio",t*e)}null==this||null===(s=this.currPlayer)||void 0===s||null===(r=s.pause)||void 0===r||r.call(s);const c=l[d];if(c&&"video"===c.dataset.mediaType){const t=c.firstElementChild.plyr;t&&(t.play(),this.currPlayer=t)}i=[d],"layout-5"!==this.layout&&"layout-7"!==this.layout||i.push(d+1);for(let t of i){var a;const i=l[t];if(e=null==i||null===(a=i.dataset)||void 0===a?void 0:a.mediaType,"model"===e)break}"model"===e?(this.slider.allowTouchMove=!1,t=!1):(t||(this.slider.allowTouchMove=!0),t=!0)}catch(t){}}))})),(0,t.Z)(this,"changeMediaByVariant",(t=>{if(t)if("slider"===this.mediaMode){if(t.featured_media){var e,i,o;const l=(null==t||null===(e=t.featured_media)||void 0===e?void 0:e.position)||0;var n,s,r,a;if(this.slider&&null!==(i=this.slider)&&void 0!==i&&i.wrapperEl)null==this||null===(n=this.slider)||void 0===n||null===(s=n.slideToLoop)||void 0===s||s.call(n,l-1);if(this.mobileSlider&&null!==(o=this.mobileSlider)&&void 0!==o&&o.wrapperEl)null==this||null===(r=this.mobileSlider)||void 0===r||null===(a=r.slideToLoop)||void 0===a||a.call(r,l-1)}}else if("featured-image"===this.mediaMode){var l;const e=null==t||null===(l=t.featured_image)||void 0===l?void 0:l.src,{featuredImage:i}=this.domNodes,o=null==i?void 0:i.querySelector("img");if(o&&e){var d,c,u,p;o.src=e,o.removeAttribute("srcset");const n=(null===(d=this.productData)||void 0===d||null===(c=d.initialVariant)||void 0===c?void 0:c.id)===(null==t?void 0:t.id)?"add":"remove";null==i||null===(u=i.classList)||void 0===u||null===(p=u[n])||void 0===p||p.call(u,"group-hover:opacity-0")}}})),(0,t.Z)(this,"addEventToMainMedias",(()=>{(0,n.X)({selector:this.selectors.medias[0],context:this.container,handler:(t,e)=>{var i;const o=e.classList.contains("media-type-image"),n=null==t||null===(i=t.target)||void 0===i?void 0:i.closest(this.selectors.mediaZoomIns[0]);if(o||n){var s,r,a;const t=Number(null==e||null===(s=e.dataset)||void 0===s?void 0:s.index)||0;null===(r=this.currPlayer)||void 0===r||r.pause(),null==this||null===(a=this.lightbox)||void 0===a||a.openAt(t)}}})})),this.productData=s,this.container=o,this.view=(null==o||null===(i=o.dataset)||void 0===i?void 0:i.view)||"product-template",this.domNodes=queryDomNodes(this.selectors,this.container),this.enableVideoAutoplay="true"===this.domNodes.form.dataset.enableVideoAutoplay,this.enableImageZoom="true"===this.domNodes.form.dataset.enableImageZoom,this.init().catch(console.error)}}var R=i(4558).GQ,U=i(4558).LE,W=i(4558).rZ,X=i(4558).s0;class Y{constructor(e){var i,o,s;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,t.Z)(this,"selectors",{price:".prod__price",comparePrice:".prod__compare_price",error:".prod__form-error",addToCart:".add-to-cart",variantIdNode:'[name="id"]',optionNodes:[".product-option-item"],optionLabels:["[data-option-label]"],quantityInput:'.quantity-input__element[name="quantity"]',quantityBtns:[".quantity-input__button"],variantDropdown:".sf-product-variant-option-dropdown",dynamicCheckout:".prod__dynamic_checkout",productSKU:"[data-variant-sku]",productAvailability:"[data-availability]",savingLabel:".prod__tag-saving",savingAmount:"[data-saved-price]",unitPrice:".price-unit-price",stockCountdown:".prod__stock-countdown",soldOutBadge:".prod__tag--soldout"}),(0,t.Z)(this,"setData",(()=>{this.view=this.productBlock.dataset.view||"product-template",this.hasCustomRequiredFields=!!this.productForm.querySelector(".product__custom-field [name][required]"),this.hide_unavailable_product_options=R.hide_unavailable_product_options,this.activeOptionNodeByPosition={},this.listeners=[]})),(0,t.Z)(this,"init",(async()=>{var t;this.productData=await Z(this.productForm.dataset),null!==(t=this.productData)&&void 0!==t&&t.variants&&(this.domNodes.dynamicCheckout&&(this.productData.enable_dynamic_checkout=!0),this.initProductEvents(),this.productHelper=new z({container:this.productBlock,productData:this.productData}),this.initProductVariant())})),(0,t.Z)(this,"initProductVariant",(()=>{const{domNodes:{variantIdNode:t},productData:e,productData:{variants:i}={}}=this;if(e&&t){let n=Number(t.value);var o;if(!n)n=null===(o=e.selected_or_first_available_variant)||void 0===o?void 0:o.id;const s=i.find((t=>t.id===n))||i[0];this.productData.initialVariant=s,!this.productData.selected_variant&&t.dataset.selectedVariant&&(this.productData.selected_variant=i.find((e=>e.id===Number(t.dataset.selectedVariant)))),null!=s&&s.options&&("card"===this.view?(this.updateOptionByVariant(s),this.updateProductCardSoldOutBadge(s)):this.updateBySelectedVariant(s)),this.initOptions()}})),(0,t.Z)(this,"initOptions",(()=>{const{_colorSwatches:t=[],_imageSwatches:e=[]}=R;this.domNodes.optionNodes.forEach((i=>{var o,n,s,r;const{optionType:l,optionPosition:d,value:c}=null==i?void 0:i.dataset,u=null==c?void 0:c.toLowerCase(),p=this.productData.variants.find((t=>t[`option${d}`]===c)),h=null!=p&&null!==(o=p.featured_image)&&void 0!==o&&o.src?a(null==p||null===(n=p.featured_image)||void 0===n?void 0:n.src,"150x"):"",m=null===(s=e.find((t=>t.key===u)))||void 0===s?void 0:s.value,v=null===(r=t.find((t=>t.key===u)))||void 0===r?void 0:r.value;switch(l){case"default":i.style.backgroundImage=`url(${m||h||""})`;break;case"image":i.style.backgroundImage=`url(${h||m||""})`;break;case"color":i.textContent=u,i.style.backgroundColor=v||u,m&&(i.style.backgroundImage=`url(${m})`)}}))})),(0,t.Z)(this,"initProductEvents",(async()=>{this.listeners=[(0,n.X)({event:"change",context:this.productForm,selector:this.selectors.variantDropdown,handler:this.handleSelectVariant}),(0,n.X)({context:this.productForm,selector:this.selectors.optionNodes[0],handler:this.handleSelectVariant}),(0,n.X)({context:this.productForm,selector:this.selectors.addToCart,handler:this.handleAddToCart}),(0,n.X)({context:this.productForm,selector:this.selectors.quantityBtns[0],handler:this.handleQtyBtnClick}),(0,n.X)({event:"change",context:this.productForm,selector:this.selectors.quantityInput,handler:this.handleQtyInputChange})];const{dynamicCheckout:t}=this.domNodes;t&&this.hasCustomRequiredFields&&t.addEventListener("click",(t=>{S(this.productForm).length>0&&(t.stopPropagation(),U.Notification.show({target:this.domNodes.error,method:"appendChild",type:"warning",message:W.requiredField,delay:100}))}),!0)})),(0,t.Z)(this,"unsubscribeEvents",(()=>{this.listeners.forEach((t=>t()))})),(0,t.Z)(this,"handleQtyInputChange",(t=>{X.emit(`${this.productData.id}__QUANTITY_CHANGE`,Number(t.target.value),this)})),(0,t.Z)(this,"handleQtyBtnClick",((t,e)=>{const{quantitySelector:i}=e.dataset,{quantityInput:o}=this.domNodes,n=Number(o.value);let s=n;s="decrease"===i?n>1?n-1:1:n+1,o.value=s,X.emit(`${this.productData.id}__QUANTITY_CHANGE`,s,this)})),(0,t.Z)(this,"getVariantFromActiveOptions",(()=>{const{productData:t,productData:{initialVariant:e},activeOptionNodeByPosition:i,productBlock:o}=this;let n;if("card"===o.dataset.view){const t={1:e.option1,2:e.option2,3:e.option3};Object.values(i).forEach((e=>{const{optionPosition:i,value:o}=e.dataset;t[i]=o})),n=Object.values(t)}else n=Object.values(i).map((t=>t.dataset.value));n=n.filter(Boolean);let s=I(t,n);return!s&&this.hide_unavailable_product_options&&(n.pop(),s=I(t,n),s||(n.pop(),s=I(t,n))),s})),(0,t.Z)(this,"handleSelectVariant",(t=>{let e,{target:i}=t;if(i.classList.contains("combined-variant")){var o,n,s,r;const i=Number(null==t||null===(o=t.target)||void 0===o?void 0:o.value);e=null===(n=this.productData)||void 0===n||null===(s=n.variants)||void 0===s||null===(r=s.find)||void 0===r?void 0:r.call(s,(t=>t.id===i))}else{"SELECT"===i.tagName&&(i=i.querySelectorAll("option")[i.selectedIndex]),i.classList.contains("product-option-item")||(i=i.closest(".product-option-item"));const{optionPosition:t}=i.dataset,o=this.activeOptionNodeByPosition[t];this.toggleOptionNodeActive(o,!1),this.toggleOptionNodeActive(i,!0),e=this.getVariantFromActiveOptions()}const{variantIdNode:a}=this.domNodes;var l,d;a&&(a.setAttribute("value",String(null===(l=e)||void 0===l?void 0:l.id)),a.value=String(null===(d=e)||void 0===d?void 0:d.id));this.updateBySelectedVariant(e)})),(0,t.Z)(this,"hideSoldoutAndUnavailableOptions",(t=>{if("card"===this.view)return;const{productData:e,productData:{variants:i,options:{length:o}},domNodes:{optionNodes:n}}=this;n.forEach((n=>{const{optionPosition:s,value:r}=n.dataset,a=Number(s);let l=[];if(a===o){const i=Array.from(t.options);i[o-1]=r,l.push(I(e,i))}else l=i.filter((e=>e.options[a-1]===r&&e.options[a-2]===t["option"+(a-1)]));l=l.filter(Boolean);const d="OPTION"===n.tagName,c=this.hide_unavailable_product_options?"unavailable-opt":"_";if(l.length){n.classList.remove(c),d&&n.removeAttribute("disabled");const t=l.every((t=>!1===t.available))?"add":"remove";n.classList[t]("soldout-opt")}else n.classList.add(c),d&&(n.disabled=!0)}))})),(0,t.Z)(this,"updatePriceByVariant",(t=>{if("card"===this.view&&R.pcard_show_lowest_prices)return;const{comparePrice:e,price:i,savingAmount:o,savingLabel:n}=this.domNodes;if(t){const a=R.money_format,l=formatMoney(t.price,a);if(i&&(i.innerHTML=l),e)if(t.compare_at_price>t.price){const i=formatMoney(t.compare_at_price,a);e.innerHTML=i,e.classList.remove("hidden")}else e.classList.add("hidden");if(n&&o){t.compare_at_price>t.price?n.classList.remove("hidden"):n.classList.add("hidden");const e=100*(t.compare_at_price-t.price)/t.compare_at_price;o.textContent=Math.round(e)+"%"}if(t.unit_price_measurement){var s;null===(s=this.domNodes.unitPrice)||void 0===s||s.classList.remove("hidden");const e=`${formatMoney(t.unit_price,R.money_format)}/${this._getBaseUnit(t)}`;this.domNodes.unitPrice.innerHTML=e}else{var r;null===(r=this.domNodes.unitPrice)||void 0===r||r.classList.add("hidden")}}else n&&n.classList.add("hidden")})),(0,t.Z)(this,"_getBaseUnit",(t=>1===t.unit_price_measurement.reference_value?t.unit_price_measurement.reference_unit:t.unit_price_measurement.reference_value+t.unit_price_measurement.reference_unit)),(0,t.Z)(this,"updateStockCountdownByVariant",(t=>{const{stockCountdown:e}=this.domNodes;if(e){var i,o;const n=t.available?"remove":"add";if(null==e||null===(i=e.classList)||void 0===i||null===(o=i[n])||void 0===o||o.call(i,"hidden"),"use_quantity"===e.dataset.countdownType){const i=e.querySelector("[data-countdown-number]");i&&(i.textContent=t.inventory_quantity>0?t.inventory_quantity:t.id.toString().split("")[13]- -1)}}})),(0,t.Z)(this,"updateSkuByVariant",(t=>{var e;t.sku&&null!==(e=this.domNodes)&&void 0!==e&&e.productSKU&&(this.domNodes.productSKU.innerText=t.sku)})),(0,t.Z)(this,"updateAvailabilityByVariant",(t=>{const{productAvailability:e}=this.domNodes;if(e){const{inStock:i,outOfStock:o}=W,n=t.available?"remove":"add";e.innerText=t.available?i:o,e.classList[n]("prod__availability--outofstock")}})),(0,t.Z)(this,"updateOptionLabel",((t,e)=>{var i,o;const n=null===(i=this.domNodes.optionLabels)||void 0===i||null===(o=i.find)||void 0===o?void 0:o.call(i,(e=>Number(e.dataset.labelPosition)===Number(t)));n&&(n.textContent=e)})),(0,t.Z)(this,"toggleOptionNodeActive",((t,e)=>{if(t)if(e){const{optionPosition:e,value:i}=t.dataset;switch(this.activeOptionNodeByPosition[e]=t,this.updateOptionLabel(e,i),t.tagName){case"INPUT":t.checked="checked",t.dataset.selected="true";break;case"OPTION":t.dataset.selected="true";const e=t.closest("select");e&&(e.value=t.value);break;case"DIV":t.dataset.selected="true",["default","image","color"].includes(t.dataset.optionType)&&t.parentElement.classList.add("sf_variant-selected")}}else{["default","image","color"].includes(t.dataset.optionType)?t.parentElement.classList.remove("sf_variant-selected"):t.style.border="",t.checked=!1,delete t.dataset.selected;const e=t.closest("select");e&&(e.value="")}})),(0,t.Z)(this,"updateBySelectedVariant",(t=>{this.updateATCButtonByVariant(t),t&&t.id!==this.productData.current_variant_id&&(this.updateOptionByVariant(t),this.updatePriceByVariant(t),this.updateStockCountdownByVariant(t),this.updateSkuByVariant(t),this.updateAvailabilityByVariant(t),this.updateBrowserHistory(t),this.hideSoldoutAndUnavailableOptions(t),this.updateProductCardSoldOutBadge(t),this.productData.current_variant_id=t.id,this.changeProductImage(t)),X.emit(`${this.productData.id}__VARIANT_CHANGE`,t,this)})),(0,t.Z)(this,"updateProductCardSoldOutBadge",(t=>{"card"===this.view&&this.domNodes.soldOutBadge&&(this.domNodes.soldOutBadge.style.display=t.available?"none":"flex")})),(0,t.Z)(this,"updateOptionByVariant",(t=>{Object.values(this.activeOptionNodeByPosition).forEach((t=>this.toggleOptionNodeActive(t,!1)));const{optionNodes:e}=this.domNodes,{options:i=[]}=t||{};i.forEach(((t,i)=>{const o=i+1;e.forEach((e=>{const i=Number(e.dataset.optionPosition),n=e.dataset.value;i===o&&t===n&&this.toggleOptionNodeActive(e,!0)}))}))})),(0,t.Z)(this,"updateATCButtonByVariant",(t=>{var e;const{soldOut:i,unavailable:o,addToCart:n}=W,{addToCart:s,dynamicCheckout:r}=this.domNodes,a=null==s||null===(e=s.querySelector)||void 0===e?void 0:e.call(s,".atc-text");var l,d,c,u,p,h,m,v;null!=t&&t.available?(null==s||null===(l=s.classList)||void 0===l||null===(d=l.remove)||void 0===d||d.call(l,"disabled"),a&&(a.innerText=s.dataset.atcText||n),null==r||null===(c=r.classList)||void 0===c||null===(u=c.remove)||void 0===u||u.call(c,"disabled")):(null==s||null===(p=s.classList)||void 0===p||null===(h=p.add)||void 0===h||h.call(p,"disabled"),a&&("boolean"==typeof(null==t?void 0:t.available)?a.innerText=i:a.innerText=o),null==r||null===(m=r.classList)||void 0===m||null===(v=m.add)||void 0===v||v.call(m,"disabled"))})),(0,t.Z)(this,"updateBrowserHistory",(t=>{var e,i;const o="true"===(null===(e=this.productForm)||void 0===e||null===(i=e.dataset)||void 0===i?void 0:i.enableHistoryState),{has_only_default_variant:n,current_variant_id:s}=this.productData;if(t&&o&&!n&&s){const e=function(t,e){return/variant=/.test(t)?t.replace(/(variant=)[^&]+/,"$1"+e):/\?/.test(t)?t.concat("&variant=").concat(e):t.concat("?variant=").concat(e)}(window.location.href,t.id);window.history.replaceState({path:e},"",e)}})),(0,t.Z)(this,"changeProductImage",(t=>{var e;null===(e=this.productHelper)||void 0===e||e.changeMediaByVariant(t)})),(0,t.Z)(this,"handleAddToCart",(async t=>{var e,i;if(S(this.productForm).length>0)return null==t||null===(e=t.preventDefault)||void 0===e||e.call(t),U.Notification.show({target:null==this||null===(i=this.domNodes)||void 0===i?void 0:i.error,method:"appendChild",type:"warning",message:W.requiredField});if(R.use_ajax_atc){var o;null==t||null===(o=t.preventDefault)||void 0===o||o.call(t),this.toggleSpinner(!0);let e=new FormData(this.productForm);"function"==typeof e._asNative&&(e=e._asNative().fd);const i=e.get("source_event")||"product-form";this.cartAddFromForm(e).then((t=>t.json())).then((t=>{var e;422===(null==t?void 0:t.status)?U.Notification.show({target:null==this||null===(e=this.domNodes)||void 0===e?void 0:e.error,method:"appendChild",type:"warning",message:(null==t?void 0:t.description)||"Unable to add item to cart!"}):(t.source=i,window.Shopify.onItemAdded(t));setTimeout((()=>this.toggleSpinner(!1)),500)}))}})),(0,t.Z)(this,"cartAddFromForm",(t=>{const e=getRequestDefaultConfigs();return delete e.headers["Content-Type"],e.method="POST",e.body=t,fetch("/cart/add.js",e)})),(0,t.Z)(this,"toggleSpinner",(t=>{const e=t?"add":"remove";this.productForm.classList[e]("adding")})),(0,t.Z)(this,"serializeForm",(t=>{let e={};for(var i of t.keys())e[i]=t.get(i);return e})),null!=e&&null!==(i=e.classList)&&void 0!==i&&i.contains("initialized"))return;const{autoInit:l=!0,saveInstanceToDOM:d=!1}=r;this.productForm=e,this.productBlock=null==e?void 0:e.closest(".sf-prod__block"),this.domNodes=queryDomNodes(this.selectors,this.productBlock),this.setData(),d&&(this.productForm._productInstane=this),l&&this.init().catch(console.error),this.productForm.classList.add("initialized"),null===(o=U.Products)||void 0===o||null===(s=o.productInstances)||void 0===s||s.push(this)}}class Q{constructor(){var e=this;(0,t.Z)(this,"productInstances",[]),(0,t.Z)(this,"initProductForms",(async function(){let{context:t=document.documentElement,forceReInit:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i&&(e.productInstances.forEach((t=>null==t?void 0:t.unsubscribeEvents())),e.productInstances=[]),[...t.querySelectorAll("form[data-product-id]")].forEach((t=>{t.classList.contains("initialized")&&!i||new Y(t)}))}))}}var G=i(4558).GQ,J=i(4558).s0,K=i(4558).LE,tt=i(6295).Z;window.FoxKit=window.FoxKit||{},window.FoxKit.PrePurchase=class{constructor(e){(0,t.Z)(this,"selectors",{container:".f-upsell",productContainer:'[data-section-id="product-template"]',productItem:".f-upsell__product",productOptions:[".f-upsell__product-variant"]}),(0,t.Z)(this,"classes",{}),(0,t.Z)(this,"appURL",G.foxkitAppURL),(0,t.Z)(this,"cartCount",0),(0,t.Z)(this,"cartTotal",0),(0,t.Z)(this,"init",(async()=>{var t,e;null===(t=(e=J).subscribe)||void 0===t||t.call(e,"ON_ITEM_ADDED",(async t=>{if(t&&"incart-upsell"!==t.source){var e,i,o,n;this.product={featured_image:null===(e=t.featured_image)||void 0===e?void 0:e.url,handle:t.handle,id:t.product_id,title:t.product_title};const l=await this.getOffer(t.product_id);var s,r,a;if(null!=l&&l.ok&&null!=l&&null!==(i=l.payload)&&void 0!==i&&i.prePurchase&&null!=l&&null!==(o=l.payload)&&void 0!==o&&null!==(n=o.prePurchase)&&void 0!==n&&n.recommended_products.length)null===(s=K)||void 0===s||null===(r=s.ProductQuickView)||void 0===r||r.close(),this.settings=null===(a=l.payload)||void 0===a?void 0:a.prePurchase,this.open()}}))})),(0,t.Z)(this,"open",(async()=>{await this.getProductsJson(),this.component=tt(_,{product:this.product,recommended_products:this.products,settings:this.settings,cart:this.cart});(new Q).initProductForms({context:this.component}).catch(console.error),this.popup.removeChild(),this.popup.appendChild(this.component),this.popup.open()})),(0,t.Z)(this,"getOffer",(t=>new Promise(((e,i)=>{let o=`${this.appURL}/api/public/?shop=${window.Shopify.shop}&plugin=prePurchase&productId=${t}`;fetch(o).then((t=>t.json())).then(e).catch(i)})))),(0,t.Z)(this,"getProductsJson",(async()=>{var t;this.products=await O(null===(t=this.settings)||void 0===t?void 0:t.recommended_products)})),this.settings=e,this.domNodes=queryDomNodes(this.selectors),this.popup=new r,this.appURL=`https://${this.appURL}`,this.init()}}}()}();