import{h as o,F as m}from"./p-d108bbcc.js";const t={AED:{moneyFormat:"Dhs. {{amount}}",moneyWithCurrencyFormat:"Dhs. {{amount}} AED"},AFN:{moneyFormat:"{{amount}}؋",moneyWithCurrencyFormat:"{{amount}}؋ AFN"},ALL:{moneyFormat:"Lek {{amount}}",moneyWithCurrencyFormat:"Lek {{amount}} ALL"},AMD:{moneyFormat:"{{amount}} AMD",moneyWithCurrencyFormat:"{{amount}} AMD"},ANG:{moneyFormat:"ƒ;{{amount}}",moneyWithCurrencyFormat:"{{amount}} NAƒ;"},AOA:{moneyFormat:"Kz{{amount}}",moneyWithCurrencyFormat:"Kz{{amount}} AOA"},ARS:{moneyFormat:"${{amount_with_comma_separator}}",moneyWithCurrencyFormat:"${{amount_with_comma_separator}} ARS"},AUD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} AUD"},AWG:{moneyFormat:"Afl{{amount}}",moneyWithCurrencyFormat:"Afl{{amount}} AWG"},AZN:{moneyFormat:"m.{{amount}}",moneyWithCurrencyFormat:"m.{{amount}} AZN"},BAM:{moneyFormat:"KM {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"KM {{amount_with_comma_separator}} BAM"},BBD:{moneyFormat:"${{nt}}",moneyWithCurrencyFormat:"${{amount}} Bds"},BDT:{moneyFormat:"Tk {{amount}}",moneyWithCurrencyFormat:"Tk {{amount}} BDT"},BGN:{moneyFormat:"{{amount}} лв",moneyWithCurrencyFormat:"{{amount}} лв BGN"},BIF:{moneyFormat:"FBu. {{amount_no_decimals}}",moneyWithCurrencyFormat:"FBu. {{amount_no_decimals}} BIF"},BMD:{moneyFormat:"BD${{amount}}",moneyWithCurrencyFormat:"BD${{amount}} BMD"},BND:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} BND"},BOB:{moneyFormat:"Bs{{amount_with_comma_separator}}",moneyWithCurrencyFormat:"Bs{{amount_with_comma_separator}} BOB"},BRL:{moneyFormat:"R$ {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"R$ {{amount_with_comma_separator}} BRL"},BSD:{moneyFormat:"BS${{amount}}",moneyWithCurrencyFormat:"BS${{amount}} BSD"},BWP:{moneyFormat:"P{{amount}}",moneyWithCurrencyFormat:"P{{amount}} BWP"},BZD:{moneyFormat:"BZ${{amount}}",moneyWithCurrencyFormat:"BZ${{amount}} BZD"},CAD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} CAD"},CDF:{moneyFormat:"FC{{amount}}",moneyWithCurrencyFormat:"FC{{amount}} CDF"},CHF:{moneyFormat:"CHF {{amount}}",moneyWithCurrencyFormat:"CHF {{amount}}"},CLP:{moneyFormat:"${{amount_no_decimals_with_comma_separator}}",moneyWithCurrencyFormat:"${{amount_no_decimals_with_comma_separator}} CLP"},CNY:{moneyFormat:"¥{{amount}}",moneyWithCurrencyFormat:"¥{{amount}} CNY"},COP:{moneyFormat:"${{amount_with_comma_separator}}",moneyWithCurrencyFormat:"${{amount_with_comma_separator}} COP"},CRC:{moneyFormat:"₡ {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"₡ {{amount_with_comma_separator}} CRC"},CVE:{moneyFormat:"{{amount_with_space_separator}}$",moneyWithCurrencyFormat:"{{amount_with_space_separator}}$ CVE"},CZK:{moneyFormat:"{{amount_with_comma_separator}} Kč",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} Kč"},DJF:{moneyFormat:"{{amount_no_decimals_with_comma_separator}} Fdj",moneyWithCurrencyFormat:"{{amount_no_decimals_with_comma_separator}} DJF"},DKK:{moneyFormat:"{{amount_with_comma_separator}} kr",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} DKK"},DOP:{moneyFormat:"RD$ {{amount}}",moneyWithCurrencyFormat:"RD$ {{amount}}"},DZD:{moneyFormat:"DA {{amount}}",moneyWithCurrencyFormat:"DA {{amount}} DZD"},EGP:{moneyFormat:"LE {{amount}}",moneyWithCurrencyFormat:"LE {{amount}} EGP"},ETB:{moneyFormat:"Br{{amount}}",moneyWithCurrencyFormat:"Br{{amount}} ETB"},EUR:{moneyFormat:"€{{amount_with_comma_separator}}",moneyWithCurrencyFormat:"€{{amount_with_comma_separator}} EUR"},FJD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"FJ${{amount}}"},FKP:{moneyFormat:"£{{amount}}",moneyWithCurrencyFormat:"£{{amount}} FKP"},GBP:{moneyFormat:"£{{amount}}",moneyWithCurrencyFormat:"£{{amount}} GBP"},GEL:{moneyFormat:"{{amount}} GEL",moneyWithCurrencyFormat:"{{amount}} GEL"},GIP:{moneyFormat:"£{{amount}}",moneyWithCurrencyFormat:"£{{amount}} GIP"},GMD:{moneyFormat:"D {{amount}}",moneyWithCurrencyFormat:"D {{amount}} GMD"},GNF:{moneyFormat:"FG {{amount_no_decimals}}",moneyWithCurrencyFormat:"FG {{amount_no_decimals}} GNF"},GTQ:{moneyFormat:"Q{{amount}}",moneyWithCurrencyFormat:"{{amount}} GTQ"},GYD:{moneyFormat:"G${{amount}}",moneyWithCurrencyFormat:"${{amount}} GYD"},HKD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"HK${{amount}}"},HNL:{moneyFormat:"L {{amount}}",moneyWithCurrencyFormat:"L {{amount}} HNL"},HRK:{moneyFormat:"{{amount_with_comma_separator}} kn",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} kn HRK"},HTG:{moneyFormat:"G {{amount}}",moneyWithCurrencyFormat:"{{amount}} HTG"},HUF:{moneyFormat:"{{amount_no_decimals_with_comma_separator}}",moneyWithCurrencyFormat:"{{amount_no_decimals_with_comma_separator}} Ft"},IDR:{moneyFormat:"Rp {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"Rp {{amount_with_comma_separator}} IDR"},ILS:{moneyFormat:"{{amount}} NIS",moneyWithCurrencyFormat:"{{amount}} NIS"},INR:{moneyFormat:"Rs. {{amount}}",moneyWithCurrencyFormat:"Rs. {{amount}}"},ISK:{moneyFormat:"{{amount_no_decimals_with_comma_separator}} kr",moneyWithCurrencyFormat:"{{amount_no_decimals_with_comma_separator}} ISK"},JMD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} JMD"},JPY:{moneyFormat:"¥{{amount_no_decimals}}",moneyWithCurrencyFormat:"¥{{amount_no_decimals}} JPY"},KES:{moneyFormat:"KSh{{amount}}",moneyWithCurrencyFormat:"KSh{{amount}}"},KGS:{moneyFormat:"лв{{amount}}",moneyWithCurrencyFormat:"лв{{amount}}"},KHR:{moneyFormat:"KHR{{amount}}",moneyWithCurrencyFormat:"KHR{{amount}}"},KMF:{moneyFormat:"{{amount_no_decimals_with_comma_separator}} CF",moneyWithCurrencyFormat:"{{amount_no_decimals_with_comma_separator}} CF"},KRW:{moneyFormat:"₩{{amount_no_decimals}}",moneyWithCurrencyFormat:"₩{{amount_no_decimals}} KRW"},KYD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} KYD"},KZT:{moneyFormat:"{{amount}} KZT",moneyWithCurrencyFormat:"{{amount}} KZT"},LAK:{moneyFormat:"₭{{amount}}",moneyWithCurrencyFormat:"₭{{amount}} LAK"},LBP:{moneyFormat:"L£{{amount}}",moneyWithCurrencyFormat:"L£{{amount}} LBP"},LKR:{moneyFormat:"Rs {{amount}}",moneyWithCurrencyFormat:"Rs {{amount}} LKR"},LRD:{moneyFormat:"L${{amount}}",moneyWithCurrencyFormat:"L${{amount}} LRD"},LSL:{moneyFormat:"M{{amount}}",moneyWithCurrencyFormat:"M{{amount}} LSL"},MAD:{moneyFormat:"{{amount}} dh",moneyWithCurrencyFormat:"Dh {{amount}} MAD"},MDL:{moneyFormat:"{{amount}} MDL",moneyWithCurrencyFormat:"{{amount}} MDL"},MKD:{moneyFormat:"ден {{amount}}",moneyWithCurrencyFormat:"ден {{amount}} MKD"},MMK:{moneyFormat:"K{{amount}}",moneyWithCurrencyFormat:"K{{amount}} MMK"},MNT:{moneyFormat:"{{amount_no_decimals}} ₮",moneyWithCurrencyFormat:"{{amount_no_decimals}} MNT"},MOP:{moneyFormat:"MOP${{amount}}",moneyWithCurrencyFormat:"MOP${{amount}}"},MUR:{moneyFormat:"Rs {{amount}}",moneyWithCurrencyFormat:"Rs {{amount}} MUR"},MVR:{moneyFormat:"Rf{{amount}}",moneyWithCurrencyFormat:"Rf{{amount}} MRf"},MWK:{moneyFormat:"Mk{{amount}}",moneyWithCurrencyFormat:"Mk{{amount}} MWK"},MXN:{moneyFormat:"$ {{amount}}",moneyWithCurrencyFormat:"$ {{amount}} MXN"},MYR:{moneyFormat:"RM{{amount}} MYR",moneyWithCurrencyFormat:"RM{{amount}} MYR"},MZN:{moneyFormat:"{{amount}} Mt",moneyWithCurrencyFormat:"Mt {{amount}} MZN"},NAD:{moneyFormat:"N${{amount}}",moneyWithCurrencyFormat:"N${{amount}} NAD"},NGN:{moneyFormat:"₦{{amount}}",moneyWithCurrencyFormat:"₦{{amount}} NGN"},NIO:{moneyFormat:"C${{amount}}",moneyWithCurrencyFormat:"C${{amount}} NIO"},NOK:{moneyFormat:"{{amount_with_comma_separator}} kr",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} NOK"},NPR:{moneyFormat:"Rs{{amount}}",moneyWithCurrencyFormat:"Rs{{amount}} NPR"},NZD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} NZD"},PAB:{moneyFormat:"B/. {{amount}}",moneyWithCurrencyFormat:"B/. {{amount}} PAB"},PEN:{moneyFormat:"S/. {{amount}}",moneyWithCurrencyFormat:"S/. {{amount}} PEN"},PGK:{moneyFormat:"K {{amount}}",moneyWithCurrencyFormat:"K {{amount}} PGK"},PHP:{moneyFormat:"₱{{amount}}",moneyWithCurrencyFormat:"₱{{amount}} PHP"},PKR:{moneyFormat:"Rs.{{amount}}",moneyWithCurrencyFormat:"Rs.{{amount}} PKR"},PLN:{moneyFormat:"{{amount_with_comma_separator}} zl",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} zl PLN"},PYG:{moneyFormat:"Gs. {{amount_no_decimals_with_comma_separator}}",moneyWithCurrencyFormat:"Gs. {{amount_no_decimals_with_comma_separator}} PYG"},QAR:{moneyFormat:"QAR {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"QAR {{amount_with_comma_separator}}"},RON:{moneyFormat:"{{amount_with_comma_separator}} lei",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} lei RON"},RSD:{moneyFormat:"{{amount}} RSD",moneyWithCurrencyFormat:"{{amount}} RSD"},RUB:{moneyFormat:"руб{{amount_with_comma_separator}}",moneyWithCurrencyFormat:"руб{{amount_with_comma_separator}} RUB"},RWF:{moneyFormat:"{{amount_no_decimals}} RF",moneyWithCurrencyFormat:"{{amount_no_decimals}} RWF"},SAR:{moneyFormat:"{{amount}} SR",moneyWithCurrencyFormat:"{{amount}} SAR"},SBD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} SBD"},SCR:{moneyFormat:"Rs {{amount}}",moneyWithCurrencyFormat:"Rs {{amount}} SCR"},SEK:{moneyFormat:"{{amount_no_decimals_with_space_separator}} kr",moneyWithCurrencyFormat:"{{amount_no_decimals_with_space_separator}} SEK"},SGD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} SGD"},SHP:{moneyFormat:"£{{amount}}",moneyWithCurrencyFormat:"£{{amount}} SHP"},SLL:{moneyFormat:"Le {{amount}}",moneyWithCurrencyFormat:"Le {{amount}} SLL"},SRD:{moneyFormat:"SRD {{amount_with_comma_separator}}",moneyWithCurrencyFormat:"SRD {{amount_with_comma_separator}}"},STD:{moneyFormat:"Db {{amount}}",moneyWithCurrencyFormat:"Db {{amount}} STD"},SZL:{moneyFormat:"L {{amount}}",moneyWithCurrencyFormat:"L {{amount}} SZL"},THB:{moneyFormat:"{{amount}} ฿",moneyWithCurrencyFormat:"{{amount}} ฿ THB"},TJS:{moneyFormat:"TJS {{amount}}",moneyWithCurrencyFormat:"TJS {{amount}}"},TOP:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} TOP"},TRY:{moneyFormat:"{{amount}}TL",moneyWithCurrencyFormat:"{{amount}}TL"},TTD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} TTD"},TWD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} TWD"},TZS:{moneyFormat:"{{amount}} TZS",moneyWithCurrencyFormat:"{{amount}} TZS"},UAH:{moneyFormat:"₴{{amount}}",moneyWithCurrencyFormat:"₴{{amount}} UAH"},UGX:{moneyFormat:"Ush {{amount_no_decimals}}",moneyWithCurrencyFormat:"Ush {{amount_no_decimals}} UGX"},USD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"${{amount}} USD"},UYU:{moneyFormat:"${{amount_with_comma_separator}}",moneyWithCurrencyFormat:"${{amount_with_comma_separator}} UYU"},UZS:{moneyFormat:"{{amount_no_decimals_with_space_separator}} som",moneyWithCurrencyFormat:"{{amount_no_decimals_with_space_separator}} UZS"},VND:{moneyFormat:"{{amount_no_decimals_with_comma_separator}}₫",moneyWithCurrencyFormat:"{{amount_no_decimals_with_comma_separator}} VND"},VUV:{moneyFormat:"${{amount_no_decimals}}",moneyWithCurrencyFormat:"${{amount_no_decimals}}VT"},WST:{moneyFormat:"WS$ {{amount}}",moneyWithCurrencyFormat:"WS$ {{amount}} WST"},XAF:{moneyFormat:"FCFA{{amount_no_decimals}}",moneyWithCurrencyFormat:"FCFA{{amount_no_decimals}} XAF"},XCD:{moneyFormat:"${{amount}}",moneyWithCurrencyFormat:"EC${{amount}}"},XOF:{moneyFormat:"CFA{{amount_no_decimals}}",moneyWithCurrencyFormat:"CFA{{amount_no_decimals}} XOF"},XPF:{moneyFormat:"{{amount_no_decimals_with_space_separator}} XPF",moneyWithCurrencyFormat:"{{amount_no_decimals_with_space_separator}} XPF"},YER:{moneyFormat:"{{amount_with_comma_separator}} YER",moneyWithCurrencyFormat:"{{amount_with_comma_separator}} YER"},ZAR:{moneyFormat:"R {{amount}}",moneyWithCurrencyFormat:"R {{amount}} ZAR"},ZMW:{moneyFormat:"K{{amount_no_decimals_with_comma_separator}}",moneyWithCurrencyFormat:"ZMW{{amount_no_decimals_with_comma_separator}}"}},n=({handleOnClick:m,widget:t})=>o("div",{class:"ppcs-toast"},o("div",null,o("strong",null," ",t.content.addToCartSuccessMsg)),o("div",{class:"ppcs-toast-x ppcse-cursor-pointer",onClick:()=>{m("toastCancel")}},"x")),a=({customClass:m,additionalClass:t})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",class:`${m||"ppcse-spinner"} ${t||""}`,width:"12px",height:"12px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},o("circle",{cx:"50",cy:"50",fill:"none",stroke:"#1d0e0b","stroke-width":"6",r:"45","stroke-dasharray":"212.05750411731105 72.68583470577035"},o("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),r=(m,t)=>o("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:m,class:t||"lb_upsell_close_svg",x:"0px",y:"0px",width:"30",height:"30",viewBox:"0 0 30 30"},o("path",{d:"M 7 4 C 6.744125 4 6.4879687 4.0974687 6.2929688 4.2929688 L 4.2929688 6.2929688 C 3.9019687 6.6839688 3.9019687 7.3170313 4.2929688 7.7070312 L 11.585938 15 L 4.2929688 22.292969 C 3.9019687 22.683969 3.9019687 23.317031 4.2929688 23.707031 L 6.2929688 25.707031 C 6.6839688 26.098031 7.3170313 26.098031 7.7070312 25.707031 L 15 18.414062 L 22.292969 25.707031 C 22.682969 26.098031 23.317031 26.098031 23.707031 25.707031 L 25.707031 23.707031 C 26.098031 23.316031 26.098031 22.682969 25.707031 22.292969 L 18.414062 15 L 25.707031 7.7070312 C 26.098031 7.3170312 26.098031 6.6829688 25.707031 6.2929688 L 23.707031 4.2929688 C 23.316031 3.9019687 22.682969 3.9019687 22.292969 4.2929688 L 15 11.585938 L 7.7070312 4.2929688 C 7.5115312 4.0974687 7.255875 4 7 4 z"})),e=(o,m)=>{let t,n,a;return"number"!=typeof m&&(m=200),t=o.split("/"),n=t[t.length-1],a=`${n.substring(0,n.lastIndexOf("."))}_${m}x${m}${n.substring(n.lastIndexOf("."),n.length)}`,t[t.length-1]=a,t.join("/")},u=(o,m)=>{let t=(Math.round(100*(o/=100))/100).toFixed(2);return m?Math.round(Number(t||"0")):t};function y(o,m){let t=JSON.parse(JSON.stringify(o)),n=m?JSON.parse(JSON.stringify(m)):"{{amount}}";return t=Number(t)/100,t=(Math.round(100*t)/100).toFixed(2),n=n.replace(/\s/g,""),n.indexOf("{{amount}}")>-1&&(t=c(t)),n.indexOf("{{amount_with_comma_separator}}")>-1&&(t=i("".concat(t).replace(".",","))),n.indexOf("{{amount_no_decimals}}")>-1&&(t=c(Math.round(Number(t)))),n.indexOf("{{amount_no_decimals_with_comma_separator}}")>-1&&(t=i("".concat(`${Math.round(Number(t))}`))),n.indexOf("{{amount_with_apostrophe_separator}}")>-1&&(t=function(o){let m=o.toString().split(".");return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g,"'"),m.join(".")}(t)),n.indexOf("{{amount_no_decimals_with_space_separator}}")>-1&&(t=F("".concat(`${Math.round(Number(t))}`))),n.indexOf("{{amount_with_space_separator}}")>-1&&(t=F("".concat(t).replace(".",","))),n.indexOf("{{amount_with_period_and_space_separator}}")>-1&&(t=F(t)),n.replace(/\{\{.*?\}\}/,t).replace(/<[^>]*>/g,"")}function i(o){let m=o.toString().split(".");return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),m.join(".")}function c(o){let m=o.toString().split(".");return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),m.join(".")}function F(o){let m=o.toString().split(".");return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),m.join(".")}const _=(m,n,a=!1)=>{const r=n&&n.shopCurrencyFormat?n.shopCurrencyFormat:"";let e=n&&n.shopMoneyInEmailsFormat;n.presentmentCurrency&&n.shopCurrencyCode!==n.presentmentCurrency.active&&(e=t[n.presentmentCurrency.active].moneyFormat);let i="";return i=e?y(m||0,e):`${r}${y(m||0,"{{amount}}")}`,n.setupVersion>=9?a?`${i}`:o("span",{class:"lb-upsell-money-2 money","default-price":u(m,n.isAmountNoDecimals)},i):i};function s(o){return o.metadata&&o.metadata.presentmentCurrency?Number(o.metadata.presentmentCurrency.rate):1}function h(){if(window.conversionBearAutoCurrencyConverter){let o=document.querySelectorAll(".lb-upsell-money");o&&o.length&&(o.forEach((o=>{o.classList.add("conversion-bear-money")})),C("conversionBearAutoCurrencyConverter"))}}function C(o){"conversionBearAutoCurrencyConverter"===o&&window.conversionBearAutoCurrencyConverter&&window.conversionBearAutoCurrencyConverter.convertPricesOnPage()}function p(o,m){return setTimeout((()=>{C("conversionBearAutoCurrencyConverter")}),100),u(o,m)}function l(o){window.dispatchEvent&&window.dispatchEvent(new CustomEvent("lb-upsell-widget-event",{detail:o}))}function W(t,n,a){return n.metadata.isUnitPriceShown&&t.selectedVariant.unitPrice&&t.selectedVariant.unitPriceMeasurement?o("div",{class:`${a}-unit-price-cont lb-upsell-unit-price-cont`},"ppcse"===a&&o(m,null," ("),o("small",{class:`${a}-unit-price-cont-small lb-upsell-unit-price-cont-small`},o("span",{class:`${a}-unit-price lb-upsell-unit-price`},_(t.selectedVariant.unitPrice,n.metadata)),o("span",{class:`${a}-unit-price-seperator lb-upsell-unit-price-seperator`}," / "),o("span",{class:`${a}-unit-price-ref-val lb-upsell-unit-price-ref-val`},t.selectedVariant.unitPriceMeasurement.referenceValue),o("span",{class:`${a}-unit-price-ref-unit lb-upsell-unit-price-ref-unit`},t.selectedVariant.unitPriceMeasurement.referenceUnit)),"ppcse"===a&&o(m,null,")")):null}function w(){let o,m;window.baCurr&&window.baCurr.refreshConversion?m=".lb-upsell-money-2.money.bacurr-money":window.bucksCC&&window.bucksCC.reConvert&&(o=".lb-upsell-money-2.money.buckscc-money"),(o||m)&&document.querySelectorAll(o||m).forEach((t=>{o?(t.classList.remove("buckscc-money"),t.classList.remove("buckscc-converted")):m&&t.classList.remove("bacurr-money");const n=t.getAttribute("default-price");n&&(t.innerHTML=n)})),o?window.bucksCC.reConvert():m&&window.baCurr.refreshConversion()}function d(o,m){let t="";if(m&&m.length){let n=m.find((m=>m.src&&m.src.replace("https:","")===o.replace("https:","")));t=n&&n.alt}return t}function D(o){return{id:o.id,price:o.price,compareAtPrice:o.compare_at_price&&o.compare_at_price>o.price?o.compare_at_price:void 0,featuredImageSrc:o.featured_image&&o.featured_image.src,unitPrice:o.unit_price,unitPriceMeasurement:o.unit_price_measurement&&{referenceUnit:o.unit_price_measurement.reference_unit,referenceValue:o.unit_price_measurement.reference_value},title:o.title}}function $(o,m,t){let n=0;return m&&"percentage"===m.type?n=o-Math.floor(o*m.value/100):m&&"fixed"===m.type&&(n=o-Number(m.value)*s(t)*100),Number(n)}function R(o,m,t){return o.includes("{{discount}}")?o.replace("{{discount}}",function(o,m,t){switch(o){case"fixed":{const o=Number(m)*s(t)*100;return` \n ${_(o,t.metadata,!0)}`}case"percentage":return`${m}%`;case"free_shipping":return"free shipping"}}(m.type,m.value,t)):o}function L(){return window.Shopify&&window.Shopify.routes?window.Shopify.routes.root:void 0}export{r as C,a as L,n as T,d as a,h as b,_ as c,s as d,l as e,L as f,e as g,u as h,D as i,R as j,$ as k,W as p,w as t,p as u}