{{/or}} {{#if StudentTeacherRatio}} The student-teacher ratio is " + Math.Round(School.StudentTeacherRatio.Value, 0) + " to 1. (v=v||new e)||!v.update)return!1;var t=m.get("map");if(!t)return!1;t.register("change",function(e){null!==e&&void 0!==e&&e.bounds&&v.update({set:{bounds:null===e||void 0===e?void 0:e.bounds}})}),v.update({set:{searchDefinition:{sListingStatus:1},layer:{propertyAddresses:{min:18,max:100},listings:{min:12,max:25},schools:{min:14,max:100}},school:{item:r}},search:!1,register:{new:function(e){if(!e)return!1;var t=m.get("map").controller;if(!t)return!1;if(e.listings&&t.show("HSPropertyAddressListingItem",{data:e.listings}),e.propertyAddresses&&t.show("HSPropertyAddressItem",{data:e.propertyAddresses,showMini:!0}),e.schools){if(null!==r&&void 0!==r&&r.id){var o=e.schools.map(function(e){return e.id}).indexOf(r.id);o>-1&&e.schools.splice(o)}t.show("HSSchool",{data:e.schools})}}}})}),o.divMap.show()):o.divMap.hide(),g.updateController("related",{$dom:o.divRelated,data:{schoolID:r.id,level:0,count:6,name:r.name}}),b&&(b=!1,h.call("bubble",{type:"url.handled",data:r})),h.call("bubble",{type:"url.update"})}var d=e("ControllerObjects"),c=e("Objects"),u=e("Utilities"),p=new d.Unique(t),h=new d.Callbacks,m=new d.ChildControllerManager,g=new d.StateManager(m,{schoolID:!0});m.add("searchBreadCrumbs",new d.ChildController({type:"controllers/SearchBreadcrumbs",namespace:p.get(),register:{bubble:a}})),m.add("schoolDetailsKeyMetrics",new d.ChildController({type:"controllers/SchoolDetailsKeyMetrics",namespace:p.get(),register:{bubble:a}})),m.add("listingsActive",new d.ChildController({type:"controllers/SchoolListings",namespace:p.get(),register:{bubble:a}})),m.add("listingsSold",new d.ChildController({type:"controllers/SchoolListings",namespace:p.get(),register:{bubble:a}})),m.add("map",new d.ChildController({type:"controllers/Map",namespace:p.get(),register:{bubble:a}})),m.add("related",new d.ChildController({type:"controllers/SchoolRelatedSchools",namespace:p.get(),register:{bubble:a}}));var v,y={url:"controllers/SchoolDetails.html",dom:["aSchoolDistrict","divBreadCrumbs","divStaticMap","h3Overall","divSchoolDetailsKeyMetrics","divListingsActive","divListingsSold","divMap","divRelated","spanGradeRange"]},f={detailsByID:new d.Getter({namespace:p.get(),type:c.HSSchool,webService:"/service/Schools/GetDetails",success:function(e){try{s(e)}catch(e){throw void 0!==g&&null!==g&&console.info(g),e}},failure:function(){try{throw new Error("SchoolDetails controller: Unhandled Error")}catch(e){throw void 0!==g&&null!==g&&console.info(g),e}},template:y}),detailsByUrl:new d.Getter({namespace:p.get(),type:c.HSSchool,webService:"/service/Schools/GetByUrl",failure:function(){try{throw new Error("SchoolDetails controller: Unhandled Error")}catch(e){throw void 0!==g&&null!==g&&console.info(g),e}},template:y}),template:new d.Getter({namespace:p.get(),template:y})},b=!1,S=u.coStarBrand.getCurrent();return{update:l,restore:function(e){g.restore(e,i)},uninit:function(){m.uninit()},getState:g.getState.bind(g),register:h.register.bind(h),event:function(e,t){m.event(e,t)}}}}); (a.fill="#00B100",a.stroke="#00B100"):(a.fill="#71bf44",a.stroke="#538c32"))),a},getSingleEntityTypeAndID:function(e){if(e){var t,r;return e.listing?(t=7,r=e.listing.id):e.propertyID? District Details. Rancho Bernardo High! Updates have been made to the graphs below. "For Rent":"For Sale",i="#00b100";else if(e.listing.sListingStatus.contract)o=s? Tickets are available for sale in the student store. (Ge.listingGroups.data=We.listingGroups.data,We.listingGroups.data=$(a.data),oe=Ge.listingGroups,ae=We.listingGroups):(Ge.paItems.data=We.paItems.data,We.paItems.data=$(a.data.filter(function(e){return!We.listingGroups.data.hasItem(e.id)})),oe=Ge.paItems,ae=We.paItems),(te=fe.js.dedupeHashTables(oe.data,ae.data,function(e,t){return!ne&&(e.length===t.length&&(!e[0].listing||!t[0].listing||e[0].listing.id===t[0].listing.id))}))&&te.remove&&te.remove.length>0)for(var re=0;re0&&e(["modules/MapCustomMarker"],function(n){if(void 0===n||null===n)return!1;for(var s=0;s1){var s="controllers/PickerPropertyAddressLite";Homesnap.jsAppHashes&&!Homesnap.jsAppHashes["".concat(s.replace("controllers/","").js)]&&(s="".concat(Homesnap.jsMainRootPath,"/").concat(s,".js")),e([s],function(e){var a=new e((new Date).getTime().toString());a.update({data:{items:t,title:n,showUnit:!1,showFavoriteIcon:!0,placardVersion:2}}),a.register("bubble",o)})}else{o({type:"url.unhandled",url:t[0].url,data:t[0]})}}}})}var d=i.latitude,c=i.longitude,p=new google.maps.LatLng(d,c);return W=new n.MarkerWithOverLay(p,l,s,a.showMini,"HSPropertyAddressListingItem"!==t||null,a.notClickable?null:r)}(l,r,ce);ae.markers.setItem(i,d)}}}De&&ce.getZoom()>=17&&a.allHomesMode&&(We.heatMaps&&We.heatMaps.sectionKey&&We.heatMaps.sectionValues?se(We.heatMaps):a.heatMaps&&a.heatMaps.data&&se(a.heatMaps.data)),Ce.callOnce("clickWhenMapReady_")})}else if(a&&a.data&&a.data.latitude&&a.data.longitude){var ye=a.data;if(We.singlePropertyAddressItem=a.data,We.polygon&&We.polygon.type===t&&We.polygon.data.id===ye.id)break;b(),w(),g();var he=function(){if(a.marker){var t=ye&&ye.propertyStatus?ye.propertyStatus.color:"",o=ye&&ye.propertyStatus&&ye.propertyStatus.secondaryColor?ye.propertyStatus.secondaryColor:"",n="#fff",s="#006DC7",i="#0b4256";switch(t){case"green":s="#00B100",i="#00775B";break;case"orange":s="#f27f21",i="#A84800";break;case"red":s="#ee3223",i="#9a1b1e";break;case"yellow":s="#edb42b",i="#b07d2a";break;case"purple":o&&"goldenrod"===o.toLowerCase()&&(n="#F9C949"),s="#00B100",i="#ffffff"}e(["modules/MapCustomMarker"],function(e){var t=e.GenericMapMarker.generateSVGCode(null,s,i,n),o=new google.maps.Marker({position:new google.maps.LatLng(ye.latitude,ye.longitude),map:ce,title:ye.address.fullStreetAddress,icon:{anchor:new google.maps.Point(12,34),url:"data:image/svg+xml;utf-8, ".concat(encodeURIComponent(t.outerHTML)),scaledSize:new google.maps.Size(22,38.5),size:new google.maps.Size(22,38.5)},optimized:!1,zIndex:1});We.polygon.marker=o,a.marker.open&&(ue=ue||new google.maps.InfoWindow,o.addListener("click",function(){ue.setContent(ye.address.fullStreetAddress),ue.open(ce,o)}))})}We.polygon.polygon||(ce.setCenter({lat:ye.latitude,lng:ye.longitude}),ce.setZoom(Pe.get("zoom",18)))},be=function(e){var t=We.polygon.polygon,o=We.polygon.marker;return t||!o||Array.isArray(o)||o.getMap()?o||!t||t.getMap()?void(t&&o&&!Array.isArray(o)&&(o.getMap()||o.setMap(ce),e>=16?t.getMap()||t.setMap(ce):t.getMap()&&t.setMap(null))):void t.setMap(ce):void o.setMap(ce)};a.lotPolygon?e(["modules/DMPManager"],function(e){e.getPolygon(ye.latitude,ye.longitude,function(e){e&&(a.lotPolygon.paths=e,We.polygon.polygon=x(a.lotPolygon),We.polygon.bounds=A(We.polygon.polygon)),We.polygon.polygon||(ce.setCenter({lat:ye.latitude,lng:ye.longitude}),ce.setZoom(Pe.get("zoom",18))),We.polygon.type=t,We.polygon.data=ye,he(),be(ce.getZoom()),We.polygon.listeners.zoom=google.maps.event.addListener(ce,"zoom_changed",function(){be(ce.getZoom())})})}):(he(),be(ce.getZoom())),We.localContext&&pe&&(pe.directionsOptions={origin:{lat:a.data.latitude,lng:a.data.longitude}}),v()}break;case"HSPropertyAddressCluster":if(a&&a.data&&a.data.clusters&&Array.isArray(a.data.clusters)){var Se=a.data.clusters,Te=a.data.searchDefinition,xe=ce.getZoom();w(),M(),(xe<17||xe<=17&&a.data.allHomesMode)&&e(["markerwithlabel"],function(e){for(var t=0;t999? (e.indexOf("homesnap.s(")>=0))return null;try{var t=e.indexOf("{"),r=e.lastIndexOf("}"),a=e.substring(t,r+1),n=JSON.parse(a),o=n.Response.Results.Data.Row.GEOMETRY,c=/[\d\-\.,\s]{5,}/g;matches=o.match(c);for(var s=[],i=0;ithis.maxZoom||a0;n--){var o="0",c=1<1||t.pa[0].propertyCount&&t.pa[0].propertyCount.raw>1){b.setAttribute("viewBox","0 0 20 35"),s.generateSVGCode(b,o,a,h),b.querySelector(".svgCenterCircle")&&b.querySelector(".svgCenterCircle").remove();var A=document.createElementNS(e,"path");A.setAttribute("fill-rule","evenodd"),A.setAttribute("clip-rule","evenodd"),A.setAttribute("d","M7.32422 15.7878H9.29268V13.9299H7.32422V15.7878ZM7.32422 13.2656H9.29268V11.4086H7.32422V13.2656ZM7.32422 10.744H9.29268V8.88696H7.32422V10.744ZM10.7051 15.8026H12.6744V13.9447H10.7051V15.8026ZM10.7051 13.281H12.6744V11.424H10.7051V13.281ZM10.7051 10.7596H12.6744V8.90259H10.7051V10.7596ZM6 16.6887H14V8.00146H6V16.6887Z"),A.setAttribute("fill",h),b.appendChild(A)}else if(b.setAttribute("viewBox","0 0 20 35"),s.generateSVGCode(b,o,a,h),t.pa&&t.pa[0]&&t.pa[0].status&&t.pa[0].status.isFavorited){var L=b.querySelector(".svgCenterCircle");L&&b.querySelector(".svgCenterCircle").remove();var x=document.createElementNS(e,"path");x.setAttribute("fill-rule","evenodd"),x.setAttribute("clip-rule","evenodd"),x.setAttribute("d","M10 6.00293L11.1226 9.45784H14.7553L11.8164 11.5931L12.9389 15.048L10 12.9128L7.06107 15.048L8.18364 11.5931L5.24472 9.45784H8.87743L10 6.00293Z"),x.setAttribute("fill",h),b.appendChild(x)}else if(t.pa&&t.pa[0]&&t.pa[0].listing&&t.pa[0].listing.openHouse&&t.pa[0].listing.openHouse.method.virtual){if("#F9C949"===h){var S=b.querySelector(".svgCenterCircle");S&&S.remove()}var w=document.createElementNS(e,"circle");w.setAttribute("cx","10.0599"),w.setAttribute("cy","11.4999"),w.setAttribute("r","1.5"),w.setAttribute("fill",h);var M=document.createElementNS(e,"path");M.setAttribute("fill-rule","evenodd"),M.setAttribute("clip-rule","evenodd"),M.setAttribute("d","M13.9 11.5253C13.9 10.4549 13.5181 9.44718 12.8464 8.69914C12.625 8.45258 12.2457 8.43218 11.9991 8.65357C11.7525 8.87496 11.7321 9.25431 11.9535 9.50087C12.4264 10.0275 12.7 10.7494 12.7 11.5253C12.7 12.2805 12.4409 12.9849 11.9899 13.5084C11.7736 13.7594 11.8018 14.1383 12.0528 14.3546C12.3038 14.5709 12.6827 14.5427 12.899 14.2916C13.5385 13.5493 13.9 12.5667 13.9 11.5253ZM8.04864 9.49838C8.26865 9.25059 8.24614 8.87136 7.99835 8.65134C7.75056 8.43133 7.37133 8.45384 7.15131 8.70163C6.48085 9.45674 6.09998 10.4726 6.09998 11.5512C6.09998 12.5721 6.44095 13.5375 7.04831 14.2799C7.25812 14.5364 7.63614 14.5742 7.89262 14.3644C8.1491 14.1546 8.18693 13.7766 7.97711 13.5201C7.54603 12.9932 7.29998 12.2965 7.29998 11.5512C7.29998 10.7644 7.5744 10.0325 8.04864 9.49838Z"),M.setAttribute("fill",h);var k=document.createElementNS(e,"path");k.setAttribute("fill-rule","evenodd"),k.setAttribute("clip-rule","evenodd"),k.setAttribute("d","M16 11.5411C16 9.89071 15.3974 8.34023 14.3414 7.19354C14.1169 6.94979 13.7373 6.93417 13.4936 7.15865C13.2498 7.38313 13.2342 7.76271 13.4587 8.00646C14.3103 8.93115 14.8 10.1913 14.8 11.5411C14.8 12.8548 14.3363 14.0841 13.5245 15.0027C13.3051 15.251 13.3285 15.6302 13.5768 15.8496C13.8251 16.069 14.2043 16.0456 14.4237 15.7973C15.4296 14.659 16 13.147 16 11.5411ZM6.54361 8.00399C6.76673 7.75899 6.74899 7.37951 6.50399 7.15639C6.25899 6.93327 5.8795 6.95101 5.65639 7.19602C4.60153 8.35434 4 9.91858 4 11.5832C4 13.1589 4.53869 14.646 5.49491 15.7857C5.7079 16.0395 6.08636 16.0726 6.34021 15.8596C6.59406 15.6467 6.62718 15.2682 6.41419 15.0143C5.63971 14.0913 5.2 12.8774 5.2 11.5832C5.2 10.2165 5.69064 8.94063 6.54361 8.00399Z"),k.setAttribute("fill",h),b.appendChild(w),b.appendChild(M),b.appendChild(k)}if(null!==t&&void 0!==t&&null!==(v=t.pa[0])&&void 0!==v&&null!==(g=v.listing)&&void 0!==g&&null!==(m=g.openHouse)&&void 0!==m&&null!==(y=m.method)&&void 0!==y&&y.virtual){var E=t.pa[0].listing.openHouse,P=E.startDateUtc.raw||E.startDate.raw,H=E.endDateUtc.raw||E.endDate.raw,N=new Date,D=N.getTime();E.startDateUtc.raw&&E.endDateUtc.raw&&(D+=6e4*N.getTimezoneOffset());var V=new Date(P).getTime(),T=new Date(H).getTime();if(D>=V&&D<=T){var B=document.createElementNS(e,"path"),F=b.getElementsByTagName("path")[0];B.setAttribute("d",F.getAttribute("d")),B.setAttribute("fill","#01b100"),B.setAttribute("fill-opacity","0.36"),B.setAttribute("stroke","#01b100"),B.setAttribute("stroke-opacity","0.36"),B.setAttribute("stroke-width","10");var Z=document.createElementNS(e,"animate");Z.setAttribute("attributeType","xml"),Z.setAttribute("attributeName","stroke-opacity"),Z.setAttribute("begin","0s"),Z.setAttribute("values","0;.5;0"),Z.setAttribute("dur","3s"),Z.setAttribute("repeatCount","indefinite"),B.appendChild(Z),b.insertBefore(B,F),b.style.overflowX="visible",b.style.overflowY="visible"}}i.appendChild(b)}var O,_,I=t.pa[0];if(t.pa.length>1){O=t.pa.filter(function(t){return t.listing&&(t.listing.isOpenHouse||t.listing.isAgentOpen)}).length===t.pa.length? (this instanceof g))return new g(e,t,n);var r,o,i,u,a,s=typeof e;if("base64"===t&&"string"==s)for(e=(r=e).trim?r.trim():r.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==s)o=x(e);else if("string"==s)o=g.byteLength(e,t);else{if("object"!=s)throw new Error("First argument needs to be a number, array or string. :\=([^&]+))?/g;t=a.exec(e);)r=r||{},"string"==typeof t[2]?r[decodeURIComponent(t[1].toLowerCase())]=decodeURIComponent(t[2]):"="!==e.charAt(e.indexOf(t[1])+t[1].length)&&(r[decodeURIComponent(t[1].toLowerCase())]=!0);return r},parseUrl:function(e){if(!e||"string"!=typeof e)return null;var t=/^(http:|https:)?(?:\/\/)?(([^\/\:]+)?(?:(?:\:)([\d]+))?)?(\/[^\s\?]*)(\?[^\#\s]+)? Out of 10. We will let you know as soon as we update the rankings. (We.ui.saveSearch.$dom&&We.ui.saveSearch.$dom.addClass("hidden"),We.ui.polygon.status&&We.ui.polygon.$dom&&We.ui.polygon.$dom.find(".polygon-btn").css("border-radius","20px")):(We.ui.saveSearch.$dom&&We.ui.saveSearch.$dom.removeClass("hidden"),We.ui.polygon.status&&We.ui.polygon.$dom&&We.ui.polygon.$dom.find(".polygon-btn").css("border-radius","")),ce&&ce.controls&&setTimeout(function(){ce.controls[2].push(""),ce.controls[2].pop()},5);break;case"heatMapSelectionChanged":var a=We.heatMaps.sectionKey!==t.sectionKey;if(Ie?se(t):t.sectionKey&&t.sectionValues&&(We.heatMaps.sectionKey=t.sectionKey,We.heatMaps.colors=t.colors,We.heatMaps.sectionValues=t.sectionValues),1==We.isSavedSearch?We.isSavedSearch=!1:We.ui.saveSearch.$dom&&We.ui.saveSearch.$dom.find(".polygon-btn").html("Save Search"),null!==(o=We.bubble.marker)&&void 0!==o&&o.listingMarker&&a){var n=We.bubble.marker.pa[0].id;We.paItems.markers.getItem(n).listingMarker.click()}Te.event("HeatMapSelection.Changed",t);break;case"heatMapsSelectionClear":ie(!0,null);break;case"heatMapsBtn.toggle":4===t? Homesnap.templates["controllers/DownloadMobileAppForm.html"] = '{{#with data}}