PageSourceSearch

https://norhillrealty.com/app/themes/athena/assets/js/dist/maps-common.min.js

js norhillrealty.com collected 2026-10-04 21:07:58 UTC 301,296 bytes, 16 lines download raw bytes

1"use strict";!function(){var e={EN:{autocomplete:{headers:{filters:"Filters",id:"Web IDs",street:"Street",zip_code:"Postal code",city:"City",agent_id:"Agent IDs",building_name:"Building name",keyword:"Keyword",listings:"Listings",neighborhood:"Neighborhood"},multi_joiner:"All of"},form_mapping:{agent_id:{prettified_name:"Agent ID"},address:{prettified_name:"Address"},bedrooms:{prettified_name:"Beds",values:[{any:"Any"},{studio:"Studio"},{"1+":"1+"},{"2+":"2+"},{"3+":"3+"},{"4+":"4+"},{"5+":"5+"}]},bathrooms:{prettified_name:"Baths",values:[{any:"Any"},{"1+":"1+"},{"1.5+":"1.5+"},{"2+":"2+"},{"2.5+":"2.5+"},{"3+":"3+"},{"3.5+":"3.5+"},{"4+":"4+"}]},property_type:{prettified_name:"Property Type",values:[{"Co-op":"Co-Op"},{Condo:"Condo"},{Condop:"Cond-op"},{"Multi-Family":"Multi-family"},{"Single Family":"Single-family"},{show_all:"Show Both Sales & Rentals"},{only_self_listing:"Show Only Platinum Properties"}],pillbox_joiner:" and "},listing_type:{prettified_name:"Listing Type",values:[{text:"Any",value:"any",modifiers:""},{text:"---",value:"",modifiers:"disabled"},{text:"Residential Sales",value:"residential_sales",modifiers:""},{text:"Commercial Sales",value:"commercial_sales",modifiers:""},{text:"---",value:"",modifiers:"disabled"},{text:"Residential Rentals",value:"residential_rentals",modifiers:""},{text:"Commercial Rentals",value:"commercial_rentals",modifiers:""}],pillbox_joiner:" and "},status:{prettified_name:"Status",values:[{text:"any",value:"any",modifiers:""},{text:"---",value:"",modifiers:"disabled"},{text:"Active",value:"active",modifiers:""},{text:"Sold",value:"sold",modifiers:""}],pillbox_joiner:" and "},area:{prettified_name:"Square Feet",placeholder:"Any"},neighborhood:{prettified_name:"Neighborhood"},zip_code:{prettified_name:"ZIP code"},max_monthly_fees:{prettified_name:"Max. Monthly Fees",placeholder:"Any"},amenities:{prettified_name:"Amenities",values:[{doorman:"Doorman"},{furnished:"Furnished"},{laundry_building:"Laundry in Building"},{laundry_unit:"Laundry in Unit"},{outdoor_space:"Outdoor Space"},{gym:"Gym"},{view:"View"},{elevator:"Elevator"},{air_conditioning:"Air Conditioning"},{pets_ok:"Pets Ok"}]},open_house:{shortened:"OH",prettified_name:"Open House"},price:{prettified_name:"Price"},keywords:{under:"under",over:"over",to:"to",any:"any",before:"before",after:"after",minimum:"minimum",maximum:"maximum"}},pillbox:{more_keyword:" more",map_area:"Map Area",custom_boundary:"Custom Boundary"},cluster:{single_home:"View 1 home for {0}{1}",single_home_rental:"/mo",sale_text:"<div>View <b>{0}</b> more homes</div>Homes here are priced between {1} – {2}, with a median list price of <b>{3}</b>.",rent_text:"<div>View <b>{0}</b> more homes</div>Homes here are priced between {1} – {2}/mo, with a median list price of <b>{3}</b>/mo."},marker:{listing_plural:" listings",hover_data_split:["{0}","{1} BA"],hover_data_single:"{0} | {1} BA",hover_data_multiple:"{0} - {1}"},number_of_hits:{property:"Property",result:{singular:"result",plural:"results"}}}},i;try{i=document.querySelector("html").getAttribute("lang").split("-")[0].toUpperCase()}catch(e){i="EN"}i in e||(i="EN"),APP.translation=e[i]}();
2"use strict";APP.coloredBarHelper=function(e,t){var s=function t(e,s){return!(!e||!s)&&(!(!e.length||!s.length)&&e.toUpperCase()===s.toUpperCase())},a=function t(e,s){return e.map(function(t){return t.toUpperCase()}).includes(s&&s.toUpperCase())},n=e.listing_status&&-1!==["In Escrow Showing","In Escrow Not Showing"].indexOf(e.listing_status),r=(!e.sold_date||!e.sold_price)&&null!==e.days_on_market&&e.days_on_market<=7,i;try{i=moment().diff(moment(e.mls_list_date,"X"),"days")}catch(t){}var l=(!e.sold_date||!e.sold_price)&&e.mls_list_date&&void 0!==i&&i<14,c=e.price_reduced,o=e.active,u=s(e.listing_status,"Active"),b=s(e.listing_status,"Active Under Contract"),d=s(e.listing_status,"Pending"),_=e.open_house&&null!==e.open_house,g=s(e.listing_status,"Rented"),N=s(e.listing_status,"Sold")||s(e.listing_status,"Closed"),m=s(e.listing_status,"Coming Soon"),p=s(e.mls_property_type,"Residential Lease"),I=e.listing_status&&a(["Contingent","Contingent No Kickout","Contingent Short Sale","Contingent w/Kickout"],e.listing_status),C=APP.homeUrl&&APP.homeUrl.includes("cityblock"),E=APP.homeUrl&&APP.homeUrl.includes("kellernewyork");e.bar={className:"",status:"",genericInside:null};try{if(r&&(e.bar.className="state-active",e.bar.status="NEW LISTING",e.bar.genericInside=t?null:"NEW LISTING"),m&&(e.bar.className="state-active",e.bar.status="COMING SOON",e.bar.genericInside=t?null:"COMING SOON"),o||u||b)switch(!0){case c:e.bar.className="state-active";var h=C?"JUST REDUCED":"PRICE REDUCED";e.bar.status=h,e.bar.genericInside=t?null:h;break;case u:if(C)break;e.bar.status="ACTIVE",e.bar.className="state-active";break;
2case b:e.bar.status="ACTIVE UNDER CONTRACT",e.bar.className="state-active";break;default:e.bar.status=e.listing_status,e.bar.className="state-active"}d&&(e.bar.status=E?"In Contract":"Pending",e.bar.genericInside=t?null:"Pending",e.bar.className="state-active"),d&&e.listing_status.toLowerCase()!==e.mls_status.toLowerCase()&&(e.bar.status=e.mls_status,e.bar.genericInside=e.mls_status,e.bar.className="state-active"),_&&(e.bar.className="state-active state-openhouse",e.bar.genericInside=e.open_house.nearest_pretty_date.combined&&e.open_house.nearest_pretty_date.combined.includes("OPEN HOUSE")?e.open_house.nearest_pretty_date.combined:"OH: ".concat(e.open_house.nearest_pretty_date.combined),e.bar.status="ACTIVE"),n&&(e.bar.className="state-escrow",!0===_?(e.bar.className+=" state-openhouse",e.bar.status="IN ESCROW",e.bar.genericInside="OH: "+e.open_house.nearest_pretty_date.combined):(e.bar.status="IN ESCROW",e.bar.genericInside=t?null:"IN ESCROW")),g&&(e.bar.className="state-escrow",t&&(e.bar.status="RENTED"),e.bar.genericInside=t?null:"RENTED"),N&&(e.bar.className="state-sold",p?(t&&(e.bar.
2status="RENTED"),e.bar.genericInside=t?null:"RENTED"):(t&&(e.bar.status="SOLD"),e.bar.genericInside=t?null:"SOLD")),I&&(e.bar.className="state-escrow",t&&(e.bar.status="CONTINGENT"),e.bar.genericInside=t?null:"CONTINGENT")}catch(t){return console.warn({coloredBarHelperErr:t}),e}return"lei"===APP.getTheme()&&e.listing_status&&!e.status&&(e.bar.className||(e.bar.className="state-black"),t&&(e.bar.status=e.listing_status.toUpperCase()),e.bar.genericInside=t?null:e.listing_status.toUpperCase()),"lei"===APP.getTheme()||e.status||"Off Market"!==e.listing_status||(e.bar.status=e.listing_status,e.bar.className="state-active"),e};
3"use strict";function renderOverlays(t){var o;function n(){for(var n=0;n<t.overlays.length;n++){var o=function n(o,e){var e=boundaryPointsToPaths(o,!0,e),e=new google.maps.Polygon($.extend(!1,APP.map_drawing_colors,{paths:e,clickable:!1,draggable:!1,editable:!1,geodesic:!0,map:APP.map,zIndex:1})),t,a;APP.fit_overlays&&(APP.FORCE_SET_BOUNDS||(t=APP.map.getBounds(),isNaN(t.toJSON().south)&&(t=new google.maps.LatLngBounds,APP.boundingBoxes.map(function(n){extendBoundsByPolygonPoints(t,n)})),APP.FORCE_SET_BOUNDS=t),isInteractiveSearch()||extendBoundsByPolygonPoints(APP.FORCE_SET_BOUNDS,e)),APP.boundingBoxListeners.push(google.maps.event.addListener(e.getPath(),"set_at",throttle(polygonBoundsChanged,150))),APP.boundingBoxListeners.push(google.maps.event.addListener(e.getPath(),"insert_at",throttle(polygonBoundsChanged,150))),APP.boundingBoxes.push(e)},e=t.overlays[n];isArray(e[0][0]),o(e)}}0<APP.boundingBoxes.length&&($.each(APP.boundingBoxes,function(n,o){o.setMap(null)}),function(){for(var n=0;n<APP.boundingBoxListeners.length;++n)google.maps.event.removeListener(APP.boundingBoxListeners[n])}(),APP.boundingBoxes=[]),APP.boundingBoxListeners=[],!t.overlays||t.overlays&&0===t.overlays.length&&!APP.first_url_parse?APP.FORCE_SET_BOUNDS=null:(o=isInteractiveSearch(),turnOffInteractive(),APP.fit_overlays&&!APP.no_bounds_fitting?(console.info("will warn overlays"),APP.FORCE_SET_BOUNDS=new google.maps.LatLngBounds,APP.fit_map_to_markers_automatically=!1,extendBoundsByAddressLocations(APP.FORCE_SET_BOUNDS,t).then(function(){console.info("done extendBoundsByAddressLocations in handle polygon overlays"),setTimeout(function(){APP.rendering_map=!1,APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"])},1e3)})):APP.rendering_map=!1,n(),try_catch_or_timeout(function(){APP.onRenderCallbacks.push({fn:function n(){APP.fit_overlays=null,APP.FORCE_SET_BOUNDS=null,APP.no_bounds_fitting=!1,o&&turnOnInteractive()},args:[]}),google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.dont_apply_map_bounds=!1,APP.no_bounds_fitting=!1,o&&turnOnInteractive()})},function(){APP.dont_apply_map_bounds=!1,APP.no_bounds_fitting=!1,o&&turnOnInteractive()},1e3))}function extendBoundsByPolygonPoints(n,o){for(var e=o.getPath(),t=0;t<e.getLength();t++){var a=e.getAt(t);n.extend({lat:a.lat(),lng:a.lng()})}console.warn("done extending by polygon paths")}function boundaryPointsToPaths(o,e,s){var r=[],i,P,n;if(e)try{(function n(o){for(P=0;P<o[0].length;P++){var e=parseFloat(o[0][P][1]),t=parseFloat(o[0][P][0]);if(isNaN(e)||isNaN(t))for(var a=0;a<o[P].length;a++)e=parseFloat(o[P][a][1]),t=parseFloat(o[P][a][0]),i=new google.maps.LatLng(e,t),s&&s.extend(i),r.push(i);else i=new google.maps.LatLng(e,t),s&&s.extend(i),r.push(i)}})(o)}catch(n){return console.warn("boundaryPointsToPaths e",n),boundaryPointsToPaths(o,!e,s)}else try{for(P=0;P<o.length;P++)i=new google.maps.LatLng(parseFloat(o[P][0]),parseFloat(o[P][1])),r.push(i)}catch(n){return boundaryPointsToPaths(o,!e,s)}return r}function polygonBoundsChanged(){}google.maps.Polygon.prototype.getBounds||(google.maps.Polygon.prototype.getBounds=function(){var e=new google.maps.LatLngBounds;return this.getPath().forEach(function(n,o){e.extend(n)}),e});
4"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to de
4structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r=[],a=!0,o=!1,i,s;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw s}}return r}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(t,e){var n=Object.keys(t),r;return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var ENABLE_LOGGING=window.location.href.match(/\.test/g);if(!ENABLE_LOGGING){window.console||(window.console={});for(var methods=["log","debug","info"],i=0;i<methods.length;i++)console[methods[i]]=function(){}}var URL_SPLITTING_EQUALS_SIGN_REGEX=/=/g;function encodeEqualSignInKeyValuePair(e){return e.replace(/[<>]=/g,encodeURIComponent)}var USE_CHECKBOXED_NEIGHBORHOODS=APP.neighborhoods&&APP.neighborhoods.length,getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0,r;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}function shallowCopy(e){return Object.assign({},e)}function deepCopy(e){return $.extend(!0,{},e)}function deepFreeze(t){var e;return Object.getOwnPropertyNames(t).forEach(function(e){var e=t[e];"object"===_typeof(e)&&null!==e&&deepFreeze(e)}),Object.freeze(t)}function median(e){var t=(e=e.sort(function(e,t){return e-t})).length/2;return t%1==0?(e[t-1]+e[t])/2:e[Math.floor(t)]}function consolidatedFilters(e,n,r){var t;if(0!==Object.keys(e).length)return e.filter(function(e){for(var t=0;t<n.length;t++)if(e[r]===n)return!0;return!1})[0]}function formatBedsAndBaths(e,t){function n(){return(e.mls_property_type||e.property_sub_type)&&(e.mls_property_type||(e.mls_property_type=""),e.property_sub_type||(e.property_sub_type=""),-1!==e.mls_property_type.toLowerCase().indexOf("lots")||-1!==e.mls_property_type.toLowerCase().indexOf("acres")||-1!==e.mls_property_type.toLowerCase().indexOf("farms")||-1!==e.property_sub_type.toLowerCase().indexOf("land"))}if(!t&&!e.size)return"";var r,a,o;t?(r=e.bedrooms,a=e.bathrooms,o=e.half_baths):(r=e.size.bedrooms,a=e.size.bathrooms||e.size.full_baths);var i="{0} • {1}".format(APP.translation.marker.hover_data_split[0],APP.translation.marker.hover_data_split[1]),r,a,o,s,l,c,r;return r=r&&-1===[null,-1,0].indexOf(r)?-1!==(""+r).indexOf(".")?(""+r).split(".")[0]+"+"+(t?"":" BD"):r+(t?"":" BD"):n()?"0 BD":"STUDIO",a=a&&-1===[null,-1].indexOf(a)?a:0,t&&(s="STUDIO"===r?"STUDIO":"0 BD"===r?"0 Beds":"1"===r?"1 Bed":r.match(/\d+/g)?r+" Beds":r,l="1"===a?"1 Bath":a+" Baths"),o=o&&-1===[null,-1].indexOf(o)?o:null,-1!==e.listing_type.indexOf("commercial")&&(s=e.mls_property_type,l=e.building&&e.building.total_units?e.building.total_units+(1==e.building.total_units?" UNIT":" UNITS"):""),t?{beds:(""+r).replace("+",""),string_beds:s,full_baths:e.full_baths,partial_baths:e.partial_baths,baths:(""+a
4).replace("+",""),string_baths:l,half_baths:o}:i.format(r,a)}function doubleCheckBedsBaths(e){if(!Object.keys(e.size).length)return e;var t,n,r,n=e.property_badge?e.show_bathrooms?(t=null,e.pretty_beds_baths.string_baths):(t=e.property_badge,null):(t="".concat(e.pretty_beds_baths.string_beds),"".concat(e.pretty_beds_baths.string_baths));return"showBeds"in APP&&!APP.showBeds&&(t=null),"showBaths"in APP&&!APP.showBaths&&(n=null),APP.showSqft&&0<e.size.square_feet&&(r="".concat(numeral(e.size.square_feet).format("0,0")||"N/A"," SQFT")),e.bedroom_bathroom=[t,n,r].filter(function(e){return Boolean(e)}).join(" | "),e.IS_LAND="Land"===e.property_badge,e}function formatPriceSimplified(e,t,n){if(!e||parseFloat(e)<=0)return"0";if(n)return APP.getCurrency()+numeral(e).format("0,0");var n=function e(t,n,r){var a;return t=Number(t),o(t,n,r,a=1e12<=t?"T":1e9<=t?"B":1e6<=t?"M":1e3<=t?"K":"")},o=function e(t,n,r,a){var o=0,i;switch(a){case"T":o=t/1e12;break;case"B":o=t/1e9;break;case"M":o=t/1e6;break;case"K":o=t/1e3;break;case"":o=t}return!1!==n&&new RegExp("\\.\\d{"+(n+1)+",}$").test(""+o)&&(o=o.toFixed(n)),(o=!1!==r?Number(o).toFixed(r):o)+a};return APP.getCurrency()+n(e,2,!1)}function formatPriceLong(e){return"$"+numeral(e).format("0,0")}function formatFormattedStringToFloat(e,t){if(!(e+="")||!e.length||0===e.length)return"";var n=e.replace(/\$?,?\/?/g,"");return"not"===t?n:parseFloat(e.replace(/\$?,?\/?/g,""))}function formatFormattedStringToFloatKeepPlus(e){return formatFormattedStringToFloat(e,"not")}function formatPickerDateToTimestamp(){var e=""+arguments[0],n=arguments[1],t=function e(t){return n.nodeName.includes("min")?t.startOf("day"):t.endOf("day")};if(!e||!e.length||0===e.length)return"";var e=moment(e,MOMENT_PARSER_FORMATS);return e._isValid?t(e).format("X"):""}function formatTimestampToDate(e,t,n){var e=""+(e||e);if(t=arguments[1]||t,n=arguments[2]||n,!e||0===e.length)return"";var e=moment.unix(e);t(e._isValid?e:"",n)}Object.assign=shouldUseNative()?Object.assign:function(e,t){for(var n,r=toObject(e),a,o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))hasOwnProperty.call(n,i)&&(r[i]=n[i]);if(getOwnPropertySymbols){a=getOwnPropertySymbols(n);for(var s=0;s<a.length;s++)propIsEnumerable.call(n,a[s])&&(r[a[s]]=n[a[s]])}}return r},APP.getCurrency=function(){return"$"},String.prototype.format||(String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(e,t){return void 0!==n[t]?n[t]:e})}),String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.prepareForMoneyFormatting=function(){return this.replace?this.replace(/\$?,?/g,""):this},String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),String.prototype.formatLongNumber=function(e,t,n){return n?commaSeparatePrice(""+parseFloat(this),""):parseFloat(this).formatLongNumber(e,t)},Number.prototype.formatLongNumber=function(e,t){var n="\\d(?=(\\d{"+(t||3)+"})+"+(0<e?"\\.":"$")+")";try{return this.toFixed(Math.max(0,~~e)).replace(new RegExp(n,"g"),"$&,")}catch(e){return this}};var commaSeparatePrice=function e(t,n){function r(e,t){var n=",",r=".",a=new RegExp("[^.\\d]","g"),o,i=e.replace(a,"").toString().split(r),s=i[0].length%3,e=i[0].substr(0,s),a=i[0].substr(s).match(/\d{3}/g),l;return a&&(e+=(s?n:"")+a.join(n)),e=void 0!==i[1]?e+r+i[1]:e,void 0===t?e:e?t+e:""}return r(t,n)};function handleMoneyFormatting(e,t,n,r){var a=e,o;a.on("focus propertychange keypress keydown paste change",function(e){setTimeout(function(){var e=a.val();a.val(commaSeparatePrice(e.prepareForMoneyFormatting(),t))},50)}).on("blur",function(e){setTimeout(function(){var e=a.val(),e=parseFloat(e.prepareForMoneyFormatting()).formatLongNumber(n,r);!isNaN(parseFloat(e))&&0<parseFloat(e)?a.val(t+e):a.val(""),$("form[id=search]").submit()},100)})}function handleLongNumberFormatting(e,t,n){var r=e;r.on("focus propertychange keypress keydown paste",function(e){var t=r.val();r.val(t.prepareForMoneyFormatting())}).on("blur",function(){var e=r.val(),e=parseFloat(e.prepareForMoneyFormatting()).formatLongNumber(t,n);!isNaN(parseFloat(e))&&0<parseFloat(e)?r.val(e):r.val("")}
4)}var restrictNumeric=function e(t){var t;return!(!t.metaKey&&!t.ctrlKey)||32!==t.which&&(0===t.which||(t.which<33||(t=String.fromCharCode(t.which),/[\$\d.?\s]/.test(t))))},replaceFullWidthChars=function e(t){for(var n,r,a,o,i,s,l,c,a="0123456789",o=".0123456789",s="",l=0,c=(n=(t=null===t?"":t).split("")).length;l<c;l++)r=n[l],s+=r=-1<(i=a.indexOf(r))?o[i]:r;return s},safeVal=function e(t,n){var r,a,t,r,o;try{a=n.prop("selectionStart")}catch(e){a=null}if(r=n.val(),n.val(t),null!==a&&n.is(":focus"))return a===r.length&&(a=t.length),r!==t&&(o=r.slice(a-1,+a+1||9e9),r=t.slice(a-1,+a+1||9e9),t=t[a],/\d/.test(t)&&o===t+" "&&r===" "+t&&(a+=1)),n.prop("selectionStart",a),n.prop("selectionEnd",a)},reFormatNumeric=function e(t){var n,n=$(t.currentTarget);return setTimeout(function(){var e,e=n.val();return e=(e=replaceFullWidthChars(e)).replace(/[^\$0-9.]/g,""),safeVal(e,n)})},handleOnlyNumericInputs=function e(t){return t.on("keypress",restrictNumeric),t.on("paste",reFormatNumeric),t.on("change",reFormatNumeric),t.on("input",reFormatNumeric),this},initPickadate=function e(t,n){try{t.pickadate(n),APP["picker_"+t[0].id]=t.pickadate("picker")}catch(e){console.error("Date picker does not exist")}};function fillSidebarWithLoadingPlaceholder(){var e=Array.apply(null,new Array(APP.num_of_hits)).map(function(){return{}});APP.$hits.html(APP.hit_placeholder_template.render({hits:e})),APP.$hits.animate({scrollTop:0},500)}function findDeepestChild(e){var n={depth:0,element:e};return e.children().each(function(){var e,t=findDeepestChild($(this));t.depth+1>n.depth&&(n=t.element)}),n}function findObjectValueInArrayByKey(e,t){for(var n=0;n<e.length;n++)if(Object.keys(e[n])[0]===t)return e[n][t]}function toggleAllChildrenCheckboxes(){var n=$(arguments[0]);n.parent().parent().next().find("input[type=checkbox]").map(function(e,t){$(t).prop("checked",n.is(":checked"))}),dontApplyMapBounds()}function allCheckedRegionChildrenAsArray(e,t){var e=e.parent().parent().next().find("input[type=checkbox]").map(function(e,t){return $(t).val().replace("_"," ")});e&&t(e.toArray())}function uncheckRegionParentByName(e,t){var n=$(".select-all-checkbox#parent-"+e);n.parent().parent().next().find("input[type=checkbox]").map(function(e,t){$(t).prop("checked",!n.is(":checked"))}),n.prop("checked",!n.is(":checked")),dontApplyMapBounds(),t.apply(null,[])}function uncheckParentIfChildUnchecked(){var e=$(arguments[0]);e.is(":checked")||e.parent().parent().parent().prev().find("input[type=checkbox]").prop("checked",!1),dontApplyMapBounds()}function uncheckAllRegionParents(){$("[id*=parent-]").prop("checked",!1)}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return 0==t?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function findNodeByRegexingId(e){return $(":regex(id,{0})".format(e))}function onlyUnique(e,t,n){return n.indexOf(e)===t}function dontApplyMapBounds(){APP.form_triggers.location_flush=!0,console.info("dontApplyMapBounds args",arguments);try{arguments.length&&arguments[0]&&(arguments[0].id.contains_str("parent")||arguments[0].id.contains_str("neighborhood"))&&(APP.fit_overlays=!0)}catch(e){console.info(e)}APP.dont_apply_map_bounds=!0,APP.fit_map_to_markers_automatically=!0}String.prototype.containsChar=function(e){return!!this.indexOf&&-1!==this.indexOf(e)},function(e){e.fn.isAfter=function(e){return 0!==this.prevAll().filter(e).length},e.fn.isBefore=function(e){return 0!==this.nextAll().filter(e).length}}(jQuery),$.expr[":"].regex=function(e,t,n){var r=n[3].split(","),a=/^(data|css):/,n={method:r[0].match(a)?r[0].split(":")[0]:"attr",property:r.shift().replace(a,"")},a="ig",o;return new RegExp(r.join("").replace(/^\s+|\s+$/g,""),a).test(jQuery(e)[n.method](n.property))},Object.size=function(e){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t},Array.prototype.matchInArray=function(t){var n=-1,r=this;try{!function(){for(var e=0;e<r.length;e++)if(r[e].match(new RegExp(t,"g"))){n=e;break}}()}catch(e){}return n},Array.prototype.findInArrayOfObjects=function(e){var t=this,n={};try{for(var r=0;r<t.length;r++)if(t[r].hasOwnProperty(e))return{index:r,element:t[r]}}catch(e){}return{index:null,element:n}},Array.prototype.every||(Array.prototype.every=function(e,t){var n,r;if(null===this)throw new TypeError("this is null or not defined");var a=Object(this),o=a.length>>>0,i;if("function"!=typeof e)throw new TypeError;for(1<arguments.length&&(n=t),r=0;r<o;){if(r in a){var s,i=a[r];if(!e.call(n,i,r,a))return!1}r++}return!0}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var arraysIntersect=function e(t,n){return t.filter(function(e){return n.includes(e)})},objValues=function e(t){return Object.keys(t).map(function(e){return t[e]})};function escapeJquerySensitiveChars(e){return"".concat(e).replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&")}function escapeJquerySpaces(e){return"".concat(e).replace(/\s/g,"\\\\ ")}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}function prettifyCheckboxValue(e){return-1!==e.indexOf("_")?e.split("_").map(function(e){return-1!==e.indexOf(":")?capitalizeFirstLetter(e.split(":")[1]):capitalizeFirstLetter(e)}).join(" "):-1!==e.indexOf(":")?e.split(":")[1]:capitalizeFirstLetter(e)}function findObjectInArrayByKeyValuePair(e,t,n){for(var r=0;r<n.length;r++)if(n[r][e]===t)return n[r]}Array.prototype.inArray=function(e){var t=this,n;try{if(isArray(e))return this.map(function(e){return-1===t.indexOf(e)}).every(isFalse);try{if(t.indexOf)return-1!==t.indexOf(e)}catch(e){return!1}}catch(e){return!1}},Array.prototype.areObjectParametersSame=function(t){var e=this;try{var n=e[0][t],r=this.map(function(e){return e[t]===n})}catch(e){return!1}return!r.every(isFalse)},Array.prototype.rangeOfChars=function(e,t,n){var r=[];try{if("number"==typeof e)if(r[0]=e,(n=n||1)<0)for(;t<=e+n;)r[r.length]=e+=n;else for(;e+n<=t;)r[r.length]=e+=n;else try{var a="abcdefghijklmnopqrstuvwxyz";e===e.toUpperCase()&&(t=t.toUpperCase(),a=a.toUpperCase()),r=(a=a.substring(a.indexOf(e),a.indexOf(t)+1)).split("")}catch(e){}}catch(e){}return r},Array.prototype.rangeOfYears=function(e,t){var n=(new Date).getFullYear(),r=[];for(e=e||n-t;-1<e;)r.push(n--),e--;return r};var parseTimestampToMoment=function e(t){return null==t?null:("string"==typeof t?moment(t):moment.unix(t)).utc()},isDateInThePastInLocalTimezone=function e(t,n){if(null==t)return!1;var n,n=(n?moment.unix(n):moment()).startOf("day");return t.isSameOrBefore(n)},formatCombineStartEndTS=function e(t,n){var r,a,r=t.format("h");return"00"!==t.format("mm")&&(r=t.format("h:mm")),a=n.format("h"),"00"!==n.format("mm")&&(a=n.format("h:mm")),t.format("a")===n.format("a")?r+" – "+a+" "+t.format("a"):r+" "+t.format("a")+" – "+a+" "+n.format("a")},combine_and_format=function e(t,n){var r={from:parseTimestampToMoment(t.start_ts),to:parseTimestampToMoment(t.end_ts)},a=formatCombineStartEndTS(r.from,r.to);if(n&&n.start_ts){var o=parseTimestampToMoment(n.start_ts),i=parseTimestampToMoment(n.end_ts),t=formatCombineStartEndTS(o,i);if(6===r.from.isoWeekday()&&7===o.isoWeekday()){var n={day:r.from.format("ddd, MMM D"),time:a,month:r.from.format("MM"),day_short:r.from.format("DD")};return a===t?_objectSpread(_objectSpread({},n),{},{combined:"".concat(r.from.format("ddd")," & ").concat(o.format("ddd"),", ").concat(r.from.format("MMM DD"),"-").concat(i.format("DD")," • ").concat(a)}):_objectSpread(_objectSpread({},n),{},{combined:"".concat(r.from.format("MMM DD"),", ").concat(a," & ").concat(o.format("MMM DD"),", ").concat(t)})}}return{day:r.from.format("ddd, MMM D"),time:a,month:r.from.format("MM"),day_short:r.from.format("DD"),combined:"".concat(r.from.format("ddd"),", ").concat(r.from.format("MMM DD")," • ").concat(a)}};function parseOpenHouse(n,e){if(n.open_house&&n.open_house.nearest_pretty_date)return n;if(n.hasOwnProperty("open_house")&&n.open_house){var t=function e(t,n){return t.start_ts<n.start_ts?-1:t.start_ts>n.start_ts?1:0}
4,r={nearest_pretty_date:{day:null,time:null}};if(n.open_house)try{n.open_house=n.open_house.sort(t);var a=n.open_house.slice(),o,i;if(!APP.last_request||(o=getObjectFromArrayByKey(APP.last_request.filters,"open_house").value.open_house_min)&&(i=moment.unix(o).startOf("day").format("X"),n.open_house=n.open_house.filter(function(e){var t=parseTimestampToMoment(e.start_iso);if(!isDateInThePastInLocalTimezone(t,i))return e})),n.open_house=n.open_house.filter(function(e){return parseTimestampToMoment(e.start_iso)&&!isDateInThePastInLocalTimezone(parseTimestampToMoment(e.start_iso))}),!n.open_house.length)return console.debug("empty applicable OH",a),n.open_house=null,n;e&&1<n.open_house.length&&(n.has_more_upcoming_houses=!0,n.all_upcoming_open_houses=n.open_house.map(function(e,t){return _objectSpread({},combine_and_format(e,n.open_house[t+1]))})),r.nearest_pretty_date=combine_and_format(n.open_house[0],n.open_house[1]),n.open_house=r}catch(e){n.open_house=null}else console.debug("no OH in",n),n.open_house=null}else n.open_house=null;return n}var deduplicateArrByKey=function e(t,n){var r=[];return t.map(function(e){var t;-1===findInArr(r,n,e[n])&&r.push(e)}),r};function parseAndAggregateTransitForGrid(e){return e.transit&&0!==e.transit.length&&Array.isArray(e.transit)?e.transit=deduplicateArrByKey(e.transit.slice(),"route_id").map(function(e){return lineToHoganLambda(e,e.route_name&&1===e.route_name.length?"circle_":"rectangle_")}).join("\n"):delete e.transit,e}function parseAndAggregateTransitForModal(e){if(!e.transit||Array.isArray(e.transit)&&!e.transit.length||e.transit&&!Array.isArray(e.transit)&&!e.transit.exists)return e.transit_with_metadata=null,e;if(!e.location.coordinates||!e.location.coordinates.length)return e.transit_with_metadata=null,e;var t,n=_slicedToArray(e.location.coordinates.map(parseFloat).reverse(),2),r=n[0],n=n[1],s=new google.maps.LatLng({lat:r,lng:n});function a(e,t){return e.geodistance_in_meters<t.geodistance_in_meters?-1:e.geodistance_in_meters>t.geodistance_in_meters?1:0}var o,n=deduplicateArrByKey(e.transit.slice(),"stop_name").map(function(e){var t=e.stop_name,n=e._geoloc,r=e.lines,t=new String(t),r=deduplicateArrByKey(r,"route_id"),a,o=_slicedToArray(n.map(parseFloat).reverse(),2),e=o[0],o=o[1],n=new google.maps.LatLng({lat:e,lng:o}),e=google.maps.geometry.spherical.computeDistanceBetween(n,s),o=Math.ceil(621371e-9*e*100)/100,n=Math.ceil(o/.05),i;return{stop_name:t,lines:r,geodistance_in_meters:e,times:"".concat(n," min • ").concat(o," mi")}}).filter(function(e){return e&&void 0!==e.geodistance_in_meters&&e.geodistance_in_meters<=500}).sort(a).map(function(e){return transitStopWithDistanceToHoganLambda(e,"rectangle_")});return n.length&&(e.transit_with_metadata=n.join("\n")),e}function coloredBarHelper(e,t){return APP.coloredBarHelper(e,t)}function isLatitude(e){return isFinite(e)&&Math.abs(e)<=90}function isLongitude(e){return isFinite(e)&&Math.abs(e)<=180}function isLatLngValid(e){var t=e.lat,e=e.lng;return isLatitude(t)&&isLongitude(e)}function isMarkerRenderable(e){return e&&(!(null!=e&&e.hide_street_address)||"off"===(null==e?void 0:e.hide_street_address))}function formatHitForGrid(e){var t=!e.location.lat||!e.location.lng||0===e.location.lat&&0===e.location.lng||!isLatLngValid(e.location),n=e;n.detailed_info||(n.detailed_info={}),n.size||(n.size={}),(n=Object.assign(n,n.size)).size.square_feet&&(n.size.square_feet_pretty=numeral(n.size.square_feet).format("0,0"));var r={location:{lat:parseFloat(e.location.lat),lng:parseFloat(e.location.lng)},inside:e.prices.price_pretty_short,classID:e.objectID,zIndexAsArrayId:1e3*(parseInt(e.objectID)+2)};if(n.data_label_context=JSON.stringify(r),n.is_unmapped=t,n.initial_photo=TRANSPARENT_PNG_URL,n.main_photo=n.main_photo||NO_IMG_URL,SEARCH_GRID_PHOTO_SIZE&&(n.main_photo_width=SEARCH_GRID_PHOTO_SIZE[0],n.main_photo_height=SEARCH_GRID_PHOTO_SIZE[1]),n.main_bubble_photo=n.bubble_photo||NO_IMG_URL,n.main_photo_backup=NO_IMG_URL,(n=parseOpenHouse(n)).pretty_beds_baths=formatBedsAndBaths(e,!0),n=parseAndAggregateTransitForGrid(n=doubleCheckBedsBaths(n=coloredBarHelper(n,!1))),APP.saved_properties.includes(n.objectID)?(n.heart_class="fas",n.is_favorited=!0,n.heart_tooltip="Remove from Favorites"):(n.heart_class="far",n.is_favorited=!1,n.heart_tooltip="Add to Favorites"),APP.hidden_properties.includes(n.objectID)?(n.eye_class="fa-eye",n.eye_tooltip="Unhide Property"):(n.eye_class="fa-eye-slash",n.eye_tooltip="Hide Property"),n.mls_disclaimer&&(!0===n.mls_disclaimer.show_mls_logo||!0===n.mls_disclaimer.show_office_name))switch(n.has_disclaimer=!0,n.mls_disclaimer.mls){case"nwmls":n.office_name="NWMLS";break;
4case"tmls":n.mls_disclaimer.photo=APP.athenaUrl+"/assets/images/tmls-logo.png"}return n.IS_LAND="Land"===e.property_badge,n.prices.price_hidden=1===n.prices.price?"Price Upon Request":null,n}function asyncFillGridPhoto(e){var t=$("[data-img-id={0}]".format(e)),n,r,a;t&&t.length&&(n=t.data("src"),r=t.data("src-backup"),n?((a=new Image).onload=function(){t.prop("src",a.src)},a.onerror=function(){r&&(a.src=r,t.prop("src",a.src))},a.src=n):console.debug("asyncFillGridPhoto: No main image link found for objID:",e))}function formatVaryingListingAddress(e){if(!e)return{map_accuracy:null};if(String.prototype.format__||(String.prototype.format__=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(e,t){return void 0!==n[t]?n[t]:e})}),!e.addresses)return{result:e.location.display_address,map_accuracy:"pinpoint"};var t={result:e.addresses.loggedin,map_accuracy:null},n=-1===e.listing_type.indexOf("rental")?"sale":"rental",r=Boolean(APP.user),a=Boolean(e.open_listing),o=Boolean(e.idx),i=Boolean(e.vow),s=Boolean(e.exclusive);if(r)switch(t.result=e.addresses.loggedin,n){case"sale":a&&(t.map_accuracy="radius"),(o||i||s)&&(t.map_accuracy="pinpoint");break;case"rental":a&&(t.map_accuracy="radius"),(o||i)&&(t.map_accuracy="radius"),s&&(t.map_accuracy="pinpoint")}else switch(t.result=e.addresses.guest,n){case"sale":case"rental":a&&(t.map_accuracy="radius"),(o||i)&&(t.map_accuracy="radius"),s&&(t.map_accuracy="pinpoint")}return t}function handleAroundLatLngRectangularBuffer(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:8046,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=0,o=-90,i=180,a=90,s=parseFloat(e.lat),e=parseFloat(e.lng);return 0===s&&0===e?null:l(s,e,t,t);function l(e,t,n,r){var e=new google.maps.LatLng(e,t),t=google.maps.geometry.spherical.computeOffset(e,r/2,0),r=google.maps.geometry.spherical.computeOffset(e,r/2,i),t=google.maps.geometry.spherical.computeOffset(t,n/2,90),n=google.maps.geometry.spherical.computeOffset(r,n/2,o),a;return c(new google.maps.LatLngBounds(n,t))}function c(e){if(!e)return n?"":new google.maps.LatLngBounds;if(!n)return e;
4var t=e.getNorthEast(),e=e.getSouthWest();return[roundUp(e.lat(),1e4),roundUp(e.lng(),1e4),roundUp(t.lat(),1e4),roundUp(t.lng(),1e4)].join()}}function handleModalPolygon(e){var e,e;e&&e.polygon&&!window.modal_map&&document.getElementById("modal-map")&&(window.modal_map=new google.maps.Map(document.getElementById("modal-map"),{disableDoubleClickZoom:!1,clickableIcons:!0,streetViewControl:!0,fullscreenControl:!1,mapTypeControl:!1,scrollwheel:!1,draggable:!0,zoom:APP.MAP_INIT_ZOOM,center:APP.MAP_INIT_CENTER,zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},minZoom:APP.MIN_ZOOM,maxZoom:APP.MAX_ZOOM}),e=boundaryPointsToPaths([e.polygon],!0),e=new google.maps.Polygon($.extend(!1,APP.map_drawing_colors,{paths:e,clickable:!1,draggable:!1,editable:!1,geodesic:!0,map:window.modal_map,zIndex:1})),window.modal_map.fitBounds(e.getBounds()),google.maps.event.trigger(window.modal_map,"resize"))}function formatHitForModal(e,t,n,r){var a=[],o=e,i,s;o.objectID=o.id,o.media&&o.media.length||(o.media=[NO_IMG_URL_MODAL]),o.media&&o.media.length&&(o.full_width_slider={},o.full_width_slider.main_photo=o.media[0],o.full_width_slider.main_photo_full=o.media[0].replace(",w-640,h-480",""),o.full_width_slider.thumbs=[],0<o.media.length&&o.media.slice(1).forEach(function(e){var e=e.replace(",w-640,h-480","");o.full_width_slider.thumbs.push(e)})),o.location.lat&&o.location.lng&&(void 0===o.show_map_link||o.show_map_link)&&(o.has_map=1,o.gmaps_api_key=APP.mapAPIkey),o.location.state&&(o.location.state_full=getFullStateName(o.location.state)),(o.virtual_tour||o.virtual_tour_branded)&&(o.has_additional_media=!0),o.virtual_tour&&(o.virtual_tour=getEmbeddableVideoUrl(o.virtual_tour)),(o=parseOpenHouse(o,!0)).pretty_beds_baths=formatBedsAndBaths(e,!0),o.land_sqft_pretty=numeral(o.land_sqft).format("0,0"),o.living_area&&(o.living_area_formatted=numeral(o.living_area).format("0,0")),o.square_feet&&0<o.square_feet&&(o.square_feet_pretty=numeral(o.square_feet).format("0,0"),"Sold"===o.listing_status&&o.sold_price_number?o.price_sqft=APP.getCurrency()+numeral(o.sold_price_number/o.square_feet).format("0,0.00"):o.price_sqft=APP.getCurrency()+numeral(o.price/o.square_feet).format("0,0.00")),APP.showSoldPrice||"Sold"!==o.listing_status||(o.sold_price=null),o.prices.price_hidden=1===o.prices.price?"Price Upon Request":null,(o=doubleCheckBedsBaths(o)).subdivisions&&(o.location.subdivision=o.subdivisions),o.region=n?{image:n.image?get_cloudinary_url(n.image,["w_570","h_375","c_fill"]):"https://ik.imagekit.io/virtualresults/tr:f-auto,pr-true,w-570,h-375/noimage.png",description:n.description,url:n.url,title:n.post_title||"",has_polygon:!!n.polygon}:{},(o=coloredBarHelper(o,!0)).bar.pullRight="","sold_date"in(window.item=o)&&"Sold"===o.listing_status&&o.sold_date&&0<o.sold_date.length?(s=moment(o.sold_date))._isValid&&
4(o.bar.pullRight="SOLD DATE: "+s.format("MMM D, YYYY")):o.days_on_market&&0<=o.days_on_market&&(o.bar.pullRight="DAYS ON MARKET: "+o.days_on_market),o.monthly_taxes=null,"annual_tax"in o&&o.annual_tax&&0<(""+o.annual_tax).length&&(o.annual_tax_formatted=formatPriceLong(parseFloat(o.annual_tax)),o.monthly_taxes=formatPriceLong(parseFloat(o.annual_tax)/12)),"num_parking_spaces"in o&&0<o.num_parking_spaces&&(1<o.num_parking_spaces?o.num_parking_spaces+=" Spaces":o.num_parking_spaces+=" Space"),"garage_spaces"in o&&0<o.garage_spaces&&(1<o.garage_spaces?o.garage_spaces_formatted=o.garage_spaces+" Spaces":o.garage_spaces_formatted=o.garage_spaces+" Space"),"parking_description"in o&&null!==o.parking_description&&(o.parking_description=o.parking_description.replace(/,(?=\S)/g,", ")),o.features&&(o.features=Object.keys(o.features).map(function(e){return Array.isArray(o.features[e])?o.features[e].toString():o.features[e]}).filter(function(e){return null!==e&&"None"!==e&&""!==e&&"Other"!==e}).join(", ").replace(/,(?=\S)/g,", ")),o.vr_schools&&o.vr_schools.length&&(o.has_vr_schools=!0,o.vr_schools.forEach(function(e){e.rating=0<e.rating?Number.parseFloat(e.rating).toFixed(1):"N/A",e.distance=Number.parseFloat(e.distance).toFixed(1)})),o.documents&&(o.has_documents=!0),r&&(o.has_nearby_listings=!0,o.nearby_listings=[],r.map(function(e){e.pretty_beds_baths=formatBedsAndBaths(e,!0),(e=doubleCheckBedsBaths(e)).photo_url||(e.photo_url=NO_IMG_URL),!e.mls_disclaimer||!0!==e.mls_disclaimer.show_mls_logo&&!0!==e.mls_disclaimer.show_office_name||(e.has_disclaimer=!0),o.nearby_listings.push({objectID:e.id,location:{display_address:e.location.display_address,city:e.location.city,state:e.location.state,state_full:getFullStateName(e.location.state),zip_code:e.location.zip_code},size:{square_feet:e.square_feet,square_feet_pretty:e.square_feet?numeral(e.square_feet).format("0,0"):null,bedrooms:e.bedrooms,bathrooms:e.bathrooms},bedroom_bathroom:e.bedroom_bathroom,pretty_beds_baths:e.pretty_beds_baths,mls:e.mls,office_name:e.office_name,mls_disclaimer:e.mls_disclaimer,prices:{price_hidden:1===e.prices.price?"Price Upon Request":null,price_pretty:e.prices.price_pretty},heart_class:APP.saved_properties.inArray(e.id)?"fas":"far",is_favorited:APP.saved_properties.inArray(e.id)?"true":"false",eye_class:APP.hidden_properties.inArray(e.id)?"fa-eye":"fa-eye-slash",url:e.url,photo_url:e.photo_url,has_disclaimer:e.has_disclaimer,show_office_name:e.mls_disclaimer&&e.mls_disclaimer.show_office_name,show_mls_logo:e.mls_disclaimer&&e.mls_disclaimer.show_mls_logo})})),APP.saved_properties.inArray(o.id)?(o.heart_class="fas",o.is_favorited="true"):(o.heart_class="far",o.is_favorited="false"),APP.hidden_properties.inArray(o.id)?o.eye_class="fa-eye":o.eye_class="fa-eye-slash";var s=!1;APP.isSearchWithMeAgent&&(s=!0);var l={id:o.id,address:o.location.display_address,url:APP.homeUrl+o.url,agent_1_id:"",agent_1_name:!o.self_listing&&window.defaultAgent?window.defaultAgent.full_name:"",agent_1_email:!o.self_listing&&window.defaultAgent?window.defaultAgent.email:"",agent_2_id:"",agent_2_name:"",agent_2_email:""},c,r,c,s,t,u,p,p,p;return window.defaultAgent&&((c=window.defaultAgent).agent_photo&&-1===c.agent_photo.indexOf("w_133")&&(r=["w_133","h_147","g_face","c_fill"],c.agent_photo=get_cloudinary_url(c.agent_photo,r)),o.defaultAgent=c),(o.self_listing||s)&&t&&($.each(t,function(e,t){l["agent_"+(e+1)+"_id"]=t.id,l["agent_"+(e+1)+"_name"]=t.first_name+" "+t.last_name,l["agent_"+(e+1)+"_email"]=t.email}),(c=t[0])&&"image"in c&&c.image&&-1===c.image.indexOf("w_290")&&(s=["w_290","h_290","c_fill","g_face"],c.image=get_cloudinary_url(c.image,s)),o.agent_json=JSON.stringify(c),t[1]&&(t=t[1],o.co_listing_agent={full_name:t.full_name,area_of_expertise:t.area_of_expertise,image:t.image?get_cloudinary_url(t.image,["w_290","h_290","c_fill","g_face"]):null,phone:t.phone||t.cell_phone,url:"/agents/"+t.slug})),o.gravity_form_fields=JSON.stringify(l),o.appointment_dates=getNextWeekDays(10),o.location&&(o.aroundLatLngBuffer=handleAroundLatLngRectangularBuffer(o.location)),o.full_url=APP.homeUrl+o.url,o.down_payment=formatPrice
4Long((.2*o.price).toFixed()),(o=parseAndAggregateTransitForModal(o)).vtours&&(u={buttons:{below_photos:[],after_description:[]},inline:[]},$.each(o.vtours,function(e,t){switch(t.type){case"Button":switch(t.position){case"Below Photos":u.buttons.below_photos.push(t);break;case"After Description":u.buttons.after_description.push(t)}break;case"Inline":u.inline.push(t)}}),o.vtours=u),o.remarks&&(p=[(p=o.remarks.split(" ")).slice(0,45).join(" "),p.slice(45).join(" ")],o.formatted_remarks={},o.formatted_remarks.first_part=p[0],o.formatted_remarks.second_part=p[1]),o.hasOwnProperty("buyers_agent_commission_value")&&o.hasOwnProperty("buyers_agent_commission_type")&&(p="Buyer's Agent Commission ","percentage"===o.buyers_agent_commission_type?p+="(%)":"currency"===o.buyers_agent_commission_type&&(p+="($)"),o.buyers_agent_commission_type_label=p),console.warn(o),o}function splitStringByChars(e,t){var n=function e(t){return function(e){return[e.slice(0,t),e.slice(t)]}};return e.length>t&&n(t)(e)}function getNextWeekDays(e){for(var t=moment(),n=[],r=0;n.length<e;)t.add(1,"days"),n.push({day:t.format("D"),week_day:t.format("ddd").toUpperCase(),month:t.format("MMM").toUpperCase(),full_date:t.format("MM/DD/YYYY")}),r++;return n}function createTemporaryModalElement(e){$("body").append('<a id="tmp_modal" href="" class="toggle-modal" data-id="'+e+'" data-target="#propertyModal"></a>'),console.warn("created tmp modal el")}function fitMapToMarkers(){hideMarkerLabels(),APP.rendering_map=!0;var n=null,e;if(0<Object.keys(APP.markers).length){for(var t in n=new google.maps.LatLngBounds,APP.markers)e=void 0,!APP.markers.hasOwnProperty(t)||(e=APP.markers[t])&&e.getPosition()&&null!==n&&(n.extend(e.getPosition()),console.log("bounds have been extended..."));APP.map.fitBounds(n)}extendBoundsByAddressLocations(APP.FORCE_SET_BOUNDS,!0,"true"===APP.useCustomNeighborhoods).then(function(e){var e,e,t;e||APP.total_marker_clusters&&0<APP.total_marker_clusters.length&&(n=new google.maps.LatLngBounds,1===(e=$.grep(APP.total_marker_clusters,function(e,t){return 0!==e.center.lat()&&0!==e.center.lng()})).length?(APP.map.setCenter(e[0].center),APP.map.setZoom(10)):($.map(APP.total_marker_clusters,function(e){var e=e;e&&e.center&&null!==n&&0!==e.center.lat()&&0!==e.center.lng()&&(n.extend(e.center),console.info("bounds have been extended...",e.center))}),e=1e5,google.maps.geometry.spherical.computeDistanceBetween(n.getCenter(),APP.INIT_BOUNDS.getCenter())<e&&(APP.map.fitBounds(n),APP.map.panToBounds(n))))}),showMarkerLabels(),APP.dont_apply_map_bounds=!1,APP.fit_map_to_markers_automatically=!1,google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.rendering_map=!1})}function changeZindex(e,t,n){switch(t){case"+":$(e).css("z-index",parseInt($(e).css("z-index"),10)+n);break;case"-":$(e).css("z-index",parseInt($(e).css("z-index"),10)-n);break;case"*":$(e).css("z-index",parseInt($(e).css("z-index"),10)*n);break;case"/":$(e).css("z-index",parseInt($(e).css("z-index"),10)/n)}}function isDict(e){return!!e&&(!Array.isArray(e)&&e.constructor===Object)}function isArray(e){return Array.isArray(e)}function isString(e){return"string"==typeof e||e instanceof String}function isFalse(e){return!1===e}function flattenObject(e,t){t=t||[];var n={},r;for(r in e)if(e.hasOwnProperty(r)&&-1===t.indexOf(r))if("object"===_typeof(e[r])){var a=flattenObject(e[r],t),o,i;for(o in a){-1===t.indexOf(o)&&(n[i=(r+"."+o).replace(/.\d.?/g,".").replace(/[.]$/,"")]?n[i]=[].concat(n[i]).concat(a[o]):n[i]=a[o])}}else n[r]=e[r];return n}function simplifyFlattenedObject(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&(n.match(/[.]/)?n.includes(":")||n.includes("filters..")?t[n.replace("filters..","")]=e[n]:t[n.split(".")[n.split(".").length-1]]=e[n]:t[n]=e[n]);return t}function groupArrayObjectsByKey(e){for(var n=function e(t){return Object.keys(t)[0]},t=[],r={},a=0,o,i,s;a<e.length;a++){var l=n(e[a]),c=e[a][l];void 0!==r[l]?"".concat(r[l]).includes(",")&&(r[l]=[].concat(r[l].split(",")).concat(c).join(",")):r[l]=c}for(s in function e(t){return Object.keys(t).filter(function(e){return 1<t[e]})}(function e(t){return t.reduce(function(e,t){return _objectSpread(_objectSpread({},e),{},_defineProperty({},t,(e[t]||0)+1))},{})}(e.map(n))).map(function(t){r[t]=e.filter(function(e){return n(e)===t}).map(function(e){return e[t]})}),r){var u={};u[s]=r[s],t.push(u)}return t}function replaceInNestedDictionary(e,t){var a={},n=shallowCopy(e),o=shallowCopy(t),i,r;for(i in n){n.hasOwnProperty(i)&&(isDict(r=n[i])?a[i]=replaceInNestedDictionary(r,o):isArray(r)?(a[i]||(a[i]=r),0===r.length&&o[i]?isString(o[i])&&/,/.test(o[i])?a[i]=o[i].split(","):a[i]=[].concat(o[i]):r.map(function(e,t){if(isDict(e))for(var n in e){var r;e.hasOwnProperty(n)&&(isDict(e[n])?a[i][t][n]=replaceInNestedDictionary(e[n],o):o[n]&&((r={})[""+n]=o[n],a[i][t]=r))}})):o[i]?a.hasOwnProperty(i)?a[i]=[].concat(a[i]).concat(o[i]):a[i]=o[i]:a[i]=r)}return a}
4function doubleCheckTriggerRequest(e){if("undefined"==typeof DEFAULT_REQUEST_PARAMS)return e;e.clusters_needed=APP.zoomToSeeMarkerClusters(),console.info("clusters needed",APP.zoomToSeeMarkerClusters());for(var t=0,n,r;t<e.filters.length;t++){var a=e.filters[t];if(isDict(DEFAULT_REQUEST_PARAMS().filters[t]))for(var o in a)a.hasOwnProperty(o)&&DEFAULT_REQUEST_PARAMS().filters[t].hasOwnProperty(o)&&isArray(DEFAULT_REQUEST_PARAMS().filters[t][o])&&!isArray(a[o])&&(e.filters[t][o]=[].concat((""+a[o]).split(",")));else isArray(DEFAULT_REQUEST_PARAMS().filters[t])&&!isArray(a)&&(e.filters[t]=[].concat((""+a).split(",")))}e.sort_order.indexOf(","),e.neighborhoods.length&&(n=allSelectedParentCheckboxValues(),r=[],$.each(e.neighborhoods,function(e,t){t&&-1!==n.indexOf(t.split(":")[0]+":")||r.push(t)}),e.neighborhoods=r,e.neighborhoods=e.neighborhoods.concat(n));var i=getObjectFromArrayByKey(e.filters,"zip_code");i&&i.value&&!isArray(i.value)&&i.value.contains_str(",")&&(e.filters[i.index].zip_code=i.value.split(","));var i=getObjectFromArrayByKey(e.filters,"keyword");return i&&i.value&&!isArray(i.value)&&i.value.contains_str(",")&&(e.filters[i.index].keyword=i.value.split(",")),e=assignViewportParamIfApplicable(e)}function assignViewportParamIfApplicable(e){if(!APP.map)return e;if(e.map_bounds.applicable&&-1!==e.map_bounds.shape.match(/circle|polygon|rectangle/gim)||isInteractiveSearch())try{var t=mapBoundsToParams(APP.map.getBounds());t&&t.length?(e.map_bounds.viewport=mapBoundsToParams(APP.map.getBounds()),isInteractiveSearch()&&(e.map_bounds.applicable=!0)):delete e.map_bounds.viewport}catch(e){console.error(e)}return!e.map_bounds.applicable&&APP.is_map_hidden()||(e.map_bounds.split_vp=APP.map.splitBounds()),e}function parseURLparamsFromQueryString(e){var t={};if(e)for(var n=(e=decodeURIComponent(decodeURI(e.replace(/[a-zA-Z]\+/g,function(e){return e.replace(/\+/," ")})))).split("&"),r=0;r<n.length;r++){var a=encodeEqualSignInKeyValuePair(n[r]).split(URL_SPLITTING_EQUALS_SIGN_REGEX);/,/g.test(a[1]),/^\d+$/g.test(a[1])&&!/^0\d+$/.test(a[1])&&(a[1]=parseInt(a[1],10)),-1!==a[0].search("\\[\\]")?(a[0]=a[0].replace(/\[\]$/,""),void 0===t[a[0]]?t[a[0]]=[a[1]]:t[a[0]].push(a[1])):t[a[0]]=a[1],"null"===t[a[0]]&&delete t[a[0]]}return t}function url_serialize(e,r){function t(e){var t={};return e.forEach(function(e){(e=encodeEqualSignInKeyValuePair(e).split(URL_SPLITTING_EQUALS_SIGN_REGEX))[1]&&(t[e[0]]=e[1])}),t}function n(e){var t=[],n;for(n in e)!e.hasOwnProperty(n)||(""+e[n]).length<1||r&&!APP.just_done_drawing&&-1!==APP.PSEUDO_HIDDEN_SEARCH_PARAM_KEYS.indexOf(n)||APP.is_map_hidden()&&APP.HIDDEN_SEARCH_PARAM_KEYS_WHEN_MAP_HIDDEN.includes(n)&&!APP.customBoundary||!APP.USER_INTERACTED_WITH_MAP&&APP.HIDDEN_SEARCH_PARAM_KEYS_WHEN_MAP_HIDDEN.includes(n)||t.push(n+"="+e[n]);return t}function l(t){var n=[];return t.map(function(e){n=isDict(e)?n.concat(c(e)):t}),n}function c(e){var t=[],n;for(n in e)if(e.hasOwnProperty(n)){var r=e[n],a=encodeURIComponent(n),o=encodeURIComponent(r),i,s;if(console.info({key:n,val:r}),isInteractiveSearch())switch(n){case"shape":-1===["circle","polygon","rectangle"].indexOf(e.method)&&(r=APP.map_bounds?mapBoundsToParams(APP.map_bounds):mapBoundsToParams(APP.map.getBounds()),t.push(a+"="+encodeURIComponent(r)));break;case"zoom":r=APP.map.getZoom(),t.push(a+"="+encodeURIComponent(r))}isDict(r)?t=t.concat(c(r)):!isArray(r)||r.every(isString)?urlKeyValueValidityLogic(n,r)&&(i=t.matchInArray(a),isArray(r)&&(r=r.join(",")),-1<i?null!==APP.FORM_MAPPING.findInArrayOfObjects("default_values").index?(console.info("found in form mapping array",t[i]),s=t[i].split("="),t[i]=s[0]+"="+[].concat(r).join(",")):t[i]=a+"="+o:t.push(a+"="+o)):t=t.concat(l(r))}return t}window.urlKeyValueValidityLogic=function(e,t){var n;return!(2<arguments.length&&void 0!==arguments[2]?arguments[2]:[]).length&&-1!==APP.ALWAYS_SHOWING_SEARCH_PARAM_KEYS.indexOf(e)||-1===APP.HIDDEN_SEARCH_PARAM_KEYS.indexOf(e)&&t&&""!==t&&t!==[]&&null!==t&&"null"!==t&&"any"!==t&&t!=={}&&0<(t+"").length};var a={},o,i,s,u,p,d;for(o in e){e.hasOwnProperty(o)&&(s=e[i=o],u=encodeURIComponent(i),p=encodeURIComponent(s),r?(console.info({ek:u,ev:s}),isDict(s)?a=Object.assign({}
4,a,t(c(s))):isArray(s)?(d=l(s)).every(isString)&&d.map(function(e){return e.match(/=/g)}).every(function(e){return null===e})?a[u]=d.join(","):(console.info("traversed_array",d),a=Object.assign({},a,t(d))):urlKeyValueValidityLogic(i,s)&&(a[u]=p)):a[u]=p)}console.info("object_to_pairs",a);var m=n(a);return console.info("url_serialize joined arr",m.join("&")),m.join("&")}function handlePagination(){$(document).on("click",".go-to-page",function(e){e.preventDefault();var e=APP.TO_SET_URL_SEARCH_PARAMS;e.offset=$(this).data("offset"),APP.customBoundary&&(e.map_bounds.applicable=!0),APP.initFromURLParamsKwargs={offset:e.offset},APP.onRenderCallbacks.push({fn:function e(){google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.initFromURLParamsKwargs={}})},args:[]}),APP.form_triggers.non_argumented_form=!0,triggerSearch(e)})}function initGoogleGeocodeHelpers(e){APP.geocoder=new google.maps.Geocoder,e&&(APP.autocomplete=new google.maps.places.Autocomplete(APP.$query[0],{types:["geocode"],componentRestrictions:{country:"US"}}),google.maps.event.addListener(APP.autocomplete,"place_changed",function(){APP.$query.val(APP.autocomplete.getPlace().formatted_address),geocodeQuery(APP.autocomplete.getPlace().formatted_address,updateESQuery)}))}String.prototype.contains_str=function(e){return~this.indexOf(e)},Array.prototype.spliceBy=function(e){try{var t=this.indexOf(e);-1!==t&&this.splice(t,1)}catch(e){}};var geocodeQuery=function e(t,n){var r=t.query,a=t.kind,o={original_query:r=APP.geoAutocompleteBias&&APP.geoAutocompleteBias.length?"".concat(r,", ").concat(APP.geoAutocompleteBias):r,success:!1,response:null,center:null,applicable_zoom:null,type:""};APP.geocoder=APP.geocoder||new google.maps.Geocoder,APP.geocoder.geocode({address:r,bounds:APP.INIT_BOUNDS||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180))},function(e,t){if("OK"===t){switch(o.success=!0,o.original_query=e[0].formatted_address,o.response=e,APP.$query.val(o.original_query),!0){case"city"===a||-1!==e[0].types.indexOf("political")&&e[0].types.indexOf("sublocality_level_1")<=-1:o.type="city";break;case"hood"===a||"zip"===a||-1!==e[0].types.indexOf("sublocality"):o.type="neighborhood";break;case"address"===a||-1!==e[0].types.indexOf("route"):o.type="route";break;case-1!==e[0].types[0].indexOf("postal_code"):o.type="neighborhood";break;default:o.type="overview"}switch(o.type){case"city":o.applicable_zoom=11;break;case"neighborhood":o.applicable_zoom=14;break;case"route":case"overview":o.applicable_zoom=17;break;default:o.applicable_zoom=9}o.bounds=e[0].geometry.bounds,o.center=e[0].geometry.location,APP.fitMapToMarkersAutomatically=!1,n(o)}else console.warn("Error while geocoding",{status:t,results:e}),n(null)})},lastSearch;function updateESQuery(e){console.info("updateESQuery results",e),e&&e.success?(APP.rendering_map=!0,APP.fitMapToMarkersAutomatically=!1,e.applicable_zoom<16?APP.map.fitBounds(e.bounds):(APP.map.setCenter(e.center),APP.map.setZoom(e.applicable_zoom)),setTimeout(function(){APP.$form.trigger("change")},200)):(APP.fitMapToMarkersAutomatically=!0,APP.$form.trigger("change"))}function getAutocompleteBoundsDataJson(){var e=APP.$autocomplete_bounds_object;return e&&e.data("json")?e.data("json"):null}function pillboxCloseListenerToggle(){$(".btn.pill").on("click",function(e){focusPills(),$(e.currentTarget).hasClass("pill-target")||($(e.currentTarget).addClass("pill-target"),setTimeout(function(){$(".btn.pill.pill-target").removeClass("pill-target")},1e3));var t=$(".btn.pill");APP.$input_wrapper.addClass("focused")||APP.$input_wrapper.addClass("focused"),t.hasClass("last")||t.has(e.target).hasClass("last").length})}function initPillListeners(e){e.length<=0?APP.$input_wrapper.hasClass("no-pills")||APP.$input_wrapper.addClass("no-pills"):(APP.$input_wrapper.removeClass("no-pills"),APP.$query.off("focus").on("focus",function(){APP.$input_wrapper.addClass("focused"),focusPills()}),APP.$query.off("blur").on("blur",function(){setTimeout(function(){0===$(".btn.pill.pill-target").length&&(APP.$input_wrapper.removeClass("focused"),blurPills()),$(".btn.pill").hasClass("focus")||blurPills()},200)}),$("#input-wrapper .close-btn").on("click",function(){APP.$reset_form_button.click()}))}function focusPills(){$(".btn.pill").hasClass("focus")||$(".btn.pill").addClass("focus")}function blurPills(){$(".btn.pill").removeClass("focus")}
4function getSelectedParentRegion(){var e=$("[id*=parent-]:checked");return e&&0<e.length?e.map(function(e,t){return t.id.split("-")[1].replace("_"," ")}).toArray().join(", "):null}function parentRegionsAsArray(){return $("[id*=parent-]").map(function(e,t){return t.id.split("-")[1].replace("_"," ")}).toArray()}function allSelectedParentCheckboxValues(){return $(".select-all-checkbox:checked").map(function(e,t){return $(t)[0].id.split("-")[1]+":"}).toArray()}function handleNoYoverflowOnDropdownMobile(){var e}function revertPreventModalDoubleclick(){APP.prevent_modal_doubleclick=!APP.prevent_modal_doubleclick}function toggleHideDropdows(e){if(e&&e.just_regions)return $("body").removeClass("noYoverflow"),void $('[data-toggle="dropdown"]').next().removeClass("show");e&&e.force?$(".suggestions").not(".d-none").addClass("d-none"):$('[data-toggle="dropdown"]').not(".no-force-toggle").next()}function applyOnTriggerSearchCallbacks(){$.map(APP.onTriggerSearchCallbacks,function(e){e.fn.apply(null,e.args)}),setTimeout(function(){APP.onTriggerSearchCallbacks=[]},200)}var autocomplete_prepare_pragma={prepare:function e(t,n){var r=void 0!==APP.bloodhoundReadyFormMapping?APP.bloodhoundReadyFormMapping():Immutable.fromJS({num_of_listings_to_show:12,offset:0,clusters_needed:!1,sort_order:"price_desc",map_bounds:{applicable:!1,zoom:1,method:"bbox",shape:"",split_vp:""},neighborhoods:[],filters:[{prices:{prices_min:null,prices_max:null}},{bedrooms:"any"},{bathrooms:"any"},{listing_type:"any"},{class:APP.REQUEST_DEFAULTS.class()},{type:APP.REQUEST_DEFAULTS.type()},{property_type:[]},{status:""},{square_feet:{square_feet_min:null,square_feet_max:null}},{land_sqft:{land_sqft_min:null,land_sqft_max:null}},{year_built:{year_built_min:null,year_built_max:null}},{parking_spaces:{parking_spaces_min:null,parking_spaces_max:null}},{days_on_site:null},{open_house:{open_house_min:null,open_house_max:null}},{additional_options:[]},{pool:null},{sales_conditions:[]},{amenities:[]},{land_tenure:null},{zip_code:null},{city:null},{address:null},{agent_id:null},{max_monthly_fees:null},{keyword:null},{nearby_schools:[]},{special_features:[]},{stories:[]},{subways:[]},{subway_stops:[]},{mls_ids:[]},{warning:null}]}).toJSON();if(APP.last_request)try{var a=APP.last_request.filters.filter(function(e){return"status"===Object.keys(e)[0]})[0],o;a&&(o=r.filters.indexOf(r.filters.filter(function(e){return"status"===Object.keys(e)[0]})[0]),r.filters[o]=a)}catch(e){}return n.hasContent=!0,n.type="POST",n.data={request:JSON.stringify({query:t,state:nullifyGeoBoundsInRequestObject(r),cache_query:!0})},n.beforeSend=function(e){lastSearch&&lastSearch.abort(),lastSearch=e,"undefined"!=typeof getAccessToken&&e.setRequestHeader("Authorization","Bearer ".concat(getAccessToken()))},n.contentType="application/x-www-form-urlencoded; charset=UTF-8",n},rateLimitBy:"throttle",rateLimitWait:400},notFoundAutocompleteTemplate=function e(t){return{notFound:t}},autocompleteTemplates=function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return _objectSpread({header:'<h3 class="header">{0}</h3>'.format(t)},n?notFoundAutocompleteTemplate(n):{})},nullifyGeoBoundsInRequestObject=function e(t){return APP.customBoundary||(t.map_bounds.applicable=!1),t},bindMagnifyingGlass=function e(){$(".search-btn[type=submit], .lookup-form button[type=submit]").on("touchstart click",function(e){e.preventDefault(),APP.first_selectable_item&&(APP.first_selectable_item.click(),clearFirstSelectableItemInterval())})},bindTypeaheadHovers=function e(n,r){n.each(function(e,t){$(t).on("mouseenter",function(){n.removeClass(r),$(this).addClass(r)}).on("mouseleave",function(){n.removeClass(r)})})},clearFirstSelectableItemInterval=function e(){APP.first_selectable_item_interval&&clearInterval(APP.first_selectable_item_interval)},encodeAndSetAsWindowHrefAndNullifyStatusAndListingType=function e(t){var n="undefined"!=typeof HOMEPAGE_AUTOCOMPLETE_OVERRIDE_STATUS?HOMEPAGE_AUTOCOMPLETE_OVERRIDE_STATUS:"any",r="undefined"!=typeof HOMEPAGE_AUTOCOMPLETE_OVERRIDE_LISTING_TYPE?HOMEPAGE_AUTOCOMPLETE_OVERRIDE_LISTING_TYPE:"any",a=t.includes("?")?"&":"?";window.location.href=encodeURI("".concat(t).concat(a,"status=").concat(n,"&listing_type=").concat(r))};function setCookie(e,t,n){var r="",a;n&&((a=new Date).setTime(a.getTime()+60*n*60*1e3),r="; expires="+a.toUTCString()),document.cookie=e+"="+(t||"")+r+"; path=/"}function getCookie(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var a=n[r];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t))return a.substring(t.length,a.length)}return null}function send_to_ga(e,t,n){}function getObjectFromArrayByKey(e,t,n){if(e){var r,a,o,o=e.filter(function(e){return Object.keys(e)[0]===t});if(o.length)return a=(o=o[0])[t],n?null!==a&&(""+a).length?""+a:void 0:{obj:o,index:r=e.indexOf(o),value:null!==(a=o[t])&&(""+a).length?""+a:void 0}}}function potentialZoomInNeeded(){return!!APP.TO_SET_URL_SEARCH_PARAMS&&0<shallowCopy(APP.TO_SET_URL_SEARCH_PARAMS).filters.filter(function(e){var t=Object.keys(e)[0];return-1!==["zip_code","address"].indexOf(t)&&e[t]}).length;var e,t}
4function hashObject(t){if(!t||"undefined"==typeof Hashes)return"";var n={};return Object.keys(t).sort().forEach(function(e){n[e]=t[e]}),(new Hashes.MD5).hex(JSON.stringify(n))}function dynamicSort(r){var a=1;return"-"===r[0]&&(a=-1,r=r.substr(1)),function(e,t){var n;return(e[r]<t[r]?-1:e[r]>t[r]?1:0)*a}}function getFromLocalStrage(e){if(window.localStorage)return localStorage.getItem(e)}function setLocalStorage(t,n){if(window.localStorage)try{localStorage.setItem(t,n)}catch(e){-1!==(""+e).indexOf("exceeded the quota")&&(localStorage.clear(),setLocalStorage(t,n))}}function parse2formMapping(e){function n(e){return $(escapeJquerySensitiveChars("label[for={0}]".format(e))).text()}function t(e){var t=[];return e.is(":selected")&&t.push("selected"),e.is(":disabled")&&t.push("disabled"),t.join(" ")}var r,a,o,i,s,l;if(String.prototype.trimNewLines=function(){return this.replace(/(\r\n\t|\n|\r\t)/gm,"")},String.prototype.cleanUpH6=function(){return this.replace("\\:","")},!(r=$(e.selector)).length)return console.info("$node not found",e),[];switch(a=r[0].nodeName.toUpperCase(),o=r[0].type.toLowerCase(),i=e.expected,a){case"INPUT":switch(o){case"text":case"number":case"date":case"hidden":case"tel":break;case"checkbox":case"radio":switch(i){case"value_text_mapping":l=(s=r.toArray()).map(function(e){var t={};return t[e.value]=n(e.id),t});break;case"multi_category_value_text_mapping":l=(s=r.closest("ul").toArray()).map(function(e){return{category:$(e).prev("h6").text().cleanUpH6(),options:$("input",e).toArray().map(function(e){var t={};return t[e.value]=n(e.id),t})}})}}break;case"SELECT":s=$(r[0].options).toArray(),"value_text_mapping"===i&&(l=s.map(function(e){var e=$(e);return{text:e.text().trim(),value:e.val(),modifiers:t(e)}}))}return console.info("will return parsed content",l),l}function try_catch_or_timeout(e,t,n){try{e.call()}catch(e){n?setTimeout(function(){t.call()},n):t.call()}}function setLocationDitch(){APP.locationDitch=!0,APP.form_triggers.location_flush=!0}function makeImmutable(e){if(e)return Immutable.fromJS(e)}APP.didntMoveMap=function(){return!APP.map||APP.map.getCenter().toString()===new google.maps.LatLng(APP.MAP_INIT_CENTER).toString()&&APP.map.getZoom()===APP.MAP_INIT_ZOOM};var _toArray=function e(t){return Array.isArray(t)?t:[].slice.call(t)};function isFunction(e){return e&&"[object Function]"==={}.toString.call(e)}function debugListeners(e){console.warn("evts",$._data(e.get(0),"events"))}function addOnRenderCallback(e,t){APP.onRenderCallbacks.push({fn:e,args:t})}var locationBasedCriteriaChanged=function e(t){var n=makeImmutable(APP.rl.getLatest()).toJSON(),r=makeImmutable(t).toJSON(),a,o,i=["address","zip_code","city","agent_id"].map(function(e){var t=getObjectFromArrayByKey(n.filters,e,!0),e=getObjectFromArrayByKey(r.filters,e,!0);return e&&!Object.keys(n).length||null!==e&&e!==t}).some(function(e){return Boolean(e)});return APP.request_log.push(t),i},geoBasedLocationsPresent=function e(t){var n=getObjectFromArrayByKey(APP.last_request.filters,"zip_code",!0)||"",r=getObjectFromArrayByKey(APP.last_request.filters,"address",!0)||"",a=getObjectFromArrayByKey(APP.last_request.filters,"city",!0)||"",o="",i;!t||(i=APP.last_request.neighborhoods.filter(function(e){return!e.includes("borough")})).length&&(o=i);var i="".concat(n).concat(r).concat(a).concat(t?o:"");return(!i.length||APP.geocoded_addresses!==i)&&(APP.geocoded_addresses=i,n||r||a||!(!t||!o.length)&&o)},getAllCheckboxValues=function e(t){return t.toArray().filter(function(e){return!!$(e).is(":checked")}).map(function(e){return e.value})},convertToJQ=function e(t){return $(t)};APP.hasSuboptions=function(e){return(e=convertToJQ(e))[0]&&!e[0].disabled&&e.data("sub-dropdown-id")},APP.parseListingTypeTree=function(){var e,t=$("select[name=listing_type]").children().toArray().filter(function(e){return APP.hasSuboptions(e)}),r=[],a={},o=null,i={};return t.map(function(e){var t=$(e),n=t.data("subDropdownId"),e=$('[data-for="listing-type-'.concat(n,'"]'));a[n]=e,r.push(e),!o&&t[0].selected&&(o=t),e&&$('[data-for="listing-type-'.concat(n,'"] input:checked')).length&&(i[n]=$('[data-for="listing-type-'.concat(n,'"] input:checked'))[0].value)}),{mapping:a,default_option:o,default_subdropdown_options:i,all_subdropdown_wrappers:r}};var appendHiddenInputToForm=function e(t){$("form[id=search]").append('<input type="hidden" name="'.concat(t,'" id="').concat(t,'" value="" />'))},createFormMappingElement=function e(t,n,r,a,o,i,s,l){return{nodeName:t,id:r,node:i||"INPUT",nodeType:n,classList:"",default_values:l||[],default_value:s||"",wp_based:!0,prettified_name:a,label:{location:"after_input",classList:"",innerText:""},value_text_mapping:!0,summary_formatting:o}},createRequestParamFilters=function e(t){var n;return _defineProperty({},t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:[])},unsetDynamicallyConstructedRequestParamFilters=function e(){for(var t,n=DEFAULT_REQUEST_PARAMS().filters.slice(),r=0,a=Object.entries(n);r<a.length;r++){var o=_slicedToArray(a[r],2),i=o[0],s=o[1],o=parseInt(i,10),i=Object.keys(s)[0],s=Object.values(s)[0];"string"==typeof s?n[o]=_defineProperty({},i,"any"===s?"any":""):Array.isArray(s)&&(n[o]=_defineProperty({},i,[]))}var l=DEFAULT_REQUEST_PARAMS();l.filters=n.slice(),window.DEFAULT_REQUEST_PARAMS_=function(){return Immutable.fromJS(l).toJSON()},window.DEFAULT_REQUEST_PARAMS_DEFAULT_VALUES=Immutable.fromJS(l).toJSON()};APP.dontSetDefaultSelectAndLToptions=function(e){var t=parseURLparamsFromQueryString(window.location.search.slice(1)),n=["address","postal_code","zip_code","neighborhood","subdivision"].concat([e||""]);return Object.keys(t).some(function(t){return n.some(function(e){return e.includes(t)})})},APP.extendFormMappingWithHomeTypes=function(){var e,t,r,t,a,o,t,n;APP.dontSetDefaultSelectAndLToptions("home-type")||(t=(e=APP.parseListingTypeTree()).mapping,r=e.default_subdropdown_options,!t||(t=Object.keys(t)).length&&(a=[],o=[],t.map(function(n){var e="home-type-".concat(n),t=r[n];a.push(createFormMappingElement(e,"checkbox",e,"Home Type",{callback:function e(){var t,n;return function e(t){return t&&0!==t.length?"{0}".format(t.join(", ")):null}(arguments.length&&Array.prototype.slice.call(arguments).filter(function(e){return"any"!=="".concat(e).toLowerCase()}))},trigger:"blur change",args:function e(){var t=[];return $('input[name="home-type-'.concat(n,'"]:checked')).each(function(){t.push(""+$(this).next("label").text())}),t}},"INPUT",t,t?[t]:[])),o.push(createRequestParamFilters(e,t?[t]:[]))}),APP.FORM_MAPPING=APP.FORM_MAPPING.concat(a),t=DEFAULT_REQUEST_PARAMS().filters.concat(o),(n=DEFAULT_REQUEST_PARAMS()).filters=t,DEFAULT_REQUEST_PARAMS_=function e(){return Immutable.fromJS(n).toJSON()},DEFAULT_REQUEST_PARAMS_DEFAULT_VALUES=Immutable.fromJS(n).toJSON()))},APP.handleListingTypes=function(){var r=$("select[name=listing_type]"),a=function e(t){return t=convertToJQ(t),APP.hasSuboptions(t)?t.data("sub-dropdown-id"):null},o=function e(t){var n;t=convertToJQ(t),$("input[type=checkbox]",t).toArray().map(function(e){"any"!==e.value&&(e.checked=!1)})},i=function e(t){t.removeClass(APP.hidden_class_name).addClass(APP.hidden_class_name)},s=function e(t){t.removeClass(APP.hidden_class_name)},e,l=function e(n,r,a,t){if(!r)return t?void t.map(function(e){i(e),a||o(e)}):void 0;Object.keys(n).map(function(e){var t=n[e];r!==e?(i(t),a||o(t)):s(t)})},c=function e(t){Object.keys(t).map(function(e){var n=$("input[type=checkbox]",t[e]);n&&n.length&&n.on("change",function(e){var t=getAllCheckboxValues(n),e=e.target&&e.target.value;if(t.length&&e)return"any"===e?($('[name="'.concat(n[0].name,'"]')).prop("checked",!1),void $('[name="'.concat(n[0].name,'"][value="any"]')).prop("checked",!0)):void(t.some(function(e){return"any"===e})&&$('[name="'.concat(n[0].name,'"][value="any"]')).prop("checked",!1))})})}
4,t=function e(t,n){r.on("change",function(){var e=$("option:selected",this),e=a(e);l(t,e,!1,n)}),c(t)},n=function e(){return APP.parseListingTypeTree()}(),u=n.mapping,p=n.default_option,d=n.all_subdropdown_wrappers,n=$("option[data-is-selected='yes']",r);APP.dontSetDefaultSelectAndLToptions("listing-type")?r.val("any"):(l(u,a(n||p),!0),n.length&&extendOrReplaceDefaultReqParams("replace",makeImmutable({listing_type:n.val()}),"listing_type")),t(u,d)},APP.handleSitewideConditionalRerenders=function(){var e=APP.sitewide_conditional_rerenders;e&&e.length&&e.map(function(e){var n=e.nodeName,r=e.conditional_rerender;APP.FORM_MAPPING.map(function(e,t){var e;(e.nodeName===n||"listing_type"===n&&["type","class"].includes(e.nodeName))&&(e=APP.FORM_MAPPING[t].conditional_rerender,r.trigger+=" pseudochange",e&&e.length?APP.FORM_MAPPING[t].conditional_rerender.push(r):APP.FORM_MAPPING[t].conditional_rerender=[r])})})},APP.create_custom_bloodhounds=function(i){return(APP.autocomplete_fields?APP.autocomplete_fields.slice():[]).map(function(r){var n=r.field_type+":"+r.name,a="".concat(r.display_field_type,":").concat(r.display_field_name),e=_defineProperty({},"".concat(n),"".concat(r.value,";").concat(r.display_field_type,":").concat(r.display_field_name)),t=_defineProperty({},a,""),o=shallowCopy(APP.FORM_MAPPING_FOR_BLOODHOUND.toJSON());return o.filters.push(e),APP.FORM_MAPPING_FOR_BLOODHOUND=makeImmutable(o),extendOrReplaceDefaultReqParams("extend",makeImmutable(t)),APP.FORM_MAPPING=APP.FORM_MAPPING.concat([createFormMappingElement("".concat(a),"hidden","".concat(a),"".concat(a),{callback:function e(){var n=arguments.length&&Array.prototype.slice.call(arguments).filter(function(e){return"any"!=="".concat(e).toLowerCase()}),t;return function e(t){return t&&0!==t.length?"".concat(r.label,": ").concat(n.join(", ")):null}(n)},trigger:"blur change",args:function e(){return[$("input[name=".concat(escapeJquerySensitiveChars(a),"]")).val()]}})]),appendHiddenInputToForm("".concat(a)),{display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:i,transform:function e(t){return t&&t[n]&&t[n].length?$.map(t[n],function(e){return{text_match:e.text_match,type:a}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:{header:'<h3 class="header">{0}</h3>'.format(r.label)}}})};var format_extract_subdivision_entry=function e(t){var n="",n=t.full_subdivision?t.full_subdivision.split(", ").join(" | "):"".concat(t.subdivision," | ").concat(t.city," | ").concat(t.state);return t.id&&APP.nbhd_vs_bounds.add(n),n};APP.initBloodhounds=function(t,e,n,r){var r,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{outside_of_main_search_field:null};function o(){for(var r=function e(t){return $.grep(t,function(e){return-1===$.inArray(e.text,selected)})},n=[],e=0;e<APP.FORM_MAPPING.length;e++){var a=APP.FORM_MAPPING[e],t;switch(a.nodeName){case"bedrooms":case"bathrooms":case"pool":case"neighborhoods":case"land_tenure":if("neighborhoods"===a.nodeName&&!APP.neighborhoods)break;(t=$("[name="+a.nodeName+"]").map(function(e,t){if("any"!==$(t).val())return{text:"{0}: {1}".format(a.prettified_name,prettifyCheckboxValue($(t).val())),value:escapeJquerySensitiveChars($(t).val())}})).map(function(e,t){n.push({text:t.text,value:t.value,item_id:a.id,type:"filters",onClickCallback:function e(){var t=arguments[0],n=arguments[1],r,a,o;"neighborhoods"===t.nodeName?(r=allSelectedParentCheckboxValues().map(function(e){return e.replace(":","")}),a=n.split("\\:")[0],-1!==r.indexOf(a)?(o=$('[name="'+t.nodeName+'"][value="'+n+'"]'),uncheckRegionParentByName(r[r.indexOf(a)],function(){o.prop("checked",!0).trigger("change")})):(o=$('[name="'+t.nodeName+'"][value="'+n+'"]')).prop("checked",!0),dontApplyMapBounds(o[0])):$('[name="'+t.nodeName+'"][value="'+n+'"]').prop("checked",!0)}})}),"neighborhoods"===a.nodeName&&(t=$("[id*=parent-]").map(function(e,t){return{text:"Subdivison: ".concat($(t).val()),value:"Subdivison: ".concat($(t).val()),target:t}})).map(function(e,t){n.push({text:t.text,value:t.value,item_id:a.id,type:"filters",onClickCallback:function e(){dontApplyMapBounds($(t.target)),$(t.target).prop("checked",!0).trigger("change")}})});break;
4case"listing_type":case"status":case"days_on_site":$("[name="+a.nodeName+"]")[0]&&(t=$($("[name="+a.nodeName+"]")[0].options).map(function(e,t){if(-1===["Any","---"].indexOf($(t).text()))return{value:t.value,text:"{0}: {1}".format(a.prettified_name,$(t).text())}}).toArray()).map(function(e){n.push({text:e.text,value:e.value,item_id:a.id,type:"filters",onClickCallback:function e(){var t=arguments[0],n=arguments[1],r,a;$('select[name="'+t.nodeName+'"]')[0].sumo&&$('select[name="'+t.nodeName+'"]')[0].sumo.selectItem(n),$("[name="+t.nodeName+"]").val(n).trigger("autocomplete_click"),"conditional_rerender"in t&&((r=t.conditional_rerender.filter(function(e){return"hide_subcontainer"===e.type})).length&&-1!==r[0].trigger_if.indexOf(n)&&$(r[0].subcontainer_selector).prop("checked",!1),t.conditional_rerender.filter(function(e){return"refresh_suggestions"===e.type}).length&&$("[name='{0}']".format(t.nodeName)).trigger("refresh_suggestions"))}})});break;case"property_type":case"sales_conditions":case"special_features":case"amenities":(t=$("[name="+a.nodeName+"]").map(function(e,t){return{value:escapeJquerySensitiveChars($(t).val()),text:"{0}: {1}".format(a.prettified_name,$(t).next().text())}})).map(function(e,t){n.push({text:t.text,value:t.value,item_id:a.id,type:"filters",onClickCallback:function e(){var t=arguments[0],n=arguments[1];$("[name="+t.nodeName+'][value="'+n+'"]').prop("checked",!0).trigger("autocomplete_click");var t=APP.FORM_MAPPING.filter(function(e){return"listing_type"===e.nodeName})[0].conditional_rerender.filter(function(e){return"hide_subcontainer"===e.type});t.length&&t[0].triggerable_value===n&&t[0].deselector_fn.apply(null,[])}})});break;case"additional_options":if(findObjectInArrayByKeyValuePair("item_noneName","additional_options",n))continue;(t=$("[name="+a.nodeName+"]").map(function(e,t){return{text:"{0} {1}".format($(t).parent().parent().parent().prev().text(),$(t).next().text()),value:escapeJquerySensitiveChars($(t).val())}})).map(function(e,t){n.push({text:t.text,value:t.value,item_noneName:a.nodeName,item_id:a.id,type:"filters",onClickCallback:function e(){var t=arguments[0],n=arguments[1];$("[name="+t.nodeName+"][value="+n+"]").prop("checked",!0)}})})}}var o=new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.text)},queryTokenizer:Bloodhound.tokenizers.whitespace,local:n});return o.initialize(),{displayKey:"text",source_:function e(t,n){o.get(t,function(e){n(r(e))})},source:o,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.filters,i.filters))}}var s=o(),l=(c=function e(t){return $.grep(t,function(e){return-1===$.inArray(e.text,selected)})},u=[{text:"Bronx | New York | NY",value:"borough:Bronx",type:"boroughs"},{text:"Brooklyn | New York | NY",value:"borough:Brooklyn",type:"boroughs"},{text:"Manhattan | New York | NY",value:"borough:Manhattan",type:"boroughs"},{text:"Queens | New York | NY",value:"borough:Queens",type:"boroughs"}],(p=new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.text)},queryTokenizer:Bloodhound.tokenizers.whitespace,local:u})).initialize(),{displayKey:"text",source_:function e(t,n){p.get(t,function(e){n(c(e))})},source:p,templates:_objectSpread({},autocompleteTemplates("Boroughs"))}),c,u,p,d={display:"full_address",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.street&&t.street.length?$.map(t.street,function(e){return{text_match:e.text_match,full_address:e.full_address,listing_id:e.listing_id,type:"address"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.form_mapping.address.prettified_name,i.address))},m={display:"full_address",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.listings&&t.listings.length?$.map(t.listings,function(e){return{text_match:e.text_match,full_address:e.full_address,listing_id:e.listing_id,type:"listings_all"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.listings,i.listings_all))},f={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.postal_code&&t.postal_code.length?$.map(t.postal_code,function(e){return{text_match:e.text_match,type:"postal_code"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.zip_code,function(e){return!!e.query.match(/^[\s0-9\.\,\+\-\/]{2,}$/)&&'\n          <h3 class="header">'.concat(APP.translation.autocomplete.headers.zip_code,'</h3>\n          <div class="Typeahead-suggestion Typeahead-selectable">No results found for <strong>').concat(e.query,"</strong></div>\n        ")}))},_={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.neighborhood&&t.neighborhood.length?$.map(t.neighborhood,function(e){return{text_match:format_extract_subdivision_entry(e),type:"neighborhood"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.neighborhood,i.neighborhood))},h={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.subdivision&&t.subdivision.length?$.map(t.subdivision,function(e){return{text_match:format_extract_subdivision_entry(e),type:"subdivision"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates("Subdivisions",i.subdivision))},g={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.city&&t.city.length?$.map(t.city,function(e){return{text_match:e.text_match,type:"city"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.city,i.city))},y={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return!t.listing_id||t.listing_id.length<=0?[]:$.map(t.listing_id,function(e){return{text_match:e.text_match,listing_id:e.listing_id,prefixed_id:e.prefixed_id,type:"listing_id"}})}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.id,i.listing_id))},u={display:"prefixed_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.amenities_inclusion_remarks&&t.amenities_inclusion_remarks.length?$.map(t.amenities_inclusion_remarks,function(e){return{prefixed_match:'See all properties with description "'.concat(e.text_match,'"'),text_match:e.text_match,type:"keyword"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates(APP.translation.autocomplete.headers.keyword,i.keyword))},e={display:"text_match",source:new Bloodhound({datumTokenizer:function e(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:_objectSpread({url:e,transform:function e(t){return t&&t.nearby_schools&&t.nearby_schools.length?$.map(t.nearby_schools,function(e){return{text_match:e.text_match,type:"nearby_schools"}}):[]}},autocomplete_prepare_pragma)}),limit:1/0,templates:_objectSpread({},autocompleteTemplates("Nearby Schools",i.nearby_schools))},P={filters:s,boroughs:l,address:d,listings_all:m,postal_code:f,neighborhood:_,subdivision:h,city:g,listing_id:y,keyword:u,nearby_schools:e},b=[s],b=(b=location.href.includes("djk")||location.href.includes("stationcities")?b.concat(l):b).concat(g);return b=(b=!APP.neighborhoods?b.concat(_):b).concat([h,f,d,m,y,u,e]),r&&(b=[],r.map(function(e){b.push(P[e])})),(r=$(t)).typeahead.apply(r,[{highlight:!0,hint:$(".Typeahead-hint-".concat(randomIntFromInterval(10,200))),menu:$(".Typeahead-menu-".concat(randomIntFromInterval(10,200))),minLength:2,autoselect:!0,classNames:{input:"Typeahead-input",hint:"Typeahead-hint",menu:"Typeahead-menu",dataset:"Typeahead-dataset",open:"is-open",empty:"is-empty",cursor:"is-active",suggestion:"Typeahead-suggestion",selectable:"Typeahead-selectable"}}
4].concat(_toConsumableArray([].concat(b).concat(n)))).on("keydown",function(e){var t=jQuery.Event("keypress");t.keyCode=t.which=9,13===t.which&&$(this).trigger(t)}).bind("typeahead:render",function(e){$(t).parent().find(".Typeahead-selectable:first").addClass("is-active"),$(t).parent()&&$(t).parent().find(".Typeahead-selectable:first").length&&(APP.first_selectable_item=$(t).parent().find(".Typeahead-selectable.is-active")),APP.first_selectable_item_interval=setInterval(function(){$(".Typeahead-selectable.is-active")&&$(".Typeahead-selectable.is-active").length&&(APP.first_selectable_item=$(".Typeahead-selectable.is-active"))},200),bindTypeaheadHovers($(".Typeahead-selectable"),"is-active"),bindMagnifyingGlass()}).on("typeahead:asyncrequest",function(e){a&&void 0!==a.outside_of_main_search_field&&!0===a.outside_of_main_search_field||e.target&&e.target.value&&2<e.target.value.length&&($(".Typeahead-asyncloading").show().text('Loading results for "'.concat(e.target.value,'"...')),APP._typeaheadAsyncLoaderTimeout=setTimeout(function(){$(".Typeahead-asyncloading").hide()},1e4))}).on("typeahead:asynccancel typeahead:asyncreceive",function(){a&&void 0!==a.outside_of_main_search_field&&!0===a.outside_of_main_search_field||($(".Typeahead-asyncloading").hide().text(""),clearTimeout(APP._typeaheadAsyncLoaderTimeout))}).on("blur",function(){$(".Typeahead-asyncloading").hide()}),$(t)},APP.handleDefaultSelectOptions=function(){$("form#search select").toArray().map(function(t){var n=$(t);n.children().toArray().filter(function(e){return"yes"===$(e).data("is-selected")}).map(function(e){extendOrReplaceDefaultReqParams("replace",makeImmutable(_defineProperty({},"".concat(n[0].name),e.value)),"".concat(n[0].name)),APP.dontSetDefaultSelectAndLToptions(t.name)||(n.val(e.value),$(e).prop("selected",!0))})})};var extendOrReplaceDefaultReqParams=function e(t,n,r){var a=DEFAULT_REQUEST_PARAMS(),o=a.filters.slice();if("replace"===t){for(var i,s=0;s<o.length;s++){var l=o[s];if(Object.keys(l).includes(r)){i=s;break}}i&&o.splice(i,1)}o=o.concat(n.toJSON()),a.filters=o.slice();var c=makeImmutable(a);window.DEFAULT_REQUEST_PARAMS_=function(){return c.toJSON()},DEFAULT_REQUEST_PARAMS_DEFAULT_VALUES=c.toJSON()};function removeParamFromUrl(e){var t=document.location.href,n=t.split("?");if(2<=n.length){for(var r=n.shift(),n=n.join("?"),a=encodeURIComponent(e)+"=",o=n.split(/[&;]/g),i=o.length;0<i--;)-1!==o[i].lastIndexOf(a,0)&&o.splice(i,1);t=r+"?"+o.join("&"),window.history.pushState({last_request:APP.last_request},document.title,t)}return t}function setURLParams(e,t,n){if(t){if(n)return e;APP.dont_apply_map_bounds&&(delete e.shape,delete e.method);var r=Date.now();return URLHistoryTimer>r?throttle(window.history.replaceState(null,"",e),200):throttle(window.history.pushState(null,"",e),200),void(URLHistoryTimer=r+URLHistoryThreshold)}var t=window.location.hash,n,n=APP.custom_title||(APP.NB_HITS&&!isNaN(APP.NB_HITS)?APP.get_title(APP.NB_HITS):APP.get_title(void 0));APP.$headline.removeClass("d-none").text(n),APP.$search_form_results.hasClass("map-hidden")?e.hide_map="true":delete e.hide_map,isInteractiveSearch()&&(e.interactive=!0);var n=url_serialize(e,!0),n;if((n=0!==n.length?"?"+n:"")===APP.last_serialized_url_params)return!1;var r=Date.now();URLHistoryTimer>r||APP.__BACK_BTN_CLICKED||APP.first_url_parse?(window.history.replaceState({last_request:e},"",n+t),APP.__BACK_BTN_CLICKED=!1):window.history.pushState({last_request:e},"",n+t),URLHistoryTimer=r+URLHistoryThreshold,APP.last_serialized_url_params=n,APP.just_done_drawing=!1,$(window).trigger("url_params_set"),send_to_ga("pageview",window.location.href,"SearchPage Interaction")}
4APP.handleCustomFieldSelect=function(){var e=$(":regex(name,custom_fields_dropdown)");e&&e.length&&_toConsumableArray(e).map(function(e){var t=$(e);t.children().toArray().filter(function(e){return"yes"===$(e).data("is-selected")}).map(function(e){t.val(e.value),$(e).prop("checked",!0)});var n=t.prop("name"),e=$('[name="'.concat(n,'"]:checked')).toArray().map(function(e){return e.value})[0],e=_defineProperty({},n,e||"");extendOrReplaceDefaultReqParams("extend",makeImmutable(e)),APP.FORM_MAPPING=APP.FORM_MAPPING.concat([createFormMappingElement(n,"select",n,"Custom Field",{callback:function e(t){if(!t)return null;var n=(t=t[0]).value;if(!n||n&&"any"===n.toLowerCase()||n&&n.toLowerCase().endsWith(";any"))return null;var r,t=$(t).data("pillbox-name")||"Custom Field";return"".concat(t)},trigger:"blur change",args:function e(t){if(t)return $("[name='".concat(n,"'] option[value='").concat(t,"']"));if(!$("[name='".concat(n,"']")).val())return null;var t,t=$("[name='".concat(n,"'] option[value='")+escapeJquerySpaces($("[name='".concat(n,"']")).val())+"']");return(t=!t.length?$("[name='".concat(n,"'] option[value='")+$("[name='".concat(n,"']")).val()+"']"):t).length?t:[{value:$("[name='".concat(n,"']")).val()}]}},"SELECT",t.val())])})}
4,APP.handleCustomFieldCheckboxes=function(){var e=$(":regex(name,custom_fields_checkboxes)");e&&e.length&&_toConsumableArray(e).map(function(e){return e.name}).filter(onlyUnique).map(function(n){var e=$('[name="'.concat(n,'"]'));e.toArray().filter(function(e){return"yes"===$(e).data("is-selected")}).map(function(e){return $(e).prop("checked",!0)}),e.trigger("change");var t=$('[name="'.concat(n,'"]:checked')).toArray().map(function(e){return e.value}),e=_defineProperty({},n,t);setURLParams(_defineProperty({},n,t)),extendOrReplaceDefaultReqParams("extend",makeImmutable(e)),APP.FORM_MAPPING=APP.FORM_MAPPING.concat([createFormMappingElement(n,"checkbox",n,"Custom Fields",{callback:function e(){for(var n=[],t=0,r;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return!t||0===t.length||t&&1===t.length&&t[0].toLowerCase().endsWith("any")?null:"".concat(n.join(", "))}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name='".concat(n,"']:checked")).each(function(){t.push(""+$(this).next("label").text())}),t}},"INPUT","",t)])})};var anyIsOneOfSelectionOptiony=function e(t){return _toConsumableArray(t[0].options).filter(function(e){return"any"===e.value})},optionByValue=function e(t,n){return _toConsumableArray(t[0].options).filter(function(e){return e.value===n})[0]};APP.handleSalesRentalToggle=function(){var r=$('[name="sales-rentals"]'),e,t,n;r&&r.length&&(e=function e(t){var n=$(r.toArray().filter(function(e){return e.value===t})[0]);setTimeout(function(){n.prop("checked",!0),r.parent().siblings().removeClass("active"),$('[name="sales-rentals"]:checked').parent().removeClass("active").addClass("active"),APP.force_retrigger_form=!0},20)},t=$("[name='listing_type']"),(n=t.find(":selected").length&&t.find(":selected")[0].value)&&e(n),r.on("change",function(){var e=$
4('[name="sales-rentals"]:checked').val(),e=optionByValue(t,e);e&&t.val(e.value).trigger("change")}),t.on("pseudochange autocomplete_click change",function(){n=t.find(":selected")[0].value,e(n),setTimeout(function(){"any"!==t.val()&&_toConsumableArray(r).map(function(e){return e.value}).includes(t.val())||(r.prop("checked",!1),_toConsumableArray(r).map(function(e){return $(e).parent().removeClass("active")}))},50)}))},APP.handleResidentialCommercialToggle=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if($('[name="class"], [name="type"]').parent().removeClass("active"),e)return $('[name="class"][value="'.concat(APP.REQUEST_DEFAULTS.class(),'"]')).prop("checked",!0).parent().addClass("active"),void $('[name="type"][value="'.concat(APP.REQUEST_DEFAULTS.type(),'"]')).prop("checked",!0).parent().addClass("active");var t=APP.initialParseFromUrl,e=t.class,t=t.type;(e?$('[name="class"][value="'.concat(e,'"]')):$('[name="class"][value="'.concat(APP.REQUEST_DEFAULTS.class(),'"]'))).prop("checked",!0).parent().addClass("active"),(t?$('[name="type"][value="'.concat(t,'"]')):$('[name="type"][value="'.concat(APP.REQUEST_DEFAULTS.type(),'"]'))).prop("checked",!0).parent().addClass("active")};var is_ff=function e(){return-1<navigator.userAgent.toLowerCase().indexOf("firefox")},R_SPACE_AFTER_COMMA=/,s?/gim,R_TWO_OR_MORE_WHITESPACE=/^\s|\s{2,}/gim,R_THREE_OR_MORE_WHITESPACE=/^\s|\s{3,}/gim,removeFromValues=function e(t,n,r){try{var a=t.val();if(1===(a=!isArray(a)?a.split(R_SPACE_AFTER_COMMA).map(function(e){return e.replace(R_THREE_OR_MORE_WHITESPACE,"")}).filter(function(e){return 0<e.length}):a).length)return void t.val(r||"");var o=n.replace(R_THREE_OR_MORE_WHITESPACE,"");if(!a.includes(o))try{var i="".concat(o),o;o=(o=a.filter(function(e){return e.includes(i)})[0])||i}catch(e){console.warn({err:e})}a.spliceBy(o),t.val(a.join(", "))}catch(e){console.warn({err:e})}},addToValues=function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",a=t.val();(a=!isArray(a)?a.split(R_SPACE_AFTER_COMMA).map(function(e){return e.replace(R_THREE_OR_MORE_WHITESPACE,"")}).filter(function(e){return 0<e.length}):a).includes(n)||(a.push(n),t.val(a.join(", ")),r&&r.length&&t.trigger(r))},parsePreselectedSortValue=function e(){var t="price_desc",n=_toConsumableArray($('[name="sort_order"]')[0].options).filter(function(e){return!0===$(e).data("is-selected")});return n.length?n[0].value:t},handleMaxPriceSuggestionsConditionalVisibility=function e(){var t=$("#search-min-price"),r=$(".price.suggestions.right");t.on("change pseudochange",function(){var n=parseFloat(formatFormattedStringToFloatKeepPlus(t.val())),e;r.data("current_min",n),_toConsumableArray(r.find(".sug")).map(function(e){return $(e).removeClass("hidden")}).map(function(e){var e=$(e),t;e.data("pure-val")<=n&&e.addClass("hidden")})})};function isSearchPage(){return window.location.pathname.includes("search")}var extend=function r(a){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];var o={},i=0;"[object Boolean]"===Object.prototype.toString.call(a)&&i++;for(var s=function e(t){for(var n in t)t.hasOwnProperty(n)&&(a&&"[object Object]"===Object.prototype.toString.call(t[n])?o[n]=r(a,o[n],t[n]):o[n]=t[n])};i<arguments.length;i++)s(arguments[i]);return o};function mergeDeep(e,t){if(void 0!==t&&!1===t)return{};for(var n=arguments.length,r=new Array(2<n?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return r.length?extend.apply(void 0,[!0,_objectSpread({},e)].concat(r)):e}function parseTransitStops(e){if(!e||!e.length)return[];if(e[0].route_name)return e;var n=[];return e.map(function(t){n=n.concat(t.lines.map(function(e){return e.area_name=t.area_name,e}))}),n.filter(function(t,e,n){return n.findIndex(function(e){return e.route_id===t.route_id&&e.route_name===t.route_name})===e}).map(function(e){return lineToHoganLambda(e,"",!0)})}function handleTransitToggle(){var t=new google.maps.TransitLayer,n=APP.$button_transit_toggle;n.on("click",function(e){e.preventDefault(),t.getMap()?(n.removeClass("active"),t.setMap(null),APP.map.setOptions({clickableIcons:!1})):(n.addClass("active"),t.setMap(APP.map),APP.map.setOptions({clickableIcons:!0})),setTimeout(function(){APP.map.setStylingBasedOnZoom(APP.map.getZoom())},50)}),APP.defaultToShownTransitLayer&&n.click()}var urlToDict=function e(){var t,n=parseURLparamsFromQueryString(0<arguments.length&&void 0!==arguments[0]?arguments[0]:window.location.search.slice(1));return APP.initialParseFromUrl||(APP.initialParseFromUrl=n,APP.ALWAYS_SHOWING_SEARCH_PARAM_KEYS=[].concat(APP.ALWAYS_SHOWING_SEARCH_PARAM_KEYS).concat(Object.keys(APP.initialParseFromUrl))),n};function throttle(n,r){var a,o,i,s=null,l=0;function c(){l=Date.now(),s=null,i=n.apply(a,o),s||(a=o=null)}return function(){var e=Date.now(),t=r-(e-l);return a=this,o=arguments,t<=0||r<t?(s&&(clearTimeout(s),s=null),l=e,i=n.apply(a,o),s||(a=o=null)):s=s||setTimeout(c,t),i}}var rgbToHex_=function e(t,n,r){return"#"+((1<<24)+(t<<16)+(n<<8)+r).toString(16).slice(1)},invertColor=function e(t,n){var r=t,a;if(t.includes("rgb")&&(a=t.replace(/[^0-9\s,]/g,"").split(/,[\s]?/g).map(parseFloat),t=rgbToHex_(a[0],a[1],a[2])),6!==(t=3===(t=0===t.indexOf("#")?t.slice(1):t).length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t).length)throw new Error("Invalid HEX color.");var o=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),t=parseInt(t.slice(4,6),16);return n?186<.299*o+.587*a+.114*t?"#000000":"#FFFFFF":(o=(255-o).toString(16),a=(255-a).toString(16),t=(255-t).toString(16),"#"+padZero(o)+padZero(a)+padZero(t))},lineToHoganLambda=function e(t,n,r){return t&&t.color?(t.color.length<=2&&(t.bg_color.length<=2&&(t.bg_color="#000000"),t.color=invertColor(t.bg_color,!0)),r?t:'\n        <sp
4an\n        class="line-symbol '.concat(n=n||"circle_",'"\n        style="color:').concat(t.color,"; background-color:").concat(t.bg_color,'">\n              <span class="line-num">').concat("Subway or metro"===t.route_type?t.route_name:t.route_id,"</span>\n        </span>\n      ")):""},transitStopWithDistanceToHoganLambda=function e(t,n){n=n||"circle_";var n=t.lines.map(function(e){return lineToHoganLambda(e)}).join("\n");return'\n  <div class="transport-line-wrapper">\n    <div class="transport-line-object">\n        <div class="station-specs">\n            <div class="station-name">'.concat(t.stop_name,'</div>\n            <div class="line-symbols">').concat(n,'</div>\n            <div class="station-dist">').concat(t.times,"</div>\n        </div>\n    </div>\n  </div>\n      ")},mergeArraysOfObjects=function e(t,n){return Array.prototype.push.apply(t,n),t},findInArr=function e(t,n,r){return t.findIndex(function(e){return e[n]===r})},stopNameAggToValueTextCustomMapping=function e(){var t=APP.transit_stops?APP.transit_stops.slice():[],n,t;return(t=function e(t){var n=[];return t.map(function(e){var t=findInArr(n,"stop_name",e.stop_name);-1!==t?n[t].lines=mergeArraysOfObjects(n[t].lines,e.lines):n.push(e)}),n}(t=t.filter(function(e){return e.lines.some(function(e){return"Subway or metro"===e.route_type})})).sort(function(e,t){return e.stop_name>t.stop_name?1:t.stop_name>e.stop_name?-1:0})).map(function(e){var t=e.lines.sort(function(e,t){return e.route_id>t.route_id?1:t.route_id>e.route_id?-1:0}).map(function(e){return{line:lineToHoganLambda(e)}});return{area_name:e.area_name,stop_name:e.stop_name,lines:t}})};function randomIntFromInterval(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function setSelectedOptionByValue(e,t){try{var n=$("[name=".concat(e,"] [value='").concat(escapeJquerySensitiveChars(t),"']"));$("[name=".concat(e)).val(n.val())}catch(e){console.warn(e)}}function fallbackCopyTextToClipboard(e){var t=document.createElement("textarea");t.value=e,t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n,r=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+r)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}function copyTextToClipboard(e){navigator.clipboard?navigator.clipboard.writeText(e).then(function(){console.log("Async: Copying to clipboard was successful!")},function(e){console.error("Async: Could not copy text: ",e)}):fallbackCopyTextToClipboard(e)}function getEnvVarialbe(t){if(APP.envVariables.length&&Array.isArray(APP.envVariables)){var e=APP.envVariables.find(function(e){return e.variable_name===t});return void 0!==e?e.value.split("x"):!1}return!1}APP.showCopyableSavedSearch=function(e){var t;e&&APP.copyableSavedSearch?($("#copyableSavedSearch").length?(t=$("#copyableSavedSearch")[0]).innerHTML=JSON.stringify(e):($("<textarea>",{id:"copyableSavedSearch"}),$("<style>#copyableSavedSearch:after {\n          content: 'Click inside to copy as saved search!';\n          display: inline-block;\n          position: fixed;\n          bottom: 167px;\n          right: 20px;\n          font-size: 10px;\n          z-index: 200;\n          background: yellow;\n          font-weight: bold;\n          color: black;\n          padding: 3px;\n          width: 150px;\n          padding-right: 40px;\n          line-height: 1.4;\n          padding-top: 4px;\n          cursor: initial;\n      }</style>").appendTo("head"),$("body").append('\n        <div id="copyableSavedSearch"\n                style="position: fixed;\n                  bottom: 20px;\n                  right: 20px;\n                  border-radius: 4px;\n                  background: white;\n                  overflow-x: hidden;\n                  height: 150px;\n                  width: 150px;\n                  box-shadow: 0 5px 10px -3px #AAA;\n                  padding: 8px;\n                  font-size: 7px;\n                  word-break: break-all;\n                  overflow-y: auto;\n                  cursor: context-menu;">'.concat(JSON.stringify(e),"</div>\n      "))),$("#copyableSavedSearch").on("click",function(){copyTextToClipboard($("#copyableSavedSearch").text())})):$("#copyableSavedSearch").remove()};var compose=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){return n.reduce(function(e,t){return t(e)},e)}};function getFullStateName(e){var t={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"},n;for(n in t)if(t.hasOwnProperty(n)&&e===n)return t[n];return null}function generateGoogleCalendarLink(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{event_title:"",iso_start:"",iso_end:"",location:"",description:""},t=function e(t){try{return t.replace(/-|:|\.\d\d\d/g,"")}catch(e){return t}};return"http://www.google.com/calendar/render?\n\naction=TEMPLATE\n\n&text=".concat(e.event_title,"\n\n&dates=").concat(t(e.iso_start),"/").concat(t(e.iso_end),"\n\n&details=").concat(e.description,"\n\n&location=").concat(e.location,"\n\n&trp=false\n\n&sprop=\n\n&sprop=name:\n\n  ").replace(/\n/g,"")}function getEmbeddableVideoUrl(t){if(!t||"string"!=typeof t)return null;if(t=t.trim(),/^https?:\/\/(www\.)?youtube\.com\/embed\/[\w-]+/.test(t)||/^https?:\/\/player\.vimeo\.com\/video\/\d+/.test(t))return t;try{var e=new URL(t),n=e.hostname;if(n.includes("vimeo.com")){var r=t.match(/vimeo\.com\/(?:.*\/)?(\d+)/);if(r){var r=r[1];return"https://player.vimeo.com/video/".concat(r)}}if(n.includes("youtube.com")||n.includes("youtu.be")){var n=null;e.searchParams.has("v")&&(n=e.searchParams.get("v"));var e=t.match(/youtu\.be\/([\w-]+)/);if(n=!n&&e?e[1]:n)return"https://www.youtube.com/embed/".concat(n)}}catch(e){return t}return t}
5"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to de
5structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n=[],a=!0,o=!1,i,l;try{for(r=r.call(e);!(a=(i=r.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){o=!0,l=e}finally{try{a||null==r.return||r.return()}finally{if(o)throw l}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,e=function e(){};return{s:e,n:function e(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function e(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=!0,o=!1,i;return{s:function e(){r=r.call(t)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){o=!0,i=t},f:function e(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ownKeys(t,e){var r=Object.keys(t),n;return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}APP.saved_properties=APP.saved_properties||[],APP.hidden_properties=APP.hidden_properties||[],APP.history_=[],APP.hw={init:function e(){var a,o;a=window.history,o=a.pushState,a.pushState=function(e,t,r){var n="undefined"!=typeof Hashes&&e&&e.last_request&&hashObject(e.last_request);return n?(!APP.history_||APP.history_.reverse().slice(0).hash!==n)&&(APP.history_.push({hash:n,url:r,state:_objectSpread({},e)}),o.apply(a,arguments)):o.apply(a,arguments)}},by_param_hash:function e(t){setURLParams(APP.history_.filter(function(e){return e.hash=t}).url,!0)},modalHistory:{init:function e(){APP._modalHistory=[]},getLatest:function e(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!APP._modalHistory||!APP._modalHistory.length)return null;var r=APP._modalHistory.sort(dynamicSort("-timestamp"));return t?r:r[0]},addById:function e(t){var r=APP.hw.modalHistory.getLatest();!APP._modalHistory||r&&r.id===t||APP._modalHistory.push({id:t,timestamp:+new Date})},removeById:function e(t){var r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(t){var n,a=_createForOfIteratorHelper((r?APP.hw.modalHistory.getLatest(!0):APP._modalHistory).entries()),o;try{for(a.s();!(o=a.n()).done;){var i=_slicedToArray(o.value,2),o=i[0],i=i[1];if(i.id===t&&(APP._modalHistory.splice(o,1),r))break}}catch(e){a.e(e)}finally{a.f()}}},goBackOneStep:function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:void 0;APP.hw.modalHistory.removeById(t,!0),$("#close-modal-replace-url").length&&$("#close-modal-replace-url").click();var t=APP.hw.modalHistory.getLatest();t&&t.id&&(createTemporaryModalElement(t.id),handleModals())},canGoBackOneStep:function e(){return APP._modalHistory&&1<APP._modalHistory.length}}},APP.getTheme=function(){try{return APP.childThemeUrl.split("/").pop()}catch(e){return}},APP.request_log=[],APP.rl={getLatest:function e(){return APP.request_log.length?APP.request_log.slice().slice(-1)[0]:{}}},APP.nbhd_vs_bounds={array:[],add:function e(t){return APP.nbhd_vs_bounds.array.push(t)},exists:function e(t){return APP.nbhd_vs_bounds.array.includes(t)}},APP.nb_hits_template=Hogan.compile($("#nb-hits-template").text()),APP.hit_template=Hogan.compile($("#hit-template").text()),APP.no_results_template=Hogan.compile($("#no-results-template").text()),APP.hit_placeholder_template=Hogan.compile($("#placeholder-template").text()),APP.infobubble_template=Hogan.compile($("#infobubble-template").text()),APP.pagination_template=Hogan.compile($("#pagination-template").text()),APP.modal_template=Hogan.compile($("#modal
5-template").text()),APP.pillbox_template=Hogan.compile($("#pillbox-template").text()),APP.$query=$("#q"),APP.$hits=$("#hits"),APP.$search_form_results=$(".search-form-results"),APP.$nb_hits_wrapper=$("#nb-hits-wrapper"),APP.$pagination_wrapper=$(".search-app .search-pagination"),APP.$input_wrapper=$("#input-wrapper"),APP.$headline=$(".headline"),APP.$mapWrapper=$(".map-wrapper"),APP.$form=$('form[id="search"]'),APP.$map_action_wrapper=$(".map-action-wrapper"),APP.$btn_refresh=$("#button-search-in-rect"),APP.$gmap_custom_controls_wrapper=$(".transit-wrapper"),APP.$gmap_move_search=$(".map-interactive-search .checkbox"),APP.$gmap_move_search_input=$("#move-search-input"),APP.$button_transit_toggle=$("#button-transit-toggle"),APP.$button_transit_toggle_span=APP.$button_transit_toggle.find("> span"),APP.$map_toggle_button=$("#toggle-map"),APP.$autocomplete_bounds_object=$("#autocomplete-bounds-object"),APP.$reset_form_button=$(".formResetSearch"),APP.$draw_polygon_btn=$(".draw-polygon").parent(),APP.$draw_rectangle_btn=$(".draw-rectangle").parent(),APP.$draw_circle_btn=$(".draw-circle").parent(),APP.$clear_drawings_btn=$(".clear-drawings").parent(),APP.$done_drawing_btn=$(".done-btn"),APP.$toggle_drawing_btn=$(".toggle-drawing").parent(),APP.$mapProgress={lastPercentage:0,show:function e(){return $(".map-progress-bar").removeClass("d-none")},hide:function e(){return setTimeout(function(){$(".map-progress-bar").removeClass("d-none").addClass("d-none"),APP.$mapProgress.fillPercentage(0),APP.$mapProgress.updateBar(0)},300)},fillPercentage:function e(t){t=Math.min.apply(null,[t,100]),$(".map-progress-bar .percentage").html("".concat(t,"%")),APP.$mapProgress.lastPercentage=t},updateBar:function e(t){t=Math.min.apply(null,[t,100]),$(".map-progress-bar .bar .primary-bar").css("width","".concat(t,"%")),APP.$mapProgress.lastPercentage=t}},APP.default_map_styles=[{featureType:"administrative.country",elementType:"labels.text",stylers:[{lightness:"29"}]},{featureType:"administrative.province",elementType:"labels.text.fill",stylers:[{lightness:"-12"},{color:"#796340"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{lightness:"15"},{saturation:"15"}]},{featureType:"administrative.land_parcel",elementType:"geometry.fill",stylers:[{lightness:"0"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{visibility:"on"},{color:"#f4f4f4"},{lightness:"12"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{visibility:"on"},{lightness:"39"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi.attraction",elementType:"all",stylers:[{visibility:"on"},{lightness:"30"},{saturation:"-41"},{gamma:"0.84"}]},{featureType:"poi.attraction",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi.business",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"poi.business",elementType:"labels",stylers:[{visibility:"simplified"}]},{featureType:"poi.government",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"poi.government",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.medical",elementType:"geometry",stylers:[{color:"#fbd3da"}]},{featureType:"poi.medical",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#b0e9ac"},{visibility:"on"}]},{featureType:"poi.park",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{hue:"#68ff00"},{lightness:"-24"},{gamma:"1.59"}]},{featureType:"poi.sports_complex",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.sports_complex",elementType:"geometry",stylers:[{saturation:"10"},{color:"#c3eb9a"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{visibility:"on"},{lightness:"30"},{color:"#e7ded6"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"on"},{saturation:"-39"},{lightness:"28"},{gamma:"0.86"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffe523"},{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{visibility:"on"},{saturation:"0"},{gamma:"1.44"},{color:"#fbc28b"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"on"},{saturation:"-40"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fed7a5"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{visibility:"on"},{gamma:"1.54"},{color:"#ffffff"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{visibility:"on"},{gamma:"2.62"},{lightness:"10"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{visibility:"on"},{weight:"0.50"},{gamma:"1.04"}]},{featureType:"transit.line",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"transit.station.airport",elementType:"geometry.fill",stylers:[{color:"#dee3fb"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#A3CCFF"}]}],APP.markers={},APP.labels={},APP.temp_marker_labels={},APP.infoBubbles={},APP.selected_info_bubble=null,APP.previewed_listings=[],APP.listings_DOM_listeners=[],APP.marker_click_listeners=[],APP.fit_map_to_markers_automatically=!1,APP.rendering_map=!1,APP.rendering_info_bubble=null,APP.MAP_INIT_CENTER={lat:APP.mapCenter.lat,lng:APP.mapCenter.lng},APP.MAP_INIT_ZOOM=parseInt(APP.mapZoomLevel||11,10),APP.skip_map_on_mobile=function(){return document.body.clientWidth<992},APP.isMobile=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}
5,APP.is_map_hidden=function(){return APP.$search_form_results.hasClass("map-hidden")},APP.totalMarkerClusters=[],APP.markerCluster=null,APP.pseudo_clusters_markers={},APP.zoomToSeeMarkerClusters=function(){return!!APP.map&&APP.map.getZoom()<=14},APP.getListingType=function(e){var t="Sale & Rent",r=APP.last_request||shallowCopy(DEFAULT_REQUEST_PARAMS()),n=findObjectValueInArrayByKey(r.filters,"listing_type");if(!n)return t;try{var a=n.split("_").map(function(e){return e.capitalizeFirstLetter()});return e&&"single_noun"===e?a[1].replace(/s$/g,""):a.join(" ")}catch(e){return t}},APP.get_title=function(e){var t={count:e||""},r=function e(t){return"{0}{1}{2} {3}".format(t.count,t.region,t.type,t.status)},n=APP.last_request||shallowCopy(DEFAULT_REQUEST_PARAMS()),a=findObjectValueInArrayByKey(n.filters,"listing_type"),o=findObjectValueInArrayByKey(n.filters,"status"),e=findObjectValueInArrayByKey(n.filters,"property_type"),n=n.neighborhoods,e;if(a)switch(a){case"sales":t.status="For Sale";break;case"rentals":t.status="For Rent"}else t.status="For Sale";if(o&&-1!==o.indexOf("sold")&&(t.status="Sold"),e&&0<e.length)if(2===e.length)t.type="Single Family Homes & Condos";else switch(e[0]){case"house":t.type="Single Family Homes";break;case"condo":t.type="Condos"}else t.type="Properties";return n&&0<n.length?(e=getSelectedParentRegion())?t.region=" "+e+" ":1===(n=n.map(function(e){return e.split(":")[1]})).length?t.region=" "+n[0]+" ":t.region=" "+n[0]+" ({0}+ Neighborhoods) ".format(n.length-1)+" ":t.region=" ",t.status||(t.status="Available"),r(t)},APP.is_sales=function(){return-1===APP.get_title().toLowerCase().indexOf("rent")},APP.FORCE_SET_BOUNDS=null,APP.fitBaseBounds=function(t,e){var r=!(APP.bounds_fitting_callback=!0),n=function e(){t.apply(null,[]),r=!0,APP.bounds_fitting_callback=null};APP.skip_map_on_mobile()?n():(e?e.apply(null,[]):(APP.map.setCenter(APP.MAP_INIT_CENTER),APP.map.setZoom(APP.MAP_INIT_ZOOM)),google.maps.event.addListenerOnce(APP.map,"idle",function(){n()}),setTimeout(function(){r||n()},1e3))},APP.onRenderCallbacks=[],APP.onTriggerSearchCallbacks=[],APP.boundingBoxes=[],APP.boundingBoxListeners=[],APP.multi_markers_same_spot_array=[];var AUTOCOMPLETE_URL=APP.apiUrl+"/autocomplete",SEARCH_ENDPOINT=APP.apiUrl+"/property/search",CLOUDINARY_RELATED_PREFIX="",SEARCH_GRID_PHOTO_SIZE=getEnvVarialbe("LISTING_SEARCH_GRID_THUMBNAIL_PHOTO_SIZE"),NO_IMG_URL=SEARCH_GRID_PHOTO_SIZE?"https://ik.imagekit.io/virtualresults/tr:f-auto,pr-true,w-"+SEARCH_GRID_PHOTO_SIZE[0]+",h-"+SEARCH_GRID_PHOTO_SIZE[1]+"/noimage.png":"https://ik.imagekit.io/virtualresults/tr:f-auto,pr-true,w-360,h-220/noimage.png",NO_IMG_URL_MODAL="https://ik.imagekit.io/virtualresults/noimage.png",TRANSPARENT_PNG_URL="https://res.cloudinary.com/wp-sites/image/upload/v1538778409/transparent.png";function roundUp(e,t){return Math.ceil(e*t)/t}function mapBoundsToParams(e,t){if(!e)return"";if(t){var r=e.toJSON();return[roundUp(r.north,1e4),roundUp(r.west,1e4),roundUp(r.south,1e4),roundUp(r.east,1e4)].join()}
5var r=e.getNorthEast(),e=e.getSouthWest();return[roundUp(e.lat(),1e4),roundUp(e.lng(),1e4),roundUp(r.lat(),1e4),roundUp(r.lng(),1e4)].join()}APP.num_of_hits=24,APP.HIDDEN_SEARCH_PARAM_KEYS=["num_of_listings_to_show","clusters_needed","viewport","split_vp","center_bias","custom_field_for_neighborhoods","use_custom_field_for_neighborhoods","custom_field_type_for_neighborhoods","cache_query"],APP.PSEUDO_HIDDEN_SEARCH_PARAM_KEYS=["applicable"],APP.HIDDEN_SEARCH_PARAM_KEYS_WHEN_MAP_HIDDEN=["shape","method","center_bias"],APP.ALWAYS_SHOWING_SEARCH_PARAM_KEYS=["status","listing_type"],APP.USER_INTERACTED_WITH_MAP=!1,APP.NON_APPLICABLE_FORM_ITEMS=["offset","map_bounds","zoom","shape","applicable","clusters_needed","num_of_listings_to_show","center_bias"];var toSplitBounds=function e(t,r,n){var a=t||APP.map&&APP.map.getBounds();APP.FORCE_SET_BOUNDS&&!t&&(a=APP.FORCE_SET_BOUNDS);try{for(var o=a.getSouthWest(),i=a.getNorthEast(),l=r||2,s=[],p=[],P=(i.lng()-o.lng())/l,u=(i.lat()-o.lat())/l,c=0;c<l;c++)for(var _=0;_<l;_++){var m=o.lat()+u*(_+1),y=o.lat()+u*_,d=o.lng()+P*(c+1),f=o.lng()+P*c,m=new google.maps.LatLngBounds({lat:y,lng:f},{lat:m,lng:d}),d=m.getCenter();s.push(mapBoundsToParams(m,!0)),p.push([roundUp(d.lng(),1e4),roundUp(d.lat(),1e4)])}return n?p:s.join("/")}catch(e){return console.warn(e),n?[]:null}},MOMENT_PARSER_FORMATS=["X","x","MM/DD/YY","D MMMM, YYYY","MM/D/YY"],PICKADATE_SETTINGS={showMonthsShort:void 0,showWeekdaysFull:void 0,today:"Today",clear:"Clear",close:"Close",labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",format:" mm/dd/yy",formatSubmit:"mm/dd/yy",hiddenPrefix:void 0,hiddenSuffix:"_submit",hiddenName:void 0,editable:!1,selectYears:void 0,selectMonths:void 0,firstDay:void 0,min:!0,max:void 0,closeOnSelect:!0,closeOnClear:!0,container:"body",onClose:function e(){$(document.activeElement).blur()},onSet:function e(t){console.info("on picker set",t)},onRender:function e(){$(window).on("_rendered",function(){APP.tmps&&(APP.tmps.picker_min&&APP.picker_open_house_min?APP.picker_open_house_min.set("select",moment(APP.tmps.picker_min,MOMENT_PARSER_FORMATS).startOf("day").toDate()):APP.picker_open_house_min.clear(),APP.tmps.picker_max&&APP.picker_open_house_max?APP.picker_open_house_max.set("select",moment(APP.tmps.picker_max,MOMENT_PARSER_FORMATS).endOf("day").toDate()):APP.picker_open_house_max.clear())})}},URLHistoryTimer=Date.now(),URLHistoryThreshold=700;APP.pseudoclusters_markers={},APP.total_marker_clusters=[],APP.map_drawing_overlays=[],APP.customBoundary=null,APP.map_drawing_colors={strokeColor:"#333",strokeOpacity:1,strokeWeight:2,fillColor:"#333",fillOpacity:.06},"google"in window&&(APP.drawing_marker_style={draggable:!0,crossOnDrag:!1,icon:{path:google.maps.SymbolPath.CIRCLE,scale:4,strokeWeight:1,fillColor:"#FFFFFF",fillOpacity:1}}),APP.GTAG_UA="gtag_UA_112545831_1",APP.price_ranges={sales:[].concat([].rangeOfChars(1e5,3e5,5e4)).concat([].rangeOfChars(4e5,7e5,1e5)).concat([75e4,8e5,9e5]).concat([].rangeOfChars(1e6,3e6,25e4)).concat([].rangeOfChars(35e5,5e6,5e5)).concat([].rangeOfChars(6e6,1e7,1e6)).concat([].rangeOfChars(12e6,2e7,2e6)),rentals:[500,750,1e3,1250,1500,1750,2e3,2500,3e3,3500,4e3,4500,5e3,6e3,7e3,8e3,9e3,1e4,12500,15e3]},"lei"===APP.getTheme()&&(APP.price_ranges.sales=Array.from({length:50},function(e,t){return 1e6*(t+1)})),APP.homeUrl.includes("loftway.com")&&(APP.price_ranges.rentals=[2e3,3e3,4e3,5e3,7e3,1e4,2e4,3e4,4e4,5e4,6e4,7e4,8e4,9e4,1e5,11e4,12e4,13e4,14e4,15e4,16e4]),APP.fn_matching_sales=[function(e){return e.toLowerCase().includes("sale")},function(e){return!e.toLowerCase().includes("rent")&&!e.toLowerCase().includes("lease")}],APP.fn_matching_rentals=[function(e){return e.toLowerCase().includes("rent")},function(e){return e.toLowerCase().includes("lease")}],APP.form_triggers={non_argumented_form:null,redo_clicked:null,location_flush:null,interactive_search:function e(){return APP.$gmap_move_search_input.is(":checked")},first_boundary_draw:null},APP.checkRedoGridParameters=function(){return objValues(APP.form_triggers).some(function(e){return isFunction(e)?!0===e.call():null!==e})},APP.resetRedoGridParameters=function(){Object.keys(APP.form_triggers).forEac
5h(function(e){e.contains_str("interactive")||(APP.form_triggers[e]=null)})},APP.hidden_class_name="d-none",APP.shepherd_tour_items={};
6"use strict";window.APP.initSplitViewport="33.6899,-118.2033,33.4634,-117.8943/33.9164,-118.2033,33.6899,-117.8943/33.6899,-117.8943,33.4634,-117.5853/33.9164,-117.8943,33.6899,-117.5853",window.APP.initBBOX="BBOX(33.4634,-118.2033,33.9164,-117.5853)";
7"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}APP.FORM_MAPPING=[{nodeName:"bedrooms",id:"bedrooms-checkboxes",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],set_default_value:{value:"any",selector:"input[name='bedrooms'][value='any']",class_to_toggle:"active"},summary_formatting:{callback:function e(){for(var a=[],t=0,n;t<arguments.length;t++)arguments[t]&&"any"===arguments[t].toLowerCase()||a.push(arguments[t]);return function e(t){if(!t||0===t.length)return null;if(isArray(t)){if(1===t.length)return"{0}: {1}".format(APP.translation.form_mapping.bedrooms.prettified_name,(t[0]+(t[0],"")).capitalizeFirstLetter().trim());var n=[];return a.map(function(e){n.push((""+e).capitalizeFirstLetter())}),a=n.join(", "),"{0}: {1}".format(APP.translation.form_mapping.bedrooms.prettified_name,a.trim())}}(a)},trigger:"blur change",args:function e(){var t=[];return $("input[name=bedrooms]:checked").each(function(){t.push(""+$(this).parent().text())}),t}},prettified_name:APP.translation.form_mapping.bedrooms.prettified_name,value_text_mapping:APP.translation.form_mapping.bedrooms.values,compiled_hogan_template:Hogan.compile("{{#hits}}<label class='btn btn-default checkbox-trigger'>                                    <input type='radio' name='{{name}}' id='{{id}}' value='{{val}}' autocomplete='off'> {{text}}                                </label>{{/hits}}")},{nodeName:"bathrooms",id:"bathrooms-checkboxes",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],set_default_value:{value:"studio",selector:"input[name='bathrooms'][value='any']",class_to_toggle:"active"},prettified_name:APP.translation.form_mapping.bathrooms.prettified_name,summary_formatting:{callback:function e(){for(var a=[],t=0,n;t<arguments.length;t++)arguments[t]&&"any"===arguments[t].toLowerCase()||a.push(arguments[t]);return function e(t){if(!t||0===t.length)return null;if(isArray(t)){if(1===t.length)return"{0}: {1}".format(APP.translation.form_mapping.bathrooms.prettified_name,(t[0]+(t[0],"")).capitalizeFirstLetter());var n=[];return a.map(function(e){n.push((""+e).capitalizeFirstLetter())}),a=n.join(", "),"{0}: {1}".format(_app.translation.form_mapping.bathrooms.prettified_name,a)}}(a)},trigger:"blur change",args:function e(){var t=[];return $("input[name=bathrooms]:checked").each(function(){t.push(""+$(this).val())}),t}},value_text_mapping:APP.translation.form_mapping.bathrooms.values,compiled_hogan_template:Hogan.compile("{{#hits}}<label class='btn btn-default checkbox-trigger'>                                    <input type='radio' name='{{name}}' id='{{id}}' value='{{val}}' autocomplete='off'> {{text}}                                </label>{{/hits}}")},{nodeName:"prices_min",id:"search-min-price",node:"INPUT",nodeType:"tel",classList:["form-control","apply-currency"],placeholder:"Minimum",default_value:"",label:{location:"before_input",classList:"sr-only",innerText:"Min price"},pre_formatting_callback:{function:handleMoneyFormatting,args:[APP.getCurrency(),0,3]},mid_formatting_callback:{function:String.prototype.formatLongNumber,args:[0,3,!0]},post_formatting_callback:{function:formatFormattedStringToFloatKeepPlus,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"{0}: {1} {2} {3}".format(APP.translation.form_mapping.price.prettified_name,t,APP.translation.form_mapping.keywords.to,n):"{0}: {1} {2}".format(APP.translation.form_mapping.price.prettified_name,APP.translation.form_mapping.keywords.over,t):"{0}: {1} {2}".format(APP.translation.form_mapping.price.prettified_name,APP.translation.form_mapping.keywords.under,n):null}(t,n)},trigger:"blur",args:function e(){return[formatPriceSimplified(formatFormattedStringToFloat($("#search-min-price").val()),"0.0a"),formatPriceSimplified(formatFormattedStringToFloat($("#search-max-price").val()),"0.0a")]}},suggestions:{data_for_selector:"[data-for='price-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='price suggestions left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=arguments,a,r=APP.price_ranges.rentals,o=APP.price_ranges.sales,s,i,l,l,a,u=a=1<arguments.length?APP.fn_matching_sales.some(function(e){return e(n[1])})?o:r:(s=$("[name=listing_type]")&&$("[name=listing_type]").val(),i=APP.initialParseFromUrl&&APP.initialParseFromUrl.listing_type,(l=i&&i!==s?i:s)&&APP.fn_matching_rentals.some(function(e){return e(l)})?r:o),o=(a=a.map(function(e){return formatPriceSimplified(e,"0.0a",a[0]===APP.price_ranges.rentals[
70])})).map(function(e,t){return{pure_val:u[t],val:e}});return t.render({hits:o})},trigger:"focus",elements_to_listen_to:"#search-min-price",listener:function e(t){setTimeout(function(){},300)}}},{nodeName:"prices_max",id:"search-max-price",node:"INPUT",nodeType:"tel",classList:["form-control","apply-currency"],placeholder:"Maximum",default_value:"",label:{location:"before_input",classList:"sr-only",innerText:"Max price"},pre_formatting_callback:{function:handleMoneyFormatting,args:[APP.getCurrency(),0,3]},mid_formatting_callback:{function:String.prototype.formatLongNumber,args:[0,3,!0]},post_formatting_callback:{function:formatFormattedStringToFloatKeepPlus,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"{0}: {1} {2} {3}".format(APP.translation.form_mapping.price.prettified_name,t,APP.translation.form_mapping.keywords.to,n):"{0}: {1} {2}".format(APP.translation.form_mapping.price.prettified_name,APP.translation.form_mapping.keywords.over,t):"{0}: {1} {2}".format(APP.translation.form_mapping.price.prettified_name,APP.translation.form_mapping.keywords.under,n):null}(t,n)},trigger:"blur",args:function e(){return[formatPriceSimplified(formatFormattedStringToFloat($("#search-min-price").val()),"0.0a"),formatPriceSimplified(formatFormattedStringToFloat($("#search-max-price").val()),"0.0a")]}},suggestions:{data_for_selector:"[data-for='price-suggestions-right']",data_for_subselector:".right",compiled_hogan_template:Hogan.compile("                <div class='price suggestions right d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=arguments,a,r=APP.price_ranges.rentals,o=APP.price_ranges.sales,s,i,l,l,a,u=a=1<arguments.length?APP.fn_matching_sales.some(function(e){return e(n[1])})?o:r:(s=$("[name=listing_type]")&&$("[name=listing_type]").val(),i=APP.initialParseFromUrl&&APP.initialParseFromUrl.listing_type,(l=i&&i!==s?i:s)&&APP.fn_matching_rentals.some(function(e){return e(l)})?r:o),o=(a=a.map(function(e){return formatPriceSimplified(e,"0.0a",a[0]===APP.price_ranges.rentals[0])+((""+e).containsChar("+")?"+":"")})).map(function(e,t){return{pure_val:u[t],val:e}});return t.render({hits:o})},trigger:"focus",elements_to_listen_to:"#search-max-price",listener:function e(t){setTimeout(function(){},300)}}},{nodeName:"max_monthly_fees",id:"max_monthly_fees",node:"INPUT",nodeType:"tel",classList:["form-control","apply-currency"],placeholder:APP.translation.form_mapping.max_monthly_fees.placeholder,default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:APP.translation.form_mapping.max_monthly_fees.prettified_name},pre_formatting_callback:{function:handleMoneyFormatting,args:[APP.getCurrency(),0,3]},mid_formatting_callback:{function:String.prototype.formatLongNumber,args:[0,3,!0]},post_formatting_callback:{function:formatFormattedStringToFloatKeepPlus,args:"value_of"},summary_formatting:{callback:function e(t){var n;return function e(t){return(t="0"===t?null:t)?(setTimeout(function(){$(".suggestions.max_monthly_fees.left").hasClass("d-none")||$(".suggestions.max_monthly_fees.left").addClass("d-none")},100),"{0}: {1} {2}".format(APP.translation.form_mapping.max_monthly_fees.prettified_name,APP.translation.form_mapping.keywords.under,t)):null}(t)},trigger:"blur",args:function e(){return[$("#max_monthly_fees").val()]}},suggestions:{data_for_selector:"[data-for='max_monthly_fees-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='max_monthly_fees suggestions left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[1500,1750,2e3,3e3,3500,4e3,4500,5e3,6e3,7e3,8e3,9e3,1e4,12500,15e3],a=n,n,n=(n=n.map(function(e){return commaSeparatePrice(""+e,APP.getCurrency())+((""+e).containsChar("+")?"+":"")})).map(function(e,t){return{pure_val:a[t],val:e}});return t.render({hits:n})},trigger:"blur",elements_to_listen_to:"#max_monthly_fees",listener:function e(t){$(".max_monthly_fees.suggestions.left span.sug").off().on("click",function(e){$("#"+t.target.id).val($(e.target).data("pure-val")).trigger("change").trigger("blur")}),$(".max_monthly_fees.suggestions.left").removeClass("d-none")}}},{nodeName:"property_type",id:"property_type",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],wp_based:!0,prettified_name:APP.translation.form_mapping.property_type.prettified_name,label:{location:"after_input",classList:"",innerText:""},value_text_mapping:APP.translation.form_mapping.property_type.values,summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?(console.info("val",t),"{0}".format(n.join(APP.translation.form_mapping.property_type.pillbox_joiner))):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=property_type]:checked").each(function(){t.push(""+$(this).next("label").text())}),t}},compiled_hogan_template:Hogan.compile("{{#hits}}<li>                                    <div class='checkbox'>                                        <input type='checkbox' name='{{name}}' id='{{id}}' value='{{val}}'>                                        <label for='{{id}}'>{{text}}</label>                                    </div>                                </li>{{/hits}}"),conditional_rerender:[{item_references:["property_type"],should_deselect:"neutralize listing_type",correction_fn:function e(){var t=$("[name=listing_type]"),n=["show_all"],a;$("[name=property_type]:checked").toArray().map(function(e){return $(e).val()}).some(function(e){return n.inArray(e)})&&(t[0].selectedIndex=0,t.trigger("change"),setTimeout(function(){renderPillbox(APP.last_request)},120))},type:"flush_disjunctive",trigger:"change autocomplete_click"},{item_references:["max_monthly_fees"],type:"hide_container",trigger_if:["show_all"],trigger:"change autocomplete_click"}]},{nodeName:"listing_type",id:"listing_type",node:"SELECT",nodeType:"select",classList:"is_select",default_values:[],wp_based:!0,prettified_name:APP.translation.form_mapping.listing_type.prettified_name,label:{location:"after_input",classList:"",innerText:""},value_text_mapping:APP.translation.form_mapping.listing_type.values,conditional_rerender:[{item_references:["search-min-price","search-max-price"],type:"refresh_suggestions",trigger:"change refresh_suggestions autocomplete_click"},{item_references:["property_type"],type:"hide_container",trigger_if:["residential_sales","commercial_sales"],trigger:"change"},{item_references:["max_monthly_fees"],type:"hide_container",trigger_if:["residential_sales","commercial_sales"],trigger:"change autocomplete_click"},{item_references:["property_type"],trigger_if:["residential_sales","commercial_sales","any"],type:"deselect",trigger:"change"},{item_references:["listing_type"],should_deselect:"show all of property type",correction_fn:function e(){"any"!==$("[name=listing_type]").val()&&($("[name=property_type][value=show_all]").prop("checked",!1),setTimeout(function(){renderPillbox(APP.last_request)},120))},type:"flush_disjunctive",trigger:"change autocomplete_click"}],events_:[{trigger:"focus",action:function e(){arguments[0].prop("original_value",arguments[0].val())},selector:function e(){return $("[name=listing_type]")}}],summary_formatting:{callback:function e(t){return!t||t&&"any"===t.toLowerCase()?null:n(t);function n(e){return"{0}".format(e)}},trigger:"blur change",args:function e(t){return t?[$("[name='listing_type'] option[value='"+t+"']").text()]:$("[name='listing_type']").val()?[$("[name='listing_type'] option[value='"+escapeJquerySpaces($("[name='listing_type']").val())+"']").text()]:[]}},compiled_hogan_template:Hogan.compile("<div class='select-wrap'>                                       <select name='listing_type' class='no-simpleselect'>                                           {{#hits}}                                               <option value='{{val}}' {{modifiers}}>{{{text}}}</option>                                           {{/hits}}                                       </select>                                   </div>")},{nodeName:"class",id:"class-radio",node:"INPUT",nodeType:"radio",classList:"",default_values:[],wp_based:!0,prettified_name:"Class",label:{location:"after_input",classList:"",innerText:""},summary_formatting:{callback:function e(){return arguments&&arguments.length?"".concat(arguments[0]):null},trigger:"blur change",args:function e(){return $("input[name=class]:checked").parent().text().trim()}}},{nodeName:"type",id:"type-radio",node:"INPUT",nodeType:"radio",classList:"",default_values:[],wp_based:!0,prettified_name:"Type",label:{location:"after_input",classList:"",innerText:""},summary_formatting:{callback:function e(){return arguments&&arguments.length?"".concat(arguments[0]):null},trigger:"blur change",args:function e(){return $("input[name=type]:checked").parent().text().trim()}}},{nodeName:"status",id:"status",node:"SELECT",nodeType:"select",classList:"is_select",default_values:[],wp_based:!0,label:{location:"after_input",classList:"",innerText:""},prettified_name:APP.translation.form_mapping.status.prettified_name,value_text_mapping:APP.translation.form_mapping.status.values,summary_formatting:{callback:function e(t){return t?n(t):null;function n(e){return"{0}".format(e)}},trigger:"blur change",args:function e(){return $("select[name='status']").val()?[$("select[name='status'] option[value="+$("select[name='status']").val().replace("|","\\|")+"]").text().replace(/\s+/g," ")]:[]}},compiled_hogan_template:Hogan.compile("<div class='select-wrap'>                                   <select name='status' class='no-simpleselect'>                                       {{#hits}}                                           <option value='{{val}}' {{modifiers}}>{{{text}}}</option>                                       {{/hits}}                                    </select>                                </div>")},{nodeName:"square_feet_min",id:"square_feet_min",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:APP.translation.form_mapping.area.placeholder,default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Min SQFT"},pre_formatting_callback:{function:handleLongNumberFormatting,args:[0,3]},mid_formatting_callback:{function:Number.prototype.formatLongNumber,args:[0,3]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return setTimeout(function(){$(".suggestions.sqft.left").hasClass("d-none")||$(".suggestions.sqft.left").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"SQFT: {0} {1} {2}".format(t.formatLongNumber(0,3),APP.translation.form_mapping.keywords.to,n.formatLongNumber(0,3)):"SQFT: {0} {1}".format(APP.translation.form_mapping.keywords.over,t.formatLongNumber(0,3)):"SQFT: {0} {1}".format(APP.translation.form_mapping.keywords.under,n.formatLongNumber(0,3)):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#square_feet_min").val()),formatFormattedStringToFloat($("#square_feet_max").val())]}},suggestions:{data_for_selector:"[data-for='square_feet-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='suggestions sqft left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions sqft right d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].rangeOfChars(500,5e3,500),a=n,n=n.map(function(e,t){return{pure_val:a[t],val:e.formatLongNumber(0,3)}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#square_feet_min",listener:function e(t){}}},{nodeName:"square_feet_max",id:"square_feet_max",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:APP.translation.form_mapping.area.placeholder,default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Max SQFT"},pre_formatting_callback:{function:handleLongNumberFormatting,args:[0,3]},mid_formatting_callback:{function:Number.prototype.formatLongNumber,args:[0,3]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return setTimeout(function(){$(".suggestions.sqft.right").hasClass("d-none")||$(".suggestions.sqft.right").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"SQFT: {0} {1} {2}".format(t.formatLongNumber(0,3),APP.translation.form_mapping.keywords.to,n.formatLongNumber(0,3)):"SQFT: {0} {1}".format(APP.translation.form_mapping.keywords.over,t.formatLongNumber(0,3)):"SQFT: {0} {1}".format(APP.translation.form_mapping.keywords.under,n.formatLongNumber(0,3)):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#square_feet_min").val()),formatFormattedStringToFloat($("#square_feet_max").val())]}},suggestions:{data_for_selector:"[data-for='square_feet-suggestions-right']",data_for_subselector:".right",compiled_hogan_template:Hogan.compile("                <div class='suggestions sqft left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions sqft right d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].rangeOfChars(500,5e3,500),a=n,n=n.map(function(e,t){return{pure_val:a[t],val:e.formatLongNumber(0,3)}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#square_feet_max",listener:function e(t){}}}
7,{nodeName:"land_sqft_min",id:"land_sqft_min",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Min Land SQFT"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return setTimeout(function(){$(".suggestions.land_sqft.left").hasClass("d-none")||$(".suggestions.land_sqft.left").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Land: {0} {1} {2} SQFT".format(t.formatLongNumber(0,3),APP.translation.form_mapping.keywords.to,n.formatLongNumber(0,3)):"Land: {0} {1} SQFT".format(APP.translation.form_mapping.keywords.over,t.formatLongNumber(0,3)):"Land: {0} {1} SQFT".format(APP.translation.form_mapping.keywords.under,n.formatLongNumber(0,3)):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#land_sqft_min").val()),formatFormattedStringToFloat($("#land_sqft_max").val())]}},suggestions:{data_for_selector:"[data-for='land_sqft-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='suggestions land_sqft left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions land_sqft right d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].rangeOfChars(500,5e3,500),a=n,n=n.map(function(e,t){return{pure_val:a[t],val:e.formatLongNumber(0,3)}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#land_sqft_min, #land_sqft_max",listener:function e(t){}}},{nodeName:"land_sqft_max",id:"land_sqft_max",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Max Land SQFT"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return setTimeout(function(){$(".suggestions.land_sqft.right").hasClass("d-none")||$(".suggestions.land_sqft.right").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Land: {0} {1} {2} SQFT".format(t.formatLongNumber(0,3),APP.translation.form_mapping.keywords.to,n.formatLongNumber(0,3)):"Land: {0} {1} SQFT".format(APP.translation.form_mapping.keywords.over,t.formatLongNumber(0,3)):"Land: {0} {1} SQFT".format(APP.translation.form_mapping.keywords.under,n.formatLongNumber(0,3)):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#land_sqft_min").val()),formatFormattedStringToFloat($("#land_sqft_max").val())]}},suggestions:{data_for_selector:"[data-for='land_sqft-suggestions-right']",data_for_subselector:".right",compiled_hogan_template:Hogan.compile("                <div class='suggestions land_sqft left d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions land_sqft right d-none'>                    <button type='button' class='close-btn d-block d-sm-none'><span aria-d-none='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].rangeOfChars(500,5e3,500),a=n,n=n.map(function(e,t){return{pure_val:a[t],val:e.formatLongNumber(0,3)}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#land_sqft_min, #land_sqft_max",listener:function e(t){}}}
7,{nodeName:"year_built_min",id:"year_built_min",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"From Year"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a=function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"<b>Built {0}</b> – <b>{1}</b>".format(t,n):"Built Later Than <b>{0}</b>".format(t):"Built Sooner Than <b>{0}</b>".format(n):"Year Built"},r;return setTimeout(function(){$(".suggestions.year-built.left").hasClass("d-none")||$(".suggestions.year-built.left").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Built: {0} to {1}".format(t,n):"Built: After {0}".format(t):"Built: Before {0}".format(n):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#year_built_min").val()),formatFormattedStringToFloat($("#year_built_max").val())]}},suggestions:{data_for_selector:"[data-for='year_built-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='suggestions year-built left d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions year-built right d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].concat([].rangeOfYears(null,2005)).concat([].rangeOfChars(2e3,1990,-5)).concat([].rangeOfChars(1980,1920,-10)).concat([].rangeOfChars(1900,1750,-50)),a=n,n=n.map(function(e,t){return{pure_val:e,val:a[t]}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#year_built_min, #year_built_max",listener:function e(t){}}},{nodeName:"year_built_max",id:"year_built_max",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Till Year"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a=function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"<b>Built {0}</b> – <b>{1}</b>".format(t,n):"Built Later Than <b>{0}</b>".format(t):"Built Sooner Than <b>{0}</b>".format(n):"Year Built"},r;return setTimeout(function(){$(".suggestions.year-built.right").hasClass("d-none")||$(".suggestions.year-built.right").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Built: {0} to {1}".format(t,n):"Built: After {0}".format(t):"Built: Before {0}".format(n):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#year_built_min").val()),formatFormattedStringToFloat($("#year_built_max").val())]}},suggestions:{data_for_selector:"[data-for='year_built-suggestions-right']",data_for_subselector:".right",compiled_hogan_template:Hogan.compile("                <div class='suggestions year-built left d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions year-built right d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].concat([].rangeOfYears(null,2005)).concat([].rangeOfChars(2e3,1990,-5)).concat([].rangeOfChars(1980,1920,-10)).concat([].rangeOfChars(1900,1750,-50)),a=n,n=n.map(function(e,t){return{pure_val:e,val:a[t]}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#year_built_min, #year_built_max",listener:function e(t){}}}
7,{nodeName:"parking_spaces_min",id:"parking_spaces_min",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Parking Spaces"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a=function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"<b>{0}</b> – <b>{1}</b> Parking Space{2}".format(t,n,1===n?"":"s"):"At Least <b>{0}</b> Parking Space{1}".format(t,1===t?"":"s"):"At Most <b>{0}</b> Parking Space{1}".format(n,1===n?"":"s"):"Parking Spaces"},r;return setTimeout(function(){$(".suggestions.parking-spaces.left").hasClass("d-none")||$(".suggestions.parking-spaces.left").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Parking Spaces: {0} to {1}".format(t,n):"Parking Spaces: Above {0}".format(t):"Parking Spaces: Below {0}".format(n):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#parking_spaces_min").val()),formatFormattedStringToFloat($("#parking_spaces_max").val())]}},suggestions:{data_for_selector:"[data-for='parking_spaces-suggestions-left']",data_for_subselector:".left",compiled_hogan_template:Hogan.compile("                <div class='suggestions parking-spaces left d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions parking-spaces right d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].concat([].rangeOfChars(1,5,1)),a=n,n=n.map(function(e,t){return{pure_val:e,val:a[t]}});return t.render({hits:n})},trigger:"focus",elements_to_listen_to:"#parking_spaces_min, #parking_spaces_max",listener:function e(t){}}},{nodeName:"parking_spaces_max",id:"parking_spaces_max",node:"INPUT",nodeType:"tel",classList:"form-control",placeholder:"Any",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Parking Spaces"},pre_formatting_callback:{function:handleOnlyNumericInputs,args:[]},post_formatting_callback:{function:formatFormattedStringToFloat,args:"value_of"},summary_formatting:{callback:function e(t,n){var a=function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"<b>{0}</b> – <b>{1}</b> Parking Space{2}".format(t,n,1===n?"":"s"):"At Least <b>{0}</b> Parking Spaces{1}".format(t,1===t?"":"s"):"At Most <b>{0}</b> Parking Space{1}".format(n,1===n?"":"s"):"Parking Spaces"},r;return setTimeout(function(){$(".suggestions.parking-spaces.right").hasClass("d-none")||$(".suggestions.parking-spaces.right").addClass("d-none")},100),function e(t,n){return n="0"===n?null:n,(t="0"===t?null:t)||n?t?n?"Parking Spaces: {0} to {1}".format(t,n):"Parking Spaces: {0}".format(t):"Parking Spaces: {0}".format(n):null}(t,n)},trigger:"blur",args:function e(){return[formatFormattedStringToFloat($("#parking_spaces_min").val()),formatFormattedStringToFloat($("#parking_spaces_max").val())]}},suggestions:{data_for_selector:"[data-for='parking_spaces-suggestions-right']",data_for_subselector:".right",compiled_hogan_template:Hogan.compile("                <div class='suggestions parking-spaces left d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>                <div class='suggestions parking-spaces right d-none'>                    <button type='button' class='close-btn d-sm-none'><span aria-hidden='true'>&times;</span></button>                    {{#hits}}<span class='sug' data-pure-val='{{pure_val}}'>{{val}}</span>{{/hits}}                </div>"),rendering_function:function e(t){var n=[].concat([].rangeOfChars(1,5,1)),a=n,n=n.map(function(e,t){return{pure_val:e,val:a[t]}});return t.render({hits:n})}
7,trigger:"focus",elements_to_listen_to:"#parking_spaces_min, #parking_spaces_max",listener:function e(t){}}},{nodeName:"days_on_site",id:"days-on-site-select",node:"SELECT",nodeType:"select",classList:"",default_values:[],wp_based:!0,prettified_name:"Days On Site",label:{location:"after_input",classList:"",innerText:""},value_text_mapping:parse2formMapping({selector:'[name="days_on_site"]',expected:"value_text_mapping"}),summary_formatting:{callback:function e(t){return t?n(t):null;function n(e){return"Days On Site: {0}".format(e)}},trigger:"blur change",args:function e(){return $("select[name='days_on_site']").val()?[$("select[name='days_on_site'] option[value="+$("select[name='days_on_site']").val().replace("|","\\|")+"]").text().replace(/\s+/g," ")]:[]}}},{nodeName:"open_house_min",id:"open_house_min",node:"INPUT",nodeType:"date",classList:["form-control","has-datepicker"],placeholder:"mm/dd/yyyy",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"Start date"},pre_formatting_callback:{function:initPickadate,args:[PICKADATE_SETTINGS]},mid_formatting_callback:{function:formatTimestampToDate,args:"value_of",kwargs:{extras:"uses_callback"}},post_formatting_callback:{function:formatPickerDateToTimestamp,args:"value_of"},summary_formatting:{callback:function e(t,n){return APP.FORM_MAPPING.filter(function(e){return"open_house_max"===e.nodeName})[0].summary_formatting.callback.apply(null,[t,n])},trigger:"change",args:function e(){return[moment($("[name='open_house_min_submit']").val(),MOMENT_PARSER_FORMATS).startOf("day"),moment($("[name='open_house_max_submit']").val(),MOMENT_PARSER_FORMATS).endOf("day")]}}},{nodeName:"open_house_max",id:"open_house_max",node:"INPUT",nodeType:"date",classList:["form-control","has-datepicker"],placeholder:"mm/dd/yyyy",default_value:"",wp_based:!0,label:{location:"before_input",classList:"sr-only",innerText:"End Date"},pre_formatting_callback:{function:initPickadate,args:[PICKADATE_SETTINGS]},mid_formatting_callback:{function:formatTimestampToDate,args:"value_of",kwargs:{extras:"uses_callback"}},post_formatting_callback:{function:formatPickerDateToTimestamp,args:"value_of"},summary_formatting:{callback:function e(t,n){var a;return function e(t,n){var t=t._isValid?t.format("MMM D"):null,n=n._isValid?n.format("MMM D"):null;return t||n?t?n?"OH: {0} to {1}".format(t,n):"OH: After {0}".format(t):"OH: Before {0}".format(n):null}(t,n)},trigger:"change",args:function e(){return[moment($("input[name='open_house_min_submit']").val(),MOMENT_PARSER_FORMATS).startOf("day"),moment($("input[name='open_house_max_submit']").val(),MOMENT_PARSER_FORMATS).endOf("day")]}}},{nodeName:"additional_options",id:"additional-options-checkbox",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],wp_based:!0,prettified_name:"Additional Options",label:{location:"after_input",classList:"",innerText:""},multi_category_value_text_mapping:parse2formMapping({selector:'[name="additional_options"]',expected:"multi_category_value_text_mapping"}),summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?(console.info("val",t),"{0}".format(n.join(", "))):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=additional_options]:checked").each(function(){t.push(""+$(this).next("label").text())}),t}}},{nodeName:"pool",id:"pool-radio",node:"INPUT",nodeType:"radio",classList:"",default_values:[],wp_based:!0,prettified_name:"Pool",label:{location:"after_input",classList:"",innerText:""},multi_category_value_text_mapping:[{category:"Pool",options:[{yes:"Yes"},{no:"No"}]}],summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?"Pool: {0}".format(n[0]):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=pool]:checked").each(function(){t.push(""+$(this).next("label").text())}),t}}},{nodeName:"special_features",id:"special_features",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],wp_based:!0,prettified_name:"Special Features",label:{location:"after_input",classList:"",innerText:""},multi_category_value_text_mapping:parse2formMapping({selector:'[name="special_features"]',expected:"multi_category_value_text_mapping"}),old:[{category:"Special Features",options:[{exclusives_only:"Our Exclusives"},{"new_listing|14d":"New Listing (14 Days)"},{pets_allowed:"Pets Allowed"},{upcoming_open_house:"Upcoming Open House"}]}],summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?"{0}".format(n.join(", ")):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=special_features]:checked").each(function(){t.push(""+$(this).next("label").text().replace("Open House","OH"))}),t}}},{nodeName:"land_tenure",id:"land_tenure",node:"INPUT",nodeType:"radio",classList:"",default_values:[],wp_based:!0,prettified_name:"Land Tenure",label:{location:"after_input",classList:"",innerText:""},multi_category_value_text_mapping:parse2formMapping({selector:'[name="land_tenure"]',expected:"multi_category_value_text_mapping"}),old:[{category:"Land Tenure",options:[{fee_simple:"Fee Simple"},{leasehold:"Leasehold"}]}],summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?"Land Tenure: {0}".format(n[0]):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=land_tenure]:checked").each(function(){t.push(""+$(this).next("label").text())}),t}}},{nodeName:"keyword",id:"keyword",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:"Keyword",summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"Keyword: {0}".format(t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=keyword]").val()]}}},{nodeName:"nearby_schools",id:"nearby_schools",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:"Schools",summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"Schools: {0}".format(t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=nearby_schools]").val()]}}},{nodeName:"zip_code",id:"zip_code",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:APP.translation.autocomplete.headers.zip_code,summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"{0}: {1}".format(APP.translation.autocomplete.headers.zip_code,t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=zip_code]").val()]}}},{nodeName:"city",id:"city",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:APP.translation.autocomplete.headers.city,summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"{0}: {1}".format(APP.translation.autocomplete.headers.city,t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=city]").val()]}}},{nodeName:"address",id:"address",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:APP.translation.form_mapping.address.prettified_name,summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)arguments[t]&&arguments[t].length&&n.push(arguments[t]);return function e(t){return t&&0!==t.length?"{0}: {1}".format(APP.translation.form_mapping.address.prettified_name,n[0]):null}(n)},trigger:"blur change",args:function e(){return[$("input[name=address]").val()]}}},{nodeName:"agent_id",id:"agent_id",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:APP.translation.form_mapping.agent_id.prettified_name,summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"{0}: {1}".format(APP.translation.form_mapping.agent_id.prettified_name,t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=agent_id]").val()]}}},{nodeName:"stories",id:"stories-radio",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],wp_based:!0,prettified_name:"Stories",label:{location:"after_input",classList:"",innerText:""},summary_formatting:{callback:function e(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);return t&&0!==t.length?"Stories: ".concat(t.join(", ")):($("input[name=stories]").parent().removeClass("active"),null)},trigger:"blur change",args:function e(){return _toConsumableArray($("input[name=stories]:checked")).filter(function(e){return"any"!==e.value}).map(function(e){return e.value})}}},{nodeName:"subways",id:"subways",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],prettified_name:APP.subways_filter_label||"Subways",label:{location:"after_input",classList:"",innerText:""},summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?"".concat(APP.subways_filter_label||"Subways",": {0}").format(n.map(function(e){return'<span class="sub-line-pill">'.concat(e,"</span>")}).join(", ")):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=subways]:checked").each(function(){t.push(""+$(this).data("line"))}),t}},value_text_custom_mapping:APP.transit_routes?parseTransitStops(APP.transit_routes):[],compiled_hogan_template:Hogan.compile('\n      {{#hits}}\n        <div class="transport-line-object">\n          <input type="checkbox"\n                 name="subways"\n                 id="line|{{route_name}}_{{area_name}}"\n                 value="line|{{route_name}}_{{area_name}}"\n                 data-line="{{route_name}}">\n            <label class="line-symbol generic_rectangle_"\n                   style="background-color: {{bg_color}}"\n                   for="line|{{route_name}}_{{area_name}}">
7\n              <span style="color: {{color}}" class="line-num">{{route_name}}</span>\n            </label>\n        </div>\n      {{/hits}}\n        ')},{nodeName:"subway_stops",id:"subway_stops",node:"INPUT",nodeType:"checkbox",classList:"",default_values:[],prettified_name:APP.subway_stops_filter_label||"Subway Stops",label:{location:"after_input",classList:"",innerText:""},summary_formatting:{callback:function e(){for(var n=[],t=0,a;t<arguments.length;t++)n.push(arguments[t]);return function e(t){return t&&0!==t.length?1===t.length?"".concat(APP.subway_stops_filter_label||"Stop",": {0}").format(n.map(function(e){return'<span class="sub-line-pill">'.concat(e,"</span>")}).join(", ")):"Multiple ".concat(APP.subway_stops_filter_label||"Subway Stops"):null}(n)},trigger:"blur change",args:function e(){var t=[];return $("input[name=subway_stops]:checked").each(function(){t.push(""+$(this).data("stop_name"))}),t}},value_text_custom_mapping:stopNameAggToValueTextCustomMapping(),compiled_hogan_template:Hogan.compile('\n      {{#hits}}\n        <div class="subway-stops-line-object">\n          <input type="checkbox"\n                 name="subway_stops"\n                 id="stop_name|{{stop_name}}_{{area_name}}"\n                 value="stop_name|{{stop_name}}_{{area_name}}"\n                 data-stop_name="{{stop_name}}">\n            <label for="stop_name|{{stop_name}}_{{area_name}}">\n              <span class="stop_name">{{stop_name}}</span>\n            </label>\n            <div class="inner-lines">\n              {{#lines}}\n                {{{line}}}\n              {{/lines}}\n            </div>\n        </div>\n      {{/hits}}\n        ')},{nodeName:"mls_ids",id:"mls_ids",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:"MLS IDs",summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"{0}: {1}".format("MLS IDs",t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=mls_ids]").val()]}}}],APP.neighborhoods?APP.FORM_MAPPING.push({nodeName:"neighborhoods",id:"neighborhood-checkbox",node:"INPUT",nodeType:"checkbox",classList:"form-control",placeholder:"",default_value_selected:"",wp_based:!0,prettified_name:APP.translation.form_mapping.neighborhood.prettified_name,label:{location:"after_input",classList:"",innerText:""},trigger_helpers:[{function:toggleAllChildrenCheckboxes,trigger:"change",selector:"[data-for=neighborhoods] .select-all-checkbox"},{function:uncheckParentIfChildUnchecked,trigger:"change",selector:"input[name=neighborhoods]"},{function:dontApplyMapBounds,trigger:"change",selector:"[name=neighborhoods], [id*=parent]",specifier:"each"}],compiled_hogan_template:Hogan.compile("\n        <div class='checkbox-list li-grouped fixed-height'>\n          {{#hits}}\n            <li>\n                <div class='checkbox'>\n                    <input type='checkbox' name='{{name}}' id='{{id}}' value='{{internal_val}}'>\n                    <label for='{{id}}'>{{val}}</label>\n                </div>\n            </li>\n          {{/hits}}\n        </div>\n      "),values_tree:APP.neighborhoods||[]}):APP.FORM_MAPPING.push({nodeName:"neighborhoods",id:"neighborhoods",node:"INPUT",nodeType:"hidden",classList:"",default_value:"",prettified_name:APP.translation.autocomplete.headers.neighborhood,summary_formatting:{callback:function e(){for(var t=[],n=0,a;n<arguments.length;n++)arguments[n]&&arguments[n].length&&t.push(arguments[n]);return function e(t){if(!t||0===t.length)return null;var t=t;return isArray(t)?t=(t=t[0].contains_str(",")?t[0].split(","):t).join(", "):t.split(",").join(", "),"{0}: {1}".format(APP.translation.autocomplete.headers.neighborhood,t)}(t)},trigger:"blur change",args:function e(){return[$("input[name=neighborhood]").val()]}}}),APP.CONDITIONAL_SELECTS=[],APP.FORM_MAPPING_NODE_IDS=APP.FORM_MAPPING.map(function(e){return e.id}
7).concat(APP.FORM_MAPPING.map(function(e){return e.nodeName})),APP.REQUEST_DEFAULTS={class:function e(){return $('[name="class"]').length?"sales":""},type:function e(){return $('[name="type"]').length?"residential":""}};
8"use strict";function _defineProperty(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function renderForm(){return new Promise(function(l){!function(){var e=function e(a,n){$("#"+a.id).off("focus").on("focus",function(){$(a.suggestions.data_for_selector).find(".suggestions"+n).removeClass("d-none")}),setTimeout(function(){$("span.sug",$(a.suggestions.data_for_selector).find(".suggestions"+n)).each(function(e,n){$(n).off().on("click",function(e){e.preventDefault(),e.stopPropagation(),$("#"+a.id).val($(e.target).data("pure-val")).trigger("change").trigger("blur")})})},300)},a=function e(n){$("#"+n.id).on("blur",function(){setTimeout(function(){$(n.suggestions.data_for_selector).find(".suggestions").removeClass("d-none").addClass("d-none")},300)})};function g(n){"summary_formatting"in n&&$("[name="+n.nodeName+"]").on(n.summary_formatting.trigger,function(){var e=n.summary_formatting.args.call();isArray(e)||(e=[].concat(e)),n.summary_formatting.callback.apply(null,e)}),"suggestions"in n&&($(n.suggestions.elements_to_listen_to).on(n.suggestions.trigger,function(e){n.suggestions.listener.apply(null,[e])}),e.apply(null,[n,n.suggestions.data_for_subselector||""]),a.apply(null,[n]))}$(document).on("DOMNodeInserted DOMNodeInserted__Mock",function(e){if(e.target){var n=e.target,m;if("LABEL"===n.nodeName?n=$(findDeepestChild($(n)))[0]:"UL"===n.nodeName?n=$(n).find("input")[0]:"LI"===n.nodeName&&$(n).find("input")[0]?n=document.querySelector("[name={0}]".format($(n).find("input")[0].name)):n.classList&&n.classList.contains("select-wrap")&&(n=$(n).find("select")[0]),n){if((APP.FORM_MAPPING_NODE_IDS.inArray(n.id)||APP.FORM_MAPPING_NODE_IDS.inArray(n.name))&&(m=APP.FORM_MAPPING.filter(function(e){return e.id===n.id||e.nodeName===n.name})),!(m=isArray(m)?m[0]:m))return!1;"pre_formatting_callback"in m?n.id===m.id&&(isArray(m.pre_formatting_callback.args)?m.pre_formatting_callback.function.apply(null,[].concat($("#"+n.id)).concat(m.pre_formatting_callback.args)):m.pre_formatting_callback.function.apply(null,[$("#"+n.id).val()])):"set_default_value"in m&&$(m.set_default_value.selector).prop("checked",!0).parent().toggleClass(m.set_default_value.class_to_toggle),g(m),"events_"in m&&$.each(m.events_,function(e,n){var a=n.selector.call();a.on(n.trigger,function(){n.action.apply(null,[a])})}),"conditional_rerender"in m&&$.each(m.conditional_rerender,function(e,n){var u=n;$.each(u.item_references,function(e,n){var o=APP.FORM_MAPPING.filter(function(e){return e.id===n||e.nodeName===n||e.id.startsWith(n)||e.nodeName.includes("custom_")&&e.nodeName.includes(n)})[0];if(o){var t=$('[name="'.concat(m.nodeName,'"]')),r,i=[],s=[],c=[],l;try{switch(u.type){case"refresh_suggestions":var d=o.suggestions;t.on(u.trigger,function(e){console.info("change ev",e);var n=$(this),a="",e,a,a,a=!n.val()||APP.fn_matching_sales.some(function(e){return e(n.val())})||"any"===n.val()?d.rendering_function.apply(null,[d.compiled_hogan_template,"sales"]):d.rendering_function.apply(null,[d.compiled_hogan_template,"rentals"]);$(d.data_for_selector).html(a),"listing_type"===m.nodeName&&(e=n.prop("original_value"),a=n&&n.val()?n.val().split("_")[1]:null,console.info({original_subtype:e,current_val:a,target_:o,item:m}),e===a||APP.first_url_parse||o.id.match(/min|max/)||$("#"+o.id).val("").trigger("change")),g(o)}),g(o);break;case"hide_container":if(!(r=o&&o.id&&$($(":regex(id,".concat(o.id.replace(/_min|_max/g,""),"_wrapper)"))[0]||$(":regex(id,".concat(o.nodeName,"_wrapper)"))[0]||$(":regex(data-nodename-wrapper,".concat(o.nodeName,")"))[0]))||!r.length)return void console.warn("could not find target_wrapper by id",{target_:o,$nodeName:t,rerender_object:u,$target_wrapper:r});r.prev().length&&r.prev().is(":header")&&(r=r.add(r.prev())),i=[],s=isArray(u.simultaneous_selections)&&u.simultaneous_selections.length&&u.simultaneous_selections,c=[],l=function e(){var t=serializeFormJSON($("#search"));s.map(function(e){var n=e.nodeName,a=e.trigger_if,e=o&&o.id&&$($(":regex(id,".concat(n,"_wrapper)"))[0]||$(":regex(id,".concat(n,"_wrapper)"))[0]||$(":regex(data-noden
8ame-wrapper,".concat(n,")"))[0]||$('[name="'.concat(n,'"'))[0]),n;e.length&&t[n]&&(n=isArray(t[n])?t[n]:[t[n]],c.push(0<arraysIntersect(a,n).length),i.push(e))})},t.on(u.trigger,function(){if(s=isArray(u.simultaneous_selections)&&u.simultaneous_selections.length&&u.simultaneous_selections,c=[],s&&l(),console.debug(_defineProperty({},"".concat(u.trigger," registered"),{simultaneous_selections:s,simultaneous_selections_apply:c,$nodeName:t})),s.length&&(!c.length||c.every(isFalse)))return console.warn("simultaneous selections caused to skip applying conditional rerenders",{simultaneous_selections:s,simultaneous_selections_apply:c}),r.show(),!1;if("INPUT"===t[0].nodeName||"SELECT"===t[0].nodeName){var a=[];switch(t[0].nodeName){case"INPUT":$('input[name="'.concat(t[0].name,'"]:checked')).toArray().map(function(e){var n="".concat($(e).val()).toLowerCase();a.push(!u.trigger_if.some(function(e){return"".concat(e).toLowerCase().includes(n)}))});break;case"SELECT":[$('select[name="'.concat(t[0].name,'"')).val()].map(function(e){var n=e.toLowerCase();a.push(!u.trigger_if.some(function(e){return e.toLowerCase().includes(n)}))})}a.length&&a.every(isFalse)?r.hide():r.show()}else-1!==u.trigger_if.indexOf(t.val())?r.show():r.hide()}),s&&(l(),i.map(function(e){e.on(u.trigger,function(e){t.trigger(e)})}));break;case"show_container":if(!(r=o&&o.id&&$($(":regex(id,".concat(o.id.replace(/_min|_max/g,""),"_wrapper)"))[0]||$(":regex(id,".concat(o.nodeName,"_wrapper)"))[0]||$(":regex(data-nodename-wrapper,".concat(o.nodeName,")"))[0]))||!r.length)return void console.warn("could not find target_wrapper by id",{target_:o,$nodeName:t,rerender_object:u});r.prev().length&&r.prev().is(":header")&&(r=r.add(r.prev())),i=[],s=isArray(u.simultaneous_selections)&&u.simultaneous_selections.length&&u.simultaneous_selections,c=[],l=function e(){var t=serializeFormJSON($("#search"));s.map(function(e){var n=e.nodeName,a=e.trigger_if,e=o&&o.id&&$($(":regex(id,".concat(n,"_wrapper)"))[0]||$(":regex(id,".concat(n,"_wrapper)"))[0]||$(":regex(data-nodename-wrapper,".concat(n,")"))[0]||$('[name="'.concat(n,'"'))[0]),n;e.length&&t[n]&&(n=isArray(t[n])?t[n]:[t[n]],c.push(0<arraysIntersect(a,n).length),i.push(e))})},t.on(u.trigger,function(){if(s=isArray(u.simultaneous_selections)&&u.simultaneous_selections.length&&u.simultaneous_selections,c=[],s&&l(),s.length&&(!c.length||c.every(isFalse)))return console.warn("simultaneous selections caused to skip applying conditional rerenders",{simultaneous_selections:s,simultaneous_selections_apply:c}),r.hide(),!1;if("INPUT"===t[0].nodeName||"SELECT"===t[0].nodeName){var n=[];switch(t[0].nodeName){case"INPUT":$('input[name="'.concat(t[0].name,'"]:checked')).toArray().map(function(e){n.push(u.trigger_if.includes($(e).val()))});break;case"SELECT":[$('select[name="'.concat(t[0].name,'"')).val()].map(function(e){n.push(u.trigger_if.includes(e))})}n.length&&n.every(isFalse)?r.hide():r.show()}else-1!==u.trigger_if.indexOf(t.val())?r.show():r.hide()});break;case"deselect":t.on(u.trigger,function(){-1!==u.trigger_if.indexOf(t.val())?$("#"+o.id+"_wrapper").show():($("input[name="+o.nodeName+"]:checked").each(function(){$(this).prop("checked",!1)}),$("#"+o.id+"_wrapper").hide())});break;case"flush_disjunctive":t.on(u.trigger,function(){u.correction_fn()});break;case"hide_subcontainer":APP.onRenderCallbacks.push({fn:function e(){-1!==u.trigger_if.indexOf(t.val())||$(u.subcontainer_selector).is("checked")||($(u.subcontainer_selector).prop("checked",!1),$(u.subcontainer_selector).parent().parent().hide())},args:[t,u]}),t.on(u.trigger,function(){-1!==u.trigger_if.indexOf(t.val())?$(u.subcontainer_selector).parent().parent().show():($(u.subcontainer_selector).prop("checked",!1),$(u.subcontainer_selector).parent().parent().hide())})}}catch(e){console.error({conditional_rerender:conditional_rerender,target_:o})}}else console.warn("No target detected either by id or nodeName:",{item_references:n,item:m})})})}}});for(var n=0;n<APP.FORM_MAPPING.length;n++){var t=APP.FORM_MAPPING[n],o,r,i,i,i;console.debug("item",t.suggestions);try{switch(t.node){case"INPUT":switch(t.nodeType){case"text":case"number":case"date":case"hidden":case"tel":if(t.wp_based)$("[name='{0}']".format(t.nodeName)).trigger("DOMNodeInserted"),console.info("will try to trigger DOMNodeInserted");else{var s=document.getElementById(t.id);if(s)console.debug("Input element already exists, skipping creation:",t.id),$(s).trigger("DOMNodeInserted");else{(o=document.createElement("input")).type=t.nodeType,o.name=t.nodeName,o.id=t.id,o.value=t.default_value,t.classList&&(isArray(t.classList)?t.classList.map(function(e){o.classList.add(e)}):o.classList.add(t.classList)),o.setAttribute("value",t.default_value),"placeholder"in t&&o.setAttribute("placeholder",t.placeholder);try{var c=document.querySelector('[data-for="'+t.nodeName+'"]');c&&("label"in t?((r=document.createElement("label")).classList.add(t.label.classList),r.innerText=t.label.innerText,"before_input"===t.label.location?(c.appendChild(r),c.appendChild(o)):(c.appendChild(o),c.appendChild(r))):c.appendChild(o))}catch(e){console.warn("Failed to append input node:",t.id,e)}}}"suggestions"in t&&($(t.suggestions.data_for_selector).html(t.suggestions.rendering_function.apply(null,[t.suggestions.compiled_hogan_template])),e.apply(null,[t,t.suggestions.data_for_subselector||""]),a.apply(null,[t]));break;case"checkbox":case"radio":if(t.hasOwnProperty("values_tree")){t.values_tree&&t.values_tree.length&&function(){var n=[];t.values_tree.map(function(e){n.push({name:"neighborhoods",id:"neighborhood_".concat(e.subdivision.replace(" ","_")),internal_val:"".concat(format_extract_subdivision_entry(e)),val:e.subdivision})}),$('[data-for="'+t.nodeName+'"]').html(t.compiled_hogan_template.render({hits:n}))}(),$('[data-for="'+t.nodeName+'"]').find("h5").on("click",function(e){e.target&&e.target.nodeName&&-1===["INPUT","LABEL"].indexOf(e.target.nodeName)&&$(this).toggleClass("expanded")}),"trigger_helpers"in t&&$.each(t.trigger_helpers,function(e,a){a.specifier&&"each"===a.specifier?$(a.selector).each(function(e,n){$(n).on(a.trigger,function(e){a.function.apply(null,[e.target])})}):$(a.selector).on(a.trigger,function(e){a.function.apply(null,[e.target])})});break}if(t.hasOwnProperty("value_text_mapping")){t.wp_based||(i=[],$.map(t.value_text_mapping,function(e,n){var a=Object.keys(e)[0],e=e[a];i.push({name:t.nodeName,id:t.nodeName+"-"+a,val:a,text:e})}),$('[data-for="'+t.nodeName+'"]').html(t.compiled_hogan_template.render({hits:i})));var s=$('[data-for="'+t.nodeName+'"]');
8(s=!s.length?$("#".concat(t.nodeName)):s).find("label").on("click",function(){var e=$(this);setTimeout(function(){console.info(e,e.children(0).is(":checked")),e.children(0).is(":checked")?e.hasClass("active")||e.addClass("active"):e.hasClass("active")&&e.removeClass("active")},40)}),"set_default_value"in t&&$(t.set_default_value.selector).prop("checked",!0).parent().toggleClass(t.set_default_value.class_to_toggle);break}if(t.hasOwnProperty("value_text_custom_mapping")){if(!t.value_text_custom_mapping.length){$('[data-for="'+t.nodeName+'"]').remove();break}$('[data-for="'+t.nodeName+'"]').html(t.compiled_hogan_template.render({hits:t.value_text_custom_mapping})).find("label").on("click",function(){var e=$(this);console.info(e.children(0).is(":checked")),e.children(0).is(":checked")?e.hasClass("active")||e.addClass("active"):e.hasClass("active")&&e.removeClass("active"),e.children(0).prop("checked",e.children(0).is(":checked"))}),"subway_stops"===t.nodeName&&$("#filter_subway_stops").on("change keyup paste blur",function(e){var n,e;e.target.value&&0!==e.target.value.length?(n=e.target.value,(e=findNodeByRegexingId(n)).length&&e[0].id&&e[0].id.includes("stop_name")&&(n=e.data("stop_name")),$('.stop_name:not(:contains("'.concat(n,'"))')).parent().parent().hide(),$('.stop_name:contains("'.concat(n,'")')).parent().parent().show()):$(".stop_name").parent().parent().show()}),"set_default_value"in t&&$(t.set_default_value.selector).prop("checked",!0).parent().toggleClass(t.set_default_value.class_to_toggle);break}if(t.hasOwnProperty("multi_category_value_text_mapping")){t.wp_based||(i=[],$.map(t.multi_category_value_text_mapping,function(e,n){var a=e.category,e=e.options;i.push({name:t.nodeName,category:a,options:e.map(function(e,n){return{name:t.nodeName,value:Object.keys(e)[0],text:e[Object.keys(e)[0]],id:t.nodeName+"_"+Object.keys(e)[0]}})})}),$(t.hasOwnProperty("node_selector")?t.node_selector:'[data-for="'+t.nodeName+'"]').html(t.compiled_hogan_template.render({hits:i}))),$(t.hasOwnProperty("node_selector")?t.node_selector:'[data-for="'+t.nodeName+'"]').find("label").on("click",function(){var e=$
8(this);setTimeout(function(){console.info(e,e.children(0).is(":checked")),e.children(0).is(":checked")?e.hasClass("active")||e.addClass("active"):e.hasClass("active")&&e.removeClass("active")},40)});break}t.id.includes("-radio")&&$('[data-for="'+t.nodeName+'"]').find("label").on("click",function(){var e=$(this);console.info(e.children(0).is(":checked")),e.children(0).is(":checked")?e.hasClass("active")||e.addClass("active"):e.hasClass("active")&&e.removeClass("active"),e.children(0).prop("checked",e.children(0).is(":checked")).trigger("change")})}break;case"SELECT":if(t.hasOwnProperty("value_text_mapping")){t.wp_based||(i=[],$.map(t.value_text_mapping,function(e,n){i.push({modifiers:e.modifiers,val:e.value,text:e.text})}),$('[data-for="'+t.nodeName+'"]').html(t.compiled_hogan_template.render({hits:i})),"default_values"in t&&t.default_values.length&&t.default_values.map(function(e,n){$('select[name="'+t.nodeName+'"]')[0]&&$('select[name="'+t.nodeName+'"]')[0].sumo?($('select[name="'+t.nodeName+'"]')[0].sumo.selectItem(e),$('select[name="'+t.nodeName+'"] option[value="'+e+'"]').prop("checked",!0)):$('select[name="'+t.nodeName+'"]').val(e)}));break}}}catch(e){console.error(e)}if(n===APP.FORM_MAPPING.length-1){try{("undefined"!=typeof init_sumo_with_visibility_check?init_sumo_with_visibility_check:init_sumo)(!1)}catch(e){console.warn({err:e})}l()}}}()})}function fillOutForm(e,n){var a;APP.filling_out_form=!0,console.info("form will be filled with",e,n),a=n&&!e?{}:(a=flattenObject(e,[].concat(APP.HIDDEN_SEARCH_PARAM_KEYS).concat(APP.NON_APPLICABLE_FORM_ITEMS)),simplifyFlattenedObject(a));for(var t=0;t<APP.FORM_MAPPING.length;t++){var o=APP.FORM_MAPPING[t];if(a.hasOwnProperty(o.nodeName)||n){var r,i=a[o.nodeName],s,c,l;if("null"!==i)switch(o.node){case"INPUT":switch(o.nodeType){case"text":case"tel":case"number":case"num":case"date":case"hidden":var d=$("#".concat(escapeJquerySensitiveChars(o.id))),u;n?"date"===o.nodeType?APP["picker_"+o.id]&&APP["picker_"+o.id].clear().trigger(o.summary_formatting.trigger):d.val(o.default_value).trigger(o.summary_formatting.trigger):(o.hasOwnProperty("mid_formatting_callback")?"value_of"===o.mid_formatting_callback.args?o.mid_formatting_callback.kwargs&&o.mid_formatting_callback.kwargs.extras&&"uses_callback"===o.mid_formatting_callback.kwargs.extras?(u=function e(n,a){console.debug("moment_val",{item_id:a,moment:n,node:$("[name=".concat(a.nodeName,"_submit]")).val(),clbck:a.mid_formatting_callback})},APP["picker_"+o.id],o.mid_formatting_callback.function.apply(null,[i,u,o])):i=o.mid_formatting_callback.function.call(this,i):(i=o.mid_formatting_callback.function.apply(i,o.mid_formatting_callback.args),-1===o.id.indexOf("price")&&-1===o.id.indexOf("fees")||(i=APP.getCurrency()+i),console.info("will set mid form cllbck",{val:i,id:o.id}),d.val(i)):d.val(i),"summary_formatting"in o&&(APP.form_processing||d.trigger(o.summary_formatting.trigger)));break;case"checkbox":case"radio":if("neighborhoods"===o.nodeName){if(n){console.time("neighborhoods"),$("input[name=neighborhoods]:checked").each(function(e,n){$(n).prop("checked",!1).trigger("blur").parent(2).parent().parent().prev().removeClass("expanded").find("input[type=checkbox]").prop("checked",!1)}),console.timeEnd("neighborhoods");break}isArray(i)?i.map(function(e){$('input[name="'+o.nodeName+'"][value="'+e+'"]').prop("checked",!0).trigger("blur")}):$('input[name="'+o.nodeName+'"][value="'+i+'"]').prop("checked",!0).trigger("blur"),$("[id*=parent-]").each(function(e,n){if($(n).is("checked"))return!1;var a=$(n).parent().parent().next().children().children().find("input").length,t;$(n).parent().parent().next().children().children().find("input:checked").length===a&&$(n).prop("checked",!0)})}else{["bedrooms","bathrooms","stories"].includes(o.nodeName)?n?($('input[name="'+o.nodeName+'"]').each(function(e,n){$(n).prop("checked",!1).trigger("blur").parent().removeClass("active")}),$('input[name="'+o.nodeName+'"][value="any"]').prop("checked",!0)):($('input[name="'+o.nodeName+'"]').prop("checked",!1).parent().removeClass("active"),isArray(i)||(/,/.test(i)&&(i=i.split(",")),i=[].concat(i)),i.map(function(e){console.info("will map",e),$('input[name="'+o.nodeName+'"][value='+escapeJquerySensitiveChars(e)+"]").prop("checked",!0).parent().removeClass("active").addClass("active")})):n?($('input[name="'+o.nodeName+'"]').prop("checked",!1).trigger("blur"),APP.handleResidentialCommercialToggle(!0)):function(){s=null,
8s=isArray(i)?i:1<(i="".concat(i)).split(",").length?i.split(","):[i];var a=!0;"lei"===APP.getTheme()&&(a=0<$('input[name="'+o.nodeName+'"]:checked').length),s.map(function(e,n){$('input[name="'+o.nodeName+'"][value="'+escapeJquerySensitiveChars(e)+'"]').prop("checked",a).trigger("blur")})}()}}break;case"SELECT":if(n)if(e){(c=$('select[name="'+o.nodeName+'"]')).val(i).trigger("pseudochange")}else{var c=$('select[name="'+o.nodeName+'"]'),l=anyIsOneOfSelectionOptiony(c);if(l&&l.length){c.val(l[0].value).trigger("pseudochange");break}c.val(c[0].options[0])}else{if("any"===i)break;isArray(i)?i.map(function(e){$('[name="'+o.nodeName+'"]').val(i),$('select[name="'+o.nodeName+'"] option[value="'+e+'"]').prop("checked",!0)}):(l=$('[name="'+o.nodeName+'"]').val(),$('[name="'+o.nodeName+'"]').val(decodeURIComponent(i)),i!==l&&$('[name="'+o.nodeName+'"]').trigger("refresh_suggestions"))}}}}"sort_order"in e&&($('[name="sort_order"]').val(e.sort_order),$('[name="sort_order"]')[0].sumo&&($('[name="sort_order"]')[0].sumo.selectItem(e.sort_order),$('[name="sort_order"]')[0].sumo.reload())),setTimeout(function(){APP.filling_out_form=!1},1e3),setTimeout(function(){APP.is_map_hidden()?setTimeout(function(){APP.first_url_parse=!1},500):(google.maps.event.addListenerOnce(APP.map,"idle",function(){setTimeout(function(){APP.first_url_parse=!1,APP.initBoundsChangedListener()},3e3)}),setTimeout(function(){APP.first_url_parse=!1},3e3))},1e3)}function handleForm(){var s=[],c=$('[name="sort_order"]');function l(n,e){var a={},t,t=(t=APP.FORM_MAPPING.filter(function(e){return e.nodeName===n}))&&0<t.length?t[0]:null;if(console.info("form_mapping_object",t),t&&"post_formatting_callback"in t&&e&&""!==e)switch(console.info("val",e),t.post_formatting_callback.args){case"value_of":e=t.nodeName.match(/min|max/)?t.post_formatting_callback.function.apply(null,[].concat(e).concat(t)):t.post_formatting_callback.function.apply(null,[].concat(e));break;case"value_of_hooked_element":e=t.post_formatting_callback.function.apply(null,[t.post_formatting_callback.hook]);break;default:e=t.post_formatting_callback.function.apply(null,[].concat(t.post_formatting_callback.args))}return console.info("key, val",{key:n,val:e}),a[n]=e,console.info("dynamicObject",a),a}window.serialize=function(e){if(!e||"FORM"!==e.nodeName)return[];for(var n,a,t=[],n=e.elements.length-1,o,r,i,o;0<=n;n-=1)if(""!==e.elements[n].name)switch(e.elements[n].nodeName){case"INPUT":switch(e.elements[n].type){case"text":case"number":case"tel":case"date":case"hidden":case"button":e.elements[n].value&&0<e.elements[n].value.length&&t.push(l(e.elements[n].name,e.elements[n].value));break;case"checkbox":e.elements[n].checked&&(r=(o=e.elements[n]).name,i=o.value,o=t.findInArrayOfObjects(r),console.info("q",t),console.info("is_found",o),o.index&&null!==o.index?t[o.index]=l(r,[].concat(o.element[r]).concat(i)):t.push(l(r,i)));break;case"radio":e.elements[n].checked&&t.push(l(e.elements[n].name,e.elements[n].value))}break;case"TEXTAREA":t.push(l(e.elements[n].name,e.elements[n].value));break;case"SELECT":switch(e.elements[n].type){case"select-one":t.push(l(e.elements[n].name,e.elements[n].value));break;case"select-multiple":for(a=e.elements[n].options.length-1;0<=a;a-=1)e.elements[n].options[a].selected&&t.push(l(e.elements[n].name,e.elements[n].options[a].value))}}return JSON.stringify(t)!==JSON.stringify(s)?s=t:s},c.on("change",function(e){e.preventDefault(),APP.$form.trigger("change",["sort_change","no_bounds_fitting"])}),$(".form-group .close-btn").not(".regions-close-toggle, .subways-close-toggle").on("touchstart click",function(){toggleHideDropdows({force:!0}),$(".suggestions").not(".d-none").addClass("d-none"),$("body").removeClass("noYoverflow")}),$(".form-group .close-btn.regions-close-toggle, .form-group .close-btn.subways-close-toggle").on("click",function(){toggleHideDropdows({just_regions:!0})}),$(".regions-toggle, .subways-toggle").on("click",function(){$("body").toggleClass("noYoverflow")}),$(".form-group .dropdown-toggle").on("click",function(){}),$(".regions-group .dropdown-toggle, .subways-group .dropdown-toggle").on("click",function(){$("body").addClass("noYoverflow")}),APP.$form.on("submit",function(e){e.preventDefault(),e.stopPropagation(),APP.isMobile()&&$(this).trigger("change")}).on("change",function(e){for(var n=arguments.length,a=new Array(1<n?n-1:0),t=1;t<n;t++)a[t-1]=arguments[t];function o(e){return APP.force_retrigger_form||e&&e.originalEvent&&e.originalEvent.target&&"INPUT"===e.originalEvent.target.nodeName}a[1]&&"no_bounds_fitting"===a[1]||(a[1]="no_bounds_fitting"),e.preventDefault(),e.stopPropagation(),(a=!Array.isArray(a)?[a]:a)&&a.length&&"sort_
8change"===a[0]&&(APP.force_retrigger_form=!0);var r=APP.first_url_parse||APP.force_return_form_change||APP.triggered_request||APP.rendering_map||"q"===$(e.target)[0].id;if(!(r=o(e)?!1:r)){if(a)console.info("do args",a);else{if(r)return;APP.form_triggers.non_argumented_form=!0}APP.form_processing=!0,APP.force_retrigger_form=!1,setTimeout(function(){toggleHideDropdows({force:!1,only_suggestions:!0})},300);var r=$(this),i=shallowCopy(DEFAULT_REQUEST_PARAMS());if(APP.map&&(APP.skip_map_on_mobile()||APP.didntMoveMap()||APP.locationDitch||!isInteractiveSearch())&&!APP.customBoundary)isInteractiveSearch()||(i=Object.assign(i,constructGeoShapeQueryObject("bbox"))),!APP.zoomToSeeMarkerClusters()&&isInteractiveSearch()&&APP.redoClickedViewport||(i.map_bounds.applicable=!1,i.map_bounds.center_bias=constructCenterBias());else if(APP.customBoundary||!(void 0!==a&&0<a.length&&-1!==(-1!==a.indexOf("map_bounds_changed")||a.indexOf("redo_in_rectangle")))&&a){if(APP.customBoundary)switch(console.info("has custom boundary"),APP.customBoundary.type){case"polygon":i=Object.assign(i,constructGeoShapeQueryObject("polygon"));break;case"circle":i=Object.assign(i,constructGeoShapeQueryObject("circle"));break;case"rectangle":i=Object.assign(i,constructGeoShapeQueryObject("rectangle"))}}else i=Object.assign(i,constructGeoShapeQueryObject("bbox"));var r=serialize(r[0]),r;(r=groupArrayObjectsByKey(r)).map(function(e){i=replaceInNestedDictionary(i,e)}),i.sort_order=c.val();var r=hashObject(i);if(!(a&&Array.isArray(a)&&(a.inArray("redo_in_rectangle")||a.inArray("map_bounds_changed")||a.inArray("bounds_changed"))||APP.form_triggers.redo_clicked)&&APP.last_request_hash===r)return APP.form_processing=!1,APP.last_request_hash=null,console.warn("would return because APP.last_request_hash === hash_"),!1;APP.last_request_hash=r,isInteractiveSearch()||APP.form_triggers.redo_clicked||APP.customBoundary||APP.zoomToSeeMarkerClusters()&&(i.map_bounds.applicable=!1),console.warn("triggering bounds chaged for initFromURLParams"),initFromURLParams(i,"bounds_changed",{no_bounds_fitting:a[1]&&"no_bounds_fitting"===a[1]}),applyOnTriggerSearchCallbacks()}})}function clearSearchInput(e,n){if(APP.$query.val(""),e&&n)try{$(e).typeahead("val",""),$(e).typeahead("setQuery","")}catch(e){console.debug("tphd e",e)}
8}
9"use strict";function initTypeaheadAutocomplete(n,e){var t=n.data("redirect-url")||"";APP.initBloodhounds(n,e,APP.custom_bloodhounds||APP.create_custom_bloodhounds(e)).bind("typeahead:select",function(e,n){switch(n.type){case"listing_id":case"listings_all":window.location.href="".concat(t,"/search?triggerListingId=").concat(n.prefixed_id);break;case"filters":var o=APP.FORM_MAPPING.filter(function(e){return e.id===n.item_id})[0];encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?").concat(o.nodeName,"=").concat(n.value));break;case"agent_id":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?agent_id=").concat(n.text_match));break;case"neighborhood":case"subdivision":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?neighborhoods=").concat(n.text_match));break;case"boroughs":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?neighborhoods=").concat(n.value));break;case"postal_code":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?zip_code=").concat(n.text_match));break;case"city":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?city=").concat(n.text_match));break;case"address":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?address=").concat(encodeURIComponent(n.text_match)));break;case"keyword":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?keyword=").concat(encodeURIComponent(n.text_match)));break;case"nearby_schools":encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search?nearby_schools=").concat(encodeURIComponent(n.text_match)))}}).bind("typeahead:beforeclose",function(){return 991<document.body.clientWidth}),n.closest("form").find('button[type="submit"]').on("click",function(e){e.preventDefault();var e=n.closest("form").find(".Typeahead-selectable:first");if(!e.length)return!1;e.length&&"keyword"!==e.prev().text().toLowerCase()?e.trigger("click"):encodeAndSetAsWindowHrefAndNullifyStatusAndListingType("".concat(t,"/search"))})}$(window).on("load",function(){APP.$query_=$("#q_"),APP.$query_&&APP.$query_.length&&(APP.AUTOCOMPLETE_URL=APP.apiUrl+"/autocomplete",window.DEFAULT_REQUEST_PARAMS_=function(){return Immutable.fromJS({num_of_listings_to_show:24,offset:"0",clusters_needed:!0,sort_order:"price_desc",map_bounds:{applicable:!1,zoom:APP.MAP_INIT_ZOOM,method:"bbox",shape:"BBOX(".concat(mapBoundsToParams(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1])),")"),split_vp:toSplitBounds(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1]))},neighborhoods:[],filters:[{prices:{prices_min:null,prices_max:null}},{bedrooms:"any"},{bathrooms:"any"},{listing_type:""},{class:APP.REQUEST_DEFAULTS.class()},{type:APP.REQUEST_DEFAULTS.type()},{property_type:[]},{status:""},{square_feet:{square_feet_min:null,square_feet_max:null}},{land_sqft:{land_sqft_min:null,land_sqft_max:null}},{year_built:{year_built_min:null,year_built_max:null}},{parking_spaces:{parking_spaces_min:null,parking_spaces_max:null}},{days_on_site:null},{open_house:{open_house_min:null,open_house_max:null}},{additional_options:[]},{pool:null},{sales_conditions:[]},{amenities:[]},{land_tenure:null},{zip_code:null},{city:null},{address:null},{agent_id:null},{max_monthly_fees:null},{keyword:null},{nearby_schools:[]},{special_features:[]}]}).toJSON()},window.DEFAULT_REQUEST_PARAMS=function(){return DEFAULT_REQUEST_PARAMS_.call(null)},APP.FORM_MAPPING_FOR_BLOODHOUND=makeImmutable(shallowCopy(DEFAULT_REQUEST_PARAMS())),APP.bloodhoundReadyFormMapping=function(){return APP.FORM_MAPPING_FOR_BLOODHOUND.toJSON()},renderForm().then(function(){var e=function e(){APP.geocoder=new google.maps.Geocoder};window.geocodeQuery=function(e,o){var t={original_query:e,success:!1,response:null,center:null,applicable_zoom:null,type:""};APP.geocoder.geocode({address:e},function(e,n){if("OK"===n){switch(t.success=!0,t.original_query=e[0].formatted_address,t.response=e,APP.$query_.val(t.original_query),!0){case-1!==e[0].types.indexOf("political")&&e[0].types.indexOf("sublocality_level_1")<=-1:t.type="city";break;case-1!==e[0].types.indexOf("sublocality"):t.type="neighborhood";break;case-1!==e[0].types.indexOf("route"):t.type="route";break;case-1!==e[0].types[0].indexOf("postal_code"):t.type="neighborhood";break;default:t.type="overview"}switch(t.type){case"city":t.applicable_zoom=11;break;case"neighborhood":t.applicable_zoom=14;break;case"route":case"overview":t.applicable_zoom=17;break;default:t.applicable_zoom=9}e[0].geometry.bounds?t.bounds=e[0].geometry.bounds:t.bounds=e[0].geometry.viewport,t.center=e[0].geometry.location,o(t)}else o(null)})};try{e()}catch(e){}initTypeaheadAutocomplete(APP.$query_,APP.AUTOCOMPLETE_URL),bindMagnifyingGlass()}))});
10"use strict";function renderPillbox(e){var c=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],d=/^(([a-zA-Z ]+)\:\s)/gim;
10console.info("will render pbox",e);var o=$("[data-for=pillbox]"),n=$("#input-wrapper");t||0!==o.text().length||o.html(APP.pillbox_template.render()),APP.$myPillbox=$("#myPillbox"),APP.$myPillbox.addClass("loading"),n.removeClass("has-overflow"),APP.skip_map_on_mobile()&&APP.$myPillbox.addClass("mobile"),t||(APP.$myPillbox.pillbox(),APP.$myPillbox.on("removed.fu.pillbox",function(e,o){if(!APP.force_return_form_change){if("removeAll"===o.method)return!1;APP.force_return_form_change=!0,o.data.form_mapping_items?1<o.data.form_mapping_items.length?$.each(o.data.form_mapping_items,function(e,t){o.data.onRemoveCallback.apply(null,[t])}):o.data.onRemoveCallback.apply(null,o.data.form_mapping_items):o.data.onRemoveCallback.apply(null,[]),setTimeout(function(){APP.force_return_form_change=!1,APP.$form.trigger("change",["bounds_changed"])},200)}}),APP.$myPillbox.pillbox("removeItems"));var p=[],a;for(a in e)if(e.hasOwnProperty(a)&&-1!==["neighborhoods","filters","map_bounds"].indexOf(a))switch(a){case"map_bounds":if(APP.customBoundary){p.push({text:APP.translation.pillbox.custom_boundary,value:APP.translation.pillbox.custom_boundary,data:{onRemoveCallback:function e(t){var o=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];APP.USER_INTERACTED_WITH_MAP=!1,APP.force_redo_grid=!0,setLocationDitch(),APP.redoClickedViewport=null,removeCustomDrawings(),o&&(APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"]),hideClearControls())}}});continue}if(APP.form_triggers.redo_clicked||APP.useMapArea||isInteractiveSearch()){var r,i,l,s=[0<APP.TO_SET_URL_SEARCH_PARAMS.neighborhoods.length,getObjectFromArrayByKey(APP.TO_SET_URL_SEARCH_PARAMS.filters,"agent_id",!0),getObjectFromArrayByKey(APP.TO_SET_URL_SEARCH_PARAMS.filters,"zip_code",!0)].some(function(e){return Boolean(e)});if(!APP.form_triggers.location_flush&&!s){if(APP.is_map_hidden())continue;APP.useMapArea=!0,p.push({text:APP.translation.pillbox.map_area,value:APP.translation.pillbox.map_area,data:{onRemoveCallback:function e(t){var o=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];APP.resetRedoGridParameters(),APP.force_redo_grid=!0,APP.USER_INTERACTED_WITH_MAP=!1,turnOffInteractive(),setLocationDitch(),hideClearControls(),APP.useMapArea=!1,APP.FORCE_SET_BOUNDS=null,APP.redoClickedViewport=null,o&&(addOnRenderCallback(function(){google.maps.event.trigger(APP.map,"zoom_changed",[])},[]),APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"]))}}});continue}}if(!("autocomplete_bounds_object"in e[a]&&getAutocompleteBoundsDataJson()))continue;var u=getAutocompleteBoundsDataJson();p.push({text:u.text_match,value:u.google_object.original_query,data:{onRemoveCallback:function e(t){var o=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];APP.redoClickedViewport=null,APP.$autocomplete_bounds_object.data("json",null),APP.FORCE_SET_BOUNDS=null,o&&APP.$form.trigger("change",["bounds_changed"])}}});break;case"neighborhoods":var s=getSelectedParentRegion(),u=e[a];if(0===u.length)continue;APP.redoClickedViewport=null;var m="",m=1!==(u=u.map(function(e){return-1!==e.indexOf(":")&&e.match(/([a-zA-Z ]+){1,}\s?\:\s?([a-zA-Z ]+){1,}$/g)&&Boolean(e.split(":")[1])?"{0}".format(e.split(":")[1].replace(/_/g," ")):"{0}".format(e.replace(/:/g,"").replace(/_/g," "))})).length||s?2===u.length?"{0}".format(u.join(", ")):1===u.length&&s?"{0} {1}".format(APP.translation.autocomplete.multi_joiner,s):"{0}, {1} (+{2})".format(u[0],u[1],u.length-2):"{0}".format(u[0]);u.map(function(n){p.push({text:n,value:n,data:{klass:"neighborhood",onRemoveCallback:function e(t){var o=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];USE_CHECKBOXED_NEIGHBORHOODS?(setLocationDitch(),$("input[name=neighborhoods]:checked").each(function(e,t){$(t).prop("checked",!1).trigger("blur").parent(2).parent().parent().prev().removeClass("expanded").find("input[type=checkbox]").prop("checked",!1)}),uncheckAllRegionParents()):(removeFromValues($("input[name=neighborhoods]"),n),setLocationDitch(),APP.resetRedoGridParameters()),o&&APP.$form.trigger("change",["bounds_changed"])}}})});break;case"filters":$.each(e.filters,function(e,t){var o,n=!1,a=!1,i=Object.keys(t)[0],r,o,n,l,s,o,o,o;(a=c&&!c.includes(i)?!0:a)||(o=t[i],n=!!(isArray(o)&&0<o.length)||(isDict(o)&&0<Object.
10size(o)?(r=[],$.each(o,function(e,t){t&&"any"!==t&&r.push(!0)}),0<r.length):null!==o&&""!==o&&"any"!==o&&0<(""+o).length)),!n||(l=APP.FORM_MAPPING.filter(function(e){return e.id===i||e.nodeName===i||e.id.startsWith(i)||e.nodeName.startsWith(i)})[0])&&l.summary_formatting&&(s=function e(t,o){var t=Object.assign({},t),r=o,o=APP.FORM_MAPPING.filter(function(e){return e.id===i||e.nodeName===i});p.push({text:r,value:r,data:{klass:t.nodeName,onRemoveCallback:function e(t){var o=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];switch((t=arguments[0]||t).nodeType){case"text":case"number":case"date":case"hidden":case"tel":if(["address","zipcode"].indexOf(t.id)&&(setLocationDitch(),APP.redoClickedViewport=null),"date"===t.nodeType)APP["picker_"+t.id]&&APP["picker_"+t.id].clear();else if("hidden"===t.nodeType){if(removeFromValues($("[name=".concat(escapeJquerySensitiveChars(t.nodeName),"]")),r,t.default_value),$("#listingsFilters").length&&o&&$("#listingsFilters").trigger("do-trigger-search"),o)try{APP.fitBaseBounds(function(){},function(){APP.map.setZoom(APP.MAP_INIT_ZOOM),APP.map.setCenter(APP.MAP_INIT_CENTER)})}catch(e){}}else $('[name="'.concat(t.nodeName,'"]')).val(t.default_value||"").trigger(o?t.summary_formatting.trigger:""),t.default_value||$('option [name="'.concat(t.nodeName,'"]')).prop("checked",!1);break;case"checkbox":case"radio":["bedrooms","bathrooms","stories"].inArray(t.nodeName)?($('input[name="'+t.nodeName+'"]').each(function(e,t){$(t).prop("checked",!1).trigger("blur").parent().removeClass("active")}),$('input[name="'+t.nodeName+'"][value="any"]').prop("checked",!0)):"neighborhoods"===t.nodeName?$("input[name=neighborhoods]:checked").each(function(e,t){$(t).prop("checked",!1).trigger("blur").parent(2).parent().parent().prev().removeClass("expanded").find("input[type=checkbox]").prop("checked",!1)}):$('input[name="'+t.nodeName+'"]').prop("checked",!1).trigger("blur");break;case"select":var n=$('select[name="'+t.nodeName+'"]'),a=anyIsOneOfSelectionOptiony(n);if(a&&a.length){n.val(a[0].value),n.trigger("pseudochange");break}n[0].options[0].value?n.val(n[0].options[0].value):n.val(n[0].options[0].innerHTML),n.trigger("pseudochange")}},form_mapping_items:o.length?o:[t]}})},o="is_select"===l.classList?[o]:[],o=l.summary_formatting.args.apply(null,o),isArray(o)||(o=[].concat(o)),(o=l.summary_formatting.callback.apply(null,o))&&("hidden"===l.nodeType?o.replace(d,"").split(/\,\s?/gim).map(function(e){(e=decodeURIComponent(e.replace(R_TWO_OR_MORE_WHITESPACE,"")))&&e.length&&s(l,decodeURIComponent(e))}):s(l,o)))})}try{p.sort(function(e,t){var e=e.text.toUpperCase(),t=t.text.toUpperCase();return e<t?-1:t<e?1:0});var P={map_area:.5,listing_type:1,property_type:1.5,neighborhood:2,prices_min:3,prices_max:4,bedrooms:5,bathrooms:6};p.map(function(e){e.data.priority=Object.keys(P).inArray(e.data.klass)?P[e.data.klass]:1/0}),p.sort(function(e,t){return e.data.priority-t.data.priority})}catch(e){return console.error("pillbox sorting error",{e:e,elements:p}),APP.$myPillbox.removeClass("loading"),!1}var h=function e(t,o){var o=o||"12px Roboto, Arial, sans-serif",t=$('<span style="display: inline-block">'+t+"</span>").css({font:o,float:"left","white-space":"nowrap"}).appendTo($("body")),n=t.width(),o={width:t.width(),height:t.height()};return t.remove(),o},o=function e(t){if(APP.MAX_NUM_OF_PILLS_TO_DISPLAY)return APP.MAX_NUM_OF_PILLS_TO_DISPLAY;if(t.length<=1)return 1;var o,n=t.map(function(e){return e.text.trim()}).map(h).map(function(e){return e.width+25}),a,r=.9*$("#input-wrapper").width();if(n.reduce(function(e,t){return e+t})<=r)return t.length;for(var i=0,l=-1,s=0;s<n.length;s++){var c=i;if(c+=n[s],!(i<=r&&c<=r)){l=s;break}i+=n[s],l=s}return(-1===l?t:t.slice(0,l)).length},o=t?10:APP.skip_map_on_mobile()?1:o(p),n;if(window.max_pill_length=o,t)return p.map(function(e){var t;return e.text.trim()});p.length>o?(n.addClass("has-overflow"),p.push({text:p.length-o+APP.translation.pillbox.more_keyword,value:p.length-o+APP.translation.pillbox.more_keyword,data:{onRemoveCallback:function e(){},onClickCallback:function e(){APP.$query.focus()},last:!0}})):n.removeClass("has-overflow"),0!==APP.$myPillbox.pillbox("items").length&&JSON.stringify(APP.$myPillbox.pillbox("items"))===JSON.stringify(p)||(APP.$myPillbox.pillbox("addItems",-1,p),APP.$myPillbox.removeClass("loading"),(n=p[p.length-1])&&n.data&&n.data.last&&($(".btn-default.pill:last-child").addClass("last"),$(".btn.btn-default.pill:nth-child(n + ".concat(window.max_pill_length+1,"):not(.last)")).addClass("d-none")),setTimeout(function(){pillboxCloseListenerToggle(),initPillListeners(p),APP.pillbox_speech_bubble_options&&APP.pillbox_speech_bubble_options.length&&initPillboxTetheredSpeechBubbles(p)},600))}function initPillboxTetheredSpeechBubbles(a){var r=[];APP.pillbox_speech_bubble_options.map(function(t){var e=a.filter(function(e){return e.data.klass&&e.data.klass===t.field_name}),o=getObjectFromArrayByKey(APP.last_request.filters,t.field_name),n,o,e;e.length&&o.obj[t.field_name]&&(Array.isArray(o.obj[t.field_name])?o.obj[t.field_name].includes(t.field_value):o.obj[t.field_name]===t.field_value)&&(n=e[0],o=$('.btn.pill span:contains("'.concat(n.text,'")')).parent()[0],e=t.message,r.push({pill_text:n.text,bubble_text:e,node:o}))}
10),(r=r.sort(function(e,t){return $(e.node).isAfter($(t.node))?1:$(t.node).isAfter($(e.node))?-1:0}).filter(function(e){return!(camelize(e.pill_text)in APP.shepherd_tour_items)})).length&&(window.tour&&window.tour.complete(),window.tour=new Shepherd.Tour({defaults:{classes:"shepherd-element shepherd-open shepherd-theme-arrows",showCancelLink:!0,disableScroll:!0,useModalOverlay:!0,scrollTo:{behavior:"smooth",block:"center"}}}),r.map(function(t,o){window.tour.addStep(t.bubble_text,{text:[t.bubble_text],attachTo:{element:t.node,on:"bottom center"},classes:"shepherd ".concat(0===o?"shepherd-open":""," shepherd-theme-arrows shepherd-transparent-text"),buttons:[{text:o===r.length-1?"Done":"Next",action:function e(){APP.shepherd_tour_items[camelize(t.pill_text)]=!0,o===r.length-1?window.tour.complete():window.tour.next()},classes:"shepherd-button-example-primary btn button-blue"}]})}),console.warn({shepherd_tour_items:r,tour:tour}),tour.start())}function handlePillboxWrapper(e){window.pillboxWrapperInterval&&clearInterval(window.pillboxWrapperInterval),e=e||$("#input-wrapper"),window.pillboxWrapperInterval=setInterval(function(){e.hasClass("focused")&&!APP.$query.is(":focus")&&e.removeClass("focused"),(APP.$query.is(":focus")||e.is(":focus")||$(".btn.pill").hasClass("focus"))&&!e.hasClass("focused")&&e.addClass("focused")},100),$(document).keyup(function(e){27===e.keyCode&&APP.$query.is(":focus")&&APP.$query.blur()})}
11"use strict";function PseudoCluster(e){switch(this.setValues(e),this.id_=e.z,this.cluster_obj=e.cluster_obj,this.objectID=e.objectID,this.leaves=e.leaves,this.amount=e.size,this.center=new google.maps.LatLng(e.lat,e.lng),this.position=e.position,!0){case e.size<=45:this.size=45;break;case 45<e.size&&e.size<=500:this.size=60;break;case 500<e.size&&e.size<=2e3:this.size=75;break;case 2e3<e.size:this.size=90}this.nbHits=e.size;
11var t=this.div_=document.createElement("div"),s=this.span_=document.createElement("span");t.appendChild(s),this.span_.innerHTML=""+numeral(e.size).format("0,0"),t.classList.add("cluster"),t.classList.add("size"+this.size),t.style.zIndex=e.z+1,this.formattedPriceRange=this.formatPriceRange()}function hideMarkerClusters(){if(console.log("hide marker cluster triggered..."),0<Object.keys(APP.pseudoclusters_markers).length)removeMarkerClusters();else if(0<APP.total_marker_clusters.length)for(var e in APP.total_marker_clusters){var t=APP.total_marker_clusters[e].markers_;t&&0<t.length&&t.forEach(function(e){e.setVisible(!1)}),APP.total_marker_clusters[e].repaint()}}function removeMarkerClusters(){if(0<APP.total_marker_clusters.length){for(var e=0;e<APP.pseudoclusters_markers.length;e++)APP.pseudoclusters_markers[e].setMap(null);for(var t=0;t<APP.total_marker_clusters.length;t++){var s=APP.total_marker_clusters[t];s.remove,s.onRemove()}APP.total_marker_clusters=[]}}function extendBoundsByClusterLocations(t,e){try{if(!e.map.clusters.length)return null;e.map.clusters.map(function(e){var e=new google.maps.LatLng(e.location.lat,e.location.lon);t.contains(e)||t.extend(e)})}catch(e){console.info("err",e)}}function extendBoundsByAddressLocations(i,a,l){function c(e){return(e+="").indexOf(",")&&Boolean(e)?e.split(","):[]}return i||(APP.FORCE_SET_BOUNDS=new google.maps.LatLngBounds,i=APP.FORCE_SET_BOUNDS),new Promise(function(o){var e=getObjectFromArrayByKey(APP.last_request.filters,"zip_code",!0)||[],t=getObjectFromArrayByKey(APP.last_request.filters,"address",!0)||[],s=getObjectFromArrayByKey(APP.last_request.filters,"city",!0)||[],n;l&&(n=(n=APP.last_request.neighborhoods||[]).filter(function(e){return!APP.nbhd_vs_bounds.exists(e)})),e=e&&c(e),t=t&&c(t),s=s&&c(s),l&&n&&(n=c(n));var r=[].concat(e.map(function(e){return{kind:"zip",val:e}})).concat(t.map(function(e){return{kind:"address",val:e}})).concat(s.map(function(e){return{kind:"city",val:e}})).concat(l?n.map(function(e){return{kind:"hood",val:e}}):[]);r.length?(r.filter(function(e){return!e.val.includes("borough")}).map(function(e){var t=e.kind,e=e.val,n=e;"city"!==t||APP.geoAutocompleteBias||(n="".concat(e," city")),geocodeQuery({query:n,kind:t},function(t){if(n&&t)if(console.warn("got geo results for "+n,t),APP.$query.val(""),1===r.length&&0===APP.map_drawing_overlays.length)if(APP.first_url_parse&&APP.content&&APP.content.hits&&APP.content.hits.length&&1===APP.content.hits.length)try{var e=APP.content.hits[0].location,s=e.lat,e=e.lng;if(!s||!e||!isLatLngValid({lat:s,lng:e}))throw new Error("Skipping lat long focus due to invalid coords.");APP.map.setCenter({lat:s,lng:e}),APP.map.setZoom(t.applicable_zoom)}catch(e){APP.map.setCenter(t.center),APP.map.setZoom(t.applicable_zoom)}else APP.map.setCenter(t.center),APP.map.setZoom(t.applicable_zoom);else APP.map_drawing_overlays.length&&APP.map_drawing_overlays.map(function(e){i=i.union(e.data.getBounds())}),t.bounds?i=i.union(t.bounds):i.contains(t.center)||(i=i.extend(t.center)),APP.map.fitBounds(i);else o(!0)})}),a&&APP.boundingBoxes.map(function(e){extendBoundsByPolygonPoints(i,e)}),o(!0)):o(!1)})}PseudoCluster.prototype.formatPriceRange=function(){var e,t,s,e=formatPriceSimplified(this.prices.minPrice),t=formatPriceSimplified(this.prices.maxPrice),s=formatPriceSimplified(this.prices.median);return 1===this.amount?APP.is_sales()?APP.translation.cluster.single_home.format(s,""):APP.translation.cluster.single_home.format(s,APP.translation.cluster.single_home_rental):(APP.is_sales()?APP.translation.cluster.sale_text:APP.translation.cluster.rent_text).format(this.amount,e,t,s)},PseudoCluster.prototype.calculateProjectedContentMetrics=function(e,t){var t=t||"13px Roboto, Arial, sans-serif",e=$('<span style="width: 220px">'+e+"</span>").css({font:t,float:"left","white-space":"nowrap"}).appendTo($("body")),s=e.width(),t={width:e.width(),height:e.height()};return e.remove(),t},PseudoCluster.prototype.calculateProjectedHoverDataLeftOffset=function(e){var t=this.div_,s;return-Math.abs($(t).width()-e)/2+"px"},PseudoCluster.prototype.onAdd=function(){var e=this.getPanes().overlayLayer,t=this.getPanes().overlayMouseTarget;e.style.zIndex=5e4,t.style.zIndex=10,t.appendChild(this.div_);var o=this.div_,r=this;this.listeners_=[google.maps.event.addListener(this,"position_changed",function(){r.draw()}),google.maps.event.addListener(this,"text_changed",function(){r.draw()})],google.maps.event.addDomListener($("span",$(o)),"mouseover",function(){google.maps.event.trigger(o,"mouseover")}),google.maps.event.addDomListener($("span",$(o)),"mouseout",function(){google.maps.event.trigger(o,"mouseout")}),google.maps.event.addDomListener(o,"mouseover",function(){var e,t,s,t,n;$(o).toggleClass("hover"),changeZindex($(o),"*",1e5),0<$("#clusterPriceRange"+r.id_).length||((n=document.createElement("div")).id="clusterPriceRange"+r.id_,t
11=r.formatPriceRange(),t=(s=r.calculateProjectedContentMetrics(t,"")).width+25,n.style.minWidth=t+"px",n.className="cluster-info-window",n.innerHTML=r.formattedPriceRange,n.style.left=r.calculateProjectedHoverDataLeftOffset(t),o.appendChild(n),console.info("me",r),console.info("self",o))}),google.maps.event.addDomListener(o,"mouseout",function(){$(o).toggleClass("hover"),changeZindex($(o),"/",1e5);var e=document.getElementById("clusterPriceRange"+r.id_);e&&e.parentNode&&e.parentNode.removeChild(e)}),google.maps.event.addDomListener(o,"click",function(){console.debug("cluster click triggered in main API"),APP.rendering_map=!1,APP.cluster_clicked=!0;var e=0,e=r.nbHits<=1?APP.MAX_ZOOM-1:APP.map.getZoom()<=13?APP.map.getZoom()+2:APP.map.getZoom()+1;google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.rendering_map=!1,APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"]),APP.onRenderCallbacks.push({fn:function e(){APP.cluster_clicked=!1},args:[]})}),APP.map.setZoom(e),APP.map.setCenter(r.center)})},PseudoCluster.prototype.draw=function(){var e,t=this.getProjection().fromLatLngToDivPixel(this.get("position")),s=this.div_;s.style.left=t.x-this.size/2+"px",s.style.top=t.y-this.size/2+"px"},PseudoCluster.prototype.onRemove=function(){try{if(this.listeners_)for(var e=0,t=this.listeners_.length;e<t;++e)google.maps.event.removeListener(this.listeners_[e]);google.maps.event.clearInstanceListeners(this),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),console.debug("thoroughly removed psudocluster")}catch(e){console.debug(e)}};
12"use strict";function InfoBubble(t){this.extend(InfoBubble,google.maps.OverlayView),this.tabs_=[],this.activeTab_=null,this.baseZIndex_=100,this.isOpen_=!1;var e=t||{};null==e.backgroundColor&&(e.backgroundColor=this.BACKGROUND_COLOR_),null==e.borderColor&&(e.borderColor=this.BORDER_COLOR_),null==e.borderRadius&&(e.borderRadius=this.BORDER_RADIUS_),null==e.borderWidth&&(e.borderWidth=this.BORDER_WIDTH_),null==e.padding&&(e.padding=this.PADDING_),null==e.arrowPosition&&(e.arrowPosition=this.ARROW_POSITION_),null==e.disableAutoPan&&(e.disableAutoPan=!1),null==e.disableAnimation&&(e.disableAnimation=!1),null==e.minWidth&&(e.minWidth=this.MIN_WIDTH_),null==e.shadowStyle&&(e.shadowStyle=this.SHADOW_STYLE_),null==e.arrowSize&&(e.arrowSize=this.ARROW_SIZE_),null==e.arrowStyle&&(e.arrowStyle=this.ARROW_STYLE_),null==e.closeSrc&&(e.closeSrc=this.CLOSE_SRC_),this.map_=t.map,this.buildDom_(),this.setValues(e)}(window.InfoBubble=InfoBubble).prototype.ARROW_SIZE_=4,InfoBubble.prototype.ARROW_STYLE_=0,InfoBubble.prototype.SHADOW_STYLE_=1,InfoBubble.prototype.MIN_WIDTH_=330,InfoBubble.prototype.ARROW_POSITION_=50,InfoBubble.prototype.PADDING_=10,InfoBubble.prototype.BORDER_WIDTH_=1,InfoBubble.prototype.BORDER_COLOR_="transparent",InfoBubble.prototype.BORDER_RADIUS_=4,InfoBubble.prototype.BACKGROUND_COLOR_="#fff",InfoBubble.prototype.CLOSE_SRC_="https://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif",InfoBubble.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},InfoBubble.prototype.buildDom_=function(){var t=this.bubble_=document.createElement("DIV"),e;t.style.position="absolute",t.style.zIndex=this.baseZIndex_,t.style.overflowY="hidden",(this.tabsContainer_=document.createElement("DIV")).style.position="relative";var o=this.close_=document.createElement("IMG");o.style.position="absolute",o.style.border=0,o.style.zIndex=this.baseZIndex_+1,o.style.cursor="pointer",o.style.display="block",o.style.opacity="0.4",o.style.filter="alpha(opacity=40)",o.src=this.CLOSE_SRC_;var i=this;google.maps.event.addDomListener(o,"click",function(){i.close(),google.maps.event.trigger(i,"closeclick")});var n=this.contentContainer_=document.createElement("DIV");n.style.overflowX="hidden",n.style.overflowY="auto",n.style.borderWidth="none",n.style.cursor="default",n.style.clear="both",n.style.position="relative";var o=this.content_=document.createElement("DIV"),s,r,b,a;n.appendChild(o),-1!==this.getArrowStyle_()&&((s=this.arrow_=document.createElement("DIV")).style.position="relative",s.style.height="10px",r=this.arrowOuter_=document.createElement("DIV"),b=this.arrowInner_=document.createElement("DIV"),a=this.getArrowSize_(),r.style.position=b.style.position="absolute",r.style.left=b.style.left="50%",r.style.height=b.style.height="20px",r.style.width=b.style.width="0",r.style.marginLeft=this.px(-a),r.style.borderWidth=this.px(a),r.style.borderBottomWidth=0);var a=this.bubbleShadow_=document.createElement("DIV");a.style.position="absolute",t.style.display=a.style.display="none",t.appendChild(this.tabsContainer_),t.appendChild(n),-1!==this.getArrowStyle_()&&(s.appendChild(r),s.appendChild(b)),t.appendChild(s)}
12,InfoBubble.prototype.setBackgroundClassName=function(t){this.set("backgroundClassName",t)},InfoBubble.prototype.setBackgroundClassName=InfoBubble.prototype.setBackgroundClassName,InfoBubble.prototype.backgroundClassName_changed=function(){this.content_.className=this.get("backgroundClassName")},InfoBubble.prototype.backgroundClassName_changed=InfoBubble.prototype.backgroundClassName_changed,InfoBubble.prototype.setTabClassName=function(t){this.set("tabClassName",t)},InfoBubble.prototype.setTabClassName=InfoBubble.prototype.setTabClassName,InfoBubble.prototype.tabClassName_changed=function(){this.updateTabStyles_()},InfoBubble.prototype.tabClassName_changed=InfoBubble.prototype.tabClassName_changed,InfoBubble.prototype.getArrowStyle_=function(){return parseInt(this.get("arrowStyle"),10)||0},InfoBubble.prototype.setArrowStyle=function(t){this.set("arrowStyle",t)},InfoBubble.prototype.setArrowStyle=InfoBubble.prototype.setArrowStyle,InfoBubble.prototype.arrowStyle_changed=function(){this.arrowSize_changed()},InfoBubble.prototype.arrowStyle_changed=InfoBubble.prototype.arrowStyle_changed,InfoBubble.prototype.getArrowSize_=function(){return parseInt(this.get("arrowSize"),10)||0},InfoBubble.prototype.setArrowSize=function(t){this.set("arrowSize",t)},InfoBubble.prototype.setArrowSize=InfoBubble.prototype.setArrowSize,InfoBubble.prototype.arrowSize_changed=function(){this.borderWidth_changed()},InfoBubble.prototype.arrowSize_changed=InfoBubble.prototype.arrowSize_changed,InfoBubble.prototype.setArrowPosition=function(t){this.set("arrowPosition",t)},InfoBubble.prototype.setArrowPosition=InfoBubble.prototype.setArrowPosition,InfoBubble.prototype.getArrowPosition_=function(){return parseInt(this.get("arrowPosition"),10)||0},InfoBubble.prototype.arrowPosition_changed=function(){var t=this.getArrowPosition_();this.arrowOuter_.style.left=this.arrowInner_.style.left=t+"%",this.redraw_()},InfoBubble.prototype.arrowPosition_changed=InfoBubble.prototype.arrowPosition_changed,InfoBubble.prototype.setZIndex=function(t){this.set("zIndex",t)},InfoBubble.prototype.setZIndex=InfoBubble.prototype.setZIndex,InfoBubble.prototype.getZIndex=function(){return parseInt(this.get("zIndex"),10)||this.baseZIndex_},InfoBubble.prototype.zIndex_changed=function(){var t=this.getZIndex();this.bubble_.style.zIndex=this.baseZIndex_=t,this.close_.style.zIndex=t+1},InfoBubble.prototype.zIndex_changed=InfoBubble.prototype.zIndex_changed,InfoBubble.prototype.setShadowStyle=function(t){this.set("shadowStyle",t)},InfoBubble.prototype.setShadowStyle=InfoBubble.prototype.setShadowStyle,InfoBubble.prototype.getShadowStyle_=function(){return parseInt(this.get("shadowStyle"),10)||0},InfoBubble.prototype.shadowStyle_changed=function(){var t,e="",o="",i="";switch(this.getShadowStyle_()){case 0:e="none";break;case 1:o="0 12px 15px 0 rgba(33,33,33,0.4)",i="transparent";break;case 2:o="0 0 2px rgba(33,33,33,0.3)",i="rgba(33,33,33,0.35)"}this.bubbleShadow_.style.boxShadow=this.bubbleShadow_.style.webkitBoxShadow=this.bubbleShadow_.style.MozBoxShadow=o,this.bubbleShadow_.style.backgroundColor=i,this.isOpen_&&(this.bubbleShadow_.style.display=e,this.draw())},InfoBubble.prototype.shadowStyle_changed=InfoBubble.prototype.shadowStyle_changed,InfoBubble.prototype.showCloseButton=function(){this.set("hideCloseButton",!1)},InfoBubble.prototype.showCloseButton=InfoBubble.prototype.showCloseButton,InfoBubble.prototype.hideCloseButton=function(){this.set("hideCloseButton",!0)},InfoBubble.prototype.hideCloseButton=InfoBubble.prototype.hideCloseButton,InfoBubble.prototype.hideCloseButton_changed=function(){this.close_.style.display=this.get("hideCloseButton")?"none":"block"},InfoBubble.prototype.hideCloseButton_changed=InfoBubble.prototype.hideCloseButton_changed,InfoBubble.prototype.setBackgroundColor=function(t){t&&this.set("backgroundColor",t)},InfoBubble.prototype.setBackgroundColor=InfoBubble.prototype.setBackgroundColor,InfoBubble.prototype.backgroundColor_changed=function(){var t=this.get("backgroundColor");this.contentContainer_.style.backgroundColor=t,this.arrowInner_.style.borderColor=t+" transparent transparent",this.updateTabStyles_()},InfoBubble.prototype.backgroundColor_changed=InfoBubble.prototype.backgroundColor_changed,InfoBubble.prototype.setBorderColor=function(t){t&&this.set("borderColor",t)},InfoBubble.prototype.setBorderColor=InfoBubble.prototype.setBorderColor,InfoBubble.prototype.borderColor_changed=function(){var t=this.get("borderColor"),e=this.contentContainer_,o=this.arrowOuter_;e.style.borderColor=t,o.style.borderColor=t+" transparent transparent",e.style.borderStyle=o.style.borderStyle=this.arrowInner_.style.borderStyle="solid",this.updateTabStyles_()},InfoBubble.prototype.borderColor_changed=InfoBubble.prototype.borderColor_changed,InfoBubble.prototype.setBorderRadius=function(t){this.set("borderRadius",t)},InfoBubble.prototype.setBorderRadius=InfoBubble.prototype.setBorderRadius,InfoBubble.prototype.getBorderRadius_=function(){return parseInt(this.get("borderRadius"),10)||0},InfoBubble.prototype.borderRadius_changed=function(){var t=this.getBorderRadius_(),e=this.getBorderWidth_();this.contentContainer_.style.borderRadius=this.contentContainer_.style.MozBorderRadius=this.contentContainer_.style.webkitBorderRadius=this.bubbleShadow_.style.borderRadius=this.bubbleShadow_.style.MozBorderRadius=this.bubbleShadow_.style.webkitBorderRadius=this.px(t),this.tabsContainer_.style.paddingLeft=this.tabsContainer_.style.paddingRight=this.px(t+e),this.redraw_()},InfoBubble.prototype.borderRadius_changed=InfoBubble.prototype.borderRadius_changed,InfoBubble.prototype.getBorderWidth_=function(){return parseInt(this.get("borderWidth"),10)||0},InfoBubble.prototype.setBorderWidth=function(t){this.set("borderWidth",t)},InfoBubble.prototype.setBorderWidth=InfoBubble.prototype.setBorderWidth,InfoBubble.prototype.borderWidth_changed=function(){var t=this.getBorderWidth_();this.contentContainer_.style.borderWidth=this.px(t),this.tabsContainer_.style.top=this.px(t),this.updateArrowStyle_(),this.updateTabStyles_(),this.borderRadius_changed(),this.redraw_()},InfoBubble.prototype.borderWidth_changed=InfoBubble.prototype.borderWidth_changed,InfoBubble.prototype.updateArrowStyle_=function(){var t=this.getBorderWidth_(),e=this.getArrowSize_(),o=this.getArrowStyle_(),i=this.px(e),n=this.px(Math.max(0,e-t)),s=this.arrowOuter_,r=this.arrowInner_;this.arrow_.style.marginTop=this.px(-t),s.style.borderTopWidth=i,r.style.borderTopWidth=n,0==o||1==o?(s.style.borderLeftWidth=i,r.style.borderLeftWidth=n):s.style.borderLeftWidth=r.style.borderLeftWidth=0,0==o||2==o?(s.style.borderRightWidth=i,r.style.borderRightWidth=n):s.style.borderRightWidth=r.style.borderRightWidth=0,o<2?(s.style.marginLeft=this.px(-e),r.style.marginLeft=this.px(-(e-t))):s.style.marginLeft=r.style.marginLeft=0,s.style.display=0==t?"none":""},InfoBubble.prototype.setPadding=function(t){this.set("padding",t)},InfoBubble.prototype.setPadding=InfoBubble.prototype.setPadding,InfoBubble.prototype.setCloseSrc=function(t){t&&this.close_&&(this.close_.src=t)},InfoBubble.prototype.setCloseSrc=InfoBubble.prototype.setCloseSrc,InfoBubble.prototype.getPadding_=function(){return parseInt(this.get("padding"),10)||0},InfoBubble.prototype.padding_changed=function(){var t=this.getPadding_();this.contentContainer_.style.padding=this.px(t),this.updateTabStyles_(),this.redraw_()},InfoBubble.prototype.padding_changed=InfoBubble.prototype.padding_changed,InfoBubble.prototype.px=function(t){return t&&t+"px"},InfoBubble.prototype.addEvents_=function(){var t=["mousedown","mousemove","mouseover","mouseout","mouseup","mousewheel","click","DOMMouseScroll","touchstart","touchend","touchmove","dblclick","contextmenu"],e=this.bubble_;this.listeners_=[];for(var o=0,i;
12i=t[o];o++)this.listeners_.push(google.maps.event.addDomListener(e,i,function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}))},InfoBubble.prototype.onAdd=function(){this.bubble_||this.buildDom_(),this.addEvents_();var t=this.getPanes();t&&(t.floatPane.appendChild(this.bubble_),t.floatShadow.appendChild(this.bubbleShadow_)),google.maps.event.trigger(this,"domready")},InfoBubble.prototype.onAdd=InfoBubble.prototype.onAdd,InfoBubble.prototype.draw=function(){var t=this.getProjection();if(t){var e=this.get("position");if(e){var o=0;this.activeTab_&&(o=this.activeTab_.offsetHeight);var i=this.getAnchorHeight_(),n=this.getArrowSize_(),s=this.getArrowPosition_();s/=100;var r=t.fromLatLngToDivPixel(e),b=this.contentContainer_.offsetWidth,e=this.bubble_.offsetHeight;if(b){this.pixelOffset&&this.pixelOffset.constructor&&this.pixelOffset.constructor===google.maps.Size||(this.pixelOffset=new google.maps.Size(0,0));var a=r.y-(e+n)+this.pixelOffset.height;i&&(a-=i);var h=r.x-b*s+this.pixelOffset.width,l;switch(this.bubble_.style.top=this.px(a),this.bubble_.style.left=this.px(h),parseInt(this.get("shadowStyle"),10)){case 1:this.bubbleShadow_.style.top=this.px(a+o-1),this.bubbleShadow_.style.left=this.px(h),this.bubbleShadow_.style.width=this.px(b),this.bubbleShadow_.style.height=this.px(this.contentContainer_.offsetHeight-n);break;case 2:b*=.8,this.bubbleShadow_.style.top=i?this.px(r.y):this.px(r.y+n),this.bubbleShadow_.style.left=this.px(r.x-b*s),this.bubbleShadow_.style.width=this.px(b),this.bubbleShadow_.style.height=this.px(2)}}}else this.close()}},InfoBubble.prototype.draw=InfoBubble.prototype.draw,InfoBubble.prototype.onRemove=function(){if(this.bubble_&&this.bubble_.parentNode&&this.bubble_.parentNode.removeChild(this.bubble_),this.bubbleShadow_&&this.bubbleShadow_.parentNode&&this.bubbleShadow_.parentNode.removeChild(this.bubbleShadow_),this.listeners_)for(var t=0,e;e=this.listeners_[t];t++)google.maps.event.removeListener(e)},InfoBubble.prototype.onRemove=InfoBubble.prototype.onRemove,InfoBubble.prototype.isOpen=function(){return this.isOpen_},InfoBubble.prototype.isOpen=InfoBubble.prototype.isOpen,InfoBubble.prototype.close=function(){this.bubble_&&(this.bubble_.style.display="none",this.bubble_.className=this.bubble_.className.replace(this.animationName_,"")),this.bubbleShadow_&&(this.bubbleShadow_.style.display="none",this.bubbleShadow_.className=this.bubbleShadow_.className.replace(this.animationName_,"")),this.isOpen_=!1},InfoBubble.prototype.close=InfoBubble.prototype.close,InfoBubble.prototype.open=function(t,e){var o=this;window.setTimeout(function(){o.open_(t,e)},0)},InfoBubble.prototype.open_=function(t,e){var o,i,n;this.updateContent_(),t&&this.setMap(t),e&&(this.set("anchor",e),this.bindTo("anchorPoint",e),this.bindTo("position",e)),this.bubble_.style.display=this.bubbleShadow_.style.display="",this.get("disableAnimation")||(this.bubble_.className+=" "+this.animationName_,this.bubbleShadow_.className+=" "+this.animationName_),this.redraw_(),this.isOpen_=!0,this.get("disableAutoPan")||(n=this,window.setTimeout(function(){n.panToView()},200))},InfoBubble.prototype.open=InfoBubble.prototype.open,InfoBubble.prototype.setPosition=function(t){t&&this.set("position",t)},InfoBubble.prototype.setPosition=InfoBubble.prototype.setPosition,InfoBubble.prototype.getPosition=function(){return this.get("position")},InfoBubble.prototype.getPosition=InfoBubble.prototype.getPosition,InfoBubble.prototype.position_changed=function(){this.draw()},InfoBubble.prototype.position_changed=InfoBubble.prototype.position_changed,InfoBubble.prototype.panToView=function(){var t=this.get("map"),e=this.getProjection(),o,i,n,s,s,n,s,n;t.getBounds()&&e&&(i=-(this.bubble_.offsetWidth/2-20),n=-(this.bubble_.offsetHeight+20),s=e.fromLatLngToDivPixel(this.getPosition()),s=new google.maps.Point(s.x+i-30,s.y+n-15),n=new google.maps.Point(s.x+this.bubble_.offsetWidth+30,s.y+this.bubble_.offsetHeight+15),s=e.fromDivPixelToLatLng(s),n=e.fromDivPixelToLatLng(n),t.getBounds().contains(n)&&t.getBounds().contains(s)||t.panToBounds(new google.maps.LatLngBounds(s,n)))},InfoBubble.prototype.panToView=InfoBubble.prototype.panToView,InfoBubble.prototype.htmlToDocumentFragment_=function(t){t=t.replace(/^\s*([\S\s]*)\b\s*$/,"$1");var e=document.createElement("DIV");if(e.innerHTML=t,1==e.childNodes.length)return e.removeChild(e.firstChild);for(var o=document.createDocumentFragment();e.firstChild;)o.appendChild(e.firstChild);return o},InfoBubble.prototype.removeChildren_=function(t){if(t)for(var e;e=t.firstChild;)t.removeChild(e)},InfoBubble.prototype.setContent=function(t){this.set("content",t)},InfoBubble.prototype.setContent=InfoBubble.prototype.setContent,InfoBubble.prototype.getContent=function(){return this.get("content")},InfoBubble.prototype.getContent=InfoBubble.prototype.getContent,InfoBubble.prototype.updateContent_=function(){if(this.content_){this.removeChildren_(this.content_);var t=this.getContent();if(t){"string"==typeof t&&(t=this.htmlToDocumentFragment_(t)),this.content_.appendChild(t);for(var e=this,o=this.content_.getElementsByTagName("IMG"),i=0,n;n=o[i];i++)google.maps.event.addDomListener(n,"load",function(){e.imageLoaded_()})}this.redraw_()}},InfoBubble.prototype.imageLoaded_=function(){var t=!this.get("disableAutoPan");this.redraw_(),!t||0!=this.tabs_.length&&0!=this.activeTab_.index||this.panToView()},InfoBubble.prototype.updateTabStyles_=function(){if(this.tabs_&&this.tabs_.length){for(var t=0,e;e=this.tabs_[t];t++)this.setTabStyle_(e.tab);this.activeTab_.style.zIndex=this.baseZIndex_;var o=this.getBorderWidth_(),i=this.getPadding_()/2;this.activeTab_.style.borderBottomWidth=0,this.activeTab_.style.paddingBottom=this.px(i+o)}},InfoBubble.prototype.setTabStyle_=function(t){var e=this.get("backgroundColor"),o=this.get("borderColor"),i=this.getBorderRadius_(),n=this.getBorderWidth_(),s=this.getPadding_(),r=this.px(-Math.max(s,i)),b=this.px(i),i=this.baseZIndex_;t.index&&(i-=t.index);
12var a={cssFloat:"left",position:"relative",cursor:"pointer",backgroundColor:e,border:this.px(n)+" solid "+o,padding:this.px(s/2)+" "+this.px(s),marginRight:r,whiteSpace:"nowrap",borderRadiusTopLeft:b,MozBorderRadiusTopleft:b,webkitBorderTopLeftRadius:b,borderRadiusTopRight:b,MozBorderRadiusTopright:b,webkitBorderTopRightRadius:b,zIndex:i,display:"inline"},h;for(h in a)t.style[h]=a[h];var i=this.get("tabClassName");null!=i&&(t.className+=" "+i)},InfoBubble.prototype.addTabActions_=function(t){var e=this;t.listener_=google.maps.event.addDomListener(t,"click",function(){e.setTabActive_(this)})},InfoBubble.prototype.setTabActive=function(t){var t=this.tabs_[t-1];t&&this.setTabActive_(t.tab)},InfoBubble.prototype.setTabActive=InfoBubble.prototype.setTabActive,InfoBubble.prototype.setTabActive_=function(t){if(!t)return this.setContent(""),void this.updateContent_();var e=this.getPadding_()/2,o=this.getBorderWidth_(),i;this.activeTab_&&((i=this.activeTab_).style.zIndex=this.baseZIndex_-i.index,i.style.paddingBottom=this.px(e),i.style.borderBottomWidth=this.px(o)),t.style.zIndex=this.baseZIndex_,t.style.borderBottomWidth=0,t.style.marginBottomWidth="-10px",t.style.paddingBottom=this.px(e+o),this.setContent(this.tabs_[t.index].content),this.updateContent_(),this.activeTab_=t,this.redraw_()},InfoBubble.prototype.setMaxWidth=function(t){this.set("maxWidth",t)},InfoBubble.prototype.setMaxWidth=InfoBubble.prototype.setMaxWidth,InfoBubble.prototype.maxWidth_changed=function(){this.redraw_()},InfoBubble.prototype.maxWidth_changed=InfoBubble.prototype.maxWidth_changed,InfoBubble.prototype.setMaxHeight=function(t){this.set("maxHeight",t)},InfoBubble.prototype.setMaxHeight=InfoBubble.prototype.setMaxHeight,InfoBubble.prototype.maxHeight_changed=function(){this.redraw_()},InfoBubble.prototype.maxHeight_changed=InfoBubble.prototype.maxHeight_changed,InfoBubble.prototype.setMinWidth=function(t){this.set("minWidth",t)},InfoBubble.prototype.setMinWidth=InfoBubble.prototype.setMinWidth,InfoBubble.prototype.minWidth_changed=function(){this.redraw_()},InfoBubble.prototype.minWidth_changed=InfoBubble.prototype.minWidth_changed,InfoBubble.prototype.setMinHeight=function(t){this.set("minHeight",t)},InfoBubble.prototype.setMinHeight=InfoBubble.prototype.setMinHeight,InfoBubble.prototype.minHeight_changed=function(){this.redraw_()},InfoBubble.prototype.minHeight_changed=InfoBubble.prototype.minHeight_changed,InfoBubble.prototype.addTab=function(t,e){var o=document.createElement("DIV");o.innerHTML=t,this.setTabStyle_(o),this.addTabActions_(o),this.tabsContainer_.appendChild(o),this.tabs_.push({label:t,content:e,tab:o}),o.index=this.tabs_.length-1,o.style.zIndex=this.baseZIndex_-o.index,this.activeTab_||this.setTabActive_(o),o.className=o.className+" "+this.animationName_,this.redraw_()},InfoBubble.prototype.addTab=InfoBubble.prototype.addTab,InfoBubble.prototype.updateTab=function(t,e,o){var t;!this.tabs_.length||t<0||t>=this.tabs_.length||(t=this.tabs_[t],null!=e&&(t.tab.innerHTML=t.label=e),null!=o&&(t.content=o),this.activeTab_==t.tab&&(this.setContent(t.content),this.updateContent_()),this.redraw_())},InfoBubble.prototype.updateTab=InfoBubble.prototype.updateTab,InfoBubble.prototype.removeTab=function(t){if(!(!this.tabs_.length||t<0||t>=this.tabs_.length)){var e=this.tabs_[t];e.tab.parentNode.removeChild(e.tab),google.maps.event.removeListener(e.tab.listener_),this.tabs_.splice(t,1);for(var o=0,i;i=this.tabs_[o];o++)i.tab.index=o;e.tab==this.activeTab_&&(this.tabs_[t]?this.activeTab_=this.tabs_[t].tab:this.tabs_[t-1]?this.activeTab_=this.tabs_[t-1].tab:this.activeTab_=void 0,this.setTabActive_(this.activeTab_)),this.redraw_()}},InfoBubble.prototype.removeTab=InfoBubble.prototype.removeTab,InfoBubble.prototype.getElementSize_=function(t,e,o){var i=document.createElement("DIV");i.style.display="inline",i.style.position="absolute",i.style.visibility="hidden","string"==typeof t?i.innerHTML=t:i.appendChild(t.cloneNode(!0)),document.body.appendChild(i);var t=new google.maps.Size(i.offsetWidth,i.offsetHeight);return e&&t.width>e&&(i.style.width=this.px(e),t=new google.maps.Size(i.offsetWidth,i.offsetHeight)),o&&t.height>o&&(i.style.height=this.px(o),t=new google.maps.Size(i.offsetWidth,i.offsetHeight)),document.body.removeChild(i),t},InfoBubble.prototype.redraw_=function(){this.figureOutSize_(),this.positionCloseButton_(),this.draw()},InfoBubble.prototype.figureOutSize_=function(){var t=this.get("map");if(t){var e=this.getPadding_(),o=this.getBorderWidth_(),i=this.getBorderRadius_(),n=this.getArrowSize_(),s=t.getDiv(),r=2*n,b=s.offsetWidth-r,t=s.offsetHeight-r-this.getAnchorHeight_(),a=0,h=this.get("minWidth")||0,s=this.get("minHeight")||0,l=this.get("maxWidth")||0,p=this.get("maxHeight")||0,l=Math.min(b,l),p=Math.min(t,p),d=0;if(this.tabs_.length)for(var u=0,f;f=this.tabs_[u];u++){var y=this.getElementSize_(f.tab,l,p),_=this.getElementSize_(f.content,l,p);h<y.width&&(h=y.width),d+=y.width,h<_.width&&(h=_.width)}else{var r=this.get("content"),_;(r="string"==typeof r?this.htmlToDocumentFragment_(r):r)&&(h<(_=this.getElementSize_(r,l,p)).width&&(h=_.width),s=this.get("maxHeight"))}l&&(h=Math.min(h,l)),p&&(s=Math.min(s,p)),(h=Math.max(h,d))==d&&(h+=2*e),n*=2,b<(h=Math.max(h,n))&&(h=b),t<s&&(s=t),this.tabsContainer_&&(this.tabHeight_=0,this.tabsContainer_.style.width=this.px(d)),this.contentContainer_.style.width=this.px(h),this.contentContainer_.style.height=this.px(s)}},InfoBubble.prototype.getAnchorHeight_=function(){var t;if(this.get("anchor")){var e=this.get("anchorPoint");if(e)return-1*e.y}return 0},InfoBubble.prototype.anchorPoint_changed=function(){this.draw()},InfoBubble.prototype.anchorPoint_changed=InfoBubble.prototype.anchorPoint_changed,InfoBubble.prototype.positionCloseButton_=function(){var t=this.getBorderRadius_(),e=this.getBorderWidth_(),o=2,i=2;this.tabs_.length&&this.tabHeight_&&(i+=this.tabHeight_),i+=e,o+=e;var e=this.contentContainer_;e&&e.clientHeight<e.scrollHeight&&(o+=15),this.close_.style.right=this.px(o),this.close_.style.top=this.px(i)};
13"use strict";function Label(e){this.setValues(e),this.classID=e.classID,this.inside=e.inside,this.is_location_protected=e.protected_location||!1,e.skip_interaction_listeners?this.skip_interaction_listeners=e.ski
13p_interaction_listeners:this.skip_interaction_listeners=!1,this.infobubbleHtmlContent=e.infobubbleHtmlContent,this.location=e.location,this.contentLength=e.contentLength,this.listingStatusClass="listing-status-".concat(camelize((e.listingStatus||"").toLowerCase())),e.minPrice&&e.maxPrice&&(this.minPrice=e.minPrice,this.maxPrice=e.maxPrice),(e.bd_count||e.ba_count)&&(this.bd_count=e.bd_count,this.ba_count=e.ba_count),e.formatted_bd_ba_counts&&(this.formatted_bd_ba_counts=e.formatted_bd_ba_counts);var t=this.div_=document.createElement("div"),a=this.span_=document.createElement("span");t.appendChild(a),this.span_.innerHTML=e.inside,this.div_.id=e.classID.toString(),t.style.zIndex=(e.zIndexAsArrayId||1e3*Math.random()+1e3).toString()}function showMarkerLabels(){$.each(APP.labels,function(e,t){$(t.div_).show()})}function hideMarkerLabels(){$.each(APP.labels,function(e,t){$(t.div_).hide()})}function showTempMarkerLabel(e){$(APP.temp_marker_labels[e].label.div_).show()}function hideTempMarkerLabel(e){$(APP.temp_marker_labels[e].label.div_).hide()}function removeTmpMarkerLabels(){for(var e in APP.temp_marker_labels){if(!APP.temp_marker_labels.hasOwnProperty(e))return;removeSingleMarkerLabel(e),removeSingleMarker(e)}}function removeMarkersFromMap(){if(console.info("labels len: ",Object.keys(APP.labels).length),console.info("markers len: ",Object.keys(APP.markers).length),0<Object.keys(APP.multi_markers_same_spot_array).length)for(var e in APP.multi_markers_same_spot_array){var t=APP.multi_markers_same_spot_array[e][3];if(t&&0<t.length)for(var a=0;a<t.length;a++){var i=t[a];removeSingleMarkerLabel(i.objectID.toString()),removeSingleMarker(i.objectID.toString()),removeSingleInfoBubble(i.objectID.toString())}}for(var r in removeTmpMarkerLabels(),APP.labels){if(!APP.labels.hasOwnProperty(r))return;removeSingleMarkerLabel(r),removeSingleMarker(r),removeSingleInfoBubble(r)}for(var n in APP.markers){if(!APP.markers.hasOwnProperty(n))return;removeSingleMarkerLabel(n),removeSingleMarker(n),removeSingleInfoBubble(n)}APP.markers={},APP.labels={},APP.infoBubbles={},APP.multi_markers_same_spot_array=[],APP.temp_marker_labels={},console.info("removed marker labels & co")}function removeSingleMarker(e){APP.markers[e]?(APP.markers[e].setMap(null),delete APP.markers[e]):APP.temp_marker_labels[e]&&APP.temp_marker_labels[e].marker.setMap(null)}function removeSingleMarkerLabel(e){APP.labels[e]?(APP.labels[e].onRemove(),delete APP.labels[e]):APP.temp_marker_labels[e]&&APP.temp_marker_labels[e].label.onRemove()}function removeSingleInfoBubble(e){APP.infoBubbles[e]&&(APP.infoBubbles[e].onRemove(),delete APP.infoBubbles[e])}function confirmHover(i){var r=$("#wrapper_"+i),e=r[0];if(!e)return!1;var t=google.maps.event.addDomListener(e,"mouseover",function(){return(!APP.last_request||!APP.last_request.clusters_needed)&&void(0===$("#wrapper_"+i+":hover").length||APP.is_map_hidden()||(e=APP.labels[i]||null,APP.temp_marker_labels[i]&&(e=APP.temp_marker_labels[i],showTempMarkerLabel(i)),e&&void 0!==e||(t=r.data("label-context"),a=new google.maps.Marker({position:{lat:t.location.lat,lng:t.location.lng},icon:"",fillColor:"#FFFFFF",map:APP.map,visible:!1,opacity:0}),t.markerObjectID=a,t.skip_interaction_listeners=!1,t.map=APP.map,APP.temp_marker_labels[i]={marker:a,label:new Label(t)},APP.temp_marker_labels[i].label.bindTo("position",a,"position"),e=APP.temp_marker_labels[i].label,console.info("APP.temp_marker_labels",APP.temp_marker_labels)),$(e.div_).removeClass("initial").removeClass("hover").addClass("hover"),changeZindex($(e.div_),"*",4e5)));var e,t,a});APP.listings_DOM_listeners.push(t);var e=google.maps.event.addDomListener(e,"mouseout",function(){if(!APP.is_map_hidden()){if(0!==$("#wrapper_"+i+":hover").length)return!1;var e=APP.labels[i]||null;return e||APP.temp_marker_labels[i]?APP.temp_marker_labels[i]?(hideTempMarkerLabel(i),removeSingleMarkerLabel(i),removeSingleMarker(i),delete APP.temp_marker_labels[i],!1):($(e.div_).attr("data-previewed")&&"true"===$(e.div_).attr("data-previewed")?$(e.div_).removeClass("hover").addClass("visited"):$(e.div_).removeClass("hover").addClass("initial"),void changeZindex($(e.div_),"/",4e5)):!1}});APP.listings_DOM_listeners.push(e)}Label.prototype.handleInfoBubble=function(a,e){var i=this,t;if(!e||!APP.infoBubbles[a]){for(var r in APP.infoBubbles)try{APP.infoBubbles[r].close()}catch(e){}APP.infoBubbles[a]||(t=i.infobubbleHtmlContent,APP.infoBubbles[a]=new InfoBubble({map:APP.map,content:t,position:new google.maps.LatLng(i.location.lat,i.location.lng),shadowStyle:1,minwidth:290,minHeight:120,maxHeight:1===i.contentLength?120:240,padding:10,backgroundColor:"#FFFFFF",borderRadius:6,arrowSize:4,borderWidth:0,borderColor:"transparent",disableAutoPan:!1,hideCloseButton:!1,arrowPosition:50,arrowStyle:i.is_location_protected?-1:0,pixelOffset:new google.maps.Size(0,9),closeSrc:""})),e||n()}function n(){APP.rendering_info_bubble=!0,APP.selected_info_bubble=APP.infoBubbles[a],APP.infoBubbles[a]&&!APP.infoBubbles[a].isOpen()?(null!==APP.selected_info_bubble&&APP.selected_info_bubble.close(),APP.infoBubbles[a].open(APP.map,i)):APP.infoBubbles[a]&&APP.infoBubbles[a].close(APP.map,i);var e=i.div_,t=i;try{e.classList.remove("red")}catch(e){}e.classList.add("white"),-1===APP.previewed_listings.indexOf(t.classID)&&APP.previewed_listings.push(t.classID),e.setAttribute("data-previewed","true"),setTimeout(function(){APP.rendering_info_bubble=!1,$(".bubble-listing").
13click(function(e){e.preventDefault();var e=$(this).data("id");createTemporaryModalElement(e),handleModals(),$(".toggle-modal#tmp_modal").trigger("click").remove()})},150),send_to_ga("pageview",window.location.href,"Listing #{0} Pushpin Preview".format(a))}},Label.prototype.calculateProjectedContentMetrics=function(e,t){var t=t||"13px Roboto, Arial, sans-serif",e=$("<span>"+e+"</span>").css({font:t,float:"left","white-space":"nowrap"}).appendTo($("body")),t={width:e.width(),height:e.height()};return e.remove(),t},Label.prototype.calculateProjectedHoverDataLeftOffset=function(e){var t=this.div_,a;return-Math.abs($(t).width()-e)/2+"px"},Label.prototype.onAdd=function(){var e=this.getPanes().overlayLayer,t=this.getPanes().overlayMouseTarget;e.style.zIndex=5e4,t.style.zIndex=10,t.appendChild(this.div_);var s=this,l=this.div_,o=this;this.listeners_=[google.maps.event.addListener(this,"position_changed",function(){o.draw()}),google.maps.event.addListener(this,"text_changed",function(){o.draw()})],this.skip_interaction_listeners||(google.maps.event.addDomListener(l,"click",function(){o.handleInfoBubble(o.classID)}),google.maps.event.addDomListener(l,"mouseover",function(){$(l).toggleClass("hover"),changeZindex($(l),"*",1e5);var e=null,t,a,i,r,n,t,e,n;o.minPrice&&o.maxPrice?(e=0<(t=$("#priceRange"+l.id)).length)?t.find("span").text("{0}".format(APP.translation.marker.hover_data_multiple.format(o.minPrice,o.maxPrice))):((n=document.createElement("div")).id="priceRange"+l.id,a="<span>{0}</span>".format(APP.translation.marker.hover_data_multiple.format(o.minPrice,o.maxPrice)),r=(i=s.calculateProjectedContentMetrics(a,"")).width+25,n.style.minWidth=r+"px",n.innerHTML=a,n.style.left=s.calculateProjectedHoverDataLeftOffset(r),l.appendChild(n),t=$(n)):(o.formatted_bd_ba_counts||null!==o.ba_count&&null!==o.bd_count)&&((e=0<(t=$("#hoverData"+l.id)).length)?t.find("span").text("".concat(o.formatted_bd_ba_counts)):((n=document.createElement("div")).id="hoverData"+l.id,n.style.position="relative",a="".concat(o.formatted_bd_ba_counts),r=(i=s.calculateProjectedContentMetrics(a,"")).width+25,n.style.minWidth=r+"px",n.innerHTML=a,n.style.left=s.calculateProjectedHoverDataLeftOffset(r),l.appendChild(n),t=$(n))),o.handleInfoBubble(o.classID,!0)}),google.maps.event.addDomListener(l,"mouseout",function(){$(l).toggleClass("hover"),changeZindex($(l),"/",1e5);var e=document.getElementById("priceRange"+l.id),t=document.getElementById("hoverData"+l.id);e&&e.parentNode?e.parentNode.removeChild(e):t&&t.parentNode&&t.parentNode.removeChild(t)}))},Label.prototype.redraw_=function(){var e=this;APP.labels[e.classID]?APP.labels[e.classID].html(e.inside):APP.temp_marker_labels[e.classID]&&APP.temp_marker_labels[e.classID].label.html(e.inside)},Label.prototype.draw=function(){var e,t=this.getProjection().fromLatLngToDivPixel(this.get("position")),a=this.div_,i=this.calculateProjectedContentMetrics(this.inside,"12px Tahoma");a.style.width=i.width+8+"px",a.style.left=t.x-i.width/2-4+"px",a.style.top=t.y-i.height-4-10+"px",a.classList.add("map-pin"),a.classList.add(this.listingStatusClass),this.is_location_protected&&a.classList.add("protected"),a.style.display="block",a.hasAttribute("data-previewed")||a.setAttribute("data-previewed","false"),-1!==APP.previewed_listings.indexOf(this.classID)?(a.classList.add("visited"),a.setAttribute("data-previewed","true")):a.classList.add("initial")},Label.prototype.onRemove=function(){if(this.div_&&null!==this.div_.parentNode){if(this.listeners_)for(var e=0,t=this.listeners_.length;e<t;++e)google.maps.event.removeListener(this.listeners_[e]);google.maps.event.clearInstanceListeners(this),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),console.info("thoroughly removed marker label")}};
14"use strict";function renderNoResTemplate(e){var t=Hogan.compile('<span class="separator hidden-xs">{0}</span> {{results}}'.format(APP.translation.number_of_hits.property)),r=e.nb_hits,e=e.hits?e.hits.length:0;APP.$nb_hits_wrapper.html(APP.nb_hits_template.render({nb_hits:numeral(r).format("0,0"),hits_count:e,nb_hits_text_template:t.render({results:1!==r?APP.translation.number_of_hits.result.plural:APP.translation.number_of_hits.result.singular})}))}function handleNoResults(e){console.log("handle no results"),removeMarkersFromMap(),removeMarkerClusters(),e&&renderNoResTemplate(e),APP.$hits.html(APP.no_results_template.render()),APP.$pagination_wrapper.html(""),$("#clear-filters").on("touchstart click",function(e){e.preventDefault(),APP.$reset_form_button.click()}),APP.rendering_map=!1,APP.filling_out_form=!1,APP.first_url_parse=!1,APP.force_return_form_change=!1,APP.triggered_request=!1,APP.form_triggers.location_flush=!0}function renderHits(e,t){if(APP.content=e,APP.is_map_hidden()||APP.doGrid)if(renderPagination(e),0!==e.nb_hits){renderNoResTemplate(e),fillSidebarWithLoadingPlaceholder();for(var r=[],a=APP.content.hits.slice(0,DEFAULT_REQUEST_PARAMS().num_of_listings_to_show),o=0;o<a.length;o++){var n=a[o];r.push(formatHitForGrid(n))}APP.content.hits_to_render=r,APP.$hits.html(APP.hit_template.render({hits:APP.content.hits_to_render||r})).promise().done(function(){for(var e=0;e<APP.listings_DOM_listeners.length;e++)google.maps.event.removeListener(APP.listings_DOM_listeners[e]);APP.listings_DOM_listeners=[];for(var t=0;t<APP.content.hits.length;t++)confirmHover(APP.content.hits[t].objectID),asyncFillGridPhoto(APP.content.hits[t].objectID);$('[data-toggle="tooltip"]',APP.$hits).tooltip()}),t||APP.$hits.parent().animate({scrollTop:0},0),handleModals(),handleNoYoverflowOnDropdownMobile()}else handleNoResults(e)}function renderPagination(e){var t=[],r=DEFAULT_REQUEST_PARAMS().num_of_listings_to_show,a=Math.min(e.nb_hits,5e4),o=Math.ceil(a/r);if(o<=1)APP.$pagination_wrapper.html("").hide();else{var n=parseInt(APP.last_request.offset,10)/r;3<n&&(t.push({current:!1,number:1,offset:0}),t.push({current:!1,number:"...",disabled:!0}));for(var s=n-3;s<3+n;++s)s<0||o<=s||t.push({current:n===s,number:s+1,offset:s*r});3+n<o&&(t.push({current:!1,number:"...",disabled:!0}),t.push({current:!1,number:o,offset:o*r<a?o*r:o*r-r}));var i=0<n&&n,e=1+n<o&&2+n,l,P,e={pages:t,prev_page:i,next_page:e,offset_prev:i?(i-1)*r:null,offset_next:e?(e-1)*r:null};e.text_params={from:0==n?1:r*n,to:0==n?r:t.length-n!=1?r*(1+n):a,total:numeral(a).format("0,0"),plural:1===a?" ":"s"},APP.$pagination_wrapper.html(APP.pagination_template.render(e)).show()}}
14function handleClusters(e){var t;e&&e.map.clusters&&(t=function e(){},APP.fit_map_to_markers_automatically&&!APP.bounds_fitting_callback&&(t=fitMapToMarkers),processESClusters(e.map.clusters,t))}function renderMap(e,t){function r(){return t&&["OPEN_HOUSES_HOMEPAGE","LOCALPAGE_SEARCHMAP","EMBEDDED_LOCALPAGE_SEARCHMAP"].includes(t.caller)}function a(){return APP.initFromURLParamsKwargs&&Object.keys(APP.initFromURLParamsKwargs).inArray("offset")}if(!r()&&(APP.skip_map_on_mobile()||!e||a()))return console.warn("skip on mobile",t),APP.rendering_map=!0,handleClusters(e),setTimeout(function(){APP.rendering_map=!1},1e3),!1;APP.rendering_map=!0,t&&t.map_override&&(APP.map=t.map_override);try{APP.flushBoundsChangedListener(),removeMarkerClusters(),removeMarkersFromMap()}catch(e){}var o=t&&["OPEN_HOUSES_HOMEPAGE","LOCALPAGE_SEARCHMAP","EMBEDDED_LOCALPAGE_SEARCHMAP"].includes(t.caller)||!APP.zoomToSeeMarkerClusters()||APP.last_request&&getObjectFromArrayByKey(APP.last_request.filters,"agent_id",!0)||APP.last_request&&getObjectFromArrayByKey(APP.last_request.filters,"subways",!0)&&e.nb_hits&&e.nb_hits<=100||APP.last_request&&getObjectFromArrayByKey(APP.last_request.filters,"subway_stops",!0)&&e.nb_hits&&e.nb_hits<=100||e.nb_hits&&e.nb_hits<=20||APP.last_request&&APP.last_request.neighborhoods.length<=100&&e.nb_hits&&e.nb_hits<=20,n,s,i,p,l;if("lei"===APP.getTheme()?(o=!0,(n=e.nb_hits||0)<=0?$("#map-no-clusters-notice").text(""):$("#map-no-clusters-notice").text("".concat(n<=100?"".concat(n):"100+"," Homes"))):$("#map-no-clusters-notice").text(""),o?function(){console.info("will use markers",e.hits),s=null;var r=(APP.content?APP.content.geo_biased&&APP.content.geo_biased.length?APP.content.geo_biased:APP.content.hits:e).filter(function(e){try{return"show_map_link"in e&&!1===e.show_map_link?!1:isLatLngValid(e.location)&&isMarkerRenderable(e)}catch(e){return console.err(e),!1}});for(r.length&&potentialZoomInNeeded()&&APP.fit_map_to_markers_automatically&&(s=new google.maps.LatLngBounds),i=0;i<r.length;i++)!function(){var e=r[i];e.objectID||(e.objectID=e.id),APP.markers[e.objectID.toString()]||(APP.markers[e.objectID.toString()]=new google.maps.Marker({position:new google.maps.LatLng(parseFloat(e.location.lat),parseFloat(e.location.lng)),map:APP.map,visible:!1,opacity:0}));var t=consolidatedFilters(APP.multi_markers_same_spot_array,roundUp(e.location.lat,1e4).toString()+"|"+roundUp(e.location.lng,1e4).toString(),0),t;t&&0<t.length?(t=APP.multi_markers_same_spot_array.indexOf(t),APP.multi_markers_same_spot_array[t][2].indexOf(APP.markers[e.objectID.toString()])<0&&(APP.multi_markers_same_spot_array[t][1]++,APP.multi_markers_same_spot_array[t][2].push(APP.markers[e.objectID.toString()]),APP.multi_markers_same_spot_array[t][3].push(e))):APP.multi_markers_same_spot_array.push([roundUp(e.location.lat,1e4).toString()+"|"+roundUp(e.location.lng,1e4).toString(),1,[APP.markers[e.objectID.toString()]],[e],null,0])}();for(p=0;p<APP.multi_markers_same_spot_array.length;p++)!function(){if(1===APP.multi_markers_same_spot_array[p][1]){var e,t,r,e,a,o,n=APP.multi_markers_same_spot_array[p][3][0];APP.labels[n.objectID]||(e={},t=formatHitForGrid(n),r={ba_count:n.size.bathrooms,bd_count:n.size.bedrooms},e={listingStatus:n.listing_status,markerObjectID:n.objectID.toString(),map:APP.map,ba_count:r.ba_count,bd_count:r.bd_count,formatted_bd_ba_counts:t.bedroom_bathroom,inside:n.prices.price_pretty_short,classID:n.objectID,zIndexAsArrayId:1e3*(p+2),protected_location:null},APP.labels[n.objectID.toString()]=new Label(e),APP.labels[n.objectID.toString()].bindTo("position",APP.markers[n.objectID.toString()],"position"),n.lastOccurence="zero",a=formatHitForGrid(n),o=APP.infobubble_template.render({hits:a}),APP.labels[n.objectID.toString()].contentLength=APP.multi_markers_same_spot_array[p][3].length,APP.labels[n.objectID.toString()].location={lat:parseFloat(n.location.lat),lng:parseFloat(n.location.lng)},APP.labels[n.objectID.toString()].infobubbleHtmlContent=o,APP.multi_markers_same_spot_array[p][5]=parseInt(n.objectID.toString(),10))}else{var t=APP.multi_markers_same_spot_array[p][1];n=APP.multi_markers_same_spot_array[p][3][t-1];var e=APP.multi_markers_same_spot_array[p][5];for(removeSingleMarkerLabel(e.toString()),removeSingleInfoBubble(e.toString()),_=0;_<APP.multi_markers_same_spot_array[p][3].length;_++){var s=APP.multi_markers_same_spot_array[p][3][_];removeSingleMarkerLabel(s.objectID.toString()),removeSingleInfoBubble(s.objectID.toString())}APP.multi_markers_same_spot_array[p][5]=parseInt(n.objectID.toString(),10);for(var e=n,o="",i=n.prices.price,l=0,P=[],_=0,n,m;_<APP.multi_markers_same_spot_array[p][3].length;_++){(n=APP.multi_markers_same_spot_array[p][3][_]).prices.price<i&&(i=n.prices.price),n.prices.price>l&&(l=n.prices.price);var c=_===APP.multi_markers_same_spot_array[p][3].length-1?"last":"";n.lastOccurence=c,a=formatHitForGrid(n),P.push(formatVaryingListingAddress(n));var c=APP.infobubble_template.render({hits:a});o=o.concat(c)}n=e,i=formatPriceSimplified(i),l=formatPriceSimplified(l);
14var u,m=!!P.areObjectParametersSame("map_accuracy")&&"radius"===formatVaryingListingAddress(n).map_accuracy;APP.labels[n.objectID.toString()]=new Label({infobubbleHtmlContent:o,contentLength:APP.multi_markers_same_spot_array[p][3].length,markerObjectID:n.objectID.toString(),location:{lat:parseFloat(n.location.lat),lng:parseFloat(n.location.lng)},minPrice:i,maxPrice:l,map:APP.map,inside:t+APP.translation.marker.listing_plural,classID:n.objectID,zIndexAsArrayId:1e3*(p+2),protected_location:null,listingStatus:n.listing_status}),APP.labels[n.objectID.toString()].bindTo("position",APP.markers[n.objectID.toString()],"position")}}();console.info("markers",APP.markers),console.info("labels",APP.labels),console.log("infobubbles",Object.size(APP.infoBubbles)),s&&(l=0,$.each(APP.markers,function(e,t){s.extend(t.getPosition()),l++}),l<=20&&APP.map.getCenter()!==s.getCenter()&&(APP.map.fitBounds(s),APP.fit_map_to_markers_automatically=!1))}():handleClusters(e),!APP.fit_map_to_markers_automatically&&APP.FORCE_SET_BOUNDS&&!APP.no_bounds_fitting){try{var P=APP.map.getBoundsZoomLevel(APP.FORCE_SET_BOUNDS),_=APP.FORCE_SET_BOUNDS.getCenter();APP.map.getCenter().toUrlValue()!==_.toUrlValue()&&APP.map.setCenter(_),APP.map.getZoom()!==P&&APP.map.setZoom(P)}catch(e){console.error(e);try{APP.map.fitBounds(APP.FORCE_SET_BOUNDS)}catch(e){}}APP.FORCE_SET_BOUNDS=null}APP.FORCE_ZOOM&&(APP.map.setZoom(APP.FORCE_ZOOM),APP.FORCE_ZOOM=void 0),APP.rendering_map=!1,APP.bounds_changed_listener||handlesearchAsImoveMapVisibility(),google.maps.event.addListenerOnce(APP.map,"idle",function(){})}
15"use strict";function ownKeys(t,e){var o=Object.keys(t),a;return Object.getOwnPropertySymbols&&(a=Object.getOwnPropertySymbols(t),e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,a)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(o),!0).forEach(function(e){_defineProperty(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var searchSettingsOverrides=function(){if(void 0===APP.search_settings_override)return{};try{return JSON.parse(APP.search_settings_override)}catch(e){return{}}}();function closeIwsWhenMapClicked(){google.maps.event.addListener(APP.map,"click",function(){for(var e in APP.infoBubbles)try{APP.infoBubbles[e].close()}catch(e){}APP.selected_info_bubble=null})}function showMapControlsWrapper(){APP.$gmap_custom_controls_wrapper.show(),APP.$btn_refresh.hide()}function showRedoHere(){APP.$btn_refresh.show(),APP.$gmap_move_search.hide()}function hideRedoHere(){APP.$btn_refresh.hide(),APP.$gmap_move_search.show()}function handlesearchAsImoveMapVisibility(){function t(){return null!==APP.selected_info_bubble||APP.rendering_map||APP.rendering_info_bubble||APP.force_return_form_change||APP.no_bounds_fitting}function e(){$('[name="zip_code"]').val(""),$('[name="address"]').val("")}APP.initBoundsChangedListener=function(){APP.bounds_changed_listener=google.maps.event.addListener(APP.map,"bounds_changed",function(){null!==APP.selected_info_bubble||APP.rendering_info_bubble||APP.force_return_form_change||google.maps.event.addListenerOnce(APP.map,"idle",function(){var e=APP.map.getBounds().toString().split(",");e[0]!==e[2]&&e[1]!==e[3]&&(APP.map_bounds=APP.map.getBounds()),setTimeout(function(){t()||(APP.fitMapToMarkersAutomatically=!1,APP.FORCE_SET_BOUNDS=null,hideClearControls(),isInteractiveSearch()?(APP.$btn_refresh.hide(),APP.$gmap_move_search.show(),t()||APP.rendering_map||(removeMarkersFromMap(),APP.redoClickedViewport=null,APP.form_triggers.redo_clicked=!1,console.info("will apply these",mapBoundsToParams(APP.map.getBounds())),APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"]))):showRedoHere())},200)})})},APP.flushBoundsChangedListener=function(){google.maps.event.removeListener(APP.bounds_changed_listener),APP.bounds_changed_listener=null},google.maps.event.addListener(APP.map,"dragend",function(){APP.USER_INTERACTED_WITH_MAP=!0,isInteractiveSearch()?(APP.is_dragging=!0,APP.onRenderCallbacks.push({fn:function e(){setTimeout(function(){APP.is_dragging=!1},500)},args:[]})):(showRedoHere(),console.info("dragend")),google.maps.event.trigger(APP.map,"zoom_changed",[])})}
15function validGridObjectsExist(){return Boolean($(".single-property").filter(function(){return this.id.match(/(wrapper_\d+)/g)}).length)}function shouldDefaultToInteractiveSearch(){return"yes"===APP.defaultToInteractiveSearch}function isInteractiveSearch(){return APP.$gmap_move_search_input.is(":checked")}function handleRedoHere(){function e(){function e(){$("input[name=zip_code]").val("")}function t(){$("input[name=address]").val("")}function o(){$("input[name=address]").val("")}function a(){$("input[name=neighborhoods]:checked, .select-all-checkbox").each(function(e,t){$(t).prop("checked",!1)})}function n(){$("input[name=city]").val("")}e(),t(),o(),a(),n()}function t(){APP.rendering_map||(removeMarkersFromMap(),removeCustomDrawings(),e(),hideRedoHere(),APP.form_triggers.redo_clicked=!0,APP.redoClickedViewport=APP.map.getBounds(),APP.onRenderCallbacks.push({fn:function e(){APP.resetRedoGridParameters()},args:[]}),APP.fit_map_to_markers_automatically=!1,APP.FORCE_SET_BOUNDS=null,APP.$form.trigger("change",["redo_in_rectangle"]))}APP.$btn_refresh.on("click",function(){t()})}function turnOnInteractive(){APP.$gmap_move_search_input.prop("checked",!0),APP.$btn_refresh.hide(),APP.$gmap_move_search.show()}function turnOffInteractive(){APP.$gmap_move_search_input.prop("checked",!1)}function smoothZoom(e,t,o){if(t<=o)return!1;var a=google.maps.event.addListener(e,"zoom_changed",function(){google.maps.event.removeListener(a),smoothZoom(e,t,o+1)});setTimeout(function(){e.setZoom(o)},80)}APP.MAX_ZOOM=19,APP.MIN_ZOOM=searchSettingsOverrides.MIN_ZOOM||8,APP.map_bounds=APP.INIT_BOUNDS,isSearchPage()&&(APP.map=new google.maps.Map(document.getElementById("map"),_objectSpread(_objectSpread({disableDoubleClickZoom:!1,clickableIcons:!1,streetViewControl:!0,fullscreenControl:!1,mapTypeControl:!1,scrollwheel:!0,draggable:!0,gestureHandling:"greedy",zoom:APP.MAP_INIT_ZOOM,center:APP.MAP_INIT_CENTER},_objectSpread({},APP.CUSTOM_MAP_UI_CONTROLS?{zoomControl:!1}:{zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM}})),{},{minZoom:APP.MIN_ZOOM,maxZoom:APP.MAX_ZOOM,mapTypeControlOptions:{mapTypeIds:["cs"]}})),APP.thePanorama=APP.map.getStreetView(),google.maps.event.addListener(APP.thePanorama,"visible_changed",function(){APP.thePanorama.getVisible()?APP.$mapWrapper.addClass("has-panorama"):APP.$mapWrapper.removeClass("has-panorama")}),APP.CUSTOM_MAP_UI_CONTROLS&&APP.CUSTOM_MAP_UI_CONTROLS(APP.map),google.maps.event.addListener(APP.map,"zoom_changed",function(){google.maps.event.addListenerOnce(APP.map,"idle",function(){$("body").attr("class",function(e,t){return t&&t.replace(/mapZoom\-\d+/g,"")}),$("body").addClass("mapZoom-".concat(APP.map.getZoom()))})}),google.maps.event.addListenerOnce(APP.map,"idle",function(){google.maps.event.trigger(APP.map,"zoom_changed")})),APP.zm_vs_style=APP.zm_vs_style||{15:{mt:new google.maps.StyledMapType(APP.custom_map_styles&&APP.custom_map_styles.length&&JSON.parse(APP.custom_map_styles)||[{featureType:"administrative.land_parcel",elementType:"all",stylers:[{invert_lightness:!0}
15]},{featureType:"landscape",elementType:"all",stylers:[{visibility:"on"},{color:"#f4f5e7"},{lightness:"35"},{saturation:"-39"}]},{featureType:"landscape.man_made",elementType:"geometry.fill",stylers:[{color:"#f1efe9"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#e9e5dc"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{visibility:"on"},{saturation:"-17"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{saturation:"-15"},{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{saturation:"-100"}]},{featureType:"poi.medical",elementType:"geometry.fill",stylers:[{lightness:"28"},{color:"#ebdcd5"}]},{featureType:"poi.medical",elementType:"labels",stylers:[{saturation:"-78"},{lightness:"0"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#bbe0b1"},{lightness:"20"}]},{featureType:"poi.school",elementType:"geometry.fill",stylers:[{color:"#e9e2cd"}]},{featureType:"poi.sports_complex",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffeeaa"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#f4ddb4"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#74716c"}]},{featureType:"road.highway",elementType:"labels.icon",stylers:[{saturation:"-100"},{lightness:"27"},{visibility:"on"}]},{featureType:"road.arterial",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#f6f4f1"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#e4e0d8"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#f6f4f1"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{color:"#e4e0d8"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#c2d6ec"}]},{featureType:"water",elementType:"labels.icon",stylers:[{saturation:"-69"},{lightness:"11"},{gamma:"1.09"},{visibility:"off"}]}])},16:{mt:new google.maps.StyledMapType(APP.custom_map_styles&&APP.custom_map_styles.length&&JSON.parse(APP.custom_map_styles)||[{featureType:"administrative.land_parcel",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape.man_made",elementType:"geometry.fill",stylers:[{visibility:"on"},{saturation:"-42"},{lightness:"6"},{gamma:"1.13"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{saturation:"-100"}]},{featureType:"poi.attraction",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.business",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"poi.medical",elementType:"geometry.fill",stylers:[{lightness:"28"},{color:"#ebdcd5"}]},{featureType:"poi.medical",elementType:"labels",stylers:[{saturation:"-78"},{lightness:"0"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#bde6ab"}]},{featureType:"poi.place_of_worship",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.school",elementType:"geometry.fill",stylers:[{color:"#e9e2cd"}]},{featureType:"poi.sports_complex",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffeeaa"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#f4ddb4"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#74716c"}]},{featureType:"road.highway",elementType:"labels.icon",stylers:[{saturation:"-100"},{lightness:"27"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#f6f4f1"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#e4e0d8"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#f6f4f1"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{color:"#e4e0d8"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#797976"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#c2d6ec"}]},{featureType:"water",elementType:"labels.icon",stylers:[{saturation:"-69"},{lightness:"11"},{gamma:"1.09"},{visibility:"off"}]}])}},google.maps.Map.prototype.pointInBounds=function(e,t){return this.getBounds().contains(new google.maps.LatLng({lat:parseFloat(e),lng:parseFloat(t)}))},google.maps.Map.prototype.setStylingBasedOnZoom=function(e,t){var o=this,a;(e||o.getZoom())<=15?"cs15"===o.getMapTypeId()&&!t||(o.mapTypes.set("cs15",APP.zm_vs_style[15].mt),o.setMapTypeId("cs15")):"cs16"===o.getMapTypeId()&&!t||(o.mapTypes.set("cs16",APP.zm_vs_style[16].mt),o.setMapTypeId("cs16"))},google.maps.Map.prototype.getConfig=function(){var e=this||APP.map,t="\n  Zoom:\t".concat(e.getZoom()),o="\n  Center Lat:\t".concat(roundUp(e.getCenter().lat(),1e5),"\n  Center Lng:\t").concat(roundUp(e.getCenter().lng(),1e5),"\n  —————————————"),a=e.getBounds().toUrlValue().split(",").map(parseFloat);
15console.warn("%cDon't forget the minus signs!","font: 25px sans-serif;"),console.warn("%c".concat(t+o),"font: 18px sans-serif; color:black"),console.warn("%cP.S.: You now only need the zoom & center -- no bounds.","font: 14px sans-serif;")},google.maps.Map.prototype.boundsAt=function(e,t,o,a){var n=o||this.getProjection();if(n){var o=$(a||this.getDiv()),a=2*Math.pow(2,e),e=o.width()/a,a=o.height()/a,t=n.fromLatLngToPoint(t||this.getCenter());return new google.maps.LatLngBounds(n.fromPointToLatLng(new google.maps.Point(t.x-e,t.y+a)),n.fromPointToLatLng(new google.maps.Point(t.x+e,t.y-a)))}},google.maps.Map.prototype.getBoundsZoomLevel=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:$("#map"),o=256,a=256,n=21,r={height:t.height(),width:t.width()};function s(e){var e=Math.sin(e*Math.PI/180),e=Math.log((1+e)/(1-e))/2;return Math.max(Math.min(e,Math.PI),-Math.PI)/2}function l(e,t,o){return Math.floor(Math.log(e/t/o)/Math.LN2)}var i=e.getNorthEast(),t=e.getSouthWest(),e=(s(i.lat())-s(t.lat()))/Math.PI,t=i.lng()-t.lng(),t=(t<0?360+t:t)/360,e=l(r.height,o,e),t=l(r.width,a,t);return console.info({latZoom:e,lngZoom:t}),Math.min(Math.max(e,t),n)},isSearchPage()&&APP.map.setStylingBasedOnZoom(APP.MAP_INIT_ZOOM),google.maps.Polygon.prototype.getBounds||(google.maps.Polygon.prototype.getBounds=function(){var o=new google.maps.LatLngBounds;return this.getPath().forEach(function(e,t){o.extend(e)}),o}),google.maps.Map.prototype.splitBounds=function(){return toSplitBounds(APP.map.getBounds())},google.maps.Polygon.prototype.enableCoordinatesChangedEvent=function(){var t=this,o=!1,a=function e(){google.maps.event.trigger(t,"coordinates_changed")},e;google.maps.event.addListener(t,"dragstart",function(){o=!0}),google.maps.event.addListener(t,"dragend",function(){a(),o=!1}),t.getPaths().forEach(function(e,t){google.maps.event.addListener(e,"insert_at",function(){a()}),google.maps.event.addListener(e,"set_at",function(){o||a()}),google.maps.event.addListener(e,"remove_at",function(){a()})})},isSearchPage()&&closeIwsWhenMapClicked(),APP.$gmap_move_search_input.on("change",function(){isInteractiveSearch()||removeParamFromUrl("interactive")});var extractNumericalContentOfMapBoundsQuery=function e(t){var o=/[0-9.,-]+/g;return"".concat(t).match(o)&&"".concat(t).match(o)[0]},bboxURLStringToLatLngBounds=function e(t){var t=extractNumericalContentOfMapBoundsQuery(t).split(",");return new google.maps.LatLngBounds({lat:parseFloat(t[0]),lng:parseFloat(t[1])},{lat:parseFloat(t[2]),lng:parseFloat(t[3])})},constructCenterBias=function e(t){return bboxURLStringToLatLngBounds(constructGeoShapeQueryObject("bbox",!1,t).map_bounds.shape).getCenter().toUrlValue()},searchFilter;function constructGeoShapeQueryObject(e,t,o){if(!APP.map)return{};function a(e,t){var o=APP.map.getProjection();if(!o)return null;var a=$(APP.map.getDiv()),n=2*Math.pow(2,t),t=(0|a.width())/n,n=(0|a.height())/n,e=o.fromLatLngToPoint(e);return new google.maps.LatLngBounds(o.fromPointToLatLng(new google.maps.Point(e.x-t,e.y+n)),o.fromPointToLatLng(new google.maps.Point(e.x+t,e.y-n)))}var n={map_bounds:{}};switch(n.map_bounds.applicable=!0,n.map_bounds.method=e,n.map_bounds.zoom=APP.map.getZoom(),n.map_bounds.split_vp=APP.map.splitBounds(),e){case"bbox":if(t){var r=null;try{r=a(new google.maps.LatLng(APP.MAP_INIT_CENTER.lat,APP.MAP_INIT_CENTER.lng),APP.MAP_INIT_ZOOM)}catch(e){console.info("failed getBoundsAtLatLngWithZoom calc",e)}n.map_bounds.shape=r?"BBOX("+mapBoundsToParams(r)+")":"BBOX("+mapBoundsToParams(APP.INIT_BOUNDS)+")"}else n.map_bounds.shape=o?"BBOX("+mapBoundsToParams(o)+")":"BBOX("+mapBoundsToParams(APP.map.getBounds())+")";break;case"polygon":n.map_bounds.shape="POLYGON("+APP.customBoundary.path+")";break;case"circle":n.map_bounds.shape="CIRCLE("+APP.customBoundary.path+")";break;case"rectangle":n.map_bounds.shape="RECTANGLE("+APP.customBoundary.path+")"}return n}function hideFiltersAndScrollToResultsContainerTop(){searchFilter.removeClass("all-options"),searchFilter.removeClass("filter-opened"),$("#more-filters-btn").html("More Filters"),$("body, html").animate({scrollTop:$(".navbar").length?$(".search-form-filter")[0].offsetHeight+$(".navbar")[0].offsetHeight:$(".search-form-filter")[0].offsetHeight},250)}isSearchPage()&&($(window).on("url_params_set",function(){APP.$map_toggle_button&&APP.$map_toggle_button.length&&APP.$map_toggle_button.hasClass("disabled")&&APP.$map_toggle_button.toggleClass("disabled")}),APP.$map_toggle_button.on("click",function(){if(!APP.$map_toggle_button.hasClass("disabled")){APP.$map_toggle_button.toggleClass("disabled"),APP.$search_form_results.hasClass("map-hidden")?APP.$search_form_results.removeClass("map-hidden"):APP.$search_form_results.addClass("map-hidden");
15var e=$("#toggle-map");APP.is_map_hidden()?(setCookie("auto_hide_map","true",.5),e.html('<i class="fa fa-2x fa-angle-up" aria-hidden="true"></i> Show Map')):(setCookie("auto_hide_map","false",.5),e.html('Hide Map <i class="fa fa-2x fa-angle-down" aria-hidden="true"></i>')),APP.is_map_hidden()||APP.skip_map_on_mobile()?(renderPillbox(APP.last_request),turnOffInteractive()):google.maps.event.trigger(APP.map,"resize");try{setURLParams(APP.TO_SET_URL_SEARCH_PARAMS)}catch(e){}google.maps.event.addListenerOnce(APP.map,"idle",function(){if(!APP.is_map_hidden()&&!APP.skip_map_on_mobile()){if(!APP.map.getCenter())return google.maps.event.trigger(APP.map,"resize"),void APP.map.setCenter(APP.MAP_INIT_CENTER);APP.$form.trigger("change",["map_bounds_changed"])}})}}),searchFilter=$(".search-form-filter"),$("#open-filters-btn").click(function(){searchFilter.addClass("filter-opened"),$("#more-filters-btn").click()}),$("#more-filters-btn").click(function(e){e.preventDefault(),searchFilter.hasClass("all-options")?hideFiltersAndScrollToResultsContainerTop():(searchFilter.addClass("all-options"),$(this).html("Less Filters"))}),$(".form-group.search-group .btn").on("click",function(){hideFiltersAndScrollToResultsContainerTop()})),$(document).ready(function(){var e;isSearchPage()&&(e=function e(){var t=["bounds_changed","center_changed","click","dblclick","drag","dragend","dragstart","heading_changed","idle","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","resize","rightclick","tilesloaded","tilt_changed","zoom_changed"];function o(t){APP.map.addListener(t,function(e){console.info("evt name {0}".format(t),e)})}function a(){for(var e=0;e<t.length;e++)o(t[e])}a()},Label.prototype=$.extend(!1,Label.prototype,Object.create(google.maps.OverlayView.prototype)),PseudoCluster.prototype=$.extend(!1,PseudoCluster.prototype,Object.create(google.maps.OverlayView.prototype)),APP.initZoomChangeListener=function(){APP.zoomChangeListener=google.maps.event.addListener(APP.map,"zoom_changed",function(){APP.USER_INTERACTED_WITH_MAP=!0,APP.rendering_map||google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.map.setStylingBasedOnZoom(),APP.form_processing||APP.$form.trigger("change",["map_bounds_changed","no_bounds_fitting"])})})},APP.flushZoomChangeListener=function(){google.maps.event.removeListener(APP.zoomChangeListener),APP.zoomChangeListener=null})});
16"use strict";function ownKeys(o,e){var a=Object.keys(o),n;return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(o),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})),a.push.apply(a,n)),a}function _objectSpread(o){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(a),!0).forEach(function(e){_defineProperty(o,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(a,e))})}return o}function _defineProperty(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,o){if(e){if("string"==typeof e)return _arrayLikeToArray(e,o);var a=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(a="Object"===a&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,o):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,o){(null==o||o>e.length)&&(o=e.length);for(var a=0,n=new Array(o);a<o;a++)n[a]=e[a];return n}function triggerSearch(e){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};APP.triggered_request=!1,!APP.customBoundary&&(APP.skip_map_on_mobile()||APP.is_map_hidden()&&!APP.first_url_parse)&&(o.retain_map_bounds||(e.clusters_needed=!1,e.map_bounds.applicable=!1,e.map_bounds.split_vp=null));var e=Object.assign({}
16,e),n,e=doubleCheckTriggerRequest(e);getAutocompleteBoundsDataJson()?(n=getAutocompleteBoundsDataJson(),console.info("autocomplete_bounds_extension",n),e.map_bounds.shape="BBOX("+mapBoundsToParams(n.google_object.bounds)+")",e.map_bounds.autocomplete_bounds_object=!0):delete e.map_bounds.autocomplete_bounds_object,!(APP.dont_apply_map_bounds||APP.is_map_hidden()||APP.didntMoveMap()||APP.form_triggers.location_flush||!APP.form_triggers.redo_clicked&&!isInteractiveSearch())||APP.first_url_parse||shouldDefaultToInteractiveSearch()||APP.customBoundary||(APP.zoomToSeeMarkerClusters()&&!o.retain_map_bounds&&(e.map_bounds.applicable=!1),APP.dont_apply_map_bounds=!1),APP.redoClickedViewport&&(e.map_bounds=constructGeoShapeQueryObject("bbox",!1,APP.redoClickedViewport).map_bounds),APP.dont_apply_map_bounds_timeout&&(APP.dont_apply_map_bounds=!1,APP.dont_apply_map_bounds_timeout=!1);var n=getObjectFromArrayByKey(e.filters,"zip_code");n&&n.value&&!isArray(n.value)&&n.value.contains_str(",")&&(e.filters[n.index].zip_code=n.value.split(","));var o=getObjectFromArrayByKey(e.filters,"agent_id"),n,r;o&&o.value&&!isArray(o.value)&&o.value.contains_str(",")&&(e.filters[o.index].agent_id=n.value.split(",")),APP.force_apply_bounds&&(e.map_bounds.applicable=!0,"bbox"===e.map_bounds.method&&(n=bboxURLStringToLatLngBounds(e.map_bounds.shape),e.map_bounds.split_vp=toSplitBounds(n),e.map_bounds.viewport=mapBoundsToParams(n),e.map_bounds.zoom=APP.map.getBoundsZoomLevel(n),e.map_bounds.center_bias=constructCenterBias(n)),APP.force_apply_bounds=void 0),APP.do_grid=function(e,o){return!e||0===!Object.keys(e).length||(e=e.toJSON(),o=o.toJSON(),delete e.map_bounds,delete e.clusters_needed,delete o.map_bounds,delete o.clusters_needed,delete e.offset,delete o.offset,JSON.stringify(e)!==JSON.stringify(o)||APP.checkRedoGridParameters()||APP.force_redo_grid)},APP.force_redo_grid&&!APP.customBoundary&&(e.map_bounds.applicable=!1),APP.first_url_parse||!isInteractiveSearch()||!e.map_bounds.shape.toLowerCase().includes("bbox")||(r=constructGeoShapeQueryObject("bbox").map_bounds).shape&&!r.shape.includes("NaN")&&(e.map_bounds=r),APP.first_url_parse&&APP.dontSetDefaultSelectAndLToptions()&&(e.map_bounds.applicable=!1),APP.criteria&&(e.criteria=makeImmutable(APP.criteria).toJSON());var r=[makeImmutable(APP.last_request),makeImmutable(e)],t,s,i,l;APP.last_request=e,APP.locationDitch=void 0,"undefined"!=typeof renderPillbox&&void 0!==$.fn.pillbox&&renderPillbox(e),"lei"===APP.getTheme()&&(void 0!==(null===e||void 0===e||null===(s=e.map_bounds)||void 0===s?void 0:s.zoom)&&(null===e||void 0===e||null===(l=e.map_bounds)||void 0===l?void 0:l.zoom)<10&&(e.map_bounds.zoom+=2),window.selectedStateCode&&e.filters.push({"standard:location.state":window.selectedStateCode}));var d=hashObject(e),l=getFromLocalStrage(d);function P(e,o){if(APP.$mapProgress.updateBar(100),APP.$mapProgress.fillPercentage(100),APP.$mapProgress.hide(),APP.rendering_map=!1,APP.form_processing=!1,APP.force_redo_grid=void 0,APP.fit_map_to_markers_automatically=APP.fit_map_to_markers_automatically||locationBasedCriteriaChanged(APP.last_request),APP.first_url_parse&&geoBasedLocationsPresent(!0)&&APP.onRenderCallbacks.push({fn:function e(){extendBoundsByAddressLocations(new google.maps.LatLngBounds,!0,!0).then(function(){})},args:[]}),APP.fit_map_to_markers_automatically&&geoBasedLocationsPresent()){APP.ajax_req&&APP.ajax_req.abort();try{APP.flushBoundsChangedListener(),APP.flushZoomChangeListener()}catch(e){}return APP.rendering_map=!1,void extendBoundsByAddressLocations(APP.FORCE_SET_BOUNDS,!0,"true"===APP.useCustomNeighborhoods).then(function(){APP.force_redo_grid=!0;try{APP.initBoundsChangedListener(),APP.initZoomChangeListener()}catch(e){}is_ff(),APP.force_retrigger_form=!0,APP.$form.trigger("change",["bounds_changed","no_bounds_fitting"])})}removeMarkerClusters(),isDict(e)||(e=JSON.parse(e),console.info("parsed data",e)),a?a(e):(o&&setLocalStorage(d,JSON.stringify(e)),APP.NB_HITS=e.nb_hits,setURLParams(APP.last_request),APP.onRenderCallbacks.push({fn:function e(){setTimeout(function(){APP.rendering_map=!1},3e3)},args:[]}),e&&e.success?processSearchResults(e,null):processSearchResults(null,500))}r.push(l),APP.doGrid=APP.do_grid.apply(null,_toArray(r)),void 0!==APP.showCopyableSavedSearch&&APP.showCopyableSavedSearch(APP.last_request),APP.ajax_req&&APP.ajax_req.abort(),e.cache_query=!0,APP.$mapProgress.show(),APP.$mapProgress.fillPercentage(0),APP.$mapProgress.updateBar(0),APP.ajax_req=$.ajax({xhr:function e(){var e;return(e=new window.XMLHttpRequest).addEventListener("progress",function(e){return 4===this.readyState?(APP.$mapProgress.updateBar(100),APP.$mapProgress.fillPercentage(100),void APP.$mapProgress.hide()):void(e.lengthComputable?(o=e.loaded/e.total,APP.$mapProgress.updateBar(o),APP.$mapProgress.fillPercentage(o)):((o=randomIntFromInterval(60,80
16))<APP.$mapProgress.lastPercentage&&(o=APP.$mapProgress.lastPercentage+1),APP.$mapProgress.updateBar(o),APP.$mapProgress.fillPercentage(o)));var o,o},!1),e},url:SEARCH_ENDPOINT,data:{request:JSON.stringify(e)},dataType:"json",method:"POST"}).done(function(e){P(e,!0)}).fail(function(e,o,a){console.debug("ajax failed",{xhr:e,textStatus:o,errorThrown:a}),a&&"abort"===a||(processSearchResults(null,500),APP.$mapProgress.updateBar(100),APP.$mapProgress.fillPercentage(100),APP.$mapProgress.hide())})}function processSearchResults(e,o){if(console.info("process",e),APP.triggered_request=!1,APP.resetRedoGridParameters(),e&&null===o&&e.nb_hits){var a=Object.assign({},e);if(a.hits=[],a.geo_biased=[],e.hits.map(function(e){APP.showSoldPrice&&e.prices.sold_price_number&&(e.prices={price:e.prices.sold_price_number,price_pretty:formatPriceLong(e.prices.sold_price_number),price_pretty_short:formatPriceSimplified(e.prices.sold_price_number)}),a.hits.push(e)}),e.geo_biased&&e.geo_biased.map(function(e){APP.showSoldPrice&&e.prices.sold_price_number&&(e.prices={price:e.prices.sold_price_number,price_pretty:formatPriceLong(e.prices.sold_price_number),price_pretty_short:formatPriceSimplified(e.prices.sold_price_number)}),a.geo_biased.push(e)}),APP.HIT_FORMATTERS)try{var n=compose.apply(null,APP.HIT_FORMATTERS);a.hits=a.hits.map(n),a.geo_biased=a.geo_biased.map(n)}catch(o){console.warn("failed to apply APP.HIT_FORMATTERS",{err:o})}renderOverlays(a),renderHits(a),renderMap(a)}else(APP.is_map_hidden()||APP.doGrid)&&handleNoResults(e);APP.resetRedoGridParameters(),$.map(APP.onRenderCallbacks,function(e){e.fn.apply(null,e.args)}),setTimeout(function(){APP.onRenderCallbacks=[]},200)}function initFromURLParams(e,o,a){var n={},r,t,s,i;if(!e||void 0===e||e&&null===e){localStorage&&localStorage.clear(),APP.first_url_parse=!0,r=APP.initialParseFromUrl||urlToDict(),a&&a.ditch_hide_map&&r.hide_map&&delete r.hide_map,"shape"in r&&(APP.USER_INTERACTED_WITH_MAP=!0);var l=shallowCopy(DEFAULT_REQUEST_PARAMS_DEFAULT_VALUES),n=replaceInNestedDictionary(l,r);if("hide_map"in r||"true"===getCookie("auto_hide_map")?a&&a.ditch_hide_map&&r.hide_map||APP.is_map_hidden()||APP.$map_toggle_button.click():(("subways"in r||"subway_stops"in r)&&google.maps.event.addListenerOnce(APP.map,"idle",function(){APP.$button_transit_toggle.click()}),"interactive"in r&&"true"===r.interactive&&turnOnInteractive(),shouldDefaultToInteractiveSearch()&&turnOnInteractive()),"q"in r&&$("#q").val(r.q),"title"in r&&(APP.custom_title=r.title),"interact"in r&&"false"===r.interact&&turnOffInteractive(),"search_with"in r&&(APP.search_with_id=r.search_with),0 in r,("agent_id"in r||"address"in r||"zip_code"in r||"location"in r)&&(APP.fit_map_to_markers_automatically=!0),"trigger_id"in r&&(r.triggerListingId=r.trigger_id),"triggerListingId"in r&&/\d+/.test(r.triggerListingId)&&(createTemporaryModalElement(r.triggerListingId),turnOnInteractive()),"neighborhoods"in r&&0<r.neighborhoods.length){r.neighborhoods=decodeURIComponent(r.neighborhoods.replace(/\+/g,"%20")),APP.fit_overlays=!0;try{var d=parentRegionsAsArray(),P=[];$.each(r.neighborhoods.split(","),function(e,o){if(2!==o.split(":").length||o.split(":")[1].length||(o=o.split(":")[0]),-1!==d.indexOf(o)){var a=$('[data-for="neighborhoods"] input').filter(function(){var e=$
16(this);return 0<e.val().length&&e.val().split(":")[0]===o});a.prop("checked",!0).trigger("change"),allCheckedRegionChildrenAsArray(a.next(),function(e){P=P.concat(e)})}else{if(!o.contains_str(":")){var n=o=USE_CHECKBOXED_NEIGHBORHOODS?(o.includes("|")?o.split(" | ")[0]:o).replace(/ /g,"_"):o;try{var r=findNodeByRegexingId(o);if(!r.length)throw new Error;if("INPUT"!==r[0].nodeName||"checkbox"!==r[0].type||!r[0].name.includes("neighborhood"))throw new Error;n=r.val()}catch(e){}n&&(o=n)}P.push(o)}}),n.neighborhoods=P}catch(e){}APP.first_url_parse&&(APP.fit_map_to_markers_automatically=!0)}Object.keys(r).some(function(e){return e.includes("custom")})&&Object.keys(r).map(function(a){var e;a.includes("custom")&&((e=$('[name="'.concat(a,'"]'))).is(":checkbox")?_toConsumableArray(e).map(function(e){var o;r[a].includes(e.value)&&(o=r[a])}):$('[name="'.concat(a,'"]')).val(decodeURIComponent(r[a]).replace(/\s{2,}/gim,"")))}),APP.tmps={},"open_house_min"in r&&(APP.tmps.picker_min=r.open_house_min,$('[name="open_house_min_submit"]').val(r.open_house_min)),"open_house_max"in r&&(APP.tmps.picker_max=r.open_house_max,$('[name="open_house_max_submit"]').val(r.open_house_max)),"status"in r&&setSelectedOptionByValue("status",r.status),"listing_type"in r&&(r.listing_type.contains_str("rentals")&&$("#max_monthly_fees_wrapper").hide(),APP.initial_listing_type=r.listing_type,setSelectedOptionByValue("listing_type",r.listing_type)),$(window).trigger("_rendered")}else console.info("initFromURLParams input",e),n=r=e;if(console.info("URL + search params",{urlParams:r,searchParams:n}),a?(a.no_bounds_fitting&&(APP.no_bounds_fitting=!0===a.no_bounds_fitting),s=shallowCopy(n),n=replaceInNestedDictionary(s,a),console.info("initFromURLParams has kwargs",a)):a={},t=shallowCopy(n),"shape"in r||"map_bounds"in r)if(JSON.stringify(r)===JSON.stringify(DEFAULT_REQUEST_PARAMS()))console.info("initFromURLParams same as default",t),console.info("initFromURLParams SEARCH_PARAMS",n),APP.TO_SET_URL_SEARCH_PARAMS=shallowCopy(n),setFilters(n,!1),triggerSearch(t);else{if(o&&o.includes("bounds_changed")){if(APP.locationDitch&&isInteractiveSearch())t.map_bounds.applicable=!1,APP.locationDitch=!1;else if(!APP.customBoundary||t.map_bounds.shape&&t.map_bounds.shape.includes("BBOX")){var e,e=mapBoundsToParams(APP.map.getBounds()),s=extractNumericalContentOfMapBoundsQuery(t.map_bounds.shape||r.map_bounds.shape),e=s||e,t=replaceInNestedDictionary(t,{applicable:APP.first_url_parse||isInteractiveSearch()||APP.redoClickedViewport,method:"bbox",shape:e.includes("BBOX")?e:"BBOX("+e+")",zoom:APP.map.getZoom()});APP.first_url_parse,APP.FORCE_SET_BOUNDS=bboxURLStringToLatLngBounds(extractNumericalContentOfMapBoundsQuery(e))}else{console.info({cb:APP.customBoundary,mbshape:t.map_bounds.shape});var u="",u;switch(u=!t.map_bounds.method&&APP.customBoundary?APP.customBoundary.type:-1!==t.map_bounds.shape.indexOf("CIRCLE")?"circle":-1!==t.map_bounds.shape.indexOf("POLYGON")?"polygon":"rectangle"){case"polygon":var _=t.map_bounds.shape||"POLYGON("+APP.customBoundary.path+")";t=replaceInNestedDictionary(t,{applicable:!0,method:"polygon",shape:-1===_.indexOf("POLYGON")?"POLYGON("+_+")":_,zoom:APP.map.getZoom()}),removeCustomDrawings();var i,p=(i=t.map_bounds.shape.replace("POLYGON(","").replace("))",")")).split(/,(?=\()/g);p=$.map(p,function(e){return e=e.replace("(","").replace(")","").split(","),{lat:parseFloat(e[0]),lng:parseFloat(e[1])}});var c=drawPolygon(p);APP.first_url_parse?(APP.FORCE_SET_BOUNDS=c.getBounds(),APP.map.fitBounds(APP.FORCE_SET_BOUNDS)):APP.FORCE_SET_BOUNDS=null;break;case"circle":var _=t.map_bounds.shape||"CIRCLE("+APP.customBoundary.path+")";t=replaceInNestedDictionary(t,{applicable:!0,method:"circle",shape:-1===_.indexOf("CIRCLE")?"CIRCLE("+_+")":_,zoom:APP.map.getZoom()}),removeCustomDrawings();var i=t.map_bounds.shape.replace("CIRCLE(","").replace("})","}"),m=JSON.parse(i);drawCircle(m.center,m.radius),APP.first_url_parse?APP.FORCE_SET_BOUNDS=handleAroundLatLngRectangularBuffer(m.center,parseFloat(m.radius)/2,!1):APP.FORCE_SET_BOUNDS=null;break;case"rectangle":var _=t.map_bounds.shape||"RECTANGLE("+APP.customBoundary.path+")";t=replaceInNestedDictionary(t,{applicable:!0,method:"bbox",shape:-1===_.indexOf("RECTANGLE")?"RECTANGLE("+_+")":_,zoom:APP.map.getZoom()}),removeCustomDrawings();var A=drawRectangle(_);APP.first_url_parse?APP.FORCE_SET_BOUNDS=A.getBounds():APP.FORCE_SET_BOUNDS=null}}return APP.TO_SET_URL_SEARCH_PARAMS=shallowCopy(t),!APP.first_url_parse&&isInteractiveSearch()&&t.map_bounds.shape.toLowerCase().includes("bbox")&&(t.map_bounds=constructGeoShapeQueryObject("bbox").map_bounds),setFilters(t,!1),triggerSearch(t),!1}if((!o||"bounds_changed"!==o)&&"shape"in r){if(console.warn("turnOnInteractive will apply",{URLParams:r,trigger:o}),turnOnInteractive(),!r.method||-1!==r.shape.indexOf("BBOX(")||r.method&&"bbox"===r.method){console.info("shape in URL",r.shape);var g=r.shape;-1!==r.shape.indexOf("BBOX(")&&(t.map_bounds.shape=extractNumericalContentOfMapBoundsQuery(r.shape)),APP.first_url_parse&&(APP.force_apply_bounds=!0);var o=r.shape.split(",");APP.FORCE_SET_BOUNDS=new google.maps.LatLngBounds({lat:parseFloat(o[0]),lng:parseFloat(o[1])},{lat:parseFloat(o[2]),lng:parseFloat(o[3])}),t.map_bounds.zoom=APP.map.getBoundsZoomLevel(APP.FORCE_SET_BOUNDS)}else{switch(i=-1!==r.shape.indexOf("CIRCLE")?"circle":-1!==r.shape.indexOf("POLYGON")?"polygon":"rectangle"){case"polygon":r.shape=r.shape.replace("POLYGON(","").replace("))",")");var p=r.shape.split(/,(?=\()/g);p=$.map(p,function(e){return e=e.replace("(","").replace(")","").split(","),{lat:parseFloat(e[0]),lng:parseFloat(e[1])}});var c=drawPolygon(p);APP.FORCE_SET_BOUNDS=c.getBounds();break;case"circle":r.shape=r.shape.replace("CIRCLE(","").replace("})","}");var m=JSON.parse(r.shape);drawCircle(m.center,m.radius),APP.FORCE_SET_BOUNDS=handleAroundLatLngRectangularBuffer(m.center,void 0,!1),APP.first_url_parse&&APP.map.fitBounds(APP.FORCE_SET_BOUNDS);break;
16case"rectangle":var A=drawRectangle(r.shape);APP.FORCE_SET_BOUNDS=A.getBounds()}APP.first_url_parse&&(APP.force_apply_bounds=!0)}return"zoom"in r&&(APP.FORCE_ZOOM=parseInt(r.zoom,10)),APP.dont_apply_map_bounds=!1,initFromURLParams(t,"bounds_changed",a),!1}}else APP.rendering_map||(console.info("initFromURLParams SEARCH_PARAMS_URL_PARAMS without shape",t,APP.first_url_parse),console.info("will trigger search",t),APP.first_url_parse&&shouldDefaultToInteractiveSearch()&&(n.map_bounds.applicable=!0),APP.TO_SET_URL_SEARCH_PARAMS=shallowCopy(n),setFilters(n,!1),triggerSearch(n))}function setFilters(e,o){removeMarkersFromMap(),console.info("set filters dict",e),console.info("set filters clear_form",o),e&&null!==e?fillOutForm(e,o):fillOutForm(DEFAULT_REQUEST_PARAMS(),o),o&&APP.FORM_MAPPING.filter(function(e){return e.conditional_rerender}).map(function(o){o.conditional_rerender.filter(function(e){return"refresh_suggestions"===e.type}).map(function(e){$('[name="'.concat(o.nodeName,'"]')).trigger("refresh_suggestions")})})}!function(){function n(o){if(o&&"load"===o.type?console.info("Window Load"):console.info("Gmaps Load before Window Load"),!APP.loaded__){try{APP.INIT_BOUNDS=APP.map.boundsAt(APP.MAP_INIT_ZOOM,new google.maps.LatLng(APP.MAP_INIT_CENTER.lat,APP.MAP_INIT_CENTER.lng)),APP.mapBounds=[APP.INIT_BOUNDS.getSouthWest
16().toJSON(),APP.INIT_BOUNDS.getNorthEast().toJSON()]}catch(e){return APP.loaded__=!1,void("load"===o.type&&setTimeout(function(){$(window).trigger("gmaps_loaded")},2e3))}var e="yes"===APP.useCustomFieldNameForNeighborhoodLookup?{use_custom_field_for_neighborhoods:!0,custom_field_type_for_neighborhoods:APP.neighborhoodCustomFieldType,custom_field_for_neighborhoods:APP.neighborhoodCustomFieldName}:{};window.UNTOUCHABLE_DEFAULT_REQUEST_PARAMS_=function(){return Immutable.fromJS(_objectSpread(_objectSpread({num_of_listings_to_show:24,offset:"0",clusters_needed:!0,sort_order:parsePreselectedSortValue(),map_bounds:{applicable:!1,zoom:APP.MAP_INIT_ZOOM,method:"bbox",shape:"BBOX(".concat(mapBoundsToParams(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1])),")"),split_vp:toSplitBounds(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1]))}},e),{},{neighborhoods:[],filters:[{prices:{prices_min:null,prices_max:null}},{bedrooms:"any"},{bathrooms:"any"},{listing_type:""},{class:APP.REQUEST_DEFAULTS.class()},{type:APP.REQUEST_DEFAULTS.type()},{property_type:[]},{status:""},{square_feet:{square_feet_min:null,square_feet_max:null}},{land_sqft:{land_sqft_min:null,land_sqft_max:null}},{year_built:{year_built_min:null,year_built_max:null}},{parking_spaces:{parking_spaces_min:null,parking_spaces_max:null}},{days_on_site:null},{open_house:{open_house_min:null,open_house_max:null}},{additional_options:[]},{pool:null},{sales_conditions:[]},{amenities:[]},{land_tenure:null},{zip_code:null},{city:null},{address:null},{agent_id:null},{max_monthly_fees:null},{keyword:null},{nearby_schools:[]},{special_features:[]},{stories:[]},{subways:[]},{subway_stops:[]},{mls_ids:[]}]})).toJSON()},window.DEFAULT_REQUEST_PARAMS_=function(){return UNTOUCHABLE_DEFAULT_REQUEST_PARAMS_.call()},window.DEFAULT_REQUEST_PARAMS=function(){return DEFAULT_REQUEST_PARAMS_.call(null)},APP.FORM_MAPPING_FOR_BLOODHOUND=makeImmutable(shallowCopy(DEFAULT_REQUEST_PARAMS())),APP.bloodhoundReadyFormMapping=function(){return APP.FORM_MAPPING_FOR_BLOODHOUND.toJSON()},window.DEFAULT_REQUEST_PARAMS_DEFAULT_VALUES=Immutable.fromJS(_objectSpread(_objectSpread({num_of_listings_to_show:24,offset:"0",clusters_needed:!0,sort_order:parsePreselectedSortValue(),map_bounds:{applicable:!1,zoom:APP.MAP_INIT_ZOOM,method:"bbox",shape:"BBOX(".concat(mapBoundsToParams(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1])),")"),split_vp:toSplitBounds(new google.maps.LatLngBounds(APP.mapBounds[0],APP.mapBounds[1]))}},e),{},{neighborhoods:[],filters:[{prices:{prices_min:null,prices_max:null}},{bedrooms:"any"},{bathrooms:"any"},{listing_type:""},{class:APP.REQUEST_DEFAULTS.class()},{type:APP.REQUEST_DEFAULTS.type()},{property_type:[]},{status:""},{square_feet:{square_feet_min:null,square_feet_max:null}},{land_sqft:{land_sqft_min:null,land_sqft_max:null}},{year_built:{year_built_min:null,year_built_max:null}},{parking_spaces:{parking_spaces_min:null,parking_spaces_max:null}},{days_on_site:null},{open_house:{open_house_min:null,open_house_max:null}},{additional_options:[]},{pool:null},{sales_conditions:[]},{amenities:[]},{land_tenure:null},{zip_code:null},{city:null},{address:null},{agent_id:null},{max_monthly_fees:null},{keyword:null},{nearby_schools:[]},{special_features:[]},{stories:[]},{subways:[]},{subway_stops:[]},{mls_ids:[]}]})).toJSON(),APP.custom_bloodhounds=APP.create_custom_bloodhounds(AUTOCOMPLETE_URL),APP.extendFormMappingWithHomeTypes(),APP.handleCustomFieldSelect(),APP.handleCustomFieldCheckboxes(),APP.handleDefaultSelectOptions(),APP.handleListingTypes(),APP.handleSitewideConditionalRerenders(),renderForm().then(function(){urlToDict(),initFromURLParams(),handleForm(),handleMapDrawings(),handleTransitToggle(),APP.bounds_changed_listener||handlesearchAsImoveMapVisibility(),showDrawingControls(),initGoogleGeocodeHelpers(!1),initTypeaheadAutocomplete("#"+APP.$query[0].id,AUTOCOMPLETE_URL),APP.initialParseFromUrl&&("true"===APP.initialParseFromUrl.interactive||APP.initialParseFromUrl.triggerListingId||shouldDefaultToInteractiveSearch())||turnOffInteractive(),handleRedoHere(),handlePagination(),handlePillboxWrapper(),APP.handleSalesRentalToggle(),APP.handleResidentialCommercialToggle(),handleMaxPriceSuggestionsConditionalVisibility(),$("#search-min-price").trigger("pseudochange"),APP.FORM_MAPPING.filter(function(e){return e.wp_based&&!e.nodeName.includes(":")}).map(function(e){return $('[name="'.concat(escapeJquerySensitiveChars(e.nodeName),'"]')).trigger("DOMNodeInserted"),e}),APP.FORM_MAPPING.filter(function(e){return e.conditional_rerender}).map(function(o){o.conditional_rerender.map(function(e){_toConsumableArray($('[name="'.concat(escapeJquerySensitiveChars(o.nodeName),'"]'))).map(function(o){e.trigger.includes(" ")?e.trigger.split(" ").map(function(e){$(o).trigger(e)}):$(o).trigger(e.trigger)})})}),google.maps.event.addListenerOnce(APP.map,"mousemove",function(){APP.initZoomChangeListener()}),window.location.href.includes("search")&&window.addEventListener("popstate",function(e){var o;return $("#close-modal-replace-url").length&&$("#close-modal-replace-url").click(),removeCustomDrawings(),e.state?(APP.__BACK_BTN_CLICKED=!0,void initFromURLParams(e.state.last_request,"boun
16ds_changed",{})):void initFromURLParams(null,null,{ditch_hide_map:!0})})}),APP.loaded__=!0}}window.location.href.includes("search")&&$("body").hasClass("search")&&(APP.hw.init(),APP.hw.modalHistory.init(),fillSidebarWithLoadingPlaceholder(),showRedoHere(),$(window).on("gmaps_loaded load",function(e){function o(){document.hidden||(console.info("Tab became focused, initializing search page..."),n(e),document.removeEventListener("visibilitychange",o))}function a(){console.info("Window focused, initializing search page..."),n(e),window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",o)}document.hidden&&void 0!==document.hidden?(console.info("Search page loaded in background tab, waiting for focus..."),document.addEventListener("visibilitychange",o),window.addEventListener("focus",a,{once:!0})):n(e)}),APP.$reset_form_button.on("click",function(e){e.preventDefault(),APP.reset_active?APP.reset_active=!1:(APP.custom_title=void 0,APP.reset_active=!0,APP.USER_INTERACTED_WITH_MAP=!1,APP.$myPillbox.pillbox("items").map(function(e){return e.data.onRemoveCallback.apply(null,[e.data.form_mapping_items?e.data.form_mapping_items[0]:void 0,!1])}),(shouldDefaultToInteractiveSearch()?turnOnInteractive:turnOffInteractive)(),APP.flushBoundsChangedListener(),APP.flushZoomChangeListener(),APP.$autocomplete_bounds_object.data("json",null),unsetDynamicallyConstructedRequestParamFilters(),clearSearchInput(),removeCustomDrawings(),hideDrawingControls(),hideClearControls(),APP.FORCE_SET_BOUNDS=null,setLocationDitch(),APP.redoClickedViewport=null,APP.useMapArea=void 0,APP.dont_apply_map_bounds=!0,APP.map.setCenter(APP.MAP_INIT_CENTER),APP.map.setZoom(APP.MAP_INIT_ZOOM),APP.thePanorama.setVisible(!1),APP.onRenderCallbacks.push({fn:function e(){APP.force_return_form_change=!1,APP.dont_apply_map_bounds=!1,APP.reset_active=!1,setTimeout(function(){try{APP.initBoundsChangedListener(),APP.initZoomChangeListener()}catch(e){console.warn({prevented_error:e})}},400)},args:[]}),APP.skip_map_on_mobile()&&(APP.reset_active=!1),triggerSearch(DEFAULT_REQUEST_PARAMS()))}))}();

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.