1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,183383,e=>{"use strict";e.s(["setWebsiteDataZipCode",()=>o]);var i=e.i(965527),t=e.i(724096);let o=(e,o)=>{i.queryClient.setQueryData(t.getSiteData.queryKey,i=>i?{...i,zipCode:void 0!==e?e:i.zipCode,zipCodeDialogOpen:null!=o?o:i.zipCodeDialogOpen}:i)}},275021,e=>{"use strict";e.s(["useRegionId",()=>l],275021);var i=e.i(191788),t=e.i(948920);let o={"EN-CA":{R615:"V5X 1H1",R633:"M5V 3R8"},"FR-CA":{R615:"V5X 1H1",R633:"M5V 3R8"}},l=e=>(0,i.useMemo)(()=>{var i;if(!e||!(null==(i=(0,t.getPublicConfigByLocale)(e))?void 0:i.regionIdFromUrlEnabled))return{postalCode:null,matched:!1,regionId:null};let l=function(e){return e&&"string"==typeof e?new URLSearchParams(e).get("region_id"):null}(window.location.search),a=function(e,i){var t;let l=Array.isArray(e)?e[0]:e;if(!l||!i)return null;let a=o[i.trim().replace("_","-").toUpperCase()];return null!=(t=null==a?void 0:a[String(l).toUpperCase()])?t:null}(l,e);return{postalCode:a,matched:!!a,regionId:l}},[e])},400363,e=>{"use strict";e.s(["default",()=>w,"generateZipCodeContent",()=>A],400363);var i=e.i(391398);e.i(388008);var t=e.i(879045);e.i(543336);var o=e.i(345970),l=e.i(191788),a=e.i(376628);e.i(174231);var n=e.i(555318),r=e.i(25033);e.i(354526);var d=e.i(309015),s=e.i(724096),u=e.i(670451),c=e.i(367796),p=e.i(650804),g=e.i(113099),v=e.i(704977),C=e.i(224669),m=e.i(646935),y=e.i(642474),f=e.i(965527);let h=y.QUERY_KEYS.SITE_DATA;var x=e.i(534286),z=e.i(183383),b=e.i(948920);let D=e=>{let{onOpenChange:t,zipCode:o,zipCodeLabels:y}=e,[D,R]=(0,l.useState)(o),[j,L]=(0,l.useState)(""),[k,Z]=(0,l.useState)(!1),{data:w}=(0,s.useGetSiteData)(),{trackEventLocationError:O}=(0,x.useTrackEventsLocationError)(),B=c.localeDashByUnderscore[w.locale],I=w.country,{trackEventYourLocation:F}=(()=>{let{getTrackingData:e}=(0,v.useTracking)(),i=f.queryClient.getQueryData(h);return{trackEventYourLocation:t=>{(e=>{var i;let t;t={event_name:"your_location",custom_event_timestamp:Date.now(),page_type:null!=(i=null==e?void 0:e.pageType)?i:"",ga_user_cookie:(0,u.getCookieFromClient)("_ga"),client_side_third_party_resolve:"pending",zip_code:e.zipCode,shipping_availability:e.shippingAvailability},(0,m.default)({name:C.AnalyticEvents.yourLocation,payload:t})})({...e(),pageType:null==i?void 0:i.pageType,zipCode:t.zipCode,shippingAvailability:t.shippingAvailability})}}})(),M=(0,u.getCookie)("edge-zip-code-in-use"),P=null===g.POSTAL_CODE_REGEXES||void 0===g.POSTAL_CODE_REGEXES?void 0:g.POSTAL_CODE_REGEXES[I],U=async e=>{if(e.preventDefault(),L(""),!P.test(D)){L((null==y?void 0:y.yourLocationErrorMessage)||"Invalid zip code format"),O({zipCode:D,shippingAvailability:"unavailable"});return}Z(!0);try{var i;let e=await p.NextSelfClient.validateZipCode(B,D);if(!(null==e||null==(i=e.data)?void 0:i.success)){let e=(null==y?void 0:y.yourLocationErrorMessage)||"Zip code validation failed";L(e);return}(0,z.setWebsiteDataZipCode)(e.data.userLocZipCode,!1),(0,u.setCookieFromClient)("edge-zip-code-in-use","false"),F({zipCode:D,shippingAvailability:"available"}),setTimeout(()=>{var e,i;null==(i=w.zipCodeDialogTrigger)||null==(e=i.current)||e.focus()},100)}catch(e){console.error("Zip code validation error:",e),L((null==y?void 0:y.yourLocationErrorMessage)||"An error occurred while validating the zip code")}finally{Z(!1)}},W=(0,l.useMemo)(()=>{var e;return null==(e=(0,b.getPublicConfigByLocale)(null==w?void 0:w.locale))?void 0:e.postalCodeFromCdnEnabled},[null==w?void 0:w.locale]),G=(0,l.useMemo)(()=>A(null==w?void 0:w.zipCode,null==y?void 0:y.emptyResult,B,M,W),[M,w,W]);return(0,i.jsx)(n.Dialog,{open:null==w?void 0:w.zipCodeDialogOpen,id:"zip-code-dialog",onOpenChange:e=>{t(e),e||setTimeout(()=>{var e,i;null==(i=w.zipCodeDialogTrigger)||null==(e=i.current)||e.focus()},100)},children:(0,i.jsxs)(n.Dialog.Content,{"data-component-id":"zip-code-dialog",titleElement:(0,i.jsxs)(E,{css:{"@max_md":{paddingTop:"$7"}},children:[(0,i.jsx)(d.Text,{css:{"@max_md":{fontSize:"16px"}},children:"".concat(null==y?void 0:y.modalTitle,": ")}),(0,i.jsx)(d.Text,{css:{color:"$ctaRed","@max_md":{fontSize:"16px"}},children:G})]}),size:"sm",overlay:!0,css:{"@md":{borderRadius:20}},children:[(0,i.jsx)(d.Text,{css:{paddingTop:"15px"},children:null==y?void 0:y.informativeText}),(0,i.jsxs)(T,{onSubmit:U,children:[(0,i.jsxs)(_,{children:[(0,i.jsx)($,{children:(null==y?void 0:y.zipCode)||"Zip Code:"}),(0,i.jsx)(r.Input,{placeholder:D||(null==y?void 0:y.placeholderInput),type:"text",css:{borderRadius:"5px",p:"0.5rem 1.25rem"},value:D,onChange:e=>{R(e.target.value),j&&L("")},"data-component-id":"zip-code-field"})]}),j&&(0,i.jsx)(d.Text,{css:{color:"red",marginTop:"0.5rem"},children:j}),(0,i.jsx)(S,{children:(0,i.jsx)(a.Button,{type:"submit",isLoading:k,css:{display:"flex",width:"100%",justifyContent:"center",alignItems:"center"},"data-component-id":"zip-code-update-location-button",children:!k&&(null==y?void 0:y.buttonLabel)})})]})]})})},T=(0,o.styled)("form",{display:"flex",height:"auto",backgroundColor:"$bkgWhite",borderRadius:5,padding:"$5 $0 $6",flexDirection:"column",alignItems:"center","@md":{padding:"$5 0 $9"}}),S=(0,o.styled)("div",{marginTop:"$5",display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center","@md":{marginTop:"$7-5"}}),E=(0,o.styled)("span",{padding:"$8 $4 0",display:"flex","@md":{padding:"$8 $8 0"},"> *":{fontWeight:"$extrabold",textTransform:"uppercase",fontSize:"$xl",paddingRight:"$2"}}),_=(0,o.styled)("div",{width:"100%",position:"relative"}),$=(0,o.styled)("label",{color:"$copyBlack",paddingBottom:"$1",fontSize:"$sm",display:"block"});var R=e.i(364034),j=e.i(962027),L=e.i(275021);function A(e,i,t,o,l){if(e){if(!l)return e;switch(t){case"en-CA":case"fr-CA":return"true"===o?e.slice(0,3):e;default:return e}}return i}let k=(0,o.styled)("li",{mt:"$5",ml:"$2-5","&:first-child":{mt:0},"@lg":{m:"0 0 0 $10"}}),Z=(0,o.styled)(t.Link,{fontWeight:"400",fontSize:"$sm",lineHeight:"$4",color:"$copyBlack",textDecoration:"none","&:hover":{textDecoration:"underline"}}),w=e=>{let{zipCodeLabels:t,isLocationZipCodeEnabled:o}=e,a=l.default.useRef(null),n=(0,j.useQueryClient)(),r=(0,R.useQuery)(s.useGetSiteData.queryKey).data,d=c.localeDashByUnderscore[null==r?void 0:r.locale],g=(0,u.getCookie)("edge-zip-code-in-use"),v=e=>{n.setQueryData(s.useGetSiteData.queryKey,{...r,zipCodeDialogOpen:e,zipCodeDialogTrigger:a})},C=async()=>{var e;let i=await p.NextSelfClient.validateZipCodeByCdn(d);(null==i||null==(e=i.data)?void 0:e.success)&&(0,z.setWebsiteDataZipCode)(i.data.userLocZipCode)},m=async()=>{await p.NextSelfClient.removeZipCodeCookie(d)},y=(0,l.useMemo)(()=>{var e;return null==(e=(0,b.getPublicConfigByLocale)(null==r?void 0:r.locale))?void 0:e.postalCodeFromCdnEnabled},[null==r?void 0:r.locale]),{postalCode:f,matched:h}=(0,L.useRegionId)(d);(0,l.useEffect)(()=>{let e=(0,u.getZipCodeFromCookie)();(async()=>{var e;if(!h||!f)return!1;let i=await p.NextSelfClient.validateZipCode(d,f);return!!(null==i||null==(e=i.data)?void 0:e.success)&&((0,z.setWebsiteDataZipCode)(i.data.userLocZipCode),(0,u.setCookieFromClient)("edge-zip-code-in-use","false"),!0)})().then(i=>{if(!i){if(e&&(0,u.isValidZip)(r.country,e))return void(0,z.setWebsiteDataZipCode)(e);y?C():m()}})},[y,h,f]);let x=(0,l.useMemo)(()=>A(null==r?void 0:r.zipCode,null==t?void 0:t.emptyResult,d,g,y),[g,r,y]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k,{"data-component-id":"zip-code",children:(0,i.jsx)(Z,{ref:a,href:"",onClick:()=>{v(!0)},target:"",children:(0,i.jsxs)(i.Fragment,{children:["".concat(null==t?void 0:t.y
1ourLocationText,": "),(0,i.jsx)("b",{style:{whiteSpace:"nowrap"},children:x})]})})},"zip-code"),(0,i.jsx)(D,{onOpenChange:v,zipCodeLabels:t,zipCode:null==r?void 0:r.zipCode})]})}},496986,e=>{e.n(e.i(400363))}]);
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.