PageSourceSearch

https://www.bcu.org/_next/static/chunks/942.2d5c24b2f841a5c7.js

js bcu.org collected 2026-09-24 10:53:07 UTC 9,145 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[942],{93942:(e,t,l)=>{l.r(t),l.d(t,{Default:()=>N,FALLBACK_MAP_CENTER:()=>k,SEARCH_BAR_CURRENT_LOCATION_LABEL:()=>S,SEARCH_BAR_DEFAULT_ZIP:()=>j});var n=l(37876),a=l(14232),o=l(64700),r=l(5717),i=l(62945),s=l(67808),c=l(34470),u=l(42030),d=l(10187),f=l(19106),g=l(59858),p=l(71323),h=l(63849),m=l(1559),b=l(39807),x=l(17766),v=l(57973),y=l(29602),w=l(52020);let k={lat:42.0664,lng:-87.8156},S="Current Location",j="60061",C=Math.round(165),N=e=>{var t,l,u,N,M,L,_,E,I;let{getDictionaryValue:R}=(0,h.A)(),{base:z,leftContainer:B,rightContainer:T,searchBarContainer:F,filterButton:O,backToMapButton:K,backToMapIconSegment:V,backToMapLabelSegment:D,backToMapLabel:P}=A(),{isLoaded:G}=(0,i.useLoadScript)({googleMapsApiKey:"AIzaSyBY-lu6IV_X1IAzhdMMoK6nZ1zXGyVZHh4",libraries:["places"]}),H=(0,f.y9)(),[X,Z]=(0,a.useState)(null),[J,U]=(0,a.useState)([]),[q,Q]=(0,a.useState)(!0),[Y,$]=(0,a.useState)([]),[W,ee]=(0,a.useState)([]),[et,el]=(0,a.useState)(!1),[en,ea]=(0,a.useState)(0),eo=(0,a.useRef)(null),er=(0,a.useRef)(!1),ei=(0,a.useRef)(null),es=(0,a.useRef)(q),ec=(0,a.useRef)(0),eu=(0,a.useRef)(!1),[ed,ef]=(0,a.useState)(!1),eg=(0,a.useCallback)(e=>{er.current=!0,Z(e)},[]),ep={lat:null!=(E=null==H||null==(t=H.latitude)?void 0:t.value)?E:k.lat,lng:null!=(I=null==H||null==(l=H.longitude)?void 0:l.value)?I:k.lng},[eh,em]=(0,a.useState)(ep),[eb,ex]=(0,a.useState)(14),[ev,ey]=(0,a.useState)(ep),[ew,ek]=(0,a.useState)({type:"coordinates"}),[eS,ej]=(0,a.useState)(void 0),[eC,eN]=(0,a.useState)(j),[eA,eM]=(0,a.useState)(""),[eL,e_]=(0,a.useState)(!1),eE=(0,a.useCallback)(async(e,t,l)=>{let n=await fetch("/api/ncr/find-locations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,v.w0)(e,t,l))}),a=null;try{a=await n.json()}catch(e){a=null}if(!n.ok){var o;throw Error(null!=(o=null==a?void 0:a.message)?o:"FindLocations failed (".concat(n.status,")"))}return(0,w.F)(a).map(w.D).filter(e=>null!=e)},[]),eI=(0,a.useCallback)(async(e,t,l)=>{let n=++ec.current;ei.current=null,Q(!0),U([]);try{let a=await eE(e,t,l);if(n!==ec.current)return;U(a)}catch(e){if(n!==ec.current)return;console.error("FindLocations failed",e),U([])}finally{n===ec.current&&Q(!1)}},[eE]),eR=(0,a.useMemo)(()=>{var t,l;return(0,y.KQ)(W,null==e||null==(l=e.fields)||null==(t=l.filtersValue)?void 0:t.value)},[W,null==e||null==(N=e.fields)||null==(u=N.filtersValue)?void 0:u.value]),ez=(0,a.useMemo)(()=>Y.length>0?Y:eR.map(e=>e.id),[Y,eR]),eB=(0,a.useMemo)(()=>JSON.stringify({lat:ev.lat,lng:ev.lng,search:ew,filters:ez}),[ev.lat,ev.lng,ew,ez]);(0,a.useEffect)(()=>{eI(ev,ew,ez)},[eB,eI]),(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{let l=await fetch("/api/ncr/search-options"),n=await l.json();if(e)return;if(!l.ok){var t;throw Error(null!=(t=null==n?void 0:n.message)?t:"GetSearchByOptions failed")}ee((0,y.d5)(n))}catch(t){console.error("GetSearchByOptions failed",t),e||ee([])}})(),()=>{e=!0}},[]);let eT=(0,a.useMemo)(()=>(0,y.vq)(J,ez),[J,ez]),eF=(0,a.useMemo)(()=>{if(eL||!eT.length)return[];let e=(0,x.Ki)(eT,eh.lat,eh.lng,eA);return e.length>v.f3?e.slice(0,v.f3):e},[eT,eh.lat,eh.lng,eA,eL]);(0,a.useEffect)(()=>{let e=es.current;if(es.current=q,e&&!q&&ei.current!==eB){if(ei.current=eB,!eF.length)return void ex(14);eu.current||(em(ev),ex(16))}},[q,eB,eF,ev]);let eO=(0,a.useCallback)(e=>{if(e_(!1),Z(null),null!=e.lat&&null!=e.lng&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)){var t;eu.current=!0,ei.current=null;let l={lat:e.lat,lng:e.lng};em(l),ey(null!=(t=e.ncrOrigin)?t:l),ex(14)}else eu.current=!1;ek(e.ncrSearch)},[]),eK=(0,a.useCallback)(()=>{let e=eo.current;e&&ef(e.scrollTop>=C)},[]),eV=(0,a.useCallback)(()=>{var e;null==(e=eo.current)||e.scrollTo({top:0,behavior:"smooth"})},[]);return((0,a.useEffect)(()=>{var e,t,l,n,a;if(!G||!(null==(e=window.google)?void 0:e.maps))return;let o=null!=(n=null==H||null==(t=H.latitude)?void 0:t.value)?n:k.lat,r=null!=(a=null==H||null==(l=H.longitude)?void 0:l.value)?a:k.lng,i=!1,u=e=>{eN(e),ej(e),eM(e)};return(async()=>{let e=j;try{let t=await (0,s.fx)({location:{lat:o,lng:r}}),l=null==t?void 0:t[0],n=l?(0,s.tX)(l,!0):void 0;n&&(e=n)}catch(e){}if(!i){if(eN(e),!navigator.geolocation)return u(e);navigator.geolocation.getCurrentPosition(e=>{if(i)return;
1let t={lat:e.coords.latitude,lng:e.coords.longitude};em(t),ey(t),ek({type:"coordinates"}),ej(S),eM(S)},()=>{i||u(e)},c.v)}})(),()=>{i=!0}},[G,null==H||null==(M=H.latitude)?void 0:M.value,null==H||null==(L=H.longitude)?void 0:L.value]),G)?(0,n.jsxs)("section",{className:z(),"data-component":"authorable/shared/other/atmlocator","data-gatag-name":"atm_locator_component",children:[(0,n.jsxs)("div",{className:B(),children:[(0,n.jsxs)("div",{className:F(),children:[(0,n.jsx)(r.default,{onSelectLocation:eO,initialInputValue:eS,defaultPlaceholder:eC,onSearchKeyphraseCommit:eM,onGeoSearchFailure:e=>{eM(e),e_(!0),Z(null)}}),(0,n.jsxs)("button",{type:"button",onClick:()=>{ea(e=>e+1),el(!0)},tabIndex:0,className:O(),"aria-label":ez.length>0?"Filter, ".concat(ez.length," ").concat(1===ez.length?"filter":"filters"," selected"):"Filter",children:[(0,n.jsxs)("span",{className:"whitespace-nowrap",children:[(0,n.jsx)(b.A,{field:null==e||null==(_=e.fields)?void 0:_.filterButtonLabel}),ez.length>0?" (".concat(ez.length,")"):null]}),(0,n.jsx)(p.A,{icon:"filter",size:"s",className:"shrink-0 translate-y-[4px]","aria-hidden":!0,title:"Decorative Icon for Filter"})]}),(0,n.jsx)(g.default,{filters:eR,initialSelectedFilters:ez,isOpen:et,props:e,onApply:e=>{$(e),Z(null),el(!1)},onClose:()=>el(!1)},en)]}),(0,n.jsxs)("div",{ref:eo,id:"atm-locator-mobile-scroll",onScroll:eK,className:"order-2 flex w-full min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto scroll-smooth scroll-py-3 max-h-[calc(100dvh-11rem)] min-h-[min(520px,72vh)] lg:min-h-0 lg:max-h-none lg:order-2 lg:flex-none lg:overflow-visible",children:[(0,n.jsx)("div",{className:"sticky top-0 z-10 h-[300px] shrink-0 lg:hidden",children:(0,n.jsx)(o.default,{center:eh,zoom:eb,results:eF,onMarkerSelect:eg,...e,selectedIndex:X,origin:ev})}),(0,n.jsx)("div",{className:"relative z-20 -mt-[88px] flex min-w-0 w-full flex-col rounded-t-[12px] bg-color-bg-dark lg:mt-0 lg:rounded-none lg:z-auto",children:(0,n.jsx)(d.A,{rfkId:"rfkid_atm_locations",lat:eh.lat,lng:eh.lng,ncrResults:eF,isLoadingLocations:q,selectedIndex:X,setSelectedIndex:Z,scrollCardIntoViewAfterMarkerRef:er,searchKeyphrase:eA,forceEmptyResults:eL,props:e},"".concat(eh.lat,"-").concat(eh.lng,"-").concat(eA,"-").concat(ez.join(",")))})]}),ed&&(0,n.jsxs)("button",{type:"button",className:K(),onClick:eV,...(0,m.$)("atm-locator-back-to-map"),children:[(0,n.jsx)("span",{className:V(),"aria-hidden":!0,children:(0,n.jsx)(p.A,{icon:"map",size:"s",className:"!h-5 !w-5 shrink-0 text-color-text-text-inverse",title:"Decorative Icon for Map"})}),(0,n.jsx)("span",{className:D(),children:(0,n.jsx)("span",{className:P(),children:R("AtmLocatorBackToMap")||"Back to map"})})]})]}),(0,n.jsx)("div",{className:T(),children:(0,n.jsx)(o.default,{center:eh,zoom:eb,results:eF,onMarkerSelect:eg,...e,selectedIndex:X,origin:ev})})]}):(0,n.jsx)("div",{children:"Loading..."})},A=(0,u.tv)({slots:{base:["w-full","min-h-0","flex","flex-col lg:flex-row"],leftContainer:["lg:w-1/3 2xl:w-1/4 w-full","min-w-0","bg-color-bg-dark","flex","flex-col","relative","min-h-0","flex-1","lg:flex-none"],rightContainer:["hidden lg:block lg:w-2/3 2xl:w-3/4"],searchBarContainer:["flex","min-w-0","items-stretch","p-spacing-spacing-16","gap-spacing-spacing-8","order-1"],filterButton:["shrink-0","inline-flex","flex-nowrap","items-center","justify-center","gap-spacing-spacing-8","p-spacing-spacing-12","rounded-general-border-radius-button","bg-component-button-white-filled-bg-hover hover:bg-component-button-white-filled-bg-hover focus:bg-component-button-tonal-filled-bg-focused","text-typography-button-xlarge-font-size leading-typography-button-xlarge-line-height font-typography-button-xlarge-font-weight tracking-typography-button-xlarge-letter-spacing","text-component-button-white-filled-text-hover focus:text-component-button-tonal-filled-text-focused"],backToMapButton:["absolute bottom-[5rem] left-1/2 z-50 -translate-x-1/2","flex items-stretch gap-0 overflow-hidden","rounded-general-border-radius-button shadow-lg","lg:hidden","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-color-border-border-secondary"],backToMapIconSegment:["flex shrink-0 items-center justify-center","bg-component-button-primary-filled-bg-hover","border-r border-color-border-border-secondary","p-spacing-spacing-12"],backToMapLabelSegment:["flex items-center justify-center","bg-component-button-primary-filled-bg-hover","border-2 border-component-button-primary-filled-border-hover","px-spacing-spacing-12 py-spacing-spacing-8"],backToMapLabel:["font-typography-button-font-family","text-typography-button-large-font-size leading-typography-button-large-line-height","font-typography-button-large-font-we
1ight tracking-typography-button-large-letter-spacing","text-color-text-text-inverse whitespace-nowrap"]}})}}]);

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.