PageSourceSearch

https://www.trulia.com/assets/static/prod/17769559/_next/static/chunks/1465-33aeef6dee540fed.js

js trulia.com collected 2026-10-01 07:48:47 UTC 12,721 bytes, 24 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1465],{271:(e,t,s)=>{s.d(t,{UJ:()=>r,VS:()=>i});let i=e=>{let t;try{t=window[e];let s="__storage_test__";return t.setItem(s,s),t.removeItem(s),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}},r={enhanced:"RICH",standard:"BASIC"}},41465:(e,t,s)=>{let i,r;s.d(t,{KE:()=>L,kQ:()=>o.k,gQ:()=>o.g,g$:()=>n.A,T5:()=>H,Ny:()=>B,pi:()=>F,lE:()=>x,Cj:()=>O,nz:()=>m,VS:()=>a.VS});var o=s(70996),a=s(271),n=s(45e3),l=s(37876),h=s(2014);(0,h.AH)({height:"24px",fontSize:"20px",fontWeight:"500",fontStyle:"normal",fontStretch:"normal",lineHeight:"1.2",letterSpacing:"normal",textAlign:"left",color:"grey",marginBottom:"15px",marginTop:"23px"});var d=s(30533),c=s(14232);let p=[],g=e=>{e.state.options&&history.back()},u=e=>{"Escape"===e.key&&(window.removeEventListener("keydown",u,!1),history.back())},m=e=>{let t=(0,d.Ju$)(e);class s extends c.Component{static{this.show=e=>{let s;"scrollRestoration"in history&&(history.scrollRestoration="manual"),p=[],history.state.baseState||history.pushState({baseState:!0,as:history.state.as,url:history.state.url},"base state",""),t.show(),p.push("modal"),history.replaceState({newState:!0,as:history.state.as,url:history.state.url},"open modal",""),window.addEventListener("keydown",u,!1),s=()=>{p.length>0&&(p.pop(),t.hide(),e&&e(),history.pushState({baseState:!0,as:history.state.as,url:history.state.url},"base state",""),window.addEventListener("popstate",g,!1),window.removeEventListener("popstate",s,!1))},window.removeEventListener("popstate",g,!1),window.addEventListener("popstate",s,!1)}}static{this.hide=()=>{p.length>0?history.back():(t.hide(),window.removeEventListener("keydown",u,!1))}}render(){let e=Object.assign({...this.props},{onClose:this.customOnClose});return(0,l.jsxs)(t,{...e,children:[" ",this.props.children," "]})}constructor(...e){super(...e),this.customOnClose=()=>{let{onClose:e}=this.props;null===history.state||history.state.newState?history.back():e()}}}return s};var y=s(95531),v=s(76721);let x=(e,t)=>{if(!t)return e;class s extends c.Component{render(){return(0,l.jsx)(e,{...this.props})}}return(0,y.Cg)([(0,v.u4)({pageDetails:`${t}`})],s)};var w=s(78944);class f{constructor(e,t,s,i){this.root=null,this.centroid=t,this.neighborhoodName=e,this.overlayView=null,this.google=s,this.map=i}renderOverlayView(){this.google&&this.google.maps&&(this.overlayView=new this.google.maps.OverlayView,this.overlayView.onAdd=this.onAdd.bind(this),this.overlayView.onRemove=this.onRemove.bind(this),this.overlayView.draw=this.draw.bind(this),this.overlayView.setMap(this.map))}onAdd(){this.centroidMarker=document.createElement("div"),this.centroidMarker.classList.add("mapPane"),this.overlayView.getPanes()&&this.overlayView.getPanes().floatPane.appendChild(this.centroidMarker),this.root=(0,w.createRoot)(this.centroidMarker)}onRemove(){let e=this.root;e&&(setTimeout(()=>e.unmount(),0),this.root=null),this.centroidMarker.parentNode.removeChild(this.centroidMarker),this.centroidMarker=null}draw(){let e;if(this.centroidMarker){if(this.centroid){let t=this.overlayView.getProjection();if(t){let s=new this.google.maps.LatLng(this.centroid.latitude,this.centroid.longitude),i=t.fromLatLngToDivPixel(s);e={left:i.x,top:i.y}}}this.root?.render((0,l.jsx)("div",{ref:e=>{this.container=e},children:(0,l.jsx)(d.LPc,{coordinates:e,children:this.neighborhoodName})}))}}}class b{constructor(e,t){this.setMap=e=>{this.map=e},this.loadLayer=()=>{this.centroidLayer=new f(this.neighborhoodName,this.centroid,google,this.map),this.centroidLayer.renderOverlayView(),this.isLayerLoaded=!0},this.removeLayer=()=>{this.isLayerLoaded&&(this.centroidLayer.onRemove(),this.centroidLayer=null,this.isLayerLoaded=!1)},this.centroidLayer=null,this.isLayerLoaded=!1,this.centroid=e,this.neighborhoodName=t,this.map=null}}let L=b;var k=s(39149),S=s.n(k),C=s(53413),j=s(47519),E=s(67744),M=s(28636);let T=h.AH.raw({width:"100%",backgroundColor:"grey.silver",borderRadius:"0",height:"100%"}),A=(0,h.AH)({height:"100%"});class R extends c.Component{render(){let e,{layers:t,legendColors:s,legendLow:i,legendHigh:r,legendBottom:o,legendLeft:a,style:n,testId:c,css:p}=this.props;return this.layers=t,s&&i&&r&&(e=(0,l.jsx)(d.Ynq,{colors:s,lowLabel:i,highLabel:r,coordinates:{top:o||"80px",left:a||"5vw",bottom:"0",right:"0"}})),setTimeout(S()(this.resize,499),500),(0,l.jsxs)("div",{className:A,"data-testid":c?`${c}-container`:"generic-map-container",children:[(0,l.jsx)("div",{className:(0,h.AH)(T,p),"data-testid":c||"generic-map",children:(0,l.jsx)("div",{ref:this.mapRef,style:{height:"100%",...n}})}),e]})}componentDidMount(){s.e(5729).then(s.bind(s,12420)).then(({Loader:e})=>new e({apiKey:C.$.public.googleMaps.apiKey,version:C.$.public.googleMaps.version,libraries:C.$.public.googleMaps.libraries,language:j.Ay.language}).load()).then(e=>{this.loadMap(e)}).catch(e=>{E.v.error("failed to load google maps",null,e)})}
1componentDidUpdate(){this.layers.forEach(e=>{e.updateLayer&&e.updateLayer()})}setPolyline(e){let{polygon:t}=this.props;t&&t.forEach(t=>{let s=new e.maps.Polyline({strokeColor:`${(0,d.VxO)("secondary")}`,strokeOpacity:1,strokeWeight:3}),i=e.maps.geometry.encoding.decodePath(t);s.setPath(i),s.setMap(r)})}constructor(...e){super(...e),this.mapRef=c.createRef(),this.resize=()=>{i&&r&&i.maps.event.trigger(r,"resize"),this.setMapToInitialCenter()},this.setMapToInitialCenter=()=>{let{centroid:e}=this.props;r&&r.setCenter({lat:e.latitude,lng:e.longitude})},this.loadMap=e=>{let{centroid:t,minBoundingBox:s,options:o}=this.props;i=e;let a=this.mapRef.current,n=Object.assign({center:{lat:t.latitude,lng:t.longitude},streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,draggable:!0,clickableIcons:!1,scrollwheel:!1,gestureHandling:"greedy",cameraControl:!1,zoomControl:!0,zoomControlOptions:{position:M.hg.RIGHT_BOTTOM},styles:[{featureType:"administrative.neighborhood",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels",stylers:[{visibility:"off"}]}]},o);r=new e.maps.Map(this.mapRef.current,n),this.setPolyline(e);let l=new e.maps.LatLngBounds(new e.maps.LatLng(s.min.latitude,s.min.longitude),new e.maps.LatLng(s.max.latitude,s.max.longitude));r.fitBounds(l),this.layers&&this.layers.forEach(e=>{e.setMapDom&&e.setMapDom(a),e.setMap(r),e.loadLayer()}),e.maps.event.addListener(r,"resize",this.setMapToInitialCenter)}}}let H=R,O=(e,t,s,i=238,r=286,o=30,a=45)=>{if(!e||!s||!t)return{};let n=e.fromLatLngToDivPixel(new google.maps.LatLng(t.latitude,t.longitude)),l=e.fromLatLngToDivPixel(new google.maps.LatLng(s.north,s.east)),h=e.fromLatLngToDivPixel(new google.maps.LatLng(s.south,s.west)),d={width:Math.abs(l.x-h.x),height:Math.abs(l.y-h.y)},c={x:n.x-h.x,y:n.y-l.y},p=[(r+o)/(d.height-c.y),(r+1.5*o)/c.y,(i+a)/c.x,(i+a)/(d.width-c.x)],g={top:0,left:0},u=c.x/d.width*i,m=c.y/d.height*r;switch(p.indexOf(Math.min(...p))){case 1:g.top=-(1.5*o+r),g.left=-u;break;case 2:g.left=-(a+i),g.top=-m;break;case 3:g.left=a,g.top=-m;break;default:g.top=o,g.left=-u}return g.top=`${g.top}px`,g.left=`${g.left}px`,g};var V=s(42674);let _=h.AH.raw({boxShadow:"0 8px 16px 0 {colors.grey/18}",backgroundColor:"white",borderRadius:"m",position:"absolute",width:"280px",padding:"xxs",cursor:"pointer"}),P=(0,h.Fj)({base:{height:"60px",width:"80px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-evenly",margin:"xxs",borderRadius:"4px"},variants:{inverse:{true:{backgroundColor:"grey.mercury",color:"grey.ultra"},false:{backgroundColor:"grey",color:"white"}}}}),$=h.AH.raw({marginLeft:"xs"}),z=({name:e,gradesRange:t,providerRating:s,streetAddress:i,studentCount:r,position:o})=>{let a=!!s.rating;return(0,l.jsxs)(d.xA9,{style:{...o},spacing:"ui",css:_,children:[(0,l.jsxs)(d.fhW,{css:P.raw({inverse:!a}),children:[(0,l.jsx)(d.T33,{color:a?"inverse":"default",center:!0,children:a?(0,l.jsxs)(c.Fragment,{children:[(0,l.jsx)(d.EYj,{size:"subHeader",bold:!0,children:`${s.rating}`}),(0,l.jsx)(d.EYj,{size:"caption",useLineHeight:!1,children:"/10"})]}):(0,l.jsx)(d.EYj,{size:"subHeader",useLineHeight:!1,children:(0,l.jsx)("b",{children:"N/A"})})}),(0,l.jsxs)(d.T33,{center:!0,color:a?"inverse":"default",size:"caption",useLineHeight:!1,children:[(0,l.jsx)(d.EYj,{children:"GreatSchools"}),(0,l.jsx)("br",{}),(0,l.jsx)(d.EYj,{children:"Rating"})]})]}),(0,l.jsxs)(d.fhW,{css:$,width:160,children:[(0,l.jsx)(d.T33,{size:"caption",bold:!0,truncate:!0,children:e}),(0,l.jsx)(d.T33,{size:"caption",truncate:!0,lowlight:!0,children:i}),t?(0,l.jsx)(d.T33,{size:"caption",truncate:!0,lowlight:!0,children:`Grades: ${t}`}):null,(0,V.A)(r)?null:(0,l.jsx)(d.T33,{size:"caption",truncate:!0,lowlight:!0,children:`Student Enrollment: ${r}`})]})]})},D=(0,h.Fj)({base:{width:"24px",height:"24px",transform:"translate(-50%, -50%)",cursor:"pointer",_hover:{width:"30px",height:"30px"}},variants:{disableBoxShadow:{true:{},false:{boxShadow:"0 8px 16px 0 {colors.grey/18}"}},enabled:{true:{width:"30px",height:"30px"}}}}),N=e=>{let t=e.enabled?"30":"20";return(0,l.jsx)("svg",{className:D({disableBoxShadow:e.disableBoxShadow,enabled:e.enabled}),...e,children:(0,l.jsx)("image",{xlinkHref:`${e.cdnBase}/images/txl3R/map_markers/schools/SchoolDotIcon.svg`,src:"",width:t,height:t})})};class I extends c.Component{static{this.defaultProps={schoolCategories:{ELEMENTARY:!0,MIDDLE:!0,HIGH:!0},schoolsList:[]}}renderSchoolMarker(e,t){if(!e||!e.categories||!e.categories.length||!e.categories.reduce((e,s)=>!!e||-1!==t.indexOf(s),!1))return null;let s=()=>{this.state.clickedSchool||this.setState({hoveredSchool:e})},i=()=>{let{map:t}=this.props,{clickedSchool:s}=this.state;s?this.removeClickedSchool():(this.setState({clickedSchool:e}),this.mapEventListeners.push(t.addListener("click",this.removeClickedSchool)),this.mapEventListeners.push(t.addListener("bounds_changed",this.removeClickedSchool)))},r=this.state.hoveredSchool&&e.id===this.state.hoveredSchool.id||this.state.clickedSchool&&e.id===this.state.clickedSchool.id||this.props.selectedSchoolId===e.id,o=C.$.public&&C.$.public.externalAssetPrefix||"www.trulia.com";return(0,l.jsx)(N,{lat:e.latitude,lng:e.longitude,onMouseEnter:s,onMouseLeave:this.removeHoveredSchool,onClick:i,enabled:r,cdnBase:o,"data-testid":"school-marker"},e.id)}renderHoverCard(e){if(!e)return null;let t=this.props.map.getBounds(),s=O(this.props.mapProjection,{latitude:e.latitude,longitude:e.longitude}
1,{north:t.getNorthEast().lat(),west:t.getSouthWest().lng(),south:t.getSouthWest().lat(),east:t.getNorthEast().lng()},280,80);return(0,l.jsx)(z,{...e,lat:e.latitude,lng:e.longitude,position:s})}render(){let{schoolsList:e,schoolCategories:t,...s}=this.props,{hoveredSchool:i,clickedSchool:r}=this.state;if(!e||!e.length||!t)return null;let o=Object.keys(t).filter(e=>t[e]),a=e.map(e=>this.renderSchoolMarker(e,o)),n=this.renderHoverCard(r||i);return(0,l.jsxs)(M._g,{...s,children:[a,n]})}constructor(...e){super(...e),this.state={hoveredSchool:null,clickedSchool:null},this.mapEventListeners=[],this.removeAllMapEventListeners=()=>{this.mapEventListeners.forEach(e=>{google.maps.event.removeListener(e)}),this.mapEventListeners=[]},this.removeClickedSchool=()=>{this.setState({clickedSchool:null}),this.removeAllMapEventListeners()},this.removeHoveredSchool=()=>{this.setState({hoveredSchool:null})}}}let B=I;var W=s(3219);let Y=(0,W.Ay)`
2  fragment SchoolHoverCardFragment on School {
3    id
4    name
5    gradesRange
6    providerRating {
7      rating
8    }
9    streetAddress
10    studentCount
11    latitude
12    longitude
13  }
14`,F=(0,W.Ay)`
15  fragment SchoolMarkersLayerFragment on School {
16    id
17    latitude
18    longitude
19    categories
20
21    ...SchoolHoverCardFragment
22  }
23  ${Y}
24`},45e3:(e,t,s)=>{s.d(t,{A:()=>d,g:()=>h});var i=s(95531),r=s(37876),o=s(14232),a=s(50634),n=s(19081),l=s(88954);class h extends o.Component{componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){let{children:e}=this.props;return(0,r.jsx)(a.pL,{as:"section",threshold:.5,onChange:this.handleVisibilityChange,children:e})}constructor(...e){super(...e),this.timer=null,this.state={alreadyTracked:!1},this.handleVisibilityChange=e=>{if(this.state.alreadyTracked)return;let{delay:t=1e3,tracking:s,trackingKey:i}=this.props;e?this.timer=setTimeout(()=>{s?.trackAction?.({item:i,itemImpression:"1"}),this.setState({alreadyTracked:!0})},t):this.timer&&(clearTimeout(this.timer),this.timer=null)}}}let d=h=(0,i.Cg)([(0,n.W)({tracking:l.fu})],h)},70996:(e,t,s)=>{s.d(t,{g:()=>i,k:()=>r});let i="forSale",r="forRent"}}]);

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.