{% endraw %}\"}", "bundle": {}, "labels": `{\"appstle.subscription.wg.noSubscriptionLabelTextV2\":\"Sin suscripci\u00F3n\",\"appstle.subscription.wg.cancelAnytimeLabelTextV2\":\"Cancela cuando quieras\",\"appstle.subscription.wg.addToShipmentErrorTextV2\":\"Error\",\"appstle.subscription.wg.weeksFrequencyTextV2\":\"Semanas\",\"appstle.subscription.wg.weeklyLabelTextV2\":\"Semana\",\"appstle.subscription.wg.displayAddToExistingSubscriptionButtonForNotLoggedInV2\":\"false\",\"appstle.subscription.wg.addToShipmentProcessingV2\":\"Procesando...\",\"appstle.subscription.wg.deliveryEveryFrequencyTextV2\":\"Env\u00EDa cada\",\"appstle.subscription.wg.subscribeAndSaveInitalV2\":\"Suscr\u00EDbete y ahorra\",\"appstle.subscription.wg.cartHiddenAttributesSelectorV2\":\"\",\"appstle.subscription.wg.prepaidLabelTextV2\":\"Prepago\",\"appstle.subscription.wg.daysFrequencyTextV2\":\"D\u00EDas \",\"appstle.subscription.wg.monthlyLabelTextV2\":\"\",\"appstle.subscription.wg.subscribeAndSaveSuccessV2\":\"Suscrito correctamente\",\"appstle.subscription.wg.addToShipmentSuccessTextV2\":\"Completado\",\"appstle.subscription.wg.monthFrequencyTextV2\":\"Mes\",\"appstle.subscription.wg.addToShipmentButtonTextV2\":\"A\u00F1adir al env\u00EDo\",\"appstle.subscription.wg.displayAddToExistingSubscriptionButtonToSubscribersOnlyV2\":\"false\",\"appstle.subscription.wg.yearsFrequencyTextV2\":\"A\u00F1os\",\"appstle.subscription.wg.onetimeDescriptionTextV2\":\"Compra \u00FAnica\",\"appstle.subscription.wg.addToShipmentTooltipTextV2\":\"Por favor, evita cargos de env\u00EDo dobles. Inicia sesi\u00F3n para agregar este producto a una entrega pr\u00F3xima.\",\"appstle.subscription.wg.weekFrequencyTextV2\":\"Semanas\",\"appstle.subscription.wg.oneTimePurchaseTextV2\":\"One Time Purchase\",\"appstle.subscription.wg.loyaltyPerkDescriptionTextV2\":\"{{#isDiscountTypeFreeProduct}}
<\/img><\/div>
After {{{billingCycleBlock}}} orders, get a FREE {{freeProductName}} <\/span><\/div> {{\/isDiscountTypeFreeProduct}}{{#isDiscountTypePercentage}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get {{{discount}}}% OFF your entire order<\/span><\/span>.{{\/isDiscountTypePercentage}}{{#isDiscountTypeShipping}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get shipping at {{{formatDiscountedPrice}}}<\/span><\/span>.{{\/isDiscountTypeShipping}}{{#isDiscountTypeFixed}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get {{{formatDiscountedPrice}}} OFF your entire order<\/span><\/span>.{{\/isDiscountTypeFixed}}\",\"appstle.subscription.wg.unsubscribeFrequencyTextV2\":\"Desuscribirme \",\"appstle.subscription.wg.widgetVariantChangeListenerSelectorV2\":\"\",\"appstle.subscription.wg.oneTimeFrequencyTextV2\":\"Una vez \",\"appstle.subscription.wg.dayFrequencyTextV2\":\"D\u00EDa\",\"appstle.subscription.wg.allowFulfilmentCountViaPropertiesV2\":\"false\",\"appstle.subscription.wg.valdiateFormSelectorV2\":\"\",\"appstle.subscription.wg.monthsFrequencyTextV2\":\"Meses\",\"appstle.subscription.wg.prepaidSaveBadgeTextV2\":\"SAVE {{selectedDiscountPercentage}}\",\"appstle.subscription.wg.manageSubscriptionButtonTextV2\":\"Gestiona tu suscripci\u00F3n\",\"appstle.subscription.wg.offFrequencyTextV2\":\"Off\",\"appstle.subscription.wg.yearFrequencyTextV2\":\"A\u00F1o\",\"appstle.subscription.wg.prepayLabelTextV2\":\"Prepagar\",\"appstle.subscription.wg.productPageUnitPriceSelectorV2\":\"\",\"appstle.subscription.wg.widgetPriceChangeListenerSelectorV2\":\"\",\"appstle.subscription.wg.selectDeliverOptionV2\":\"Selecciona el tiempo de entrega\",\"appstle.subscription.wg.yearlyLabelTextV2\":\"Anual\"}`, "css": { "appstle_subscription_widget": { "margin-top": "" , "margin-bottom": "", }, "appstle_subscription_wrapper": { "border-width": "", "border-color": "", }, "appstle_circle": { "border-color": "", }, "appstle_dot": { "background-color": "", }, "appstle_select": { "padding-top": "", "padding-bottom": "", "padding-left": "", "padding-right": "", "border-width": "", "border-style": "", "border-color": "", "border-radius": "", }, "tooltip_subscription_svg": { "fill": "", }, "appstle_tooltip": { "color": "", "background-color": "", }, "appstle_tooltip_border_top_color": { "border-top-color": "", }, "appstle_subscription_final_price": { "color": "", }, "appstle_widget_text_color": { "color": "", }, "appstle_selected_background": { "background": "transparent", }, "elementCSS": "[\".appstle_sub_widget .widgetSellingPlanWrapper input:checked+label{\\nbackground : #f1f0f0 !important;\\n}\"]", "customCSS": "\ndiv#appstle-widget-template .widgetSellingPlanWrapper input:checked+label+span {\n background: green !important;\n}\n#appstle_subscription_widget2 {\n margin-top: 0px !important;\n\n}\n.appstle_sub_widget{\n margin-top: 0px !important;\n}\n.appstle_fields_wrapper {\n margin-bottom: 0px !important;\n}\n.appstle_subscribe_option {\n margin-left: 0px !important;\n margin-top: 0px !important;\n}\n\n.appstle_select_label {\n font-size: 16px !important;\n}\n\n.appstle_subscription_wrapper, .appstle_select {\n margin-left: -5px !important;\n}\n\n.appstle-plan-text, .appstle-cancel-text, .appstleSelectedSellingPlanOptionDescription {\n font-size: 14px !important;\n}\n\n@media screen and (max-width: 600px) {\n\n.appstle_one_time_details_wrapper {\n display: flex;\n position: relative;\n flex-direction: column!important;\n}\n.appstle_subscription_radio_wrapper {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n}\n.shopify-product-form {\n width: 100%;\n}\n .buy-buttons {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n align-content: flex-start;\n justify-content: flex-start;\n }\n button.button.button--xl {\n font-size: 10px;\n padding: 10px;\n }\n.appstle_sub_widget {\n width: 100% !important;\n font-size: 10px !important;\n}\n .appstle_subscription_radio_wrapper {\n font-size: 85% !important;\n }\n select {\n margin-left: -5px !important;\n }\n .select {\n width: 100% !important;\n font-size: 86% !important;\n }\n .appstle_fields_wrapper {\n margin: 0 !important;\n }\n .appstle_subscribe_option {\n margin: 10px !important;\n }\n .buy-buttons {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n align-content: flex-start;\n justify-content: flex-start;\n }\n\n .appstle_subscription_radio_wrapper {\n padding-right: 5px;\n }\n \n button.button.button--xl {\n font-size: 10px;\n padding: 7px;\n width: 93%;\n align-self: center;\n }\n .appstle_subscription_radio_wrapper {\n font-size: 85% !important;\n padding-right: 5px;\n }\n\n.appstle_select_label {\n display: flex !important;\n align-items: center;\n background: none;\n font-size: 12px !important;\n margin-bottom: 0px !important;\n}\n.appstleSelectedSellingPlanOptionDescription {\n font-size: 11px!important;\n margin-top: 0px;\n}\n .appstle_subscribe_option {\n\n display: flex !important;\n flex-direction: column;\n align-items: flex-start;\n text-align: left;\n margin: 10px !important;\n}\nbutton.select,button.button.button--xl{\n width: 100% !important;\n}\n.appstle-plan-text,.appstle-cancel-text,.appstle-sm-hide.appstle-frequency-description {\n font-size: 11px !important;\n\n}\n}\n.appstle_sellingPlan_discountText {\n background: black !important;\n}\n.widgetSellingPlanWrapper input + label {\n display: block !important;\n}\n.appstleSelectedSellingPlanOptionDescription {\n display: none !important;\n}\n.appstle_sellingPlan_discountText {\n color: white !important;\n background: black !important;\n}\n.widgetSellingPlanWrapper input:checked+label {\n background-color: #f2f2f2 !important;\n color: #000 !important;\n}\n.appstle_widget_title {\n display: none;\n}", "customerPortalCss": ".appstle-wrapper :is(.as-bg-indigo-600){\r\n background-color: black !important;\r\n}\r\n.appstle-wrapper :is(.as-text-blue-500){\r\n color: black !important;\r\n}", "externalStyleTag": "", } }; sessionStorage['appstleSubscriptionConfig'] = JSON.stringify(RS.Config); var _RSConfig = _RSConfig || {}; _RSConfig.shop = '5666be-31.myshopify.com'; _RSConfig.shopMoneyFormat = '€{{amount_with_comma_separator}}'; _RSConfig.shopMoneyFormatWithCurrencyFormat = '€{{amount_with_comma_separator}} EUR'; } Ser miembro del selecto club de los que más saben sobre cuidarse y que, por tanto, eligen la mejor kombucha, es fácil. Tan fácil como registrarte como cliente o iniciar sesión.Queremos contar contigo. ¿Te unes? Tus compras únicas tienen recompensa asegurada. Por cada euro que gastes en nuestra tienda, acumularás 1 MūnCoin. Será tan sencillo usarlos como acumular 100 (10 €). Será entonces cuando podrás descontártelos en un pedido único. El sistema es infinito. Siempre ganas. No solo tus pedidos te benefician doblemente, te premiamos también por recomendarnos a los que tienes más cerca y que sí o sí tienen que conocer la kombucha de la buena. Y por hacerte amigo nuestro de verdad. ¡Hasta te vamos a hacer un regalo de cumple!01
Únete
02
Gana
03
Ahorra
\\n
\",\"position\":\"BEFORE\"},{\"selector\":\"div#loyaltyPageRedeemPointsSection\",\"content\":\"
\\n
\\n
Maneras de ganar MūnCoins
En Mūn Kombucha premiamos tu fidelidad siempre y por (casi) todo. Porque nos encanta cuidarte, no vamos a engañarte. Tú le das sentido a nuestro trabajo.
10€ por cada amigo
Invita a un amigo y salid los dos ganando. Cuando compre desde tu enlace, recibirás 100 Mūns y él, conseguirá 10 € de descuento directo en su primera compra de más de 40 €. Más amigos, más Mūns. ¡Más Mūns, más descuentos!
Acumula con cada compra única
Consigue 1 Mūn por cada euro que gastes en pedidos únicos. Cuando tengas 100 MūnCoins, podrás descontarlos en una compra por 10 €. Los suscriptores pueden estar tranquilos. Siempre de los siempre compran con un 20 % de descuento.Resumiendo: siempre saldrás ganando.
Descuentos sin parar
Nos encanta cuidarte. Tanto que tenemos mil fórmulas para compensarte. Gana descuentos ya. Sólo por hacerte cliente, suscribiéndote a nuestra newsletter, siguiéndonos en Instagram, contándonos cuando es tu cumpleaños o recomendándonos a tus amigos, familiares y compañeros de trabajo.
\\n
\\n
\",\"position\":\"BEFORE\"},{\"selector\":\".loyaltyPage-hero-title\",\"content\":\"
Ahorra comprando y recomendando
\",\"position\":\"AFTER\"}]","checkoutAcquiredPointsLabel":"You have acquired {{acquiredPoints}} points from this order","checkoutPendingPointsLabel":"with {{pendingPoints}} pending points.","availablePoints":"Available points {{ points }}","showTransactionHistory":true,"showLoyaltyOptOut":true,"checkThankYouAcquiredPointsHeadingLabel":"Congratulations","checkoutSelectRedeemRuleDropdownLabel":"Select Redeem Rule","loyaltyOptoutActive":"ACTIVADO","loyaltyOptoutInactive":"DESACTIVADO","createAccountLink":"/account/register","showReferralSection":true,"showRewardSection":true,"showRedeemSection":true,"showEarnSection":true,"showFAQSection":true,"showVIPSection":true,"popupEarnPointDescriptionText":"¡Gana más MūnCoins y transfórmalos en ahorro en tus pedidos!","vipTierBenefits":"Beneficios","redeemLimitExceedText":"Exceso superado. No se pueden transformar más de {{redeem_limit}} veces por {{reward_interval}}","dailyLimitExceedText":"Límite diario superado. No se puede transformar más de {{redeem_limit}} MūnCoins por día","perTransactionLimitExceedText":"Límite superado. No se puede transformar más de {{shop_redeem_limit}} MūnCoins","storeOnSaleForRedeemText":"Para transformar MūnCoins vuélvelo a intentar después de {{shop_on_sale_end_date}}","minimumOrderCountForRedeemText":"Mínimo {{order_count}} pedido requerido para transformar MūnCoins","minimumPointsForRedeemText":"Mínimo {{points}} MūnCoins requeridos para transformarlos en descuento","minimumAmountSpentForRedeemText":"Mínimo de {{amount_spent}} gastados para transformar MūnCoins","enrollLoyaltyProgramTitle":"Apúntate al programa de MūnCoins","enrollLoyaltyProgramDescription":"Apúntate al programa de MūnCoins para ahorrar con cada compra.","enrollLoyaltyProgramActionLabel":"Apúntate ahora","freeProductRewardAddToCart":"Añadir al carrito","freeProductRewardAddedSuccessMessage":"Añadido al carrito","enrolledSuccessMessage":"¡Apuntad@!","acquirePointsLoggedOutText":"","customFontUrl":"","visitedIcon":"","referButtonLabel":"Refiere ahora","allowWidgetOnSpecificPages":null,"referralLinkSentLabel":"Enlace de referidos enviado","referralRedirectUrl":"","showRangeForRedeemPoints":false,"hideAppstleLoaderIcon":true,"hideFreeProductDropdownProductTitle":false,"showToLoggedInCustomerOnly":false,"enableMetaTagForNoIndexing":false,"rewardsExpirationLabel":"{{day}}d","waysToEarnIcon":null,"waysToRedeemIcon":null,"loaderIcon":null,"toastPosition":"bottom-center","widgetDateTimeFormat":"MMM D, YYYY, h:mm A","shareReferralEmailFieldText":null,"subscribeRuleRedirectActionLabel":null,"otherRulesRedirectActionLabel":null,"toastErrorMsg":"Something went wrong","primaryDedicatedPageBackgroundColor":"#000000","secondaryDedicatedPageBackgroundColor":"#ffffff","primaryDedicatedPageTextColor":"#000000","secondaryDedicatedPageTextColor":"#4b5563","minimumRedeemRequiredPointsLabel":"","titleCount":60,"programUpdateMessage":"Process initiated. Please wait for the page to reload","widgetCopiedLabel":"Copied","primaryDedicatedPageSectionBackgroundColor":"#F2F8FF","secondaryDedicatedPageSectionBackgroundColor":"#FFFFFF","birthdayUpdatedToastLabel":"Birthday Updated","refreshOnAddToCart":false,"showTierName":null,"loggedOutFlagAcquirePoints":false}; _ALConfig.referralLoyalty = {"referralType":"PURCHASE","referralGet":"Consigue 100 MūnCoins ","referredGet":"Consigue €10 de descuento en tu primera compra por venir recomendado. visitando la tienda ."}; _ALConfig.storeFrontAccessToken = "329889bf15009a8bc97b02e7fe2da1c1"; _ALConfig.customerId = null; _ALConfig.customerName = ''; _ALConfig.customerEmail = null; _ALConfig.customerTags = []; _ALConfig.customerLoyalty = null; _ALConfig.shop = "5666be-31.myshopify.com"; _ALConfig.shopMoneyFormat = "€{{amount_with_comma_separator}}"; _ALConfig.shopMoneyFormatWithCurrencyFormat = "€{{amount_with_comma_separator}} EUR"; _ALConfig.enableInactiveCustomer = false; _ALConfig.allowCustomerOptIn = false; _ALConfig.enableDiscountToApplyAutomatically = true; var loyaltyGlobalStyles = `
` document.querySelector('body').insertAdjacentHTML('beforeend', loyaltyGlobalStyles); window.addEventListener('message', appstleLoyaltyIframeListener, false); function appstleLoyaltyIframeListener(event) { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_to_redirect_to_account') !== -1) { window.location.href = 'https://' + window.location.host + '/account'; } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_to_redirect_to_signup') !== -1) { window.location.href = 'https://' + window.location.host + '/account/register'; } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_to_redirect_to_after_copied_discount_redirect_url') !== -1) { window.location.href = 'https://' + window.location.host + _ALConfig?.widget_setting?.afterCopiedDiscountRedirectUrl; } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_to_apply_discount') !== -1) { var discountCode = (event.data.split('|'))[1]; var discountURL = location.origin + '/discount/' + discountCode; fetch(discountURL).then(res => { if (res.ok) { console.log('Discount Code Applied'); const discountDetails = window?._ALConfig?.customerLoyalty && window?._ALConfig?.customerLoyalty?.rewards?.find((item) => item?.discountCode === discountCode) || null; if(discountCode && discountDetails){ const discountData = {discountCode: discountCode || discountDetails?.discountCode, description: discountDetails?.description, customerId: discountDetails?.customerId} document.dispatchEvent(new CustomEvent(`AppstleLoyalty:AppliedDiscountCode`, { detail: discountData})); window.dispatchEvent(new CustomEvent(`AppstleLoyalty:AppliedDiscountCode`, { detail: discountData})); } } else { console.log('Discount Code NOT Applied'); } }); } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_to_redirect_to_custom_url') !== -1) { if (_ALConfig?.widget_setting?.createAccountLink) { window.location.href = 'https://' + window.location.host + _ALConfig?.widget_setting?.createAccountLink; } } }
const snackBarStyles = `
`; document.querySelector('body').insertAdjacentHTML('beforeend', snackBarStyles); const snackBarHtml = `
`; document.querySelector('body').insertAdjacentHTML('beforeend', snackBarHtml); window.addEventListener('message', toasterEventListener, false); function toasterEventListener(event) { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_for_notification') !== -1) { var message = event?.data?.split('|')[1]; showAppstleLoyaltyToaster(message); } } let index = 0; function showAppstleLoyaltyToaster(msg) { var snackBar = document.getElementById('snackbar'); snackBar.classList.add('show'); snackBar.insertAdjacentHTML('beforeend', `
${msg}
`); const el = index; setTimeout(function() { if (document.getElementById(`elem${el}`)) document.getElementById(`elem${el}`).remove(); }, 5000); index++; } const closeSnackBar = (el) => document.getElementById(el).remove(); (() => { const socketUrl = 'wss://u5qnpjh34i.execute-api.us-west-1.amazonaws.com/production'; const socket = new WebSocket(socketUrl); const messageQueue = []; socket.addEventListener('open', () => { console.log('WebSocket is open now.'); while (messageQueue && messageQueue?.length > 0) { socket.send(messageQueue.shift()); } }); socket.addEventListener('message', ({ data }) => { const { message, webSocketType = 'MESSAGE' } = JSON.parse(data); if (webSocketType === 'PAGE_REFRESH') { console.log("webSocketType: ",webSocketType); // window.postMessage('refresh_appstle_loyalty_widget') } else if (message) { showAppstleLoyaltyToaster(message); } }); socket.addEventListener('close', () => console.log('WebSocket is closed now.')); socket.addEventListener('error', (error) => console.log('WebSocket error:', error)); const sendMessage = (message) => { if (socket?.readyState === WebSocket?.OPEN) { socket.send(message); } else { messageQueue.push(message); } }; document.addEventListener('DOMContentLoaded', () => { if (_ALConfig.shop && _ALConfig.customerId) { const message = JSON.stringify({ action: 'message', shop: _ALConfig.shop, customerId: _ALConfig.customerId }); sendMessage(message); } }); })();
const loyaltyWidgetStyles = `
`; document.querySelector('body').insertAdjacentHTML('beforeend', loyaltyWidgetStyles); const mainHTMLString = `
`; document.querySelector('body').insertAdjacentHTML('beforeend', mainHTMLString); window.addEventListener('message', widgetEventListener, false); function widgetEventListener(event) { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_for_showWidget') !== -1) { } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_widget_showHide') !== -1) { document.querySelector('#appstle-loyalty-button')?.classList?.remove('appstle-loyalty-hidden'); toggleWidget(); } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('refresh_appstle_loyalty_widget') !== -1 && _ALConfig?.widget_setting?.widgetType === 'LAUNCHER') { loadAppstleLoyaltyWidget() console.log("REFRESH WIDGET"); } } function removeAppstleLoyaltyWidget() { document.querySelector('#appstle-loyalty-button')?.classList?.add('appstle-loyalty-hidden'); document.querySelector('#appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-hidden'); } (function checkForWidgetRestrictions() { let isShowWidget = true; if(_ALConfig?.customerLoyalty?.customerStatus === 'EXCLUDED') { isShowWidget = false; } if (_ALConfig?.widget_setting?.allowedCustomersTag?.length && isShowWidget) { let allowedTags = _ALConfig?.widget_setting?.allowedCustomersTag.split(','); if (allowedTags?.length > 0 && !_ALConfig?.customerTags?.some((tags) => allowedTags?.includes(tags))) { isShowWidget = false; } } if (_ALConfig?.widget_setting?.restrictedCustomersTag?.length && isShowWidget) { let restrictedTags = _ALConfig?.widget_setting?.restrictedCustomersTag?.split(','); if (restrictedTags?.length > 0 && _ALConfig?.customerTags?.some((tags) => restrictedTags?.includes(tags))) { isShowWidget = false; } } if (_ALConfig?.widget_setting?.blockWidgetOnPages?.length && isShowWidget) { let restrictedPages = _ALConfig?.widget_setting?.blockWidgetOnPages?.split(','); const currentPage = window?.location?.pathname; if (restrictedPages?.length > 0) { if (restrictedPages?.includes('/homepage') && currentPage === '/') { isShowWidget = false; } else if (restrictedPages?.some((page) => currentPage?.includes(page))) { isShowWidget = false; } } } if (_ALConfig?.widget_setting?.allowWidgetOnSpecificPages?.length && isShowWidget) { let allowedPages = _ALConfig?.widget_setting?.allowWidgetOnSpecificPages?.split(','); const currentPage = window?.location?.pathname; if (allowedPages?.length > 0) { if (allowedPages?.includes('/homepage') && currentPage === '/') { isShowWidget = true; } else if (allowedPages?.some((page) => currentPage?.includes(page))) { isShowWidget = true; } else { isShowWidget = false } } } if (!_ALConfig?.customerId && _ALConfig?.widget_setting?.showToLoggedInCustomerOnly) { isShowWidget = false; } if (isShowWidget) { showAppstleLoyaltyWidget(); } else { removeAppstleLoyaltyWidget(); } })() function enableWidget() { document.querySelector('#appstle_loyalty_iframe')?.classList?.add('open'); document.querySelector('#appstle_loyalty_iframe')?.classList?.remove('appstle-loyalty-hidden'); setTimeout(function() { document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('show-close-icon'); }, 900); } function showAppstleLoyaltyWidget() { document.querySelector('#appstle-loyalty-button')?.classList?.remove('appstle-loyalty-hidden'); document.querySelector('#appstle_loyalty_iframe')?.classList?.remove('appstle-loyalty-hidden'); } document.querySelector('.appstle-loyalty-button').addEventListener('click', toggleWidget); if (_ALConfig?.widget_setting?.widgetPosition === 'LEFT') { document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-left'); document.querySelector('.appstle-loyalty-button')?.classList?.add('appstle-loyalty-left'); document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-left'); document.getElementById('snackbar')?.classList?.add('left_snackbar'); } else { document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-right'); document.querySelector('.appstle-loyalty-button')?.classList?.add('appstle-loyalty-right'); document.getElementById('snackbar')?.classList?.add('right_snackbar'); } const loyaltyButtonTitle = document.getElementById('loyalty-widget-title'); if(_ALConfig?.widget_setting?.widgetTitle){ loyaltyButtonTitle.innerHTML = _ALConfig?.widget_setting?.widgetTitle } else { loyaltyButtonTitle.style.paddingLeft = '0'; } const alIframeSrc = '' + ' ' + '