PageSourceSearch

https://www.cox.com/etc.clientlibs/cox-cms-react/clientlibs/client…/resources/static/js/1086.85e8d2c4.chunk.js

js cox.com collected 2026-09-24 08:26:32 UTC 5,267 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcox_cms_react=self.webpackChunkcox_cms_react||[]).push([[1086,8705],{78705:function(e,t,r){r.r(t),r.d(t,{default:function(){return I}});var o=r(21239),s=r(96962),a=r(46306),c=r(16923),n=r(45997),l=r(38984),i=r(58284),u=r(55114),d=r(70579),S=r(39446),h=r(79326),m=r(2479),v=o.memo(e=>{const{stores:t=[],centerLocation:r,hoveredStoreId:s,selectedStoreId:a,onMarkerHover:c,onMarkerSelect:n,hasSearched:l=!1}=e,i=(0,o.useMemo)(()=>t&&Array.isArray(t)?t.filter(e=>e.latitude&&e.longitude).map(e=>({...e,id:e.id||e.store_id||e.name,lat:parseFloat(e.latitude),lng:parseFloat(e.longitude),name:e.name||e.store_name||"Cox Store"})):[],[t]);return(0,m.jsx)(h.A,{stores:i,centerLocation:r,hoveredStoreId:s,selectedStoreId:a,onMarkerHover:c,onMarkerSelect:n,hasSearched:l})},(e,t)=>e.stores===t.stores&&e.centerLocation===t.centerLocation&&e.hoveredStoreId===t.hoveredStoreId&&e.selectedStoreId===t.selectedStoreId),p=r(67099);const g=(0,p.A)(v);var f=e=>(0,m.jsx)(g,{...e,compName:"React Store Map Container"}),b=r(40688),x=r(56646);const _=(0,p.A)(e=>{const{setStoreLocatorResults:t,setSearchCenter:r,configurableText:s}=e,a=(0,o.useCallback)(e=>{(0,x.DO)(e,{setStoreLocatorResults:t,setSearchCenter:r})},[t,r]);return(0,m.jsx)(b.Cz,{id:"location-search",searchstyle:b.Ue.WHITE,getPlaceResult:a,placeholder:s})});var L=e=>(0,m.jsx)(_,{...e,compName:"React Store Search Field"}),k=(0,p.A)(e=>{const{defaultMessage:t,bannerType:r,message:h,variations:v,iconPath:p,altIcon:g,noStoresMessage:b,noStoresSubheading:x,text:_,buttonStates:k,chatText:I,linkType:T,enableSearchField:C,enableBanner:j}=e,R=globalThis.location.pathname.includes("store-locator"),[M,y]=(0,o.useState)([]),[N,w]=(0,o.useState)(null),[A,F]=(0,o.useState)(null),[E,z]=(0,o.useState)(null),[B,H]=(0,o.useState)(!1),[P,V]=(0,o.useState)(!1),D=(0,o.useRef)(!1),O=(0,o.useRef)(!1),U=(0,o.useRef)(null),X=(0,o.useRef)(!1),G=(0,o.useCallback)(e=>{U.current&&(clearTimeout(U.current),U.current=null),U.current=setTimeout(()=>{O.current||(D.current=!0,F(e),setTimeout(()=>{D.current=!1},50))},10)},[]),W=(0,o.useCallback)(e=>{z(e),F(null)},[]),$=(0,o.useCallback)(e=>{if(D.current)return;O.current=!0;const t=e?e.id||e.store_id||e.name:null;F(t),setTimeout(()=>{O.current=!1},50)},[]),q=(0,o.useCallback)(e=>{const t=e?e.id||e.store_id||e.name:null;z(t),F(null)},[]),J=(0,o.useCallback)(e=>{y(e),H(!0),V(!0)},[]),K=(0,o.useMemo)(()=>new URLSearchParams(globalThis.location.search),[globalThis.location.search]);(0,o.useEffect)(()=>()=>{U.current&&clearTimeout(U.current)},[]);const{udo:Q}=(0,a.V6)(),[Y,Z]=(0,o.useState)(!1),ee=(0,o.useMemo)(()=>(null===Q||void 0===Q?void 0:Q.zip)||"",[null===Q||void 0===Q?void 0:Q.zip]);(0,o.useEffect)(()=>{if((0,s.sB)())return void Z(!0);const e=setInterval(()=>{(0,s.sB)()&&(Z(!0),clearInterval(e))},500);return()=>clearInterval(e)},[]);const te=(0,o.useMemo)(()=>{const e=K.get("location"),t=K.get("zip"),r=K.get("udo.zip");return e||t||r||ee||null},[K,ee]);(0,o.useEffect)(()=>{Y&&!X.current&&(async()=>{try{if(te){var e;X.current=!0;const t=await(0,n.Xr)(te,{setStoreLocatorResults:y,setSearchCenter:w});((null===t||void 0===t||null===(e=t.storeLocatorResults)||void 0===e?void 0:e.length)>0||!R)&&(H(!0),V(!1))}else try{const e=await(0,u.GN)();if(e){var t;X.current=!0;const r=await(0,n.Xr)(e,{setStoreLocatorResults:y,setSearchCenter:w});(null===r||void 0===r||null===(t=r.storeLocatorResults)||void 0===t?void 0:t.length)>0&&(H(!0),V(!1))}}catch(r){console.error("[StoreLocator] Browser location error:",r),(0,l.vV)("StoreLocator",r,{message:"Browser location error"})}}catch(o){console.error("[StoreLocator] Failed to auto-fetch stores:",o),(0,l.vV)("StoreLocator",o,{message:"Failed to auto-fetch stores"}),X.current=!1}})()},[Y,te]);const re=M,oe=0===re.length,se=(0,m.jsx)(i.default,{bannerType:r,message:h,variations:v,isDismissable:!1,iconPath:p,altIcon:g,text:_,buttonStates:k,chatText:I,linkType:T}
1),ae=(0,m.jsx)(S.A,{listFrom:d.ListType.storeLocatorList,storeText:"Cox Stores found",items:re,hoveredStoreId:A,selectedStoreId:E,onStoreHover:G,onStoreSelect:W,hasSearched:B,noStoresMessage:b,noStoresSubheading:x}),ce=R?B&&(re.length>0||P):B;return(0,m.jsxs)("div",{className:"store-locator",children:[C&&(0,m.jsx)("div",{className:"store-locator__search",children:(0,m.jsx)(L,{...e,setStoreLocatorResults:J,setSearchCenter:w})}),ce?(0,m.jsxs)("div",{className:"store-locator__results container top-spacing bottom-spacing",children:[(0,m.jsx)("div",{className:`store-locator__store-list-container ${oe&&"store-locator__store-list-container--no-results"}`,children:ae}),(0,m.jsx)("div",{className:"store-locator__map-container",children:(0,m.jsx)(f,{stores:re,centerLocation:N,hoveredStoreId:A,selectedStoreId:E,onMarkerHover:$,onMarkerSelect:q,hasSearched:B})})]}):(0,m.jsx)("div",{className:"store-locator__default-container container top-spacing bottom-spacing",children:(0,m.jsx)("div",{className:"store-locator__default-message",children:t&&(0,c.Ay)(t)})}),j&&(0,m.jsx)("div",{className:"store-locator__no-results-banner container top-spacing bottom-spacing",children:se})]})},{compName:"React Store Locator"}),I=e=>o.createElement(s.lo,{autoLoad:!0,apiOptions:{libraries:["places","geometry"]},children:o.createElement(k,e)})}}]);

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.