PageSourceSearch

https://www.chewy.com/static/spa/chewy-home-ui/_next/static/chunks/1182-6af5dfbf92aef59e.js

js chewy.com collected 2026-09-24 08:25:07 UTC 11,323 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1182,5741],{48754:function(e,t,n){n.d(t,{W:function(){return r}});const r=(0,n(2265).createContext)({slides:[],direction:"right",activeSlideId:null,prevActiveId:null,animate:!1})},36201:function(e,t,n){n.d(t,{P:function(){return c}});n(84422);var r=n(2265),l=n(71909),i=n(75080),o=n.n(i),a=n(48754);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])({}).hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(null,arguments)}const c=(0,r.forwardRef)(({className:e="",children:t,isFirst:n,variation:i,...c},u)=>{const{slides:d,activeSlideId:f,prevActiveId:m,direction:v,animate:h}=(0,r.useContext)(a.W),[b,p]=(0,r.useState)(0),[g,_]=(0,r.useState)(""),y=!d.length&&n||1===d.length||f===g,k=`slide ${b} of ${d.length}`;(0,r.useEffect)(()=>{const e=o()("kib-hero-carousel-slide-");return _(e),d.push(e),p(d.length),()=>{d.length=0,p(0)}},[]);const E=(0,l.Z)("kib-hero-carousel__slide","kib-hero-carousel__slide-react-transition--"+(y?"active":"inactive"),h&&!y&&g!==m&&"kib-hero-carousel__slide-react-transition--inactive-hide",h&&y&&`kib-hero-carousel__slide-react-transition--${v}`,h&&!y&&`kib-hero-carousel__slide-react-transition--leave-${v}`,!h&&!y&&"kib-hero-carousel__slide--hide",e);return r.createElement("div",s({id:g,"data-testid":k,className:E,ref:u},c),r.createElement("div",{className:"kib-hero-carousel__slide-container"},"function"==typeof t?t({getSlideItemId:()=>`${g}-slide-item`}):t,"modern"===i&&r.createElement("div",{className:"kib-hero-carousel__slide-nav-background"})))});c.displayName="KibHeroCarouselSlide"},72041:function(e,t,n){n.d(t,{D:function(){return p}});n(84422);var r=n(2265),l=n(7403),i=n(71909),o=n(75080),a=n.n(o),s=n(69812),c=n(85741),u=n(48754),d=(n(19701),n(20988));function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])({}).hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},f.apply(null,arguments)}const m=({reverse:e=!1,className:t="",...n})=>{const l=e?d.Ns:d.ML;return r.createElement("button",f({type:"button",className:(0,i.Z)("kib-hero-carousel__control","kib-hero-carousel__control--"+(e?"previous":"next"),t)},n),r.createElement(l,{className:"kib-hero-carousel__control-icon","aria-hidden":"true",focusable:"false","data-a11y":"decorative"}))};m.displayName="KibHeroCarouselControl";var v=m;function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])({}).hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},h.apply(null,arguments)}const b={sx:0,sy:0,ex:0,ey:0},p=(0,r.forwardRef)(({id:e="",autoplay:t=!0,controlPrevLabel:n="Previous Slide",controlNextLabel:o="Next Slide",variation:d="classic",className:f="",hasRoundedCorners:m=!1,onForward:p,onBackward:g,children:_,...y},k)=>{const[E,S]=(0,r.useState)({slides:[],direction:"right",activeSlideId:null,prevActiveId:null,animate:!1}),[w,I]=(0,r.useState)(!1),[x,N]=(0,r.useState)(!1),[C,O]=(0,r.useState)(!1),[R,$]=(0,r.useState)(!1),[L,Z]=(0,r.useState)(!1),[B,j]=(0,r.useState)(!1),[P,A]=(0,r.useState)(null),M=(0,r.useRef)(null),T=(0,r.useRef)(null),H=(0,r.useRef)(0),W=(0,r.useRef)(null),q=(0,r.useRef)(0),F=(0,r.useRef)(a()("kib-hero-carousel-")),K=(0,r.useRef)(null),V=(0,r.useRef)(!1),D=(0,r.useRef)(E.activeSlideId);D.current=E.activeSlideId;const z=e||F.current,G=`${z}-slides`,X=1<E.slides.length;(0,r.useEffect)(()=>(S(e=>({...e,activeSlideId:e.slides[H.current],prevActiveId:e.activeSlideId})),()=>{t&&le()}),[t,X]),(0,r.useEffect)(()=>{if(!t||!X)return;const e=Q(P);!B||L||e||w?(!B||L||e)&&w&&le():("modern"===d&&N(!0),re())},[B,L,t,X,w,d,P]),(0,r.useEffect)(()=>{if("undefined"==typeof document)return;const e=e=>{A(e.target)},t=()=>{requestAnimationFrame(()=>{document.querySelector(":focus-visible")||A(null)})};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}},[]);let Y=parseInt(t,10);"number"==typeof t?Y=t:"boolean"==typeof t&&t&&(Y=5e3);const J=(e=null)=>{if("undefined"==typeof document)return!1;const t=null!=e?e:document.activeElement;if(!t)return!1;if(K.current===t&&V.current)return!1;if("function"!=typeof t.matches||!t.matches(":focus-visible"))return!1;if("modern"===d){const e=D.current,n=e?document.getElementById(e):null,r=t instanceof HTMLElement&&t.classList.contains("kib-hero-carousel__slide");return K.current!==t&&!!T.current&&T.current.contains(t)||!!n&&n.contains(t)||r}return!!M.current&&M.current.contains(t)},Q=(e=P)=>J(e)||J()||"modern"===d&&e instanceof HTMLElement&&e.classList.contains("kib-hero-carousel__slide")&&K.current!==e,U=(0,r.useMemo)(()=>w&&!Q(P)?"off":"polite",[w,P,d]),ee=(0,r.useCallback)((e,t=null,n=!1)=>
1{if("modern"===d&&H.current===e){if(0==(null==t?void 0:t.detail)){const e=document.getElementById(E.slides[H.current]);null==e||e.focus()}return void le()}n||("next"===e?null==p||p():"prev"===e&&(null==g||g()));let r="right";S(l=>{const i=l.slides.indexOf(`${l.activeSlideId}`);switch(e){case"next":if(r="right",i+1>l.slides.length-1){H.current=0;break}H.current=i+1;break;case"prev":if(r="left",0===i){H.current=l.slides.length-1;break}H.current=i-1;break;default:if(e===H.current)break;r="number"==typeof e&&e>H.current?"right":"left",H.current=e}if("modern"!==d||n?"modern"===d&&(O(!1),$(!1)):(le(),$("number"==typeof e),O("left"==r),q.current="number"==typeof e?0:"left"==r?Y/2:0),"modern"===d&&0==(null==t?void 0:t.detail)){const e=document.getElementById(l.slides[H.current]);setTimeout(()=>null==e?void 0:e.focus(),1e3)}return{...l,direction:r,activeSlideId:l.slides[H.current],prevActiveId:l.activeSlideId,animate:!0}})},[w,g,p]),te=e=>{const t=e.nativeEvent;if(0<t.changedTouches.length){const[n]=t.changedTouches;"touchstart"===e.type?(b.sx=n.screenX,b.sy=n.screenY):(b.ex=n.screenX,b.ey=n.screenY,ie())}},ne=(e,n=null)=>{if("playpause"===e){return{title:(w?"Stop":"Resume")+" Automatic Slide Show","aria-controls":`${G}`,tabIndex:-1,"aria-hidden":!0}}const r=null!==n?n+1:E.slides.indexOf(e)+1;return{title:`Slide ${r} of ${E.slides.length}`,className:(0,i.Z)("kib-hero-carousel__pagination-button",{"kib-hero-carousel__pagination-button--modern":"modern"===d,"is-active":e===E.activeSlideId,"full-size":"modern"===d&&4>E.slides.length,"is-complete":"modern"===d&&H.current>=r,"half-complete":"modern"===d&&C,"full-complete":"modern"===d&&(e===E.activeSlideId&&!t||R),"is-paused":"modern"===d&&e===E.activeSlideId&&!x}),"aria-current":e===E.activeSlideId?"true":"false","aria-describedby":`${e}`,"data-testid":`button ${r} of ${E.slides.length}`,style:"modern"===d?{"--slide-duration":`${C?Y/2-250:Y}ms`}:void 0}},re=()=>{clearInterval(W.current),I(!0),W.current=window.setInterval(()=>{J()||("modern"===d?(N(!0),q.current+=100,q.current>=Y&&(ee("next",null,!0),q.current=0)):ee("next",null,!0))},"modern"===d?100:Y)},le=()=>{I(!1),"modern"===d&&N(!1),clearInterval(W.current)},ie=()=>{const e=b.ex-b.sx;-15>e?(ee("next"),t&&re()):15<e&&(ee("prev"),t&&re())},oe=r.createElement("div",{ref:T,"aria-label":"Choose slide to display.",className:(0,i.Z)("kib-hero-carousel__pagination",{"full-size":"modern"===d&&4<=E.slides.length}),role:"group"},E.slides.map((e,t)=>r.createElement("button",h({key:t,type:"button"},ne(e,t),{onClick:e=>ee(t,"modern"===d?e:null)})))),ae=w?c.G2:c.aq,se=r.createElement("button",h({type:"button"},ne("playpause"),{className:"kib-hero-carousel__pause","aria-live":"polite",onPointerDown:e=>{"mouse"===e.pointerType&&(V.current=!0)},onBlur:()=>{V.current=!1},onClick:()=>{L?Z(!1):w&&Z(!0)},ref:K}),r.createElement(ae,{className:"kib-hero-carousel__pause-icon","aria-hidden":"true",focusable:"false","data-a11y":"decorative"})),ce=r.createElement(r.Fragment,null,r.createElement(v,{reverse:!0,title:n,"aria-controls":G,onClick:()=>ee("prev")}),r.createElement(v,{title:o,"aria-controls":G,onClick:()=>ee("next")})),ue=r.createElement("div",{id:G,className:"kib-hero-carousel__slides","aria-live":U,"data-testid":"hero-carousel-slides",onTouchStart:te,onTouchEnd:te},_);return r.createElement(u.W.Provider,{value:{...E}},r.createElement("section",h({id:z,ref:(0,l.Z)(k,M),className:(0,i.Z)("kib-hero-carousel",f,{[`kib-hero-carousel--${d}`]:"classic"!==d}),role:"region","aria-roledescription":"carousel","aria-label":"Hero Carousel"},y),r.createElement(s.B,{threshold:1,updateVisible:e=>{j(e)}},r.createElement("div",{className:(0,i.Z)("kib-hero-carousel__container",{"kib-hero-carousel__container--rounded-corner":"modern"===d||m})},r.createElement("div",{className:"kib-hero-carousel__nav"},"boolean"!=typeof t||t?se:null,X?oe:null),"classic"===d&&X?ce:null,ue))))});p.displayName="KibHeroCarousel"},69812:function(e,t,n){n.d(t,{B:function(){return i}});n(84422);var r=n(2265);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])({}).hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(null,arguments)}const i=({enter:e=()=>{},leave:t=()=>{},updateVisible:n=()=>{},threshold:i=1,children:o,...a})=>{const s=(0,r.useRef)(null),[c,u]=(0,r.useState)(null),d=0<(i=1<=i?1:0>=i?0:i)&&1>i?i:[0,1];let f=!1;const m=r=>{const l=r[0],o=l.intersectionRatio>=i;if(!l.isIntersecting){if(!f)return;return n(!1),void t(l)}o?(e(l),f=!0):t(l),n(o)};return(0,r.useEffect)(()=>(u(new IntersectionObserver(m,{threshold:d}
1)),()=>null==c?void 0:c.disconnect()),[]),(0,r.useEffect)(()=>{s.current&&(null==c||c.observe(s.current))},[c]),r.createElement("div",l({ref:s},a),o||null)};i.displayName="KibDisplayObserver"},85741:function(e,t,n){n.d(t,{G2:function(){return a},Sj:function(){return o},aq:function(){return s}});var r=n(46313),l=n.n(r),i=n(2265),o=function(e){var t=l()()({},{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e);return i.createElement("svg",t,i.createElement("path",{d:"m19.23 15.26-2.54-.29a1.99 1.99 0 0 0-1.64.57l-1.84 1.84a15.045 15.045 0 0 1-6.59-6.59l1.85-1.85c.43-.43.64-1.03.57-1.64l-.29-2.52a2.001 2.001 0 0 0-1.99-1.77H5.03c-1.13 0-2.07.94-2 2.07.53 8.54 7.36 15.36 15.89 15.89 1.13.07 2.07-.87 2.07-2v-1.73c.01-1.01-.75-1.86-1.76-1.98Z",fill:"currentColor"}))},a=function(e){var t=l()()({},{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e);return i.createElement("svg",t,i.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2Zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2Z",fill:"currentColor"}))},s=function(e){var t=l()()({},{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e);return i.createElement("svg",t,i.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 0 0 0-1.69L9.54 5.98A.998.998 0 0 0 8 6.82Z",fill:"currentColor"}))}},7403:function(e,t){t.Z=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 2===e.length?r(e[0],e[1])||null:e.slice(1).reduce(function(e,t){return r(e,t)},e[0])||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var i=r.get(t)||function(n){l(e,n),l(t,n)};return r.set(t,i),i}return e||t}function l(e,t){"function"==typeof e?e(t):e.current=t}}}]);
2//# sourceMappingURL=1182-6af5dfbf92aef59e.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.