PageSourceSearch

https://www.eufymake.com/_next/static/chunks/2434.ed9a760335e11263.js

js eufymake.com collected 2026-10-02 06:01:02 UTC 12,414 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="68548e72-4e89-4792-8030-09f3b3b2d8ae",e._sentryDebugIdIdentifier="sentry-dbid-68548e72-4e89-4792-8030-09f3b3b2d8ae")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2434],{32434:function(e,t,o){o.r(t);var i=o(85893),l=o(15216),n=o(59081),a=o(13910),r=o(48642),s=o(69687),d=o(12306),u=o(4484),v=o(20249),c=o(43026),g=o(65294),p=o(69317),b=o(11620),m=o(43873),h=o(90482),f=o(37156),w=o(67294),y=o(35869);let x=(0,l.withLayout)(l.BuyOneGetOneShelf.Root),_=e=>{var t,o,d,x,_,k,S,C,N,T,M,F,B,D,I,P;let{item:j,index:L,matchProduct:q,matchedVariant:G,layout:O,copy:z,router:E}=e,R=(0,r.t)(),U=(0,s.t)(),{locale:A}=(0,f.useRouter)(),{isLogin:H}=(0,a.a)(),[Q,W]=w.useState(!1),Z=e=>{(0,y.DU)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:(0,y.M9)({query:E.query,asPath:E.asPath}),component_type:"image",component_name:"ipc-bogo-shelf",creative_id:(null==q?void 0:q.id)||"",position:L+1,button_name:e,component_title:(null==z?void 0:z.title)||"",SKU:(null==G?void 0:G.sku)||""}})},V=(0,m.z)({variant:G}),K=null===(t=j.data)||void 0===t?void 0:t[0],X=null==G?void 0:G.availableForSale,Y=null==G?void 0:null===(o=G.metafields)||void 0===o?void 0:o.whiteBgImage,J=!!(Y&&Object.values(Y).some(Boolean)),$=e=>e?"url(".concat(e,")"):void 0,ee=Y?{"--white-bg-mobile":$(Y.mobile),"--white-bg-tablet":$(Y.tablet),"--white-bg-laptop":$(Y.laptop),"--white-bg-desktop":$(Y.desktop),"--white-bg-lg-desktop":$(Y.lgDesktop),"--see-product-text":"'".concat((null==z?void 0:z.seeProductText)||"See Product","'")}:void 0,et=null!==(N=null==G?void 0:G.price)&&void 0!==N?N:0,eo=null!==(T=null==G?void 0:null===(d=G.compareAtPrice)||void 0===d?void 0:d.amount)&&void 0!==T?T:et,ei=(0,w.useMemo)(()=>V?"percentage"===V.value_type?Number(new h.Z(et).times(Math.abs(Number(V.value))).div(100).toFixed(2,h.Z.ROUND_DOWN)):null!=V.fixed_value?Number(V.fixed_value):0:0,[V,et]),el=null!==(M=null==V?void 0:V.title)&&void 0!==M?M:"",en=null!==(F=null==q?void 0:null===(x=q.price)||void 0===x?void 0:x.currencyCode)&&void 0!==F?F:"USD",ea=(0,g.T4)({locale:null!=A?A:"us",amount:eo,currencyCode:en}),er=(0,g.T4)({locale:null!=A?A:"us",amount:Number((et-ei).toFixed(2)),currencyCode:en}),es=(null==q?void 0:null===(k=q.tags)||void 0===k?void 0:null===(_=k.filter(e=>e.startsWith("CLtag:")))||void 0===_?void 0:_.map(e=>({label:e.replace("CLtag:",""),variant:"fill"})))||[],ed=(0,w.useMemo)(()=>{var e,t,o;return null!==(o=null==G?void 0:null===(t=G.metafields)||void 0===t?void 0:null===(e=t.functionFreeGift)||void 0===e?void 0:e.reward_list)&&void 0!==o?o:[]},[G]),eu=(0,w.useMemo)(()=>ed.flatMap(e=>{var t;return(null!==(t=e.variant_list)&&void 0!==t?t:[]).map(t=>{var o;return{...t,quantity:null!==(o=e.get_unit)&&void 0!==o?o:1}})}),[ed]),ev=1===ed.length&&(null!==(B=null===(C=ed[0])||void 0===C?void 0:null===(S=C.variant_list)||void 0===S?void 0:S.length)&&void 0!==B?B:0)<=1?1:2,ec=(0,w.useMemo)(()=>[...new Set(eu.map(e=>e.handle).filter(Boolean))],[eu]),{data:eg}=(0,p.G)({handles:ec,metafieldIdentifiers:{product:[],variant:[]},queryCustom:{productFragmentCustom:v.o,variantFragmentCustom:c.R,imageFragmentCustom:u.A}}),ep=(0,w.useMemo)(()=>eg&&0!==eu.length?eu.map(e=>{let t=eg.find(t=>t.handle===e.handle);if(!t)return null;let o=t.variants.find(t=>t.sku===e.sku);return o&&o.availableForSale?{...o,product:t,_giftQuantity:e.quantity}:null}).filter(Boolean):[],[eg,eu]),eb=(0,w.useMemo)(()=>ep.slice(0,2),[ep]),[em,eh]=(0,w.useState)([]);w.useEffect(()=>{if(0!==eb.length){if(1===ev){var e;eh([null==eb?void 0:null===(e=eb[0])||void 0===e?void 0:e.id].filter(Boolean))}else eh(eb.map(e=>null==e?void 0:e.id).filter(Boolean))}},[eb,ev]);let ef=e=>{let t=e.map(e=>e.id),o=ep.filter(e=>t.includes(e.id)).map(e=>{var t,o,i,l,n,a,r;return{variant:{...e,finalPrice:{amount:Number(null==e?void 0:null===(t=e.price)||void 0===t?void 0:t.amount),currencyCode:null!==(n=null==e?void 0:null===(o=e.price)||void 0===o?void 0:o.currencyCode)&&void 0!==n?n:"USD"}},quantity:null!==(a=e._giftQuantity)&&void 0!==a?a:1,attributes:(0,b.cf)({ruleId:null==G?void 0:null===(l=G.metafields)||void 0===l?void 0:null===(i=l.functionFreeGift)||void 0===i?void 0:i.rule_id,mainVariantSku:null!==(r=null==G?void 0:G.sku)&&void 0!==r?r:""})}});return{mainItem:{variant:G,quantity:1},giftItems:o,customAttributes:(0,b.ji)({memberType:H?"1":"0"})}},ew=async(e,t)=>{if(!X)return;let{mainItem:o,giftItems:i,customAttributes:l}=ef(t),n={position:(null==z?void 0:z.title)||"FPDBogoShelf"};"buyNow"===j.shopNowFun?await U.trigger({items:[o,...i],discountCode:el,customAttributes:l,gtmParams:n}):await R.trigger({variants:[o,...i],discountCode:el,customAttributes:l,gtmParams:n}),Z(j.shopNowText)},ey=async(e,t)=>{if(!X)return;let{mainItem:o,giftItems:i,customAttributes:l}=ef(t),n={position:(null==z?void 0:z.title)||"FPDBogoShelf"};"buyNow"===j.shopNowFun?await R.trigger({variants:[o,...i],discountCode:el,customAttributes:l,gtmParams:n}):await U.trigger({items:[o,...i],discountCode:el,customAttributes:l,gtmParams:n}),Z(j.learnMoreText)};return(0,i.jsx)(l.BuyOneGetOneShelf.ProductCard,{className:(0,n.cn)("bogo-item-wrapper",J&&"has-white-bg",Q&&"is-white-bg-visible"),layout:O,giftType:ev,style:ee,onClick:e=>{if(!J||!window.matchMedia("(hover: none)").matches||e.target instanceof HTMLElement&&e.target.closest("button, a"))return;let t=e.currentTarget.querySelector("[class*='relative'][class*='grow'][class*='overflow-hidden']");
1if(!t)return;let o=t.getBoundingClientRect(),i=e.clientX-o.left,l=e.clientY-o.top;i>o.width-160&&i<o.width-4&&l>4&&l<50&&(e.preventDefault(),W(e=>!e))},productData:{...K,name:null!==(D=null==K?void 0:K.custom_name)&&void 0!==D?D:null==K?void 0:K.name,description:null!==(I=null==K?void 0:K.custom_description)&&void 0!==I?I:null==q?void 0:q.description,variant:G,originalPrice:eo>et-ei?ea:null,currentPrice:er,availableForSale:X,tags:[X&&eo>et-ei?{label:((null==z?void 0:z.couponTag)||"{amount} OFF").replace("{amount}",(0,g.T4)({locale:null!=A?A:"us",amount:eo-(et-ei),currencyCode:en,removeTrailingZeros:!0})),variant:"fill"}:null,...es].filter(Boolean),learnMoreText:j.learnMoreText,shopNowText:j.shopNowText,freeGiftLabel:null==z?void 0:z.freeGiftHeading},gifts:eb.map((e,t)=>{var o,i,l,n,a,r,s,d,u,v,c,p,b;return{image:null!==(r=null==e?void 0:null===(o=e.image)||void 0===o?void 0:o.url)&&void 0!==r?r:"",originalPrice:(0,g.T4)({locale:null!=A?A:"us",amount:null!==(s=null==e?void 0:null===(i=e.price)||void 0===i?void 0:i.amount)&&void 0!==s?s:0,currencyCode:null!==(d=null==e?void 0:null===(l=e.price)||void 0===l?void 0:l.currencyCode)&&void 0!==d?d:"USD"}),currentPrice:"free",name:null!==(v=null!==(u=null==e?void 0:null===(n=e.product)||void 0===n?void 0:n.title)&&void 0!==u?u:null==e?void 0:e.title)&&void 0!==v?v:"",quantity:null!==(c=null==e?void 0:e._giftQuantity)&&void 0!==c?c:1,sku:null==e?void 0:e.sku,variantId:null!==(p=null==e?void 0:e.id)&&void 0!==p?p:"",id:null!==(b=null==e?void 0:e.id)&&void 0!==b?b:"".concat(t),handle:null==e?void 0:null===(a=e.product)||void 0===a?void 0:a.handle,tag:null==z?void 0:z.freeGiftLabel}}),sceneImages:j.images,onProductClick:()=>{},onLearnMore:ey,onShopNow:ew,onGiftSelectionChange:e=>eh(e.map(e=>e.id))},null!==(P=j.id)&&void 0!==P?P:L)},k=e=>{var t,o;let{data:l,buildData:n=[],componentStyle:a,...r}=e,{style:s,...u}=l||{},v=(0,f.useRouter)(),c=(e,t)=>{var o;let i=n.find(e=>(0,d.Ll)(e.id)===(0,d.Ll)(t)),l=null==i?void 0:null===(o=i.variants)||void 0===o?void 0:o.find(t=>t.sku===e);return{matchedProduct:i,matchedVariant:l}},g=(null===(t=u.bogoItems)||void 0===t?void 0:t.length)>1?"vertical":"horizontal",p=[s,a].filter(Boolean).join("\n"),b="string"==typeof s?Object.fromEntries(s.matchAll(/(--[\w-]+)\s*:\s*(\S+)/g)):void 0;return(0,i.jsxs)(x,{...u,...r,className:"btm-bogo-shelf flex-wrap",style:b,children:[p&&(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:p}}),(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n        .btm-bogo-shelf [class*='flex-1'][class*='flex-col'] { justify-content: var(--btm-bogo-justify, space-between); }\n        .btm-bogo-shelf div:has(> [data-headless-type-name]) { flex-direction: row-reverse; justify-content: flex-end; }\n        .btm-bogo-shelf [data-headless-type-name] { min-width: auto; flex: none; white-space: nowrap; }\n        .btm-bogo-shelf div:has(> [data-headless-type-name]):has(button:disabled) button:not(:disabled) { opacity: 0.5; pointer-events: none; }\n\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg { --white-bg-image: var(--white-bg-mobile); }\n        @media (min-width: 768px) { .btm-bogo-shelf .bogo-item-wrapper.has-white-bg { --white-bg-image: var(--white-bg-tablet); } }\n        @media (min-width: 1024px) { .btm-bogo-shelf .bogo-item-wrapper.has-white-bg { --white-bg-image: var(--white-bg-laptop); } }\n        @media (min-width: 1440px) { .btm-bogo-shelf .bogo-item-wrapper.has-white-bg { --white-bg-image: var(--white-bg-desktop); } }\n        @media (min-width: 1920px) { .btm-bogo-shelf .bogo-item-wrapper.has-white-bg { --white-bg-image: var(--white-bg-lg-desktop); } }\n\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg [class*='relative'][class*='grow'][class*='overflow-hidden'] { position: relative; background-color: #fff; }\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg [class*='relative'][class*='grow'][class*='overflow-hidden']::after {\n          content: '';\n          position: absolute;\n          inset: 0;\n          background-image: var(--white-bg-image, none);\n          background-size: contain;\n          background-position: center;\n          background-repeat: no-repeat;\n          opacity: 0;\n          transition: opacity 0.3s ease;\n          z-index: 1;\n          pointer-events: none;\n        }\n        @media (hover: hover) {\n          .btm-bogo-shelf .bogo-item-wrapper.has-white-bg:hover [class*='relative'][class*='grow'][class*='overflow-hidden']::after { opacity: 1; }\n          .btm-bogo-shelf .bogo-item-wrapper.has-white-bg:hover [class*='relative'][class*='grow'][class*='overflow-hidden'] picture { opacity: 0; transition: opacity 0.3s ease; }\n        }\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg.is-white-bg-visible [class*='relative'][class*='grow'][class*='overflow-hidden']::after { opacity: 1; }\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg.is-white-bg-visible [class*='relative'][class*='grow'][class*='overflow-hidden'] picture { opacity: 0; }\n        .btm-bogo-shelf .bogo-item-wrapper.has-white-bg [class*='absolute'][class*='left-4'][class*='top-4'] { z-index: 2; }\n\n        @media (hover: none) {\n          .btm-bogo-shelf .bogo-item-wrapper.has-white-bg [class*='relative'][class*='grow'][class*='overflow-hidden']::before {\n            content: var(--see-product-text, 'See Product');\n            position: absolute;\n            right: 12px;\n            top: 12px;\n            z-index: 3;\n            display: flex;\n            align-items: center;\n            gap: 6px;\n            border-radius: 9999px;\n            background-color: rgba(0, 0, 0, 0.6);\n            padding: 6px 12px 6px 36px;\n            font-size: 14px;\n            font-weight: 500;\n            line-height: 1.4;\n            color: #fff;\n            backdrop-filter: blur(4px);\n            background-image: url('https://cdn.shopify.com/s/files/1/0569/5147/2268/files/icon_contrast.png?v=1785841268');\n            background-repeat: no-repeat;\n            background-position: 12px center;\n            background-size: 18px 18px;\n            cursor: pointer;\n          }\n        }\n\n        .btm-bogo-shelf .bogo-item-wrapper h4.line-clamp-1,\n        .btm-bogo-shelf .bogo-item-wrapper span.line-clamp-1 {\n          -webkit-line-clamp: unset;\n          line-clamp: unset;\n        }\n      "}}),null===(o=u.bogoItems)||void 0===o?void 0:o.map((e,t)=>{var o,l;let n=null==e?void 0:null===(o=e.data)||void 0===o?void 0:o[0];if(!n)return null;let{matchedVariant:a,matchedProduct:r}=c(n.sku,n.shopify_id);return(0,i.jsx)(_,{item:e,index:t,matchProduct:r,matchedVariant:a,c
1opy:u.copy,layout:g,router:v},null!==(l=e.id)&&void 0!==l?l:t)})]})};k.displayName="BTMBogoShelfWrapper",t.default=k}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.