1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3996],{23996:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(37876),i=r(42606),s=r(54587),c=r.n(s),a=r(14232),l=r(538),u=r(52745);function d({activeBuyerProfile:e="home",content:t={},contextKey:r,initialContext:s={},initialFilters:o={},isOpen:f,onRequestClose:h,opener:m,productImage:w,productName:x=""}){let k,p=(0,a.useRef)(null),b=(0,a.useRef)(null),_=(0,a.useRef)(null),v=(0,a.useRef)(!1),[y,j]=(0,a.useState)("closed"),g=(0,a.useId)(),N=(k="string"==typeof w?w:w?.filename||w?.url||w?.cached_url||"",(0,l.N)(k));return(0,a.useEffect)(()=>{let e=p.current;if(!e)return;if(_.current&&(window.clearTimeout(_.current),_.current=null),f){v.current=!0,b.current=m||document.activeElement,j("opening");let t=e.querySelector("[data-stockist-drawer-initial-focus]")||e.querySelector("button, [href], input, select, textarea");return t?.focus(),()=>{}}if(!v.current){j("closed"),v.current=!1;return}j("closing");let t=320*!window.matchMedia("(prefers-reduced-motion: reduce)").matches;return _.current=window.setTimeout(()=>{_.current=null,j("closed");let e=b.current;b.current=null,e?.isConnected&&"function"==typeof e.focus&&e.focus()},t),()=>{_.current&&window.clearTimeout(_.current)}},[f,m]),(0,a.useEffect)(()=>()=>{_.current&&window.clearTimeout(_.current)},[]),(0,n.jsx)("div",{"aria-labelledby":g,"aria-modal":"true","aria-hidden":"closed"===y?"true":void 0,className:`c-stockist-drawer state-${y}`,"data-lenis-prevent":!0,onClick:e=>{e.target===e.currentTarget&&h?.()},onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),h?.();return}if("Tab"!==e.key)return;let t=Array.from(p.current?.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')||[]);if(!t.length)return;let r=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),r.focus())},ref:p,role:"dialog",children:(0,n.jsxs)("div",{className:"c-stockist-drawer__surface",children:[(0,n.jsxs)("header",{className:"c-stockist-drawer__header",children:[(0,n.jsxs)("div",{className:"c-stockist-drawer__title",children:[N&&(0,n.jsx)("span",{className:"c-stockist-drawer__thumbnail","aria-hidden":"true",children:(0,n.jsx)(c(),{src:N,alt:"",width:48,height:48,sizes:"48px"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{id:g,children:"Find a stockist"}),x&&(0,n.jsx)("p",{children:x})]})]}),(0,n.jsx)("button",{"aria-label":"Close stockist finder",className:"c-stockist-drawer__close",onClick:h,type:"button",children:(0,n.jsx)(i.X,{"aria-hidden":"true",weight:"regular"})})]}),(0,n.jsx)("div",{className:"c-stockist-drawer__body",children:(0,n.jsx)(u.A,{activeBuyerProfile:e,content:t,idPrefix:"stockist-drawer",initialContext:s,initialFilters:o,presentation:"drawer"},r)})]})})}}}]);
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.