window.fgData={"offers":[{"id":4015,"shop_id":2049,"offer_name":"Dildo Handle Giveaway","offer_description":null,"promotion_message":null,"start_time":"2023-05-01T17:00:00.000000Z","end_time":"2024-05-01T17:00:00.000000Z","condition_relationship":null,"gift_settings":{"auto_add_all_gifts":false,"discount_percentage":100,"customer_will_receive":"number_of_gift_can_receive","cal_gift_for_other_rules":false,"number_of_gift_can_receive":1},"gift_should_the_same":{"type":"variant","status":false},"sub_conditions":null,"priority":1,"stop_lower_priority":false,"status":true,"gift_products":[{"title":"\u00bb Controller (100% off)","original_product_handle":"controller","clone_product_handle":"controller-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","product_shopify_id":7096164417629,"original_product_shopify_id":4832422199389,"variants":[{"id":25094,"gift_product_id":10847,"discount_percentage":100,"original_price":10.95,"original_compare_at_price":null,"original_product_shopify_id":4832422199389,"original_variant_shopify_id":32972026151005,"price":0,"product_shopify_id":7096164417629,"variant_shopify_id":41023686574173,"variant_title":"Default Title","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","pivot":{"offer_id":4015,"gift_item_id":25094},"gift_product":{"id":10847,"shop_id":2049,"title":"\u00bb Controller (100% off)","original_product_handle":"controller","clone_product_handle":"controller-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","product_shopify_id":7096164417629,"original_product_shopify_id":4832422199389,"created_at":"2023-05-01T15:21:51.000000Z","updated_at":"2023-05-01T15:21:51.000000Z"}},{"id":25095,"gift_product_id":10847,"discount_percentage":100,"original_price":0,"original_compare_at_price":10.95,"original_product_shopify_id":4832422199389,"original_variant_shopify_id":41023624675421,"price":0,"product_shopify_id":7096164417629,"variant_shopify_id":41023686606941,"variant_title":"(100% off)","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","pivot":{"offer_id":4015,"gift_item_id":25095},"gift_product":{"id":10847,"shop_id":2049,"title":"\u00bb Controller (100% off)","original_product_handle":"controller","clone_product_handle":"controller-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","product_shopify_id":7096164417629,"original_product_shopify_id":4832422199389,"created_at":"2023-05-01T15:21:51.000000Z","updated_at":"2023-05-01T15:21:51.000000Z"}}]}],"offer_conditions":[{"id":4188,"offer_id":4015,"is_multiply":true,"min_amount":1,"max_amount":null,"product_narrow":"[{\"type\": \"product_collections\", \"value\": {\"174162444381\": \"All Dildos\"}}]","unit":"number_of_products"}],"gift_items":[{"id":25094,"gift_product_id":10847,"discount_percentage":100,"original_price":10.95,"original_compare_at_price":null,"original_product_shopify_id":4832422199389,"original_variant_shopify_id":32972026151005,"price":0,"product_shopify_id":7096164417629,"variant_shopify_id":41023686574173,"variant_title":"Default Title","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","pivot":{"offer_id":4015,"gift_item_id":25094},"gift_product":{"id":10847,"shop_id":2049,"title":"\u00bb Controller (100% off)","original_product_handle":"controller","clone_product_handle":"controller-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","product_shopify_id":7096164417629,"original_product_shopify_id":4832422199389,"created_at":"2023-05-01T15:21:51.000000Z","updated_at":"2023-05-01T15:21:51.000000Z"}},{"id":25095,"gift_product_id":10847,"discount_percentage":100,"original_price":0,"original_compare_at_price":10.95,"original_product_shopify_id":4832422199389,"original_variant_shopify_id":41023624675421,"price":0,"product_shopify_id":7096164417629,"variant_shopify_id":41023686606941,"variant_title":"(100% off)","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","pivot":{"offer_id":4015,"gift_item_id":25095},"gift_product":{"id":10847,"shop_id":2049,"title":"\u00bb Controller (100% off)","original_product_handle":"controller","clone_product_handle":"controller-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0992\/7780\/products\/Featured-Slider_19c807a9-42d3-4e14-b650-063e1e5606db.jpg?v=1609877736","product_shopify_id":7096164417629,"original_product_shopify_id":4832422199389,"created_at":"2023-05-01T15:21:51.000000Z","updated_at":"2023-05-01T15:21:51.000000Z"}}]}],"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_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 _0x29a6f4=_0x4835;function _0x4835($,x){let t=_0x3516();return(_0x4835=function($,x){return t[$-=233]})($,x)}!function($,x){let t=_0x4835,e=$();for(;;)try{let a=-parseInt(t(350))/1+-parseInt(t(249))/2+-parseInt(t(366))/3*(parseInt(t(384))/4)+-parseInt(t(561))/5+parseInt(t(600))/6*(parseInt(t(628))/7)+parseInt(t(361))/8*(parseInt(t(635))/9)+-parseInt(t(517))/10*(-parseInt(t(347))/11);if(499012===a)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(_0x3516,499012);try{let $=document[_0x29a6f4(476)]("secomapp_freegifts_version")?.[_0x29a6f4(540)]("data-version");if($===_0x29a6f4(518)){window[_0x29a6f4(594)]?.[_0x29a6f4(615)]?.[_0x29a6f4(422)]?.[_0x29a6f4(593)]&&fgGiftIcon&&(window[_0x29a6f4(594)][_0x29a6f4(615)][_0x29a6f4(422)][_0x29a6f4(593)]=fgGiftIcon),window[_0x29a6f4(538)]={},FGSECOMAPP.maxOfferPriority=null,FGSECOMAPP[_0x29a6f4(240)]=Object.values(Shopify?.[_0x29a6f4(240)]??{}),FGSECOMAPP[_0x29a6f4(547)]=[],FGSECOMAPP[_0x29a6f4(533)]=window[_0x29a6f4(594)]?.[_0x29a6f4(247)]??{},FGSECOMAPP[_0x29a6f4(402)]=window[_0x29a6f4(594)]?.appearance??{},FGSECOMAPP.fgAppearanceGiftSlider=FGSECOMAPP[_0x29a6f4(402)]?.[_0x29a6f4(313)]?.[_0x29a6f4(557)],FGSECOMAPP[_0x29a6f4(648)]=FGSECOMAPP[_0x29a6f4(402)]?.[_0x29a6f4(422)],FGSECOMAPP.fgAppearancePromotionMessage=FGSECOMAPP[_0x29a6f4(402)]?.[_0x29a6f4(411)],FGSECOMAPP[_0x29a6f4(485)]=[],FGSECOMAPP[_0x29a6f4(300)]=!1,FGSECOMAPP.arrOfferAdded=[],FGSECOMAPP[_0x29a6f4(650)]=0,FGSECOMAPP[_0x29a6f4(471)]=!1,FGSECOMAPP[_0x29a6f4(351)]={...Shopify?.[_0x29a6f4(351)]},FGSECOMAPP[_0x29a6f4(390)]=Shopify?.[_0x29a6f4(390)]??void 0,FGSECOMAPP[_0x29a6f4(302)]=Shopify?.[_0x29a6f4(302)]??void 0,FGSECOMAPP.productsInPage={},FGSECOMAPP[_0x29a6f4(284)]=!1;let x=()=>{let $=_0x29a6f4,x=FGSECOMAPP[$(402)]?.gift_slider,t=x?.[$(526)]?.[$(574)],e=!d(x)&&void 0!==t&&!t;return e?$(306):""},{fetch:t}=window;document[_0x29a6f4(368)](_0x29a6f4(418))?.[_0x29a6f4(540)](_0x29a6f4(288))!==_0x29a6f4(564)&&(window.fetch=async(...$)=>{let x=_0x29a6f4;try{if($[0][x(584)]("/cart/add")){let a=200,i=await t(...$)[x(606)]($=>{let t=x;return a=$[t(379)],$.json()});if($[1][x(420)]?.[x(601)]&&200!==a){let r=JSON[x(597)]($[1].body)?.id,_=document.querySelector('.btn-add-to-cart[data-variant="'+r+'"]');return _[x(303)]=x(652),_[x(504)][x(539)](x(659))||_[x(504)][x(383)]("sca-fg-out-stock"),_[x(243)]=!0,_[x(577)][x(592)]="#82868b",document[x(262)](x(437))[x(453)]($=>{let t=x;parseInt($.getAttribute(t(613)))===r||$[t(504)][t(539)](t(659))||($[t(243)]=!1,$[t(577)][t(592)]=FGSECOMAPP[t(402)]?.[t(313)]?.[t(590)]?.[t(375)]??"#7367f0")}),!1}return await X(["/cart/add",...$[x(399)](1)]),await e(i),new Response(JSON[x(457)](i))}if(!($[0].includes("/cart/change")||$[0][x(584)](x(629))))return setTimeout(function(){$e()},1e3),await t(...$);{let n=200,c=await t(...$)[x(606)]($=>{let t=x;return n=$[t(379)],$.json()});if($[1][x(420)]?.sca_process_gifts&&200!==n)return!1;await X([$[0][x(584)](x(277))?x(277):x(629),...$.slice(1)]);let o=await t(x(364))[x(606)]($=>{let t=x;return $[t(371)]()});return await e(c,o),new Response(JSON.stringify(o))}}catch(f){return await t(...$)}}),FGSECOMAPP[_0x29a6f4(640)]=()=>{let $=_0x29a6f4;try{if(Shopify?.disableShopify_getCart||"function"!=typeof Shopify?.[$(317)])return;Shopify.getCart=async function(x){let t=$;if(!FGSECOMAPP[t(300)]){FGSECOMAPP[t(300)]=!0,await X(t(364));let e=await fetch(t(364),{method:t(620),headers:{Accept:t(257),sca_fetch:"fetch_new_cart","Content-Type":"application/json"}});typeof x===t(610)&&(0>FGSECOMAPP[t(485)][t(505)](x)&&FGSECOMAPP.fgCallback[t(525)](x),x(await e.json())),FGSECOMAPP[t(300)]=!1}let a=setInterval(()=>{let $=t;Y(),FGSECOMAPP[$(650)]++,(FGSECOMAPP[$(650)]>10||FGSECOMAPP.hasDoneProcessCheckout)&&clearInterval(a)},400);FGSECOMAPP.scaCountRenderEventCheckout=0},typeof ShopifyAPI!==$(397)&&typeof ShopifyAPI[$(317)]!==$(397)&&(ShopifyAPI[$(317)]=Shopify?.[$(317)]),typeof Shopify?.[$(353)]!==$(397)&&void 0!==Shopify?.api[$(317)]&&(Shopify.api.getCart=Shopify?.[$(317)])}catch(x){console[$(320)](x)}};let e=async($,x)=>{let e=_0x29a6f4;try{let a=Object[e(271)]($[e(412)]??{});a&&a.length&&await t(e(524)+a[e(563)](",")).then(async t=>{let a=e,i=await t[a(371)]();$[a(412)]=i,d(x)||(x[a(412)]=i)})}catch(i){}},a=async($,x,t)=>{let e=_0x29a6f4;document[e(262)]("#fg-gift-items .btn-add-to-cart").forEach(x=>{let t=e;x[t(243)]=!0;let a=x.getAttribute(t(613))-0;a===$&&(x.innerHTML=t(304)),x[t(577)][t(592)]=t(236)});let a=FGSECOMAPP[e(617)].find(x=>t===x[e(537)]&&$===x.variantId);a?a[e(458)]+=x:FGSECOMAPP.arrOfferAdded[e(248)]({variantId:$,belongs_to_offer:t,quantity:x}),localStorage[e(559)](e(250),LZString[e(340)](JSON[e(457)](FGSECOMAPP[e(617)])));let i=await fetch("/cart/add.js",{method:e(305),headers:{Accept:e(257),"Content-Type":e(257),sca_add_gift:e(601)},body:JSON.stringify({quantity:x,id:$})}),r=await i[e(371)]();if(i.ok)return setTimeout(function(){Q()},1e3),r},i=$=>{let x=_0x29a6f4,t=x(266);return!d($)&&(typeof $===x(295)&&($[x(512)]?.[x(584)](t)||$.tags?.[x(584)](x(237)))||typeof $===x(483)&&$.includes(t))},r=async($,x)=>{let t=_0x29a6f4;try{if(d($)&&d(x))return;let e={};if(FGSECOMAPP[t(240)]?.[t(532)]($=>i($))?.[t(453)]($=>{let x=t;e[$[x(417)]]=$[x(458)]}),($=$?.[t(532)]($=>!d($.variant_id)))?.[t(453)]($=>{let x=t;e[$[x(417)]]=(e[$[x(417)]]??0)+($[x(458)]??1)}),Object[t(271)](e)?.[t(453)]($=>{e[$]=e[$]>=0?e[$]:0}),d(Object[t(271)](e)))return;$?.[t(453)]($=>{let x=t,e=FGSECOMAPP[x(617)][x(376)](t=>$.offer_id===t[x(537)]&&$[x(417)]===t[x(536)]);e?e[x(458)]+=$[x(458)]:FGSECOMAPP.arrOfferAdded[x(248)]({variantId:$[x(417)],belongs_to_offer:$.offer_id,quantity:$[x(458)]})}),localStorage[t(559)](t(250),LZString[t(340)](JSON[t(457)](FGSECOMAPP[t(617)])));let a=await fetch("/cart/update",{method:"POST",headers:{Accept:t(257),"Content-Type":t(257),sca_process_gifts:t(315)},body:JSON[t(457)]({updates:e})});if(document[t(368)](t(418))?.[t(540)](t(288))===t(564)&&location.reload(),a.ok)return a}catch(r){console[t(320)](r)}},_=0,n=()=>{let $=_0x29a6f4,t=document[$(476)]("freegifts-main-page-container");if(t)t[$(409)]=$(456)+(FGSECOMAPP.fgAppearanceGiftSlider[$(436)]??$(424))+$(328)+x()+$(389);else{if(!(t=document[$(476)]($(432))))return;t[$(409)]=$(332)+(FGSECOMAPP.fgAppearanceGiftSlider[$(436)]??$(424))+$(531)+x()+$(445),t.classList[$(383)]($(459)),_++}},c=($,x)=>{let t=_0x29a6f4;return $[t(287)]($=>'\n
  • \n '+$[t(522)]+t(439)).join(" \n")},o=$=>{let x=_0x29a6f4;return FGSECOMAPP[x(583)][x(307)](g($?.[x(443)]))},f=($,x,t)=>{let e=_0x29a6f4;t=g(t);let a=d(Shopify?.products[$])?null:Shopify?.products[$],i=a?.[e(415)],r=i&&Array[e(550)](i)&&i[e(573)]>0?i[0][e(443)]??a?.[e(443)]??100*t:100*t;return x&&(r=a?.variants?.[e(376)]($=>x===$.id)?.price??r),FGSECOMAPP[e(583)][e(307)](r/100)},l=($,x)=>{let t=_0x29a6f4;return d(Shopify?.products[$])?x??"#":Shopify?.[t(425)][$].handle},s=($,x)=>{let t=_0x29a6f4;return!d(Shopify?.[t(425)][$])&&FGSECOMAPP.fgAppearanceGiftSlider[t(278)]?Shopify?.[t(425)][$][t(466)]:x.replace("\xbb","")[t(427)](/\(\d*% off\)/,"")??""},d=$=>{let x=_0x29a6f4;if(0===$)return!0;if(typeof $==x(651)||typeof $==x(639))return!1;if(null==$)return!0;if(typeof $[x(573)]!=x(397))return 0===$[x(573)];let t=0;for(let e in $)$[x(470)](e)&&t++;return 0===t},u=$=>{let x=_0x29a6f4;try{let t={...FGSECOMAPP.scaHandleConfigValue},e=t[$];if(e=e?e[x(496)]():null,!d(e)&&e[x(573)]>0)try{return document[x(368)](e),", "+e}catch(a){}return""}catch(i){return""}},p=()=>{let $=_0x29a6f4;try{FGSECOMAPP.formatter=new Intl[$(242)](Shopify?.[$(588)]??Shopify?.[$(622)],{style:"currency",currency:Shopify?.[$(602)]?.[$(468)]??$(413)})}catch(x){FGSECOMAPP[$(583)]=new Intl.NumberFormat($(568),{style:$(602),currency:Shopify?.currency?.[$(468)]??$(413)})}},g=$=>{let x=_0x29a6f4;$=$??0;let t=Shopify?.[x(602)]?.[x(274)]??1;return 1===parseFloat(t)?$:($*t)[x(404)](Shopify?.fg_decimal??2)},b=$=>{let x=_0x29a6f4;return $[x(532)]($=>void 0===$[x(494)]||!0===$.cal_gift_for_other_rules)[x(311)](($,t)=>$+t[x(458)]*t.price,0)/100},h=$=>{let x=_0x29a6f4;return $[x(532)]($=>void 0===$.cal_gift_for_other_rules||$.cal_gift_for_other_rules).reduce(($,x)=>$+x.quantity,0)},m=($,x)=>{let t=_0x29a6f4,e=JSON[t(597)](x[t(346)]);return d(e)?$:$[t(532)]($=>!e.map(x=>{let t=_0x4835;switch(x[t(393)]){case t(279):return Object[t(462)](x[t(363)]).map($=>$[t(632)])[t(325)]()[t(287)]($=>$.id).includes($[t(417)]);case t(571):return Object.keys(x[t(363)])[t(584)]($[t(616)]);case"product_vendors":return Object[t(271)](x[t(363)])[t(584)]($[t(475)]);case t(334):let e=Object.keys(x[t(363)]),a=$[t(369)]?.[t(287)]($=>$.id+"")?.[t(532)]($=>e[t(584)]($));return!d(a);default:return!1}}).includes(!1))},v=($,x)=>$?.map($=>{let t=_0x4835;if(typeof $[t(494)]!==t(397)){let e=FGSECOMAPP.arrOfferAdded?.[t(532)](x=>x[t(536)]===$[t(417)]),a=e?.[t(311)](($,x)=>$+x[t(458)],0);if(a===$[t(458)]){let i=FGSECOMAPP.arrOfferAdded?.[t(532)]($=>{let e=t;if($[e(537)]===x[e(497)]())return!1;let a=FGSECOMAPP[e(547)]?.find(x=>x.id===$[e(537)]),i=a[e(338)]??{};return i[e(494)]&&100!==parseInt(i[e(618)])})?.[t(311)](($,x)=>$+x[t(458)],0);return{...$,cal_gift_for_other_rules:i>0,quantity:i??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[],y=($,x,t)=>{let e=_0x29a6f4,a=0,i=m(x,$);i=v(i,$[e(358)]);let r;return $[e(488)]===e(460)?r=b(i):"number_of_products"===$[e(488)]&&(r=h(i)),r>=$[e(299)]&&(null===$[e(467)]||r<=$[e(467)])&&(a=t.number_of_gift_can_receive,$[e(599)]&&(a=Math.floor(r/$[e(299)])*a)),a},w=($,x,t)=>{let e=_0x29a6f4,a={},i=[],r=0;return x[e(287)](x=>{let a=e,_=y(x,$,t);0!==_&&(r=_),i[a(525)](_>0)}),a[e(309)]=r,a[e(465)]=i,a},k=($,x)=>{let t=_0x29a6f4,e=!1;return 1===$[t(573)]?e=$[0]:2===$.length&&(x===t(253)&&(e=$[0]&&$[1]),"or"===x&&(e=$[0]||$[1])),e},C=($,x)=>{let t=_0x29a6f4,e=$?.[t(287)]($=>$[t(417)]);FGSECOMAPP[t(617)]=FGSECOMAPP[t(617)][t(532)]($=>e?.[t(584)]($.variantId));let a=x[t(642)].map($=>$[t(322)]),r=FGSECOMAPP[t(617)].filter($=>$.belongs_to_offer===x.id)?.[t(287)]($=>$.variantId),_=$[t(532)]($=>{let x=t;return i($)&&($[x(494)]=!1),a.includes($[x(417)])&&r.includes($.variant_id)}),n=_[t(287)]($=>{let e=t,a=x[e(338)];$[e(494)]=a[e(494)],$[e(537)]=x.id;let i=FGSECOMAPP[e(617)]?.[e(532)](t=>t[e(537)]!==x.id&&$.variant_id===t[e(536)])?.[e(311)](($,x)=>$+x.quantity,0);return{...$,quantity:$[e(458)]-i}});return n.filter($=>{let e=t;return $[e(537)]===x.id})},A=$=>{let x=_0x29a6f4,t=$.giftsAdded.filter(x=>x.belongs_to_offer!==$.id)[x(287)]($=>$[x(258)]);return Object.values($[x(570)])[x(532)]($=>!t[x(584)]($[x(293)]))},q=($,x)=>{let t=_0x29a6f4,e=C($,x),a=w($,x[t(544)],x[t(338)]),i=k(a.condition_result,x.condition_relationship);if(i){let r=e[t(532)]($=>$.belongs_to_offer===x.id)[t(311)](($,x)=>$+x[t(458)],0);a[t(309)]=a[t(309)]-r,x[t(579)]=e,x[t(448)]=a[t(309)]}else x.giftsAdded=e,x[t(448)]=0;return"number"==typeof FGSECOMAPP[t(256)]&&x[t(264)]>FGSECOMAPP[t(256)]&&(i=!1),!i&&x.stop_lower_priority&&FGSECOMAPP.maxOfferPriority===x[t(264)]&&(FGSECOMAPP[t(256)]=null),x.isReachConditions=i,x[t(330)]&&i&&(null==FGSECOMAPP[t(256)]||x[t(264)]<=FGSECOMAPP.maxOfferPriority)&&FGSECOMAPP[t(256)]!==x[t(264)]&&(FGSECOMAPP.maxOfferPriority=x[t(264)]),x},S=$=>{let x=_0x29a6f4,t=$+"=",e=decodeURIComponent(document[x(523)])[x(374)](";");for(let a=0;a{let t=_0x29a6f4,e=!0,a=!0,i=!0;if(!d($[t(637)]?.[t(463)])){let r=S(t(321));e=r&&JSON[t(597)](r)[t(584)]($[t(637)][t(463)])}if(!d($[t(637)]?.[t(239)])){let{customer_tags:_}=$[t(637)],n=_?.value_customer_tags?.[t(430)]($=>x[t(507)][t(464)]?.[t(584)]($));a=_?.[t(438)]===t(352)?n:!n}if(!d($[t(637)]?.[t(541)])){let c=!0,o=$[t(637)].customer_order_history,f=x[t(507)][t(489)]??[];if(o[t(298)]){let l=Date.parse(o[t(298)])/1e3;f=f[t(532)]($=>$[t(294)]>=l)}if(!d(o?.[t(516)])&&(0!==o.total_spend_on_order_history[t(299)]||0!==o.total_spend_on_order_history.max_amount)){let s=o[t(510)][t(299)],u=o[t(510)][t(467)],p=f[t(311)](($,x)=>$+x[t(251)],0)/100;c&=(p>=s||!s)&&(p<=u||!u)}if(!d(o?.total_spent_on_last_order)&&(0!==o[t(556)][t(299)]||0!==o[t(556)].max_amount)){let g=x[t(507)].last_total/100,b=o[t(556)][t(299)],h=o[t(556)].max_amount;c&=(g>=b||!b)&&(g<=h||!h)}if(!d(o?.number_of_order)){let m=!(0!==o[t(348)][t(299)]||0!==o.number_of_order[t(467)]),v=f[t(573)],y=o[t(348)].min_amount,w=o.number_of_order[t(467)];c&=m?d(f):(v>=y||!y)&&(v<=w||!w)}if(o?.[t(327)]){let k=x[t(507)].freegifts??[],C=$[t(642)]?.[t(430)]($=>k[t(584)]($[t(322)]))||$[t(642)]?.some($=>k[t(584)]($[t(499)]+"_"+($[t(355)]-$.price)*100));c&=!C}i=c}return e&&a&&i},P=($,x,t)=>{let e=_0x29a6f4,a=[],r=[],_=[],n=[];for(let c of x){let o=q($,c);if(!o[e(341)]){o[e(579)][e(573)]>0&&o[e(579)][e(453)]($=>{let x=e;r[x(525)]({variant_id:$[x(417)],quantity:$[x(458)],offer_id:c.id})});continue}if(o[e(448)]<0){o.giftsAdded[e(453)]($=>{let x=e;r[x(525)]({variant_id:$.variant_id,quantity:$[x(458)],offer_id:c.id})});continue}0!==o.giftsAvailable&&(c.sub_conditions?T(c,SECOMAPP)&&a[e(525)](c):a.push(c))}if($?.[e(453)]($=>{let x=e;d($[x(537)])&&i($)&&r.push({variant_id:$.variant_id,quantity:$[x(458)],offer_id:$.belongs_to_offer})}),t||d(r)){let f=a[e(287)]($=>{let x=e;return{id:$.id,offerName:$[x(416)],offerPriority:$[x(264)],stopLowerPriority:$[x(330)],gifts:A($),giftsAvailable:$[x(448)],giftsAdded:$[x(579)],isReachConditions:$[x(341)]}});if(!d(f)){let l={};for(let s of f){let u=I(FGSECOMAPP[e(533)],s);u?.length>0?_=_[e(314)]([...u]):s[e(326)][e(287)]($=>{let x=e;l[$[x(293)]]={...$,belongs_to_offer:s.id}})}n=Object[e(462)](l)??[]}}return{arrGiftsAdd:_,arrGiftsRemove:r,arrGiftsData:n}},L=($,x)=>{let t=_0x29a6f4,e=new Set;return $?.[t(453)]($=>e[t(383)]($[t(358)])),e.forEach($=>{let x=t,e=FGSECOMAPP[x(547)]?.find(x=>x.id===$);if(d(e)||!e.isReachConditions){FGSECOMAPP[x(617)]=FGSECOMAPP[x(617)]?.[x(532)](t=>t[x(537)]!==$);return}if(e.giftsAvailable>=0)return;let a=[],i=FGSECOMAPP[x(617)]?.[x(532)](t=>t[x(537)]===$)??[];if(e?.[x(338)]?.[x(479)])a=a[x(314)]([...i]),e.giftsAvailable=0;else for(let r of i){if(e[x(448)]>=0)break;e[x(448)]+=r[x(458)],e[x(448)]<=0?a.push({...r}):(r[x(458)]=e[x(448)],e[x(448)]=0)}a?.[x(453)]($=>{let t=x;FGSECOMAPP[t(617)]=FGSECOMAPP.arrOfferAdded?.[t(532)](x=>$[t(536)]!==x[t(536)]||$[t(537)]!==x[t(537)])})}),x?.[t(532)]($=>{let x=t;return i($)&&($[x(458)]=FGSECOMAPP[x(617)]?.[x(532)](x=>$.variant_id===x.variantId)?.[x(311)](($,t)=>$+t[x(458)],0)??0),$.quantity>0})??[]},E=async($,x)=>{let t=_0x29a6f4,{arrGiftsAdd:e,arrGiftsRemove:a,arrGiftsData:i}=P($,x,!1),_=L(a,$);if(!d(a)){let n=P(_,x,!0);L(n?.[t(410)],$),e=n?.[t(421)],a=a?.[t(314)](n?.arrGiftsRemove)??[],i=n?.[t(569)]}return await r(e,a),i},I=($,x)=>{let t=_0x29a6f4,e=[];if($[t(472)]){let a=x[t(326)],i=a.reduce(($,x)=>$+x[t(415)].length,0),r=FGSECOMAPP.offers[t(532)]($=>$.id===x.id),_=r[0][t(338)][t(479)],n=r[0].gift_should_the_same;if(1===i||_||n[t(379)]){if($.not_show_gift_if_already_on_cart&&!O(a)||$?.[t(595)]&&!M(a))return!1;if(n[t(379)]){if(n[t(393)]===t(632)){let c=FGSECOMAPP[t(240)];c=c[t(532)]($=>{let x=t;return $[x(258)]===a[0].original_product_shopify_id});let o=a[0].variants[t(532)]($=>{let x=t;return c[0][x(417)]===$[x(499)]})[0];if(0===o[t(443)]&&100===parseInt(o.discount_percentage))return e.push({variant_id:o[t(322)],quantity:x.giftsAvailable,offer_id:x.id}),e}else if(_){let f=a?.[t(311)](($,x)=>($+x?.[t(415)]?.[t(573)])??0,0);if(!f)return!1;let l=(x?.[t(448)]??0)/f;for(let s of a)for(let d of s.variants)e[t(525)]({variant_id:d[t(322)],quantity:l,offer_id:x.id});return e}}else{if(_){let u=a?.[t(311)](($,x)=>($+x?.[t(415)]?.[t(573)])??0,0);if(!u)return!1;let p=(x?.[t(448)]??0)/u;for(let g of a)for(let b of g[t(415)])e[t(525)]({variant_id:b[t(322)],quantity:p,offer_id:x.id});return e}{let h=a[0][t(415)][0];if(0===h[t(443)]&&100===parseInt(h[t(618)]))return console[t(553)](t(235)+a[0][t(415)][0][t(322)]+" "+a[0][t(415)][0][t(522)]),e[t(525)]({variant_id:h[t(322)],quantity:x[t(448)],offer_id:x.id}),e}}}}return!1},j=$=>{let x=_0x29a6f4,t=$;if(FGSECOMAPP[x(612)][x(519)]===x(407))for(let e of(t=[],$)){let a=e[x(415)];a&&a.length&&a[x(453)]($=>t[x(525)]({...e,thumbnail:$[x(263)],variants:[$]}))}let i=document[x(476)](x(291));i&&(i[x(409)]=t[x(287)]($=>{let t=x;return t(621)+l($[t(431)],$[t(605)])+t(587)+$[t(263)]+t(387)+s($.original_product_shopify_id,$.title)+"

    \n "+(FGSECOMAPP[t(612)][t(519)]===t(407)&&FGSECOMAPP[t(612)].show_variant_title?'

    \n '+(1===$.variants[t(573)]?t(607)+$[t(415)][0][t(522)]+t(630):t(234)+(FGSECOMAPP.fgAppearanceGiftSlider[t(543)]??t(319))+t(329))+t(429):"")+t(269)+f($[t(431)],$.variants[0]?.[t(499)],$.variants[0]?.original_price)+'\n \n '+o($.variants[0])+"\n \n "+("by_variants"!==FGSECOMAPP[t(612)].show_gift_for_customer?'

    ',"scaCountRenderEventCheckout","number","Out of stock","product_page","#MainContent, #mainContent, #main, .main-content","100%","sca_handle_checkout","ele","catch","sca-fg-out-stock",".sca-list-gift-thumbnail",'',"auto add gift: ","#82868b","freegifts","&sca_shop_name=","customer_tags","cartItems","searchParams","NumberFormat","disabled","sca_fg_main_promotion_message_query","/cart/change.js","data-original-price","settings","unshift","688190VNBCgq","sca_offers_added","total_price",".btn-add-to-cart.sca-fg-out-stock","and","tabindex","info","maxOfferPriority","application/json","product_id","sca-fg-icon-collection-page","maxWidth",".freegifts-main-container .glider-prev","querySelectorAll","thumbnail","priority","text/html","-sca_clone_freegift","startsWith","sca-gift-icon",'\n \n \n
    \n
    \n \n ',"freegiftProxy","keys","event auto process gifts with cart","click","rate","\n \n
    ","d-block","/cart/change","show_product_title","variants_ids","product_has_icon",".fg-secomapp-collection-img, .product-card, #product-grid .grid__item, .card-list .card-list__column, .cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item ","removeEventListener",".fg-secomapp-cart-drawer ","hasDoneProcessCheckout",".gift-price",".product-item-thumbnail","map","data-template","this is others","clearInterval","fg-gift-items","routes","product_shopify_id","created_at","object","event add gift to cart from popup",".fg-secomapp-cart-item-promotion ","order_created_from","min_amount","secomappGetCartRunning","application/liquid","scaCustomLoadingCheckout","innerText","Loading...","POST",'\n \n ',"format","current_collection","max_gifts_can_get","invoice_url","reduce","50%","gift_slider","concat","true","location","getCart",'">\n ',"Select variant","error","sca_fg_codes","variant_shopify_id","entries","glider-animated","flat","gifts","have_not_got_gift_from_this_offer",'\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ',"
    ","stop_lower_priority","show_pagination",'
    \n \n
    \n ',"removeAttribute","product_collections","sca_process_gifts","failed to parse cart section ",'" target="_blank">\n \n\n
    \n
    \n
    \n ',"901311IDfHYL","scaHandleConfigValue","include","api",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","original_price",'
    \n Loading...\n
    ',"parentElement","offer_id",'a[href*="/collections/sca_fg"]',"childElementCount","11640pKEuCY","sca_fg_form_checkbox_button_query","value","/cart.js","compressToEncodedURIComponent","33TdfXSa","#shopify-section-header #cart-icon-bubble","querySelector","collections","getItem","json","manual_input_inventory","#fg-gift-items .btn-add-to-cart","split","add_to_cart_btn_color","find","80%","hasAttribute","status","shop","gift_thumbnail","setAttribute","add","804Lqtjsn","cart","set",'" alt="">\n

    ',".original-price del","\n

    ","reRenderCartCustom","Can not fetch all body","collection_page","type","#sca-gift-thumbnail","other_products","relative","undefined","decompressFromBase64","slice","display","createElement","fgAppearance","insertBefore","toFixed",'\n
    \n
    \n
    \n ',"#CartDrawer .drawer__inner","by_variants","position","innerHTML","arrGiftsRemove","promotion_message","sections","USD","can not check freegifts version","variants","offer_name","variant_id","#secomapp_freegifts_version","product_vendors","headers","arrGiftsAdd","gift_icon","/cart","Select your free gift!","products","stop_offer","replace","#sca-spinner-checkout","\n

    ","some","original_product_shopify_id","freegifts-main-popup-container","target",".dots-thumbnail","parentNode","gift_popup_title",".btn-add-to-cart","type_customer_tags","\n
  • ","parseFromString","start","getTime","price","productsInPage","\n ","addEventListener","renderPromotionMessage","giftsAvailable","root","&sca_products_handle=","sca-fg-form-icon-product-page","#sca-gift-icon","forEach","not type checkout btn","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg",'\n
    \n
    \n ',"stringify","quantity","sca-is-visible-fg","money","100","values","specific_link_address","tags","condition_result","title","max_amount","active","sca_link_checkout","hasOwnProperty","checkIsBlockCheckout","auto_add_gift","data-price","{{sca_min_quantity}}","vendor","getElementById","Escape","\n \n
    \n
    \n ","auto_add_all_gifts","/products/","form","\n \n\n ","string","toggle","fgCallback","Free Gift","focus","unit","orders",'\n
    \n \n ',"original_variant_shopify_id","compare_at_price","remove",".sca-gift-icon-collection-page","60%","classList","indexOf","240","customer","gift_should_the_same","160","total_spend_on_order_history","sca_catch","handle","not using draft order",".fg-secomapp-handle-add-to-cart ","original_compare_at_price","totarrCustomerOrderal_spend_on_order_history","10EPgXJb","3.0","show_gift_for_customer","div","prepend","variant_title","cookie","/?sections=","push","others",'" alt="free-gift-icon" class="sca-gift-icon-img" />\n ',"#fg-gift-thumbnail-title .glider-prev","pathname","70%",'\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ',"filter","fgSettings","product",'\n \n ',"items","variants_quantity","function","#fg-gift-items","fgAppearanceGiftSlider","data-variant",".dots","appearance","product_type","arrOfferAdded","discount_percentage","charAt","GET",'\n
    \n
    \n