document.addEventListener("DOMContentLoaded",()=>{const subscriptionDetailsHTML=`
    <ul class="attributes-widget">
      <li> Delivery every 30 Days</li>
      <li> Change, skip, or cancel anytime</li>
      <li> Renews on your time</li>
    </ul>
    `;function waitForRechargeWidget(){return new Promise((resolve,reject)=>{let attempts=0;const maxAttempts=10,interval=1e3,observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type==="childList"){const rechargeWidget=document.querySelector(".rc-template");rechargeWidget&&(observer.disconnect(),resolve(rechargeWidget))}})}),checkForWidget=()=>{const rechargeWidget=document.querySelector(".rc-radio__label");if(rechargeWidget){observer.disconnect();const subscriptionDetailsElement=document.createElement("div");subscriptionDetailsElement.innerHTML=subscriptionDetailsHTML;const subscriptionRadio=document.querySelector(".subscription-radio");console.log(window.Recharge.widgets),subscriptionRadio?.appendChild(subscriptionDetailsElement),document.querySelectorAll(".rc-radio__label").forEach(element=>{element.textContent.replace(/AED|AFN|ALL|AMD|ANG|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BIF|BND|BOB|BSD|BWP|BZD|CAD|CDF|CHF|CNY|CRC|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ETB|EUR|FJD|FKP|GBP|GMD|GNF|GTQ|GYD|HKD|HNL|HUF|IDR|ILS|INR|ISK|JMD|JPY|KES|KGS|KHR|KMF|KRW|KYD|KZT|LAK|LBP|LKR|MAD|MDL|MKD|MMK|MNT|MOP|MUR|MVR|MWK|MYR|NGN|NIO|NPR|NZD|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RWF|SAR|SBD|SEK|SGD|SHP|SLL|STD|THB|TJS|TOP|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VND|VUV|WST|XAF|XCD|XOF|XPF|YER/g,"")}),document.querySelectorAll('input[value="onetime"] + .rc-radio__label').forEach(label=>{let text=label.textContent;const priceRegex=/(\£|€|\$|₽|₹|¥)\s*(\d+(?:\.\d+)?)/,match=text.match(priceRegex);if(match){const currencySymbol=match[1],amount=match[2],currencyMap={"\xA3":"GBP","\u20AC":"EUR",$:"USD","\u20BD":"RUB","\u20B9":"INR","\xA5":"JPY"},currencyCodes=["USD","CAD","AUD","NZD","EUR","GBP","INR","JPY","CNY","RUB"];let currencyCode=currencyMap[currencySymbol]||"UNKNOWN";for(const code of currencyCodes)if(text.includes(code)){currencyCode=code;break}text=text.replace(/AED|AFN|ALL|AMD|ANG|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BIF|BND|BOB|BSD|BWP|BZD|CAD|CDF|CHF|CNY|CRC|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ETB|EUR|FJD|FKP|GBP|GMD|GNF|GTQ|GYD|HKD|HNL|HUF|IDR|ILS|INR|ISK|JMD|JPY|KES|KGS|KHR|KMF|KRW|KYD|KZT|LAK|LBP|LKR|MAD|MDL|MKD|MMK|MNT|MOP|MUR|MVR|MWK|MYR|NGN|NIO|NPR|NZD|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RWF|SAR|SBD|SEK|SGD|SHP|SLL|STD|THB|TJS|TOP|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VND|VUV|WST|XAF|XCD|XOF|XPF|YER/g,"");const priceText=`<span class="rc-radio__price">${currencySymbol}${amount} ${currencyCode}</span>`;label.innerHTML=text.replace(priceRegex,priceText),label.querySelector(".rc-radio__price").textContent=currencySymbol+parseFloat(amount).toFixed(2)+" "+currencyCode}}),resolve(rechargeWidget)}else attempts++,attempts>=maxAttempts?(observer.disconnect(),reject(new Error("Recharge widget not found"))):setTimeout(checkForWidget,interval)};observer.observe(document.body,{childList:!0,subtree:!0}),checkForWidget()})}waitForRechargeWidget().then(rechargeWidget=>{console.log("Recharge widget found:",rechargeWidget)}).catch(error=>{console.error("Error:",error)})});
//# sourceMappingURL=/cdn/shop/t/30/assets/section-product.js.map?v=115517086223439566141735830105
