PageSourceSearch

https://www.academicjobs.com/_next/static/chunks/98134.56af3a99edd6ece8.js

js academicjobs.com collected 2026-10-02 10:05:37 UTC 3,355 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85063,98134],{42896:(e,l,a)=>{a.r(l),a.d(l,{default:()=>c});var o=a(95155),t=a(12115),r=a(75182),n=a(85063);function c({value:e=null,onChange:l,placeholder:a="Search for a location...",className:s,inputId:i,types:u,resolve:p,countries:d,isDisabled:m=!1,isClearable:b=!0}){let[g,_]=(0,t.useState)([]),[v,w]=(0,t.useState)(!1),f=(0,t.useRef)(null),y=(0,t.useRef)(null),h=(0,t.useRef)(null),k=(0,t.useRef)(0);(0,t.useEffect)(()=>()=>clearTimeout(h.current),[]);let P=(0,t.useCallback)(async()=>{if(f.current)return f.current;try{let e=await (0,n.p)();e?.places&&!f.current&&(f.current=new e.places.AutocompleteService,y.current=new e.places.AutocompleteSessionToken)}catch(e){console.error("[PlacesAutocomplete]",e)}return f.current},[]),C=(0,t.useCallback)(async e=>{let l=++k.current,a=e?await P():null;if(l===k.current){if(!a||!e){_([]),w(!1);return}w(!0),a.getPlacePredictions({input:e,sessionToken:y.current,...u?{types:u}:{},...d?{componentRestrictions:{country:d}}:{}},e=>{l===k.current&&(w(!1),_((e??[]).map(e=>({value:e.place_id,label:e.description}))))})}},[d,u,P]),E=(0,t.useCallback)(e=>{if(clearTimeout(h.current),!e.trim()){k.current+=1,_([]),w(!1);return}h.current=setTimeout(()=>C(e),250)},[C]),A=(0,t.useCallback)(e=>{let a=e=>{l?.(e),_([]);let a=window.google?.maps?.places;a&&(y.current=new a.AutocompleteSessionToken)};e?"city"===p&&e.value?(0,n.geocodeByPlaceId)(e.value).then(l=>{let o=l?.[0];if(!o)return void a({label:e.label,value:{place_id:e.value,description:e.label}});let t=o.address_components||[],r=e=>{let l=t.find(l=>e.some(e=>l.types.includes(e)));return l?.long_name||""},n=r(["locality"])||r(["postal_town"])||r(["administrative_area_level_2"]),c=r(["administrative_area_level_1"]),s=r(["country"]),i=o.geometry?.location?.lat(),u=o.geometry?.location?.lng();a({label:`${n}, ${c}`,value:{place_id:e.value,description:e.label,city:n,state:c,country:s,latitude:i,longitude:u}})}).catch(l=>{console.error("[PlacesAutocomplete]",l),a({label:e.label,value:{place_id:e.value,description:e.label}})}):a({label:e.label,value:{place_id:e.value,description:e.label}}):a(null)},[l,p]),I=(0,t.useMemo)(()=>e?.label?{value:e.label,label:e.label}:null,[e]);return(0,o.jsx)(r.A,{className:s,inputId:i,options:g,value:I,onChange:A,onInputChange:E,disableLocalFilter:!0,isLoading:v,isClearable:b,isDisabled:m,placeholder:a})}},85063:(e,l,a)=>{a.d(l,{geocodeByPlaceId:()=>c,p:()=>n});let o="__academicJobsMapsReady",t="google-maps-places-js",r=null;function n(e="AIzaSyDGJjCEwv_3_kTpyovGgMizGnyD881NRzQ"){return window.google?.maps?.places?Promise.resolve(window.google.maps):r||(e?r=new Promise((l,a)=>{if(window[o]=()=>l(window.google?.maps??null),document.getElementById(t))return;let n=document.createElement("script");n.id=t,n.async=!0,n.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places&loading=async&callback=${o}`,n.onerror=()=>{r=null,a(Error("Failed to load the Google Maps JS API"))},document.head.appendChild(n)}):Promise.reject(Error("NEXT_PUBLIC_GOOGLE_MAPS_API_KEY is not set")))}async function c(e){let l=await n();if(!l)throw Error("Google Maps is unavailable");let a=new l.Geocoder;return new Promise((l,o)=>{a.geocode({placeId:e},(a,t)=>{"OK"===t&&a?l(a):o(Error(`Geocoding failed for "${e}": ${t}`))})})}}}]);

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.