window.fgData={"offers":[],"settings":{"gift_format":"same_as_original_products","auto_add_gift":true,"sync_quantity":false,"cal_gift_discount":"current_price","using_draft_order":false,"select_one_gift_price":false,"manual_input_inventory":false,"compare_gift_price_with_product":false,"delete_gift_after_turn_off_offer":true,"not_show_gift_if_already_on_cart":false},"appearance":{"gift_slider":{"general":{"gift_popup_title":"Select your free gift!","add_to_cart_btn_title":"Add to cart","running_text":"","select_gift_btn":"Select variants","show_product_title":true,"show_variant_title":true,"show_pagination":true,"show_gift_for_customer":"by_variants","number_product_slider":4},"color":{"gift_slider_title_color":"#121212","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#ea5455","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#7367f0"},"others":{"hidden_brand_mark":true,"gift_img_size":"&width=480&height=480"},"disable_slider_checkbox":{"enable":false,"time":10,"text":"Don't show this offer again"}},"gift_icon":{"gift_icon_path":"images\/fg-icons\/fg-icon-red.png","shopify_gift_icon_path":"fg-icon-red.png","product_page":{"gift_icon":{"status":true,"size":"50"},"gift_thumbnail":{"status":true,"size":"100","title":"Free Gift"}},"collection_page":{"status":true,"size":"50"}},"promotion_message":{"show_on_cart_page":true,"text_color":"#ffffff","background_color":"#F72119"}}};/* END_FG_DATA */ const _0x518d06=_0x114d;function _0x114d($,x){let e=_0x27cb();return(_0x114d=function($,x){return e[$-=245]})($,x)}function _0x27cb(){let $=["max","#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble","sca-fg-out-stock","fg-gifts:added","fg_decimal","not_show_gift_if_already_on_cart","Update cart.attributes ","track","/cart/add.js","appendChild","error","orders","DISABLE_SLIDER_SECTION","sca_fg_cart_drawer_query","toString","fg-cart:end-process","169464SNeNeQ","sca_text_notify_success","SHOW_GIFT_SLIDER","GIFT_ITEM_SECTION","[sca_root_checkout]","start","final_price","fg-cart:start-process","gift_icon","removeAttribute","60%","[data-open]","#fg-gift-items",".dots","unshift","variantId","fgAppearanceGiftIcon","SHOPIFY_CART","gift_thumbnail",".sca-gift-icon-collection-page","text","d-block",'
\n \n \n
',"UpCart - AfterSell","GIFT_THUMBNAIL_ITEMS_SECTION_ID","compare_at_price","type_customer_locations","Out of stock","4AUonOQ","key","compare_gift_price_with_product","className","SATCB","original_product_shopify_id","appearance","closeCart","selling_plan_allocation","variant_id",".sca-promotion-glider","addEventListener","6056ezZcXU","3.0","add_to_cart_btn_color","cloneNode","shift","routes","display","Unicart","join","1QoEQTQ","color","Error listening XHR send","freegifts","fgSettings","format","subscription_products","disabled","time","querySelector","cookie","getTime","using_draft_order","sca_fg_cart_icon_query","#fg-gift-items .dropdown","order_created_from",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","positions","headers","keys","reload","decompressFromBase64","sca-gift-icon-collection-page","enable_check_variants_has_gift","item_count","STICKY_CART_UPDATE","Error decoding cookie:","Add to cart","Error listening XHR open","Default Title","fg_fetch_attributes","stringify","searchParams","data-version","current_variant","disable_override_xhr","values",".freegifts-main-container .glider-prev","sca_fg_main_promotion_message_query","#fg-gift-thumbnail-title .glider-next","disableShopify_getCart","sections_cart","&data_checkout=","data-original-price","rate","now","/cart","dispatchEvent","fgAppearanceGiftSlider","sub_conditions","startsWith","getCart","total_spent_on_last_order","fg-checkout:start","sca_handle_checkout","openCart","show_pagination","createElement","info","#close-fg-toast","event auto process gifts with cart","openSlider","application/json","not using draft order","cart-items, .cart-header, .section-header","price","email","10qHtyHQ","gift_should_the_same","#fg-gift-items .btn-add-to-cart","#sca_fg_cart_section_gifts_slider","compressToBase64","general","src","productsInPage","setItem","sca-fg-form-thumbnail-product-page","upcartOnCartOpened","hasOwnProperty",".gift-price","#fg-gift-thumbnail-title .glider-prev","variants_ids","status","handle",'
{{ fg_gift_thumbnail_title }}
\n\n
\n
\n
\n {{ sca_fg_gift_thumbnail_items_section }}\n
\n \n
\n \xab\n \xbb\n
\n
\n
\n
',"DISABLE_SLIDER_SECTION_ID","pathname","80%","api","product_page",".fg-secomapp-product-title ","FGSECOMAPP","CART_AUTO_UPDATED","quantity","product_id","fit-content","others","settings","sca_clone_checkout","append","GIFT_SELECT_SECTION_ID","prototype","hide","show_variant_title","#sca_fg_section_gifts_popup","maxOfferPriority","cart:updated","data-img","sca_fg_innerHTML","sca-fg-form-icon-product-page","body","removeEventListener","sca_catch","Monster Cart","opacity","compressToEncodedURIComponent","find",'{{ fg_gift_icon_alt }}',"isArray","upcartOnAddToCart","#sca_fg_section_gift_item","#fg-gift-items .dropdown > .dropdown-menu > li","visibility","stop_lower_priority","160","innerText","prepend","gift_img_size","select_gift_btn","FGSECOMAPP_HIDDEN_GIFT_POPUP","arrGiftsRemove","1767066giDKpO","{{sca_min_total}}","querySelectorAll","focus","open","location","?sca_process_gifts","fg-checkout:end","fg_codes","#UpcartPopup:has(#CartPopup[class*='styles_active'])","sca-fg-toast sca-fg-success","specific_link_address","maxWidth","title","current_product","product_vendors","insertBefore","#upCartStickyButton .upcart-sticky-cart-quantity-icon-text","CART_MSG_SECTION","product_shopify_id","Loading...","mode_override_checkout","stopPropagation","GIFT_THUMBNAIL_SECTION_ID","substring","number","formatter","scaCustomLoadingCheckout","sca-gift-thumbnail","SLIDECART_CLOSE","secomappGetCartRunning","Cannot define custom loading with type: ","scaHandleConfigValue","product_narrow","padding","original_product_handle","initializeForXHR","upcartRegisterAddToCart","XMLHttpRequest","sca_fetch_cart","free-gift-icon","floor","is_multiply",".sca-fg-notifications","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","GIFT_ICON_SECTION","flex","sca-promotion-message-layout","icartAddToCartEvent","offer_id","SECOMAPP_FREEGIFT","GET","application/liquid",".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button, .satcb-cs-checkout-btn, .hs-checkout-purchase","Select your free gift!","apply","sections_url","CUSTOM_EVENTS","can not check freegifts version","Slide Cart - Heysenior","CART_MSG_ITEM_SECTION_ID","failed to parse cart section ","fg-fetch:override","charAt","customer_tags",'\n \n \n \n ',"type_customer_tags","promotion_message","522945OGpxlZ","indexOf","slice","product_collections","clone_product_handle","100","isDelayShowAdded","replace","sca_process_gifts","qikify:cart-change","https://geoip.secomtech.com/?json","fetch","Add gift to cart successfully!","cal_gift_discount","gift_items","secomapp_freegifts_version","show_on_cart_page","Escape","gift_settings",".dots-thumbnail","GIFT_THUMBNAIL_ITEMS_SECTION","70%","/cart/change","{{sca_min_quantity}}","6px 0","Free Gift","fg-cart:auto-updated","toggle","total_price","boolean","replaceAll","timeoutId","url",".fg-secomapp-handle-add-to-cart ","call","#sca-gift-thumbnail","catch","currentTarget","fgAppearance","text/html","monster_refresh",'
\n Loading...\n
',"parse","Failed to get customer location","number_of_products","checkout","not have orders and gifts","sca_link_checkout","product","toFixed","#sca_fg_gift_thumbnail_section","customer","#sca_fg_gift_icon_section","sca_locale",'
\n \n \n \n \n \n \n ',"locale","gift_slider","hasDoneProcessCheckout","FG_OVERRIDE_XHR_OPEN","#sca-spinner-checkout","$$$$","reRenderCartCustom","sca-fg-icon-collection-page","HS_SLIDE_CART_CLOSE",", .sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link ","data-original-id","string","USD","value","variant_shopify_id","customer_order_history","sca-gift-icon-collection-img","value_customer_tags","icartUpdateCartEvent",".sca-promotion-message-layout","sca_fg_form_checkbox_button_query","then","split","innerHTML","active ","sca_add_gift","data-fg-checkout-btn","value_customer_locations","currency","hasAttribute",'

\n {{ fg_cart_message }}\n

',"NumberFormat","GIFT_ITEM_SECTION_ID",'
  • \n {{ fg_variant_title }}\n
  • ',"concat",'a[href*="/products/"]',"-sca_clone_freegift","setAttribute","target","sca-gift-icon","send","351kdwJWx","50%","sca-is-visible-fg","original_variant_shopify_id",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","GIFT_UPDATED","readyState","includes","products","not type checkout btn","POST","gifts","object","enable_process_offer_loading","GIFTS_CART_SECTION_ID","100%","country_code","add_to_cart_btn_title","show_gift_for_customer","max_gifts_can_get","manual_input_inventory","getAttribute",".selected-variant","original_price","GIFTS_POPUP_SECTION","customGiftImgSize",'.btn-add-to-cart[data-variant="',"scrollItem","#sca_fg_cart_message_items_section",".sca-list-gift-thumbnail","data-variant","SLIDECART_UPDATED","freegifts-main-page-container","sca_fg_value_checkout","set","totarrCustomerOrderal_spend_on_order_history","original_compare_at_price","/cart/update","giftsAdded","getElementById","variants_quantity","number_of_order",".icart-inner .icartContain, .rebuy-cart__flyout-body, #slidecarthq .slidecarthq, #CartPopup .styles_CartPreview__card__KX-WB, #qikify-stickycart-v2-app .qsc2-drawer-wrapper > div:nth-child(2), .satcb-cs .satcb-cs-top-container, #monster-upsell-cart #monster-cart-wrapper div[class*=custom_scrollbar], div[class*=hs-cart-drawer] .hs-site-cart-popup-layout","prepareDataForDisplayWidgetByRule","END_VALIDATE_CHECKOUT","upcartOnCartUpdated","keyup","auto","contains","SLIDECART_UPDATE","URL","GIFT_ICON_SECTION_ID","parentElement","GIFT_SELECT_SECTION","tags",".btn-add-to-cart","by_variants","min_amount","money","shop","#freegifts-main-popup-container [data-close]","isReachConditions","message","cart","select_one_gift_price","customerLocation","START_VALIDATE_CHECKOUT","#shopify-section-header #cart-icon-bubble","fetchCheckoutEvents",'\n \n \n \n \n \n ',"change","cartItems","checked","rebuy:smartcart.show","product_types","trim","gift_popup_title","sca-d-none","push","forEach","end_time","offer_name","max_amount","SLIDECART - HQ","dataset","sca_fg_title_product_gift_icon_query","sca_offers_added","HS_SLIDE_CART_OPEN","GIFTS_CART_SECTION",'\n \n ',"?sca_attr_cart","offer_conditions","STICKY_CART_OPEN","have_not_got_gift_from_this_offer","disable_slider_checkbox",".gift-original-url","fgCallback","hidden_brand_mark","none","gift_icon_path","action","json","fg-xhr:open","log","collections","style","icartSideCartOpenEvent","Can not fetch all body","sca_deplay_cart_msg",".original-price del","CART_MSG_SECTION_ID","position","687252oQZujs","renderPromotionMessage","gift_products","HS_SLIDE_CART_UPDATE","1095842DPzzaZ","parentNode","auto add gift: ","undefined","fg-xhr:send","sync_quantity","number_of_gift_can_receive","add","reduce","and","active","fg-gifts:updated","sca_slidecart_tcc","unit","hidden","size","7KnmkQo","giftsAvailable","textContent","1518666xxgxBV","enable_toast_added","&sca_products_handle=","belongs_to_offer","items","GIFTS_POPUP_SECTION_ID","total_spend_on_order_history","sca_fg_price","scaCountRenderEventCheckout","6921gmVvCH","Select variant","sections","current_collection","parseFromString","sca_fg_img_collection_gift_icon_query","removeItem","enable","#MainContent, #mainContent, #main, .main-content","variant","function","relative","arrOfferAdded","#82868b","CartSlider","freegifts-main-popup-container","class","classList","Widgets","auto_add_gift","thumbnail","checkIsBlockCheckout","type","start_time","/cart.js?sca_fetch&","SLIDECART_OPEN","variants","isUpdateCart","GIFT_ADDED","map","#7367f0","Sticky Cart - Codeinero","getItem","CART_MSG_ITEM_SECTION","clearInterval","href","width","cal_gift_for_other_rules","SLIDECART_OPENED","click","tabindex","end","div","iCart","sca_cart_xhr",".satcb-cs-close","offers","fgAppearancePromotionMessage","Show","product_has_icon","event add gift to cart from popup","readystatechange","data-template","END_PROCESS_CART","stopImmediatePropagation","clone_checkout","&width=480&height=480","application/json;",", \n .fg-secomapp-cart-item-promotion\n ","filter","Shopify.getCart","remove","/?sections=",".dropdown-menu","sca_update_url","trigger_body","GIFT_THUMBNAIL_SECTION","/cart/add","priority","some","length","entries","root","sca-gift-icon-img","customLoadingCheckout","fg-checkout","fgData","get","last_total","show_product_title","invoice_url","backgroundColor","sca_root_checkout","glider-animated","condition_result","Slide Cart - qikify","monster-cart:updated","#sca-gift-icon","ele","include","sca_add_url","#fg-gift-thumbnail-title","freegiftProxy","variant_title","selling_plan","auto_add_all_gifts"];return(_0x27cb=function(){return $})()}!function($,x){let e=_0x114d,t=$();for(;;)try{let a=-parseInt(e(693))/1*(-parseInt(e(500))/2)+-parseInt(e(523))/3+-parseInt(e(672))/4*(parseInt(e(292))/5)+parseInt(e(824))/6*(parseInt(e(520))/7)+parseInt(e(684))/8*(parseInt(e(532))/9)+parseInt(e(760))/10*(parseInt(e(504))/11)+-parseInt(e(644))/12*(parseInt(e(388))/13);if(327787===a)break;t.push(t.shift())}catch(i){t.push(t.shift())}}(_0x27cb,327787);try{let $=document[_0x518d06(427)](_0x518d06(307))?.[_0x518d06(409)](_0x518d06(726));if($===_0x518d06(685)){window[_0x518d06(608)]?.[_0x518d06(678)]?.[_0x518d06(652)]?.[_0x518d06(487)]&&fgGiftIcon&&(window[_0x518d06(608)][_0x518d06(678)].gift_icon.gift_icon_path=fgGiftIcon),window[_0x518d06(784)]={},FGSECOMAPP[_0x518d06(798)]=null,FGSECOMAPP[_0x518d06(459)]=Object[_0x518d06(729)](Shopify?.[_0x518d06(459)]??{}),FGSECOMAPP[_0x518d06(578)]=[],FGSECOMAPP[_0x518d06(697)]=window[_0x518d06(608)]?.[_0x518d06(790)]??{},FGSECOMAPP[_0x518d06(330)]=window[_0x518d06(608)]?.[_0x518d06(678)]??{},FGSECOMAPP[_0x518d06(741)]=FGSECOMAPP[_0x518d06(330)]?.gift_slider?.[_0x518d06(765)],FGSECOMAPP.fgAppearanceGiftIcon=FGSECOMAPP.fgAppearance?.gift_icon,FGSECOMAPP[_0x518d06(579)]=FGSECOMAPP[_0x518d06(330)]?.[_0x518d06(291)],FGSECOMAPP.fgCallback=[],FGSECOMAPP[_0x518d06(254)]=!1,FGSECOMAPP[_0x518d06(544)]=[],FGSECOMAPP[_0x518d06(531)]=0,FGSECOMAPP[_0x518d06(553)]=!1,FGSECOMAPP[_0x518d06(256)]={...Shopify?.[_0x518d06(256)]},FGSECOMAPP[_0x518d06(353)]=Shopify?.[_0x518d06(353)]??void 0,FGSECOMAPP[_0x518d06(251)]=Shopify?.scaCustomLoadingCheckout??void 0,FGSECOMAPP[_0x518d06(767)]={},FGSECOMAPP[_0x518d06(349)]=!1,FGSECOMAPP[_0x518d06(734)]={},FGSECOMAPP[_0x518d06(559)]=!1,FGSECOMAPP[_0x518d06(661)]={},FGSECOMAPP.sca_price=Shopify?.[_0x518d06(530)]??"discounted_price",FGSECOMAPP[_0x518d06(281)]={SHOW_GIFT_SLIDER:"fg-gifts:show-slider",GIFT_UPDATED:_0x518d06(515),GIFT_ADDED:_0x518d06(631),CART_AUTO_UPDATED:_0x518d06(318),GIFT_TO_CART:"fg-gifts:render-cart",START_PROCESS_CART:_0x518d06(651),END_PROCESS_CART:_0x518d06(643),START_VALIDATE_CHECKOUT:_0x518d06(746),END_VALIDATE_CHECKOUT:_0x518d06(831),FG_OVERRIDE_FETCH:_0x518d06(286),FG_OVERRIDE_XHR_OPEN:_0x518d06(490),FG_OVERRIDE_XHR_SEND:_0x518d06(508)};let x={GIFTS_CART_SECTION_ID:_0x518d06(763),GIFTS_CART_SECTION:'
    \n
    \n {{ fg_slider_title }}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n {{ sca_fg_disable_slider_section }}\n
    ',GIFTS_POPUP_SECTION_ID:_0x518d06(797),GIFTS_POPUP_SECTION:'
    \n \n
    \n {{ fg_slider_title }}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n {{ sca_fg_disable_slider_section }}\n
    ',GIFT_ITEM_SECTION_ID:_0x518d06(813),GIFT_ITEM_SECTION:'
    \n
    \n \n
    \n
    \n \n {{ fg_original_price }}\n \n {{ fg_gift_price }}\n
    \n \n \n \n \n
    \n
    \n
    ',GIFT_SELECT_SECTION_ID:"#sca_fg_variant_select_section",GIFT_SELECT_SECTION:_0x518d06(380),DISABLE_SLIDER_SECTION_ID:"#sca_fg_disable_slider_section",DISABLE_SLIDER_SECTION:_0x518d06(666),CART_MSG_SECTION_ID:"#sca_fg_cart_message_section",CART_MSG_SECTION:'
    \n {{ sca_fg_cart_message_items_section }}\n
    ',CART_MSG_ITEM_SECTION_ID:_0x518d06(416),CART_MSG_ITEM_SECTION:_0x518d06(377),GIFT_THUMBNAIL_SECTION_ID:_0x518d06(342),GIFT_THUMBNAIL_SECTION:_0x518d06(777),GIFT_THUMBNAIL_ITEMS_SECTION_ID:"#sca_fg_gift_thumbnail_items_section",GIFT_THUMBNAIL_ITEMS_SECTION:'
    \n \n {{ fg_product_img_alt }}\n \n
    ',GIFT_ICON_SECTION_ID:_0x518d06(344),GIFT_ICON_SECTION:_0x518d06(810)},e=()=>{let $=_0x518d06,x=FGSECOMAPP[$(330)]?.[$(348)],e=x?.[$(789)]?.[$(485)],t=!E(x)&&void 0!==e&&!e;return t?$(477):""},t=()=>{let $=_0x518d06,e=FGSECOMAPP.fgAppearance?.[$(348)],t=e?.[$(482)]??{};document[$(702)]($(392))?.[$(460)]&&localStorage[$(768)]($(822),""+Date.now());let a=document[$(702)](x[$(778)])?.[$(370)]??x[$(640)];return t?.[$(539)]?a[$(322)](/{{\s*fg_text_disable_slider\s*}}/gm,b(t[$(664)]??"Don't show this offer again")):""},{fetch:a}=window,i=()=>{let $=_0x518d06;document[$(702)]("#secomapp_freegifts_version")?.[$(409)]($(584))!==$(607)&&(window[$(303)]=async(...x)=>{let e=$;try{let t=x[0];if(!(t?.[e(395)](e(599))||t?.includes(e(314))||t?.[e(395)](e(425))))return setTimeout(function(){$3()},1e3),await a(...x);{let i=t?.[e(395)]("/cart/add"),r=t?.[e(395)]("/cart/change")||t?.[e(395)](e(425));_(x[1]);let c=200,o=null,n=await a(...x)[e(368)]($=>{let x=e;return(o=$,c=$.status,$.redirected)?$:$[x(489)]()})[e(328)]($=>{let x=e;console[x(638)]($)});if(document[e(740)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.FG_OVERRIDE_FETCH,{detail:{args:x,response:o,FGSECOMAPP:FGSECOMAPP}})),i&&x[1][e(711)]?.[e(372)]&&200!==c){let l=JSON[e(334)](x[1][e(803)])?.id,f=document[e(702)](e(414)+l+'"]');f[e(818)]=e(671),f.classList.contains(e(630))||f[e(549)][e(511)]("sca-fg-out-stock"),f[e(700)]=!0,f.style[e(258)]="",f.style[e(613)]=e(545),document.querySelectorAll(e(443))[e(467)]($=>{let x=e;parseInt($[x(409)](x(418)))===l||$.classList[x(436)](x(630))||($[x(700)]=!1,$[x(493)][x(613)]=FGSECOMAPP.fgAppearance?.[x(348)]?.[x(694)]?.[x(686)]??x(562))})}if(200!==c&&(i&&x[1][e(711)]?.sca_add_gift||r&&x[1][e(711)]?.[e(300)]))return s(n,o);if(Shopify?.disable_async_process_fg)return $c([t,...x.slice(1)])[e(368)](),s(n,o);if(await $c([t,...x[e(294)](1)]),r&&x[1]?.[e(711)]?.sca_process_gifts)return s(n,o);let u=r?FGSECOMAPP[e(661)]??n??{}:n;return await d(x,n,u),s(u,o)}}catch(g){return await a(...x)}})},r=window[_0x518d06(262)][_0x518d06(794)][_0x518d06(828)],c=window[_0x518d06(262)][_0x518d06(794)][_0x518d06(387)],o=()=>{let $=_0x518d06;Shopify?.[$(728)]||(window[$(262)][$(794)][$(828)]=function(x,e){let t=$;try{document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(281)][t(350)],{detail:{fgXHR:this}}))}catch(a){console.error(t(721),a)}finally{r[t(279)](this,arguments)}},window[$(262)][$(794)][$(387)]=function(x){let e=$;try{document[e(740)](new CustomEvent(FGSECOMAPP[e(281)][e(350)],{detail:{fgXHR:this}}));let{_url:t}=this;(t?.[e(395)](e(599))||t?.[e(395)](e(314))||t?.[e(395)]("/cart/update"))&&this.addEventListener(e(583),function(){let $=e;this[$(394)]===XMLHttpRequest.DONE&&200===this[$(775)]&&$c([t,{}])[$(368)]()})}catch(a){console[e(638)](e(695),a)}finally{c[e(326)](this,x)}})};FGSECOMAPP[_0x518d06(260)]=()=>{let $=_0x518d06;try{if(Shopify?.[$(733)]||typeof Shopify?.[$(744)]!==$(542))return;Shopify[$(744)]=async function(x){let e=$;if(!FGSECOMAPP[e(254)]){FGSECOMAPP[e(254)]=!0,await $c([e(592),{}]);let t=await $a(e(576));typeof x===e(542)&&(0>FGSECOMAPP[e(484)][e(293)](x)&&FGSECOMAPP[e(484)][e(466)](x),x(t)),FGSECOMAPP[e(254)]=!1}FGSECOMAPP[e(456)]()},typeof ShopifyAPI!==$(507)&&typeof ShopifyAPI[$(744)]!==$(507)&&(ShopifyAPI[$(744)]=Shopify?.[$(744)]),typeof Shopify?.api!==$(507)&&typeof Shopify?.[$(781)][$(744)]!==$(507)&&(Shopify[$(781)][$(744)]=Shopify?.getCart)}catch(x){console[$(638)](x)}};let _=$=>{let x=_0x518d06;try{let e=$?.body;e instanceof FormData?FGSECOMAPP.sections_cart={sections:e[x(609)](x(534)),sections_url:e[x(609)](x(280))}:typeof e===x(358)&&(e=JSON[x(334)](e),FGSECOMAPP[x(734)]={sections:e?.[x(534)],sections_url:e?.sections_url})}catch(t){FGSECOMAPP[x(734)]={}}},s=($,x)=>{let e=_0x518d06;try{let t=Shopify?.[e(723)]??[e(324),e(554),"redirected","ok"],a=new Response(JSON[e(724)]($),x);for(let i of t)Object.defineProperty(a,i,{value:x[i]});return a}catch(r){return new Response(JSON[e(724)]($))}},n=async()=>{let $=_0x518d06;if(Shopify.do_not_add_freegift_attribute)return;let x={freegift_attributes:""};if(!E(FGSECOMAPP.arrOfferAdded)){let e=[$(274)];for(let t of FGSECOMAPP.arrOfferAdded){let i=FGSECOMAPP[$(578)][$(809)]($=>$.id===t.belongs_to_offer)?.[$(742)]?.[$(835)];E(i)||e.push(i)}x={freegift_attributes:e[$(642)]()}}try{await a((Shopify?.[$(596)]??"/cart/update")+$(478),{method:$(398),headers:{"X-Requested-With":$(262),"Content-Type":$(589)},body:JSON[$(724)]({attributes:x})})}catch(r){console[$(638)]($(634)+r[$(450)])}},d=async($,x,e)=>{let t=_0x518d06;try{if($[1]?.headers?.[t(300)])return;let i={},r=Object[t(712)](x.sections??{})?.filter($=>E(FGSECOMAPP[t(734)][$]))??[];if(r&&r[t(602)]&&FGSECOMAPP[t(559)]&&(i=await a(t(594)+r[t(692)](","))[t(368)]($=>$[t(489)]())),FGSECOMAPP[t(559)]=!1,i={...FGSECOMAPP[t(734)],...i},E(i))return;x[t(534)]={...x[t(534)],...i},E(e)||(e.sections={...x[t(534)]})}catch(c){}},l=async($,x,e)=>{let t=_0x518d06;e=e?.[t(642)]();let a=document[t(826)](t(762));a[t(467)](x=>{let e=t;x[e(700)]=!0;let a=x[e(409)](e(418))-0;a===$&&(x[e(493)][e(258)]=e(316),x[e(370)]=e(457)),x[e(493)][e(613)]=e(545)});let i=FGSECOMAPP.arrOfferAdded[t(809)](x=>e===x.belongs_to_offer?.[t(642)]()&&$===x[t(659)]);i?i.quantity+=x:FGSECOMAPP[t(544)][t(658)]({variantId:$,belongs_to_offer:e,quantity:x}),localStorage[t(768)](t(474),LZString[t(764)](JSON[t(724)](FGSECOMAPP.arrOfferAdded))),g("start");let r=await fetch((Shopify?.[t(622)]??t(636))+"?sca_add_gift",{method:t(398),headers:{Accept:t(755),"Content-Type":"application/json",sca_add_gift:!0},body:JSON.stringify({quantity:x,id:$})}),c=await r[t(489)]();r.ok&&(a[t(467)](x=>{let e=t;x[e(700)]=!0;let a=x.getAttribute(e(418))-0;a===$&&(x[e(493)].padding=e(316),x[e(370)]=e(289)),x[e(493)][e(613)]=""}),$o()),document[t(740)](new CustomEvent(FGSECOMAPP[t(281)][t(560)],{detail:{gift:c,status:r.ok,FGSECOMAPP:FGSECOMAPP}}))},f=$=>{let x=_0x518d06,e=x(383);return!E($)&&(typeof $===x(400)&&($[x(776)]?.includes(e)||$[x(442)]?.[x(395)](x(696)))||"string"==typeof $&&$[x(395)](e))},u=$=>{let x=_0x518d06,{selling_plan_allocation:e}=$;return!E(e)&&!E(e?.[x(626)])},g=$=>{let x=_0x518d06;try{if(!Shopify?.[x(401)])return;let e=x(277),t=e+x(356)+I(x(367));document[x(826)](t)[x(467)](e=>{let t=x;FGSECOMAPP.customLoadingCheckout($,e)[t(368)]()})}catch(a){}},p=async($,x)=>{let e=_0x518d06;try{if(E($)&&E(x))return;let t={};if(FGSECOMAPP[e(459)]?.[e(591)]($=>f($))?.[e(467)]($=>{let x=e;t[$[x(681)]]=$[x(786)]}),($=$?.[e(591)]($=>!E($[e(681)])))?.[e(467)]($=>{let x=e;t[$[x(681)]]=(t[$[x(681)]]??0)+($.quantity??1)}),Object[e(712)](t)?.[e(467)]($=>{t[$]=t[$]>=0?t[$]:0}),E(Object.keys(t)))return;$?.[e(467)]($=>{let x=e,t=FGSECOMAPP[x(544)][x(809)](e=>$.offer_id?.toString()===e.belongs_to_offer?.[x(642)]()&&$[x(681)]===e.variantId);t?t[x(786)]+=$[x(786)]:FGSECOMAPP.arrOfferAdded[x(658)]({variantId:$[x(681)],belongs_to_offer:$[x(273)]?.toString(),quantity:$[x(786)]})}),localStorage.setItem(e(474),LZString[e(764)](JSON[e(724)](FGSECOMAPP.arrOfferAdded))),FGSECOMAPP.isUpdateCart=!0,g(e(649)),await fetch((Shopify?.[e(596)]??e(425))+e(830),{method:"POST",headers:{Accept:e(755),"Content-Type":"application/json",sca_process_gifts:!0},body:JSON.stringify({updates:t,...FGSECOMAPP.sections_cart})}).then(t=>{let a=e;return t.ok&&$[a(602)]&&!x[a(602)]&&$o(),t.json()}).then($=>{let x=e;FGSECOMAPP.sections_cart=$[x(534)]}),document[e(740)](new CustomEvent(FGSECOMAPP[e(281)][e(785)],{detail:{arrGiftsAdd:$,arrGiftsRemove:x,FGSECOMAPP:FGSECOMAPP}})),"fg-checkout"===document[e(702)]("#secomapp_freegifts_version")?.[e(409)](e(584))&&location[e(713)]()}catch(a){g(e(573)),console[e(638)](a)}},b=($,x=!1)=>{let e=_0x518d06;return(""+$)[e(322)](/\$/g,x?e(352):"$")},h=0,m=()=>{let $=_0x518d06,a=document[$(427)]($(420));if(a){let i=document[$(702)](x[$(402)])?.innerHTML??x[$(476)];a[$(370)]=i.replaceAll(/{{\s*fg_slider_title\s*}}/gm,b(FGSECOMAPP[$(741)][$(464)]??$(278))).replaceAll(/{{\s*sca_fg_disable_slider_section\s*}}/gm,b(e()))}else{let r=localStorage[$(564)]($(822))-0,c=FGSECOMAPP[$(330)]?.[$(348)]?.[$(482)]??{},o=(c?.[$(701)]??0)*6e4,_=!isNaN(r)&&r+o>Date[$(738)]();if(_||(localStorage[$(538)]($(822)),!(a=document[$(427)]($(547)))))return;let s=document.querySelector(x[$(528)])?.[$(370)]??x[$(412)];a[$(370)]=s[$(322)](/{{\s*fg_slider_title\s*}}/gm,b(FGSECOMAPP[$(741)][$(464)]??$(278))).replaceAll(/{{\s*sca_fg_disable_slider_section\s*}}/gm,b(t()+" "+e())),a[$(549)][$(511)]($(390)),h++}},y=($,e)=>{let t=_0x518d06,a=document[t(702)](x[t(793)])?.[t(370)]??x[t(441)];return $[t(561)]($=>a[t(322)](/{{\s*fg_variant_img\s*}}/gm,b(W($.thumbnail??e),!0))[t(322)](/{{\s*fg_variant_id\s*}}/gm,b($[t(361)]))[t(322)](/{{\s*fg_original_variant_id\s*}}/gm,b($[t(391)]))[t(322)](/{{\s*fg_variant_price\s*}}/gm,b(v($)))[t(322)](/{{\s*fg_original_variant_price\s*}}/gm,b(T($)))[t(322)](/{{\s*fg_variant_title\s*}}/gm,b($[t(625)])))[t(692)](" \n")},v=$=>{let x=_0x518d06;return FGSECOMAPP.formatter[x(698)](A($?.[x(758)]))},T=$=>{let x=_0x518d06,e=FGSECOMAPP?.fgSettings?.[x(305)]===x(669)?$?.original_compare_at_price??$?.[x(411)]:$?.[x(411)];return FGSECOMAPP[x(250)][x(698)](A(e??0))},C=($,x)=>{let e=_0x518d06;return E(Shopify?.[e(396)][$])?x??"#":Shopify?.[e(396)][$][e(776)]},S=($,x)=>{let e=_0x518d06;return FGSECOMAPP[e(741)][e(611)]?E(Shopify?.[e(396)][$])?x[e(299)]("\xbb","")[e(299)](/\(\d*% off\)/,"").replace("(Discount)","")??"":Shopify?.[e(396)][$].title:""},E=$=>{let x=_0x518d06;if(0===$)return!0;if(typeof $==x(249)||"boolean"==typeof $)return!1;if(null==$)return!0;if(void 0!==$.length)return 0===$[x(602)];let e=0;for(let t in $)$[x(771)](t)&&e++;return 0===e},I=$=>{let x=_0x518d06;try{let e={...FGSECOMAPP.scaHandleConfigValue},t=e[$];if(t=t?t[x(463)]():null,!E(t)&&t[x(602)]>0)try{return document[x(702)](t),", "+t}catch(a){}return""}catch(i){return""}},w=()=>{let $=_0x518d06;try{FGSECOMAPP[$(250)]=new Intl[$(378)](Shopify?.[$(345)]??Shopify?.[$(347)],{style:"currency",currency:Shopify?.[$(375)]?.[$(514)]??"USD"})}catch(x){FGSECOMAPP[$(250)]=new Intl[$(378)]("en-US",{style:"currency",currency:Shopify?.[$(375)]?.[$(514)]??$(359)})}},A=$=>{let x=_0x518d06;$=$??0;let e=Shopify?.[x(375)]?.[x(737)]??1;return 1===parseFloat(e)?$:($*e).toFixed(Shopify?.[x(632)]??2)},k=$=>{let x=_0x518d06;try{return $[FGSECOMAPP.sca_price]??$?.[x(650)]??$?.[x(758)]}catch(e){return $?.final_price??$?.[x(758)]}},O=$=>{let x=_0x518d06;return $[x(591)]($=>void 0===$[x(569)]||!0===$[x(569)]).reduce(($,e)=>$+e[x(786)]*k(e),0)/100},D=$=>{let x=_0x518d06;return $[x(591)]($=>void 0===$[x(569)]||$.cal_gift_for_other_rules)[x(512)](($,x)=>$+x.quantity,0)},R=($,x,e)=>{let t=_0x518d06,a=x[t(257)];return e?.is_only&&($=$.filter($=>u($))),E(a)?$:$[t(591)]($=>{let x=t;return!a[x(561)](e=>{let t=x;switch(e[t(554)]){case t(774):return Object[t(729)](e[t(360)])[t(561)]($=>$[t(541)]).flat().map($=>$.id).includes($.variant_id);case t(462):return Object[t(712)](e.value).includes($.product_type);case"product_vendors":return Object.keys(e[t(360)])[t(395)]($.vendor);case t(295):let a=Object[t(712)](e[t(360)]),i=$.collections?.map($=>$.id+"")?.[t(591)]($=>a[t(395)]($));return!E(i);default:return!1}})[x(395)](!1)})},P=($,x)=>$?.map($=>{let e=_0x114d;if(typeof $[e(569)]!==e(507)){let t=FGSECOMAPP[e(544)]?.[e(591)](x=>x[e(659)]===$[e(681)]),a=t?.reduce(($,x)=>$+x[e(786)],0);if(a===$[e(786)]){let i=t?.[e(591)](t=>{let a=e;if(t[a(526)]?.toString()===x[a(642)]())return!1;let i=FGSECOMAPP.offers?.[a(809)]($=>$.id?.[a(642)]()===t.belongs_to_offer?.[a(642)]()),r=i.gift_settings??{},c=k($);return r[a(569)]&&c>0})?.[e(512)](($,x)=>$+x[e(786)],0);return{...$,cal_gift_for_other_rules:i>0,quantity:i??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[],L=($,x,e,t)=>{let a=_0x518d06,i=0,r=R(x,$,t);r=P(r,$[a(273)]);let c;return $[a(517)]===a(446)?c=O(r):$[a(517)]===a(336)&&(c=D(r)),c>=$[a(445)]&&(null===$[a(470)]||c<=$.max_amount)&&(i=e.number_of_gift_can_receive,$[a(266)]&&(i=Math[a(265)](c/$.min_amount)*i)),i},N=($,x,e,t)=>{let a=_0x518d06,i={},r=[],c=0;return x[a(561)](x=>{let i=a,o=L(x,$,e,t);0!==o&&(c=o),r[i(466)](o>0)}),i[a(407)]=c,i.condition_result=r,i},G=($,x)=>{let e=_0x518d06,t=!1;return 1===$[e(602)]?t=$[0]:2===$[e(602)]&&(x===e(513)&&(t=$[0]&&$[1]),"or"===x&&(t=$[0]||$[1])),t},F=($,x)=>{let e=_0x518d06,t=$?.[e(561)]($=>$.variant_id);FGSECOMAPP.arrOfferAdded=FGSECOMAPP[e(544)][e(591)]($=>t?.[e(395)]($[e(659)]));let a=x[e(306)][e(561)]($=>$.variant_shopify_id),i=FGSECOMAPP[e(544)].filter($=>$.belongs_to_offer?.[e(642)]()===x.id?.[e(642)]())?.map($=>$.variantId),r=$[e(591)]($=>{let x=e;return f($)&&($[x(569)]=!1),a[x(395)]($[x(681)])&&i[x(395)]($[x(681)])}),c=r.map($=>{let t=e,a=x[t(310)];$[t(569)]=a[t(569)],$[t(526)]=x.id?.[t(642)]();let i=FGSECOMAPP[t(544)]?.filter(e=>e[t(526)]?.toString()!==x.id?.[t(642)]()&&$[t(681)]===e.variantId)?.[t(512)](($,x)=>$+x.quantity,0);return{...$,quantity:$[t(786)]-i}});return c[e(591)]($=>{let t=e;return $[t(526)]?.[t(642)]()===x.id?.[t(642)]()})},q=$=>{let x=_0x518d06,e=$[x(426)][x(591)](e=>e.belongs_to_offer?.[x(642)]()!==$.id?.toString()).map($=>$[x(787)]);return Object[x(729)]($[x(502)])[x(591)]($=>!e.includes($.product_shopify_id))},M=($,x)=>{let e=_0x518d06,t=F($,x),a=N($,x[e(479)],x[e(310)],x[e(742)]?.[e(699)]),i=G(a[e(616)],x.condition_relationship);if(i){let r=t[e(591)]($=>$[e(526)]?.[e(642)]()===x.id?.toString())[e(512)](($,x)=>$+x[e(786)],0);a[e(407)]=a[e(407)]-r,x.giftsAdded=t,x[e(521)]=a.max_gifts_can_get}else x[e(426)]=t,x[e(521)]=0;return typeof FGSECOMAPP[e(798)]===e(249)&&x.priority>FGSECOMAPP[e(798)]&&(i=!1),i||!x[e(816)]||FGSECOMAPP.maxOfferPriority!==x[e(600)]||E(t)||(FGSECOMAPP.maxOfferPriority=null),x.isReachConditions=i,x[e(816)]&&i&&(null==FGSECOMAPP[e(798)]||x.priority<=FGSECOMAPP[e(798)])&&FGSECOMAPP.maxOfferPriority!==x[e(600)]&&(FGSECOMAPP[e(798)]=x[e(600)]),x},H=$=>{let x=_0x518d06,e=$+"=",t=document[x(703)][x(369)](";");for(let a=0;a{let e=_0x518d06,t=!0,a=!0,i=!0,r=!0;if(!E($[e(742)]?.[e(835)])){let c=H("sca_fg_codes");t=c&&JSON[e(334)](c)[e(395)]($.sub_conditions[e(835)])}if(!E($[e(742)]?.[e(288)])){let{customer_tags:o}=$.sub_conditions,_=o?.[e(364)]?.some($=>x[e(343)].tags?.[e(395)]($));a=o?.[e(290)]===e(621)?_:!_}if(!E($[e(742)]?.customer_locations)){let{customer_locations:s}=$[e(742)],n=s?.[e(374)]?.includes(FGSECOMAPP[e(453)]);r=s?.[e(670)]===e(621)?n:!n}if(!E($[e(742)]?.customer_order_history)){let d=!0,l=$[e(742)][e(362)],f=x[e(343)][e(639)]??[];if(l[e(708)]){let u=Date.parse(l.order_created_from)/1e3;f=f.filter($=>$.created_at>=u)}if(!E(l?.[e(423)])&&(0!==l[e(529)][e(445)]||0!==l[e(529)].max_amount)){let g=l[e(529)].min_amount,p=l[e(529)][e(470)],b=f[e(512)](($,x)=>$+x[e(320)],0)/100;d&=(b>=g||!g)&&(b<=p||!p)}if(!E(l?.total_spent_on_last_order)&&(0!==l.total_spent_on_last_order.min_amount||0!==l[e(745)][e(470)])){let h=x[e(343)][e(610)]/100,m=l[e(745)][e(445)],y=l[e(745)][e(470)];d&=(h>=m||!m)&&(h<=y||!y)}if(!E(l?.[e(429)])){let v=!(0!==l[e(429)][e(445)]||0!==l.number_of_order[e(470)]),T=f[e(602)],C=l[e(429)][e(445)],S=l[e(429)][e(470)];d&=v?E(f):(T>=C||!C)&&(T<=S||!S)}if(l?.[e(481)]){let I=x.customer.freegifts??[],w=$.gift_items?.[e(601)]($=>I[e(395)]($.variant_shopify_id))||$[e(306)]?.some($=>I[e(395)]($.original_variant_shopify_id+"_"+($[e(411)]-$.price)*100));d&=!w}i=d}return t&&a&&i&&r},B=($,x,e)=>{let t=_0x518d06,a=[],i=[],r=[],c=[];for(let o of x){let _=M($,o);if(!_[t(449)]){_[t(426)][t(602)]>0&&_[t(426)][t(467)]($=>{let x=t;i[x(466)]({variant_id:$[x(681)],quantity:$[x(786)],offer_id:o.id})});continue}if(_[t(521)]<0){_[t(426)][t(467)]($=>{let x=t;i[x(466)]({variant_id:$[x(681)],quantity:$[x(786)],offer_id:o.id})});continue}0!==_[t(521)]&&(o[t(742)]?U(o,SECOMAPP)&&a[t(466)](o):a[t(466)](o))}if($?.[t(467)]($=>{let x=t;E($[x(526)])&&f($)&&i[x(466)]({variant_id:$.variant_id,quantity:$[x(786)],offer_id:$[x(526)]?.toString()})}),e||E(i)){let s=a.map($=>{let x=t;return{id:$.id,offerName:$[x(469)],offerPriority:$.priority,stopLowerPriority:$[x(816)],gifts:q($),giftsAvailable:$[x(521)],giftsAdded:$[x(426)],isReachConditions:$[x(449)]}});if(!E(s)){let n={};for(let d of s){let l=z(FGSECOMAPP[t(697)],d);l?.[t(602)]>0?r=r[t(381)]([...l]):d[t(399)][t(561)]($=>{let x=t;n[$[x(843)]]={...$,belongs_to_offer:d.id?.[x(642)]()}})}c=Object.values(n)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:c}},j=($,x)=>{let e=_0x518d06,t=new Set;return $?.[e(467)]($=>t.add($.offer_id)),t[e(467)]($=>{let x=e,t=FGSECOMAPP[x(578)]?.find(e=>e.id?.[x(642)]()===$?.[x(642)]());if(E(t)||!t.isReachConditions){FGSECOMAPP[x(544)]=FGSECOMAPP.arrOfferAdded?.filter(e=>e[x(526)]?.[x(642)]()!==$?.[x(642)]());return}if(t[x(521)]>=0)return;let a=[],i=FGSECOMAPP[x(544)]?.[x(591)](e=>e.belongs_to_offer?.[x(642)]()===$?.[x(642)]())??[];if(t?.[x(310)]?.[x(627)])a=a[x(381)]([...i]),t[x(521)]=0;else for(let r of i){if(t[x(521)]>=0)break;t[x(521)]+=r[x(786)],t.giftsAvailable<=0?a.push({...r}):(r[x(786)]=t.giftsAvailable,t[x(521)]=0)}a?.[x(467)]($=>{let e=x;FGSECOMAPP[e(544)]=FGSECOMAPP.arrOfferAdded?.[e(591)](x=>$[e(659)]!==x[e(659)]||$.belongs_to_offer?.toString()!==x.belongs_to_offer?.toString())})}),x?.[e(591)]($=>{let x=e;return f($)&&($.quantity=FGSECOMAPP[x(544)]?.[x(591)](e=>$[x(681)]===e[x(659)])?.reduce(($,e)=>$+e[x(786)],0)??0),$[x(786)]>0})??[]},V=async($,x)=>{let e=_0x518d06,{arrGiftsAdd:t,arrGiftsRemove:a,arrGiftsData:i}=B($,x,!1),r=j(a,$);if(!E(a)){let c=B(r,x,!0);j(c?.[e(823)],$),t=c?.arrGiftsAdd,a=a?.concat(c?.[e(823)])??[],i=c?.arrGiftsData}return await p(t,a),n()[e(368)](),i},z=($,x)=>{let e=_0x518d06,t=[];if($[e(551)]){let a=x[e(399)],i=a[e(512)](($,x)=>$+x[e(558)][e(602)],0),r=FGSECOMAPP[e(578)][e(591)]($=>$.id===x.id),c=r[0][e(310)][e(627)],o=r[0].gift_should_the_same;if(1===i||c||o[e(775)]){if($[e(633)]&&!Y(a))return!1;let _=$?.compare_gift_price_with_product;if(_&&!Z(a,_))return!1;if(o[e(775)]){if(o[e(554)]===e(541)){let s=FGSECOMAPP[e(459)];s=s.filter($=>{let x=e;return $[x(787)]===a[0][x(677)]});let n=a[0][e(558)][e(591)]($=>{let x=e;return s[0][x(681)]===$.original_variant_shopify_id})[0];if(0===n.price)return t[e(466)]({variant_id:n.variant_shopify_id,quantity:x[e(521)],offer_id:x.id}),t}else if(c){let d=a?.[e(512)](($,x)=>($+x?.[e(558)]?.length)??0,0);if(!d)return!1;let l=(x?.giftsAvailable??0)/d;for(let f of a)for(let u of f[e(558)])t.push({variant_id:u[e(361)],quantity:l,offer_id:x.id});return t}}else{if(c){let g=a?.[e(512)](($,x)=>($+x?.variants?.[e(602)])??0,0);if(!g)return!1;let p=(x?.[e(521)]??0)/g;for(let b of a)for(let h of b[e(558)])t[e(466)]({variant_id:h[e(361)],quantity:p,offer_id:x.id});return t}{let m=a[0][e(558)][0];if(0===m[e(758)])return console[e(491)](e(506)+a[0][e(558)][0][e(361)]+" "+a[0][e(558)][0][e(625)]),t[e(466)]({variant_id:m[e(361)],quantity:x[e(521)],offer_id:x.id}),t}}}}return!1},X=$=>{let x=_0x518d06;return $===x(722)},W=$=>{let x=_0x518d06;try{let e=Shopify[x(413)]??FGSECOMAPP[x(330)]?.gift_slider?.[x(789)]?.[x(820)]??x(588),t=new URL($),a=new URLSearchParams(e);return a.forEach(($,e)=>t[x(725)].set(e,$)),t[x(642)]()}catch(i){return $}},K=$=>{let e=_0x518d06,t=$;if("by_variants"===FGSECOMAPP[e(741)][e(406)])for(let a of(t=[],$)){let i=a[e(558)];i&&i[e(602)]&&i[e(467)]($=>t[e(466)]({...a,thumbnail:$.thumbnail,variants:[$]}))}let r=document[e(427)]("fg-gift-items");r&&(r.innerHTML=t[e(561)]($=>{let t=e,a=$?.[t(558)][0]??{},i=X(a[t(625)]),r=$[t(558)]?.[t(602)],c=b(S($[t(677)],$[t(837)])),o=FGSECOMAPP[t(741)]?.show_gift_for_customer===t(444),_=document.querySelector(x[t(379)])?.[t(370)]??x[t(647)];return _[t(322)](/{{\s*fg_product_handle\s*}}/gm,b(C($[t(677)],$[t(259)]),!0))[t(322)](/{{\s*fg_product_img\s*}}/gm,b(W($[t(552)]),!0))[t(322)](/{{\s*fg_product_img_alt\s*}}/gm,c).replaceAll(/{{\s*fg_product_title\s*}}/gm,c).replaceAll(/{{\s*fg_gifts_check_show_by_variants\s*}}/gm,b(o&&FGSECOMAPP[t(741)][t(796)]?"":t(465)))[t(322)](/{{\s*fg_gifts_check_show_by_products\s*}}/gm,o?t(465):"").replaceAll(/{{\s*fg_check_selected_variant\s*}}/gm,1===r?t(371)+(i?t(465):""):"").replaceAll(/{{\s*fg_variant_title\s*}}/gm,b(1!==r?FGSECOMAPP[t(741)][t(821)]??t(533):a[t(625)]))[t(322)](/{{\s*fg_original_price\s*}}/gm,b(T(a)))[t(322)](/{{\s*fg_gift_price\s*}}/gm,b(v(a))).replaceAll(/{{\s*sca_fg_variant_select_section\s*}}/gm,b(y($[t(558)],$[t(552)])))[t(322)](/{{\s*fg_product_belongs_to_offer\s*}}/gm,$[t(526)]).replaceAll(/{{\s*fg_variant_id\s*}}/gm,b(1===r?a[t(361)]:"")).replaceAll(/{{\s*fg_add_to_cart\s*}}/gm,b(FGSECOMAPP[t(741)]?.[t(405)]??t(720)))}).join(" \n"),new Glider(document.querySelector(e(656)),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP[e(741)][e(749)]?e(657):null,arrows:{prev:e(730),next:".freegifts-main-container .glider-next"},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP.fgAppearanceGiftSlider.number_product_slider??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),document.dispatchEvent(new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.SHOW_GIFT_SLIDER,{detail:FGSECOMAPP})))},Q=async()=>{let $=_0x518d06;try{let x=window.fgData?.[$(578)]??[];for(let e in await $m(),Shopify?.[$(396)])E(Shopify?.products[e]?.id)&&delete Shopify?.[$(396)][e];let t=[];return x[$(467)](x=>{let e=$;try{let a=JSON.parse(JSON.stringify(x));if(x[e(761)][e(775)]){let i=x[e(479)][0][e(257)],r=i[0].value,c=[...a[e(306)]],o=[...a[e(502)]];if(x[e(761)][e(554)]===e(541))for(let _ in r){let s=r[_]?.[e(541)]??[];for(let n of s){a[e(479)][0][e(257)]=[{type:i[0][e(554)],value:{[_]:{...r[_],variant:[{...n}]}}}],a[e(306)]=c[e(591)]($=>$[e(677)]+""===_&&n.id===$[e(391)]),a.gift_products=o[e(591)]($=>$.original_product_shopify_id+""===_),a[e(502)][0].variants=[...a.gift_items];let d=a[e(310)][e(510)],l=a[e(310)][e(627)];a[e(310)][e(627)]&&(d=a.gift_items[e(602)]),1===a.gift_items[e(602)]&&0===a[e(306)][0][e(758)]&&(l=!0),t[e(466)](JSON[e(334)](JSON.stringify({...a,gift_settings:{...a.gift_settings,number_of_gift_can_receive:d,auto_add_all_gifts:l},id:a.id+"_"+r[_][e(776)]+"_"+n.id})))}}else if("product"===x[e(761)][e(554)])for(let f in r){a.offer_conditions[0][e(257)]=[{type:i[0].type,value:{[f]:r[f]}}],a[e(306)]=c[e(591)]($=>$[e(677)]+""===f),a.gift_products=o.filter($=>$[e(677)]+""===f);let u=a[e(310)][e(510)],g=a[e(310)].auto_add_all_gifts;a[e(310)][e(627)]&&(u=a[e(306)][e(602)]),1===a.gift_items[e(602)]&&0===a[e(306)][0][e(758)]&&(g=!0),t.push(JSON[e(334)](JSON[e(724)]({...a,gift_settings:{...a[e(310)],number_of_gift_can_receive:u,auto_add_all_gifts:g},id:a.id+"_"+r[f][e(776)]})))}}}catch(p){console[e(638)](p)}}),(x=(x=(x=x?.[$(591)](x=>!x?.[$(761)]?.[$(775)])?.concat(t))?.[$(561)]($=>({...$,id:$.id.toString()})))?.filter(x=>{let e=$;if(!$0(x.start_time,x[e(468)]))return!1;let t=!E(x.sub_conditions?.customer_order_history||x[e(742)]?.[e(288)]);if(x[e(742)]&&(!U(x,SECOMAPP)||t&&E(SECOMAPP.customer[e(759)])))return!1;let a={...Shopify?.products},i=!1;if("stop_offer"===FGSECOMAPP[e(697)][e(509)]){x[e(306)]=x?.[e(306)][e(591)]($=>{let x=e,t=a[$.original_product_shopify_id]?.[x(428)]??{};return t[$.original_variant_shopify_id]>0})??[];let r=x[e(306)]?.[e(561)]($=>$[e(361)]);x[e(502)]=x?.[e(502)]?.[e(591)]($=>{let x=e;return $[x(558)]=$?.[x(558)]?.[x(591)]($=>{let e=x;return r?.[e(395)]($.variant_shopify_id)}),$?.[x(558)]?.length>0}),i=!0}else if(FGSECOMAPP[e(697)][e(408)]){x[e(306)]=x?.[e(306)][e(591)]($=>{let x=e,t=a[$[x(843)]]?.variants_quantity??{};return t[$[x(361)]]>0});let c=x.gift_items?.[e(561)]($=>$[e(361)]);x[e(502)]=x?.[e(502)]?.[e(591)]($=>{let x=e;return $[x(558)]=$?.[x(558)]?.filter($=>{let e=x;return c?.[e(395)]($.variant_shopify_id)}),$?.[x(558)]?.[x(602)]>0}),i=!0}return i&&x[e(310)]?.auto_add_all_gifts&&(x[e(310)][e(510)]=x[e(306)]?.[e(602)]),!i||x[e(306)]&&x[e(306)][e(602)]>0}))?.[$(561)](x=>{let e=$,t=x[e(306)][e(561)]($=>$[e(677)]);return x[e(502)]=x[e(502)]?.[e(591)]($=>{let x=e;return t[x(395)]($[x(677)])}),x[e(479)]?.[e(467)]($=>{let x=e;"money"===$[x(517)]&&($[x(445)]=A($[x(445)]),$[x(470)]=E($[x(470)])?$[x(470)]:A($[x(470)]))}),x})}catch(a){return console[$(638)](a),[]}},Y=$=>{let x=_0x518d06;for(let e of FGSECOMAPP[x(459)])if($[0][x(677)]===e[x(787)])return!1;return!0},Z=($,x)=>{let e=_0x518d06;for(let t of FGSECOMAPP[e(459)]){let a=$[0].variants[0].original_price;if(!t[e(776)].includes(e(383))&&(x===e(669)&&(a=$[0][e(558)][0][e(424)]),a>k(t)/100))return!1}return!0},J=async()=>{let $=_0x518d06;try{let x=[];window[$(608)]?.offers?.[$(467)](e=>{let t=$,a=[];e[t(502)][t(467)]($=>{let x=t;a[x(466)]($[x(296)],$.original_product_handle)}),x=[...x,...a]}),await $1(x=(x=[...new Set(x)])[$(591)](x=>E(FGSECOMAPP[$(767)][x]))),Object.values(FGSECOMAPP[$(767)])?.forEach(x=>{let e=$,{info:t}=x;E(t)||E(t?.id)||(Shopify[e(396)][t.id]={...t})})}catch(e){console[$(638)](e)}},$$=async $=>{let x=_0x518d06;try{Shopify[x(396)]=Shopify?.products??{}}catch(e){}w(),FGSECOMAPP[x(456)](),(FGSECOMAPP?.[x(697)]?.[x(509)]==="stop_offer"||FGSECOMAPP?.[x(697)]?.manual_input_inventory)&&await J(),FGSECOMAPP.offers=await Q(),FGSECOMAPP.initializeForXHR(),i(),o();try{E($)?(FGSECOMAPP.arrOfferAdded=[],localStorage.setItem("sca_offers_added",LZString[x(764)](JSON[x(724)](FGSECOMAPP[x(544)])))):FGSECOMAPP[x(544)]=JSON[x(334)](LZString[x(714)](localStorage[x(564)](x(474))))}catch(t){FGSECOMAPP[x(544)]=[],localStorage.setItem(x(474),LZString[x(764)](JSON[x(724)](FGSECOMAPP[x(544)])))}let a={};FGSECOMAPP[x(578)]?.forEach($=>{let e=x;a[$.id]=$?.[e(306)]?.map($=>$[e(361)])});let r=Object[x(712)](a);FGSECOMAPP[x(544)]=FGSECOMAPP.arrOfferAdded?.[x(591)]($=>r?.includes($[x(526)]?.[x(642)]())&&a[$[x(526)]?.[x(642)]()][x(395)]($.variantId));let c={};FGSECOMAPP.arrOfferAdded?.[x(467)]($=>{let e=x,t=c[$[e(526)]+"_"+$[e(659)]]??{};c[$.belongs_to_offer+"_"+$[e(659)]]={...$,belongs_to_offer:$[e(526)]?.[e(642)](),quantity:(t?.quantity??0)+($?.[e(786)]??0)}}),FGSECOMAPP[x(544)]=Object[x(729)](c),localStorage[x(768)](x(474),LZString.compressToBase64(JSON[x(724)](FGSECOMAPP[x(544)])));let _=await V($,FGSECOMAPP[x(578)]);await $e(_),$6(),$h(),$3()},$x=function(){let $=_0x518d06,x=document.querySelectorAll($(655)),e=document.querySelectorAll($(448)),a=$(390),i=document[$(826)]($(762)),r=i.length;for(let c=0;c{let e=$;x[e(385)]===document[e(702)](e(268))&&(document.querySelector(e(268)).classList[e(593)](a),t())}),document[$(683)]($(434),x=>{let e=$;x[e(673)]===e(309)&&document[e(702)](e(268))&&(document[e(702)](e(268))[e(549)][e(593)](a),t())}),document[$(826)]($(707))[$(467)](x=>x[$(683)]($(571),function(){let x=$;this.setAttribute(x(572),1),this[x(827)](),this[x(549)].toggle("active"),this[x(702)](x(595))[x(549)][x(319)](x(665))})),document[$(826)]("#fg-gift-items .dropdown").forEach(x=>document[$(683)]($(571),function(e){let t=$,a=x[t(436)](e[t(385)]);a||(x[t(549)].remove(t(514)),x.querySelector(t(595))[t(549)][t(593)](t(665))),document.querySelectorAll(".btn-add-to-cart.sca-fg-out-stock").forEach($=>{let x=t;$[x(700)]=!0,$.style[x(613)]="#82868b"})})),document[$(826)]($(814)).forEach(x=>{let e=$;x.addEventListener(e(571),function(){let $=e,x=this[$(409)]("id"),t=this[$(409)]($(800)),a=this[$(409)]("data-price"),i=this[$(409)]($(736)),r=this[$(409)]($(357)),c=this.parentElement[$(440)][$(440)][$(440)];c[$(702)](".product-item-thumbnail").setAttribute($(766),t);let o=new URL(c.querySelector($(483)).href);o[$(725)].set("variant",r),c[$(702)](".gift-original-url")[$(567)]=o[$(642)]();let _=this[$(440)][$(440)][$(440)];_.querySelector($(497))[$(522)]=i,_[$(702)]($(772)).textContent=a;let s=_?.querySelector($(443));s[$(384)]($(418),x),s[$(700)]=!1,s[$(493)]="";let n=this[$(440)][$(440)][$(702)]($(410));n[$(549)][$(511)]("active"),n[$(370)]=this[$(818)]})}),document[$(826)]("#fg-gift-items .btn-add-to-cart")[$(467)](x=>x[$(683)]($(571),async function(){let x=$,e=this[x(409)](x(418))-0,t=this.getAttribute("data-offer");try{await l(e,1,t);let i=document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg");i&&(FGSECOMAPP[x(298)]=!0,await new Promise($=>setTimeout($,800)),i[x(549)][x(593)](a)),window[x(829)][x(567)][x(395)](x(739))?location.reload():typeof Shopify?.[x(744)]===x(542)&&await Shopify?.[x(744)](0===FGSECOMAPP[x(484)][x(602)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console[x(638)](r)}}))},$0=($,x)=>{let e=_0x518d06;if($){let t=new Date,a=t[e(704)](),i=new Date($).getTime();if(!x)return a>=i;{let r=new Date(x)[e(704)]();return a>=i&&a<=r}}return!1},$e=async $=>{let x=_0x518d06;if(FGSECOMAPP.fgSettings?.[x(452)])for(let e of FGSECOMAPP[x(459)])f(e)&&($=$[x(591)]($=>$.product_shopify_id!==e[x(787)]));if(FGSECOMAPP[x(697)]?.[x(633)])for(let t of FGSECOMAPP.cartItems)$=$[x(591)]($=>$[x(677)]!==t[x(787)]);if(FGSECOMAPP[x(697)]?.compare_gift_price_with_product)for(let a of FGSECOMAPP.cartItems)$=$[x(591)]($=>{let e=x;return $[e(558)]=$[e(558)][e(591)]($=>{let x=e,t=$[x(411)];return FGSECOMAPP[x(697)]?.[x(674)]===x(669)&&(t=$.original_compare_at_price),t<=k(a)/100}),!E($[e(558)])});$&&$.length>0&&(FGSECOMAPP[x(298)]?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP[x(298)]=!1,m(),K($)):(m(),K($))),$x(),FGSECOMAPP[x(456)](),FGSECOMAPP[x(501)](FGSECOMAPP[x(578)]),$r=[]},$t=async $=>{let x=_0x518d06;$r=[];let e=new URL(window[x(829)].href);e[x(725)][x(422)](x(263),""),a(e.toString()).then($=>$[x(664)]()).then($=>{let e=x,t=new DOMParser,a=t[e(536)]($,e(331)),i=".fg-secomapp-cart-drawer "+I(e(641)),r=".fg-secomapp-cart-icon "+I(e(706)),c=document.querySelector(i),o=!1;c&&(o=!0,c[e(370)]=a.querySelector(i)?.[e(370)]??c[e(370)]);let _=document.querySelector(r);_||(_=document.querySelector(e(629))),_&&(o=!0,_[e(370)]=a[e(702)](r)?.[e(370)]??a.querySelector(e(455))?.[e(370)]??_[e(370)]),o||console[e(491)](e(495))}),typeof FGSECOMAPP?.[x(353)]===x(542)&&await FGSECOMAPP.reRenderCartCustom(),document[x(740)](new CustomEvent(FGSECOMAPP[x(281)][x(393)],{detail:FGSECOMAPP})),g("end"),setTimeout(function(){$e($)},800)},$a=async $=>{let x=_0x518d06,e=await a(x(556)+($??""),{method:"GET",headers:{Accept:x(755),"Content-Type":x(755)}})[x(368)]($=>$[x(489)]()),t=e[x(527)];return FGSECOMAPP[x(661)]=e,FGSECOMAPP[x(459)]=t?.[x(561)]($=>{let e=x;return{...FGSECOMAPP[e(459)]?.[e(809)](x=>x.id===$.id),...$}})??[],e},$i=async()=>{let $=_0x518d06,x=FGSECOMAPP[$(661)];try{await a(SECOMAPP[$(624)],{method:$(275),headers:{"Content-Type":"application/liquid"}})[$(368)](async e=>{let t=$,a=await e[t(489)]();FGSECOMAPP[t(459)]=a?.[t(451)]?.[t(561)]($=>{let x=t;return{...FGSECOMAPP[x(459)]?.find(x=>x.id===$.id),...$[x(340)],collections:$[x(492)],tags:$[x(442)]}})??[],FGSECOMAPP.SHOPIFY_CART=a?.shopify_cart??{},x=FGSECOMAPP[t(661)]})[$(328)](async e=>{let t=$;console[t(638)](t(285)+e[t(450)]),x=await $a()})}catch(e){console[$(638)]($(805),e[$(450)]),x=await $a()}return x},$r=[],$c=async $=>{let x=_0x518d06;try{$r[x(466)]($[0]),document[x(740)](new CustomEvent(FGSECOMAPP[x(281)].START_PROCESS_CART,{detail:{events:$r,FGSECOMAPP:FGSECOMAPP}})),await $i();let e=await V(FGSECOMAPP[x(459)],FGSECOMAPP.offers);FGSECOMAPP[x(501)](FGSECOMAPP.offers);let t=!1;return $[0][x(743)]("/cart/add")&&JSON[x(724)]($[1][x(711)]??[])[x(395)](x(372))?(console[x(491)](x(582),[...$r]),await $t(e),t=!0):$[0][x(743)](x(425))&&JSON.stringify($[1][x(711)]??[])[x(395)](x(300))?(console[x(491)](x(753),[...$r]),await $t(e),t=!0):(console[x(491)]("this is others",[...$r]),await $e(e)),t&&(window[x(829)].href[x(395)](x(739))||document[x(702)]("#secomapp_freegifts_version")?.[x(409)]("data-template")===x(607))&&($r=[],location[x(713)]()),document[x(740)](new CustomEvent(FGSECOMAPP[x(281)][x(585)],{detail:{events:$r,FGSECOMAPP:FGSECOMAPP}})),FGSECOMAPP[x(459)]}catch(a){console.error(a)}},$o=()=>{let $=_0x518d06;if(!Shopify?.[$(524)])return;let x=document[$(702)]($(267));if(!x)return;x[$(370)]="";let e=Shopify?.[$(645)]??$(304),t=document.createElement("li");t[$(675)]=$(834),t[$(370)]=$(346)+e+'
    \n
    \n \n \n \n \n \n ',x[$(637)](t),t.timeoutId=setTimeout(()=>$_(t),3e3),document[$(702)]($(752))?.addEventListener("click",()=>$_(t))},$_=$=>{let x=_0x518d06;$[x(549)][x(511)](x(795)),$[x(323)]&&clearTimeout($.timeoutId),setTimeout(()=>$.remove(),500)},$s=$=>{let x=_0x518d06;try{let e=FGSECOMAPP[x(697)]?.[x(245)],t=e===x(597)?$.target:$[x(329)]??$.target;t?.[x(376)](x(747))||(t=document[x(702)](x(351))?.parentNode);let a=JSON[x(334)](t[x(409)](x(373)));if(t.value=a?.value??"",t[x(370)]=a?.innerHTML??"",t[x(700)]=!1,t[x(804)]("click",$n),t[x(653)](x(747)),e===x(587)){t.parentNode[x(702)](x(648))[x(571)]();return}e===x(597)&&window.removeEventListener(x(571),$d,!0),t[x(571)]()}catch(i){window[x(829)][x(299)]((Shopify?.[x(689)]?.[x(604)]??"/")+x(337)),console.error(i[x(450)])}};FGSECOMAPP[_0x518d06(606)]=async($,x)=>{let e=_0x518d06;if("start"===$&&x)x[e(700)]=!0,x.setAttribute(e(373),JSON.stringify({innerHTML:x.innerHTML,value:x[e(360)]})),"function"==typeof FGSECOMAPP?.scaCustomLoadingCheckout?await FGSECOMAPP[e(251)]($):(x[e(360)]=Shopify?.[e(421)]??e(844),x[e(370)]=Shopify?.[e(801)]??e(333));else if($===e(573)&&x){if(typeof FGSECOMAPP?.[e(251)]===e(542))await FGSECOMAPP[e(251)]($);else{let t=JSON[e(334)](x[e(409)]("data-fg-checkout-btn"));x[e(360)]=t?.value??"",x[e(370)]=t?.[e(370)]??""}x[e(700)]=!1}else $===e(638)?(typeof FGSECOMAPP?.[e(251)]===e(542)&&await FGSECOMAPP.scaCustomLoadingCheckout($),window.location.replace((Shopify?.[e(689)]?.[e(604)]??"/")+e(337))):console[e(638)](e(255),$)};let $n=async $=>{let x=_0x518d06;try{$.preventDefault(),$[x(246)](),$[x(586)]();let e=FGSECOMAPP[x(697)]?.[x(245)],t="trigger_body"===e?$[x(385)]:$[x(329)]??$[x(385)],{form:i}=t;if(await FGSECOMAPP.customLoadingCheckout(x(649),t),document[x(740)](new CustomEvent(FGSECOMAPP[x(281)][x(454)],{detail:FGSECOMAPP})),FGSECOMAPP[x(553)])return!1;FGSECOMAPP[x(553)]=!0;try{let r=new URL(i[x(488)]);r.searchParams[x(792)]("sca_checkout_form",""),await a(r[x(642)](),{method:x(398),body:new FormData(i)})}catch(c){console[x(491)](x(397))}if(E(FGSECOMAPP[x(578)])&&E(FGSECOMAPP[x(459)]?.[x(809)]($=>f($))))return console.log(x(338)),$s($),!1;await $i();let o=[...FGSECOMAPP[x(459)]],_=!1;for(let s of FGSECOMAPP.offers)if(s[x(426)]&&s[x(426)][x(602)]){let n=M(o,s),d=$0(s[x(555)],s[x(468)]);!d&&n[x(426)].length>0&&(_=!0),n[x(449)]||(_=!0),n[x(521)]<0&&(_=!0),s[x(742)]&&!U(s,SECOMAPP)&&(_=!0)}if(await V(o,FGSECOMAPP[x(578)]),_)location[x(713)]();else try{FGSECOMAPP[x(697)][x(705)]&&!E(FGSECOMAPP.cartItems?.[x(809)]($=>f($)))?await a(SECOMAPP[x(624)]+"&sca_shop_name="+Shopify?.[x(447)],{method:x(275),headers:{"Content-Type":x(276)}})[x(368)](async $=>{let e=x,t=await $[e(489)]();t.cart=(t.cart??[])[e(561)]($=>{let x=e;return $.product[x(492)]=$[x(492)]?.[x(561)]($=>({id:$.id})),$[x(340)].tags=$[x(442)],{id:$[x(340)].id,variant_id:$.product[x(681)],title:$[x(340)][x(837)],handle:$[x(340)].handle,price:k($.product),quantity:$[x(340)][x(786)],product_type:$[x(340)].product_type,vendor:$.product.vendor,tags:$[x(340)][x(442)],collections:$[x(340)][x(492)],selling_plan_allocation:$[x(340)][x(680)]}}),t[e(789)]={arr_offer_added:FGSECOMAPP.arrOfferAdded,secomapp:{customer:SECOMAPP?.customer??{},fg_codes:SECOMAPP?.[e(832)]??[],fgSettings:FGSECOMAPP[e(697)]},cookie_fg_code:H("sca_fg_codes"),shopify_currency:Shopify?.currency},await a(SECOMAPP[e(624)]+e(735)+LZString[e(808)](t=JSON[e(724)](t)),{method:"GET",headers:{"Content-Type":e(276)}})[e(368)](async $=>{let x=e,t=await $[x(489)]();try{FGSECOMAPP[x(553)]=!1,t[x(339)]&&(window[x(829)].href=t[x(339)][x(612)])}catch(a){console[x(638)](a)}})}):(console.log(x(756)),FGSECOMAPP[x(553)]=!1,$s($))}catch(l){FGSECOMAPP[x(553)]=!1,$s(l)}await FGSECOMAPP[x(606)](x(573),t=e===x(597)?$[x(385)]:$[x(329)]??$.target),document.dispatchEvent(new CustomEvent(FGSECOMAPP[x(281)][x(432)],{detail:FGSECOMAPP}))}catch(u){await FGSECOMAPP[x(606)]("error"),document[x(740)](new CustomEvent(FGSECOMAPP[x(281)].END_VALIDATE_CHECKOUT,{detail:FGSECOMAPP})),console[x(638)](u)}},$d=async $=>{let x=_0x518d06;$[x(385)]?.[x(376)](x(747))&&await $n($)},$l=()=>{let $=_0x518d06,x=FGSECOMAPP.fgSettings?.[$(245)],e=$(277),t=e+$(356)+I($(367));document[$(826)](t).forEach(e=>{let t=$,a=e[t(376)](t(614)),i=e.hasAttribute(t(791)),r=e[t(376)](t(747));if(x===t(587)){if(a)return;if(!i&&!r){let c=e[t(687)](!0);c[t(683)](t(571),$n),c[t(384)]("sca_handle_checkout",""),c[t(384)](t(791),""),e[t(493)][t(690)]=t(486),e[t(493)][t(815)]=t(518),e.style[t(807)]="0",e[t(384)](t(614),""),e[t(505)]?.[t(637)](c)}i&&!r&&(e[t(683)]("click",$n),e[t(384)](t(747),""))}else"trigger_body"===x?e[t(384)](t(747),""):r||(e[t(683)]("click",$n),e[t(384)](t(747),""));FGSECOMAPP[t(349)]=!0}),x===$(597)&&window.addEventListener($(571),$d,!0)};FGSECOMAPP.fetchCheckoutEvents=()=>{FGSECOMAPP.scaCountRenderEventCheckout=0;let $=setInterval(()=>{let x=_0x114d;$l(),FGSECOMAPP[x(531)]++,(FGSECOMAPP[x(531)]>10||FGSECOMAPP.hasDoneProcessCheckout)&&(FGSECOMAPP[x(531)]=0,clearInterval($))},400)};let $8=$=>{let x=_0x518d06;try{let e={},t={},a=FGSECOMAPP[x(578)];if(E($)){$=[],E(Shopify?.[x(838)])||$[x(466)]({...Shopify?.[x(838)]});let i={...Shopify?.other_products,...Shopify?.[x(535)]?.[x(396)]};Object[x(729)](FGSECOMAPP[x(767)])?.filter($=>!E($[x(751)])&&(E($?.[x(581)])||$?.product_has_icon&&!$?.[x(710)]?.every($=>$?.[x(549)]?.[x(436)](x(715)))))?.[x(467)]($=>{let e=x;i[$[e(751)].id]={...$[e(751)]}}),$=$.concat([...Object[x(729)](i)])}for(let r in $?.[x(467)]($=>{let e=x,t=FGSECOMAPP.productsInPage[$[e(776)]];FGSECOMAPP[e(767)][$[e(776)]]={...t,info:{...$},product_has_icon:!!E(a)&&void 0}}),a?.[x(467)](a=>{let i=x,r=a[i(479)];if(1===r[i(602)]&&"number_of_products"===r[0][i(517)]&&typeof r[0].is_multiply===i(321)){let c,o=r[0][i(257)];o?.[i(467)](x=>{let e=i;switch(x[e(554)]){case e(774):c=Object[e(729)](x[e(360)]);break;case e(462):let t=Object[e(712)](x[e(360)]);t[e(602)]>0&&(c=(void 0===c?$:c)?.[e(591)]($=>t[e(395)]($[e(554)]))??[]);break;case e(839):let a=Object[e(712)](x[e(360)]);a[e(602)]>0&&(c=(void 0===c?$:c)?.filter($=>a[e(395)]($.vendor))??[]);break;case e(295):let r=Object[e(712)](x[e(360)]);r[e(602)]>0&&(c=(void 0===c?$:c)?.[e(591)]($=>{let x=e,t=$.collections?.[x(561)]($=>$.id+""),a=t?.[x(591)]($=>r.includes($));return!E(a)})??[])}}),c?.[i(467)]($=>{let x=i,r=$[x(776)];if(e[r]){let c=e[r]?.[x(561)]($=>$.original_product_shopify_id),o=a.gift_products?.[x(591)]($=>!c?.[x(395)]($[x(677)]));e[r]=e[r][x(381)](o)}else e[r]=a[x(502)];let _=$.variant?.[x(561)]($=>$.id)??[];t[r]=_.concat(t[r]??[]),t[r]=[...new Set(t[r])]})}}),e){let c=FGSECOMAPP[x(767)][r];FGSECOMAPP[x(767)][r]={...c,gifts_will_receive:[...e[r]],product_has_icon:!0,variants_has_gift:[...t[r]]}}return Object[x(603)](e)?.[x(602)]?e:{}}catch(o){return console.error(o),null}},$f=$=>{let e=_0x518d06,t=FGSECOMAPP[e(660)][e(782)]??{};if(!t[e(662)]?.status)return;let a=document[e(702)](x[e(668)])?.innerHTML??x[e(312)],i=$?.[e(561)]($=>a[e(322)](/{{\s*fg_product_handle\s*}}/gm,b(C($[e(677)],$[e(259)]),!0))[e(322)](/{{\s*fg_product_img\s*}}/gm,b(W($[e(552)]),!0)).replaceAll(/{{\s*fg_product_img_alt\s*}}/gm,b(S($.original_product_shopify_id,$.title)))).join(""),r=document[e(702)](x[e(247)])?.[e(370)]??x[e(598)],c=r[e(322)](/{{\s*fg_gift_thumbnail_title\s*}}/gm,b(t[e(662)]?.[e(837)]??e(317)))[e(322)](/{{\s*sca_fg_gift_thumbnail_items_section\s*}}/gm,i)[e(322)](/{{\s*fg_check_show_narrow\s*}}/gm,$?.length>=4?"":e(465)),o=e(325)+I("sca_fg_btn_gift_thumbnail_query"),_=document[e(702)](o)??document[e(702)]("[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']");if(!_)return;_.parentNode[e(493)][e(568)]=e(403),_[e(505)][e(493)].height=e(435),_[e(505)]?.[e(675)]?.[e(395)](e(769))||_[e(505)]?.[e(549)]?.[e(511)]("sca-fg-form-thumbnail-product-page");let s=_[e(505)][e(702)]("#sca-gift-thumbnail");if(s)s[e(370)]=c;else{(s=document[e(750)](e(574))).setAttribute("id",e(252));let n=new DOMParser().parseFromString(c,e(331));s[e(370)]=n[e(803)].innerHTML,_[e(505)].insertBefore(s,_)}_[e(505)][e(840)](s,_);let d=document.querySelector(e(623));if(d)switch(t[e(662)]?.[e(519)]){case"32":d[e(493)][e(836)]=e(389);break;case"50":d.style.maxWidth=e(654);break;case e(297):d[e(493)].maxWidth=e(313);break;case e(817):d[e(493)][e(836)]=e(780);break;case"240":d[e(493)][e(836)]=e(403);break;default:d[e(493)][e(836)]=e(654)}if($?.[e(602)]>=4)new Glider(document[e(702)](e(417)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:e(311),arrows:{prev:e(773),next:e(732)}});else{d&&(d[e(493)][e(836)]=e(403));let l=document[e(702)](".sca-list-gift-thumbnail");l&&(l[e(493)][e(690)]=e(270))}},$u=()=>{let $=_0x518d06;if(!(FGSECOMAPP[$(660)][$(782)]??{})[$(652)]?.status)return;let e=document[$(702)](x.GIFT_ICON_SECTION_ID)?.[$(370)]??x[$(269)],t=e.replaceAll(/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[$(660)][$(487)])[$(322)](/{{\s*fg_gift_icon_alt\s*}}/gm,$(264))[$(322)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,$(605)),a=$(783)+I($(473)),i=document[$(702)](a)??document[$(702)]($(709));if(!i)return;i.style[$(499)]="relative",i[$(493)][$(568)]=$(788),i[$(675)]?.[$(395)]($(802))||i[$(549)]?.[$(511)]($(802));let r=i[$(702)]($(619));if(r)r[$(370)]=t;else{(r=document[$(750)]($(574)))[$(384)]("id",$(386));let c=new DOMParser().parseFromString(t,$(331));r.innerHTML=c[$(803)][$(370)],i[$(637)](r)}},$g=()=>{let $=_0x518d06,x=[],e=".fg-secomapp-collection-img, .product-card, #product-grid .grid__item, .product-grid .grid__item, .card-list .card-list__column, .cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item "+I($(537));return document[$(826)](e)[$(467)](e=>{let t=$,a=e[t(702)](t(382)),i=a?.[t(409)](t(567))?.[t(369)]("/")??[],r=i?.indexOf(t(396)),c=r>=0?i[r+1]??null:null;if(c=c?.[t(369)]("?")?.[t(688)](),f(c)){e[t(593)]();return}let o=e[t(702)]('a[href*="/collections/sca_fg"]');if(o){e[t(593)]();return}if(E(c))return;let _=decodeURI(c);E(FGSECOMAPP.productsInPage[_]?.[t(751)])&&x[t(466)](_);let s=(FGSECOMAPP[t(767)][_]?.[t(710)]??[]).filter($=>!e.isSameNode($));s[t(466)](e),FGSECOMAPP.productsInPage[_]={...FGSECOMAPP.productsInPage[_],positions:[...s]}}),x},$p=$=>{let e=_0x518d06;Object[e(712)]($)?.[e(467)]($=>{let t=e,a=FGSECOMAPP[t(767)][$]?.positions??[];if(E(a)||!Array[t(811)](a))return;if(!(FGSECOMAPP[t(660)].collection_page??{})[t(775)])return;let i=document[t(702)](x[t(439)])?.innerHTML??x[t(269)],r=i.replaceAll(/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[t(660)][t(487)])[t(322)](/{{\s*fg_gift_icon_alt\s*}}/gm,t(264))[t(322)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,t(363));a.forEach($=>{let x=t;$.style.position=x(543),$[x(675)]?.includes("sca-fg-icon-collection-page")||$[x(549)]?.[x(511)](x(354));let e=$.querySelector(x(663));if(e)e[x(370)]=r;else{(e=document[x(750)]("div")).setAttribute(x(548),"sca-gift-icon-collection-page");let a=new DOMParser()[x(536)](r,x(331));e.innerHTML=a[x(803)][x(370)],$.appendChild(e)}})})},$b=async $=>{let x=_0x518d06;await a(SECOMAPP[x(624)]+x(525)+LZString[x(808)](JSON[x(724)]($)),{method:x(275),headers:{"Content-Type":"application/liquid"}})[x(368)](async $=>{let e=x,t=await $.json(),a=[];t?.[e(396)]?.forEach($=>{let x=e;E($?.[x(396)]?.id)||a[x(466)]({...$.products,collections:$[x(492)],variants_quantity:$.variants_quantity})});let i=$8(a);$p(i)})[x(328)]($=>{let e=x;console[e(638)]($)})},$1=async $=>{let x=_0x518d06,e=[];for(let[t,a]of $[x(603)]())E(FGSECOMAPP[x(767)][a]?.[x(751)])&&e[x(466)](a),20===e[x(602)]&&(await $b([...e]),e=[]),t===$[x(602)]-1&&e.length>0&&(await $b([...e]),e=[])},$3=()=>{let $=_0x518d06,x=$g(),e=$8();$p(e),$1(x)[$(368)]()},$6=()=>{let $=_0x518d06;Shopify?.enable_check_variants_has_gift&&document[$(683)]($(458),function(){let x=$,e=new URL(document[x(438)]),t=parseInt(e[x(725)][x(609)]("variant"));$h(isNaN(t)?void 0:t)})},$h=$=>{let x=_0x518d06;if(!location[x(567)][x(395)]("/products/"))return;document[x(702)](x(619))?.remove(),document.querySelector(x(327))?.[x(593)]();let e=$8();if(E(e))return;let t=location[x(779)][x(369)]("/"),a=t?.[x(293)]("products"),i=decodeURI(a>=0?t[a+1]??null:null);if(!Object[x(712)](e)?.[x(395)](i))return;let r=e[i],c=FGSECOMAPP.productsInPage[i]?.variants_has_gift??[];!(Shopify?.[x(716)]&&(!E($)&&!c[x(395)]($)||E($)&&!E(Shopify?.[x(838)]?.current_variant)&&!c[x(395)](Shopify?.current_product?.[x(727)]?.id)))&&($f(r),$u(r))};FGSECOMAPP[_0x518d06(501)]=$=>{let e=_0x518d06;try{E($)&&($=[...FGSECOMAPP[e(578)]]);let t=location[e(567)][e(395)](e(739)),a=[];if($?.[e(467)]($=>{let x=e;if($.isReachConditions||E($[x(291)])||!E(FGSECOMAPP[x(798)])&&!$[x(449)]&&$[x(816)]&&$[x(600)]>FGSECOMAPP[x(798)])return;let t=$[x(291)];$[x(479)]?.[x(467)]($=>{let e=x,a=R(FGSECOMAPP[e(459)],$);a=P(a,$[e(273)]);let i=0,r=null,c=0;"money"===$[e(517)]?(i=O(a),r=e(825),c=Shopify?.sca_amount_fixed??2):$.unit===e(336)&&(i=D(a),r=e(315),c=0);let o=Math[e(628)]($.min_amount-i,0)[e(341)](c);t=t[e(322)](r,o)}),a[x(466)](t)}),E(a)){document[e(826)](e(366))[e(467)]($=>$[e(370)]="");return}let i="",r=document[e(702)](x[e(284)])?.[e(370)]??x[e(565)],c=a.map($=>r[e(322)](/{{\s*fg_cart_message\s*}}/gm,b($)))[e(692)](""),o=document[e(702)](x[e(498)])?.[e(370)]??x[e(842)],_=o.replaceAll(/{{\s*sca_fg_cart_message_items_section\s*}}/gm,c);FGSECOMAPP.fgAppearancePromotionMessage[e(308)]&&(i=_);let s=e(540),n=document[e(702)](s),d=n?.[e(702)](e(757)),l=e(430),f=document.querySelectorAll(l+e(590)+I(e(731))),u=document[e(826)](e(366));E(u)||u[e(467)]($=>$[e(370)]=i),(u=document.createElement(e(574))).setAttribute("id","sca-promotion-message-layout"),u.classList[e(511)](e(271));let g=new DOMParser()[e(536)](i,e(331));u.innerHTML=g[e(803)][e(370)],E(f)?!n?.[e(702)](e(366))&&(g=new DOMParser()[e(536)](i,"text/html"),u[e(370)]=g[e(803)].innerHTML,n&&d&&t?d[e(819)](u):n&&t&&n[e(819)](u)):f?.[e(467)]($=>{let x=e;if($[x(702)](x(366)))return;let t=u[x(687)](!0);$[x(819)](t)});try{document.querySelectorAll(e(682))[e(467)]($=>{let x=e,t=new Glider($);(($,x)=>{let e=_0x114d,t=$[e(635)].childElementCount,a=null,i=1;function r(){a=setTimeout(()=>{let x=_0x114d;i>=t&&(i=0),$[x(415)](i++)},x)}$[e(620)][e(683)](e(615),function(){window[e(566)](a),r()}),r()})(t,Shopify?.[x(496)]??3e3)})}catch(p){console[e(638)](p)}}catch(h){console.error(h)}};let $m=async()=>{let $=_0x518d06;try{let x=await a($(302)),e=await x[$(489)]();FGSECOMAPP[$(453)]=e?.[$(404)]}catch(t){console[$(491)]($(335))}},$4=function(){let $=_0x518d06;try{let x=()=>{let $=_0x114d;"function"!=typeof FGSECOMAPP.reRenderCartCustom&&"function"==typeof window[$(431)]&&(FGSECOMAPP[$(353)]=async()=>{let x=$;console[x(491)](x(575)),await window[x(431)]()})};x(),window[$(683)]($(494),function(x){let e=$;FGSECOMAPP[e(501)](),FGSECOMAPP[e(456)]()}),window[$(683)]($(272),function(e){let t=$;x(),$c([t(272),{}])[t(368)](()=>{window[t(431)]()})}),window[$(683)]($(365),function(e){let t=$;x(),$c(["icartUpdateCartEvent",{}])[t(368)](()=>{window[t(431)]()})}),document[$(683)]($(461),x=>{let e=$;FGSECOMAPP[e(501)](),FGSECOMAPP[e(456)]()});let e=()=>{let x=$;typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&typeof window[x(437)]===x(542)&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console[$(491)]($(471)),await $a($(516))[$(368)](x=>{let e=$;window[e(437)](x),window[e(557)]()})})};e(),window[$(419)]=function(x){let t=$;e();let a={...FGSECOMAPP[t(661)]};$c([t(419),{}]).then(()=>{let $=t;$a("sca_slidecart_tcc")[$(368)](x=>{let e=$;window[e(253)](),window[e(437)](x),document.querySelector(e(268))||E(a)||window.SLIDECART_OPEN()})})},window[$(570)]=function(){let x=$;FGSECOMAPP[x(501)](),FGSECOMAPP[x(456)]()};let t=()=>{let x=$,e=document.querySelector(x(841));e&&(e[x(370)]=FGSECOMAPP?.[x(661)]?.[x(717)]??0),typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&typeof window[x(261)]===x(542)&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console[$(491)]($(667)),await window[$(261)]()})},a=()=>{let x=$;document[x(702)](x(833))||typeof window[x(261)]!==x(542)||window[x(261)]()};t(),window[$(812)]=(x,e)=>{let i=$;t(),a(),$c([i(812),{}])[i(368)]()},window.upcartOnCartUpdated=x=>{let e=$;t(),$c([e(433),{}])[e(368)]()},window[$(770)]=()=>{FGSECOMAPP.renderPromotionMessage(),FGSECOMAPP[$(456)]()};let i=()=>{let x=$;typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&"function"==typeof window.STICKY_CART_UPDATE&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console.log($(617)),await window[$(718)](),window[$(480)]()})};i(),document[$(683)]("cart:change",x=>{let e=$;i(),$c([e(301),{}])[e(368)]()});let r=()=>{let x=$;typeof FGSECOMAPP[x(353)]!==x(542)&&typeof window?.[x(676)]?.[x(550)]?.CartSlider?.[x(754)]===x(542)&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console[$(491)]($(563)),await window[$(676)].Widgets[$(546)][$(754)]()})};r(),document.addEventListener("ajaxProduct:added",x=>{let e=$;r(),$c(["sticky-cart:added",{}])[e(368)](()=>{let $=e;document[$(702)]($(268))&&document[$(702)]($(577))?.[$(571)]()})});let c=()=>{let x=$;typeof FGSECOMAPP[x(353)]!==x(542)&&typeof window[x(332)]===x(542)&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console[$(491)]($(806)),await window[$(332)](),window[$(748)]()})};c(),document[$(683)]($(799),x=>{let e=$;c(),$c([e(618),{}])[e(368)]()}),(()=>{let x=$;typeof FGSECOMAPP[x(353)]!==x(542)&&"function"==typeof window[x(503)]&&(FGSECOMAPP[x(353)]=async()=>{let $=x;console[$(491)]($(283)),await window[$(503)](),window[$(475)]()})})(),document[$(683)](FGSECOMAPP[$(281)][$(393)],async()=>{let x=$;try{unicart&&unicart[x(740)](x(580))}catch(e){console[x(638)](x(691),e)}}),document[$(683)](FGSECOMAPP.CUSTOM_EVENTS[$(646)],()=>{let x=$;try{typeof window[x(355)]===x(542)&&window[x(355)](),typeof window[x(679)]===x(542)&&window[x(679)]()}catch(e){console[x(638)](e)}})}catch(o){console.error(o)}};$$(FGSECOMAPP[_0x518d06(459)])[_0x518d06(368)](()=>{$4()})}}catch($y){console.log(_0x518d06(282),$y)}