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},"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 _0x39a1e3=_0x6dd4;!function($,x){let e=_0x6dd4,t=$();for(;;)try{let a=parseInt(e(589))/1+parseInt(e(672))/2*(-parseInt(e(610))/3)+-parseInt(e(369))/4+-parseInt(e(598))/5+-parseInt(e(593))/6*(-parseInt(e(370))/7)+-parseInt(e(477))/8*(parseInt(e(492))/9)+parseInt(e(337))/10;if(864023===a)break;t.push(t.shift())}catch(i){t.push(t.shift())}}(_0x1ea1,864023);try{let $=document[_0x39a1e3(678)]("secomapp_freegifts_version")?.[_0x39a1e3(577)]("data-version");if($===_0x39a1e3(547)){window[_0x39a1e3(535)]?.[_0x39a1e3(565)]?.[_0x39a1e3(419)]?.[_0x39a1e3(583)]&&fgGiftIcon&&(window.fgData[_0x39a1e3(565)][_0x39a1e3(419)][_0x39a1e3(583)]=fgGiftIcon),window[_0x39a1e3(495)]={},FGSECOMAPP[_0x39a1e3(602)]=null,FGSECOMAPP.cartItems=Object.values(Shopify?.cartItems??{}),FGSECOMAPP[_0x39a1e3(750)]=[],FGSECOMAPP.fgSettings=window[_0x39a1e3(535)]?.settings??{},FGSECOMAPP[_0x39a1e3(503)]=window[_0x39a1e3(535)]?.[_0x39a1e3(565)]??{},FGSECOMAPP[_0x39a1e3(626)]=FGSECOMAPP[_0x39a1e3(503)]?.gift_slider?.[_0x39a1e3(334)],FGSECOMAPP[_0x39a1e3(748)]=FGSECOMAPP[_0x39a1e3(503)]?.[_0x39a1e3(419)],FGSECOMAPP.fgAppearancePromotionMessage=FGSECOMAPP.fgAppearance?.[_0x39a1e3(717)],FGSECOMAPP[_0x39a1e3(697)]=[],FGSECOMAPP.secomappGetCartRunning=!1,FGSECOMAPP.arrOfferAdded=[],FGSECOMAPP[_0x39a1e3(710)]=0,FGSECOMAPP[_0x39a1e3(722)]=!1,FGSECOMAPP[_0x39a1e3(529)]={...Shopify?.scaHandleConfigValue},FGSECOMAPP.reRenderCartCustom=Shopify?.[_0x39a1e3(611)]??void 0,FGSECOMAPP[_0x39a1e3(635)]=Shopify?.[_0x39a1e3(635)]??void 0,FGSECOMAPP[_0x39a1e3(623)]={},FGSECOMAPP.hasDoneProcessCheckout=!1,FGSECOMAPP[_0x39a1e3(438)]={},FGSECOMAPP[_0x39a1e3(515)]=!1,FGSECOMAPP[_0x39a1e3(770)]={};let x=()=>{let $=_0x39a1e3,x=FGSECOMAPP[$(503)]?.[$(458)],e=x?.[$(498)]?.hidden_brand_mark,t=!b(x)&&void 0!==e&&!e;return t?$(756):""},e=()=>{let $=_0x39a1e3,x=FGSECOMAPP[$(503)]?.[$(458)],e=x?.[$(416)]??{};return document[$(638)]($(505))?.[$(471)]&&localStorage[$(646)]("FGSECOMAPP_HIDDEN_GIFT_POPUP",""+Date.now()),e?.[$(766)]?$(485)+e[$(525)]+$(712):""},{fetch:t}=window,a=()=>{let $=_0x39a1e3;document[$(638)]($(553))?.getAttribute($(607))!==$(790)&&(window[$(769)]=async(...x)=>{let e=$;try{if(x[0].includes(e(629))){i(x[1]);let a=200,r=await t(...x)[e(383)]($=>{let x=e;return(a=$[x(760)],$[x(734)])?$:$.json()}).catch($=>{let x=e;console[x(709)]($)});if(x[1][e(448)]?.sca_add_gift&&200!==a){let o=JSON[e(677)](x[1].body)?.id,n=document[e(638)](e(640)+o+'"]');return n[e(762)]="Out of stock",n[e(556)][e(695)]("sca-fg-out-stock")||n[e(556)][e(538)](e(531)),n[e(651)]=!0,n[e(440)][e(744)]=e(699),document[e(624)](e(719))[e(772)]($=>{let x=e;parseInt($[x(577)]("data-variant"))===o||$.classList[x(695)](x(531))||($.disabled=!1,$[x(440)].backgroundColor=FGSECOMAPP[x(503)]?.[x(458)]?.[x(636)]?.add_to_cart_btn_color??x(696))}),!1}return await Q([e(629),...x[e(625)](1)]),await c(x,r),new Response(JSON[e(627)](r))}if(!(x[0][e(399)](e(777))||x[0][e(399)](e(323))))return setTimeout(function(){$_()},1e3),await t(...x);{i(x[1]);let _=200,s=await t(...x).then($=>{let x=e;return(_=$[x(760)],$[x(734)])?$:$[x(549)]()})[e(622)]($=>{let x=e;console[x(709)]($)});if(x[1][e(448)]?.sca_process_gifts&&200!==_)return!1;if(await Q([x[0][e(399)](e(777))?e(777):e(323),...x[e(625)](1)]),x[1]?.[e(448)]?.[e(655)])return new Response(JSON.stringify(s));let l=await t(e(736)).then($=>$.json());return await c(x,s,l),new Response(JSON[e(627)](l))}}catch(d){return await t(...x)}})};FGSECOMAPP[_0x39a1e3(447)]=()=>{let $=_0x39a1e3;try{if(Shopify?.[$(435)]||typeof Shopify?.[$(603)]!==$(746))return;Shopify[$(603)]=async function(x){let e=$;if(!FGSECOMAPP[e(707)]){FGSECOMAPP[e(707)]=!0,await Q("/cart.js");let t=await fetch(e(736),{method:e(517),headers:{Accept:e(521),sca_fetch:e(347),"Content-Type":e(521)}});typeof x===e(746)&&(0>FGSECOMAPP[e(697)].indexOf(x)&&FGSECOMAPP[e(697)][e(641)](x),x(await t[e(549)]())),FGSECOMAPP[e(707)]=!1}FGSECOMAPP[e(507)]()},"undefined"!=typeof ShopifyAPI&&typeof ShopifyAPI[$(603)]!==$(576)&&(ShopifyAPI[$(603)]=Shopify?.[$(603)]),void 0!==Shopify?.[$(586)]&&typeof Shopify?.api[$(603)]!==$(576)&&(Shopify[$(586)][$(603)]=Shopify?.getCart)}catch(x){console[$(709)](x)}};let i=$=>{let x=_0x39a1e3;try{let e=$?.body;e instanceof FormData?FGSECOMAPP.sections_cart={sections:e[x(467)](x(644)),sections_url:e[x(467)]("sections_url")}:typeof e===x(661)&&(e=JSON.parse(e),FGSECOMAPP[x(438)]={sections:e?.[x(644)],sections_url:e?.[x(338)]})}catch(t){FGSECOMAPP[x(438)]={}}},r=async()=>{let $=_0x39a1e3;if(!b(FGSECOMAPP[$(351)])){let x=[$(436)];for(let e of FGSECOMAPP[$(351)]){let a=FGSECOMAPP[$(750)][$(530)](x=>x.id===e[$(353)])?.[$(363)]?.specific_link_address;b(a)||x[$(641)](a)}let i={freegift_attributes:x[$(657)]()};try{await t($(323),{method:$(519),headers:{"X-Requested-With":$(582),"Content-Type":$(403)},body:JSON[$(627)]({attributes:i})})}catch(r){console.error($(666)+r.message)}}},c=async($,x,e)=>{let a=_0x39a1e3;try{if($[1]?.[a(448)]?.sca_process_gifts)return;let i={},r=Object[a(647)](x[a(644)]??{})?.[a(794)]($=>b(FGSECOMAPP[a(438)][$]))??[];if(r&&r[a(726)]&&FGSECOMAPP.isUpdateCart&&(i=await t(a(782)+r[a(442)](",")).then($=>$[a(549)]())),FGSECOMAPP[a(515)]=!1,i={...FGSECOMAPP[a(438)],...i},b(i))return;x[a(644)]={...x[a(644)],...i},b(e)||(e[a(644)]={...x[a(644)]})}catch(c){}},o=async($,x,e)=>{let t=_0x39a1e3;e=e?.[t(657)]();let a=document[t(624)](t(406));a[t(772)](x=>{let e=t;x[e(651)]=!0;let a=x[e(577)]("data-variant")-0;a===$&&(x.style[e(430)]=e(621),x[e(662)]=e(464)),x.style.backgroundColor=e(699)});let i=FGSECOMAPP[t(351)][t(530)](x=>e===x.belongs_to_offer?.[t(657)]()&&$===x[t(788)]);i?i[t(484)]+=x:FGSECOMAPP[t(351)][t(332)]({variantId:$,belongs_to_offer:e,quantity:x}),localStorage[t(646)]("sca_offers_added",LZString[t(420)](JSON[t(627)](FGSECOMAPP.arrOfferAdded)));let r=await fetch(t(632),{method:"POST",headers:{Accept:t(521),"Content-Type":t(521),sca_add_gift:t(407)},body:JSON[t(627)]({quantity:x,id:$})}),c=await r[t(549)]();if(r.ok)return a[t(772)](x=>{let e=t;x[e(651)]=!0;let a=x[e(577)](e(667))-0;a===$&&(x[e(440)][e(430)]=e(621),x[e(662)]='\n \n \n \n '),x[e(440)][e(744)]=""}),K(),c},n=$=>{let x=_0x39a1e3,e="-sca_clone_freegift";return!b($)&&("object"==typeof $&&($[x(423)]?.[x(399)](e)||$.tags?.[x(399)](x(708)))||typeof $===x(661)&&$[x(399)](e))},_=async($,x)=>{let e=_0x39a1e3;try{if(b($)&&b(x))return;let t={};if(FGSECOMAPP[e(542)]?.[e(794)]($=>n($))?.forEach($=>{let x=e;t[$[x(488)]]=$[x(484)]}),($=$?.[e(794)]($=>!b($[e(488)])))?.[e(772)]($=>{let x=e;t[$.variant_id]=(t[$[x(488)]]??0)+($[x(484)]??1)}),Object[e(647)](t)?.[e(772)]($=>{t[$]=t[$]>=0?t[$]:0}),b(Object[e(647)](t)))return;$?.[e(772)]($=>{let x=e,t=FGSECOMAPP[x(351)][x(530)](e=>$[x(652)]?.[x(657)]()===e[x(353)]?.[x(657)]()&&$[x(488)]===e.variantId);t?t[x(484)]+=$[x(484)]:FGSECOMAPP[x(351)][x(332)]({variantId:$.variant_id,belongs_to_offer:$[x(652)]?.[x(657)](),quantity:$.quantity})}),localStorage[e(646)](e(694),LZString[e(420)](JSON[e(627)](FGSECOMAPP[e(351)]))),FGSECOMAPP[e(515)]=!0,await fetch(e(323),{method:e(519),headers:{Accept:e(521),"Content-Type":e(521),sca_process_gifts:!0},body:JSON[e(627)]({updates:t,...FGSECOMAPP.sections_cart})})[e(383)](t=>{let a=e;return t.ok&&$.length&&!x[a(726)]&&K(),t[a(549)]()})[e(383)]($=>{let x=e;FGSECOMAPP[x(438)]=$.sections}),document.querySelector(e(553))?.[e(577)](e(607))===e(790)&&location[e(721)]()}catch(a){console[e(709)](a)}},s=0,l=()=>{let $=_0x39a1e3,t=document[$(678)]($(679));if(t)t[$(662)]=$(745)+(FGSECOMAPP[$(626)].gift_popup_title??"Select your free gift!")+$(682)+x()+$(685);else{let a=localStorage.getItem($(361))-0,i=FGSECOMAPP[$(503)]?.[$(458)]?.disable_slider_checkbox??{},r=(i?.[$(388)]??0)*6e4,c=!isNaN(a)&&a+r>Date[$(780)]();if(c||(localStorage[$(401)]($(361)),!(t=document[$(678)]($(654)))))return;t[$(662)]=$(753)+(FGSECOMAPP[$(626)][$(367)]??$(320))+$(664)+e()+$(692)+x()+$(514),t[$(556)][$(538)]($(414)),s++}},d=($,x)=>{let e=_0x39a1e3;return $.map($=>e(670)+($[e(562)]??x)+e(344)+$.variant_shopify_id+e(703)+$[e(608)]+e(520)+f($)+e(774)+u($[e(787)],$[e(608)],$[e(792)]??0)+e(425)+$.variant_title+"\n ")[e(442)](" \n")},f=$=>{let x=_0x39a1e3;return FGSECOMAPP[x(540)][x(557)](v($?.[x(783)]))},u=($,x,e)=>{let t=_0x39a1e3;e=v(e);let a=b(Shopify?.[t(350)][$])?null:Shopify?.[t(350)][$],i=a?.variants,r=i&&Array[t(687)](i)&&i.length>0?i[0][t(783)]??a?.price??100*e:100*e;return x&&(r=a?.variants?.[t(530)]($=>x===$.id)?.[t(783)]??r),FGSECOMAPP[t(540)][t(557)](r/100)},p=($,x)=>{let e=_0x39a1e3;return b(Shopify?.[e(350)][$])?x??"#":Shopify?.[e(350)][$][e(423)]},g=($,x)=>{let e=_0x39a1e3;if(FGSECOMAPP.fgAppearanceGiftSlider[e(446)])return b(Shopify?.[e(350)][$])?x.replace("\xbb","").replace(/\(\d*% off\)/,"")??"":Shopify?.[e(350)][$][e(594)]},b=$=>{let x=_0x39a1e3;if(0===$)return!0;if("number"==typeof $||"boolean"==typeof $)return!1;if(null==$)return!0;if(typeof $[x(726)]!=x(576))return 0===$[x(726)];let e=0;for(let t in $)$[x(444)](t)&&e++;return 0===e},h=$=>{let x=_0x39a1e3;try{let e={...FGSECOMAPP[x(529)]},t=e[$];if(t=t?t[x(552)]():null,!b(t)&&t[x(726)]>0)try{return document.querySelector(t),", "+t}catch(a){}return""}catch(i){return""}},m=()=>{let $=_0x39a1e3;try{FGSECOMAPP[$(540)]=new Intl[$(386)](Shopify?.[$(378)]??Shopify?.[$(541)],{style:"currency",currency:Shopify?.currency?.[$(513)]??$(613)})}catch(x){FGSECOMAPP[$(540)]=new Intl[$(386)]($(616),{style:"currency",currency:Shopify?.currency?.[$(513)]??"USD"})}},v=$=>{let x=_0x39a1e3;$=$??0;let e=Shopify?.[x(633)]?.[x(689)]??1;return 1===parseFloat(e)?$:($*e)[x(698)](Shopify?.[x(412)]??2)},y=$=>{let x=_0x39a1e3;return $[x(794)]($=>void 0===$[x(786)]||!0===$[x(786)]).reduce(($,e)=>$+e[x(484)]*(e[x(779)]??e[x(783)]),0)/100},w=$=>{let x=_0x39a1e3;return $[x(794)]($=>void 0===$[x(786)]||$[x(786)])[x(478)](($,x)=>$+x.quantity,0)},k=($,x)=>{let e=x.product_narrow;return b(e)?$:$.filter($=>{let x=_0x6dd4;return!e.map(x=>{let e=_0x6dd4;switch(x.type){case"variants_ids":return Object[e(499)](x[e(668)]).map($=>$[e(394)])[e(764)]()[e(509)]($=>$.id)[e(399)]($[e(488)]);case"product_types":return Object.keys(x.value).includes($.product_type);case e(731):return Object[e(647)](x[e(668)])[e(399)]($.vendor);case e(415):let t=Object[e(647)](x[e(668)]),a=$[e(516)]?.map($=>$.id+"")?.[e(794)]($=>t.includes($));return!b(a);default:return!1}})[x(399)](!1)})},S=($,x)=>{let e=_0x39a1e3;return $?.[e(509)]($=>{let t=e;if(typeof $[t(786)]!==t(576)){let a=FGSECOMAPP[t(351)]?.[t(794)](x=>x[t(788)]===$[t(488)]),i=a?.[t(478)](($,x)=>$+x[t(484)],0);if(i===$[t(484)]){let r=FGSECOMAPP[t(351)]?.filter($=>{let e=t;if($[e(353)]?.[e(657)]()===x.toString())return!1;let a=FGSECOMAPP[e(750)]?.[e(530)](x=>x.id?.[e(657)]()===$[e(353)]?.toString()),i=a.gift_settings??{};return i[e(786)]&&100!==parseInt(i.discount_percentage)})?.[t(478)](($,x)=>$+x.quantity,0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},A=($,x,e)=>{let t=_0x39a1e3,a=0,i=k(x,$);i=S(i,$[t(652)]);let r;return $[t(757)]===t(752)?r=y(i):$[t(757)]===t(400)&&(r=w(i)),r>=$.min_amount&&(null===$[t(584)]||r<=$[t(584)])&&(a=e[t(324)],$[t(443)]&&(a=Math[t(335)](r/$[t(339)])*a)),a},C=($,x,e)=>{let t=_0x39a1e3,a={},i=[],r=0;return x[t(509)](x=>{let t=A(x,$,e);0!==t&&(r=t),i.push(t>0)}),a.max_gifts_can_get=r,a[t(569)]=i,a},q=($,x)=>{let e=_0x39a1e3,t=!1;return 1===$[e(726)]?t=$[0]:2===$[e(726)]&&(x===e(701)&&(t=$[0]&&$[1]),"or"===x&&(t=$[0]||$[1])),t},T=($,x)=>{let e=_0x39a1e3,t=$?.[e(509)]($=>$[e(488)]);FGSECOMAPP[e(351)]=FGSECOMAPP.arrOfferAdded[e(794)]($=>t?.[e(399)]($[e(788)]));let a=x[e(649)][e(509)]($=>$[e(382)]),i=FGSECOMAPP[e(351)].filter($=>$[e(353)]?.toString()===x.id?.[e(657)]())?.[e(509)]($=>{let x=e;return $[x(788)]}),r=$[e(794)]($=>{let x=e;return n($)&&($[x(786)]=!1),a[x(399)]($.variant_id)&&i.includes($[x(488)])}),c=r.map($=>{let t=e,a=x[t(456)];$[t(786)]=a[t(786)],$.belongs_to_offer=x.id?.toString();let i=FGSECOMAPP.arrOfferAdded?.[t(794)](e=>e[t(353)]?.[t(657)]()!==x.id?.toString()&&$[t(488)]===e[t(788)])?.[t(478)](($,x)=>$+x[t(484)],0);return{...$,quantity:$[t(484)]-i}});return c[e(794)]($=>{let t=e;return $[t(353)]?.toString()===x.id?.[t(657)]()})},P=$=>{let x=_0x39a1e3,e=$.giftsAdded[x(794)](e=>e.belongs_to_offer?.[x(657)]()!==$.id?.[x(657)]())[x(509)]($=>$[x(445)]);return Object[x(499)]($.gift_products).filter($=>!e[x(399)]($[x(493)]))},E=($,x)=>{let e=_0x39a1e3,t=T($,x),a=C($,x[e(659)],x[e(456)]),i=q(a[e(569)],x.condition_relationship);if(i){let r=t[e(794)]($=>$[e(353)]?.toString()===x.id?.toString()).reduce(($,x)=>$+x.quantity,0);a[e(398)]=a[e(398)]-r,x[e(588)]=t,x.giftsAvailable=a[e(398)]}else x[e(588)]=t,x[e(723)]=0;return typeof FGSECOMAPP[e(602)]===e(691)&&x[e(524)]>FGSECOMAPP[e(602)]&&(i=!1),i||!x[e(345)]||FGSECOMAPP[e(602)]!==x.priority||b(t)||(FGSECOMAPP[e(602)]=null),x[e(418)]=i,x[e(345)]&&i&&(null==FGSECOMAPP.maxOfferPriority||x.priority<=FGSECOMAPP.maxOfferPriority)&&FGSECOMAPP.maxOfferPriority!==x[e(524)]&&(FGSECOMAPP[e(602)]=x[e(524)]),x},I=$=>{let x=_0x39a1e3,e=$+"=",t=decodeURIComponent(document.cookie)[x(781)](";");for(let a=0;a{let e=_0x39a1e3,t=!0,a=!0,i=!0;if(!b($[e(363)]?.specific_link_address)){let r=I(e(329));t=r&&JSON.parse(r)[e(399)]($.sub_conditions[e(500)])}if(!b($[e(363)]?.[e(490)])){let{customer_tags:c}=$.sub_conditions,o=c?.[e(743)]?.some($=>x.customer[e(355)]?.[e(399)]($));a=c?.[e(650)]==="include"?o:!o}if(!b($[e(363)]?.[e(336)])){let n=!0,_=$[e(363)][e(336)],s=x[e(676)][e(462)]??[];if(_[e(590)]){let l=Date[e(677)](_.order_created_from)/1e3;s=s.filter($=>$[e(325)]>=l)}if(!b(_?.[e(397)])&&(0!==_[e(637)].min_amount||0!==_.total_spend_on_order_history[e(584)])){let d=_[e(637)][e(339)],f=_[e(637)][e(584)],u=s[e(478)](($,x)=>$+x[e(656)],0)/100;n&=(u>=d||!d)&&(u<=f||!f)}if(!b(_?.total_spent_on_last_order)&&(0!==_.total_spent_on_last_order.min_amount||0!==_[e(327)][e(584)])){let p=x.customer[e(333)]/100,g=_[e(327)].min_amount,h=_.total_spent_on_last_order[e(584)];n&=(p>=g||!g)&&(p<=h||!h)}if(!b(_?.[e(504)])){let m=!(0!==_[e(504)].min_amount||0!==_[e(504)][e(584)]),v=s[e(726)],y=_.number_of_order[e(339)],w=_[e(504)][e(584)];n&=m?b(s):(v>=y||!y)&&(v<=w||!w)}if(_?.[e(352)]){let k=x[e(676)][e(708)]??[],S=$.gift_items?.[e(450)]($=>k[e(399)]($[e(382)]))||$[e(649)]?.[e(450)]($=>k[e(399)]($[e(608)]+"_"+($[e(792)]-$[e(783)])*100));n&=!S}i=n}return t&&a&&i},O=($,x,e)=>{let t=_0x39a1e3,a=[],i=[],r=[],c=[];for(let o of x){let _=E($,o);if(!_[t(418)]){_.giftsAdded.length>0&&_[t(588)][t(772)]($=>{let x=t;i[x(641)]({variant_id:$[x(488)],quantity:$[x(484)],offer_id:o.id})});continue}if(_[t(723)]<0){_.giftsAdded[t(772)]($=>{let x=t;i.push({variant_id:$[x(488)],quantity:$[x(484)],offer_id:o.id})});continue}0!==_[t(723)]&&(o[t(363)]?L(o,SECOMAPP)&&a.push(o):a[t(641)](o))}if($?.[t(772)]($=>{let x=t;b($[x(353)])&&n($)&&i[x(641)]({variant_id:$[x(488)],quantity:$[x(484)],offer_id:$.belongs_to_offer?.toString()})}),e||b(i)){let s=a[t(509)]($=>{let x=t;return{id:$.id,offerName:$.offer_name,offerPriority:$[x(524)],stopLowerPriority:$[x(345)],gifts:P($),giftsAvailable:$[x(723)],giftsAdded:$[x(588)],isReachConditions:$[x(418)]}});if(!b(s)){let l={};for(let d of s){let f=M(FGSECOMAPP[t(776)],d);f?.[t(726)]>0?r=r.concat([...f]):d.gifts[t(509)]($=>{let x=t;l[$.product_shopify_id]={...$,belongs_to_offer:d.id?.[x(657)]()}})}c=Object[t(499)](l)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:c}},F=($,x)=>{let e=_0x39a1e3,t=new Set;return $?.forEach($=>t.add($[e(652)])),t[e(772)]($=>{let x=e,t=FGSECOMAPP.offers?.[x(530)](e=>e.id?.[x(657)]()===$?.[x(657)]());if(b(t)||!t[x(418)]){FGSECOMAPP[x(351)]=FGSECOMAPP[x(351)]?.[x(794)](e=>e[x(353)]?.[x(657)]()!==$?.toString());return}if(t[x(723)]>=0)return;let a=[],i=FGSECOMAPP.arrOfferAdded?.filter(e=>e[x(353)]?.[x(657)]()===$?.[x(657)]())??[];if(t?.[x(456)]?.[x(575)])a=a[x(785)]([...i]),t[x(723)]=0;else for(let r of i){if(t[x(723)]>=0)break;t[x(723)]+=r[x(484)],t.giftsAvailable<=0?a[x(641)]({...r}):(r[x(484)]=t[x(723)],t.giftsAvailable=0)}a?.forEach($=>{let e=x;FGSECOMAPP[e(351)]=FGSECOMAPP[e(351)]?.[e(794)](x=>$[e(788)]!==x[e(788)]||$[e(353)]?.[e(657)]()!==x[e(353)]?.toString())})}),x?.[e(794)]($=>{let x=e;return n($)&&($.quantity=FGSECOMAPP[x(351)]?.[x(794)](e=>$[x(488)]===e[x(788)])?.[x(478)](($,x)=>$+x.quantity,0)??0),$[x(484)]>0})??[]},G=async($,x)=>{let e=_0x39a1e3,{arrGiftsAdd:t,arrGiftsRemove:a,arrGiftsData:i}=O($,x,!1),c=F(a,$);if(!b(a)){let o=O(c,x,!0);F(o?.arrGiftsRemove,$),t=o?.[e(693)],a=a?.concat(o?.arrGiftsRemove)??[],i=o?.[e(346)]}return await _(t,a),await r(),i},M=($,x)=>{let e=_0x39a1e3,t=[];if($[e(795)]){let a=x[e(357)],i=a[e(478)](($,x)=>$+x[e(452)][e(726)],0),r=FGSECOMAPP[e(750)].filter($=>$.id===x.id),c=r[0][e(456)].auto_add_all_gifts,o=r[0][e(508)];if(1===i||c||o[e(760)]){if($[e(396)]&&!R(a)||$?.[e(489)]&&!N(a))return!1;if(o.status){if(o[e(758)]===e(394)){let n=FGSECOMAPP[e(542)];n=n[e(794)]($=>{let x=e;return $[x(445)]===a[0].original_product_shopify_id});let _=a[0][e(452)][e(794)]($=>{let x=e;return n[0].variant_id===$[x(608)]})[0];if(0===_[e(783)]&&100===parseInt(_[e(373)]))return t.push({variant_id:_[e(382)],quantity:x[e(723)],offer_id:x.id}),t}else if(c){let s=a?.[e(478)](($,x)=>($+x?.[e(452)]?.[e(726)])??0,0);if(!s)return!1;let l=(x?.giftsAvailable??0)/s;for(let d of a)for(let f of d.variants)t[e(641)]({variant_id:f.variant_shopify_id,quantity:l,offer_id:x.id});return t}}else{if(c){let u=a?.[e(478)](($,x)=>($+x?.[e(452)]?.length)??0,0);if(!u)return!1;let p=(x?.[e(723)]??0)/u;for(let g of a)for(let b of g[e(452)])t[e(641)]({variant_id:b[e(382)],quantity:p,offer_id:x.id});return t}{let h=a[0].variants[0];if(0===h.price&&100===parseInt(h.discount_percentage))return console.log(e(322)+a[0].variants[0][e(382)]+" "+a[0].variants[0][e(483)]),t[e(641)]({variant_id:h[e(382)],quantity:x[e(723)],offer_id:x.id}),t}}}}return!1},H=$=>{let x=_0x39a1e3;return $===x(773)},D=$=>{let x=_0x39a1e3,e=$;if(FGSECOMAPP[x(626)][x(546)]===x(451))for(let t of(e=[],$)){let a=t[x(452)];a&&a.length&&a.forEach($=>e.push({...t,thumbnail:$[x(562)],variants:[$]}))}let i=document[x(678)]("fg-gift-items");i&&(i[x(662)]=e[x(509)]($=>{let e=x,t=$?.[e(452)][0]??{};return e(421)+p($[e(787)],$.original_product_handle)+'" target="_blank">\n \n

'+g($[e(787)],$[e(594)])+e(591)+("by_variants"===FGSECOMAPP.fgAppearanceGiftSlider[e(546)]&&FGSECOMAPP[e(626)][e(673)]?e(544)+(1===$.variants.length?e(645)+(H(t.variant_title)?e(474):"")+e(341)+t[e(483)]+e(328):e(358)+(FGSECOMAPP[e(626)][e(660)]??e(720))+"")+e(384):"")+e(768)+u($[e(787)],t?.[e(608)],t?.[e(792)])+e(429)+f(t)+e(376)+(FGSECOMAPP[e(626)][e(546)]!==e(451)?e(502)+(1===$[e(452)][e(726)]?''+t[e(483)]+e(491):''+(FGSECOMAPP[e(626)].select_gift_btn??"Select variant")+e(491))+e(479)+d($[e(452)],$[e(562)])+e(366):"")+'\n \n \n \n ","USD",'">\n ',"mode_override_checkout","en-US","[data-open]","text/html","max","className","6px 0","catch","productsInPage","querySelectorAll","slice","fgAppearanceGiftSlider","stringify","sync_quantity","/cart/add",".sca-gift-icon-collection-page","application/liquid","/cart/add.js","currency","position","scaCustomLoadingCheckout","color","total_spend_on_order_history","querySelector","number_product_slider",'.btn-add-to-cart[data-variant="',"push",".btn-add-to-cart.sca-fg-out-stock",'" target="_blank">\n \n

\n
\n\n
\n
\n \n
\n
\n \n
\n
\n
\n ',"div","Update cart.attributes ","data-variant","value","using_draft_order",'\n
  • \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ','a[href*="/products/"]',"replace","\n ","&sca_products_handle=","isArray","product_page","rate",".dots-thumbnail","number","\n ","arrGiftsAdd","sca_offers_added","contains","#7367f0","fgCallback","toFixed","#82868b","current_variant","and","remove",'" data-original-id="',"compare_at_price","vendor","compressToEncodedURIComponent","secomappGetCartRunning","freegifts","error","scaCountRenderEventCheckout","start_time","\n \n ","

    ",".original-price del","shopify_cart",".sca-promotion-message-layout","promotion_message",'a[href*="/collections/sca_fg"]',".btn-add-to-cart","Select variant","reload","checkIsBlockCheckout","giftsAvailable","toggle","parentElement","length",'\n \n \n \n \n \n \n ','\n
    \n \n
    \n ',"function","sca_fg_btn_gift_thumbnail_query","fgAppearanceGiftIcon","currentTarget","offers","createElement","money",'
    \n \n
    \n ',"relative","stopPropagation",'\n \n ',"unit","type","#sca-gift-thumbnail","status","product_types","innerText","renderPromotionMessage","flat","boolean","enable",'
    \n\n
    \n
    \n
    \n ','\n \n
    \n
    \n
    \n \n ',"fetch","SHOPIFY_CART","[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","forEach","Default Title",'"\n data-original-price="',"#fg-gift-thumbnail-title .glider-prev","fgSettings","/cart/change","change","final_price","now","split","/?sections=","price","checkout","concat","cal_gift_for_other_rules","original_product_shopify_id","variantId",".fg-secomapp-product-title ","fg-checkout","textContent","original_price","height","filter","auto_add_gift","Select your free gift!","removeEventListener","auto add gift: ","/cart/update","number_of_gift_can_receive","created_at","data-img","total_spent_on_last_order"," \n ","sca_fg_codes","substring","sca-gift-icon-collection-page","unshift","last_total","general","floor","customer_order_history","22044170SzQpwp","sections_url","min_amount","current_product",'">\n ',"freegiftProxy","manual_input_inventory",'" id="',"stop_lower_priority","arrGiftsData","fetch_new_cart","hidden","80%","products","arrOfferAdded","have_not_got_gift_from_this_offer","belongs_to_offer","stop_offer","tags","current_collection","gifts",'',"key","Can not fetch all body","FGSECOMAPP_HIDDEN_GIFT_POPUP",".sca-list-gift-thumbnail","sub_conditions","childElementCount","show_pagination","\n \n
    ","gift_popup_title","body","4234680UWatyO","28JFgEJk","display","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","discount_percentage","sca_fg_cart_icon_query",'\n \xab\n \xbb\n ',"\n
    \n ","#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble","sca_locale","product"];return(_0x1ea1=function(){return $})()}