1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69487],{675:(e,a,t)=>{"use strict";t.d(a,{ModalPaneBackgroundClient:()=>h});var n=t(95155),l=t(11641),o=t(69730),i=t.n(o),r=t(98500),c=t.n(r),s=t(32562),u=t(86251),d=t.n(u);let h=()=>{(0,s.K$)();let{getLinkWith:e}=(0,l.s)(),a=e({modal:null});return(0,n.jsx)(c(),{href:a,scroll:!1,className:i()(d().background)})}},11641:(e,a,t)=>{"use strict";t.d(a,{s:()=>l});var n=t(73321);let l=()=>{let e=(0,n.usePathname)(),a=(0,n.useSearchParams)();return{getLinkWith:t=>{let n=new URLSearchParams(a?.toString()||"");for(let[e,a]of Object.entries(t))null===a?n.delete(e):Array.isArray(a)?n.set(e,a.join(",")):n.set(e,a.toString());let l=n.toString();return l?`${e}?${l}`:e||""},get:e=>a?.get(e)||""}}},16180:e=>{e.exports={chip:"chip-button_chip__APBdZ",black:"chip-button_black__GqS_M",transparent:"chip-button_transparent__U30vb"}},33899:(e,a,t)=>{"use strict";let n;t.d(a,{A:()=>i}),t(64046),t(44209),t(41463);var l=t(39493);let o=globalThis,i=n=o.prisma?o.prisma:new l.PrismaClient},44209:(e,a)=>{let t;{let e=e=>function(){throw Error(`\`${e}\` is only available in a Server Component.`)};t={unstable_cache:function(e){return"function"!=typeof e?e:function(){return e.apply(this,arguments)}},unstable_noStore:function(){},updateTag:e("updateTag"),revalidateTag:e("revalidateTag"),revalidatePath:e("revalidatePath"),refresh:e("refresh"),cacheLife:e("cacheLife"),cacheTag:e("cacheTag")}}let n=!1,l=!1;t.unstable_cacheLife=function(){return n||(n=!0,console.error(Error("`unstable_cacheLife` was recently stabilized and should be imported as `cacheLife`. The `unstable` prefixed form will be removed in a future version of Next.js."))),t.cacheLife.apply(this,arguments)},t.unstable_cacheTag=function(){return l||(l=!0,console.error(Error("`unstable_cacheTag` was recently stabilized and should be imported as `cacheTag`. The `unstable` prefixed form will be removed in a future version of Next.js."))),t.cacheTag.apply(this,arguments)},e.exports=t,a.unstable_cache=t.unstable_cache,a.revalidatePath=t.revalidatePath,a.revalidateTag=t.revalidateTag,a.updateTag=t.updateTag,a.unstable_noStore=t.unstable_noStore,a.cacheLife=t.cacheLife,a.unstable_cacheLife=t.unstable_cacheLife,a.cacheTag=t.cacheTag,a.unstable_cacheTag=t.unstable_cacheTag,a.refresh=t.refresh},51092:(e,a,t)=>{"use strict";t.d(a,{z:()=>c});var n=t(95155),l=t(69730),o=t.n(l),i=t(16180),r=t.n(i);let c=({children:e,className:a,variant:t="black",...l})=>(0,n.jsx)("button",{className:o()(r().chip,a,{[r().black]:"black"===t},{[r().transparent]:"transparent"===t}),...l,children:e})},52960:(e,a,t)=>{"use strict";t.d(a,{LocationSelectModalClient:()=>b});var n=t(95155),l=t(35248),o=t(11641),i=t(69730),r=t.n(i),c=t(29225),s=t(51092),u=t(98500),d=t.n(u),h=t(12115),_=t(68941),m=t.n(_),p=t(51619),f=t(64046),g=t(73321);let b=({regions:e})=>{let{get:a,getLinkWith:t}=(0,o.s)(),i=(0,g.usePathname)(),[u,_]=(0,h.useState)("counties"),b=a("location"),v=a("region"),x=v?"region":b?"location":null;function j(e){return e===u?"black":"white"}let N=[];for(let a of e)if(N.push({id:a.id,name:a.name,type:"region",regionName:a.name}),"International"===a.name)for(let e of a.locations)N.push({id:e.id,name:e.name,type:"location",regionName:a.name});let T="region"===x?v:null,k="location"===x?b:null,L=N.filter(e=>"counties"===u?"International"!==e.regionName:"International"===e.regionName);(0,h.useEffect)(()=>{if(T){let e=N.find(e=>e.id===Number(T));e&&_("International"===e.regionName?"international":"counties")}if(k){let e=N.find(e=>e.id===Number(k));e&&_("International"===e.regionName?"international":"counties")}},[]);let S=e=>{i&&"/"!==i||(0,p.sendGTMEvent)({event:f.qd.SUPPLIERS_CTA_SEARCH_CLICK,element_type:"Location Select",value:e})};return(0,n.jsxs)("div",{className:r()(m().wrapper),children:[(0,n.jsx)("h2",{className:r()(m().header),children:"Locations"}),(0,n.jsx)(d(),{className:r()(m().closeIconButton),href:t({modal:null}),scroll:!1,children:(0,n.jsx)(l.o,{width:"32",height:"32"})}),(0,n.jsxs)("div",{className:r()(m().tabs),children:[(0,n.jsx)(s.z,{variant:j("counties"),onClick:()=>_("counties"),children:"Regions"}),(0,n.jsx)(s.z,{variant:j("international"),onClick:()=>_("international"),children:"International"})]}),(0,n.jsx)("ul",{className:r()(m().locationList),children:L.map(e=>(0,n.jsx)("li",{children:"region"===e.type?(0,n.jsx)(d(),{scroll:!1,onClick:()=>S(e.name),href:t({region:e.id.toString(),modal:null,location:null,page:null}),className:r()(m().regionItem,{[m().checked]:Number(T)===e.id}),children:e.name}):(0,n.jsx)(d(),{scroll:!1,onClick:()=>S(e.name),href:t({location:e.id.toString(),modal:null,region:null,page:null}),className:r()(m().locationItem,{[m().checked]:Number(k)===e.id}),children:e.name})},`${e.id}-${e.type}`))}),(0,n.jsx)("div",{className:m().cancelButtonWrapper,children:(0,n.jsxs)(c.ButtonV4,{variant:"light",className:m().cancelButton,scroll:!1,href:t({modal:null,location:null,region:null,page:null}),children:[(0,n.jsx)(l.o,{})," CANCEL"]})})]})}},68941:e=>{e.exports={wrapper:"location-select-modal_wrapper__V9Mdf",closeIconButton:"location-select-modal_closeIconButton__rBVm_",header:"location-select-modal_header__r1lDT",chip:"location-select-modal_chip__irUyj",active:"location-select-modal_active__t4SRM",tabs:"location-select-modal_tabs__862wz",locationItem:"location-select-modal_locationItem__WTE_j",checked:"location-select-modal_checked__eD1fs",locationList:"location-select-modal_locationList__mXHXf",regionItem:"location-select-modal_regionItem__0j_x1",tabGroup:"location-select-modal_tabGroup__UA78a",cancelButtonWrapper:"location-select-modal_cancelButtonWrapper__noitV",cancelButton:"location-select-modal_cancelButton__MjX4x"}},69487:(e,a,t)=>{"use strict";t.r(a),t.d(a,{LocationSelectModal:()=>h});var n=t(95155),l=t(52960),o=t(675),i=t(69730),r=t.n(i),c=t(86251),s=t.n(c);let u=e=>{let{children:a,position:t}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:r()(s().container,s()[t]),children:a})})};var d=t(82263);let h=async()=>{let e=await (0,d.u)();return(0,n.jsxs)(u,{position:"bottom",children:[(0,n.jsx)(o.ModalPaneBackgroun
1dClient,{}),(0,n.jsx)(l.LocationSelectModalClient,{regions:e})]})}},82263:(e,a,t)=>{"use strict";t.d(a,{u:()=>o,y:()=>l});var n=t(33899);function l(e){let{regions:a,location:t,region:n}=e,l=Number(t),o=Number(n);return t?a.flatMap(e=>e.locations).find(e=>e.id===l):n?a.find(e=>e.id===o):null}async function o(){return await n.A.region.withCache({}).findMany({include:{locations:!0}})}},86251:e=>{e.exports={container:"modal-pane_container__rgeP_",top:"modal-pane_top__AcYWi",open:"modal-pane_open__JUoB1",left:"modal-pane_left__hz0rl",right:"modal-pane_right__vJmB2",bottom:"modal-pane_bottom__mmJJh",background:"modal-pane_background__JQr3u"}}}]); 2//# sourceMappingURL=69487.f27d5ed31471c4b1.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.