OEmbed data
Endpoint |
|
All data collected |
|
Meta data
All data collected |
Array
(
[viewport] => Array
(
[0] => width=device-width, initial-scale=1.0
)
[fb:admins] => Array
(
[0] => 619601733,1417531635
)
[fb:page_id] => Array
(
[0] => 61002077210
)
[fb:app_id] => Array
(
[0] => 182151051046
)
[twitter:account_id] => Array
(
[0] => 11961652
)
)
|
Linked data
All data collected |
Array
(
[0] => Array
(
[@context] => http://schema.org
[@type] => Corporation
[name] => Homesnap, Inc.
[url] => https://www.homesnap.com/
[logo] => https://assets.homesnap.com/app_agent_website/img/homesnap/homesnap-logo.png
[contactPoint] => Array
(
[0] => Array
(
[@type] => ContactPoint
[telephone] => +1 (800) 431-5509
[contactType] => customer service
)
)
[sameAs] => Array
(
[0] => https://www.facebook.com/homesnapapp
[1] => https://twitter.com/Homesnap
[2] => https://www.instagram.com/homesnapapp/
[3] => https://www.linkedin.com/company/homesnap/
[4] => https://vimeo.com/homesnap
[5] => https://itunes.apple.com/us/podcast/the-snapshot/id1078406122?mt=2&ign-mpt=uo%3D4
[6] => https://www.pinterest.com/homesnap/
)
)
[1] => Array
(
[@context] => http://schema.org/
[@type] => WebSite
[name] => Homesnap, Inc.
[url] => https://www.homesnap.com/
[potentialAction] => Array
(
[@type] => SearchAction
[target] => https://www.homesnap.com/search?q={search_term_string}
[query-input] => required name=search_term_string
)
)
)
|
HTML content
<!DOCTYPE html>
<html lang="en" data-theme="hswa" class="">
<head>
<title>Homesnap</title>
<meta charset="utf-8" />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<!--favicon -->
<link rel="icon" sizes="16x16" type="image/png" href="/agent-website-favicon-blue-16x16.png"/>
<link rel="icon" sizes="32x32" type="image/png" href="/agent-website-favicon-blue-32x32.png"/>
<link rel="icon" sizes="96x96" type="image/png" href="/agent-website-favicon-blue-96x96.png"/>
<meta property="fb:admins" content="619601733,1417531635" />
<meta property="fb:page_id" content="61002077210" />
<meta property="fb:app_id" content="182151051046" />
<meta property="twitter:account_id" content="11961652" />
<link id="linkCanonical" rel="canonical" href=""/>
<meta id="metaDescription" name="description">
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
<link rel="dns-prefetch" href="https://ajax.googleapis.com"/>
<link rel="dns-prefetch" href="https://cdnjs.cloudflare.com/" />
<link rel="dns-prefetch" href="https://d1gp0w414vjjuo.cloudfront.net" />
<link rel="preconnect" href="https://cdn.trackjs.com">
<script>
function assetFallback(event) {
if (window.Homesnap && window.Homesnap.puppeteer) { return; }
if (typeof event === 'undefined') { return; }
var elem = event.target;
if (typeof elem === 'undefined') { return; }
var fallback = elem.getAttribute('data-local');
if (!fallback || !fallback.length) { return; }
if (elem.nodeName.toLowerCase() === 'link') {
elem.href = fallback;
} else if (elem.nodeName.toLowerCase() === 'script') {
var newScript = document.createElement('script');
newScript.src = fallback;
for (var i = 0; i < elem.attributes.length; i++) {
var attr = elem.attributes[i];
if (attr.specified && attr.name !== 'src' && attr.name !== 'data-local') {
newScript.setAttribute(attr.name, attr.value);
}
}
elem.parentNode.insertBefore(newScript, elem.nextSibling);
elem.parentNode.removeChild(elem);
}
}
</script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Roboto:100,300,400" rel="stylesheet" data-local="https://assets.homesnap.com/app/css_min/fallbacks/css/googleFonts.css" onerror="assetFallback(event)">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" data-local="https://assets.homesnap.com/app/css_min/fallbacks/css/materialIcons.css" onerror="assetFallback(event)">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" referrerpolicy="no-referrer"
data-local="https://assets.homesnap.com/app/css_min/fallbacks/css/bs3.css" onerror="assetFallback(event)" />
<link rel="stylesheet" type="text/css" href="https://assets.homesnap.com/app_agent_website/css_min/app.css?hash=154a537e4a6a98201eaf50ffe689faf2&v=6">
<link rel="stylesheet" type="text/css" href="https://assets.homesnap.com/app_agent_website/css_min/homesnap.css?hash=2fb7c9e049d1156e0b899d7fedd18e72&v=6">
<script type="text/javascript" src="https://assets.homesnap.com/app/hashes.js?hash=8d11a612e47f0af0cd597fbba85f44de&v=6"></script>
<script type="text/javascript" src="https://assets.homesnap.com/app_agent_website/apphashes.js?hash=7d32d830c687b0175d276d33888aa7fd&v=6"></script>
<script src="https://cdn.trackjs.com/agent/v3/latest/t.js" data-local="https://assets.homesnap.com/app/js_min/lib/trackJs.min.js" onerror="assetFallback(event)"></script>
<script type="text/javascript">
var Homesnap = window.Homesnap || {};
Homesnap.templates = {};
Homesnap.data = {};
Homesnap.environmentType = 1;
Homesnap.siteRootUrl = "https://www.gregoryapai.com";
Homesnap.authUrl = "https://auth.homesnap.com";
Homesnap.cssRootPath = "https://assets.homesnap.com/app_agent_website/css_min";
Homesnap.handlebarRootPath = "https://assets.homesnap.com/app_agent_website/handlebars";
Homesnap.rootURLs = {};
Homesnap.rootURLs.akamaiListingImagesURLFormat = "https://images.homesnap.com/listings/{sizeId}/{mediaIdReversed}-{listingIdReversed}-original.jpg";
Homesnap.imageRootPath = "https://assets.homesnap.com/app_agent_website/img";
Homesnap.jsRootPath = "https://assets.homesnap.com/app_agent_website/js_min";
Homesnap.coStarBrand = 2;
Homesnap.jsMainRootPath = "https://assets.homesnap.com/app/js_min";
Homesnap.handlebarMainRootPath = "https://assets.homesnap.com/app/handlebars";
Homesnap.cssMainRootPath = "https://assets.homesnap.com/app/css_min";
Homesnap.mapsApiKey = "AIzaSyBhZW-rvTs4ZDh3unp9wA_6Li83vr8mo8I";
window.TrackJS && TrackJS.install({
token: "9f3915741078474192584fb17b81f3a2",
application: "app_agent_website",
enabled: (window.Homesnap && window.Homesnap.environmentType && (window.Homesnap.environmentType & 8) !== 8) || false,
console: {
display: !(window.Homesnap && window.Homesnap.environmentType && (window.Homesnap.environmentType & 8) !== 8) || false
}
});
</script>
<script>
var requirejs,require,define;!function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;-1<i&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(i,e,r,n){return e&&eachProp(e,function(e,t){!r&&hasProp(i,t)||(!n||"object"!=typeof e||!e||isArray(e)||isFunction(e)||e instanceof RegExp?i[t]=e:(i[t]||(i[t]={}),mixin(i[t],e,r,n)))}),i}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttps://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(t){req[t]=function(){var e=contexts[defContextName];return e.require[t].apply(e,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(t,i,r){var e,n=t&&t.config||{};if(isBrowser)return(e=req.createNode(n,i,r)).setAttribute("data-requirecontext",t.contextName),e.setAttribute("data-requiremodule",i),!e.attachEvent||e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0||isOpera?(e.addEventListener("load",t.onScriptLoad,!1),e.addEventListener("error",t.onScriptError,!1)):(useInteractive=!0,e.attachEvent("onreadystatechange",t.onScriptLoad)),e.src=r,n.onNodeCreated&&n.onNodeCreated(e,n,i,r),currentlyAddingScript=e,baseElement?head.insertBefore(e,baseElement):head.appendChild(e),currentlyAddingScript=null,e;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),t.completeLoad(i)}catch(e){t.onError(makeError("importscripts","importScripts failed for "+i+" at "+r,e,[i]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(mainScript=(src=mainScript.split("/")).pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,i,t){var r,n;"string"!=typeof e&&(t=i,i=e,e=null),isArray(i)||(t=i,i=null),!i&&isFunction(t)&&(i=[],t.length&&(t.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,t){i.push(t)}),i=(1===t.length?["require"]:["require","exports","module"]).concat(i))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,i,t]),n.defQueueMap[e]=!0):globalDefQueue.push([e,i,t])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(u){var i,e,l,c,d,g={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},p={},f={},r={},h=[],m={},n={},v={},x=1,b=1;function q(e,t,i){var r,n,o,a,s,u,c,d,p,f,l=t&&t.split("/"),h=g.map,m=h&&h["*"];if(e&&(u=(e=e.split("/")).length-1,g.nodeIdCompat&&jsSuffixRegExp.test(e[u])&&(e[u]=e[u].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&l&&(e=l.slice(0,l.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;0<t&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&h&&(l||m)){e:for(o=(n=e.split("/")).length;0<o;o-=1){if(s=n.slice(0,o).join("/"),l)for(a=l.length;0<a;a-=1)if((r=getOwn(h,l.slice(0,a).join("/")))&&(r=getOwn(r,s))){c=r,d=o;break e}!p&&m&&getOwn(m,s)&&(p=getOwn(m,s),f=o)}!c&&p&&(c=p,d=f),c&&(n.splice(0,d,c),e=n.join("/"))}return getOwn(g.pkgs,e)||e}function E(t){isBrowser&&each(scripts(),function(e){if(e.getAttribute("data-requiremodule")===t&&e.getAttribute("data-requirecontext")===l.contextName)return e.parentNode.removeChild(e),!0})}function w(e){var t=getOwn(g.paths,e);if(t&&isArray(t)&&1<t.length)return t.shift(),l.require.undef(e),l.makeRequire(null,{skipMap:!0})([e]),!0}function y(e){var t,i=e?e.indexOf("!"):-1;return-1<i&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function S(e,t,i,r){var n,o,a,s,u=null,c=t?t.name:null,d=e,p=!0,f="";return e||(p=!1,e="_@r"+(x+=1)),u=(s=y(e))[0],e=s[1],u&&(u=q(u,c,r),o=getOwn(m,u)),e&&(u?f=i?e:o&&o.normalize?o.normalize(e,function(e){return q(e,c,r)}):-1===e.indexOf("!")?q(e,c,r):e:(u=(s=y(f=q(e,c,r)))[0],f=s[1],i=!0,n=l.nameToUrl(f))),{prefix:u,name:f,parentMap:t,unnormalized:!!(a=!u||o||i?"":"_unnormalized"+(b+=1)),url:n,originalName:d,isDefine:p,id:(u?u+"!"+f:f)+a}}function k(e){var t=e.id,i=getOwn(p,t);return i||(i=p[t]=new l.Module(e)),i}function M(e,t,i){var r=e.id,n=getOwn(p,r);!hasProp(m,r)||n&&!n.defineEmitComplete?(n=k(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(m[r])}function O(i,e){var t=i.requireModules,r=!1;e?e(i):(each(t,function(e){var t=getOwn(p,e);t&&(t.error=i,t.events.error&&(r=!0,t.emit("error",i)))}),r||req.onError(i))}function j(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(l.defQueueMap[t]=!0),h.push(e)}),globalDefQueue=[])}function P(e){delete p[e],delete f[e]}function R(){var e,r,t=1e3*g.waitSeconds,n=t&&l.startTime+t<(new Date).getTime(),o=[],a=[],s=!1,u=!0;if(!i){if(i=!0,eachProp(f,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||a.push(e),!e.error))if(!e.inited&&n)w(i)?s=r=!0:(o.push(i),E(i));else if(!e.inited&&e.fetched&&t.isDefine&&(s=!0,!t.prefix))return u=!1}),n&&o.length)return(e=makeError("timeout","Load timeout for modules: "+o,null,o)).contextName=l.contextName,O(e);u&&each(a,function(e){!function n(o,a,s){var e=o.map.id;o.error?o.emit("error",o.error):(a[e]=!0,each(o.depMaps,function(e,t){var i=e.id,r=getOwn(p,i);!r||o.depMatched[t]||s[i]||(getOwn(a,i)?(o.defineDep(t,m[i]),o.check()):n(r,a,s))}),s[e]=!0)}(e,{},{})}),n&&!r||!s||!isBrowser&&!isWebWorker||d||(d=setTimeout(function(){d=0,R()},50)),i=!1}}function a(e){hasProp(m,e[0])||k(S(e[0],null,!0)).init(e[1],e[2])}function o(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function s(e){var t=e.currentTarget||e.srcElement;return o(t,l.onScriptLoad,"load","onreadystatechange"),o(t,l.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function T(){var e;for(j();h.length;){if(null===(e=h.shift())[0])return O(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));a(e)}l.defQueueMap={}}return c={require:function(e){return e.require?e.require:e.require=l.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?m[e.map.id]=e.exports:e.exports=m[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(g.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(e=function(e){this.events=getOwn(r,e.id)||{},this.map=e,this.shim=getOwn(g.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,l.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();l.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;n[e]||(n[e]=!0,l.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var t,e,i=this.map.id,r=this.depExports,n=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=l.execCb(i,o,r,n)}catch(e){t=e}else n=l.execCb(i,o,r,n);if(this.map.isDefine&&void 0===n&&((e=this.module)?n=e.exports:this.usingExports&&(n=this.exports)),t)return t.requireMap=this.map,t.requireModules=this.map.isDefine?[this.map.id]:null,t.requireType=this.map.isDefine?"define":"require",O(this.error=t)}else n=o;if(this.exports=n,this.map.isDefine&&!this.ignore&&(m[i]=n,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(l,this.map,a)}P(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(l.defQueueMap,i)||this.fetch()}},callPlugin:function(){var u=this.map,c=u.id,e=S(u.prefix);this.depMaps.push(e),M(e,"defined",bind(this,function(e){var o,t,i,r=getOwn(v,this.map.id),n=this.map.name,a=this.map.parentMap?this.map.parentMap.name:null,s=l.makeRequire(u.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(e.normalize&&(n=e.normalize(n,function(e){return q(e,a,!0)})||""),M(t=S(u.prefix+"!"+n,this.map.parentMap,!0),"defined",bind(this,function(e){this.map.normalizedMap=t,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((i=getOwn(p,t.id))&&(this.depMaps.push(t),this.events.error&&i.on("error",bind(this,function(e){this.emit("error",e)})),i.enable()))):r?(this.map.url=l.nameToUrl(r),void this.load()):((o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,(this.error=e).requireModules=[c],eachProp(p,function(e){0===e.map.id.indexOf(c+"_unnormalized")&&P(e.map.id)}),O(e)}),o.fromText=bind(this,function(e,t){var i=u.name,r=S(i),n=useInteractive;t&&(e=t),n&&(useInteractive=!1),k(r),hasProp(g.config,c)&&(g.config[i]=g.config[c]);try{req.exec(e)}catch(e){return O(makeError("fromtexteval","fromText eval for "+c+" failed: "+e,e,[c]))}n&&(useInteractive=!0),this.depMaps.push(r),l.completeLoad(i),s([i],o)}),void e.load(u.name,s,o,g))})),l.enable(e,this),this.pluginMaps[e.id]=e},enable:function(){(f[this.map.id]=this).enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,r,n;if("string"==typeof e){if(e=S(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,n=getOwn(c,e.id))return void(this.depExports[t]=n(this));this.depCount+=1,M(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?M(e,"error",bind(this,this.errback)):this.events.error&&M(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,r=p[i],hasProp(c,i)||!r||r.enabled||l.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(p,e.id);t&&!t.enabled&&l.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},(l={config:g,contextName:u,registry:p,defined:m,urlFetched:n,defQueue:h,defQueueMap:{},Module:e,makeModuleMap:S,nextTick:req.nextTick,onError:O,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var i=e.urlArgs;e.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+i}}var r=g.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(g[t]||(g[t]={}),mixin(g[t],e,!0,!0)):g[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(v[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=l.makeShimExports(e)),r[t]=e}),g.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(g.paths[t]=e.location),g.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(p,function(e,t){e.inited||e.map.unnormalized||(e.map=S(t,null,!0))}),(e.deps||e.callback)&&l.require(e.deps||[],e.callback)},makeShimExports:function(t){return function(){var e;return t.init&&(e=t.init.apply(global,arguments)),e||t.exports&&getGlobal(t.exports)}},makeRequire:function(o,a){function s(e,t,i){var r,n;return a.enableBuildCallback&&t&&isFunction(t)&&(t.__requireJsBuild=!0),"string"==typeof e?isFunction(t)?O(makeError("requireargs","Invalid require call"),i):o&&hasProp(c,e)?c[e](p[o.id]):req.get?req.get(l,e,o,s):(r=S(e,o,!1,!0).id,hasProp(m,r)?m[r]:O(makeError("notloaded",'Module name "'+r+'" has not been loaded yet for context: '+u+(o?"":". Use require([])")))):(T(),l.nextTick(function(){T(),(n=k(S(null,o))).skipMap=a.skipMap,n.init(e,t,i,{enabled:!0}),R()}),s)}return a=a||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var t,i=e.lastIndexOf("."),r=e.split("/")[0];return-1!==i&&(!("."===r||".."===r)||1<i)&&(t=e.substring(i,e.length),e=e.substring(0,i)),l.nameToUrl(q(e,o&&o.id,!0),t,!0)},defined:function(e){return hasProp(m,S(e,o,!1,!0).id)},specified:function(e){return e=S(e,o,!1,!0).id,hasProp(m,e)||hasProp(p,e)}}),o||(s.undef=function(i){j();var e=S(i,o,!0),t=getOwn(p,i);t.undefed=!0,E(i),delete m[i],delete n[e.url],delete r[i],eachReverse(h,function(e,t){e[0]===i&&h.splice(t,1)}),delete l.defQueueMap[i],t&&(t.events.defined&&(r[i]=t.events),P(i))}),s},enable:function(e){getOwn(p,e.id)&&k(e).enable()},completeLoad:function(e){var t,i,r,n=getOwn(g.shim,e)||{},o=n.exports;for(j();h.length;){if(null===(i=h.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);a(i)}if(l.defQueueMap={},r=getOwn(p,e),!t&&!hasProp(m,e)&&r&&!r.inited){if(!(!g.enforceDefine||o&&getGlobal(o)))return w(e)?void 0:O(makeError("nodefine","No define call for "+e,null,[e]));a([e,n.deps||[],n.exportsFn])}R()},nameToUrl:function(e,t,i){var r,n,o,a,s,u,c=getOwn(g.pkgs,e);if(c&&(e=c),u=getOwn(v,e))return l.nameToUrl(u,t,i);if(req.jsExtRegExp.test(e))a=e+(t||"");else{for(r=g.paths,o=(n=e.split("/")).length;0<o;o-=1)if(s=getOwn(r,n.slice(0,o).join("/"))){isArray(s)&&(s=s[0]),n.splice(0,o,s);break}a=n.join("/"),a=("/"===(a+=t||(/^data\:|^blob\:|\?/.test(a)||i?"":".js")).charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":g.baseUrl)+a}return g.urlArgs&&!/^blob\:/.test(a)?a+g.urlArgs(e,a):a},load:function(e,t){req.load(l,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=s(e);l.completeLoad(t.id)}},onScriptError:function(e){var i=s(e);if(!w(i.id)){var r=[];return eachProp(p,function(e,t){0!==t.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===i.id)return r.push(t),!0})}),O(makeError("scripterror",'Script error for "'+i.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[i.id]))}}}).require=l.makeRequire(),l}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}}(this,"undefined"==typeof setTimeout?void 0:setTimeout);
</script>
<script type="application/ld+json">
[{
"@context": "http://schema.org",
"@type": "Corporation",
"name": "Homesnap, Inc.",
"url": "https://www.homesnap.com/",
"logo": "https://assets.homesnap.com/app_agent_website/img/homesnap/homesnap-logo.png",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1 (800) 431-5509",
"contactType": "customer service"
}],
"sameAs": [
"https://www.facebook.com/homesnapapp",
"https://twitter.com/Homesnap",
"https://www.instagram.com/homesnapapp/",
"https://www.linkedin.com/company/homesnap/",
"https://vimeo.com/homesnap",
"https://itunes.apple.com/us/podcast/the-snapshot/id1078406122?mt=2&ign-mpt=uo%3D4",
"https://www.pinterest.com/homesnap/"
]
},
{
"@context": "http://schema.org/",
"@type": "WebSite",
"name": "Homesnap, Inc.",
"url": "https://www.homesnap.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.homesnap.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}]
</script>
<script>
if (typeof require !== 'undefined' && typeof require.config === 'function') {
require.config({baseUrl : 'https://assets.homesnap.com/app_agent_website/js_min'});
}
var Homesnap=window.Homesnap||{jsRootPath:"/app_agent_website/js",handlebarRootPath:"/app_agent_website/handlebars",cssRootPath:"/app_agent_website/css",siteRootUrl:""},ticks=(new Date).getTime();if(Homesnap.gtagID="G-SJ09CZBE62",require.config({waitSeconds:Homesnap&&Homesnap.puppeteer?0:30,paths:{async:["https://cdnjs.cloudflare.com/ajax/libs/requirejs-plugins/1.0.3/async.min","".concat(Homesnap.jsMainRootPath,"/lib/async.min")],text:["https://cdn.jsdelivr.net/npm/requirejs-text@2.0.16/text.min","".concat(Homesnap.jsMainRootPath,"/lib/text.min")],jquery:["https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min","".concat(Homesnap.jsMainRootPath,"/lib/jquery.min")],handlebars:["https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.7/handlebars.min","".concat(Homesnap.jsMainRootPath,"/lib/handlebars.min")],gmaps:"https://maps.googleapis.com/maps/api/js?key=".concat(Homesnap.mapsApiKey,"&libraries=geometry,places&v=3&channel=homesnap&callback=hsInitMap"),ga:"https://www.google-analytics.com/analytics",gtag:"https://www.googletagmanager.com/gtag/js?id=".concat(Homesnap.gtagID),lodash:["https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min","".concat(Homesnap.jsMainRootPath,"/lib/lodash.4.17.21.min")],exif:"".concat(Homesnap.jsMainRootPath,"/lib/exif.min"),objecthash:Homesnap.jsMainRootPath+"/lib/object_hash.min",bootstrap:["https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min","".concat(Homesnap.jsMainRootPath,"/lib/bootstrap.min")],sly:["https://cdnjs.cloudflare.com/ajax/libs/Sly/1.6.1/sly.min","".concat(Homesnap.jsMainRootPath,"/lib/sly.min")],masonry:["https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min","".concat(Homesnap.jsMainRootPath,"/lib/masonry.pkgd.min")],facebook:"https://connect.facebook.net/en_US/sdk","jquery.validate":["https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min","".concat(Homesnap.jsMainRootPath,"/lib/jquery.validate.min")],jqvalidateAdditionalMethods:["https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/additional-methods.min","".concat(Homesnap.jsMainRootPath,"/lib/jqvalidate.additionalmethods.min")],chartjs:["https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.2.1/chart.umd.min","".concat(Homesnap.jsMainRootPath,"/lib/chart.umd.min")],twitter:"https://platform.twitter.com/widgets",pinterest:"https://assets.pinterest.com/js/pinit",gtm:"https://www.googletagmanager.com/gtm.js?id=GTM-W7C8DGM",tinycolor:"".concat(Homesnap.jsMainRootPath,"/lib/tinycolor.min"),clipboard:["https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min","".concat(Homesnap.jsMainRootPath,"/lib/clipboard.min")],noUISlider:["https://cdn.jsdelivr.net/npm/nouislider@15.7.0/dist/nouislider.min","".concat(Homesnap.jsMainRootPath,"/lib/nouislider.min")],passive:"".concat(Homesnap.jsMainRootPath,"/lib/passive.min"),calendly:"".concat(Homesnap.jsMainRootPath,"/lib/calendly.min"),simplify:"".concat(Homesnap.jsMainRootPath,"/lib/simplify.min"),jszip:["https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min","".concat(Homesnap.jsMainRootPath,"/lib/jszip.min")],jszipUtils:["https://cdnjs.cloudflare.com/ajax/libs/jszip-utils/0.0.2/jszip-utils.min","".concat(Homesnap.jsMainRootPath,"/lib/jszip-utils.min")],fresco:"".concat(Homesnap.jsMainRootPath,"/lib/fresco.min"),slick:["https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min","".concat(Homesnap.jsMainRootPath,"/lib/slick.min")],shave:["https://cdnjs.cloudflare.com/ajax/libs/shave/4.0.0/shave.min","".concat(Homesnap.jsMainRootPath,"/lib/shave.min")],SearchDefinitions:"".concat(Homesnap.jsMainRootPath,"/controllers/SearchHeader/SearchDefinitions"),SearchDefinitionTypes:"".concat(Homesnap.jsMainRootPath,"/controllers/SearchHeader/SearchDefinitionTypes"),AdvancedSearchDefinitions:"".concat(Homesnap.jsMainRootPath,"/controllers/SearchHeader/AdvancedSearchDefinitions"),modules:"".concat(Homesnap.jsMainRootPath,"/modules"),"modules/AgentWebsite":"".concat(Homesnap.jsRootPath,"/modules/AgentWebsite")},shim:{facebook:{exports:"FB"},ga:{exports:"__ga__"},exif:{exports:"EXIF"},calendly:{exports:"Calendly"}},map:{"*":{"jquery.validate.min":"jquery.validate"}},urlArgs:function(e,t){if(Homesnap&&Homesnap.environmentType&&8==(8&Homesnap.environmentType))return"";if(0===e.indexOf("_@"))return"";if(0===t.indexOf("https:")&&-1===t.indexOf("https://assets.homesnap.com"))return"";var a="ticks=".concat(ticks),n=window.Homesnap.rewVersionNumber;if("object"==typeof Homesnap)if(Homesnap.jsAppHashes&&Homesnap.jsRootPath&&0===t.indexOf(Homesnap.jsRootPath)){var o=t.replace(Homesnap.jsRootPath+"/","").toLowerCase();Homesnap.jsAppHashes[o]&&(a="hash=".concat(Homesnap.jsAppHashes[o]))}else if(Homesnap.jsHashes&&Homesnap.jsMainRootPath&&0===t.indexOf(Homesnap.jsMainRootPath)){var i=t.replace(Homesnap.jsMainRootPath+"/","").toLowerCase();Homesnap.jsHashes[i]&&(a="hash=".concat(Homesnap.jsHashes[i]))}else if(Homesnap.handlebarAppHashes&&Homesnap.handlebarRootPath&&0===t.indexOf(Homesnap.handlebarRootPath)){var s=t.replace(Homesnap.handlebarRootPath+"/","").toLowerCase();Homesnap.handlebarAppHashes&&Homesnap.handlebarAppHashes[s]&&(a="hash=".concat(Homesnap.handlebarAppHashes[s]))}else if(Homesnap.handlebarHashes&&Homesnap.handlebarMainRootPath&&0===t.indexOf(Homesnap.handlebarMainRootPath)){var l=t.replace(Homesnap.handlebarMainRootPath+"/","").toLowerCase();Homesnap.handlebarHashes[l]&&(a="hash=".concat(Homesnap.handlebarHashes[l]))}return""===a?a:"".concat(-1===t.indexOf("?")?"?":"&").concat(a,"&v=").concat(n)},config:{text:{useXhr:function(e,t,a,n){return!0}}}}),window.hsInitMap=function(){},Homesnap&&Homesnap.siteRootUrl&&Homesnap.siteRootUrl.indexOf(".homesnap.com")>-1){var gtag=function(){window.dataLayer.push(arguments)};window.GoogleAnalyticsObject="__ga__",window.__ga__={q:[["create","UA-10206571-2","auto"],["send","pageview"]],l:Date.now()},window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config",Homesnap.gtagID),gtag("config","AW-1033062273"),require(["gtag"],function(){},function(){})}require(["ga"],function(){},function(){}),function(e,t,a,n,o,i,s){e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],i=t.createElement(a),i.async=!0,i.src="//connect.facebook.net/en_US/fbevents.js",s=t.getElementsByTagName(a)[0],s.parentNode.insertBefore(i,s))}(window,document,"script"),fbq("set","autoConfig",!1,"1409922355959408"),fbq("dataProcessingOptions",["LDU"],0,0),fbq("init","1409922355959408"),fbq("track","PageView"),require(["jquery","Objects","Utilities","ControllerObjects","Application","controllers/Variable"],function(){function e(e){if(e&&"url.unhandled"===e.type){var t=r.getRootPath();if(e.url=t+e.url,e.url){var a=s.application.parseUrl(e.url);a.protocol===f.protocol&&a.hostname===f.hostname?(e.data&&s.ajax.isType(e.data,"HSPropertyAddressItem")?r.newUrl(a.pathname,a.search,[["propertyAddressItem",e.data],["ref",e.ref]]):e.data&&e.data.type_&&"HSSearchQuery"===e.data.type_?r.newUrl(a.pathname,a.search,[["searchQuery",e.data]]):e.url&&r.newUrl(a.pathname,a.search),document.body.scrollTop=document.documentElement.scrollTop=0):(console.log("location.href",e.url),f.href=e.url)}}else if(e&&"url.handled"===e.type){var n=d.getState();n&&n.state&&n.url&&r.newBrowserState(n.state,n.url)}else if(e&&"url.update"===e.type){var n=d.getState();n&&n.state&&n.url&&r.updateBrowserState(n.state,n.url)}else e&&"url.404"===e.type?r.newUrl("/error/404"):e&&"location.new"===e.type?m.event("location.new",{lat:e.lat,lng:e.lng}):e&&"user.login"===e.type||e&&"user.register"===e.type||e&&"user.logout"===e.type||e&&"user.refresh"===e.type||e&&"account.mode"===e.type||(e&&"reflect"===e.type&&e.name?m.event(e.name,e.data):e&&e.type)}function t(e){if(e&&e.canonicalUrl){var t,a,n=window.Homesnap.siteRootUrl,i=null===(t=window)||void 0===t?void 0:null===(a=t.location)||void 0===a?void 0:a.origin.match(/^(?:https?:\/\/)?(?:w{3}\.)?(?:me\.)?([a-z\d\.-]+)\.(?:[a-z\.]{2,10})(?:[/\w\.-]*)*/)[1];if(i&&"homesnap"!==i)switch(e.canonicalUrl){case"/":case"/about":case"/buyers":case"/sellers":case"/listings":n="https://www.".concat(u).concat(e.canonicalUrl);break;default:0===e.canonicalUrl.indexOf("/homes/")&&(n=window.Homesnap.siteRootUrl+e.canonicalUrl)}o("#linkCanonical").attr("href",n)}else o("#linkCanonical").attr("href","");if(e&&e.description?o("#metaDescription").attr("content",e.description):o("#metaDescription").attr("content",""),e&&e.relPrevUrl?(o("#linkRelPrev").length||o('<link rel="prev" id="linkRelPrev">').insertAfter("#metaDescription"),o("#linkRelPrev").attr("href",e.relPrevUrl)):o("#linkRelPrev").length&&o("#linkRelPrev").remove(),e&&e.relNextUrl?(o("#linkRelNext").length||o('<link rel="next" id="linkRelNext">').insertAfter("#metaDescription"),o("#linkRelNext").attr("href",e.relNextUrl)):o("#linkRelNext").length&&o("#linkRelNext").remove(),e&&e.hideAppendage&&e.title)document.title=e.title;else{var s="".concat(b);g&&(s+=" - ".concat(g)),document.title=e&&e.title?"".concat(e.title," - ").concat(s):"".concat(s)}}function a(e,t){d.restore(e,function(){d.updateController("default",d.get("name"),{$dom:o("#divRoot"),data:t?{forceVariableRefresh:!0}:void 0})})}function n(e){if(w||(w=e("#divDeviceSize")),w)return w.find("div:visible").first().data("size")}var o=require("jquery"),i=require("Objects"),s=require("Utilities"),l=require("ControllerObjects"),r=require("Application"),c=require("controllers/Variable"),p=new l.Unique,m=new l.ChildControllerManager,d=new l.StateManager(m),h={setSession:new l.Getter({webService:"/service/MyAgents/SetSession",type:i.HSMyAgentsRelationResult,cache:{expire:0}})};m.add(new l.ChildController({type:c,namespace:p.get(),register:{bubble:e}}));var u,f=window.history.location||window.location,j={window:{size:null}},b="",g="";r.getCurrentUser(function(e){var t,a,n,o,s,l,r,c;e&&(b=null===e||void 0===e?void 0:null===(t=e.website)||void 0===t?void 0:null===(a=t.entityDetails)||void 0===a?void 0:a.name.full,u=null===e||void 0===e?void 0:null===(n=e.website)||void 0===n?void 0:null===(o=n.domain)||void 0===o?void 0:o.domainName,g=null!==(s=null===e||void 0===e?void 0:null===(l=e.website)||void 0===l?void 0:null===(r=l.entityDetails)||void 0===r?void 0:null===(c=r.brand)||void 0===c?void 0:c.name)&&void 0!==s?s:"",i.setUserID(e.user.userID))});var w;o(function(){var e=s.application.parseQueryString(f.search);if(r.handleDefaultUrls(a,f.pathname,f.search),r.handleNewUrl(t),e&&(e.a||e.fa)&&h.setSession.get({data:{entityType:2,entityID:parseInt(e.a||e.fa),utmSource:e.utmSource,utmMedium:e.utmMedium,utmTerm:e.utmTerm,utmContent:e.utmContent,utmCampaign:e.utmCampaign},success:function(e){}}),e&&e.hash&&(e.pyl||e.listing||e.id||e.uid||e.ty)){var i="";i=e.pyl||e.listing?7:e.ty?e.ty:2,r.setImpersonation({entityID:e.pyl||e.listing||parseInt(e.id)||parseInt(e.uid),entityType:i,role:e.role,hash:e.hash})}else r.setImpersonation(!1);e&&(e.utm_campaign||e.utm_name||e.utm_source||e.utm_term||e.utm_content||e.utm_medium||e.sdr||e.subj||e.subject||e.date)&&r.setInitialUTMParams({promoCampaign:e.utm_campaign||e.utm_name||null,promoSource:e.utm_source||null,promoMedium:e.utm_medium||null,promoTerm:e.utm_term||null,promoContent:e.utm_content||null,promoDate:e.date||null,salesUserID:e.sdr||null,triggerEmailSubject:e.subj||e.subject||null});var l=o(window);j.window.size=n(o),r.setDeviceSize(j.window.size),l.scroll(function(){m.event("window.scroll",{$:o,$window:l,fold:{bottom:(l[0].innerHeight?l[0].innerHeight:l.height())+l.scrollTop(),right:l.width()+l.scrollLeft(),top:l.scrollTop(),left:l.scrollLeft()}})}).resize(function(){var e=j.window.size,t=n(o);!t||e&&e===t||(j.window.size=t,r.setDeviceSize(j.window.size),m.event("window.newSize",{$:o,$window:l,size:{new:t,previous:e},fold:{bottom:(l[0].innerHeight?l[0].innerHeight:l.height())+l.scrollTop(),right:l.width()+l.scrollLeft(),top:l.scrollTop(),left:l.scrollLeft()}})),m.event("window.resize",{$:o,$window:l,fold:{bottom:(l[0].innerHeight?l[0].innerHeight:l.height())+l.scrollTop(),right:l.width()+l.scrollLeft(),top:l.scrollTop(),left:l.scrollLeft()}})})})});
//# sourceMappingURL=https://assets.homesnap.com/app_agent_website/js_min/app.js.map?hash=984fe8ce8354f7edac2dfcb346e8bafb
function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(e,t,r){return t=_toPropertyKey(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}define("Application",["require","Objects","ControllerObjects","Utilities","jquery","modules/ErrorLogging"],function(e){function t(){_.ready=!1,v.getConfig.get({data:{url:C}})}function r(e){var t,r,a,o,i;L=e.data;var s=null!==(t=window.Homesnap)&&void 0!==t?t:{};s.rootURLs=s.rootURLs?_objectSpread(_objectSpread({},s.rootURLs),L.rootURLs):L.rootURLs;var l=L.userDetails;return delete L.userDetails,n(_),f.call("getConfig_",{config:L}),f.call("getRootURLs_",{rootURLs:s.rootURLs}),_.details={user:l,website:_objectSpread(_objectSpread({},L),{},{urlName:C})},_.ready=!0,_.details.website.entityDetails&&_.details.website.entityDetails.entityID&&u.setHeader("X-WebsiteEntityID",_.details.website.entityDetails.entityID),f.call("getCurrentUser_",_.details),f.callOnce("getCurrentUserOnce_",_.details),p.errorLogConfig(_.details),null!==(r=L)&&void 0!==r&&null!==(a=r.errorCode)&&void 0!==a&&a.notFound?(g("#divRoot").remove(),!1):(null===(o=L)||void 0===o||null===(i=o.errorCode)||void 0===i||!i.success)&&(window.location="/404",!1)}function n(e){var t,r,n,a,o,i,s,l,c,u,d;switch(!0){case null===e||void 0===e?void 0:null===(t=e.details)||void 0===t?void 0:null===(r=t.permissions)||void 0===r?void 0:r.paidAgent:d="pro_agent";break;case null===e||void 0===e?void 0:null===(n=e.details)||void 0===n?void 0:null===(a=n.permissions)||void 0===a?void 0:a.mlsAgent:d="mls_agent";break;case null===e||void 0===e?void 0:null===(o=e.details)||void 0===o?void 0:null===(i=o.permissions)||void 0===i?void 0:i.agent:d="agent";break;case null===e||void 0===e?void 0:null===(s=e.details)||void 0===s?void 0:null===(l=s.registrationStatus)||void 0===l?void 0:l.registered:d="consumer";break;default:d="anonymous"}null!==e&&void 0!==e&&null!==(c=e.details)&&void 0!==c&&null!==(u=c.clientDetails)&&void 0!==u&&u.agent&&(d="client"),window.dataLayer=window.dataLayer||[],function(){window.dataLayer.push(arguments)}("set","user_properties",{user_type:d})}function a(){}function o(){if(Homesnap&&Homesnap.puppeteer)return s=new c.HSIPLocation({Latitude:34.0453,Longitude:-118.2413}),f.call("getLocation_",s),!1;v.getIpLocations.get({data:{},success:function(e){try{e&&e.data&&e.data.latitude&&e.data.longitude&&(s=e.data,f.call("getLocation_",s))}catch(e){throw e}}})}var i,s,l,c=e("Objects"),u=e("ControllerObjects"),d=e("Utilities"),g=e("jquery"),p=e("modules/ErrorLogging"),f=new u.Callbacks,v={getConfig:new u.Getter({namespace:"Application",type:c.HSAgentWebsiteConfig,webService:"/service/AgentWebsite/GetConfig",cache:{expire:0},success:function(e){try{r(e)}catch(e){throw e}},failure:function(){}}),getIpLocations:new u.Getter({namespace:"Application",type:c.HSIPLocation,webService:"/service/IPLocations/Get",cache:{expire:0},failure:function(){}})},m=!1,w=new c.CacheWithLocalStorage(100,"Application_TabCacheNoExpire",!1,0),b=new c.CacheWithLocalStorage(100,"Entry_Point_UTMS",!1,0),y={userAgent:navigator.userAgent||navigator.vendor||window.opera,touch:!1,mouseover:!1,iOS:d.application.isiOS(),android:d.application.isAndroid()};window.addEventListener("touchstart",function e(){y.touch=!0,window.removeEventListener("touchstart",e,!1)},!1),y.iOS||y.android||window.addEventListener("mouseover",function e(){y.mouseover=!0,window.removeEventListener("mouseover",e,!1)},!1);var S=new c.UrlManager,h=/(?:(?:[\w\d-]{5,})\/(?:website))?/;S.addPattern(new RegExp("".concat(h.source,"/(homes)/?$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/SearchMaster"},controllers:{content:{data:{url:null,useCurrentLocation:!0}},header:{data:{currentPage:"Search"}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/homes(/.+)?$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/SearchMaster"},controllers:{content:{data:{url:null}},header:{data:{currentPage:"Search"}}}}}}),S.addPattern(/(^\/?$)|(([\w\d-]{5,})\/(website)?$)/i,{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"Home",isTemplate:!0},controllers:{content:{data:{url:null}},header:{data:{currentPage:"Home",search:!1}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/?about$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"About",isTemplate:!0},controllers:{content:{data:{url:null}},header:{data:{currentPage:"About"}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/(listings)/?(.+)?$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"Listings",isTemplate:!0},controllers:{content:{data:{url:null}},header:{data:{currentPage:"Listings"}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/buyers$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"Buyers",isTemplate:!0},controllers:{content:{data:{url:null}},header:{data:{currentPage:"Buyers"}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/sellers$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"Sellers",isTemplate:!0,url:null},controllers:{content:{data:{url:null}},header:{data:{currentPage:"Sellers"}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/(school-districts/(?:HI|AL|AR|FL|GA|LA|MS|SC|TX|AZ|CO|DE|DC|IN|KS|KY|MD|MO|NJ|NM|NC|OK|TN|VA|WV|AK|CA|CT|ID|IL|IA|ME|MA|MI|MN|MT|NE|NV|NH|NY|ND|OH|OR|PA|RI|SD|UT|VT|WA|WI|WY|PR)/[^.]+)$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/SchoolDistrict"},controllers:{content:{data:{url:null}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/(schools/[^.]+)$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/SchoolDetails"},controllers:{content:{data:{url:null}}}}}}),S.addPattern(new RegExp("".concat(h.source,"/((?:HI|AL|AR|FL|GA|LA|MS|SC|TX|AZ|CO|DE|DC|IN|KS|KY|MD|MO|NJ|NM|NC|OK|TN|VA|WV|AK|CA|CT|ID|IL|IA|ME|MA|MI|MN|MT|NE|NV|NH|NY|ND|OH|OR|PA|RI|SD|UT|VT|WA|WI|WY|PR)/.+)$"),"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/Property/PropertyAddressMaster"},controllers:{content:{data:{url:null,actionBar:!1}},header:{data:{currentPage:"Listings"}}}}}});var P=/\/(search(\?q=.*)?)$/;S.addPattern(new RegExp(h.source+P.source,"i"),{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/Search"},controllers:{content:{data:{url:null}}}}}}),S.addPattern(/^\/(.+)$/i,{data:{name:"controllers/Templates/Master/Generic"},controllers:{default:{data:{name:"controllers/404"},controllers:{content:{data:{url:null,resultCode:404}}}}}});var L,_={ready:!1,details:{}},C=function(){var e=/([\w\d-]{5,})\/(website)\/?(.+)?$/i,t=window.location.pathname,r=e.exec(t);return r&&r[1]}(),O="";return C&&(O="/".concat(C,"/website")),i||(i=function(){return _&&_.ready?o():f.register("getCurrentUserOnce_",o),t(),{update:t,handleDefaultUrls:S.handleDefaultUrls.bind(S),handleNewUrl:S.handleNewUrl.bind(S),newUrl:S.newUrl.bind(S),updateBrowserState:S.updateBrowserState.bind(S),newBrowserState:S.newBrowserState.bind(S),getCurrentUser:function(e,t){return e&&_.ready?(e(_.details),t||f.register("getCurrentUser_",e)):e&&(t?f.register("getCurrentUserOnce_",e):f.register("getCurrentUser_",e)),_.ready?_.details:null},setCurrentUser:function(e){if(!e)throw new Error("Application.setCurrentUser(user) requires user param");if(!e.type_||"HSUserDetails"!==e.type_)throw new Error("Application.setCurrentUser(user) requires HSUserDetails");_.details=e},setPreviewWebsiteSettings:function(e){if(_.ready){var t,r;null!==_&&void 0!==_&&null!==(t=_.details)&&void 0!==t&&null!==(r=t.website)&&void 0!==r&&r.websiteSettings&&(_.details.website.previewSettings=e)}else f.register("getCurrentUserOnce_",function(){var t,r;null!==_&&void 0!==_&&null!==(t=_.details)&&void 0!==t&&null!==(r=t.website)&&void 0!==r&&r.websiteSettings&&(_.details.website.previewSettings=e)})},getLocation:function(e){return e&&s?e(s):e&&f.register("getLocation_",e),s},getDeviceSize:function(e){e&&l?e(l):e&&f.register("getDeviceSize_",e)},getBrowser:function(){return y},setDeviceSize:function(e){e&&(l=e,f.callOnce("getDeviceSize_",l))},setImpersonation:function(e){function t(e){e&&w.set(r,e),u.setHeader("HSUserImpersonate",w.get(r)),f.callOnce("getImpersonation_",e),m=!0}var r="impersonation";_.ready?t(e):f.register("getCurrentUserOnce_",function(){t(e)})},getImpersonation:function(e){m?e(w.get("impersonation")):f.register("getImpersonation_",e)},removeImpersonation:function(){u.removeHeader("HSUserImpersonate",w.get("impersonation"))},setInitialUTMParams:function(e){function t(e){b.set(r,e)}var r="utmParams";_.ready?t(e):f.register("getCurrentUserOnce_",function(){t(e)})},sendSearchBarData:function(e){return!!f.exists("capturedSearchBar_")&&(f.call("capturedSearchBar_",e),!0)},captureSearchBar:function(e,t){f.unregister("capturedSearchBar_"),f.register("capturedSearchBar_",e,t)},unCaptureSearchBar:function(e){f.unregister("capturedSearchBar_",e),f.clear("capturedSearchBar_")},getAppMode:function(e,t){return{}},setAppMode:function(e){return{}},getConfig:function(e){return"function"==typeof e&&(_.ready?e(L):f.register("getConfig_",function(){e(L)})),L},getRootURLs:function(e){var t,r;if("function"==typeof e)if(_.ready){var n,a;e(null!==(n=null===(a=window.Homesnap)||void 0===a?void 0:a.rootURLs)&&void 0!==n?n:{})}else f.register("getRootURLs_",function(t){e(t)});return null!==(t=null===(r=window.Homesnap)||void 0===r?void 0:r.rootURLs)&&void 0!==t?t:{}},register:function(e,t,r){f.register(e,t,r)},unregister:f.unregister.bind(f),registrationHandle:a,getRootPath:function(){return O}}}()),i});
//# sourceMappingURL=https://assets.homesnap.com/app_agent_website/js_min/Application.js.map?hash=0dfa56d3424e2706f8f73063c20688e5
define("ControllerObjects",["Objects"],function(){var t=require("Objects"),e={},r=new t.HashTable;return e.setHeader=function(t,e){if(!t||"string"!=typeof t)throw"ControllerObjects.setHeader(key) requires the key parameter, which must be a string";if(e){var a="object"==typeof e?JSON.stringify(e):e+"";r.setItem(t,a)}else r.removeItem(t)},e.removeHeader=function(t){if(!t||"string"!=typeof t)throw"ControllerObjects.removeHeader(key) requires the key parameter, which must be a string";r.removeItem(t)},e.Unique=function(t,e){var r=0,a=e||"_",i=t||"";i.length>0&&(i+=a),this.get=function(){return i+r++}},e.State=function(t,e){this.data=t,this.controllers=e},e.ControllerState=function(t,e,r){if(this.state=t,e&&(!e.type_||"ControllerObjects.ControllerStateUrl"!==e.type_))throw new Error("ControllerObjects.ControllerState: url param must be of type 'ControllerObjects.ControllerStateUrl'");if(r)throw new Error("ControllerObjects.ControllerState: title param is no longer supported");this.url=e},e.ControllerStateUrl=function(t,e,r,a,i,o,s,n){this.type_="ControllerObjects.ControllerStateUrl",this.url=t,this.title=e,this.description=r,this.suppressChildUrl=a,this.canonicalUrl=i,this.hideAppendage=o||!1,this.relNext=s,this.relPrev=n},e.ControllerStateUrl.prototype.merge=function(t){return t&&!this.suppressChildUrl?(this.title=t.title||this.title,this.description=t.description||this.description,this.canonicalUrl=t.canonicalUrl||this.canonicalUrl||this.url,this.hideAppendage=t.hideAppendage||this.hideAppendage):this.canonicalUrl=this.canonicalUrl||this.url,this},e.StateManager=function(t,e){this.childControllerManager=t,this.picklist=e,this.data=null,this.originalData=null,this.$dom=void 0,this.controllers={},this.url=null,this.title=null},e.StateManager.prototype.update=function(t){if(this.controllers={},this.data=null,this.originalData=null,!t)return!1;if(t.$dom&&(this.$dom=t.$dom),t.state&&t.state.controllers&&(this.controllers=t.state.controllers),t.state&&t.state.data&&(this.data=t.state.data),t.data)for(var e in t.data)t.data.hasOwnProperty(e)&&this.set(e,t.data[e])},e.StateManager.prototype.restore=function(t,e){require(["lodash"],function(r){!t||!t.data||r.isEqual(t.data,this.data)&&this.childControllerManager.restore(t.controllers)||(this.update({state:t}),e&&e(t))}.bind(this))},e.StateManager.prototype.updateController=function(t,e,r){var a,i,o=this.controllers[t],s=this.childControllerManager.get(t);e&&"string"==typeof e?(a=e,r&&"object"==typeof r&&(i=r)):e&&"object"==typeof e&&(i=e),o&&(i.state=o),a?s.update(a,i):s.update(i)},e.StateManager.prototype.set=function(t,e){function r(t,e){this.data=this.data||{};var r=this.data[t];return this.data[t]=e,r}function a(t,e){this.originalData=this.originalData||{};var r=this.originalData[t];return this.originalData[t]=e,r}if(!this.picklist)return r.call(this,t,e);if(!this.picklist[t])return a.call(this,t,e);if(!0===this.picklist[t])return r.call(this,t,e);if(Array.isArray(this.picklist[t])){var i=function(t,e){for(var r,a=0;a<t.length;a++){var i=t[a];if(Array.isArray(i)&&2===i.length&&"string"==typeof i[0]&&"string"==typeof i[1]){for(var o=e,s=i[1].split("."),n=0;n<s.length;n++){if(!o||void 0==o[s[n]]){o=null;break}o=o[s[n]]}o&&(r=r||{},r[i[0]]=o)}}return r}(this.picklist[t],e);if(i)for(var o in i)i.hasOwnProperty(o)&&r.call(this,o,i[o]);return a.call(this,t,e)}},e.StateManager.prototype.get=function(t,e){var r;return void 0!=this.data&&void 0!=(r=this.data[t])?r:void 0!=this.originalData&&void 0!=(r=this.originalData[t])?r:void 0!=e?(this.set(t,e),e):void 0},e.StateManager.prototype.getState=function(){var t,r=this.childControllerManager.getState();t=this.url?this.url.merge(r.url):r.url;var a=new e.State(this.data,r.state);return new e.ControllerState(a,t)},e.StateManager.prototype.requireDom=function(){if(!this.$dom)throw new Error("state.$dom is required");var t;if(Array.isArray(this.$dom)){if(!this.$dom.length)throw new Error("state.$dom array has no elements (length === 0)");t=this.$dom[0]}else t=this.$dom;if(!t.jquery)throw new Error("state.$dom must be a jquery element")},e.StateManager.prototype._isType=function(t,e){return!!(t&&e&&t.type_&&t.type_===e)||!!(t&&e&&t.types_&&t.types_.indexOf(e)>-1)},e.StateManager.prototype.require=function(t,e){if(!t||"string"!=typeof t)throw new Error("StateManager.require() requires 'name' parameter as a string");var r=this.get(t);if(!r)throw new Error("No state.data."+t+" parameter");if(e&&Array.isArray(e)){if(1!==e.length||!e[0]||"string"!=typeof e[0])throw new Error("StateManager.require(): if 'type' parameter is an array, it must contain just one string (like ['HSObjectType'])");if(!Array.isArray(r))throw new Error("state.data."+t+" must be an array");if(r[0]&&!this._isType(r[0],e[0]))throw new Error("state.data."+t+" must be empty or an array objects of type "+e[0])}else{if(e&&"string"!=typeof e)throw new Error("StateManager.require(): 'type' parameter must be a string (like 'HSObjectType')");if(e&&!this._isType(r,e))throw new Error("state.data."+t+" must be of type "+e)}},e.StateManager.prototype.optional=function(t,e){if(!t||"string"!=typeof t)throw new Error("StateManager.optional() requires 'name' parameter as a string");var r=this.get(t);if(r)if(e&&Array.isArray(e)){if(1!==e.length||!e[0]||"string"!=typeof e[0])throw new Error("StateManager.optional(): if 'type' parameter is an array, it must contain just one string (like ['HSObjectType'])");if(!Array.isArray(r))throw new Error("state.data."+t+" must be an array");if(r[0]&&!this._isType(r[0],e[0]))throw new Error("state.data."+t+" must be empty or an array objects of type "+e[0])}else{if(e&&"string"!=typeof e)throw new Error("StateManager.optional(): 'type' parameter must be a string (like 'HSObjectType')");if(e&&!this._isType(r,e))throw new Error("state.data."+t+" must be of type "+e)}if(e&&"string"!=typeof e)throw new Error("StateManager.optional() 'type' parameter must be a string (like 'HSObjectType') or an array of strings (like ['HSObjectType'])");if(r&&e&&!this._isType(r,e))throw new Error("state.data."+t+" must be of type "+e)},e.ChildController=function(t){var e=this;this.ready=!1,this.type=t.type,this.namespace=t.namespace,this._register=t.register,this.onready={};var r=window.Homesnap||{};r.componentTree=r.componentTree||{},this.namespace&&(r.componentTree[this.namespace]="function"==typeof this.type?"Variable":this.type);var a=function r(a){if(5===a)try{throw new Error("Controller failed to load after retry limit")}catch(e){throw void 0!==t&&null!==t&&console.info(t),e}return require([e.type],function(e){if(void 0===e){var r;throw new Error("Controller failed to load: ".concat(null!==(r=this.type)&&void 0!==r?r:"Unknown type"))}if(this.controller=new e(this.namespace),this.registerCallbacks(),this.ready=!0,this.onready.update&&(this.update.apply(this,this.onready.update),this.onready.update=null),this.onready.call){for(var a=0;a<this.onready.call.length;a++){var i=this.onready.call[a],o=this.controller[i.functionName];"function"==typeof o&&o.apply(this,i.args)}this.onready.call=null}t.callback&&"function"==typeof t.callback&&t.callback(this)}.bind(e),function(t){if(t.message)throw t;"number"==typeof a&&a<5&&(require.undef(this.type),a++,setTimeout(r.call(this,a),100*a))}),!1};if("function"==typeof this.type&&this.namespace){if(this.name=t.name,this.namespace){if(this.controller=new this.type(this.namespace),this.registerCallbacks(),this.ready=!0,this.onready.update&&(this.update.apply(this,this.onready.update),this.onready.update=null),this.onready.call){for(var i=0;i<this.onready.call.length;i++){var o=this.onready.call[i],s=this.controller[o.functionName];"function"==typeof s&&s.apply(this,o.args)}this.onready.call=null}t.callback&&"function"==typeof t.callback&&t.callback(this)}}else if("string"==typeof this.type&&this.namespace){this.name=t.type;var n=this.type.replace(r.jsRootPath+"/","").toLowerCase();r.jsAppHashes&&!r.jsAppHashes["".concat(n,".js")]&&(this.type="".concat(r.jsMainRootPath,"/").concat(this.type,".js")),a.call(this,0)}},e.ChildController.prototype.registerCallbacks=function(){if(this._register&&this.controller&&this.controller.register)for(var t in this._register)this._register.hasOwnProperty(t)&&this.controller.register(t.toString(),this._register[t])},e.ChildController.prototype.update=function(){this.ready?this.controller&&this.controller.update&&this.controller.update.apply(this,arguments):this.onready.update=arguments},e.ChildController.prototype.call=function(){var t=Array.prototype.slice.call(arguments),e=t.shift();if(this.ready)this.controller&&this.controller[e]&&this.controller[e].apply(this,t);else{var r={functionName:e,args:t};this.onready.call?this.onready.call.push(r):this.onready.call=[r]}},e.ChildController.prototype.uninit=function(){this.controller&&this.controller.uninit&&this.controller.uninit()},e.ChildController.prototype.getState=function(){return this.controller&&this.controller.getState?this.controller.getState():new e.ControllerState({})},e.ChildController.prototype.restore=function(t){this.controller&&this.controller.restore&&this.controller.restore(t)},e.ChildController.prototype.register=function(t,e){this.controller&&this.controller.register&&this.controller.register(t,e)},e.ChildController.prototype.event=function(t,e){this.controller&&this.controller.event&&this.controller.event(t,e)},e.ChildControllerArray=function(t){this.type=t.type,this.namespace=t.namespace,this._register=t.register,this.isArray=!0},e.ChildControllerArray.prototype.update=function(t){if(t&&t.$dom&&Array.isArray(t.$dom)&&t.data&&Array.isArray(t.data)){this.controllers=this.controllers||[];for(var r=0;r<t.$dom.length;r++){var a=t.$dom[r],i=a.data("index")||r;t.data[i]&&(this.controllers[r]||this.controllers.push(new e.ChildController({type:this.type,namespace:this.namespace+"_"+r,register:this._register})),this.controllers[r].update({$dom:a,data:t.data[i]}))}for(var r=t.$dom.length;r<this.controllers.length;r++)this.controllers[r]&&this.controllers[r].uninit&&this.controllers[r].uninit();this.controllers.length>t.$dom.length&&(this.controllers.length=t.$dom.length)}},e.ChildControllerArray.prototype.get=function(t){return!t&&this.controllers?this.controllers:t&&this.controllers&&this.controllers[t]?this.controllers[t]:null},e.ChildControllerArray.prototype.length=function(){return this.controllers?this.controllers.length:0},e.ChildControllerArray.prototype.empty=function(){this.controllers&&(this.uninit(),this.controllers=null)},e.ChildControllerArray.prototype.push=function(t){if(t&&t.$dom&&Array.isArray(t.$dom)&&t.data&&Array.isArray(t.data)){this.namespace=t.namespace||this.namespace,this.controllers=this.controllers||[];for(var r=this.controllers.length,a=0;a<t.$dom.length;a++){var i=t.$dom[a],o=i.data("index")||a;t.data[o]&&(this.controllers[r+a]||this.controllers.push(new e.ChildController({type:this.type,namespace:this.namespace+"_"+(r+a).toString(),register:this._register})),this.controllers[r+a].update({$dom:i,data:t.data[o]}))}}},e.ChildControllerArray.prototype.uninit=function(){if(this.controllers)for(var t=0;t<this.controllers.length;t++){var e=this.controllers[t];e&&e.uninit&&e.uninit()}},e.ChildControllerArray.prototype.event=function(t,e){if(this.controllers)for(var r=0;r<this.controllers.length;r++){var a=this.controllers[r];a&&a.event&&a.event(t,e)}},e.ChildControllerArray.prototype.getState=function(){var t=[];if(this.controllers)for(var e=0;e<this.controllers.length;e++){var r=this.controllers[e];r&&r.getState&&t.push(r.getState().state)}return t},e.ChildControllerArray.prototype.restore=function(t){if(this.controllers&&t&&Array.isArray(t)&&this.controllers.length===t.length)for(var e=0;e<this.controllers.length;e++){var r=this.controllers[e];r&&r.restore&&r.restore(t[e])}},e.ChildControllerManager=function(r){this.controllers=new t.HashTable,r&&this.add("default",new e.ChildController(r))},e.ChildControllerManager.prototype.add=function(t,e,r){var a,i,o=r||!1,s=!!o&&this.get(t);if(o&&s)return!1;"string"==typeof t?(a=t,i=e):"object"==typeof t&&(a="default",i=t),this.controllers.setItem(a,i)},e.ChildControllerManager.prototype.get=function(t,e){t||(t="default");var r=this.controllers.getItem(t);return r&&r.isArray&&e?r[e]:r},e.ChildControllerManager.prototype.remove=function(t){t||(t="default"),this.controllers.removeItem(t)},e.ChildControllerManager.prototype.getState=function(){var t,r={};return this.controllers.each(function(e,a){var i=a.getState();Array.isArray(i)?r[e]=i:(r[e]=i.state,!t&&i.url&&(t=i.url))}),new e.ControllerState(r,t)},e.ChildControllerManager.prototype.restore=function(t){var e=!0;if(this.controllers.each(function(r,a){t[r]?(Array.isArray(t[r])&&!a.isArray||!Array.isArray(t[r])&&a.isArray||Array.isArray(t[r])&&a.isArray&&t[r].length!=a.length())&&(e=!1):e=!1}),e)for(var r in t)t.hasOwnProperty(r)&&!this.controllers.hasItem(r)&&(e=!1);return e&&this.controllers.each(function(e,r){r.restore(t[e])}),e},e.ChildControllerManager.prototype.uninit=function(){this.controllers.each(function(t,e){e.uninit&&e.uninit()})},e.ChildControllerManager.prototype.event=function(t,e){this.controllers.each(function(r,a){a.event&&a.event(t,e)})},e.CallbackItem=function(t,e){this.callback=t,this.namespace=e},e.Callbacks=function(e){this.hashTable=new t.HashTable,this._requireNamespace=e},e.Callbacks.prototype.register=function(t,r,a){if(this._requireNamespace&&!a)throw new Error("This ControllerObjects.Callbacks requires a namespace");if(t&&"string"==typeof t&&r&&"function"==typeof r){var i=this.hashTable.getItem(t);i?i.push(new e.CallbackItem(r,a)):this.hashTable.setItem(t,[new e.CallbackItem(r,a)])}},e.Callbacks.prototype.unregister=function(t,e){if(t&&"string"==typeof t&&e&&"function"==typeof e){var r=this.hashTable.getItem(t);if(r)for(var a=0;a<r.length;a++)if(r[a].callback===e){r.splice(a,1);break}}else t&&"string"==typeof t&&!e&&this.hashTable.each(function(e,r){for(var a=0;a<r.length;a++)if(r[a].namespace&&r[a].namespace===t){r.splice(a,1);break}})},e.Callbacks.prototype.call=function(){var t=Array.prototype.slice.call(arguments),e=t.shift(),r=this.hashTable.getItem(e);if(r){for(var a=0;a<r.length;a++)r[a].callback&&"function"==typeof r[a].callback&&r[a].callback.apply(this,t);return!0}return!1},e.Callbacks.prototype.callOnce=function(){var t=Array.prototype.slice.call(arguments),e=t.shift();e&&(this.call.apply(this,arguments),this.clear(e))},e.Callbacks.prototype.clear=function(t){t?this.hashTable.removeItem(t):this.hashTable.clear()},e.Callbacks.prototype.exists=function(t){return!!this.hashTable.getItem(t)},e.HandlebarsPartial=function(t){this.name=t.name,this.url=t.url},e.HandlebarsTemplate=function(t){this.name=t.name,this.url=t.url,this.$dom=t.$dom},e.Getter=function(e){if(this.namespace=e.namespace,this.type=e.type,this.map=e.map,this.webService="".concat(e.webService),this.webServiceOptions=e.webServiceOptions,this.success=e.success,this.failure=e.failure,this.error=e.error,this.template=e.template,this.css=e.css,this.less=e.less,this.type&&this.webService){var r={expire:e.cache&&void 0!==e.cache.expire?e.cache.expire:120,isPermanent:!(!e.cache||!e.cache.isPermanent)&&e.cache.isPermanent,maxSize:e.cache&&e.cache.maxSize?e.cache.maxSize:50};this.cache=new t.CacheWithLocalStorageAndServer(this.type,this.webService,null,null,r.expire,r.maxSize,r.isPermanent,null,null,this.webServiceOptions)}this.previous={}},e.Getter.prototype.set$dom=function(t){this.template&&(this.template.$dom=t)},e.Getter.prototype.get=function(t){var a=t.success||this.success,i=t.failure||this.failure||t.error||this.error,o=t.webServiceOptions||this.webServiceOptions,s=t.$dom||(this.template&&this.template.$dom?this.template.$dom:null),n=!!t.append;this.namespace=t.namespace||this.namespace;var l=t.map||this.map;(function(){require(["jquery","Utilities"],function(h,c){var p=[],u=function(){var t=h.Deferred();if(this.template&&this.template.url)c.handlebars.getTemplate(this.template.name||this.template.url,this.template.url,function(e){t.resolve(e)});else if(this.template&&this.template.name&&this.template.html)c.handlebars.getHtml(this.template.name,this.template.html,function(e){t.resolve(e)});else{if(this.template)throw new Error("template must be an object with either .url or (.name and .html)");t.resolve()}return t.promise()}.bind(this);p.push(u());var d=function(){var e=h.Deferred();return this.cache&&t.data?(r.each(function(t,e){o=o||{},o.headers=o.headers||{},o.headers[t]=e}),this.cache.get(t.data,function(t){var r=l?l(t):t;e.resolve(r)}.bind(this),o,i)):e.resolve(t.data),e.promise()}.bind(this);p.push(d());var f=function(){var t=h.Deferred();return this.css?c.handlebars.loadCSS(this.css,function(){t.resolve()}):t.resolve(),t.promise()}.bind(this);p.push(f());var y=function(r,i){var o={},l={},c={};if(r){if(this.template.dom&&Array.isArray(this.template.dom))for(var p=0;p<this.template.dom.length;p++){var u;Array.isArray(this.template.dom[p])?(u=this.template.dom[p][0],l[u]=!0):u=this.template.dom[p],o[u]=this.namespace+"_"+u}var d=r({dom:o,data:i}),f=this.namespace.split("_");f.pop();var y=Homesnap.componentTree[f.join("_")];y&&(d="\x3c!-- Component: "+y+" --\x3e\n"+d),s&&n?s.append(d):s&&s.empty().html(d);for(var m in o)o.hasOwnProperty(m)&&(l[m]?c[m]=h("[id^="+o[m]+"_]").toArray().map(function(t){return h(t)}):c[m]=h("#"+o[m]))}var g={data:i,$dom:c};s||(g.html=d),t.pass&&(g.pass=t.pass),a(new e.GetterResult(g,this.cache,t.data))}.bind(this);h.when.apply(h,p).then(function(){var t=arguments[0],e=arguments[1];y(t,e)}.bind(this)).fail(function(t){throw t})}.bind(this))}).bind(this)()},e.Getter.prototype.removeFromCache=function(t){t&&this.cache&&this.cache.remove(t.data||t)},e.GetterResult=function(t,e,r){t&&(t.data&&(this.data=t.data),t.$dom&&(this.$dom=t.$dom),t.pass&&(this.pass=t.pass),t.html&&(this.html=t.html)),e&&(this._cache=e),r&&(this._inputData=r)},e.GetterResult.prototype.remove=function(){this._cache&&this._inputData&&this._cache.remove(this._inputData)},e.GetterResult.prototype.update=function(){this._cache&&this._inputData&&void 0!==this.data&&this._cache.update(this._inputData,this.data)},e});
//# sourceMappingURL=https://assets.homesnap.com/app_agent_website/js_min/ControllerObjects.js.map?hash=2a9f69736c9afc966cff002050a98ab7
function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_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(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function _readOnlyError(t){throw new TypeError('"'+t+'" is read-only')}define("Objects",["require","Utilities","SearchDefinitions","SearchDefinitionTypes","SearchDefinitionTypes","AdvancedSearchDefinitions","AdvancedSearchDefinitions","AdvancedSearchDefinitions","AdvancedSearchDefinitions","AdvancedSearchDefinitions","AdvancedSearchDefinitions"],function(t){function e(t,e){if("undefined"==typeof Storage)return!1;try{var i=window[t];return i.setItem(e,"1"),i.removeItem(e),!0}catch(e){return e.code===DOMException.QUOTA_EXCEEDED_ERR&&window[t].length,!1}}var i=t("Utilities"),s={},r=0;s.setUserID=function(t){r=t},s.HashTable=function(t){this.length=0,this.items={};for(var e in t)t.hasOwnProperty(e)&&(this.items[e]=t[e],this.length++)},s.HashTable.prototype.setItem=function(t,e){var i;return this.hasItem(t)?i=this.items[t]:this.length++,this.items[t]=e,i},s.HashTable.prototype.getItem=function(t){return this.hasItem(t)?this.items[t]:void 0},s.HashTable.prototype.getItems=function(t){var e=[];if(t&&Array.isArray(t)&&t.length>0)for(var i=0;i<t.length;i++)this.hasItem(t[i])&&e.push(this.getItem(t[i]));return e},s.HashTable.prototype.hasItem=function(t){return this.items.hasOwnProperty(t)},s.HashTable.prototype.removeItem=function(t){if(this.hasItem(t)){var e=this.items[t];return this.length--,delete this.items[t],e}},s.HashTable.prototype.keys=function(){var t=[];for(var e in this.items)this.hasItem(e)&&t.push(e);return t},s.HashTable.prototype.values=function(){var t=[];for(var e in this.items)this.hasItem(e)&&t.push(this.items[e]);return t},s.HashTable.prototype.each=function(t){for(var e in this.items)this.hasItem(e)&&t(e,this.items[e])},s.HashTable.prototype.clear=function(){this.items={},this.length=0},s.Queue=function(){this._oldestIndex=1,this._newestIndex=1,this._storage={}},s.Queue.prototype.size=function(){return this._newestIndex-this._oldestIndex},s.Queue.prototype.enqueue=function(t){this._storage[this._newestIndex]=t,this._newestIndex++},s.Queue.prototype.dequeue=function(){var t;return this._oldestIndex!==this._newestIndex&&(t=this._storage[this._oldestIndex],delete this._storage[this._oldestIndex],this._oldestIndex++),t},s.Cache=function(t){this._maxSize=t,this._hashTable=new s.HashTable,this._queue=new s.Queue},s.Cache.prototype.set=function(t,e){if(this._queue.enqueue(r+"::"+t),this._hashTable.setItem(r+"::"+t,e),this._queue.size()>this._maxSize){var i=this._queue.dequeue();i&&this._hashTable.removeItem(i)}},s.Cache.prototype.get=function(t){return this._hashTable.getItem(r+"::"+t)},s.Cache.prototype.remove=function(t){return this._hashTable.removeItem(r+"::"+t)};var n=e("localStorage","storageTest_local"),a=e("sessionStorage","storageTest_session");return s.LocalStorage=function(t){this._isLocalStorage=n,this._isSessionStorage=a,this._prefix=t.toString()+"::"},s.LocalStorage.prototype.set=function(t,e,s,n){if(i.application.isHSPuppeteer())return!1;var a=r+"::"+this._prefix+e.toString(),o=JSON.stringify({item:s,date:Date.now()}),h=this.validate([a,o]);if(h.out)return window.TrackJS&&(window.TrackJS.console.info(n||{}),window.TrackJS.console.info({userID:r,prefix:this._prefix,length:h.size}),window.TrackJS.console.error("Attempt to execute 'setItem' on 'Storage' exceeds quota. Out of Bounds.")),!1;if((this._isLocalStorage&&t||this._isSessionStorage&&!t)&&e){var u=t?localStorage:sessionStorage;if(void 0===s)this.remove(t,e);else for(var l=0;l++<100;)try{u.setItem(a,o);break}catch(t){if(100===l)throw t;u.removeItem(u.key(u.length-1))}}return!0},s.LocalStorage.prototype.get=function(t,e,i){var s;if((this._isLocalStorage&&t||this._isSessionStorage&&!t)&&e){var n=t?localStorage:sessionStorage,a=n.getItem(r+"::"+this._prefix+e.toString());if(a){var o=JSON.parse(a);if(i){var h=Date.now(),u=h-60*i*1e3;o&&o.date&&o.date>u&&void 0!==o.item&&(s=o.item)}else o&&void 0!==o.item&&(s=o.item)}}return s},s.LocalStorage.prototype.remove=function(t,e){if((this._isLocalStorage&&t||this._isSessionStorage&&!t)&&e){(t?localStorage:sessionStorage).removeItem(r+"::"+this._prefix+e.toString())}},s.LocalStorage.prototype.validate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{floor:2e3,ceiling:15e3},s=i.byte.size(t,"kb"),r={floor:s>e.floor,ceiling:s>e.ceiling,out:!1,size:s};return r.out=r.floor&&!r.ceiling,r},s.CacheWithLocalStorage=function(t,e,i,r,n){this._cache=new s.Cache(t),this._store=new s.LocalStorage(e),this._isPermanent=i,this._expireMinutes=r,this._refresh=n},s.CacheWithLocalStorage.prototype.set=function(t,e,i){this._cache.set(t,e),this._store.set(this._isPermanent,t,e,i||{})},s.CacheWithLocalStorage.prototype.get=function(t){var e=this._cache.get(t);return void 0===e&&void 0!==(e=this._store.get(this._isPermanent,t,this._expireMinutes))&&this._cache.set(t,e),e},s.CacheWithLocalStorage.prototype.remove=function(t){this._cache.remove(t),this._store.remove(this._isPermanent,t)},s.WebService=function(t,e,i,s,r){this._isArray=Array.isArray(t),this._type=this._isArray?t[0]:t,this._url=e,this._successGlobal=i,this._failure=s,this._options=r},s.WebService.prototype.get=function(t,e,s,r){var n=e||this._successGlobal,a=r||this._failure,o=s||this._options;this._isArray?i.ajax.getArray(this._url,t,this._type,n,a,o):i.ajax.getOne(this._url,t,this._type,n,a,o)},s.CacheWithLocalStorageAndServer=function(t,e,i,r,n,a,o,h,u,l,c){this._keyFn=u;var d=n>=0?n:120;d>0&&(this._cache=new s.CacheWithLocalStorage(a||50,h||e,o||!1,d,c)),this._webService=new s.WebService(t,e,null,r),this._successGlobal=i},s.CacheWithLocalStorageAndServer.prototype.get=function(e,i,s,r){var n,a=i||this._successGlobal,o=r||this._failure,h=s||this._options,u=null!==(n=this._webService._url)&&void 0!==n?n:"Unspecified Webservice",l=function(t){var i;this._cache&&(this._cache._refresh?this._cache.remove(t):i=this._cache.get(t)),void 0!==i?a(i):this._webService.get(e,function(i){this._cache&&this._cache.set(t,i,e),a(i)}.bind(this),h,function(t,e){var i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Unhandled Error";if(null!==t&&void 0!==t&&t.responseText&&console.info(null===t||void 0===t?void 0:t.responseText),"function"==typeof o){var r;i=null!==(r=o(t,e,s,u))&&void 0!==r&&r}if(!i)throw new Error("".concat(u," : ").concat(e," : ").concat(s))})}.bind(this);this._keyFn?l(this._keyFn(e)):t(["objecthash"],function(t){var i=t.sha1(e);l(i)}.bind(this))},s.CacheWithLocalStorageAndServer.prototype.hasCache=function(){return void 0!==this._cache},s.CacheWithLocalStorageAndServer.prototype.remove=function(e){this._cache&&e&&(this._keyFn?this._cache.remove(this._keyFn(e)):t(["objecthash"],function(t){var i=t.sha1(e);this._cache.remove(i)}.bind(this)))},s.CacheWithLocalStorageAndServer.prototype.update=function(e,i){this._cache&&e&&(this._keyFn?this._cache.set(this._keyFn(e),i,e):t(["objecthash"],function(t){var s=t.sha1(e);this._cache.set(s,i)}.bind(this)))},s.Subscribable=function(){this.subscribers={any:[]}},s.Subscribable.prototype={on:function(t,e,i){return t.split(" ").forEach(function(t){this.subscribers[t]||(this.subscribers[t]=[]),this.subscribers[t].push(e)},this),i&&e.call(this),this},off:function(t,e){if(t)t.split(" ").forEach(function(t){if(e){var i=this.subscribers[t].indexOf(e);i>=0&&this.subscribers[t].splice(i,1)}else this.subscribers[t]=[]},this);else for(var i in this.subscribers)this.subscribers[i]=[];return this},trigger:function(t){function e(t){t.apply(s,i)}var i=arguments,s=this;return(this.subscribers[t]||[]).forEach(e),"any"!==t&&(this.subscribers.any||[]).forEach(e),this},once:function(t,e){var i=this,s=function(){e.apply(i,arguments),r()},r=function(){i.off(t,s)};this.on(t,s)}},s.ObservableArray=function(t){if(!(this instanceof s.ObservableArray))return new s.ObservableArray(t);t=t||[];for(var e=0;e<t.length;e++)this[e]=t[e];this.length=t.length,this.subscribers={}},s.ObservableArray.prototype=new s.Subscribable,"pop push shift unshift splice reverse sort".split(" ").forEach(function(t){var e=Array.prototype[t];s.ObservableArray.prototype[t]=function(){var i=e.apply(this,arguments),s=[t].concat(Array.prototype.slice.call(arguments));return this.trigger.apply(this,s),i}}),s.ObservableArray.prototype.concat=function(t){for(var e=this.length,i=0;i<t.length;i++)this[e+i]=t[i],this.length++;return this.trigger("concat",t),this},"slice join some every forEach map filter reduce reduceRight indexOf lastIndexOf toString toLocaleString".split(" ").forEach(function(t){s.ObservableArray.prototype[t]=Array.prototype[t]}),s.HSPropertyAddressItem=function(t){if(i.ajax.addType(this,"HSPropertyAddressItem"),this.id=t.ID,this.propertyID=t.PropertyID,this.address=i.propertyAddress.getAddress(t.FullStreetAddress,t.UnitNumber,t.City,t.State,t.Zip),this.price=i.propertyAddress.getPrice(t.Price,t.TransactionType),this.latitude=t.Latitude,this.longitude=t.Longitude,this.url=t.Url,this.propertyCount=i.string.getNumber(t.PropertyCount),this.label=t.Label,this.details=t.Details,this.sPropertyType2=i.propertyAddress.getSPropertyType(t.SPropertyType2),this.beds=i.propertyAddress.getBeds(t.Beds),this.baths=i.propertyAddress.getBaths(t.BathsFull,t.BathsHalf),this.sqFt=i.propertyAddress.getSqFt(t.SqFt),this.lotSize=i.propertyAddress.getLotSize(t.LotSize),this.yearBuilt=t.YearBuilt,this.unitCount=i.string.getNumber(t.UnitCount),this.transactionType=new s.HSTransactionTypeEnum(t.TransactionType),this.disclaimerShare=t.DisclaimerShare,this.polygon=t.Polygon,this.status={raw:t.Status,isFavorited:1==(1&t.Status),isFollowed:2==(2&t.Status),areaHasMLSCoverage:4==(4&t.Status),canCheckIn:8==(8&t.Status),canGenerateRapidCMA:16==(16&t.Status),canGetSimilarListings:32==(32&t.Status),belongsToMultiUnitAddress:64==(64&t.Status),suppressGoogleStreetView:128==(128&t.Status),preferLatLngForStreetView:256==(256&t.Status)},t.Attributes&&(this.attributes=new s.HSPropertyAddressItemAttributes(t.Attributes)),t.Listing&&(this.listing=new s.HSPropertyAddressListingItem(t.Listing)),this.listing?this.propertyStatus=i.listing.getPropertyStatus(this.listing.sListingStatus.raw,this.transactionType.raw,this.listing.isComingSoon,this.listing.isAgentOpen,this.listing.isOpenHouse,this.listing.openHouse&&this.listing.openHouse.times?this.listing.openHouse.times:null,null,this.attributes&&this.attributes.mlsStatus?this.attributes.mlsStatus:null,this.listing.openHouse):this.propertyStatus=i.propertyAddress.getPropertyStatus(this.transactionType.raw,null,this.attributes&&this.attributes.mlsStatus?this.attributes.mlsStatus:null),this.listing&&this.listing.pictures2&&this.listing.pictures2.length&&(this.primaryImage=i.listing.getPrimaryImage(this.listing.id,this.listing.pictures2[0]),this.listing.pictures2.length&&(this.secondaryImages=i.listing.getSecondaryImages(this.listing.id,this.listing.pictures2.slice(1)))),t.Properties){this.properties=[];for(var e=0;e<t.Properties.length;e++)this.properties.push(new s.HSPropertyAddressItem(t.Properties[e]))}t.Building&&(this.building=new s.HSPropertyAddressBuildingSummary(t.Building),this.building.address=i.propertyAddress.getAddress(this.address.fullStreetAddressWithoutUnit,null,t.City,t.State,t.Zip),this.building.latitude=t.Latitude,this.building.longitude=t.Longitude)},s.HSPropertyAddressListingItem=function(t){var e;i.ajax.addType(this,"HSPropertyAddressListingItem"),this.id=t.ID,this.sListingStatus=i.listing.getListingStatus(t.SListingStatus),this.specialFeatures=i.listing.getSpecialFeatures(t.SpecialFeatures||0),this.originalPrice=i.propertyAddress.getPrice(t.OriginalPrice),this.sourceNumber=t.SourceNumber,this.sPhotoCount=i.string.getNumber(t.SPhotoCount),this.permissionLevel=t.PermissionLevel,this.mlsID=t.MLSID,this.ago=t.Ago,this.attribution=t.Attribution,this.idx=t.IDX,this.status={raw:t.Status,none:0===t.Status,hasImage:1==(1&t.Status)},this.pictures=t.Pictures,this.pictures2=t.Pictures2,this.listDate=i.date.getDateInfo(t.ListDate),this.closeDate=i.date.getDateInfo(t.CloseDate),this.contractDate=i.date.getDateInfo(t.ContractDate),this.offMarketDate=i.date.getDateInfo(t.OffMarketDate),t.OpenHouse&&(this.openHouse=new s.HSOpenHouseItem(t.OpenHouse)),this.isComingSoon=this.specialFeatures.comingSoon,this.isOpenHouse=this.specialFeatures.openHouse||void 0!==this.openHouse&&this.openHouse.id,this.isAgentOpen=this.specialFeatures.brokerOpen||void 0!==this.openHouse&&(null===(e=this.openHouse.type)||void 0===e?void 0:e.isBrokerOpen)},s.HSPropertyAddressItemAttributes=function(t){i.ajax.addType(this,"HSPropertyAddressItemAttributes"),this.ownershipTime=t.OwnershipTime,this.equity=t.Equity,t.EquityPercentage&&(this.equityPercentage=t.EquityPercentage),this.cashOnly=t.CashOnly,this.hasNoMortgage=t.HasNoMortgage,this.likelihoodToList=new s.HSPropertyLikelihoodToListCategoryEnum(t.LikelihoodToList),this.distressed=new s.HSPropertyDistressedKindEnum(t.Distressed),this.distressedDescription=i.propertyAddress.getDistressedAttributeDescription(t.Distressed),this.distressedDescriptionShort=i.propertyAddress.getDistressedAttributeDescription(t.Distressed,!0),t.OwnershipType&&(this.ownershipType=new s.HSPropertyOwnershipTypeEnum(t.OwnershipType),this.ownershipTypeDescription=i.propertyAddress.getOwnershipTypeAttributeDescription(t.OwnershipType),this.ownershipTypeDescriptionShort=i.propertyAddress.getOwnershipTypeAttributeDescription(t.OwnershipType,!0)),t.LastListedOn&&(this.lastListedOn=i.date.getDateInfo(t.LastListedOn)),t.OffMarketDate&&(this.offMarketDate=i.date.getDateInfo(t.OffMarketDate)),t.Loan&&(this.loan=new s.HSPropertyAddressItemLoan(t.Loan)),void 0!==t.MLSStatus&&(this.mlsStatus=new s.HSPropertyAddressItemMLSStatusEnum(t.MLSStatus)),t.EstimatedValue&&(this.estimatedValue=t.EstimatedValue)},s.HSPropertyOwnershipTypeEnum=function(t){i.ajax.addType(this,"HSPropertyOwnershipTypeEnum"),this.raw=t,this.unknown=0===t,this.absenteeInState=1==(1&t),this.absenteeOutOfState=2==(2&t),this.corporate=4==(4&t),this.owner=8==(8&t)},s.HSPropertyAddressSegmentedList=function(t){var e=this;i.ajax.addType(this,"HSPropertyAddressSegmentedList"),this.forSale=[],this.forRent=[],this.other=[],t.ForSale&&t.ForSale.forEach(function(t){e.forSale.push(new s.HSPropertyAddressItem(t))}),t.ForRent&&t.ForRent.forEach(function(t){e.forRent.push(new s.HSPropertyAddressItem(t))}),t.Other&&t.Other.forEach(function(t){e.other.push(new s.HSPropertyAddressItem(t))})},s.HSPropertyAddressBuildingSummary=function(t){i.ajax.addType(this,"HSPropertyAddressBuildingSummary"),this.id=t.ID,this.url=t.Url,this.propertyCount=i.string.getNumber(t.UnitCount)},s.HSPropertyAddressItemLoan=function(t){i.ajax.addType(this,"HSPropertyAddressItemLoan"),this.age=t.Age,void 0!==t.Kind&&(this.kind=new s.HSPropertyMortgageLoanTypeEnum(t.Kind)),t.Started&&(this.started=i.date.getDateInfo(t.Started)),t.Rate&&(this.rate=i.string.getPercent(t.Rate,100)),void 0!==t.Balance&&(this.balance=i.string.getPrice(t.Balance)),t.MonthlyPayment&&(this.monthlyPayment=i.string.getPrice(t.MonthlyPayment))},s.HSPropertyMortgageLoanTypeEnum=function(t){i.ajax.addType(this,"HSPropertyMortgageLoanTypeEnum"),this.raw=t,this.none=0===t,this.conventional=1==(1&t),this.standAloneFirst=2==(2&t),this.standAloneSecond=4==(4&t),this.ARM=8==(8&t),this.HELOC=32==(32&t),this.FHA=16==(16&t),this.VA=64==(64&t)},s.HSPropertyAddressItemMLSStatusEnum=function(t){i.ajax.addType(this,"HSPropertyAddressItemMLSStatusEnum"),this.raw=t,this.none=0===t,this.comingSoon=1==(1&t),this.active=2==(2&t),this.contract=4==(4&t),this.sold=8==(8&t),this.expired=16==(16&t),this.canceled=32==(32&t),this.withdrawn=64==(64&t),this.hold=128==(128&t),this.offMarket=256==(256&t)},s.HSPropertyAddressesFavoriteErrorCodeEnum=function(t){this.alreadyFavorited=-1===t,this.success=0===t,this.unknownError=1===t},s.HSOpenHouseItem=function(t){i.ajax.addType(this,"HSOpenHouseItem"),this.id=t.ID,this.date=i.date.getDateInfo(t.Date),this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.startDateUtc=i.date.getDateInfo(t.StartDateUtc),this.endDateUtc=i.date.getDateInfo(t.EndDateUtc),this.times=t.Times,this.remarks=t.Remarks,this.refreshments=t.Refreshments,this.virtualURL=t.VirtualURL,this.status={raw:t.Status,none:0===t.Status,isBrokerOpen:1==(1&t.Status)},t.Type&&(this.type=new s.HSOpenHouseTypeEnum(t.Type)),t.Method&&(this.method=new s.HSOpenHouseMethodEnum(t.Method)),this.startDateString=new Date(parseInt(t.StartDate,10)).toISOString().substring(0,10)},s.HSOpenHouseTypeEnum=function(t){i.ajax.addType(this,"HSOpenHouseTypeEnum"),this.raw=t,this.none=0===t,this.openHouse=1==(1&t),this.brokerOpen=2==(2&t),this.officeOpen=4==(4&t),this.byAppointmentOnly=8==(8&t)},s.HSOpenHouseMethodEnum=function(t){i.ajax.addType(this,"HSOpenHouseMethodEnum"),this.raw=t,this.none=0===t,this.inPerson=1==(1&t),this.virtual=2==(2&t),this.byAppointmentOnly=4==(4&t)},s.HSListingsGetByBoundingBoxResult=function(t){if(i.ajax.addType(this,"HSListingsGetByBoundingBoxResult"),this.count=i.string.getNumber(t.Count),this.status={raw:t.Status,none:0===t.Status,countIsTruncated:1==(1&t.Status)},t.Clusters){this.clusters=[];for(var e=0;e<t.Clusters.length;e++)this.clusters.push(new s.HSPropertyAddressCluster(t.Clusters[e]))}if(t.Listings){this.listings=[];for(var r=0;r<t.Listings.length;r++)this.listings.push(new s.HSPropertyAddressItem(t.Listings[r]))}},s.HSListingsSearchResult=function(t){i.ajax.addType(this,"HSListingsSearchResult"),s.HSListingsGetByBoundingBoxResult.call(this,t)},s.HSPropertyAddressCluster=function(t,e,r,n){i.ajax.addType(this,"HSPropertyAddressCluster"),this.latitude=t.Latitude,this.longitude=t.Longitude,this.count=i.string.getNumber(t.Count),this.proportion=t.Proportion,this.polygon=t.Polygon,this.levels=t.Levels,this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.status={raw:t.Status,none:0===t.Status,isZoomCluster:1==(1&t.status)},t.Category&&(this.category=new s.HSPropertyAddressClusterCategoryEnum(t.Category)),this.colors=i.propertyAddress.getClusterColors(e,n,r)},s.HSPropertyAddressClusterCategoryEnum=function(t){i.ajax.addType(this,"HSPropertyAddressClusterCategoryEnum"),this.raw=t,this.none=0===t,this.comingSoon=1===t,this.active=2===t,this.contract=3===t,this.sold=4===t,this.openHouse=5===t,this.offMarket=6===t},s.HSTransactionTypeEnum=function(t){this.raw=t,this.none=0===t,this.forSale=1==(1&t),this.forRent=2==(2&t),this.all=3==(3&t)},s.HSListingDetail=function(t){var e,r,n,a=this;if(i.ajax.addType(this,"HSListingDetail"),this.address=i.propertyAddress.getAddress(t.FullStreetAddress,null,t.City,t.State,t.Zip),this.baths=i.propertyAddress.getBaths(t.BathsFull,t.BathsHalf),this.beds=i.propertyAddress.getBeds(t.Beds),this.closeDate=i.date.getDateInfo(t.CloseDate),this.contractDate=i.date.getDateInfo(t.ContractDate),this.currentPrice=i.propertyAddress.getPrice(t.CurrentPrice,t.TransactionType),this.days=i.string.getNumber(t.Days),this.latitude=t.Latitude,this.listDate=i.date.getDateInfo(t.ListDate),this.listingAgentFullName=t.ListingAgentFullName,this.listingBrokerName=t.ListingBrokerName,this.listingID=t.ListingID,this.longitude=t.Longitude,this.lotSize=i.propertyAddress.getLotSize(t.LotSize),this.mlsID=t.MLSID,this.model=t.Model,this.modificationTimestamp=i.date.getDateInfo(t.ModificationTimestamp),this.noImage=t.NoImage,this.offMarketDate=i.date.getDateInfo(t.OffMarketDate),this.originalPrice=i.propertyAddress.getPrice(t.OriginalPrice,t.TransactionType),this.ownership=t.Ownership,this.permissionLevel=t.PermissionLevel,this.pictures=t.Pictures,this.pictures2=t.Pictures2,this.primaryPictureUrl=t.PrimaryPictureUrl,this.propertyAddressID=t.PropertyAddressID,this.propertyAddressUrl=t.PropertyAddressUrl,this.propertyID=t.PropertyID,this.propertyStyle=t.PropertyStyle,this.propertyType=t.PropertyType,this.remarks=t.Remarks,this.sellingBrokerName=t.SellingBrokerName,this.sListingStatus=i.listing.getListingStatus(t.SListingStatus),this.sourceNumber=t.SourceNumber,this.specialFeatures=i.listing.getSpecialFeatures(t.SpecialFeatures),this.sPhotoCount=i.string.getNumber(t.SPhotoCount),this.sPropertyType2=i.propertyAddress.getSPropertyType(t.SPropertyType2),this.stories=i.string.getNumber(t.Stories),this.storiesText=t.StoriesText,this.subdivision=t.Subdivision,t.Taxes&&(this.taxes={raw:t.Taxes,string:t.TaxesText,year:t.TaxYear}),this.townhouseType=t.TownhouseType,this.transactionType=new s.HSTransactionTypeEnum(t.TransactionType),this.url=t.Url,t.WalkScore&&(this.walkScore={score:t.WalkScore,description:t.WalkScoreDescription}),this.yearBuilt=t.YearBuilt,this.yearBuiltText=t.YearBuiltText,this.unitCount=i.string.getNumber(t.UnitCount),this.metaDescription=t.MetaDescription,this.disclaimerShare=t.DisclaimerShare,this.status={raw:t.Status,isFavorited:1==(1&t.Status),isFollowed:2==(2&t.Status),canRequestTour:4==(4&t.Status),isCurrentListing:8==(8&t.Status),canCheckIn:32==(32&t.Status),canGenerateRapidCMA:64==(64&t.Status),showDaysOnHomesnap:128==(128&t.Status),canGetSimilarListings:256==(256&t.Status),obfuscateDaysOnMarket:512==(512&t.Status),belongsToMultiUnitAddress:1024==(1024&t.Status),suppressGoogleStreetView:2048==(2048&t.Status),canUpdate:4096==(4096&t.Status),suppressDaysOnMarket:8192==(8192&t.Status),canCreateStory:16384==(16384&t.Status),canBuyListingAd:32768==(32768&t.Status),preferLatLngForStreetView:65536==(65536&t.Status)},this.history=[],t.History2)for(var o=0;o<t.History2.length;o++)this.history.push(new s.HSPropertyHistoryGroup(t.History2[o]));if(this.openHouses=[],t.OpenHouses)for(var h=0;h<t.OpenHouses.length;h++)this.openHouses.push(new s.HSOpenHouseItem(t.OpenHouses[h]));if(this.details=[],t.Details)for(var u=0;u<t.Details.length;u++)this.details.push(new s.HSListingFieldGroup(t.Details[u]));if(this.schools=[],t.Schools)for(var l=0;l<t.Schools.length;l++)this.schools.push(new s.HSSchool(t.Schools[l]));if(t.AgentOnly&&(this.agentOnly=new s.HSListingAgentOnlyDetail(t.AgentOnly)),t.Brand&&(this.brand=new s.HSBrand(t.Brand)),t.LeadGen&&(this.leadGen=new s.HSLeadGen(t.LeadGen)),this.conversations=[],t.Conversations)for(var c=0;c<t.Conversations.length;c++)this.conversations.push(new s.HSConversationItem(t.Conversations[c]));this.checkIn=null,t.Teaser&&(this.teaser=new s.HSTeaserBase(t.Teaser)),!this.noImage&&this.pictures2&&this.pictures2.length&&(this.primaryImage=i.listing.getPrimaryImage(this.listingID,this.pictures2[0])),null!==(e=t.Amenities)&&void 0!==e&&e.length&&(this.amenities=[],t.Amenities.forEach(function(t){a.amenities.push(new s.HSKeyValuePair(t))})),null!==(r=t.BuildingAmenities)&&void 0!==r&&r.length&&(this.buildingAmenities=[],t.BuildingAmenities.forEach(function(t){a.buildingAmenities.push(new s.HSKeyValuePair(t))})),null!==(n=t.PropertySummary)&&void 0!==n&&n.length&&(this.propertySummary=[],t.PropertySummary.forEach(function(t){a.propertySummary.push(new s.HSListingField(t))})),t.FloorPlans&&(this.floorPlans=[],t.FloorPlans.forEach(function(t){a.floorPlans.push(new s.HSMediaItem(t))}))},s.HSPropertyAddressDetailBase=function(t){if(s.HSPropertyAddressItem.call(this,t),this.defaultParentAreaID=t.DefaultParentAreaID,this.propertyType=t.PropertyType,this.snapIDs=t.SnapIDs,this.metaDescription=t.MetaDescription,this.schools=[],t.Schools)for(var e=0;e<t.Schools.length;e++)this.schools.push(new s.HSSchool(t.Schools[e]));t.LeadGen&&(this.leadGen=new s.HSLeadGen(t.LeadGen)),this.checkIn=null,t.Teaser&&(this.teaser=new s.HSTeaserBase(t.Teaser))},s.HSPropertyAddressDetail=function(t){if(s.HSPropertyAddressDetailBase.call(this,t),this.type_="HSPropertyAddressDetail",this.propertyName=t.PropertyName,this.yearBuiltMax=t.YearBuiltMax,this.yearBuiltMin=t.YearBuiltMin,this.averageValue=i.string.getPrice(t.AverageValue),this.averageValueHigh=i.string.getPrice(t.AverageValueHigh),this.averageValueLow=i.string.getPrice(t.AverageValueLow),this.averageRent=i.string.getPrice(t.AverageRent),this.averageSqFt=i.propertyAddress.getSqFt(t.AverageSqFt),this.averageValuePerSqFt=i.string.getPrice(t.AverageValuePerSqFt),this.properties=[],t.Properties)for(var e=0;e<t.Properties.length;e++)this.properties.push(new s.HSPropertyAddressItem(t.Properties[e]));if(this.conversations=[],t.Conversations)for(var r=0;r<t.Conversations.length;r++)this.conversations.push(new s.HSConversationItem(t.Conversations[r]))},s.HSPropertyDetail=function(t){if(s.HSPropertyAddressDetailBase.call(this,t),this.rooms=i.string.getNumber(t.Rooms),this.stories=i.string.getNumber(t.Stories),this.parkingSpaces=i.string.getNumber(t.ParkingSpaces),this.taxEst=i.string.getPrice(t.TaxEst),this.value=i.string.getPrice(t.Value),this.valueLow=i.string.getPrice(t.ValueLow),this.valueHigh=i.string.getPrice(t.ValueHigh),this.valueDate=i.date.getDateInfo(t.ValueDate),this.valueConfidence=i.string.getNumber(t.ValueConfidence),this.rent=i.string.getPrice(t.Rent),this.rentLow=i.string.getPrice(t.RentLow),this.rentHigh=i.string.getPrice(t.RentHigh),this.valuePerSqFt=i.string.getPrice(t.ValuePerSqFt),this.valueYearAgo=i.string.getPrice(t.ValueYearAgo),this.rentPerSqFt=i.string.getPrice(t.RentPerSqFt),this.rentYearAgo=i.string.getPrice(t.RentYearAgo),this.valueDate=i.date.getDateInfo(t.ValueDate),this.lastSaleDate=i.date.getDateInfo(t.LastSaleDate),this.lastSalePrice=i.string.getPrice(t.LastSalePrice),this.homeScore=i.string.getNumber(t.HomeScore),this.homeScoreDescription=t.HomeScoreDescription,this.investorScore=i.string.getNumber(t.InvestorScore),this.investorScoreDescription=t.InvestorScoreDescription,this.sourceID=t.SourceID,this.fireplaces=i.string.getNumber(t.Fireplaces),this.fireplaceType=t.FireplaceType,this.storiesType=t.StoriesType,this.construction=t.Construction,this.parking=t.Parking,this.pool=t.Pool,this.style=t.Style,this.exterior=t.Exterior,this.foundation=t.Foundation,this.heating=t.Heating,this.ac=t.AC,this.elevator=t.Elevator,this.basement=t.Basement,this.addressName=t.AddressName,this.addressStories=i.string.getNumber(t.AddressStories),this.addressPropertyCount=i.string.getNumber(t.AddressPropertyCount),this.mappedSPropertyType=t.MappedSPropertyType,this.metaDescription=t.MetaDescription,t.HomeValuesChartURL&&(this.homeValuesChartURL=i.propertyAddress.getGraphImage(t.HomeValuesChartURL)),t.RentsChartURL&&(this.rentsChartURL=i.propertyAddress.getGraphImage(t.RentsChartURL)),this.homeValues=[],t.HomeValues)for(var e=0;e<t.HomeValues.length;e++)this.homeValues.push(i.string.getPrice(t.HomeValues[e]));if(this.rents=[],t.Rents)for(var r=0;r<t.Rents.length;r++)this.rents.push(i.string.getPrice(t.Rents[r]));if(this.history=[],t.History2)for(var n=0;n<t.History2.length;n++)this.history.push(new s.HSPropertyHistoryGroup(t.History2[n]));if(this.conversations=[],t.Conversations)for(var a=0;a<t.Conversations.length;a++)this.conversations.push(new s.HSConversationItem(t.Conversations[a]));t.RentYearAgo&&t.Rent&&(this.rentPercentChange=i.string.getPercentChange(t.Rent,t.RentYearAgo)),t.Value&&t.ValueYearAgo&&(this.valuePercentChange=i.string.getPercentChange(t.Value,t.ValueYearAgo))},s.HSPropertyHistoryGroup=function(t){if(this.listingID=t.ListingID,this.sourceNumber=t.SourceNumber,this.transactionType=t.TransactionType,this.callToAction=t.CallToAction,this.url=t.Url,this.status={raw:t.Status,isCurrentListing:1==(1&t.Status),currentUserCanViewListing:2==(2&t.Status),isPartialHistory:4==(4&t.Status)},this.items=[],t.Items)for(var e=0;e<t.Items.length;e++)this.items.push(new s.HSPropertyHistoryItem(t.Items[e],this.transactionType.raw))},s.HSPropertyHistoryItem=function(t,e){this.listingID=t.ListingID,this.date=i.date.getDateInfo(t.Date),this.price=i.propertyAddress.getPrice(t.Price,e),this.previousPrice=i.propertyAddress.getPrice(t.PreviousPrice,e),this.event=t.Event,this.updateTypeID=t.UpdateTypeID,this.status={raw:t.Status,none:0===t.Status,relatedToCurrentListing:1==(1&t.Status),currentListingPrimaryEvent:2==(2&t.Status),fromTaxRecords:4==(4&t.Status)}},s.HSListingFieldGroup=function(t){if(this.name=t.Name,this.status={raw:t.Status,none:0===t.Status,isKeyGroup:1==(1&t.Status)},this.fields=[],t.Fields)for(var e=0;e<t.Fields.length;e++)this.fields.push(new s.HSListingField(t.Fields[e]))},s.HSListingField=function(t){if(this.name=t.Name,this.systemName=t.SystemName,this.value=t.Value,this.defaultValue=t.DefaultValue,this.originalValue=t.OriginalValue,this.valueDisplay=t.ValueDisplay,this.dataType={raw:t.DataType,unknown:0===t.DataType,zipcode:1===t.DataType,currency:2===t.DataType,date:3===t.DataType,time:4===t.DataType,dateTime:5===t.DataType,boolean:6===t.DataType,int:7===t.DataType,string:8===t.DataType,image:9===t.DataType,mlsAgent:10===t.DataType,mlsOffice:11===t.DataType,email:12===t.DataType,phone:13===t.DataType,url:14===t.DataType,address:15===t.DataType,lookup:16===t.DataType,lookupMultiple:17===t.DataType},this.lookupValues=[],t.LookupValues)for(var e=0;e<t.LookupValues.length;e++)this.lookupValues.push(new s.HSListingFieldLookupValue(t.LookupValues[e]));this.maximumLength=t.MaximumLength,this.maximumValue=t.MaximumValue,this.minimumValue=t.MinimumValue,this.errorText=t.ErrorText,this.status={raw:t.Status,none:0===t.Status,isPhone:1==(1&t.Status),isEmail:2==(2&t.Status),isURL:4==(4&t.Status),isAddress:8==(8&t.Status),isObfuscated:16==(16&t.Status)},this.dataType&&this.dataType.url&&(/^(?:https?:\/)?\//i.test(this.value)||(this.value="http://"+this.value))},s.HSListingField.prototype.getRaw=function(){for(var t={name:this.name,systemName:this.systemName,value:this.value,defaultValue:this.defaultValue,originalValue:this.originalValue,dataType:this.dataType.raw,lookupValues:[],maximumLength:this.maximumLength,maximumValue:this.maximumValue,minimumValue:this.minimumValue,errorText:this.errorText,status:this.status.raw},e=0;e<this.lookupValues.length;e++)t.lookupValues.push(this.lookupValues[e].getRaw());return t},s.HSListingFieldLookupValue=function(t){this.name=t.Name,this.systemName=t.SystemName,this.value=t.Value,this.status={raw:t.Status,none:0===t.Status}},s.HSListingFieldLookupValue.prototype.getRaw=function(){return{name:this.name,systemName:this.systemName,value:this.value,status:this.status.raw}},s.HSListingAgentOnlyDetail=function(t){if(this.remarks=t.Remarks,this.status={raw:t.Status,currentUserIsListingAgent:1==(1&t.Status),listingIsProtected:2==(2&t.Status),currentUserIsSellingAgent:4==(4&t.Status),checkForShowingUrl:8==(8&t.Status)},this.agents=[],t.Agents)for(var e=0;e<t.Agents.length;e++)this.agents.push(new s.HSListingRelatedAgent(t.Agents[e]));if(this.details=[],t.Details)for(var i=0;i<t.Details.length;i++)this.details.push(new s.HSListingFieldGroup(t.Details[i]))},s.HSListingRelatedAgentRoleEnum=function(t){return{raw:t,none:0===t,listingAgent:1==(1&t),sellingAgent:2==(2&t),altListingAgent:4==(4&t),showingContact:8==(8&t),altSellingAgent:16==(16&t),bothSides:3==(3&t)}},s.HSListingRelatedAgent=function(t){i.ajax.addType(this,"HSListingRelatedAgent"),t.Role&&(this.role=new s.HSListingRelatedAgentRoleEnum(t.Role)),t.DisplayRole&&(this.displayRole=new s.HSListingRelatedAgentRoleEnum(t.DisplayRole)),this.status={raw:t.Status,showWithMessageTextBox:1==(1&t.Status),displayAsCoAgent:2==(2&t.Status)},
t.Agent&&(this.agent=new s.HSUserDetails(t.Agent))},s.HSPropertyRelatedAgentItem=function(t){if(this.sListingStatus=t.SListingStatus,t.Agents){this.agents=[];for(var e=0;e<t.Agents.length;e++)this.agents.push(new s.HSUserItem(t.Agents[e]))}this.status={raw:t.Status,none:0===t.Status},t.DateTimeStamp&&(this.dateTimeStamp=i.date.getDateInfo(t.DateTimeStamp)),t.TransactionType&&(this.transactionType=new s.HSTransactionTypeEnum(t.TransactionType)),this.propertyStatus=i.listing.getPropertyStatus(this.sListingStatus,this.transactionType.raw)},s.HSListingCourtesyOf=function(t){i.ajax.addType(this,"HSListingCourtesyOf"),this.disclaimer=t.Disclaimer,this.status=new s.HSListingCourtesyOfStatusEnum(t.Status),t.ListingAgent&&(this.listingAgent=new s.HSUserItem(t.ListingAgent)),t.ListingOffice&&(this.listingOffice=new s.HSAgentOfficeItem(t.ListingOffice))},s.HSListingCourtesyOfStatusEnum=function(t){return{raw:t,none:0===t,showListingAgentLicense:1==(1&t),showListingOfficeStreetAddress:2==(2&t),showListingOfficePhone:4==(4&t),showListingAgent:8==(8&t),showListingOffice:16==(16&t),showListingOfficeCityStateZip:32==(32&t),showDisclaimer:64==(64&t),showLastChanged:128==(128&t)}},s.HSGetShowingUrlResult=function(t){i.ajax.addType(this,"HSGetShowingUrlResult"),this.errorCode=t.ErrorCode,this.url=t.Url,this.status={raw:t.Status,none:0===t.Status,demoMode:1==(1&t.Status)},t.Brand&&(this.brand=new s.HSBrand(t.Brand))},s.HSSchool=function(t){if(this.type_="HSSchool",this.id=t.ID,this.name=t.Name,this.urlName=t.URLName,this.url="/schools"+this.urlName,this.address=i.propertyAddress.getAddress(t.FullStreetAddress,null,t.City,t.State,t.Zip),this.rating=i.string.getNumber(t.Rating),this.latitude=t.Latitude,this.longitude=t.Longitude,this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.status={raw:t.Status},this.gradeRange=t.GradeRange,this.zones=[],t.Zones){for(var e=0;e<t.Zones.length;e++)this.zones.push(new s.HSSchoolZone(t.Zones[e]));this.zones&&this.zones[0]&&(this.hasPolygon=!0,this.polygonUrl="/homes/p_26,"+this.id.toString())}t.District&&(this.district=new s.HSSchoolDistrict(t.District)),this.phone=i.string.getPhoneNumber(t.Phone),this.level=t.Level2,this.levelName=t.Level,this.teacherCount=i.string.getNumber(t.TeacherCount),this.studentCount=i.string.getNumber(t.StudentCount),this.studentTeacherRatio=i.string.getNumber(t.StudentTeacherRatio),this.expenditurePerStudentTotal=i.string.getPrice(t.ExpenditurePerStudentTotal),t.Ethnicity&&(this.ethnicity=new s.HSPopulation(t.Ethnicity)),t.FreeLunches&&(this.freeLunches=new s.HSPopulation(t.FreeLunches)),t.StudentsByGrade&&(this.studentsByGrade=new s.HSPopulation(t.StudentsByGrade)),t.Expenditures&&(this.expenditures=new s.HSPopulation(t.Expenditures))},s.HSSchoolRelated=function(t){if(this.from=[],t.From)for(var e=0;e<t.From.length;e++)this.from.push(new s.HSSchool(t.From[e]));if(this.to=[],t.To)for(var i=0;i<t.To.length;i++)this.to.push(new s.HSSchool(t.To[i]));if(this.elementary=[],t.Elementary)for(var r=0;r<t.Elementary.length;r++)this.elementary.push(new s.HSSchool(t.Elementary[r]));if(this.middle=[],t.Middle)for(var n=0;n<t.Middle.length;n++)this.middle.push(new s.HSSchool(t.Middle[n]));if(this.high=[],t.High)for(var a=0;a<t.High.length;a++)this.high.push(new s.HSSchool(t.High[a]))},s.HSPopulation=function(t){if(this.total=i.string.getNumber(t.Total),this.groups=[],t.Groups)for(var e=0;e<t.Groups.length;e++)this.groups.push(new s.HSPopulationGroup(t.Groups[e]))},s.HSPopulationGroup=function(t){this.name=t.Name,this.count=i.string.getNumber(t.Count)},s.HSSchoolZone=function(t){this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.polygon=t.Polygon,this.levels=t.Levels},s.HSSchoolDistrictItem=function(t){this.id=t.ID,this.name=t.Name,this.urlName=t.URLName},s.HSSchoolDistrict=function(t){this.type_="HSSchoolDistrict",this.id=t.ID,this.name=t.Name,this.urlName=t.URLName,this.url="/schools-districts"+this.urlName,this.address=i.propertyAddress.getAddress(t.FullStreetAddress,null,t.City,t.State,t.Zip),this.phone=i.string.getPhoneNumber(t.Phone),this.website=t.Website,this.gradeRange=t.GradeRange,this.schoolCount=i.string.getNumber(t.SchoolCount),this.teacherCount=i.string.getNumber(t.TeacherCount),this.studentCount=i.string.getNumber(t.StudentCount),this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.polygon=t.Polygon,this.status={raw:t.Status},t.DistributionOfTeachers&&(this.distributionOfTeachers=new s.HSPopulation(t.DistributionOfTeachers)),t.Expenditures&&(this.expenditures=new s.HSPopulation(t.Expenditures)),t.Languages&&(this.languages=new s.HSPopulation(t.Languages))},s.HSBrand=function(t){this.id=t.ID,this.name=t.Name,this.primaryColor=t.PrimaryColor,this.primaryColorComplement=t.PrimaryColorComplement,this.primaryColorDark=t.PrimaryColorDark,this.primaryColorLight=t.PrimaryColorLight,this.secondaryColor=t.SecondaryColor,this.status={raw:t.Status,none:0===t.Status,hasPhoto:1==(1&t.Status),hasDarkBackgroundPhoto:2==(2&t.Status),usePoweredByIntroText:4==(4&t.Status),isForCurrentUserOnly:8==(8&t.Status),doNotUseInEmails:16==(16&t.Status),hideLeadsFromAgents:32==(32&t.Status),hideIntroText:64==(64&t.Status)},this.brandType={raw:t.BrandType,unknown:0===t.BrandType,mls:1===t.BrandType,brokerage:1===t.BrandType,team:3===t.BrandType},this.image=i.brand.getImage(t.ID,t.AspectRatio,this.status.hasDarkBackgroundPhoto)},s.HSLeadGen=function(t){if(this.title=t.Title,this.defaultFormText=t.DefaultFormText,this.status={raw:t.Status,none:0===t.Status,userMustEnterName:1==(1&t.Status),userMustEnterEmail:2==(2&t.Status),userMustEnterPhone:4==(4&t.Status)},this.agents=[],t.Agents)for(var e=0;e<t.Agents.length;e++)this.agents.push(new s.HSLeadGenAgent(t.Agents[e]));t.Company&&(this.company=new s.HSLeadGenCompany(t.Company))},s.HSLeadGenAgent=function(t){this.snapCountInArea=i.string.getNumber(t.SnapCountInArea),this.status={raw:t.Status,none:0===t.Status,listingAgent:1==(1&t.Status),connectedAgent:4==(4&t.Status),promoted:8==(8&t.Status)},t.Agent&&(this.agent=new s.HSUserDetails(t.Agent))},s.HSLeadGenCompany=function(t){this.entityType=t.EntityType,this.entityID=t.EntityID,this.name=t.Name,this.subhead=t.Subhead,this.phone=i.string.getPhoneNumber(t.Phone),this.email=t.Email,this.status={raw:t.Status,none:0===t.Status},t.Brand&&(this.brand=new s.HSBrand(t.Brand))},s.HSAgentRequestResult=function(t){this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,nameRequired:2===t.ErrorCode,emailRequired:3===t.ErrorCode,phoneRequired:4===t.ErrorCode,emailExists:5===t.ErrorCode},this.requestID=t.RequestID,this.userID=t.RequestID},s.HSConversationItem=function(t){if(this.type_="HSConversationItem",this.conversationID=t.ConversationID,this.membersSHA1=t.MembersSHA1,this.createTimestamp=i.conversation.getDate(t.CreateTimestamp),this.modifiedTimestamp=i.conversation.getDate(t.ModifiedTimestamp),this.unreadMessageCount=i.string.getNumber(t.UnreadMessageCount),this.status={raw:t.Status,none:0===t.Status,firstMessageID:1==(1&t.Status),moreThanTwoMembers:2==(2&t.Status),hasNewMessages:4==(4&t.Status)},t.Members){this.members=[];for(var e=0;e<t.Members.length;e++)this.members.push(new s.HSEntityItem(t.Members[e]))}this.firstMessageID=t.FirstMessageID,t.RecentMessage&&(this.recentMessage=new s.HSConversationMessageItem(t.RecentMessage))},s.HSConversationMessageItem=function(t,e){if(i.ajax.addType(this,"HSConversationMessageItem"),this.id=t.ID,this.conversationID=t.ConversationID,this.entityType=t.EntityType,this.entityID=t.EntityID,this.createTimestamp=i.conversation.getDate(t.CreateTimestamp),this.readTimestamp=i.conversation.getDate(t.ReadTimestamp),t.Text&&(this.text=t.Text),t.ActionType&&(this.actionType=t.ActionType),this.status={raw:t.Status,none:0===t.Status,delivered:1==(1&t.Status),read:2==(2&t.Status),pending:4==(4&t.Status),systemMessage:8==(8&t.Status),doNotRenderProcessedURL:16==(16&t.Status)},!e)switch(i.ajax.getHSType(t.__type)){case"HSConversationMessageTextItem":s.HSConversationMessageTextItem.call(this,t,!0);break;case"HSConversationMessagePropertyAddressItem":s.HSConversationMessagePropertyAddressItem.call(this,t,!0);break;case"HSConversationMessageImageItem":s.HSConversationMessageImageItem.call(this,t,!0);break;case"HSConversationMessageEntityItem":s.HSConversationMessageEntityItem.call(this,t,!0);break;case"HSConversationMessageActionItem":s.HSConversationMessageActionItem.call(this,t,!0)}},s.HSConversationMessageTextItem=function(t,e){e||s.HSConversationMessageItem.call(this,t,!0),i.ajax.addType(this,"HSConversationMessageTextItem")},s.HSConversationMessagePropertyAddressItem=function(t,e){e||s.HSConversationMessageItem.call(this,t,!0),i.ajax.addType(this,"HSConversationMessagePropertyAddressItem"),t.PropertyAddress&&(this.propertyAddress=new s.HSPropertyAddressItem(t.PropertyAddress))},s.HSConversationMessageImageItem=function(t,e){if(e||s.HSConversationMessageItem.call(this,t,!0),i.ajax.addType(this,"HSConversationMessageImageItem"),this.accessToken=t.AccessToken,this.originalImageWidth=t.OriginalImageWidth,this.originalImageHeight=t.OriginalImageHeight,this.accessToken){var r="//s3.amazonaws.com/homesnap.messages/";r+=i.string.reverse(this.id.toString())+"_",this.image={small:r+this.accessToken+"_192.jpg",medium:r+this.accessToken+"_576.jpg",original:r+this.accessToken+"_original.jpg"}}},s.HSConversationMessageEntityItem=function(t,e){e||s.HSConversationMessageItem.call(this,t,!0),i.ajax.addType(this,"HSConversationMessageEntityItem"),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSConversationMessageActionItem=function(t,e){e||s.HSConversationMessageItem.call(this,t,!0),i.ajax.addType(this,"HSConversationMessageActionItem")},s.HSConversationAddMessageResult=function(t){this.messageID=t.MessageID,this.createTimestamp=i.date.getDateInfo(t.CreateTimestamp),this.success=t.Success},s.HSEntityItem=function(t,e){if(i.ajax.addType(this,"HSEntityItem"),this.entityType=t.EntityType,this.entityID=t.EntityID,!e)switch(i.ajax.getHSType(t.__type)){case"HSUserItem":s.HSUserItem.call(this,t,!0);break;case"HSBotItem":s.HSBotItem.call(this,t,!0);break;case"HSBrokerage":s.HSBrokerage.call(this,t,!0);break;case"HSPointOfInterest":s.HSPointOfInterest.call(this,t,!0)}},s.HSConversationCreateResult=function(t){t.ConversationItem&&(this.conversationItem=new s.HSConversationItem(t.ConversationItem)),this.isNew=t.IsNew,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.UnknownError,notEnoughParticipants:2===t.NotEnoughParticipants,disallowedToSendMessages:3===t.DisallowedToSendMessages,tooManyParticipants:4===t.TooManyParticipants},this.errorText=t.ErrorText},s.IUserProfileImage=function(t){try{(t.profileImage||t.name&&t.name.initials)&&(t.types_=t.types_||[],t.types_.push("IUserProfileImage"))}catch(t){}return t},s.IUserItem=function(t){try{t.name&&(t.profileImage||t.name.initials)&&t.name.full&&(t.types_=t.types_||[],t.types_.push("IUserItem"))}catch(t){}return t},s.HSBotItem=function(t,e){e||s.HSEntityItem.call(this,t,!0),i.ajax.addType(this,"HSBotItem"),this.name=i.user.getName("Homesnap","Bot"),this.status={raw:t.Status,none:0===t.Status},s.IUserItem(this),s.IUserProfileImage(this)},s.HSUserItem=function(t,e){if(e||s.HSEntityItem.call(this,t,!0),i.ajax.addType(this,"HSUserItem"),this.userID=t.UserID,!this.userID||this.entityType&&this.entityID||(this.entityType=2,this.entityID=this.userID),this.facebookID=t.FacebookID2||t.FacebookID,this.twitterID=t.TwitterID,this.name=i.user.getName(t.FirstName,t.LastName,t.FullName),this.email=t.Email,t.Emails){this.emails=[];for(var r=0;r<t.Emails.length;r++)this.emails.push(new s.HSEmail(t.Emails[r]))}if(t.Phones){this.phones=[];for(var n=0;n<t.Phones.length;n++)this.phones.push(new s.HSPhone(t.Phones[n]))}this.backgroundID=t.BackgroundID||0,this.urlName=t.UrlName,this.status={raw:t.Status,none:0===t.Status,hasPhoto:1==(1&t.Status),isAdmin:2==(2&t.Status),hasAutogeneratedPassword:4==(4&t.Status),hasNotConfirmedAccount:16==(16&t.Status),isObfuscated:32==(32&t.Status),doesNotHaveProfile:64==(64&t.Status),cannotUpdateName:128==(128&t.Status),phoneSupportsSMS:256==(256&t.Status),hasNotBeenAskedForPreferredAreas:512==(512&t.Status),isFavorited:2048==(2048&t.Status)},this.relationState={raw:t.RelationState,none:0===t.RelationState,pendingFrom:1===t.RelationState,pendingTo:2===t.RelationState,active:3===t.RelationState},this.relationType={raw:t.RelationType,self:0===t.RelationType,friend:1===t.RelationType,agent:2===t.RelationType,client:3===t.RelationType,follower:4===t.RelationType,followee:5===t.RelationType},t.Brand&&(this.brand=new s.HSBrand(t.Brand)),t.Counts&&(this.counts=new s.HSUserCounts(t.Counts)),t.AgentRole&&(this.agentRole=new s.HSListingRelatedAgentRoleEnum(t.AgentRole)),this.photoVersion=t.PhotoVersion,this.status.hasPhoto&&(this.profileImage=i.user.getProfileImage(this.userID,this.photoVersion)),this.profileUrl=i.user.getProfileURL(this.urlName,this.userID||this.entityID,this.entityType),(this.backgroundID||0===this.backgroundID)&&(this.backgroundImageUrl=i.user.getBackgroundImageURL(this.backgroundID)),t.AgentDetails&&(this.agentDetails=new s.HSUserAgentDetails(t.AgentDetails)),this.type=new s.HSUserItemTypeEnum(t.Type),this.entityGuid=t.EntityGuid,t.Address&&(this.address=new s.HSPostalItem(t.Address)),t.Tags&&(this.tags=new s.HSUserTagsEnum(t.Tags)),this.fullName=t.FullName,s.IUserItem(this),s.IUserProfileImage(this)},s.HSUserItemTypeEnum=function(t){this.raw=t,this.none=0==(0&t),this.corporation=1==(1&t),this.buyer=2==(2&t),this.seller=4==(4&t),this.borrower=8==(8&t),this.lender=16==(16&t)},s.HSUserDetails=function(t){var e=this;s.HSUserItem.call(this,t),i.ajax.addType(this,"HSUserDetails"),this.userName=t.UserName,this.phone=i.string.getPhoneNumber(t.Phone,t.PhoneExt),this.alternatePhotoUrl=t.AlternatePhotoUrl,this.hash=t.Hash,this.permissions={raw:t.Permissions,none:0===t.Permissions,agent:1==(1&t.Permissions),homeSnapAdminTools:16==(16&t.Permissions),canAccessBrokerReports:32==(32&t.Permissions),canAccessBrandReports:64==(64&t.Permissions),proInSameMLS:128==(128&t.Permissions),mlsAgent:256==(256&t.Permissions),paidAgent:512==(512&t.Permissions),mlsExecutive:1024==(1024&t.Permissions)};var r=t.RegistrationStatus||0;if(this.registrationStatus={raw:r,notRegistered:0===r,notVerified:1===r,registered:2===r},t.AgentDetails&&(this.agentDetails=new s.HSUserAgentDetails(t.AgentDetails)),t.CurrentDetails&&(this.currentDetails=new s.HSUserCurrentDetails(t.CurrentDetails)),t.ClientDetails&&(this.clientDetails=new s.HSUserClientDetails(t.ClientDetails)),t.LeadGen&&(this.leadGen=new s.HSLeadGen(t.LeadGen)),null!==t.MLSRole&&(this.MLSRole=new s.HSMLSRole(t.MLSRole)),this.uiSections=[],t.UISections){this.uiSections.raw=[];for(var n=0;n<t.UISections.length;n++)this.uiSections.raw.push(t.UISections[n]);this.uiSections={headerImage:t.UISections.indexOf(1)>=0,headerMiniImage:t.UISections.indexOf(2)>=0,headerUploadImage:t.UISections.indexOf(3)>=0,headerSettings:t.UISections.indexOf(4)>=0,headerEditProfile:t.UISections.indexOf(5)>=0,headerBrokerName:t.UISections.indexOf(6)>=0,headerContactInfo:t.UISections.indexOf(7)>=0,headerOfficeInfo:t.UISections.indexOf(8)>=0,headerChangeWallpaper:t.UISections.indexOf(9)>=0,activityConversations:t.UISections.indexOf(100)>=0,activitySnapCount:t.UISections.indexOf(101)>=0,activityFavoriteCount:t.UISections.indexOf(102)>=0,activityFriendCount:t.UISections.indexOf(103)>=0,activityClientCount:t.UISections.indexOf(104)>=0,activityRecentFavorites:t.UISections.indexOf(105)>=0,activityRecentSnaps:t.UISections.indexOf(106)>=0,activityRecentHomes:t.UISections.indexOf(107)>=0,actionInviteClient:t.UISections.indexOf(200)>=0,actionAddClient:t.UISections.indexOf(201)>=0,actionAddFriend:t.UISections.indexOf(202)>=0,actionAcceptOrIgnoreAgent:t.UISections.indexOf(203)>=0,actionAcceptOrIgnoreClient:t.UISections.indexOf(204)>=0,actionAcceptOrIgnoreFriend:t.UISections.indexOf(205)>=0,actionRemoveAgent:t.UISections.indexOf(206)>=0,aActionRemoveClient:t.UISections.indexOf(207)>=0,actionRemoveFriend:t.UISections.indexOf(208)>=0,actionLeadGen:t.UISections.indexOf(209)>=0,actionInviteAgent:t.UISections.indexOf(210)>=0,actionFavoriteAgent:t.UISections.indexOf(211)>=0,actionAddMLSAgent:t.UISections.indexOf(212)>=0,actionEditMLSAgents:t.UISections.indexOf(213)>=0,actionInviteFriends:t.UISections.indexOf(214)>=0,actionMessageUser:t.UISections.indexOf(215)>=0,actionAddAgent:t.UISections.indexOf(216)>=0,actionPromoteListingAds:t.UISections.indexOf(217)>=0,mlsDataDealFlow:t.UISections.indexOf(300)>=0,mlsDataDealFlowTease:t.UISections.indexOf(301)>=0,mlsDataDealFlowEmpty:t.UISections.indexOf(302)>=0,mlsDataProduction:t.UISections.indexOf(303)>=0,mlsDataProductionTease:t.UISections.indexOf(304)>=0,mlsDataProductionEmpty:t.UISections.indexOf(305)>=0,mlsDataConnections:t.UISections.indexOf(306)>=0,mlsDataConnectionsTease:t.UISections.indexOf(307)>=0,mlsDataConnectionsEmpty:t.UISections.indexOf(308)>=0,peopleCallGetSocialMediaAccounts:t.UISections.indexOf(400)>=0,peopleShowContactInfoEnhanced:t.UISections.indexOf(402)>=0,peopleShowRelatedHomes:t.UISections.indexOf(403)>=0,peopleCallGetDisclaimer:t.UISections.indexOf(404)>=0}}if(this.conversations=[],t.Conversations)for(var a=0;a<t.Conversations.length;a++)this.conversations.push(new s.HSConversationItem(t.Conversations[a]));if(t.DemographicDetails)for(var o in t.DemographicDetails)if(null!==t.DemographicDetails[o]){this.demographicDetails=new s.HSUserDemographicDetails(t.DemographicDetails);break}t.ComplianceLinks&&(this.complianceLinks=[],t.ComplianceLinks.forEach(function(t){e.complianceLinks.push(new s.HSAgentWebsiteComplianceLink(t))}))},s.HSUserDemographicDetails=function(t){i.ajax.addType(this,"HSUserDemographicDetails"),this.age=t.Age,t.DateOfBirth&&(this.dateOfBirth=i.date.getDateInfo(t.DateOfBirth)),this.gender=t.Gender,this.estimatedIncome=t.EstimatedIncome,this.education=t.Education,this.isVeteran=t.IsVeteran,this.maritalStatus=t.MaritalStatus,this.children=t.Children,this.childrenAge=t.ChildrenAge},s.HSUserTagsEnum=function(t){this.raw=t,this.none=0===t,this.homeOwner=1===t,this.likelySeller=2===t,this.likelyBuyer=4===t,this.hasAgent=8===t,this.homesnapUser=16===t},s.HSUserDisclaimer=function(t){this.disclaimer1=t.Disclaimer1,this.status=new s.HSSUserDisclaimerStatusEnum(t.Status)},s.HSSUserDisclaimerStatusEnum=function(t){this.raw=t,this.none=0===t,this.showDisclaimer1=1===t},s.HSEmail=function(t){this.type={raw:t.Type,unknown:0===t.Type,home:1===t.Type,work:2===t.Type,other:3===t.Type},this.type2=new s.HSEmailType2Enum(t.Type2),this.email=t.Email},s.HSPhone=function(t){this.type={raw:t.Type,unknown:0===t.Type,home:1===t.Type,work:2===t.Type,other:3===t.Type,cell:4===t.Type,preferred:5===t.Type},this.type2=new s.HSPhoneType2Enum(t.Type2),this.phone=i.string.getPhoneNumber(t.Phone,t.PhoneExt),t.PhoneExt&&(this.phoneExt=t.PhoneExt),t.Status&&(this.status=new s.HSPhoneStatusEnum(t.Status))},s.HSPostalItem=function(t){this.fullStreetAddress=t.FullStreetAddress,this.unitNumber=t.UnitNumber,this.city=t.City,this.state=t.State,this.zip=t.Zip,this.isCurrentResident=t.IsCurrentResident,t.PropertyRelation&&(this.propertyRelation=new s.HSUserPropertyRelationTypeEnum(t.PropertyRelation)),this.formattedAddress=i.propertyAddress.getAddress(t.FullStreetAddress,t.UnitNumber,t.City,t.State,t.Zip)},s.HSUserPropertyRelationTypeEnum=function(t){this.raw=t,this.unknown=0==(0&t),this.owner=1==(1&t),this.occupant=2==(2&t)},s.HSEmailType2Enum=function(t){this.raw=t,this.unknown=0==(0&t),this.preferred=1==(1&t),this.business=2==(2&t),this.personal=4==(4&t),this.other=128==(128&t)},s.HSPhoneType2Enum=function(t){this.raw=t,this.unknown=0==(0&t),this.preferred=1==(1&t),this.business=2==(2&t),this.personal=4==(4&t),this.mobile=8==(8&t),this.landline=16==(16&t),this.voip=32==(32&t),this.other=128==(128&t)},s.HSPropertyRelatedUserItem=function(t){i.ajax.addType(this,"HSPropertyRelatedUserItem"),this.isCurrentResident=t.IsCurrentResident,t.UserItem&&(this.userItem=new s.HSUserItem(t.UserItem)),t.RelationType&&(this.relationType=new s.HSUserPropertyRelationTypeEnum(t.RelationType))},s.HSUserClientDetails=function(t){i.ajax.addType(this,"HSUserClientDetails"),t.Agent&&(this.agent=new s.HSUserDetails(t.Agent))},s.HSUserCurrentDetails=function(t){if(this.email=t.Email,this.phone=i.string.getPhoneNumber(t.Phone,t.PhoneExt),this.hash=t.Hash,this.listingAdsURL=t.ListingAdsURL,this.listingAdsDashboardURL=t.ListingAdsDashboardURL,this.adsAccess={raw:t.AdsAccess,none:0===t.AdsAccess,showTeaser:1==(1&t.AdsAccess),canOrder:2==(2&t.AdsAccess)},this.preferences={raw:t.Preferences,none:0===t.Preferences,includePhotoSnapsInStream:1==(1&t.Preferences),postSnapsToFacebook:2==(2&t.Preferences),sendNotificationsViaEmail:4==(4&t.Preferences),sendAlertsViaEmail:8==(8&t.Preferences),sendAgentWeeklyReportsViaEmail:16==(16&t.Preferences),sendUserWeeklyReportsViaEmail:32==(32&t.Preferences)},this.pendingValidationItems=[],t.PendingValidationItems)for(var e=0;e<t.PendingValidationItems.length;e++)this.pendingValidationItems.push(new s.HSUserValidationItem(t.PendingValidationItems[e]));this.clientAppType={},t.ClientAppType&&(this.clientAppType={raw:t.ClientAppType,none:0===t.ClientAppType,web:1==(1&t.ClientAppType),mobile:2==(2&t.ClientAppType),iPhoneSawbuck:4==(4&t.ClientAppType),iPhoneHomeSnap:8==(8&t.ClientAppType),iPadHomeSnap:16==(16&t.ClientAppType),androidHomeSnap:32==(32&t.ClientAppType),sms:64==(64&t.ClientAppType),email:128==(128&t.ClientAppType)},this.clientAppType.isAppUser=this.clientAppType.iPhoneHomeSnap||this.clientAppType.iPadHomeSnap||this.clientAppType.androidHomeSnap),this.status={raw:t.Status,none:0===t.Status,hasRunningListingAd:1==(1&t.Status),hasRunningSubscriptionAd:2==(2&t.Status),canBuyListingAd:4==(4&t.Status),hasMLSContacts:8==(8&t.Status),hasBlackKnightSavedSearchesAndListingCarts:16==(16&t.Status),canSearchComingSoon:32==(32&t.Status),hasRunningProPlusSubscription:64==(64&t.Status)},t.Products&&(this.products=new s.HSUserProducts(t.Products))},s.HSUserValidationItem=function(t){this.type_="HSUserValidationItem",this.id=t.ID,this.entityType=t.EntityType,this.entityID=t.EntityID,this.entityField=t.EntityField,this.deliveryMethod={raw:t.DeliveryMethod,none:0===t.DeliveryMethod,email:1===t.DeliveryMethod,phoneForSMS:2===t.DeliveryMethod,phoneToCall:3===t.DeliveryMethod},this.text=t.Text,this.status={raw:t.Status,none:0===t.Status,deobfuscationRequired:1==(1&t.Status),verificationIsNotRequired:2==(2&t.Status),hasPinCode:4==(4&t.Status)}},s.HSUserCounts=function(t){this.snaps=i.string.getNumber(t.Snaps),this.favorites=i.string.getNumber(t.Favorites),this.friends=i.string.getNumber(t.Friends),this.clients=i.string.getNumber(t.Clients)},s.HSUserAgentDetails=function(t){i.ajax.addType(this,"HSUserAgentDetails"),this.mlsID=t.MLSID,this.mls=t.MLS,this.brokerage=t.Brokerage,this.tagline=t.Tagline,this.dealsClosed=i.string.getNumber(t.DealsClosed),this.agentSince=t.AgentSince,this.statement=t.Statement,this.urlName=t.URLName,this.averageRating=i.string.getNumber(t.AverageRating),this.reviewCount=i.string.getNumber(t.ReviewCount),this.adsAnonymousHash=t.AdsAnonymousHash,this.license=t.License,this.status={raw:t.Status,none:0===t.Status,isFavorited:1==(1&t.Status),isActive:2==(2&t.Status),hasNotBeenSolicited:4==(4&t.Status),cannotUpdateBrokerage:8==(8&t.Status),goldCheckMark:16==(16&t.Status),isAgentMemberofBrandMLS:32==(32&t.Status)},t.Office&&(this.office=new s.HSAgentOfficeItem(t.Office)),t.Activity&&(this.activity=new s.HSUserAgentActivity(t.Activity)),t.Production&&(this.production=new s.HSBrokerReportProduction(t.Production)),t.MLSDetails&&(this.mlsDetails=new s.HSMlsItem(t.MLSDetails)),t.BrokerageDetails&&(this.brokerageDetails=new s.HSBrokerage(t.BrokerageDetails)),t.ConsumerViewDisplayPhone&&(this.consumerViewDisplayPhone=new s.HSPhone(t.ConsumerViewDisplayPhone)),t.DoingBusinessAs&&(this.doingBusinessAs=t.DoingBusinessAs),t.DisplayAddress&&(this.displayAddress=i.propertyAddress.getAddress(t.DisplayAddress.FullStreetAddress,null,t.DisplayAddress.City,t.DisplayAddress.State,t.DisplayAddress.Zip)),t.DisplayPhone&&(this.displayPhone=i.string.getPhoneNumber(t.DisplayPhone.Phone,t.DisplayPhone.PhoneExt)),t.AgentDisplayName&&(this.agentDisplayName=t.AgentDisplayName),t.MLSAgentFullName&&(this.mlsAgentFullName=t.MLSAgentFullName),t.MLSAgentPhoneExt&&(this.mlsAgentPhoneExt=t.MLSAgentPhoneExt)},s.HSUsersUpdateProfilePhotoResult=function(t){this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,permissionDenied:3===t.ErrorCode},this.errorText=t.ErrorText},s.HSBrokerage=function(t,e){e||s.HSEntityItem.call(this,t,!0),i.ajax.addType(this,"HSBrokerage"),t.Brand&&(this.brand=new s.HSBrand(t.Brand)),this.name=t.Name,this.subhead=t.Subhead,this.phone=i.string.getPhoneNumber(t.Phone,t.PhoneExt),this.email=t.Email,this.status={raw:t.Status,none:0===t.Status},this.hasBrokerSuite=t.HasBrokerSuite,this.brokerSuiteLogoUrl=t.BrokerSuiteLogoUrl,this.platformName=t.PlatformName},s.HSMlsItem=function(t){i.ajax.addType(this,"HSMlsItem"),this.mlsID=t.MLSID,this.urlName=t.UrlName,this.name=t.Name,this.shortName=t.ShortName,this.longName=t.LongName,this.state=t.State,this.disclaimer=t.Disclaimer,t.Brand&&(this.brand=new s.HSBrand(t.Brand)),"number"==typeof t.Status&&(this.status=new s.HSMlsStatusEnum(t.Status)),"number"==typeof t.IdxBits&&(this.idxBits=new s.MLSRuleBits(t.IdxBits))},s.HSMlsStatusEnum=function(t){i.ajax.addType(this,"HSMlsStatusEnum"),this.raw=t,this.none=0===t,this.active=1==(1&t),this.hasProProduct=2==(2&t),this.hasRentals=4==(4&t),this.isBPP=8==(8&t),this.allowAgentClaimProcess=16==(16&t)},s.MLSRuleBits=function(t){i.ajax.addType(this,"MLSRuleBits"),this.raw=t,this.none=0===t,this.showIdxLogo=1==(1&t),this.showIdxDisclaimerAtBottom=2==(2&t),this.showListingBrokerName=4==(4&t)},s.HSMLSRole=function(t){this.raw=t,this.affiliate=1===t,this.agent=2===t,this.appraiser=3===t,this.associationAdmin=4===t,this.associationStaff=5===t,this.broker=6===t,this.mlsAdmin=7===t,this.mlsStaff=8===t,this.officeStaff=9===t,this.other=10===t,this.otherPaid=11===t,this.photographer=12===t},s.HSMLSListAgentsByMLSAndUserResult=function(t){this.type_="HSMLSListAgentsByMLSAndUserResult",this.createDate=i.date.getDateInfo(t.CreateDate),this.activeDate=i.date.getDateInfo(t.ActiveDate),this.status={raw:t.Status,none:0===t.Status,pending:1==(1&t.Status),disabled:2==(2&t.Status),primary:4==(4&t.Status)},t.User&&(this.user=new s.HSUserDetails(t.User))},s.HSMLSSetPrimaryAgentResult=function(t){this.errorCode={raw:t.ErrorCode,alreadyPrimary:-1===t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,canNotBePrimary:2===t.ErrorCode},this.errorText=t.ErrorText},s.HSUserAgentActivity=function(t){if(this.listingCount=i.string.getNumber(t.ListingCount),this.listingAveragePrice=i.string.getPrice(t.ListingAveragePrice),this.buyerCount=i.string.getNumber(t.BuyerCount),this.buyerAveragePrice=i.string.getPrice(t.BuyerAveragePrice),this.status={raw:t.Status,none:0===t.Status},t.PropertyTypePieChart&&(this.propertyTypePieChart=new s.HSPieChart(t.PropertyTypePieChart)),t.ListingMapDots){this.listingMapDots=[];for(var e=0;e<t.ListingMapDots.length;e++)this.listingMapDots.push(new s.HSListingMapDot(t.ListingMapDots[e]))}if(t.Percentages){this.percentages=[];for(var r=0;r<t.Percentages.length;r++)this.percentages.push(new s.HSAgentActivityPercentage(t.Percentages[r]))}},s.HSPieChart=function(t){if(t.UrlFormat&&(this.urlFormat=i.propertyAddress.getPieChartImage(t.UrlFormat,t.Items)),t.Items){this.items=[];for(var e=0;e<t.Items.length;e++)this.items.push(new s.HSPieChartItem(t.Items[e]))}},s.HSPieChartItem=function(t){this.value=i.string.getNumber(t.Value),this.label=t.Label},s.HSListingMapDot=function(t){this.type_="HSListingMapDot",this.listingID=t.ListingID,this.sListingStatus=t.SListingStatus,this.latitude=t.Latitude,this.longitude=t.Longitude,t.Role&&(this.role=new s.HSListingRelatedAgentRoleEnum(t.Role))},s.HSAgentActivityPercentage=function(t){this.percentage=i.string.getPercent(t.Percentage,100),t.Role&&(this.role=new s.HSListingRelatedAgentRoleEnum(t.Role))},s.HSAgentsGetConnectionsResult=function(t){if(this.errorCode={raw:t.ErrorCode,noConnections:-1===t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode},this.commonListings=[],t.CommonListings)for(var e=0;e<t.CommonListings.length;e++)t.CommonListings[e]&&this.commonListings.push(new s.HSPropertyAddressItem(t.CommonListings[e]));if(this.firstDegreeAgentsInMyOffice=[],t.FirstDegreeAgentsInMyOffice)for(var i=0;i<t.FirstDegreeAgentsInMyOffice.length;i++)t.FirstDegreeAgentsInMyOffice[i]&&this.firstDegreeAgentsInMyOffice.push(new s.HSUserDetails(t.FirstDegreeAgentsInMyOffice[i]));if(this.firstDegreeAgentsInTheirOffice=[],t.FirstDegreeAgentsInTheirOffice)for(var r=0;r<t.FirstDegreeAgentsInTheirOffice.length;r++)t.FirstDegreeAgentsInTheirOffice[r]&&this.firstDegreeAgentsInTheirOffice.push(new s.HSUserDetails(t.FirstDegreeAgentsInTheirOffice[r]));if(this.secondDegreeAgents=[],t.SecondDegreeAgents)for(var n=0;n<t.SecondDegreeAgents.length;n++)t.SecondDegreeAgents[n]&&this.secondDegreeAgents.push(new s.HSUserDetails(t.SecondDegreeAgents[n]))},s.HSUserUpdateResult=function(t){this.type_="HSUserUpdateResult",this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,oldPasswordInvalid:2===t.ErrorCode,emailAddressExists:3===t.ErrorCode,emailAddressInvalid:4===t.ErrorCode,emailAddressRequired:5===t.ErrorCode,phoneNumberExists:6===t.ErrorCode,phoneNumberInvalid:7===t.ErrorCode,phoneNumberRequired:8===t.ErrorCode,facebookIDInvalid:9===t.ErrorCode,facebookIDExists:10===t.ErrorCode,twitterIDInvalid:11===t.ErrorCode,twitterIDExists:12===t.ErrorCode,googlePlusIDInvalid:13===t.ErrorCode,googlePlusIDExists:14===t.ErrorCode,unpaidAgent:15===t.ErrorCode},this.userID=t.UserID,this.status={raw:t.Status,none:0===t.Status,currentUserUpdated:1===t.Status}},s.HSPropertyAddressXYTile=function(t){if(this.zoom=t.Zoom,this.tileX=t.TileX,this.tileY=t.TileY,this.items=[],t.Items)for(var e=0;e<t.Items.length;e++)t.Items[e]&&this.items.push(new s.HSPropertyAddressItem(t.Items[e]))},s.HSSimilarListingsResult=function(t){if(this.similarListings=[],t.SimilarListings)for(var e=0;e<t.SimilarListings.length;e++)this.similarListings.push(new s.HSPropertyAddressItem(t.SimilarListings[e]));if(this.recentSales=[],t.RecentSales)for(var i=0;i<t.RecentSales.length;i++)this.recentSales.push(new s.HSPropertyAddressItem(t.RecentSales[i]))},s.HSAreaItem=function(t){i.ajax.addType(this,"HSAreaItem"),this.areaID=t.AreaID,this.entityType=t.EntityType,this.entityID=t.EntityID,this.name=t.Name,this.shortName=t.ShortName,this.subhead=t.Subhead,this.state=t.State,this.uspsCity=t.USPSCity,this.areaTypeID=t.AreaTypeID,this.subTypeID=t.SubTypeID,this.topLevelAreaID=t.TopLevelAreaID,this.countyID=t.CountyID,this.polygon=t.Polygon,this.levels=t.Levels,this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.url=t.Url?t.Url.replace("/sitemap",""):void 0,this.status={raw:t.Status,none:0===t.Status,hasMLSCoverage:1==(1&t.HasMLSCoverage),hasMLSRentals:2==(2&t.HasMLSRentals),hasMLSOpenHouses:4==(4&t.HasMLSOpenHouses),hasMLSBrokerOpens:8==(8&t.HasMLSBrokerOpens)}},s.Slideshow=function(t,e){function i(t){v={loop:0,frame:{overall:t,loop:t}},P=e[0]}function s(){x=!1,p(),m(),l(),n()}function r(){x=!0,c(),g(),d()}function n(){if(!x&&!R){var t=!1;v.loop>=I.maxLoops&&(t=!0);var e=v.frame.overall%2,i=k[e],s=i.dom,r=L[v.frame.loop];s.detach(),o(s,0,0),h(s,0),i.loaded=!1,s.attr("src",r.url),o(s,P.transitionType,P.transitionDuration),D.append(s),setTimeout(function(){a(s,r,i,t,P.transitionDuration,0)},r.duration)}}function a(t,e,s,o,l,c){var d=100*Math.pow(2,c||0)-100;setTimeout(function(){s.loaded||d>3e3?(h(t,1),setTimeout(function(){u(),P=e,o?(r(),i(1)):n()},l)):a(t,e,s,o,l,c+1)},d)}function o(t,e,i){var s=null;0===e?s="":e.crossFade&&(s="opacity "+i+"ms"),
s&&t.css("transition",s)}function h(t,e){t.css("opacity",e)}function u(){v.frame.overall++,v.frame.overall%E==0?(v.frame.loop=0,v.loop++):v.frame.loop++}function l(){D.on("click",function(){for(var t=0;t<I.callbacks.length;t++)I.callbacks[t]()})}function c(){D.off("click")}function d(){D.append(U.play),D.on("mouseover",function(){U.play.show()}),D.on("mouseout",function(){U.play.hide()}),D.one("click",function(){s()})}function p(){U.play.hide(),U.play.detach(),D.css("cursor",""),D.off("click"),D.off("mouseover"),D.off("mouseout")}function m(){D.append(U.pause),D.on("mouseover",function(){U.pause.show()}),D.on("mouseout",function(){U.pause.hide()}),D.one("click",function(){r()})}function g(){U.pause.hide(),U.pause.detach(),D.css("cursor",""),D.off("click"),D.off("mouseover"),D.off("mouseout")}function S(t){return(void 0===I.container||I.container===window?(window.innerHeight?window.innerHeight:C.height())+C.scrollTop():A(I.container).offset().top+A(I.container).height())<=A(t).offset().top-I.threshold}function f(t,e){return(void 0===e.container||e.container===window?C.width()+C.scrollLeft():A(e.container).offset().left+A(e.container).width())<=A(t).offset().left-e.threshold}function y(t,e){return(void 0===e.container||e.container===window?C.scrollTop():A(e.container).offset().top)>=A(t).offset().top+e.threshold+A(t).height()}function H(t,e){return(void 0===e.container||e.container===window?C.scrollLeft():A(e.container).offset().left)>=A(t).offset().left+e.threshold+A(t).width()}function w(t){return!(f(t,I)||H(t,I)||S(t,I)||y(t,I))}function T(){b.on("scroll.ongoing_"+I.host,function(){var t=R,e=!w(D);t!==e&&((R=e)||n())}),k[0].dom.attr("src",L[0].url),D.css("cursor","pointer"),"static"===D.css("position")&&D.css("position","relative"),D.append(k[0].dom),u(),x?r():s()}var P,v,A=window.$,C=A(window),D=A(t.host),I={host:t.host,container:t.container,threshold:t.threshold||0,forceview:t.forceview||!1,width:t.width||D.width()+"px",height:t.height||D.height()+"px",callbacks:t.callbacks||[],autoplay:!0===t.autoplay,maxLoops:t.maxLoops||50,playColor:t.playColor||"rgba(255, 255, 255, 0.7)"},b=void 0===I.container||I.container===window?C:A(I.container),L=e;i(0);var E=L.length,x=!I.autoplay,R=!1,M=!1,k=[{dom:A("<img />",{css:{position:"absolute",width:I.width,height:I.height,opacity:1,"background-size":"cover"}}).addClass("slideshow-frame"),loaded:!1},{dom:A("<img />",{css:{position:"absolute",width:I.width,height:I.height,opacity:0,"background-size":"cover"}}).addClass("slideshow-frame"),loaded:!1}];k[0].dom.on("load",function(){k[0].loaded=!0}),k[1].dom.on("load",function(){k[1].loaded=!0});var U={play:A("<div/>",{css:{position:"absolute",width:0,height:0,"border-top":parseInt(.12*parseFloat(I.height))+"px solid transparent","border-left":parseInt(.18*parseFloat(I.height))+"px solid "+I.playColor,"border-bottom":parseInt(.12*parseFloat(I.height))+"px solid transparent",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"none"}}).addClass("slideshow-button-play"),pause:A("<div/>",{css:{position:"absolute",width:parseInt(.18*parseFloat(I.height))+"px",height:parseInt(.24*parseFloat(I.height))+"px","border-right":parseInt(.06*parseFloat(I.height))+"px solid rgba(255, 255, 255, 0.7)","border-left":parseInt(.06*parseFloat(I.height))+"px solid rgba(255, 255, 255, 0.7)",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"none"}}).addClass("slideshow-button-pause")};w(D)||I.forceview?(M=!0,T()):b.on("scroll.init_"+I.host,function(){!M&&w(D)&&(M=!0,T(),b.off("scroll.init_"+I.host))}),this.endAnimation=function(){r(),p()}},s.HSAdDestinationType=function(t){this.raw=t,this.unknown=0===t,this.leadPage=1===t,this.customURL=2===t,this.leadAdForm=3===t,this.primary=4===t},s.HSAdCreativeTypeEnum=function(t){this.raw=t,this.default=1===t,this.slideshow=1===t,this.entityContent=2===t,this.staticImage=3===t},s.HSCreative=function(t){this.id=t.ID,this.status=t.Status,t.Slideshow&&(this.slideshow=new s.HSCreativeSlideshow(t.Slideshow))},s.HSCreativeSlideshow=function(t){if(this.id=t.ID,this.sizeType=t.SizeType,this.status={raw:t.Status},t.Frames){this.frames=[];for(var e=0;e<t.Frames.length;e++)this.frames.push(new s.HSCreativeFrame(t.Frames[e]))}},s.HSCreativeFrame=function(t){this.creativeFrameID=t.CreativeFrameID,this.duration=t.Duration,this.transitionType=t.TransitionType,this.transitionDuration=t.TransitionDuration,this.url=t.URL},s.HSLeadPageTemplate=function(t){i.ajax.addType(this,"HSLeadPageTemplate"),s.HSDestinationTemplateBase.call(this,t)},s.HSLeadPageTemplateTypeEnum=function(t){return{none:0===t,agentListing:1===t,area:2===t}},s.HSLeadAdFormTemplate=function(t){s.HSLeadPageAdFormBase(t,this)},s.HSLeadPageTemplateStatusEnum=function(t){this.raw=t,this.none=0===t,this.disabled=1==(1&t),this.isNew=2==(2&t),this.testSitesOnly=4==(4&t),this.hasPrice=8==(8&t),this.isSelected=16==(16&t)},s.HSLeadPageAdDestinationTypeEnum=function(t){this.raw=t,this.unknown=0===t,this.leadPage=1===t,this.customURL=2===t,this.leadAdForm=3===t},s.HSLeadPageAdFormBase=function(t,e){e.id=t.ID,e.name=t.Name||null,e.description=t.Description||null,e.disabledReason=t.DisabledReason||null,e.destinationType=new s.HSLeadPageAdDestinationTypeEnum(t.DestinationType||0),e.url=t.URL.toLowerCase().replace("http:",""),e.status=new s.HSLeadPageTemplateStatusEnum(t.Status||0)},s.HSCreativeTemplateStatusEnum=function(t){this.raw=t,this.none=0===t,this.disabled=1==(1&t),this.isSelected=2==(2&t)},s.HSCreativeTemplateBase=function(t){this.creativeType=new s.HSAdCreativeTypeEnum(t.CreativeType),this.id=t.ID,this.status=new s.HSCreativeTemplateStatusEnum(t.Status)},s.HSDefaultCreativeTemplate=function(t){i.ajax.addType(this,"HSDefaultCreativeTemplate"),s.HSCreativeTemplateBase.call(this,t),this.name=t.Name,this.description=t.Description,this.exampleImageURL=t.ExampleImageURL,this.carouselImageURL=t.CarouselImageURL},s.HSEntityContentTemplate=function(t){i.ajax.addType(this,"HSEntityContentTemplate"),s.HSCreativeTemplateBase.call(this,t),this.name=t.Name,this.description=t.Description,this.exampleImageURL=t.ExampleImageURL,t.EntityContent&&(this.entityContent=new s.HSEntityContent(t.EntityContent))},s.HSStaticImageCreativeTemplate=function(t){i.ajax.addType(this,"HSStaticImageCreativeTemplate"),s.HSCreativeTemplateBase.call(this,t),this.name=t.Name,this.description=t.Description,this.exampleImageURL=t.ExampleImageURL,this.isPreviewReady=t.IsPreviewReady,this.slug=t.Slug},s.HSCreativeTemplate=function(t){this.id=t.ID,this.templateType=t.TemplateType,this.designType=t.DesignType,this.creativeType=new s.HSAdCreativeTypeEnum(t.CreativeType),this.name=t.Name,this.description=t.Description,this.minListingCount=t.MinListingCount,this.disabledReason=t.DisabledReason,this.defaultAdTextFormat=t.DefaultAdTextFormat,this.status={raw:t.Status,none:0===t.Status,disabled:1==(1&t.Status),isSelected:2==(2&t.Status)},t.DefaultLeadPageTemplate&&(this.defaultLeadPageTemplate=new s.HSLeadPageTemplate(t.DefaultLeadPageTemplate)),t.ExampleSlideshow&&(this.exampleSlideshow=new s.HSCreativeSlideshow(t.ExampleSlideshow)),this.exampleImageURL=t.ExampleImageURL},s.HSDestinationTemplateBase=function(t){this.destinationType=new s.HSAdDestinationType(t.DestinationType),this.id=t.ID,this.slug=t.Slug,this.templateType=new s.HSLeadPageTemplateTypeEnum(t.TemplateType||0),this.name=t.Name,this.description=t.Description,this.disabledReason=t.DisabledReason,this.url=t.URL,this.urlFormat=t.URLFormat,this.status=new s.HSLeadPageTemplateStatusEnum(t.Status||0),this.price=this.price=i.string.getPrice(t.Price),this.discountedPrice=this.price=i.string.getPrice(t.DiscountedPrice)},s.HSSubscriptionAdTargetArea=function(t){this.id=t.ID,this.facebookURL=t.FacebookURL,this.instagramURL=t.InstagramURL,this.status={raw:t.Status,none:0===t.Status,primary:1==(1&t.Status)},t.LeadPage&&(this.leadPage=new s.HSLeadPageItem(t.LeadPage)),t.Creative&&(this.creative=new s.HSCreative(t.Creative)),t.Area&&(this.area=new s.HSAreaItem(t.Area))},s.HSSubscriptionAdBillingPeriod=function(t){this.id=t.ID,this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.price=i.string.getPrice(t.Price),this.percentComplete=i.string.getPercent(t.PercentComplete,100),this.status={raw:t.Status}},s.HSSubscriptionAdAddonTypeEnum=function(t){return{none:0===t,instagram:1===t}},s.HSSubscriptionAd=function(t){if(i.ajax.addType(this,"HSSubscriptionAd"),this.id=t.ID,this.name=t.Name,this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.cancelDate=i.date.getDateInfo(t.CancelDate),this.lastReportTimestamp=i.date.getDateInfo(t.LastReportTimestamp),this.destinationURL=t.DestinationURL,this.price=i.string.getPrice(t.Price),this.saturationScore=i.string.getPercent(t.SaturationScore,1),this.adHeadline=t.AdHeadline,this.adDescription=t.AdDescription,this.adText=t.AdText,this.clicks=i.string.getNumber(t.Clicks),this.views=i.string.getNumber(t.Views),this.videoViews=i.string.getNumber(t.VideoViews),this.status={raw:t.Status,none:0===t.Status,primary:1==(1&t.Status),notRunning:2==(2&t.Status),testAd:4==(4&t.Status),isCanceled:8==(8&t.Status),isPaused:16==(16&t.Status)},t.DestinationType&&(this.destinationType=new s.HSAdDestinationType(t.DestinationType)),t.Addons){this.addons=[];for(var e=0;e<t.Addons.length;e++)this.addons.push(new s.HSSubscriptionAdAddon(t.Addons[e]))}if(t.CreativeType&&(this.creativeType=new s.HSAdCreativeTypeEnum(t.CreativeType)),t.CreativeTemplate&&(this.creativeTemplate=new s.HSCreativeTemplate(t.CreativeTemplate)),t.CreativeEntityContent&&(this.creativeEntityContent=new s.HSEntityContent(t.CreativeEntityContent)),t.LeadPageTemplate&&(this.leadPageTemplate=new s.HSLeadPageTemplate(t.LeadPageTemplate)),t.LeadAdFormTemplate&&(this.leadAdFormTemplate=new s.HSLeadAdFormTemplate(t.LeadAdFormTemplate)),t.Entity&&(this.entity=new s.HSUserDetails(t.Entity)),t.CurrentBillingPeriod&&(this.currentBillingPeriod=new s.HSSubscriptionAdBillingPeriod(t.CurrentBillingPeriod)),t.TargetAreas){this.targetAreas=[];for(var r=0;r<t.TargetAreas.length;r++)this.targetAreas.push(new s.HSSubscriptionAdTargetArea(t.TargetAreas[r]))}},s.HSSubscriptionAdAddon=function(t){this.id=t.ID,this.status={raw:t.Status,none:0===t.Status},this.price=i.string.getPrice(t.Price),this.addonType=new s.HSSubscriptionAdAddonTypeEnum(t.AddonType||0)},s.HSSubscriptionAdConfigStatusEnum=function(t){this.raw=t,this.none=0===t,this.userMustLogin=1==(1&t)},s.HSSubscriptionAdConfig=function(t){if(this.coefficients={expectedCPM:t.ExpectedCPM,expectedCPC:t.ExpectedCPC,adequateViewsPerZIP:t.AdequateViewsPerZIP,saturationScoreLow:t.SaturationScoreLow,saturationScoreHigh:t.SaturationScoreHigh},t.Tiers){this.tiers=[];for(var e=0;e<t.Tiers.length;e++)this.tiers.push(new s.HSSubscriptionAdTier(t.Tiers[e]))}if(t.PrimarySubscriptionAd&&(this.primarySubscriptionAd=new s.HSSubscriptionAd(t.PrimarySubscriptionAd)),t.OrderSummary&&(this.orderSummary=new s.HSSubscriptionAdOrderSummary(t.OrderSummary)),t.CreativeTemplates){this.creativeTemplates=[];for(var i=0;i<t.CreativeTemplates.length;i++)this.creativeTemplates.push(new s.HSCreativeTemplate(t.CreativeTemplates[i]))}if(t.LeadPageTemplates){this.leadPageTemplates=[];for(var r=0;r<t.LeadPageTemplates.length;r++)this.leadPageTemplates.push(new s.HSLeadPageTemplate(t.LeadPageTemplates[r]))}if(t.LeadAdFormTemplates){this.leadAdFormTemplates=[];for(var n=0;n<t.LeadAdFormTemplates.length;n++)this.leadAdFormTemplates.push(new s.HSLeadAdFormTemplate(t.LeadAdFormTemplates[n]))}this.status=new s.HSSubscriptionAdConfigStatusEnum(t.Status||0)},s.HSSubscriptionAdTier=function(t){this.id=t.ID,this.price=i.string.getPrice(t.Price),this.estimatedViews=i.string.getNumber(t.EstimatedViews),this.estimatedClicks=i.string.getNumber(t.EstimatedClicks)},s.HSSubscriptionAdOrderSummary=function(t){if(this.price=i.string.getPrice(t.Price),this.amountDue=i.string.getNumber(t.AmountDue),this.text=t.Text,this.status={raw:t.Status,none:0===t.Status,isChangeToExistingOrder:1==(1&t.Status)},t.Charges){this.charges=[];for(var e=0;e<t.Charges.length;e++)this.charges.push(new s.HSSubscriptionAdOrderCharge(t.Charges[e]))}if(t.Discounts){this.discounts=[];for(var r=0;r<t.Discounts.length;r++)this.discounts.push(new s.HSSubscriptionAdOrderDiscount(t.Discounts[r]))}},s.HSSubscriptionAdOrderCharge=function(t){if(this.name=t.Name,this.price=i.string.getPrice(t.Price),this.addonType=new s.HSSubscriptionAdAddonTypeEnum(t.AddonType||0),this.status={raw:t.Status,none:0===t.Status,priceIsPerMonth:1==(1&t.Status),isSelected:2==(2&t.Status)},t.Details){this.details=[];for(var e=0;e<t.Details.length;e++)this.details.push(t.Details[e])}},s.HSSubscriptionAdOrderDiscount=function(t){this.promoText=t.PromoText,this.reasonText=t.ReasonText,this.price=i.string.getPrice(t.Price),this.status={raw:t.Status,none:0===t.Status,priceIsPerMonth:1==(1&t.Status)}},s.HSEntityContentTypeEnum=function(t){i.ajax.addType(this,"HSEntityContentTypeEnum"),this.raw=t,this.adVideo=1===t,this.adBackgroundMovie=2===t,this.adBackgroundImage=3===t,this.genericVideo=4===t,this.genericImage=5===t},s.HSEntityContentStatusEnum=function(t){i.ajax.addType(this,"HSEntityContentStatusEnum"),this.raw=t,this.none=0===t,this.deprecated=1==(1&t),this.dataPendingConfirm=2==(2&t),this.dataPendingProcessing=4==(4&t),this.hasKeyFrame=8==(8&t),this.keyFramePendingConfirm=16==(16&t),this.keyFramePendingProcessing=32==(32&t)},s.HSEntityContent=function(t){i.ajax.addType(this,"HSEntityContent"),this.id=t.ID,this.contentType=new s.HSEntityContentTypeEnum(t.ContentType||0),this.name=t.Name,this.description=t.Description,this.accessToken=t.AccessToken,this.blob=i.data.blob(t.Blob),this.createDate=i.date.getDateInfo(t.CreateDate),this.updateDate=i.date.getDateInfo(t.UpdateDate),this.status=new s.HSEntityContentStatusEnum(t.Status||0),this.status.dataPendingConfirm||this.status.dataPendingProcessing||(this.dataUrl=i.entityContent.getDataUrl(t.ID,t.AccessToken)),this.status.keyFramePendingConfirm||this.status.keyFramePendingProcessing||(this.keyFrameUrl=i.entityContent.getKeyFrameUrl(t.ID,t.AccessToken))},s.HSEntityContentOwner=function(t){i.ajax.addType(this,"HSEntityContentOwner"),s.HSUserItem.call(this,t,!0)},s.HSBrokerReportProductionTimePeriod=function(t){this.year=t.Year,this.timePeriodType={raw:t.TimePeriodType,month:0===t.TimePeriodType,quarter:1===t.TimePeriodType},this.timePeriodOrdinal=t.TimePeriodOrdinal,this.groupTimePeriodType={raw:t.GroupTimePeriodType,month:0===t.GroupTimePeriodType,quarter:1===t.GroupTimePeriodType},this.groupTimePeriodOrdinal=t.GroupTimePeriodOrdinal,this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.volume=i.string.getPrice(t.Volume),this.sides=i.string.getNumber(t.Sides),this.status={raw:t.Status,isPartial:1==(1&t.Status)}},s.HSBrokerReportProduction=function(t){if(this.volumeLastYear=i.string.getPrice(t.VolumeLastYear),this.volumePriorYear=i.string.getPrice(t.VolumePriorYear),this.sidesLastYear=i.string.getNumber(t.SidesLastYear),this.sidesPriorYear=i.string.getNumber(t.SidesPriorYear),this.volumePercentChange=i.string.getPercent(t.VolumePercentChange,100),this.sidesPercentChange=i.string.getPercent(t.SidesPercentChange,100),this.status={raw:t.Status},t.TimePeriods){this.timePeriods=[];for(var e=0;e<t.TimePeriods.length;e++)this.timePeriods.push(new s.HSBrokerReportProductionTimePeriod(t.TimePeriods[e]))}},s.HSAgentOfficeItem=function(t,e){this.type_="HSAgentOfficeItem",this.mlsOfficeID=t.MLSOfficeID,this.name=t.Name,this.subhead=t.Subhead,this.agentCount=i.string.getNumber(t.AgentCount),this.city=t.City,this.state=t.State,e||(this.fullStreetAddress=t.FullStreetAddress,this.zip=t.Zip,this.address=i.propertyAddress.getAddress(this.fullStreetAddress,null,this.city,this.state,this.zip)),this.email=t.Email,this.phone=i.string.getPhoneNumber(t.Phone,t.PhoneExt),this.status={raw:t.Status,IsActive:1==(1&t.Status),IsObfuscated:2==(2&t.Status)},t.Brand&&(this.brand=new s.HSBrand(t.Brand))},s.HSAgentOfficeDetail=function(t){if(s.HSAgentOfficeItem.call(this,t,!0),this.type_="HSAgentOfficeDetail",this.fullStreetAddress=t.FullStreetAddress,this.zip=t.Zip,this.address=i.propertyAddress.getAddress(this.fullStreetAddress,null,this.city,this.state,this.zip),this.fax=i.string.getPhoneNumber(t.Fax),this.latitude=t.Latitude,this.longitude=t.Longitude,this.uiSections=[],t.UISections){this.uiSections.raw=[];for(var e=0;e<t.UISections.length;e++)this.uiSections.raw.push(t.UISections[e]);this.uiSections={contactInfo:t.UISections.indexOf(1)>=0,agentRoster:t.UISections.indexOf(100)>=0,actionRankAgents:t.UISections.indexOf(200)>=0,mlsDataProduction:t.UISections.indexOf(300)>=0,mlsDataProductionEmpty:t.UISections.indexOf(302)>=0}}t.Production&&(this.production=new s.HSBrokerReportProduction(t.Production))},s.HSLeadPageItem=function(t){i.ajax.addType(this,"HSLeadPageItem"),this.leadPageID=t.LeadPageID,this.listingAdOrderID=t.ListingAdOrderID,this.createDate=i.date.getDateInfo(t.CreateDate),this.expirationDate=i.date.getDateInfo(t.ExpirationDate),this.templateID=t.TemplateID,this.utmSource=t.UtmSource,this.utmMedium=t.UtmMedium,this.utmTerm=t.UtmTerm,this.utmContent=t.UtmContent,this.utmCampaign=t.UtmCampaign,this.targetUrl=t.TargetUrl,this.headline=t.Headline,this.totalPageViewCount=i.string.getNumber(t.TotalPageViewCount),this.totalUserRequestCount=i.string.getNumber(t.TotalUserRequestCount),this.totalPhoneClickCount=i.string.getNumber(t.TotalPhoneClickCount),this.totalEmailClickCount=i.string.getNumber(t.TotalEmailClickCount),this.totalLeadCount=i.string.getNumber((t.TotalUserRequestCount||0)+(t.TotalPhoneClickCount||0)+(t.TotalEmailClickCount||0)),this.statsUpdatedDate=i.date.getDateInfo(t.StatsUpdatedDate),this.url=t.Url,this.primaryPictureUrl=t.PrimaryPictureUrl,t.Listing&&(this.listing=new s.HSPropertyAddressItem(t.Listing)),this.status={raw:t.Status,none:0===t.Status,isExpired:1==(1&t.Status),canUpdate:2==(2&t.Status),previewOnly:4==(4&t.Status)}},s.HSColors=function(t){this.primaryColor=t.PrimaryColor,this.secondaryColor=t.SecondaryColor,this.primaryColorDark=t.PrimaryColorDark,this.primaryColorLight=t.PrimaryColorLight,this.primaryColorComplement=t.PrimaryColorComplement,this.usingDefaultColors=t.UsingDefaultColors},s.HSLeadPageDetails=function(t){if(i.ajax.addType(this,"HSLeadPageDetails"),s.HSLeadPageItem.call(this,t),this.listingRemarks=t.ListingRemarks,t.Colors&&(this.colors=new s.HSColors(t.Colors)),t.EntityDetails&&(this.entityDetails=new s.HSUserDetails(t.EntityDetails)),t.OfficeDetails&&(this.officeDetails=new s.HSAgentOfficeDetail(t.OfficeDetails)),t.OpenHouses){this.openHouses=[];for(var e=0;e<t.OpenHouses.length;e++)this.openHouses.push(new s.HSOpenHouseItem(t.OpenHouses[e]))}if(t.AreaStats&&(this.areaStats=new s.HSAreaStats(t.AreaStats)),t.Listings){this.listings=[];for(var r=0;r<t.Listings.length;r++)this.listings.push(new s.HSPropertyAddressItem(t.Listings[r]))}t.Area&&(this.area=new s.HSAreaItem(t.Area))},s.HSAreaStats=function(t){this.timePeriodOrdinal=t.TimePeriodOrdinal,this.marketHealthScore=i.string.getNumber(t.MarketHealthScore),this.homesForSale=i.string.getNumber(t.HomesForSale),this.medianListPrice=i.string.getPrice(t.MedianListPrice),this.daysOnMarket=i.string.getNumber(t.DaysOnMarket),this.monthsInventory=i.string.getNumber(t.MonthsInventory),this.medianSalesPrice=i.string.getPrice(t.MedianSalesPrice),this.medianSalesPriceChange=i.string.getPercent(t.MedianSalesPriceChange,100),this.sales=i.string.getNumber(t.Sales),this.salesChange=i.string.getPercent(t.SalesChange,1),this.homesForSaleDetached=i.string.getNumber(t.HomesForSaleDetached),this.homesForSaleTownhouse=i.string.getNumber(t.HomesForSaleTownhouse),this.homesForSaleCondo=i.string.getNumber(t.HomesForSaleCondo),this.newListings=i.string.getNumber(t.NewListings),this.priceChanges=i.string.getNumber(t.PriceChanges),this.contracts=i.string.getNumber(t.Contracts),this.areaName=t.AreaName},s.HSLeadPageStatItem=function(t){i.ajax.addType(this,"HSLeadPageStatItem"),this.text=t.Text,this.date=i.date.getDateInfo(t.Date),this.pageViewCount=i.string.getNumber(t.PageViewCount),this.userRequestCount=i.string.getNumber(t.UserRequestCount),this.phoneClickCount=i.string.getNumber(t.PhoneClickCount),this.emailClickCount=i.string.getNumber(t.EmailClickCount),this.totalLeadCount=i.string.getNumber((t.UserRequestCount||0)+(t.PhoneClickCount||0)+(t.EmailClickCount||0)),this.date?this.label=this.date.shortMonth+" "+this.date.day:this.label=this.text,0===t.UserRequestCount?this.conversionRate=0:(this.conversionRate=(t.UserRequestCount/t.PageViewCount*100).toFixed(1),this.conversionRate>=100&&(this.conversionRate=100))},s.HSLeadPageReportSource=function(t){if(this.source=t.Source,t.Items){this.items=[];for(var e=0;e<t.Items.length;e++)this.items.push(new s.HSLeadPageStatItem(t.Items[e]))}},s.HSUserRequestFormDetails=function(t){this.email=t.Email,this.phone=i.string.getPhoneNumber(t.Phone),this.name=i.user.getName(t.FirstName,t.LastName)},s.HSUserRequest=function(t){if(i.ajax.addType(this,"HSUserRequest"),this.userRequestID=t.UserRequestID,this.text=t.Text,this.dateTimeStamp=i.date.getDateInfo(t.DateTimeStamp),this.status={raw:t.Status},t.User&&(this.user=new s.HSUserItem(t.User)),t.FormDetails&&(this.formDetails=new s.HSUserRequestFormDetails(t.FormDetails)),t.PropertyAddress&&(this.propertyAddress=new s.HSPropertyAddressItem(t.PropertyAddress)),t.Entities){this.entities=[];for(var e=0;e<t.Entities.length;e++)this.entities.push(new s.HSEntityItem(t.Entities[e]))}},s.HSLeadPageReport=function(t){if(this.pageViewCount=i.string.getNumber(t.PageViewCount),this.userRequestCount=i.string.getNumber(t.UserRequestCount),this.phoneClickCount=i.string.getNumber(t.PhoneClickCount),this.emailClickCount=i.string.getNumber(t.EmailClickCount),this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.totalLeadCount=i.string.getNumber((t.UserRequestCount||0)+(t.PhoneClickCount||0)+(t.EmailClickCount||0)),this.statCount=i.string.getNumber(t.StatCount),t.LeadPage&&(this.leadPage=new s.HSLeadPageDetails(t.LeadPage)),t.Stats){this.stats=[];for(var e=0;e<t.Stats.length;e++)this.stats.push(new s.HSLeadPageStatItem(t.Stats[e]))}if(t.Sources){this.sources=[];for(var r=0;r<t.Sources.length;r++)this.sources.push(new s.HSLeadPageReportSource(t.Sources[r]))}if(t.UserRequests){this.userRequests=[];for(var n=0;n<t.UserRequests.length;n++)this.userRequests.push(new s.HSUserRequest(t.UserRequests[n]))}},s.HSListingAdOrder=function(t){if(this.listingID=t.ListingID,t.Role&&(this.role=new s.HSListingRelatedAgentRoleEnum(t.Role)),this.description=t.Description,this.headline=t.Headline,this.linkDescription=t.LinkDescription,this.isGeneric=t.IsGeneric,this.hasInstagramPlacement=t.HasInstagramPlacement,this.entityType=t.EntityType,this.entityID=t.EntityID,this.orderID=t.OrderID,this.campaignID=t.CampaignID,this.leadPageID=t.LeadPageID,this.createDate=i.date.getDateInfo(t.CreateDate),this.url=t.Url,this.adImageUrl=t.AdImageUrl,this.postUrl=t.PostUrl,this.instagramPostUrl=t.InstagramPostUrl,this.price=i.string.getPrice(t.Price),this.percentComplete=i.string.getPercent(t.PercentComplete,1),this.realBudget=t.RealBudget,this.spent=t.Spent,this.reachEstimate=i.string.getNumber(t.ReachEstimate),this.sphereReach=i.string.getNumber(t.SphereReach),this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.clicks=i.string.getNumber(t.Clicks),this.views=i.string.getNumber(t.Views),this.source=t.Source,this.productType={raw:t.ProductType,generic:1===t.ProductType,justListed:2===t.ProductType,justSold:3===t.ProductType},this.priceTier={raw:t.PriceTier,tierOne:1===t.PriceTier,tierTwo:2===t.PriceTier,tierThree:3===t.PriceTier,tierFour:4===t.PriceTier,tierFive:5===t.PriceTier,tierSix:6===t.PriceTier},this.status={raw:t.Status,completed:1==(1&t.Status),hideDiscount:2==(2&t.Status),pending:4==(4&t.Status),cancelled:8==(8&t.Status),facebookCampaignDeleted:16==(16&t.Status),confirmationEmailSent:32==(32&t.Status),initialSubscriptionOrder:64==(64&t.Status)},t.Brand&&(this.brand=new s.HSBrand(t.Brand)),t.PropertyAddressItem&&(this.propertyAddressItem=new s.HSPropertyAddressItem(t.PropertyAddressItem)),t.PurchasedTemplates){this.purchasedTemplates=[];for(var e=0;e<t.PurchasedTemplates.length;e++)this.purchasedTemplates.push(new s.HSListingAdOrderAddon(t.PurchasedTemplates[e]))}if(t.DiscountedPrice&&t.Price&&!this.status.hideDiscount&&t.DiscountedPrice<t.Price&&(this.discountedPrice=i.string.getPrice(t.DiscountedPrice)),t.UserRequests){this.userRequests=[];for(var r=0;r<t.UserRequests.length;r++)this.userRequests.push(new s.HSUserRequest(t.UserRequests[r]))}},s.HSListingAdOrderAddon=function(t){this.listingAdOrderAddonID=t.ListingAdOrderAddonID,this.price=i.string.getPrice(t.Price),(t.AddonID||0===t.AddonID)&&(this.addonID=new s.HSListingAdAddonIDEnum(t.AddonID))},s.HSListingAdAddonIDEnum=function(t){return{none:0===t,letterBox:1===t,flatscreen:2===t,upperDeck:3===t,gauss:4===t,frames:5===t,instagramTier1:9===t,instagramTier2:10===t,instagramTier3:11===t,instagramFree:12===t,additionalBudget49:13===t,additionalBudget99:14===t,additionalBudget149:15===t,additionalBudget199:16===t,additionalBudget249:17===t,additionalBudget299:18===t,additionalBudget399:19===t,additionalBudget499:20===t,leadPage7:21===t,premiumLeadPageSelfServe4:22===t,premiumLeadPageSelfServe7:23===t,leadPageFree:24===t,wydlerCustomTemplate:25===t,creigNorthropCustom:26===t,premiumLeadPageSelfServe9:27===t,premiumLeadPageSelfServe14:28===t,premiumLeadPageSelfServe19:29===t}},s.HSListingAdOrderHistoryItem=function(t){this.date=i.date.getDateInfo(t.Date),this.description=t.Description,this.price=i.string.getPrice(t.Price)},s.HSListingAdPlatformTypeEnum=function(t){this.raw=t,this.facebook=1===t,this.instagram=2===t,this.google=3===t,this.waze=4===t,this.youtube=5===t,this.googleSearch=6===t},s.HSAdReport=function(t){function e(t,e,s){var r=t.filter(e).sort(s),n=r.reduce(function(t,e){return t.videoViews+=e.videoViews?e.videoViews.raw:0,t.views+=e.views?e.views.raw:0,t.clicks+=e.clicks?e.clicks.raw:0,t.reach+=e.reach?e.reach.raw:0,t},{videoViews:0,views:0,clicks:0,reach:0});return{total:{videoViews:i.string.getNumber(n.videoViews||0),views:i.string.getNumber(n.views||0),clicks:i.string.getNumber(n.clicks||0),reach:i.string.getNumber(n.reach||0)},stats:r}}if(i.ajax.addType(this,"HSAdReport"),this.campaignStart=i.date.getDateInfo(t.CampaignStart),this.campaignEnd=i.date.getDateInfo(t.CampaignEnd),this.reportGenerationTimestamp=i.date.getDateInfo(t.ReportGenerationTimestamp),t.TotalPerformance&&(this.totalPerformance=new s.HSAdReportStats(t.TotalPerformance)),t.Demographics){this.demographics={};for(var r=[],n=0;n<t.Demographics.length;n++)r.push(new s.HSAdReportStats(t.Demographics[n]));this.demographics.gender=e(r,function(t){return t.breakdownType.allGenders},function(t,e){return t.breakdownType.raw-e.breakdownType.raw}),this.demographics.platform=e(r,function(t){return t.breakdownType.allPlatforms},function(t,e){return t.breakdownType.raw-e.breakdownType.raw}),this.demographics.age=e(r,function(t){return t.breakdownType.allAges},function(t,e){return t.breakdownType.raw-e.breakdownType.raw})}if(t.DailyPerformance){for(var a=[],o=0;o<t.DailyPerformance.length;o++)a.push(new s.HSAdReportStats(t.DailyPerformance[o]));this.dailyPerformance=e(a,function(t){return t.breakdownType.date},function(t,e){return t.date.raw-e.date.raw})}if(t.UserRequests){this.userRequests=[];for(var h=0;h<t.UserRequests.length;h++)this.userRequests.push(new s.HSUserRequest(t.UserRequests[h]))}},s.HSAdReportStats=function(t){i.ajax.addType(this,"HSAdReportStats"),this.videoViews=i.string.getNumber(t.VideoViews||0),this.views=i.string.getNumber(t.Views||0),this.clicks=i.string.getNumber(t.Clicks||0),this.reach=i.string.getNumber(t.Reach||0),this.date=i.date.getDateInfo(t.Date),this.breakdownType={raw:t.BreakdownType,none:0===t.BreakdownType,date:1==(1&t.BreakdownType),male:2==(2&t.BreakdownType),female:4==(4&t.BreakdownType),unknownGender:8==(8&t.BreakdownType),allGenders:(14&t.BreakdownType)>0,age1824:128==(128&t.BreakdownType),age2534:256==(256&t.BreakdownType),age3544:512==(512&t.BreakdownType),age4554:1024==(1024&t.BreakdownType),age5564:2048==(2048&t.BreakdownType),age65Plus:4096==(4096&t.BreakdownType),allAges:(8064&t.BreakdownType)>0,desktop:16384==(16384&t.BreakdownType),mobile:32768==(32768&t.BreakdownType),instagramstream:65536==(65536&t.BreakdownType),allPlatforms:(114688&t.BreakdownType)>0},this.breakdownType&&this.breakdownType.raw>0&&(this.breakdownType.date&&this.date?this.label=this.date.shortMonth+" "+this.date.day:this.breakdownType.male?this.label="Male":this.breakdownType.female?this.label="Female":this.breakdownType.unknownGender?this.label="Unknown":this.breakdownType.age1824?this.label="18-24":this.breakdownType.age2534?this.label="25-34":this.breakdownType.age3544?this.label="35-44":this.breakdownType.age4554?this.label="45-54":this.breakdownType.age5564?this.label="55-64":this.breakdownType.age65Plus?this.label="65+":this.breakdownType.desktop?this.label="Desktop":this.breakdownType.mobile?this.label="Mobile":this.breakdownType.instagramstream&&(this.label="Instagram"))},s.HSAgentListingActivity=function(t){if(this.status={raw:t.Status},t.Activities){this.activities=[];for(var e=0;e<t.Activities.length;e++)this.activities.push(new s.HSAgentListingActivityItem(t.Activities[e]))}if(t.Listings){this.listings=[];for(var i=0;i<t.Listings.length;i++)this.listings.push(new s.HSPropertyAddressItem(t.Listings[i]))}},s.HSAgentListingActivityItem=function(t){this.sListingStatus=t.SListingStatus,this.count=i.string.getNumber(t.Count),this.daysAverage=i.string.getNumber(t.DaysAverage),this.priceAverage=i.string.getPrice(t.PriceAverage),t.PercentChange&&(this.percentChange=new s.HSPercentChange(t.PercentChange))},s.HSPercentChange=function(t){this.isPositive=t.IsPositive,this.asDecimal=t.AsDecimal,this.asString=t.AsString},s.HSSearchResult=function(t){if(t.Areas){this.areas=[];for(var e=0;e<t.Areas.length;e++)this.areas.push(new s.HSAreaItem(t.Areas[e]))}if(t.Properties){this.properties=[];for(var i=0;i<t.Properties.length;i++)this.properties.push(new s.HSPropertyAddressItem(t.Properties[i]))}if(t.Schools){this.schools=[];for(var r=0;r<t.Schools.length;r++)this.schools.push(new s.HSSchool(t.Schools[r]))}if(t.SavedSearches){this.savedSearches=[];for(var n=0;n<t.SavedSearches.length;n++)this.savedSearches.push(new s.HSSavedSearch(t.SavedSearches[n]))}if(t.Users){this.users=[];for(var n=0;n<t.Users.length;n++)this.users.push(new s.HSUserItem(t.Users[n]))}if(t.StreetAreas){this.streetAreas=[];for(var n=0;n<t.StreetAreas.length;n++)this.streetAreas.push(new s.HSStreetArea(t.StreetAreas[n]))}},s.HSStreetArea=function(t){if(i.ajax.addType(this,"HSStreetArea"),this.id=t.ID,this.name=t.Name,this.url=t.Url,this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.status={raw:t.Status,none:0===t.Status},t.Area&&(this.area=new s.HSAreaItem(t.Area),this.url=this.area.url+"/"+t.Url),t.Segments){this.segments=[];for(var e=0;e<t.Segments.length;e++)this.segments.push(t.Segments[e])}},s.HSConfig=function(t){t.RootURLs&&(this.rootURLs=new s.HSRootURLs(t.RootURLs)),t.UserStats&&(this.userStats=new s.HSUserStats(t.UserStats)),t.UserDetails&&(this.userDetails=new s.HSUserDetails(t.UserDetails)),t.Pusher&&(this.pusher=new s.HSPusherConfig(t.Pusher)),t.Stripe&&(this.stripe=new s.HSStripeConfig(t.Stripe)),t.Brokerage&&(this.brokerage=new s.HSBrokerage(t.Brokerage))},s.HSRootURLs=function(t){i.ajax.addType(this,"HSRootURLs"),this.webRootBaseURL=t.WebRootBaseURL,this.webSecureRootBaseURL=t.WebSecureRootBaseURL,this.userProfileImagesBaseURL=t.UserProfileImagesBaseURL,this.botProfileImagesBaseURL=t.BotProfileImagesBaseURL,this.conversationMessageImagesBaseURL=t.ConversationMessageImagesBaseURL,this.brandImagesBaseURL=t.BrandImagesBaseURL,
this.s3SnapImagesBaseURL=t.S3SnapImagesBaseURL},s.HSPusherConfig=function(t){i.ajax.addType(this,"HSPusherConfig"),this.key=t.Key,this.authorizationURL=t.AuthorizationURL,this.conversationChannelNameFormat=t.ConversationChannelNameFormat,this.userChannelNameFormat=t.UserChannelNameFormat,this.pusherAuthorizationURL=t.PusherAuthorizationURL},s.HSUserStats=function(t){i.ajax.addType(this,"HSUserStats"),this.badgeCount=i.string.getNumber(t.BadgeCount||0),this.unreadConversationCount=i.string.getNumber(t.UnreadConversationCount||0),this.unreadMessageCount=i.string.getNumber(t.UnreadMessageCount||0),this.unreadNewsfeedCount=i.string.getNumber(t.UnreadNewsfeedCount||0),this.status={raw:t.Status,none:0===t.Status,unreadConversationCountChanged:1==(1&t.Status),unreadMessageCountChanged:2==(2&t.Status),unreadNewsfeedCountChanged:4==(4&t.Status)}},s.HSUserProducts=function(t){i.ajax.addType(this,"HSUserProducts"),this.none=!(t.Pro||t.ProPlus||t.ListingAds||t.ProBrand||t.ProBusiness||t.AgentAds||t.LegacyVideoAds),this.pro=new s.ProductStatusEnum(t.Pro),this.proPlus=new s.ProPlusStatusEnum(t.ProPlus),this.listingAds=new s.ListingAdsStatusEnum(t.ListingAds),this.proBrand=new s.ProductStatusEnum(t.ProBrand),this.proBusiness=new s.ProductStatusEnum(t.ProBusiness),this.agentAds=new s.ProductStatusEnum(t.AgentAds),this.legacyVideoAds=new s.ProductStatusEnum(t.LegacyVideoAds),this.concierge=new s.ProductStatusEnum(t.Concierge),this.realEstateWebsite=new s.ProductStatusEnum(t.RealEstateWebsite)},s.ProductStatusEnum=function(t){this.raw=t,this.none=0===t,this.availableForUse=1==(1&t),this.promote=2==(2&t)},s.ListingAdsStatusEnum=function(t){s.ProductStatusEnum.call(this,t,!0),this.activeSubscribeAndSaveSubscription=4==(4&t)},s.ProPlusStatusEnum=function(t){s.ProductStatusEnum.call(this,t,!0),this.activeSubscription=4==(4&t)},s.HSStripeConfig=function(t){this.publishableApiKey=t.PublishableApiKey},s.HSIPLocation=function(t){this.type_="HSIPLocation",this.longitude=t.Longitude,this.latitude=t.Latitude,this.ip=t.IP},s.HSNewsFeedItem=function(t){if(i.ajax.addType(this,"HSNewsFeedItem"),this.id=t.ID,this.dateTimeStamp=i.date.getDateInfo(t.DateTimeStamp),this.cursor=t.Cursor,this.headline=t.Headline,this.reason=t.Reason,this.status={raw:t.Status,none:0===t.Status,doNotDisplay:1==(1&t.Status)},t.Hyperlink&&(this.hyperlink=new s.HSHyperlink(t.Hyperlink)),t.ReasonEntities){this.reasonEntities=[];for(var e=0;e<t.ReasonEntities.length;e++)this.reasonEntities.push(new s.HSEntityItem(t.ReasonEntities[e]))}if(t.ReasonPropertyAddresses){this.reasonPropertyAddresses=[];for(var r=0;r<t.ReasonPropertyAddresses.length;r++)this.reasonPropertyAddresses.push(new s.HSPropertyAddressItem(t.ReasonPropertyAddresses[r]))}if(t.Actors){this.actors=[];for(var n=0;n<t.Actors.length;n++)this.actors.push(new s.HSEntityItem(t.Actors[n]))}switch(i.ajax.getHSType(t.__type)){case"HSNewsFeedEntityPropertyAddressActionItem":this.subtype_="HSNewsFeedEntityPropertyAddressActionItem",this.propertyAddress=new s.HSPropertyAddressItem(t.PropertyAddress),this.actionType={raw:t.ActionType,unknown:0===t.ActionType,snap:1===t.ActionType,favorite:2===t.ActionType,follow:3===t.ActionType};break;case"HSNewsFeedInviteClientsReminderItem":this.subtype_="HSNewsFeedInviteClientsReminderItem";break;case"HSNewsFeedInviteFriendsReminderItem":this.subtype_="HSNewsFeedInviteFriendsReminderItem";break;case"HSNewsFeedUpdatePreferredZipCodesReminderItem":this.subtype_="HSNewsFeedUpdatePreferredZipCodesReminderItem";break;case"HSNewsFeedUpdateProfilePhotoReminderItem":this.subtype_="HSNewsFeedUpdateProfilePhotoReminderItem";break;case"HSNewsFeedShareURLReminderItem":this.subtype_="HSNewsFeedShareURLReminderItem";break;case"HSNewsFeedListingUpdateItem":this.subtype_="HSNewsFeedListingUpdateItem",this.propertyAddress=new s.HSPropertyAddressItem(t.PropertyAddress),this.listingUpdateID=t.ListingUpdateID,this.relationType={raw:t.RelationType,yourListing:1===t.RelationType,similarActive:2===t.RelationType,similarPastDeal:3===t.RelationType,followed:4===t.RelationType,favorited:5===t.RelationType,clientFollowed:6===t.RelationType,clientFavorited:7===t.RelationType,inPreferredArea:8===t.RelationType,recentlyViewed:14===t.RelationType,inRecentlyViewedArea:15===t.RelationType};break;case"HSNewsFeedSyndicatedContentItem":this.subtype_="HSNewsFeedSyndicatedContentItem",s.HSNewsFeedSyndicatedContentItem.call(this,t,!0)}},s.HSNewsFeedSyndicatedContentItem=function(t,e){e||i.ajax.addType(this,"HSNewsFeedSyndicatedContentItem"),this.description=t.Description,this.photoUri=t.PhotoUri,this.source=new s.HSNewsFeedSyndicationSourceTypeEnum(t.Source),this.logoUri=t.LogoUri},s.HSNewsFeedSyndicationSourceTypeEnum=function(t){i.ajax.addType(this,"HSNewsFeedSyndicationSourceTypeEnum"),this.raw=t,this.none=0===t,this.housingWire=1===t},s.HSNewsFeedGetPageResult=function(t){if(this.startCursor=t.StartCursor,this.endCursor=t.EndCursor,this.status={raw:t.Status,none:0===t.Status,reachedEndCursor:1==(1&t.Status)},t.Items){this.items=[];for(var e=0;e<t.Items.length;e++)this.items.push(new s.HSNewsFeedItem(t.Items[e]))}},s.HSPreferredAreaAddResult=function(t){this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,tooManyAreas:2===t.ErrorCode,duplicateArea:3===t.ErrorCode},this.errorText=t.ErrorText},s.HSHyperlink=function(t){this.text=t.Text,this.url=t.Url},s.HSSendCMAResult=function(t){this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,invalidEmail:2===t.ErrorCode,invalidUser:3===t.ErrorCode},this.cmaID=t.CMAID,this.accessToken=t.AccessToken},s.HomeSnapConfigInfo=function(t){if(t.MLSRules){this.mlsRules=[];for(var e=0;e<t.MLSRules.length;e++)this.mlsRules.push(new s.MLSs(t.MLSRules[e]))}},s.MLSs=function(t){this.mlsID=t.MLSID,this.mlsName=t.MLSName,this.idxBits=t.IDXBits,this.vowBits=t.VOWBits,this.disclaimerIdxText=t.DisclaimerIdxText,this.disclaimerVowText=t.DisclaimerVowText,this.mlsAbbreviation=t.MLSAbbreviation,this.mlsFullName=t.MLSFullName,this.brandId=t.BrandId},s.HSSearchAgentsByMLSIDResult=function(t){this.type_="HSSearchAgentsByMLSIDResult",t.User&&(this.user=new s.HSUserDetails(t.User)),this.status={raw:t.Status,none:0===t.Status,isClaimed:1==(1&t.Status),isClaimedByCurrentUser:2==(2&t.Status),isActive:4==(4&t.Status),isNotClaimable:8==(8&t.Status)}},s.HSBrandReportResult=function(t){t.Brand&&(this.brand=new s.HSBrand(t.Brand)),this.brandID=t.BrandID,this.brandLogoUrl=t.BrandLogoUrl,this.lastReportDateTimestamp=i.date.getDateInfo(t.LastReportDateTimestamp),t.Totals&&(this.totals=new s.HSBrandReportTotals(t.Totals)),t.Totals&&(this.totals=new s.HSBrandReportTotals(t.Totals)),t.ThirtyDayEngagement&&(this.thirtyDayEngagement=new s.HSBrandReportEngagement(t.ThirtyDayEngagement)),t.SixtyDayEngagement&&(this.sixtyDayEngagement=new s.HSBrandReportEngagement(t.SixtyDayEngagement)),t.NinetyDayEngagement&&(this.ninetyDayEngagement=new s.HSBrandReportEngagement(t.NinetyDayEngagement))},s.HSBrandReportTotals=function(t){this.totalAgents=i.string.getNumber(t.TotalAgents),this.totalRegistered=i.string.getNumber(t.TotalRegistered),this.percentRegistered=t.PercentRegistered,this.averageClientsPerAgent=i.string.getNumber(t.AverageClientsPerAgent),this.totalAgentClients=i.string.getNumber(t.TotalAgentClients),this.totalBrokerClients=i.string.getNumber(t.TotalBrokerClients),this.androidUsagePercentage=t.AndroidUsagePercentage,this.iosUsagePercentage=t.IOSUsagePercentage,this.webUsagePercentage=t.WebUsagePercentage},s.HSBrandReportEngagement=function(t){if(this.activeAgentsPercentChange=t.ActiveAgentsPercentChange,this.totalSessionsPercentChange=t.TotalSessionsPercentChange,this.averageSessionsPerAgentPercentChange=t.AverageSessionsPerAgentPercentChange,this.percentActivePercentChange=t.PercentActivePercentChange,this.totalBrandImpressionsPercentChange=t.TotalBrandImpressionsPercentChange,this.averageImpressionsPerAgentPercentChange=t.AverageImpressionsPerAgentPercentChange,this.totalAgentLeadsPercentChange=t.TotalAgentLeadsPercentChange,this.totalBrandLeadsPercentChange=t.TotalBrandLeadsPercentChange,t.TimePeriods){this.timePeriods=[];for(var e=0;e<t.TimePeriods.length;e++)this.timePeriods.push(new s.HSBrandReportEngagementTimePeriod(t.TimePeriods[e]))}},s.HSBrandReportEngagementTimePeriod=function(t){this.timeIntervalType=i.string.getNumber(t.TimeIntervalType),this.activeAgents=i.string.getNumber(t.ActiveAgents),this.totalSessions=i.string.getNumber(t.TotalSessions),this.averageSessionsPerAgent=i.string.getNumber(t.AverageSessionsPerAgent),this.percentActive=t.PercentActive,this.percentActiveRaw=t.PercentActiveRaw,this.totalBrandImpressions=i.string.getNumber(t.TotalBrandImpressions),this.averageBrandImpressionsPerAgent=i.string.getNumber(t.AverageBrandImpressionsPerAgent),this.totalAgentLeads=i.string.getNumber(t.TotalAgentLeads),this.totalBrandLeads=i.string.getNumber(t.TotalBrandLeads)},s.HSBrandReportAgentDetail=function(t){this.name=i.user.getName(t.FirstName,t.LastName),this.url=t.Url,this.sessions=i.string.getNumber(t.Sessions),this.clients=i.string.getNumber(t.Clients),this.snaps=i.string.getNumber(t.Snaps),this.impressions=i.string.getNumber(t.Impressions),this.leads=i.string.getNumber(t.Leads)},s.HSBrokerReportDefinitionBase=function(t,e){if(i.ajax.addType(this,"HSBrokerReportDefinitionBase"),!e)switch(i.ajax.getHSType(t.__type)){case"HSBrokerReportAreaDefinition":s.HSBrokerReportAreaDefinition.call(this,t,!0);break;case"HSBrokerReportOfficeDefinition":s.HSBrokerReportOfficeDefinition.call(this,t,!0)}this.id=t.ID,this.lastRun=i.date.getDateInfo(t.LastRun),this.entityType=t.EntityType,t.AgentRole&&(this.agentRole=new s.HSListingRelatedAgentRoleEnum(t.AgentRole)),this.sPropertyType=i.propertyAddress.getSPropertyType(t.SPropertyType),this.priceMin=i.propertyAddress.getPrice(t.PriceMin),this.priceMax=i.propertyAddress.getPrice(t.PriceMax),this.timePeriod={raw:t.TimePeriod,last24Months:0===t.TimePeriod,last12Months:1===t.TimePeriod,last3Months:2===t.TimePeriod,lastMonth:3===t.TimePeriod,lastQuarter:4===t.TimePeriod,lastYear:5===t.TimePeriod,ytd:6===t.TimePeriod},this.sort={raw:t.Sort,volume:0===t.Sort,volumeInArea:1===t.Sort,sides:2===t.Sort,sidesInArea:3===t.Sort},this.status={raw:t.Status,none:0===t.Status,hasNewDataSinceLastRun:1===t.Status}},s.HSBrokerReportAreaDefinition=function(t,e){e||s.HSBrokerReportDefinitionBase.call(this,t,!0),i.ajax.addType(this,"HSBrokerReportAreaDefinition"),this.area=new s.HSAreaItem(t.Area)},s.HSBrokerReportOfficeDefinition=function(t,e){e||s.HSBrokerReportDefinitionBase.call(this,t,!0),i.ajax.addType(this,"HSBrokerReportOfficeDefinition"),this.office=new s.HSAgentOfficeItem(t.Office)},s.HSBrokerReportCreateResult=function(t){this.type_="HSBrokerReportCreateResult",this.errorCode=new s.HSBrokerReportCreateResultErrorCodeEnum(t.ErrorCode),this.instance=new s.HSBrokerReportInstanceDetails(t.Instance)},s.HSBrokerReportCreateResultErrorCodeEnum=function(t){return{raw:t,noResults:-1===t,success:0===t,unknownError:1===t,permissionDeniedForUser:2===t,permissionDeniedForArea:3===t,invalidParameter:4===t}},s.HSBrokerReportInstanceDetails=function(t){if(this.id=t.ID,this.runDate=i.date.getDateInfo(t.RunDate),this.definition=new s.HSBrokerReportDefinitionBase(t.Definition),this.url=t.URL,this.startDate=i.date.getDateInfo(t.StartDate),this.endDate=i.date.getDateInfo(t.EndDate),this.volume=i.string.getPrice(t.Volume),this.sides=i.string.getNumber(t.Sides),this.count=t.Count,t.Results){this.results=[];for(var e=0;e<t.Results.length;e++)this.results.push(new s.HSBrokerReportInstanceResultBase(t.Results[e]))}this.status=new s.HSBrokerReportInstanceDetailsStatusEnum(t.Status)},s.HSBrokerReportInstanceDetailsStatusEnum=function(t){return{raw:t,none:0===t}},s.HSBrokerReportInstanceResultBase=function(t,e){if(i.ajax.addType(this,"HSBrokerReportInstanceResultBase"),!e)switch(i.ajax.getHSType(t.__type)){case"HSBrokerReportInstanceAgentResult":s.HSBrokerReportInstanceAgentResult.call(this,t,!0);break;case"HSBrokerReportInstanceOfficeResult":s.HSBrokerReportInstanceOfficeResult.call(this,t,!0)}this.rank=t.Rank,this.volume=i.string.getPrice(t.Volume),this.volumeInArea=i.string.getPrice(t.VolumeInArea),this.sides=i.string.getNumber(t.Sides),this.sidesInArea=i.string.getNumber(t.SidesInArea),this.status=t.Status},s.HSBrokerReportInstanceAgentResult=function(t,e){e||s.HSBrokerReportInstanceResultBase.call(this,t,!0),this.agent=new s.HSUserDetails(t.Agent),i.ajax.addType(this,"HSBrokerReportInstanceAgentResult")},s.HSBrokerReportInstanceOfficeResult=function(t,e){e||s.HSBrokerReportInstanceResultBase.call(this,t,!0),this.office=new s.HSAgentOfficeItem(t.Office),i.ajax.addType(this,"HSBrokerReportInstanceOfficeResult")},s.HSMLSGetValidationItemsForAgentResult=function(t){if(this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,verificationIsNotRequired:-1===t.ErrorCode,unknownError:1===t.ErrorCode,itemInvalid:2===t.ErrorCode,noItemsFound:3===t.ErrorCode,emailAddressExists:4===t.ErrorCode},t.ValidationItems){this.validationItems=[];for(var e=0;e<t.ValidationItems.length;e++)this.validationItems.push(new s.HSUserValidationItem(t.ValidationItems[e]))}},s.HSUserValidationItemErrorCodeEnum=function(t){this.itemAlreadyValidated=-2===t,this.pending=-1===t,this.success=0===t,this.unknownError=1===t,this.itemInvalid=2===t,this.deobfuscatedTextInvalid=3===t,this.mlsAgentAlreadyClaimed=4===t,this.emailAddressExists=5===t,this.phoneNumberExists=6===t,this.pinCodeInvalid=7===t},s.HSValidationItemCreateResult=function(t){if(this.type_="HSValidationItemCreateResult",this.errorCode={raw:t.ErrorCode,pending:-1===t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,itemInvalid:2===t.ErrorCode,deobfuscatedTextInvalid:3===t.ErrorCode,mlsAgentAlreadyClaimed:4===t.ErrorCode,emailAddressExists:5===t.ErrorCode,phoneNumberExists:6===t.ErrorCode,pinCodeInvalid:7===t.ErrorCode,unpaidAgent:8===t.ErrorCode},t.ValidationItem&&(this.validationItem=new s.HSUserValidationItem(t.ValidationItem)),t.Targets){this.targets=[];for(var e=0;e<t.Targets.length;e++)this.targets.push(new s.HSUserValidationTarget(t.Targets[e]))}},s.HSUserValidationTarget=function(t){i.ajax.addType(this,"HSUserValidationTarget"),t.Field&&(this.field=new s.EntityFieldEnum(t.Field)),this.field&&this.field.cellPhone?this.value=i.string.getPhoneNumber(t.Value).withDashes:this.value=t.Value},s.EntityFieldEnum=function(t){this.raw=t,this.none=0===t,this.email=1===t,this.cellPhone=2===t,this.creditCard=3===t},s.HSUsersResetPasswordResult=function(t){this.errorCode=new s.HSUsersResetPasswordErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText},s.HSUsersResetPasswordErrorCodeEnum=function(t){this.success=0===t,this.unknownError=1===t,this.invalidGuid=2===t,this.expired=3===t},s.HSTeaserBase=function(t,e){if(i.ajax.addType(this,"HSTeaserBase"),!e){switch(i.ajax.getHSType(t.__type)){case"HSTeaserInviteWizard":s.HSTeaserInviteWizard.call(this,t,!0);break;case"HSTeaserUrl":s.HSTeaserUrl.call(this,t,!0)}}this.status={raw:t.Status,none:0===t.Status,showInBody:1==(1&t.Status),showInBanner:2==(2&t.Status),all:(3&t.Status)>0}},s.HSTeaserInviteWizard=function(t,e){i.ajax.addType(this,"HSTeaserInviteWizard"),e||s.HSTeaserBase.call(this,t,!0)},s.HSTeaserUrl=function(t,e){i.ajax.addType(this,"HSTeaserUrl"),e||s.HSTeaserBase.call(this,t,!0),this.title=t.Title,this.action=t.Action,this.imageURL=t.ImageURL,this.aspectRatio=t.AspectRatio,this.targetURL=t.TargetURL,this.listingID=t.ListingID,this.role=t.Role,this.sListingStatus=i.listing.getListingStatus(t.SListingStatus),this.entityType=t.EntityType,this.entityID=t.EntityID},s.HSAuthenticateResultBase=function(t){i.ajax.addType(this,"HSAuthenticateResultBase"),t.AuthenticationType&&(this.authenticationType=new s.HSAuthenticationTypeEnum(t.AuthenticationType)),t.AuthenticationDetails&&(this.authenticationDetails=new s.HSAuthenticationDetails(t.AuthenticationDetails))},s.HSAuthenticationDetails=function(t){i.ajax.addType(this,"HSAuthenticationDetails"),this.authenticationURL=t.AuthenticationURL,this.correlationID=t.CorrelationID},s.HSAuthenticationTypeEnum=function(t){i.ajax.addType(this,"HSAuthenticationTypeEnum"),this.none=0===t,this.url=1===t,this.userNamePassword=2===t,this.password=3===t},s.HSListingsUpdateResult=function(t,e){i.ajax.addType(this,"HSListingsUpdateResult"),e||s.HSAuthenticateResultBase.call(this,t,!0),this.errorCode={raw:t.ErrorCode,fieldsInError:-2===t.ErrorCode,fieldsRequired:-1===t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,permissionDenied:2===t.ErrorCode,thirdPartyServerError:3===t.ErrorCode,listingNotFound:4===t.ErrorCode,listingNotSupported:5===t.ErrorCode,mlsNotSupported:6===t.ErrorCode,authenticationRequired:7===t.ErrorCode,agentNotFound:8===t.ErrorCode},this.status={raw:t.Status,none:0===t.Status}},s.HSListingUpdateTransaction=function(t){if(this.state={raw:t.State,initial:0===t.State,statusSpecific:1===t.State,error:2===t.State},this.fields=[],t.Fields)for(var e=0;e<t.Fields.length;e++)this.fields.push(new s.HSListingField(t.Fields[e]));if(this.transactionStack=[],t.TransactionStack)for(var i=0;i<t.TransactionStack.length;i++)this.transactionStack.push(new s.HSListingUpdateTransaction(t.TransactionStack[i]));this.status={raw:t.Status,none:0===t.Status}},s.HSListingUpdateTransaction.prototype.getRaw=function(){for(var t={state:this.state.raw,fields:[],transactionStack:[],status:this.status.raw},e=0;e<this.fields.length;e++)t.fields.push(this.fields[e].getRaw());for(var i=0;i<this.transactionStack.length;i++)t.transactionStack.push(this.transactionStack[i].getRaw());return t},s.HSMyAgentsRelationResult=function(t){this.type_="HSMyAgentsRelationResult",this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,permissionDenied:2===t.ErrorCode},this.errorText=t.ErrorText},s.HSMyAgent=function(t){this.type_="HSMyAgent",t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),this.date=i.date.getDateInfo(t.Date),this.relationType={raw:t.RelationType,none:0===t.RelationType,mine:1===t.RelationType,know:2===t.RelationType,pending:3===t.RelationType,ignored:4===t.RelationType,session:5===t.RelationType,listing:6===t.RelationType,selling:7===t.RelationType,referred:8===t.RelationType,sessionOverride:9===t.RelationType,aboveTheFold:0===t.RelationType||1===t.RelationType||2===t.RelationType||5===t.RelationType||6===t.RelationType||7===t.RelationType||8===t.RelationType||9===t.RelationType},this.status={raw:t.Status,none:0===t.Status,isNotMemberOfMLS:1==(1&t.Status),canIgnore:2==(2&t.Status),canMakeMine:4==(4&t.Status),canMakeKnown:8==(8&t.Status),canMessage:16==(16&t.Status)},this.rank=100,this.relationType.referred&&!this.status.isNotMemberOfMLS?this.rank=0:this.relationType.know&&!this.status.isNotMemberOfMLS?this.rank=10:this.relationType.mine&&!this.status.isNotMemberOfMLS?this.rank=20:this.relationType.listing?this.rank=30:this.relationType.selling?this.rank=35:this.relationType.referred?this.rank=40:this.relationType.know?this.rank=50:this.relationType.mine?this.rank=60:this.relationType.session?this.rank=70:this.relationType.sessionOverride&&(this.rank=70)},s.HSCardItem=function(t){if(this.cardID=t.CardID,this.brand=t.Brand,this.lastFour=t.LastFour,this.expirationMonth=t.ExpirationMonth,this.expirationYear=t.ExpirationYear,this.isDefault=t.IsDefault,this.tokenizationMethod=t.TokenizationMethod,this.isExpired=!1,this.expirationMonth&&this.expirationYear){var e=new Date;this.expirationYear=parseInt(this.expirationYear,10),this.expirationMonth=parseInt(this.expirationMonth,10),this.expirationYearShort=parseInt(this.expirationYear.toString().substr(2,2),10),(this.expirationYear<e.getFullYear()||this.expirationMonth<e.getMonth()+1&&this.expirationYear===e.getFullYear())&&(this.isExpired=!0)}this.brand&&this.lastFour&&(this.friendlyLastFour=("american express"===this.brand.toLowerCase()?"**** ****** *":"**** **** **** ")+this.lastFour),this.brand&&this.lastFour&&(this.brandedLastFour="ending in "+this.lastFour),this.brandName=this.brand.toLowerCase().replace(/\s/g,"")},s.HSCardItems=function(t){if(this.cards=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.cards.push(new s.HSCardItem(t[e]))},s.HSGetCardDetailsErrorCodeEnum=function(t){this.raw=t,this.successRequiresChallenge=-1===t,this.success=0===t,this.hasCardsRequiresAuthentication=1===t,this.noCards=2===t,this.unauthorized=3===t},s.HSCardDetails=function(t){s.HSCardItems.call(this,t.Cards),this.errorCode=new s.HSGetCardDetailsErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText||new s.HSGetCardDetailsErrorCodeEnum(this.errorCode)},s.HSCardsErrorCodeBaseEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.paymentMethodInvalid=2===t,this.failedToSavePaymentInfo=3===t,this.permissionDenied=4===t,this.stripeCustomerMissing=5===t},s.HSCardsCreateErrorCodeResult=function(t){s.HSCardsErrorCodeBaseEnum.call(this,t)},s.HSCardsSetDefaultErrorCodeEnum=function(t){s.HSCardsErrorCodeBaseEnum.call(this,t)},s.HSCardsResultBase=function(t){this.customerID=t.CustomerID},s.HSCardsCreateResult=function(t){s.HSCardsResultBase.call(this,t),this.errorCode=new s.HSCardsCreateErrorCodeResult(t.ErrorCode)},s.HSCardsSetDefaultResult=function(t){s.HSCardsResultBase.call(this,t),this.errorCode=new s.HSCardsSetDefaultErrorCodeEnum(t.ErrorCode)},s.HSFaqGroup=function(t){if(i.ajax.addType(this,"HSFaqGroup"),this.iconURL=t.IconURL,this.header=t.Header,t.Hyperlink&&(this.Hyperlink=new s.HSHyperlink(t.Hyperlink)),t.FAQs){this.faqs=[];for(var e=0;e<t.FAQs.length;e++)this.faqs.push(new s.HSFaq(t.FAQs[e]))}t.HeaderLink&&(this.headerLink=new s.HSHyperlink(t.HeaderLink)),t.FooterLink&&(this.footerLink=new s.HSHyperlink(t.FooterLink))},s.HSFaq=function(t){i.ajax.addType(this,"HSFaq"),this.name=t.Name,this.value=t.Value,this.valueHtml=t.ValueHtml,this.imageURL=t.ImageURL,t.Video&&(this.video=new s.HSVideo(t.Video))},s.HSAdUnit=function(t,e){if(i.ajax.addType(this,"HSAdUnit"),!e){switch(i.ajax.getHSType(t.__type)){case"HSOpenUniversityAdUnit":s.HSOpenUniversityAdUnit.call(this,t,!0);break;case"HSInviteClientsAdUnit":s.HSInviteClientsAdUnit.call(this,t,!0);break;case"HSOpenURLAdUnit":s.HSOpenURLAdUnit.call(this,t,!0);break;case"HSPlayVideoAdUnit":s.HSPlayVideoAdUnit.call(this,t,!0);break;case"HSSubscriptionAdsAdUnit":s.HSSubscriptionAdsAdUnit.call(this,t,!0);break;case"HSSubscriptionAdsDIYAdUnit":s.HSSubscriptionAdsDIYAdUnit.call(this,t,!0);break;case"HSListingAdsAdUnit":s.HSListingAdsAdUnit.call(this,t,!0);break;case"HSOpenImageCarouselAdUnit":s.HSOpenImageCarouselAdUnit.call(this,t,!0);break;case"HSReportDashboardAdUnit":s.HSReportDashboardAdUnit.call(this,t,!0);break;case"HSGmbProfileAdUnit":s.HSGmbProfileAdUnit.call(this,t,!0);break;case"HSGmbRequestReviewAdUnit":s.HSGmbRequestReviewAdUnit.call(this,t,!0);break;case"HSSubscribeSaveAdUnit":s.HSSubscribeSaveAdUnit.call(this,t,!0);break;case"HSSurveyAdUnit":s.HSSurveyAdUnit.call(this,t,!0);break;case"HSMlsIntegrationsAdUnit":s.HSMlsIntegrationsAdUnit.call(this,t,!0);break;case"HSMlsIntegrationsFeatureAdUnit":s.HSMlsIntegrationsFeatureAdUnit.call(this,t,!0)}}this.id=t.ID,this.html5URLFormat=t.Html5URLFormat,t.ImageURLFormat&&(this.imageURLFormat={raw:t.ImageURLFormat,small:t.ImageURLFormat.replace("{size}","375x210"),medium:t.ImageURLFormat.replace("{size}","1024x575"),large:t.ImageURLFormat.replace("{size}","1366x585"),screenTakeover:t.ImageURLFormat.replace("{size}","2400x1490")}),this.imageBackgroundColor=t.ImageBackgroundColor,this.imageAltText=t.ImageAltText,this.isPortraitOrientation=t.IsPortraitOrientation,this.utmName=t.UTMName,this.utmSource=t.UTMSource,this.utmMedium=t.UTMMedium,this.utmTerm=t.UTMTerm,this.utmContent=t.UTMContent,this.status=t.Status},s.HSOpenUniversityAdUnit=function(t){i.ajax.addType(this,"HSOpenUniversityAdUnit")},s.HSInviteClientsAdUnit=function(t){i.ajax.addType(this,"HSInviteClientsAdUnit")},s.HSOpenURLAdUnit=function(t){i.ajax.addType(this,"HSOpenURLAdUnit"),this.url=t.URL,this.relativeUrl=t.RelativeURL,this.type=t.Type},s.HSPlayVideoAdUnit=function(t){i.ajax.addType(this,"HSPlayVideoAdUnit"),this.url=t.URL,this.urlMp4=t.URLMp4,this.vimeoID=t.VimeoID},s.HSSubscriptionAdsAdUnit=function(t){i.ajax.addType(this,"HSSubscriptionAdsAdUnit")},s.HSOpenImageCarouselAdUnit=function(t){if(i.ajax.addType(this,"HSOpenImageCarouselAdUnit"),t.URLFormats){this.URLFormats=[];for(var e=0;e<t.URLFormats.length;e++)this.URLFormats.push({raw:t.URLFormats[e],small:t.URLFormats[e].replace("{size}","375x210"),medium:t.URLFormats[e].replace("{size}","1024x575"),large:t.URLFormats[e].replace("{size}","1366x585"),screenTakeover:t.URLFormats[e].replace("{size}","2400x1490")})}},s.HSSubscriptionAdsDIYAdUnit=function(t){i.ajax.addType(this,"HSSubscriptionAdsDIYAdUnit")},s.HSListingAdsAdUnit=function(t){i.ajax.addType(this,"HSListingAdsAdUnit"),this.title=t.Title,this.subtitle=t.Subtitle,this.description=t.Description,this.potentialOrder=new s.HSListingAdPotentialOrder(t.PotentialOrder)},s.HSListingAdPotentialOrder=function(t){this.propertyAddressItem=new s.HSPropertyAddressItem(t.PropertyAddressItem),this.status=new s.HSListingAdPotentialOrderStatusEnum(t.Status)},s.HSListingAdPotentialOrderStatusEnum=function(t){this.raw=t,this.none=0===t,this.previewsReady=1===(t&&1)},s.HSReportDashboardAdUnit=function(t){i.ajax.addType(this,"HSReportDashboardAdUnit"),this.title=t.Title,this.actionText=t.ActionText,this.actionURL=t.ActionURL,t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSGmbProfileAdUnit=function(t){i.ajax.addType(this,"HSGmbProfileAdUnit"),this.title=t.Title,this.actionText=t.ActionText,this.actionURL=t.ActionURL,t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSGmbRequestReviewAdUnit=function(t){i.ajax.addType(this,"HSGmbRequestReviewAdUnit"),this.url=t.URL,t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSSubscribeSaveAdUnit=function(t){i.ajax.addType(this,"HSSubscribeSaveAdUnit"),this.url=t.URL},s.HSSurveyAdUnit=function(t){i.ajax.addType(this,"HSSurveyAdUnit"),this.surveyQuestions=[];for(var e=0;e<t.SurveyQuestions.length;e++)this.surveyQuestions.push({id:t.SurveyQuestions[e].ID,answers:t.SurveyQuestions[e].Answers,question:t.SurveyQuestions[e].Question})},s.HSMlsIntegrationsAdUnit=function(t){i.ajax.addType(this,"HSMlsIntegrationsAdUnit"),this.mlsBrandWhiteLogo=t.MlsBrandWhiteLogo,t.Entity&&(this.entity=new s.HSUserItem(t.Entity))},s.HSMlsIntegrationsFeatureAdUnit=function(t){i.ajax.addType(this,"HSMlsIntegrationsFeatureAdUnit")},s.HSImpersonationParams=function(t){i.ajax.addType(this,"HSImpersonationParams"),this.entityID=t.EntityID,this.entityType=t.EntityType,this.hash=t.Hash},s.HSKeyValuePair=function(t){var e;i.ajax.addType(this,"HSKeyValuePair"),this.key=null!==(e=t.Key)&&void 0!==e?e:t.Name,this.value=t.Value,void 0!==t.ValueInt&&(this.valueInt=i.string.getNumber(t.ValueInt))},s.HSListingAdPlacementTypeEnum=function(t){i.ajax.addType(this,"HSListingAdPlacementTypeEnum"),this.raw=t,this.facebookOverview=1e3===t,this.facebookNewsfeed=1001===t,this.facebookTemplate=1002===t,this.facebookDestination=1003===t,this.instagramOverview=2e3===t,this.instagramNewsfeed=2001===t,this.googleOverview=3e3===t,this.googleSearch=3001===t,this.googleDisplay=3002===t,this.googleGmail=3003===t,this.wazeOverview=4e3===t,this.wazePin=4001===t,this.wazeSearch=4002===t,this.wazeTakeover=4003===t},s.HSListingAdPlatform=function(t){i.ajax.addType(this,"HSListingAdPlatform"),this.name=t.Name,this.description=t.Description,this.platformType=i.ads.getPlatformType(t.PlatformType),this.state=new s.HSListingAdCampaignStateEnum(t.State),t.Preview&&(this.preview=new s.HSListingAdPreviewBase(t.Preview))},s.HSListingAdPlacement=function(t){i.ajax.addType(this,"HSListingAdPlacement"),t&&(this.name=t.Name,this.description=t.Description,t.PlatformType&&(this.platformType=i.ads.getPlatformType(t.PlatformType)),this.placementType=new s.HSListingAdPlacementTypeEnum(t.PlacementType),this.preview=new s.HSListingAdPreviewBase(t.Preview))},s.HSListingAdConfigErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.unauthorized=2===t,this.invalidListing=3===t,this.ineligibleUser=4===t,this.noPotentials=5===t,this.isAnonymousShowSignin=6===t,this.mlsNotAllowed=7===t},s.HSListingAdConfigErrorText=function(t){var e="";switch(t){case 0:e="Success";break;case 1:e="Unspecified error, please try again or contact Homesnap support";break;case 2:e="Unauthorized";break;case 3:e="Listing not found";break;case 4:e="You are not associated with this listing";break;case 5:e="No potential listings";break;case 6:e="Please sign in";break;case 7:e="Homesnap ads is not yet available in your MLS"}return e},s.HSPromoParams=function(){this.promoCampaign=obj.PromoCampaign||null,this.promoSource=obj.PromoSource||null,this.promoMedium=obj.PromoMedium||null,this.promoTerm=obj.PromoTerm||null,this.promoContent=obj.PromoContent||null,this.promoDate=obj.PromoDate||null,this.triggerEmailSubject=obj.TriggerEmailSubject||null,this.salesUserID=obj.SalesUserID||null},s.HSListingAdPromotionTypeEnum=function(t){this.raw=t,this.none=0===t,this.google100OnFirstOrderAnd100WithSS=1===t,this.google100ForSS=2===t,this.facebook50And50WithSS=3===t,this.facebook50ForSS=4===t,this.instagram50And50WithSS=5===t,this.instagram50ForSS=6===t,this.waze50And50WithSS=7===t,this.waze50ForSS=8===t},s.HSListingAdPromotionStatusEnum=function(t){this.raw=t,this.none=0===t},s.HSListingAdPromotion=function(t){i.ajax.addType(this,"HSListingAdPromotion"),this.id=t.ID,this.promotionType=new s.HSListingAdPromotionTypeEnum(t.PromotionType),this.status=new s.HSListingAdPromotionStatusEnum(t.Status),this.minimumPrice=t.MinimumPrice},s.HSListingAdConfig=function(t){if(i.ajax.addType(this,"HSListingAdConfig"),this.errorCode=new s.HSListingAdConfigErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText||s.HSListingAdConfigErrorText(t.ErrorCode),this.status={raw:t.Status,none:0===t.Status,hasExistingAd:1==(1&t.Status),cannotUpdateBudget:2==(2&t.Status),cannotUpdateSettings:4==(4&t.Status),isSkippable:8==(8&t.Status)},t.Listing&&(this.listing=new s.HSPropertyAddressItem(t.Listing)),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.Platforms){this.platforms=[];for(var e=0;e<t.Platforms.length;e++)this.platforms.push(new s.HSListingAdPlatform(t.Platforms[e]))}if(t.ImageAssets){this.imageAssets=[];for(var e=0;e<t.ImageAssets.length;e++){var r=new s.HSListingAdImageAsset(t.ImageAssets[e]);this.imageAssets.push(r),r.assetType.heroImage&&(this.heroImageURL=r.url)}}if(t.Promotion&&(this.promotion=new s.HSListingAdPromotion(t.Promotion)),this.promotions=[],t.Promotions&&Array.isArray(t.Promotions)&&t.Promotions.length>0)for(var n=0;n<t.Promotions.length;n++)this.promotions.push(new s.HSListingAdPromotion(t.Promotions[n]))},s.HSListingAdRedirectTypeEnum=function(t){this.raw=t,this.posOnly=0===t,this.reportOnly=1===t,this.posOrReport=2===t},s.HSListingAdImageAsset=function(t){i.ajax.addType(this,"HSListingAdImageAsset"),this.url=t.URL,this.assetType=new s.HSListingAdImageAssetTypeEnum(t.AssetType)},s.HSListingAdImageAssetTypeEnum=function(t){this.raw=t,this.unknown=0===t,this.howItWorks1=1===t,this.howItWorks2=2===t,this.howItWorks3=3===t,this.howItWorks4=4===t,this.platformComparison=5===t,this.heroImage=6===t},s.HSListingAdsGetSummaryMetricsResult=function(t){if(i.ajax.addType(this,"HSListingAdsGetSummaryMetricsResult"),t.Segmentations){this.segmentations=[];for(var e=0;e<t.Segmentations.length;e++)this.segmentations.push(new s.HSSegmentation(t.Segmentations[e]))}},s.HSListingAdPlacementMetric=function(t){if(i.ajax.addType(this,"HSListingAdPlacementMetric"),this.placement=new s.HSListingAdPlacement(t.Placement),t.Metrics){this.metrics=[];for(var e=0;e<t.Metrics.length;e++)this.metrics.push(new s.HSKeyValuePair(t.Metrics[e]))}},s.HSListingAdsGetPlacementMetricsResult=function(t){if(i.ajax.addType(this,"HSListingAdsGetPlacementMetricsResult"),t.PlacementMetrics){this.placementMetrics=[]
;for(var e=0;e<t.PlacementMetrics.length;e++)this.placementMetrics.push(new s.HSListingAdPlacementMetric(t.PlacementMetrics[e]))}},s.HSInsight=function(t){i.ajax.addType(this,"HSInsight"),this.iconURL=t.IconURL,this.description=t.Description,this.url=t.URL},s.HSListingAdsGetInsightsResult=function(t){if(i.ajax.addType(this,"HSListingAdsGetInsightsResult"),t.Insights){this.insights=[];for(var e=0;e<t.Insights.length;e++)this.insights.push(new s.HSInsight(t.Insights[e]))}},s.HSListingAdHistory=function(t){i.ajax.addType(this,"HSListingAdHistory"),this.id=t.ID,this.description=t.Description,this.dateTimestamp=i.date.getDateInfo(t.DateTimestamp),t.PlatformType&&(this.platformType=i.ads.getPlatformType(t.PlatformType))},s.HSSegmentationGroup=function(t){if(i.ajax.addType(this,"HSSegmentationGroup"),this.name=t.Name,t.Segmentations){this.segmentations=[];for(var e=0;e<t.Segmentations.length;e++)this.segmentations.push(new s.HSSegmentation(t.Segmentations[e]))}},s.HSSegmentation=function(t){if(i.ajax.addType(this,"HSSegmentation"),this.name=t.Name,this.total=i.string.getNumber(parseInt(t.Total,10)),this.description=t.Description,t.Values){this.values=[];for(var e=0;e<t.Values.length;e++)this.values.push(new s.HSSegment(t.Values[e]))}},s.HSSegment=function(t,e){if(i.ajax.addType(this,"HSSegment"),this.name=t.Name,this.value=t.Value,!e){switch(i.ajax.getHSType(t.__type)){case"HSListingAdSegment":s.HSListingAdSegment.call(this,t,!0)}}},s.HSListingAdSegment=function(t,e){i.ajax.addType(this,"HSListingAdSegment"),e||s.HSSegment.call(this,t,!0),this.platformType=i.ads.getPlatformType(t.PlatformType)},s.HSListingAdsGetSegmentedMetricsResult=function(t){if(i.ajax.addType(this,"HSListingAdsGetSegmentedMetricsResult"),t.Groups){this.groups=[];for(var e=0;e<t.Groups.length;e++)this.groups.push(new s.HSSegmentationGroup(t.Groups[e]))}},s.HSListingAdCampaignStateEnum=function(t){i.ajax.addType(this,"HSListingAdCampaignStateEnum"),this.raw=t,this.neverStarted=0===t,this.notProvisioned=1===t,this.running=2===t,this.cancelled=3===t,this.completed=4===t,this.paymentPending=5===t},s.HSListingAdCampaign=function(t){i.ajax.addType(this,"HSListingAdCampaign"),this.currentBudget=i.string.getPrice(t.CurrentBudget),this.percentComplete=i.string.getPercent(t.PercentComplete,100),this.reportDate=i.date.getDateInfo(t.ReportDate),this.platform=new s.HSListingAdPlatform(t.Platform),this.state=new s.HSListingAdCampaignStateEnum(t.State)},s.HSListingAdsGetCampaignsResult=function(t){if(i.ajax.addType(this,"HSListingAdsGetCampaignsResult"),this.totalPercentComplete=i.string.getPercent(t.TotalPercentComplete,100),this.state=new s.HSListingAdCampaignStateEnum(t.State),t.Campaigns){this.campaigns=[];for(var e=0;e<t.Campaigns.length;e++)this.campaigns.push(new s.HSListingAdCampaign(t.Campaigns[e]))}},s.HSListingAdPreviewBase=function(t,e){if(i.ajax.addType(this,"HSListingAdPreviewBase"),this.status={raw:t.Status,none:0===t.Status,isGeneric:1===t.Status,isUpdating:2===t.Status},this.backgroundURL=t.BackgroundURL,this.bottom=t.Bottom,this.left=t.Left,this.right=t.Right,this.top=t.Top,this.url=t.URL,this.element={},this.url.indexOf(".ashx")>-1?this.element.iframe=!0:this.url.indexOf(".imagizer.com")>-1||this.url.indexOf(".homesnap.com")>-1?this.element.image=!0:this.element.generic=!0,!e){switch(i.ajax.getHSType(t.__type)){case"HSListingAdSingleImagePreview":s.HSListingAdSingleImagePreview.call(this,t,!0);break;case"HSListingAdHTML5Preview":s.HSListingAdHTML5Preview.call(this,t,!0)}}},s.HSListingAdSingleImagePreview=function(t,e){i.ajax.addType(this,"HSListingAdSingleImagePreview"),e||s.HSListingAdPreviewBase.call(this,t,!0),this.url=t.URL},s.HSListingAdHTML5Preview=function(t,e){i.ajax.addType(this,"HSListingAdHTML5Preview"),e||s.HSListingAdPreviewBase.call(this,t,!0),this.url=t.URL},s.HSListingAdPricePoint=function(t){if(i.ajax.addType(this,"HSListingAdPricePoint"),this.id=t.ID,this.price=i.string.getPrice(t.Price),this.platformType=i.ads.getPlatformType(t.PlatformType),this.status={raw:t.Status,none:0===t.Status,disabled:1==(1&t.Status),off:2==(2&t.Status)},t.EstimatedMetrics){this.estimatedMetrics=[];for(var e=0;e<t.EstimatedMetrics.length;e++)this.estimatedMetrics.push(new s.HSKeyValuePair(t.EstimatedMetrics[e]))}},s.HSListingAdPricePointGroup=function(t){if(i.ajax.addType(this,"HSListingAdPricePointGroup"),this.platformType=i.ads.getPlatformType(t.PlatformType),t.PricePoints){this.pricePoints=[];for(var e=0;e<t.PricePoints.length;e++)this.pricePoints.push(new s.HSListingAdPricePoint(t.PricePoints[e]))}},s.HSListingAdPricePreset=function(t){if(i.ajax.addType(this,"HSListingAdPricePreset"),this.name=t.Name,this.description=t.Description,this.presetType={raw:t.PresetType,default:1===t.PresetType,mostCommon:2===t.PresetType,previouslyOrdered:3===t.PresetType,topProducer:5===t.PresetType},t.PricePoints){this.pricePoints=[];for(var e=0;e<t.PricePoints.length;e++)null!==t.PricePoints[e]&&this.pricePoints.push(new s.HSListingAdPricePoint(t.PricePoints[e]))}},s.HSListingAdPricePointConfig=function(t){if(i.ajax.addType(this,"HSListingAdPricePointConfig"),t.PricePointGroups){this.pricePointGroups=[];for(var e=0;e<t.PricePointGroups.length;e++)this.pricePointGroups.push(new s.HSListingAdPricePointGroup(t.PricePointGroups[e]))}if(t.PricePresets){this.pricePresets=[];for(var e=0;e<t.PricePresets.length;e++)this.pricePresets.push(new s.HSListingAdPricePreset(t.PricePresets[e]))}},s.HSListingAdUpdateBudgetErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.unauthenticated=2===t},s.HSListingAdUpdateBudgetResult=function(t){this.id=t.ID,this.errorCode=new s.HSListingAdUpdateBudgetErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText},s.HSListingAdUpdateSettingsErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.unauthenticated=2===t},s.HSListingAdUpdateSettingsErrorText=function(t){var e="Unknown error.";switch(t){case 0:e="Success";break;case 1:e="Unspecified error, please try again or contact Homesnap support";break;case 2:e="Unauthenticated"}return e},s.HSListingAdUpdateSettingsResult=function(t){this.id=t.ID,this.errorCode=new s.HSListingAdUpdateSettingsErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText||s.HSListingAdUpdateSettingsErrorText(t.ErrorCode)},s.HSListingAdSettings=function(){this.headline=null,this.linkDescription=null,this.description=null},s.HSListingAdImageOptions=function(){this.raw=obj,this.none=0===obj,this.hideUserImage=1===obj,this.disableImageEnhancement=2===obj},s.HSListingAdFacebookSettings=function(){this.creativeType=null,this.creativeID=null,this.destinationType=null,this.destinationID=null,this.destinationURL=null,this.foregroundImageURL=null,this.backgroundImageURL=null},s.HSListingAdFacebookSettingsConfig=function(t){if(i.ajax.addType(this,"HSListingAdFacebookSettingsConfig"),t.CreativeTemplates){this.creativeTemplates=[];for(var e=0;e<t.CreativeTemplates.length;e++){var r=t.CreativeTemplates[e];switch(r.CreativeType){case 0:this.creativeTemplates.push(new s.HSDefaultCreativeTemplate(r));break;case 1:this.creativeTemplates.push(new s.HSCreativeTemplate(r));break;case 2:this.creativeTemplates.push(new s.HSEntityContentTemplate(r));break;case 3:this.creativeTemplates.push(new s.HSStaticImageCreativeTemplate(r))}}}if(t.DestinationTemplates){this.destinationTemplates=[];for(var n=0;n<t.DestinationTemplates.length;n++)this.destinationTemplates.push(new s.HSDestinationTemplateBase(t.DestinationTemplates[n]))}},s.HSListingAdGoogleCalloutStatusEnum=function(t){this.raw=t,this.none=0===t,this.isSelected=1===t},s.HSListingAdGoogleCallout=function(t){i.ajax.addType(this,"HSListingAdGoogleCallout"),this.id=t.ID,this.name=t.Name,this.description=t.Description,this.status=new s.HSListingAdGoogleCalloutStatusEnum(t.Status)},s.HSListingAdGoogleSettingConfig=function(t){if(i.ajax.addType(this,"HSListingAdGoogleSettingConfig"),t.Callouts){this.callouts=[];for(var e=0;e<t.Callouts.length;e++)this.callouts.push(new s.HSListingAdGoogleCallout(t.Callouts[e]))}},s.HSListingAdWazeSettingConfig=function(t){if(i.ajax.addType(this,"HSListingAdWazeSettingConfig"),t.CreativeTemplates){this.creativeTemplates=[];for(var e=0;e<t.CreativeTemplates.length;e++)this.creativeTemplates.push(new s.HSCreativeTemplate(t.CreativeTemplates[e]))}},s.HSListingAdSettingsConfig=function(t){if(i.ajax.addType(this,"HSListingAdCustomizeConfig"),this.placeholderAdHeadline=t.PlaceholderAdHeadline,this.placeholderAdDescription=t.PlaceholderAdDescription,this.placeholderAdText=t.PlaceholderAdText,t.Facebook&&(this.facebook=new s.HSListingAdFacebookSettingsConfig(t.Facebook)),t.Google&&(this.google=new s.HSListingAdGoogleSettingConfig(t.Google)),t.Waze&&(this.waze=new s.HSListingAdWazeSettingConfig(t.Waze)),t.StockImages){this.stockImages=[];for(var e=0;e<t.StockImages.length;e++)this.stockImages.push({large:t.StockImages[e]})}this.backgroundImageURL=t.BackgroundImageURL||null,this.foregroundImageURL=t.ForegroundImageURL||null},s.HSListingAdOrderSummaryLineItem=function(t){if(i.ajax.addType(this,"HSListingAdOrderSummaryLineItem"),this.platformType=i.ads.getPlatformType(t.PlatformType),this.name=t.Name,this.price=i.string.getPrice(t.Price),this.status={raw:t.Status,none:0===t.Status,disable:1==(1&t.Status),displayAsFree:2==(2&t.Status),isSecondary:4==(4&t.Status)},t.Details){this.details=[];for(var e=0;e<t.Details.length;e++)this.details.push(t.Details[e])}this.promotionType=new s.HSListingAdPromotionTypeEnum(t.PromotionType)},s.HSListingAdSubscriptionDetails=function(t){if(this.amountDue=i.string.getPrice(t.AmountDue),this.discountPercentage=i.string.getPercent(t.DiscountPercentage,100),this.descriptionHTML=t.DescriptionHTML,this.imageURL=t.ImageURL,t.LineItems){this.lineItems=[];for(var e=0;e<t.LineItems.length;e++)this.lineItems.push(new s.HSListingAdOrderSummaryLineItem(t.LineItems[e]))}},s.HSListingAdOrderSummary=function(t){if(i.ajax.addType(this,"HSListingAdOrderSummary"),this.totalPrice=i.string.getPrice(t.TotalPrice),this.discountedPrice=i.string.getPrice(t.DiscountedPrice),this.amountDue=i.string.getPrice(t.AmountDue),this.defaultSubscriptionOption={raw:t.DefaultSubscriptionOption,notAvailable:0===t.DefaultSubscriptionOption,noneSelected:1===t.DefaultSubscriptionOption,singleSelected:2===t.DefaultSubscriptionOption,subscribeSelected:3===t.DefaultSubscriptionOption},t.LineItems){this.lineItems=[];for(var e=0;e<t.LineItems.length;e++)this.lineItems.push(new s.HSListingAdOrderSummaryLineItem(t.LineItems[e]))}t.SubscriptionProPlusOrderOption&&(this.subscriptionProPlusOrderOption=new s.HSSubscriptionProPlusOrderOption(t.SubscriptionProPlusOrderOption)),t.SubscriptionDetails&&(this.subscriptionDetails=new s.HSListingAdSubscriptionDetails(t.SubscriptionDetails))},s.HSLegalTerms=function(t){if(i.ajax.addType(this,"HSLegalTerms"),this.summary=t.Summary,this.description=t.Description,this.status=t.Status,t.Hyperlinks){this.hyperlinks=[];for(var e=0;e<t.Hyperlinks.length;e++)this.hyperlinks.push(new s.HSHyperlink(t.Hyperlinks[e]))}},s.HSListingAdPlacementUpdatedEvent=function(t){i.ajax.addType(this,"HSListingAdPlacementUpdatedEvent"),this.listingID=t.ListingID,this.platformType=i.ads.getPlatformType(t.PlatformType),this.placementType=new s.HSListingAdPlacementTypeEnum(t.PlacementType)},s.HSListingAdOrder2=function(t){i.ajax.addType(this,"HSListingAdOrderSummary"),this.orderID=t.OrderID,this.entityType=t.EntityType,this.entityID=t.EntityID,this.listingID=t.ListingID,this.story=t.Story,this.headline=t.Headline,this.details=t.Details,this.campaignID=t.CampaignID,this.destinationID=t.DestinationID,this.leadPageID=t.LeadPageID,this.createDate=i.date.getDateInfo(t.CreateDate),this.destinationURL=t.DestinationURL,this.percentComplete=i.string.getPercent(t.PercentComplete,1),this.budget=t.Budget,this.hasInstagram=t.HasInstagram,this.source=t.Source,this.status={raw:t.Status,completed:1==(1&t.Status),hideDiscount:2==(2&t.Status),pending:4==(4&t.Status),cancelled:8==(8&t.Status),facebookCampaignDeleted:16==(16&t.Status),confirmationEmailSent:32==(32&t.Status),initialSubscriptionOrder:64==(64&t.Status),paymentPending:128==(128&t.Status),creativeReady:256==(256&t.Status),creativePending:512==(512&t.Status)},t.PropertyAddressItem&&(this.propertyAddressItem=new s.HSPropertyAddressItem(t.PropertyAddressItem)),t.CreativeType&&(this.creativeType=new s.HSAdCreativeTypeEnum(t.CreativeType)),t.CreativeEntityContent&&(this.creativeEntityContent=new s.HSEntityContent(t.CreativeEntityContent)),t.ListingAdTemplate&&(this.listingAdTemplate=new s.HSListingAdTemplate(t.ListingAdTemplate)),t.DestinationType&&(this.destinationType=new s.HSAdDestinationType(t.DestinationType)),this.clicks=i.string.getNumber(t.Clicks),this.views=i.string.getNumber(t.Views)},s.HSListingAd=function(t){if(i.ajax.addType(this,"HSListingAd"),this.id=t.ID,this.aggregateState=new s.HSListingAdCampaignStateEnum(t.AggregateState),this.percentComplete=i.string.getPercent(t.PercentComplete,100),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.Listing&&(this.listing=new s.HSPropertyAddressItem(t.Listing)),t.Platforms){this.platforms=[];for(var e=0;e<t.Platforms.length;e++)this.platforms.push(new s.HSListingAdPlatform(t.Platforms[e]))}if(t.Metrics){this.metrics=[];for(var r=0;r<t.Metrics.length;r++)this.metrics.push(new s.HSKeyValuePair(t.Metrics[r]))}},s.HSListingAdStateEnum=function(t){i.ajax.addType(this,"HSListingAdStateEnum"),this.raw=t,this.none=0===t,this.running=1===t,this.notRunning=2===t},s.HSAdAdvancedReport=function(t){if(i.ajax.addType(this,"HSAdAdvancedReport"),this.name=t.Name,this.generatedDate=i.date.getDateInfo(t.GeneratedDate),this.days=t.Days,t.Columns){this.columns=[];for(var e=0;e<t.Columns.length;e++)this.columns.push(new s.HSAdAdvancedReportColumn(t.Columns[e]))}if(t.Rows){this.rows=[];for(var e=0;e<t.Rows.length;e++)this.rows.push(new s.HSAdAdvancedReportRow(t.Rows[e]))}},s.HSAdAdvancedReportColumn=function(t){i.ajax.addType(this,"HSAdAdvancedReportColumn"),this.name=t.Name},s.HSAdAdvancedReportRow=function(t){if(i.ajax.addType(this,"HSAdAdvancedReportRow"),t.Values){this.values=[];for(var e=0;e<t.Values.length;e++)this.values.push(t.Values[e])}},s.HSListingAdCampaignURL=function(t){i.ajax.addType(this,"HSListingAdCampaignURL"),this.name=t.Name,this.description=t.Description,this.url=t.URL,t.PlatformType&&(this.platformType=i.ads.getPlatformType(t.PlatformType)),t.PlacementType&&(this.placementType=new s.HSListingAdPlacementTypeEnum(t.PlacementType)),t.Type&&(this.type=new s.HSListingAdCampaignURLTypeEnum(t.Type))},s.HSListingAdCampaignURLTypeEnum=function(t){i.ajax.addType(this,"HSListingAdCampaignURLTypeEnum"),this.raw=t,this.unknown=0===t,this.ad=1===t,this.landingPage=2===t},s.HSListingAdSkipResult=function(t){this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notSkippable:2===t.ErrorCode,notFound:3===t.ErrorCode},this.errorText=t.ErrorText},s.HSGetListingAdSummaryResult=function(t){i.ajax.addType(this,"HSGetListingAdSummaryResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode},this.errorText=t.ErrorText,t.Data&&(this.data=new s.HSListingAdSummary(t.Data))},s.HSListingAdSummary=function(t){i.ajax.addType(this,"HSListingAdSummary"),this.ID=t.ID,this.aggregateState=new s.HSListingAdCampaignStateEnum(t.AggregateState)},s.HSUsersSetSessionImpersonationResult=function(t){i.ajax.addType(this,"HSUsersSetSessionImpersonationResult"),this.errorText=t.ErrorText,void 0!==t.ErrorCode&&(this.errorCode=new s.HSUsersSetSessionImpersonationResultErrorCodeEnum(t.ErrorCode))},s.HSUsersSetSessionImpersonationResultErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.userAlreadyLoggedIn=-1===t,this.unknownError=1===t,this.permissionDenied=2===t},s.HSLead=function(t,e){if(i.ajax.addType(this,"HSLead"),this.ID=t.ID,this.text=t.Text,this.status={raw:t.Status,none:0===t.Status,isBrokerLead:1==(1&t.Status)},this.createDate=i.date.getDateInfo(t.CreateDate),this.updateDate=i.date.getDateInfo(t.UpdateDate),this.platformType=i.ads.getPlatformType(t.PlatformType),t.Entity&&(this.entity=new s.HSUserItem(t.Entity)),t.PropertyAddress&&(this.propertyAddress=new s.HSPropertyAddressItem(t.PropertyAddress)),!e){switch(i.ajax.getHSType(t.__type)){case"HSLeadFormSubmission":s.HSLeadFormSubmission.call(this,t,!0);break;case"HSLeadEmailClick":s.HSLeadEmailClick.call(this,t,!0);break;case"HSLeadPhoneClick":s.HSLeadPhoneClick.call(this,t,!0)}}},s.HSLeadTypeEnum=function(t){i.ajax.addType(this,"HSLeadTypeEnum"),this.raw=t,this.formSubmission=1===t,this.emailClicked=2===t,this.phoneClicked=3===t},s.HSLeadFormSubmission=function(t,e){i.ajax.addType(this,"HSLeadFormSubmission"),e||s.HSLead.call(this,t,!0),t.Details&&(this.details=new s.HSLeadFormSubmissionDetails(t.Details))},s.HSLeadFormSubmissionDetails=function(t){i.ajax.addType(this,"HSLeadFormSubmissionDetails"),this.name=i.user.getName(t.FirstName,t.LastName),this.email=t.Email,this.phone=i.string.getPhoneNumber(t.Phone)},s.HSLeadEmailClick=function(t,e){i.ajax.addType(this,"HSLeadEmailClick"),e||s.HSLead.call(this,t,!0)},s.HSLeadPhoneClick=function(t,e){i.ajax.addType(this,"HSLeadPhoneClick"),e||s.HSLead.call(this,t,!0)},s.HSListingAdSubscription=function(t){i.ajax.addType(this,"HSListingAdSubscription"),this.errorCode=new s.HSListingAdSubscriptionErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText,this.id=t.ID,this.promoImageURL=t.PromoImageURL,this.sPropertyType2={raw:t.SPropertyType2,none:0===t.SPropertyType2,detached:1==(1&t.SPropertyType2),townhouse:2==(2&t.SPropertyType2),condo:4==(4&t.SPropertyType2),other:8==(8&t.SPropertyType2),multiFamily:16==(16&t.SPropertyType2),lotsLands:32==(32&t.SPropertyType2),mobileManufactured:64==(64&t.SPropertyType2),commercial:128==(128&t.SPropertyType2),coop:256==(256&t.SPropertyType2)},t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.EventTypes&&(this.eventTypes=new s.HSListingAdEventTypeEnum(t.EventTypes)),t.Role&&(this.role=new s.HSListingRelatedAgentRoleEnum(t.Role)),t.TransactionType&&(this.transactionType=new s.HSTransactionTypeEnum(t.TransactionType)),t.FacebookPricePoint&&(this.facebookPricePoint=new s.HSListingAdPricePoint(t.FacebookPricePoint)),t.InstagramPricePoint&&(this.instagramPricePoint=new s.HSListingAdPricePoint(t.InstagramPricePoint)),t.GooglePricePoint&&(this.googlePricePoint=new s.HSListingAdPricePoint(t.GooglePricePoint)),t.WazePricePoint&&(this.wazePricePoint=new s.HSListingAdPricePoint(t.WazePricePoint))},s.HSListingAdEventTypeEnum=function(t){i.ajax.addType(this,"HSListingAdEventTypeEnum"),this.raw=t,this.active=1==(1&t),this.sold=2==(2&t),this.openHouse=4==(4&t),this.priceCut=8==(8&t)},s.HSListingAdSubscriptionErrorCodeEnum=function(t){i.ajax.addType(this,"HSListingAdSubscriptionErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.complexSubscription=3===t,this.createFailedFilterExists=4===t,this.invalidParameters=5===t},s.HSListingAdGetIncentivesResult=function(t){i.ajax.addType(this,"HSListingAdGetIncentivesResult"),this.descriptionHTML=t.DescriptionHTML,t.Discount&&(this.discount=new s.HSListingAdDiscount(t.Discount)),t.Credit&&(this.credit=new s.HSListingAdCredit(t.Credit)),t.Promotion&&(this.promotion=new s.HSListingAdPromotion(t.Promotion)),t.PromoVideo&&(this.promoVideo=new s.HSVideo(t.PromoVideo))},s.HSListingAdDiscount=function(t){i.ajax.addType(this,"HSListingAdDiscount"),this.id=t.ID,this.description=t.Description,this.percentage=i.string.getPercent(t.Percentage,100),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSListingAdCredit=function(t){i.ajax.addType(this,"HSListingAdCredit"),this.amount=i.string.getPrice(t.Amount),this.description=t.Description,t.Entity&&(this.entity=new s.HSEntityItem(t.Entity))},s.HSImageMimeTypeEnum=function(t){this.raw=t,this.none=0===t,this.jpg=1==(1&t),this.png=2==(2&t),this.gif=4==(4&t)},s.HSImage=function(t){var e,i;this.caption=t.Caption,this.imageUrl=t.ImageUrl,this.width=null!==(e=t.Width)&&void 0!==e?e:0,this.height=null!==(i=t.Height)&&void 0!==i?i:0,this.orientation={landscape:t.Width>=t.Height,portrait:t.Width<=t.Height},this.aspect={landscape:t.Height/t.Width,portrait:t.Width/t.Height},this.mimeType=new s.HSImageMimeTypeEnum(t.MimeType)},s.HSVideoEmbed=function(t){var e=new URL(t.toLowerCase()),i=e.pathname.split("/").filter(Boolean);"vimeo.com"===e.hostname&&1===i.length&&(this.embed={id:i[0],player:"https://player.vimeo.com/video/".concat(this.id)})},s.HSVideo=function(t){i.ajax.addType(this,"HSVideo"),this.providerID=t.ProviderID,this.ownerName=t.OwnerName,this.embedUrl=t.EmbedUrl,this.providerUrl=t.ProviderUrl,this.title=t.Title,this.subtitle=t.Subtitle,this.pageURL=t.PageUrl,t.PageUrl&&s.HSVideoEmbed.call(this,t.PageUrl),this.settingsURL=t.SettingsUrl,this.imageURL=t.ImageUrl,this.videoURL=t.VideoUrl,this.videoURLMp4=t.VideoUrlMp4},s.HSSavedSearch=function(e){var r,n,a,o;if(i.ajax.addType(this,"HSSavedSearch"),this.savedSearchID=e.SavedSearchID,this.name=e.Name,this.description=e.Description,this.status=e.Status,this.createDate=i.date.getDateInfo(e.CreateDate),this.updateDate=i.date.getDateInfo(e.UpdateDate),this.searchType=new s.HSSavedSearchTypeEnum(e.SearchType),this.criteria=new s.HSListingSearchCriteria(e.Criteria),e.CommuteTimePlaces){this.commuteTimePlaces=[];for(var h=0;h<e.CommuteTimePlaces.length;h++)this.commuteTimePlaces.push(new s.HSCommuteTimePlace(e.CommuteTimePlaces[h]))}var u=0;u+=this.criteria.active?1:0,u+=this.criteria.contract?2:0,u+=this.criteria.sold?4:0,u+=this.criteria.offMarket&&this.criteria.offMarket.raw?8:0;var l=this.criteria.filters.features||0;if(l+=this.criteria.openHouse?1:0,l+=this.criteria.comingSoon?32:0,l+=this.criteria.brokerOpen?256:0,e.BoundaryEntity){switch(i.ajax.getHSType(e.BoundaryEntity.__type)){case"HSAreaItem":this.boundaryEntity=new s.HSAreaItem(e.BoundaryEntity);break;case"HSSchool":this.boundaryEntity=new s.HSSchool(e.BoundaryEntity);break;case"HSStreetArea":this.boundaryEntity=new s.HSStreetArea(e.BoundaryEntity)}}if(this.criteria.mode.offMarket){var c=t("SearchDefinitions"),d=t("SearchDefinitionTypes");this.sd=new s.SearchDefinition(c.propertySearchDefinitionConfig);for(var p=0;p<c.propertySearchDefinitionConfig.length;p++){var m=c.propertySearchDefinitionConfig[p],g=m.param;if(m.dataType===d.data.MINMAX)"object"==typeof this.criteria.filters[g].minimum?"loanRate"===g?this.sd.set(g,+this.criteria.filters[g].minimum.raw.toFixed(2),+this.criteria.filters[g].maximum.raw.toFixed(2)):this.sd.set(g,this.criteria.filters[g].minimum.raw,this.criteria.filters[g].maximum.raw):this.sd.set(g,this.criteria.filters[g].minimum,this.criteria.filters[g].maximum);else if(m.dataType===d.data.VALUEWITHMINMAX)this.sd.set(g,this.criteria.filters.hasNoLoan.isRequired?1:0,this.criteria.filters[g].minimum,this.criteria.filters[g].maximum);else if(m.dataType===d.data.GROUPED&&"heatMaps"!==g)this.sd.set(g,this.criteria.filters[g].value);else if(this.criteria.filters[g])if(void 0!==this.criteria.filters[g].isRequired){var S=void 0;"cashBuyersOnly"===g?S=!0===this.criteria.filters[g].isRequired?1:2:"hasNoLoan"===g&&(S=!0===this.criteria.filters[g].isRequired?1:0),this.sd.set(g,S)}else this.sd.set(g,this.criteria.filters[g].raw)}if(this.criteria.visualization&&this.criteria.visualization.offMarket){var f=this.criteria.visualization.offMarket.activeHeatmap.raw,y=this.criteria.visualization.offMarket,H="",w=0;switch(f){case 1:H="ltl",w=y&&y.likelihoodToList?y.likelihoodToList.raw:null;break;case 2:H="mlss",w=y&&y.mlsStatus?y.mlsStatus.raw:null;break;case 3:H="dst",w=y&&y.distressed?y.distressed.raw:null;break;case 4:H="lld",w=y&&y.lastListDate?y.lastListDate.raw:null;break;case 5:H="own",w=y&&y.ownershipTime?y.ownershipTime.raw:null;break;case 6:H="ot",w=y&&y.ownershipType?y.ownershipType.raw:null;break;case 7:H="he",w=y&&y.homeEquity?y.homeEquity.raw:null;break;case 8:H="cb",w=y&&y.cashBuyers?y.cashBuyers.raw:null;break;case 9:H="lt",w=y&&y.loanType?y.loanType.raw:null;break;case 10:H="lb",w=y&&y.loanBalance?y.loanBalance.raw:null;break;case 11:H="ma",w=y&&y.loanAge?y.loanAge.raw:null;break;case 12:H="mr",w=y&&y.loanRate?y.loanRate.raw:null}this.sd.set("heatMaps",H,w)}}else this.sd=new s.SearchDefinition;if(this.sd.set("beds",this.criteria.filters.beds.minimum,this.criteria.filters.beds.maximum),this.sd.set("baths",this.criteria.filters.baths.minimum,this.criteria.filters.baths.maximum),this.sd.set("dateRange",this.criteria.filters.date),this.sd.set("sPropertyType2",this.criteria.filters.propertyType.raw),this.sd.set("specialFeatures",l),this.sd.set("sListingStatus",u),this.sd.set("offMarket",this.criteria.offMarket.raw),this.sd.set("orderBy",this.criteria.orderBy.raw),this.sd.set("transactionType",this.criteria.filters.transactionType.raw),this.sd.set("price",this.criteria.filters.price.minimum?this.criteria.filters.price.minimum.raw:0,this.criteria.filters.price.maximum.raw),this.sd.set("squareFeet",this.criteria.filters.squareFeet.minimum?this.criteria.filters.squareFeet.minimum:0,this.criteria.filters.squareFeet.maximum?this.criteria.filters.squareFeet.maximum:1e6),this.sd.set("lotSize",null!==(r=this.criteria.filters.lotSize.minimum)&&void 0!==r?r:0,null!==(n=this.criteria.filters.lotSize.maximum)&&void 0!==n?n:100),this.sd.set("yearBuilt",null!==(a=this.criteria.filters.yearBuilt.minimum)&&void 0!==a?a:0,null!==(o=this.criteria.filters.yearBuilt.maximum)&&void 0!==o?o:3e3),this.sd.set("contingentPending",2==(2&this.criteria.active)&&2!==this.criteria.filters.transactionType.raw?1:0),!this.criteria.mode.offMarket){var T,P,v,A,C,D,I,b,L;this.sd.set("priceReduction",this.criteria.filters.priceReduction.kind.raw),this.sd.set("floors",this.criteria.filters.floors.mode.raw,this.criteria.filters.floors.range.minimum,this.criteria.filters.floors.range.maximum);var E=this.criteria.filters.schoolRatings.elementarySchool.value,x=this.criteria.filters.schoolRatings.middleSchool.value,R=this.criteria.filters.schoolRatings.highSchool.value;E===x&&E===R&&R===x||this.criteria.filters.schoolRatings.allSchools.value?this.sd.set("allSchools",this.criteria.filters.schoolRatings.allSchools.value):(this.sd.set("elementarySchool",this.criteria.filters.schoolRatings.elementarySchool.value),this.sd.set("middleSchool",this.criteria.filters.schoolRatings.middleSchool.value),this.sd.set("highSchool",this.criteria.filters.schoolRatings.highSchool.value)),this.sd.set("association",this.criteria.filters.association.restrictions.raw,this.criteria.filters.association.totalMonthlyFee.value),this.sd.set("parking",this.criteria.filters.parking.mustHaveGarage?1:0,null===(T=this.criteria.filters.parking)||void 0===T?void 0:null===(P=T.spaces)||void 0===P?void 0:P.value),this.sd.set("waterfront",this.criteria.filters.waterfront.isRequired?1:0),this.sd.set("hasBasement",this.criteria.filters.basement.isRequired?1:0),this.sd.set("basementKind",this.criteria.filters.basement.kind.raw),this.sd.set("cooling",this.criteria.filters.cooling.kind.raw),this.sd.set("heating",this.criteria.filters.heating.kind.raw),this.sd.set("pool",this.criteria.filters.pool?this.criteria.filters.pool.raw:0),this.sd.set("petFriendly",null!==(v=this.criteria.filters.petFriendly)&&void 0!==v&&v.isRequired?1:0),this.sd.set("pricePerSquareDimension",null===(A=this.criteria.filters.pricePerSquareDimension)||void 0===A?void 0:null===(C=A.unit)||void 0===C?void 0:C.raw,null===(D=this.criteria.filters.pricePerSquareDimension)||void 0===D?void 0:D.minimum,null===(I=this.criteria.filters.pricePerSquareDimension)||void 0===I?void 0:I.maximum),this.sd.set("propertyViewWater",this.criteria.filters.propertyView.water.kind.raw),this.sd.set("propertyViewMountain",this.criteria.filters.propertyView.mountainHills.isRequired?1:0),this.sd.set("propertyViewWoods",this.criteria.filters.propertyView.woods.isRequired?1:0),this.sd.set("propertyViewCity",this.criteria.filters.propertyView.city.isRequired?1:0),this.sd.set("propertyViewOther",this.criteria.filters.propertyView.other.isRequired?1:0),this.sd.set("virtualTour",null!==(b=this.criteria.filters.virtualTour)&&void 0!==b&&b.isRequired?1:0),this.sd.set("remarks",null===(L=this.criteria.filters.remarks)||void 0===L?void 0:L.text),this.sd.set("transit",this.criteria.filters.transitLines.transitLineIds),this.sd.set("furnished",this.criteria.filters.furnished.isRequired?1:0),this.sd.set("outdoorSpace",this.criteria.filters.outdoorSpace.isRequired?1:0),this.sd.set("fireplace",this.criteria.filters.fireplace.isRequired?1:0),this.sd.set("hardwoodFloor",this.criteria.filters.hardwoodFloor.isRequired?1:0),this.sd.set("hasInLawSuite",this.criteria.filters.hasInLawSuite.isRequired?1:0),this.sd.set("accessibility",this.criteria.filters.accessibility.isRequired?1:0),this.sd.set("seniorCommunity",this.criteria.filters.seniorCommunity.isRequired?1:0)}this.bounds=new s.Bounds(this.criteria.boundingBox.latitude.maximum,this.criteria.boundingBox.latitude.minimum,this.criteria.boundingBox.longitude.maximum,this.criteria.boundingBox.longitude.minimum),this.url=i.savedSearches.getSavedSearchUrl(this),e.Description||(this.description=i.savedSearches.getSearchSummary(this))},s.HSSavedSearchTypeEnum=function(t){i.ajax.addType(this,"HSSavedSearchTypeEnum"),this.raw=t,this.implicit=1===t,this.explicit=2===t},s.HSListingsSortTypeEnum=function(t){i.ajax.addType(this,"HSListingsSortTypeEnum"),this.raw=t,this.none=0===t,this.dateAuto=1===t,this.bedroomsDescending=2===t,this.bathroomsDescending=3===t,this.priceAscending=4===t,this.priceDescending=5===t,this.sqFtDescending=6===t,this.yearBuiltDescending=7===t,this.distanceFromLocation=8===t},s.HSSavedSearchesCreateResult=function(t){i.ajax.addType(this,"HSSavedSearchesCreateResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode}},s.HSSavedSearchesDeleteResult=function(t){i.ajax.addType(this,"HSSavedSearchesDeleteResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode}},s.HSMiscSignGoogleMapResult=function(t){this.url=t.URL,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,urlNotValid:2===t.ErrorCode,urlNotFullyQualified:3===t.ErrorCode,urlIsSigned:4===t.ErrorCode,apiKeyMissing:5===t.ErrorCode,apiKeyNotAllowed:6===t.ErrorCode,paramsRequired:7===t.ErrorCode}},s.HSListingVirtualTourMatterport=function(t,e){e||s.HSListingVirtualTour.call(this,t,!0),i.ajax.addType(this,"HSListing3DVirtualTour"),i.ajax.addType(this,"HSListingVirtualTourMatterport")},s.HSListing3DVirtualTour=function(t,e){e||s.HSListingVirtualTour.call(this,t,!0),i.ajax.addType(this,"HSListing3DVirtualTour")},s.HSListingVirtualTour=function(t){switch(i.ajax.addType(this,"HSListingVirtualTour"),this.name=t.Name,this.description=t.Description,this.url=t.URL,this.order=t.Order,this.posterImageURL=t.PosterImageURL,i.ajax.getHSType(t.__type)){case"HSListingVirtualTourMatterport":s.HSListingVirtualTourMatterport.call(this,t,!0);break;case"HSListing3DVirtualTour":s.HSListing3DVirtualTour.call(this,t,!0)}},s.HSListingDocument=function(t){i.ajax.addType(this,"HSListingDocument"),this.caption=t.Caption,this.description=t.Description,this.url=t.URL,this.order=t.Order},s.HSListingLink=function(t){switch(i.ajax.addType(this,"HSListingLink"),i.ajax.getHSType(t.__type)){case"HSListingVirtualTourMatterport":case"HSListingWebsiteVirtualTour":case"HSListing3DVirtualTour":s.HSListingVirtualTour.call(this,t,!0);break;case"HSListingBrokerLink":s.HSListingBrokerLink.call(this,t,!0)}},s.HSListingBrokerLink=function(t){i.ajax.addType(this,"HSListingBrokerLink"),this.name=t.Name,this.description=t.Description,this.url=t.URL},s.HSCommuteTimeCreateErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.notSupported=2===t,this.notInMetroArea=3===t},s.HSCommuteTimeCreateResult=function(t){i.ajax.addType(this,"HSCommuteTimeCreateResult"),this.id=t.ID,this.errorCode=new s.HSCommuteTimeCreateErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText},s.HSPlace=function(t){
i.ajax.addType(this,"HSPlace"),this.id=t.ID,this.latitude=t.Latitude,this.longitude=t.Longitude,this.name=t.Name,this.address=t.Address},s.HSCommuteTimePlace=function(t){i.ajax.addType(this,"HSCommuteTimePlace"),this.minutes=t.Minutes,this.mode=new s.HSCommuteTimeTransportationModeEnum(t.Mode),s.HSPlace.call(this,t)},s.HSCommuteTimeTransportationModeEnum=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;i.ajax.addType(this,"HSCommuteTimeTransportationModeEnum"),this.raw=t,this.driving=1==(1&t),this.transit=2==(2&t),this.walking=4==(4&t),this.cycling=8==(8&t)},s.HSCommuteTime=function(t){i.ajax.addType(this,"HSCommuteTime"),this.distance={raw:t.Distance,miles:Math.round(t.Distance/1609.344)},this.duration={raw:t.Duration,minutes:Math.round(t.Duration/60)},this.durationInTraffic={raw:t.DurationInTraffic,minutes:Math.round(t.DurationInTraffic/60)},this.status={raw:t.Status,none:0===t.Status,estimated:1==(1&t.Status),withinMinutes:2==(2&t.Status),notWithinMinutes:4==(4&t.Status),unknown:8==(8&t.Status)},t.Place&&(this.place=new s.HSCommuteTimePlace(t.Place))},s.HSCommuteTimeGetPolygonErrorCodeEnum=function(t){i.ajax.addType(this,"HSCommuteTimeGetPolygonErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.noResults=2===t},s.HSCommuteTimeGetPolygonResult=function(t){i.ajax.addType(this,"HSCommuteTimeGetPolygonResult"),this.polygon=t.Polygon,this.north=t.North,this.south=t.South,this.east=t.East,this.west=t.West,this.errorCode=new s.HSCommuteTimeGetPolygonErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText},s.HSCommuteTimeTileModes=function(t){i.ajax.addType(this,"HSCommuteTimeTileModes"),this.default=new s.HSCommuteTimeTransportationModeEnum(t.Default||1),this.available=new s.HSCommuteTimeTransportationModeEnum(t.Available||1)},s.HSPointOfInterest=function(t,e){var r=this;e||s.HSEntityItem.call(this,t,!0),i.ajax.addType(this,"HSPointOfInterest"),this.description=t.Description,this.id=t.ID,this.name=t.Name,t.Shapes&&(this.shapes=[],t.Shapes.forEach(function(t){r.shapes.push(new s.HSPointOfInterestShape(t))})),t.Status&&(this.status=new s.HSPointOfInterestStatusEnum(t.Status)),t.SubType&&(this.subType=new s.HSPointOfInterestSubTypeEnum(t.SubType)),t.TransportModes&&(this.transportModes=new s.HSPointOfInterestTransportModes(t.TransportModes)),t.Type&&(this.type=new s.HSPointOfInterestTypeEnum(t.Type))},s.HSPointOfInterestTypeEnum=function(t){i.ajax.addType(this,"HSPointOfInterestTypeEnum"),this.raw=t,this.none=0==(0&t),this.lightRail=1==(1&t),this.train=2==(2&t)},s.HSPointOfInterestSubTypeEnum=function(t){i.ajax.addType(this,"HSPointOfInterestSubTypeEnum"),this.raw=t,this.nycSubway=1===t,this.dcMetro=2===t,this.vre=3===t},s.HSPointOfInterestStatusEnum=function(t){i.ajax.addType(this,"HSPointOfInterestStatusEnum"),this.raw=t,this.none=0==(0&t),this.hasParking=1==(1&t)},s.HSPointOfInterestShape=function(t){i.ajax.addType(this,"HSPointOfInterestShape"),this.id=t.Id,this.color=t.Color,this.text=t.Text,this.textColor=t.TextColor,t.Type&&(this.type=new s.HSPointOfInterestShapeTypeEnum(t.Type))},s.HSPointOfInterestShapeTypeEnum=function(t){i.ajax.addType(this,"HSPointOfInterestShapeTypeEnum"),this.raw=t,this.circle=1===t,this.square=2===t,this.diamond=3===t},s.HSPointOfInterestTransportModes=function(t){i.ajax.addType(this,"HSPointOfInterestTransportModes"),t.Foot&&(this.foot=new s.HSPointOfInterestTransportInfo(t.Foot)),t.Bike&&(this.bike=new s.HSPointOfInterestTransportInfo(t.Bike)),t.Car&&(this.car=new s.HSPointOfInterestTransportInfo(t.Car))},s.HSPointOfInterestTransportInfo=function(t){i.ajax.addType(this,"HSPointOfInterestTransportInfo"),this.distance=t.Distance,this.duration=i.date.getDuration(t.Duration)},s.HSDateValuePair=function(t){i.ajax.addType(this,"HSDateValuePair"),this.date=i.date.getDateInfo(t.Date),this.value=t.Value,void 0!==t.ValueInt&&(this.valueInt=i.string.getNumber(t.ValueInt))},s.HSGmbLocationResultErrorCodeEnum=function(t){i.ajax.addType(this,"HSGmbLocationResultErrorCodeEnum"),this.raw=t,this.none=0===t,this.success=200===t,this.noContent=204===t,this.unauthorized=401===t,this.forbidden=403===t,this.notFound=404===t,this.unknownError=500===t},s.HSGmbLocationErrorCodeEnum=function(t){i.ajax.addType(this,"HSGmbLocationErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidURL=4===t,this.badGateway=5===t,this.timeoutError=6===t,this.unhandledError=7===t,this.badRequest=8===t},s.HSGmbLocation=function(t){if(i.ajax.addType(this,"HSGmbLocation"),this.id=t.ID,this.businessName=t.BusinessName,this.city=t.City,this.postalCode=t.PostalCode,this.primaryPhone=i.string.getPhoneNumber(t.PrimaryPhone),this.state=t.State,this.streetAddress=t.StreetAddress,this.websiteURL=t.WebsiteURL,this.description=t.Description,this.averageRating=i.string.getNumber(t.AverageRating),this.totalReviews=i.string.getNumber(t.TotalReviews),this.totalViews=i.string.getNumber(t.TotalViews),this.totalSearches=i.string.getNumber(t.TotalSearches),this.totalActions=i.string.getNumber(t.TotalActions),this.mapsURL=t.MapsURL,this.newReviewURL=t.NewReviewURL,this.searchURL=t.SearchURL,this.profileImageURL=t.ProfileImageURL,this.coverImageURL=t.CoverImageURL,this.logoImageURL=t.LogoImageURL,this.status=new s.HSGmbLocationResultErrorCodeEnum(t.Status||0),this.errorCode=new s.HSGmbLocationErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText,void 0!==t.HoursMode&&(this.hoursMode=new s.HSGmbHoursEnum(t.HoursMode)),t.HoursOptions){this.hoursOptions=[];for(var e=0;e<t.HoursOptions.length;e++)this.hoursOptions.push(new s.HSKeyValuePair(t.HoursOptions[e]))}if(t.Hours){this.hours=[];for(var r=0;r<t.Hours.length;r++)this.hours.push(new s.HSGmbHours(t.Hours[r]))}if(t.AutomationSettings){this.automationSettings=[];for(var n=0;n<t.AutomationSettings.length;n++)this.automationSettings.push(new s.HSGmbAutomationSetting(t.AutomationSettings[n]))}},s.HSGmbHoursEnum=function(t){i.ajax.addType(this,"HSGmbHoursEnum"),this.raw=t,this.nineToFive=0===t,this.twentyFourSeven=1===t,this.custom=3===t},s.HSGmbHours=function(t){i.ajax.addType(this,"HSGmbHours"),this.day=t.Day,this.openTime=t.OpenTime,this.closeTime=t.CloseTime},s.HSGmbAutomationSetting=function(t){i.ajax.addType(this,"HSGmbAutomationSetting"),this.code=t.Code,this.description=t.Description,this.enabled=t.Enabled},s.HSGmbLocationMetadata=function(t){i.ajax.addType(this,"HSGmbLocationMetadata"),this.description=t.Description||null,this.openTime=t.OpenTime||null,this.closeTime=t.CloseTime||null},s.HSGmbLocationResult=function(t){if(i.ajax.addType(this,"HSGmbLocationResult"),this.entity=t.Entity?new s.HSUserItem(t.Entity):null,this.errorCode={raw:t.ErrorCode,success:200===t.ErrorCode,noContent:204===t.ErrorCode,unauthorized:401===t.ErrorCode,forbidden:403===t.ErrorCode,notFound:404===t.ErrorCode,unknownError:500===t.ErrorCode},this.errorText=t.ErrorText,this.invitationUrl=t.InvitationURL||null,t.Locations){this.locations=[];for(var e=0;e<t.Locations.length;e++)this.locations.push(new s.HSGmbLocation(t.Locations[e]))}},s.HSGmbPost=function(t){i.ajax.addType(this,"HSGmbPost"),this.id=t.ID,this.imageURL=t.ImageURL,this.summary=t.Summary,this.url=t.URL,this.actionURL=t.ActionURL,this.errorText=t.ErrorText,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notFound:2===t.ErrorCode,unauthorized:3===t.ErrorCode},this.description=t.Description,t.ActionType&&(this.actionType=new s.HSGmbActionTypeEnum(t.ActionType))},s.HSGmbActionTypeEnum=function(t){i.ajax.addType(this,"HSGmbActionTypeEnum"),this.raw=t,this.actionTypeUnspecified=0===t,this.book=1===t,this.callNow=2===t,this.learnMore=3===t,this.order=4===t,this.shop=5===t,this.signUp=6===t},s.HSGmbMediaItem=function(t){i.ajax.addType(this,"HSGmbMediaItem"),this.id=t.ID,this.thumbnailURL=t.ThumbnailURL,this.sourceURL=t.SourceURL,this.errorText=t.ErrorText,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notFound:2===t.ErrorCode,unauthorized:3===t.ErrorCode,invalidUrl:4===t.ErrorCode},this.status=t.Status,this.usage={raw:t.Usage,none:0===t.Usage,canBeCover:1===t.Usage,canBeProfile:2===t.Usage},t.Category&&(this.category=new s.HSGmbMediaItemCategoryEnum(t.Category))},s.HSGmbMediaItemCategoryEnum=function(t){i.ajax.addType(this,"HSGmbMediaItemCategoryEnum"),this.raw=t,this.unknown=0===t,this.additional=1===t,this.atWork=2===t,this.categoryUnspecified=3===t,this.commonArea=4===t,this.cover=5===t,this.exterior=6===t,this.foodAndDrink=7===t,this.tnterior=8===t,this.logo=9===t,this.menu=10===t,this.product=11===t,this.profile=12===t,this.rooms=13===t,this.teams=14===t},s.HSGmbMetricPeriod=function(t){if(i.ajax.addType(this,"HSGmbMetricPeriod"),this.name=t.Name,this.description=t.Description,this.date=i.date.getDateInfo(t.Date),this.total=i.string.getNumber(t.Total),t.TimePeriod&&(this.timePeriod=new s.HSGmbMetricTimePeriodEnum(t.TimePeriod)),t.MetricType&&(this.metricType=new s.HSGmbMetricTypeEnum(t.MetricType)),t.PrimaryMeasurement&&(this.primaryMeasurement=new s.HSGmbMetricMeasure(t.PrimaryMeasurement)),t.Metrics){this.metrics=[];for(var e=0;e<t.Metrics.length;e++)this.metrics.push(new s.HSGmbMetric(t.Metrics[e]))}},s.HSGmbMetricTimePeriodEnum=function(t){i.ajax.addType(this,"HSGmbMetricTimePeriodEnum"),this.raw=t,this.sevenDays=10===t,this.thirtyDays=20===t,this.sixtyDays=30===t,this.ninetyDays=40===t,this.monthToDate=50===t,this.yearToDate=60===t,this.all=100===t},s.HSGmbMetricTypeEnum=function(t){i.ajax.addType(this,"HSGmbMetricTypeEnum"),this.raw=t,this.searches=1===t,this.views=2===t,this.actions=3===t,this.postViews=4===t,this.photoViews=5===t},s.HSGmbMetricMeasure=function(t){i.ajax.addType(this,"HSGmbMetricMeasure"),this.name=t.Name,this.label=t.Label,this.value=i.string.getPercent(t.Value,100)},s.HSGmbMetric=function(t){if(i.ajax.addType(this,"HSGmbMetric"),this.name=t.Name,this.description=t.Description,this.total=t.Total,this.value=t.Value,t.Values){this.values=[];for(var e=0;e<t.Values.length;e++)this.values.push(new s.HSDateValuePair(t.Values[e]))}if(t.Totals){this.totals=[];for(var r=0;r<t.Totals.length;r++)this.totals.push(new s.HSDateValuePair(t.Totals[r]))}switch(i.ajax.getHSType(t.__type)){case"HSGmbPostMetric":this.post=new s.HSGmbPostMetricDetails(t.Post);break;case"HSGmbMediaItemMetric":this.mediaItem=new s.HSGmbMediaItemMetricDetails(t.MediaItem)}},s.HSGmbPostMetricDetails=function(t){i.ajax.addType(this,"HSGmbPostMetricDetails"),this.id=t.ID,this.url=t.URL,this.imageURL=t.ImageURL},s.HSGmbMediaItemMetricDetails=function(t){i.ajax.addType(this,"HSGmbMediaItemMetricDetails"),this.id=t.ID,this.url=t.URL,this.thumbnailURL=t.ThumbnailURL,this.createTime=i.date.getDateInfo(t.CreateTime)},s.HSGmbReview=function(t){if(i.ajax.addType(this,"HSGmbReview"),this.id=t.ID,this.locationID=t.LocationID,this.locationCode=t.LocationCode,this.resourceName=t.ResourceName,this.reviewer=t.Reviewer,this.isAnonymous=t.IsAnonymous,this.comment=t.Comment,this.starRating=t.StarRating,this.replyComment=t.ReplyComment,t.SuggestedReplyComments){this.suggestedReplyComments=[];for(var e=0;e<t.SuggestedReplyComments.length;e++)this.suggestedReplyComments.push(t.SuggestedReplyComments[e])}this.createTime=i.date.getDateInfo(t.CreateTime),this.updateTime=i.date.getDateInfo(t.UpdateTime)},s.HSLocationActivity=function(t){i.ajax.addType(this,"HSLocationActivity"),this.iconURL=t.IconURL,this.text=t.Text,this.url=t.URL,this.date=i.date.getDateInfo(t.Date),t.ActivityType&&(this.activityType=new s.HSLocationActivityType(t.ActivityType))},s.HSLocationActivityType=function(t){i.ajax.addType(this,"HSLocationActivityType"),this.raw=t,this.photo=1===t,this.video=2===t,this.localPost=3===t,this.review=4===t,this.other=99===t},s.HSGmbLeadPageTemplate=function(t){i.ajax.addType(this,"HSGmbLeadPageTemplate"),this.name=t.Name,this.description=t.Description,this.url=t.URL,this.destinationURL=t.DestinationURL},s.HSGmbStockMediaLibrary=function(t){if(i.ajax.addType(this,"HSGmbStockMediaLibrary"),this.title=t.Title,t.Items){this.items=[];for(var e=0;e<t.Items.length;e++)this.items.push(new s.HSGmbStockMediaItem(t.Items[e]))}},s.HSGmbStockMediaItem=function(t){i.ajax.addType(this,"HSGmbStockMediaItem"),this.id=t.ID,this.url=t.URL,this.thumbnailURL=t.ThumbnailURL},s.HSGmbReviewResult=function(t){if(i.ajax.addType(this,"HSGmbReviewResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notFound:2===t.Unauthorized,unauthorized:3===t.Unauthorized,invalidURL:4===t.Unauthorized,badGateway:5===t.Unauthorized,timeoutError:6===t.Unauthorized,unhandledError:7===t.Unauthorized,badRequest:8===t.Unauthorized},this.errorText=t.ErrorText,t.Data){this.data=[];for(var e=0;e<t.Data.length;e++)this.data.push(new s.HSGmbReview(t.Data[e]))}},s.HSGmbLocationResultWithData=function(t){i.ajax.addType(this,"HSGmbLocationResultWithData"),this.errorCode={raw:t.ErrorCode,success:200===t.ErrorCode,noContent:204===t.ErrorCode,unauthorized:401===t.Unauthorized,forbidden:403===t.Unauthorized,notFound:404===t.Unauthorized,unknownError:500===t.Unauthorized},this.errorText=t.ErrorText,this.status=new s.HSSubscriptionProPlusConfigStateEnum(t.Status),t.Data&&(this.data=new s.HSGmbLocation(t.Data))},s.HSGmbPostResult=function(t){if(i.ajax.addType(this,"HSGmbPostResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notFound:2===t.Unauthorized,unauthorized:3===t.Unauthorized,failedToUploadMedia:4===t.Unauthorized},this.errorText=t.ErrorText,t.Data){this.data=[];for(var e=0;e<t.Data.length;e++)this.data.push(new s.HSGmbPost(t.Data[e]))}},s.HSGmbMediaItemResult=function(t){if(i.ajax.addType(this,"HSGmbMediaItemResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notFound:2===t.Unauthorized,unauthorized:3===t.Unauthorized,invalidURL:4===t.Unauthorized,failedToUploadMedia:5===t.Unauthorized,failedToChangeCategory:6===t.Unauthorized},this.errorText=t.ErrorText,t.Data){this.data=[];for(var e=0;e<t.Data.length;e++)this.data.push(new s.HSGmbMediaItem(t.Data[e]))}},s.HSSubscriptionProPlusConfig=function(t){i.ajax.addType(this,"HSSubscriptionProPlusConfig"),this.id=t.ID,this.promoImageURL=t.PromoImageURL,this.errorText=t.ErrorText,this.errorCode=new s.HSSubscriptionProPlusConfigErrorCodeEnum(t.ErrorCode),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.Location&&(this.location=new s.HSGmbLocation(t.Location)),t.State&&(this.state=new s.HSSubscriptionProPlusConfigStateEnum(t.State)),t.Animations&&(this.animations=new s.HSSubscriptionProPlusSaleAnimation(t.Animations))},s.HSSubscriptionProPlusConfigErrorCodeEnum=function(t){i.ajax.addType(this,"HSSubscriptionProPlusConfigErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.unauthorized=2===t,this.ineligible=3===t},s.HSSubscriptionProPlusConfigStateEnum=function(t){i.ajax.addType(this,"HSSubscriptionProPlusConfigStateEnum"),this.raw=t,this.none=0===t,this.running=1===t,this.unclaimed=2===t,this.unavailable=3===t,this.unfulfilled=4===t},s.HSSubscriptionProPlusOrderSummary=function(t){if(i.ajax.addType(this,"HSSubscriptionProPlusOrderSummary"),t.Options){this.options=[];for(var e=0;e<t.Options.length;e++)this.options.push(new s.HSSubscriptionProPlusOrderOption(t.Options[e]))}},s.HSSubscriptionProPlusOrderOption=function(t){if(i.ajax.addType(this,"HSSubscriptionProPlusOrderOption"),this.id=t.ID,this.discountPercentage=i.string.getPercent(t.DiscountPercentage,100),this.total=new s.HSSubscriptionProPlusIntervalPrice(t.Total),this.amountDue=i.string.getPrice(t.AmountDue),this.status={raw:t.Status,none:0===t.Status,isSelected:1===t.Status},t.BillingInterval&&(this.billingInterval=new s.HSSubscriptionProPlusBillingInterval(t.BillingInterval)),t.Credit&&(this.credit=new s.HSSubscriptionProPlusOrderSummaryLineItem(t.Credit)),t.LineItems){this.lineItems=[];for(var e=0;e<t.LineItems.length;e++){switch(i.ajax.getHSType(t.LineItems[e].__type)){case"HSSubscriptionProPlusOrderSummaryLineSubItem":this.lineItems.push(new s.HSSubscriptionProPlusOrderSummaryLineSubItem(t.LineItems[e]));break;case"HSSubscriptionProPlusOrderSummaryDiscountLineItem":this.lineItems.push(new s.HSSubscriptionProPlusOrderSummaryDiscountLineItem(t.LineItems[e]));break;case"HSSubscriptionProPlusOrderSummaryLineItem":default:this.lineItems.push(new s.HSSubscriptionProPlusOrderSummaryLineItem(t.LineItems[e]))}}}},s.HSSubscriptionProPlusIntervalPrice=function(t){i.ajax.addType(this,"HSSubscriptionProPlusIntervalPrice"),this.total=i.string.getPrice(t.Total),t.BillingInterval&&(this.billingInterval=new s.HSSubscriptionProPlusBillingInterval(t.BillingInterval))},s.HSSubscriptionProPlusOrderSummaryLineItem=function(t){i.ajax.addType(this,"HSSubscriptionProPlusOrderSummaryLineItem"),this.name=t.Name,this.price=i.string.getPrice(t.Price),t.BillingInterval&&(this.billingInterval=new s.HSSubscriptionProPlusBillingInterval(t.BillingInterval))},s.HSSubscriptionProPlusOrderSummaryLineSubItem=function(t,e){e||s.HSSubscriptionProPlusOrderSummaryLineItem.call(this,t,!0),i.ajax.addType(this,"HSSubscriptionProPlusOrderSummaryLineSubItem"),this.description=t.Description,this.feature={raw:t.Feature,all:0===t.Feature,googleProfile:1===t.Feature,photoArchive:2===t.Feature,enhancedHomesnapProfile:3===t.Feature,listingLeadPages:4===t.Feature,whoViewed:5===t.Feature}},s.HSSubscriptionProPlusOrderSummaryDiscountLineItem=function(t,e){e||s.HSSubscriptionProPlusOrderSummaryLineItem.call(this,t,!0),i.ajax.addType(this,"HSSubscriptionProPlusOrderSummaryDiscountLineItem")},s.HSSubscriptionProPlusBillingInterval=function(t){i.ajax.addType(this,"HSSubscriptionProPlusBillingInterval"),this.raw=t,this.yearly=1===t,this.monthly=2===t},s.HSSubscriptionProPlus=function(t){i.ajax.addType(this,"HSSubscriptionProPlus"),this.id=t.ID,this.errorText=t.ErrorText,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,unauthorized:2===t.ErrorCode,ineligible:3===t.ErrorCode,invalidParameters:4===t.ErrorCode,failedPayment:5===t.ErrorCode,alreadyExists:6===t.ErrorCode,priceMismatch:7===t.ErrorCode},t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.Location&&(this.location=new s.HSGmbLocation(t.Location))},s.HSSubscriptionProPlusRequestOwnershipResult=function(t){i.ajax.addType(this,"HSSubscriptionProPlusRequestOwnershipResult"),this.errorText=t.ErrorText,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,invalidEmail:2===t.ErrorCode}},s.HSSubscriptionProPlusConfirmLocationResult=function(t){i.ajax.addType(this,"HSSubscriptionProPlusConfirmLocationResult"),this.errorText=t.ErrorText,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode}},s.HSSubscriptionProPlusSaleAnimation=function(t){if(t.Desktop){this.desktop=[];for(var e=0;e<t.Desktop.length;e++)this.desktop.push(new s.HSLottieAnimation(t.Desktop[e]))}if(t.Mobile){this.mobile=[];for(var i=0;i<t.Mobile.length;i++)this.mobile.push(new s.HSLottieAnimation(t.Mobile[i]))}if(t.Assets){this.assets=[];for(var r=0;r<t.Assets.length;r++)this.assets.push(new s.HSLottieAnimationAsset(t.Assets[r]))}this.screenshotsBucket=t.ScreenshotsBucket,this.pusherTimeout=t.PusherTimeout||15e3},s.HSSubscriptionProPlusFeatureEnum=function(t){this.raw=t,this.all=0===t,this.googleProfile=1===t,this.flashbackPhotos=2===t,this.enhancedHomesnapProfile=3===t,this.listingLeadPages=4===t,this.whoViewedMyProfile=5===t,i.ajax.addType(this,"HSSubscriptionProPlusFeatureEnum ")},s.HSGmbAsset=function(t){this.imageURL=t.ImageURL,this.description=t.Description},s.HSGmbAssetGooglePreviewResultErrorCodeEnum=function(t){this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidURL=4===t,this.badGateway=5===t,this.timeoutError=6===t,this.unhandledError=7===t,this.badRequest=8===t},s.HSSubscriptionProPlusPreviewsUpdatedEvent=function(t){if(this.cached=t.Cached,this.compositeScreenShot=t.CompositeScreenShot,this.errorCode=new s.HSGmbAssetGooglePreviewResultErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText,this.hasMatch=t.HasMatch,this.hasWebResult=t.HasWebResult,t.Assets){this.assets=[];for(var e=0;e<t.Assets.length;e++)this.assets.push(new s.HSLottieAnimationAsset(t.Assets[e]))}},s.HSLottieAnimationAssetTypeEnum=function(t){this.text=0===t,this.image=1===t},s.HSLottieAnimationDeviceTypeEnum=function(t){this.all=0===t,this.desktop=1===t,this.mobile=2===t},s.HSLottieAnimation=function(t){this.name=t.Name,this.extension=t.Extension,this.url=t.URL},s.HSLottieAnimationAsset=function(t){this.deviceType=new s.HSLottieAnimationDeviceTypeEnum(t.DeviceType),this.assetType=new s.HSLottieAnimationAssetTypeEnum(t.AssetType),this.name=t.Name,this.value=t.Value,this.queryString=t.QueryString},s.HSMLSFeedbackConfig=function(t){i.ajax.addType(this,"HSMLSFeedbackConfig"),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),this.feedbackType=new s.HSMLSFeedbackTypeEnum(t.FeedbackType),this.status=t.Status,this.errorCode={raw:t.ErrorCode,sucess:0===t.ErrorCode,unknownError:1===t.unknowErrorCodeError,invalidParameters:2===t.ErrorCode},this.errorText=t.ErrorText},s.HSMLSFeedbackTypeEnum=function(t){i.ajax.addType(this,"HSMLSFeedbackTypeEnum"),this.raw=t,this.interestLevel=0===t,this.interestLevelWithMessage=1===t},s.HSListingHistoricalMedia=function(t){i.ajax.addType(this,"HSListingHistoricalMedia"),this.posterImageURL=t.PosterImageURL,t.Listing&&(this.listing=new s.HSPropertyAddressItem(t.Listing))},s.HSStoryListResult=function(t){if(i.ajax.addType(this,"HSStoryListResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unauthorized:1===t.Unauthorized},this.errorText=t.ErrorText,t.Data){this.data=[];for(var e=0;e<t.Data.length;e++)this.data.push(new s.HSStory(t.Data[e]))}},s.HSStory=function(t){i.ajax.addType(this,"HSStory"),this.id=t.ID,this.title=t.Title,this.description=t.Description,t.CreativeType&&(this.creativeType=new s.HSAdCreativeTypeEnum(t.CreativeType)),t.Owner&&(this.owner=new s.HSEntityItem(t.Owner)),t.EntityContent&&(this.entityContent=new s.HSEntityContent(t.EntityContent))},s.HSStoryGetStatsResult=function(t){i.ajax.addType(this,"HSStoryGetStatsResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unauthorized:1===t.Unauthorized},this.errorText=t.ErrorText,t.Data&&(this.data=new s.HSStoryStats(t.Data))},s.HSStoryStats=function(t){if(i.ajax.addType(this,"HSStoryStats"),this.id=t.ID,this.views=i.string.getNumber(t.Views),this.uniqueViews=i.string.getNumber(t.UniqueViews),t.ViewedBy){this.viewedBy=[];for(var e=0;e<t.ViewedBy.length;e++)this.viewedBy.push(new s.HSEntityItem(t.ViewedBy[e]))}},s.HSStoryGroupListByOwnerResult=function(t){if(i.ajax.addType(this,"HSStoryGroupListByOwnerResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unauthorized:1===t.Unauthorized},this.errorText=t.ErrorText,t.Data){this.data=[];for(var e=0;e<t.Data.length;e++)this.data.push(new s.HSStoryGroups(t.Data[e]))}},s.HSStoryGroups=function(t){if(i.ajax.addType(this,"HSStoryGroups"),this.associatedEntityID={entityType:t.AssociatedEntityID.EntityType,entityID:t.AssociatedEntityID.EntityID},t.AssociatedPropertyAddressItem&&(this.associatedPropertyAddressItem=new s.HSPropertyAddressItem(t.AssociatedPropertyAddressItem)),t.Stories){this.stories=[];for(var e=0;e<t.Stories.length;e++)this.stories.push(new s.HSStory(t.Stories[e]))}},s.HSListingSearchCriteria=function(t){if(i.ajax.addType(this,"HSListingSearchCriteria"),this.comingSoon=t.ComingSoon,this.active=t.Active,this.openHouse=t.OpenHouse,this.brokerOpen=t.BrokerOpen,this.contract=t.Contract,this.sold=t.Sold,this.boundingBox={latitude:{minimum:t.BoundingBox&&t.BoundingBox.Latitude?t.BoundingBox.Latitude.Minimum:null,maximum:t.BoundingBox&&t.BoundingBox.Latitude?t.BoundingBox.Latitude.Maximum:null},longitude:{minimum:t.BoundingBox&&t.BoundingBox.Longitude?t.BoundingBox.Longitude.Minimum:null,maximum:t.BoundingBox&&t.BoundingBox.Longitude?t.BoundingBox.Longitude.Maximum:null}},this.boundingBox.latitude.minimum&&this.boundingBox.latitude.maximum&&this.boundingBox.longitude.minimum&&this.boundingBox.longitude.maximum||(this.boundingBox={latitude:{minimum:24.7433195,maximum:49.357868},longitude:{minimum:-124.7844079,maximum:-66.9513812}}),this.mode=new s.HSExploreSearchModeEnum(t.Mode),this.offMarket=new s.HSListingSearchOffMarketCatgegoryEnum(t.OffMarket),t.Filters&&(this.filters=new s.HSListingSearchFilters(t.Filters)),this.orderBy=new s.HSListingsSortTypeEnum(t.OrderBy),t.Visualization&&(this.visualization=new s.HSExploreSearchVisualizationConfiguration(t.Visualization)),t.Places){this.places=[];for(var e=0;e<t.Places.length;e++)this.places.push(new s.HSCommuteTimePlace(t.Places[e]))}},s.HSExploreSearchModeEnum=function(t){i.ajax.addType(this,"HSExploreSearchModeEnum"),this.raw=t,this.none=0===t,this.forSale=1==(1&t),this.forRent=2==(2&t),this.offMarket=4==(4&t)},s.HSListingSearchOffMarketCatgegoryEnum=function(t){i.ajax.addType(this,"HSListingSearchOffMarketCatgegoryEnum"),this.raw=t,this.none=0===t,this.cancelled=1==(1&t),this.expired=2==(2&t),this.hold=4==(4&t),this.withdrawn=8==(8&t)},s.HSListingSearchFilters=function(t){i.ajax.addType(this,"HSListingSearchFilters"),this.features=t.Features,this.propertyType={raw:t.PropertyType,none:0===t.PropertyType,detached:1==(1&t.PropertyType),townhouse:2==(2&t.PropertyType),condo:4==(4&t.PropertyType),other:8==(8&t.PropertyType),multiFamily:16==(16&t.PropertyType),lotsLands:32==(32&t.PropertyType),mobileManufactured:64==(64&t.PropertyType),commercial:128==(128&t.PropertyType),coop:256==(256&t.PropertyType)},this.date=t.Date,this.openHouseDate=t.OpenHouseDate,this.price={minimum:i.string.getPrice(t.Price.Minimum),maximum:i.string.getPrice(t.Price.Maximum)},this.beds={minimum:t.Beds.Minimum,maximum:t.Beds.Maximum},this.baths={minimum:t.Baths.Minimum,maximum:t.Baths.Maximum},this.yearBuilt={minimum:t.YearBuilt.Minimum,maximum:t.YearBuilt.Maximum},this.squareFeet={minimum:t.SquareFeet.Minimum,maximum:t.SquareFeet.Maximum},this.lotSize={minimum:t.LotSize.Minimum,maximum:t.LotSize.Maximum},this.transactionType=new s.HSTransactionTypeEnum(t.TransactionType),void 0!==t.LikelihoodToList&&(this.likelihoodToList=new s.HSPropertyLikelihoodToListCategoryEnum(t.LikelihoodToList)),void 0!==t.MLSStatus&&(this.mlsStatus=new s.HSPropertyAddressItemMLSStatusEnum(t.MLSStatus)),void 0!==t.Distressed&&(this.distressed=new s.HSPropertyDistressedKindEnum(t.Distressed)),void 0!==t.LastListDate&&(this.lastListDate=new s.HSListingSearchDateRangeEnum(t.LastListDate)),void 0!==t.OwnershipTime&&(this.ownershipTime={minimum:t.OwnershipTime.Minimum,maximum:t.OwnershipTime.Maximum}),t.HomeEquity&&(this.homeEquity={minimum:i.string.getPrice(t.HomeEquity.Minimum),maximum:i.string.getPrice(t.HomeEquity.Maximum)}),t.CashBuyersOnly&&(this.cashBuyersOnly={isRequired:t.CashBuyersOnly.IsRequired}),t.LoanBalance&&(this.loanBalance={minimum:i.string.getPrice(t.LoanBalance.Minimum),maximum:i.string.getPrice(t.LoanBalance.Maximum)}),t.LoanRate&&(this.loanRate={minimum:i.string.getPercent(t.LoanRate.Minimum,100),maximum:i.string.getPercent(t.LoanRate.Maximum,100)}),t.HasNoLoan&&(this.hasNoLoan={isRequired:t.HasNoLoan.IsRequired}),t.LoanAge&&(this.loanAge={minimum:t.LoanAge.Minimum,maximum:t.LoanAge.Maximum}),this.ownershipType=new s.HSPropertyOwnershipTypeEnum(t.OwnershipType),this.loanType=new s.HSPropertyMortgageLoanTypeEnum(t.LoanType),void 0!==t.PriceReduction&&(this.priceReduction=new s.HSListingSearchYesNoKindFilter(t.PriceReduction,"HSListingSearchPriceReductionDateRangeEnum")),t.Floors&&(this.floors=new s.HSListingSearchFloorsFilter(t.Floors)),void 0!==t.SchoolRatings&&(this.schoolRatings=new s.HSListingSearchSchoolsFilter(t.SchoolRatings)),void 0!==t.Association&&(this.association=new s.HSListingSearchHomeOwnersAssociationFilter(t.Association)),void 0!==t.Parking&&(this.parking=new s.HSListingSearchParkingFilter(t.Parking)),void 0!==t.furnished&&(this.furnished=new s.HSListingSearchYesNoFilter(t.Furnished)),void 0!==t.Waterfront&&(this.waterfront=new s.HSListingSearchYesNoFilter(t.Waterfront)),void 0!==t.PropertyView&&(this.propertyView=new s.HSListingSearchPropertyViewFilter(t.PropertyView)),void 0!==t.Basement&&(this.basement=new s.HSListingSearchYesNoKindFilter(t.Basement,"HSListingSearchBasementRestrictionsEnum")),void 0!==t.Cooling&&(this.cooling=new s.HSListingSearchYesNoKindFilter(t.Cooling,"HSListingSearchCoolingKindEnum")),void 0!==t.Heating&&(this.heating=new s.HSListingSearchYesNoKindFilter(t.Heating,"HSListingSearchHeatingKindEnum")),void 0!==t.Pool&&(this.pool=new s.HSListingSearchPoolRestrictionsEnum(t.Pool)),void 0!==t.WalkScore&&(this.walkScore=new s.HSListingSearchWalkScoreEnum(t.WalkScore)),void 0!==t.PetFriendly&&(this.petFriendly=new s.HSListingSearchYesNoFilter(t.PetFriendly)),void 0!==t.Remarks&&(this.remarks=new s.HSListingSearchTextFilter(t.Remarks)),void 0!==t.TransitLines&&(this.transitLines=new s.HSListingSearchTransitFilter(t.TransitLines)),void 0!==t.VirtualTour&&(this.virtualTour=new s.HSListingSearchYesNoFilter(t.VirtualTour)),void 0!==t.Furnished&&(this.furnished=new s.HSListingSearchYesNoFilter(t.Furnished)),void 0!==t.OutdoorSpace&&(this.outdoorSpace=new s.HSListingSearchYesNoFilter(t.OutdoorSpace)),void 0!==t.Fireplace&&(this.fireplace=new s.HSListingSearchYesNoFilter(t.Fireplace)),void 0!==t.HardwoodFloor&&(this.hardwoodFloor=new s.HSListingSearchYesNoFilter(t.HardwoodFloor)),void 0!==t.HasInLawSuite&&(this.hasInLawSuite=new s.HSListingSearchYesNoFilter(t.HasInLawSuite)),void 0!==t.Accessibility&&(this.accessibility=new s.HSListingSearchYesNoFilter(t.Accessibility)),void 0!==t.SeniorCommunity&&(this.seniorCommunity=new s.HSListingSearchYesNoFilter(t.SeniorCommunity)),t.Shape&&(this.shape=new s.HSListingSearchCustomPolygon(t.Shape)),t.Geography&&(this.geography=new s.HSListingSearchGeographyFilter(t.Geography))},s.HSListingSearchCustomPolygon=function(t){if(i.ajax.addType(this,"HSListingSearchCustomPolygon"),this.encodedPolygons=t.EncodedPolygons,t.Paths){this.paths=[];for(var e=0;t.Paths.length,e++;)this.paths.push(t.Paths[e])}},s.HSListingSearchGeographyFilter=function(t){i.ajax.addType(this,"HSListingSearchGeographyFilter"),this.type={raw:t.Type,none:0===t.Type,area:1===t.Type,school:2===t.Type,street:3===t.Type},this.id=t.Id},s.HSListingSearchPriceReductionDateRangeEnum=function(t){i.ajax.addType(this,"HSListingSearchPriceReductionDateRangeEnum"),this.raw=t,this.none=0===t,this.any=1===t,this.pastDay=2===t,this.pastThreeDays=3===t,this.pastWeek=4===t,this.pastTwoWeeks=5===t,this.pastMonth=6===t,this.overOneMonth=7===t,this.overTwoMonths=8===t,this.overThreeMonths=9===t},s.HSPropertyLikelihoodToListCategoryEnum=function(t){i.ajax.addType(this,"HSPropertyLikelihoodToListCategoryEnum"),this.raw=t,this.unknown=0===t,this.none=0===t,this.leastLikely=1==(1&t),this.likely=2==(2&t),this.mostLikely=4==(4&t)},s.HSPropertyDistressedKindEnum=function(t){i.ajax.addType(this,"HSPropertyDistressedKindEnum"),this.raw=t,this.none=0===t,this.lisPendens=1==(1&t),this.noticeOfDefault=2==(2&t),this.noticeOfForeclosureSale=4==(4&t),this.noticeOfTrusteeSale=8==(8&t),this.noticeofRescission=16==(16&t.Distressed),this.reRecordedNoticeofRescission=262144==(262144&t.Distressed)},s.HSListingSearchDateRangeEnum=function(t){i.ajax.addType(this,"HSListingSearchDateRangeEnum"),this.raw=t,this.any=0===t,this.today=1===t,this.over1Week=2===t,this.over1Month=3===t,this.over1Quarter=4===t,this.over1Half=5===t,this.over1Year=6===t,this.pastWeek=7===t,this.pastMonth=8===t,this.pastQuarter=9===t,this.pastHalf=10===t,this.pastYear=11===t},s.HSExploreSearchVisualizationConfiguration=function(t){i.ajax.addType(this,"HSExploreSearchVisualizationConfiguration"),this.offMarket={activeHeatmap:{raw:t.OffMarket.ActiveHeatmap},likelihoodToList:{raw:t.OffMarket.LikelihoodToList},mlsStatus:{raw:t.OffMarket.MLSStatus},distressed:{raw:t.OffMarket.Distressed},lastListDate:{raw:t.OffMarket.LastListDate},ownershipTime:{raw:t.OffMarket.OwnershipTime},
ownershipType:{raw:t.OffMarket.OwnershipType},homeEquity:{raw:t.OffMarket.HomeEquity},cashBuyers:{raw:t.OffMarket.CashBuyers},loanType:{raw:t.OffMarket.LoanType},loanBalance:{raw:t.OffMarket.LoanBalance},loanAge:{raw:t.OffMarket.LoanAge},loanRate:{raw:t.OffMarket.LoanRate}}},s.HSListingSearchPriceReductionDateRangeEnum=function(t){i.ajax.addType(this,"HSListingSearchPriceReductionDateRangeEnum"),this.raw=t,this.none=0===t,this.any=1===t,this.pastDay=2===t,this.pastThreeDays=3===t,this.pastWeek=4===t,this.pastTwoWeeks=5===t,this.pastMonth=6===t,this.overOneMonth=7===t,this.overTwoMonths=8===t,this.overThreeMonths=9===t},s.HSListingSearchFloorsFilter=function(t){i.ajax.addType(this,"HSListingSearchFloorsFilter"),t.Range&&(this.range=new s.HSListingSearchRangeFilter(t.Range)),void 0!==t.Mode&&(this.mode=new s.HSListingSearchStoriesModeEnum(t.Mode))},s.HSListingSearchStoriesModeEnum=function(t){i.ajax.addType(this,"HSListingSearchStoriesModeEnum"),this.raw=t,this.default=0===t,this.firstFloorMasterOnly=1===t},s.HSListingSearchSchoolsFilter=function(t){i.ajax.addType(this,"HSListingSearchSchoolsFilter"),this.allSchools=new s.HSListingSearchMinimumFilter(t.AllSchools),this.elementarySchool=new s.HSListingSearchMinimumFilter(t.ElementarySchool),this.middleSchool=new s.HSListingSearchMinimumFilter(t.MiddleSchool),this.highSchool=new s.HSListingSearchMinimumFilter(t.HighSchool)},s.HSListingSearchPropertyViewFilter=function(t){i.ajax.addType(this,"HSListingSearchPropertyViewFilter"),this.water=new s.HSListingSearchYesNoKindFilter(t.Water,"HSListingSearchPropertyViewEnum"),this.mountainHills=new s.HSListingSearchYesNoFilter(t.MountainHills),this.woods=new s.HSListingSearchYesNoFilter(t.Woods),this.city=new s.HSListingSearchYesNoFilter(t.City),this.other=new s.HSListingSearchYesNoFilter(t.Other)},s.HSListingSearchPropertyViewEnum=function(t){i.ajax.addType(this,"HSListingSearchPropertyViewEnum"),this.raw=t,this.any=0===t,this.beach=1==(1&t),this.ocean=2==(2&t),this.lake=4==(4&t),this.river=8==(8&t),this.bay=16==(16&t),this.mountains=32==(32&t),this.hills=64==(64&t),this.valleys=128==(128&t),this.woods=256==(256&t),this.city=512==(512&t),this.other=1024==(1024&t)},s.HSListingSearchBasementRestrictionsEnum=function(t){i.ajax.addType(this,"HSListingSearchBasementRestrictionsEnum"),this.raw=t,this.any=0===t,this.finished=1==(1&t),this.partiallyFinished=2==(2&t),this.unfinished=4==(4&t),this.other=8==(8&t)},s.HSListingSearchHeatingKindEnum=function(t){i.ajax.addType(this,"HSListingSearchHeatingKindEnum"),this.raw=t,this.any=0===t,this.central=1==(1&t),this.forcedAir=2==(2&t),this.hotWater=4==(4&t),this.geothermal=8==(8&t),this.radiant=16==(16&t),this.ductless=32==(32&t),this.furnace=64==(64&t),this.other=128==(128&t)},s.HSListingSearchCoolingKindEnum=function(t){i.ajax.addType(this,"HSListingSearchCoolingKindEnum"),this.raw=t,this.any=0===t,this.central=1==(1&t),this.geothermal=2==(2&t),this.ductless=4==(4&t),this.evaporative=8==(8&t),this.other=16==(16&t)},s.HSListingSearchPoolRestrictionsEnum=function(t){i.ajax.addType(this,"HSListingSearchPoolRestrictionsEnum"),this.raw=t,this.any=0===t,this.private=1==(1&t),this.association=2==(2&t),this.community=4==(4&t)},s.HSListingSearchHomeOwnersAssociationFilter=function(t){i.ajax.addType(this,"HSListingSearchHomeOwnersAssociationFilter"),this.totalMonthlyFee=new s.HSListingSearchMaximumFilter(t.TotalMonthlyFee),this.restrictions=new s.HSListingSearchHomeOwnersAssociationRestrictionsEnum(t.Restrictions)},s.HSListingSearchHomeOwnersAssociationRestrictionsEnum=function(t){i.ajax.addType(this,"HSListingSearchHomeOwnersAssociationRestrictionsEnum"),this.raw=t,this.default=0===t,this.noAssociation=1===t},s.HSListingSearchParkingFilter=function(t){i.ajax.addType(this,"HSListingSearchParkingFilter"),this.mustHaveGarage=null===t||void 0===t?void 0:t.MustHaveGarage,void 0!==(null===t||void 0===t?void 0:t.Spaces)&&(this.spaces=new s.HSListingSearchMinimumFilter(null===t||void 0===t?void 0:t.Spaces))},s.HSListingSearchWalkScoreEnum=function(t){i.ajax.addType(this,"HSListingSearchWalkScoreEnum "),this.raw=t,this.any=0===t,this.carDependent=1==(1&t),this.somewhatWalkable=2==(2&t),this.veryWalkable=4==(4&t),this.walkersParadise=8==(8&t)},s.HSListingSearchMaximumFilter=function(t){i.ajax.addType(this,"HSListingSearchMaximumFilter"),this.value=t.Value},s.HSListingSearchMinimumFilter=function(t){i.ajax.addType(this,"HSListingSearchMinimumFilter"),this.value=t.Value},s.HSListingSearchRangeFilter=function(t){i.ajax.addType(this,"HSListingSearchRangeFilter"),this.minimum=t.Minimum,this.maximum=t.Maximum},s.HSListingSearchYesNoFilter=function(t){i.ajax.addType(this,"HSListingSearchYesNoFilter"),this.isRequired=t.IsRequired},s.HSListingSearchYesNoKindFilter=function(t,e){i.ajax.addType(this,"HSListingSearchYesNoKindFilter"),s.HSListingSearchYesNoFilter.call(this,t),this.kind=new s[e](t.Kind)},s.HSListingSearchPricePerSquareDimensionFilter=function(t){i.ajax.addType(this,"HSListingSearchPricePerSquareDimensionFilter"),s.HSListingSearchRangeFilter.call(this,t),this.unit=new s.HSMeasurementUnit(t.Unit)},s.HSListingSearchTextFilter=function(t){i.ajax.addType(this,"HSListingSearchTextFilter"),this.text=t.Text},s.HSListingSearchTransitFilter=function(t){i.ajax.addType(this,"HSListingSearchTransitFilter"),this.Duration=t.Duration,this.transitType=t.TransitType,t.TransitLineIds&&(this.transitLineIds=t.TransitLineIds)},s.HSMeasurementUnit=function(t){i.ajax.addType(this,"HSMeasurementUnit"),this.raw=t,this.none=0===t,this.feet=1===t,this.meters=2===t},s.HSListingAdRunNowResult=function(t){if(i.ajax.addType(this,"HSListingAdRunNowResult"),this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unknownError:1===t.ErrorCode,notRunNowable:2===t.ErrorCode,notFound:3===t.ErrorCode,permissionDenied:4===t.ErrorCode},this.errorText=t.ErrorText,!t.ErrorText)switch(this.errorCode.raw){case 0:this.errorText="Success";break;case 1:this.errorText="Unspecified error, please try again";break;case 2:this.errorText="Run ad now is not available. Please contact Homesnap support";break;case 3:this.errorText="Ad not found";break;case 4:this.errorText="User does not have permission to access this listing";break;case 5:this.errorText="Your ad is already running";break;case 6:this.errorText="Ad is already skipped";break;default:this.errorText="Unspecified error, please try again"}},s.HSBookmark=function(t){i.ajax.addType(this,"HSBookmark"),this.brokerageID=t.BrokerageID,this.type=t.Type,this.name=t.Name,this.url=t.URL},s.HSLikelihoodToList=function(t){var e=this;this.type_="HSLikelihoodToList",this.selectedBucketID=t.SelectedBucketID,t.Scores&&(this.scores=[],t.Scores.forEach(function(t){e.scores.push(new s.HSLikelihoodToListScore(t))})),t.KeyFactors&&(this.keyFactors=[],t.KeyFactors.forEach(function(t){e.keyFactors.push(new s.HSLikelihoodToListKeyFactor(t))}))},s.HSLikelihoodToListScore=function(t){this.type_="HSLikelihoodToListScore",this.id=t.ID,this.minScore=t.MinScore,this.maxScore=t.MaxScore,this.color=t.Color,this.name=t.Name,this.description=t.Description},s.HSLikelihoodToListKeyFactor=function(t){var e=this;this.type_="HSLikelihoodToListKeyFactor",this.id=t.ID,this.value=t.Value,this.label=t.Label,this.description=t.Description,this.bucketID=new s.PropertyIntelligenceKeyFactorEnum(t.BucketID),t.DataPoints&&(this.dataPoints=[],t.DataPoints.forEach(function(t){e.dataPoints.push(new s.HSKeyValueEnhanced(t))}))},s.PropertyIntelligenceKeyFactorEnum=function(t){this.raw=t,this.unknown=0===t,this.leastLikely=1===t,this.likely=2===t,this.mostLikely=4===t},s.HSPropertyHistoryMortgage=function(t){var e=this;this.type_="HSPropertyHistoryMortgage",t.Date&&(this.date=i.date.getDateInfo(t.Date)),this.mortgageStatus=t.MortgageStatus,this.loanAmount=i.string.getPrice(t.LoanAmount),t.MortgageDetails&&(this.mortgageDetails=[],t.MortgageDetails.forEach(function(t){var r=new s.HSKeyValueEnhanced(t);r.dataType.currency&&(r.value=i.string.getPrice(r.value)),e.mortgageDetails.push(r)})),t.AssociatedEntities&&(this.associatedEntities=[],t.AssociatedEntities.forEach(function(t){e.associatedEntities.push(new s.HSUserItem(t))}))},s.HSPropertyHistoryTax=function(t){var e=this;this.type_="HSPropertyHistoryTax",this.year=t.Year,t.TaxPaid&&(this.taxPaid=i.string.getPrice(t.TaxPaid)),t.AssessmentValue&&(this.assessmentValue=i.string.getPrice(t.AssessmentValue)),t.AssessmentValueDetails&&(this.assessmentValueDetails=[],t.AssessmentValueDetails.forEach(function(t){t.Value=i.string.getPrice(t.Value),e.assessmentValueDetails.push(new s.HSKeyValueEnhanced(t))}))},s.HSPropertyHistoryDeed=function(t){var e=this;this.type_="HSPropertyHistoryDeed",t.Date&&(this.date=i.date.getDateInfo(t.Date)),this.deedType=t.DeedType,t.DeedDetails&&(this.deedDetails=[],t.DeedDetails.forEach(function(t){var r=new s.HSKeyValueEnhanced(t);r.dataType.currency&&(r.value=i.string.getPrice(r.value)),e.deedDetails.push(r)})),t.AssociatedEntities&&(this.associatedEntities=[],t.AssociatedEntities.forEach(function(t){e.associatedEntities.push(new s.HSUserItem(t))}))},s.PropertyIntelligencePersonStatusEnum=function(t){this.raw=t,this.none=0===t},s.HSPhoneStatusEnum=function(t){this.raw=t,this.none=0===t,this.doNotCall=1===t},s.HSUserGetSocialMediaAccountsResult=function(t){var e=this;t.Accounts&&(this.accounts=[],t.Accounts.forEach(function(t){e.accounts.push(new s.HSUserSocialMediaAccount(t))})),this.errorCode=new s.HSUserGetSocialMediaAccountsResultErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText},s.HSUserSocialMediaAccount=function(t){this.network=new s.HSUserSocialMediaNetworkEnum(t.Network),this.name=t.Name,this.link=t.Link,this.status=new s.HSUserSocialMediaAccountStatusEnum(t.Status)},s.HSUserGetSocialMediaAccountsResultErrorCodeEnum=function(t){this.raw=t,this.hideSection=-2===t,this.showFindSocialMediaButton=-1===t,this.success=0===t,this.unknownError=1===t,this.entityNotSupported=2===t},s.HSUserSocialMediaNetworkEnum=function(t){this.raw=t,this.unknown=0===t,this.facebook=1===t,this.instagram=2===t,this.twitter=3===t,this.linkedIn=4===t},s.HSUserSocialMediaAccountStatusEnum=function(t){this.raw=t,this.none=0==(0&t),this.teaserOnly=1==(1&t),this.mustUpgradeToProPlus=2==(2&t)},s.HSDataTypeEnum=function(t){this.raw=t,this.string=0===t,this.link=1===t,this.currency=3===t,this.phone=4===t,this.email=5===t,this.percentage=6===t,this.dateTime=7===t},s.HSKeyValueEnhanced=function(t){this.key=t.Key,this.value=t.Value,this.dataType=new s.HSDataTypeEnum(t.DataType)},s.HSClientAdReportEmail=function(t){i.ajax.addType(this,"HSClientAdReportEmail"),this.listingID=t.ListingID,this.frequency=new s.EngagementFrequencyEnum(t.Frequency),this.emailAddress=t.UserEmailAddress,this.userID=t.UserID,this.name=i.user.getName(t.UserFirstName,t.UserLastName),this.ccAgentOnEmail=t.CcAgentOnEmail,t.LastSentDate&&(this.lastsentDate=new Date(t.LastSentDate)),this.hasPhoto=t.UserHasPhoto,this.hasPhoto&&(this.photoVersion=t.UserPhotoVersion,this.profileImage=i.user.getProfileImage(this.userID,this.photoVersion)),s.IUserProfileImage(this)},s.EngagementFrequencyEnum=function(t){this.raw=t,this.none=0===t,this.realTime=1===t,this.frequently=10===t,this.daily=20===t,this.weekly=30===t,this.monthly=40===t},s.HSAffiliatesItemErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidHash=4===t,this.timeoutError=5===t,this.unhandledError=6===t,this.noRegisteredUser=7===t,this.noMLSAgentFound=8===t,this.mlsNotAllowed=9===t,this.userNotAssociatedWithListing=10===t},s.HSAffiliateConfigStatusEnum=function(t){this.raw=t,this.none=0===t,this.hasExistingAd=1==(1&t)},s.HSAffiliatesItem=function(t){i.ajax.addType(this,"HSAffiliatesItem"),this.errorCode=new s.HSAffiliatesItemErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText,this.status=new s.HSAffiliateConfigStatusEnum(t.Status),this.isHashValid=t.IsHashValid||!1,t.Campaigns&&(this.campaigns=new s.HSListingAdsGetCampaignsResult(t.Campaigns)),t.Entity&&(this.entity=new s.HSEntityItem(t.Entity)),t.Listing&&(this.listing=new s.HSPropertyAddressListingItem(t.Listing)),this.listing&&(this.propertyStatus=i.listing.getPropertyStatus(this.listing.sListingStatus.raw,1,this.listing.isComingSoon,this.listing.isAgentOpen,this.listing.isOpenHouse,this.listing.openHouse&&this.listing.openHouse.times?this.listing.openHouse.times:null,null))},s.HSAffiliatesEventStatusEnum=function(t){this.raw=t,this.none=0===t,this.newListing=1==(1&t),this.statusChangedSold=2==(2&t),this.priceChange=4==(4&t),this.primaryPhotoChange=8==(8&t),this.openHouseChange=16==(16&t),this.backToMarket=32==(32&t),this.minorChange=64==(64&t)},s.HSSubscriptionConciergeUpdateBudgetResult=function(t){i.ajax.addType(this,"HSSubscriptionConciergeUpdateBudgetResult"),t.Data&&(this.data=new s.HSSubscriptionConcierge(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSSubscriptionConciergeUpdateBudgetErrorEnum(t.ErrorCode)},s.HSSubscriptionConcierge=function(t){i.ajax.addType(this,"HSSubscriptionConcierge"),this.id=t.ID,this.amountCharged=t.AmountCharged,t.BillingPeriod&&(this.billingPeriod=new s.HSSubscriptionConciergeBillingPeriod(t.BillingPeriod)),t.PricePoint&&(this.pricePoint=new s.HSSubscriptionConciergePricePoint(t.PricePoint))},s.HSSubscriptionConciergeBillingPeriod=function(t){i.ajax.addType(this,"HSSubscriptionConciergeBillingPeriod"),this.id=t.ID,this.startDate=t.StartDate,this.endDate=t.EndDate},s.HSSubscriptionConciergePricePoint=function(t){i.ajax.addType(this,"HSSubscriptionConciergePricePoint"),this.id=t.ID},s.HSSubscriptionConciergeUpdateBudgetErrorEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergeUpdateBudgetErrorEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.alreadyExists=4===t,this.failedPayment=5===t,this.invalidParameters=6===t},s.HSSubscriptionConciergePlacement=function(t){i.ajax.addType(this,"HSSubscriptionConciergePlacement"),this.name=t.Name,this.description=t.Description,this.url=t.URL,this.placementType=new s.HSSubscriptionConciergePlacementTypeEnum(t.PlacementType)},s.HSSubscriptionConciergePlacementTypeEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergePlacementTypeEnum"),this.raw=t,this.google=1===t,this.googleDiscovery=2===t,this.facebook=3===t,this.guide=4===t},s.HSSubscriptionConciergeBillingIntervalEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergePricePointBillingIntervalEnum"),this.raw=t,this.monthly=1===t,this.quarterly=3===t,this.yearly=12===t},s.HSSubscriptionConciergePricePointStatusEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergePricePointStatusEnum"),this.raw=t,this.none=0===t,this.disabled=1===t},s.HSSubscriptionConciergePriceGroupEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergePriceGroupEnum"),this.raw=t,this.betaPointOfSale=0===t,this.pointOfSale=1===t,this.configurator=2===t},s.HSSubscriptionConciergeOrderOption=function(t){i.ajax.addType(this,"HSSubscriptionConciergeOrderOption"),this.id=t.ID,this.billingInterval=new s.HSSubscriptionConciergeBillingIntervalEnum(t.BillingInterval),this.conciergePriceGroup=new s.HSSubscriptionConciergePriceGroupEnum(t.ConciergePriceGroup),this.status=new s.HSSubscriptionConciergePricePointStatusEnum(t.Status),t.OrderSummary&&(this.orderSummary=new s.HSSubscriptionConciergeOrderSummary(t.OrderSummary)),t.SalesOffer&&(this.salesOffer=new s.HSSubscriptionConciergeSalesOffer(t.SalesOffer)),this.proPlusOffer=t.ProPlusOffer},s.HSSubscriptionConciergeOrderSummary=function(t){var e=this;i.ajax.addType(this,"HSSubscriptionConciergeOrderSummary"),t.Price&&(this.price=i.string.getPrice(t.Price)),this.lineItems=[],t.LineItems&&t.LineItems.length>0&&t.LineItems.forEach(function(t){e.lineItems.push(new s.HSKeyValuePair(t))}),t.ProPlusDiscount&&(this.proPlusDiscount=i.string.getPrice(t.ProPlusDiscount)),(t.AmountDue||0===t.AmountDue)&&(this.amountDue=i.string.getPrice(t.AmountDue)),t.SelectionOption&&(this.selectionOption=new s.HSSubscriptionConciergeMonthlyPrice(t.SelectionOption))},s.HSSubscriptionConciergeSalesOffer=function(t){i.ajax.addType(this,"HSSubscriptionConciergeSalesOffer"),(t.OriginalPrice||0===t.OriginalPrice)&&(this.originalPrice=i.string.getPrice(t.OriginalPrice)),(t.FinalPrice||0===t.FinalPrice)&&(this.finalPrice=i.string.getPrice(t.FinalPrice)),this.description=t.Description,this.specialOfferText=t.SpecialOfferText},s.HSSubscriptionConciergeMonthlyPrice=function(t){i.ajax.addType(this,"HSSubscriptionConciergeMonthlyPrice"),this.priceSelectionText=t.PriceSelectionText,this.subHeading=t.SubHeading,(t.MonthlyPrice||0===t.MonthlyPrice)&&(this.monthlyPrice=i.string.getPrice(t.MonthlyPrice)),this.monthlyPriceDisplay=t.MonthlyPriceDisplay},s.HSSubscriptionConciergeConfigErrorCodeEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergeConfigErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.unauthorized=2===t,this.userNotPro=3===t,this.userNotListingAdEligible=4===t},s.HSSubscriptionConciergeConfigResult=function(t){i.ajax.addType(this,"HSSubscriptionConciergeConfigResult"),t.Data&&(this.data=new s.HSSubscriptionConciergeConfig(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSSubscriptionConciergeConfigErrorCodeEnum(t.ErrorCode)},s.HSSubscriptionConciergeSelectablePriceConfigResult=function(t){i.ajax.addType(this,"HSSubscriptionConciergeSelectablePriceConfigResult"),t.Data&&(this.data=new s.HSSubscriptionConciergeSelectablePriceConfig(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSSubscriptionConciergeConfigErrorCodeEnum(t.ErrorCode)},s.HSSubscriptionConciergeConfirmLocationErrorCodeEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergeConfirmLocationErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.noProPlus=4===t},s.HSSubscriptionConciergeConfirmLocationResult=function(t){i.ajax.addType(this,"HSSubscriptionConciergeConfirmLocationResult"),this.errorText=t.ErrorText,this.errorCode=new s.HSSubscriptionConciergeConfirmLocationErrorCodeEnum(t.ErrorCode)},s.HSSubscriptionConciergeSalesMessageConfig=function(t){i.ajax.addType(this,"HSSubscriptionConciergeSalesMessageConfig"),this.headline=t.Headline,this.subtitle=t.Subtitle,this.callToAction=t.CallToAction,this.footer=t.Footer,this.marketingMessage=t.MarketingMessage},s.HSSubscriptionConciergeConfig=function(t){var e=this;i.ajax.addType(this,"HSSubscriptionConciergeConfig"),this.id=t.ID,t.Entity&&(this.entity=new s.HSUserItem(t.Entity)),this.hasProPlus=t.HasProPlus,this.hasActiveConciergeSubscription=t.HasActiveConciergeSubscription,t.ConciergeSubscription&&(this.conciergeSubscription=new s.HSSubscriptionConcierge(t.ConciergeSubscription)),this.orderOptions=[],t.OrderOptions&&t.OrderOptions.length>0&&t.OrderOptions.forEach(function(t){e.orderOptions.push(new s.HSSubscriptionConciergeOrderOption(t))}),this.primaryMLS=t.PrimaryMLS,t.SubscriptionConciergeSalesMessageConfig&&(this.subscriptionConciergeSalesMessageConfig=new s.HSSubscriptionConciergeSalesMessageConfig(t.SubscriptionConciergeSalesMessageConfig))},s.HSSubscriptionConciergeSelectablePriceConfig=function(t){i.ajax.addType(this,"HSSubscriptionConciergeSelectablePriceConfig"),this.id=t.ID,t.Entity&&(this.entity=new s.HSUserItem(t.Entity)),this.hasProPlus=t.HasProPlus,this.hasActiveConciergeSubscription=t.HasActiveConciergeSubscription,t.ConciergeSubscription&&(this.conciergeSubscription=new s.HSSubscriptionConcierge(t.ConciergeSubscription)),t.SubscriptionConciergeSalesMessageConfig&&(this.subscriptionConciergeSalesMessageConfig=new s.HSSubscriptionConciergeSalesMessageConfig(t.SubscriptionConciergeSalesMessageConfig)),t.BudgetSelection&&(this.budgetSelection=new s.HSSubscriptionConciergeBudgetSelection(t.BudgetSelection)),this.adVisibility=new s.HSSubscriptionConciergeAdVisibility(t.AdVisibility)},s.HSSubscriptionConciergeAdVisibility=function(t){i.ajax.addType(this,"HSSubscriptionConciergeAdVisibility"),this.raw=t,this.notVisible=0===t,this.type1Visible=1===t,this.type2Visible=2===t},s.HSSubscriptionConciergeBudgetSelection=function(t){var e=this;i.ajax.addType(this,"HSSubscriptionConciergeBudgetSelection"),this.min=t.Min,this.max=t.Max,this.step=t.Step,this.default=t.Default,this.expectedCPL=t.ExpectedCPL,this.expectedCPQL=t.ExpectedCPQL,this.cplAtMin=t.CPLAtMin,this.cpqlAtMin=t.CPQLAtMin,this.configuratorPricePoints=[],t.ConfiguratorPricePoints&&t.ConfiguratorPricePoints.length>0&&t.ConfiguratorPricePoints.forEach(function(t){e.configuratorPricePoints.push(new s.HSSubscriptionConciergeConfiguratorPricePoint(t))})},s.HSSubscriptionConciergeConfiguratorPricePoint=function(t){i.ajax.addType(this,"HSSubscriptionConciergeConfiguratorPricePoint"),this.id=t.ID,this.price=t.Price},s.HSSubscriptionConciergeTrackUserEventTypeEnum=function(t){i.ajax.addType(this,"HSSubscriptionConciergeTrackUserEventTypeEnum"),this.raw=t,this.pointOfSaleViewed=1===t,this.configuratorViewedFromDashboard=2===t,this.transferRequested=3===t},s.HSUserMarketingAnalyticsGetCompetitorSpendErrorEnum=function(t){i.ajax.addType(this,"HSUserMarketingAnalyticsGetCompetitorSpendErrorEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t},s.HSUserMarketingAnalyticsCompetitorSpend=function(t){i.ajax.addType(this,"HSUserMarketingAnalyticsCompetitorSpend"),this.entityType=t.EntityType,this.entityID=t.EntityID,t.FirstName&&t.LastName&&(this.name=i.user.getName(t.FirstName,t.LastName)),this.brokerageName=t.BrokerageName,t.AverageMonthlySpend&&(this.averageMonthlySpend=i.string.getPrice(t.AverageMonthlySpend)),t.ProfileImageUrl&&(this.profileImage=i.user.getProfileImage(null,null,t.ProfileImageUrl))},s.HSUserMarketingAnalyticsGetCompetitorSpendResult=function(t){var e=this;i.ajax.addType(this,"HSUserMarketingAnalyticsGetCompetitorSpendResult"),t&&t.Data&&(this.data={},this.data.competitorSpends=[],t.Data.CompetitorSpends&&t.Data.CompetitorSpends.length>0&&t.Data.CompetitorSpends.forEach(function(t){e.data.competitorSpends.push(new s.HSUserMarketingAnalyticsCompetitorSpend(t))})),this.errorText=t.ErrorText,this.errorCode=new s.HSUserMarketingAnalyticsGetCompetitorSpendErrorEnum(t.ErrorCode)},s.HSMlsIntegrationsGetStatusResult=function(t){i.ajax.addType(this,"HSMlsIntegrationsGetStatusResult"),t.Data&&(this.data=new s.HSMlsIntegrationsMlsDetails(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSMlsIntegrationsGetStatusErrorEnum(t.ErrorCode)},s.HSMlsIntegrationsGetStatusErrorEnum=function(t){i.ajax.addType(this,"HSMlsIntegrationsGetStatusErrorEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidParameters=4===t},s.HSMlsIntegrationsMlsDetails=function(t){var e=this;i.ajax.addType(this,"HSMlsIntegrationsMlsDetails"),t.AccountManager&&(this.accountManager=new s.HSMlsIntegrationsAccountManager(t.AccountManager)),this.categories=_toConsumableArray(t.Categories),this.integrations=[],t.Integrations&&t.Integrations.length>0&&t.Integrations.forEach(function(t){e.integrations.push(new s.HSMlsIntegration(t))}),this.mlsShortName=t.MlsShortName,this.mlsBrandWhiteLogo=t.MlsBrandWhiteLogo},s.HSMlsIntegration=function(t){var e=this;i.ajax.addType(this,"HSMlsIntegration"),this.mlsIntegrationFeatureID=t.MlsIntegrationFeatureID,this.name=t.Name,this.previewUrl=t.PreviewUrl,t.Video&&(this.video=new s.HSVideo(t.Video)),this.mediaType=new s.HSMlsIntegrationsMediaType(t.MediaType),t.PopularCarousel&&(this.popularCarousel=new s.HSMlsIntegrationsPopularIntegration(t.PopularCarousel)),this.categories=_toConsumableArray(t.Categories),this.status=new s.HSMlsIntegrationStatus(t.Status),this.overview=t.Overview,this.documents=[],t.Documents&&t.Documents.length>0&&t.Documents.forEach(function(t){e.documents.push(new s.HSMlsIntegrationsDocument(t))})},s.HSMlsIntegrationsMediaType=function(t){i.ajax.addType(this,"HSMlsIntegrationsMediaType"),this.raw=t,this.image=0===t,this.mobileVideo=1===t,this.video=2===t},s.HSMlsIntegrationStatus=function(t){i.ajax.addType(this,"HSMlsIntegrationStatus"),this.raw=t,this.hidden=0===t,this.learnMore=1===t,this.live=2===t},s.HSMlsIntegrationsDocument=function(t){i.ajax.addType(this,"HSMlsIntegrationsDocument"),this.mlsIntegrationDocumentID=t.MlsIntegrationDocumentID,this.name=t.Name,this.icon=t.Icon,this.url=t.Url},s.HSMlsIntegrationsPopularIntegration=function(t){i.ajax.addType(this,"HSMlsIntegrationsPopularIntegration"),this.imageUrl=t.ImageUrl,this.description=t.Description,this.isPopular=t.IsPopular},s.HSMlsIntegrationsAccountManager=function(t){i.ajax.addType(this,"HSMlsIntegrationsAccountManager"),this.name=t.Name,this.email=t.Email,this.calendly=t.Calendly,this.imageUrl=t.ImageUrl},s.HSMlsIntegrationsGetMlsStatsResult=function(t){i.ajax.addType(this,"HSMlsIntegrationsGetMlsStatsResult"),t.Data&&(this.data=new s.HSMlsIntegrationsMlsStats(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSMlsIntegrationsGetMlsStatsErrorEnum(t.ErrorCode)},s.HSMlsIntegrationsGetMlsStatsErrorEnum=function(t){i.ajax.addType(this,"HSMlsIntegrationsGetMlsStatsErrorEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidParameters=4===t},s.HSMlsIntegrationsMlsStats=function(t){var e=this;i.ajax.addType(this,"HSMlsIntegrationsMlsStats"),this.dateGenerated=t.DateGenerated,this.timeGenerated=t.TimeGenerated,this.agentRegistrations=[],t.AgentRegistrations&&t.AgentRegistrations.length>0&&t.AgentRegistrations.forEach(function(t){e.agentRegistrations.push(new s.HSKeyValuePair(t))}),this.subscribers=[],t.Subscribers&&t.Subscribers.length>0&&t.Subscribers.forEach(function(t){e.subscribers.push(new s.HSKeyValuePair(t))}),this.userSessions=[],t.UserSessions&&t.UserSessions.length>0&&t.UserSessions.forEach(function(t){e.userSessions.push(new s.HSKeyValuePair(t))}),this.invitations=[],t.Invitations&&t.Invitations.length>0&&t.Invitations.forEach(function(t){e.invitations.push(new s.HSKeyValuePair(t))}),this.activity=[],t.Activity&&t.Activity.length>0&&t.Activity.forEach(function(t){e.activity.push(new s.HSKeyValuePair(t))})},s.HSMLSIntegrationsDownloadDashboardV1SheetResult=function(t){i.ajax.addType(this,"HSMlsIntegrationsDownloadDashboardV1SheetResult"),t.Data&&(this.data=new s.HSMLSIntegrationDownloadDashboardV1Sheet(t.Data)),this.errorText=t.ErrorText,this.errorCode=new s.HSMlsIntegrationsDownloadDashboardV1SheetErrorEnum(t.ErrorCode)},s.HSMLSIntegrationDownloadDashboardV1Sheet=function(t){i.ajax.addType(this,"HSMLSIntegrationDownloadDashboardV1Sheet"),this.fileName=t.FileName,this.generationDateTime=t.GenerationDateTime},s.HSMlsIntegrationsDownloadDashboardV1SheetErrorEnum=function(t){i.ajax.addType(this,"HSMlsIntegrationsDownloadDashboardV1SheetErrorEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.unauthorized=3===t,this.invalidParameters=4===t},s.HSMlsIntegrationsTrackUserEventTypeEnum=function(t){i.ajax.addType(this,"HSMlsIntegrationsTrackUserEventTypeEnum"),this.raw=t,this.contactRequested=1===t,this.emailLinkClicked=2===t,this.documentsClicked=3===t,this.pageViewed=4===t},s.HSMediaPost=function(t){i.ajax.addType(this,"HSMediaPost"),this.mediaPostId=t.MediaPostID,this.header=t.Header,this.dateTimeStamp=i.date.getDateInfo(t.DateTimeStamp),this.author=t.Author,this.articleLink=t.ArticleLink,this.type=t.Type,this.status=t.Status,this.logoRelativeUrl=t.LogoRelativeUrl},s.HSEntityViewListSortEnum=function(t){this.raw=t,this.none=0===t,this.mostRecentViewDate=1===t,this.totalSides=2===t.TotalSides},s.HSAgentMLSRelationshipEnum=function(t){this.raw=t,this.none=0===t,this.inMarket=1===t.InMarket,this.outOfMarket=2===t.OutOfMarket},s.HSEntityViewAnalyticSummary=function(t){if(this.viewsPast90Days=t.ViewsPast90Days,t.LastViewerPhotos&&t.LastViewerPhotos.length>0){this.lastViewerPhotos=[];for(var e=0;e<t.LastViewerPhotos.length;e++)this.lastViewerPhotos.push(t.LastViewerPhotos[e]);this.lastViewerPhotos.reverse()}},s.HSEntityViewAnalyticViewDataPoint=function(t){this.date=i.date.getDateInfo(t.Date),this.count=t.Count,this.type_="HSEntityViewAnalyticViewDataPoint"},s.HSEntityViewAnalyticStats=function(t,e){if(this.viewsPast90Days=t.ViewsPast90Days,this.weeklyChange=t.WeeklyChange,t.ViewData&&t.ViewData.length>0){this.viewData=[];for(var r=0;r<t.ViewData.length;r++)this.viewData.push(new s.HSEntityViewAnalyticViewDataPoint(t.ViewData[r]))}i.ajax.addType(this,"HSEntityViewAnalyticStats"),e&&i.ajax.addType(this,e)},s.HSEntityView=function(t,e){this.entityType=t.EntityType,this.entityID=t.EntityID,this.fullName=t.FullName,this.brokerage=t.Brokerage,this.location=t.Location,this.profileImageUrl=t.ProfileImageUrl,this.profileUrl=t.ProfileUrl,this.totalSides=t.TotalSides||null,this.isIncognito=t.IsIncognito||!1,this.isEnabled=!0,this.index=e,this.tick=4===e||(e-9)%9==4,this.viewDate=i.date.getDateInfo(t.ViewDate)},s.HSEntityViewViewers=function(t){var e=this;Object.keys(t).forEach(function(i){var r="_"===i.charAt(0)?i:i.charAt(0).toLowerCase()+i.slice(1);if(e[r]=null,Array.isArray(t[i])){var n=e[r]=[];t[i].forEach(function(t,e){n.push(new s.HSEntityView(t,e))})}else e[r]=t[i]})},s.HSEntityProfileListSortEnum=function(t){this.mostRecentViewDate=1===t,this.totalSides=2===t},s.HSEntityViewUserAnalyticStats=function(t){s.HSEntityViewAnalyticStats.call(this,t,"HSEntityViewUserAnalyticStats")},s.HSEntityViewListingAnalyticStats=function(t){this.totalViewsPast90Days=t.TotalViewsPast90Days,this.totalWeeklyChange=t.TotalWeeklyChange,this.agentViewStats=new s.HSEntityViewAnalyticStats(t.AgentViewStats,"HSEntityViewListingAnalyticStats"),this.consumerViewStats=new s.HSEntityViewAnalyticStats(t.ConsumerViewStats,"HSEntityViewListingAnalyticStats"),this.viewsPast90Days=this.totalViewsPast90Days,this.weeklyChange=this.totalWeeklyChange,i.ajax.addType(this,"HSEntityViewListingAnalyticStats")},s.HSUserSetting=function(t){this.userID=t.UserID,this.isIncognito=t.IsIncognito,this.status=t.Status},s.HSUserSettingUpdateParams=function(t){this.isIncognito=t.isIncognito||!1},s.HSUserSettingUpdateResultErrorCodeEnum=function(t){this.raw=t,this.success=0===t,this.unauthorized=1==(1&t),this.forRent=2==(2&t),this.all=3==(3&t)},s.HSUserSettingUpdateResult=function(t){this.errorCode=t.ErrorCode,this.errorText=t.ErrorText},s.HSReviewRequest=function(t){i.ajax.addType(this,"HSReviewRequest"),this.userID=t.UserID,this.createDate=i.date.getDateInfo(t.CreateDate),this.phone=i.string.getPhoneNumber(t.Phone),this.email=t.Email,this.firstName=t.FirstName,this.lastName=t.LastName,this.name=i.user.getName(this.firstName,this.lastName),this.hasPhoto=t.HasPhoto,this.hasPhoto&&(this.profileImage=i.user.getProfileImage(this.userID)),s.IUserItem(this),s.IUserProfileImage(this)},s.RequestReviewResult=function(t){i.ajax.addType(this,"RequestReviewResult"),this.errorCode=t.ErrorCode,this.errorText=t.ErrorText},s.HSDomainAvailabilityResult=function(t){if(i.ajax.addType(this,"HSDomainAvailabilityResult"),this.domainName=t.DomainName,this.availability=t.Availability,this.isAvailable=t.IsAvailable,this.errorMessage=t.ErrorMessage,this.errorCode={raw:t.ErrorCode,sucess:0===t.ErrorCode,invalidDomain:1===t.ErrorCode,unsupportedTopLevelDomain:2===t.ErrorCode},t.Suggestions){this.suggestions=[];for(var e=0;e<t.Suggestions.length;e++)this.suggestions.push(new s.HSDomainAvailabilityResult(t.Suggestions[e]))}},s.HSDomainRegistrationResult=function(t){i.ajax.addType(this,"HSDomainRegistrationResult"),this.domainName=t.DomainName,this.domainRegistrar=t.DomainRegistrar,this.errorCode={raw:t.ErrorCode,success:0===t.ErrorCode,unavailableDomain:1===t.UnavailableDomain,noRunningProPlusSubscription:2===t.NoRunningProPlusSubscription}},s.HSAgentDomain=function(t){i.ajax.addType(this,"HSAgentDomain"),this.agentDomainID=t.AgentDomainID,this.domainName=t.DomainName,this.isPurchase=t.IsPurchase,this.isThirdParty=t.IsThirdParty,this.isPending=t.IsPending,this.isFailed=t.IsFailed,this.isSuccess=t.IsSuccess,this.isLive=t.IsLive,
this.isTest=t.IsTest,this.isCancelled=t.IsCancelled},s.HSAgentWebsiteReservationConfig=function(t){i.ajax.addType(this,"HSAgentWebsiteReservationConfig"),this.firstName=t.FirstName,this.lastName=t.LastName,this.urlName=t.UrlName,this.hasProPlus=t.HasProPlus,this.officeID=t.OfficeID,this.officeName=t.OfficeName,this.officeCity=t.OfficeCity;var e=t.RegistrationStatus||0;this.registrationStatus={raw:e,notRegistered:0===e,notVerified:1===e,registered:2===e}},s.HSAgentWebsiteComplianceLink=function(t){i.ajax.addType(this,"HSAgentWebsiteComplianceLink"),this.state=t.State,this.urlString=t.UrlString,this.url=t.Url,this.text=t.Text},s.HSMediaItem=function(t){i.ajax.addType(this,"HSMediaItem"),this.url=t.URL,this.type=new s.HSMediaTypeEnum(t.Type),this.status={none:0===t.Status}},s.HSMediaTypeEnum=function(t){i.ajax.addType(this,"HSMediaTypeEnum"),this.raw=t,this.none=0===t,this.image=1===t,this.virtualTour=2===t,this.floorPlan=3===t},s.HSAgentWebsiteConfig=function(t){var e;if(i.ajax.addType(this,"HSAgentWebsiteConfig"),null!==t&&void 0!==t&&null!==(e=t.WebsiteSettings)&&void 0!==e&&e.Template&&(this.template=new s.HSAgentWebsiteTemplate(t.WebsiteSettings.Template)),t.EntityDetails&&(this.entityDetails=new s.HSUserItem(t.EntityDetails)),this.isPreview=t.IsPreview,t.Domain&&(this.domain=new s.HSAgentDomain(t.Domain)),t.UserDetails&&(this.userDetails=new s.HSUserDetails(t.UserDetails)),t.WebsiteSettings&&(this.websiteSettings=new s.HSAgentWebsiteSettings(t.WebsiteSettings)),this.complianceLinks=[],t.ComplianceLinks)for(var r=0;r<t.ComplianceLinks.length;r++)this.complianceLinks.push(new s.HSAgentWebsiteComplianceLink(t.ComplianceLinks[r]));this.errorCode=new s.HSAgentWebsiteConfigErrorCodeEnum(t.ErrorCode)},s.HSAgentWebsiteConfigErrorCodeEnum=function(t){i.ajax.addType(this,"HSAgentWebsiteConfigErrorCodeEnum"),this.raw=t,this.success=0===t,this.unknownError=1===t,this.notFound=2===t,this.blocked=3===t},s.HSAgentWebsiteTemplate=function(t){switch(i.ajax.addType(this,"HSAgentWebsiteTemplate"),this.type=new s.HSAgentWebsiteTemplateEnum(t),t){case 1:this.primaryColor="#006DC7",this.secondaryColor="#FAC332";break;case 2:this.primaryColor="#592A4B",this.secondaryColor="#AD5292";break;case 3:this.primaryColor="#2D862D",this.secondaryColor="#333333";break;case 4:this.primaryColor="#FFF200",this.secondaryColor="#592A4B";break;case 5:this.primaryColor="#000000",this.secondaryColor="#FFFFFF"}},s.HSAgentWebsiteTemplateEnum=function(t){i.ajax.addType(this,"HSAgentWebsiteTemplateEnum"),this.raw=t,this.default=t<=1,this.cabernet=2===t,this.emerald=3===t,this.lemonade=4===t,this.caviar=5===t},s.HSAgentWebsiteAgentListings=function(t){var e=this;i.ajax.addType(this,"HSAgentWebsiteAgentListings"),this.title=t.Title,t.Listings&&(this.listings=[],t.Listings.forEach(function(t){return e.listings.push(new s.HSPropertyAddressItem(t))}))},s.HSAgentWebsiteAreaDetails=function(t){var e=this;i.ajax.addType(this,"HSAgentWebsiteAreaDetails"),t.Area&&(this.area=new s.HSAreaItem(t.Area)),t.Listings&&(this.listings=[],t.Listings.forEach(function(t){return e.listings.push(new s.HSPropertyAddressItem(t))}))},s.HSStockPhotoTypeEnum=function(t){i.ajax.addType(this,"HSStockPhotoTypeEnum"),this.raw=t,this.none=0===t,this.home=1===t,this.about=2===t,this.sellers=3===t,this.buyers=4===t,this.preferredArea=5===t},s.HSStockPhotoSourceEnum=function(t){i.ajax.addType(this,"HSStockPhotoSourceEnum"),this.raw=t,this.homesnap=1===t,this.unsplash=2===t},s.HSStockPhotoSettingsModel=function(t){i.ajax.addType(this,"HSStockPhotoSettingsModel"),this.photoKey=t.PhotoKey,this.smallUrl=t.SmallUrl,this.mediumUrl=t.MediumUrl,this.largeUrl=t.LargeUrl,this.attribution=t.Attribution,this.imageNumber=t.ImageNumber,this.entityID=t.EntityId,this.siteKey=new s.HSStockPhotoSiteKeyEnum(t.SiteKey),this.imageType=new s.HSStockPhotoTypeEnum(t.ImageType),this.imageSource=new s.HSStockPhotoSourceEnum(t.ImageSource)},s.HSStockPhotoSettingErrorCodeEnum=function(t){i.ajax.addType(this,"HSStockPhotoSettingErrorCodeEnum"),this.raw=t,this.success=0===t,this.failed=1===t,this.imageSettingsNotFound=2===t},s.HSStockPhotoSettingsResults=function(t){var e=this;i.ajax.addType(this,"HSStockPhotoSettingsResults"),this.errorCode=new s.HSStockPhotoSettingErrorCodeEnum(t.ErrorCode),this.errorText=t.ErrorText,t.Results&&(this.results=[],t.Results.forEach(function(t){return e.results.push(new s.HSStockPhotoSettingsModel(t))}))},s.HSAgentWebsiteSettings=function(t){i.ajax.addType(this,"HSAgentWebsiteSettings"),this.aboutText=t.AboutText,this.facebookUrl=t.FacebookUrl,this.headline=t.Headline,this.homeText=t.HomeText,this.instagramUrl=t.InstagramUrl,this.linkedInUrl=t.LinkedInUrl,this.logoUrl=t.LogoUrl,this.primaryColor=t.PrimaryColor,this.secondaryColor=t.SecondaryColor,this.subHeadline=t.SubHeadline,this.twitterUrl=t.TwitterUrl,this.youtubeUrl=t.YoutubeUrl,this.legalUrl=t.LegalUrl,this.showRealtorLogo=t.ShowRealtorLogo,this.template=new s.HSAgentWebsiteTemplate(t.Template),t.ImageSettings&&(this.imageSettings=new s.HSStockPhotoSettingsResults(t.ImageSettings))},s.HSStockPhotoSiteKeyEnum=function(t){i.ajax.addType(this,"HSStockPhotoSiteKeyEnum"),this.raw=t,this.none=0===t,this.agentWebsite=1===t},s.HSAgentWebsiteComplianceLink=function(t){i.ajax.addType(this,"HSAgentWebsiteComplianceLink"),this.state=t.State,this.urlString=t.UrlString,this.url=t.Url,this.text=t.Text},s.AppRating=function(t){this.rating=i.string.getNumber(t.Rating),this.date=i.date.getDateInfo(t.Date),this.author=t.Author,this.description=t.Description,this.title=t.Title},s.UrlPatternManager=function(){this.patterns=[]},s.UrlPatternManager.prototype.add=function(t,e,i){this.patterns.push(new s.UrlPattern(t,e,i))},s.UrlPatternManager.prototype.match=function(t,e,i){if(t)for(var s=0;s<this.patterns.length;s++){var r=this.patterns[s].match(t,e,i);if(r)return r}return null},s.UrlPattern=function(t,e,i){this._regex=t,this._queryStringFunc=e,this._state=i},s.UrlPattern.prototype.match=function(t,e,i){function s(t,r,n){n=n||t;for(var a in n.data)if(n.data.hasOwnProperty(a)&&"url"===a){if(i){for(var o=0;o<i.length;o++)n.data[i[o][0]]=i[o][1];n.data.url=void 0,n.data.queryString=void 0}else n.data.url=r,n.data.queryString=e||void 0;return t}for(var h in n.controllers)if(n.controllers.hasOwnProperty(h)&&s(t,r,n.controllers[h]))return t;return t}var r=this._regex.exec(t),n=!this._queryStringFunc||this._queryStringFunc(e);if(i){if(!Array.isArray(i)||!i.length)throw"itemProperties must be an Array with length > 0";for(var a=0;a<i.length;a++)if(void 0===i[a][0]||"string"!=typeof i[a][0])throw"Each of itemProperties must be an Array of [string, object]"}return!(!r||!n)&&s(this._state,r)},s.UrlManager=function(){var e;return e||(e=function(){function e(e){u.pathname=location.pathname,u.search=location.search,u.qs=i.application.parseQueryString(u.search),e&&r(e),t(["ga"],function(t){"function"==typeof t&&(t("set","page",u.pathname),t("send","pageview"))}),window.dataLayer=window.dataLayer||[],function(){window.dataLayer.push(arguments)}("config",Homesnap.gtagID,{page_path:u.pathname,send_page_view:!0})}function r(e){o&&t(["lodash"],function(t){window.TrackJS&&(e&&void 0!==e&&"null"!=typeof e||window.TrackJS.console.log("handleNewState: no child state"),t&&void 0!==t&&"null"!=typeof t||window.TrackJS.console.log("handleNewState: no lodash library")),"undefined"!==t&&null!==t&&o(t.cloneDeep(e))})}function n(t,e,s,o){if(!u.pathname||location.pathname!==t){var h=i.application.parseQueryString(e),c=l.match(t,h,s);if(c){if(c.server)return void(location.href=t+(e||""));var d=!u.pathname;u.pathname=t,u.search=e,u.qs=h,a(o||d,c,{url:t,canonicalUrl:t}),r(c)}else n("/error/404")}}function a(e,s,r){function n(){window.dataLayer.push(arguments)}var a=null!==r.url?r.url:"";a=i.path.getAgentWebsitePreviewUrl(null===r||void 0===r?void 0:r.url),window.dataLayer=window.dataLayer||[],e?(history.replaceState(s,null,a),t(["ga"],function(t){"function"==typeof t&&t("set","page",r.canonicalUrl)}),n("config",Homesnap.gtagID,{page_path:r.canonicalUrl,send_page_view:!1})):(history.pushState(s,null,a),t(["ga"],function(t){"function"==typeof t&&(t("set","page",r.canonicalUrl),t("send","pageview"))}),n("config",Homesnap.gtagID,{page_path:r.canonicalUrl,send_page_view:!0})),t(["modules/FBPageView"],function(t){void 0!==typeof t&&r.canonicalUrl&&t.sendPageView(r.canonicalUrl)}),h&&h(r)}var o,h,u={pathname:null,search:null,qs:null},l=new s.UrlPatternManager;return window.addEventListener("popstate",function(i){var s=!0,r=$("#divModal");if(r.hasClass("in")&&(r.modal("hide"),s=!1),$("body").hasClass("modal-closing")&&($("body").removeClass("modal-closing"),s=!1),$(".fr-window").length&&(t(["modules/LightBox"],function(t){void 0!==t&&t.hide()}),s=!1),!s)return i.preventDefault(),!1;e(i.state)}),{addPattern:function(t,e){l.add(t,void 0,e)},addPatternWithQueryString:function(t,e,i){l.add(t,e,i)},handleDefaultUrls:function(t,e,i){o=t,e&&n(e,i)},handleNewUrl:function(t){h=t},newUrl:n,updateBrowserState:function(t,e){if(!t||"object"!=typeof t)throw new Error("updateBrowserState(state, urlObj) requires a state context.");if(!e||"object"!=typeof e)throw console.info(t),new Error("updateBrowserState(state, urlObj) requires the urlObj param, which must be an object");a(!0,t,e)},newBrowserState:function(t,e){if(!t||"object"!=typeof t)throw new Error("newBrowserState(state, urlObj) requires a state context.");if(!e||"object"!=typeof e)throw console.info(t),new Error("newBrowserState(state, urlObj) requires the urlObj param, which must be an object");a(!1,t,e)}}}()),e},s.SearchDefinitionMinMax=function(t,e,i,s,r,n){this.type_="SearchDefinitionMinMax",this.min=0,this.max=0,this.urlPrefix=i,this.getFn=s,this.originalMin=r,this.originalMax=n,void 0!==t&&"number"==typeof t&&(this.min=t),e&&"number"==typeof e&&(this.max=e),this.originalMin=void 0!==r&&"number"==typeof r?r:this.min,this.originalMax=n&&"number"==typeof n?n:this.max},s.SearchDefinitionMinMax.prototype.isDefault=function(){return this.min===this.originalMin&&this.max===this.originalMax},s.SearchDefinitionMinMax.prototype.clone=function(){return new s.SearchDefinitionMinMax(this.min,this.max,this.urlPrefix,this.getFn,this.originalMin,this.originalMax)},s.SearchDefinitionMinMax.prototype.getRaw=function(){return{min:this.min,max:this.max}},s.SearchDefinitionMinMax.prototype.get=function(){return this.getFn?{min:this.getFn(this.min),max:this.getFn(this.max)}:this.getRaw()},s.SearchDefinitionMinMax.prototype.set=function(t,e){var i={min:this.min,max:this.max};return Array.isArray(t)?void 0!==t[0]&&"number"==typeof t[0]&&(this.min=t[0],void 0!==t[1]&&"number"==typeof t[1]&&(this.max=t[1])):"object"==typeof t?(void 0!==t.min&&"number"==typeof t.min&&(this.min=t.min),void 0!==t.max&&"number"==typeof t.max&&(this.max=t.max)):"number"==typeof t&&(this.min=t,void 0!==e&&"number"==typeof e&&(this.max=e)),!(i.min===this.min&&i.max===this.max)},s.SearchDefinitionMinMax.prototype.same=function(t){return this.min===t.min&&this.max===t.max},s.SearchDefinitionMinMax.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/"+e+"_"+this.min.toString()+","+this.max.toString()),i},s.SearchDefinitionMinMax.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/"+i+"_([-\\d\\.]+),([-\\d\\.]+)"),n=t.match(r);if(n&&n.length&&n.length>2){var a="ls"==i||"mr"==i?parseFloat(n[1]):parseInt(n[1]),o="ls"==i||"mr"==i?parseFloat(n[2]):parseInt(n[2]);s|=this.set(a,o)}else s|=this.set(this.originalMin,this.originalMax)}return s},s.SearchDefinitionBitmask=function(t,e,i){this.type_="SearchDefinitionBitmask",this.value=0,this.urlPrefix=e,void 0!==t&&"number"==typeof t&&(this.value=t),this.originalValue=void 0!==i&&"number"==typeof i?i:this.value},s.SearchDefinitionBitmask.prototype.isDefault=function(){return this.value===this.originalValue},s.SearchDefinitionBitmask.prototype.on=function(t){var e=!1;return void 0!==t&&"number"==typeof t&&(e=!this.isOn(t),this.value|=t),e},s.SearchDefinitionBitmask.prototype.off=function(t){var e=!1;return void 0!==t&&"number"==typeof t&&(e=this.isOn(t),this.value&=~t),e},s.SearchDefinitionBitmask.prototype.set=function(t){var e=this.value;return void 0!==t&&"object"==typeof t?(void 0!==t.on&&this.on(t.on),void 0!==t.off&&this.off(t.off)):void 0!==t&&"number"==typeof t&&(this.value=t),e!==this.value},s.SearchDefinitionBitmask.prototype.isOn=function(t){return void 0!==t&&"number"==typeof t&&(this.value&t)===t},s.SearchDefinitionBitmask.prototype.getRaw=function(){return this.value},s.SearchDefinitionBitmask.prototype.get=function(){return this.getFn?this.getFn(this.value):this.getRaw()},s.SearchDefinitionBitmask.prototype.same=function(t){return this.value===t.value},s.SearchDefinitionBitmask.prototype.clone=function(){return new s.SearchDefinitionBitmask(this.value,this.urlPrefix,this.originalValue)},s.SearchDefinitionBitmask.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/"+e+"_"+this.value.toString()),i},s.SearchDefinitionBitmask.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/"+i+"_([-\\d\\.]+)"),n=t.match(r);if(n&&n.length&&n.length>1){var a=parseInt(n[1]);s|=this.set(a)}else s|=this.set(this.originalValue)}return s},s.SearchDefinitionValue=function(t,e,i){this.type_="SearchDefinitionValue",this.value=0,this.urlPrefix=e,void 0!==t&&"number"==typeof t&&(this.value=t),this.originalValue=void 0!==i&&"number"==typeof i?i:this.value},s.SearchDefinitionValue.prototype.isDefault=function(){return this.value===this.originalValue},s.SearchDefinitionValue.prototype.set=function(t){var e=this.value;return void 0!==t&&"number"==typeof t&&(this.value=t),e!==this.value},s.SearchDefinitionValue.prototype.getRaw=function(){return this.value},s.SearchDefinitionValue.prototype.get=function(){return this.getFn?this.getFn(this.value):this.getRaw()},s.SearchDefinitionValue.prototype.same=function(t){return this.value===t.value},s.SearchDefinitionValue.prototype.clone=function(){return new s.SearchDefinitionValue(this.value,this.urlPrefix,this.originalValue)},s.SearchDefinitionValue.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/"+e+"_"+this.value.toString()),i},s.SearchDefinitionValue.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/"+i+"_([-\\d\\.]+)"),n=t.match(r);if(n&&n.length&&n.length>1){var a=parseInt(n[1]);s|=this.set(a)}else s|=this.set(this.originalValue)}return s},s.SearchDefinitionDateRanges={active:{range:[0,1,7,8,9,10,11,2,3,4,5,6],default:0,label:"active"},pending:{range:[0],default:0,label:"pending"},closed:{range:[11,10,9,8,7,5,4,3],default:11,label:"closed"},open:{range:[0,1,12,14,15,16,17,18],default:0,label:"open"},agentOpen:{range:[0,1,12,13,17],default:0,label:"agentOpen"},get:function(t,e){return 1==(1&t)?1==(1&e)?s.SearchDefinitionDateRanges.open:256==(256&e)?s.SearchDefinitionDateRanges.agentOpen:s.SearchDefinitionDateRanges.active:2==(2&t)?s.SearchDefinitionDateRanges.pending:4==(4&t)?s.SearchDefinitionDateRanges.closed:s.SearchDefinitionDateRanges.active},validate:function(t,e,i){var r=s.SearchDefinitionDateRanges.get(e,i);return r&&r.range.indexOf(t)>=0?t:r?r.default:void 0}},s.SearchDefinitionGroupedBitMask=function(t,e,i,s,r){this.type_="SearchDefinitionGroupedBitMask",this.group="",this.value=0,this.urlPrefix=i,void 0!==e&&"number"==typeof e&&(this.value=e),t&&"string"==typeof t&&(this.group=t),this.originalGroup=void 0!==s&&"string"==typeof s?s:this.group,this.originalValue=void 0!==r&&"number"==typeof r?r:this.value},s.SearchDefinitionGroupedBitMask.prototype.isDefault=function(){return this.group===this.originalGroup&&this.value===this.originalValue},s.SearchDefinitionGroupedBitMask.prototype.clone=function(){return new s.SearchDefinitionGroupedBitMask(this.group,this.value,this.urlPrefix,this.originalGroup,this.originalValue)},s.SearchDefinitionGroupedBitMask.prototype.getRaw=function(){return{group:this.group,value:this.value}},s.SearchDefinitionGroupedBitMask.prototype.set=function(t,e){var i={group:this.group,value:this.value};return Array.isArray(t)?void 0!==t[0]&&"string"==typeof t[0]&&(this.group=t[0],void 0!==t[1]&&"number"==typeof t[1]&&(this.value=t[1])):"object"==typeof t?(void 0!==t.group&&"string"==typeof t.group&&(this.group=t.group),void 0!==t.value&&"number"==typeof t.value&&(this.value=t.value)):"string"==typeof t&&(this.group=t,void 0!==e&&"number"==typeof e&&(this.value=e)),!(i.group===this.group&&i.value===this.value)},s.SearchDefinitionGroupedBitMask.prototype.same=function(t){return this.group===t.group&&this.value===t.value},s.SearchDefinitionGroupedBitMask.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/".concat(e,"_").concat(this.group.toString(),"_").concat(this.value.toString())),i},s.SearchDefinitionGroupedBitMask.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_([-\\w\\.]+)_([-\\d\\.]+)")),n=t.match(r);if(n&&n.length&&n.length>2){var a=n[1],o=parseInt(n[2]);s|=this.set(a,o)}else s|=this.set(this.originalGroup,this.originalValue)}return s},s.SearchDefinitionValueWithMinMax=function(t,e,i,s,r,n,a,o){this.type_="SearchDefinitionValueWithMinMax",this.value=0,this.min=0,this.max=0,this.urlPrefix=s,this.getFn=r,this.originalValue=n,this.originalMin=a,this.originalMax=o,"undefined"!==e&&"number"==typeof e&&(this.min=e),i&&"number"==typeof i&&(this.max=i),this.originalMin="undefined"!==a&&"number"==typeof a?a:this.min,this.originalMax=o&&"number"==typeof o?o:this.max,void 0!==t&&"number"==typeof t&&(this.value=t),this.originalValue=void 0!==n&&"number"==typeof n?n:this.value},s.SearchDefinitionValueWithMinMax.prototype.isDefault=function(){return this.min===this.originalMin&&this.max===this.originalMax&&this.value===this.originalValue},s.SearchDefinitionValueWithMinMax.prototype.clone=function(){return new s.SearchDefinitionValueWithMinMax(this.value,this.min,this.max,this.urlPrefix,this.getFn,this.originalValue,this.originalMin,this.originalMax)},s.SearchDefinitionValueWithMinMax.prototype.getRaw=function(){return{value:this.value,min:this.min,max:this.max}},s.SearchDefinitionValueWithMinMax.prototype.get=function(){return this.getFn?{value:this.value,min:this.getFn(this.min),max:this.getFn(this.max)}:this.getRaw()},s.SearchDefinitionValueWithMinMax.prototype.set=function(t,e,i){var s={value:this.value,min:this.min,max:this.max};if(Array.isArray(t))void 0!==t[0]&&"number"==typeof t[0]&&(this.value=t[0],this.min=t[1],void 0!==t[2]&&"number"==typeof t[2]&&(this.max=t[2]));else if("object"==typeof t)void 0!==t.value&&"number"==typeof t.value&&(this.value=t.value),void 0!==t.min&&"number"==typeof t.min&&(this.min=t.min),void 0!==t.max&&"number"==typeof t.max&&(this.max=t.max);else if("number"==typeof t){var r,n;this.value=t,this.min=null!==(r=null===e||void 0===e?void 0:e.raw)&&void 0!==r?r:e,this.max=null!==(n=null===i||void 0===i?void 0:i.raw)&&void 0!==n?n:i}return!(s.min===this.min&&s.max===this.max&&s.value===this.value)},s.SearchDefinitionValueWithMinMax.prototype.same=function(t){return this.min===t.min&&this.max===t.max&&this.value===t.value},s.SearchDefinitionValueWithMinMax.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/".concat(e,"_").concat(this.value,",").concat(this.min,",").concat(this.max)),i},s.SearchDefinitionValueWithMinMax.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_([0,1]),([-\\d\\.]+),([-\\d\\.]+)")),n=t.match(r);if(n&&n.length&&n.length>3){var a=parseInt(n[1]),o=parseInt(n[2]),h=parseInt(n[3]);s|=this.set(a,o,h)}else s|=this.set(this.originalValue,this.originalMin,this.originalMax)}return s},s.SearchDefinitionValueWithMax=function(t,e,i,s,r){this.type_="SearchDefinitionValueWithMax",this.value=0,this.max=0,this.urlPrefix=i,this.originalMax=r,void 0!==e&&"number"==typeof e&&(this.max=e),this.originalMax=void 0!==r&&"number"==typeof r?r:this.max,void 0!==t&&"number"==typeof t&&(this.value=t),this.originalValue=void 0!==s&&"number"==typeof s?s:this.value},s.SearchDefinitionValueWithMax.prototype.isDefault=function(){return this.max===this.originalMax&&this.value===this.originalValue},s.SearchDefinitionValueWithMax.prototype.clone=function(){return new s.SearchDefinitionValueWithMax(this.value,this.max,this.urlPrefix,this.originalValue,this.originalMax)},s.SearchDefinitionValueWithMax.prototype.getRaw=function(){return{value:this.value,max:this.max}},s.SearchDefinitionValueWithMax.prototype.set=function(t,e){this.value,this.max;Array.isArray(t)?void 0!==t[0]&&"number"==typeof t[0]&&(this.value=t[0],this.max=t[1]):"object"==typeof t?(void 0!==t.value&&"number"==typeof t.value&&(this.value=t.value),void 0!==t.max&&"number"==typeof t.max&&(this.max=t.max)):"number"==typeof t&&(this.value=t,this.max=e)},s.SearchDefinitionValueWithMax.prototype.same=function(t){return this.max===t.max&&this.value===t.value},s.SearchDefinitionValueWithMax.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/".concat(e,"_").concat(this.value,",").concat(this.max)),i},s.SearchDefinitionValueWithMax.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_([\\d]),([\\d]+)")),n=t.match(r),a=this.originalMax,o=this.originalValue;n&&n.length&&n.length>2&&(o=parseInt(n[1],10),a=parseInt(n[2],10)),s|=!this.same({value:o,max:a}),this.set(o,a)}return s},s.SearchDefinitionValueWithMin=function(t,e,i,s,r){this.type_="SearchDefinitionValueWithMin",this.value=0,this.min=0,this.urlPrefix=i,this.originalMin=r,void 0!==e&&"number"==typeof e&&(this.min=e),this.originalMin=void 0!==r&&"number"==typeof r?r:this.min,void 0!==t&&"number"==typeof t&&(this.value=t),this.originalValue=void 0!==s&&"number"==typeof s?s:this.value},s.SearchDefinitionValueWithMin.prototype.isDefault=function(){return this.min===this.originalMin&&this.value===this.originalValue},s.SearchDefinitionValueWithMin.prototype.clone=function(){return new s.SearchDefinitionValueWithMin(this.value,this.min,this.urlPrefix,this.originalValue,this.originalMin)},s.SearchDefinitionValueWithMin.prototype.getRaw=function(){return{value:this.value,min:this.min}},s.SearchDefinitionValueWithMin.prototype.set=function(t,e){this.value,this.min;Array.isArray(t)?void 0!==t[0]&&"number"==typeof t[0]&&(this.value=t[0],this.min=t[1]):"object"==typeof t?(void 0!==t.value&&"number"==typeof t.value&&(this.value=t.value),void 0!==t.min&&"number"==typeof t.min&&(this.min=t.min)):"number"==typeof t&&(this.value=t,this.min=e)},s.SearchDefinitionValueWithMin.prototype.same=function(t){return this.min===t.min&&this.value===t.value},s.SearchDefinitionValueWithMin.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/".concat(e,"_").concat(this.value,",").concat(this.min)),i},s.SearchDefinitionValueWithMin.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_([\\d]),([\\d]+)")),n=t.match(r),a=this.originalMin,o=this.originalValue;n&&n.length&&n.length>2&&(o=parseInt(n[1],10),a=parseInt(n[2],10)),s|=!this.same({value:o,min:a}),this.set(o,a)}return s},s.SearchDefinitionString=function(t,e,i){this.type_="SearchDefinitionString",this.value="",this.urlPrefix=e,this.originalValue=i,void 0!==t&&"string"==typeof t&&(this.value=t),this.originalValue=void 0!==i&&"string"==typeof i?i:this.value},s.SearchDefinitionString.prototype.isDefault=function(){return this.value===this.originalValue},s.SearchDefinitionString.prototype.clone=function(){return new s.SearchDefinitionString(this.value,this.urlPrefix,this.originalValue)},s.SearchDefinitionString.prototype.getRaw=function(){return this.value},s.SearchDefinitionString.prototype.get=function(){return this.getRaw()},s.SearchDefinitionString.prototype.set=function(t){var e={value:this.value};return Array.isArray(t)?void 0!==t[0]&&"string"==typeof t[0]&&(this.value=t[0]):t&&"object"==typeof t?void 0!==t.value&&"string"==typeof t.value&&(this.value=t.value):"string"==typeof t&&(this.value=t),!(e.value===this.value)},s.SearchDefinitionString.prototype.same=function(t){return this.value===t.value},s.SearchDefinitionString.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="",s=encodeURIComponent(this.value).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27");return e&&!this.isDefault()&&(i="/".concat(e,"_").concat(s)),i},s.SearchDefinitionString.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_([^/]*)")),n=t.match(r);if((null===n||void 0===n?void 0:n.length)>0){var a;void 0!==n[1]&&(a=n[1]),a=decodeURIComponent(a).replace(/%21/g,"!").replace(/%2A/g,"*").replace(/%28/g,"(").replace(/%29/g,")").replace(/%27/g,"'"),s|=this.set(a)}else s|=this.set(this.originalValue)}return s},s.SearchDefinitionArray=function(t,e,i){this.type_="SearchDefinitionArray",this.valueArray=[],this.urlPrefix=e,this.originalValueArray=i,t&&Array.isArray(t)&&(this.valueArray=t.slice()),i&&Array.isArray(i)?this.originalValueArray=i:this.originalValueArray=this.valueArray.slice()},s.SearchDefinitionArray.prototype.checkEquality=function(t,e){return t.length===e.length&&t.every(function(t){return e.indexOf(t)>-1})},s.SearchDefinitionArray.prototype.isDefault=function(){return this.checkEquality(this.originalValueArray,this.valueArray)},s.SearchDefinitionArray.prototype.clone=function(){return new s.SearchDefinitionArray(this.valueArray,this.urlPrefix,this.originalValueArray)},s.SearchDefinitionArray.prototype.getRaw=function(){return{valueArray:this.valueArray}},s.SearchDefinitionArray.prototype.get=function(){return this.getRaw()},s.SearchDefinitionArray.prototype.set=function(t){var e={valueArray:this.valueArray};return Array.isArray(t)?this.valueArray=t:"object"==typeof t?void 0!==t.valueArray&&Array.isArray(t.valueArray)&&(this.valueArray=t.valueArray):this.valueArray=[],!this.checkEquality(e.valueArray,this.valueArray)},s.SearchDefinitionArray.prototype.same=function(t){return this.checkEquality(this.valueArray,t.valueArray)},s.SearchDefinitionArray.prototype.getUrl=function(t){var e=t||this.urlPrefix,i="";return e&&!this.isDefault()&&(i="/".concat(e,"_[").concat(this.valueArray,"]")),i},s.SearchDefinitionArray.prototype.setUrl=function(t,e){var i=e||this.urlPrefix,s=!1;if(i){var r=new RegExp("\\/".concat(i,"_(?:\\[((?:\\d+)(?:,\\d+)*)\\])")),n=t.match(r);if(2===(null===n||void 0===n?void 0:n.length)){var a;void 0!==n[1]&&(a=n[1].split(",").map(function(t){return parseInt(t,10)})),s|=this.set(a)}else s|=this.set(this.originalValueArray)}return s},s.SearchDefinition=function(e){var r=this,n=t("SearchDefinitionTypes");if(e)for(var a=0;a<e.length;a++){this.type_="PropertySearchDefinition";var o=e[a];o.dataType===n.data.MINMAX?this[o.param]=new s.SearchDefinitionMinMax(o.defaultValue.min,o.defaultValue.max,o.url,i.string.getNumber):o.dataType===n.data.VALUEWITHMINMAX?this[o.param]=new s.SearchDefinitionValueWithMinMax(o.defaultValue.value,o.defaultValue.min,o.defaultValue.max,o.url,i.string.getNumber):o.dataType===n.data.GROUPED?this[o.param]=new s[o.dataType](o.defaultValue.group,o.defaultValue.value,o.url):this[o.param]=new s[o.dataType](o.defaultValue.value,o.url)}else{this.beds=new s.SearchDefinitionMinMax(0,100,"br",i.string.getNumber),this.baths=new s.SearchDefinitionMinMax(0,50,"ba",i.string.getNumber),this.price=new s.SearchDefinitionMinMax(0,1e8,"pr",i.string.getPrice),this.dateRange=new s.SearchDefinitionValue(0,"d"),this.sPropertyType2=new s.SearchDefinitionBitmask(511,"t"),this.specialFeatures=new s.SearchDefinitionBitmask(268435578,"f"),this.sListingStatus=new s.SearchDefinitionBitmask(1,"st"),this.offMarket=new s.SearchDefinitionBitmask(0,"om"),this.contingentPending=new s.SearchDefinitionValue(0,"ctp"),this.orderBy=new s.SearchDefinitionValue(1,"s"),this.transactionType=new s.SearchDefinitionValue(1,"tt"),this.squareFeet=new s.SearchDefinitionMinMax(0,1e6,"sf",i.string.getNumber),this.openHouseDate=new s.SearchDefinitionValue(0,"od");var h=t("AdvancedSearchDefinitions");h&&h.forEach(function(t){if(t.dataType===n.data.VALUEWITHMAX)r[t.param]=new s.SearchDefinitionValueWithMax(t.defaultValue.value,t.defaultValue.max,t.url,i.string.getNumber);else if(t.dataType===n.data.VALUEWITHMIN)r[t.param]=new s.SearchDefinitionValueWithMin(t.defaultValue.value,t.defaultValue.min,t.url,i.string.getNumber);else if(t.dataType===n.data.VALUEWITHMINMAX)r[t.param]=new s.SearchDefinitionValueWithMinMax(t.defaultValue.value,t.defaultValue.min,t.defaultValue.max,t.url,i.string.getNumber);else if(t.dataType===n.data.MINMAX)r[t.param]=new s.SearchDefinitionMinMax(t.defaultValue.min,t.defaultValue.max,t.url);else if(t.dataType===n.data.ARRAY)r[t.param]=new s.SearchDefinitionArray(t.defaultValue.arrayValues,t.url);else if(t.dataType===n.data.STRING)r[t.param]=new s.SearchDefinitionString(t.defaultValue.value,t.url);else{var e=Array.isArray(t.param)?t.param:[t.param],a=Array.isArray(t.url)?t.url:[t.url];e.forEach(function(i,n){r[e[n]]=new s.SearchDefinitionBitmask(t.defaultValue.value,a[n])})}})}},s.SearchDefinition.prototype.getRaw=function(e){if(void 0===e){var i={};if(this.type_&&"PropertySearchDefinition"===this.type_){var r=this;Object.keys(this).map(function(t){"type_"!==t&&"function"==typeof r[t].getRaw&&(i[t]=r[t].getRaw())})}else{i={beds:this.beds.getRaw(),baths:this.baths.getRaw(),price:this.price.getRaw(),dateRange:this.dateRange.getRaw(),sPropertyType2:this.sPropertyType2.getRaw(),specialFeatures:this.specialFeatures.getRaw(),sListingStatus:this.sListingStatus.getRaw(),offMarket:this.offMarket.getRaw(),contingentPending:this.contingentPending.getRaw(),orderBy:this.orderBy.getRaw(),transactionType:this.transactionType.getRaw(),dateRanges:s.SearchDefinitionDateRanges.get(this.sListingStatus.getRaw(),this.specialFeatures.getRaw()),openHouseDate:this.openHouseDate.getRaw(),label:this.getLabel(),areaHeading:this.getTitle(),squareFeet:this.squareFeet.getRaw()};var n=t("AdvancedSearchDefinitions");if(n){var a=this;Object.keys(n).map(function(t){var e=n[t],s=e.param;Array.isArray(s)?s.forEach(function(t){"function"==typeof a[t].getRaw&&(i[t]=a[t].getRaw())}):"type_"!==t&&"function"==typeof a[s].getRaw&&(i[s]=a[s].getRaw())})}}return i}return"string"==typeof e&&this.hasOwnProperty(e)?this[e].getRaw():void 0},s.SearchDefinition.prototype.getLabel=function(){var t,e,i=this.transactionType.getRaw(),s=this.sListingStatus.getRaw(),r=this.specialFeatures.getRaw(),n=this.sPropertyType2.getRaw();return 4===i?(t="Home",e="Homes"):1===i?1===s?1==(1&r)?(t="Open House",e="Open Houses"):256==(256&r)?(t="Agent Open",e="Agent Opens"):32==(32&n)||128==(128&n)?(t="For Sale",e="For Sale"):(t="Home for Sale",e="Homes for Sale"):2===s?(t="Contract",e="Contracts"):4===s&&(t="Recently Sold",e="Recently Sold"):1===s?1==(1&r)?(t="Open House",e="Open Houses"):256==(256&r)?(t="Agent Open",e="Agent Opens"):32==(32&n)||128==(128&n)?(t="For Rent",e="For Rent"):(t="Home for Rent",e="Homes for Rent"):2===s?(t="Agreement",e="Agreements"):4===s&&(t="Recently Rented",e="Recently Rented"),{singular:t||"Result",plural:e||"Results"}},s.SearchDefinition.prototype.get=function(t){return this.hasOwnProperty(t)?this[t].get():void 0},s.SearchDefinition.prototype.set=function(t,e,i,r){var n=!1;if("object"==typeof t){for(var a in t)t.hasOwnProperty(a)&&(Array.isArray(t[a])?n|=this.set(a,t[a][0],t[a][1]):n|=this.set(a,t[a]));n&&this.type_&&"PropertySearchDefinition"!==this.type_&&this.dateRange.set(s.SearchDefinitionDateRanges.validate(this.dateRange.getRaw(),this.sListingStatus.getRaw(),this.specialFeatures.getRaw()))}else if("url"===t)n|=this.setUrl(e);else if(this.hasOwnProperty(t)&&void 0!==e&&"object"==typeof this[t]&&this[t].type_){switch(this[t].type_){case"SearchDefinitionMinMax":case"SearchDefinitionGroupedBitMask":
n|=this[t].set(e,i);break;case"SearchDefinitionValueWithMinMax":n|=this[t].set(e,i,r);break;case"SearchDefinitionValueWithMax":n|=!this[t].same({value:e,min:i}),this[t].set(e,i);break;case"SearchDefinitionValueWithMin":n|=!this[t].same({value:e,max:i}),this[t].set(e,i);break;case"SearchDefinitionArray":n|=!this[t].same({valueArray:e}),this[t].set(e);break;case"SearchDefinitionBitmask":case"SearchDefinitionValue":n|=this[t].set(e);break;case"SearchDefinitionString":n|=this[t].set(e)}n&&"transactionType"===t&&this.price.set(0,1e8)}return n},s.SearchDefinition.prototype.same=function(e){if(this.type_&&"PropertySearchDefinition"===this.type_){var i=this;return Object.keys(this).every(function(t){return"type_"===t||"function"!=typeof i[t].same||i[t].same(e[t])})}var s=this.beds.same(e.beds)&&this.baths.same(e.baths)&&this.price.same(e.price)&&this.dateRange.same(e.dateRange)&&this.sPropertyType2.same(e.sPropertyType2)&&this.specialFeatures.same(e.specialFeatures)&&this.sListingStatus.same(e.sListingStatus)&&this.offMarket.same(e.offMarket)&&this.contingentPending.same(e.contingentPending)&&this.orderBy.same(e.orderBy)&&this.transactionType.same(e.transactionType)&&this.squareFeet.same(e.squareFeet)&&this.openHouseDate.same(e.openHouseDate),r=t("AdvancedSearchDefinitions"),n=[],a=this;return r&&r.forEach(function(t){var e=t;(Array.isArray(e.param)?e.param:[e.param]).forEach(function(t,e){n.push(t)})}),s&&n.every(function(t){return a[t].same(e[t])})},s.SearchDefinition.prototype.clone=function(e){var i;if(e){i=new s.SearchDefinition(e);for(var r=this,n=0;n<e.length;n++){var a=e[n],o=a.param;"type_"!==a&&"function"==typeof r[o].clone&&(i[a.param]=r[o].clone())}}else{i=new s.SearchDefinition;var h=this;i.beds=this.beds.clone(),i.baths=this.baths.clone(),i.price=this.price.clone(),i.dateRange=this.dateRange.clone(),i.openHouseDate=this.openHouseDate.clone(),i.sPropertyType2=this.sPropertyType2.clone(),i.specialFeatures=this.specialFeatures.clone(),i.sListingStatus=this.sListingStatus.clone(),i.offMarket=this.offMarket.clone(),i.contingentPending=this.contingentPending.clone(),i.orderBy=this.orderBy.clone(),i.transactionType=this.transactionType.clone(),i.squareFeet=this.squareFeet.clone();var u=t("AdvancedSearchDefinitions");u&&u.forEach(function(t){var e=t;(Array.isArray(e.param)?e.param:[e.param]).forEach(function(t,e){"function"==typeof h[t].clone&&(i[t]=h[t].clone())})})}return i},s.SearchDefinition.prototype.getUrl=function(e){var i=this,s={prefix:"",suffix:""};if(this.type_&&"PropertySearchDefinition"===this.type_)Object.keys(this).map(function(t){"type_"!==t&&"function"==typeof i[t].getUrl&&(s.suffix+=i[t].getUrl())}),s.prefix+="/all";else{s.suffix+=this.beds.getUrl(),s.suffix+=this.baths.getUrl(),s.suffix+=this.price.getUrl(),s.suffix+=this.dateRange.getUrl(),s.suffix+=this.openHouseDate.getUrl(),s.suffix+=this.sPropertyType2.getUrl(),s.suffix+=this.contingentPending.getUrl(),s.suffix+=this.specialFeatures.getUrl(),s.suffix+=this.orderBy.getUrl(),s.suffix+=this.squareFeet.getUrl(),s.suffix+=this.offMarket.getUrl();var r=t("AdvancedSearchDefinitions");r&&r.forEach(function(t){var e=t;(Array.isArray(e.param)?e.param:[e.param]).forEach(function(t,e){"function"==typeof i[t].getUrl&&(s.suffix+=i[t].getUrl())})});var n=this.sListingStatus.getRaw(),a=this.transactionType.getRaw(),o=this.specialFeatures.isOn(1),h=this.specialFeatures.isOn(256),u=this.specialFeatures.isOn(32);1===n?1===a?s.prefix+="/for_sale":2===a&&(s.prefix+="/for_rent"):2===n?1===a?s.prefix+="/contract":2===a&&(s.prefix+="/rental_agreement"):4===n?1===a?s.prefix+="/sold":2===a&&(s.prefix+="/rented"):u&&0===n?1===a?s.prefix+="/coming_soon":2===a&&(s.prefix+="/rental_coming_soon"):(s.suffix+=this.sListingStatus.getUrl(),s.suffix+=this.transactionType.getUrl()),o?s.prefix+="/open_house":h&&(s.prefix+="/agent_open")}return s},s.SearchDefinition.prototype.setUrl=function(e){var i=this,s=!1;if(e.indexOf("all")>-1)Object.keys(this).map(function(t){"type_"!==t&&"function"==typeof i[t].setUrl&&(s|=i[t].setUrl(e))});else{s|=this.beds.setUrl(e),s|=this.baths.setUrl(e),s|=this.price.setUrl(e),s|=this.dateRange.setUrl(e),s|=this.openHouseDate.setUrl(e),s|=this.sPropertyType2.setUrl(e),s|=this.specialFeatures.setUrl(e),s|=this.contingentPending.setUrl(e),s|=this.orderBy.setUrl(e),s|=this.squareFeet.setUrl(e),s|=this.offMarket.setUrl(e);var r=t("AdvancedSearchDefinitions");r&&r.forEach(function(t){var r=t;(Array.isArray(r.param)?r.param:[r.param]).forEach(function(t,r){"function"==typeof i[t].getUrl&&(s|=i[t].setUrl(e))})}),e.indexOf("/for_sale")>=0?(s|=this.sListingStatus.set(1),s|=this.transactionType.set(1)):e.indexOf("/for_rent")>=0?(s|=this.sListingStatus.set(1),s|=this.transactionType.set(2)):e.indexOf("/contract")>=0?(s|=this.sListingStatus.set(2),s|=this.transactionType.set(1)):e.indexOf("/rental_agreement")>=0?(s|=this.sListingStatus.set(2),s|=this.transactionType.set(2)):e.indexOf("/sold")>=0?(s|=this.sListingStatus.set(4),s|=this.transactionType.set(1)):e.indexOf("/rented")>=0?(s|=this.sListingStatus.set(4),s|=this.transactionType.set(2)):e.indexOf("/coming_soon")>=0?(s|=this.specialFeatures.set(32),s|=this.transactionType.set(1)):e.indexOf("/rental_coming_soon")>=0?(s|=this.specialFeatures.set(32),s|=this.transactionType.set(2)):(s|=this.sListingStatus.setUrl(e),s|=this.transactionType.setUrl(e))}return s},s.SearchDefinition.prototype.getTitle=function(){var t=(this.sPropertyType2.getRaw(),this.sListingStatus.getRaw()),e=this.transactionType.getRaw(),i=this.specialFeatures.isOn(1),s=this.specialFeatures.isOn(32),r=this.specialFeatures.isOn(256),n="";return 1===t?1===e?n="Real Estate & Homes For Sale":2===e?n="Homes & Apartments For Rent":4===e&&(n="Homes & Apartments"):2===t?1===e?n+="Homes Under Contract":2===e&&(n="Homes & Apartments Under Rental Agreement"):4===t&&(1===e?n="Recently Sold Homes":2===e&&(n="Recently Rented Properties")),i?n=2===e?"Rental Open Houses":"Open Houses":r?n="Agent Opens":s&&0==t&&(n="Coming Soon"),n},s.Bounds=function(t,e,s,r){this.north=i.js.round(t,6),this.south=i.js.round(e,6),this.east=i.js.round(s,6),this.west=i.js.round(r,6)},s.Bounds.prototype.similar=function(t,e,s){s=s||15;var r={ne:i.map.getXYbyLatLng(this.north,this.east,e),sw:i.map.getXYbyLatLng(this.south,this.west,e)},n={ne:i.map.getXYbyLatLng(t.north,t.east,e),sw:i.map.getXYbyLatLng(t.south,t.west,e)},a={ne:Math.sqrt(Math.pow(r.ne.x-n.ne.x,2)+Math.pow(r.ne.y-n.ne.y,2)),sw:Math.sqrt(Math.pow(r.sw.x-n.sw.x,2)+Math.pow(r.sw.y-n.sw.y,2))};return(a.ne+a.sw)/2<s},s.Bounds.prototype.same=function(t){return i.js.round(this.north,4)===i.js.round(t.north,4)&&i.js.round(this.south,4)===i.js.round(t.south,4)&&i.js.round(this.east,4)===i.js.round(t.east,4)&&i.js.round(this.west,4)===i.js.round(t.west,4)},s.Bounds.prototype.center=function(){return{lat:i.js.round((this.north+this.south)/2,6),lng:i.js.round((this.east+this.west)/2,6)}},s.AccountModeManager=function(t){this.modes=t,this._back=[]},s.AccountModeManager.prototype.switch=function(t){for(var e=0;e<this.modes.length;e++)if(this.modes[e].name===t)return void(this.current=this.modes[e]);throw"Invalid mode name"},s.AccountModeManager.prototype.push=function(){var e=this._back.length;return t(["lodash"],function(t){"undefined"!==t&&null!==t&&this._back.push(new s.BackState(this.current.name,this.current.current.name,t.cloneDeep(this.current.current.getState())))}.bind(this)),e>0},s.AccountModeManager.prototype.pop=function(){if(this._back.length<2)throw"Nothing to pop";this._back.pop();var t=this._back.pop();this.switch(t.mode),this.current.switch(t.module),this.current.current.setState(t.state)},s.BackState=function(t,e,i){this.mode=t,this.module=e,this.state=i},s.AccountMode=function(t,e){if(this.name=t,this.modules=e,Array.isArray(this.modules)&&this.modules.length>0){this.current=this.modules[0];for(var i=0;i<this.modules.length;i++)this.modules[i].onComplete(function(){delete this.current;for(var t=0;t<this.modules.length;t++)if(!this.modules[t].isComplete()){this.current=this.modules[t];break}this.current||this._onComplete&&this._onComplete(this.name)}.bind(this))}},s.AccountMode.prototype.switch=function(t){for(var e=0;e<this.modules.length;e++)if(this.modules[e].name===t)return void(this.current=this.modules[e]);throw"Invalid module name"},s.AccountMode.prototype.onComplete=function(t){this._onComplete=t},s.AccountModule=function(t,e){if(!t)throw"Objects.AccountModule(name, state) requires name";this.name=t,this.setState(e),this._complete=!1},s.AccountModule.prototype.setState=function(t){this.state=t||{},this.state.module=name},s.AccountModule.prototype.getState=function(){return this.state},s.AccountModule.prototype.isComplete=function(){return this._complete},s.AccountModule.prototype.complete=function(){this._complete=!0,this._onComplete&&this._onComplete(this.name)},s.AccountModule.prototype.onComplete=function(t){this._onComplete=t},s.MortgageCalculation=function(t,e,i,s){var r=arguments[0]||{};this.setDollarAmount(r.price||25e4,"price"),this.setAmountOrPercent(r.down||20,"down","isPercentSet_"),this.setTerm(r.term||30),this.setPercentage(r.rate||this.term.rate,"rate"),this.setAmountOrPercent(void 0!==r.propertyTax?r.propertyTax:0,"propertyTax","isPropertyTaxPercent_"),this.setDollarAmount(void 0!==r.homeownersInsurance?r.homeownersInsurance:1250,"homeownersInsurance"),this.setAmountOrPercent(r.mortgageInsurance||0,"mortgageInsurance","isMortgageInsurancePercent_"),this.setPercentage(r.debtToIncome||36,"debtToIncome"),this.setDollarAmount(void 0!==r.income?r.income:6e4,"income"),this.setDollarAmount(void 0!==r.debts?r.debts:500,"debts"),this.setDollarAmount(r.hoaCondoFees||0,"hoaCondoFees"),void 0!==r.isPercentSet_&&(this.isPercentSet_=r.isPercentSet_),void 0!==r.isPropertyTaxPercent_&&(this.isPropertyTaxPercent_=r.isPropertyTaxPercent_),void 0!==r.isMortgageInsurancePercent_&&(this.isMortgageInsurancePercent_=r.isMortgageInsurancePercent_)},s.MortgageCalculation.prototype.setDollarAmount=function(t,e){if(void 0!==t){var s=t.toString().replace(/[^\d\.]+/g,"");if(s=""===s?0:s,!isNaN(s)){var r=Math.round(parseFloat(s));this[e]&&this[e].raw===r||(this[e]=i.string.getNumber(r),this.update())}}},s.MortgageCalculation.prototype.setAmountOrPercent=function(t,e,s,r){if(void 0!==t){var n=t.toString().replace(/[^\d\.]+/g,"");if(n=""===n?0:n,!isNaN(n)){var a,o;if(this[e]=this[e]||{},"down"===e&&20===t&&(r=!0),r){if(o=parseFloat(n),this[e].percent&&this[e].percent.raw===o)return;this[e].percent=i.string.getNumber(o),this[s]=!0,delete this[e].amount}else{if(a=Math.round(parseFloat(n)),this[e].amount&&this[e].amount.raw===a)return;this[e].amount=i.string.getNumber(a),this[s]=!1,delete this[e].percent}this.update()}}},s.MortgageCalculation.prototype.setTerm=function(t){if(!(isNaN(t)||this.term&&this.term.value===parseInt(t))){var e;switch(parseInt(t)){case 5:e={name:"5/1 Arm",months:360,value:5,rate:5.69};break;case 15:e={name:"15-year fixed",months:180,value:15,rate:6.23};break;case 30:default:e={name:"30-year fixed",months:360,value:30,rate:6.94}}this.setPercentage(e.rate,"rate"),this.term=e,this.update()}},s.MortgageCalculation.prototype.setPercentage=function(t,e){if(t){var s=t.toString().replace(/[^\d\.]+/g,"");isNaN(s)||this[e]&&this[e].raw===parseFloat(s)||(this[e]=i.string.getNumber(parseFloat(s)),this.update())}},s.MortgageCalculation.prototype.update=function(){try{if(this.price&&this.down&&this.term&&this.rate&&this.propertyTax&&this.mortgageInsurance&&this.hoaCondoFees&&(this.isPercentSet_&&this.down.percent?this.down.amount=i.string.getNumber(Math.round(this.price.raw*this.down.percent.raw/100)):this.down.amount&&(this.down.percent=i.string.getNumber(Math.min(100,Math.round(100*this.down.amount.raw/this.price.raw)))),this.isPropertyTaxPercent_&&this.propertyTax.percent?this.propertyTax.amount=i.string.getNumber(Math.round(this.price.raw*this.propertyTax.percent.raw/100)):this.propertyTax.amount&&(this.propertyTax.percent=i.string.getNumber(Math.min(100,Math.round(100*this.propertyTax.amount.raw/this.price.raw)))),this.isMortgageInsurancePercent_&&this.mortgageInsurance.percent?this.mortgageInsurance.amount=i.string.getNumber(Math.round(this.price.raw*this.mortgageInsurance.percent.raw/100)):this.mortgageInsurance.amount&&(this.mortgageInsurance.percent=i.string.getNumber(Math.min(100,Math.round(100*this.mortgageInsurance.amount.raw/this.price.raw)))),this.payment=i.string.getPrice(Math.round(i.listing.getMonthlyPayment(Math.max(this.price.raw-this.down.amount.raw,0),this.term.months,this.rate.raw/100/12))+this.hoaCondoFees.raw+this.propertyTax.amount.raw/12+this.homeownersInsurance.raw/12+this.mortgageInsurance.amount.raw/12),this.income&&this.debtToIncome&&this.debts&&this.propertyTax)){var t={income:this.income.raw,debtToIncome:this.debtToIncome.raw/100,monthlyDebts:this.debts.raw,annualPropertyTax:this.propertyTax.amount.raw,annualHomeownersInsurance:this.homeownersInsurance.raw,annualMortgageInsurance:this.mortgageInsurance.amount.raw,hoaFees:this.hoaCondoFees.raw,loanTerm:this.term.months,downPayment:this.down.amount.raw,interestRate:this.rate.raw/100/12};this.maxHomePrice=i.string.getPrice(Math.floor(100*i.listing.getAffordabilityHomePrice(t))/100),this.maxHomePricePayment=i.string.getPrice(parseInt(i.listing.getMonthlyPayment(this.maxHomePrice.raw-this.down.amount.raw,this.term.months,this.rate.raw/100/12))+this.hoaCondoFees.raw+this.propertyTax.amount.raw/12+this.homeownersInsurance.raw/12+this.mortgageInsurance.amount.raw/12,10),this.maxHomePrice=this.maxHomePrice.raw>0?this.maxHomePrice:i.string.getPrice(0),this.maxHomePricePayment=this.maxHomePrice.raw>0?this.maxHomePricePayment:i.string.getPrice(0)}}catch(t){throw console.log(this),new Error("Mortgage Calculator Update Error")}},s.MortgageCalculation.prototype.getRaw=function(){return{price:this.price.raw,down:this.down.amount.raw,isPercentSet_:this.isPercentSet_,term:this.term.value,rate:this.rate.raw,debtToIncome:this.debtToIncome.raw,income:this.income.raw,debts:this.debts.raw,homeownersInsurance:this.homeownersInsurance.raw,mortgageInsurance:this.isMortgageInsurancePercent_?this.mortgageInsurance.percent.raw:this.mortgageInsurance.amount.raw,isMortgageInsurancePercent:this.isMortgageInsurancePercent_,hoaCondoFees:this.hoaCondoFees.raw}},s.HSNotificationPreferenceListResult=function(t){if(this.type_="HSNotificationPreferenceListResult",this.categoryItems=[],this.errorCode=t.ErrorCode,this.errorText=t.ErrorText,t&&t.CategoryItems&&t.CategoryItems.length>0)for(var e=0;e<t.CategoryItems.length;e++)this.categoryItems.push(new s.HSNotificationPreferenceCategory(t.CategoryItems[e]))},s.HSNotificationPreferenceGetResult=function(t){this.type_="HSNotificationPreferenceGetResult",this.preferenceItem=new s.HSNotificationPreferenceItem(t.PreferenceItem),this.errorCode=t.ErrorCode,this.errorText=t.ErrorText},s.HSNotificationPreferenceSaveResult=function(t){this.type_="HSNotificationPreferenceSaveResult",this.errorCode=t.ErrorCode,this.errorText=t.ErrorText},s.HSNotificationPreferenceCategory=function(t){if(this.type_="HSNotificationPreferenceCategory",this.name=t.Name,this.id=t.ID,this.description=t.Description,this.preferences=[],t&&t.Preferences)for(var e=0;e<t.Preferences.length;e++)this.preferences.push(new s.HSNotificationPreferenceItem(t.Preferences[e]))},s.HSNotificationPreferenceItem=function(t){if(this.type_="HSNotificationPreferenceItem",t&&(this.id=t.ID,this.name=t.Name,this.description=t.Description,this.items=[],t.Items))for(var e=0;e<t.Items.length;e++){var r=(t.Items[e],i.ajax.getHSType(t.Items[e].__type));switch(r){case"HSNotificationPreferenceDeliveryMethodCheckboxItem":this.items.push(new s.HSNotificationPreferenceDeliveryMethodCheckboxItem(t.Items[e]));break;case"HSNotificationPreferenceDeliveryMethodSingleSelectItem":this.items.push(new s.HSNotificationPreferenceDeliveryMethodSingleSelectItem(t.Items[e]));break;case"HSNotificationPreferenceDeliveryMethodMultiSelectItem":this.items.push(new s.HSNotificationPreferenceDeliveryMethodMultiSelectItem(t.Items[e]))}}},s.HSNotificationPreferenceUnsubscribeAllFeedback=function(t){if(this.type_="HSNotificationPreferenceUnsubscribeAllFeedback",this.feedbackItems=[],t&&t.length>0)for(var e=0;e<t.length;e++)this.feedbackItems.push(new s.HSNotificationPreferenceFeedBackItem(t[e]))},s.HSNotificationPreferenceFeedBackItem=function(t){this.type_="HSNotificationPreferenceFeedBackItem",this.id=t.ID,this.description=t.Description},s.HSNotificationPreferenceDeliveryMethodCheckboxItem=function(t){this.type_="HSNotificationPreferenceDeliveryMethodCheckboxItem",this.checked=t.Checked,this.name=t.Name,this.value=t.Value,this.status=t.Status},s.HSNotificationPreferenceDeliveryMethodSingleSelectItem=function(t){if(this.type_="HSNotificationPreferenceDeliveryMethodSingleSelectItem",this.name=t.Name,this.value=t.Value,this.status=t.Status,this.items=[],t&&t.Items)for(var e=0;e<t.Items.length;e++){var i={name:t.Items[e].Name,value:t.Items[e].Value,selected:t.Items[e].Selected};this.items.push(i)}},s.HSNotificationPreferenceDeliveryMethodMultiSelectItem=function(t){if(this.type_="HSNotificationPreferenceDeliveryMethodMultiSelectItem",this.name=t.Name,this.value=t.Value,this.status=t.Status,this.items=[],t&&t.Items)for(var e=0;e<t.Items.length;e++)this.item={name:t.Items[e].Name,value:t.Items[e].Value,selected:t.Items[e].Selected},this.items.push(item)},s.NetSheetCalculation=function(t){t||(t={}),this.commissionAmount=t.commissionAmount||0,this.commissionPercent=t.commissionAmount?0:t.commissionPercent||6,this.transferTaxAmount=t.transferTaxAmount||0,this.transferTaxPercent=t.transferTaxAmount?0:t.transferTaxPercent||.15,this.recordingFeeAmount=t.recordingFeePercent?0:t.recordingFeeAmount||125,this.recordingFeePercent=t.recordingFeePercent||0,this.escrowAttorneyFee=t.escrowAttorneyFee||150,this.wireCourierFee=t.wireCourierFee||30,this.documentPrepFee=t.documentPrepFee||50,this.taxStatusReport=t.taxStatusReport||0,this.homeWarranty=t.homeWarranty||0},s.NetSheetCalculation.prototype.set=function(t,e){if(t||e){var i=e.toString().replace(/[$,]/g,"");if(!isNaN(i)){switch(t){case"commissionAmount":this.commissionPercent=0;break;case"commissionPercent":this.commissionAmount=0;break;case"transferTaxAmount":this.transferTaxPercent=0;break;case"transferTaxPercent":this.transferTaxAmount=0;break;case"recordingFeeAmount":this.recordingFeePercent=0;break;case"recordingFeePercent":this.recordingFeeAmount=0}this[t]=Number(i)}}},s.NetSheetCalculation.prototype.get=function(t){return{value:this[t].toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),raw:this[t]}},s});
//# sourceMappingURL=https://assets.homesnap.com/app_agent_website/js_min/Objects.js.map?hash=bb263771ec65804f4f426847373af2c1
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 destructure 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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===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 _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}define("Utilities",[],function(){var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t=window.Homesnap||{jsRootPath:"/app/js",imageRootPath:"/app/img",handlebarRootPath:"/app/handlebars"},r=(new Date).getTime(),n=function(e){TrackJS&&TrackJS.console&&TrackJS.console.log&&TrackJS.console.log(e||{})},a={};return a.ajax={headers:function(e){var r=document.createElement("a");if(r.href=e,a.path.getDomain(r.origin)===a.path.getDomain(document.domain)&&"number"==typeof t.coStarBrand){var n;this.headers=Object.assign(null!==(n=this.headers)&&void 0!==n?n:{},{"X-CoStar-Brand":t.coStarBrand})}},post:function(e,r,a,o,i){var s=t.siteRootUrl,l={type:"POST",url:"".concat(s).concat(e),data:JSON.stringify(r),contentType:"application/json; charset=utf-8",dataFilter:function(e,t){return e.replace(/"\\\/Date\(([0-9-]+)\)\\\/"/gi,"$1")},dataType:"json",xhrFields:{withCredentials:!0},success:function(e){a&&a(void 0!==e?e.d:void 0)},error:function(e,t,a){n(r),"function"==typeof o&&o(e,t,a)}};if(i&&"object"==typeof i)for(var u in i)i.hasOwnProperty(u)&&(l[u]=i[u]);this.headers.call(l,e),require(["jquery"],function(e){e.ajax(l)})},getOne:function(e,t,r,a,o,i){this.post(e,t,function(e){"function"==typeof a&&a(void 0===e||null===e?e:new r(e))},function(e,r,a){n(t),"function"==typeof o&&o(e,r,a)},i)},getArray:function(e,t,r,a,o,i){this.post(e,t,function(e){"function"==typeof a&&a(e&&Array.isArray(e)?e.map(function(e){return new r(e)}):null)},function(e,r,a){n(t),"function"==typeof o&&o(e,r,a)},i)},getHSType:function(e){if(e&&"string"==typeof e){var t=/\.?(HS\w+)$/i,r=e.match(t);if(r&&r[1])return r[1]}return!1},isType:function(e,t){return!!(e&&t&&e.type_&&e.type_===t)||!!(e&&t&&e.types_&&e.types_.indexOf(t)>-1)},addType:function(e,t){e.types_=e.types_||[],e.types_.push(t),e.type_=t},getObjectKey:function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push({key:r,value:e[r]});return t.sort(function(e,t){return e.key<t.key?-1:e.key>t.key?1:0}).reduce(function(e,t){return e+t.key.toString()+":"+t.value.toString()+";"},"")}},a.handlebars={helpersLoaded:!1,loadHelpers:function(e){if(!a.handlebars.helpersLoaded){if(e.helpers.and||e.registerHelper("and",function(){var e=!0;if(arguments.length<3)throw new Error("Handlerbars Helper 'and' needs 2 parameters");for(var t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e&=Array.isArray(arguments[r])?arguments[r].length>0:!!arguments[r];return t.fn?e?t.fn(this):t.inverse(this):e}),e.helpers.none||e.registerHelper("none",function(){var e=!0;if(arguments.length<3)throw new Error("Handlerbars Helper 'none' needs 2 parameters");for(var t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e&=!(Array.isArray(arguments[r])?arguments[r].length>0:!!arguments[r]);return t.fn?e?t.fn(this):t.inverse(this):e}),e.helpers.or||e.registerHelper("or",function(){var e=!1;if(arguments.length<3)throw new Error("Handlerbars Helper 'or' needs 2 parameters");for(var t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e|=Array.isArray(arguments[r])?arguments[r].length>0:!!arguments[r];return t.fn?e?t.fn(this):t.inverse(this):e}),e.helpers.compare||e.registerHelper("compare",function(e,t,r,n){var a,o;if(arguments.length<3)throw new Error("Handlerbars Helper 'compare' needs 2 parameters");if(n||(n=r,r=t,t="==="),a={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},"<":function(e,t){return e<t},">":function(e,t){return e>t},"<=":function(e,t){return e<=t},">=":function(e,t){return e>=t},typeof:function(e,t){return typeof e==t}},!a[t])throw new Error("Handlerbars Helper 'compare' doesn't know the operator ".concat(t));return o=a[t](e,r),n.fn?o?n.fn(this):n.inverse(this):o}),e.helpers.math||e.registerHelper("math",function(e,t,r,n){return e=parseFloat(e),r=parseFloat(r),{"+":e+r,"-":e-r,"*":e*r,"/":e/r,"%":e%r}[t]}),e.helpers.paths||e.registerHelper("paths",function(e){return{img:t.imageRootPath,image:t.imageRootPath,js:t.jsRootPath,css:t.cssRootPath,handlebars:t.handlebarRootPath}[e]}),e.helpers.truncate||e.registerHelper("truncate",function(t,r){var n=r.hash.chars||32,a=t;return t.length>n&&(a=a.substring(0,n),r.hash.append&&(a+=r.hash.append)),new e.SafeString(a)}),e.helpers.lowercase||e.registerHelper("lowercase",function(t){return new e.SafeString(t.toLowerCase())}),e.helpers.cleanEscape||e.registerHelper("cleanEscape",function(e){return e?e.replace("\\","/"):e}),e.helpers.encodeURIComponent||e.registerHelper("encodeURIComponent",function(e){return encodeURIComponent(e)}),e.partials.hsLoadingGraphic||e.registerPartial("hsLoadingGraphic",'<span class="hs-stack link-hs-blue"><i class="hs-square hs-spin hs-stack-2x" aria-hidden="true"></i><i class="hs-stack-1x hs-house hs-loader-house" aria-hidden="true"></i></span>'),e.partials.hsCopyright||e.registerPartial("hsCopyright","<span class={{className}}>© {{year}} CoStar Group</span>"),!e.partials.showingsSupport){var r=a.coStarBrand.getCurrent().name,n=a.coStarBrand.is("citysnap")?"":"text-hs-blue bs4--text-decoration-none";e.registerPartial("showingsSupport",'\n <div class="{{#if divClasses}}{{divClasses}}{{else}}bs4--w-100 bs4--text-center bs4--mt-3{{/if}}">\n <p class="{{#if pClasses}}{{pClasses}}{{else}}bs4--text-gray-500{{/if}}">Need Help with '.concat(r,' Showings?</p>\n <a href="tel:').concat("800-431-5509",'" class="{{#if aClasses}}{{aClasses}}{{else}}bs4--d-block ').concat({cssClasses:n},'{{/if}} showings-help-phone-number">').concat("800-431-5509","</a>\n </div>\n "))}a.handlebars.helpersLoaded=!0}},getHtml:function(e,t,r){require(["handlebars"],function(n){a.handlebars.loadHelpers(n),n.templates&&n.templates[e]?r&&r(n.templates[e]):(n.templates||(n.templates={}),n.templates[e]=n.compile(t),r&&r(n.templates[e]))})},getTemplate:function(e,r,n){var o=r.toLowerCase();r=t.handlebarAppHashes&&!t.handlebarAppHashes["".concat(o)]?"".concat(t.handlebarMainRootPath,"/").concat(r):"".concat(t.handlebarRootPath,"/").concat(r),require(["handlebars"],function(o){if(a.handlebars.loadHelpers(o),o.templates&&o.templates[e])n&&n(o.templates[e]);else if(o.templates||(o.templates={}),t&&t.templates&&t.templates[e]){var i=t.templates[e];i=i.replace(new RegExp("</script","g"),"</script"),i=i.replace(new RegExp("<script","g"),"<script"),o.templates[e]=o.compile(i),n&&n(o.templates[e])}else require(["text!"+r],function(t){o.templates[e]=o.compile(t),n&&n(o.templates[e])})})},getPartialHTML:function(e,r,n){require(["handlebars"],function(o){if(a.handlebars.loadHelpers(o),o.partials&&o.partials[e])"function"==typeof o.partials[e]?r(o.partials[e]()):"string"==typeof o.partials[e]&&r(o.partials[e]);else if(o.partials||(o.partials={}),t&&t.partials&&t.partials[e]){var i=o.partials[e];o.partials[e]=o.compile(i),r&&r(o.partials[e]())}else require(["text!".concat(n)],function(t){o.partials[e]=o.compile(t),r&&r(o.partials[e])})})},loadCSS:function(e,n){var a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i="string"==typeof e?[e]:Array.isArray(e)?e:[e],s=null!==(a=window.Homesnap.rewVersionNumber)&&void 0!==a?a:window.Homesnap.versionNumber;i.forEach(function(e){var a;if(-1==e.indexOf("https://")&&0!=e.indexOf("//")){var i=e.toLowerCase();e=t.cssAppHashes&&!t.cssAppHashes["".concat(i)]?"".concat(t.cssMainRootPath,"/").concat(e):"".concat(t.cssRootPath,"/").concat(e)}if(t.cssAppHashes&&t.cssRootPath&&0===e.indexOf(t.cssRootPath)){var l=e.replace("".concat(t.cssRootPath,"/"),"").toLowerCase();a=t.cssAppHashes[l]||r}else if(t.cssHashes&&t.cssMainRootPath&&0===e.indexOf(t.cssMainRootPath)){var u=e.replace("".concat(t.cssMainRootPath,"/"),"").toLowerCase();a=t.cssHashes[u]||r}void 0!==a&&""!==a&&(e+="".concat(-1===e.indexOf("?")?"?":"&","hash=").concat(a,"&v=").concat(s)),require(["jquery"],function(t){if(!t("link[href='".concat(e,"']")).length){var r=t("head");if(r.length){var a=t('<link rel="stylesheet" type="text/css" />').attr("href",e);r.append(a),null!==o&&void 0!==o&&o.key&&null!==o&&void 0!==o&&o.value&&a.attr(o.key,o.value)}}"function"==typeof n&&n()})})}},a.ui={getWindowSize:function(e){return e>=1200?"lg":e>=992?"md":e>=768?"sm":"xs"},belowthefold:function(e,t,r,n){return(n&&n.offset()?n.offset().top+n.height():(t[0].innerHeight?t[0].innerHeight:t.height())+t.scrollTop())<=e.offset().top-(r||0)},rightoffold:function(e,t,r,n){return(n&&n.offset()?n.offset().left+n.width():t.width()+t.scrollLeft())<=e.offset().left-(r||0)},abovethetop:function(e,t,r,n){return(n&&n.offset()?n.offset().top:t.scrollTop())>=e.offset().top+(r||0)+e.height()},leftofbegin:function(e,t,r,n){return(n&&n.offset()?n.offset().left:t.scrollLeft())>=e.offset().left+(r||0)+e.width()},inviewport:function(e,t,r,n){return!(!e||!e.length)&&!(this.rightoffold(e,t,r,n)||this.leftofbegin(e,t,r,n)||this.belowthefold(e,t,r,n)||this.abovethetop(e,t,r,n))},findEdges:function(e){var t;if(e&&e.length){var r=e.offset();r&&(t={top:r.top,left:r.left,bottom:r.top+e.height(),right:r.left+e.width()})}return t}},a.string={reverse:function(e){for(var t=e.length-1,r="";t>=0;r+=e[t--]);return r},getPrice:function(e){return e||0===e?{raw:e,short:"$"+this.getShortNumber(e),dollars:"$"+parseInt(e).toLocaleString(),dollarsWithoutCommas:"$"+parseInt(e,10),dollarsWithCents:"$"+e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:2,minimumFractionDigits:2})}:null},getShortNumber:function(e){if(e||0===e){var t,r=!1;return e<0&&(r=!0,e*=-1),e<1e4?t=e.toLocaleString():e<999500?(t=Math.round(e/1e3).toString(),t+="K"):e<105e4?t="1M":e<9995e4?(t=(Math.round(e/1e5)/10).toFixed(1).toString(),t+="M"):(t=Math.round(e/1e6).toString(),t+="M"),r?"-".concat(t):t}return null},getNumber:function(e){return e||0===e?{raw:e,commas:e.toLocaleString(),short:this.getShortNumber(e),decimal0:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:0}),decimal1:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:1,minimumFractionDigits:1}),decimal2:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:2,minimumFractionDigits:2}),decimal3:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:3,minimumFractionDigits:3})}:null},getPercent:function(e,t){if(e||0===e){var r=t||1,n=this.getNumber(Math.abs(e*r));return{raw:e*r,abs:n.raw,commas:n.commas+"%",decimal0:n.decimal0+"%",decimal1:n.decimal1+"%",decimal2:n.decimal2+"%",decimal3:n.decimal3+"%",isPositive:e>0}}return null},getPhoneNumber:function(e,t){if(!e)return null;var r=e.replace(/\D/g,"").replace(/^1/,""),n=null!==t&&void 0!==t?t:r.substr(10,100),a="(".concat(r.substr(0,3),") ").concat(r.substr(3,3),"-").concat(r.substr(6,4)),o="".concat(r.substr(0,3),"-").concat(r.substr(3,3),"-").concat(r.substr(6,4)),i="".concat(r.substr(0,3),".").concat(r.substr(3,3),".").concat(r.substr(6,4)),s=a,l=a;return n.length>0&&(s="".concat(a," ext ").concat(n),l="".concat(a,",").concat(n)),{raw:e,digits:r,ext:n,withParentheses:a,withDashes:o,withDots:i,withExtension:s,withExtensionAsLink:l}},getPercentChange:function(e,t){if(e&&t){var r=(e-t)/t*100;return this.getPercent(r)}},firstLetterToUpper:function(e){if(e)return e.toLowerCase().charAt(0).toUpperCase()+e.toLowerCase().slice(1)}},a.date={getDateInfo:function(e){if(e){var t=new Date(e),r={weekday:"long",year:"numeric",month:"long",day:"numeric"},n={weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=["January","February","March","April","May","June","July","August","September","October","November","December"];return{raw:t.getTime(),date:t,month:t.getMonth()+1,day:t.getDate(),year:t.getFullYear(),monthDayYear:t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear().toString().substr(2,2),formattedDate:t.toLocaleString("en-us",r),formattedDateTime:t.toLocaleString("en-us",n),shortMonth:i[t.getMonth()],longMonth:s[t.getMonth()],formattedTime:t.toLocaleTimeString("en-us",{hour:"2-digit",minute:"2-digit"}),ago:a.date.getAgo(t),agoFriendly:a.date.getAgoFriendly(t),shortDay:o[t.getDay()]}}return null},getAgo:function(e){var t=Date.now();if(e){var r=t-e.getTime(),n=Math.round(r/1e3),a=Math.round(n/60),o=Math.round(a/60),i=Math.round(o/24),s=Math.round(i/7),l=Math.round(i/30);return n<0?"now":n<60?n.toString()+"s":a<60?a.toString()+"m":o<24?o.toString()+"h":i<7?i.toString()+"d":s<5?s.toString()+"w":l.toString()+"mo"}},getAgoFriendly:function(e){var t=Date.now();if(e){var r=t-e.getTime(),n=Math.round(r/1e3),a=Math.round(n/60),o=Math.round(a/60),i=Math.round(o/24);return n<0?"Today":n<60?"Today":a<60?"Today":o<24?"Today":o>=24&&o<48?"Yesterday":i<7?"Last 7 Days":i>=7&&i<14?"Last 14 Days":i>=14&&i<30?"Last 30 Days":i>=30&&i<90?"Last 90 Days":i>=90&&i<365?"This Year":"All Time"}},getTicks:function(e){if(e)return parseFloat(e.toString().replace(/\D/g,""))},getDuration:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Date(null);t.setSeconds(e);var r=t.toISOString().substr(11,8),n=r.split(":");return{raw:e,hours:+n[0],minutes:+n[1],seconds:+n[2],formatted:r,formattedTrimmed:r.replace(/^0(?:0:0?)?/,""),roundedMinutes:Math.round(e/60)}}},a.user={getFileID:function(e){return e.toString().split("").reverse().join("")},getProfileImage:function(e,t,r){var n=e>0?"homesnap.users":"homesnap.noimage",o="//s3.amazonaws.com/"+n+"/",i=e>0?o+a.string.reverse(e.toString())+"_":o+"user_",s="";return t&&(s="?"+t),{small:r||i+"50.jpg"+s,medium:r||i+"150.jpg"+s,large:r||i+"300.jpg"+s,photoVersion:t}},updateProfileImage:function(e,t){if(e)return e.status.raw+=1,e.status.hasPhoto=!0,e.photoVersion=t,e.profileImage=this.getProfileImage(e.userID,e.photoVersion),e},getName:function(e,t,r){if(!e&&!t&&!r)return null;var n,e=e?e.trim():null,t=t?t.trim():null;return n=e||(t||(r||" ")),{first:e,last:t,firstOrLast:n,full:e&&t?e+" "+t:n,initials:e&&t?e.charAt(0).toUpperCase()+t.charAt(0).toUpperCase():n.charAt(0).toUpperCase()}},getFriendlyName:function(e,t){return t?e.name&&e.name.full?e.name.full:"Homesnap User":e.name&&e.name.first?e.name.first:"Homesnap User"},getProfileURL:function(e,t,r){return e?"/"+e:"/entity/"+r+(t?"/"+t:"")},getBackgroundImageURL:function(e){var t="//s3.amazonaws.com/homesnap.backgrounds/";return t+=a.string.reverse(e.toString()),{listingAds:t+"_2064x1080.jpg",large:t+"_2000x640.jpg",medium:t+"_1000x320.jpg",small:t+"_500x160.jpg"}}},a.brand={getImage:function(e,t,r){var n="//s3.amazonaws.com/homesnap.brands/"+a.string.reverse(e.toString())+"_";return{aspectRatio:t,url:{default:n+"aspect.png",light:n+"light_aspect.png",dark:r?n+"dark_aspect.png":null}}}},a.conversation={getDate:function(t){if(t){var r=new Date,n=a.date.getDateInfo(t),o=new Date(t);if(r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate())return n.conversationLong=n.formattedTime,n.conversationShort=n.formattedTime,n;if(r.setDate(r.getDate()-1),r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate())return n.conversationLong="Yesterday "+n.formattedTime,n.conversationShort="Yesterday",n;return o>new Date(r.getFullYear(),r.getMonth(),r.getDate()-6)?(n.conversationLong=e[o.getDay()]+" "+n.formattedTime,n.conversationShort=e[o.getDay()],n):(n.conversationLong=n.monthDayYear+" "+n.formattedTime,n.conversationShort=n.monthDayYear,n)}return null},getSummary:function(e){var t="";return e.text&&(t=e.text),e.propertyAddress?(t.length&&(t+=" "),t+="["+e.propertyAddress.address.fullStreetAddress+", "+e.propertyAddress.address.cityStateZip+" ]"):e.image?(t.length&&(t+=" "),t+="[1 Image Attached]"):e.entity&&(t.length&&(t+=" "),t+="["+a.user.getFriendlyName(e.entity,!0)+" ]"),t},getTitle:function(e){var t="Me";return e&&e.members&&e.members.length&&(1===e.members.length?t=a.user.getFriendlyName(e.members[0],!0):2===e.members.length?t=a.user.getFriendlyName(e.members[0],!1)+" & "+a.user.getFriendlyName(e.members[1],!1):3===e.members.length?t=a.user.getFriendlyName(e.members[0],!1)+", "+a.user.getFriendlyName(e.members[1],!1)+" & "+a.user.getFriendlyName(e.members[2],!1):(t=a.user.getFriendlyName(e.members[0],!1)+", "+a.user.getFriendlyName(e.members[1],!1)+", "+a.user.getFriendlyName(e.members[2],!1),t+=" & "+(e.members.length-3).toString()+" more")),t},isEqual:function(e,t){if(e&&t&&e.type_&&t.type_&&e.type_===t.type_)switch(e.type_){case"HSConversationItem":if(e.id===t.id&&e.status.raw===t.status.raw&&e.recentMessage&&t.recentMessage&&e.recentMessage.id===t.recentMessage.id&&e.recentMessage.status.raw===t.recentMessage.status.raw&&(e.recentMessage.readTimestamp&&t.recentMessage.readTimestamp&&e.recentMessage.readTimestamp.raw===t.recentMessage.readTimestamp.raw||!e.recentMessage.readTimestamp&&!t.recentMessage.readTimestamp))return!0}return!1}},a.listing={mapping:{mini:303,listing:302,large:301,original:301},getImage:function(e,t,r){var o,i,s=null===(o=window.Homesnap)||void 0===o?void 0:null===(i=o.rootURLs)||void 0===i?void 0:i.akamaiListingImagesURLFormat.toLowerCase();return s?(s=s.replace("{sizeid}",e.toString()),s=s.replace("{mediaidreversed}",a.string.reverse(r.toString())),s=s.replace("{listingidreversed}",a.string.reverse(t.toString()))):(n("RootURL AkamaiListingImagesURLFormat is undefined"),"")},getImageSet:function(e,t){var r=this,n={};return Object.entries(this.mapping).forEach(function(a){var o=_slicedToArray(a,2),i=o[0],s=o[1];n[i]=r.getImage(s,e,t)}),n},getPrimaryImage:function(e,t){return this.getImageSet(e,t)},getSecondaryImages:function(e,t){for(var r=[],n=0;n<t.length;n++){var a=t[n];r.push(this.getImageSet(e,a))}return r},getSpecialFeatures:function(e){return{openHouse:1==(1&e),newHome:2==(2&e),shortSaleOrForeclosure:4==(4&e),shortSale:8==(8&e),foreclosure:16==(16&e),comingSoon:32==(32&e),auction:64==(64&e),contingent:128==(128&e),brokerOpen:256==(256&e),realEstateOwned:1024==(1024&e)}},getListingStatus:function(e){return{raw:e,active:1==e,contract:2==e,sold:4==e,inactive:8==e,removed:16==e}},getPropertyStatus:function(e,t,r,n,o,i,s,l,u){var c={priority:100,color:"blue",pinName:"blue_pin",primaryColor:"blue",secondaryColor:null,text:"Off-Market",pinHex:"006DC7"},p=2==(2&t);if(2==(2&e))c.priority=40,c.color="orange",c.pinName="orange",c.primaryColor="orange",c.pinHex="FF7F17",c.text=p?"Pending":"Contract";else if(4==(4&e))c.priority=50,c.color="red",c.pinName="red",c.primaryColor="red",c.pinHex="F71200",c.text=p?"Rented":"Sold";else if(8==(8&e)){if(l)switch(!0){case l.expired:c.text="Expired";break;case l.canceled:c.text="Canceled";break;case l.withdrawn:c.text="Withdrawn";break;case l.hold:c.text="Hold"}c.priority=90,c.text="Off-Market"}else if(16==(16&e))c.text="Off-Market";else if(1==(1&e))if(r)c.priority=10,c.color="yellow",c.pinName="yellow",c.primaryColor="GoldenRod",c.pinHex="FAC332",c.text="Coming Soon";else if(n){var m;c.priority=15,c.color="purple",c.pinName="purple_yellow",c.primaryColor="purple",c.pinHex="00B100",c.secondaryColor="GoldenRod",c.text="Open House",i&&(c.text="Open ".concat(i)),u&&null!==(m=u.method)&&void 0!==m&&m.virtual&&(c.text="Live ",a.listing.isOpenHouseNow(u)?c.text+="Now ":i&&(c.text+="".concat(i," ")),c.text+='<span class="align-sub live-open-icon bs4--d-inline-block" title="Virtual Open House"></span>')}else if(o){var h;c.priority=20,c.color="purple",c.pinName="purple",c.primaryColor="purple",c.pinHex="00B100",c.text="Open House",i&&(c.text="Open ".concat(i)),u&&null!==(h=u.method)&&void 0!==h&&h.virtual&&(c.text="Live ",a.listing.isOpenHouseNow(u)?c.text+="Now ":i&&(c.text+="".concat(i," ")),c.text+='<span class="align-sub live-open-icon bs4--d-inline-block" title="Virtual Open House"></span>')}else c.priority=30,c.color="green",c.pinName="green",c.primaryColor="green",c.pinHex="00B100",c.text=p?"For Rent":"For Sale";return c},getMonthlyPayment:function(e,t,r){return 0==r?e/t:e*r*Math.pow(1+r,t)/(Math.pow(1+r,t)-1)},getAffordabilityHomePrice:function(e){if(!e||"Object"==typeof e)return null;var t=+e.interestRate.toFixed(10),r=e.loanTerm,n=e.income/12*e.debtToIncome-e.monthlyDebts;n=n.toFixed(10);var a=+(e.annualPropertyTax/12).toFixed(10)+ +(e.annualHomeownersInsurance/12).toFixed(10)+ +(e.annualMortgageInsurance/12).toFixed(10)+e.hoaFees;a=parseInt(a,10);var o=Math.pow(1+t,r);o=+o.toFixed(10);var i=(o-1)/(t*o)||0;return i=+i.toFixed(10),e.downPayment+(n-a)*i},isOpenHouseNow:function(e){var t,r,n,a;if(!e||"object"!=typeof e)return!1;var o=(null===(t=e.startDateUtc)||void 0===t?void 0:t.raw)||e.startDate.raw,i=(null===(r=e.endDateUtc)||void 0===r?void 0:r.raw)||e.endDate.raw,s=new Date,l=s.getTime();null!==(n=e.startDateUtc)&&void 0!==n&&n.raw&&null!==(a=e.endDateUtc)&&void 0!==a&&a.raw&&(l+=6e4*s.getTimezoneOffset());var u=new Date(o).getTime(),c=new Date(i).getTime();return l>=u&&l<=c}},a.themes={key:"data-theme",preset:"theme-1",load:function(e){if(e===this.preset||$("link[".concat(this.key,"='").concat(e,"']")).length)return!1;a.handlebars.loadCSS("themes/".concat(e,".css"),null,{key:this.key,value:e}),$("html").attr("data-theme",e)},unload:function(e){if($("html").attr("data-theme")===e){var t;$("html").attr("data-theme",this.preset),null===(t=$("link[".concat(this.key,"='").concat(e,"']")))||void 0===t||t.remove()}}},a.propertyAddress={getAddress:function(e,t,r,n,a){return{fullStreetAddress:e,fullStreetAddressWithoutUnit:this.getFullStreetAddressWithoutUnit(e,t),unitNumber:t?{raw:t,string:"#"+t}:null,city:r,state:n,zip:a,cityState:(r?r+", ":"")+(n?n+" ":""),cityStateZip:(r?r+", ":"")+(n?n+" ":"")+(a||"")}},getFullStreetAddressWithoutUnit:function(e,t){return t&&t.toString().length>0?e.split(" #")[0]:e},getBeds:function(e){return e?{raw:e,string:e.toString(),label:1==e?"Bed":"Beds"}:null},getBaths:function(e,t){var r;return e&&(r={raw:{full:e,half:t||0},string:e.toString(),label:"Baths"},t&&t>0&&(r.string+=1==t?".5":".5+"),1!=e||t&&0!=t||(r.label="Bath")),r},getSqFt:function(e){return e?{raw:e,string:e.toLocaleString()}:null},getLotSize:function(e){return e?{raw:e,string:e.toLocaleString(),label:"Acres"}:null},getPrice:function(e,t){if(e){var r=Math.round(e),n="$"+r.toLocaleString();t&&2==t&&(n+="/mo");var a;return r<1e4?a=r.toLocaleString():r<999500?(a=Math.round(r/1e3).toString(),a+="K"):r<105e4?a="1M":r<9995e4?(a=(Math.round(r/1e5)/10).toFixed(1).toString(),a+="M"):(a=Math.round(r/1e6).toString(),a+="M"),t&&2==t&&(a+="/mo"),{raw:e,dollars:n,short:"$"+a}}return null},getPropertyStatus:function(e,t,r){var n={color:"blue",pinName:"blue_pin",primaryColor:"blue",secondaryColor:null,text:t||"Off-Market",pinHex:"006DC7",hueRotate:"175deg"};if(r)switch(!0){case r.expired:n.text="Expired";break;case r.canceled:n.text="Canceled";break;case r.withdrawn:n.text="Withdrawn";break;case r.hold:n.text="Hold"}return n},getSPropertyType:function(e){if(e){var t;switch(e){case 1:t="Detached";break;case 2:t="Townhouse";break;case 4:t="Condo";break;case 16:t="Multi-Family";break;case 32:t="Lots/Land";break;case 64:t="Mobile/Manufactured";break;case 128:t="Commercial";break;case 256:t="Co-op";break;case 8:default:t="Other"}return{raw:e,string:t}}return null},getClusterColors:function(e,t,r){var n={fill:"#4392CE",stroke:"#3589CF"};return e&&(t?(n.fill="#F1CC39",n.stroke="#E5BE37"):2==(2&e)?(n.fill="#F37F21",n.stroke="#D76C25"):4==(4&e)?(n.fill="#E02844",n.stroke="#9A1B1E"):1==(1&e)&&(r?(n.fill="#6F459B",n.stroke="#5B2E91"):(n.fill="#71bf44",n.stroke="#538c32"))),n},getSingleEntityTypeAndID:function(e){if(e){var t,r;return e.listing?(t=7,r=e.listing.id):e.propertyID?(t=6,r=e.propertyID):e.id&&(t=5,r=e.id),{type:t,id:r}}},getPageTitle:function(e){var t=e.address?e.address.fullStreetAddress+", "+e.address.cityStateZip:"";return e.listing&&e.listing.sourceNumber&&(t+=" | MLS #"+e.listing.sourceNumber),t},getGraphImage:function(e){return{raw:e,large:e.replace("{w}","1000").replace("{h}","120")}},getPieChartImage:function(e,t){var r="";for(var n in t)t.hasOwnProperty(n)&&(r+=t[n].Value+" - "+t[n].Label,r+="|");return{raw:e,small:e.replace("{w}","320").replace("{h}","160").replace("{color0}","00A3E1").replace("{color1}","56BBE1").replace("{color2}","abddf0").replace("{color3}","cccccc")+"&chdl="+r.slice(0,-1)}},getStatusBadges:function(e){function t(e,t,r){this.text=e,this.color=t,this.secondaryColor=r}var r=[];if(e.listing){if(e.listing.specialFeatures.comingSoon){var n=new t("Coming Soon","#fac332","");r.push(n)}else{var o,i,s=2===e.transactionType.raw;e.listing.sListingStatus.active?(o=s?"For Rent":"For Sale",i="#00b100"):e.listing.sListingStatus.contract?(o=s?"Pending":"Contract",i="#ff7f17"):e.listing.sListingStatus.sold?(o=s?"Rented":"Sold",i="#f71200"):(e.listing.sListingStatus.inactive||e.listing.sListingStatus.removed)&&(o="Off-Market",i="#006DC7");var l=new t(o,i,null);r.push(l)}if(e.listing.specialFeatures.brokerOpen||e.listing.specialFeatures.openHouse){var u,c,p=e.listing.openHouse&&e.listing.openHouse.times?"Open ".concat(e.listing.openHouse.times):"Open House";null!==(u=e.listing.openHouse.method)&&void 0!==u&&u.virtual&&(p="Live ",a.listing.isOpenHouseNow(e.listing.openHouse)?p+="Now ":e.listing.openHouse.times&&(p+="".concat(e.listing.openHouse.times," ")),p+=' <span class="align-sub live-open-icon bs4--d-inline-block" title="Virtual Open House"></span>');var m=new t(p,"#00B100",null);if(r.push(m),null!==e&&void 0!==e&&e.transactionType.forSale&&null!==e&&void 0!==e&&null!==(c=e.listing)&&void 0!==c&&c.openHouse.method.byAppointmentOnly){var h=a.coStarBrand.is("citysnap")?"#b0b0b0":"#6b758a",g=new t("Appointment Only",h,null);r.push(g),3===r.length&&r.shift()}}if(e.listing.specialFeatures.contingent){var d=new t("Contingent","#fac332",null);r.push(d)}else if(e.listing.specialFeatures.shortSale){var f=new t("Short Sale","#f71200",null);r.push(f)}else if(e.listing.specialFeatures.auction){var y=new t("Auction","#f71200",null);r.push(y)}else if(e.listing.specialFeatures.foreclosure){var b=new t("Foreclosure","#f71200",null);r.push(b)}}else if(e&&e.propertyID){var v="Off-Market";if(e.attributes&&e.attributes.mlsStatus)switch(!0){case e.attributes.mlsStatus.expired:v="Expired";break;case e.attributes.mlsStatus.canceled:v="Canceled";break;case e.attributes.mlsStatus.withdrawn:v="Withdrawn";break;case e.attributes.mlsStatus.hold:v="Hold"}var w=new t(v,"#006DC7",null);r.push(w)}return r},getOwnershipTypeAttributeDescription:function(e,t){switch(e){case 1:return"Absentee - In state";case 2:return"Absentee - Out of state";case 4:return"Corporate";case 8:return"Owner Occupied";default:return null}},getDistressedAttributeDescription:function(e,t){switch(e){case 1:return"Lis Pendens";case 2:return"Notice Of Default";case 4:return"Notice Of Foreclosure Sale";case 8:return"Notice Of Trustee Sale";case 32:return"Affidavit Notice of Sale Published or Mailed";case 64:return"Cancelled";case 128:return"Certificate of Purchase / Certificate of Foreclosure Recorded";case 256:return"Order Rescheduling Foreclosure Sale Date";case 512:return"Foreclosure Judgment Entered";case 2048:return"Newly Filed Complaint";case 4096:return"Order of Dismissal/Cancellation/Release of Lis Pendens";case 8192:return"Power of Attorney to Foreclose Mortgage";case 16384:return"Re-Recorded Notice of Default";case 32768:return"Re-Recorded Final Judgment of Foreclosure";case 65536:return"Re-Recorded Notice of Lis Pendens";case 131072:return"Re-Recorded Order of Dismissal";case 524288:return"NFNS Updated with Sale Information Rescheduled";case 1048576:return"Re-Recorded Notice of Trustees Sale";case 2097152:return"Sold";case 4194304:return"Re-Recorded Notice of Sale";case 8388608:return"Standalone Mortgage";case 1073741824:return"Other";default:return null}}},a.js={dedupeHashTables:function(e,t,r){var n={add:[],keep:[],remove:[]};return e&&0!=e.length?t&&0!=t.length?(e.each(function(e,a){t.hasItem(e)?r&&!r(a,t.getItem(e))?(n.remove.push(e),n.add.push(e)):n.keep.push(e):n.remove.push(e)}),t.each(function(t,r){e.hasItem(t)||n.add.push(t)})):n.remove=e.keys():t&&t.length>0&&(n.add=t.keys()),n},round:function(e,t){return Number(Math.round(e+"e"+t)+"e-"+t)}},a.map={getXYbyLatLng:function(e,t,r){var n=parseInt(256*Math.pow(2,r-1)+t*(256*Math.pow(2,r)/360)),a=Math.sin(e*Math.PI/180);return a<-.9999&&(a=-.9999),a>.9999&&(a=.9999),{x:n,y:parseInt(256*Math.pow(2,r-1)+.5*Math.log((1+a)/(1-a))*(-256*Math.pow(2,r)/(2*Math.PI)))}},getLatLngByPixel:function(e,t,r){var n=e*(360/(256*Math.pow(2,r)))-180,o=t*(2/(256*Math.pow(2,r)));return o=1-o,o*=Math.PI,o=a.map.getRadiansByDegrees(Math.atan(Math.sinh(o))),{lat:o,lng:n}},getRadiansByDegrees:function(e){return e*(180/Math.PI)},getDistance:function(e,t,r,n,a){var o=Math.PI*e/180,i=Math.PI*r/180,s=t-n,l=Math.PI*s/180,u=Math.sin(o)*Math.sin(i)+Math.cos(o)*Math.cos(i)*Math.cos(l);return u=Math.acos(u.toPrecision(14)),u=180*u/Math.PI,u=60*u*1.1515,"K"==a&&(u*=1.609344),"N"==a&&(u*=.8684),u},getDecodedPolygon:function(e){var t=function(e){for(var t=e.split("$"),r=[],n=0;n<t.length;n++)r.push(google.maps.geometry.encoding.decodePath(t[n]));return r};if(Array.isArray(e)){for(var r=[],n=0;n<e.length;n++)r=r.concat(t(e[n]));return r}return t(e)}},a.school={groupByLevel:function(e){return e.reduce(function(e,t){return 1===t.level?(e.elementary||(e.elementary=[]),e.elementary.push(t)):2===t.level?(e.middle||(e.middle=[]),e.middle.push(t)):3===t.level?(e.high||(e.high=[]),e.high.push(t)):(e.other||(e.other=[]),e.other.push(t)),e},{})}},a.streetArea={getSearchUrl:function(e){return e&&e.url&&e.area?"/homes/for_sale"+e.url+"/p_51,"+e.id.toString():""}},a.area={getAreaSearchUrl:function(e){return e&&e.url&&e.areaID?"/homes/for_sale"+e.url+"/p_21,"+e.areaID.toString():""},getAreaOpenHouseUrl:function(e){return e&&e.url&&e.areaID?"/homes/for_sale/open_house"+e.url+"/p_21,"+e.areaID.toString()+"/f_1":""},getAreaForRentUrl:function(e){return e&&e.url&&e.areaID?"/homes/for_rent"+e.url+"/p_21,"+e.areaID.toString():""},getAreaForRentOpenHouseUrl:function(e){return e&&e.url&&e.areaID?"/homes/for_rent/open_house"+e.url+"/p_21,"+e.areaID.toString()+"/f_1":""}},a.search={getPriceOptions:function(){for(var e=[0],t=0,r=[2e4,7e4,12e4,17e4];t<25e4;)t+=1e4,e.push(t),r.indexOf(t)>-1&&e.push(t+5e3)
;for(;t<1e6;)t+=25e3,e.push(t);for(;t<2e6;)t+=1e5,e.push(t);for(;t<3e6;)t+=25e4,e.push(t);for(;t<=5e6;)t+=5e5,e.push(t);for(var n=e.map(function(e){return{value:e,label:e<=1e6?"$".concat(a.string.getShortNumber(e)):"$".concat((e/1e6).toString(),"M")}}),o=[],i=0;i<=1e4;i+=100)o.push(i);o.push(1e8);var s=o.map(function(e){return{value:e,label:"$".concat(a.string.getShortNumber(e))}}),l={sale:{min:n.slice(0,-1),max:n.slice(1)},rent:{min:s.slice(0,-1),max:s.slice(1)}};return l.sale.max[l.sale.max.length-1]={label:"$5M+",value:1e8},l.rent.max[l.rent.max.length-1].label="$10K+",l},getYearBuiltOptions:function(){for(var e=new Date,t=e.getFullYear(),r=[];t>=2014;)r.push(t),t-=1;r=r.concat([2010,2005,2e3,1990,1980,1970,1960,1950,1925,1900]);var n=r.map(function(e){return{value:e,label:e}}),a={min:_toConsumableArray(n).reverse(),max:n};return a.max.unshift({label:"Any",value:3e3}),a.min.unshift({label:"Any",value:0}),a}},a.savedSearches={getSavedSearchUrl:function(e){var t=e.sd.getUrl(),r="",n="";if(e.boundaryEntity){switch(e.boundaryEntity.type_){case"HSAreaItem":n="/p_21,".concat(e.boundaryEntity.areaID);break;case"HSSchool":n="/p_26,".concat(e.boundaryEntity.id);break;case"HSStreetArea":n="/p_51,".concat(e.boundaryEntity.id)}r=e.boundaryEntity.url}var a="";if(e.bounds&&e.bounds.center){var o=e.bounds.center();a="/c_".concat(o.lat.toString(),",").concat(o.lng.toString())}var i="/b_".concat(e.bounds.north,",").concat(e.bounds.east,"-").concat(e.bounds.south,",").concat(e.bounds.west),s="";e.encodedPolygons&&void 0!==e.encodedPolygons&&(s="/cp_".concat(encodeURIComponent(e.encodedPolygons)));var l="";if(e.commuteTimePlaces){l="";for(var u=0;u<e.commuteTimePlaces.length;u++){var c=e.commuteTimePlaces[u];l+=0===u?"/ct_":"/ct".concat(u,"_"),l+="(".concat(encodeURIComponent(c.address),",").concat(c.latitude,",").concat(c.longitude,",").concat(c.minutes,",").concat(c.mode.raw,")")}}return"/homes".concat(t.prefix).concat(r).concat(n).concat(t.suffix).concat(a).concat(s).concat(i).concat(l)},getSearchSummary:function(e){var t=[],r=e&&e.criteria?e.criteria:{};if(r.mode&&r.mode.forSale?(r.forSale&&t.push("For Sale"),r.openHouse&&t.push("Open House"),r.brokerOpen&&t.push("Agent Open"),r.comingSoon&&t.push("Coming Soon"),r.contract&&t.push("Under Contract"),r.sold&&t.push("Sold"),r.offMarket&&t.push("Recently Off-Market")):r.mode&&r.mode.forRent&&(r.forSale&&t.push("For Rent"),r.openHouse&&t.push("Open House (Rent)"),r.brokerOpen&&t.push("Agent Open (Rent)"),r.comingSoon&&t.push("Coming Soon (Rent)"),r.contract&&t.push("Rental Agreement"),r.sold&&t.push("Rented"),r.offMarket&&t.push("Recently Off-Market")),r.filters&&r&&r.filters.propertyType&&511!==r.filters.propertyType.raw)switch(r.filters.propertyType.raw){case 1:t.push("Detached");break;case 2:t.push("Townhouses");break;case 3:t.push("Detached, TH");break;case 4:t.push("Condos");break;case 5:t.push("Detached, Condos");break;case 6:t.push("TH, Condos");break;case 7:t.push("Detached, TH, Condos");break;case 8:t.push("Other");break;case 16:t.push("Multi-Family");break;case 17:t.push("Detached, Multi-Family");break;case 19:t.push("Detached, TH, Multi-Family");break;case 32:t.push("Lots/Land");break;case 64:t.push("Mobile/Manufactured");break;case 96:t.push("Lots/Land, Mobile/Mfg");break;case 128:t.push("Commercial");break;case 256:t.push("Co-op");break;case 263:t.push("All Residential");break;case 511:t.push("Any Type");break;default:t.push("Multiple Types")}var n=r.filters&&r.filters.beds?r.filters.beds:{};0===n.minimum&&1===n.maximum?t.push("0-1 Beds"):1===n.minimum&&2===n.maximum?t.push("1-2 Beds"):2===n.minimum&&3===n.maximum?t.push("2-3 Beds"):3===n.minimum&&4===n.maximum?t.push("3-4 Beds"):4===n.minimum&&5===n.maximum?t.push("4-5 Beds"):5===n.minimum&&100===n.maximum?t.push("5+ Beds"):0===n.minimum&&0===n.maximum?t.push("Studios"):100===n.maximum&&n.minimum>0?t.push(n.minimum.toString()+"+ Beds"):n.maximum===n.minimum?t.push(n.minimum.toString()+" Beds"):n.minimum>0&&n.maximum<100&&t.push(n.minimum.toString()+"-"+n.maximum.toString()+" Beds");var a=r.filters&&r.filters.baths?r.filters.baths:{};0===a.minimum&&1===a.maximum?t.push("0-1 Baths"):1===a.minimum&&2===a.maximum?t.push("1-2 Baths"):2===a.minimum&&3===a.maximum?t.push("2-3 Baths"):3===a.minimum&&4===a.maximum?t.push("3-4 Baths"):4===a.minimum&&5===a.maximum?t.push("4-5 Baths"):5===a.minimum&&50===a.maximum?t.push("5+ Baths"):0===a.minimum&&0===a.maximum?t.push("0 Baths"):50===a.maximum&&a.minimum>0?t.push(a.minimum.toString()+"+ Baths"):void 0!==a.minimum&&a.maximum===a.minimum?t.push(a.minimum.toString()+" Baths"):a.minimum>0&&a.maximum<50&&t.push(a.minimum.toString()+"-"+a.maximum.toString()+" Baths");var o=r.filters&&r.filters.price?r.filters.price:{};if(o.minimum&&o.minimum.raw>0&&o.maximum&&o.maximum.raw<1e8?t.push(o.minimum.short+" - "+o.maximum.short):o.maximum&&o.maximum.raw<1e8?t.push("<"+o.maximum.short):o.minimum&&o.minimum.raw>0&&t.push(">"+o.minimum.short),r&&r.filters&&r.filters.date)switch(r.filters.date){case 1:t.push("Today");break;case 2:t.push("Over 1 Week");break;case 3:t.push("Over 1 Month");break;case 4:t.push("Over 3 Months");break;case 5:t.push("Over 6 Months");break;case 6:t.push("Over a Year");break;case 7:t.push("Past Week");break;case 8:t.push("Past Month");break;case 9:t.push("Past 3 Months");break;case 10:t.push("Past 6 Months");break;case 11:t.push("Past Year");break;case 12:t.push("Tomorrow");break;case 13:t.push("This Week");break;case 14:t.push("Saturday");break;case 15:t.push("Sunday");break;case 16:t.push("This Weekend");break;case 17:t.push("This Week");break;case 18:t.push("Next Weekend")}return t=t.join(", "),e&&e.boundaryEntity?"HSAreaItem"===e.boundaryEntity.type_?t+=" in ".concat(e.boundaryEntity.name):"HSSchool"===e.boundaryEntity.type_?t+=" near ".concat(e.boundaryEntity.name):"HSStreetArea"===e.boundaryEntity.type_&&(t+=" on ".concat(e.boundaryEntity.name)):e&&e.encodedPolygons&&(t+=" in custom area "),t}},a.data={blob:function(e){if(!e||""===e)return{};var t=e,r=e.length||0;if("string"==typeof e&&r>0&&"{"===e.substring(0,1)&&"}"===e.substring(r-1,r))try{t=JSON.parse(e)}catch(e){}return t},deleteNullProperties:function(e){return e?(Object.keys(e).forEach(function(e){var t=this[e];t&&"object"==typeof t?(a.data.deleteNullProperties(t),0===Object.keys(t).length&&delete this[e]):null===t&&delete this[e]},e),e):{}},update:function(e,t,r){e&&Object.keys(e).forEach(function(n){var o="string"==typeof e[n]?e[n].replace(/^\s+|\s+$/g,""):e[n];"object"==typeof o?a.data.update(o,t,r):o===t&&(e[n]=r)})}},a.byte={length:function(e){return void 0!==e?decodeURIComponent(encodeURIComponent(JSON.stringify(e))).length||0:0},size:function(e,t){if(!e)return 0;var r=t?t.toUpperCase():"MB",n=0;switch(e.forEach(function(e){n+=a.byte.length(e)}),r){case"B":return n;case"KB":return+(n/1024).toFixed(3);default:return+(n/1024/1024).toFixed(3)}}},a.entityContent={getKeyFrameUrl:function(e,t){return"//s3.amazonaws.com/homesnap.entitycontents/"+a.string.reverse(e.toString())+"_"+t+".jpg"},getDataUrl:function(e,t){return"//s3.amazonaws.com/homesnap.entitycontents/"+a.string.reverse(e.toString())+"_"+t+".mp4"}},a.ads={getPlatformType:function(e){if(!e)return null;var t={raw:e};return 1===e?(t.facebook=!0,t.name="Facebook",t.color={text:"#3b5998",background:"#4b6dad",rgb:"75,109,173",gradient:"radial-gradient(at bottom right, #87BAFF 0%, #005EA8 100%)"},t.icon={color:a.path.getImageUrl("/listing-promos/fb-colored-256px.png"),colorSM:a.path.getImageUrl("/listing-promos/fb-colored-70px-2x.png"),white:a.path.getImageUrl("/listing-promos/fb-white-70px-2x.png"),grey:a.path.getImageUrl("/listing-promos/fb-grey-70px-2x.png")}):2===e?(t.instagram=!0,t.name="Instagram",t.color={text:"#c93a9b",background:"#c9399b",rgb:"201,57,155",gradient:"radial-gradient(at bottom right, #7D3CAF 0%, #B33393 100%)"},t.icon={color:a.path.getImageUrl("/listing-promos/ig-colored-256px.png"),colorSM:a.path.getImageUrl("/listing-promos/ig-colored-70px-2x.png"),white:a.path.getImageUrl("/listing-promos/ig-white-70px-2x.png"),grey:a.path.getImageUrl("/listing-promos/ig-grey-70px-2x.png")}):3===e?(t.google=!0,t.name="Google",t.color={text:"#db3236",background:"#ef5c42",rgb:"239,92,66",gradient:"radial-gradient(at bottom right, #E07C3D 0%, #E23A3A 100%)"},t.icon={color:a.path.getImageUrl("/listing-promos/google-colored-256px.png"),colorSM:a.path.getImageUrl("/listing-promos/google-colored-70px-2x.png"),white:a.path.getImageUrl("/listing-promos/google-white-70px-2x.png"),grey:a.path.getImageUrl("/listing-promos/google-grey-70px-2x.png")}):4===e&&(t.waze=!0,t.name="Waze",t.color={text:"#00b7d6",background:"#00b8d2",rgb:"0, 184, 210",gradient:"linear-gradient(313.13deg, #22E0FF 0%, #1CD6F6 15.8%, #15C9EA 35.86%, #15CAEB 36.43%, #15CAEB 36.44%, #15CAEB 36.44%, #15CAEB 37.2%, #15C9EA 37.36%, #15C9EA 37.52%, #15C9EA 38.16%, #14C8E9 39.89%, #14C8E9 39.89%, #13C6E7 43.86%, #10C0E2 53.61%, #00A4C8 100%)"},t.icon={color:a.path.getImageUrl("/listing-promos/waze-colored-256px-1.png"),colorSM:a.path.getImageUrl("/listing-promos/waze-colored-70px-2x-1.png"),white:a.path.getImageUrl("/listing-promos/waze-white-70px-2x.png"),grey:a.path.getImageUrl("/listing-promos/waze-grey-70px-2x.png")}),t.id=e,t},getPlatformIDByName:function(e){if(!e)return null;var t;switch(e.toLowerCase()){case"facebook":t=1;break;case"instagram":t=2;break;case"google":t=3;break;case"waze":t=4}return t}},a.styles={getProp:function(e){var t;return!(!window||null===(t=document)||void 0===t||!t.documentElement)&&window.getComputedStyle(document.documentElement).getPropertyValue(e)}},a.application={parseQueryString:function(e){for(var t,r,n=/(?:\?|\&)([^=]+)\=([^&]+)/g;t=n.exec(e);)r=r||{},r[t[1].toLowerCase()]=decodeURIComponent(t[2]);return r},parseUrl:function(e){if(!e||"string"!=typeof e)return null;var t=/^(http:|https:)?(?:\/\/)?(([^\/\:]+)?(?:(?:\:)([\d]+))?)?(\/[^\s\?]*)(\?[^\#\s]+)?(\#\S+)?$/i,r=e.match(t);return r?{protocol:r[1]||location.protocol,host:r[2]||location.host,hostname:r[3]||location.hostname,port:r[4]||location.port,pathname:r[5],search:r[6],hash:r[7]}:null},isiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent||navigator.vendor||window.opera)&&!window.MSStream},isAndroid:function(){return/android/i.test(navigator.userAgent||navigator.vendor||window.opera)},isChromeiOS:function(){return/CriOS/i.test(navigator.userAgent||navigator.vendor||window.opera)},isWebView:function(){return/wv/i.test(navigator.userAgent||navigator.vendor||window.opera)},isHSPuppeteer:function(){return/HSPuppeteer/i.test(navigator.userAgent||navigator.vendor||window.opera)}},a.path={getImageUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.imageRootPath+e},getJSUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.jsRootPath+e},getHandlebarUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.handlebarRootPath+e},getAgentWebsitePreviewUrl:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=["homesnap.com","citysnap.com","citysnapdev.com"],a=(null===(e=window)||void 0===e?void 0:null===(t=e.location)||void 0===t?void 0:t.origin)||"";if(n.some(function(e){return a.indexOf(e)>-1})&&(null===r||void 0===r||!r.match(/([\w\d-]{5,})\/(website)\/?(.+)?$/i))){var o,i,s,l=(null===(o=window)||void 0===o?void 0:null===(i=o.location)||void 0===i?void 0:null===(s=i.pathname.match(/([\w\d-]{5,})\/(website)/i))||void 0===s?void 0:s[0])||"";return l?"/".concat(l).concat(r):r}return r},getDomain:function(e){var t=e.split(".");return t.slice(t.length-2).join(".").toLowerCase()}},a.coStarBrand={_current:window.Homesnap&&window.Homesnap.coStarBrand,_internalDictionary:function(){switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"citysnap":return 4;case"homesnap":default:return 2}},is:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e){var t=this._internalDictionary(e);return t&&this._current===t}},getCurrent:function(e){var t=e?this._internalDictionary(e):this._current;switch(t){case 4:return{name:"Citysnap",supportEmail:"support@citysnap.com",listingService:"RLS",raw:t,appleApp:"",googlePlay:"",includedMLSIds:[511e3]};default:return{name:"Homesnap",supportEmail:"support@homesnap.com",listingService:"MLS",raw:t,appleApp:"",googlePlay:""}}}},a}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),Object.assign&&"function"==typeof Object.assign||Object.defineProperty(Object,"assign",{value:function(e,t){"use strict";if(null===e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var a=arguments[n];if(null!==a)for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=a[o])}return r},writable:!0,configurable:!0}),Object.entries&&"function"==typeof Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}),Math.sinh&&"function"==typeof Math.sinh||(Math.sinh=function(e){return(Math.exp(e)-Math.exp(-e))/2});
//# sourceMappingURL=https://assets.homesnap.com/app_agent_website/js_min/Utilities.js.map?hash=4d945493992c1cc56d7d7e0305067a2f
!function(e){var t;"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define("objecthash",e):("undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e())}(function(){return function o(i,u,a){function s(n,e){if(!u[n]){if(!i[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(f)return f(n,!0);throw new Error("Cannot find module '"+n+"'")}var r=u[n]={exports:{}};i[n][0].call(r.exports,function(e){var t=i[n][1][e];return s(t||e)},r,r.exports,o,i,u,a)}return u[n].exports}for(var f="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(w,b,m){(function(e,t,f,n,r,o,i,u,a){"use strict";var s=w("crypto");function c(e,t){return function(e,t){var n;n="passthrough"!==t.algorithm?s.createHash(t.algorithm):new y;void 0===n.write&&(n.write=n.update,n.end=n.update);g(t,n).dispatch(e),n.update||n.end("");if(n.digest)return n.digest("buffer"===t.encoding?void 0:t.encoding);var r=n.read();return"buffer"!==t.encoding?r.toString(t.encoding):r}(e,t=h(e,t))}(m=b.exports=c).sha1=function(e){return c(e)},m.keys=function(e){return c(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},m.MD5=function(e){return c(e,{algorithm:"md5",encoding:"hex"})},m.keysMD5=function(e){return c(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var l=s.getHashes?s.getHashes().slice():["sha1","md5"];l.push("passthrough");var d=["buffer","hex","binary","base64"];function h(e,t){t=t||{};var n={};if(n.algorithm=t.algorithm||"sha1",n.encoding=t.encoding||"hex",n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===t.ignoreUnknown,n.respectType=!1!==t.respectType,n.respectFunctionNames=!1!==t.respectFunctionNames,n.respectFunctionProperties=!1!==t.respectFunctionProperties,n.unorderedArrays=!0===t.unorderedArrays,n.unorderedSets=!1!==t.unorderedSets,n.unorderedObjects=!1!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,void 0===e)throw new Error("Object argument required.");for(var r=0;r<l.length;++r)l[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=l[r]);if(-1===l.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+l.join(", "));if(-1===d.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+d.join(", "));return n}function p(e){if("function"==typeof e){return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}}function g(u,t,a){a=a||[];function s(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return{dispatch:function(e){return u.replacer&&(e=u.replacer(e)),this["_"+(null===e?"null":typeof e)](e)},_object:function(t){var e=Object.prototype.toString.call(t),n=/\[object (.*)\]/i.exec(e);n=(n=n?n[1]:"unknown:["+e+"]").toLowerCase();var r;if(0<=(r=a.indexOf(t)))return this.dispatch("[CIRCULAR:"+r+"]");if(a.push(t),void 0!==f&&f.isBuffer&&f.isBuffer(t))return s("buffer:"),s(t);if("object"===n||"function"===n||"asyncfunction"===n){var o=Object.keys(t);u.unorderedObjects&&(o=o.sort()),!1===u.respectType||p(t)||o.splice(0,0,"prototype","__proto__","constructor"),u.excludeKeys&&(o=o.filter(function(e){return!u.excludeKeys(e)})),s("object:"+o.length+":");var i=this;return o.forEach(function(e){i.dispatch(e),s(":"),u.excludeValues||i.dispatch(t[e]),s(",")})}if(!this["_"+n]){if(u.ignoreUnknown)return s("["+n+"]");throw new Error('Unknown object type "'+n+'"')}this["_"+n](t)},_array:function(e,t){t=void 0!==t?t:!1!==u.unorderedArrays;var n=this;if(s("array:"+e.length+":"),!t||e.length<=1)return e.forEach(function(e){return n.dispatch(e)});var r=[],o=e.map(function(e){var t=new y,n=a.slice();return g(u,t,n).dispatch(e),r=r.concat(n.slice(a.length)),t.read().toString()});return a=a.concat(r),o.sort(),this._array(o,!1)},_date:function(e){return s("date:"+e.toJSON())},_symbol:function(e){return s("symbol:"+e.toString())},_error:function(e){return s("error:"+e.toString())},_boolean:function(e){return s("bool:"+e.toString())},_string:function(e){s("string:"+e.length+":"),s(e.toString())},_function:function(e){s("fn:"),p(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==u.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),u.respectFunctionProperties&&this._object(e)},_number:function(e){return s("number:"+e.toString())},_xml:function(e){return s("xml:"+e.toString())},_null:function(){return s("Null")},_undefined:function(){return s("Undefined")},_regexp:function(e){return s("regex:"+e.toString())},_uint8array:function(e){return s("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return s("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return s("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return s("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return s("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return s("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return s("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return s("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return s("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return s("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return s("url:"+e.toString())},_map:function(e){s("map:");var t=Array.from(e);return this._array(t,!1!==u.unorderedSets)},_set:function(e){s("set:");var t=Array.from(e);return this._array(t,!1!==u.unorderedSets)},_file:function(e){return s("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(u.ignoreUnknown)return s("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return s("domwindow")},_bigint:function(e){return s("bigint:"+e.toString())},_process:function(){return s("process")},_timer:function(){return s("timer")},_pipe:function(){return s("pipe")},_tcp:function(){return s("tcp")},_udp:function(){return s("udp")},_tty:function(){return s("tty")},_statwatcher:function(){return s("statwatcher")},_securecontext:function(){return s("securecontext")},_connection:function(){return s("connection")},_zlib:function(){return s("zlib")},_context:function(){return s("context")},_nodescript:function(){return s("nodescript")},_httpparser:function(){return s("httpparser")},_dataview:function(){return s("dataview")},_signal:function(){return s("signal")},_fsevent:function(){return s("fsevent")},_tlswrap:function(){return s("tlswrap")}}}function y(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}m.writeToStream=function(e,t,n){return void 0===n&&(n=t,t={}),g(t=h(e,t),n).dispatch(e)}}).call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_7eac155c.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,f){(function(e,t,n,r,o,i,u,a,s){!function(e){"use strict";var f="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),o="0".charCodeAt(0),i="a".charCodeAt(0),u="A".charCodeAt(0),a="-".charCodeAt(0),s="_".charCodeAt(0);function c(e){var t=e.charCodeAt(0);return t===n||t===a?62:t===r||t===s?63:t<o?-1:t<o+10?t-o+26+26:t<u+26?t-u:t<i+26?t-i+26:void 0}e.toByteArray=function(e){var t,n;if(0<e.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.length,o="="===e.charAt(r-2)?2:"="===e.charAt(r-1)?1:0,i=new f(3*e.length/4-o),u=0<o?e.length-4:e.length,a=0;function s(e){i[a++]=e}for(t=0;t<u;t+=4,0)s((16711680&(n=c(e.charAt(t))<<18|c(e.charAt(t+1))<<12|c(e.charAt(t+2))<<6|c(e.charAt(t+3))))>>16),s((65280&n)>>8),s(255&n);return 2==o?s(255&(n=c(e.charAt(t))<<2|c(e.charAt(t+1))>>4)):1==o&&(s((n=c(e.charAt(t))<<10|c(e.charAt(t+1))<<4|c(e.charAt(t+2))>>2)>>8&255),s(255&n)),i},e.fromByteArray=function(e){var t,n,r,o,i=e.length%3,u="";function a(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-i;t<r;t+=3)n=(e[t]<<16)+(e[t+1]<<8)+e[t+2],u+=a((o=n)>>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:u+=a((n=e[e.length-1])>>2),u+=a(n<<4&63),u+="==";break;case 2:u+=a((n=(e[e.length-2]<<8)+e[e.length-1])>>10),u+=a(n>>4&63),u+=a(n<<2&63),u+="="}return u}}(void 0===f?this.base64js={}:f)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(O,e,H){(function(e,t,g,n,r,o,i,u,a){var s=O("base64-js"),f=O("ieee754");function g(e,t,n){if(!(this instanceof g))return new g(e,t,n);var r,o,i,u,a,s=typeof e;if("base64"===t&&"string"==s)for(e=(r=e).trim?r.trim():r.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==s)o=x(e);else if("string"==s)o=g.byteLength(e,t);else{if("object"!=s)throw new Error("First argument needs to be a number, array or string.");o=x(e.length)}if(g._useTypedArrays?i=g._augment(new Uint8Array(o)):((i=this).length=o,i._isBuffer=!0),g._useTypedArrays&&"number"==typeof e.byteLength)i._set(e);else if(S(a=e)||g.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(u=0;u<o;u++)g.isBuffer(e)?i[u]=e.readUInt8(u):i[u]=e[u];else if("string"==s)i.write(e,0,t);else if("number"==s&&!g._useTypedArrays&&!n)for(u=0;u<o;u++)i[u]=0;return i}function y(e,t,n,r){return g._charsWritten=T(function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return g._charsWritten=T(function(e){for(var t,n,r,o=[],i=0;i<e.length;i++)t=e.charCodeAt(i),n=t>>8,r=t%256,o.push(r),o.push(n);return o}(t),e,n,r)}function c(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;o++)r+=String.fromCharCode(e[o]);return r}function l(e,t,n,r){r||(D("boolean"==typeof n,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+1<e.length,"Trying to read beyond buffer length"));var o,i=e.length;if(!(i<=t))return n?(o=e[t],t+1<i&&(o|=e[t+1]<<8)):(o=e[t]<<8,t+1<i&&(o|=e[t+1])),o}function d(e,t,n,r){r||(D("boolean"==typeof n,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+3<e.length,"Trying to read beyond buffer length"));var o,i=e.length;if(!(i<=t))return n?(t+2<i&&(o=e[t+2]<<16),t+1<i&&(o|=e[t+1]<<8),o|=e[t],t+3<i&&(o+=e[t+3]<<24>>>0)):(t+1<i&&(o=e[t+1]<<16),t+2<i&&(o|=e[t+2]<<8),t+3<i&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}function h(e,t,n,r){if(r||(D("boolean"==typeof n,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var o=l(e,t,n,!0);return 32768&o?-1*(65535-o+1):o}}function p(e,t,n,r){if(r||(D("boolean"==typeof n,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var o=d(e,t,n,!0);return 2147483648&o?-1*(4294967295-o+1):o}}function b(e,t,n,r){return r||(D("boolean"==typeof n,"missing or invalid endian"),D(t+3<e.length,"Trying to read beyond buffer length")),f.read(e,t,n,23,4)}function m(e,t,n,r){return r||(D("boolean"==typeof n,"missing or invalid endian"),D(t+7<e.length,"Trying to read beyond buffer length")),f.read(e,t,n,52,8)}function v(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+1<e.length,"trying to write beyond buffer length"),N(t,65535));var i=e.length;if(!(i<=n))for(var u=0,a=Math.min(i-n,2);u<a;u++)e[n+u]=(t&255<<8*(r?u:1-u))>>>8*(r?u:1-u)}function _(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+3<e.length,"trying to write beyond buffer length"),N(t,4294967295));var i=e.length;if(!(i<=n))for(var u=0,a=Math.min(i-n,4);u<a;u++)e[n+u]=t>>>8*(r?u:3-u)&255}function E(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+1<e.length,"Trying to write beyond buffer length"),Y(t,32767,-32768)),e.length<=n||v(e,0<=t?t:65535+t+1,n,r,o)}function I(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+3<e.length,"Trying to write beyond buffer length"),Y(t,2147483647,-2147483648)),e.length<=n||_(e,0<=t?t:4294967295+t+1,n,r,o)}function A(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+3<e.length,"Trying to write beyond buffer length"),F(t,34028234663852886e22,-34028234663852886e22)),e.length<=n||f.write(e,t,n,r,23,4)}function B(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+7<e.length,"Trying to write beyond buffer length"),F(t,17976931348623157e292,-17976931348623157e292)),e.length<=n||f.write(e,t,n,r,52,8)}H.Buffer=g,H.SlowBuffer=g,H.INSPECT_MAX_BYTES=50,g.poolSize=8192,g._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),g.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.isBuffer=function(e){return!(null==e||!e._isBuffer)},g.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=C(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=k(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},g.concat=function(e,t){if(D(S(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new g(0);if(1===e.length)return e[0];if("number"!=typeof t)for(o=t=0;o<e.length;o++)t+=e[o].length;for(var n=new g(t),r=0,o=0;o<e.length;o++){var i=e[o];i.copy(n,r),r+=i.length}return n},g.prototype.write=function(e,t,n,r){var o;isFinite(t)?isFinite(n)||(r=n,n=void 0):(o=r,r=t,t=n,n=o),t=Number(t)||0;var i,u,a,s,f,c,l,d,h,p=this.length-t;switch((!n||p<(n=Number(n)))&&(n=p),r=String(r||"utf8").toLowerCase()){case"hex":i=function(e,t,n,r){n=Number(n)||0;var o=e.length-n;(!r||o<(r=Number(r)))&&(r=o);var i=t.length;D(i%2==0,"Invalid hex string"),i/2<r&&(r=i/2);for(var u=0;u<r;u++){var a=parseInt(t.substr(2*u,2),16);D(!isNaN(a),"Invalid hex string"),e[n+u]=a}return g._charsWritten=2*u,u}(this,e,t,n);break;case"utf8":case"utf-8":c=this,l=e,d=t,h=n,i=g._charsWritten=T(C(l),c,d,h);break;case"ascii":case"binary":i=y(this,e,t,n);break;case"base64":u=this,a=e,s=t,f=n,i=g._charsWritten=T(k(a),u,s,f);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=w(this,e,t,n);break;default:throw new Error("Unknown encoding")}return i},g.prototype.toString=function(e,t,n){var r,o,i,u,a=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):n=a.length)===t)return"";switch(e){case"hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||r<n)&&(n=r);for(var o="",i=t;i<n;i++)o+=j(e[i]);return o}(a,t,n);break;case"utf8":case"utf-8":r=function(e,t,n){var r="",o="";n=Math.min(e.length,n);for(var i=t;i<n;i++)e[i]<=127?(r+=M(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return r+M(o)}(a,t,n);break;case"ascii":case"binary":r=c(a,t,n);break;case"base64":o=a,u=n,r=0===(i=t)&&u===o.length?s.fromByteArray(o):s.fromByteArray(o.slice(i,u));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=function(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(a,t,n);break;default:throw new Error("Unknown encoding")}return r},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},g.prototype.copy=function(e,t,n,r){if(n=n||0,r||0===r||(r=this.length),t=t||0,r!==n&&0!==e.length&&0!==this.length){D(n<=r,"sourceEnd < sourceStart"),D(0<=t&&t<e.length,"targetStart out of bounds"),D(0<=n&&n<this.length,"sourceStart out of bounds"),D(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;if(o<100||!g._useTypedArrays)for(var i=0;i<o;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+o),t)}},g.prototype.slice=function(e,t){var n=this.length;if(e=U(e,n,0),t=U(t,n,n),g._useTypedArrays)return g._augment(this.subarray(e,t));for(var r=t-e,o=new g(r,void 0,!0),i=0;i<r;i++)o[i]=this[i+e];return o},g.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},g.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},g.prototype.readUInt8=function(e,t){if(t||(D(null!=e,"missing offset"),D(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},g.prototype.readUInt16LE=function(e,t){return l(this,e,!0,t)},g.prototype.readUInt16BE=function(e,t){return l(this,e,!1,t)},g.prototype.readUInt32LE=function(e,t){return d(this,e,!0,t)},g.prototype.readUInt32BE=function(e,t){return d(this,e,!1,t)},g.prototype.readInt8=function(e,t){if(t||(D(null!=e,"missing offset"),D(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},g.prototype.readInt16LE=function(e,t){return h(this,e,!0,t)},g.prototype.readInt16BE=function(e,t){return h(this,e,!1,t)},g.prototype.readInt32LE=function(e,t){return p(this,e,!0,t)},g.prototype.readInt32BE=function(e,t){return p(this,e,!1,t)},g.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},g.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},g.prototype.readDoubleLE=function(e,t){return m(this,e,!0,t)},g.prototype.readDoubleBE=function(e,t){return m(this,e,!1,t)},g.prototype.writeUInt8=function(e,t,n){n||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t<this.length,"trying to write beyond buffer length"),N(e,255)),t>=this.length||(this[t]=e)},g.prototype.writeUInt16LE=function(e,t,n){v(this,e,t,!0,n)},g.prototype.writeUInt16BE=function(e,t,n){v(this,e,t,!1,n)},g.prototype.writeUInt32LE=function(e,t,n){_(this,e,t,!0,n)},g.prototype.writeUInt32BE=function(e,t,n){_(this,e,t,!1,n)},g.prototype.writeInt8=function(e,t,n){n||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t<this.length,"Trying to write beyond buffer length"),Y(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},g.prototype.writeInt16LE=function(e,t,n){E(this,e,t,!0,n)},g.prototype.writeInt16BE=function(e,t,n){E(this,e,t,!1,n)},g.prototype.writeInt32LE=function(e,t,n){I(this,e,t,!0,n)},g.prototype.writeInt32BE=function(e,t,n){I(this,e,t,!1,n)},g.prototype.writeFloatLE=function(e,t,n){A(this,e,t,!0,n)},g.prototype.writeFloatBE=function(e,t,n){A(this,e,t,!1,n)},g.prototype.writeDoubleLE=function(e,t,n){B(this,e,t,!0,n)},g.prototype.writeDoubleBE=function(e,t,n){B(this,e,t,!1,n)},g.prototype.fill=function(e,t,n){if(e=e||0,t=t||0,n=n||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),D("number"==typeof e&&!isNaN(e),"value is not a number"),D(t<=n,"end < start"),n!==t&&0!==this.length){D(0<=t&&t<this.length,"start out of bounds"),D(0<=n&&n<=this.length,"end out of bounds");for(var r=t;r<n;r++)this[r]=e}},g.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=j(this[n]),n===H.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},g.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(g._useTypedArrays)return new g(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t<n;t+=1)e[t]=this[t];return e.buffer};var L=g.prototype;function U(e,t,n){return"number"!=typeof e?n:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function x(e){return(e=~~Math.ceil(+e))<0?0:e}function S(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function C(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(e.charCodeAt(n));else{var o=n;55296<=r&&r<=57343&&n++;for(var i=encodeURIComponent(e.slice(o,n+1)).substr(1).split("%"),u=0;u<i.length;u++)t.push(parseInt(i[u],16))}}return t}function k(e){return s.toByteArray(e)}function T(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function M(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function N(e,t){D("number"==typeof e,"cannot write a non-number as a number"),D(0<=e,"specified a negative value for writing an unsigned value"),D(e<=t,"value is larger than maximum value for type"),D(Math.floor(e)===e,"value has a fractional component")}function Y(e,t,n){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(n<=e,"value smaller than minimum allowed value"),D(Math.floor(e)===e,"value has a fractional component")}function F(e,t,n){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(n<=e,"value smaller than minimum allowed value")}function D(e,t){if(!e)throw new Error(t||"Failed assertion")}g._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=L.get,e.set=L.set,e.write=L.write,e.toString=L.toString,e.toLocaleString=L.toString,e.toJSON=L.toJSON,e.copy=L.copy,e.slice=L.slice,e.readUInt8=L.readUInt8,e.readUInt16LE=L.readUInt16LE,e.readUInt16BE=L.readUInt16BE,e.readUInt32LE=L.readUInt32LE,e.readUInt32BE=L.readUInt32BE,e.readInt8=L.readInt8,e.readInt16LE=L.readInt16LE,e.readInt16BE=L.readInt16BE,e.readInt32LE=L.readInt32LE,e.readInt32BE=L.readInt32BE,e.readFloatLE=L.readFloatLE,e.readFloatBE=L.readFloatBE,e.readDoubleLE=L.readDoubleLE,e.readDoubleBE=L.readDoubleBE,e.writeUInt8=L.writeUInt8,e.writeUInt16LE=L.writeUInt16LE,e.writeUInt16BE=L.writeUInt16BE,e.writeUInt32LE=L.writeUInt32LE,e.writeUInt32BE=L.writeUInt32BE,e.writeInt8=L.writeInt8,e.writeInt16LE=L.writeInt16LE,e.writeInt16BE=L.writeInt16BE,e.writeInt32LE=L.writeInt32LE,e.writeInt32BE=L.writeInt32BE,e.writeFloatLE=L.writeFloatLE,e.writeFloatBE=L.writeFloatBE,e.writeDoubleLE=L.writeDoubleLE,e.writeDoubleBE=L.writeDoubleBE,e.fill=L.fill,e.inspect=L.inspect,e.toArrayBuffer=L.toArrayBuffer,e}}).call(this,O("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},O("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(l,d,e){(function(e,t,u,n,r,o,i,a,s){var u=l("buffer").Buffer,f=4,c=new u(f);c.fill(0);d.exports={hash:function(e,t,n,r){return u.isBuffer(e)||(e=new u(e)),function(e,t,n){for(var r=new u(t),o=n?r.writeInt32BE:r.writeInt32LE,i=0;i<e.length;i++)o.call(r,e[i],4*i,!0);return r}(t(function(e,t){var n;e.length%f!=0&&(n=e.length+(f-e.length%f),e=u.concat([e,c],n));for(var r=[],o=t?e.readInt32BE:e.readInt32LE,i=0;i<e.length;i+=f)r.push(o.call(e,i));return r}(e,r),8*e.length),n,r)}}}).call(this,l("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(w,e,b){(function(e,t,a,n,r,o,i,u,s){var a=w("buffer").Buffer,f=w("./sha"),c=w("./sha256"),l=w("./rng"),d={sha1:f,sha256:c,md5:w("./md5")},h=64,p=new a(h);function g(e,r){var o=d[e=e||"sha1"],i=[];return o||y("algorithm:",e,"is not yet supported"),{update:function(e){return a.isBuffer(e)||(e=new a(e)),i.push(e),e.length,this},digest:function(e){var t=a.concat(i),n=r?function(e,t,n){a.isBuffer(t)||(t=new a(t)),a.isBuffer(n)||(n=new a(n)),t.length>h?t=e(t):t.length<h&&(t=a.concat([t,p],h));for(var r=new a(h),o=new a(h),i=0;i<h;i++)r[i]=54^t[i],o[i]=92^t[i];var u=e(a.concat([r,n]));return e(a.concat([o,u]))}(o,r,t):o(t);return i=null,e?n.toString(e):n}}}function y(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}p.fill(0),b.createHash=function(e){return g(e)},b.createHmac=g,b.randomBytes=function(e,t){if(!t||!t.call)return new a(l(e));try{t.call(this,void 0,new a(l(e)))}catch(e){t(e)}},function(e,t){for(var n in e)t(e[n],n)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){b[e]=function(){y("sorry,",e,"is not implemented yet")}})}).call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(w,b,e){(function(e,t,n,r,o,i,u,a,s){var f=w("./helpers");function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u<e.length;u+=16){var a=n,s=r,f=o,c=i,n=d(n,r,o,i,e[u+0],7,-680876936),i=d(i,n,r,o,e[u+1],12,-389564586),o=d(o,i,n,r,e[u+2],17,606105819),r=d(r,o,i,n,e[u+3],22,-1044525330);n=d(n,r,o,i,e[u+4],7,-176418897),i=d(i,n,r,o,e[u+5],12,1200080426),o=d(o,i,n,r,e[u+6],17,-1473231341),r=d(r,o,i,n,e[u+7],22,-45705983),n=d(n,r,o,i,e[u+8],7,1770035416),i=d(i,n,r,o,e[u+9],12,-1958414417),o=d(o,i,n,r,e[u+10],17,-42063),r=d(r,o,i,n,e[u+11],22,-1990404162),n=d(n,r,o,i,e[u+12],7,1804603682),i=d(i,n,r,o,e[u+13],12,-40341101),o=d(o,i,n,r,e[u+14],17,-1502002290),n=h(n,r=d(r,o,i,n,e[u+15],22,1236535329),o,i,e[u+1],5,-165796510),i=h(i,n,r,o,e[u+6],9,-1069501632),o=h(o,i,n,r,e[u+11],14,643717713),r=h(r,o,i,n,e[u+0],20,-373897302),n=h(n,r,o,i,e[u+5],5,-701558691),i=h(i,n,r,o,e[u+10],9,38016083),o=h(o,i,n,r,e[u+15],14,-660478335),r=h(r,o,i,n,e[u+4],20,-405537848),n=h(n,r,o,i,e[u+9],5,568446438),i=h(i,n,r,o,e[u+14],9,-1019803690),o=h(o,i,n,r,e[u+3],14,-187363961),r=h(r,o,i,n,e[u+8],20,1163531501),n=h(n,r,o,i,e[u+13],5,-1444681467),i=h(i,n,r,o,e[u+2],9,-51403784),o=h(o,i,n,r,e[u+7],14,1735328473),n=p(n,r=h(r,o,i,n,e[u+12],20,-1926607734),o,i,e[u+5],4,-378558),i=p(i,n,r,o,e[u+8],11,-2022574463),o=p(o,i,n,r,e[u+11],16,1839030562),r=p(r,o,i,n,e[u+14],23,-35309556),n=p(n,r,o,i,e[u+1],4,-1530992060),i=p(i,n,r,o,e[u+4],11,1272893353),o=p(o,i,n,r,e[u+7],16,-155497632),r=p(r,o,i,n,e[u+10],23,-1094730640),n=p(n,r,o,i,e[u+13],4,681279174),i=p(i,n,r,o,e[u+0],11,-358537222),o=p(o,i,n,r,e[u+3],16,-722521979),r=p(r,o,i,n,e[u+6],23,76029189),n=p(n,r,o,i,e[u+9],4,-640364487),i=p(i,n,r,o,e[u+12],11,-421815835),o=p(o,i,n,r,e[u+15],16,530742520),n=g(n,r=p(r,o,i,n,e[u+2],23,-995338651),o,i,e[u+0],6,-198630844),i=g(i,n,r,o,e[u+7],10,1126891415),o=g(o,i,n,r,e[u+14],15,-1416354905),r=g(r,o,i,n,e[u+5],21,-57434055),n=g(n,r,o,i,e[u+12],6,1700485571),i=g(i,n,r,o,e[u+3],10,-1894986606),o=g(o,i,n,r,e[u+10],15,-1051523),r=g(r,o,i,n,e[u+1],21,-2054922799),n=g(n,r,o,i,e[u+8],6,1873313359),i=g(i,n,r,o,e[u+15],10,-30611744),o=g(o,i,n,r,e[u+6],15,-1560198380),r=g(r,o,i,n,e[u+13],21,1309151649),n=g(n,r,o,i,e[u+4],6,-145523070),i=g(i,n,r,o,e[u+11],10,-1120210379),o=g(o,i,n,r,e[u+2],15,718787259),r=g(r,o,i,n,e[u+9],21,-343485551),n=y(n,a),r=y(r,s),o=y(o,f),i=y(i,c)}return Array(n,r,o,i)}function l(e,t,n,r,o,i){return y((u=y(y(t,e),y(r,i)))<<(a=o)|u>>>32-a,n);var u,a}function d(e,t,n,r,o,i,u){return l(t&n|~t&r,e,t,o,i,u)}function h(e,t,n,r,o,i,u){return l(t&r|n&~r,e,t,o,i,u)}function p(e,t,n,r,o,i,u){return l(t^n^r,e,t,o,i,u)}function g(e,t,n,r,o,i,u){return l(n^(t|~r),e,t,o,i,u)}function y(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}b.exports=function(e){return f.hash(e,c,16)}}).call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,l,t){(function(e,t,n,r,o,i,u,a,s){var f,c;c=function(e){for(var t,n=new Array(e),r=0;r<e;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n},l.exports=f||c}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(l,d,e){(function(e,t,n,r,o,i,u,a,s){var f=l("./helpers");function c(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,o,i,u,a=Array(80),s=1732584193,f=-271733879,c=-1732584194,l=271733878,d=-1009589776,h=0;h<e.length;h+=16){for(var p=s,g=f,y=c,w=l,b=d,m=0;m<80;m++){a[m]=m<16?e[h+m]:E(a[m-3]^a[m-8]^a[m-14]^a[m-16],1);var v=_(_(E(s,5),(o=f,i=c,u=l,(r=m)<20?o&i|~o&u:!(r<40)&&r<60?o&i|o&u|i&u:o^i^u)),_(_(d,a[m]),(n=m)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514)),d=l,l=c,c=E(f,30),f=s,s=v}s=_(s,p),f=_(f,g),c=_(c,y),l=_(l,w),d=_(d,b)}return Array(s,f,c,l,d)}function _(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function E(e,t){return e<<t|e>>>32-t}d.exports=function(e){return f.hash(e,c,20,!0)}}).call(this,l("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(l,d,e){(function(e,t,n,r,o,i,u,a,s){function B(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function L(e,t){return e>>>t|e<<32-t}function f(e,t){var n,r,o,i,u,a,s,f,c,l,d=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),h=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),p=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var g,y,w,b,m,v,_,E,I=0;I<e.length;I+=16){n=h[0],r=h[1],o=h[2],i=h[3],u=h[4],a=h[5],s=h[6],f=h[7];for(var A=0;A<64;A++)p[A]=A<16?e[A+I]:B(B(B((E=p[A-2],L(E,17)^L(E,19)^E>>>10),p[A-7]),(_=p[A-15],L(_,7)^L(_,18)^_>>>3)),p[A-16]),c=B(B(B(B(f,L(v=u,6)^L(v,11)^L(v,25)),(m=u)&a^~m&s),d[A]),p[A]),l=B(L(b=n,2)^L(b,13)^L(b,22),(g=n)&(y=r)^g&(w=o)^y&w),f=s,s=a,a=u,u=B(i,c),i=o,o=r,r=n,n=B(c,l);h[0]=B(n,h[0]),h[1]=B(r,h[1]),h[2]=B(o,h[2]),h[3]=B(i,h[3]),h[4]=B(u,h[4]),h[5]=B(a,h[5]),h[6]=B(s,h[6]),h[7]=B(f,h[7])}return h}var c=l("./helpers");d.exports=function(e){return c.hash(e,f,32,!0)}}).call(this,l("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,c,t){(function(e,t,n,r,o,i,u,a,s){function f(){}(e=c.exports={}).nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<n.length&&n.shift()())},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=f,e.addListener=f,e.once=f,e.off=f,e.removeListener=f,e.removeAllListeners=f,e.emit=f,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,f){(function(e,t,n,r,o,i,u,a,s){f.read=function(e,t,n,r,o){var i,u,a=8*o-r-1,s=(1<<a)-1,f=s>>1,c=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;0<c;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=r;0<c;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),i-=f}return(h?-1:1)*u*Math.pow(2,i-r)},f.write=function(e,t,n,r,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),2<=(t+=1<=u+l?d/s:d*Math.pow(2,1-l))*s&&(u++,s/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*s-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[n+h]=255&a,h+=p,a/=256,o-=8);for(u=u<<o|a,f+=o;0<f;e[n+h]=255&u,h+=p,u/=256,f-=8);e[n+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)});
</script>
<script>
</script>
</head>
<body>
<input type="checkbox" name="printToggle" id="printToggle" class="hidden" />
<div id="divRoot"><div class="hs-app-load-screen pointer-loader-top" data-throbber-size="3"></div></div>
<div class="modal fade" id="divModal" role="dialog" data-classes="modal fade" data-nosnippet>
<div id="divModalDialog" class="modal-dialog">
<div class="modal-content">
<div id="divModalHeader" class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 id="h4ModalTitle" class="modal-title"></h4>
</div>
<div id="divModalContent" class="modal-body"></div>
<div id="divModalFooter" class="modal-footer clear-both">
<button type="button" id="btnModalPrevious" class="btn btn-default hidden pull-left ph-15">Previous</button>
<button type="button" id="btnFooterClose" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" id="btnModalNext" class="btn btn-default hidden">Next</button>
<button type="button" id="btnFooterSubmit" class="btn btn-default btn-primary hidden ph-15">Submit</button>
</div>
</div>
</div>
</div>
<div id="divModalContentParkingLot" style="display: none;"></div>
<div id="divDeviceSize">
<div data-size="xs" class="visible-xs"></div>
<div data-size="sm" class="visible-sm"></div>
<div data-size="md" class="visible-md"></div>
<div data-size="lg" class="visible-lg"></div>
</div>
</body>
</html>