PageSourceSearch

https://www.invisiblefence.com/6741656961ea787d893ad26c1b4f567e68fe285c-8ae5bbaf24053ae54753.js

js invisiblefence.com collected 2026-10-03 21:20:16 UTC 10,299 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="546d1fe3-e55c-43bb-b8b5-0e71501ebb33",e._sentryDebugIdIdentifier="sentry-dbid-546d1fe3-e55c-43bb-b8b5-0e71501ebb33")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"fb445b6c67a5f6afccda1f61db4a42915bc9fa09"};(self.webpackChunkinvisiblefence=self.webpackChunkinvisiblefence||[]).push([[1641],{52139:function(e,l,n){n.d(l,{A:function(){return N}});var t=n(40107),a=n(14041),o=n(88992),i=n(77282),r=n(66277),u=n(28610),s=n(80435),d=n(36629),c=n(4837),v=n(9431),m=n(98417),p=n(91263),f=n(46399),g=n(19071);function h({product:e,isOpen:l,onClose:n,fromSearch:t}){var o;const{tt:i}=(0,u.useUiComponentsInternationalContext)(),{0:r,1:s}=(0,a.useState)(void 0===globalThis.window?0:globalThis.innerWidth);(0,a.useEffect)(()=>{const e=()=>s(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const d=e=>{e.preventDefault(),n()};var c;return r<768?a.createElement(f._s,{open:l,onClose:()=>n(!0)},a.createElement(f.zj,{style:{zIndex:1500}},a.createElement(f.BE,null,a.createElement(f.gk,null,null==e||null===(c=e.store)||void 0===c?void 0:c.title),a.createElement(f.cp,{onClick:d},a.createElement("span",{className:"sr-only"},i(e=>e.productModalComponent.closeButton)))),a.createElement(f.I6,null,a.createElement(p.A,{showPrice:!0,onClose:n,formClasses:"mt-0",fromSearch:t})))):a.createElement(g.lG,{open:l,onOpenChange:n},a.createElement(g.Cf,{closeBool:!1},a.createElement(g.HM,{className:"absolute top-6 flex items-center justify-center",onClick:d}),a.createElement(g.c7,{className:"mr-6"},a.createElement(g.L3,null,null==e||null===(o=e.store)||void 0===o?void 0:o.title)),a.createElement(g.rr,null,a.createElement(p.A,{showPrice:!0,onClose:n,formClasses:"mt-0",fromSearch:t}))))}var b=n(25820),E=n(18001),y=n(23351),x=n(65717),C=n(2157),w=n(8114),k=n(45655),S=n(24577),P=n(70204);const O=({onClick:e,activeSku:l,position:n})=>{var t,p,f,g,O,N,A,I,D,V,_,$,R,T,M,B,L,z,U,F;const{addToCart:j,formatPrice:q}=(0,a.useContext)(i.MI),{siteIdentifier:W}=(0,a.useContext)(S.Ov),{activeVariant:G,colorLabel:H,colorLabels:Y,handleOptionChange:J,pricing:K,product:Q,productOptions:X,quantity:Z,selectedOptions:ee,selectedSellingPlan:le,sellingPlanGroups:ne,variants:te}=(0,a.useContext)(r.c),ae=(0,o.A)(),oe=(0,a.useRef)(null),{tt:ie,locale:re}=(0,u.useUiComponentsInternationalContext)(),{0:ue,1:se}=(0,a.useState)(!1),{canAddToCart:de,hasInventoryData:ce,hasStock:ve,isComingSoon:me,isDiscontinued:pe,isObsolete:fe,isUnknownLifecycle:ge,lifecycleDisabled:he}=(0,P.O)(),be=null!=ae&&null!==(t=ae.pathname)&&void 0!==t&&t.includes("/shop")?ae.pathname:null,Ee=null==Q||null===(p=Q.shopifyProduct)||void 0===p||null===(f=p.options)||void 0===f||null===(g=f.find(e=>(0,y.I)(e.name,H,Y)))||void 0===g?void 0:g.name,ye=Ee?null==ee?void 0:ee[Ee]:null,xe=ye?null==te?void 0:te.filter(e=>{var l;return null===(l=e.selectedOptions)||void 0===l?void 0:l.some(e=>e.name===Ee&&e.value===ye)}):[],Ce=null!==(O=null!==(N=null==xe?void 0:xe.find(e=>e.availableForSale))&&void 0!==N?N:null==xe?void 0:xe[0])&&void 0!==O?O:null,we=null!==(A=null!==(I=null!==(D=null!=Ce?Ce:G)&&void 0!==D?D:null==te?void 0:te.find(e=>e.availableForSale))&&void 0!==I?I:null==te?void 0:te[0])&&void 0!==A?A:null,ke="petsafe"===W,Se=(0,a.useMemo)(()=>(0,x.Ti)((0,C.H)(Q,null==we?void 0:we.sku)),[Q,null==we?void 0:we.sku]),Pe=async e=>{e.preventDefault(),e.stopPropagation(),await j({activeVariant:G,product:Q,quantity:Z,selectedSellingPlan:null,variantId:G.shopifyId,variantMetafields:null==G?void 0:G.metafields});const l=[{variant:G,product:null==Q?void 0:Q.shopifyProduct,quantity:Z,isSubscription:!1,category:be}];(0,x.d)("add_to_cart",{ecommerce:{currency:"USD",value:l.reduce((e,l)=>e+l.quantity*l.variant.price,0)},items:l})};return Q?a.createElement("div",{className:"size-full"},a.createElement(m.A,{className:"flex flex-col h-full w-full p-4 relative gap-3 items-start bg-card border border-border rounded-lg hover:border-cta",link:(()=>{var e,n,t;const a=ke?"p":"product",o=(0,k.getLocalizedPagePath)(`/${a}/${null==Q||null===(e=Q.store)||void 0===e||null===(n=e.slug)||void 0===n?void 0:n.current}`,re),i=null!==(t=null==we?void 0:we.sku)&&void 0!==t?t:l;return`${o}${i&&ke?`/${(0,w.hg)(i)}`:""}`})(),onClick:null!=e?e:()=>{return e="select_item",void(0,x.d)(e,{ecommerce:{currency:"USD",value:null==K?void 0:K.price},items:[{variant:null!=we?we:G,product:null==Q?void 0:Q.shopifyProduct,category:(null==ae||null===(l=ae.pathname)||void 0===l?void 0:l.startsWith("/shop"))&&be}]});var e,l},ref:oe,state:{collectionLocation:be,activeSku:null!==(V=null==we?void 0:we.sku)&&void 0!==V?V:null==G?void 0:G.sku}},(null==Q||null===(_=Q.badge)||void 0===_?void 0:_.text)&&a.createElement("div",{className:"absolute top-2 left-2 z-[1]"},a.createElement(d.A,{hex:(null==Q||null===($=Q.badge)||void 0===$?void 0:$.hex)||null,message:(null==Q||null===(R=Q.badge)||void 0===R?void 0:R.text)||null})),a.createElement(v.A,{alt:null==Q||null===(T=Q.store)||void 0===T?void 0:T.title,className:"h-auto w-full",src:(0,x.OU)((null==we||null===(M=we.media.find(e=>{var l;return!(null===(l=e.image)||void 0===l||!l.src)}))||void 0===M?void 0:M.image.src)||(null==Q||null===(B=Q.store)||void 0===B?void 0:B.previewImageUrl),720)}),a.createElement("div",null,a.createElement("h2",{className:"text-base font-bold mb-0 overflow-visible text-foreground-headline"},null==Q||null===(L=Q.store)||void 0===L?void 0:L.title)),Se&&a.createElement("div",{className:"h-6 w-full mr-auto","data-bv-product-id":Se,"data-bv-seo":"false","data-bv-show":"inl
1ine_rating",id:`BVRRInlineRating-${Se}`}),!(null===(z=Q.dynamicFeatures)||void 0===z||!z.length)&&a.createElement("ul",{className:"my-0"},null===(U=Q.dynamicFeatures)||void 0===U?void 0:U.slice(0,3).map(e=>a.createElement("li",{className:"text-sm text-foreground",key:e.text},e.text))),!me&&!(fe&&!ve)&&(()=>{var e;const l=null==X?void 0:X.find(e=>(0,y.I)(e.name,H,Y));let n=[];var t;return(null==l||null===(e=l.values)||void 0===e?void 0:e.length)>1?(n=l.values.map(e=>{const n=null==te?void 0:te.find(l=>l.selectedOptions.some(l=>(0,y.I)(l.name,H,Y)&&l.value===e));if(n){var t;const a=null==n||null===(t=n.metafields)||void 0===t?void 0:t.find(e=>["swatch_image","swatch_hex"].includes(e.name));if(null!=a&&a.value)return{image:a.value,type:a.name,value:e,name:l.name}}return{value:e,type:"string",name:l.name}}),(null===(t=n)||void 0===t?void 0:t.length)>1&&a.createElement("div",{className:"flex flex-wrap gap-3",role:"radiogroup"},n.map(e=>["swatch_image","swatch_hex"].includes(e.type)?a.createElement(c.A,{handleChange:J,key:e.value,option:e,selected:ee[e.name]===e.value,small:!0,unavailable:!1}):a.createElement(E.A,{handleOptionChange:J,key:e.value,option:l,selectedOptions:ee,value:e.value})))):null})(),a.createElement("div",{className:"flex w-full mt-auto items-end justify-between"},a.createElement("div",{className:"flex flex-col justify-end gap-3 items-start w-full"},!(null==ne||!ne.length)&&a.createElement(d.A,{discount:null!==(F=null==le?void 0:le.percentageDiscount)&&void 0!==F?F:ne[0].percentageDiscount,sub:!0}),a.createElement("div",{className:"flex justify-between items-end w-full"},a.createElement("div",{className:"flex flex-col"},!me&&!(ce&&he)&&a.createElement("span",{className:"text-xl font-bold"},null==K?void 0:K.getPriceRange()),!(null==K||!K.compareAtPrice)&&a.createElement("div",{className:"flex flex-wrap gap-x-1"},a.createElement("span",{className:"font-light text-destructive line-through"},q(null==K?void 0:K.compareAtPrice)),a.createElement("span",{className:"font-light text-destructive"},"(",null==K?void 0:K.percentageDiscount,"% savings)"))),ge?null:me?a.createElement(s.$,{disabled:!0,variant:"ghost"},ie(e=>e.productOptionsComponent.comingSoonButton)):fe&&!ve?a.createElement(s.$,{disabled:!0,variant:"ghost"},ie(e=>e.productOptionsComponent.discontinuedButton)):pe&&!ve?a.createElement(s.$,{disabled:!0,variant:"ghost"},ie(e=>e.productOptionsComponent.outOfStockButton)):te.length>1||null!=ne&&ne.length?a.createElement(b.A,{"aria-label":`${ie(e=>e.productOptionsComponent.addToCartButton)} ${null==Q||null===(Ne=Q.store)||void 0===Ne?void 0:Ne.title}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),se(!0)}}):de||null!=we&&we.availableForSale?a.createElement(b.A,{"aria-label":`${ie(e=>e.productOptionsComponent.addToCartButton)} ${null==Q||null===(Oe=Q.shopifyProduct)||void 0===Oe?void 0:Oe.title}`,onClick:Pe,title:"Add to Cart"}):a.createElement(s.$,{disabled:!0,variant:"ghost"},ie(e=>e.productOptionsComponent.outOfStockButton)))))),a.createElement(h,{isOpen:ue,onClose:()=>se(!1),product:Q})):null;var Oe,Ne};var N=({onClick:e,product:l,position:n})=>{const o=null==l?void 0:l.shopifyProduct,i=a.useMemo(()=>{var e,l,n;return null!==(e=null==o||null===(l=o.variants)||void 0===l?void 0:l.find(e=>e.availableForSale))&&void 0!==e?e:null==o||null===(n=o.variants)||void 0===n?void 0:n[0]},[o]),{0:u,1:s}=(0,a.useState)(()=>{var e;return null!==(e=null==i?void 0:i.sku)&&void 0!==e?e:null}),d=a.useMemo(()=>{var e,l,n,t;return{min:null==o||null===(e=o.priceRangeV2)||void 0===e||null===(l=e.minVariantPrice)||void 0===l?void 0:l.amount,max:null==o||null===(n=o.priceRangeV2)||void 0===n||null===(t=n.maxVariantPrice)||void 0===t?void 0:t.amount}},[o]);if((null==o?void 0:o.variants.length)>1){const e=(0,x._4)(null==o?void 0:o.variants),l=(0,x.qv)(e);o.variants=e,o.options=l;const n=e.map(e=>e.price);n.length>0?(o.priceRangeV2.minVariantPrice.amount=Math.min.apply(Math,(0,t.A)(n)).toString(),o.priceRangeV2.maxVariantPrice.amount=Math.max.apply(Math,(0,t.A)(n)).toString()):d.min&&d.max&&(o.priceRangeV2.minVariantPrice.amount=d.min,o.priceRangeV2.maxVariantPrice.amount=d.max)}return a.createElement(r.u,{activeSku:u,onOptionChange:({variant:e})=>{null!=e&&e.sku?s(e.sku):s(null)},product:l},a.createElement(O,{onClick:e,activeSku:u}))}}}]);
2//# sourceMappingURL=6741656961ea787d893ad26c1b4f567e68fe285c-8ae5bbaf24053ae54753.js.map

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.