!function(O,W,v){"use strict";function H(a){return function(){var d,b=arguments[0];for(d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.0/"+(a?a+"/":"")+b,b=1;b").append(a).html();try{return a[0].nodeType===Pa?G(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+G(b)})}catch(c){return G(d)}}function yc(a){try{return decodeURIComponent(a)}catch(b){}}function zc(a){var b={};return n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=yc(e),y(e)&&(f=!y(f)||yc(f),sa.call(b,e)?L(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))}),b}function Ub(a){var b=[];return n(a,function(a,c){L(a)?n(a,function(a){b.push(ha(c,!0)+(!0===a?"":"="+ha(a,!0)))}):b.push(ha(c,!0)+(!0===a?"":"="+ha(a,!0)))}),b.length?b.join("&"):""}function qb(a){return ha(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ha(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ee(a,b){var d,c,e=Qa.length;for(c=0;c/,">"))}return b=b||[],b.unshift(["$provide",function(b){b.value("$rootElement",a)}]),d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),b.unshift("ng"),c=fb(b,d.strictDi),c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;if(O&&e.test(O.name)&&(d.debugInfoEnabled=!0,O.name=O.name.replace(e,"")),O&&!f.test(O.name))return c();O.name=O.name.replace(f,""),ia.resumeBootstrap=function(a){return n(a,function(a){b.push(a)}),c()},D(ia.resumeDeferredBootstrap)&&ia.resumeDeferredBootstrap()}function ge(){O.name="NG_ENABLE_DEBUG_INFO!"+O.name,O.location.reload()}function he(a){if(!(a=ia.element(a).injector()))throw Da("test");return a.get("$$testability")}function Bc(a,b){return b=b||"_",a.replace(ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function sb(a,b,d){if(!a)throw Da("areq",b||"?",d||"required");return a}function Sa(a,b,d){return d&&L(a)&&(a=a[a.length-1]),sb(D(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function Ta(a,b){if("hasOwnProperty"===a)throw Da("badname",b)}function Dc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g")+c[2],c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes),d=e.firstChild,d.textContent=""}else f.push(b.createTextNode(a));return e.textContent="",e.innerHTML="",n(f,function(a){e.appendChild(a)}),e}function Oc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a),b.appendChild(a)}function U(a){if(a instanceof U)return a;var b;if(F(a)&&(a=X(a),b=!0),!(this instanceof U)){if(b&&"<"!=a.charAt(0))throw Xb("nosel");return new U(a)}if(b){b=W;var d;a=(d=Nf.exec(a))?[b.createElement(d[1])]:(d=Nc(a,b))?d.childNodes:[]}Pc(this,a)}function Yb(a){return a.cloneNode(!0)}function wb(a,b){if(b||hb(a),a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c=xa)&&("function"==typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a))),d?(c.unshift(null),new(Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=L(a)?a[a.length-1]:a;return a=e(a,b,c),a.unshift(null),new(Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return r.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Ua([],!0),r={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ba(b),!1)}),constant:d(function(a,b){Ta(a,"constant"),r[a]=b,I[a]=b}),decorator:function(a,b){var c=s.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},s=r.$injector=h(r,function(a,b){throw ia.isString(b)&&l.push(b),Ga("unpr",l.join(" <- "))}),I={},K=h(I,function(a,b){var c=s.get(a+"Provider",b);return t.invoke(c.$get,c,v,a)}),t=K;r.$injectorProvider={$get:ba(K)};var p=g(a),t=K.get("$injector");return t.strictDi=b,n(p,function(a){a&&t.invoke(a)}),t}function Xe(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;return Array.prototype.some.call(a,function(a){if("a"===ra(a))return b=a,!0}),b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset,D(c)?c=c():Rb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):N(c)||(c=0),c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=F(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;return a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Pf(function(){c.$evalAsync(g)})}),g}]}function jb(a,b){return a||b?a?b?(L(a)&&(a=a.join(" ")),L(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function Yf(a){F(a)&&(a=a.split(" "));var b=Z();return n(a,function(a){a.length&&(b[a]=!0)}),b}function Ha(a){return E(a)?a:{}}function Zf(a,b,d,c){function e(a){try{a.apply(null,wa.call(arguments,1))}finally{if(0===--K)for(;t.length;)try{t.pop()()}catch(b){d.error(b)}}}function f(){z=null,g(),h()}function g(){a:{try{p=m.state;break a}catch(a){}p=void 0}p=x(p)?null:p,oa(p,$)&&(p=$),$=p}function h(){u===k.url()&&w===p||(u=k.url(),w=p,n(A,function(a){a(k.url(),p)}))}var k=this,l=a.location,m=a.history,r=a.setTimeout,s=a.clearTimeout,I={};k.isMock=!1;var K=0,t=[];k.$$completeOutstandingRequest=e,k.$$incOutstandingRequestCount=function(){K++},k.notifyWhenNoOutstandingRequests=function(a){0===K?a():t.push(a)};var p,w,u=l.href,la=b.find("base"),z=null;g(),w=p,k.url=function(b,d,e){if(x(e)&&(e=null),l!==a.location&&(l=a.location),m!==a.history&&(m=a.history),b){var f=w===e;if(u===b&&(!c.history||f))return k;var h=u&&Ia(u)===Ia(b);return u=b,w=e,!c.history||h&&f?(h&&!z||(z=b),d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b,l.href!==b&&(z=b)):(m[d?"replaceState":"pushState"](e,"",b),g(),w=p),k}return z||l.href.replace(/%27/g,"'")},k.state=function(){return p};var A=[],Q=!1,$=null;k.onUrlChange=function(b){return Q||(c.history&&C(a).on("popstate",f),C(a).on("hashchange",f),Q=!0),A.push(b),b},k.$$applicationDestroyed=function(){C(a).off("hashchange popstate",f)},k.$$checkUrlChange=h,k.baseHref=function(){var a=la.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""},k.defer=function(a,b){var c;return K++,c=r(function(){delete I[c],e(a)},b||0),I[c]=!0,c},k.defer.cancel=function(a){return!!I[a]&&(delete I[a],s(a),e(B),!0)}}function df(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Zf(a,c,b,d)}]}function ef(){this.$get=function(){function a(a,c){function e(a){a!=r&&(s?s==a&&(s=a.n):s=a,f(a.n,a.p),f(a,r),r=a,r.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw H("$cacheFactory")("iid",a);var g=0,h=T({},c,{id:a}),k=Z(),l=c&&c.capacity||Number.MAX_VALUE,m=Z(),r=null,s=null;return b[a]={put:function(a,b){if(!x(b)){if(ll&&this.remove(s.key),b}},get:function(a){if(l",b=ba.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name),d.value=c,a.attributes.setNamedItem(d)}function $(a,b){try{a.addClass(b)}catch(c){}}function M(a,b,c,d,e){a instanceof C||(a=C(a));for(var f=/\S+/,g=0,h=a.length;g").append(a).html())):c?Ra.clone.call(a):a,g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);return M.$$addScopeInfo(d,b),c&&c(d,b),l&&l(b,d,d,f),d}}function P(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,s,u;if(A)for(u=Array(c.length),m=0;mJ.priority)break;if((fa=J.scope)&&(J.templateUrl||(E(fa)?(Wa("new/isolated scope",P||Q,J,ea),P=J):Wa("new/isolated scope",P,J,ea)),Q=Q||J),H=J.name,!N&&(J.replace&&(J.templateUrl||J.template)||J.transclude&&!J.$$tlb)){for(fa=R+1;N=a[fa++];)if(N.transclude&&!N.$$tlb||N.replace&&(N.templateUrl||N.template)){Fb=!0;break}N=!0}if(!J.templateUrl&&J.controller&&(fa=J.controller,I=I||Z(),Wa("'"+H+"' controller",I[H],J,ea),I[H]=J),fa=J.transclude)if(z=!0,J.$$tlb||(Wa("transclusion",S,J,ea),S=J),"element"==fa)B=!0,t=J.priority,G=ea,ea=d.$$element=C(W.createComment(" "+H+": "+d[H]+" ")),b=ea[0],aa(f,wa.call(G,0),b),ya=ac(Fb,G,e,t,g&&g.name,{nonTlbTranscludeDirective:S});else{var V=Z();if(G=C(Yb(b)).contents(),E(fa)){G=[];var ha=Z(),da=Z();n(fa,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,ha[a]=b,V[b]=null,da[b]=c}),n(ea.contents(),function(a){var b=ha[va(ra(a))];b?(da[b]=!0,V[b]=V[b]||[],V[b].push(a)):G.push(a)}),n(da,function(a,b){if(!a)throw ja("reqslot",b)});for(var ga in V)V[ga]&&(V[ga]=ac(Fb,V[ga],e))}ea.empty(),ya=ac(Fb,G,e,v,v,{needsNewScope:J.$$isolateScope||J.$$newScope}),ya.$$slots=V}if(J.template)if(la=!0,Wa("template",$,J,ea),$=J,fa=D(J.template)?J.template(ea,d):J.template,fa=qa(fa),J.replace){if(g=J,G=Wb.test(fa)?Zc(U(J.templateNamespace,X(fa))):[],b=G[0],1!=G.length||1!==b.nodeType)throw ja("tplrt",H,"");aa(f,ea,b),Va={$attr:{}},fa=ma(b,[],Va);var oa=a.splice(R+1,a.length-(R+1));(P||Q)&&$c(fa,P,Q),a=a.concat(fa).concat(oa),ad(d,Va),Va=a.length}else ea.html(fa);if(J.templateUrl)la=!0,Wa("template",$,J,ea),$=J,J.replace&&(g=J),u=$f(a.splice(R,a.length-R),ea,d,f,z&&ya,h,l,{controllerDirectives:I,newScopeDirective:Q!==J&&Q,newIsolateScopeDirective:P,templateDirective:$,nonTlbTranscludeDirective:S}),Va=a.length;else if(J.compile)try{O=J.compile(ea,d,ya),D(O)?p(null,O,Y,ba):O&&p(O.pre,O.post,Y,ba)}catch(pa){c(pa,ta(ea))}J.terminal&&(u.terminal=!0,t=Math.max(t,J.priority))}return u.scope=Q&&!0===Q.scope,u.transcludeOnThisElement=z,u.templateOnThisElement=la,u.transclude=ya,m.hasElementTranscludeDirective=B,u}function $c(a,b,c){for(var d=0,e=a.length;dm.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Sb(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(t){c(t)}}return h}function O(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d"+b+"",c.childNodes[0].childNodes;default:return b}}function R(a,b){if("srcdoc"==b)return la.HTML;var c=ra(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?la.RESOURCE_URL:void 0}function Y(a,c,d,e,f){var g=R(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ra(a))throw ja("selmulti",ta(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){if(c=h.$$observers||(h.$$observers=Z()),l.test(e))throw ja("nodomevents");var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m),k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function aa(a,b,c){var g,h,d=b[0],e=b.length,f=d.parentNode;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;)8===a[b].nodeType&&ag.call(a,b,1);return a}function Wc(a,b){if(b&&F(b))return b;if(F(a)){var d=dd.exec(a);if(d)return d[3]}}function ff(){var a={},b=!1;this.register=function(b,c){Ta(b,"controller"),E(b)?T(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!E(a.$scope))throw H("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;if(h=!0===h,k&&F(k)&&(r=k),F(f)){if(!(k=f.match(dd)))throw bg("ctrlfmt",f);m=k[1],r=r||k[3],f=a.hasOwnProperty(m)?a[m]:Dc(g.$scope,m,!0)||(b?Dc(c,m,!0):v),Sa(f,m,!0)}return h?(h=(L(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),T(function(){var a=d.invoke(f,l,g,m);return a!==l&&(E(a)||D(a))&&(l=a,r&&e(g,r,l,m||f.name)),l},{instance:l,identifier:r})):(l=d.instantiate(f,g,m),r&&e(g,r,l,m||f.name),l)}}]}function gf(){this.$get=["$window",function(a){return C(a.document)}]}function hf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function bc(a){return E(a)?V(a)?a.toISOString():eb(a):a}function nf(){this.$get=function(){return function(a){if(!a)return"";var b=[];return rc(a,function(a,c){null===a||x(a)||(L(a)?n(a,function(a,d){b.push(ha(c)+"="+ha(bc(a)))}):b.push(ha(c)+"="+ha(bc(a))))}),b.join("&")}}}function of(){this.$get=function(){return function(a){function b(a,e,f){null===a||x(a)||(L(a)?n(a,function(a,c){b(a,e+"["+(E(a)?c:"")+"]")}):E(a)&&!V(a)?rc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ha(e)+"="+ha(bc(a))))}if(!a)return"";var d=[];return b(a,"",!0),d.join("&")}}}function cc(a,b){if(F(a)){var d=a.replace(cg,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(ed))||(c=(c=d.match(dg))&&eg[c[0]].test(d)),c&&(a=wc(d))}}return a}function fd(a){var d,b=Z();return F(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=G(X(a.substr(0,d)));a=X(a.substr(d+1)),e&&(b[e]=b[e]?b[e]+", "+a:a)}):E(a)&&n(a,function(a,d){var f=G(d),g=X(a);f&&(b[f]=b[f]?b[f]+", "+g:g)}),b}function gd(a){var b;return function(d){return b||(b=fd(a)),d?(d=b[G(d)],void 0===d&&(d=null),d):b}}function hd(a,b,d,c){return D(c)?c(a,b,d):(n(c,function(c){a=c(a,b,d)}),a)}function mf(){var a=this.defaults={transformResponse:[cc],transformRequest:[function(a){return E(a)&&"[object File]"!==ga.call(a)&&"[object Blob]"!==ga.call(a)&&"[object FormData]"!==ga.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:na(dc),put:na(dc),patch:na(dc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=T({},a);return b.data=hd(a.data,a.headers,a.status,f.transformResponse),a=a.status,200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};return n(a,function(a,e){D(a)?null!=(c=a(b))&&(d[e]=c):d[e]=a}),d}if(!E(b))throw H("$http")("badreq",b);if(!F(b.url))throw H("$http")("badreq",b.url);var f=T({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var f,g,h,c=a.headers,d=T({},b.headers),c=T({},c.common,c[G(b.method)]);a:for(f in c){g=G(f);for(h in d)if(G(h)===g)continue a;d[f]=c[f]}return e(d,na(b))}(b),f.method=ub(f.method),f.paramSerializer=F(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=hd(b.data,gd(d),v,b.transformRequest);return x(e)&&n(d,function(a,b){"content-type"===G(b)&&delete d[b]}),x(b.withCredentials)&&!x(a.withCredentials)&&(b.withCredentials=a.withCredentials),r(b,e).then(c,c)},v],h=k.when(f);for(n(K,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError),(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=g.shift();var m=g.shift(),h=h.then(b,m)}return d?(h.success=function(a){return Sa(a,"fn"),h.then(function(b){a(b.data,b.status,b.headers,f)}),h},h.error=function(a){return Sa(a,"fn"),h.then(null,function(b){a(b.data,b.status,b.headers,f)}),h}):(h.success=id("success"),h.error=id("error")),h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}K&&(200<=a&&300>a?K.put(S,[a,c,fd(d),e]):K.remove(S)),b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0,(200<=b&&300>b?A.resolve:A.reject)({data:a,status:b,headers:gd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,na(a.headers()),a.statusText)}function z(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var K,M,A=k.defer(),Q=A.promise,P=c.headers,S=s(c.url,c.paramSerializer(c.params));return m.pendingRequests.push(c),Q.then(z,z),!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(K=E(c.cache)?c.cache:E(a.cache)?a.cache:I),K&&(M=K.get(S),y(M)?M&&D(M.then)?M.then(r,r):L(M)?l(M[1],M[0],na(M[2]),M[3]):l(M,200,{},"OK"):K.put(S,Q)),x(M)&&((M=jd(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:v)&&(P[c.xsrfHeaderName||a.xsrfHeaderName]=M),e(c.method,S,d,g,P,c.timeout,c.withCredentials,c.responseType)),Q}function s(a,b){return 0=l&&(u.resolve(p),t(n.$$intervalId),delete g[n.$$intervalId]),w||a.$apply()},k),g[n.$$intervalId]=u,n}var g={};return f.cancel=function(a){return!!(a&&a.$$intervalId in g)&&(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0)},f}]}function ec(a){a=a.split("/");for(var b=a.length;b--;)a[b]=qb(a[b]);return a.join("/")}function kd(a,b){var d=za(a);b.$$protocol=d.protocol,b.$$host=d.hostname,b.$$port=ca(d.port)||gg[d.protocol]||null}function ld(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=za(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname),b.$$search=zc(c.search),b.$$hash=decodeURIComponent(c.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Ia(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function kb(a){return a.replace(/(#.+)|#$/,"$1")}function fc(a,b,d){this.$$html5=!0,d=d||"",kd(a,this),this.$$parse=function(a){var d=pa(b,a);if(!F(d))throw Gb("ipthprfx",a,b);ld(d,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=Ub(this.$$search),d=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ec(this.$$path)+(a?"?"+a:"")+d,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b),g&&this.$$parse(g),!!g}}function gc(a,b,d){kd(a,this),this.$$parse=function(c){var f,e=pa(a,c)||pa(b,c);x(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",x(e)&&(a=c,this.replace())):(f=pa(d,e),x(f)&&(f=e)),ld(f,this),c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,"")),g.exec(f)||(c=(f=g.exec(c))?f[1]:c),this.$$path=c,this.$$compose()},this.$$compose=function(){var b=Ub(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ec(this.$$path)+(b?"?"+b:"")+e,this.$$absUrl=a+(this.$$url?d+this.$$url:"")},this.$$parseLinkUrl=function(b,d){return Ia(a)==Ia(b)&&(this.$$parse(b),!0)}}function md(a,b,d){this.$$html5=!0,gc.apply(this,arguments),this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Ia(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=Ub(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ec(this.$$path)+(b?"?"+b:"")+e,this.$$absUrl=a+d+this.$$url}}function Hb(a){return function(){return this[a]}}function nd(a,b){return function(d){return x(d)?this[a]:(this[a]=b(d),this.$$compose(),this)}}function rf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a},this.html5Mode=function(a){return Na(a)?(b.enabled=a,this):E(a)?(Na(a.enabled)&&(b.enabled=a.enabled),Na(a.requireBase)&&(b.requireBase=a.requireBase),Na(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var s,r=c.url();if(b.enabled){if(!m&&b.requireBase)throw Gb("nobase");s=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/"),m=e.history?fc:md}else s=Ia(r),m=gc;var I=s.substr(0,Ia(s).lastIndexOf("/")+1);l=new m(s,I,"#"+a),l.$$parseLinkUrl(r,r),l.$$state=c.state();var n=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=C(a.target);"a"!==ra(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");E(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=za(h.animVal).href),n.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),kb(l.absUrl())!=kb(r)&&c.url(l.absUrl(),!0);var t=!0;return c.onUrlChange(function(a,b){x(pa(I,a))?g.location.href=a:(d.$evalAsync(function(){var f,c=l.absUrl(),e=l.$$state;a=kb(a),l.$$parse(a),l.$$state=b,f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented,l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(t=!1,k(c,e)))}),d.$$phase||d.$digest())}),d.$watch(function(){var a=kb(c.url()),b=kb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;(t||m)&&(t=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))})),l.$$replace=!1}),l}]}function sf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a},this.$get=["$window",function(d){function c(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=d.console||{},e=b[a]||b.log||B;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];return n(arguments,function(b){a.push(c(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Xa(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ka("isecfld",b);return a}function hg(a){return a+""}function Aa(a,b){if(a){if(a.constructor===a)throw ka("isecfn",b);if(a.window===a)throw ka("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ka("isecdom",b);if(a===Object)throw ka("isecobj",b)}return a}function od(a,b){if(a){if(a.constructor===a)throw ka("isecfn",b);if(a===ig||a===jg||a===kg)throw ka("isecff",b)}}function Ib(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ka("isecaf",b)}function lg(a,b){return void 0!==a?a:b}function pd(a,b){return void 0===a?b:void 0===b?a:a+b}function R(a,b){var d,c;switch(a.type){case q.Program:d=!0,n(a.body,function(a){R(a.expression,b),d=d&&a.expression.constant}),a.constant=d;break;case q.Literal:a.constant=!0,a.toWatch=[];break;case q.UnaryExpression:R(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:R(a.left,b),R(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:R(a.left,b),R(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:R(a.test,b),R(a.alternate,b),R(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1,a.toWatch=[a];break;case q.MemberExpression:R(a.object,b),a.computed&&R(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case q.CallExpression:d=!!a.filter&&!b(a.callee.name).$stateful,c=[],n(a.arguments,function(a){R(a,b),d=d&&a.constant,a.constant||c.push.apply(c,a.toWatch)}),a.constant=d,a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case q.AssignmentExpression:R(a.left,b),R(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case q.ArrayExpression:d=!0,c=[],n(a.elements,function(a){R(a,b),d=d&&a.constant,a.constant||c.push.apply(c,a.toWatch)}),a.constant=d,a.toWatch=c;break;case q.ObjectExpression:d=!0,c=[],n(a.properties,function(a){R(a.value,b),d=d&&a.value.constant,a.value.constant||c.push.apply(c,a.value.toWatch)}),a.constant=d,a.toWatch=c;break;case q.ThisExpression:a.constant=!1,a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function qd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:v}}function rd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function sd(a){if(1===a.body.length&&rd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function td(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===q.Literal||a.body[0].expression.type===q.ArrayExpression||a.body[0].expression.type===q.ObjectExpression)}function ud(a,b){this.astBuilder=a,this.$filter=b}function vd(a,b){this.astBuilder=a,this.$filter=b}function Jb(a){return"constructor"==a}function hc(a){return D(a.valueOf)?a.valueOf():mg.call(a)}function tf(){var a=Z(),b=Z();this.$get=["$filter",function(d){function c(c,f,r){var u,n,z;switch(r=r||K,typeof c){case"string":z=c=c.trim();var A=r?b:a;if(!(u=A[z])){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2)),u=r?I:s;var Q=new ic(u);u=new jc(Q,d,u).parse(c),u.constant?u.$$watchDelegate=l:n?u.$$watchDelegate=u.literal?k:h:u.inputs&&(u.$$watchDelegate=g),r&&(u=e(u)),A[z]=u}return m(u,f);case"function":return m(c,f);default:return m(B,f)}}function e(a){function b(c,d,e,f){var g=K;K=!0;try{return a(c,d,e,f)}finally{K=g}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=e(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&c=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;fa)for(b in l++,f)sa.call(e,b)||(u--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var e,f,h,d=this,k=1I&&(x=4-I,y[x]||(y[x]=[]),y[x].push({msg:D(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:k}))}catch(E){f(E)}if(!(s=z.$$watchersCount&&z.$$childHead||z!==this&&z.$$nextSibling))for(;z!==this&&!(s=z.$$nextSibling);)z=z.$parent}while(z=s);if((n||u.length)&&!I--)throw w.$$phase=null,d("infdig",b,y)}while(n||u.length);for(w.$$phase=null;v.length;)try{v.shift()()}catch(H){f(H)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===w&&h.$$applicationDestroyed(),s(this,-this.$$watchersCount);for(var b in this.$$listenerCount)I(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=B,this.$on=this.$watch=this.$watchGroup=function(){return B},this.$$listeners={},this.$$nextSibling=null,l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||h.defer(function(){u.length&&w.$digest()}),u.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){v.push(a)},$apply:function(a){try{r("$apply");try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){f(b)}finally{try{w.$digest()}catch(c){throw f(c),c}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&z.push(b),a=g(a),p()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]),c.push(b);var d=this;do{d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++}while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,I(e,1,a))}},$emit:function(a,b){var d,l,m,c=[],e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=db([h],arguments,1);do{for(d=e.$$listeners[a]||c,h.currentScope=e,l=0,m=d.length;lxa)throw Ba("iequirks");var c=na(qa);c.isEnabled=function(){return a},c.trustAs=d.trustAs,c.getTrusted=d.getTrusted,c.valueOf=d.valueOf,a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=ab),c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;return n(qa,function(a,b){var d=G(b);c[gb("parse_as_"+d)]=function(b){return e(a,b)},c[gb("get_trusted_"+d)]=function(b){return f(a,b)},c[gb("trust_as_"+d)]=function(b){return g(a,b)}}),c}]}function zf(){this.$get=["$window","$document",function(a,b){var g,d={},c=ca((/android (\d+)/.exec(G((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0],g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit"),l=!!("transition"in k||g+"Transition"in k),m=!!("animation"in k||g+"Animation"in k),!c||l&&m||(l=F(k.webkitTransition),m=F(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=xa)return!1;if(x(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ea(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function Bf(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,e){function f(g,h){f.totalPendingRequests++,F(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var k=d.defaults&&d.defaults.transformResponse;return L(k)?k=k.filter(function(a){return a!==cc}):k===cc&&(k=null),d.get(g,T({cache:b,transformResponse:k},a)).finally(function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},function(a){if(!h)throw ja("tpload",g,a.status,a.statusText);return c.reject(a)})}return f.totalPendingRequests=0,f}]}function Cf(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];return n(a,function(a){var c=ia.element(a).data("$binding");c&&n(c,function(c){d?new RegExp("(^|\\s)"+xd(b)+"(\\s|\\||$)").test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})}),g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;hc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length),e=0;a.charAt(e)==lc;e++);if(e==(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)==lc;)g--;for(c-=e,d=[],f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}return c>Hd&&(d=d.splice(0,Hd-1),b=c-1,c=1),{d:d,e:b,i:c}}function vg(a,b,d,c){var e=a.d,f=e.length-a.i;if(b=x(b)?Math.min(Math.max(d,f),c):+b,d=b+a.i,c=e[d],0h;)k.unshift(0),h++;for(0b.lgSize&&h.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize).join(""));k.length&&h.unshift(k.join("")),k=h.join(d),f.length&&(k+=c+f.join("")),e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Kb(a,b,d){var c="";for(0>a&&(c="-",a=-a),a=""+a;a.length-d)&&(e+=d),0===e&&-12==d&&(e=12),Kb(e,b,c)}}function Lb(a,b){return function(d,c){var e=d["get"+a]();return c[ub(b?"SHORT"+a:a)][e]}}function Id(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Jd(a){return function(b){var d=Id(b.getFullYear());return b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d,b=1+Math.round(b/6048e5),Kb(b,a)}}function mc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Cd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ca(b[9]+b[10]),g=ca(b[9]+b[11])),h.call(a,ca(b[1]),ca(b[2])-1,ca(b[3])),f=ca(b[4]||0)-f,g=ca(b[5]||0)-g,h=ca(b[6]||0),b=Math.round(1e3*parseFloat("0."+(b[7]||0))),k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var k,l,g="",h=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,F(c)&&(c=wg.test(c)?ca(c):b(c)),N(c)&&(c=new Date(c)),!V(c)||!isFinite(c.getTime()))return c;for(;d;)(l=xg.exec(d))?(h=db(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();return f&&(m=xc(f,m),c=Tb(c,f,!0)),n(h,function(b){k=yg[b],g+=k?k(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),g}}function pg(){return function(a,b){return x(b)&&(b=2),eb(a,b)}}function qg(){return function(a,b,d){return b=1/0===Math.abs(Number(b))?Number(b):ca(b),isNaN(b)?a:(N(a)&&(a=a.toString()),L(a)||F(a)?(d=!d||isNaN(d)?0:ca(d),d=0>d?Math.max(0,a.length+d):d,0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)):a)}}function Ed(a){function b(b,d){return d=d?-1:1,b.map(function(b){var c=1,h=ab;if(D(b))h=b;else if(F(b)&&("+"!=b.charAt(0)&&"-"!=b.charAt(0)||(c="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(h=a(b),h.constant)))var k=h(),h=function(a){return a[k]};return{get:h,descending:c*d}})}function d(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}return function(a,e,f){if(null==a)return a;if(!Ca(a))throw H("orderBy")("notarray",a);L(e)||(e=[e]),0===e.length&&(e=["+"]);var g=b(e,f);return g.push({get:function(){return{}},descending:f?-1:1}),a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);return c=typeof e,null===e?(c="string",e="null"):"string"===c?e=e.toLowerCase():"object"===c&&("function"==typeof e.valueOf&&(e=e.valueOf(),d(e))||tc(e)&&(e=e.toString(),d(e))||(e=b)),{value:e,type:c}})}}),a.sort(function(a,b){for(var c=0,d=0,e=g.length;db||37<=b&&40>=b||m(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",m)}b.on("change",k),c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Ob(a,b){return function(d,c){var e,f;if(V(d))return d;if(F(d)){if('"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1)),zg.test(d))return new Date(d);if(a.lastIndex=0,e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},n(e,function(a,c){c=t},g.$observe("min",function(a){t=s(a),h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||x(p)||d(a)<=p},g.$observe("max",function(a){p=s(a),h.$validate()})}}}function Md(a,b,d,c){(c.$$hasNativeValidators=E(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?v:a})}function Nd(a,b,d,c,e){if(y(c)){if(a=a(c),!a.constant)throw nb("constexpr",d,c);return a(b)}return e}function oc(a,b){return a="ngClass"+a,["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Wb=/<|&#?\w+;/,Lf=/<([\w:-]+)/,Mf=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,da={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;var Tf=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},Ra=U.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===W.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),U(O).on("load",b))},toString:function(){var a=[];return n(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return C(0<=a?this[a]:this[this.length+a])},length:0,push:Bg,sort:[].sort,splice:[].splice},Db={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Db[G(a)]=a});var Uc={};n("input select option textarea button form details".split(" "),function(a){Uc[a]=!0});var cd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Zb,removeData:hb,hasData:function(a){for(var b in ib[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b/,Wf=/^[^\(]*\(\s*([^\)]*)\)/m,Cg=/,/,Dg=/^\s*(_?)(\S+?)\1\s*$/,Uf=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ga=H("$injector");fb.$$annotate=function(a,b,d){var c;if("function"==typeof a){if(!(c=a.$inject)){if(c=[],a.length){if(b)throw F(d)&&d||(d=a.name||Xf(a)),Ga("strictdi",d);b=Vc(a),n(b[1].split(Cg),function(a){a.replace(Dg,function(a,b,d){c.push(d)})})}a.$inject=c}}else L(a)?(b=a.length-1,Sa(a[b],"fn"),c=a.slice(0,b)):Sa(a,"fn",!0);return c};var Rd=H("$animate"),$e=function(){this.$get=function(){}},af=function(){var a=new Ua,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;return b&&(b=F(b)?b.split(" "):L(b)?b:[],n(b,function(b){b&&(d=!0,a[b]=c)})),d}function f(){n(b,function(b){var c=a.get(b);if(c){var d=Yf(b.attr("class")),e="",f="";n(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)}),n(b,function(a){e&&Bb(a,e),f&&Ab(a,f)}),a.remove(b)}}),b.length=0}return{enabled:B,on:B,off:B,pin:B,push:function(g,h,k,l){return l&&l(),k=k||{},k.from&&g.css(k.from),k.to&&g.css(k.to),(k.addClass||k.removeClass)&&(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),(h||l)&&(a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f))),g=new d,g.complete(),g}}}]},Ye=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Rd("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e,a.factory(e,c)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Rd("nongcls","ng-animate");return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h <= >= && || ! = |".split(" "),function(a){Pb[a]=!0});var Hg={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},ic=function(a){this.options=a};ic.prototype={constructor:ic,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||" "===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){throw d=d||this.index,b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d,ka("lexerr",a,b,this.text)},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var b,a=this.multiplicative();b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var b,a=this.unary();b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=Oa(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do{a.push(this.expression())}while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:q.ArrayExpression,elements:a}},object:function(){var b,a=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;b={type:q.Property,kind:"init"},this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),b.value=this.expression(),a.push(b)}while(this.expect(","));return this.consume("}"),{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw ka("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw ka("ueoe",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw ka("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return!!(a=this.peek(a,b,d,c))&&(this.tokens.shift(),a)},constants:{true:{type:q.Literal,value:!0},false:{type:q.Literal,value:!1},null:{type:q.Literal,value:null},undefined:{type:q.Literal,value:v},this:{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}},ud.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},R(c,d.$filter);var f,e="";return this.stage="assign",(f=sd(c))&&(this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l")),f=qd(c.body),d.stage="inputs",n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(c),e='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;",e=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e)(this.$filter,Xa,Aa,od,hg,Ib,lg,pd,a),this.state=this.stage=v,e.literal=td(c),e.constant=c.constant,e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;return n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,l,m,k=this;if(c=c||B,!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:n(a.body,function(b,c){k.recurse(b.expression,v,v,function(a){h=a}),c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case q.Literal:m=this.escape(a.value),this.assign(b,m),c(m);break;case q.UnaryExpression:this.recurse(a.argument,v,v,function(a){h=a}),m=a.operator+"("+this.ifDefined(h,0)+")",this.assign(b,m),c(m);break;case q.BinaryExpression:this.recurse(a.left,v,v,function(a){g=a}),this.recurse(a.right,v,v,function(a){h=a}),m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")",this.assign(b,m),c(m);break;case q.LogicalExpression:b=b||this.nextId(),k.recurse(a.left,b),k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b)),c(b);break;case q.ConditionalExpression:b=b||this.nextId(),k.recurse(a.test,b),k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b)),c(b);break;case q.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),Xa(a.name),k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}")),k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name))),(k.state.expensiveChecks||Jb(a.name))&&k.addEnsureSafeObject(b),c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),k.recurse(a.object,g,v,function(){k.if_(k.notNull(g),function(){e&&1!==e&&k.addEnsureSafeAssignContext(g),a.computed?(h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,m),d&&(d.computed=!0,d.name=h)):(Xa(a.property.name),e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}")),m=k.nonComputedMember(g,a.property.name),(k.state.expensiveChecks||Jb(a.property.name))&&(m=k.ensureSafeObject(m)),k.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){k.assign(b,"undefined")}),c(b)},!!e);break;case q.CallExpression:b=b||this.nextId(),a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,function(a){var b=k.nextId();k.recurse(a,b),l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h),n(a.arguments,function(a){k.recurse(a,k.nextId(),v,function(a){l.push(k.ensureSafeObject(a))})}),g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")",m=k.ensureSafeObject(m),k.assign(b,m)},function(){k.assign(b,"undefined")}),c(b)}));break;case q.AssignmentExpression:if(h=this.nextId(),g={},!rd(a.left))throw ka("lval");this.recurse(a.left,v,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h),k.addEnsureSafeObject(k.member(g.context,g.name,g.computed)),k.addEnsureSafeAssignContext(g.context),m=k.member(g.context,g.name,g.computed)+a.operator+h,k.assign(b,m),c(b||m)})},1);break;case q.ArrayExpression:l=[],n(a.elements,function(a){k.recurse(a,k.nextId(),v,function(a){l.push(a)})}),m="["+l.join(",")+"]",this.assign(b,m),c(m);break;case q.ObjectExpression:l=[],n(a.properties,function(a){k.recurse(a.value,k.nextId(),v,function(b){l.push(k.escape(a.key.type===q.Identifier?a.key.name:""+a.key.value)+":"+b)})}),m="{"+l.join(",")+"}",this.assign(b,m),c(m);break;case q.ThisExpression:this.assign(b,"s"),c("s");break;case q.LocalsExpression:this.assign(b,"l"),c("l");break;case q.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;return c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){"),b(),c.push("}"),d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(F(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(N(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if(void 0===a)return"undefined";throw ka("esc")},nextId:function(a,b){var d="v"+this.state.nextId++;return a||this.current().vars.push(d+(b?"="+b:"")),d},current:function(){return this.state[this.state.computing]}},vd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,R(c,d.$filter);var e,f;(e=sd(c))&&(f=this.recurse(e)),e=qd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c,g.push(c),a.watchId=b}));var h=[];return n(c.body,function(a){h.push(d.recurse(a.expression))}),e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;return n(h,function(d){c=d(a,b)}),c},f&&(e.assign=function(a,b,c){return f(a,c,b)}),g&&(e.inputs=g),e.literal=td(c),e.constant=c.constant,e},recurse:function(a,b,d){var c,e,g,f=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return Xa(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Jb(a.name),b,d,f.expression);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Xa(a.property.name,f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case q.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n":function(a,b,d){return function(c,e,f,g){return c=a(c,e,f,g)>b(c,e,f,g),d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){return c=a(c,e,f,g)<=b(c,e,f,g),d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){return c=a(c,e,f,g)>=b(c,e,f,g),d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){return c=a(c,e,f,g)&&b(c,e,f,g),d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){return c=a(c,e,f,g)||b(c,e,f,g),d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){return e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h),c?{value:e}:e}},value:function(a,b){return function(){return b?{context:v,name:v,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){return f=g&&a in g?g:f,c&&1!==c&&f&&!f[a]&&(f[a]={}),g=f?f[a]:v,b&&Aa(g,e),d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var m,n,l=a(f,g,h,k);return null!=l&&(m=b(f,g,h,k),m+="",Xa(m,e),c&&1!==c&&(Ib(l),l&&!l[m]&&(l[m]={})),n=l[m],Aa(n,e)),d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){return g=a(g,h,k,l),e&&1!==e&&(Ib(g),g&&!g[b]&&(g[b]={})),h=null!=g?g[b]:v,(d||Jb(b))&&Aa(h,f),c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var jc=function(a,b,d){this.lexer=a,this.$filter=b,this.options=d,this.ast=new q(this.lexer),this.astCompiler=d.csp?new vd(this.ast,b):new ud(this.ast,b)};jc.prototype={constructor:jc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var mg=Object.prototype.valueOf,Ba=H("$sce"),qa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ja=H("$compile"),Y=W.createElement("a"),zd=za(O.location.href);Ad.$inject=["$document"],Lc.$inject=["$provide"];var Hd=22,Gd=".",lc="0";Bd.$inject=["$locale"],Dd.$inject=["$locale"];var yg={yyyy:aa("FullYear",4),yy:aa("FullYear",2,0,!0),y:aa("FullYear",1),MMMM:Lb("Month"),MMM:Lb("Month",!0),MM:aa("Month",2,1),M:aa("Month",1,1),dd:aa("Date",2),d:aa("Date",1),HH:aa("Hours",2),H:aa("Hours",1),hh:aa("Hours",2,-12),h:aa("Hours",1,-12),mm:aa("Minutes",2),m:aa("Minutes",1),ss:aa("Seconds",2),s:aa("Seconds",1),sss:aa("Milliseconds",3),EEEE:Lb("Day"),EEE:Lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){return a=-1*d,a=(0<=a?"+":"")+(Kb(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},xg=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,wg=/^\-?\d+$/;Cd.$inject=["$locale"];var rg=ba(G),sg=ba(ub);Ed.$inject=["$parse"];var oe=ba({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ga.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};n(Db,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)}),vb[c]=function(){return{restrict:"A",priority:100,link:e}}}}),n(cd,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(Ag)))return void e.$set("ngPattern",new RegExp(c[1],c[2]));a.$watch(e[b],function(a){e.$set(b,a)})}}}}),n(["src","srcset","href"],function(a){var b=va("ng-"+a);vb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ga.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){b?(e.$set(g,b),xa&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Mb={$addControl:B,$$renameControl:function(a,b){a.$name=b},$removeControl:B,$setValidity:B,$setDirty:B,$setPristine:B,$setSubmitted:B};Kd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Sd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||B}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Kd,compile:function(d,f){d.addClass(Ya).addClass(ob);var g=f.name?"name":!(!a||!f.ngForm)&&"ngForm";return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var s=function(b){a.$apply(function(){n.$commitViewValue(),n.$setSubmitted()}),b.preventDefault()};d[0].addEventListener("submit",s,!1),d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",s,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var q=g?c(n.$name):B;g&&(q(a,n),e.$observe(g,function(b){n.$name!==b&&(q(a,v),n.$$parentForm.$$renameControl(n,b),(q=c(n.$name))(a,n))})),d.on("$destroy",function(){n.$$parentForm.$removeControl(n),q(a,v),T(n,Mb)})}}}}}]},pe=Sd(),Ce=Sd(!0),zg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ig=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Jg=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Kg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Td=/^(\d{4})-(\d{2})-(\d{2})$/,Ud=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,pc=/^(\d{4})-W(\d\d)$/,Vd=/^(\d{4})-(\d\d)$/,Wd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xd={text:function(a,b,d,c,e,f){lb(a,b,d,c,e,f),nc(c)},date:mb("date",Td,Ob(Td,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mb("datetimelocal",Ud,Ob(Ud,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:mb("time",Wd,Ob(Wd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mb("week",pc,function(a,b){if(V(a))return a;if(F(a)){pc.lastIndex=0;var d=pc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Id(c),e=7*(e-1);return b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds()),new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:mb("month",Vd,Ob(Vd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){if(Md(a,b,d,c),lb(a,b,d,c,e,f),c.$$parserName="number",c.$parsers.push(function(a){return c.$isEmpty(a)?null:Kg.test(a)?parseFloat(a):v}),c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!N(a))throw nb("numfmt",a);a=a.toString()}return a}),y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||x(g)||a>=g},d.$observe("min",function(a){y(a)&&!N(a)&&(a=parseFloat(a,10)),g=N(a)&&!isNaN(a)?a:v,c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||x(h)||a<=h},d.$observe("max",function(a){y(a)&&!N(a)&&(a=parseFloat(a,10)),h=N(a)&&!isNaN(a)?a:v,c.$validate()})}},url:function(a,b,d,c,e,f){lb(a,b,d,c,e,f),nc(c),c.$$parserName="url",c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||Ig.test(d)}},email:function(a,b,d,c,e,f){lb(a,b,d,c,e,f),nc(c),c.$$parserName="email",c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||Jg.test(d)}},radio:function(a,b,d,c){x(d.name)&&b.attr("name",++pb),b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)}),c.$render=function(){b[0].checked=d.value==c.$viewValue},d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Nd(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Nd(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)}),c.$render=function(){b[0].checked=c.$viewValue},c.$isEmpty=function(a){return!1===a},c.$formatters.push(function(a){return oa(a,k)}),c.$parsers.push(function(a){return a?k:l})},hidden:B,button:B,submit:B,reset:B,file:B},Fc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){ h[0]&&(Xd[G(g.type)]||Xd.text)(e,f,g,h[0],b,a,d,c)}}}}],Lg=/^(true|false|\d+)$/,Ue=function(){return{restrict:"A",priority:100,compile:function(a,b){return Lg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ue=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,e){a.$$addBindingInfo(c,e.ngBind),c=c[0],b.$watch(e.ngBind,function(a){c.textContent=x(a)?"":a})}}}}],we=["$interpolate","$compile",function(a,b){return{compile:function(d){return b.$$addBindingClass(d),function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate)),b.$$addBindingInfo(d,c.expressions),d=d[0],f.$observe("ngBindTemplate",function(a){d.textContent=x(a)?"":a})}}}}],ve=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});return d.$$addBindingClass(c),function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml),b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Te=ba({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),xe=oc("",!0),ze=oc("Odd",0),ye=oc("Even",1),Ae=Ma({compile:function(a,b){b.$set("ngCloak",v),a.removeClass("ng-cloak")}}),Be=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Kc={},Mg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Kc[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};Mg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var Ee=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e,b[b.length++]=W.createComment(" end ngIf: "+c.ngIf+" "),g={clone:b},a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=tb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],Fe=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ia.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,s){var v,t,p,q=0,w=function(){t&&(t.remove(),t=null),v&&(v.$destroy(),v=null),p&&(d.leave(p).then(function(){t=null}),t=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||b()},z=++q;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&z===q){var b=c.$new();n.template=a,a=s(b,function(a){w(),d.enter(a,null,e).then(m)}),v=b,p=a,v.$emit("$includeContentLoaded",f),c.$eval(g)}},function(){c.$$destroyed||z!==q||(w(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(w(),n.template=null)})}}}}],We=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ga.call(d[0]).match(/SVG/)?(d.empty(),a(Nc(e.template,W).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Ge=Ma({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Se=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?X(e):e;c.$parsers.push(function(a){if(!x(a)){var b=[];return a&&n(a.split(g),function(a){a&&b.push(f?X(a):a)}),b}}),c.$formatters.push(function(a){return L(a)?a.join(e):v}),c.$isEmpty=function(a){return!a||!a.length}}}},ob="ng-valid",Od="ng-invalid",Ya="ng-pristine",Nb="ng-dirty",Qd="ng-pending",nb=H("ngModel"),Ng=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN,this.$$rawModelValue=v,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=v,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Mb;var t,m=e(d.ngModel),r=m.assign,q=m,I=r,K=null,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");q=function(a){var c=m(a);return D(c)&&(c=b(a)),c},I=function(a,b){D(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw nb("nonassign",d.ngModel,ta(c))},this.$render=B,this.$isEmpty=function(a){return x(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){p.$isEmpty(a)?(f.removeClass(c,"ng-not-empty"),f.addClass(c,"ng-empty")):(f.removeClass(c,"ng-empty"),f.addClass(c,"ng-not-empty"))};var w=0;Ld({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f}),this.$setPristine=function(){p.$dirty=!1,p.$pristine=!0,f.removeClass(c,Nb),f.addClass(c,Ya)},this.$setDirty=function(){p.$dirty=!0,p.$pristine=!1,f.removeClass(c,Ya),f.addClass(c,Nb),p.$$parentForm.$setDirty()},this.$setUntouched=function(){p.$touched=!1,p.$untouched=!0,f.setClass(c,"ng-untouched","ng-touched")},this.$setTouched=function(){p.$touched=!0,p.$untouched=!1,f.setClass(c,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){g.cancel(K),p.$viewValue=p.$$lastCommittedViewValue,p.$render()},this.$validate=function(){if(!N(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:v,p.$modelValue!==c&&p.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function f(a,b){h===w&&p.$setValidity(a,b)}function g(a){h===w&&c(a)}w++;var h=w;!function(){var a=p.$$parserName||"parse";return x(t)?(f(a,null),!0):(t||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,t),t)}()?g(!1):function(){var c=!0;return n(p.$validators,function(d,e){var g=d(a,b);c=c&&g,f(e,g)}),!!c||(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}()?function(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!D(h.then))throw nb("nopromise",h);f(g,v),c.push(h.then(function(){f(g,!0)},function(a){d=!1,f(g,!1)}))}),c.length?k.all(c).then(function(){g(d)},B):g(!0)}():g(!1)},this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(K),(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)&&(p.$$updateEmptyClasses(a),p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(t=!x(b)||v)for(var c=0;ce||c.$isEmpty(b)||b.length<=e}}}}},Ic=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ca(a)||0,c.$validate()}),c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};O.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(function(){var a;if(!Cc){var b=rb();(ua=x(b)?O.jQuery:b?O[b]:v)&&ua.fn.on?(C=ua,T(ua.fn,{scope:Ra.scope,isolateScope:Ra.isolateScope,controller:Ra.controller,injector:Ra.injector,inheritedData:Ra.inheritedData}),a=ua.cleanData,ua.cleanData=function(b){for(var c,f,e=0;null!=(f=b[e]);e++)(c=ua._data(f,"events"))&&c.$destroy&&ua(f).triggerHandler("$destroy");a(b)}):C=U,ia.element=C,Cc=!0}}(),function(a){T(a,{bootstrap:Ac,copy:Oa,extend:T,merge:Zd,equals:oa,element:C,forEach:n,injector:fb,noop:B,bind:vc,toJson:eb,fromJson:wc,identity:ab,isUndefined:x,isDefined:y,isString:F,isFunction:D,isObject:E,isNumber:N,isElement:Rb,isArray:L,version:me,isDate:V,lowercase:G,uppercase:ub,callbacks:{counter:0},getTestability:he,$$minErr:H,$$csp:Ea,reloadWithDebugInfo:ge}),(Vb=ke(O))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ne}),a.provider("$compile",Ec).directive({a:oe,input:Fc,textarea:Fc,form:pe,script:qe,select:re,style:se,option:te,ngBind:ue,ngBindHtml:ve,ngBindTemplate:we,ngClass:xe,ngClassEven:ye,ngClassOdd:ze,ngCloak:Ae,ngController:Be,ngForm:Ce,ngHide:De,ngIf:Ee,ngInclude:Fe,ngInit:Ge,ngNonBindable:He,ngPluralize:Ie,ngRepeat:Je,ngShow:Ke,ngStyle:Le,ngSwitch:Me,ngSwitchWhen:Ne,ngSwitchDefault:Oe,ngOptions:Pe,ngTransclude:Qe,ngModel:Re,ngList:Se,ngChange:Te,pattern:Gc,ngPattern:Gc,required:Hc,ngRequired:Hc,minlength:Ic,ngMinlength:Ic,maxlength:Jc,ngMaxlength:Jc,ngValue:Ue,ngModelOptions:Ve}).directive({ngInclude:We}).directive(vb).directive(Kc),a.provider({$anchorScroll:Xe,$animate:Ye,$animateCss:Ze,$$animateJs:$e,$$animateQueue:af,$$AnimateRunner:bf,$$animateAsyncRun:cf,$browser:df,$cacheFactory:ef,$controller:ff,$document:gf,$exceptionHandler:hf,$filter:Lc,$$forceReflow:jf,$interpolate:kf,$interval:lf,$http:mf,$httpParamSerializer:nf,$httpParamSerializerJQLike:of,$httpBackend:pf,$xhrFactory:qf,$location:rf,$log:sf,$parse:tf,$rootScope:uf,$q:vf,$$q:wf,$sce:xf,$sceDelegate:yf,$sniffer:zf,$templateCache:Af,$templateRequest:Bf,$$testability:Cf,$timeout:Df,$window:Ef,$$rAF:Ff,$$jqLite:Gf,$$HashMap:Hf,$$cookieReader:If})}])}(ia),ia.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=0|a,f=c;return v===f&&(f=Math.min(b(a),3)),Math.pow(10,f),1==e&&0==f?"one":"other"}})}]),C(W).ready(function(){fe(W,Ac)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(D,r,Va){"use strict";function ya(a,b,c){if(!a)throw Ka("areq",b||"?",c||"required");return a}function za(a,b){return a||b?a?b?(ba(a)&&(a=a.join(" ")),ba(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function La(a){var b={};return a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from),b}function X(a,b,c){var d="";return a=ba(a)?a:a&&R(a)&&a.length?a.split(/\s+/):[],s(a,function(a,g){a&&0=a&&(a=e,e=0,b.push(t),t=[]),t.push(g.fn),g.children.forEach(function(a){e++,c.push(a)}),a--}return t.length&&b.push(t),b}(c)}var M=[],r=U(a);return function(u,A,v){function z(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];return s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)}),b}function K(a){var b=[],c={};s(a,function(a,f){var d=G(a.element),h=0<=["enter","move"].indexOf(a.event),d=a.structural?z(d):[];if(d.length){var e=h?"to":"from";s(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{},c[b][e]={animationID:f,element:I(a)}})}else b.push(a)});var d={},h={};return s(c,function(c,e){var l=c.from,t=c.to;if(l&&t){var g=a[l.animationID],E=a[t.animationID],k=l.animationID.toString();if(!h[k]){var z=h[k]={structural:!0,beforeStart:function(){g.beforeStart(),E.beforeStart()},close:function(){g.close(),E.close()},classes:J(g.classes,E.classes),from:g,to:E,anchors:[]};z.classes.length?b.push(z):(b.push(g),b.push(E))}h[k].anchors.push({out:l.element,in:t.element})}else l=l?l.animationID:t.animationID,t=l.toString(),d[t]||(d[t]=!0,b.push(a[l]))}),b}function J(a,b){a=a.split(" "),b=b.split(" ");for(var c=[],d=0;d=P&&b>=O&&(wa=!0,q())}function L(){function b(){if(!A){if(t(!1),s(m,function(a){l.style[a[0]]=a[1]}),z(a,f),e.addClass(a,ca),p.recalculateTimingStyles){if(ja=l.className+" "+da,ga=r(l,ja),F=v(l,ja,ga),$=F.maxDelay,n=Math.max($,0),0===(O=F.maxDuration))return void q();p.hasTransitions=0B.expectedEndTime)?H.cancel(B.timer):g.push(q)}L&&(k=H(c,k,!1),g[0]={timer:k,expectedEndTime:d},g.push(q),a.data("$$animateCss",g)),ea.length&&a.on(ea.join(" "),E),f.to&&(f.cleanupStyles&&Ga(x,l,Object.keys(f.to)),Ba(a,f))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;d=31&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&e.keyCode>=97&&e.keyCode<=105},isNavigationKey:function(e){var t=m.KEY_CODE;return-1!=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW].indexOf(e.keyCode)},KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(s?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(s?" webkitAnimationEnd":""),TRANSFORM:i("transform"),TRANSFORM_ORIGIN:i("transformOrigin"),TRANSITION:i("transition"),TRANSITION_DURATION:i("transitionDuration"),ANIMATION_PLAY_STATE:i("animationPlayState"),ANIMATION_DURATION:i("animationDuration"),ANIMATION_NAME:i("animationName"),ANIMATION_TIMING:i("animationTimingFunction"),ANIMATION_DIRECTION:i("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:["xl","gt-lg","lg","gt-md","md","gt-sm","sm","gt-xs","xs","landscape","portrait","print"]};return m}e.$inject=["$sniffer","$window","$document"],t.module("material.core").factory("$mdConstant",e)}(),function(){function e(e,n){function o(){return[].concat(v)}function i(){return v.length}function r(e){return v.length&&e>-1&&e-1}function h(){return v.length?v[0]:null}function f(){return v.length?v[v.length-1]:null}function g(e,o,i,a){i=i||b;for(var d=u(o);;){if(!r(d))return null;var s=d+(e?-1:1),l=null;if(r(s)?l=v[s]:n&&(l=e?f():h(),s=u(l)),null===l||s===a)return null;if(i(l))return l;t.isUndefined(a)&&(a=s),d=s}}var b=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var v=e||[];return{items:o,count:i,inRange:r,contains:p,indexOf:u,itemAt:s,findBy:l,add:c,remove:m,first:h,last:f,next:t.bind(null,g,!1),previous:t.bind(null,g,!0),hasPrevious:d,hasNext:a}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.iterator=e,t}])}])}(),function(){function e(e,n,o){function i(e){var n=u[e];t.isUndefined(n)&&(n=u[e]=r(e));var o=h[n];return t.isUndefined(o)&&(o=a(n)),o}function r(t){return e.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)}function a(e){var t=p[e];return t||(t=p[e]=o.matchMedia(e)),t.addListener(d),h[t.media]=!!t.matches}function d(e){n.$evalAsync(function(){h[e.media]=!!e.matches})}function s(e){return p[e]}function l(t,n){for(var o=0;o-1}function g(e){return String(e).indexOf("%")>-1}function b(e){return e[0]||e}var v=l.startSymbol(),E=l.endSymbol(),$="{{"===v&&"}}"===E,C=function(e,n,o){var i=!1;if(e&&e.length){var r=u.getComputedStyle(e[0]);i=t.isDefined(r[n])&&(!o||r[n]==o)}return i},M={dom:{},now:e.performance?t.bind(e.performance,e.performance.now):Date.now||function(){return(new Date).getTime()},bidi:function(e,n,i,r){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir);if(0==arguments.length)return a?"ltr":"rtl";var d=t.element(e);a&&t.isDefined(i)?d.css(n,h(i)):!a&&t.isDefined(r)&&d.css(n,h(r))},bidiProperty:function(e,n,i,r){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir),d=t.element(e);a&&t.isDefined(n)?(d.css(n,h(r)),d.css(i,"")):!a&&t.isDefined(i)&&(d.css(i,h(r)),d.css(n,""))},clientRect:function(e,t,n){var o=b(e);t=b(t||o.offsetParent||document.body);var i=o.getBoundingClientRect(),r=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-r.left,top:i.top-r.top,width:i.width,height:i.height}},offsetRect:function(e,t){return M.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;ns.clientHeight+1&&(d(s,{position:"fixed",width:"100%",top:-o+"px"}),e.style.overflowY="scroll"),s.clientWidth
'),e.appendChild(o[0])),o.on("wheel",n),o.on("touchmove",n),function(){o.off("wheel"),o.off("touchmove"),o[0].parentNode.removeChild(o[0]),delete M.disableScrollAround._enableScrolling}}(n);return M.disableScrollAround._enableScrolling=function(){--M.disableScrollAround._count||(l(),c(),delete M.disableScrollAround._enableScrolling)}},enableScrolling:function(){var e=this.disableScrollAround._enableScrolling;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element("
").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),o[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(t){var n=t[0]||t;document.addEventListener("click",function i(e){e.target===n&&e.$focus&&(n.focus(),e.stopImmediatePropagation(),e.preventDefault(),n.removeEventListener("click",i))},!0);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!1,!0,e,{},0,0,0,0,!1,!1,!1,!1,0,null),o.$material=!0,o.$focus=!0,n.dispatchEvent(o)},createBackdrop:function(e,t){return a(M.supplant('',[t]))(e)},supplant:function(e,t,n){return n=n||/\{([^\{\}]*)\}/g,e.replace(n,function(e,n){var o=n.split("."),i=t;try{for(var r in o)o.hasOwnProperty(r)&&(i=i[o[r]])}catch(a){i=e}return"string"==typeof i||"number"==typeof i?i:e})},fakeNgModel:function(){return{$fake:!0,$setTouched:t.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:t.noop}},debounce:function(e,t,o,i){var a;return function(){var d=o,s=Array.prototype.slice.call(arguments);r.cancel(a),a=r(function(){a=n,e.apply(d,s)},t||10,i)}},throttle:function(e,t){var n;return function(){var o=this,i=arguments,r=M.now();(!n||r-n>t)&&(e.apply(o,i),n=r)}},time:function(e){var t=M.now();return e(),M.now()-t},valueOnUse:function(e,t,n){var o=null,i=Array.prototype.slice.call(arguments),r=i.length>3?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,r)),o}})},nextUid:function(){return""+i++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,n,o){if(t.isString(n)){var i=n.toUpperCase();n=function(e){return e.nodeName===i}}if(e instanceof t.element&&(e=e[0]),o&&(e=e.parentNode),!e)return null;do{if(n(e))return e}while(e=e.parentNode);return null},elementContains:function(n,o){return(e.Node&&e.Node.prototype&&Node.prototype.contains?t.bind(n,n.contains):t.bind(n,function(e){return n===o||!!(16&this.compareDocumentPosition(e))}))(o)},extractElementByName:function(e,n,o,i){function r(e){return a(e)||(o?d(e):null)}function a(e){if(e)for(var t=0,o=e.length;t");o[0].body.appendChild(n[0]);for(var i=["sticky","-webkit-sticky"],r=0;rt)&&p(n)}function o(){return i(M.now()-s,r,a,1e3)}function i(e,t,n,o){if(e>o)return t+n;var i=(e/=o)*e;return t+n*(i*e*-2+3*i)}var r=e.scrollTop,a=t-r,d=r-1?a(e,t,function(){return l(e)}):r(e,t,n)}function s(e,t){var n=l(e);n.indexOf(i.startSymbol())>-1||n||r(e,t,n)}function l(e){e=e[0]||e;for(var n,o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),i="";n=o.nextNode();)(function(t){for(;t.parentNode&&(t=t.parentNode)!==e;)if(t.getAttribute&&"true"===t.getAttribute("aria-hidden"))return!0})(n)||(i+=n.textContent);return i.trim()||""}function c(e,t){var i=e.hasChildNodes(),r=!1;if(i)for(var a=e.childNodes,d=0;d").html(o.trim()).contents(),s=i(d);return n={locals:e,element:d,link:function(o){if(e.$scope=o,l){var i=r(l,e,!0,c);h&&t.extend(i.instance,e);var a=i();d.data("$ngControllerController",a),d.children().data("$ngControllerController",a),n.controller=a}return s(o)}}})}}e.$inject=["$q","$templateRequest","$injector","$compile","$controller"],t.module("material.core").service("$mdCompiler",e)}(),function(){function n(){}function o(n,o,i){function r(e){return function(t,n){n.distancethis.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){g&&(this.oldTouchAction=e[0].style[g],e[0].style[g]=!1===t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[g]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;g||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,o=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,o=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=d(e),c(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:o.throttle(function(e){this.state.isRunning&&(c(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(c(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function i(e){this.name=e,this.state={}}function r(){function n(e,n,o){o=o||u;var i=new t.element.Event(n);i.$material=!0,i.pointer=o,i.srcEvent=e,t.extend(i,{clientX:o.x,clientY:o.y,screenX:o.x,screenY:o.y,pageX:o.x,pageY:o.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(o.target).trigger(i)}function o(t,n,o){o=o||u;var i;"click"===n||"mouseup"==n||"mousedown"==n?(i=document.createEvent("MouseEvents"),i.initMouseEvent(n,!0,!0,e,t.detail,o.x,o.y,o.x,o.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null)):(i=document.createEvent("CustomEvent"),i.initCustomEvent(n,!0,!0,{})),i.$material=!0,i.pointer=o,i.srcEvent=t,o.target.dispatchEvent(i)}var r=void 0!==e.jQuery&&t.element===e.jQuery;return i.prototype={options:{},dispatchEvent:r?n:o,onSetup:t.noop,onCleanup:t.noop,onStart:t.noop,onMove:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(e,n){if(!this.state.isRunning){var o=this.getNearestParent(e.target),i=o&&o.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,i),registeredParent:o},this.onStart(e,n)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){function n(){delete e[0].$mdGesture[o.name],e.off("$destroy",n),o.onCleanup(e,t||{})}var o=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",n),o.onSetup(e,t||{}),n}},i}function a(e,n){function o(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||l(e)||(e.preventDefault(),e.stopPropagation())}function i(e){0===e.clientX&&0===e.clientY||e.$material||e.isIonicTap||l(e)?(g=null,"label"==e.target.tagName.toLowerCase()&&(g={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),g=null)}function r(e,t){var o;for(var i in h)(o=h[i])instanceof n&&("start"===e&&o.cancel(),o[e](t,u))}function a(e){if(!u){var t=+Date.now();p&&!s(e,p)&&t-p.endTime<1500||(u=d(e),r("start",e))}}function m(e){u&&s(e,u)&&(c(e,u),r("move",e))}function f(e){u&&s(e,u)&&(c(e,u),u.endTime=+Date.now(),r("end",e),p=u,u=null)}document.contains||(document.contains=function(e){return document.body.contains(e)}),!b&&e.isHijackingClicks&&(document.addEventListener("click",i,!0),document.addEventListener("mouseup",o,!0),document.addEventListener("mousedown",o,!0),document.addEventListener("focus",o,!0),b=!0);t.element(document).on("mousedown touchstart pointerdown",a).on("mousemove touchmove pointermove",m).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",f).on("$$mdGestureReset",function(){p=u=null})}function d(e){var t=m(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function s(e,t){return e&&t&&e.type.charAt(0)===t.type}function l(e){return g&&g.x==e.x&&g.y==e.y}function c(e,t){var n=m(e),o=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=t.distanceX>0?"right":t.distanceX<0?"left":"",t.directionY=t.distanceY>0?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function m(e){return e=e.originalEvent||e,e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}o.$inject=["$$MdGestureHandler","$$rAF","$timeout"],a.$inject=["$mdGesture","$$MdGestureHandler"];var u,p,h={},f=!1,g=null,b=!1;t.module("material.core.gestures",[]).provider("$mdGesture",n).factory("$$MdGestureHandler",r).run(a),n.prototype={skipClickHijack:function(){return f=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new o(e,t,n)}]}}(),function(){function e(){function e(e){function n(e){return s.optionsFactory=e.options,s.methods=(e.methods||[]).concat(a),l}function o(e,t){return d[e]=t,l}function i(t,n){if(n=n||{},n.methods=n.methods||[],n.options=n.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(n.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return s.presets[t]={methods:n.methods.concat(a),optionsFactory:n.options,argOption:n.argOption},l}function r(n,o){function i(e){return e=e||{},e._options&&(e=e._options),m.show(t.extend({},c,e))}function r(e){return m.destroy(e)}function a(t,n){var i={};return i[e]=u,o.invoke(t||function(){return n},{},i)}var l,c,m=n(),u={hide:m.hide,cancel:m.cancel,show:i,destroy:r};return l=s.methods||[],c=a(s.optionsFactory,{}),t.forEach(d,function(e,t){u[t]=e}),t.forEach(s.presets,function(e,n){function o(e){this._options=t.extend({},i,e)}var i=a(e.optionsFactory,{}),r=(e.methods||[]).concat(l);if(t.extend(i,{$type:n}),t.forEach(r,function(e){o.prototype[e]=function(t){return this._options[e]=t,this}}),e.argOption){var d="show"+n.charAt(0).toUpperCase()+n.slice(1);u[d]=function(e){var t=u[n](e);return u.show(t)}}u[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new o)[e.argOption](n):new o(n)}}),u}r.$inject=["$$interimElement","$injector"];var a=["onHide","onShow","onRemove"],d={},s={presets:{}},l={setDefaults:n,addPreset:i,addMethod:o,$get:r};return l.addPreset("build",{methods:["controller","controllerAs","resolve","template","templateUrl","themable","transformTemplate","parent"]}),l}function o(e,o,i,r,a,d,s,l,c,m,u){return function(){function p(e){e=e||{};var t=new b(e||{});return(!e.skipHide&&$.length?v.cancel():o.when(!0)).finally(function(){$.push(t),t.show().catch(function(e){return e})}),t.deferred.promise}function h(e,t){function i(n){return n.remove(e,!1,t||{}).catch(function(e){return e}),n.deferred.promise}if(!$.length)return o.when(e);if(t=t||{},t.closeAll){var r=o.all($.reverse().map(i));return $=[],r}return t.closeTo!==n?o.all($.splice(t.closeTo).map(i)):i($.pop())}function f(e,n){var i=$.pop();return i?(i.remove(e,!0,n||{}).catch(function(e){return e}),i.deferred.promise.catch(t.noop)):o.when(e)}function g(e){var n=e?null:$.shift(),i=t.element(e).length?t.element(e)[0].parentNode:null;if(i){var r=$.filter(function(e){return e.options.element[0]===i});r.length>0&&(n=r[0],$.splice($.indexOf(n),1))}return n?n.remove(E,!1,{$destroy:!0}):o.when(E)}function b(u){function p(){return o(function(e,t){function n(e){y.deferred.reject(e),t(e)}u.onCompiling&&u.onCompiling(u),g(u).then(function(t){T=b(t,u),A=C(T,u,t.controller).then(e,n)},n)})}function h(e,n,i){function r(e){y.deferred.resolve(e)}function a(e){y.deferred.reject(e)}return T?(u=t.extend(u||{},i||{}),u.cancelAutoHide&&u.cancelAutoHide(),u.element.triggerHandler("$mdInterimElementRemove"),!0===u.$destroy?M(u.element,u).then(function(){n&&a(e)||r(e)}):(o.when(A).finally(function(){M(u.element,u).then(function(){n&&a(e)||r(e)},a)}),y.deferred.promise)):o.when(!1)}function g(e){return(e.skipCompile?null:c.compile(e))||o(function(t){t({locals:{},link:function(){return e.element}})})}function b(e,n){t.extend(e.locals,n);var o=e.link(n.scope);return n.element=o,n.parent=E(o,n),n.themable&&m(o),o}function E(n,o){var i=o.parent;if(i=t.isFunction(i)?i(o.scope,n,o):t.isString(i)?t.element(e[0].querySelector(i)):t.element(i),!(i||{}).length){var r;return d[0]&&d[0].querySelector&&(r=d[0].querySelector(":not(svg) > body")),r||(r=d[0]),"#comment"==r.nodeName&&(r=e[0].body),t.element(r)}return i}function $(){var e,o=t.noop;u.hideDelay&&(e=a(v.hide,u.hideDelay),o=function(){a.cancel(e)}),u.cancelAutoHide=function(){o(),u.cancelAutoHide=n}}function C(e,n,i){var r=n.onShowing||t.noop,a=n.onComplete||t.noop;return r(n.scope,e,n,i),o(function(t,r){try{o.when(n.onShow(n.scope,e,n,i)).then(function(){a(n.scope,e,n),$(),t(e)},r)}catch(d){r(d.message)}})}function M(e,n){var o=n.onRemoving||t.noop;return i(function(t,r){try{var a=i.when(n.onRemove(n.scope,e,n)||!0);o(e,a),1==n.$destroy?t(e):a.then(function(){!n.preserveScope&&n.scope&&n.scope.$destroy(),t(e)},r)}catch(d){r(d)}})}var y,T,A=o.when(!0);return u=function(e){return e=e||{},e.template&&(e.template=l.processTemplate(e.template)),t.extend({preserveScope:!1,cancelAutoHide:t.noop,scope:e.scope||r.$new(e.isolateScope),onShow:function(e,t,n){return s.enter(t,n.parent)},onRemove:function(e,t){return t&&s.leave(t)||o.when()}},e)}(u),y={options:u,deferred:o.defer(),show:p,remove:h}}var v,E=!1,$=[];return v={show:p,hide:h,cancel:f,destroy:g,$injector_:u}}}return o.$inject=["$document","$q","$$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector"],e.$get=o,e}t.module("material.core").provider("$$interimElement",e)}(),function(){!function(){function n(){var e=!!document.querySelector("[md-layouts-disabled]");A.enabled=!e}function o(){return A.enabled=!1,{restrict:"A",priority:"900"}}function i(e){return["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(o){return A.enabled?(o.addClass(e),function(t,o){n(function(){o.removeClass(e)},10,!1)}):t.noop}}}]}function r(e){function n(t,n,o){var i=d(n,e),r=o.$observe(o.$normalize(e),i);i(p(e,o,"")),t.$on("$destroy",function(){r()})}return["$mdUtil","$interpolate","$log",function(o,i,r){return g=o,b=i,v=r,{restrict:"A",compile:function(o,i){var r;return A.enabled&&(l(e,i,o,v),c(e,p(e,i,""),m(o,e,i)),r=n),r||t.noop}}}]}function a(e){function n(t,n){n.addClass(e)}return["$mdUtil","$interpolate","$log",function(o,i,r){return g=o,b=i,v=r,{restrict:"A",compile:function(o,i){var r;return A.enabled&&(c(e,p(e,i,""),m(o,e,i)),n(null,o),r=n),r||t.noop}}}]}function d(e,n){var o;return function(i){var r=c(n,i||"");t.isDefined(r)&&(o&&e.removeClass(o),o=r?n+"-"+r.replace($,"-"):n,e.addClass(o))}}function s(e){var n=e.split("-");return["$log",function(o){return o.warn(e+"has been deprecated. Please use a `"+n[0]+"-gt-` variant."),t.noop}]}function l(e,t,n,o){var i,r,a,d=n[0].nodeName.toLowerCase();switch(e.replace(E,"")){case"flex":"md-button"!=d&&"fieldset"!=d||(r="<"+d+" "+e+">",a="https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers",i="Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",o.warn(g.supplant(i,[r,a])))}}function c(e,n,o){var i=n;if(!u(n)){switch(e.replace(E,"")){case"layout":h(n,M)||(n=M[0]);break;case"flex":h(n,C)||isNaN(n)&&(n="");break;case"flex-offset":case"flex-order":n&&!isNaN(+n)||(n="0");break;case"layout-align":var r=f(n);n=g.supplant("{main}-{cross}",r);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":case"layout-nowrap":n=""}n!=i&&(o||t.noop)(n)}return n}function m(e,t,n){return function(e){u(e)||(n[n.$normalize(t)]=e)}}function u(e){return(e||"").indexOf(b.startSymbol())>-1}function p(e,t,n){var o=t.$normalize(e);return t[o]?t[o].replace($,"-"):n||null}function h(e,t,n){e=n&&e?e.replace($,n):e;var o=!1;return e&&t.forEach(function(t){t=n?t.replace($,n):t,o=o||t===e}),o}function f(e){var t,n={main:"start",cross:"stretch"};return e=e||"",0!==e.indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e),t=e.toLowerCase().trim().replace($,"-").split("-"),t.length&&"space"===t[0]&&(t=[t[0]+"-"+t[1],t[2]]),t.length>0&&(n.main=t[0]||n.main),t.length>1&&(n.cross=t[1]||n.cross),y.indexOf(n.main)<0&&(n.main="start"),T.indexOf(n.cross)<0&&(n.cross="stretch"),n}var g,b,v,E=/(-gt)?-(sm|md|lg|print)/g,$=/\s+/g,C=["grow","initial","auto","none","noshrink","nogrow"],M=["row","column"],y=["","start","center","end","stretch","space-around","space-between"],T=["","start","center","end","stretch"],A={enabled:!0,breakpoints:[]};!function(e){function d(e){return e.replace(m,"").replace(u,function(e,t,n,o){return o?n.toUpperCase():n})}var m=/^((?:x|data)[\:\-_])/i,u=/([\:\-\_]+(.))/g,p=["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],h=["layout","flex","flex-order","flex-offset","layout-align"],f=["show","hide","layout-padding","layout-margin"];t.forEach(p,function(n){t.forEach(h,function(t){var o=n?t+"-"+n:t;e.directive(d(o),r(o))}),t.forEach(f,function(t){var o=n?t+"-"+n:t;e.directive(d(o),a(o))})}),e.provider("$$mdLayout",function(){return{$get:t.noop,validateAttributeValue:c,validateAttributeUsage:l,disableLayouts:function(e){A.enabled=!0!==e}}}).directive("mdLayoutCss",o).directive("ngCloak",i("ng-cloak")).directive("layoutWrap",a("layout-wrap")).directive("layoutNowrap",a("layout-nowrap")).directive("layoutNoWrap",a("layout-no-wrap")).directive("layoutFill",a("layout-fill")).directive("layoutLtMd",s("layout-lt-md")).directive("layoutLtLg",s("layout-lt-lg")).directive("flexLtMd",s("flex-lt-md")).directive("flexLtLg",s("flex-lt-lg")).directive("layoutAlignLtMd",s("layout-align-lt-md")).directive("layoutAlignLtLg",s("layout-align-lt-lg")).directive("flexOrderLtMd",s("flex-order-lt-md")).directive("flexOrderLtLg",s("flex-order-lt-lg")).directive("offsetLtMd",s("flex-offset-lt-md")).directive("offsetLtLg",s("flex-offset-lt-lg")).directive("hideLtMd",s("hide-lt-md")).directive("hideLtLg",s("hide-lt-lg")).directive("showLtMd",s("show-lt-md")).directive("showLtLg",s("show-lt-lg")).config(n)}(t.module("material.core.layout",["ng"]))}()}(),function(){t.module("material.core.meta",[]).provider("$$mdMeta",function(){function e(e){if(r[e])return!0;var n=document.getElementsByName(e)[0];return!!n&&(r[e]=t.element(n),!0)}function n(n,o){if(e(n),r[n])r[n].attr("content",o);else{var a=t.element('');i.append(a),r[n]=a}return function(){r[n].attr("content",""),r[n].remove(),delete r[n]}}function o(t){if(!e(t))throw Error("$$mdMeta: could not find a meta tag with the name '"+t+"'");return r[t].attr("content")}var i=t.element(document.head),r={},a={setMeta:n,getMeta:o};return t.extend({},a,{$get:function(){return a}})})}(),function(){function e(e,o){function i(e){return e&&""!==e}var r,a=[],d={};return r={notFoundError:function(t,n){e.error((n||"")+"No instance found for handle",t)},getInstances:function(){return a},get:function(e){if(!i(e))return null;var t,n,o;for(t=0,n=a.length;t');return this.$element.append(e),e},o.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},o.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&t.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},o.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},o.prototype.createRipple=function(e,n){ if(this.isRippleAllowed()){var i=this,r=i.$mdColorUtil,d=t.element('
'),s=this.$element.prop("clientWidth"),l=this.$element.prop("clientHeight"),c=2*Math.max(Math.abs(s-e),e),m=2*Math.max(Math.abs(l-n),n),u=function(e,t,n){return e?Math.max(t,n):Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}(this.options.fitRipple,c,m),p=this.calculateColor();d.css({left:e+"px",top:n+"px",background:"black",width:u+"px",height:u+"px",backgroundColor:r.rgbaToRgb(p),borderColor:r.rgbaToRgb(p)}),this.lastRipple=d,this.clearTimeout(),this.timeout=this.$timeout(function(){i.clearTimeout(),i.mousedown||i.fadeInComplete(d)},157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:p}),this.container.append(d),this.ripples.push(d),d.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){d.addClass("md-ripple-scaled md-ripple-active"),i.$timeout(function(){i.clearRipples()},450,!1)},!1)}},o.prototype.fadeInComplete=function(e){this.lastRipple===e?this.timeout||this.mousedown||this.removeRipple(e):this.removeRipple(e)},o.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},450,!1))},o.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){!function(){function e(e){function n(n,o,i){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},i))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdTabInkRipple",e)}()}(),function(){t.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100 A200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A200 A400 A700"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 700"}})}(),function(){!function(e){function t(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}function o(t,o){function i(e,t){return t=t||{},p[e]=a(e,t),h}function r(t,n){return a(t,e.extend({},p[t]||{},n))}function a(e,t){var n=w.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function s(t,n){if(E[t])return E[t];n=n||"default";var o="string"==typeof n?E[n]:n,i=new c(t);return o&&e.forEach(o.colors,function(t,n){i.colors[n]={name:t.name,hues:e.extend({},t.hues)}}),E[t]=i,i}function c(t){function n(t){if((t=0===arguments.length||!!t)!==o.isDark){o.isDark=t,o.foregroundPalette=o.isDark?g:f,o.foregroundShadow=o.isDark?b:v;var n=o.isDark?A:T,i=o.isDark?T:A;return e.forEach(n,function(e,t){var n=o.colors[t],r=i[t];if(n)for(var a in n.hues)n.hues[a]===r[a]&&(n.hues[a]=e[a])}),o}}var o=this;o.name=t,o.colors={},o.dark=n,n(!1),M.forEach(function(t){var n=(o.isDark?A:T)[t];o[t+"Palette"]=function(i,r){var a=o.colors[t]={name:i,hues:e.extend({},n,r)};return Object.keys(a.hues).forEach(function(e){if(!n[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",o.name).replace("%3",i).replace("%4",Object.keys(n).join(", ")))}),Object.keys(a.hues).map(function(e){return a.hues[e]}).forEach(function(e){if(-1==w.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",o.name).replace("%3",t).replace("%4",i).replace("%5",w.join(", ")))}),o},o[t+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+t+"Color() has been deprecated. Use $mdThemingProviderTheme."+t+"Palette() instead."),o[t+"Palette"].apply(o,e)}})}function m(t,o){function i(e){return e===n||""===e||a.THEMES[e]!==n}function r(n,r){function a(){return(l=r.controller("mdTheme")||n.data("$mdThemeController"))&&l.$mdTheme||("default"==C?"":C)}function d(e){if(e){i(e)||o.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e),l&&n.data("$mdThemeController",l)}}var l=r.controller("mdTheme"),c=n.attr("md-theme-watch"),m=($||e.isDefined(c))&&"false"!=c;d(a()),($&&!function(){var e=r.controller("mdTheme");return!!e&&(n.on("$destroy",e.registerChanges(function(){d(a())})),!0)}()||!$&&m)&&n.on("$destroy",t.$watch(a,d))}var a=function(e,o){o===n&&(o=e,e=n),e===n&&(e=t),a.inherit(o,o)};return a.THEMES=e.extend({},E),a.PALETTES=e.extend({},p),a.inherit=r,a.registered=i,a.defaultTheme=function(){return C},a.generateTheme=function(e){l(E[e],e,k.nonce)},a.setBrowserColor=x,a}m.$inject=["$rootScope","$log"],p={};var h,E={},$=!1,C="default";e.extend(p,t);var y=function(e){var t=o.setMeta("theme-color",e),n=o.setMeta("msapplication-navbutton-color",e);return function(){t(),n()}},x=function(t){t=e.isObject(t)?t:{};var n=t.theme||"default",o=t.hue||"800",i=p[t.palette]||p[E[n].colors[t.palette||"primary"].name],r=e.isObject(i[o])?i[o].hex:i[o];return y(r)};return h={definePalette:i,extendPalette:r,theme:s,configuration:function(){return e.extend({},k,{defaultTheme:C,alwaysWatchTheme:$,registeredStyles:[].concat(k.registeredStyles)})},disableTheming:function(t){k.disableTheming=e.isUndefined(t)||!!t},registerStyles:function(e){k.registeredStyles.push(e)},setNonce:function(e){k.nonce=e},generateThemesOnDemand:function(e){k.generateOnDemand=e},setDefaultTheme:function(e){C=e},alwaysWatchTheme:function(e){$=e},enableBrowserColor:x,$get:m,_LIGHT_DEFAULT_HUES:T,_DARK_DEFAULT_HUES:A,_PALETTES:p,_THEMES:E,_parseRules:d,_rgba:u}}function i(t,n,o){return{priority:100,link:{pre:function(i,r,a){var d=[],s={registerChanges:function(t,n){return n&&(t=e.bind(n,t)),d.push(t),function(){var e=d.indexOf(t);e>-1&&d.splice(e,1)}},$setTheme:function(e){t.registered(e)||o.warn("attempted to use unregistered theme '"+e+"'"),s.$mdTheme=e,d.forEach(function(e){e()})}};r.data("$mdThemeController",s),s.$setTheme(n(a.mdTheme)(i)),a.$observe("mdTheme",s.$setTheme)}}}}function r(){return k.disableTheming=!0,{restrict:"A",priority:"900"}}function a(e){return e}function d(t,n,o){c(t,n),o=o.replace(/THEME_NAME/g,t.name);var i=[],r=t.colors[n],a=new RegExp("\\.md-"+t.name+"-theme","g"),d=new RegExp("('|\")?{{\\s*("+n+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),s=/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g,l=p[r.name];return o=o.replace(s,function(e,n,o,i,r){return"foreground"===n?"shadow"==o?t.foregroundShadow:t.foregroundPalette[o]||t.foregroundPalette[1]:(0!==o.indexOf("hue")&&"default"!==o||(o=t.colors[n].hues[o]),u((p[t.colors[n].name][o]||"")[r?"contrast":"value"],i))}),e.forEach(r.hues,function(e,n){var r=o.replace(d,function(t,n,o,i,r){return u(l[e]["color"===i?"value":"contrast"],r)});if("default"!==n&&(r=r.replace(a,".md-"+t.name+"-theme.md-"+n)),"default"==t.name){var s=/((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g;r=r.replace(s,function(e,t,n,o){return e+", "+t+n+o})}i.push(r)}),i}function s(t,n){function o(t,n){var o=t.contrastDefaultColor,i=t.contrastLightColors||[],r=t.contrastStrongLightColors||[],a=t.contrastDarkColors||[];"string"==typeof i&&(i=i.split(" ")),"string"==typeof r&&(r=r.split(" ")),"string"==typeof a&&(a=a.split(" ")),delete t.contrastDefaultColor,delete t.contrastLightColors,delete t.contrastStrongLightColors,delete t.contrastDarkColors,e.forEach(t,function(n,d){if(!e.isObject(n)){var l=m(n);if(!l)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",n).replace("%2",t.name).replace("%3",d));t[d]={hex:t[d],value:l,contrast:function(){return"light"===o?a.indexOf(d)>-1?E:r.indexOf(d)>-1?C:$:i.indexOf(d)>-1?r.indexOf(d)>-1?C:$:E}()}}})}var i=document.head,r=i?i.firstElementChild:null,a=!k.disableTheming&&t.has("$MD_THEME_CSS")?t.get("$MD_THEME_CSS"):"";if(a+=k.registeredStyles.join(""),r&&0!==a.length){e.forEach(p,o);var d=a.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.trim().length}).map(function(e){return e.trim()+"}"}),s=new RegExp("md-("+M.join("|")+")","g");M.forEach(function(e){x[e]=""}),d.forEach(function(e){for(var t,n=(e.match(s),0);t=M[n];n++)if(e.indexOf(".md-"+t)>-1)return x[t]+=e;for(n=0;t=M[n];n++)if(e.indexOf(t)>-1)return x[t]+=e;return x[y]+=e}),k.generateOnDemand||e.forEach(n.THEMES,function(e){h[e.name]||"default"!==n.defaultTheme()&&"default"===e.name||l(e,e.name,k.nonce)})}}function l(e,t,n){var o=document.head,i=o?o.firstElementChild:null;h[t]||(M.forEach(function(t){for(var r=d(e,t,x[t]);r.length;){var a=r.shift();if(a){var s=document.createElement("style");s.setAttribute("md-theme-style",""),n&&s.setAttribute("nonce",n),s.appendChild(document.createTextNode(a)),o.insertBefore(s,i)}}}),h[e.name]=!0)}function c(e,t){if(!p[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(p).join(", ")))}function m(t){if(e.isArray(t)&&3==t.length)return t;if(/^rgb/.test(t))return t.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==t.charAt(0)&&(t=t.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(t)){var n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),[parseInt(o,16),parseInt(i,16),parseInt(r,16)]}}function u(t,n){return t?(4==t.length&&(t=e.copy(t),n?t.pop():n=t.pop()),n&&("number"==typeof n||"string"==typeof n&&n.length)?"rgba("+t.join(",")+","+n+")":"rgb("+t.join(",")+")"):"rgb('0,0,0')"}t.$inject=["$mdThemingProvider"],i.$inject=["$mdTheming","$interpolate","$log"],a.$inject=["$mdTheming"],o.$inject=["$mdColorPalette","$$mdMetaProvider"],s.$inject=["$injector","$mdTheming"],e.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",i).directive("mdThemable",a).directive("mdThemesDisabled",r).provider("$mdTheming",o).config(t).run(s);var p,h={},f={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},g={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},b="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",v="",E=m("rgba(0,0,0,0.87)"),$=m("rgba(255,255,255,0.87)"),C=m("rgb(255,255,255)"),M=["primary","accent","warn","background"],y="primary",T={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},A={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};M.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};T[e]||(T[e]=t),A[e]||(A[e]=t)});var w=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],k={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null},x={}}(e.angular)}(),function(){function n(n,o,i,r,a){var d;return d={translate3d:function(e,t,n,o){function i(n){return a(e,{to:n||t,addClass:o.transitionOutClass,removeClass:o.transitionInClass}).start()}return a(e,{from:t,to:n,addClass:o.transitionInClass,removeClass:o.transitionOutClass}).start().then(function(){return i})},waitTransitionEnd:function(t,n){var a=3e3;return o(function(o,d){function s(e){e&&e.target!==t[0]||(e&&i.cancel(c),t.off(r.CSS.TRANSITIONEND,s),o())}n=n||{},function(n){return n=n||e.getComputedStyle(t[0]),"0s"==n.transitionDuration||!n.transition&&!n.transitionProperty}(n.cachedTransitionStyles)&&(a=0);var c=i(s,n.timeout||a);t.on(r.CSS.TRANSITIONEND,s)})},calculateTransformValues:function(e,t){var o=t.element,i=t.bounds;if(o||i){var r=o?d.clientRect(o)||function(){var t=e?e.parent():null,n=t?t.parent():null;return n?d.clientRect(n):null}():d.copyRect(i),a=d.copyRect(e[0].getBoundingClientRect()),s=d.centerPointFor(a),l=d.centerPointFor(r);return{centerX:l.x-s.x,centerY:l.y-s.y,scaleX:Math.round(100*Math.min(.5,r.width/a.width))/100,scaleY:Math.round(100*Math.min(.5,r.height/a.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,o){return t.bind(null,n.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )")(d.calculateTransformValues(e,o))},calculateSlideToOrigin:function(e,o){return t.bind(null,n.supplant,"translate3d( {centerX}px, {centerY}px, 0 )")(d.calculateTransformValues(e,o))},toCss:function(e){function n(e,n,i){t.forEach(n.split(" "),function(e){o[e]=i})}var o={};return t.forEach(e,function(e,a){if(!t.isUndefined(e))if("left top right bottom width height x y min-width min-height max-width max-height".indexOf(a)>=0)o[a]=e+"px";else switch(a){case"transition":n(a,r.CSS.TRANSITION,e);break;case"transform":n(a,r.CSS.TRANSFORM,e);break;case"transformOrigin":n(a,r.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":o["font-size"]=e}}),o},toTransformCss:function(e,n,o){var i={};return t.forEach(r.CSS.TRANSFORM.split(" "),function(t){i[t]=e}),n&&(o=o||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",i.transition=o),i},copyRect:function(e,n){return e?(n=n||{},t.forEach("left top right bottom width height".split(" "),function(t){n[t]=Math.round(e[t])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var n=t.element(e)[0].getBoundingClientRect();return function(e){return e&&e.width>0&&e.height>0}(n)?d.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}}}t.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(e,t,o,i){return function(r){return n(r,e,t,o,i)}}])}(),function(){t.version.minor>=4?t.module("material.core.animate",[]):function(){function e(e){return e.replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()})}var n=t.forEach,o=t.isDefined(document.documentElement.style.WebkitAppearance),i=o?"-webkit-":"",r=(o?"webkitTransitionEnd ":"")+"transitionend",a=(o?"webkitAnimationEnd ":"")+"animationend",d=["$document",function(e){return function(){return e[0].body.clientWidth+1}}],s=["$$rAF",function(e){return function(){var t=!1;return e(function(){t=!0}),function(n){t?n():e(n)}}}],l=["$q","$$rAFMutex",function(e,o){function i(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=o(),this._state=0}return i.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:t.noop,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){!1===t?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(e){2!==this._state&&(n(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=2)}},i.all=function(e,t){function o(n){r=r&&n,++i===e.length&&t(r)}var i=0,r=!0;n(e,function(e){e.done(o)})},i}];t.module("material.core.animate",[]).factory("$$forceReflow",d).factory("$$AnimateRunner",l).factory("$$rAFMutex",s).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(t,d,s,l,c,m,u){function p(o,d){var l=[],c=C(o),p=c&&u.enabled(),g=!1,y=!1;p&&(d.transitionStyle&&l.push([i+"transition",d.transitionStyle]),d.keyframeStyle&&l.push([i+"animation",d.keyframeStyle]),d.delay&&l.push([i+"transition-delay",d.delay+"s"]),d.duration&&l.push([i+"transition-duration",d.duration+"s"]),g=d.keyframeStyle||d.to&&(d.duration>0||d.transitionStyle),y=!!d.addClass||!!d.removeClass,M(o,!0));var T=p&&(g||y);E(o,d);var A,w,k=!1;return{close:t.close,start:function(){function t(){if(!k)return k=!0,A&&w&&o.off(A,w),h(o,d),v(o,d),n(l,function(t){c.style[e(t[0])]=""}),u.complete(!0),u}var u=new s;return b(function(){if(M(o,!1),!T)return t();n(l,function(t){var n=t[0],o=t[1];c.style[e(n)]=o}),h(o,d);var s=f(o);if(0===s.duration)return t();var u=[];d.easing&&(s.transitionDuration&&u.push([i+"transition-timing-function",d.easing]),s.animationDuration&&u.push([i+"animation-timing-function",d.easing])),d.delay&&s.animationDelay&&u.push([i+"animation-delay",d.delay+"s"]),d.duration&&s.animationDuration&&u.push([i+"animation-duration",d.duration+"s"]),n(u,function(t){var n=t[0],o=t[1];c.style[e(n)]=o,l.push(t)});var p=s.delay,g=1e3*p,b=s.duration,v=1e3*b,E=Date.now();A=[],s.transitionDuration&&A.push(r),s.animationDuration&&A.push(a),A=A.join(" "),w=function(e){e.stopPropagation();var n=e.originalEvent||e,o=n.timeStamp||Date.now(),i=parseFloat(n.elapsedTime.toFixed(3));Math.max(o-E,0)>=g&&i>=b&&t()},o.on(A,w),$(o,d),m(t,g+1.5*v,!1)}),u}}}function h(e,t){t.addClass&&(c.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(c.removeClass(e,t.removeClass),t.removeClass=null)}function f(e){function n(e){return o?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}var i=C(e),r=t.getComputedStyle(i),a=g(r[n("transitionDuration")]),d=g(r[n("animationDuration")]),s=g(r[n("transitionDelay")]),l=g(r[n("animationDelay")]);return d*=parseInt(r[n("animationIterationCount")],10)||1,{duration:Math.max(d,a),delay:Math.max(l,s),animationDuration:d,transitionDuration:a,animationDelay:l,transitionDelay:s}}function g(e){var t=0,o=(e||"").split(/\s*,\s*/);return n(o,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function b(e){y&&y(),T.push(e),y=d(function(){y=null;for(var e=l(),t=0;t` will affect the bottom-sheet opening animations.",i[0])}l.disableBackdrop||(h=r.createBackdrop(o,"md-bottom-sheet-backdrop md-opaque"),h[0].tabIndex=-1,l.clickOutsideToClose&&h.on("click",function(){r.nextTick(d.cancel,!0)}),a.inherit(h,l.parent),e.enter(h,l.parent,null));var f=new p(i,l.parent);return l.bottomSheet=f,a.inherit(f.element,l.parent),l.disableParentScroll&&(l.restoreScroll=r.disableScrollAround(f.element,l.parent)),e.enter(f.element,l.parent,h).then(function(){var e=r.findFocusTarget(i)||t.element(i[0].querySelector("button")||i[0].querySelector("a")||i[0].querySelector(r.prefixer("ng-click",!0)))||h;l.escapeToClose&&(l.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&r.nextTick(d.cancel,!0)},s.on("keyup",l.rootElementKeyupCallback),e&&e.focus())})}function u(t,n,o){var i=o.bottomSheet;return o.disableBackdrop||e.leave(h),e.leave(i.element).then(function(){o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),i.cleanup()})}function p(e,t){function a(t){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function s(t){var o=t.pointer.distanceY;o<5&&(o=Math.max(-i,o/2)),e.css(n.CSS.TRANSFORM,"translate3d(0,"+(i+o)+"px,0)")}function c(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>o)){var i=e.prop("offsetHeight")-t.pointer.distanceY,a=Math.min(i/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,a+"ms"),r.nextTick(d.cancel,!0)}else e.css(n.CSS.TRANSITION_DURATION,""),e.css(n.CSS.TRANSFORM,"")}var m=l.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",a).on("$md.drag",s).on("$md.dragend",c),{element:e,cleanup:function(){m(),t.off("$md.dragstart",a),t.off("$md.drag",s),t.off("$md.dragend",c)}}}var h;return{themable:!0,onShow:m,onRemove:u,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}n.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var o=.5,i=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:n})}e.$inject=["$mdBottomSheet"],n.$inject=["$$interimElementProvider"],t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",n)}(),function(){function e(e){return{restrict:"E",link:function(t,n){e(n)}}}function n(e,n,o,i){function r(e){return t.isDefined(e.href)||t.isDefined(e.ngHref)||t.isDefined(e.ngLink)||t.isDefined(e.uiSref)}function a(e,t){return r(t)?'':''}function d(a,d,s){n(d),e.attach(a,d),o.expectWithoutText(d,"aria-label"),r(s)&&t.isDefined(s.ngDisabled)&&a.$watch(s.ngDisabled,function(e){d.attr("tabindex",e?-1:0)}),d.on("click",function(e){!0===s.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),d.hasClass("md-no-focus")||(a.mouseActive=!1,d.on("mousedown",function(){a.mouseActive=!0,i(function(){a.mouseActive=!1},100)}).on("focus",function(){!1===a.mouseActive&&d.addClass("md-focused")}).on("blur",function(e){d.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:a,link:d}}n.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"],e.$inject=["$mdTheming"],t.module("material.components.button",["material.core"]).directive("mdButton",n).directive("a",e)}(),function(){function e(e){return{restrict:"E",link:function(t,n,o){n.addClass("_md"),e(n)}}}e.$inject=["$mdTheming"],t.module("material.components.card",["material.core"]).directive("mdCard",e)}(),function(){t.module("material.components.chips",["material.core","material.components.autocomplete"])}(),function(){function e(e,n,o,i,r,a){function d(d,s){function l(d,s,l,c){function u(e){var t=e.which||e.keyCode;t!==o.KEY_CODE.SPACE&&t!==o.KEY_CODE.ENTER||(e.preventDefault(),s.addClass("md-focused"),p(e))}function p(e){s[0].hasAttribute("disabled")||d.skipToggle||d.$apply(function(){var t=l.ngChecked?l.checked:!c.$viewValue;c.$setViewValue(t,e&&e.type),c.$render()})}function h(){s.toggleClass("md-checked",!!c.$viewValue&&!g)}function f(e){g=!1!==e,g&&s.attr("aria-checked","mixed"),s.toggleClass("md-indeterminate",g)}var g;c=c||r.fakeNgModel(),i(s),s.children().on("focus",function(){s.focus()}),r.parseAttributeBoolean(l.mdIndeterminate)&&(f(),d.$watch(l.mdIndeterminate,f)),l.ngChecked&&d.$watch(d.$eval.bind(d,l.ngChecked),function(e){c.$setViewValue(e),c.$render()}),function(e,t,n){l[e]&&d.$watch(l[e],function(e){n[e]&&s.attr(t,n[e])})}("ngDisabled","tabindex",{true:"-1",false:l.tabindex}),n.expectWithText(s,"aria-label"),e.link.pre(d,{on:t.noop,0:{}},l,[c]),d.mouseActive=!1,s.on("click",p).on("keypress",u).on("mousedown",function(){d.mouseActive=!0,a(function(){d.mouseActive=!1},100)}).on("focus",function(){!1===d.mouseActive&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")}),c.$render=h}return s.$set("tabindex",s.tabindex||"0"),s.$set("type","checkbox"),s.$set("role",s.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:l}}return e=e[0],{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'
',compile:d}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"],t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),function(){!function(){function e(e,n,o){function r(e,t){try{t&&e.css(s(t))}catch(n){o.error(n.message)}}function a(e){return d(c(e))}function d(t,o){o=o||!1;var i=e.PALETTES[t.palette][t.hue];return i=o?i.contrast:i.value,n.supplant("rgba({0}, {1}, {2}, {3})",[i[0],i[1],i[2],i[3]||t.opacity])}function s(e){var n={},o=e.hasOwnProperty("color");return t.forEach(e,function(e,t){var i=c(e),r=t.indexOf("background")>-1;n[t]=d(i),r&&!o&&(n.color=d(i,!0))}),n}function l(n){return t.isDefined(e.THEMES[n.split("-")[0]])}function c(n){var o=n.split("-"),i=t.isDefined(e.THEMES[o[0]]),r=i?o.splice(0,1)[0]:e.defaultTheme();return{theme:r,palette:m(o,r),hue:u(o,r),opacity:o[2]||1}}function m(t,o){var r=t.length>1&&-1!==i.indexOf(t[1]),a=t[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(r&&(a=t[0]+"-"+t.splice(1,1)),-1===i.indexOf(a)){ var d=e.THEMES[o].colors[a];if(!d)throw new Error(n.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:a}));a=d.name}return a}function u(t,o){var i=e.THEMES[o].colors;if("hue"===t[1]){var r=parseInt(t.splice(2,1)[0],10);if(r<1||r>3)throw new Error(n.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:r}));if(t[1]="hue-"+r,!(t[0]in i))throw new Error(n.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(i).join(", "),usedTheme:t[0]}));return i[t[0]].hues[t[1]]}return t[1]||i[t[0]in i?t[0]:"primary"].hues.default}return i=i||Object.keys(e.PALETTES),{applyThemeColors:r,getThemeColor:a,hasTheme:l}}function n(e,n,i,r){return{restrict:"A",require:["^?mdTheme"],compile:function(a,d){var l=function(){var e=d.mdColors,i=e.indexOf("::")>-1,r=!!i||o.test(d.mdColors);d.mdColors=e.replace("::","");var a=t.isDefined(d.mdColorsWatch);return!i&&!r&&(!a||n.parseAttributeBoolean(d.mdColorsWatch))}();return function(n,o,a,d){var s=d[0],c={},m=function(t){"string"!=typeof t&&(t=""),a.mdColors||(a.mdColors="{}");var o=r(a.mdColors)(n);return s&&Object.keys(o).forEach(function(n){var i=o[n];e.hasTheme(i)||(o[n]=(t||s.$mdTheme)+"-"+i)}),u(o),o},u=function(e){if(!t.equals(e,c)){var n=Object.keys(c);c.background&&!n.color&&n.push("color"),n.forEach(function(e){o.css(e,"")})}c=e},p=t.noop;s&&(p=s.registerChanges(function(t){e.applyThemeColors(o,m(t))})),n.$on("$destroy",function(){p()});try{l?n.$watch(m,t.bind(this,e.applyThemeColors,o),!0):e.applyThemeColors(o,m())}catch(h){i.error(h.message)}}}}}n.$inject=["$mdColors","$mdUtil","$log","$parse"],e.$inject=["$mdTheming","$mdUtil","$log"];var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,i=null;t.module("material.components.colors",["material.core"]).directive("mdColors",n).service("$mdColors",e)}()}(),function(){function e(e){function t(e,t){this.$scope=e,this.$element=t}return{restrict:"E",controller:["$scope","$element",t],link:function(t,o){o.addClass("_md"),e(o),t.$broadcast("$mdContentLoaded",o),n(o[0])}}}function n(e){t.element(e).on("$md.pressdown",function(t){"t"===t.pointer.type&&(t.$materialScrollFixed||(t.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}e.$inject=["$mdTheming"],t.module("material.components.content",["material.core"]).directive("mdContent",e)}(),function(){t.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"])}(),function(){function e(e,n,o){return{restrict:"E",link:function(i,r){r.addClass("_md"),n(r),e(function(){function e(){r.toggleClass("md-content-overflow",a.scrollHeight>a.clientHeight)}var n,a=r[0].querySelector("md-dialog-content");a&&(n=a.getElementsByTagName("img"),e(),t.element(n).on("load",e)),i.$on("$destroy",function(){o.destroy(r)})})}}}function o(e){function o(e,t){return{template:['',' ','

{{ dialog.title }}

','
','
',"

{{::dialog.mdTextContent}}

","
",' ',' '," ","
"," ",' '," {{ dialog.cancel }}"," ",' '," {{ dialog.ok }}"," "," ","
"].join("").replace(/\s\s+/g,""),controller:function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){e.hide(!n||this.result)},this.abort=function(){e.cancel()},this.keypress=function(n){n.keyCode===t.KEY_CODE.ENTER&&e.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function i(e,o,i,d,s,l,c,m,u,p,h){function f(e){E(e),e.contentElement&&(e.restoreContentElement=$(e))}function g(e,t,n,o){if(o){if(o.mdHtmlContent=o.htmlContent||n.htmlContent||"",o.mdTextContent=o.textContent||n.textContent||o.content||n.content||"",o.mdHtmlContent&&!p.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(o.mdHtmlContent&&o.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}}function b(e,n,o,r){function a(){n[0].querySelector(".md-actions")&&u.warn("Using a class of md-actions is deprecated, please use .")}function d(){if(o.focusOnOpen){(i.findFocusTarget(n)||function(){var e=n[0].querySelector(".dialog-close");if(!e){var t=n[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=t[t.length-1]}return e}()||s).focus()}}t.element(l[0].body).addClass("md-dialog-is-showing");var s=n.find("md-dialog");if(s.hasClass("ng-cloak")){u.warn("$mdDialog: using `` will affect the dialog opening animations.",n[0])}return C(o),T(s,o),y(e,n,o),M(n,o),k(n,o).then(function(){A(n,o),a(),d()})}function v(e,n,o){function d(){t.element(l[0].body).removeClass("md-dialog-is-showing"),o.contentElement?(o.reverseContainerStretch(),o.restoreContentElement()):n.remove(),o.$destroy||o.origin.focus()}return o.deactivateListeners(),o.unlockScreenReader(),o.hideBackdrop(o.$destroy),r&&r.parentNode&&r.parentNode.removeChild(r),a&&a.parentNode&&a.parentNode.removeChild(a),o.$destroy?d():function(){return x(n,o)}().then(d)}function E(e){if(!e.theme&&(e.theme=h.defaultTheme(),e.targetEvent&&e.targetEvent.target)){var n=t.element(e.targetEvent.target);e.theme=(n.controller("mdTheme")||{}).$mdTheme||e.theme}}function $(e){function n(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}var o=e.contentElement,i=null;return t.isString(o)?(o=document.querySelector(o),i=n(o)):(o=o[0]||o,i=document.contains(o)?n(o):function(){o.parentNode.removeChild(o)}),e.element=t.element(o),e.skipCompile=!0,i}function C(e){function o(e,o){var i=t.element(e||{});if(i&&i.length){var r={top:0,left:0,height:0,width:0},a=t.isFunction(i[0].getBoundingClientRect);return t.extend(o||{},{element:a?i:n,bounds:a?i[0].getBoundingClientRect():t.extend({},r,i[0]),focus:t.bind(i,i.focus)})}}function i(e,n){return t.isString(e)&&(e=l[0].querySelector(e)),t.element(e||n)}e.origin=t.extend({element:null,bounds:null,focus:t.noop},e.origin||{}),e.parent=i(e.parent,m),e.closeTo=o(i(e.closeTo)),e.openFrom=o(i(e.openFrom)),e.targetEvent&&(e.origin=o(e.targetEvent.target,e.origin))}function M(n,o){var r=t.element(c),a=i.debounce(function(){w(n,o)},60),s=[],l=function(){var t="alert"==o.$type?e.hide:e.cancel;i.nextTick(t,!0)};if(o.escapeToClose){var m=o.parent,u=function(e){e.keyCode===d.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),l())};n.on("keydown",u),m.on("keydown",u),s.push(function(){n.off("keydown",u),m.off("keydown",u)})}if(r.on("resize",a),s.push(function(){r.off("resize",a)}),o.clickOutsideToClose){var p,h=n,f=function(e){p=e.target},g=function(e){p===h[0]&&e.target===h[0]&&(e.stopPropagation(),e.preventDefault(),l())};h.on("mousedown",f),h.on("mouseup",g),s.push(function(){h.off("mousedown",f),h.off("mouseup",g)})}o.deactivateListeners=function(){s.forEach(function(e){e()}),o.deactivateListeners=null}}function y(e,t,n){n.disableParentScroll&&(n.restoreScroll=i.disableScrollAround(t,n.parent)),n.hasBackdrop&&(n.backdrop=i.createBackdrop(e,"md-dialog-backdrop md-opaque"),s.enter(n.backdrop,n.parent)),n.hideBackdrop=function(e){n.backdrop&&(e?n.backdrop.remove():s.leave(n.backdrop)),n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),n.hideBackdrop=null}}function T(e,t){var n="alert"===t.$type?"alertdialog":"dialog",d=e.find("md-dialog-content"),s=e.attr("id"),l="dialogContent_"+(s||i.nextUid());e.attr({role:n,tabIndex:"-1"}),0===d.length&&(d=e,s&&(l=s)),d.attr("id",l),e.attr("aria-describedby",l),t.ariaLabel?o.expect(e,"aria-label",t.ariaLabel):o.expectAsync(e,"aria-label",function(){var e=d.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),r=document.createElement("div"),r.classList.add("md-dialog-focus-trap"),r.tabIndex=0,a=r.cloneNode(!1);var c=function(){e.focus()};r.addEventListener("focus",c),a.addEventListener("focus",c),e[0].parentNode.insertBefore(r,e[0]),e.after(a)}function A(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,i=0;i'+function(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?""+(e||"")+"":e||""}(e)+""}}}o.$inject=["$mdDialog","$mdConstant"],i.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming"];var r,a;return e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","contentElement"],options:i}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:o}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:o}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:o})}e.$inject=["$$rAF","$mdTheming","$mdDialog"],o.$inject=["$$interimElementProvider"],t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",o)}(),function(){function e(e){return{restrict:"E",link:e}}e.$inject=["$mdTheming"],t.module("material.components.divider",["material.core"]).directive("mdDivider",e)}(),function(){!function(){function e(e){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(t,n){var o=t.children();e.prefixer().hasAttribute(o,"ng-repeat")?o.addClass("md-fab-action-item"):o.wrap('
')}}}e.$inject=["$mdUtil"],t.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}()}(),function(){!function(){function e(e,n,o,i,r,a){function l(e){"click"==e.type&&k(e),"focusout"!=e.type||D||(D=a(function(){S.close()},100,!1)),"focusin"==e.type&&D&&(a.cancel(D),D=null)}function c(){S.currentActionIndex=-1}function u(){n[0].scrollHeight>0?o.addClass(n,"_md-animations-ready").then(function(){n.removeClass("md-animations-waiting")}):N<10&&(a(u,100),N+=1)}function p(){n.on("keydown",g),i.nextTick(function(){t.element(document).on("click touchend",f)})}function h(){n.off("keydown",g),t.element(document).off("click touchend",f)}function f(e){if(e.target){var t=i.getClosest(e.target,"md-fab-trigger"),n=i.getClosest(e.target,"md-fab-actions");t||n||S.close()}}function g(e){switch(e.which){case r.KEY_CODE.ESCAPE:return S.close(),e.preventDefault(),!1;case r.KEY_CODE.LEFT_ARROW:return C(e),!1;case r.KEY_CODE.UP_ARROW:return M(e),!1;case r.KEY_CODE.RIGHT_ARROW:return y(e),!1;case r.KEY_CODE.DOWN_ARROW:return T(e),!1}}function b(e){E(e,-1)}function v(e){E(e,1)}function E(e,n){var o=$();S.currentActionIndex=S.currentActionIndex+n,S.currentActionIndex=Math.min(o.length-1,S.currentActionIndex),S.currentActionIndex=Math.max(0,S.currentActionIndex);var i=t.element(o[S.currentActionIndex]).children()[0];t.element(i).attr("tabindex",0),i.focus(),e.preventDefault(),e.stopImmediatePropagation()}function $(){var e=_()[0].querySelectorAll(".md-fab-action-item");return t.forEach(e,function(e){t.element(t.element(e).children()[0]).attr("tabindex",-1)}),e}function C(e){"left"===S.direction?v(e):b(e)}function M(e){"down"===S.direction?b(e):v(e)}function y(e){"left"===S.direction?b(e):v(e)}function T(e){"up"===S.direction?b(e):v(e)}function A(e){return i.getClosest(e,"md-fab-trigger")}function w(e){return i.getClosest(e,"md-fab-actions")}function k(e){A(e.target)&&S.toggle(),w(e.target)&&S.close()}function x(){return n.find("md-fab-trigger")}function _(){return n.find("md-fab-actions")}var S=this;S.open=function(){e.$evalAsync("vm.isOpen = true")},S.close=function(){e.$evalAsync("vm.isOpen = false"),n.find("md-fab-trigger")[0].focus()},S.toggle=function(){e.$evalAsync("vm.isOpen = !vm.isOpen")},function(){S.direction=S.direction||"down",S.isOpen=S.isOpen||!1,c(),n.addClass("md-animations-waiting")}(),function(){var o=["click","focusin","focusout"];t.forEach(o,function(e){n.on(e,l)}),e.$on("$destroy",function(){t.forEach(o,function(e){n.off(e,l)}),h()})}(),function(){e.$watch("vm.direction",function(e,t){o.removeClass(n,"md-"+t),o.addClass(n,"md-"+e),c()});var t,i;e.$watch("vm.isOpen",function(e){c(),t&&i||(t=x(),i=_()),e?p():h();var r=e?"md-is-open":"",a=e?"":"md-is-open";t.attr("aria-haspopup",!0),t.attr("aria-expanded",e),i.attr("aria-hidden",!e),o.setClass(n,r,a)})}();var N=0;u();var D}e.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],t.module("material.components.fabShared",["material.core"]).controller("MdFabController",e)}()}(),function(){!function(){function n(){function e(e,t){t.prepend('
')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:e}}function o(n){function o(e){n(e,r,!1)}function i(n){if(!n.hasClass("md-animations-waiting")||n.hasClass("_md-animations-ready")){var o=n[0],i=n.controller("mdFabSpeedDial"),r=o.querySelectorAll(".md-fab-action-item"),a=o.querySelector("md-fab-trigger"),d=o.querySelector("._md-css-variables"),s=parseInt(e.getComputedStyle(d).zIndex);t.forEach(r,function(e,t){var n=e.style;n.transform=n.webkitTransform="",n.transitionDelay="",n.opacity=1,n.zIndex=r.length-t+s}),a.style.zIndex=s+r.length+1,i.isOpen||t.forEach(r,function(e,t){var n,o,r=e.style,d=(a.clientHeight-e.clientHeight)/2,s=(a.clientWidth-e.clientWidth)/2;switch(i.direction){case"up":n=e.scrollHeight*(t+1)+d,o="Y";break;case"down":n=-(e.scrollHeight*(t+1)+d),o="Y";break;case"left":n=e.scrollWidth*(t+1)+s,o="X";break;case"right":n=-(e.scrollWidth*(t+1)+s),o="X"}var l="translate"+o+"("+n+"px)";r.transform=r.webkitTransform=l})}}return{addClass:function(e,t,n){e.hasClass("md-fling")?(i(e),o(n)):n()},removeClass:function(e,t,n){i(e),o(n)}}}function i(n){function o(e){n(e,r,!1)}function i(n){var o=n[0],i=n.controller("mdFabSpeedDial"),r=o.querySelectorAll(".md-fab-action-item"),d=o.querySelector("._md-css-variables"),s=parseInt(e.getComputedStyle(d).zIndex);t.forEach(r,function(e,t){var n=e.style,o=t*a;n.opacity=i.isOpen?1:0,n.transform=n.webkitTransform=i.isOpen?"scale(1)":"scale(0)",n.transitionDelay=(i.isOpen?o:r.length-o)+"ms",n.zIndex=r.length-t+s})}var a=65;return{addClass:function(e,t,n){i(e),o(n)},removeClass:function(e,t,n){i(e),o(n)}}}o.$inject=["$timeout"],i.$inject=["$timeout"];var r=300;t.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",n).animation(".md-fling",o).animation(".md-scale",i).service("mdFabSpeedDialFlingAnimation",o).service("mdFabSpeedDialScaleAnimation",i)}()}(),function(){!function(){function n(){function e(e,t,n){t.addClass("md-fab-toolbar"),t.find("md-fab-trigger").find("button").prepend('
')}return{restrict:"E",transclude:!0,template:'
',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:e}}function o(){function n(n,o,i){if(o){var r=n[0],a=n.controller("mdFabToolbar"),d=r.querySelector(".md-fab-toolbar-background"),s=r.querySelector("md-fab-trigger button"),l=r.querySelector("md-toolbar"),c=r.querySelector("md-fab-trigger button md-icon"),m=n.find("md-fab-actions").children();if(s&&d){var u=e.getComputedStyle(s).getPropertyValue("background-color"),p=r.offsetWidth,h=(r.offsetHeight,p/s.offsetWidth*2);d.style.backgroundColor=u,d.style.borderRadius=p+"px",a.isOpen?(l.style.pointerEvents="inherit",d.style.width=s.offsetWidth+"px",d.style.height=s.offsetHeight+"px",d.style.transform="scale("+h+")",d.style.transitionDelay="0ms",c&&(c.style.transitionDelay=".3s"),t.forEach(m,function(e,t){e.style.transitionDelay=25*(m.length-t)+"ms"})):(l.style.pointerEvents="none",d.style.transform="scale(1)",d.style.top="0",n.hasClass("md-right")&&(d.style.left="0",d.style.right=null),n.hasClass("md-left")&&(d.style.right="0",d.style.left=null),d.style.transitionDelay="200ms",c&&(c.style.transitionDelay="0ms"),t.forEach(m,function(e,t){e.style.transitionDelay=200+25*t+"ms"}))}}}return{addClass:function(e,t,o){n(e,t,o),o()},removeClass:function(e,t,o){n(e,t,o),o()}}}t.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",n).animation(".md-fab-toolbar",o).service("mdFabToolbarAnimation",o)}()}(),function(){function e(e,o,i,r){function a(n,a,d,s){function c(){s.layoutDelegate=t.noop,T();for(var e in o.MEDIA)r.getQuery(o.MEDIA[e]).removeListener(y)}function m(e){null==e?s.invalidateLayout():r(e)&&s.invalidateLayout()}function u(e){var o=g(),r={tileSpans:b(o),colCount:v(),rowMode:C(),rowHeight:$(),gutter:E()};if(e||!t.equals(r,A)){var d=i(r.colCount,r.tileSpans,o).map(function(e,n){return{grid:{element:a,style:f(r.colCount,n,r.gutter,r.rowMode,r.rowHeight)},tiles:e.map(function(e,i){return{element:t.element(o[i]),style:h(e.position,e.spans,r.colCount,n,r.gutter,r.rowMode,r.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:d}}),A=r}}function p(e){return w+e+k}function h(e,t,n,o,i,r,a){var d=1/n*100,s=(n-1)/n,l=x({share:d,gutterShare:s,gutter:i}),c={left:_({unit:l,offset:e.col,gutter:i}),width:S({unit:l,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""};switch(r){case"fixed":c.top=_({unit:a,offset:e.row,gutter:i}),c.height=S({unit:a,span:t.row,gutter:i});break;case"ratio":var m=d/a,u=x({share:m,gutterShare:s,gutter:i});c.paddingTop=S({unit:u,span:t.row,gutter:i}),c.marginTop=_({unit:u,offset:e.row,gutter:i});break;case"fit":var p=(o-1)/o,m=1/o*100,u=x({share:m,gutterShare:p,gutter:i});c.top=_({unit:u,offset:e.row,gutter:i}),c.height=S({unit:u,span:t.row,gutter:i})}return c}function f(e,t,n,o,i){var r={};switch(o){case"fixed":r.height=S({unit:i,span:t,gutter:n}),r.paddingBottom="";break;case"ratio":var a=1===e?0:(e-1)/e,d=1/e*100,s=d*(1/i),l=x({share:s,gutterShare:a,gutter:n});r.height="",r.paddingBottom=S({unit:l,span:t,gutter:n})}return r}function g(){return[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName&&!e.$$mdDestroyed})}function b(e){return[].map.call(e,function(e){var n=t.element(e).controller("mdGridTile");return{row:parseInt(r.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(r.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}function v(){var e=parseInt(r.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}function E(){return M(r.getResponsiveAttribute(d,"md-gutter")||1)}function $(){var e=r.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";switch(C()){case"fixed":return M(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}function C(){var e=r.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function M(e){return/\D$/.test(e)?e:e+"px"}a.addClass("_md"),a.attr("role","list"),s.layoutDelegate=u;var y=t.bind(s,s.invalidateLayout),T=function(){for(var e in o.MEDIA)r(e),r.getQuery(o.MEDIA[e]).addListener(y);return r.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],d,m)}();n.$on("$destroy",c);var A,w=e.startSymbol(),k=e.endSymbol(),x=e(p("share")+"% - ("+p("gutter")+" * "+p("gutterShare")+")"),_=e("calc(("+p("unit")+" + "+p("gutter")+") * "+p("offset")+")"),S=e("calc(("+p("unit")+") * "+p("span")+" + ("+p("span")+" - 1) * "+p("gutter")+")")}return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:a}}function n(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=t.noop}function o(e){function n(t,n){var o,a,d,s,l,c;return s=e.time(function(){a=i(t,n)}),o={layoutInfo:function(){return a},map:function(t){return l=e.time(function(){var e=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){return c=e.time(function(){(t||r)(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:s,mapTime:l,reflowTime:c,totalTime:s+l+c}}}}function o(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}function i(e,t){function n(t,n){if(t.col>e)throw"md-grid-list: Tile at position "+n+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";for(var a=0,c=0;c-a=e?o():(a=l.indexOf(0,d),-1!==a&&-1!==(c=r(a+1))?d=c+1:(a=c=0,o()));return i(a,t.col,t.row),d=a+t.col,{col:a,row:s}}function o(){d=0,s++,i(0,e,-1)}function i(e,t,n){for(var o=e;o",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:n}}function r(){return{template:"
",transclude:!0}}n.$inject=["$mdUtil"],o.$inject=["$mdUtil"],e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],i.$inject=["$mdMedia"],t.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",i).directive("mdGridTileFooter",r).directive("mdGridTileHeader",r).factory("$mdGridLayout",o),n.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(t.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}}}(),function(){t.module("material.components.icon",["material.core"])}(),function(){function n(e,t){function n(t){var n=t[0].querySelector(r),o=t[0].querySelector(a);return n&&t.addClass("md-icon-left"),o&&t.addClass("md-icon-right"),function(t,n){e(n)}}function o(e,n,o,i){var r=this;r.isErrorGetter=o.mdIsError&&t(o.mdIsError),r.delegateClick=function(){r.input.focus()},r.element=n,r.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},r.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},r.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},r.setInvalid=function(e){e?i.addClass(n,"md-input-invalid"):i.removeClass(n,"md-input-invalid")},e.$watch(function(){return r.label&&r.input},function(e){e&&!r.label.attr("for")&&r.label.attr("for",r.input.attr("id"))})}o.$inject=["$scope","$element","$attrs","$animate"];var i=["INPUT","TEXTAREA","SELECT","MD-SELECT"],r=i.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),a=i.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:n,controller:o}}function o(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,o){!o||n.mdNoFloat||t.hasClass("md-container-ignore")||(o.label=t,e.$on("$destroy",function(){o.label=null}))}}}function i(e,n,o,i,r){function a(a,d,s,l){function c(e){return h.setHasValue(!g.$isEmpty(e)),e}function u(){h.setHasValue(d.val().length>0||(d[0].validity||{}).badInput)}var h=l[0],f=!!l[1],g=l[1]||e.fakeNgModel(),b=l[2],v=t.isDefined(s.readonly),E=e.parseAttributeBoolean(s.mdNoAsterisk),$=d[0].tagName.toLowerCase();if(h){if("hidden"===s.type)return void d.attr("aria-hidden","true");if(h.input){if(h.input[0].contains(d[0]))return;throw new Error(" can only have *one* ,
This field is required
'),t.put("app/directives/header-item/header-item.html",''),t.put("app/directives/header-item/header-view.html","
")}]),function(t,e,i){var n=t.L,o={},tileCount=0;o.version="0.7.1","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;it;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints&&!t.PointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled&&t.navigator.maxTouchPoints||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&function(){var t="ontouchstart";if(m||t in g)return!0;var i=e.createElement("div"),n=!1;return!!i.setAttribute&&(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n)}();o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;ni||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return!!t&&(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t) ;return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){return this.projection.project(t).multiplyBy(6378137)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n)),a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return s=e&&e.maxZoom?Math.min(e.maxZoom,s):s,this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do{s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(o.latLng(t))._round()._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("viewreset",{hard:!i}),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),p=15,_=.1;Math.abs(_)>1e-7&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||in;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(it.max.x||nt.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return this._map.options.crs.getSize(this._map.getZoom()).divideBy(this.options.tileSize)},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.alt="Map Tile "+tileCount++,t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;i.width=i.height=e.detectRetina&&o.Browser.retina?2*n:n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;is?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)(r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0))>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)(i=h.clipSegment(n[t],n[t+1],r,t))&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){return o.Polyline.prototype._getPathPartStr.call(this,t)+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+ei;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i), new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,i){var n=e.body,s=e.documentElement,a=o.DomUtil.documentIsLtr()?t.pageX?t.pageX-n.scrollLeft-s.scrollLeft:t.clientX:o.Browser.gecko?t.pageX-n.scrollLeft-s.scrollLeft:t.pageX?t.pageX-n.scrollLeft+s.scrollLeft:t.clientX,r=t.pageY?t.pageY-n.scrollTop-s.scrollTop:t.clientY,h=new o.Point(a,r);if(!i)return h;var l=i.getBoundingClientRect(),u=l.left-i.clientLeft,c=l.top-i.clientTop;return h._subtract(new o.Point(u,c))},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(!(e=i.arguments[0])||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&1e3>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(o.DomEvent.stopPropagation(t),o.Draggable._disabled||(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),this._moving)))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),o.DomUtil.addClass(t.target||t.srcElement,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(t){o.DomUtil.removeClass(e.body,"leaflet-dragging"),o.DomUtil.removeClass(t.target||t.srcElement,"leaflet-drag-target");for(var i in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[i],this._onMove).off(e,o.Draggable.END[i],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],s[a]="function"==typeof n?n.bind(h):n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var r=this._pointers,h=function(t){o.DomEvent.preventDefault(t);for(var e=!1,i=0;i1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!(!t.shiftKey||1!==t.which&&1!==t.button)&&(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition();return t._controlCorners[e].removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange).off("layerremove",this._onLayerChange)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0), this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(!(n=a[o.DomUtil.TRANSFORM].match(this._transformRe)))return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&!0!==n){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));if(this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return!(!0!==i.animate&&!this.getSize().contains(o))&&(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0)},_animateZoom:function(t,e,i,n,s,a){this._animatingZoom=!0,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a})},_onZoomTransitionEnd:function(){this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document),function(t,e,i){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:8,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[];var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this;if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this._topClusterLevel._recalculateBounds();var n=t,s=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=s;)n=n.__parent;return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.removeLayers(e)}return t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this._topClusterLevel._recalculateBounds(),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push(t),this):(this._nonPointGroup.removeLayer(t),this)},addLayers:function(t){var e,i,n,s,r=this._featureGroup,o=this._nonPointGroup,a=this.options.chunkedLoading,h=this.options.chunkInterval,u=this.options.chunkProgress;if(this._map){var _=0,l=(new Date).getTime(),d=L.bind(function(){for(var e=(new Date).getTime();_h)break}if(s=t[_],s.getLatLng){if(!this.hasLayer(s)&&(this._addLayer(s,this._maxZoom),s.__parent&&2===s.__parent.getChildCount())){var n=s.__parent.getAllChildMarkers(),c=n[0]===s?n[1]:n[0];r.removeLayer(c)}}else o.addLayer(s)}u&&u(_,t.length,(new Date).getTime()-l),_===t.length?(this._topClusterLevel._recalculateBounds(),this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else{for(e=[],i=0,n=t.length;n>i;i++)s=t[i],s.getLatLng?this.hasLayer(s)||e.push(s):o.addLayer(s);this._needsClustering=this._needsClustering.concat(e)}return this},removeLayers:function(t){var e,i,n,s=this._featureGroup,r=this._nonPointGroup;if(!this._map){for(e=0,i=t.length;i>e;e++)n=t[e],this._arraySplice(this._needsClustering,n),r.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push(n);return this}if(this._unspiderfy)for(this._unspiderfy(),e=0,i=t.length;i>e;e++)n=t[e],this._unspiderfyLayer(n);for(e=0,i=t.length;i>e;e++)n=t[e],n.__parent?(this._removeLayer(n,!0,!0),s.hasLayer(n)&&(s.removeLayer(n),n.clusterShow&&n.clusterShow())):r.removeLayer(n);return this._topClusterLevel._recalculateBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),s.eachLayer(function(t){t instanceof L.MarkerCluster&&t._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i]);this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e]===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};if(t._icon&&this._map.getBounds().contains(t.getLatLng()))e();else if(t.__parent._zoome;e++)n=this._needsRemoving[e],this._removeLayer(n,!0);this._needsRemoving=[],this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.onRemove(t),this._nonPointGroup.onRemove(t),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered;e>=0&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,r=this._featureGroup,o=this._map;e&&this._removeFromGridUnclustered(t,this._maxZoom);var a,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<0));)e&&h._childCount<=1?(a=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,o.project(h._cLatLng,h._zoom)),s[h._zoom].addObject(a,o.project(a.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(a),a.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(a))):i&&h._icon||h._updateIcon(),h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},_propagateEvent:function(t){if(t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;t.type="cluster"+t.type}this.fire(t.type,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"
"+e+"
",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount?this.options.spiderfyOnMaxZoom&&e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius,i=e;"function"!=typeof e&&(i=function(){return e}),this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var n=t;n>=0;n--)this._gridClusters[n]=new L.DistanceGrid(i(n)),this._gridUnclustered[n]=new L.DistanceGrid(i(n));this._topClusterLevel=new this._markerCluster(this,-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,r=this._gridUnclustered;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t);e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=s[e].getNearObject(i);if(o)return o._addChild(t),void(t.__parent=o);if(o=r[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var h=new this._markerCluster(this,e,o,t);s[e].addObject(h,this._map.project(h._cLatLng,e)),o.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>a._zoom;n--)u=new this._markerCluster(this,n,u),s[n].addObject(u,this._map.project(o.getLatLng(),n));return a._addChild(u),void this._removeFromGridUnclustered(o,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;tthis._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return e!==i&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}}),L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),s=this._featureGroup;this._topClusterLevel._recursively(n,t,0,function(r){var o,a=r._latlng,h=r._markers;for(n.contains(a)||(a=null),r._isSingleParent()&&t+1===e?(s.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,e,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||s.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),s.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._enqueue(function(){this._topClusterLevel._recursively(n,t,0,function(t){s.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];r.setLatLng(r.getLatLng()),r.clusterShow&&r.clusterShow()}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var t,e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),s=this._zoom+1,r=i.getZoom();e.length>0&&n>s;){s++;var o=[];for(t=0;ts?this._group._map.setView(this._latlng,s):r>=n?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,s=this._markers,r=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),t=0;t=0;i--)n=s[i],n._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,s=t._childClusters;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.clusterShow(),n._recursivelyRemoveChildrenFromMap(t,e)):n.clusterHide(),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var s=n._markers.length-1;s>=0;s--){var r=n._markers[s];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,s;this._recursively(t,-1,e-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n), n.clusterShow&&n.clusterShow())})},_recursively:function(t,e,i,n,s){var r,o,a=this._childClusters,h=this._zoom;if(e>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s);else if(n&&n(this),s&&this._zoom===i&&s(this),i>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var t=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,t}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,r=s[n]=s[n]||{},o=r[i]=r[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},h=a[s]=a[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;n>i;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[s],!0},eachObject:function(t,e){var i,n,s,r,o,a,u=this._grid;for(i in u){o=u[i];for(n in o)for(a=o[n],s=0,r=a.length;r>s;s++)t.call(e,a[s])&&(s--,r--)}},getNearObject:function(t){var e,i,n,s,r,o,a,h,u=this._getCoord(t.x),_=this._getCoord(t.y),l=this._objectPoint,d=this._sqCellSize,c=null;for(e=_-1;_+1>=e;e++)if(s=this._grid[e])for(i=u-1;u+1>=i;i++)if(r=s[i])for(n=0,o=r.length;o>n;n++)a=r[n],h=this._sqDist(l[L.Util.stamp(a)],t),d>h&&(d=h,c=a);return c},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,r=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],(s=this.getDistant(n,t))>0&&(a.push(n),s>r&&(r=s,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,s=!1,r=!1,o=null,a=null,h=null,u=null,_=null,l=null;for(e=t.length-1;e>=0;e--){var d=t[e];(!1===i||d.lat>i)&&(o=d,i=d.lat),(!1===n||d.lats)&&(h=d,s=d.lng),(!1===r||d.lng=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,s=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,s):(s.y+=10,t=this._generatePointsCircle(e.length,s)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=s/this._2PI,o=this._2PI/t,a=[];for(a.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,s=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=t,i=t-1;i>=0;i--)a+=r/s+5e-4*i,h[i]=new L.Point(e.x+s*Math.cos(a),e.y+s*Math.sin(a))._round(),s+=o/a;return h},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,s,r,o=this._group,a=o._map,h=o._featureGroup,u=this._group.options.spiderLegPolylineOptions;for(i=0;i=0;n--)h=l.layerPointToLatLng(e[n]),s=t[n],s._preSpiderfyLatlng=s._latlng,s.setLatLng(h),s.clusterShow&&s.clusterShow(),f&&(r=s._spiderLeg,o=r._path,o.style.strokeDashoffset=0,r.setStyle({opacity:g}));this.setOpacity(.3),setTimeout(function(){_._animationEnd(),_.fire("spiderfied",{cluster:u,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,s,r,o,a=this,h=this._group,u=h._map,_=h._featureGroup,l=t?u._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):u.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(),c=L.Path.SVG;for(h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)e=d[i],e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,o=!0,e._setPos&&(e._setPos(l),o=!1),e.clusterHide&&(e.clusterHide(),o=!1),o&&_.removeLayer(e),c&&(n=e._spiderLeg,s=n._path,r=s.getTotalLength()+.1,s.style.strokeDashoffset=r,n.setStyle({opacity:0})));setTimeout(function(){var t=0;for(i=d.length-1;i>=0;i--)e=d[i],e._spiderLeg&&t++;for(i=d.length-1;i>=0;i--)e=d[i],e._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&_.removeLayer(e),u.removeLayer(e._spiderLeg),delete e._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}})}(window,document),function(angular){"use strict";!function(angular){angular.module("leaflet-directive",[]).directive("leaflet",["$q","leafletData","leafletMapDefaults","leafletHelpers","leafletMapEvents",function(a,b,c,d,e){return{restrict:"EA",replace:!0,scope:{center:"=",lfCenter:"=",defaults:"=",maxbounds:"=",bounds:"=",markers:"=",legend:"=",geojson:"=",paths:"=",tiles:"=",layers:"=",controls:"=",decorations:"=",eventBroadcast:"=",markersWatchOptions:"=",geojsonWatchOptions:"="},transclude:!0,template:'
',controller:["$scope",function(b){this._leafletMap=a.defer(),this.getMap=function(){return this._leafletMap.promise},this.getLeafletScope=function(){return b}}],link:function(a,f,g,h){function i(){isNaN(g.width)?f.css("width",g.width):f.css("width",g.width+"px")}function j(){isNaN(g.height)?f.css("height",g.height):f.css("height",g.height+"px")}var k=d.isDefined,l=c.setDefaults(a.defaults,g.id),m=e.getAvailableMapEvents(),n=e.addEvents;a.mapId=g.id,b.setDirectiveControls({},g.id),k(g.width)&&(i(),a.$watch(function(){return f[0].getAttribute("width")},function(){i(),o.invalidateSize()})),k(g.height)&&(j(),a.$watch(function(){return f[0].getAttribute("height")},function(){j(),o.invalidateSize()}));var o=new L.Map(f[0],c.getMapCreationDefaults(g.id));if(h._leafletMap.resolve(o),k(g.center)||k(g.lfCenter)||o.setView([l.center.lat,l.center.lng],l.center.zoom),!k(g.tiles)&&!k(g.layers)){var p=L.tileLayer(l.tileLayer,l.tileLayerOptions);p.addTo(o),b.setTiles(p,g.id)}if(k(o.zoomControl)&&k(l.zoomControlPosition)&&o.zoomControl.setPosition(l.zoomControlPosition),k(o.zoomControl)&&!1===l.zoomControl&&o.zoomControl.removeFrom(o),k(o.zoomsliderControl)&&k(l.zoomsliderControl)&&!1===l.zoomsliderControl&&o.zoomsliderControl.removeFrom(o),!k(g.eventBroadcast)){n(o,m,"eventName",a,"broadcast")}o.whenReady(function(){b.setMap(o,g.id)}),a.$on("$destroy",function(){c.reset(),o.remove(),b.unresolveMap(g.id)}),a.$on("invalidateSize",function(){o.invalidateSize()})}}}]),angular.module("leaflet-directive").factory("leafletBoundsHelpers",["$log","leafletHelpers",function(a,b){function c(a){return angular.isDefined(a)&&angular.isDefined(a.southWest)&&angular.isDefined(a.northEast)&&angular.isNumber(a.southWest.lat)&&angular.isNumber(a.southWest.lng)&&angular.isNumber(a.northEast.lat)&&angular.isNumber(a.northEast.lng)}var d=b.isArray,e=b.isNumber,f=b.isFunction,g=b.isDefined;return{createLeafletBounds:function(a){return c(a)?L.latLngBounds([a.southWest.lat,a.southWest.lng],[a.northEast.lat,a.northEast.lng]):void 0},isValidBounds:c,createBoundsFromArray:function(b){return d(b)&&2===b.length&&d(b[0])&&d(b[1])&&2===b[0].length&&2===b[1].length&&e(b[0][0])&&e(b[0][1])&&e(b[1][0])&&e(b[1][1])?{northEast:{lat:b[0][0],lng:b[0][1]},southWest:{lat:b[1][0],lng:b[1][1]}}:void a.error("[AngularJS - Leaflet] The bounds array is not valid.")},createBoundsFromLeaflet:function(b){if(!(g(b)&&f(b.getNorthEast)&&f(b.getSouthWest)))return void a.error("[AngularJS - Leaflet] The leaflet bounds is not valid object.");var c=b.getNorthEast(),d=b.getSouthWest();return{northEast:{lat:c.lat,lng:c.lng},southWest:{lat:d.lat,lng:d.lng}}}}}]),angular.module("leaflet-directive").factory("leafletControlHelpers",["$rootScope","$log","leafletHelpers","leafletLayerHelpers","leafletMapDefaults",function(a,b,c,d,e){var f=c.isDefined,g=c.isObject,h=d.createLayer,i={},j=c.errorHeader+" [Controls] ",k=function(a,b,c){if(!e.getDefaults(c).controls.layers.visible)return!1;var h=!1;return g(a)&&Object.keys(a).forEach(function(b){var c=a[b];f(c.layerOptions)&&!1===c.layerOptions.showOnSelector||(h=!0)}),g(b)&&Object.keys(b).forEach(function(a){var c=b[a];f(c.layerParams)&&!1===c.layerParams.showOnSelector||(h=!0)}),h},l=function(a){var b=e.getDefaults(a),c={collapsed:b.controls.layers.collapsed,position:b.controls.layers.position,autoZIndex:!1};angular.extend(c,b.controls.layers.options);return b.controls.layers&&f(b.controls.layers.control)?b.controls.layers.control.apply(this,[[],[],c]):new L.control.layers([],[],c)},m={draw:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Draw)||(b.error(j+" Draw plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Draw(a)}},scale:{isPluginLoaded:function(){return!0},checkValidParams:function(){return!0},createControl:function(a){return new L.control.scale(a)}},fullscreen:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Fullscreen)||(b.error(j+" Fullscreen plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Fullscreen(a)}},search:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Search)||(b.error(j+" Search plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Search(a)}},custom:{},minimap:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.MiniMap)||(b.error(j+" Minimap plugin is not loaded."),!1)},checkValidParams:function(a){return!!f(a.layer)||(b.warn(j+' minimap "layer" option should be defined.'),!1)},createControl:function(a){var c=h(a.layer);return f(c)?new L.Control.MiniMap(c,a):void b.warn(j+' minimap control "layer" could not be created.')}}};return{layersControlMustBeVisible:k,isValidControlType:function(a){return-1!==Object.keys(m).indexOf(a)},createControl:function(a,b){return m[a].checkValidParams(b)?m[a].createControl(b):void 0},updateLayersControl:function(a,b,c,d,e,g){var h,j=i[b],m=k(d,e,b);if(f(j)&&c){for(h in g.baselayers)j.removeLayer(g.baselayers[h]);for(h in g.overlays)j.removeLayer(g.overlays[h]);a.removeControl(j),delete i[b]}if(m){j=l(b),i[b]=j;for(h in d){!(f(d[h].layerOptions)&&!1===d[h].layerOptions.showOnSelector)&&f(g.baselayers[h])&&j.addBaseLayer(g.baselayers[h],d[h].name)}for(h in e){!(f(e[h].layerParams)&&!1===e[h].layerParams.showOnSelector)&&f(g.overlays[h])&&j.addOverlay(g.overlays[h],e[h].name)}a.addControl(j)}return m}}}]),angular.module("leaflet-directive").service("leafletData",["$log","$q","leafletHelpers",function(a,b,c){var d=c.getDefer,e=c.getUnresolvedDefer,f=c.setResolvedDefer,g={},h=this,i=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},j=["map","tiles","layers","paths","markers","geoJSON","UTFGrid","decorations","directiveControls"];j.forEach(function(a){g[a]={}}),this.unresolveMap=function(a){var b=c.obtainEffectiveMapId(g.map,a);j.forEach(function(a){g[a][b]=void 0})},j.forEach(function(a){var b=i(a);h["set"+b]=function(b,c){e(g[a],c).resolve(b),f(g[a],c)},h["get"+b]=function(b){return d(g[a],b).promise}})}]),angular.module("leaflet-directive").service("leafletDirectiveControlsHelpers",["$log","leafletData","leafletHelpers",function(a,b,c){var d=c.isDefined,e=c.isString,f=c.isObject,g=c.errorHeader,h=g+"[leafletDirectiveControlsHelpers";return{extend:function(c,g,i,j){var k=h+".extend] ",l={};if(!d(g))return void a.error(k+"thingToAddName cannot be undefined");if(e(g)&&d(i)&&d(j))l[g]={create:i,clean:j};else{if(!f(g)||d(i)||d(j))return void a.error(k+"incorrect arguments");l=g}b.getDirectiveControls().then(function(a){angular.extend(a,l),b.setDirectiveControls(a,c)})}}}]),angular.module("leaflet-directive").service("leafletGeoJsonHelpers",["leafletHelpers","leafletIterators",function(a,b){var c=a,d=b,e=function(a,b){return this.lat=a,this.lng=b,this},f=function(a){return Array.isArray(a)&&2===a.length?a[1]:c.isDefined(a.type)&&"Point"===a.type?+a.coordinates[1]:+a.lat},g=function(a){return Array.isArray(a)&&2===a.length?a[0]:c.isDefined(a.type)&&"Point"===a.type?+a.coordinates[0]:+a.lng},h=function(a){if(c.isUndefined(a))return!1;if(c.isArray(a)){if(2===a.length&&c.isNumber(a[0])&&c.isNumber(a[1]))return!0}else if(c.isDefined(a.type)&&"Point"===a.type&&c.isArray(a.coordinates)&&2===a.coordinates.length&&c.isNumber(a.coordinates[0])&&c.isNumber(a.coordinates[1]))return!0;return d.all(["lat","lng"],function(b){return c.isDefined(a[b])&&c.isNumber(a[b])})};return{getLat:f,getLng:g,validateCoords:h,getCoords:function(a){if(a&&h(a)){var b=null;if(Array.isArray(a)&&2===a.length)b=new e(a[1],a[0]);else{if(!c.isDefined(a.type)||"Point"!==a.type)return a;b=new e(a.coordinates[1],a.coordinates[0])}return angular.extend(a,b)}}}}]),angular.module("leaflet-directive").service("leafletHelpers",["$q","$log",function(a,b){function c(a,c){var d,f;if(angular.isDefined(c))d=c;else if(0===Object.keys(a).length)d="main";else if(Object.keys(a).length>=1)for(f in a)a.hasOwnProperty(f)&&(d=f);else b.error(e+"- You have more than 1 map on the DOM, you must provide the map ID to the leafletData.getXXX call");return d}function d(b,d){var e,f=c(b,d);return angular.isDefined(b[f])&&!0!==b[f].resolvedDefer?e=b[f].defer:(e=a.defer(),b[f]={defer:e,resolvedDefer:!1}),e}var e="[AngularJS - Leaflet] ",f=angular.copy,g=f,h=function(a,b){var c;if(a&&angular.isObject(a))return null!==b&&angular.isString(b)?(c=a,b.split(".").forEach(function(a){c&&(c=c[a])}),c):b},i=function(a){return a.split(".").reduce(function(a,b){return a+'["'+b+'"]'})},j=function(a){return a.reduce(function(a,b){return a+"."+b})},k=function(a){return angular.isDefined(a)&&null!==a},l=function(a){return!k(a)},m=/([\:\-\_]+(.))/g,n=/^moz([A-Z])/,o=/^((?:x|data)[\:\-_])/i,p=function(a){return a.replace(m,function(a,b,c,d){return d?c.toUpperCase():c}).replace(n,"Moz$1")};return{camelCase:p,directiveNormalize:function(a){return p(a.replace(o,""))},copy:f,clone:g,errorHeader:e,getObjectValue:h,getObjectArrayPath:i,getObjectDotPath:j,defaultTo:function(a,b){return k(a)?a:b},isTruthy:function(a){return"true"===a||!0===a},isEmpty:function(a){return 0===Object.keys(a).length},isUndefinedOrEmpty:function(a){return angular.isUndefined(a)||null===a||0===Object.keys(a).length},isDefined:k,isUndefined:l,isNumber:angular.isNumber,isString:angular.isString,isArray:angular.isArray,isObject:angular.isObject,isFunction:angular.isFunction,equals:angular.equals,isValidCenter:function(a){return angular.isDefined(a)&&angular.isNumber(a.lat)&&angular.isNumber(a.lng)&&angular.isNumber(a.zoom)},isValidPoint:function(a){return!!angular.isDefined(a)&&(angular.isArray(a)?2===a.length&&angular.isNumber(a[0])&&angular.isNumber(a[1]):angular.isNumber(a.lat)&&angular.isNumber(a.lng))},isSameCenterOnMap:function(a,b){var c=b.getCenter(),d=b.getZoom();return!(!a.lat||!a.lng||c.lat.toFixed(4)!==a.lat.toFixed(4)||c.lng.toFixed(4)!==a.lng.toFixed(4)||d!==a.zoom)},safeApply:function(a,b){var c=a.$root.$$phase;"$apply"===c||"$digest"===c?a.$eval(b):a.$evalAsync(b)},obtainEffectiveMapId:c,getDefer:function(a,b){var f=c(a,b);return angular.isDefined(a[f])&&!1!==a[f].resolvedDefer?a[f].defer:d(a,b)},getUnresolvedDefer:d,setResolvedDefer:function(a,b){a[c(a,b)].resolvedDefer=!0},rangeIsSupported:function(){var a=document.createElement("input");return a.setAttribute("type","range"),"range"===a.type},FullScreenControlPlugin:{isLoaded:function(){return angular.isDefined(L.Control.Fullscreen)}},MiniMapControlPlugin:{isLoaded:function(){return angular.isDefined(L.Control.MiniMap)}},AwesomeMarkersPlugin:{isLoaded:function(){return angular.isDefined(L.AwesomeMarkers)&&angular.isDefined(L.AwesomeMarkers.Icon)},is:function(a){return!!this.isLoaded()&&a instanceof L.AwesomeMarkers.Icon},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},VectorMarkersPlugin:{isLoaded:function(){return angular.isDefined(L.VectorMarkers)&&angular.isDefined(L.VectorMarkers.Icon)},is:function(a){return!!this.isLoaded()&&a instanceof L.VectorMarkers.Icon},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},DomMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.DomMarkers)||!angular.isDefined(L.DomMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.DomMarkers.Icon},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},PolylineDecoratorPlugin:{isLoaded:function(){return!!angular.isDefined(L.PolylineDecorator)},is:function(a){return!!this.isLoaded()&&a instanceof L.PolylineDecorator},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},MakiMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.MakiMarkers)||!angular.isDefined(L.MakiMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.MakiMarkers.Icon},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},ExtraMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.ExtraMarkers)||!angular.isDefined(L.ExtraMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.ExtraMarkers.Icon},equal:function(a,b){return!(!this.isLoaded()||!this.is(a))&&angular.equals(a,b)}},LabelPlugin:{isLoaded:function(){return angular.isDefined(L.Label)},is:function(a){return!!this.isLoaded()&&a instanceof L.MarkerClusterGroup}},MarkerClusterPlugin:{isLoaded:function(){return angular.isDefined(L.MarkerClusterGroup)},is:function(a){return!!this.isLoaded()&&a instanceof L.MarkerClusterGroup}},GoogleLayerPlugin:{isLoaded:function(){return angular.isDefined(L.Google)},is:function(a){return!!this.isLoaded()&&a instanceof L.Google}},LeafletProviderPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.Provider)},is:function(a){return!!this.isLoaded()&&a instanceof L.TileLayer.Provider}},ChinaLayerPlugin:{isLoaded:function(){return angular.isDefined(L.tileLayer.chinaProvider)}},HeatLayerPlugin:{isLoaded:function(){return angular.isDefined(L.heatLayer)}},WebGLHeatMapLayerPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.WebGLHeatMap)}},BingLayerPlugin:{isLoaded:function(){return angular.isDefined(L.BingLayer)},is:function(a){return!!this.isLoaded()&&a instanceof L.BingLayer}},WFSLayerPlugin:{isLoaded:function(){return void 0!==L.GeoJSON.WFS},is:function(a){return!!this.isLoaded()&&a instanceof L.GeoJSON.WFS}},AGSBaseLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.basemapLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.basemapLayer}},AGSLayerPlugin:{isLoaded:function(){return void 0!==lvector&&void 0!==lvector.AGS},is:function(a){return!!this.isLoaded()&&a instanceof lvector.AGS}},AGSFeatureLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.featureLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.featureLayer}},AGSTiledMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.tiledMapLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.tiledMapLayer}},AGSDynamicMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.dynamicMapLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.dynamicMapLayer}},AGSImageMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.imageMapLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.imageMapLayer}},AGSClusteredLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.clusteredFeatureLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.clusteredFeatureLayer}},AGSHeatmapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.heatmapFeatureLayer},is:function(a){return!!this.isLoaded()&&a instanceof L.esri.heatmapFeatureLayer}},YandexLayerPlugin:{isLoaded:function(){return angular.isDefined(L.Yandex)},is:function(a){return!!this.isLoaded()&&a instanceof L.Yandex}},GeoJSONPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.GeoJSON)},is:function(a){return!!this.isLoaded()&&a instanceof L.TileLayer.GeoJSON}},UTFGridPlugin:{isLoaded:function(){return angular.isDefined(L.UtfGrid)},is:function(a){return this.isLoaded()?a instanceof L.UtfGrid:(b.error("[AngularJS - Leaflet] No UtfGrid plugin found."),!1)}},CartoDB:{isLoaded:function(){return cartodb},is:function(){return!0}},Leaflet:{DivIcon:{is:function(a){return a instanceof L.DivIcon},equal:function(a,b){return!!this.is(a)&&angular.equals(a,b)}},Icon:{is:function(a){return a instanceof L.Icon},equal:function(a,b){return!!this.is(a)&&angular.equals(a,b)}}},watchOptions:{doWatch:!0,isDeep:!0,individual:{doWatch:!0,isDeep:!0}}}}]),angular.module("leaflet-directive").service("leafletIterators",["$log","leafletHelpers",function(a,b){var c,d=b,e=b.errorHeader+"leafletIterators: ",f=Object.keys,g=d.isFunction,h=d.isObject,i=Math.pow(2,53)-1,j=function(a){var b=null!==a&&a.length;return d.isNumber(b)&&b>=0&&i>=b},k=function(a){return a},l=function(a){return function(b){return null===b?void 0:b[a]}},m=function(a,b,c){if(void 0===b)return a;switch(null===c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}};c=function(a,b){return function(c){var d=arguments.length;if(2>d||null===c)return c;for(var e=1;d>e;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;h>i;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}}(f);var p,q=function(a,b){var c=f(b),d=c.length;if(null===a)return!d;for(var e=Object(a),g=0;d>g;g++){var h=c[g];if(b[h]!==e[h]||!(h in e))return!1}return!0};p=function(a){return a=c({},a),function(b){return q(b,a)}};var s,t=function(a,b,c){return null===a?k:g(a)?m(a,b,c):h(a)?p(a):l(a)},u=null;s=u=function(a,b,c){b=t(b,c);for(var d=!j(a)&&f(a),e=(d||a).length,g=0;e>g;g++){var h=d?d[g]:g;if(!b(a[h],h,a))return!1}return!0};var v=function(b,c,f,g){return!(f||d.isDefined(b)&&d.isDefined(c))||!d.isFunction(c)&&(g=d.defaultTo(c,"cb"),a.error(e+g+" is not a function"),!0)},w=function(a,b,c){if(!v(void 0,c,!0,"internalCb")&&!v(a,b))for(var d in a)a.hasOwnProperty(d)&&c(a[d],d)},x=function(a,b){w(a,b,function(a,c){b(a,c)})};return{each:x,forEach:x,every:s,all:u}}]),angular.module("leaflet-directive").factory("leafletLayerHelpers",["$rootScope","$log","$q","leafletHelpers","leafletIterators",function($rootScope,$log,$q,leafletHelpers,leafletIterators){function isValidLayerType(a){return isString(a.type)?-1===Object.keys(layerTypes).indexOf(a.type)?($log.error("[AngularJS - Leaflet] A layer must have a valid type: "+Object.keys(layerTypes)),!1):layerTypes[a.type].mustHaveUrl&&!isString(a.url)?($log.error("[AngularJS - Leaflet] A base layer must have an url"),!1):layerTypes[a.type].mustHaveData&&!isDefined(a.data)?($log.error('[AngularJS - Leaflet] The base layer must have a "data" array attribute'),!1):layerTypes[a.type].mustHaveLayer&&!isDefined(a.layer)?($log.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have an layer defined"),!1):layerTypes[a.type].mustHaveBounds&&!isDefined(a.bounds)?($log.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have bounds defined"),!1):!(layerTypes[a.type].mustHaveKey&&!isDefined(a.key))||($log.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have key defined"),!1):($log.error("[AngularJS - Leaflet] A layer must have a valid type defined."),!1)}function createLayer(a){if(isValidLayerType(a)){if(!isString(a.name))return void $log.error("[AngularJS - Leaflet] A base layer must have a name");isObject(a.layerParams)||(a.layerParams={}),isObject(a.layerOptions)||(a.layerOptions={});for(var b in a.layerParams)a.layerOptions[b]=a.layerParams[b];var c={url:a.url,data:a.data,options:a.layerOptions,layer:a.layer,icon:a.icon,type:a.layerType,bounds:a.bounds,key:a.key,apiKey:a.apiKey,pluginOptions:a.pluginOptions,user:a.user};return layerTypes[a.type].createLayer(c)}}function safeAddLayer(a,b){b&&"function"==typeof b.addTo?b.addTo(a):a.addLayer(b)}function safeRemoveLayer(a,b,c){if(isDefined(c)&&isDefined(c.loadedDefer))if(angular.isFunction(c.loadedDefer)){var d=c.loadedDefer();$log.debug("Loaded Deferred",d);var e=d.length;if(e>0)for(var f=function(){0===--e&&a.removeLayer(b)},g=0;g'+b.error.message+"
";else if("arcgis"===c)for(var e=0;e'+f.layerName+"";for(var g=0;g
'+h.label+"
"}}else"image"===c&&(a.innerHTML='')};return{getOnAddLegend:function(b,c,d,e){return function(){var f=L.DomUtil.create("div",c);return L.Browser.touch?L.DomEvent.on(f,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(f),L.DomEvent.on(f,"mousewheel",L.DomEvent.stopPropagation)),a(f,b,d,e),f}},getOnAddArrayLegend:function(a,b){return function(){for(var c=L.DomUtil.create("div",b),d=0;d
'+a.labels[d]+"
";return L.Browser.touch?L.DomEvent.on(c,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(c),L.DomEvent.on(c,"mousewheel",L.DomEvent.stopPropagation)),c}},updateLegend:a}}),angular.module("leaflet-directive").factory("leafletMapDefaults",["$q","leafletHelpers",function(a,b){function c(){return{keyboard:!0,dragging:!0,worldCopyJump:!1,doubleClickZoom:!0,scrollWheelZoom:!0,tap:!0,touchZoom:!0,zoomControl:!0,zoomsliderControl:!1,zoomControlPosition:"topleft",attributionControl:!0,controls:{layers:{visible:!0,position:"topright",collapsed:!0}},nominatim:{server:" http://nominatim.openstreetmap.org/search"},crs:L.CRS.EPSG3857,tileLayer:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileLayerOptions:{attribution:'© OpenStreetMap contributors'},path:{weight:10,opacity:1,color:"#0000ff"},center:{lat:0,lng:0,zoom:1}}}var d=b.isDefined,e=b.isObject,f=b.obtainEffectiveMapId,g={};return{reset:function(){g={}},getDefaults:function(a){var b=f(g,a);return g[b]},getMapCreationDefaults:function(a){var b=f(g,a),c=g[b],e={maxZoom:c.maxZoom,keyboard:c.keyboard,dragging:c.dragging,zoomControl:c.zoomControl,doubleClickZoom:c.doubleClickZoom,scrollWheelZoom:c.scrollWheelZoom,tap:c.tap,touchZoom:c.touchZoom,attributionControl:c.attributionControl,worldCopyJump:c.worldCopyJump,crs:c.crs};if(d(c.minZoom)&&(e.minZoom=c.minZoom),d(c.zoomAnimation)&&(e.zoomAnimation=c.zoomAnimation),d(c.fadeAnimation)&&(e.fadeAnimation=c.fadeAnimation),d(c.markerZoomAnimation)&&(e.markerZoomAnimation=c.markerZoomAnimation),c.map)for(var h in c.map)e[h]=c.map[h];return e},setDefaults:function(a,b){var h=c();d(a)&&(h.doubleClickZoom=d(a.doubleClickZoom)?a.doubleClickZoom:h.doubleClickZoom,h.scrollWheelZoom=d(a.scrollWheelZoom)?a.scrollWheelZoom:h.doubleClickZoom,h.tap=d(a.tap)?a.tap:h.tap,h.touchZoom=d(a.touchZoom)?a.touchZoom:h.doubleClickZoom,h.zoomControl=d(a.zoomControl)?a.zoomControl:h.zoomControl,h.zoomsliderControl=d(a.zoomsliderControl)?a.zoomsliderControl:h.zoomsliderControl,h.attributionControl=d(a.attributionControl)?a.attributionControl:h.attributionControl,h.tileLayer=d(a.tileLayer)?a.tileLayer:h.tileLayer,h.zoomControlPosition=d(a.zoomControlPosition)?a.zoomControlPosition:h.zoomControlPosition,h.keyboard=d(a.keyboard)?a.keyboard:h.keyboard,h.dragging=d(a.dragging)?a.dragging:h.dragging,d(a.controls)&&angular.extend(h.controls,a.controls),e(a.crs)?h.crs=a.crs:d(L.CRS[a.crs])&&(h.crs=L.CRS[a.crs]),d(a.center)&&angular.copy(a.center,h.center),d(a.tileLayerOptions)&&angular.copy(a.tileLayerOptions,h.tileLayerOptions),d(a.maxZoom)&&(h.maxZoom=a.maxZoom),d(a.minZoom)&&(h.minZoom=a.minZoom),d(a.zoomAnimation)&&(h.zoomAnimation=a.zoomAnimation),d(a.fadeAnimation)&&(h.fadeAnimation=a.fadeAnimation),d(a.markerZoomAnimation)&&(h.markerZoomAnimation=a.markerZoomAnimation),d(a.worldCopyJump)&&(h.worldCopyJump=a.worldCopyJump),d(a.map)&&(h.map=a.map),d(a.path)&&(h.path=a.path));var i=f(g,b);return g[i]=h,h}}}]),angular.module("leaflet-directive").service("leafletMarkersHelpers",["$rootScope","$timeout","leafletHelpers","$log","$compile","leafletGeoJsonHelpers",function(a,b,c,d,e,f){var g=c.isDefined,h=c.defaultTo,i=c.MarkerClusterPlugin,j=c.AwesomeMarkersPlugin,k=c.VectorMarkersPlugin,l=c.MakiMarkersPlugin,m=c.ExtraMarkersPlugin,n=c.DomMarkersPlugin,o=c.safeApply,p=c,q=c.isString,r=c.isNumber,s=c.isObject,t={},u=f,v=c.errorHeader,w=function(a){var b="";return["_icon","_latlng","_leaflet_id","_map","_shadow"].forEach(function(c){b+=c+": "+h(a[c],"undefined")+" \n"}),"[leafletMarker] : \n"+b},x=function(a,b){(b?console:d).debug(w(a))},y=function(b){if(g(b)&&g(b.type)&&"awesomeMarker"===b.type)return j.isLoaded()||d.error(v+" The AwesomeMarkers Plugin is not loaded."),new L.AwesomeMarkers.icon(b);if(g(b)&&g(b.type)&&"vectorMarker"===b.type)return k.isLoaded()||d.error(v+" The VectorMarkers Plugin is not loaded."),new L.VectorMarkers.icon(b);if(g(b)&&g(b.type)&&"makiMarker"===b.type)return l.isLoaded()||d.error(v+"The MakiMarkers Plugin is not loaded."),new L.MakiMarkers.icon(b);if(g(b)&&g(b.type)&&"extraMarker"===b.type)return m.isLoaded()||d.error(v+"The ExtraMarkers Plugin is not loaded."),new L.ExtraMarkers.icon(b);if(g(b)&&g(b.type)&&"div"===b.type)return new L.divIcon(b);if(g(b)&&g(b.type)&&"dom"===b.type){n.isLoaded()||d.error(v+"The DomMarkers Plugin is not loaded.");var c=angular.isFunction(b.getMarkerScope)?b.getMarkerScope():a,f=e(b.template)(c),h=angular.copy(b);return h.element=f[0],new L.DomMarkers.icon(h)}if(g(b)&&g(b.type)&&"icon"===b.type)return b.icon;return g(b)&&g(b.iconUrl)?new L.Icon(b):new L.Icon.Default({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13RCmsoBwEqzGcZsxsvCSy/9wJKf7UWf1mEY8JWfewc67UUoDbDjQC+FqK4QqLVMGGR9d2wurKzqBk3nqIT/9zLxRRjgZ9bqQgub+DdoeCC03Q8j+0QhFhBHR/eP3U/zCln7Uu+hihJ1+bBNffLIvmkyP0gpBZWYXhKussK6mBz5HT6M1Nqpcp+mBCPXosYQfrekGvrjewd59/GvKCE7TbK/04/ZV5QZYVWmDwH1mF3xa2Q3ra3DBC5vBT1oP7PTj4C0+CcL8c7C2CtejqhuCnuIQHaKHzvcRfZpnylFfXsYJx3pNLwhKzRAwAhEqG0SpusBHfAKkxw3w4627MPhoCH798z7s0ZnBJ/MEJbZSbXPhER2ih7p2ok/zSj2cEJDd4CAe+5WYnBCgR2uruyEw6zRoW6/DWJ/OeAP8pd/BGtzOZKpG8oke0SX6GMmRk6GFlyAc59K32OTEinILRJRchah8HQwND8N435Z9Z0FY1EqtxUg+0SO6RJ/mmXz4VuS+DpxXC3gXmZwIL7dBSH4zKE50wESf8qwVgrP1EIlTO5JP9Igu0aexdh28F1lmAEGJGfh7jE6ElyM5Rw/FDcYJjWhbeiBYoYNIpc2FT/SILivp0F1ipDWk4BIEo2VuodEJUifhbiltnNBIXPUFCMpthtAyqws/BPlEF/VbaIxErdxPphsU7rcCp8DohC+GvBIPJS/tW2jtvTmmAeuNO8BNOYQeG8G/2OzCJ3q+soYB5i6NhMaKr17FSal7GIHheuV3uSCY8qYVuEm1cOzqdWr7ku/R0BDoTT+DT+ohCM6/CCvKLKO4RI+dXPeAuaMqksaKrZ7L3FE5FIFbkIceeOZ2OcHO6wIhTkNo0ffgjRGxEqogXHYUPHfWAC/lADpwGcLRY3aeK4/oRGCKYcZXPVoeX/kelVYY8dUGf8V5EBRbgJXT5QIPhP9ePJi428JKOiEYhYXFBqou2Guh+p/mEB1/RfMw6rY7cxcjTrneI1FrDyuzUSRm9miwEJx8E/gUmqlyvHGkneiwErR21F3tNOK5Tf0yXaT+O7DgCvALTUBXdM4YhC/IawPU+2PduqMvuaR6eoxSwUk75ggqsYJ7VicsnwGIkZBSXKOUww73WGXyqP+J2/b9c+gi1YAg/xpwck3gJuucNrh5JvDPvQr0WFXf0piyt8f8/WI0hV4pRxxkQZdJDfDJNOAmM0Ag8jyT6hz0WGXWuP94Yh2jcfjmXAGvHCMslRimDHYuHuDsy2QtHuIavznhbYURq5R57KpzBBRZKPJi8eQg48h4j8SDdowifdIrEVdU+gbO6QNvRRt4ZBthUaZhUnjlYObNagV3keoeru3rU7rcuceqU1mJBxy+BWZYlNEBH+0eH4vRiB+OYybU2hnblYlTvkHinM4m54YnxSyaZYSF6R3jwgP7udKLGIX6r/lbNa9N6y5MFynjWDtrHd75ZvTYAPO/6RgF0k76mQla3FGq7dO+cH8sKn0Vo7nDllwAhqwLPkxrHwWmHJOo+AKJ4rab5OgrM7rVu8eWb2Pu0Dh4eDgXoOfvp7Y7QeqknRmvcTBEyq9m/HQQSCSz6LHq3z0yzsNySRfMS253wl2KyRDbcZPcfJKjZmSEOjcxyi+Y8dUOtsIEH6R2wNykdqrkYJ0RV92H0W58pkfQk7cKevsLK10Py8SdMGfXNXATY+pPbyJR/ET6n9nIfztNtZYRV9XniQu9IA2vOVgy4ir7GCLVmmd+zjkH0eAF9Po6K61pmCXHxU5rHMYd1ftc3owjwRSVRzLjKvqZEty6cRUD7jGqiOdu5HG6MdHjNcNYGqfDm5YRzLBBCCDl/2bk8a8gdbqcfwECu62Fg/HrggAAAABJRU5ErkJggg==",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})},z=function(a){g(t[a])&&t.splice(a,1)},A=function(){t={}},B=function(a,b,c){if(a.closePopup(),g(c)&&g(c.overlays))for(var d in c.overlays)if((c.overlays[d]instanceof L.LayerGroup||c.overlays[d]instanceof L.FeatureGroup)&&c.overlays[d].hasLayer(a))return void c.overlays[d].removeLayer(a);if(g(t))for(var e in t)t[e].hasLayer(a)&&t[e].removeLayer(a);b.hasLayer(a)&&b.removeLayer(a)},C=function(a,b){var c=a._popup._container.offsetHeight,d=new L.Point(a._popup._containerLeft,-c-a._popup._containerBottom);null!==b.layerPointToContainerPoint(d)&&a._popup._adjustPan()},D=function(a,b){e(a._popup._contentNode)(b)},E=function(a,c,d){(a._popup._contentNode.innerText||a._popup._contentNode.textContent).length<1&&b(function(){E(a,c,d)});var f=a._popup._contentNode.offsetWidth;return a._popup._updateLayout(),a._popup._updatePosition(),a._popup.options.autoPan&&C(a,d),f},F=function(b,c,e){var f=angular.isFunction(c.getMessageScope)?c.getMessageScope():a;if(!g(c.compileMessage)||c.compileMessage){if(!g(b._popup)||!g(b._popup._contentNode))return d.error(v+"Popup is invalid or does not have any content."),!1;D(b,f),E(b,c,e)}},G=function(b,c){var d=angular.isFunction(c.getMessageScope)?c.getMessageScope():a,f=angular.isFunction(c.getLabelScope)?c.getLabelScope():d,h=!g(c.compileMessage)||c.compileMessage;p.LabelPlugin.isLoaded()&&g(c.label)&&(g(c.label.options)&&!0===c.label.options.noHide&&b.showLabel(),h&&g(b.label)&&e(b.label._container)(f))},H=function(a,b,c,e,f,h,i){if(g(b)){if(!u.validateCoords(a))return d.warn("There are problems with lat-lng data, please verify your marker model"),void B(c,i,h);var j=a===b;if(g(a.iconAngle)&&b.iconAngle!==a.iconAngle&&c.setIconAngle(a.iconAngle),q(a.layer)||q(b.layer)&&(g(h.overlays[b.layer])&&h.overlays[b.layer].hasLayer(c)&&(h.overlays[b.layer].removeLayer(c),c.closePopup()),i.hasLayer(c)||i.addLayer(c)),(r(a.opacity)||r(parseFloat(a.opacity)))&&a.opacity!==b.opacity&&c.setOpacity(a.opacity),q(a.layer)&&b.layer!==a.layer){if(q(b.layer)&&g(h.overlays[b.layer])&&h.overlays[b.layer].hasLayer(c)&&h.overlays[b.layer].removeLayer(c),c.closePopup(),i.hasLayer(c)&&i.removeLayer(c),!g(h.overlays[a.layer]))return void d.error(v+"You must use a name of an existing layer");var k=h.overlays[a.layer];if(!(k instanceof L.LayerGroup||k instanceof L.FeatureGroup))return void d.error(v+'A marker can only be added to a layer of type "group" or "featureGroup"');k.addLayer(c),i.hasLayer(c)&&!0===a.focus&&c.openPopup()}if(!0!==a.draggable&&!0===b.draggable&&g(c.dragging)&&c.dragging.disable(),!0===a.draggable&&!0!==b.draggable&&(c.dragging?c.dragging.enable():L.Handler.MarkerDrag&&(c.dragging=new L.Handler.MarkerDrag(c),c.options.draggable=!0,c.dragging.enable())),s(a.icon)||s(b.icon)&&(c.setIcon(y()),c.closePopup(),c.unbindPopup(),q(a.message)&&c.bindPopup(a.message,a.popupOptions)),s(a.icon)&&s(b.icon)&&!angular.equals(a.icon,b.icon)){var l=!1;c.dragging&&(l=c.dragging.enabled()),c.setIcon(y(a.icon)),l&&c.dragging.enable(),c.closePopup(),c.unbindPopup(),q(a.message)&&(c.bindPopup(a.message,a.popupOptions),i.hasLayer(c)&&!0===a.focus&&c.openPopup())}!q(a.message)&&q(b.message)&&(c.closePopup(),c.unbindPopup()),p.LabelPlugin.isLoaded()&&(g(a.label)&&g(a.label.message)?"label"in b&&"message"in b.label&&!angular.equals(a.label.message,b.label.message)?c.updateLabelContent(a.label.message):!angular.isFunction(c.getLabel)||angular.isFunction(c.getLabel)&&!g(c.getLabel())?(c.bindLabel(a.label.message,a.label.options),G(c,a)):G(c,a):(!("label"in a)||"message"in a.label)&&angular.isFunction(c.unbindLabel)&&c.unbindLabel()),q(a.message)&&!q(b.message)&&c.bindPopup(a.message,a.popupOptions),q(a.message)&&q(b.message)&&a.message!==b.message&&c.setPopupContent(a.message);var m=!1;!0!==a.focus&&!0===b.focus&&(c.closePopup(),m=!0),(!0===a.focus&&(!g(b.focus)||!1===b.focus)||j&&!0===a.focus)&&(c.openPopup(),m=!0),b.zIndexOffset!==a.zIndexOffset&&c.setZIndexOffset(a.zIndexOffset);var n=c.getLatLng();q(a.layer)&&p.MarkerClusterPlugin.is(h.overlays[a.layer])?m?(a.lat!==b.lat||a.lng!==b.lng)&&(h.overlays[a.layer].removeLayer(c),c.setLatLng([a.lat,a.lng]),h.overlays[a.layer].addLayer(c)):n.lat!==a.lat||n.lng!==a.lng?(h.overlays[a.layer].removeLayer(c),c.setLatLng([a.lat,a.lng]),h.overlays[a.layer].addLayer(c)):a.lat!==b.lat||a.lng!==b.lng?(h.overlays[a.layer].removeLayer(c),c.setLatLng([a.lat,a.lng]),h.overlays[a.layer].addLayer(c)):s(a.icon)&&s(b.icon)&&!angular.equals(a.icon,b.icon)&&(h.overlays[a.layer].removeLayer(c),h.overlays[a.layer].addLayer(c)):(n.lat!==a.lat||n.lng!==a.lng)&&c.setLatLng([a.lat,a.lng])}};return{resetMarkerGroup:z,resetMarkerGroups:A,deleteMarker:B,manageOpenPopup:F,manageOpenLabel:G,createMarker:function(a){if(!g(a)||!u.validateCoords(a))return void d.error(v+"The marker definition is not valid.");var b=u.getCoords(a);if(!g(b))return void d.error(v+"Unable to get coordinates from markerData.");var c={icon:y(a.icon),title:g(a.title)?a.title:"",draggable:!!g(a.draggable)&&a.draggable,clickable:!g(a.clickable)||a.clickable,riseOnHover:!!g(a.riseOnHover)&&a.riseOnHover,zIndexOffset:g(a.zIndexOffset)?a.zIndexOffset:0,iconAngle:g(a.iconAngle)?a.iconAngle:0};for(var e in a)a.hasOwnProperty(e)&&!c.hasOwnProperty(e)&&(c[e]=a[e]);var f=new L.marker(b,c);return q(a.message)||f.unbindPopup(),f},addMarkerToGroup:function(a,b,c,e){return q(b)?i.isLoaded()?(g(t[b])||(t[b]=new L.MarkerClusterGroup(c),e.addLayer(t[b])),void t[b].addLayer(a)):void d.error(v+"The MarkerCluster plugin is not loaded."):void d.error(v+"The marker group you have specified is invalid.")},listenMarkerEvents:function(a,b,c,d,e){a.on("popupopen",function(){o(c,function(){(g(a._popup)||g(a._popup._contentNode))&&(b.focus=!0,F(a,b,e))})}),a.on("popupclose",function(){o(c,function(){b.focus=!1})}),a.on("add",function(){o(c,function(){"label"in b&&G(a,b)})})},updateMarker:H,addMarkerWatcher:function(a,b,c,d,e,f){var i=p.getObjectArrayPath("markers."+b);f=h(f,!0);var j=c.$watch(i,function(f,h){return g(f)?void H(f,h,a,0,0,d,e):(B(a,e,d),void j())},f)},string:w,log:x}}]),angular.module("leaflet-directive").factory("leafletPathsHelpers",["$rootScope","$log","leafletHelpers",function(a,b,c){function d(a){return a.filter(function(a){return k(a)}).map(function(a){return e(a)})}function e(a){return i(a)?new L.LatLng(a[0],a[1]):new L.LatLng(a.lat,a.lng)}function f(a){return a.map(function(a){return d(a)})}function g(a,b){for(var c={},d=0;d0&&e(a[0].boundingbox)?i.resolve(a[0]):i.reject("[Nominatim] Invalid address")}),i.promise}}}]),angular.module("leaflet-directive").directive("bounds",["$log","$timeout","$http","leafletHelpers","nominatimService","leafletBoundsHelpers",function(a,b,c,d,e,f){return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(c,g,h,i){var j=d.isDefined,k=f.createLeafletBounds,l=i[0].getLeafletScope(),m=i[0],n=d.errorHeader+" [Bounds] ",o=function(a){return 0===a._southWest.lat&&0===a._southWest.lng&&0===a._northEast.lat&&0===a._northEast.lng};m.getMap().then(function(d){l.$on("boundsChanged",function(a){var c=a.currentScope,e=d.getBounds();if(!o(e)&&!c.settingBoundsFromScope){c.settingBoundsFromLeaflet=!0;var f={northEast:{lat:e._northEast.lat,lng:e._northEast.lng},southWest:{lat:e._southWest.lat,lng:e._southWest.lng},options:e.options};angular.equals(c.bounds,f)||(c.bounds=f),b(function(){c.settingBoundsFromLeaflet=!1})}});var f;l.$watch("bounds",function(g){if(!c.settingBoundsFromLeaflet){if(j(g.address)&&g.address!==f)return c.settingBoundsFromScope=!0,e.query(g.address,h.id).then(function(a){var b=a.boundingbox,c=[[b[0],b[2]],[b[1],b[3]]];d.fitBounds(c)},function(b){a.error(n+" "+b+".")}),f=g.address,void b(function(){c.settingBoundsFromScope=!1});var i=k(g);i&&!d.getBounds().equals(i)&&(c.settingBoundsFromScope=!0,d.fitBounds(i,g.options),b(function(){c.settingBoundsFromScope=!1}))}},!0)})}}}]);var centerDirectiveTypes=["center","lfCenter"],centerDirectives={};centerDirectiveTypes.forEach(function(a){centerDirectives[a]=["$log","$q","$location","$timeout","leafletMapDefaults","leafletHelpers","leafletBoundsHelpers","leafletMapEvents",function(b,c,d,e,f,g,h,i){var j,k=g.isDefined,l=g.isNumber,m=g.isSameCenterOnMap,n=g.safeApply,o=g.isValidCenter,p=h.isValidBounds,q=g.isUndefinedOrEmpty,r=g.errorHeader,s=function(a,b){return k(a)&&p(a)&&q(b)};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:function(){j=c.defer(),this.getCenter=function(){return j.promise}},link:function(c,g,p,q){var t=q.getLeafletScope(),u=t[a];q.getMap().then(function(c){var g=f.getDefaults(p.id);if(-1!==p[a].search("-"))return b.error(r+' The "center" variable can\'t use a "-" on its key name: "'+p[a]+'".'),void c.setView([g.center.lat,g.center.lng],g.center.zoom);if(s(t.bounds,u))c.fitBounds(h.createLeafletBounds(t.bounds),t.bounds.options),u=c.getCenter(),n(t,function(b){angular.extend(b[a],{lat:c.getCenter().lat,lng:c.getCenter().lng,zoom:c.getZoom(),autoDiscover:!1})}),n(t,function(a){var b=c.getBounds();a.bounds={northEast:{lat:b._northEast.lat,lng:b._northEast.lng},southWest:{lat:b._southWest.lat,lng:b._southWest.lng}}});else{if(!k(u))return b.error(r+' The "center" property is not defined in the main scope'),void c.setView([g.center.lat,g.center.lng],g.center.zoom);k(u.lat)&&k(u.lng)||k(u.autoDiscover)||angular.copy(g.center,u)}var q,v;if("yes"===p.urlHashCenter){var w=function(){var a,b=d.search();if(k(b.c)){var c=b.c.split(":");3===c.length&&(a={lat:parseFloat(c[0]),lng:parseFloat(c[1]),zoom:parseInt(c[2],10)})}return a};q=w(),t.$on("$locationChangeSuccess",function(b){var d=b.currentScope,e=w();k(e)&&!m(e,c)&&angular.extend(d[a],{lat:e.lat,lng:e.lng,zoom:e.zoom})})}t.$watch(a,function(a){return t.settingCenterFromLeaflet?void 0:(k(q)&&(angular.copy(q,a),q=void 0),o(a)||!0===a.autoDiscover?!0===a.autoDiscover?(l(a.zoom)||c.setView([g.center.lat,g.center.lng],g.center.zoom),void(l(a.zoom)&&a.zoom>g.center.zoom?c.locate({setView:!0,maxZoom:a.zoom}):k(g.maxZoom)?c.locate({setView:!0,maxZoom:g.maxZoom}):c.locate({setView:!0}))):void(v&&m(a,c)||(t.settingCenterFromScope=!0,c.setView([a.lat,a.lng],a.zoom),i.notifyCenterChangedToBounds(t,c),e(function(){t.settingCenterFromScope=!1}))):void b.warn(r+" invalid 'center'"))},!0),c.whenReady(function(){v=!0}),c.on("moveend",function(){j.resolve(),i.notifyCenterUrlHashChanged(t,c,p,d.search()),m(u,c)||t.settingCenterFromScope||(t.settingCenterFromLeaflet=!0,n(t,function(b){t.settingCenterFromScope||angular.extend(b[a],{lat:c.getCenter().lat,lng:c.getCenter().lng,zoom:c.getZoom(),autoDiscover:!1}),i.notifyCenterChangedToBounds(t,c),e(function(){t.settingCenterFromLeaflet=!1})}))}),!0===u.autoDiscover&&c.on("locationerror",function(){b.warn(r+" The Geolocation API is unauthorized on this page."),o(u)?(c.setView([u.lat,u.lng],u.zoom),i.notifyCenterChangedToBounds(t,c)):(c.setView([g.center.lat,g.center.lng],g.center.zoom),i.notifyCenterChangedToBounds(t,c))})})}}}]}),centerDirectiveTypes.forEach(function(a){angular.module("leaflet-directive").directive(a,centerDirectives[a])}),angular.module("leaflet-directive").directive("controls",["$log","leafletHelpers","leafletControlHelpers",function(a,b,c){return{restrict:"A",scope:!1,replace:!1,require:"?^leaflet",link:function(d,e,f,g){if(g){var h=c.createControl,i=c.isValidControlType,j=g.getLeafletScope(),k=b.isDefined,l=b.isArray,m={},n=b.errorHeader+" [Controls] ";g.getMap().then(function(b){j.$watchCollection("controls",function(c){for(var d in m)k(c[d])||(b.hasControl(m[d])&&b.removeControl(m[d]),delete m[d]);for(var e in c){var f,g=k(c[e].type)?c[e].type:e;if(!i(g))return void a.error(n+" Invalid control type: "+g+".");if("custom"!==g)f=h(g,c[e]),b.addControl(f),m[e]=f;else{var j=c[e];if(l(j))for(var o in j){var p=j[o];b.addControl(p),m[e]=k(m[e])?m[e].concat([p]):[p]}else b.addControl(j),m[e]=j}}})})}}}}]),angular.module("leaflet-directive").directive("decorations",["$log","leafletHelpers",function(a,b){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(c,d,e,f){function g(b){return k(b)&&k(b.coordinates)&&(j.isLoaded()||a.error("[AngularJS - Leaflet] The PolylineDecorator Plugin is not loaded.")),L.polylineDecorator(b.coordinates)}function h(a,b){return k(a)&&k(b)&&k(b.coordinates)&&k(b.patterns)?(a.setPaths(b.coordinates),a.setPatterns(b.patterns),a):void 0}var i=f.getLeafletScope(),j=b.PolylineDecoratorPlugin,k=b.isDefined,l={};f.getMap().then(function(a){i.$watch("decorations",function(b){for(var c in l)k(b[c])&&angular.equals(b[c],l)||(a.removeLayer(l[c]),delete l[c]);for(var d in b){var e=b[d],f=g(e);k(f)&&(l[d]=f,a.addLayer(f),h(f,e))}},!0)})}}}]),angular.module("leaflet-directive").directive("eventBroadcast",["$log","$rootScope","leafletHelpers","leafletMapEvents","leafletIterators",function(a,b,c,d,e){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(b,f,g,h){var i=c.isObject,j=c.isDefined,k=h.getLeafletScope(),l=k.eventBroadcast,m=d.getAvailableMapEvents(),n=d.addEvents;h.getMap().then(function(b){var c=[],d="broadcast";l&&j(l.map)?i(l.map)?("emit"!==l.map.logic&&"broadcast"!==l.map.logic?a.warn("[AngularJS - Leaflet] Available event propagation logic are: 'emit' or 'broadcast'."):d=l.map.logic,i(l.map.enable)&&l.map.enable.length>=0?e.each(l.map.enable,function(a){-1===c.indexOf(a)&&-1!==m.indexOf(a)&&c.push(a)}):a.warn("[AngularJS - Leaflet] event-broadcast.map.enable must be an object check your model.")):a.warn("[AngularJS - Leaflet] event-broadcast.map must be an object check your model."):c=m,n(b,c,"eventName",k,d)})}}}]),angular.module("leaflet-directive").directive("geojson",["$log","$rootScope","leafletData","leafletHelpers","leafletWatchHelpers","leafletDirectiveControlsHelpers","leafletIterators","leafletGeoJsonEvents",function(a,b,c,d,e,f,g,h){var i=e.maybeWatch,j=d.watchOptions,k=f.extend,l=d,m=g;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(a,b,e,f){var g=d.isDefined,n=f.getLeafletScope(),o={},p=!1;f.getMap().then(function(a){var b=n.geojsonWatchOptions||j,f=function(a,b){return angular.isFunction(a.onEachFeature)?a.onEachFeature:function(c,f){d.LabelPlugin.isLoaded()&&g(c.properties.description)&&f.bindLabel(c.properties.description),h.bindEvents(e.id,f,null,c,n,b,{resetStyleOnMouseout:a.resetStyleOnMouseout,mapId:e.id})} },q=l.isDefined(e.geojsonNested)&&l.isTruthy(e.geojsonNested),r=function(){if(o){var b=function(b){g(b)&&a.hasLayer(b)&&a.removeLayer(b)};return q?void m.each(o,function(a){b(a)}):void b(o)}},s=function(b,d){var h=angular.copy(b);if(g(h)&&g(h.data)){var i=f(h,d);g(h.options)||(h.options={style:h.style,filter:h.filter,onEachFeature:i,pointToLayer:h.pointToLayer});var j=L.geoJson(h.data,h.options);d&&l.isString(d)?o[d]=j:o=j,j.addTo(a),p||(p=!0,c.setGeoJSON(o,e.id))}},t=function(a){if(r(),q){if(!a||!Object.keys(a).length)return;return void m.each(a,function(a,b){s(a,b)})}s(a)};k(e.id,"geojson",t,r),i(n,"geojson",b,function(a){t(a)})})}}}]),angular.module("leaflet-directive").directive("layercontrol",["$filter","$log","leafletData","leafletHelpers",function(a,b,c,d){return{restrict:"E",scope:{icons:"=?",autoHideOpacity:"=?",showGroups:"=?",title:"@",baseTitle:"@",overlaysTitle:"@"},replace:!0,transclude:!1,require:"^leaflet",controller:["$scope","$element","$sce",function(a,e,f){b.debug("[Angular Directive - Layers] layers",a,e);var g=d.safeApply,h=d.isDefined;angular.extend(a,{baselayer:"",oldGroup:"",layerProperties:{},groupProperties:{},rangeIsSupported:d.rangeIsSupported(),changeBaseLayer:function(b,e){d.safeApply(a,function(d){d.baselayer=b,c.getMap().then(function(e){c.getLayers().then(function(c){if(!e.hasLayer(c.baselayers[b])){for(var f in d.layers.baselayers)d.layers.baselayers[f].icon=d.icons.unradio,e.hasLayer(c.baselayers[f])&&e.removeLayer(c.baselayers[f]);e.addLayer(c.baselayers[b]),d.layers.baselayers[b].icon=a.icons.radio}})})}),e.preventDefault()},moveLayer:function(b,c,d){var e=Object.keys(a.layers.baselayers).length;if(c>=1+e&&c<=a.overlaysArray.length+e){var f;for(var h in a.layers.overlays)if(a.layers.overlays[h].index===c){f=a.layers.overlays[h];break}f&&g(a,function(){f.index=b.index,b.index=c})}d.stopPropagation(),d.preventDefault()},initIndex:function(b,c){var d=Object.keys(a.layers.baselayers).length;b.index=h(b.index)?b.index:c+d+1},initGroup:function(b){a.groupProperties[b]=a.groupProperties[b]?a.groupProperties[b]:{}},toggleOpacity:function(b,c){if(c.visible){if(a.autoHideOpacity&&!a.layerProperties[c.name].opacityControl)for(var d in a.layerProperties)a.layerProperties[d].opacityControl=!1;a.layerProperties[c.name].opacityControl=!a.layerProperties[c.name].opacityControl}b.stopPropagation(),b.preventDefault()},toggleLegend:function(b){a.layerProperties[b.name].showLegend=!a.layerProperties[b.name].showLegend},showLegend:function(b){return b.legend&&a.layerProperties[b.name].showLegend},unsafeHTML:function(a){return f.trustAsHtml(a)},getOpacityIcon:function(b){return b.visible&&a.layerProperties[b.name].opacityControl?a.icons.close:a.icons.open},getGroupIcon:function(b){return b.visible?a.icons.check:a.icons.uncheck},changeOpacity:function(b){var d=a.layerProperties[b.name].opacity;c.getMap().then(function(e){c.getLayers().then(function(c){var f;for(var g in a.layers.overlays)if(a.layers.overlays[g]===b){f=c.overlays[g];break}e.hasLayer(f)&&(f.setOpacity&&f.setOpacity(d/100),f.getLayers&&f.eachLayer&&f.eachLayer(function(a){a.setOpacity&&a.setOpacity(d/100)}))})})},changeGroupVisibility:function(b){if(h(a.groupProperties[b])){var c=a.groupProperties[b].visible;for(var d in a.layers.overlays){var e=a.layers.overlays[d];e.group===b&&(e.visible=c)}}}});var i=e.get(0);L.Browser.touch?L.DomEvent.on(i,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(i),L.DomEvent.on(i,"mousewheel",L.DomEvent.stopPropagation))}],template:'

{{ title }}

{{ baseTitle }}
{{ overlaysTitle }}
Range is not supported in this browser
',link:function(a,b,e,f){var g=d.isDefined,h=f.getLeafletScope(),i=h.layers;a.$watch("icons",function(){var b={uncheck:"fa fa-square-o",check:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",unradio:"fa fa-circle-o",up:"fa fa-angle-up",down:"fa fa-angle-down",open:"fa fa-angle-double-down",close:"fa fa-angle-double-up",toggleLegend:"fa fa-pencil-square-o"};g(a.icons)?(angular.extend(b,a.icons),angular.extend(a.icons,b)):a.icons=b}),e.order=!g(e.order)||"normal"!==e.order&&"reverse"!==e.order?"normal":e.order,a.order="normal"===e.order,a.orderNumber="normal"===e.order?-1:1,a.layers=i,f.getMap().then(function(b){h.$watch("layers.baselayers",function(d){var e={};c.getLayers().then(function(c){var f;for(f in d){var g=d[f];g.icon=a.icons[b.hasLayer(c.baselayers[f])?"radio":"unradio"],e[f]=g}a.baselayersArray=e})}),h.$watch("layers.overlays",function(b){var d=[],e={};c.getLayers().then(function(c){var f;for(f in b){var h=b[f];h.icon=a.icons[h.visible?"check":"uncheck"],d.push(h),g(a.layerProperties[h.name])||(a.layerProperties[h.name]={opacity:g(h.layerOptions.opacity)?100*h.layerOptions.opacity:100,opacityControl:!1,showLegend:!0}),g(h.group)&&(g(a.groupProperties[h.group])||(a.groupProperties[h.group]={visible:!1}),e[h.group]=g(e[h.group])?e[h.group]:{count:0,visibles:0},e[h.group].count++,h.visible&&e[h.group].visibles++),g(h.index)&&c.overlays[f].setZIndex&&c.overlays[f].setZIndex(b[f].index)}for(f in e)a.groupProperties[f].visible=e[f].visibles===e[f].count;a.overlaysArray=d})},!0)})}}}]),angular.module("leaflet-directive").directive("layers",["$log","$q","leafletData","leafletHelpers","leafletLayerHelpers","leafletControlHelpers",function(a,b,c,d,e,f){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:["$scope",function(a){a._leafletLayers=b.defer(),this.getLayers=function(){return a._leafletLayers.promise}}],link:function(a,b,g,h){var i=d.isDefined,j={},k=h.getLeafletScope(),l=k.layers,m=e.createLayer,n=e.safeAddLayer,o=e.safeRemoveLayer,p=f.updateLayersControl,q=!1;h.getMap().then(function(b){a._leafletLayers.resolve(j),c.setLayers(j,g.id),j.baselayers={},j.overlays={};var d=g.id,e=!1;for(var f in l.baselayers){var h=m(l.baselayers[f]);i(h)?(j.baselayers[f]=h,!0===l.baselayers[f].top&&(n(b,j.baselayers[f]),e=!0)):delete l.baselayers[f]}!e&&Object.keys(j.baselayers).length>0&&n(b,j.baselayers[Object.keys(l.baselayers)[0]]);for(f in l.overlays){var r=m(l.overlays[f]);i(r)?(j.overlays[f]=r,!0===l.overlays[f].visible&&n(b,j.overlays[f])):delete l.overlays[f]}k.$watch("layers.baselayers",function(a,c){if(angular.equals(a,c))return q=p(b,d,q,a,l.overlays,j),!0;for(var e in j.baselayers)(!i(a[e])||a[e].doRefresh)&&(b.hasLayer(j.baselayers[e])&&b.removeLayer(j.baselayers[e]),delete j.baselayers[e],a[e]&&a[e].doRefresh&&(a[e].doRefresh=!1));for(var f in a)if(i(j.baselayers[f]))!0!==a[f].top||b.hasLayer(j.baselayers[f])?!1===a[f].top&&b.hasLayer(j.baselayers[f])&&b.removeLayer(j.baselayers[f]):n(b,j.baselayers[f]);else{var g=m(a[f]);i(g)&&(j.baselayers[f]=g,!0===a[f].top&&n(b,j.baselayers[f]))}var h=!1;for(var k in j.baselayers)if(b.hasLayer(j.baselayers[k])){h=!0;break}!h&&Object.keys(j.baselayers).length>0&&n(b,j.baselayers[Object.keys(j.baselayers)[0]]),q=p(b,d,q,a,l.overlays,j)},!0),k.$watch("layers.overlays",function(a,c){if(angular.equals(a,c))return q=p(b,d,q,l.baselayers,a,j),!0;for(var e in j.overlays)if(!i(a[e])||a[e].doRefresh){if(b.hasLayer(j.overlays[e])){var f=i(a[e])?a[e].layerOptions:null;o(b,j.overlays[e],f)}delete j.overlays[e],a[e]&&a[e].doRefresh&&(a[e].doRefresh=!1)}for(var g in a){if(i(j.overlays[g]))a[g].visible&&!b.hasLayer(j.overlays[g])?n(b,j.overlays[g]):!1===a[g].visible&&b.hasLayer(j.overlays[g])&&o(b,j.overlays[g],a[g].layerOptions);else{var h=m(a[g]);if(!i(h))continue;j.overlays[g]=h,!0===a[g].visible&&n(b,j.overlays[g])}a[g].visible&&b._loaded&&a[g].data&&"heatmap"===a[g].type&&(j.overlays[g].setData(a[g].data),j.overlays[g].update())}q=p(b,d,q,l.baselayers,a,j)},!0)})}}}]),angular.module("leaflet-directive").directive("legend",["$log","$http","leafletHelpers","leafletLegendHelpers",function(a,b,c,d){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,f,g,h){var i,j,k,l,m=c.isArray,n=c.isDefined,o=c.isFunction,p=h.getLeafletScope(),q=p.legend;p.$watch("legend",function(a){n(a)&&(i=a.legendClass?a.legendClass:"legend",j=a.position||"bottomright",l=a.type||"arcgis")},!0),h.getMap().then(function(c){p.$watch("legend",function(b){return n(b)?n(b.url)||"arcgis"!==l||m(b.colors)&&m(b.labels)&&b.colors.length===b.labels.length?n(b.url)?void a.info("[AngularJS - Leaflet] loading legend service."):(n(k)&&(k.removeFrom(c),k=null),k=L.control({position:j}),"arcgis"===l&&(k.onAdd=d.getOnAddArrayLegend(b,i)),void k.addTo(c)):void a.warn("[AngularJS - Leaflet] legend.colors and legend.labels must be set."):void(n(k)&&(k.removeFrom(c),k=null))}),p.$watch("legend.url",function(e){n(e)&&b.get(e).success(function(a){n(k)?d.updateLegend(k.getContainer(),a,l,e):(k=L.control({position:j}),k.onAdd=d.getOnAddLegend(a,i,l,e),k.addTo(c)),n(q.loadedData)&&o(q.loadedData)&&q.loadedData()}).error(function(){a.warn("[AngularJS - Leaflet] legend.url not loaded.")})})})}}}]),angular.module("leaflet-directive").directive("markers",["$log","$rootScope","$q","leafletData","leafletHelpers","leafletMapDefaults","leafletMarkersHelpers","leafletMarkerEvents","leafletIterators","leafletWatchHelpers","leafletDirectiveControlsHelpers",function(a,b,c,d,e,f,g,h,i,j,k){var l=e.isDefined,m=e.errorHeader,n=e,o=e.isString,p=g.addMarkerWatcher,q=g.updateMarker,r=g.listenMarkerEvents,s=g.addMarkerToGroup,t=g.createMarker,u=g.deleteMarker,v=i,w=e.watchOptions,x=j.maybeWatch,y=k.extend,z=function(a,b,c){if(Object.keys(a).length){if(c&&o(c)){if(!a[c]||!Object.keys(a[c]).length)return;return a[c][b]}return a[b]}},A=function(a,b,c,d){return d&&o(d)?(l(b[d])||(b[d]={}),b[d][c]=a):b[c]=a,a},B=function(b,c,d,e,f,g){if(!o(b))return a.error(m+" A layername must be a string"),!1;if(!l(c))return a.error(m+" You must add layers to the directive if the markers are going to use this functionality."),!1;if(!l(c.overlays)||!l(c.overlays[b]))return a.error(m+' A marker can only be added to a layer of type "group"'),!1;var h=c.overlays[b];return h instanceof L.LayerGroup||h instanceof L.FeatureGroup?(h.addLayer(e),!f&&g.hasLayer(e)&&!0===d.focus&&e.openPopup(),!0):(a.error(m+' Adding a marker to an overlay needs a overlay of the type "group" or "featureGroup"'),!1)},C=function(b,c,d,e,f,g,i,j,k,o){for(var u in c)if(!o[u])if(-1===u.search("-")){var v=n.copy(c[u]),w=n.getObjectDotPath(k?[k,u]:[u]),x=z(g,u,k);if(l(x)){var y=l(y)?d[u]:void 0;q(v,y,x,w,i,f,e)}else{var C=t(v),D=(v?v.layer:void 0)||k;if(!l(C)){a.error(m+" Received invalid data on the marker "+u+".");continue}if(A(C,g,u,k),l(v.message)&&C.bindPopup(v.message,v.popupOptions),l(v.group)){var E=l(v.groupOption)?v.groupOption:null;s(C,v.group,E,e)}if(n.LabelPlugin.isLoaded()&&l(v.label)&&l(v.label.message)&&C.bindLabel(v.label.message,v.label.options),l(v)&&(l(v.layer)||l(k))){var F=B(D,f,v,C,j.individual.doWatch,e);if(!F)continue}else l(v.group)||(e.addLayer(C),j.individual.doWatch||!0!==v.focus||C.openPopup());j.individual.doWatch&&p(C,w,i,f,e,j.individual.isDeep),r(C,v,i,j.individual.doWatch,e),h.bindEvents(b,C,w,v,i,D)}}else a.error('The marker can\'t use a "-" on his key name: "'+u+'".')},D=function(b,c,d,e,f){var g,h,i=!1,j=!1,k=l(c);for(var o in d)i||(a.debug(m+"[markers] destroy: "),i=!0),k&&(h=b[o],g=c[o],j=angular.equals(h,g)&&e),l(b)&&Object.keys(b).length&&l(b[o])&&Object.keys(b[o]).length&&!j||f&&n.isFunction(f)&&f(h,g,o)},E=function(b,c,d,e,f){D(b,c,d,!1,function(b,c,g){a.debug(m+"[marker] is deleting marker: "+g),u(d[g],e,f),delete d[g]})},F=function(b,c,d){var e={};return D(b,c,d,!0,function(b,c,d){a.debug(m+"[marker] is already rendered, marker: "+d),e[d]=b}),e};return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(a,b,e,f){var g=f[0],h=g.getLeafletScope();g.getMap().then(function(a){var b,g={};b=l(f[1])?f[1].getLayers:function(){var a=c.defer();return a.resolve(),a.promise};var i=h.markersWatchOptions||w;l(e.watchMarkers)&&(i.doWatch=i.individual.doWatch=!l(e.watchMarkers)||n.isTruthy(e.watchMarkers));var j=l(e.markersNested)&&n.isTruthy(e.markersNested);b().then(function(b){var c=function(c,d){return j?void v.each(c,function(c,e){var f=l(f)?d[e]:void 0;E(c,f,g[e],a,b)}):void E(c,d,g,a,b)},f=function(d,f){c(d,f);var k=null;return j?void v.each(d,function(c,j){var m=l(m)?f[j]:void 0;k=F(d[j],m,g[j]),C(e.id,c,f,a,b,g,h,i,j,k)}):(k=F(d,f,g),void C(e.id,d,f,a,b,g,h,i,void 0,k))};y(e.id,"markers",f,c),d.setMarkers(g,e.id),x(h,"markers",i,function(a,b){f(a,b)})})})}}}]),angular.module("leaflet-directive").directive("maxbounds",["$log","leafletMapDefaults","leafletBoundsHelpers","leafletHelpers",function(a,b,c,d){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(a,b,e,f){var g=f.getLeafletScope(),h=c.isValidBounds,i=d.isNumber;f.getMap().then(function(a){g.$watch("maxbounds",function(b){if(!h(b))return void a.setMaxBounds();var d=c.createLeafletBounds(b);i(b.pad)&&(d=d.pad(b.pad)),a.setMaxBounds(d),e.center||e.lfCenter||a.fitBounds(d)})})}}}]),angular.module("leaflet-directive").directive("paths",["$log","$q","leafletData","leafletMapDefaults","leafletHelpers","leafletPathsHelpers","leafletPathEvents",function(a,b,c,d,e,f,g){return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(h,i,j,k){var l=k[0],m=e.isDefined,n=e.isString,o=l.getLeafletScope(),p=o.paths,q=f.createPath,r=g.bindPathEvents,s=f.setPathOptions;l.getMap().then(function(f){var g,h=d.getDefaults(j.id);g=m(k[1])?k[1].getLayers:function(){var a=b.defer();return a.resolve(),a.promise},m(p)&&g().then(function(b){var d={};c.setPaths(d,j.id);var g=!m(j.watchPaths)||"true"===j.watchPaths,i=function(a,c){var d=o.$watch('paths["'+c+'"]',function(c,e){if(!m(c)){if(m(e.layer))for(var g in b.overlays){var h=b.overlays[g];h.removeLayer(a)}return f.removeLayer(a),void d()}s(a,c.type,c)},!0)};o.$watchCollection("paths",function(c){for(var k in d)m(c[k])||(f.removeLayer(d[k]),delete d[k]);for(var l in c)if(0!==l.search("\\$"))if(-1===l.search("-")){if(!m(d[l])){var p=c[l],t=q(l,c[l],h);if(m(t)&&m(p.message)&&t.bindPopup(p.message,p.popupOptions),e.LabelPlugin.isLoaded()&&m(p.label)&&m(p.label.message)&&t.bindLabel(p.label.message,p.label.options),m(p)&&m(p.layer)){if(!n(p.layer)){a.error("[AngularJS - Leaflet] A layername must be a string");continue}if(!m(b)){a.error("[AngularJS - Leaflet] You must add layers to the directive if the markers are going to use this functionality.");continue}if(!m(b.overlays)||!m(b.overlays[p.layer])){a.error('[AngularJS - Leaflet] A path can only be added to a layer of type "group"');continue}var u=b.overlays[p.layer];if(!(u instanceof L.LayerGroup||u instanceof L.FeatureGroup)){a.error('[AngularJS - Leaflet] Adding a path to an overlay needs a overlay of the type "group" or "featureGroup"');continue}d[l]=t,u.addLayer(t),g?i(t,l):s(t,p.type,p)}else m(t)&&(d[l]=t,f.addLayer(t),g?i(t,l):s(t,p.type,p));r(j.id,t,l,p,o)}}else a.error('[AngularJS - Leaflet] The path name "'+l+'" is not valid. It must not include "-" and a number.')})})})}}}]),angular.module("leaflet-directive").directive("tiles",["$log","leafletData","leafletMapDefaults","leafletHelpers",function(a,b,c,d){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,f,g,h){var i=d.isDefined,j=h.getLeafletScope(),k=j.tiles;return i(k)&&i(k.url)?void h.getMap().then(function(a){var d,e=c.getDefaults(g.id);j.$watch("tiles",function(c,f){var h=e.tileLayerOptions,j=e.tileLayer;return!i(c.url)&&i(d)?void a.removeLayer(d):i(d)?!i(c.url)||!i(c.options)||c.type===f.type&&angular.equals(c.options,h)?void(i(c.url)&&d.setUrl(c.url)):(a.removeLayer(d),h=e.tileLayerOptions,angular.copy(c.options,h),j=c.url,d="wms"===c.type?L.tileLayer.wms(j,h):L.tileLayer(j,h),d.addTo(a),void b.setTiles(d,g.id)):(i(c.options)&&angular.copy(c.options,h),i(c.url)&&(j=c.url),d="wms"===c.type?L.tileLayer.wms(j,h):L.tileLayer(j,h),d.addTo(a),void b.setTiles(d,g.id))},!0)}):void a.warn("[AngularJS - Leaflet] The 'tiles' definition doesn't have the 'url' property.")}}}]),["markers","geojson"].forEach(function(a){angular.module("leaflet-directive").directive(a+"WatchOptions",["$log","$rootScope","$q","leafletData","leafletHelpers",function(b,c,d,e,f){var g=f.isDefined,h=f.errorHeader,i=f.isObject,j=f.watchOptions;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(c,d,e,f){var k=f[0],l=k.getLeafletScope();k.getMap().then(function(){g(c[a+"WatchOptions"])&&(i(c[a+"WatchOptions"])?angular.extend(j,c[a+"WatchOptions"]):b.error(h+"["+a+"WatchOptions] is not an object"),l[a+"WatchOptions"]=j)})}}}])}),angular.module("leaflet-directive").factory("LeafletEventsHelpersFactory",["$rootScope","$q","$log","leafletHelpers",function(a,b,c,d){var e=d.safeApply,f=d.isDefined,g=d.isObject,h=d.isArray,i=d.errorHeader,j=function(a,b){this.rootBroadcastName=a,c.debug("LeafletEventsHelpersFactory: lObjectType: "+b+"rootBroadcastName: "+a),this.lObjectType=b};return j.prototype.getAvailableEvents=function(){return[]},j.prototype.genDispatchEvent=function(a,b,d,e,f,g,h,i,j){var k=this;return a=a||"",a&&(a="."+a),function(l){var m=k.rootBroadcastName+a+"."+b;c.debug(m),k.fire(e,m,d,l,l.target||f,h,g,i,j)}},j.prototype.fire=function(b,c,d,g,h,i,j,k){e(b,function(){var e={leafletEvent:g,leafletObject:h,modelName:j,model:i};f(k)&&angular.extend(e,{layerName:k}),"emit"===d?b.$emit(c,e):a.$broadcast(c,e)})},j.prototype.bindEvents=function(a,b,d,e,j,k,l){var m=[],n="emit",o=this;if(f(j.eventBroadcast))if(g(j.eventBroadcast))if(f(j.eventBroadcast[o.lObjectType]))if(g(j.eventBroadcast[o.lObjectType])){f(j.eventBroadcast[this.lObjectType].logic)&&"emit"!==j.eventBroadcast[o.lObjectType].logic&&"broadcast"!==j.eventBroadcast[o.lObjectType].logic&&c.warn(i+"Available event propagation logic are: 'emit' or 'broadcast'.");var p=!1,q=!1;f(j.eventBroadcast[o.lObjectType].enable)&&h(j.eventBroadcast[o.lObjectType].enable)&&(p=!0),f(j.eventBroadcast[o.lObjectType].disable)&&h(j.eventBroadcast[o.lObjectType].disable)&&(q=!0),p&&q?c.warn(i+"can not enable and disable events at the same time"):p||q?p?j.eventBroadcast[this.lObjectType].enable.forEach(function(a){-1!==m.indexOf(a)?c.warn(i+"This event "+a+" is already enabled"):-1===o.getAvailableEvents().indexOf(a)?c.warn(i+"This event "+a+" does not exist"):m.push(a)}):(m=this.getAvailableEvents(),j.eventBroadcast[o.lObjectType].disable.forEach(function(a){var b=m.indexOf(a);-1===b?c.warn(i+"This event "+a+" does not exist or has been already disabled"):m.splice(b,1)})):c.warn(i+"must enable or disable events")}else c.warn(i+"event-broadcast."+[o.lObjectType]+" must be an object check your model.");else m=this.getAvailableEvents();else c.error(i+"event-broadcast must be an object check your model.");else m=this.getAvailableEvents();return m.forEach(function(c){b.on(c,o.genDispatchEvent(a,c,n,j,b,d,e,k,l))}),n},j}]).service("leafletEventsHelpers",["LeafletEventsHelpersFactory",function(a){return new a}]),angular.module("leaflet-directive").factory("leafletGeoJsonEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory","leafletData",function(a,b,c,d,e,f){var g=d.safeApply,h=e,i=function(){h.call(this,"leafletDirectiveGeoJson","geojson")};return i.prototype=new h,i.prototype.genDispatchEvent=function(b,c,d,e,i,j,k,l,m){var n=h.prototype.genDispatchEvent.call(this,b,c,d,e,i,j,k,l),o=this;return function(b){"mouseout"===c&&(m.resetStyleOnMouseout&&f.getGeoJSON(m.mapId).then(function(a){(l?a[l]:a).resetStyle(b.target)}),g(e,function(){a.$broadcast(o.rootBroadcastName+".mouseout",b)})),n(b)}},i.prototype.getAvailableEvents=function(){return["click","dblclick","mouseover","mouseout"]},new i}]),angular.module("leaflet-directive").factory("leafletLabelEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory",function(a,b,c,d,e){var f=d,g=e,h=function(){g.call(this,"leafletDirectiveLabel","markers")};return h.prototype=new g,h.prototype.genDispatchEvent=function(a,b,c,d,e,f,h,i){var j=f.replace("markers.","");return g.prototype.genDispatchEvent.call(this,a,b,c,d,e,j,h,i)},h.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu"]},h.prototype.genEvents=function(a,b,c,d,e,g,h,i){var j=this,k=this.getAvailableEvents(),l=f.getObjectArrayPath("markers."+g);k.forEach(function(b){e.label.on(b,j.genDispatchEvent(a,b,c,d,e.label,l,h,i))})},h.prototype.bindEvents=function(){},new h}]),angular.module("leaflet-directive").factory("leafletMapEvents",["$rootScope","$q","$log","leafletHelpers","leafletEventsHelpers","leafletIterators",function(a,b,c,d,e,f){var g=d.isDefined,h=e.fire,i=function(){return["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","contextmenu","focus","blur","preclick","load","unload","viewreset","movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoomanim","zoomend","zoomlevelschange","resize","autopanstart","layeradd","layerremove","baselayerchange","overlayadd","overlayremove","locationfound","locationerror","popupopen","popupclose","draw:created","draw:edited","draw:deleted","draw:drawstart","draw:drawstop","draw:editstart","draw:editstop","draw:deletestart","draw:deletestop"]},j=function(a,b,d,e){return e&&(e+="."),function(f){var g="leafletDirectiveMap."+e+b;c.debug(g),h(a,g,d,f,f.target,a)}};return{getAvailableMapEvents:i,genDispatchMapEvent:j,notifyCenterChangedToBounds:function(a){a.$broadcast("boundsChanged")},notifyCenterUrlHashChanged:function(a,b,c,d){if(g(c.urlHashCenter)){var e=b.getCenter(),f=e.lat.toFixed(4)+":"+e.lng.toFixed(4)+":"+b.getZoom();g(d.c)&&d.c===f||a.$emit("centerUrlHash",f)}},addEvents:function(a,b,c,d,e){f.each(b,function(b){var f={};f[c]=b,a.on(b,j(d,b,e,a._container.id||""),f)})}}}]),angular.module("leaflet-directive").factory("leafletMarkerEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory","leafletLabelEvents",function(a,b,c,d,e,f){var g=d.safeApply,h=d.isDefined,i=d,j=f,k=e,l=function(){k.call(this,"leafletDirectiveMarker","markers")};return l.prototype=new k,l.prototype.genDispatchEvent=function(b,c,d,e,f,h,i,j){var l=k.prototype.genDispatchEvent.call(this,b,c,d,e,f,h,i,j);return function(b){"click"===c?g(e,function(){a.$broadcast("leafletDirectiveMarkersClick",h)}):"dragend"===c&&(g(e,function(){i.lat=f.getLatLng().lat,i.lng=f.getLatLng().lng}),i.message&&!0===i.focus&&f.openPopup()),l(b)}},l.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","dragstart","drag","dragend","move","remove","popupopen","popupclose","touchend","touchstart","touchmove","touchcancel","touchleave"]},l.prototype.bindEvents=function(a,b,c,d,e,f){var g=k.prototype.bindEvents.call(this,a,b,c,d,e,f);i.LabelPlugin.isLoaded()&&h(b.label)&&j.genEvents(a,c,g,e,b,d,f)},new l}]),angular.module("leaflet-directive").factory("leafletPathEvents",["$rootScope","$q","$log","leafletHelpers","leafletLabelEvents","leafletEventsHelpers",function(a,b,c,d,e,f){var g=d.isDefined,h=d.isObject,i=d,j=d.errorHeader,k=e,l=f.fire,m=function(a,b,d,e,f,g,h,i){return a=a||"",a&&(a="."+a),function(j){var k="leafletDirectivePath"+a+"."+b;c.debug(k),l(e,k,d,j,j.target||f,h,g,i)}},n=function(a,b,d,e,f){var l,n,p=[],q="broadcast";if(g(f.eventBroadcast))if(h(f.eventBroadcast))if(g(f.eventBroadcast.path))if(h(f.eventBroadcast.paths))c.warn(j+"event-broadcast.path must be an object check your model.");else{void 0!==f.eventBroadcast.path.logic&&null!==f.eventBroadcast.path.logic&&("emit"!==f.eventBroadcast.path.logic&&"broadcast"!==f.eventBroadcast.path.logic?c.warn(j+"Available event propagation logic are: 'emit' or 'broadcast'."):"emit"===f.eventBroadcast.path.logic&&(q="emit"));var r=!1,s=!1;if(void 0!==f.eventBroadcast.path.enable&&null!==f.eventBroadcast.path.enable&&"object"==typeof f.eventBroadcast.path.enable&&(r=!0),void 0!==f.eventBroadcast.path.disable&&null!==f.eventBroadcast.path.disable&&"object"==typeof f.eventBroadcast.path.disable&&(s=!0),r&&s)c.warn(j+"can not enable and disable events at the same time");else if(r||s)if(r)for(l=0;l0)for(c in Wc)d=Wc[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),!1===Xc&&(Xc=!0,a.updateOffset(this),Xc=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(){}function u(a){return a?a.toLowerCase().replace("_","-"):a}function v(a){for(var b,c,d,e,f=0;f0;){if(d=w(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function w(a){var b=null;if(!Yc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Vc._abbr,require("./locale/"+a),x(b)}catch(c){}return Yc[a]}function x(a,b){var c;return a&&(c=m(b)?z(a):y(a,b))&&(Vc=c),Vc._abbr}function y(a,b){return null!==b?(b.abbr=a,Yc[a]=Yc[a]||new t,Yc[a].set(b),x(a),Yc[a]):(delete Yc[a],null)}function z(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Vc;if(!c(a)){if(b=w(a))return b;a=[a]}return v(a)}function A(a,b){var c=a.toLowerCase();Zc[c]=Zc[c+"s"]=Zc[b]=a}function B(a){return"string"==typeof a?Zc[a]||Zc[a.toLowerCase()]:void 0}function C(a){var b,c,d={};for(c in a)f(a,c)&&(b=B(c))&&(d[b]=a[c]);return d}function D(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function E(b,c){return function(d){return null!=d?(G(this,b,d),a.updateOffset(this,c),this):F(this,b)}}function F(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function G(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function H(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=B(a),D(this[a]))return this[a](b);return this}function I(a,b,c){var d=""+Math.abs(a),e=b-d.length;return(a>=0?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function J(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(bd[a]=e),b&&(bd[b[0]]=function(){return I(e.apply(this,arguments),b[1],b[2])}),c&&(bd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match($c);for(b=0,c=d.length;c>b;b++)bd[d[b]]?d[b]=bd[d[b]]:d[b]=K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),ad[b]=ad[b]||L(b),ad[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(_c.lastIndex=0;d>=0&&_c.test(a);)a=a.replace(_c,c),_c.lastIndex=0,d-=1;return a} function O(a,b,c){td[a]=D(b)?b:function(a,d){return a&&c?c:b}}function P(a,b){return f(td,a)?td[a](b._strict,b._locale):new RegExp(Q(a))}function Q(a){return R(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function R(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function S(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function Z(a,b){var c;return a.isValid()?"string"==typeof b&&"number"!=typeof(b=a.localeData().monthsParse(b))?a:(c=Math.min(a.date(),V(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a):a}function $(b){return null!=b?(Z(this,b),a.updateOffset(this,!0),this):F(this,"Month")}function _(){return V(this.year(),this.month())}function aa(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ba(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function ca(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=R(d[b]),e[b]=R(e[b]),f[b]=R(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")$","i")}function da(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[wd]<0||c[wd]>11?wd:c[xd]<1||c[xd]>V(c[vd],c[wd])?xd:c[yd]<0||c[yd]>24||24===c[yd]&&(0!==c[zd]||0!==c[Ad]||0!==c[Bd])?yd:c[zd]<0||c[zd]>59?zd:c[Ad]<0||c[Ad]>59?Ad:c[Bd]<0||c[Bd]>999?Bd:-1,j(a)._overflowDayOfYear&&(vd>b||b>xd)&&(b=xd),j(a)._overflowWeeks&&-1===b&&(b=Cd),j(a)._overflowWeekday&&-1===b&&(b=Dd),j(a).overflow=b),a}function ea(b){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function fa(a,b){var c=!0;return g(function(){return c&&(ea(a+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ga(a,b){Jd[a]||(ea(b),Jd[a]=!0)}function ha(a){var b,c,d,e,f,g,h=a._i,i=Kd.exec(h)||Ld.exec(h);if(i){for(j(a).iso=!0,b=0,c=Nd.length;c>b;b++)if(Nd[b][1].exec(i[1])){e=Nd[b][0],d=!1!==Nd[b][2];break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Od.length;c>b;b++)if(Od[b][1].exec(i[3])){f=(i[2]||" ")+Od[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Md.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),wa(a)}else a._isValid=!1}function ia(b){var c=Pd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ha(b),void(!1===b._isValid&&(delete b._isValid,a.createFromInputFallback(b))))}function ja(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ka(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function la(a){return ma(a)?366:365}function ma(a){return a%4==0&&a%100!=0||a%400==0}function na(){return ma(this.year())}function oa(a,b,c){var d=7+b-c;return-(7+ka(a,0,d).getUTCDay()-b)%7+d-1}function pa(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=oa(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=la(f)+j):j>la(a)?(f=a+1,g=j-la(a)):(f=a,g=j),{year:f,dayOfYear:g}}function qa(a,b,c){var d,e,f=oa(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+ra(e,b,c)):g>ra(a.year(),b,c)?(d=g-ra(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function ra(a,b,c){var d=oa(a,b,c),e=oa(a+1,b,c);return(la(a)-d+e)/7}function sa(a,b,c){return null!=a?a:null!=b?b:c}function ta(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function ua(a){var b,c,d,e,f=[];if(!a._d){for(d=ta(a),a._w&&null==a._a[xd]&&null==a._a[wd]&&va(a),a._dayOfYear&&(e=sa(a._a[vd],d[vd]),a._dayOfYear>la(e)&&(j(a)._overflowDayOfYear=!0),c=ka(e,0,a._dayOfYear),a._a[wd]=c.getUTCMonth(),a._a[xd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[yd]&&0===a._a[zd]&&0===a._a[Ad]&&0===a._a[Bd]&&(a._nextDay=!0,a._a[yd]=0),a._d=(a._useUTC?ka:ja).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[yd]=24)}}function va(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=sa(b.GG,a._a[vd],qa(Ea(),1,4).year),d=sa(b.W,1),(1>(e=sa(b.E,1))||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=sa(b.gg,a._a[vd],qa(Ea(),f,g).year),d=sa(b.w,1),null!=b.d?(0>(e=b.d)||e>6)&&(i=!0):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>ra(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=pa(c,d,e,f,g),a._a[vd]=h.year,a._dayOfYear=h.dayOfYear)}function wa(b){if(b._f===a.ISO_8601)return void ha(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=N(b._f,b._locale).match($c)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),bd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),U(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),!0===j(b).bigHour&&b._a[yd]<=12&&b._a[yd]>0&&(j(b).bigHour=void 0),b._a[yd]=xa(b._locale,b._a[yd],b._meridiem),ua(b),da(b)}function xa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function ya(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function za(a){if(!a._d){var b=C(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),ua(a)}}function Aa(a){var b=new o(da(Ba(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ba(a){var b=a._i,e=a._f;return a._locale=a._locale||z(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(da(b)):(c(e)?ya(a):e?wa(a):d(b)?a._d=b:Ca(a),k(a)||(a._d=null),a))}function Ca(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(+f):"string"==typeof f?ia(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ua(b)):"object"==typeof f?za(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Da(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Aa(f)}function Ea(a,b,c,d){return Da(a,b,c,d,!1)}function Fa(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ea();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+I(~~(a/60),2)+b+I(~~a%60,2)})}function La(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Ud)||["-",0,0],f=60*e[1]+r(e[2]);return"+"===e[0]?f:-f}function Ma(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?+b:+Ea(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Ea(b).local()}function Na(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Oa(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=La(qd,b):Math.abs(b)<16&&(b*=60),!this._isUTC&&c&&(d=Na(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?cb(this,Za(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Na(this):null!=b?this:NaN}function Pa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Qa(a){return this.utcOffset(0,a)}function Ra(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Na(this),"m")),this}function Sa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(La(pd,this._i)),this}function Ta(a){return!!this.isValid()&&(a=a?Ea(a).utcOffset():0,(this.utcOffset()-a)%60==0)}function Ua(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Va(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ba(a),a._a){var b=a._isUTC?h(a._a):Ea(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wa(){return!!this.isValid()&&!this._isUTC}function Xa(){return!!this.isValid()&&this._isUTC}function Ya(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Za(a,b){var c,d,e,g=a,h=null;return Ja(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Vd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[xd])*c,h:r(h[yd])*c,m:r(h[zd])*c,s:r(h[Ad])*c,ms:r(h[Bd])*c}):(h=Wd.exec(a))?(c="-"===h[1]?-1:1,g={y:$a(h[2],c),M:$a(h[3],c),d:$a(h[4],c),h:$a(h[5],c),m:$a(h[6],c),s:$a(h[7],c),w:$a(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=ab(Ea(g.from),Ea(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ia(g),Ja(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function $a(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function _a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function ab(a,b){var c;return a.isValid()&&b.isValid()?(b=Ma(b,a),a.isBefore(b)?c=_a(a,b):(c=_a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function bb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ga(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Za(c,d),cb(this,e,a),this}}function cb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;b.isValid()&&(e=null==e||e,f&&b._d.setTime(+b._d+f*d),g&&G(b,"Date",F(b,"Date")+g*d),h&&Z(b,F(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function db(a,b){var c=a||Ea(),d=Ma(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(D(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ea(c)))}function eb(){return new o(this)}function fb(a,b){var c=p(a)?a:Ea(a);return!(!this.isValid()||!c.isValid())&&(b=B(m(b)?"millisecond":b),"millisecond"===b?+this>+c:+c<+this.clone().startOf(b))}function gb(a,b){var c=p(a)?a:Ea(a);return!(!this.isValid()||!c.isValid())&&(b=B(m(b)?"millisecond":b),"millisecond"===b?+c>+this:+this.clone().endOf(b)<+c)}function hb(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)}function ib(a,b){var c,d=p(a)?a:Ea(a);return!(!this.isValid()||!d.isValid())&&(b=B(b||"millisecond"),"millisecond"===b?+this==+d:(c=+d,+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b)))}function jb(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function kb(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function lb(a,b,c){var d,e,f,g;return this.isValid()?(d=Ma(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=B(b),"year"===b||"month"===b||"quarter"===b?(g=mb(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:q(g)):NaN):NaN}function mb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function nb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ob(){var a=this.clone().utc();return 0f&&(b=f),Ob.call(this,a,b,c,d,e))}function Ob(a,b,c,d,e){var f=pa(a,b,c,d,e),g=ka(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Pb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Qb(a){return qa(a,this._week.dow,this._week.doy).week}function Rb(){return this._week.dow}function Sb(){return this._week.doy}function Tb(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ub(a){var b=qa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function Vb(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Wb(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function Xb(a){return this._weekdaysShort[a.day()]}function Yb(a){return this._weekdaysMin[a.day()]}function Zb(a,b,c){var d,e,f;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=Ea([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function $b(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Vb(a,this.localeData()),this.add(a-b,"d")):b}function _b(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function ac(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function bc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function cc(){return this.hours()%12||12}function dc(a,b){J(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function ec(a,b){return b._meridiemParse}function fc(a){return"p"===(a+"").toLowerCase().charAt(0)}function gc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function hc(a,b){b[Bd]=r(1e3*("0."+a))}function ic(){return this._isUTC?"UTC":""}function jc(){return this._isUTC?"Coordinated Universal Time":""}function kc(a){return Ea(1e3*a)}function lc(){return Ea.apply(null,arguments).parseZone()}function mc(a,b,c){var d=this._calendar[a];return D(d)?d.call(b,c):d}function nc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function oc(){return this._invalidDate}function pc(a){return this._ordinal.replace("%d",a)}function qc(a){return a}function rc(a,b,c,d){var e=this._relativeTime[c];return D(e)?e(a,b,c,d):e.replace(/%d/i,a)}function sc(a,b){var c=this._relativeTime[a>0?"future":"past"];return D(c)?c(b):c.replace(/%s/i,b)}function tc(a){var b,c;for(c in a)b=a[c],D(b)?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function uc(a,b,c,d){var e=z(),f=h().set(d,b);return e[c](f,a)}function vc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return uc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=uc(a,f,c,e);return g}function wc(a,b){return vc(a,b,"months",12,"month")}function xc(a,b){return vc(a,b,"monthsShort",12,"month")}function yc(a,b){return vc(a,b,"weekdays",7,"day")}function zc(a,b){return vc(a,b,"weekdaysShort",7,"day")}function Ac(a,b){return vc(a,b,"weekdaysMin",7,"day")}function Bc(){var a=this._data;return this._milliseconds=se(this._milliseconds),this._days=se(this._days),this._months=se(this._months),a.milliseconds=se(a.milliseconds),a.seconds=se(a.seconds),a.minutes=se(a.minutes),a.hours=se(a.hours),a.months=se(a.months),a.years=se(a.years),this}function Cc(a,b,c,d){var e=Za(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Dc(a,b){return Cc(this,a,b,1)}function Ec(a,b){return Cc(this,a,b,-1)}function Fc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Gc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Fc(Ic(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Hc(g)),h+=e,g-=Fc(Ic(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Hc(a){return 4800*a/146097}function Ic(a){return 146097*a/4800}function Jc(a){var b,c,d=this._milliseconds;if("month"===(a=B(a))||"year"===a)return b=this._days+d/864e5,c=this._months+Hc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Ic(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Kc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Lc(a){return function(){return this.as(a)}}function Mc(a){return a=B(a),this[a+"s"]()}function Nc(a){return function(){return this._data[a]}}function Oc(){return q(this.days()/7)}function Pc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Qc(a,b,c){var d=Za(a).abs(),e=Ie(d.as("s")),f=Ie(d.as("m")),g=Ie(d.as("h")),h=Ie(d.as("d")),i=Ie(d.as("M")),j=Ie(d.as("y")),k=e=f&&["m"]||f=g&&["h"]||g=h&&["d"]||h=i&&["M"]||i=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,Pc.apply(null,k)}function Rc(a,b){return void 0!==Je[a]&&(void 0===b?Je[a]:(Je[a]=b,!0))}function Sc(a){var b=this.localeData(),c=Qc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Tc(){var a,b,c,d=Ke(this._milliseconds)/1e3,e=Ke(this._days),f=Ke(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Uc,Vc,Wc=a.momentProperties=[],Xc=!1,Yc={},Zc={},$c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ad={},bd={},cd=/\d/,dd=/\d\d/,ed=/\d{3}/,fd=/\d{4}/,gd=/[+-]?\d{6}/,hd=/\d\d?/,id=/\d\d\d\d?/,jd=/\d\d\d\d\d\d?/,kd=/\d{1,3}/,ld=/\d{1,4}/,md=/[+-]?\d{1,6}/,nd=/\d+/,od=/[+-]?\d+/,pd=/Z|[+-]\d\d:?\d\d/gi,qd=/Z|[+-]\d\d(?::?\d\d)?/gi,rd=/[+-]?\d+(\.\d{1,3})?/,sd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,td={},ud={},vd=0,wd=1,xd=2,yd=3,zd=4,Ad=5,Bd=6,Cd=7,Dd=8;J("M",["MM",2],"Mo",function(){return this.month()+1}),J("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),J("MMMM",0,0,function(a){return this.localeData().months(this,a)}),A("month","M"),O("M",hd),O("MM",hd,dd),O("MMM",function(a,b){return b.monthsShortRegex(a)}),O("MMMM",function(a,b){return b.monthsRegex(a)}),S(["M","MM"],function(a,b){b[wd]=r(a)-1}),S(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[wd]=e:j(c).invalidMonth=a});var Ed=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Fd="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Gd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Hd=sd,Id=sd,Jd={};a.suppressDeprecationWarnings=!1;var Kd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ld=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Md=/Z|[+-]\d\d(?::?\d\d)?/,Nd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Od=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=fa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),J("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),J(0,["YY",2],0,function(){return this.year()%100}),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),A("year","y"),O("Y",od),O("YY",hd,dd),O("YYYY",ld,fd),O("YYYYY",md,gd),O("YYYYYY",md,gd),S(["YYYYY","YYYYYY"],vd),S("YYYY",function(b,c){c[vd]=2===b.length?a.parseTwoDigitYear(b):r(b)}),S("YY",function(b,c){c[vd]=a.parseTwoDigitYear(b)}),S("Y",function(a,b){b[vd]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var Qd=E("FullYear",!1);a.ISO_8601=function(){};var Rd=fa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),Sd=fa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),Td=function(){return Date.now?Date.now():+new Date};Ka("Z",":"),Ka("ZZ",""),O("Z",qd),O("ZZ",qd),S(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=La(qd,a)});var Ud=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var Vd=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Wd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Za.fn=Ia.prototype;var Xd=bb(1,"add"),Yd=bb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Zd=fa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});J(0,["gg",2],0,function(){return this.weekYear()%100}),J(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ib("gggg","weekYear"),Ib("ggggg","weekYear"),Ib("GGGG","isoWeekYear"),Ib("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),O("G",od),O("g",od),O("GG",hd,dd),O("gg",hd,dd),O("GGGG",ld,fd),O("gggg",ld,fd),O("GGGGG",md,gd),O("ggggg",md,gd),T(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),T(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),J("Q",0,"Qo","quarter"),A("quarter","Q"),O("Q",cd),S("Q",function(a,b){b[wd]=3*(r(a)-1)}),J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),O("w",hd),O("ww",hd,dd),O("W",hd),O("WW",hd,dd),T(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var $d={dow:0,doy:6};J("D",["DD",2],"Do","date"),A("date","D"),O("D",hd),O("DD",hd,dd),O("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),S(["D","DD"],xd),S("Do",function(a,b){b[xd]=r(a.match(hd)[0],10)});var _d=E("Date",!0);J("d",0,"do","day"),J("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),J("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),J("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),O("d",hd),O("e",hd),O("E",hd),O("dd",sd),O("ddd",sd),O("dddd",sd),T(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),T(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var ae="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ce="Su_Mo_Tu_We_Th_Fr_Sa".split("_");J("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),O("DDD",kd),O("DDDD",ed),S(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),J("H",["HH",2],0,"hour"),J("h",["hh",2],0,cc),J("hmm",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)}),J("hmmss",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),J("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),J("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),dc("a",!0),dc("A",!1),A("hour","h"),O("a",ec),O("A",ec),O("H",hd),O("h",hd),O("HH",hd,dd),O("hh",hd,dd),O("hmm",id),O("hmmss",jd),O("Hmm",id),O("Hmmss",jd),S(["H","HH"],yd),S(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),S(["h","hh"],function(a,b,c){b[yd]=r(a),j(c).bigHour=!0}),S("hmm",function(a,b,c){var d=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d)),j(c).bigHour=!0}),S("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d,2)),b[Ad]=r(a.substr(e)),j(c).bigHour=!0}),S("Hmm",function(a,b,c){var d=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d))}),S("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d,2)),b[Ad]=r(a.substr(e))});var de=/[ap]\.?m?\.?/i,ee=E("Hours",!0);J("m",["mm",2],0,"minute"),A("minute","m"),O("m",hd),O("mm",hd,dd),S(["m","mm"],zd);var fe=E("Minutes",!1);J("s",["ss",2],0,"second"),A("second","s"),O("s",hd),O("ss",hd,dd),S(["s","ss"],Ad);var ge=E("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return 10*this.millisecond()}),J(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),J(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),J(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),J(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),J(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),O("S",kd,cd),O("SS",kd,dd),O("SSS",kd,ed);var he;for(he="SSSS";he.length<=9;he+="S")O(he,nd);for(he="S";he.length<=9;he+="S")S(he,hc);var ie=E("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var je=o.prototype;je.add=Xd,je.calendar=db,je.clone=eb,je.diff=lb,je.endOf=xb,je.format=pb,je.from=qb,je.fromNow=rb,je.to=sb,je.toNow=tb,je.get=H,je.invalidAt=Gb,je.isAfter=fb,je.isBefore=gb,je.isBetween=hb,je.isSame=ib,je.isSameOrAfter=jb,je.isSameOrBefore=kb,je.isValid=Eb,je.lang=Zd,je.locale=ub, je.localeData=vb,je.max=Sd,je.min=Rd,je.parsingFlags=Fb,je.set=H,je.startOf=wb,je.subtract=Yd,je.toArray=Bb,je.toObject=Cb,je.toDate=Ab,je.toISOString=ob,je.toJSON=Db,je.toString=nb,je.unix=zb,je.valueOf=yb,je.creationData=Hb,je.year=Qd,je.isLeapYear=na,je.weekYear=Jb,je.isoWeekYear=Kb,je.quarter=je.quarters=Pb,je.month=$,je.daysInMonth=_,je.week=je.weeks=Tb,je.isoWeek=je.isoWeeks=Ub,je.weeksInYear=Mb,je.isoWeeksInYear=Lb,je.date=_d,je.day=je.days=$b,je.weekday=_b,je.isoWeekday=ac,je.dayOfYear=bc,je.hour=je.hours=ee,je.minute=je.minutes=fe,je.second=je.seconds=ge,je.millisecond=je.milliseconds=ie,je.utcOffset=Oa,je.utc=Qa,je.local=Ra,je.parseZone=Sa,je.hasAlignedHourOffset=Ta,je.isDST=Ua,je.isDSTShifted=Va,je.isLocal=Wa,je.isUtcOffset=Xa,je.isUtc=Ya,je.isUTC=Ya,je.zoneAbbr=ic,je.zoneName=jc,je.dates=fa("dates accessor is deprecated. Use date instead.",_d),je.months=fa("months accessor is deprecated. Use month instead",$),je.years=fa("years accessor is deprecated. Use year instead",Qd),je.zone=fa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Pa);var ke=je,le={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},me={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},pe=/\d{1,2}/,qe={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},re=t.prototype;re._calendar=le,re.calendar=mc,re._longDateFormat=me,re.longDateFormat=nc,re._invalidDate="Invalid date",re.invalidDate=oc,re._ordinal="%d",re.ordinal=pc,re._ordinalParse=pe,re.preparse=qc,re.postformat=qc,re._relativeTime=qe,re.relativeTime=rc,re.pastFuture=sc,re.set=tc,re.months=W,re._months=Fd,re.monthsShort=X,re._monthsShort=Gd,re.monthsParse=Y,re._monthsRegex=Id,re.monthsRegex=ba,re._monthsShortRegex=Hd,re.monthsShortRegex=aa,re.week=Qb,re._week=$d,re.firstDayOfYear=Sb,re.firstDayOfWeek=Rb,re.weekdays=Wb,re._weekdays=ae,re.weekdaysMin=Yb,re._weekdaysMin=ce,re.weekdaysShort=Xb,re._weekdaysShort=be,re.weekdaysParse=Zb,re.isPM=fc,re._meridiemParse=de,re.meridiem=gc,x("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10;return a+(1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th")}}),a.lang=fa("moment.lang is deprecated. Use moment.locale instead.",x),a.langData=fa("moment.langData is deprecated. Use moment.localeData instead.",z);var se=Math.abs,te=Lc("ms"),ue=Lc("s"),ve=Lc("m"),we=Lc("h"),xe=Lc("d"),ye=Lc("w"),ze=Lc("M"),Ae=Lc("y"),Be=Nc("milliseconds"),Ce=Nc("seconds"),De=Nc("minutes"),Ee=Nc("hours"),Fe=Nc("days"),Ge=Nc("months"),He=Nc("years"),Ie=Math.round,Je={s:45,m:45,h:22,d:26,M:11},Ke=Math.abs,Le=Ia.prototype;return Le.abs=Bc,Le.add=Dc,Le.subtract=Ec,Le.as=Jc,Le.asMilliseconds=te,Le.asSeconds=ue,Le.asMinutes=ve,Le.asHours=we,Le.asDays=xe,Le.asWeeks=ye,Le.asMonths=ze,Le.asYears=Ae,Le.valueOf=Kc,Le._bubble=Gc,Le.get=Mc,Le.milliseconds=Be,Le.seconds=Ce,Le.minutes=De,Le.hours=Ee,Le.days=Fe,Le.weeks=Oc,Le.months=Ge,Le.years=He,Le.humanize=Sc,Le.toISOString=Tc,Le.toString=Tc,Le.toJSON=Tc,Le.locale=ub,Le.localeData=vb,Le.toIsoString=fa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Tc),Le.lang=Zd,J("X",0,0,"unix"),J("x",0,0,"valueOf"),O("x",od),O("X",rd),S("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),S("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.11.2",function(a){Uc=a}(Ea),a.fn=ke,a.min=Ga,a.max=Ha,a.now=Td,a.utc=h,a.unix=kc,a.months=wc,a.isDate=d,a.locale=x,a.invalid=l,a.duration=Za,a.isMoment=p,a.weekdays=yc,a.parseZone=lc,a.localeData=z,a.isDuration=Ja,a.monthsShort=xc,a.weekdaysMin=Ac,a.defineLocale=y,a.weekdaysShort=zc,a.normalizeUnits=B,a.relativeTimeThreshold=Rc,a.prototype=ke,a}),function(){"use strict";function NgParallaxModule($window,$timeout){return{restrict:"AE",scope:{pattern:"=",speed:"=",first:"=",pageHero:"=",headerImagePositionY:"=",v2:"="},link:function(scope,elem,attr){var resizeTimeout,bgObj=elem[0],isIos=(function(){navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)}(),function(){return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)}()),offsetTop=bgObj.offsetTop,execute=(bgObj.clientTop,function(){var scrollTop=void 0!==$window.pageYOffset?$window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,scrollValue=scope.first?scrollTop:scrollTop-offsetTop,parallaxOffset=0;parallaxOffset=scrollValue*scope.speed*-1,1==scope.pageHero&&(parallaxOffset-=(document.documentElement.clientHeight-bgObj.clientHeight)/(100/(scope.headerImagePositionY?parseInt(scope.headerImagePositionY.replace("%","")):50))),1==scope.v2&&(parallaxOffset=-.5*(scrollTop+.5*bgObj.clientHeight-offsetTop)+(document.documentElement.clientHeight-bgObj.clientHeight)),bgObj.style.backgroundPosition=0==parallaxOffset||isIos?"50% "+(scope.headerImagePositionY||"50%"):"50% calc("+(scope.headerImagePositionY||"50%")+" + "+parallaxOffset+"px)",resizeHandler()}),resizeHandler=function(){resizeTimeout||(resizeTimeout=$timeout(function(){resizeTimeout=null,actualResizeHandler()},200))},actualResizeHandler=function(){offsetTop=bgObj.offsetTop};bgObj.style.height="100%",bgObj.style.margin="0 auto",bgObj.style.position="relative",bgObj.style.background="url("+scope.pattern+")",bgObj.style.backgroundRepeat="repeat",bgObj.style.backgroundSize="cover",bgObj.style.backgroundAttachment=isIos?"scroll":"fixed",$timeout(function(){$window.addEventListener("resize",resizeHandler,!1),$window.document.addEventListener("touchmove",execute),$window.document.addEventListener("scroll",execute),execute()},1)}}}angular.module("ngParallax",[]).directive("ngParallax",["$window","$timeout",NgParallaxModule])}(),function(){"use strict";function DatePickerCtrl($scope,$mdDialog,$mdMedia,$timeout,currentDate,options){var self=this;this.date=moment(currentDate),this.minDate=options.minDate&&moment(options.minDate).isValid()?moment(options.minDate):null,this.maxDate=options.maxDate&&moment(options.maxDate).isValid()?moment(options.maxDate):null,this.displayFormat=options.displayFormat||"ddd, MMM DD",this.dateFilter=angular.isFunction(options.dateFilter)?options.dateFilter:null,this.selectingYear=!1,this.minDate&&this.maxDate&&this.maxDate.isBefore(this.minDate)&&(this.maxDate=moment(this.minDate).add(1,"days")),this.date&&(this.minDate&&this.date.isBefore(this.minDate)&&(this.date=moment(this.minDate)),this.maxDate&&this.date.isAfter(this.maxDate)&&(this.date=moment(this.maxDate))),this.yearItems={currentIndex_:0,PAGE_SIZE:5,START:self.minDate?self.minDate.year():1900,END:self.maxDate?self.maxDate.year():0,getItemAtIndex:function(index){return this.currentIndex_firstDay&&(day={value:i-firstDay,enabled:self.isDayEnabled(moment(self.date).date(i-firstDay).toDate())}),arr.push(day)}return arr},this.isDayEnabled=function(day){return!(this.minDate&&!(this.minDate<=day)||this.maxDate&&!(this.maxDate>=day)||self.dateFilter&&self.dateFilter(day))},this.selectDate=function(dom){self.date.date(dom)},this.nextMonth=function(){self.date.add(1,"months")},this.prevMonth=function(){self.date.subtract(1,"months")},this.updateDaysInMonth=function(){self.daysInMonth=self.getDaysInMonth()},$scope.$watch(function(){return self.date.unix()},function(newValue,oldValue){newValue&&newValue!==oldValue&&self.updateDaysInMonth()}),self.updateDaysInMonth()}function formatValidator(value,format){return!value||angular.isDate(value)||moment(value,format,!0).isValid()}function minDateValidator(value,format,minDate){var minDate=moment(minDate,"YYYY-MM-DD",!0),date=angular.isDate(value)?moment(value):moment(value,format,!0);return!value||angular.isDate(value)||!minDate.isValid()||date.isSameOrAfter(minDate)}function maxDateValidator(value,format,maxDate){var maxDate=moment(maxDate,"YYYY-MM-DD",!0),date=angular.isDate(value)?moment(value):moment(value,format,!0);return!value||angular.isDate(value)||!maxDate.isValid()||date.isSameOrBefore(maxDate)}function filterValidator(value,format,filter){var date=angular.isDate(value)?moment(value):moment(value,format,!0);return!value||angular.isDate(value)||!angular.isFunction(filter)||!filter(date)}function TimePickerCtrl($scope,$mdDialog,time,autoSwitch,$mdMedia){var self=this;this.VIEW_HOURS=1,this.VIEW_MINUTES=2,this.currentView=this.VIEW_HOURS,this.time=moment(time),this.autoSwitch=!!autoSwitch,this.clockHours=parseInt(this.time.format("h")),this.clockMinutes=parseInt(this.time.minutes()),$scope.$mdMedia=$mdMedia,this.switchView=function(){self.currentView=self.currentView==self.VIEW_HOURS?self.VIEW_MINUTES:self.VIEW_HOURS},this.setAM=function(){self.time.hours()>=12&&self.time.hour(self.time.hour()-12)},this.setPM=function(){self.time.hours()<12&&self.time.hour(self.time.hour()+12)},this.cancel=function(){$mdDialog.cancel()},this.confirm=function(){$mdDialog.hide(this.time.toDate())}}function ClockCtrl($scope){var self=this;this.STEP_DEG=30,this.steps=[],this.CLOCK_TYPES={hours:{range:12},minutes:{range:60}},this.getPointerStyle=function(){var divider=1;switch(self.type){case"hours":divider=12;break;case"minutes":divider=60}var degrees=Math.round(self.selected*(360/divider))-180;return{"-webkit-transform":"rotate("+degrees+"deg)","-ms-transform":"rotate("+degrees+"deg)",transform:"rotate("+degrees+"deg)"}},this.setTimeByDeg=function(deg){deg=deg>=360?0:deg;var divider=0;switch(self.type){case"hours":divider=12;break;case"minutes":divider=60}self.setTime(Math.round(divider/360*deg))},this.setTime=function(time,type){switch(this.selected=time,self.type){case"hours":"PM"==self.time.format("A")&&(time+=12),this.time.hours(time);break;case"minutes":time>59&&(time-=60),this.time.minutes(time)}},this.init=function(){switch(self.type=self.type||"hours",self.type){case"hours":for(var i=1;i<=12;i++)self.steps.push(i);self.selected=self.time.hours()||0,self.selected>12&&(self.selected-=12);break;case"minutes":for(var i=5;i<=55;i+=5)self.steps.push(i);self.steps.push(0),self.selected=self.time.minutes()||0}},this.init()}var module=angular.module("mdPickers",["ngMaterial","ngAnimate","ngAria"]);module.config(["$mdIconProvider","mdpIconsRegistry",function($mdIconProvider,mdpIconsRegistry){angular.forEach(mdpIconsRegistry,function(icon,index){$mdIconProvider.icon(icon.id,icon.url)})}]),module.run(["$templateCache","mdpIconsRegistry",function($templateCache,mdpIconsRegistry){angular.forEach(mdpIconsRegistry,function(icon,index){$templateCache.put(icon.url,icon.svg)})}]),module.constant("mdpIconsRegistry",[{id:"mdp-chevron-left",url:"mdp-chevron-left.svg",svg:''},{id:"mdp-chevron-right",url:"mdp-chevron-right.svg",svg:''},{id:"mdp-access-time",url:"mdp-access-time.svg",svg:''},{id:"mdp-event",url:"mdp-event.svg",svg:''}]),module.directive("ngMessage",["$mdUtil",function($mdUtil){return{restrict:"EA",priority:101,compile:function(element){if($mdUtil.getClosest(element,"mdp-time-picker",!0)||$mdUtil.getClosest(element,"mdp-date-picker",!0))return element.toggleClass("md-input-message-animation",!0),{}}}}]),module.provider("$mdpDatePicker",function(){var LABEL_OK="OK",LABEL_CANCEL="Cancel",DISPLAY_FORMAT="ddd, MMM DD";this.setDisplayFormat=function(format){DISPLAY_FORMAT=format},this.setOKButtonLabel=function(label){LABEL_OK=label},this.setCancelButtonLabel=function(label){LABEL_CANCEL=label},this.$get=["$mdDialog",function($mdDialog){return function(currentDate,options){return angular.isDate(currentDate)||(currentDate=Date.now()),angular.isObject(options)||(options={}),options.displayFormat=DISPLAY_FORMAT,$mdDialog.show({controller:["$scope","$mdDialog","$mdMedia","$timeout","currentDate","options",DatePickerCtrl],controllerAs:"datepicker",clickOutsideToClose:!0,template:'
'+(options.dateLabel?''+options.dateLabel+"":"")+'{{ datepicker.date.format(datepicker.displayFormat) }}
{{ item }}
'+LABEL_CANCEL+''+LABEL_OK+"
",targetEvent:options.targetEvent,locals:{currentDate:currentDate,options:options},skipHide:!0})}}]}),module.directive("mdpCalendar",["$animate",function($animate){return{restrict:"E",bindToController:{date:"=",minDate:"=",maxDate:"=",dateFilter:"="},template:'
{{ calendar.date.format("MMMM YYYY") }}
{{ d }}
{{ day.value }}
',controller:["$scope",CalendarCtrl],controllerAs:"calendar",link:function(scope,element,attrs,ctrl){var animElements=[element[0].querySelector(".mdp-calendar-week-days"),element[0].querySelector(".mdp-calendar-days"),element[0].querySelector(".mdp-calendar-monthyear")].map(function(a){return angular.element(a)});scope.$watch(function(){return ctrl.date.format("YYYYMM")},function(newValue,oldValue){var direction=null;if(newValue>oldValue?direction="mdp-animate-next":newValue"},scope:{minDate:"=mdpMinDate",maxDate:"=mdpMaxDate",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat",placeholder:"@mdpPlaceholder",noFloat:"=mdpNoFloat",openOnClick:"=mdpOpenOnClick",disabled:"=?mdpDisabled"},link:{pre:function(scope,element,attrs,ngModel,$transclude){},post:function(scope,element,attrs,ngModel,$transclude){function updateInputElement(value){inputElement[0].value=value,inputContainerCtrl.setHasValue(!ngModel.$isEmpty(value))}function updateDate(date){var value=moment(date,angular.isDate(date)?null:scope.dateFormat,!0),strValue=value.format(scope.dateFormat);value.isValid()?(updateInputElement(strValue),ngModel.$setViewValue(strValue)):(updateInputElement(date),ngModel.$setViewValue(date)),!ngModel.$pristine&&messages.hasClass("md-auto-hide")&&inputContainer.hasClass("md-input-invalid")&&messages.removeClass("md-auto-hide"),ngModel.$render()}function onInputElementEvents(event){event.target.value!==ngModel.$viewVaue&&updateDate(event.target.value)}var inputElement=angular.element(element[0].querySelector("input")),inputContainer=angular.element(element[0].querySelector("md-input-container")),inputContainerCtrl=inputContainer.controller("mdInputContainer");$transclude(function(clone){inputContainer.append(clone)});var messages=angular.element(inputContainer[0].querySelector("[ng-messages]"));scope.type=scope.dateFormat?"text":"date",scope.dateFormat=scope.dateFormat||"YYYY-MM-DD",scope.model=ngModel,scope.isError=function(){return!ngModel.$pristine&&!!ngModel.$invalid},ngModel.$formatters.unshift(function(value){var date=angular.isDate(value)&&moment(value);updateInputElement(date&&date.isValid()?date.format(scope.dateFormat):null)}),ngModel.$validators.format=function(modelValue,viewValue){return formatValidator(viewValue,scope.dateFormat)},ngModel.$validators.minDate=function(modelValue,viewValue){return minDateValidator(viewValue,scope.dateFormat,scope.minDate)},ngModel.$validators.maxDate=function(modelValue,viewValue){return maxDateValidator(viewValue,scope.dateFormat,scope.maxDate)},ngModel.$validators.filter=function(modelValue,viewValue){return filterValidator(viewValue,scope.dateFormat,scope.dateFilter)},ngModel.$validators.required=function(modelValue,viewValue){return angular.isUndefined(attrs.required)||!ngModel.$isEmpty(modelValue)||!ngModel.$isEmpty(viewValue)},ngModel.$parsers.unshift(function(value){var parsed=moment(value,scope.dateFormat,!0);if(parsed.isValid()){if(angular.isDate(ngModel.$modelValue)){var originalModel=moment(ngModel.$modelValue);originalModel.year(parsed.year()),originalModel.month(parsed.month()),originalModel.date(parsed.date()),parsed=originalModel}return parsed.toDate()}return null}),scope.showPicker=function(ev){$mdpDatePicker(ngModel.$modelValue,{minDate:scope.minDate,maxDate:scope.maxDate,dateFilter:scope.dateFilter,targetEvent:ev}).then(updateDate)},inputElement.on("reset input blur",onInputElementEvents),scope.$on("$destroy",function(){inputElement.off("reset input blur",onInputElementEvents)})}}}}]),module.directive("mdpDatePicker",["$mdpDatePicker","$timeout",function($mdpDatePicker,$timeout){return{restrict:"A",require:"ngModel",scope:{minDate:"@min",maxDate:"@max",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat"},link:function(scope,element,attrs,ngModel,$transclude){function showPicker(ev){$mdpDatePicker(ngModel.$modelValue,{minDate:scope.minDate,maxDate:scope.maxDate,dateFilter:scope.dateFilter,targetEvent:ev}).then(function(time){ngModel.$setViewValue(moment(time).format(scope.format)),ngModel.$render()})}scope.dateFormat=scope.dateFormat||"YYYY-MM-DD",ngModel.$validators.format=function(modelValue,viewValue){return formatValidator(viewValue,scope.format)},ngModel.$validators.minDate=function(modelValue,viewValue){return minDateValidator(viewValue,scope.format,scope.minDate)},ngModel.$validators.maxDate=function(modelValue,viewValue){return maxDateValidator(viewValue,scope.format,scope.maxDate)},ngModel.$validators.filter=function(modelValue,viewValue){return filterValidator(viewValue,scope.format,scope.dateFilter)},element.on("click",showPicker),scope.$on("$destroy",function(){element.off("click",showPicker)})}}}]),module.directive("mdpClock",["$animate","$timeout",function($animate,$timeout){return{restrict:"E",bindToController:{type:"@?",time:"=",autoSwitch:"=?"},replace:!0,template:'
{{ step }}
',controller:["$scope",ClockCtrl],controllerAs:"clock",link:function(scope,element,attrs,ctrl){var timepickerCtrl=(angular.element(element[0].querySelector(".mdp-pointer")),scope.$parent.timepicker),onEvent=function(event){var containerCoords=event.currentTarget.getClientRects()[0],x=event.currentTarget.offsetWidth/2-(event.pageX-containerCoords.left),y=event.pageY-containerCoords.top-event.currentTarget.offsetHeight/2,deg=Math.round(Math.atan2(x,y)*(180/Math.PI));$timeout(function(){ctrl.setTimeByDeg(deg+180),ctrl.autoSwitch&&-1!==["mouseup","click"].indexOf(event.type)&&timepickerCtrl&&timepickerCtrl.switchView()})};element.on("mousedown",function(){element.on("mousemove",onEvent)}),element.on("mouseup",function(e){element.off("mousemove")}),element.on("click",onEvent),scope.$on("$destroy",function(){element.off("click",onEvent),element.off("mousemove",onEvent)})}}}]),module.provider("$mdpTimePicker",function(){var LABEL_OK="OK",LABEL_CANCEL="Cancel";this.setOKButtonLabel=function(label){LABEL_OK=label},this.setCancelButtonLabel=function(label){LABEL_CANCEL=label},this.$get=["$mdDialog",function($mdDialog){return function(time,options){return angular.isDate(time)||(time=Date.now()),angular.isObject(options)||(options={}),$mdDialog.show({controller:["$scope","$mdDialog","time","autoSwitch","$mdMedia",TimePickerCtrl],controllerAs:"timepicker",clickOutsideToClose:!0,template:'
{{ timepicker.time.format("h") }}:{{ timepicker.time.format("mm") }}
AMPM
'+LABEL_CANCEL+''+LABEL_OK+"
",targetEvent:options.targetEvent,locals:{time:time,autoSwitch:options.autoSwitch},skipHide:!0})}}]}),module.directive("mdpTimePicker",["$mdpTimePicker","$timeout",function($mdpTimePicker,$timeout){return{restrict:"E",require:"ngModel",transclude:!0,template:function(element,attrs){var noFloat=angular.isDefined(attrs.mdpNoFloat),placeholder=angular.isDefined(attrs.mdpPlaceholder)?attrs.mdpPlaceholder:"",openOnClick=!!angular.isDefined(attrs.mdpOpenOnClick);return'
"},scope:{timeFormat:"@mdpFormat",placeholder:"@mdpPlaceholder",autoSwitch:"=?mdpAutoSwitch",disabled:"=?mdpDisabled"},link:function(scope,element,attrs,ngModel,$transclude){function updateInputElement(value){inputElement[0].value=value,inputContainerCtrl.setHasValue(!ngModel.$isEmpty(value))}function updateTime(time){var value=moment(time,angular.isDate(time)?null:scope.timeFormat,!0),strValue=value.format(scope.timeFormat);value.isValid()?(updateInputElement(strValue),ngModel.$setViewValue(strValue)):(updateInputElement(time),ngModel.$setViewValue(time)),!ngModel.$pristine&&messages.hasClass("md-auto-hide")&&inputContainer.hasClass("md-input-invalid")&&messages.removeClass("md-auto-hide"),ngModel.$render()}function onInputElementEvents(event){event.target.value!==ngModel.$viewVaue&&updateTime(event.target.value)}var inputElement=angular.element(element[0].querySelector("input")),inputContainer=angular.element(element[0].querySelector("md-input-container")),inputContainerCtrl=inputContainer.controller("mdInputContainer");$transclude(function(clone){inputContainer.append(clone)});var messages=angular.element(inputContainer[0].querySelector("[ng-messages]"));scope.type=scope.timeFormat?"text":"time",scope.timeFormat=scope.timeFormat||"HH:mm",scope.autoSwitch=scope.autoSwitch||!1,scope.$watch(function(){return ngModel.$error},function(newValue,oldValue){inputContainerCtrl.setInvalid(!ngModel.$pristine&&!!Object.keys(ngModel.$error).length)},!0),ngModel.$formatters.unshift(function(value){var time=angular.isDate(value)&&moment(value);updateInputElement(time&&time.isValid()?time.format(scope.timeFormat):null)}),ngModel.$validators.format=function(modelValue,viewValue){return!viewValue||angular.isDate(viewValue)||moment(viewValue,scope.timeFormat,!0).isValid()},ngModel.$validators.required=function(modelValue,viewValue){return angular.isUndefined(attrs.required)||!ngModel.$isEmpty(modelValue)||!ngModel.$isEmpty(viewValue)},ngModel.$parsers.unshift(function(value){var parsed=moment(value,scope.timeFormat,!0);if(parsed.isValid()){if(angular.isDate(ngModel.$modelValue)){var originalModel=moment(ngModel.$modelValue);originalModel.minutes(parsed.minutes()),originalModel.hours(parsed.hours()),originalModel.seconds(parsed.seconds()),parsed=originalModel}return parsed.toDate()}return null}),scope.showPicker=function(ev){$mdpTimePicker(ngModel.$modelValue,{targetEvent:ev,autoSwitch:scope.autoSwitch}).then(function(time){updateTime(time,!0)})},inputElement.on("reset input blur",onInputElementEvents),scope.$on("$destroy",function(){inputElement.off("reset input blur",onInputElementEvents)})}}}]),module.directive("mdpTimePicker",["$mdpTimePicker","$timeout",function($mdpTimePicker,$timeout){return{restrict:"A",require:"ngModel",scope:{timeFormat:"@mdpFormat",autoSwitch:"=?mdpAutoSwitch"},link:function(scope,element,attrs,ngModel,$transclude){function showPicker(ev){$mdpTimePicker(ngModel.$modelValue,{targetEvent:ev,autoSwitch:scope.autoSwitch}).then(function(time){ngModel.$setViewValue(moment(time).format(scope.format)),ngModel.$render()})}scope.format=scope.format||"HH:mm",element.on("click",showPicker),scope.$on("$destroy",function(){element.off("click",showPicker)})}}}])}(),function(angular){angular.module("ui.carousel.config",[]).value("ui.carousel.config",{debug:!1}),angular.module("ui.carousel.providers",[]),angular.module("ui.carousel.controllers",[]),angular.module("ui.carousel.directives",[]),angular.module("ui.carousel",["ui.carousel.config","ui.carousel.directives","ui.carousel.controllers","ui.carousel.providers"])}(angular), angular.module("ui.carousel.controllers").controller("UICarouselController",["$scope","$element","$timeout","$q","Carousel","$window",function($scope,$element,$timeout,$q,Carousel,$window){var _this=this;this.$onInit=function(){_this.initOptions(),_this.initRanges(),_this.setProps(),_this.setupInfinite()},this.initOptions=function(){_this.options=angular.extend({},Carousel.getOptions()),void 0!==_this.initialSlide&&(_this.options.initialSlide=_this.initialSlide),void 0!==_this.fade&&(_this.options.fade=_this.fade),void 0!==_this.autoplayOn&&(_this.options.autoplayOn=_this.autoplayOn),void 0!==_this.autoplaySpeed&&(_this.options.autoplaySpeed=_this.autoplaySpeed),void 0!==_this.cssEase&&(_this.options.cssEase=_this.cssEase),void 0!==_this.speed&&(_this.options.speed=_this.speed),void 0!==_this.infinite&&(_this.options.infinite=_this.infinite),void 0!==_this.arrows&&(_this.options.arrows=_this.arrows),void 0!==_this.dots&&(_this.options.dots=_this.dots),void 0!==_this.visiblePrev&&(_this.options.visiblePrev=_this.visiblePrev),void 0!==_this.visibleNext&&(_this.options.visibleNext=_this.visibleNext),void 0!==_this.currentGallery&&(_this.options.currentGallery=_this.currentGallery),_this.options.fade?(_this.options.slidesToShow=1,_this.options.slidesToScroll=1):(_this.show&&(_this.options.slidesToShow=_this.show),_this.scroll&&(_this.options.slidesToScroll=_this.scroll))},this.initRanges=function(){_this.slides||(_this.slides=[]),_this.isCarouselReady=!1,_this.isTrackMoving=!1,_this.track=$element.find(".track"),_this.width=1,_this.currentSlide=_this.options.initialSlide,_this.trackStyle={},_this.slideStyle={},_this.isVisibleDots=!1,_this.isVisiblePrev=_this.options.visiblePrev,_this.isVisibleNext=_this.options.visibleNext,_this.isClickablePrev=!1,_this.isClickableNext=!1,_this.animType=null,_this.transformType=null,_this.transitionType=null},this.initUI=function(){_this.width=$element[0].clientWidth,_this.height=$element[0].clientHeight,$timeout(function(){_this.initTrack(),_this.updateItemStyle()},200)},this.updateItemStyle=function(){_this.itemWidth=_this.width/_this.options.slidesToShow,_this.slideStyle={width:_this.itemWidth+"px"}},this.initTrack=function(){var itemWidth=_this.width/_this.options.slidesToShow,trackWidth=itemWidth*_this.slidesInTrack.length;_this.trackStyle.width=trackWidth+"px",_this.slideHandler(_this.currentSlide).finally(function(){_this.isCarouselReady=!0,_this.options.fade||_this.refreshTrackStyle(),_this.onInit&&_this.onInit()}).catch(function(){})},this.next=function(){if(!_this.isClickableNext)return!1;var indexOffset=_this.getIndexOffset(),slideOffset=0===indexOffset?_this.options.slidesToScroll:indexOffset;_this.slideHandler(_this.currentSlide+slideOffset).catch(function(){})},this.prev=function(){if(!_this.isClickablePrev)return!1;var indexOffset=_this.getIndexOffset(),slideOffset=0===indexOffset?_this.options.slidesToScroll:_this.options.slidesToShow-indexOffset;_this.slideHandler(_this.currentSlide-slideOffset).catch(function(){})},this.getIndexOffset=function(){return _this.slides.length%_this.options.slidesToScroll!=0?0:(_this.slides.length-_this.currentSlide)%_this.options.slidesToScroll},this.movePage=function(page){var target=_this.options.slidesToScroll*page;_this.slideHandler(target).catch(function(){})},this.slideHandler=function(index){if(!_this.slides)return $q.reject("Carousel not fully setup");if(_this.isTrackMoving)return $q.reject("Track is moving");var len=_this.slides.length,show=_this.options.slidesToShow;if(len<=show)return _this.correctTrack(),$q.reject("Length of slides smaller than slides to show");var anim=index,target=null;if(target=anim<0?len%_this.options.slidesToScroll!=0?len-len%_this.options.slidesToScroll:len+anim:anim>=len?len%_this.options.slidesToScroll!=0?0:anim-len:anim,_this.onBeforeChange&&_this.onBeforeChange({currentSlide:_this.currentSlide,target:target}),_this.options.fade)return _this.currentSlide=target,$timeout(function(){_this.autoplayTrack(),_this.onAfterChange&&_this.onAfterChange({currentSlide:_this.currentSlide})},_this.options.speed),$q.when("Handler fade");var itemWidth=_this.width/_this.options.slidesToShow,left=-1*target*itemWidth;return _this.options.infinite&&(left=-1*(anim+show)*itemWidth),_this.isTrackMoving=!0,_this.moveTrack(left).then(function(){_this.isTrackMoving=!1,_this.currentSlide=target,_this.autoplayTrack(),target!==anim&&_this.correctTrack(),_this.options.infinite||(0===_this.currentSlide?(_this.isClickablePrev=!1,_this.isClickableNext=!0):_this.currentSlide===_this.slidesInTrack.length-_this.options.slidesToShow?(_this.isClickableNext=!1,_this.isClickablePrev=!0):(_this.isClickablePrev=!0,_this.isClickableNext=!0)),$timeout(function(){_this.onAfterChange&&_this.onAfterChange({currentSlide:_this.currentSlide})},200)})},this.moveTrack=function(left){var deferred=$q.defer();return!1===_this.options.vertical?_this.trackStyle[_this.animType]="translate3d("+left+"px, 0px, 0px)":_this.trackStyle[_this.animType]="translate3d(0px, "+left+"px, 0px)",$timeout(function(){deferred.resolve("Track moved")},_this.options.speed),deferred.promise},this.correctTrack=function(){_this.options.infinite&&function(){var left=0;_this.slides.length>_this.options.slidesToShow&&(left=-1*(_this.currentSlide+_this.options.slidesToShow)*_this.itemWidth),_this.trackStyle[_this.transitionType]=_this.transformType+" 0ms "+_this.options.cssEase,_this.isTrackMoving=!0,$timeout(function(){_this.trackStyle[_this.animType]="translate3d("+left+"px, 0, 0px)",$timeout(function(){_this.refreshTrackStyle(),_this.isTrackMoving=!1},200)})}()},this.refreshTrackStyle=function(){_this.trackStyle[_this.transitionType]=_this.transformType+" "+_this.options.speed+"ms "+_this.options.cssEase},this.autoplayTrack=function(){_this.options.autoplayOn&&(_this.timeout&&$timeout.cancel(_this.timeout),_this.timeout=$timeout(function(){_this.next(),$timeout.cancel(_this.timeout),_this.timeout=null},_this.options.autoplaySpeed))},this.getSlideStyle=function(index){var style=_this.slideStyle;if(_this.options.fade){var left=-1*index*_this.itemWidth,uniqueStyle={position:"relative",top:"0px",left:left+"px","z-index":index===_this.currentSlide?10:9,opacity:index===_this.currentSlide?1:0};index>=_this.currentSlide-1&&index<=_this.currentSlide+1&&(uniqueStyle.transition="opacity 250ms linear"),style=angular.extend(style,uniqueStyle)}return style},this.getSlideClass=function(index){return index===_this.currentSlide?"active":""},this.getSlideWidth=function(index){return Math.ceil(_this.itemWidth)},this.getSlideHeight=function(index){return Math.ceil(_this.height)},this.setupInfinite=function(){var len=_this.slides.length,show=_this.options.slidesToShow,tmpTrack=angular.copy(_this.slides);if(_this.options.infinite&&!1===_this.options.fade&&len>show){for(var number=show,i=0;i=len-show;_i--)tmpTrack.unshift(angular.copy(_this.slides[_i]))}_this.slidesInTrack=tmpTrack},this.getDots=function(){if(!_this.slides)return[];for(var dots=Math.ceil(_this.slides.length/_this.options.slidesToScroll),res=[],i=0;i_this.options.slidesToShow?(_this.isVisibleDots=!0,_this.isVisiblePrev=!0,_this.isVisibleNext=!0,_this.isClickablePrev=!0,_this.isClickableNext=!0):(_this.isVisibleDots=!1,_this.isVisiblePrev=_this.options.visiblePrev||!1,_this.isVisibleNext=_this.options.visibleNext||!1,_this.isClickablePrev=!1,_this.isClickableNext=!1),_this.initUI()},$scope.$watchCollection("ctrl.slides",function(slides){slides&&(_this.currentSlide>slides.length-1&&(_this.currentSlide=slides.length-1),_this.setupInfinite(),_this.refreshCarousel())}),angular.element($window).on("resize",this.refreshCarousel),$scope.$on("$destroy",function(){}),1===angular.version.major&&angular.version.minor<5&&this.$onInit()}]),angular.module("ui.carousel.directives").directive("uiCarousel",["$compile","$templateCache","$sce",function($compile,$templateCache,$sce){return{restrict:"AE",bindToController:!0,scope:{name:"=?",slides:"=",show:"=?slidesToShow",scroll:"=?slidesToScroll",classes:"@",fade:"=?",onChange:"=?",disableArrow:"=?",autoplayOn:"=?",autoplaySpeed:"=?",cssEase:"=?",speed:"=?",infinite:"=?",arrows:"=?",dots:"=?",initialSlide:"=?",visibleNext:"=?",visiblePrev:"=?",currentGallery:"=?",onBeforeChange:"&",onAfterChange:"&",onInit:"&"},link:function($scope,el,attrs){var template=angular.element($templateCache.get("ui-carousel/carousel.template.html")),injectComponentMap={"carousel-item":".carousel-item","carousel-prev":".carousel-prev","carousel-next":".carousel-next"},templateInstance=template.clone();angular.forEach(injectComponentMap,function(innerSelector,outerSelector){var outerElement=el[0].querySelector(outerSelector);outerElement&&angular.element(templateInstance[0].querySelector(innerSelector)).html(outerElement.innerHTML)});var compiledElement=$compile(templateInstance)($scope);el.addClass("ui-carousel").html("").append(compiledElement);try{$scope.photoPop=$scope.$parent.$parent.$parent.photoPop}catch(e){console.log(e)}try{$scope.popPhotos=$scope.$parent.vm.popPhotos}catch(e){console.log(e)}},controller:"UICarouselController",controllerAs:"ctrl"}}]),angular.module("ui.carousel.providers").provider("Carousel",function(){var _this=this;this.options={arrows:!0,autoplayOn:!1,autoplaySpeed:3e3,cssEase:"ease",dots:!1,easing:"linear",fade:!1,infinite:!0,initialSlide:0,slidesToShow:1,slidesToScroll:1,speed:500,visiblePrev:!1,visibleNext:!1,draggable:!0,lazyLoad:"ondemand",swipe:!0,swipeToSlide:!1,touchMove:!0,vertical:!1,verticalSwiping:!1,currentGallery:{}},this.$get=[function(){return{setOptions:function(options){_this.options=angular.extend(_this.options,options)},getOptions:function(){return _this.options}}}]}),function(module){try{module=angular.module("ui.carousel")}catch(e){module=angular.module("ui.carousel",[])}module.run(["$templateCache",function($templateCache){$templateCache.put("ui-carousel/carousel.template.html",'')}])}(),function(){"use strict";function inViewDirective($parse){return{restrict:"A",require:"?^^inViewContainer",link:function(scope,element,attrs,container){var options={};attrs.inViewOptions&&(options=scope.$eval(attrs.inViewOptions)),options.offset&&(options.offset=normalizeOffset(options.offset)),options.viewportOffset&&(options.viewportOffset=normalizeOffset(options.viewportOffset));var viewportEventSignal=signalSingle({type:"initial"}).merge(signalFromEvent(window,"checkInView click ready wheel mousewheel DomMouseScroll MozMousePixelScroll resize scroll touchmove mouseup keydown"));container&&(viewportEventSignal=viewportEventSignal.merge(container.eventsSignal)),options.throttle&&(viewportEventSignal=viewportEventSignal.throttle(options.throttle));var inviewInfoSignal=viewportEventSignal.map(function(event){var viewportRect;viewportRect=container?container.getViewportRect():getViewportRect(),viewportRect=offsetRect(viewportRect,options.viewportOffset);var elementRect=offsetRect(element[0].getBoundingClientRect(),options.offset),isVisible=!!(element[0].offsetWidth||element[0].offsetHeight||element[0].getClientRects().length),info={inView:isVisible&&intersectRect(elementRect,viewportRect),event:event,element:element,elementRect:elementRect,viewportRect:viewportRect};return options.generateParts&&info.inView&&(info.parts={},info.parts.top=elementRect.top>=viewportRect.top,info.parts.left=elementRect.left>=viewportRect.left,info.parts.bottom=elementRect.bottom<=viewportRect.bottom,info.parts.right=elementRect.right<=viewportRect.right),info}).scan({},function(lastInfo,newInfo){return options.generateDirection&&newInfo.inView&&lastInfo.elementRect&&(newInfo.direction={horizontal:newInfo.elementRect.left-lastInfo.elementRect.left,vertical:newInfo.elementRect.top-lastInfo.elementRect.top}),newInfo.changed=newInfo.inView!==lastInfo.inView||!angular.equals(newInfo.parts,lastInfo.parts)||!angular.equals(newInfo.direction,lastInfo.direction),newInfo}).filter(function(info){return!!info.changed&&!("initial"===info.event.type&&!info.inView)}),inViewExpression=$parse(attrs.inView),dispose=inviewInfoSignal.subscribe(function(info){scope.$applyAsync(function(){inViewExpression(scope,{$inview:info.inView,$inviewInfo:info})})});scope.$on("$destroy",dispose)}}}function inViewContainerDirective(){return{restrict:"A",controller:["$element",function($element){this.element=$element,this.eventsSignal=signalFromEvent($element,"scroll"),this.getViewportRect=function(){return $element[0].getBoundingClientRect()}}]}}function getViewportRect(){var result={top:0,left:0,width:window.innerWidth,right:window.innerWidth,height:window.innerHeight,bottom:window.innerHeight};return result.height?result:("CSS1Compat"===document.compatMode?(result.width=result.right=document.documentElement.clientWidth,result.height=result.bottom=document.documentElement.clientHeight):(result.width=result.right=document.body.clientWidth,result.height=result.bottom=document.body.clientHeight),result)}function intersectRect(r1,r2){return!(r2.left>r1.right||r2.rightr1.bottom||r2.bottom0}function QuickSignal(didSubscribeFunc){this.didSubscribeFunc=didSubscribeFunc}function signalMerge(){var signals=arguments;return new QuickSignal(function(subscriber){for(var disposables=[],i=signals.length-1;i>=0;i--)disposables.push(signals[i].subscribe(function(){subscriber.apply(null,arguments)}));subscriber.$dispose=function(){for(var i=disposables.length-1;i>=0;i--)disposables[i]&&disposables[i]()}})}function signalFromEvent(target,event){return new QuickSignal(function(subscriber){var handler=function(e){subscriber(e)},el=angular.element(target);event.split(" ").map(function(e){el[0].addEventListener(e,handler,!0)}),subscriber.$dispose=function(){event.split(" ").map(function(e){el[0].removeEventListener(e,handler,!0)})}})}function signalSingle(value){return new QuickSignal(function(subscriber){setTimeout(function(){subscriber(value)})})}angular.module("angular-inview",[]).directive("inView",["$parse",inViewDirective]).directive("inViewContainer",inViewContainerDirective),QuickSignal.prototype.subscribe=function(subscriber){return this.didSubscribeFunc(subscriber),function(){subscriber.$dispose&&(subscriber.$dispose(),subscriber.$dispose=null)}},QuickSignal.prototype.map=function(f){var s=this;return new QuickSignal(function(subscriber){subscriber.$dispose=s.subscribe(function(nextValue){subscriber(f(nextValue))})})},QuickSignal.prototype.filter=function(f){var s=this;return new QuickSignal(function(subscriber){subscriber.$dispose=s.subscribe(function(nextValue){f(nextValue)&&subscriber(nextValue)})})},QuickSignal.prototype.scan=function(initial,scanFunc){var s=this;return new QuickSignal(function(subscriber){var last=initial;subscriber.$dispose=s.subscribe(function(nextValue){last=scanFunc(last,nextValue),subscriber(last)})})},QuickSignal.prototype.merge=function(signal){return signalMerge(this,signal)},QuickSignal.prototype.throttle=function(threshhold){var last,deferTimer,s=this;return new QuickSignal(function(subscriber){var chainDisposable=s.subscribe(function(){var now=+new Date,args=arguments;last&&now
{{::day.name}}
{{::day.name}}
',controller:"mdDateRangePickerCtrl",link:function(scope,element,attributes,ctrl){scope.actionByKey=function(eventKey,eventParam,e){switch(eventKey){case"prev":scope.handleClickPrevMonth(e),scope.runIfNotInDigest();break;case"next":scope.handleClickNextMonth(e),scope.runIfNotInDigest();break;case"date1":scope.handleClickDate(e,scope.dates[eventParam])?scope.runIfNotInDigest(scope.triggerChange):scope.runIfNotInDigest();break;case"date2":scope.handleClickDate(e,scope.dates2[eventParam])?scope.runIfNotInDigest(scope.triggerChange):scope.runIfNotInDigest();break;case"TD":scope.handleClickSelectToday(),scope.runIfNotInDigest(scope.triggerChange);break;case"YD":scope.handleClickSelectYesterday(),scope.runIfNotInDigest(scope.triggerChange);break;case"TW":scope.handleClickSelectThisWeek(),scope.runIfNotInDigest(scope.triggerChange);break;case"LW":scope.handleClickSelectLastWeek(),scope.runIfNotInDigest(scope.triggerChange);break;case"TM":scope.handleClickSelectThisMonth(),scope.runIfNotInDigest(scope.triggerChange);break;case"LM":scope.handleClickSelectLastMonth(),scope.runIfNotInDigest(scope.triggerChange);break;case"TY":scope.handleClickSelectThisYear(),scope.runIfNotInDigest(scope.triggerChange);break;case"LY":scope.handleClickSelectLastYear(),scope.runIfNotInDigest(scope.triggerChange)}},scope.runIfNotInDigest=function(operation){null==scope.$root||scope.$root.$$phase||(scope.$apply(),operation&&"function"==typeof operation&&operation())},element.on("click",function(e){var eventKey=e.target.getAttribute("event-key"),eventParam=e.target.getAttribute("event-param");scope.actionByKey(eventKey,eventParam,e)}),scope.triggerChange=function(e){var $dates=$mdDateRangePicker.getSelectedDate(scope.dateStart,scope.dateEnd,scope.isDisabledDate,scope.maxRange,scope.minRange);scope.mdOnSelect&&scope.mdOnSelect({$dates:$dates})}}}}function mdDateRangePickerCtrl($scope,$filter){function selectCustomRange(tmpltKey,tmpltObj){$scope.dateStart=tmpltObj.dateStart,$scope.dateEnd=tmpltObj.dateEnd,$scope.selectedTemplate=tmpltKey,$scope.selectedTemplateName=$scope.selectedDateText()}function getLocalizationVal(val){return null!=$scope.localizationMap&&null!=$scope.localizationMap[val]?$scope.localizationMap[val]:val}function getFirstDayOfWeek(){return-1!==[void 0,null,"",NaN].indexOf($scope.firstDayOfWeek)?START_OF_WEEK:$scope.firstDayOfWeek}function fillDateGrid(currentDate){var ctr,day,dates=[],monthEndDate=(new Date(currentDate.getFullYear(),currentDate.getMonth(),1),new Date(currentDate.getFullYear(),currentDate.getMonth()+1,0)),firstDay=getFirstDayOfWeek();for(ctr=1;ctr<=monthEndDate.getDate();ctr++)dates.push(new Date(currentDate.getFullYear(),currentDate.getMonth(),ctr));for(day=dates[0].getDay(),ctr=0;day!==firstDay;)dates.unshift(new Date(currentDate.getFullYear(),currentDate.getMonth(),ctr)),day=day<=0?6:day-1,ctr--;for(day=(dates[dates.length-1].getDay()+1)%7,ctr=1;day!==firstDay;)dates.push(new Date(currentDate.getFullYear(),currentDate.getMonth()+1,ctr)),day=(day+1)%7,ctr++;return dates}function getDateDiff(date1,date2){if(date1&&date2){var _d1=new Date(date1.getFullYear(),date1.getMonth(),date1.getDate());return new Date(date2.getFullYear(),date2.getMonth(),date2.getDate())-_d1}}function inCurrentMonth(date,isSecondMonth){return isSecondMonth?date.getMonth()===$scope.activeMonth2&&date.getFullYear()===$scope.activeYear2:date.getMonth()===$scope.activeMonth&&date.getFullYear()===$scope.activeYear}function isInMaxRange(date){if(!$scope.dateStart)return!0;if(0!==getDateDiff($scope.dateStart,$scope.dateEnd))return!0;var diff=getDateDiff($scope.dateStart,date);return $scope.maxRange&&Math.abs(Math.ceil(diff/864e5))+1<=$scope.maxRange||!$scope.maxRange}function isInMinRange(date){if(!$scope.dateStart)return!0;if(0!==getDateDiff($scope.dateStart,$scope.dateEnd))return!0;var diff=getDateDiff($scope.dateStart,date);return $scope.minRange&&Math.abs(Math.ceil(diff/864e5))+1!=$scope.minRange||!$scope.minRange}function handleClickDate($event,date){var changed=!1,shouldConfirm=!1;if(0===getDateDiff($scope.dateStart,$scope.dateEnd)){if(0===getDateDiff($scope.dateStart,date))shouldConfirm=!0,changed=!0;else if(!$scope.isDisabledDate||!$scope.isDisabledDate({$date:date})){var diff=getDateDiff($scope.dateStart,date);diff>0?($scope.maxRange&&Math.abs(Math.ceil(diff/864e5))+1<=$scope.maxRange||!$scope.maxRange)&&($scope.minRange&&Math.ceil(diff/864e5)+1!=$scope.minRange||!$scope.minRange)&&($scope.dateEnd=date,shouldConfirm=!0,changed=!0):($scope.maxRange&&Math.abs(Math.ceil(diff/864e5))+1<=$scope.maxRange||!$scope.maxRange)&&($scope.minRange&&Math.abs(Math.ceil(diff/864e5))+1!=$scope.minRange||!$scope.minRange)&&($scope.dateStart=date,shouldConfirm=!0,changed=!0)}}else $scope.isDisabledDate&&$scope.isDisabledDate({$date:date})||($scope.dateStart=date,$scope.dateEnd=date,changed=!0);return changed&&($scope.selectedTemplate=!1,$scope.selectedTemplateName=$scope.selectedDateText()),shouldConfirm}function inSelectedDateRange(date){return!(!$scope.dateStart||!$scope.dateEnd)&&(getDateDiff($scope.dateStart,date)>=0&&0<=getDateDiff(date,$scope.dateEnd))}function updateActiveDate(isSecondMonth){var d=new Date($scope.activeYear,$scope.activeMonth,1),d2=new Date($scope.activeYear2,$scope.activeMonth2,1);isSecondMonth?(d=new Date($scope.activeYear2,$scope.activeMonth2-1,1),$scope.activeYear=d.getFullYear(),$scope.activeMonth=d.getMonth()):(d2=new Date($scope.activeYear,$scope.activeMonth+1,1),$scope.activeYear2=d2.getFullYear(),$scope.activeMonth2=d2.getMonth()), $scope.focusToDate(d)}function handleClickNextMonth($event){var d=new Date($scope.activeDate.getFullYear(),$scope.activeDate.getMonth()+1,1);$scope.focusToDate(d)}function handleClickPrevMonth($event){var d=new Date($scope.activeDate.getFullYear(),$scope.activeDate.getMonth()-1,1);$scope.focusToDate(d)}function handleClickSelectToday(){var d=new Date,d1=new Date(d.getFullYear(),d.getMonth(),d.getDate());$scope.dateStart=d1,$scope.dateEnd=d1,$scope.selectedTemplate="TD",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectYesterday(){var d=new Date,d1=new Date(d.getFullYear(),d.getMonth(),d.getDate()-1);$scope.dateStart=d1,$scope.dateEnd=d1,$scope.selectedTemplate="YD",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectThisWeek(){var p=new Date,d=new Date(p.getFullYear(),p.getMonth(),p.getDate()),d1=new Date(d.getFullYear(),d.getMonth(),d.getDate()-(d.getDay()-getFirstDayOfWeek())),d2=new Date(d.getFullYear(),d.getMonth(),d.getDate()+(6-d.getDay()+getFirstDayOfWeek()));$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="TW",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectLastWeek(){var p=new Date,d=new Date(p.getFullYear(),p.getMonth(),p.getDate()-7),d1=new Date(d.getFullYear(),d.getMonth(),d.getDate()-(d.getDay()-getFirstDayOfWeek())),d2=new Date(d.getFullYear(),d.getMonth(),d.getDate()+(6-d.getDay()+getFirstDayOfWeek()));$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="LW",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectThisMonth(){var d=new Date,d1=new Date(d.getFullYear(),d.getMonth(),1),d2=new Date(d.getFullYear(),d.getMonth()+1,0);$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="TM",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectLastMonth(){var p=new Date,d=new Date(p.getFullYear(),p.getMonth(),0),d1=new Date(d.getFullYear(),d.getMonth(),1),d2=new Date(d.getFullYear(),d.getMonth()+1,0);$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="LM",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectThisYear(){var d=new Date,d1=new Date(d.getFullYear(),0,1),d2=new Date(d.getFullYear(),11,31);$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="TY",$scope.selectedTemplateName=$scope.selectedDateText()}function handleClickSelectLastYear(){var d=new Date,d1=new Date(d.getFullYear()-1,0,1),d2=new Date(d.getFullYear()-1,11,31);$scope.dateStart=d1,$scope.dateEnd=d2,$scope.selectedTemplate="LY",$scope.selectedTemplateName=$scope.selectedDateText()}function isSelectedStartDate(date){return 0===getDateDiff($scope.dateStart,date)}function isSelectedEndDate(date){return 0===getDateDiff($scope.dateEnd,date)}function isToday(date){return 0===getDateDiff(date,new Date)}function selectedDateText(){return $scope.format&&"function"==typeof $scope.format?$scope.format($scope.dateStart,$scope.dateEnd,$scope.selectedTemplate,$scope.selectedTemplateName):$scope.dateStart&&$scope.dateEnd?$scope.selectedTemplate?null!=SELECTION_TEMPLATES_CUSTOM&&null!=SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate]?SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate].name:SELECTION_TEMPLATES[$scope.selectedTemplate]:0===getDateDiff($scope.dateStart,$scope.dateEnd)?$filter("date")($scope.dateStart,"dd MMM yyyy"):$filter("date")($scope.dateStart,"dd"+($scope.dateStart.getMonth()!==$scope.dateEnd.getMonth()||$scope.dateStart.getFullYear()!==$scope.dateEnd.getFullYear()?" MMM":"")+($scope.dateStart.getFullYear()!==$scope.dateEnd.getFullYear()?" yyyy":""))+" - "+$filter("date")($scope.dateEnd,"dd MMM yyyy"):""}function focusToDate(d){var d2=new Date(d.getFullYear(),d.getMonth()+1,1);$scope.activeDate=d,$scope.activeMonth=d.getMonth(),$scope.activeYear=d.getFullYear(),$scope.activeDate2=d2,$scope.activeMonth2=d2.getMonth(),$scope.activeYear2=d2.getFullYear(),$scope.dates=fillDateGrid(d),$scope.dates2=fillDateGrid(d2)}var SELECTION_TEMPLATES={TD:getLocalizationVal("Today"),YD:getLocalizationVal("Yesterday"),TW:getLocalizationVal("This Week"),LW:getLocalizationVal("Last Week"),TM:getLocalizationVal("This Month"),LM:getLocalizationVal("Last Month"),TY:getLocalizationVal("This Year"),LY:getLocalizationVal("Last Year")},START_OF_WEEK=1;SELECTION_TEMPLATES_CUSTOM={},$scope.isMenuContainer=!1,$scope.days=[],$scope.label="Date range picker",$scope.dates=[],$scope.dates2=[],$scope.numberOfMonthToDisplay=2,$scope.today=new Date,$scope.dateStart&&$scope.dateStart.setHours(0,0,0,0),$scope.dateEnd&&$scope.dateStart.setHours(23,59,59,999),$scope.firstDayOfMonth=$scope.dateStart?new Date($scope.dateStart.getFullYear(),$scope.dateStart.getMonth(),1):Date($scope.today.getFullYear(),$scope.today.getMonth(),1),$scope.lastDayOfMonth=$scope.dateStart?new Date($scope.dateStart.getFullYear(),$scope.dateStart.getMonth()+1,0):Date($scope.today.getFullYear(),$scope.today.getMonth()+1,0),$scope.activeDate=$scope.dateStart||$scope.today,$scope.activeDate2=new Date($scope.activeDate.getFullYear(),$scope.activeDate.getMonth()+1,1),$scope.activeMonth=$scope.activeDate.getMonth(),$scope.activeYear=$scope.activeDate.getFullYear(),$scope.activeMonth2=$scope.activeDate2.getMonth(),$scope.activeYear2=$scope.activeDate2.getFullYear(),$scope.months=[],$scope.years=[],$scope.inCurrentMonth=inCurrentMonth,$scope.isToday=isToday,$scope.handleClickDate=handleClickDate,$scope.inSelectedDateRange=inSelectedDateRange,$scope.isSelectedStartDate=isSelectedStartDate,$scope.isSelectedEndDate=isSelectedEndDate,$scope.updateActiveDate=updateActiveDate,$scope.selectedDateText=selectedDateText,$scope.focusToDate=focusToDate,$scope.handleClickNextMonth=handleClickNextMonth,$scope.handleClickPrevMonth=handleClickPrevMonth,$scope.handleClickSelectToday=handleClickSelectToday,$scope.handleClickSelectYesterday=handleClickSelectYesterday,$scope.handleClickSelectThisWeek=handleClickSelectThisWeek,$scope.handleClickSelectLastWeek=handleClickSelectLastWeek,$scope.handleClickSelectThisMonth=handleClickSelectThisMonth,$scope.handleClickSelectLastMonth=handleClickSelectLastMonth,$scope.handleClickSelectThisYear=handleClickSelectThisYear,$scope.handleClickSelectLastYear=handleClickSelectLastYear,$scope.getLocalizationVal=getLocalizationVal,$scope.selectCustomRange=selectCustomRange,$scope.isInMaxRange=isInMaxRange,$scope.isInMinRange=isInMinRange,$scope.selectionTemplate={},function(){var currTmpl,mctr=0;if(null!=$scope.customTemplates)for(var i=0;i<$scope.customTemplates.length;i++)currTmpl=$scope.customTemplates[i],SELECTION_TEMPLATES_CUSTOM[currTmpl.name]=currTmpl;if($scope.selectedTemplate){switch($scope.selectedTemplate){case"TD":$scope.handleClickSelectToday();break;case"YD":$scope.handleClickSelectYesterday();break;case"TW":$scope.handleClickSelectThisWeek();break;case"LW":$scope.handleClickSelectLastWeek();break;case"TM":$scope.handleClickSelectThisMonth();break;case"LM":$scope.handleClickSelectLastMonth();break;case"TY":$scope.handleClickSelectThisYear();break;case"LY":$scope.handleClickSelectLastYear();break;default:SELECTION_TEMPLATES_CUSTOM&&SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate]&&SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate].dateStart&&SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate].dateEnd&&($scope.dateStart=SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate].dateStart,$scope.dateEnd=SELECTION_TEMPLATES_CUSTOM[$scope.selectedTemplate].dateEnd),$scope.selectedTemplateName=$scope.selectedDateText()}$scope.updateActiveDate()}else $scope.selectedTemplate="",$scope.selectedTemplateName=$scope.selectedDateText(),$scope.updateActiveDate();$scope.$watch("selectedTemplate",function(next,prev){next===prev||!$scope.dateStart||$scope.inCurrentMonth($scope.dateStart)||$scope.inCurrentMonth($scope.dateStart,!0)||$scope.focusToDate($scope.dateStart)}),$scope.$watch("dateStart",function(next,prev){next===prev||!$scope.dateStart||$scope.inCurrentMonth($scope.dateStart)||$scope.inCurrentMonth($scope.dateStart,!0)||$scope.focusToDate($scope.dateStart)});var w=new Date(2017,0,1);for($scope.days=[],mctr=0;mctr<7;mctr++)w.setDate(mctr+1+getFirstDayOfWeek()),$scope.days.push({id:mctr,name:getLocalizationVal($filter("date")(w,"EEE"))});var m=null;for($scope.months=[],mctr=0;mctr<12;mctr++)m=new Date(2017,mctr,1),$scope.months.push({id:mctr,name:getLocalizationVal($filter("date")(m,"MMMM"))});var y=$scope.activeYear,yctr=0;for($scope.years=[],yctr=y-10;yctr',''," {{ngModel.selectedTemplateName || placeholder}}",' ',"",'',' {{ngModel.selectedTemplateName || placeholder}}',' ','

','{{getLocalizationVal("Clear")}}','{{getLocalizationVal("Ok")}}',"

","
",""].join(""),controller:["$scope","$mdMenu",function($scope,$mdMenu){$scope.ok=function($dates){$scope.mdOnSelect({$dates:$dates}),$mdMenu.hide()},$scope.clear=function(){$scope.ngModel.selectedTemplateName="",$scope.ngModel.selectedTemplate=null,$scope.ngModel.dateStart=null,$scope.ngModel.dateEnd=null},$scope.getLocalizationVal=function(val){return $scope.ngModel&&null!=$scope.ngModel.localizationMap&&null!=$scope.ngModel.localizationMap[val]?$scope.ngModel.localizationMap[val]:val}}]}}function mdDateRangePickerService($mdDialog){function getSelectedDate(dateStart,dateEnd,isDisabledDateCallback,maxRange,minRange){for(var dates=[],limit=dateEnd.getTime(),date=dateStart,ctr=0,y=dateStart.getFullYear(),m=dateStart.getMonth(),d=dateStart.getDate();date.getTime()<=limit&&(isDisabledDateCallback&&!isDisabledDateCallback({$date:date})&&dates.push(date),ctr++,date=new Date(y,m,d+ctr),!(ctr>(maxRange||1e4))););return dates}function show(config){return $mdDialog.show({locals:{mdDateRangePickerServiceModel:angular.copy(config.model),mdDateRangePickerServiceConfig:angular.copy(config)},controller:["$scope","mdDateRangePickerServiceModel","mdDateRangePickerServiceConfig",function($scope,mdDateRangePickerServiceModel,mdDateRangePickerServiceConfig){$scope.model=mdDateRangePickerServiceModel||{},$scope.config=mdDateRangePickerServiceConfig||{},$scope.model.selectedTemplateName=$scope.model.selectedTemplateName||"",$scope.ok=function(){$scope.model.dateStart&&$scope.model.dateStart.setHours(0,0,0,0),$scope.model.dateEnd&&$scope.model.dateEnd.setHours(23,59,59,999),$mdDialog.hide($scope.model)},$scope.cancel=function(){$mdDialog.cancel()},$scope.clear=function(){$scope.model.selectedTemplateName="",$scope.model.selectedTemplate=null,$scope.model.dateStart=null,$scope.model.dateEnd=null},$scope.handleOnSelect=function($dates){"function"==typeof $scope.config.mdOnSelect&&$scope.config.mdOnSelect($dates),$scope.config.autoConfirm&&$scope.ok()},$scope.getLocalizationVal=function(val){return $scope.model&&null!=$scope.model.localizationMap&&null!=$scope.model.localizationMap[val]?$scope.model.localizationMap[val]:val},$scope.model.customTemplates&&console.warn("model.customTemplates will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({customTemplates}) instead"),$scope.model.localizationMap&&console.warn("model.localizationMap will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({localizationMap}) instead"),$scope.model.firstDayOfWeek&&console.warn("model.firstDayOfWeek will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({firstDayOfWeek}) instead"),$scope.model.showTemplate&&console.warn("model.showTemplate will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({showTemplate}) instead"),$scope.model.maxRange&&console.warn("model.maxRange will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({maxRange}) instead"),$scope.model.onePanel&&console.warn("model.onePanel will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({onePanel}) instead"),$scope.model.isDisabledDate&&console.warn("model.isDisabledDate({ $date: $date }) will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({isDisabledDate:($date)=>{}}) instead")}],template:['','','",'{{model.selectedTemplateName}}',"","","","","",'','{{getLocalizationVal("Cancel")}}','{{getLocalizationVal("Clear")}}','{{getLocalizationVal("Ok")}}',"",""].join(""),parent:angular.element(document.body),multiple:config.multiple,targetEvent:config.targetEvent||document.body,clickOutsideToClose:!0,fullscreen:config.model.fullscreen})}var service=this;service.show=show,service.getSelectedDate=getSelectedDate}angular.module("ngMaterialDateRangePicker",["ngMaterial"]).directive("mdDateRangePicker",mdDateRangePickerDirective).directive("mdDateRange",mdDateRangeDirective).controller("mdDateRangePickerCtrl",mdDateRangePickerCtrl).service("$mdDateRangePicker",mdDateRangePickerService),mdDateRangePickerDirective.$inject=["$mdDateRangePicker"],mdDateRangePickerCtrl.$inject=["$scope","$filter"],mdDateRangePickerService.$inject=["$mdDialog"]}(window,angular),angular.module("ngCart",["ngCart.directives"]).config([function(){}]).provider("$ngCart",function(){this.$get=function(){}}).run(["$rootScope","ngCart","ngCartItem","store",function(a,b,c,d){a.$on("ngCart:change",function(){b.$save()}),angular.isObject(d.get("cart"))?b.$restore(d.get("cart")):b.init()}]).service("ngCart",["$rootScope","$window","ngCartItem","store",function(a,b,c,d){this.init=function(){this.$cart={shipping:null,taxRate:null,tax:null,items:[]}},this.addItem=function(b,d,e,f,g){var h=this.getItemById(b);if("object"==typeof h)h.setQuantity(f,!1),a.$broadcast("ngCart:itemUpdated",h);else{var i=new c(b,d,e,f,g);this.$cart.items.push(i),a.$broadcast("ngCart:itemAdded",i)}a.$broadcast("ngCart:change",{})},this.getItemById=function(a){var b=this.getCart().items,c=!1;return angular.forEach(b,function(b){b.getId()===a&&(c=b)}),c},this.setShipping=function(a){return this.$cart.shipping=a,this.getShipping()},this.getShipping=function(){return 0==this.getCart().items.length?0:this.getCart().shipping},this.setTaxRate=function(a){return this.$cart.taxRate=+parseFloat(a).toFixed(2),this.getTaxRate()},this.getTaxRate=function(){return this.$cart.taxRate},this.getTax=function(){return+parseFloat(this.getSubTotal()/100*this.getCart().taxRate).toFixed(2)},this.setCart=function(a){return this.$cart=a,this.getCart()},this.getCart=function(){return this.$cart},this.getItems=function(){return this.getCart().items},this.getTotalItems=function(){var a=0,b=this.getItems();return angular.forEach(b,function(b){a+=b.getQuantity()}),a},this.getTotalUniqueItems=function(){return this.getCart().items.length},this.getSubTotal=function(){var a=0;return angular.forEach(this.getCart().items,function(b){a+=b.getTotal()}),+parseFloat(a).toFixed(2)},this.totalCost=function(){return+parseFloat(this.getSubTotal()+this.getShipping()+this.getTax()).toFixed(2)},this.removeItem=function(b){var c=this.$cart.items.splice(b,1)[0]||{};a.$broadcast("ngCart:itemRemoved",c),a.$broadcast("ngCart:change",{})},this.removeItemById=function(b){var d=this.getCart();angular.forEach(d.items,function(a,c){a.getId()===b&&(a=d.items.splice(c,1)[0]||{})}),this.setCart(d),a.$broadcast("ngCart:itemRemoved",void 0),a.$broadcast("ngCart:change",{})},this.empty=function(){a.$broadcast("ngCart:change",{}),this.$cart.items=[],b.localStorage.removeItem("cart")},this.isEmpty=function(){return!(this.$cart.items.length>0)},this.toObject=function(){if(0===this.getItems().length)return!1;var a=[];return angular.forEach(this.getItems(),function(b){a.push(b.toObject())}),{shipping:this.getShipping(),tax:this.getTax(),taxRate:this.getTaxRate(),subTotal:this.getSubTotal(),totalCost:this.totalCost(),items:a}},this.$restore=function(a){var b=this;b.init(),b.$cart.shipping=a.shipping,b.$cart.tax=a.tax,angular.forEach(a.items,function(a){b.$cart.items.push(new c(a._id,a._name,a._price,a._quantity,a._data))}),this.$save()},this.$save=function(){return d.set("cart",JSON.stringify(this.getCart()))}}]).factory("ngCartItem",["$rootScope","$log",function(a,b){var c=function(a,b,c,d,e){this.setId(a),this.setName(b),this.setPrice(c),this.setQuantity(d),this.setData(e)};return c.prototype.setId=function(a){a?this._id=a:b.error("An ID must be provided")},c.prototype.getId=function(){return this._id},c.prototype.setName=function(a){a?this._name=a:b.error("A name must be provided")},c.prototype.getName=function(){return this._name},c.prototype.setPrice=function(a){var c=parseFloat(a);c?0>=c?b.error("A price must be over 0"):this._price=c:b.error("A price must be provided")},c.prototype.getPrice=function(){return this._price},c.prototype.setQuantity=function(a,c){var d=parseInt(a);d%1==0?(!0===c?this._quantity+=d:this._quantity=d,this._quantity<1&&(this._quantity=1)):(this._quantity=1,b.info("Quantity must be an integer and was defaulted to 1"))},c.prototype.getQuantity=function(){return this._quantity},c.prototype.setData=function(a){a&&(this._data=a)},c.prototype.getData=function(){return this._data?this._data:void b.info("This item has no data")},c.prototype.getTotal=function(){return+parseFloat(this.getQuantity()*this.getPrice()).toFixed(2)},c.prototype.toObject=function(){return{id:this.getId(),name:this.getName(),price:this.getPrice(),quantity:this.getQuantity(),data:this.getData(),total:this.getTotal()}},c}]).service("store",["$window",function(a){return{get:function(b){if(a.localStorage.getItem(b)){var c=angular.fromJson(a.localStorage.getItem(b));return JSON.parse(c)}return!1},set:function(b,c){return void 0===c?a.localStorage.removeItem(b):a.localStorage.setItem(b,angular.toJson(c)),a.localStorage.getItem(b)}}}]).controller("CartController",["$scope","ngCart",function(a,b){a.ngCart=b}]).value("version","1.0.0"),angular.module("ngCart.directives",["ngCart.fulfilment"]).controller("CartController",["$scope","ngCart",function(a,b){a.ngCart=b}]).directive("ngcartAddtocart",["ngCart",function(a){return{restrict:"E",controller:"CartController",scope:{id:"@",name:"@",quantity:"@",quantityMax:"@",price:"@",data:"="},transclude:!0,templateUrl:function(a,b){return void 0===b.templateUrl?(window.CDN_URL||"/app/")+(window.APP_THEME||"default")+"/gifts/view/add-to-cart.tpl.html":b.templateUrl},link:function(b,c,d){b.attrs=d,b.inCart=function(){return a.getItemById(d.id)},b.inCart()?b.q=a.getItemById(d.id).getQuantity():b.q=parseInt(b.quantity),b.qtyOpt=[];for(var e=1;e<=b.quantityMax;e++)b.qtyOpt.push(e)}}}]).directive("ngcartCart",[function(){return{restrict:"E",controller:"CartController",scope:{},templateUrl:function(a,b){return void 0===b.templateUrl?(window.CDN_URL||"/app/")+(window.APP_THEME||"default")+"/gifts/view/cart.tpl.html":b.templateUrl},link:function(a,b,c){}}}]).directive("ngcartSummary",[function(){return{restrict:"E",controller:"CartController",scope:{},transclude:!0,templateUrl:function(a,b){return void 0===b.templateUrl?(window.CDN_URL||"/app/")+(window.APP_THEME||"default")+"/gifts/view/summary.tpl.html":b.templateUrl}}}]).directive("ngcartCheckout",[function(){return{restrict:"E",controller:["$rootScope","$scope","ngCart","fulfilmentProvider",function(a,b,c,d){b.ngCart=c,b.checkout=function(){d.setService(b.service),d.setSettings(b.settings),d.checkout().success(function(b,c,d,e){a.$broadcast("ngCart:checkout_succeeded",b)}).error(function(b,c,d,e){a.$broadcast("ngCart:checkout_failed",{statusCode:c,error:b})})}}],scope:{service:"@",settings:"="},transclude:!0,templateUrl:function(a,b){return void 0===b.templateUrl?(window.CDN_URL||"/app/")+(window.APP_THEME||"default")+"/gifts/view/checkout.tpl.html":b.templateUrl}}}]),angular.module("ngCart.fulfilment",[]).service("fulfilmentProvider",["$injector",function(a){this._obj={service:void 0,settings:void 0},this.setService=function(a){this._obj.service=a},this.setSettings=function(a){this._obj.settings=a},this.checkout=function(){return a.get("ngCart.fulfilment."+this._obj.service).checkout(this._obj.settings)}}]).service("ngCart.fulfilment.log",["$q","$log","ngCart",function(a,b,c){this.checkout=function(){var d=a.defer();return b.info(c.toObject()),d.resolve({cart:c.toObject()}),d.promise}}]).service("ngCart.fulfilment.http",["$http","ngCart",function(a,b){this.checkout=function(c){return a.post(c.url,{data:b.toObject(),options:c.options})}}]).service("ngCart.fulfilment.paypal",["$http","ngCart",function(a,b){}]),function(t,e){"use strict";var n=window.angulartics||(window.angulartics={});n.waitForVendorCount=0,n.waitForVendorApi=function(t,e,a,i,r){r||n.waitForVendorCount++,i||(i=a,a=void 0),!Object.prototype.hasOwnProperty.call(window,t)||void 0!==a&&void 0===window[t][a]?setTimeout(function(){n.waitForVendorApi(t,e,a,i,!0)},e):(n.waitForVendorCount--,i(window[t]))},t.module("angulartics",[]).provider("$analytics",function(){var e={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,trackRelativePath:!1,autoBasePath:!1,basePath:""},eventTracking:{},bufferFlushDelay:1e3,developerMode:!1},a=["pageTrack","eventTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce"],i={},r={},o=function(t){return function(){n.waitForVendorCount&&(i[t]||(i[t]=[]),i[t].push(arguments))}},s=function(e,n){return r[e]||(r[e]=[]),r[e].push(n),function(){var n=arguments;t.forEach(r[e],function(t){t.apply(this,n)},this)}},c={settings:e},u=function(t,e){e?setTimeout(t,e):t()},l={$get:function(){return c},api:c,settings:e,virtualPageviews:function(t){this.settings.pageTracking.autoTrackVirtualPages=t},firstPageview:function(t){this.settings.pageTracking.autoTrackFirstPage=t},withBase:function(e){this.settings.pageTracking.basePath=e?t.element(document).find("base").attr("href"):""},withAutoBase:function(t){this.settings.pageTracking.autoBasePath=t},developerMode:function(t){this.settings.developerMode=t}},g=function(n,a){c[n]=s(n,a);var r=e[n],o=r?r.bufferFlushDelay:null,l=null!==o?o:e.bufferFlushDelay;t.forEach(i[n],function(t,e){u(function(){a.apply(this,t)},e*l)})},f=function(t){return t.replace(/^./,function(t){return t.toUpperCase()})},h=function(t){var e="register"+f(t);l[e]=function(e){g(t,e)},c[t]=s(t,o(t))};return t.forEach(a,h),l}).run(["$rootScope","$window","$analytics","$injector",function(e,n,a,i){a.settings.pageTracking.autoTrackFirstPage&&i.invoke(["$location",function(t){var e=!0;if(i.has("$route")){var r=i.get("$route");for(var o in r.routes){e=!1;break}}else if(i.has("$state")){var s=i.get("$state");for(var c in s.get()){e=!1;break}}if(e)if(a.settings.pageTracking.autoBasePath&&(a.settings.pageTracking.basePath=n.location.pathname),a.settings.pageTracking.trackRelativePath){var u=a.settings.pageTracking.basePath+t.url();a.pageTrack(u,t)}else a.pageTrack(t.absUrl(),t)}]),a.settings.pageTracking.autoTrackVirtualPages&&i.invoke(["$location",function(t){a.settings.pageTracking.autoBasePath&&(a.settings.pageTracking.basePath=n.location.pathname+"#");var r=!0;if(i.has("$route")){var o=i.get("$route");for(var s in o.routes){r=!1;break}e.$on("$routeChangeSuccess",function(e,n){if(!n||!(n.$$route||n).redirectTo){var i=a.settings.pageTracking.basePath+t.url();a.pageTrack(i,t)}})}i.has("$state")&&(r=!1,e.$on("$stateChangeSuccess",function(e,n){var i=a.settings.pageTracking.basePath+t.url();a.pageTrack(i,t)})),r&&e.$on("$locationChangeSuccess",function(e,n){if(!n||!(n.$$route||n).redirectTo)if(a.settings.pageTracking.trackRelativePath){var i=a.settings.pageTracking.basePath+t.url();a.pageTrack(i,t)}else a.pageTrack(t.absUrl(),t)})}]),a.settings.developerMode&&t.forEach(a,function(t,e){"function"==typeof t&&(a[e]=function(){})})}]).directive("analyticsOn",["$analytics",function(e){function n(t){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(t.tagName.toLowerCase()+":"+(t.type||""))>=0}function a(t){return n(t),"click"}function i(t){return n(t)?t.innerText||t.value:t.id||t.name||t.tagName}function r(t){return"analytics"===t.substr(0,9)&&-1===["On","Event","If","Properties","EventType"].indexOf(t.substr(9))}function o(t){var e=t.slice(9);return void 0!==e&&null!==e&&e.length>0?e.substring(0,1).toLowerCase()+e.substring(1):e}return{restrict:"A",link:function(n,s,c){var u=c.analyticsOn||a(s[0]),l={};t.forEach(c.$attr,function(t,e){r(e)&&(l[o(e)]=c[e],c.$observe(e,function(t){l[o(e)]=t}))}),t.element(s[0]).bind(u,function(a){var r=c.analyticsEvent||i(s[0]);l.eventType=a.type,(!c.analyticsIf||n.$eval(c.analyticsIf))&&(c.analyticsProperties&&t.extend(l,n.$eval(c.analyticsProperties)),e.eventTrack(r,l))})}}}])}(angular),function(t,e,n){"use strict";e.module("angulartics.google.analytics",["angulartics"]).config(["$analyticsProvider",function(a){function i(e){if(t.ga)for(var n=1;200>=n;n++)e["dimension"+n.toString()]&&ga("set","dimension"+n.toString(),e["dimension"+n.toString()]),e["metric"+n.toString()]&&ga("set","metric"+n.toString(),e["metric"+n.toString()])}a.settings.pageTracking.trackRelativePath=!0,a.settings.ga={additionalAccountNames:void 0,userId:null},a.registerPageTrack(function(n){t._gaq&&(_gaq.push(["_trackPageview",n]),e.forEach(a.settings.ga.additionalAccountNames,function(t){_gaq.push([t+"._trackPageview",n])})),t.ga&&(a.settings.ga.userId&&ga("set","&uid",a.settings.ga.userId),ga("send","pageview",n),e.forEach(a.settings.ga.additionalAccountNames,function(t){ga(t+".send","pageview",n)}))}),a.registerEventTrack(function(n,r){if(r&&r.category||(r=r||{},r.category="Event"),r.value){var o=parseInt(r.value,10);r.value=isNaN(o)?0:o}if(t.ga){var s={eventCategory:r.category,eventAction:n,eventLabel:r.label,eventValue:r.value,nonInteraction:r.noninteraction,page:r.page||t.location.hash.substring(1)||t.location.pathname,userId:a.settings.ga.userId};i(r),a.settings.ga.transport?ga("send","event",s,{transport:a.settings.ga.transport}):ga("send","event",s),e.forEach(a.settings.ga.additionalAccountNames,function(t){ga(t+".send","event",s)})}else t._gaq&&_gaq.push(["_trackEvent",r.category,n,r.label,r.value,r.noninteraction])}),a.registerSetUsername(function(t){a.settings.ga.userId=t}),a.registerSetUserProperties(function(t){i(t)})}])}(window,window.angular),function(){"use strict";function t(t){return"[object Array]"===Object.prototype.toString.call(t)}function e(t){return void 0!==t}function n(t){return"function"==typeof t}function a(t){return null===t}function i(t){return"string"==typeof t}function r(t){return void 0===t}function o(t,e){return t.hasOwnProperty(e)}function s(t){return a(t)||r(t)||i(t)&&0==t.length}function c(t){return i(t)&&t.length>0}function u(t,e){return angular.equals(t,e)}function l(t,e){return angular.copy(t,e)}function g(t,e){return angular.module(t,e)}angular.module("sly",["slyEvaluate","slyRepeat"]),g("slyEvaluate",["gatedScope"]).directive("slyEvaluateOnlyWhen",["$parse",function(t){return{scope:!0,restrict:"A",compile:function(e,n){return{pre:function(e,n,i){var r=null,u=!1,l=t(i.slyEvaluateOnlyWhen),g=null;if(o(i,"slyAlwaysEvaluate")&&(g=i.slyAlwaysEvaluate,s(g)))throw new Exception("Empty string is illegal for value of slyAlwaysEvaluate");e.$addWatcherGate(function(){var t=l(e);if(!u)return u=!0,r=t,!0;var n=r!==t;return r=t,n},function(t){return a(g)||!(c(t)&&t.indexOf(g)>=0)},!0)}}}}}]).directive("slyAlwaysEvaluate",function(){return{restrict:"A",link:function(t,e,n){}}}).directive("slyShow",["$animate",function(t){function e(t){if(t&&0!==t.length){var e=""+t;e=i(e)?e.toLowerCase():e,t=!("f"==e||"0"==e||"false"==e||"no"==e||"n"==e||"[]"==e)}else t=!1;return t}return{restrict:"A",link:function(n,a,i){n.$watch(i.slyShow,function(n){t[e(n)?"removeClass":"addClass"](a,"ng-hide")},!1,"slyShow")}}}]).directive("slyPreventEvaluationWhenHidden",function(){return{restrict:"A",scope:!0,compile:function(t,n){return{pre:function(t,n,a){t.$addWatcherGate(function(){return!n.hasClass("ng-hide")},function(t,n,a,i){return!e(i)||"slyShow"!=i})}}}}}),g("slyRepeat",["gatedScope"]).directive("slyRepeat",["$animate","$parse",function(e,n){function a(t){ t.scope.$addWatcherGate(function(){return t.isActiveForRepeat})}return{restrict:"A",scope:!0,transclude:"element",priority:1e3,terminal:!0,compile:function(n,i,r){return function(n,i,o){var s=o.slyRepeat,c=s.match(/^\s*(.+)\s+in\s+(.*?)$/);if(!c)throw Error("Expected slyRepeat in form of '_item_ in _collection_' but got '"+s+"'.");var u=c[1],l=c[2];if(!(c=u.match(/^(?:([\$\w]+))$/)))throw Error("'item' in 'item in collection' should be identifier but got '"+lhs+"'.");var g=[],f=[],h=n.$watchCollection(l,function(o){if(o){if(!t(o))throw Error("'collection' did not evaluate to an array. expression was "+l);var s=g.length;if(g.length0){var c=g.length+f.length;c>o.length&&(c=o.length),g=g.concat(f.splice(0,c-g.length))}var h=null,$=[],p=[];if(o.length>g.length){for(var d=g.length;d0){var y=h.length-1,w=h.length-1;s0&&(y-=1);for(var d=y;w>=d;++d)h[d].scope.$last=d==h.length-1,h[d].scope.$middle=0!=d&&d!=h.length-1,h[d].isActiveForRepeat||(h[d].isActiveForRepeat=!0,h[d].element.css("display",""))}for(var d=0;d<$.length&&!$[d].isActiveForRepeat;++d)$[d].element.css("display","none");for(var d=0;d0&&(m=g[g.length-1].element);for(var d=0;dt?2*t*t:(4-2*t)*t-1;case"easeInCubic":return t*t*t;case"easeOutCubic":return--t*t*t+1;case"easeInOutCubic":return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1;case"easeInQuart":return t*t*t*t;case"easeOutQuart":return 1- --t*t*t*t;case"easeInOutQuart":return.5>t?8*t*t*t*t:1-8*--t*t*t*t;case"easeInQuint":return t*t*t*t*t;case"easeOutQuint":return 1+--t*t*t*t*t;case"easeInOutQuint":return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t;default:return t}},s=function(e){var t=0;if(e.offsetParent)do{t+=e.offsetTop,e=e.offsetParent}while(e);return t=Math.max(t-c,0)};setTimeout(function(){var t,c,d,b,k=null,m=f(),I=s(e),v=0,g=I-m,h=function(){k=f(),u?(d=l.scrollHeight,b=l.clientHeight+k):(d=document.body.scrollheight,b=window.innerHeight+k),c!=I&&k!=I&&d>b||(clearInterval(A),o(e))},p=function(){v+=16,t=v/n,t=t>1?1:t,c=m+g*i(r,t),u?l.scrollTop=c:window.scrollTo(0,c),h()};a(e);var A=setInterval(p,16)},0)};e.factory("smoothScroll",function(){return t}),e.directive("smoothScroll",["smoothScroll",function(e){return{restrict:"A",scope:{callbackBefore:"&",callbackAfter:"&"},link:function(t,n,c){(void 0===c.scrollIf||"true"===c.scrollIf)&&setTimeout(function(){var r=function(e){if(c.callbackBefore){var n=t.callbackBefore({element:e});"function"==typeof n&&n(e)}},a=function(e){if(c.callbackAfter){var n=t.callbackAfter({element:e});"function"==typeof n&&n(e)}};e(n[0],{duration:c.duration,offset:c.offset,easing:c.easing,callbackBefore:r,callbackAfter:a,containerId:c.containerId})},0)}}}]),e.directive("scrollTo",["smoothScroll",function(e){return{restrict:"A",scope:{callbackBefore:"&",callbackAfter:"&"},link:function(t,n,c){var r;n.on("click",function(n){if(n.preventDefault(),r=document.getElementById(c.scrollTo)){var a=function(e){if(c.callbackBefore){var n=t.callbackBefore({element:e});"function"==typeof n&&n(e)}},o=function(e){if(c.callbackAfter){var n=t.callbackAfter({element:e});"function"==typeof n&&n(e)}};return e(r,{duration:c.duration,offset:c.offset,easing:c.easing,callbackBefore:a,callbackAfter:o,containerId:c.containerId}),!1}})}}}])}(),function(){"use strict";angular.module("bdmMaterialCarousel",["bdmMaterialCarousel.templates"]),function(callback){if(!window.createImageBitmap)return void callback(!1);fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=").then(function(response){return response.blob()}).then(function(blob){createImageBitmap(blob).then(function(){callback(!0)},function(){callback(!1)})})}(function(isSupported){window.webPsupport=!!isSupported})}(),function(){"use strict";function CarouselController($timeout,$attrs,$interval,$window){var that=this;that.currentIndex=0,that.currentMarginLeftValue=0,that.radioButtonIndex=0,that.transitionsTime=500,that.transitionsEnabled=!0,$attrs.$observe("data",function(){that.onDataChange()}),that.registerElement=function(element){that.element=element,that.elementParent=that.element.parent(),that.slidesContainer=angular.element(that.element.find("div")[0]),$window.addEventListener("resize",function(){that.updateSlidesContainerWidth()})},that.onDataChange=function(){that.isDataInvalidOrTooSmall()||(that.executeCloneData(),$timeout(function(){that.updateSlidesContainerWidth(),that.restartFromFirstItem()}))},that.updateSlidesContainerWidth=function(){that.scaleContent(),that.currentWidth=that.element.prop("offsetWidth"),that.currentHeight=that.element.prop("offsetHeight"),that.resizeSlides();var newSlidesContainerWidth=that.currentWidth*that.cloneData.length;that.slidesContainer.css("width",newSlidesContainerWidth+"px"),that.scaleMarginLeft(newSlidesContainerWidth),that.currentSlidesContainerWidth=newSlidesContainerWidth},that.scaleContent=function(){that.maxWidth=that.maxWidth?parseInt(that.maxWidth):0,0===that.maxWidth&&(that.maxWidth=that.element.prop("offsetWidth")),that.maxHeight=that.maxHeight?parseInt(that.maxHeight):0,0===that.maxHeight&&(that.maxHeight=that.element.prop("offsetHeight"));var currentElementParentWidth=that.elementParent.prop("offsetWidth");if(currentElementParentWidth=that.maxWidth&&(that.element.css("width",that.maxWidth+"px"),that.element.css("height",that.maxHeight+"px"))},that.resizeSlides=function(){for(var slides=$window.document.getElementsByClassName("slide"),index=0;indexthat.currentIndex?(multiplier=that.radioButtonIndex-that.currentIndex,that.currentMarginLeftValue-=that.currentWidth*multiplier):(multiplier=that.currentIndex-that.radioButtonIndex,that.currentMarginLeftValue+=that.currentWidth*multiplier),that.currentIndex=that.radioButtonIndex,that.applyMarginLeft(),that.restartAutoSlide()},that.isDataInvalidOrTooSmall=function(){return!that.data||0===that.data.length}}angular.module("bdmMaterialCarousel").controller("bdmCarouselController",["$timeout","$attrs","$interval","$window",CarouselController])}(),function(){"use strict";function CarouselDirective(){function link(scope,element,attrs,ctrl){ctrl.itemTemplateUrl="app/cards/item-carousel.html",void 0===attrs.autoSlide&&(ctrl.autoSlide=!1),void 0===attrs.autoSlideTime&&(ctrl.autoSlideTime=5e3),ctrl.registerElement(element),scope.$on("$destroy",function(){ctrl.stopAutoSlide()}),scope.$watch("ctrl.autoSlide",function(){ctrl.validateAutoSlide()}),scope.$watch("ctrl.autoSlideTime",function(){ctrl.restartAutoSlide()})}return{restrict:"E",replace:!0,templateUrl:"carousel-directive.html",scope:{},controller:"bdmCarouselController",controllerAs:"ctrl",bindToController:{data:"=",maxWidth:"@?",maxHeight:"@?",autoSlide:"@?",autoSlideTime:"@?"},link:link}}angular.module("bdmMaterialCarousel").directive("bdmCarousel",[CarouselDirective])}(),function(){angular.module("bdmMaterialCarousel.templates",[]).run(["$templateCache",function($templateCache){$templateCache.put("carousel-directive.html",'\n\n \n \n \n\n \n \n \n\n \n \n \n \n\n\n')}])}();var decamelize=require("decamelize");angular.module("humanizeText",[]).filter("getFirstImage",function(){return function(image){try{return image&&"["==image[0]?(image=JSON.parse(image),image[0]):(image&&!angular.isArray(image)&&image.indexOf(",")>-1&&(image=image.split(",")),image?angular.isArray(image)?image[0].replace("(","%28").replace(")","%29"):image.replace("(","%28").replace(")","%29"):"")}catch(e){return console.log(e),""}}}).filter("escape",function(){return window.encodeURIComponent}).filter("firstDateIsZero",function(){return function(date){return"0"==date[0]?"0"+(parseInt(date[1])-1).toString():(parseInt(date)-1).toString()}}).filter("capitalize",function(){return function(input,all){return input?input.replace(/\w\S*/g,function(txt){return txt.charAt(0).toUpperCase()+txt.substr(1).toLowerCase()}):""}}).filter("camelCaseToHuman",function(){return function(input,uppercaseFirst){if("string"!=typeof input)return input;var result=decamelize(input," ");return uppercaseFirst&&(result=result.charAt(0).toUpperCase()+result.slice(1)),result}}).filter("tel",function(){return function(tel){if(!tel||"function"!=typeof tel.startsWith)return tel||"";var internationalCodes=["+61","+64","+62","+66","+679","+52"];for(var i in internationalCodes)if(tel.startsWith(internationalCodes[i]))return tel.replace(/-/g," ");var value=tel.toString().trim().replace(/^\+/,"").replace(/-/g,"");if(value.match(/[^0-9]/))return tel;var country,city,number;switch(value.length){case 10:country=1,city=value.slice(0,3),number=value.slice(3);break;case 11:country=value[0],city=value.slice(1,4),number=value.slice(4);break;case 12:country=value.slice(0,3),city=value.slice(3,5),number=value.slice(5);break;default:return tel}return 1==country&&(country=""),number=number.slice(0,3)+"-"+number.slice(3),(country+" ("+city+") "+number).trim()}})},{decamelize:2}],2:[function(require,module,exports){"use strict";module.exports=function(str,sep){if("string"!=typeof str)throw new TypeError("Expected a string");return str.replace(/([a-z\d])([A-Z])/g,"$1"+(sep||"_")+"$2").toLowerCase()}},{}]},{},[1]),function(){"use strict";angular.module("explorer.app",["explorer.directives","explorer.filters","explorer.config","explorer.constants","explorer.routes","explorer.services.alert","explorer.services.settings","explorer.services.data"])}(),function(){angular.module("explorer.constants",[]).constant("appConfig",{api:window.location.protocol+"//"+(window.APP_DOMAIN.split(".").length>2||window.APP_DOMAIN.indexOf(".au")>-1||window.APP_DOMAIN.indexOf("brewer")>-1?window.APP_DOMAIN:"www."+window.APP_DOMAIN)+"/api/",apiMethod:window.isServiceWorkerInUse||"brewer-vacations-frontend.appspot.com"==window.APP_DOMAIN||"brewerdm.com"==window.APP_DOMAIN||window.APP_DOMAIN.indexOf("brewerdigitalmarketing.com")>0?"GET":"POST",searchDelay:350,messageDelay:36e3,headers:{"Content-Type":"application/json",Authorization:"XJKKAHJJS783$KKAS",X_BDM_TOKEN:"827asduuia277bbjsuw884"},requireLoggedIn:["trips","profile","messages","message","favorites","settings"],googlePlaceIdURL:"https://maps.googleapis.com/maps/api/place/details/json?placeid=",googleStaticImage:"https://maps.googleapis.com/maps/api/staticmap?center="})}(),function(){"use strict";angular.module("explorer.directives",[]).directive("socialShare",function($window,$timeout,Settings){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/social-share.html",link:function(scope,element,attrs,filter){var currentLandingPage=Settings.get("currentLandingPage");scope.currentPageUrl=$window.location.href,angular.forEach($window.LANDING_PAGES,function(page){if(page.id==currentLandingPage.id)for(var i in page)i.indexOf("social")>-1&&(currentLandingPage[i]=page[i])}),scope.page=currentLandingPage}}}).directive("dynamicHtml",function($compile){return{restrict:"A",replace:!0,link:function(scope,ele,attrs){scope.$watch(attrs.dynamicHtml,function(html){ele.html(html),$compile(ele.contents())(scope)})}}}).directive("pricelevel",function(){return{restrict:"E",scope:{},replace:!0,template:"{{priceLevel}}",link:function(scope,element,attrs){scope.priceLevel="";for(var i=0;i=0?($scope.image=currentImageSet[$scope.image.index-1],$scope.image.index=tmpIndex-1):($scope.image=currentImageSet[currentImageSet.length-1],$scope.image.index=currentImageSet.length-1),$scope.image.title=$filter("capitalize")($filter("camelCaseToHuman")($scope.image.title)),$scope.image.title=$scope.image.title.replace("Photo Urls","")}}})}function photoTagFilter(photo){if(photo&&photo.tags&&scope.currentPhotoTag){var tags=photo.tags.split(",");for(var i in tags)if(tags[i]==scope.currentPhotoTag)return!0;return!1}return!scope.currentPhotoTag}scope.photoPop=photoPop,scope.photoTagFilter=photoTagFilter,(attrs.code||scope.gid)&&Places.get("PropertyGalleryDetails",window.PROPERTY_ID,attrs.code||scope.gid,"post").then(function(response){"ok"==response.data.status&&(scope.galleries=response.data.galleries.map(function(gallery,index){gallery.photoTags=[],gallery.uniqueId="g"+Date.now().toString()+"_"+(index+1);try{gallery.columnsFlex=Math.floor(100/parseInt(gallery.galleryColumns))}catch(e){console.log(e)}return gallery.images.map(function(photo){if(photo.scaledCarouselImage=$filter("scaleTo")(photo.url,"property-photo-image-carousel-width-"+gallery.uniqueId),photo.thumb||(photo.thumb=photo.url),photo.tags){var tags=angular.isArray(photo.tags)?photo.tags:photo.tags.split(",");angular.forEach(tags,function(tag){-1==gallery.photoTags.indexOf(tag)&&gallery.photoTags.push(tag)})}}),gallery}))}),scope.currentIndex=0,scope.setCurrentSlideIndex=function(index){$analytics.eventTrack("webapp",{category:"page interaction",label:"View Image "+(index+1)}),scope.currentIndex=index},scope.isCurrentSlideIndex=function(index){return scope.currentIndex===index},scope.prevSlide=function(){$analytics.eventTrack("webapp",{category:"page interaction",label:"Prev Slide Image "+(scope.currentIndex+1)}),scope.currentIndex=scope.currentIndex>0?--scope.currentIndex:scope.gallery.length-1},scope.nextSlide=function(){$analytics.eventTrack("webapp",{category:"page interaction",label:"Next Slide Image "+(scope.currentIndex+1)}),scope.currentIndex=scope.currentIndex-1?icon="socfacebook":value.indexOf("twitter")>-1?icon="soctwitter":value.indexOf("youtube")>-1?icon="socyoutube":value.indexOf("google")>-1?icon="socgmaps":value.indexOf("pinterest")>-1?icon="socpinterest":value.indexOf("foursquare")>-1?icon="socfoursquare":value.indexOf("instagram")>-1?icon="socinstagram":value.indexOf("tripadvisor")>-1?icon="soctripadvisor":value.indexOf("yelp")>-1?icon="socyelp":value.indexOf("tiktok")>-1?icon="soctiktok":value.indexOf("linkedin")>-1&&(icon="soclinkedin"),{url:value,icon:icon}}))}scope.attrs=attrs,Settings.get("hasCurrentListing")?setupSocialLinks():Places.getMetaPropertyDetails($window.PROPERTY_ID).then(function(data){setupSocialLinks()})}}}).directive("sitewideNotice",function($rootScope,$location,$timeout,Settings){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/sitewide-notice.html",link:function(scope,element,attrs,filter){function loadNotices(){if(Settings.get("siteNotices")){var siteNotices=Settings.get("siteNotices"),urlMappedNotices=[];if(scope.siteNotices=[],angular.forEach(siteNotices,function(notice){switch(notice.urlDisplay){case"all":scope.siteNotices.push(notice);break;case"home":notice.displayUrls=["/"];break;case"show":urlMappedNotices.push(notice);break;default:scope.siteNotices.push(notice)}}),urlMappedNotices.length){var currentRoute,displayUrlMappedNotices=[],usedUrls=[];angular.forEach(urlMappedNotices,function(notice){notice.displayUrls&¬ice.displayUrls.indexOf($location.path())>-1&&(usedUrls.push(currentRoute),displayUrlMappedNotices.push(notice))}),angular.forEach(urlMappedNotices,function(notice){angular.forEach(notice.displayUrls,function(url){-1==usedUrls.indexOf($location.path())&&url.indexOf("*")>-1&&$location.path().startsWith(url.replace("*",""))&&displayUrlMappedNotices.push(notice)})}),displayUrlMappedNotices.length&&(scope.siteNotices=displayUrlMappedNotices),$rootScope.$on("$stateChangeSuccess",function(ev,to,toParams,from,fromParams){scope.siteNotices=[],displayUrlMappedNotices=[],usedUrls=[],currentRoute=to.url.replace("/:template",""),angular.forEach(urlMappedNotices,function(notice){ notice.displayUrls.indexOf(currentRoute)>-1&&(usedUrls.push(currentRoute),displayUrlMappedNotices.push(notice))}),angular.forEach(urlMappedNotices,function(notice){angular.forEach(notice.displayUrls,function(url){-1==usedUrls.indexOf(currentRoute)&&url.indexOf("*")>-1&¤tRoute.startsWith(url.replace("*",""))&&displayUrlMappedNotices.push(notice)})}),displayUrlMappedNotices.length?scope.siteNotices=displayUrlMappedNotices:angular.forEach(siteNotices,function(notice){"all"==notice.urlDisplay&&scope.siteNotices.push(notice)})})}}else $timeout(function(){loadNotices()},500)}loadNotices()}}}).directive("bookingBar",function($rootScope,$window,$timeout,$http,$filter,$mdpDatePicker,$analytics,Settings){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/booking-bar.html",link:function(scope,element,attrs,filter){function updateRates(){if(Settings.get("hasCurrentListing")){var hotelCode=$window.BOOKING_URL.split("&")[0].split("?")[0].split("/");hotelCode=hotelCode[hotelCode.length-1];var ratesApi="https://extraholidays.brewervacations.com/travelclick-api/?task=avail&hotelCode="+hotelCode+"&dateIn="+moment(scope.checkinDate).format("YYYY-MM-DD")+"&dateOut="+moment(scope.checkoutDate).format("YYYY-MM-DD")+(scope.promoCode?"&corpCode="+scope.promoCode:""),ratesData=Settings.get(btoa(ratesApi));if("loading"==ratesData)return;if(ratesData){if(ratesData.roomStays&&ratesData.roomStays.length){var leadRate=!1,found=!1,currentRate=0;found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){"Discount"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){"Promotional"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){!found&&plan.default&&(leadRate=plan.leadRate-(plan.discountRate||0),found=!0)}),leadRate&&(scope.leadRate=leadRate,scope.priceCurrency=ratesData.currencyCode)}else scope.leadRate=!1;$rootScope.$broadcast("triggerUpdateBookingDates",ratesData)}else Settings.set(btoa(ratesApi),"loading"),$http({url:ratesApi,method:"GET",dataType:"json"}).success(function(data,status,headers,config){if(200==status){Settings.set(btoa(ratesApi),data);var dateLabel=moment(scope.checkinDate).format("MM/DD/YYYY")+"-"+moment(scope.checkoutDate).format("MM/DD/YYYY");if(data.roomStays&&data.roomStays.length){var leadRate=!1,found=!1,currentRate=0;found||angular.forEach(data.roomStays[0].ratePlans,function(plan){"Discount"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(data.roomStays[0].ratePlans,function(plan){"Promotional"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(data.roomStays[0].ratePlans,function(plan){!found&&plan.default&&(leadRate=plan.leadRate-(plan.discountRate||0),found=!0)}),leadRate&&(scope.leadRate=leadRate,scope.priceCurrency=data.currencyCode,$analytics.eventTrack(hotelCode,{category:"Lead Rate - Available",label:dateLabel}))}else scope.leadRate=!1,$analytics.eventTrack(hotelCode,{category:"Lead Rate - Unavailable",label:dateLabel});$rootScope.$broadcast("triggerUpdateBookingDates",data)}}).error(function(data,status,headers,config){scope.isSearching=!1})}}function isDisabledDate(d){return d=-86400001&&(scope.checkoutDate=new Date(moment(scope.checkinDate).add(2,"days"))),checkoutDatePicker(ev)})}function checkoutDatePicker(ev){$mdpDatePicker(scope.checkoutDate,{minDate:new Date(moment(scope.checkinDate).add(2,"days")),targetEvent:ev,dateLabel:"Check-Out"}).then(function(selectedDate){scope.checkoutDate=selectedDate,moment(selectedDate).diff(moment(scope.checkinDate))<=86400001&&(scope.checkinDate=new Date(moment(scope.checkoutDate).subtract(2,"days")))})}function bookNow(ev){if($window.BOOKING_URL){var checkin=$filter("date")(scope.checkinDate,"M/dd/yyyy"),checkout=$filter("date")(scope.checkoutDate,"M/dd/yyyy");$window.open($window._tag_url($window.BOOKING_URL+(scope.PROMOID&&scope.PRODUCTID?"":"&datein="+checkin)+(scope.PROMOID&&scope.PRODUCTID?"":"&dateout="+checkout)+"&adults="+scope.numAdults+"&children="+scope.numChildren+"&rooms="+scope.numRooms+($window.PROMOID?"&identifier="+$window.PROMOID:"")+($window.PRODUCTID?"&ProdID="+$window.PRODUCTID:"")+(scope.PROMOID&&scope.PROMOID!=$window.PROMOID?"&identifier="+scope.PROMOID:"")+(scope.PRODUCTID&&scope.PRODUCTID!=$window.PRODUCTID?"&ProdID="+scope.PRODUCTID:"")+(scope.GAEVENT?"&gaevent="+scope.GAEVENT:"")),"_blank")}}var prevDiff,today=new Date(moment().subtract(1,"days"));scope.attrs=attrs,scope.checkinDate=new Date(Settings.get("checkinDate")?moment(Settings.get("checkinDate")):moment().add(2,"days")),scope.checkoutDate=new Date(Settings.get("checkoutDate")?moment(Settings.get("checkoutDate")):moment().add(4,"days")),scope.numRooms="1",scope.checkinDatePicker=checkinDatePicker,scope.checkoutDatePicker=checkoutDatePicker,scope.bookNow=bookNow,scope.isDisabledDate=isDisabledDate,scope.showDatePicker=!1,scope.phoneReservations=$window.APP_CLIENT_PHONE_RESERVATIONS||"",scope.hidePhoneNumber=!1,scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001?prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate)):$timeout(function(){scope.checkinDate!=scope.checkoutDate&&updateRates()},50),Settings.set("checkinDate",scope.checkinDate)}),scope.$watch("checkoutDate",function(oldDate,newDate){Settings.set("checkoutDate",scope.checkoutDate),moment(scope.checkinDate).diff(moment(scope.checkoutDate))!=prevDiff&&(scope.showDatePicker=!1,$timeout(function(){scope.checkinDate!=scope.checkoutDate&&updateRates()},50))}),scope.$on("hideBookingBarElement",function(e,target){switch(target){case"phone":scope.hideBookingBarPhone=!0}}),scope.$on("updatePromoCode",function(e,promoCode){scope.PROMOID=promoCode,$window.PROMOID=$window.PROMOID||promoCode}),scope.$on("updateProductId",function(e,productId){scope.PRODUCTID=productId,$window.PRODUCTID=$window.PRODUCTID||productId}),scope.$on("updateGaEvent",function(e,gaEvent){scope.GAEVENT=gaEvent,$window.GAEVENT=$window.GAEVENT||gaEvent}),scope.$emit("triggerBookingBarLoaded")}}}).directive("rfpMeetings",function($state,Alert,Person){return{restrict:"E",replace:!0,templateUrl:"app/cards/rfp-meetings.html",link:function(scope,element,attrs){function submitMeetingRFP(){(scope.meetingForm.name||scope.meetingForm.firstName&&scope.meetingForm.lastName)&&scope.meetingForm.email?Person.submitForm("MeetingRFP",scope.meetingForm).then(function(response){response&&response.data&&"ok"==response.data.status?(Alert.fire({message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({message:"There was an error, please try again later!"})}):Alert.fire({message:"Please fill in all the required fields."})}scope.attrs=attrs,scope.submitMeetingRFP=submitMeetingRFP,scope.meetingForm={}}}}).directive("rfpSimple",function($state,Alert,Person){return{restrict:"E",replace:!0,templateUrl:"app/cards/rfp-simple.html",link:function(scope,element,attrs){function submitMeetingRFP(){(scope.meetingForm.name||scope.meetingForm.firstName&&scope.meetingForm.lastName)&&scope.meetingForm.email?Person.submitForm("MeetingRFP",scope.meetingForm).then(function(response){response&&response.data&&"ok"==response.data.status?(Alert.fire({message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({message:"There was an error, please try again later!"})}):Alert.fire({message:"Please fill in all the required fields."})}scope.attrs=attrs,scope.submitMeetingRFP=submitMeetingRFP,scope.meetingForm={}}}}).directive("rfpContact",function($state,Alert,Person){return{restrict:"E",replace:!0,templateUrl:"app/cards/rfp-contact.html",link:function(scope,element,attrs){function submitContactUs(ev){scope.contactForm.name&&scope.contactForm.email&&scope.contactForm.message?Person.submitForm("ContactUs",scope.contactForm).then(function(response){response&&response.data&&"ok"==response.data.status?(Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({ev:ev,message:"There was an error, please try again later!"})}):Alert.fire({ev:ev,message:"Please fill in all the required fields."})}scope.attrs=attrs,scope.submitContactUs=submitContactUs,scope.contactForm={}}}}).directive("rfpWeddings",function($state,Alert,Person){return{restrict:"E",replace:!0,templateUrl:"app/cards/rfp-weddings.html",link:function(scope,element,attrs){function submitWeddingRFP(ev){scope.weddingForm.name&&scope.weddingForm.phone&&scope.weddingForm.email?Person.submitForm("WeddingRFP",scope.weddingForm).then(function(response){response&&response.data&&"ok"==response.data.status?(Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({ev:ev,message:"There was an error, please try again later!"})}):Alert.fire({ev:ev,message:"Please fill in all the required fields."})}scope.attrs=attrs,scope.submitWeddingRFP=submitWeddingRFP,scope.weddingForm={}}}}).directive("roomsCategoryType",function(){return{restrict:"E",replace:!0,templateUrl:"app/cards/rooms-category-type.html",link:function(scope,element,attrs){attrs.names&&(attrs.names=attrs.names.split(",")),scope.attrs=attrs}}}).directive("mainFooter",function(Person,Alert,$window){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/main-footer.html",link:function(scope,element,attrs){function emailSubscribe(ev){scope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({ev:ev,message:"Please enter a valid email address."})}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.subscribeConfirmationHeading=$window.APP_CONFIG.core.footer.subscribeConfirmationHeading||null,scope.subscribeConfirmationText=$window.APP_CONFIG.core.footer.subscribeConfirmationText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null,scope.termsLink=$window.APP_CONFIG.core.footer.termsLink||null,scope.privacyLink=$window.APP_CONFIG.core.footer.privacyLink||null,scope.serviceMarksLink=$window.APP_CONFIG.core.footer.serviceMarksLink||null,scope.adaLink=$window.APP_CONFIG.core.footer.adaLink||null,scope.newsletterLink=$window.APP_CONFIG.core.footer.newsletterLink||null),scope.emailSubscribe=emailSubscribe}}}).directive("rubyBookingBar",function($window,$timeout,$filter,$mdpDatePicker){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/ruby-booking-bar.html",link:function(scope,element,attrs,filter){function isDisabledDate(d){return d=-86400001&&(scope.checkoutDate=new Date(moment(scope.checkinDate).add(1,"days"))),checkoutDatePicker(ev)})}function checkoutDatePicker(ev){$mdpDatePicker(scope.checkoutDate,{minDate:new Date(moment(scope.checkinDate).add(1,"days")),targetEvent:ev,dateLabel:"Check-Out"}).then(function(selectedDate){scope.checkoutDate=selectedDate,moment(selectedDate).diff(moment(scope.checkinDate))<=86400001&&(scope.checkinDate=new Date(moment(scope.checkoutDate).subtract(1,"days")))})}function bookNow(ev){if($window.BOOKING_URL){var options={url:$window.BOOKING_URL,checkin:$filter("date")(scope.checkinDate,"MM/dd/yyyy"),checkout:$filter("date")(scope.checkoutDate,"MM/dd/yyyy"),numAdults:scope.numAdults,numChildren:scope.numChildren,rooms:1,promo:scope.promoCode,group:scope.groupCode,iata:scope.iataCode};$window.open($window._tag_url(options),"_blank")}}var prevDiff,today=new Date(moment().subtract(1,"days"));scope.attrs=attrs,scope.checkinDate=new Date(moment()),scope.checkoutDate=new Date(moment().add(1,"days")),scope.checkinDatePicker=checkinDatePicker,scope.checkoutDatePicker=checkoutDatePicker,scope.isDisabledDate=isDisabledDate,scope.bookNow=bookNow,scope.checkinDate=new Date(moment()),scope.checkoutDate=new Date(moment().add(1,"days")),scope.showDatePicker=!1,scope.phoneReservations=$window.APP_CLIENT_PHONE_RESERVATIONS||"",scope.promoCode=$window.PROMOID||"",scope.corpCode=$window.CORPID||"",scope.groupCode=$window.GROUPID||"",scope.iataCode=$window.IATA||"",scope.hasPromoOption=$window.APP_CONFIG.core.themes.hasPromoOption||!1,scope.hasPromoConfiguration=$window.APP_CONFIG.core.themes.hasPromoConfiguration||!1,scope.hasCorpOption=$window.APP_CONFIG.core.themes.hasCorpOption||!1,scope.hasGroupOption=$window.APP_CONFIG.core.themes.hasGroupOption||!1,scope.hasIataOption=$window.APP_CONFIG.core.themes.hasIataOption||!1,scope.promoCodeType="promoCorporate",scope.promoConfiguration=$window.APP_CONFIG.core.themes.promoConfiguration||!1,scope.useCustomBookingBar=1==$window.CUSTOM_BOOKING_BAR,scope.$on("updatePromoCode",function(e,promoCode){scope.promoCode=promoCode}),scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001&&(prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate)))}),scope.$watch("checkoutDate",function(oldDate,newDate){moment(scope.checkoutDate).diff(moment(scope.checkinDate))!=prevDiff&&(scope.showDatePicker=!1)})}}}).directive("garnetBookingBar",function($window,$timeout,$filter,$mdpDatePicker){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/garnet-booking-bar.html",link:function(scope,element,attrs,filter){function isDisabledDate(d){return d=-86400001&&(scope.checkoutDate=new Date(moment(scope.checkinDate).add(1,"days"))),checkoutDatePicker(ev)})}function checkoutDatePicker(ev){$mdpDatePicker(scope.checkoutDate,{minDate:new Date(moment(scope.checkinDate).add(1,"days")),targetEvent:ev,dateLabel:"Check-Out"}).then(function(selectedDate){scope.checkoutDate=selectedDate,moment(selectedDate).diff(moment(scope.checkinDate))<=86400001&&(scope.checkinDate=new Date(moment(scope.checkoutDate).subtract(1,"days")))})}function bookNow(ev){if($window.BOOKING_URL){var options={url:$window.BOOKING_URL,checkin:$filter("date")(scope.checkinDate,"MM/dd/yyyy"),checkout:$filter("date")(scope.checkoutDate,"MM/dd/yyyy"),numAdults:scope.numAdults,numChildren:scope.numChildren,rooms:1,promo:scope.promoCode,group:scope.groupCode,iata:scope.iataCode};$window.open($window._tag_url(options),"_blank")}}var prevDiff,today=new Date(moment().subtract(1,"days"));scope.attrs=attrs,scope.checkinDate=new Date(moment()),scope.checkoutDate=new Date(moment().add(1,"days")),scope.checkinDatePicker=checkinDatePicker,scope.checkoutDatePicker=checkoutDatePicker,scope.isDisabledDate=isDisabledDate,scope.bookNow=bookNow,scope.checkinDate=new Date(moment()),scope.checkoutDate=new Date(moment().add(1,"days")),scope.showDatePicker=!1,scope.phoneReservations=$window.APP_CLIENT_PHONE_RESERVATIONS||"",scope.promoCode=$window.PROMOID||"",scope.corpCode=$window.CORPID||"",scope.groupCode=$window.GROUPID||"",scope.iataCode=$window.IATA||"",scope.hasPromoOption=$window.APP_CONFIG.core.themes.hasPromoOption||!1,scope.hasPromoConfiguration=$window.APP_CONFIG.core.themes.hasPromoConfiguration||!1,scope.hasCorpOption=$window.APP_CONFIG.core.themes.hasCorpOption||!1,scope.hasGroupOption=$window.APP_CONFIG.core.themes.hasGroupOption||!1,scope.hasIataOption=$window.APP_CONFIG.core.themes.hasIataOption||!1,scope.promoCodeType="promoCorporate",scope.promoConfiguration=$window.APP_CONFIG.core.themes.promoConfiguration||!1,scope.$on("updatePromoCode",function(e,promoCode){scope.promoCode=promoCode}),scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001&&(prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate)))}),scope.$watch("checkoutDate",function(oldDate,newDate){moment(scope.checkoutDate).diff(moment(scope.checkinDate))!=prevDiff&&(scope.showDatePicker=!1)})}}}).directive("emeraldBookingBar",function($window,$timeout,$filter,$http,$mdpDatePicker){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/emerald-booking-bar.html",link:function(scope,element,attrs,filter){function isDisabledDate(d){return d=-86400001&&(scope.checkoutDate=new Date(moment(scope.checkinDate).add(1,"days"))),checkoutDatePicker(ev)})}function checkoutDatePicker(ev){$mdpDatePicker(scope.checkoutDate,{minDate:new Date(moment(scope.checkinDate).add(1,"days")),targetEvent:ev,dateLabel:"Check-Out"}).then(function(selectedDate){scope.checkoutDate=selectedDate,moment(selectedDate).diff(moment(scope.checkinDate))<=86400001&&(scope.checkinDate=new Date(moment(scope.checkoutDate).subtract(1,"days")))})}function bookNow(ev){var checkin=$filter("date")(scope.checkinDate,"MM/dd/yyyy"),checkout=$filter("date")(scope.checkoutDate,"MM/dd/yyyy"),groupAttendeeCheck=!1;if("groupAttendee"==scope.promoCodeType){if($window.urlQueryGetter){groupAttendeeCheck=!0;var tmp=$window.urlQueryGetter($window.BOOKING_URL),hotelCode=tmp.getParam("hotelID");$http.get("https://api.travelclick.com/ibe/v1/hotel/"+hotelCode+"/specialcodes/group/attendee/"+scope.promoCode.toLowerCase()+"?lang=EN_US").then(function(response){$window.location.href=$window._tag_url($window.BOOKING_URL+"&checkInDate="+checkin+"&checkOutDate="+checkout+"&numberOfAdults="+scope.numAdults+"&numberOfChildren="+scope.numChildren+"&numberOfRooms=1"+(response.data.groupId?"&groupId="+response.data.groupId:""))},function(response){$window.location.href=$window._tag_url($window.BOOKING_URL+"&checkInDate="+checkin+"&checkOutDate="+checkout+"&numberOfAdults="+scope.numAdults+"&numberOfChildren="+scope.numChildren+"&numberOfRooms=1"+(scope.corpCode?"&corpCode="+scope.corpCode:"")+(scope.promoCode?"&promoCode="+scope.promoCode:"")+(scope.promoCodeType?"&promoCodeType="+scope.promoCodeType:""))})}}else"corpCode"==scope.promoCodeType||"promoCorporate"==scope.promoCodeType?$window.location.href=$window._tag_url($window.BOOKING_URL+"&checkInDate="+checkin+"&checkOutDate="+checkout+"&numberOfAdults="+scope.numAdults+"&numberOfChildren="+scope.numChildren+"&numberOfRooms=1"+(scope.promoCode?"&corpCode="+scope.promoCode:"")+(scope.promoCodeType?"&promoCodeType="+scope.promoCodeType:"")):"groupCode"==scope.promoCodeType?$window.location.href=$window._tag_url($window.BOOKING_URL+"&checkInDate="+checkin+"&checkOutDate="+checkout+"&numberOfAdults="+scope.numAdults+"&numberOfChildren="+scope.numChildren+"&numberOfRooms=1"+(scope.promoCode?"&groupCode="+scope.promoCode:"")+(scope.promoCodeType?"&promoCodeType="+scope.promoCodeType:"")):groupAttendeeCheck||$window.open($window._tag_url($window.BOOKING_URL+"&checkInDate="+checkin+"&checkOutDate="+checkout+"&numberOfAdults="+scope.numAdults+"&numberOfChildren="+scope.numChildren+"&numberOfRooms=1"+(scope.corpCode?"&corpCode="+scope.corpCode:"")+(scope.promoCode?"&promoCode="+scope.promoCode:"")+(scope.promoCodeType?"&promoCodeType="+scope.promoCodeType:"")),"_blank")}var prevDiff,today=new Date(moment().subtract(1,"days"));scope.attrs=attrs,scope.checkinDatePicker=checkinDatePicker,scope.checkoutDatePicker=checkoutDatePicker,scope.isDisabledDate=isDisabledDate,scope.bookNow=bookNow,scope.checkinDate=new Date(moment()),scope.checkoutDate=new Date(moment().add(1,"days")),scope.showDatePicker=!1,scope.phoneReservations=$window.APP_CLIENT_PHONE_RESERVATIONS||"",scope.promoCode=$window.PROMOID||"",scope.corpCode=$window.CORPID||"",scope.hasPromoOption=$window.APP_CONFIG.core.themes.hasPromoOption||!1,scope.hasPromoConfiguration=$window.APP_CONFIG.core.themes.hasPromoConfiguration||!1,scope.hasCorpOption=$window.APP_CONFIG.core.themes.hasCorpOption||!1,scope.promoCodeType="promoCorporate",scope.promoConfiguration=$window.APP_CONFIG.core.themes.promoConfiguration||!1,scope.$on("updatePromoCode",function(e,promoCode){scope.promoCode=promoCode}),scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001&&(prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate)))}),scope.$watch("checkoutDate",function(oldDate,newDate){moment(scope.checkoutDate).diff(moment(scope.checkinDate))!=prevDiff&&(scope.showDatePicker=!1)})}}}).directive("rubyFooter",function(Person,Alert,$window){return{restrict:"E",scope:{},replace:!0,templateUrl:$window.APP_CONFIG.core.footer.template||"app/cards/ruby-footer.html",link:function(scope,element,attrs){function emailSubscribe(ev){scope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({ev:ev,message:"Please enter a valid email address."})}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE||$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientReservationsPhone=$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.landingPages=$window.LANDING_PAGES,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,scope.footer=$window.APP_CONFIG.core.footer,scope.siteId=$window.SITE_ID,$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.subscribeConfirmationHeading=$window.APP_CONFIG.core.footer.subscribeConfirmationHeading||null,scope.subscribeConfirmationText=$window.APP_CONFIG.core.footer.subscribeConfirmationText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null),scope.emailSubscribe=emailSubscribe}}}).directive("garnetFooter",function(Person,Alert,$window){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/garnet-footer.html",link:function(scope,element,attrs){function emailSubscribe(ev){scope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({message:"Please enter a valid email address."})}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE||$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientReservationsPhone=$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,scope.footer=$window.APP_CONFIG.core.footer,$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.subscribeConfirmationHeading=$window.APP_CONFIG.core.footer.subscribeConfirmationHeading||null,scope.subscribeConfirmationText=$window.APP_CONFIG.core.footer.subscribeConfirmationText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null,scope.termsLink=$window.APP_CONFIG.core.footer.termsLink||null,scope.privacyLink=$window.APP_CONFIG.core.footer.privacyLink||null,scope.serviceMarksLink=$window.APP_CONFIG.core.footer.serviceMarksLink||null,scope.adaLink=$window.APP_CONFIG.core.footer.adaLink||null,scope.newsletterLink=$window.APP_CONFIG.core.footer.newsletterLink||null),scope.emailSubscribe=emailSubscribe}}}).directive("sapphireFooter",function($rootScope,$window,$timeout,$filter,Settings,Person,Alert){return{restrict:"E",scope:{},replace:!0,templateUrl:$window.APP_CONFIG.core.footer.template||"app/cards/sapphire-footer.html",link:function(scope,element,attrs){function emailSubscribe(ev){scope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({message:"Please enter a valid email address."})}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE||$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientReservationsPhone=$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,scope.footer=$window.APP_CONFIG.core.footer,scope.hideFooter=!!$window.hideJSFooter&&$window.hideJSFooter,$rootScope.footerMenuItems&&(scope.footerMenuItems=$filter("orderBy")($filter("unique")($filter("toArray")($rootScope.footerMenuItems,!1),"state"),"ordering")),$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.subscribeConfirmationHeading=$window.APP_CONFIG.core.footer.subscribeConfirmationHeading||null,scope.subscribeConfirmationText=$window.APP_CONFIG.core.footer.subscribeConfirmationText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null,scope.termsLink=$window.APP_CONFIG.core.footer.termsLink||null,scope.privacyLink=$window.APP_CONFIG.core.footer.privacyLink||null,scope.serviceMarksLink=$window.APP_CONFIG.core.footer.serviceMarksLink||null,scope.adaLink=$window.APP_CONFIG.core.footer.adaLink||null,scope.newsletterLink=$window.APP_CONFIG.core.footer.newsletterLink||null),scope.emailSubscribe=emailSubscribe}}}).directive("cobaltFooter",function($rootScope,$window,$timeout,$filter,Settings,Person,Alert){return{restrict:"E",scope:{},replace:!0,templateUrl:$window.APP_CONFIG.core.footer.template||"app/cards/cobalt-footer.html",link:function(scope,element,attrs){function emailSubscribe(ev){scope.subscriberEmail&&scope.subscriberEmail.length?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({message:"Please enter a valid email address."})}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE||$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientReservationsPhone=$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,scope.footer=$window.APP_CONFIG.core.footer,scope.emailSubscribe=emailSubscribe,$rootScope.footerMenuItems&&(scope.footerMenuItems=$filter("orderBy")($filter("unique")($filter("toArray")($rootScope.footerMenuItems,!1),"state"),"ordering")),$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.subscribeConfirmationHeading=$window.APP_CONFIG.core.footer.subscribeConfirmationHeading||null,scope.subscribeConfirmationText=$window.APP_CONFIG.core.footer.subscribeConfirmationText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null,scope.termsLink=$window.APP_CONFIG.core.footer.termsLink||null,scope.privacyLink=$window.APP_CONFIG.core.footer.privacyLink||null,scope.serviceMarksLink=$window.APP_CONFIG.core.footer.serviceMarksLink||null,scope.adaLink=$window.APP_CONFIG.core.footer.adaLink||null,scope.newsletterLink=$window.APP_CONFIG.core.footer.newsletterLink||null),Settings.get("hasCurrentListing")&&(scope.property=Settings.get("currentListing"))}}}).directive("sitemapLinks",function($window,$filter,Settings){return{restrict:"E",replace:!0,templateUrl:"app/cards/sitemap-links.html",link:function(scope,element,attrs){function checkCollections(){angular.forEach(collections,function(collection,name){!collection.length&&Settings.get("has_"+name+$window.PROPERTY_ID)&&(collection.items=Settings.get(name+$window.PROPERTY_ID))}),handleCollections()}function handleCollections(){angular.forEach(collections,function(collection){if(!collection.loaded&&collection.items){switch(collection.parent){case"events":angular.forEach(collection.items.events,function(event){scope.subMenuArragement.push({id:$filter("toSlug")(event.name),parent:collection.parent,menuName:event.name,slug:"/events/"+$filter("toSlug")(event.name)})});break;case"offers":angular.forEach(collection.items.offers,function(offer){scope.subMenuArragement.push({id:offer.slug,parent:collection.parent,menuName:offer.title,slug:"/offers/"+$filter("toSlug")(offer.title)+"-"+offer.oid})});break;case"nearby":angular.forEach(collection.items.categories,function(category){angular.forEach(category.items,function(nearby){scope.subMenuArragement.push({id:nearby.slug,parent:collection.parent,menuName:nearby.name,slug:"/nearby/"+nearby.slug})})});break;case"rooms":collection.items.property.schema&&collection.items.property.schema.hasOfferCatalog&&angular.forEach(collection.items.property.schema.hasOfferCatalog.itemListElement,function(room){scope.subMenuArragement.push({id:$filter("toSlug")(room.name),parent:collection.parent,menuName:room.name,slug:"/rooms/"+$filter("toSlug")(room.name)})})}collection.loaded=!0}})}function _sanitizeOrdering(menuItems){for(var i in menuItems)menuItems[i].ordering=parseInt(menuItems[i].ordering)}var menuItems=angular.copy($window.APP_CONFIG.menu),landingPages=!1,collections={PropertyRoomsDetails:{parent:"rooms", items:!1},PropertyOffersDetails:{parent:"offers",items:!1},PropertyNearbyEvents:{parent:"events",items:!1},NearbyCategories:{parent:"nearby",items:!1}};scope.menuArragement=[],scope.subMenuArragement=[],scope.$on("onDataLoaded",function(){checkCollections()}),$window.LANDING_PAGES&&$window.LANDING_PAGES.length&&(landingPages=$window.LANDING_PAGES.filter(function(page){return"1"!=page.noIndex&&"1"==page.isActive&&0!=page.slug.indexOf("http")})),function(){var menuOrdering=1,subMenuOrdering=1;angular.forEach(menuItems,function(coreMenuItem){coreMenuItem.id||(coreMenuItem.type="core",coreMenuItem.id=coreMenuItem.state,coreMenuItem.slug="home"!=coreMenuItem.state?coreMenuItem.url||coreMenuItem.state:"/","1"!=coreMenuItem.noIndex&&"1"==coreMenuItem.isActive&&(coreMenuItem.parent&&coreMenuItem.parent.length&&"0"!=coreMenuItem.parent?(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:subMenuOrdering++,scope.subMenuArragement.push(coreMenuItem)):(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:menuOrdering++,scope.menuArragement.push(coreMenuItem))))}),landingPages&&angular.forEach(landingPages,function(landingPageItem){landingPageItem.type="landing",landingPageItem.parent&&landingPageItem.parent.length&&"0"!=landingPageItem.parent?(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:subMenuOrdering++,scope.subMenuArragement.push(landingPageItem)):(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:menuOrdering++,scope.menuArragement.push(landingPageItem))}),_sanitizeOrdering(scope.subMenuArragement),_sanitizeOrdering(scope.menuArragement)}(),checkCollections()}}}).directive("iconSquare",function(){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/icon-square.html",link:function(scope,element,attrs){scope.attrs=attrs}}}).directive("searchBar",function(){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/cards/search-bar.html",link:function(scope,element,attrs){scope.attrs=attrs}}}).directive("autoFocus",function($timeout){return{restrict:"AC",link:function(scope,element){$timeout(function(){element[0].focus()},0)}}}).directive("focus",function(){return{restrict:"A",link:function(scope,elem,attrs){elem.bind("keydown",function(e){elem.next().focus()})}}}).directive("eventFocus",function(focus){return function(scope,elem,attrs){elem.on(attrs.eventFocus,function(){focus(attrs.eventFocusId)}),scope.$on("$destroy",function(){elem.off(attrs.eventFocus)})}}).directive("changeClassOnScroll",function($window){return{restrict:"A",scope:{offset:"@",scrollClass:"@"},link:function(scope,element){angular.element($window).bind("scroll",function(){this.pageYOffset>=parseInt(scope.offset)?element.addClass(scope.scrollClass):element.removeClass(scope.scrollClass)})}}})}(),function(){angular.module("explorer.filters",[]).filter("getClassWidth",function(){return function(className){var result=document.getElementsByClassName(className),el=angular.element(result);return el&&el[0]?parseInt(el[0].clientWidth):300}}).filter("scaleTo",function(){var vfmSizeKeys=["B","Q","C","D","E","F","H","I","M","J","Z","P","R","S","O"],vfmSizeValues=[100,120,150,200,250,300,350,384,400,480,600,800,1024,2048,5e3];return function(image,size){if(!(image=image||""))return"";if(image&&(image.indexOf("www.cfmedia.vfmleonardo.com")>-1||image.indexOf("wyndham-extra-holidays.leonardocontentcloud.com")>-1)){if(parseInt(size))var width=parseInt(size);else var result=document.getElementsByClassName(size),el=angular.element(result),width=el&&el[0]?parseInt(el[0].clientWidth):300;width<100&&(width=300);var finalSizeIndex=0;if(vfmSizeValues.indexOf(width)>=0)finalSizeIndex=vfmSizeValues.indexOf(width);else if(width>=vfmSizeValues[vfmSizeValues.length-1])finalSizeIndex=vfmSizeValues[vfmSizeValues.length-1];else for(var i in vfmSizeValues){if(i=parseInt(i),!(vfmSizeValues[i]-1&&(originalSizeIndex=i);return finalSizeIndex>originalSizeIndex&&(finalSizeIndex=originalSizeIndex),image=image.slice(0,-5)+(vfmSizeKeys[finalSizeIndex]?vfmSizeKeys[finalSizeIndex]:"H")+image.substr(image.length-4)}if(!parseInt(size)){var el=document.querySelector("."+size),size=el?el.clientWidth:300;return image.indexOf("=s0")>-1&&size?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}return image.indexOf("=s0")>-1?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}}).filter("scaleToPlus10",function(){var vfmSizeKeys=["B","Q","C","D","E","F","H","I","M","J","Z","P","R","S","O"],vfmSizeValues=[100,120,150,200,250,300,350,384,400,480,600,800,1024,2048,5e3];return function(image,size){if(!(image=image||""))return"";if(image&&(image.indexOf("www.cfmedia.vfmleonardo.com")>-1||image.indexOf("wyndham-extra-holidays.leonardocontentcloud.com")>-1)){if(parseInt(size))var width=parseInt(size);else var result=document.getElementsByClassName(size),el=angular.element(result),width=el&&el[0]?parseInt(1.2*el[0].clientWidth):300;width<100&&(width=300);var finalSizeIndex=0;if(vfmSizeValues.indexOf(width)>=0)finalSizeIndex=vfmSizeValues.indexOf(width);else if(width>=vfmSizeValues[vfmSizeValues.length-1])finalSizeIndex=vfmSizeValues[vfmSizeValues.length-1];else for(var i in vfmSizeValues){if(i=parseInt(i),!(vfmSizeValues[i]-1&&(originalSizeIndex=i);return finalSizeIndex>originalSizeIndex&&(finalSizeIndex=originalSizeIndex),image=image.slice(0,-5)+(vfmSizeKeys[finalSizeIndex]?vfmSizeKeys[finalSizeIndex]:"H")+image.substr(image.length-4)}if(!parseInt(size)){var result=document.getElementsByClassName(size),el=angular.element(result),size=el&&el[0]?parseInt(1.2*el[0].clientWidth):300;return image.indexOf("=s0")>-1&&size?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}return image.indexOf("=s0")>-1?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}}).filter("cropTo",function(){var vfmSizeKeys=["B","Q","C","D","E","F","H","I","M","J","Z","P","R","S","O"],vfmSizeValues=[100,120,150,200,250,300,350,384,400,480,600,800,1024,2048,5e3];return function(image,size){if(!image)return"";if(image&&(image.indexOf("www.cfmedia.vfmleonardo.com")>-1||image.indexOf("wyndham-extra-holidays.leonardocontentcloud.com")>-1)){if(parseInt(size))var width=parseInt(size);else var result=document.getElementsByClassName(size),el=angular.element(result),width=el&&el[0]?parseInt(el[0].clientWidth):300,height=el&&el[0]?parseInt(el[0].clientHeight):165;1.8*height>width&&(width=1.8*height),width<100&&(width=300);var finalSizeIndex=0;if(vfmSizeValues.indexOf(width)>=0)finalSizeIndex=vfmSizeValues.indexOf(width);else if(width>=vfmSizeValues[vfmSizeValues.length-1])finalSizeIndex=vfmSizeValues[vfmSizeValues.length-1];else for(var i in vfmSizeValues){if(i=parseInt(i),!(vfmSizeValues[i]-1&&(originalSizeIndex=i);return finalSizeIndex>originalSizeIndex&&(finalSizeIndex=originalSizeIndex),image=image.slice(0,-5)+(vfmSizeKeys[finalSizeIndex]?vfmSizeKeys[finalSizeIndex]:"H")+image.substr(image.length-4)}if(!parseInt(size)){var result=document.getElementsByClassName(size),el=angular.element(result);return image.indexOf("=s0")>-1&&el&&el[0]&&el[0].clientWidth&&el[0].clientHeight?image.replace("=s0","=w"+el[0].clientWidth.toString()+"-h"+el[0].clientHeight+"-n")+(window.webPsupport?"-rw":""):image}return image.indexOf("=s0")>-1?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}}).filter("containTo",function(){var vfmSizeKeys=["B","Q","C","D","E","F","H","I","M","J","Z","P","R","S","O"],vfmSizeValues=[100,120,150,200,250,300,350,384,400,480,600,800,1024,2048,5e3];return function(image,size){if(!image)return"";if(image&&(image.indexOf("www.cfmedia.vfmleonardo.com")>-1||image.indexOf("wyndham-extra-holidays.leonardocontentcloud.com")>-1)){if(parseInt(size))var width=parseInt(size);else var result=document.getElementsByClassName(size),el=angular.element(result),width=el&&el[0]?parseInt(el[0].clientWidth):300;width<100&&(width=300);var maxSize=image.split("_");maxSize=maxSize[maxSize.length-1],maxSize=maxSize.split("."),maxSize=vfmSizeKeys.indexOf(maxSize[0]);var finalSizeIndex=0;if(vfmSizeValues.indexOf(width)>=0)finalSizeIndex=vfmSizeValues.indexOf(width);else if(width>=vfmSizeValues[vfmSizeValues.length-1])finalSizeIndex=vfmSizeValues[vfmSizeValues.length-1];else for(var i in vfmSizeValues){if(i=parseInt(i),!(vfmSizeValues[i]maxSize?maxSize:finalSizeIndex,image=image.slice(0,-5)+(vfmSizeKeys[finalSizeIndex]?vfmSizeKeys[finalSizeIndex]:"H")+image.substr(image.length-4)}if(!parseInt(size)){var result=document.getElementsByClassName(size),el=angular.element(result);return image.indexOf("=s0")>-1&&el&&el[0]&&el[0].clientWidth&&el[0].clientHeight?image.replace("=s0","=w"+el[0].clientWidth.toString()+"-h"+el[0].clientHeight)+(window.webPsupport?"-rw":""):image}return image.indexOf("=s0")>-1?image.replace("=s0","=w"+size.toString())+(window.webPsupport?"-rw":""):image}}).filter("toTime",function($filter){return function(dateString){return dateString?moment(dateString,moment.ISO_8601,!0).isValid()?$filter("date")(new Date(moment(dateString)),"h:mm a"):dateString:""}}).filter("dateOffset",function(){return function(){return function(date,offset){var result,type="+"==offset.charAt(0)?"add":"subtract",days=offset.substring(1);switch(type){case"add":result=new Date(moment(date).add(days,"days"));break;case"subtract":result=new Date(moment(date).subtract(days,"days"))}return result}}()}).filter("plaintext",function(){return function(text){return text?String(text).replace(/<[^>]+>/gm,""):""}}).filter("interpolate",function($interpolate){return function(){return function(template,object){return object=object||{},$interpolate(template)(object)}}()}).filter("unique",function(){return function(items,filterOn){if(!1===filterOn)return items;if((filterOn||angular.isUndefined(filterOn))&&angular.isArray(items)){var newItems=[],extractValueToCompare=function(item){return angular.isObject(item)&&angular.isString(filterOn)?item[filterOn]:item};angular.forEach(items,function(item){for(var isDuplicate=!1,i=0;i2&&(str=str.split(",").map(function(s){return s.replace(/[0-9]/g,"").trim()}),str=str[1]+", "+str[2]),str||""}}).filter("daysFromToday",function(){return function(date,max){if(date){var diff=moment().diff(moment(date),"days"),output="";switch(diff){case 0:output="today";break;case 1:output="yesterday";break;default:output=max&&diff>max?max+"+ days ago":diff+" days ago"}return output}return""}}).filter("toArray",function(){return function(obj,addKey){return angular.isObject(obj)?!1===addKey?Object.keys(obj).map(function(key){return obj[key]}):Object.keys(obj).map(function(key){var value=obj[key];return angular.isObject(value)?Object.defineProperty(value,"$key",{enumerable:!1,value:key}):{$key:key,$value:value}}):obj}}).filter("properCaps",function(){var _skip=["to","or","and","of","fe"],replacements={"St ":"St. ","Ft ":"Ft. ",Fe:"Fe",Aaa:"AAA",Caa:"CAA",Aarp:"AARP",Worldmark:"WorldMark"};return function(str){if(void 0===str||"boolean"==typeof str)return"";var frags=str.split("_"),frags=frags.map(function(frag){return _skip.indexOf(frag)>0?frag:frag.charAt(0).toUpperCase()+frag.slice(1)}),frags=frags.join(" "),frags=frags.split("-"),frags=frags.map(function(frag){return _skip.indexOf(frag)>0?frag:frag.charAt(0).toUpperCase()+frag.slice(1)});return frags=frags.join(" "),angular.forEach(replacements,function(replacement,key){frags=frags.replace(key,replacement)}),frags}}).filter("trustAsHTML",["$sce",function($sce){return function(text){return text?$sce.trustAsHtml(text.replace(/\\"/g,'"').replace("u00e9","é").replace("u2033",""").replace("u00ae","®").replace("®","®").replace("u2019","'").replace("u2013","-").replace("’","'").replace("u201c",""").replace(/\\(.)/gm,"$1")):""}}]).filter("safeHTML",function($filter){return function(data){return data?data.replace(/\n\r?/g,"
"):""}}).filter("encodeURIComponent",function(){return window.encodeURIComponent}).filter("tagURL",function(){return window._tag_url}).filter("toSlug",function(){return function(input){if(input){var slug=input.replace(/<[^>]*>?/gm,"").toLowerCase().replace("®","").replace("©","").trim();return slug=slug.replace(/&/g,"and"),slug=slug.replace(/'/g,""),slug=slug.replace(/"/g,""),slug=slug.replace(/[^a-z0-9\s-]/g," "),slug=slug.replace(/[\s-]+/g,"-"),"-"==slug.charAt(slug.length-1)&&(slug=slug.substr(0,slug.length-1)),slug}}})}(),function(){"use strict";function AlertService($window,$mdDialog,$mdToast,$timeout){var _alert={};return{fire:function(alert){_alert=$mdDialog.alert().title(alert.title||"Attention").textContent(alert.message).ok("Close").targetEvent(alert.ev),$timeout(function(){alert.noHide||$mdDialog.hide()},alert.duration||8e3),$mdDialog.show(_alert).finally(function(){_alert=void 0}),1==$window.SCROLL_TOP_HTML&&document.getElementsByTagName("html")[0].scrollIntoView()},toast:function(alert){_alert=$mdToast.show($mdToast.simple().position("bottom").textContent(alert.message).action("Dismiss").hideDelay(alert.noHide?0:3e3).toastClass(alert.className||"")),alert.callback&&_alert.then(alert.callback)}}}angular.module("explorer.services.alert",[]).service("Alert",["$window","$mdDialog","$mdToast","$timeout",AlertService])}(),function(){"use strict";function StoriesFactory($http,$window,appConfig,Alert,Settings){return{get:function(listName,objectId,options){return listName=listName||null,objectId=objectId||$window.SITE_ID,options=options||{},$http({url:appConfig.api+"site/"+objectId+"/"+listName,method:appConfig.apiMethod,dataType:"json",data:{task:"get"+listName,objectId:objectId,options:options},headers:appConfig.headers})}}}function PersonFactory($http,$window,$localStorage,appConfig,Alert,Settings){var _user={};return{get:function(listName,objectId,data){return data=data||{},objectId=objectId||null,$http({url:appConfig.api+objectId+"/"+listName,method:"GET",dataType:"json",data:{task:"get"+listName,objectId:objectId},headers:appConfig.headers})},createReview:function(listName,objectId,data){return data=data||{},objectId=objectId||$window.RID,$http({url:appConfig.api+"review/"+objectId+"/"+listName,method:"POST",dataType:"json",data:{task:"set"+listName,objectId:objectId,data:data},headers:appConfig.headers})},submitForm:function(formName,formData){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"submit"+formName,siteId:$window.SITE_ID,data:formData},headers:appConfig.headers})},login:function(user,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"login",email:user.email,pass:user.password},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):(Alert.fire({message:"There was a problem with your username/password."}),callback(data))}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem. Please try again later."})})},register:function(user,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"register",reservationId:Settings.get("reservationId"),email:user.email,password:user.password},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"There was a problem with your username/password."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem registering. Please try again later."})})},getTripMessages:function(tripId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getTripMessages",tripId:tripId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting messages."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getMessages:function(callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getMessages",token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting messages."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getMessageById:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getMessageById",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):(Alert.fire({message:"Error getting message."}),callback(null))}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getArchiveMessages:function(callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getArchiveMessages",token:Settings.get("token"),model:"messages"},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting messages."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getArchiveMessageById:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getArchiveMessageById",objectId:objectId,token:Settings.get("token"),model:"messages"},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):(Alert.fire({message:"Error getting message."}),callback(null))}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},removeMessageById:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"removeMessageById",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting messages."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},removeArchiveMessageById:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"removeArchiveMessageById",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error updating."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},clickMessageCTA:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"clickMessageCTA",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status&&callback(data)}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},findReservation:function(user,callback){Settings.set("has_user_reservations",!1),$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"findReservation",uniqueId:user.uniqueId,lastName:user.lastName,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status&&callback(data)}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem logging you in. Please try again later."})})},findGuestReservation:function(user,callback){return Settings.set("has_user_reservations",!1),$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"findGuestReservation",uniqueId:user.uniqueId,lastName:user.lastName},headers:appConfig.headers}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem looking up your reservation. Please try again later."})})},getReservationById:function(resId,callback){if(Settings.get("has_user_reservation_"+resId))return callback(Settings.get("user_reservation_"+resId));$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getReservationById",token:Settings.get("token"),resId:resId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("has_user_reservation_"+resId,!0),Settings.set("user_reservation_"+resId,data),callback(data)):callback(null)}).error(function(data,status,headers,config){callback(null),Alert.fire({message:"There was a problem logging you in. Please try again later."})})},listAllReservations:function(options,callback){options=options||{},options.limit=options.limit||2,$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"allReservations",limit:options.limit,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status&&callback(data)}).error(function(data,status,headers,config){callback(null),Alert.fire({message:"There was a problem logging you in. Please try again later."})})},setPerson:function(user){_user=user},getProfiles:function(callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getProfiles",token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Could not find profile."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem logging you in. Please try again later."}),callback(null)})},getUserLocalFavorites:function(options,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getUserFavorites",limit:options.limit||3,hotelcode:options.hotelcode,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting favorites. Please try again later."})}).error(function(data,status,headers,config){callback(null),Alert.fire({message:"Error getting favorites. Please try again later."})})},getUserFavorites:function(options,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getUserFavorites",token:Settings.get("token"),tripId:options.tripId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting favorites. Please try again later."})}).error(function(data,status,headers,config){callback(null),Alert.fire({message:"Error getting favorites. Please try again later."})})},updateUserFavorite:function(placeId,category,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"updateUserFavorite",placeId:placeId,category:category,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("user_favorites_no_update",!1),callback(data)):Alert.fire({message:"Error updating favorite. Please try again later."})}).error(function(data,status,headers,config){callback(null),Alert.fire({message:"Error updating favorite. Please try again later."})})}}}function PlacesFactory($rootScope,$http,$q,$localStorage,appConfig,Alert,Settings){var places=[],destinations=[],cityId=null;return{autocomplete:function(query,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"autocomplete",q:query},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},get:function(listName,objectId,pageId,method){if(objectId=objectId||"",pageId=pageId||"",Settings.get("has_"+listName+objectId+pageId)){var deferred=$q.defer();return deferred.resolve({data:Settings.get(listName+objectId+pageId)}),$rootScope.$broadcast("onDataLoaded"),deferred.promise}return $http({url:appConfig.api+"property/"+objectId+"/"+listName+(pageId?"/"+pageId:""),method:method||appConfig.apiMethod,dataType:"json",data:{task:"get"+listName,objectId:objectId,pageId:pageId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status&&(Settings.set("has_"+listName+objectId+pageId,!0),Settings.set(listName+objectId+pageId,data),$rootScope.$broadcast("onDataLoaded"))})},markView:function(listName,id){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"markView"+listName,id:id,token:Settings.get("token")},headers:appConfig.headers})},addErrorPage:function(url,referrer){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"addErrorPage",siteId:window.SITE_ID,url:url,referrer:referrer},headers:appConfig.headers})},setCityId:function(_cityId){cityId=_cityId},getCityId:function(slug){return slug?destinations[slug]:cityId},getPlaces:function(){return places},getnearbyResorts:function(callback){if(Settings.get("has_nearby_resorts"))return callback(Settings.get("nearby_resorts"));$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"nearbyResorts"},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("has_nearby_resorts",!0),Settings.set("nearby_resorts",data),callback(data)):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},getPropertyDetails:function(objectId,callback){var order="object"==typeof objectId?objectId.order:null;if(objectId="object"==typeof objectId?objectId.hotelcode:objectId,Settings.get("has_property_details"))return callback(Settings.get("property_details"));$http({url:appConfig.api+"/property/details/"+objectId,method:appConfig.apiMethod,dataType:"json",data:{task:"getPropertyDetails",objectId:objectId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(order&&(data.order=order),Settings.set("has_property_details",!0),Settings.set("property_details",data),callback(data)):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},getMetaPropertyDetails:function(objectId){if(Settings.get("hasCurrentListing"))return!0;"object"==typeof objectId&&objectId.order;return objectId="object"==typeof objectId?objectId.hotelcode:objectId,$http({url:appConfig.api+"property/details/"+objectId,method:appConfig.apiMethod,dataType:"json",data:{task:"getPropertyDetails",objectId:objectId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("hasCurrentListing",!0),Settings.set("currentListing",data.property)):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){})},getListingById:function(id){angular.forEach(places,function(place){if(place.id==id)return place})},all:function(query,callback){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"placeSearch",q:query},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(places=data.places.map(function(entry){return entry._name=angular.lowercase(entry.name),entry._city=angular.lowercase(entry.city),entry._address=angular.lowercase(entry.formatted_address.AddressLine+" "+entry.formatted_address.CityName),entry._state=angular.lowercase(entry.state),entry}),angular.forEach(data.destinations,function(value,key){destinations[value.slug]=parseInt(value.id)})):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){})},getNearbyListing:function(slug){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getNearbyListing",token:Settings.get("token"),objectId:window.PROPERTY_ID,slug:slug},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("has_place_id_listing_"+slug,!0),Settings.set("place_id_listing_"+slug,data)):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){})},getPlaceIdListing:function(placeId,callback){if(Settings.get("has_place_id_listing_"+placeId))return callback(Settings.get("place_id_listing_"+placeId));$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getPlaceIdListing",token:Settings.get("token"),placeId:placeId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?(Settings.set("has_place_id_listing_"+placeId,!0),Settings.set("place_id_listing_"+placeId,data),callback(data)):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},getPropertyDirections:function(hotelcode,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getPropertyDirections",hotelcode:hotelcode},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},getPlaceDirections:function(placeId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getPlaceDirections",placeId:placeId},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"No Results"})}).error(function(data,status,headers,config){callback(null)})},getPropertyByMessageId:function(objectId,callback){$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getPropertyByMessageId",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data,status,headers,config){"ok"==data.status?callback(data):Alert.fire({message:"Error getting messages."})}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getSpecials:function(objectId){return objectId=objectId||"",$http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getSpecials",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data){Settings.set("specials",data.specials)}).error(function(data,status,headers,config){Alert.fire({message:"There was a problem getting your messages. Please try again later."})})},getDestinationsList:function(){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getDestinationsList",token:Settings.get("token")},headers:appConfig.headers}).success(function(data){Settings.set("hasDestinationsList",!0),Settings.set("destinationsList",data.destinations),Settings.set("featuredResortsList",data.resorts)}).error(function(data,status,headers,config){})},getDestinationDetails:function(objectId){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getDestinationDetails",objectId:objectId,token:Settings.get("token")},headers:appConfig.headers}).success(function(data){Settings.set("hasDestinationDetails_".objectId,!0),Settings.set("destinationDetails_".objectId,data.destinations)}).error(function(data,status,headers,config){})},getViatorResults:function(){return $http({url:appConfig.api,method:"POST",dataType:"json",data:{task:"getViatorResults",objectId:window.PROPERTY_ID,token:Settings.get("token")},headers:appConfig.headers})},nearby:function(options,callback){if(options=options||{}, options.task="nearby",options.id=window.PROPERTY_ID,Settings.get("has_nearby_listings_"+options.category+"_"+options.listingId))return callback(Settings.get("nearby_listings_"+options.category+"_"+options.listingId));$http({url:appConfig.api+"nearby/property/"+options.id+"/"+options.category,method:appConfig.apiMethod,dataType:"json",data:options,headers:{"Content-Type":"application/json"}}).success(function(data,status,headers,config){"ok"==data.status&&(Settings.set("has_nearby_listings_"+options.category+"_"+options.listingId,!0),Settings.set("nearby_listings_"+options.category+"_"+options.listingId,data),callback(data))}).error(function(data,status,headers,config){callback(null)})},nearbyDestination:function(options,callback){if(options=options||{},options.task="nearbyDestination",options.token=Settings.get("token"),Settings.get("has_destination_nearby_listings_"+options.category+"_"+options.destinationId))return Settings.get("destination_nearby_listings_"+options.category+"_"+options.destinationId);$http({url:appConfig.api,method:"POST",dataType:"json",data:options,headers:{"Content-Type":"application/json"}}).success(function(data,status,headers,config){"ok"==data.status&&(Settings.set("has_destination_nearby_listings_"+options.category+"_"+options.destinationId,!0),Settings.set("destination_nearby_listings_"+options.category+"_"+options.destinationId,data),callback(data))}).error(function(data,status,headers,config){})}}}angular.module("explorer.services.data",[]).factory("Person",["$http","$window","$localStorage","appConfig","Alert","Settings",PersonFactory]).factory("Places",["$rootScope","$http","$q","$localStorage","appConfig","Alert","Settings",PlacesFactory]).factory("Stories",["$http","$window","appConfig","Alert","Settings",StoriesFactory])}(),function(){"use strict";function Focus($timeout,$window){return function(id){$timeout(function(){var element=$window.document.getElementById(id);element&&element.focus()})}}function Settings($rootScope,$state,$stateParams,$document,$localStorage,$focus){var _storage={};new Date(moment()),new Date(moment().add(2,"days"));return{hideKeyboard:function(){document.activeElement.blur();for(var inputs=document.querySelectorAll("input"),i=0;i-1){$rootScope.altLogo=window.altLogo,$rootScope.altState="dining";var found=!1;angular.forEach($rootScope.menuItems,function(menuItem){menuItem.state==$rootScope.altState&&($rootScope.altMenuItem=menuItem,$rootScope.bodyTemplateClass=menuItem.template||"",found=!0)}),found||($rootScope.bodyTemplateClass=template.indexOf("revamp")>-1?template:template+" chazrevamp submenu-mode")}else template?$rootScope.bodyTemplateClass=template:($rootScope.altLogo=null,$rootScope.altState=null,$rootScope.altMenuItem=null,$rootScope.bodyTemplateClass="")},setHeaderImage:function(headerImage){$rootScope.noHeaderImageClass=headerImage?"":"no-headerimage"},setPageTitle:function(title){if(title)return $rootScope.header.showLogo=!1,$rootScope.header.pageTitle=title,$rootScope.header.showTitle=!0,$rootScope.Metatags&&($rootScope.Metatags.title=title),$rootScope.header.pageTitle},setMetaDescription:function(description){if(description)if($rootScope.Metatags)$rootScope.Metatags.description=description;else{var metaTag=$document[0].querySelector('meta[name="description"]');metaTag&&(metaTag.content=description)}},hidePageTitle:function(){$rootScope.header.showTitle=!1,$rootScope.header.pageTitle="",$rootScope.header.showLogo=!1},enableBackButton:function(state){$rootScope.header.hasBackButton=!0},disableBackButton:function(){$rootScope.header.hasBackButton=!1},setTabIndex:function(index){$focus("search-button"),$rootScope.data.selectedIndex!=index&&($rootScope.data.selectedIndex=index)}}}angular.module("explorer.services.settings",[]).service("Settings",["$rootScope","$state","$stateParams","$document","$localStorage","focus",Settings]).factory("focus",["$timeout","$window",Focus])}(),function(){"use strict";function GuestAppInit($rootScope,$state,$stateParams,$window,$document,$filter,$localStorage,$timeout,$location,$q,$anchorScroll,$mdSidenav,$mdDialog,$mdToast,$mdSelect,$analytics,$cookies,MetaTags,Person,Places,Settings,Alert,appConfig){function handlePopupData(popupData){if(popupData&&!Settings.get("displayed_"+popupData.id)&&!$cookies.get("optout_"+popupData.id)&&"-ds"!=$window.location.pathname.substr($window.location.pathname.length-3)&&"-touch"!=$window.location.pathname.substr($window.location.pathname.length-6)){var currentTime=new Date,expireTime=new Date,lastVisit=$cookies.get("popup_"+popupData.id),showPopup=!1;expireTime.setHours(expireTime.getHours()+19080);var popup=$mdDialog.confirm({controller:function($scope,$cookies,$mdDialog,popupData){$scope.popup=popupData,$scope.closeDialog=function(ev){$mdDialog.hide()},$scope.optOut=function(ev){$cookies.put("optout_"+popupData.id,moment(currentTime).format("YYYY-MM-DD"),{expires:expireTime,secure:!0}),$mdDialog.hide()}},templateUrl:"app/cards/pop-up.html",locals:{popupData:popupData},parent:angular.element(document.body),clickOutsideToClose:"1"==popupData.clickAwayToClose});if("left"==popupData.openFrom&&(popup=popup.openFrom({top:$window.innerHeight/2,width:50,height:100}).closeTo({left:$window.innerHeight/2})),$cookies.put("popup_"+popupData.id,moment(currentTime).format("YYYY-MM-DD"),{expires:expireTime,secure:!0}),lastVisit&&(lastVisit=new Date(lastVisit)),-1==_popupsDisplayedUrls.indexOf($window.location.pathname)&&"all"==popupData.urlDisplay||"home"==popupData.urlDisplay&&"/"==$window.location.pathname||"show"==popupData.urlDisplay&&popupData.displayUrls&&popupData.displayUrls.indexOf($window.location.pathname)>-1){switch(_popupsDisplayedUrls.push($window.location.pathname),popupData.frequency){case"always":showPopup=!0;break;case"once":lastVisit||(showPopup=!0);break;case"daily":(!lastVisit||moment().diff(moment(lastVisit),"days")>1)&&(showPopup=!0);break;case"weekly":(!lastVisit||moment().diff(moment(lastVisit),"weeks")>=1)&&(showPopup=!0);break;case"monthly":(!lastVisit||moment().diff(moment(lastVisit),"months")>=1)&&(showPopup=!0)}showPopup&&(Settings.set("displayed_"+popupData.id,!0),popupData.delay=popupData.delay||3e3,$timeout(function(){$analytics.eventTrack("Pop-Up Open",{category:"Pop-Up Interaction",label:popupData.title}),$mdDialog.show(popup).then(function(){})},parseInt(popupData.delay)),parseInt(popupData.duration)&&$timeout(function(){$mdDialog.hide(),$analytics.eventTrack("Auto Close",{category:"Pop-Up Interaction",label:popupData.title,value:parseInt(popupData.delay)+parseInt(popupData.duration)})},parseInt(popupData.delay)+parseInt(popupData.duration)))}}}function duplicate(item){return angular.copy(item)}function openSidenav(){$mdSidenav("right").open()}function closeSidenav(){$mdSidenav("right").close()}function isSidenavOpen(){return $mdSidenav("right").isOpen()}function openSidenavLeft(){$mdSidenav("left").open()}function closeSidenavLeft(){$mdSidenav("left").close()}function isSidenavOpenLeft(){return $mdSidenav("left").isOpen()}function getPhotoUrl(target,url,size,crop){if(url&&"string"==typeof url){if(target&&""!=target)var result=document.getElementsByClassName(target);if("auto"===(size=size||"200")&&target){var el=angular.element(result);return el&&el[0]&&el[0].clientWidth||(el=[{clientWidth:300}]),size=el[0].clientWidth,url.replace("=s0","=s"+size+(crop?"-c":""))}return url.replace("=s0","=s"+size+(crop?"-c":""))}}function bookNowDialog($event){function BookNowDialogController($scope,$mdDialog,$mdpDatePicker,$filter,$timeout,$window){function isDisabledDate(d){return d=-86400001&&($scope.dialogCheckoutDate=new Date(moment($scope.dialogCheckinDate).add($window.BOOKING_MIN_RANGE||1,"days")))):moment($scope.dialogCheckinDate).diff(moment($scope.dialogCheckoutDate))>=-86400001&&(prevDiff=moment($scope.dialogCheckinDate).diff(moment($scope.dialogCheckoutDate)))}),$scope.$watch("dialogCheckoutDate",function(oldDate,newDate){firstRunCheckout?firstRunCheckout=!1:moment($scope.dialogCheckoutDate).diff(moment($scope.dialogCheckinDate))!=prevDiff&&($scope.showDatePicker=!1)})}$mdDialog.show({parent:angular.element(document.body),targetEvent:$event,templateUrl:"app/cards/booking-bar-dialog.html",controller:BookNowDialogController,clickOutsideToClose:!1,escapeToClose:!0})}function explore(result){result=result||{},$rootScope.search.cityId=result.id||$rootScope.search.cityId,$rootScope.search.query=result.city||$rootScope.search.query,Settings.focus()}function showSearch(){$rootScope.search.showSearch=!0,$rootScope.search.cityId=null,$rootScope.search.hasAutocompleteResults=!1}function focus(){Settings.focus("search-box")}function exit(uri){return $timeout(function(){$window.location.href=uri},800),!0}function resetLanguage(ev){$analytics.eventTrack("Reset Language",{category:"Language Selection",label:"en"}),$window.location.href=$window.location.href.split("?")[0].split("#")[0]+"?#googtrans(en|en)",$cookies.remove("currentLangauge"),$cookies.remove("googtrans"),$cookies.remove("googtrans",{path:"/",domain:".brewerdigitalmarketing.com"}),$cookies.remove("googtrans",{path:"/",domain:$window.location.hostname.replace("www.",".")})}function go(state,params,url,value){return value&&($rootScope.selectedIndex=value),params&&1==params.external&&0==url.indexOf("/")?($location.path(url),!0):url&&0==url.indexOf("http")?exit(url):(params=params||{},$state.go(state,params),!0)}function goBack(){$state.go($rootScope.header.backState.pop()||"welcome",$rootScope.header.backParams.pop()||{}),$rootScope.header.deferStackTrace=!0}function close(){Settings.focus(),$state.go($rootScope.header.backState.pop()||"welcome",$rootScope.header.backParams.pop()||{}),$rootScope.header.deferStackTrace=!0}function querySearch(query){$rootScope.search.hasAutocompleteResults=!1;var deferred=$q.defer();return Places.autocomplete(query,function(data){data&&data.entries?($rootScope.search.hasAutocompleteResults=!0,deferred.resolve(data.entries)):deferred.resolve([])}),deferred.promise}function signIn(ev,user){if(!user.email||!user.password)return Alert.fire({ev:ev,message:"Please fill in all the fields"});Settings.get("prevState")||Settings.set("prevState","welcome"),Person.login(user,authSuccess)}function createAccount(ev,user){if(!user.email||!user.password)return Alert.fire({ev:ev,message:"Please fill in all the fields"});Settings.get("prevState")||Settings.set("prevState","welcome"),Person.register(user,authSuccess)}function signOut(){$localStorage.user=null,$localStorage.reservationId=null,$localStorage.token=!1,Settings.set("user",null),Settings.set("isSignedIn",!1),Settings.set("reservationId",null),Settings.set("reservationsList",null),Settings.set("token",null),$state.go("trips")}function viewGuestReservation(){Settings.get("reservationId")?$state.go("viewTrip",{tripId:Settings.get("reservationId")}):$state.go("trips")}function authSuccess(user){"ok"==user.status&&($localStorage.token=user.profile.guest.token,$localStorage.user=user.profile,$localStorage.reservationId=null,Settings.set("isSignedIn",!0),Settings.set("token",user.profile.guest.token),Settings.set("user",user.profile),Settings.set("reservationId",null),$state.go(Settings.get("prevState")))}($location.search().lid||$location.search().LID||$location.search().Lid)&&$analytics.eventTrack($location.search().lid||$location.search().LID||$location.search().Lid,{category:"phone"}),($location.search().promoid||$location.search().PROMOID||$location.search().Promoid)&&$analytics.eventTrack($location.search().promoid||$location.search().PROMOID||$location.search().Promoid,{category:"promotion"}),$location.search().Identifier||$location.search().identifier?($window.PROMOID=$location.search().Identifier||$location.search().identifier,Alert.fire({message:'Promo: "'+$window.PROMOID.toUpperCase()+'" activated!'})):$location.search().lid||$location.search().LID||$location.search().Lid?($window.LID=$location.search().lid||$location.search().LID||$location.search().Lid,$analytics.eventTrack($location.search().lid||$location.search().LID||$location.search().Lid,{category:"phone"}),Places.get("SiteDynamicPhone",$window.LID).then(function(response){"ok"==response.data.status&&response.data.phone&&($rootScope.headerPhone=response.data.phone)})):($location.search().title||$location.search().message)&&Alert.fire({title:$location.search().title.split("+").join(" "),message:$location.search().message.split("+").join(" ")}),$rootScope.isPerformanceCheck=$window.IS_PERFORMANCE_CHECK;var _menuItems=$window.APP_CONFIG.menu,_footerMenuItems=[],pageOrdering=1;angular.forEach(_menuItems,function(item,key){"1"==item.isActive&&(item.ordering=item.ordering?parseInt(item.ordering):pageOrdering++,item.children=[],"1"==item.isFooterMenuItem&&(_footerMenuItems[key]=item))}),$window.LANDING_PAGES&&(angular.forEach($window.LANDING_PAGES,function(page){"1"==page.isActive&&(page.params={},page.menuName=page.title,page.state=page.id,page.slug&&0==page.slug.indexOf("http")&&(page.params.external=1),page.slug=page.slug&&page.slug.replace("https://"+$window.location.hostname,""),page.ordering=page.ordering?parseInt(page.ordering):pageOrdering++,page.children=[],page.parent&&"0"!=page.parent||(_menuItems[page.state]=page),"1"==page.isFooterMenuItem&&(_footerMenuItems[page.state]=page))}),angular.forEach($window.LANDING_PAGES,function(page){angular.forEach(_menuItems,function(menuItem){menuItem.children=menuItem.children||[],page.parent!=menuItem.id&&page.parent!=menuItem.state||"1"!=page.isMenuItem||"1"!=page.isActive||menuItem.children.push({id:page.id,parent:page.parent,title:page.title,pageTitle:page.pageTitle||page.title,slug:page.slug,ordering:"1"==page.isMenuItem?parseInt(page.ordering):menuItem.ordering,children:[]})})}),angular.forEach($window.LANDING_PAGES,function(page){angular.forEach(_menuItems,function(menuItem){angular.forEach(menuItem.children,function(child){page.parent!=child.id&&page.parent!=child.state||"1"!=page.isMenuItem||"1"!=page.isActive||child.children.push({id:page.id,parent:page.parent,title:page.title,pageTitle:page.pageTitle||page.title,slug:page.slug,ordering:"1"==page.isMenuItem?parseInt(page.ordering):menuItem.ordering})})})}));var gdpr=$cookies.get("gdpr_agree"),hideGdpr=!1;if(!gdpr&&1!=$window.CUSTOM_GDPR){$timeout(function(){hideGdpr=!0},3e3);var linksHTML="";$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&($window.APP_CONFIG.core.footer.privacyLink&&(["default","jade","jade-eh"].indexOf($window.APP_CONFIG.core.themes.template)>-1?linksHTML+=' Privacy Notice':linksHTML+=' Privacy Policy'),$window.APP_CONFIG.core.footer.termsLink&&(linksHTML+=' Terms')),$mdToast.show({hideDelay:0,position:"bottom left",template:'
To personalize content and provide a safer experience, we use cookies. By using this site you agree to our use of cookies.'+linksHTML+'
Dismiss
',controller:function($mdToast){this.hideToast=function(){$mdToast.hide();var currentTime=new Date,expireTime=new Date;expireTime.setHours(expireTime.getHours()+87600),$cookies.put("gdpr_agree",moment(currentTime).format("YYYY-MM-DD"),{expires:expireTime,secure:!0})}},controllerAs:"ctrl"}).then(function(result){})}$rootScope.updateLanguage=function(language){$analytics.eventTrack("Select Language",{category:"Language Selection",label:language}),$window.location.href=$window.location.href.split("?")[0].split("#")[0]+"?#googtrans(en|"+language+")"},$rootScope.bookNow=function(ev,url){if(url||$window.BOOKING_URL){var checkin=$filter("date")(new Date(Settings.get("checkinDate")?moment(Settings.get("checkinDate")):moment().add($window.CHECKOUT_OFFSET||1,"days")),"M/dd/yyyy"),checkout=$filter("date")(new Date(Settings.get("checkoutDate")?moment(Settings.get("checkoutDate")):moment().add($window.CHECKIN_OFFSET||0,"days")),"M/dd/yyyy"),bookingParams=(url||$window.BOOKING_URL)+($window.PROMOID&&$window.PRODUCTID?"":"&datein="+checkin+"&checkin="+checkin)+($window.PROMOID&&$window.PRODUCTID?"":"&dateout="+checkout+"&checkout="+checkout)+($window.PROMOID?"&identifier="+$window.PROMOID:"")+($window.PRODUCTID?"&ProdID="+$window.PRODUCTID:"")+($window.GAEVENT?"&identifier="+$window.GAEVENT:"")+"&adults="+($window.CHECKIN_ADULTS||"1")+"&children=0&rooms=1";"function"==typeof $window.tag_url?$window.open($window.tag_url(bookingParams),"_blank"):$window.open($window._tag_url(bookingParams),"_blank")}else bookNowDialog(ev)},$rootScope.emailSubscribe=function(ev){$rootScope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:$rootScope.subscriberEmail}).then(function(response){$rootScope.subscriberEmail="",Alert.fire({ev:ev,title:$filter("trustAsHTML")($window.APP_CONFIG.core.footer.subscribeConfirmationHeading||"Thanks for signing up!"),message:$filter("trustAsHTML")($window.APP_CONFIG.core.footer.subscribeConfirmationText||"We’ll send our best offers and latest news straight to your inbox.")})}):Alert.fire({ev:ev,message:"Please enter a valid email address."})},$rootScope.blurSelect=function(){$mdSelect.hide()},$rootScope.parentMenuCheck=function(item){return(!item.parent||"0"==item.parent)&&"1"==item.isActive&&"0"!=item.isMenuItem},$rootScope.getSubMenuTarget=function(slug){return slug&&0==slug.indexOf("http")?slug.indexOf($window.location.hostname)>-1&&-1==slug.indexOf(".html")?"":"_blank":""},$rootScope.translatePopup=function(ev){var popup=$mdDialog.confirm({controller:function($scope,$cookies,$window,$analytics,$mdDialog){$scope.updateLanguage=function(language){$analytics.eventTrack("Select Language Modal",{category:"Language Selection",label:language});var expireDate=new Date;expireDate.setMinutes(expireDate.getMinutes()+30),$cookies.put("currentLanguage",language,{secure:!0,expires:expireDate}),$window.location.href=$window.location.href.split("?")[0].split("#")[0]+"?#googtrans(en|"+language+")"},$scope.closeDialog=function(ev){$mdDialog.hide()}},templateUrl:"app/cards/translate-popup.html",parent:angular.element(document.body),targetEvent:ev,clickOutsideToClose:!0});$mdDialog.show(popup).then(function(){})},$rootScope.menuItems=_menuItems,$rootScope.footerMenuItems=_footerMenuItems,$rootScope.MetaTags=MetaTags,$rootScope.header={},$rootScope.header.hasBackButton=!1,$rootScope.contentLoaded=!0,$rootScope.openSidenav=openSidenav,$rootScope.closeSidenav=closeSidenav,$rootScope.isSidenavOpen=isSidenavOpen,$rootScope.openSidenavLeft=openSidenavLeft,$rootScope.toggleSidenavLeft=function(componentId){return function(){$mdSidenav(componentId).toggle()}}("left"),$rootScope.closeSidenavLeft=closeSidenavLeft,$rootScope.isSidenavOpenLeft=isSidenavOpenLeft,$rootScope.getPhotoUrl=getPhotoUrl,$rootScope.duplicate=duplicate,$rootScope.mediaMode={},$rootScope.collections={},$window.innerWidth>0&&($window.innerWidth>599&&($rootScope.mediaMode.nonMobile=!0),$window.innerWidth<600?$rootScope.mediaMode.xs=!0:$window.innerWidth<960?$rootScope.mediaMode.sm=!0:$window.innerWidth<1280?$rootScope.mediaMode.md=!0:$window.innerWidth<1920?$rootScope.mediaMode.lg=!0:$rootScope.mediaMode.xl=!0),angular.element($window).on("resize",function(){$window.innerWidth>0&&($rootScope.mediaMode={},$window.innerWidth>599&&($rootScope.mediaMode.nonMobile=!0),$window.innerWidth<600?$rootScope.mediaMode.xs=!0:$window.innerWidth<960?$rootScope.mediaMode.sm=!0:$window.innerWidth<1280?$rootScope.mediaMode.md=!0:$window.innerWidth<1920?$rootScope.mediaMode.lg=!0:$rootScope.mediaMode.xl=!0)}),$rootScope.windowWidth=$window.innerWidth,$rootScope.windowHeight=$window.innerHeight;var _popupsDisplayedUrls=[];try{var clientId=$window.getClientId();clientId&&Settings.set("token",clientId)}catch(e){console.log(e)}var amenityIconSet={Accessible:"","Air-conditioned":"","Air Conditioned":"","Airport shuttle":"",Bar:"","Business center":"","Fitness Center":"","2 Fitness Centers":"","Exercise Gym":"","Free breakfast":"","Free Breakfast":"","Continental breakfast":"","Gift Shop":"","Nearby Shopping":"",Golf:"","Golf Nearby":"","18-hole Golf Course":"","Championship Golf Course":"","14-Station Driving Range":"","Free parking":"","Wi-Fi":"","Free Wi-Fi":"","Free Wi-fi":"","Hot tub":"","Hot Tub":"","6 Hot Tubs":"","Kid-friendly":"","Full Kitchens":"","Kitchen in all rooms":"","Kitchen/Kitchenette":"","In Room Kitchens/Kitchenettes":"","Laundry service":"","Laundry Service":"","Laundry Facilities":"",Pool:"","6 Sparkling Pools":"","Outdoor Pool":"","Heated Pool":"","Outdoor Pool with Whirlpool":"","Childrens Pool":"",Restaurant:"","Restaurant & Lobby Bar":"","Restaurant - The Toll Booth Tavern":"","Pet-friendly":"",Smoking:"","Smoke free":"","Indoor Parking":"","Free Parking":"","Valet Parking - Fee":"","Shuttle Bus":"","Shuttle to Napa":"","Disney Shuttle - Fee":""};if(Settings.set("amenityIconSet",amenityIconSet),$rootScope.amenityIconSet=amenityIconSet,Places.get("PropertyNoticesData",$window.PROPERTY_ID).then(function(response){"ok"==response.data.status&&($rootScope.siteNotices=response.data.content.siteNotices,Settings.set("siteNotices",response.data.content.siteNotices))}),$timeout(function(){Settings.get("hasCurrentListing")?($rootScope.property=Settings.get("currentListing"),$document[0].getElementById("lazy-load-footer")&&($document[0].getElementById("lazy-load-footer").style.display="block")):Places.getMetaPropertyDetails($window.PROPERTY_ID).then(function(data){$rootScope.property=Settings.get("currentListing"),$document[0].getElementById("lazy-load-footer")&&($document[0].getElementById("lazy-load-footer").style.display="block")}),$rootScope.collections=$rootScope.collections||{},($rootScope.highlightTabs&&$rootScope.highlightTabs.rooms>-1||$window.APP_CONFIG.menu.Rooms&&"1"==$window.APP_CONFIG.menu.Rooms.showInSubMenu)&&Places.get("PropertyRoomsDetails",$window.PROPERTY_ID).then(function(response){if(response&&response.data){var rooms=response.data.property.schema&&response.data.property.schema.hasOfferCatalog?response.data.property.schema.hasOfferCatalog.itemListElement:[];$rootScope.highlightTabs&&$rootScope.highlightTabs.rooms>-1?($rootScope.collections.room=$rootScope.collections.room||[],angular.forEach(rooms,function(room){$rootScope.collections.room.push({label:room.itemOffered.name,url:"/rooms/"+$filter("toSlug")(room.itemOffered.name)})})):angular.forEach($rootScope.menuItems,function(menuItem){"rooms"==menuItem.state&&rooms.length&&(menuItem.children=menuItem.children||[],angular.forEach(rooms,function(room){menuItem.children.push({id:$filter("toSlug")(room.itemOffered.name),title:room.itemOffered.name,pageTitle:room.itemOffered.name,slug:"rooms/"+$filter("toSlug")(room.itemOffered.name)})}))})}}),($rootScope.highlightTabs&&$rootScope.highlightTabs.offers>-1||$window.APP_CONFIG.menu.Offers&&"1"==$window.APP_CONFIG.menu.Offers.showInSubMenu)&&Places.get("PropertyOffersDetails",$window.PROPERTY_ID).then(function(response){if(response&&response.data){var offers=response.data.offers||[],uniqueOffers=[];$rootScope.highlightTabs&&$rootScope.highlightTabs.offers>-1?($rootScope.collections.offer=$rootScope.collections.offer||[],angular.forEach(offers,function(offer){-1==uniqueOffers.indexOf(offer.oid)&&0==offer.hideMicrosite&&($rootScope.collections.offer.push({label:offer.title,url:"/offers/"+$filter("toSlug")(offer.title)+"-"+offer.oid}),uniqueOffers.push(offer.oid))})):angular.forEach($rootScope.menuItems,function(menuItem){"offers"==menuItem.state&&offers.length&&(menuItem.children=menuItem.children||[],angular.forEach(offers,function(offer){-1==uniqueOffers.indexOf(offer.oid)&&0==offer.hideMicrosite&&(uniqueOffers.push(offer.oid),menuItem.children.push({id:$filter("toSlug")(offer.title),title:offer.title,pageTitle:offer.title,slug:"offers/"+$filter("toSlug")(offer.title)}))}))})}}),($rootScope.highlightTabs&&$rootScope.highlightTabs.events>-1||$window.APP_CONFIG.menu.Events&&"1"==$window.APP_CONFIG.menu.Events.showInSubMenu)&&Places.get("PropertyNearbyEvents",$window.PROPERTY_ID).then(function(response){if(response&&response.data&&response.data.events&&response.data.events.length){var events=response.data.events;events=events.filter(function(event){return moment().diff(moment(event.end_time),"days")<=0}),$rootScope.highlightTabs&&$rootScope.highlightTabs.events>-1?($rootScope.collections.event=$rootScope.collections.event||[],angular.forEach(events,function(event){$rootScope.collections.event.push({label:event.name,url:"/events/"+$filter("toSlug")(event.name)})})):angular.forEach($rootScope.menuItems,function(menuItem){"event"==menuItem.state&&events.length&&(menuItem.children=menuItem.children||[],angular.forEach(events,function(event){menuItem.children.push({id:$filter("toSlug")(event.name),title:event.name,pageTitle:event.name,slug:"events/"+$filter("toSlug")(event.name)})}))})}}),($rootScope.highlightTabs&&$rootScope.highlightTabs.nearby>-1||$window.APP_CONFIG.menu.Nearby&&"1"==$window.APP_CONFIG.menu.Nearby.showInSubMenu)&&Places.get("NearbyCategories",$window.PROPERTY_ID).then(function(response){if(response&&response.data&&response.data.categories&&response.data.categories.length){var categories=response.data.categories;$rootScope.highlightTabs&&$rootScope.highlightTabs.nearby>-1?($rootScope.collections.nearby=$rootScope.collections.nearby||[],angular.forEach(categories,function(category){angular.forEach(category.items,function(item){$rootScope.collections.nearby.push({label:item.name,url:"/nearby/"+item.slug})})})):angular.forEach($rootScope.menuItems,function(menuItem){"nearby"==menuItem.state&&categories.length&&(menuItem.children=menuItem.children||[],$rootScope.collections.nearby=$rootScope.collections.nearby||[],angular.forEach(categories,function(category){angular.forEach(category.items,function(item){menuItem.children.push({id:$filter("toSlug")(item.name),title:item.name,pageTitle:item.name,slug:"nearby/"+item.slug})})}))})}})},1e3),1==$window.LANG_SUPPORT){if($location.hash().indexOf("googtrans")>-1){var _currentLanguage=$location.hash().replace("googtrans(en|","").replace(")","");if("en"==_currentLanguage)$cookies.remove("currentLanguage"),$cookies.remove("googtrans"),$cookies.remove("googtrans",{path:"/",domain:".brewerdigitalmarketing.com"}),$cookies.remove("googtrans",{path:"/",domain:$window.location.hostname.replace("www.",".")});else{var expireDate=new Date;expireDate.setMinutes(expireDate.getMinutes()+30),$cookies.put("currentLanguage",_currentLanguage,{secure:!0,expires:expireDate})}$timeout(function(){$location.hash("")},2e3)}$window.currentLanguage=$cookies.get("currentLangauge"),$rootScope.currentLanguage=$cookies.get("currentLangauge"),$rootScope.currentLanguage&&"en"!=$rootScope.currentLanguage&&"null"!=$rootScope.currentLanguage?$rootScope.googleTranslateActive=!0:($cookies.remove("googtrans"),$cookies.remove("googtrans",{path:"/",domain:".brewerdigitalmarketing.com"}),$cookies.remove("googtrans",{path:"/",domain:$window.location.hostname.replace("www.",".")}))}var firstRun=!0;$rootScope.search={},$rootScope.altLogo=null,$rootScope.go=go,$rootScope.close=close,$rootScope.goBack=goBack,$rootScope.explore=explore,$rootScope.exit=exit,$rootScope.resetLanguage=resetLanguage,$rootScope.querySearch=querySearch,$rootScope.createAccount=createAccount,$rootScope.signIn=signIn,$rootScope.signOut=signOut,$rootScope.focus=focus,$rootScope.showSearch=showSearch,$rootScope.viewGuestReservation=viewGuestReservation,$rootScope.bookNowDialog=bookNowDialog,$rootScope.bodyTemplateClass="",$rootScope.prevBodyTemplateClass="",$rootScope.noHeaderImageClass="",$rootScope.header.backState=[],$rootScope.header.backParams=[],$rootScope.currentState="home",$rootScope.$on("onDataLoaded",function(data){$timeout(function(){$rootScope.highlightTabs&&$rootScope.highlightTabs[$location.path()]>-1&&($rootScope.selectedIndex=$rootScope.highlightTabs[$location.path()])},50)}),$rootScope.$on("$stateChangeSuccess",function(ev,to,toParams,from,fromParams){$timeout(function(){if($rootScope.bodyClass="string"==typeof to.url&&"/"!=to.url?to.url.replace(/\//g,"").replace(":template","").toLowerCase():"home",$timeout(function(){try{1!=$window.SCROLL_TOP||from.url==to.url&&fromParams==toParams||(1==$window.SCROLL_TOP_HTML?document.getElementsByTagName("html")[0].scrollIntoView():document.getElementById("content").scrollIntoView(),$window.onScrollHandler&&onScrollHandler()),$window.POPUP_NOTIFICATIONS?(_popupsDisplayedUrls=[],angular.forEach($window.POPUP_NOTIFICATIONS,function(popupData){handlePopupData(popupData)})):$window.POPUP_NOTIFICATION&&(_popupsDisplayedUrls=[],handlePopupData($window.POPUP_NOTIFICATION))}catch(e){console.log(e)}},25), $rootScope.currentState=to.name,hideGdpr&&(hideGdpr=!1,$mdToast.hide()),$location.hash()&&$timeout(function(){$anchorScroll()},1800),$window.customTracking&&"function"==typeof $window.customTracking&&$window.customTracking(to.url),$rootScope.data||($rootScope.data={}),$rootScope.data.selectedIndex=to.data.index,$rootScope.highlightTabs&&(to.data.id?$rootScope.selectedIndex=$rootScope.highlightTabs[to.data.id]>-1?$rootScope.highlightTabs[to.data.id]:-1:to.data.state?$rootScope.selectedIndex=$rootScope.highlightTabs[to.data.state]>-1?$rootScope.highlightTabs[to.data.state]:-1:$rootScope.highlightTabs[$location.path()]>-1?$rootScope.selectedIndex=$rootScope.highlightTabs[$location.path()]:$rootScope.highlightTabs[$location.path().substring(1)]>-1?$rootScope.selectedIndex=$rootScope.highlightTabs[$location.path().substring(1)]:$rootScope.selectedIndex=-1),to.data.altState?($rootScope.altLogo=to.data.altLogo,$rootScope.altState=to.data.altState,angular.forEach($rootScope.menuItems,function(menuItem){menuItem.state==to.data.altState&&($rootScope.altMenuItem=menuItem,$rootScope.bodyTemplateClass=($stateParams.template||"").indexOf("chazontheplaza")>-1?$stateParams.template+" chazrevamp":$stateParams.template||to.data.template||"",$rootScope.prevBodyTemplateClass=$rootScope.bodyTemplateClass,$rootScope.noHeaderImageClass=menuItem.headerImage||"")})):($rootScope.altState=($stateParams.template||"").indexOf("chazontheplaza")>-1?"dining":"",$rootScope.altMenuItem=($stateParams.template||"").indexOf("chazontheplaza")>-1?$rootScope.menuItems.Dining:"",$rootScope.altLogo=($stateParams.template||"").indexOf("chazontheplaza")>-1?$window.altLogo:"",$rootScope.bodyTemplateClass=($stateParams.template||"").indexOf("chazontheplaza")>-1?$stateParams.template+" chazrevamp":$stateParams.template||to.data.template||"",$rootScope.noHeaderImageClass=($stateParams.template||"").indexOf("chazontheplaza")>-1?$rootScope.menuItems.Dining.headerImage:""),to.data.pageTitle&&Settings.setPageTitle(to.data.pageTitle),Settings.setMetaDescription(to.data.metaDescription),$rootScope.header.deferStackTrace?$rootScope.header.deferStackTrace=!1:($rootScope.header.backState.push(from.name),$rootScope.header.backParams.push(fromParams)),$window.ga&&$window.ga("send","pageview",{location:$location.absUrl(),page:$location.path(),title:to.data.pageTitle||$filter("camelCaseToHuman")($location.path())}),$window.dataLayer&&(dataLayer.push({event:"content-view"}),dataLayer.push({event:"internalPageview"})),$window.fbq&&$window.fbq("track","PageView"),$window.uetq&&$window.uetq.push("event","page_view",{page_path:$location.path()}),!firstRun&&$window.ga){if($window.trackerName)if("string"==typeof $window.trackerName)$window.ga($window.trackerName+".send","pageview",{location:$location.absUrl(),page:$location.path(),title:to.data.pageTitle||$filter("camelCaseToHuman")($location.path())});else try{angular.forEach($window.trackerName,function(tracker){$window.ga(tracker+".send","pageview",{location:$location.absUrl(),page:$location.path(),title:to.data.pageTitle||$filter("camelCaseToHuman")($location.path())})})}catch(e){console.log(e)}}else firstRun=!1;try{$timeout(function(){document.getElementById("header-toolbar")?$rootScope.headerToolbarHeight=document.getElementById("header-toolbar").clientHeight+"px":$rootScope.headerToolbarHeight="0px",document.getElementById("sitewide-notice")?$rootScope.sitewideNoticeHeight=document.getElementById("sitewide-notice").clientHeight+"px":$rootScope.sitewideNoticeHeight="0px"},window.delayRoutingTrigger?100:300)}catch(e){console.log(e),$rootScope.headerToolbarHeight="96px",$rootScope.sitewideNoticeHeight="0px"}},window.delayRoutingTrigger?800:0)})}String.prototype.ucwords=function(){return this.replaceAll("-"," ").replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function($1){return $1.toUpperCase()})},String.prototype.replaceAll=function(search,replacement){return this.replace(new RegExp(search,"g"),replacement)},String.prototype.startsWith||(String.prototype.startsWith=function(searchString,position){return position=position||0,this.indexOf(searchString,position)===position});var uiroutermetatags;!function(t){function e(t,e,r,s){function i(t,e,r,i,o){s.prerenderReady=!1}function o(e,s){s.metaTags||t.debug('MetaTags - route: "'+s.name+'" does not contain any metatags'),r.update(s.metaTags)}function a(t,e,i,o,a,n){r.prerender.statusCode=500,s.prerenderReady=!0}function n(t,e,i){r.prerender.statusCode=404,s.prerenderReady=!0}e.MetaTags=r,e.$on("$stateChangeStart",i),e.$on("$stateChangeSuccess",o),e.$on("$stateChangeError",a),e.$on("$stateNotFound",n)}e.$inject=["$log","$rootScope","MetaTags","$window"];var r=angular.module("ui.router.metatags",["ui.router"]),s=function(){function t(){this.prefix="",this.suffix="",this.defaultTitle="",this.defaultDescription="",this.defaultKeywords="",this.defaultRobots="",this.staticProperties={},this.enableOGURL=!1}return t.prototype.setTitlePrefix=function(t){return this.prefix=t,this},t.prototype.setTitleSuffix=function(t){return this.suffix=t,this},t.prototype.setDefaultTitle=function(t){return this.defaultTitle=t,this},t.prototype.setDefaultDescription=function(t){return this.defaultDescription=t,this},t.prototype.setDefaultKeywords=function(t){return this.defaultKeywords=t,this},t.prototype.setDefaultRobots=function(t){return this.defaultRobots=t,this},t.prototype.setStaticProperties=function(t){return this.staticProperties=t,this},t.prototype.setOGURL=function(t){return this.enableOGURL=t,this},t.prototype.$get=function(){return{prefix:this.prefix,suffix:this.suffix,defaultTitle:this.defaultTitle,defaultDescription:this.defaultDescription,defaultKeywords:this.defaultKeywords,defaultRobots:this.defaultRobots,staticProperties:this.staticProperties,enableOGURL:this.enableOGURL}},t}();r.provider("UIRouterMetatags",s);var i=function(){function t(t,e,r,s,i,o,a){this.$log=t,this.UIRouterMetatags=e,this.$interpolate=r,this.$injector=s,this.$state=i,this.$location=o,this.$window=a,this.prerender={}}return t.$inject=["$log","UIRouterMetatags","$interpolate","$injector","$state","$location","$window"],t.prototype.update=function(t){var e=this;try{this.properties=angular.extend({},this.UIRouterMetatags.staticProperties),this.UIRouterMetatags.enableOGURL&&(this.properties["og:url"]=this.$location.absUrl()),t?(this.title=t.title?this.UIRouterMetatags.prefix+(this.getValue("title",t.title)||"")+this.UIRouterMetatags.suffix:this.UIRouterMetatags.defaultTitle,this.description=t.description?this.getValue("description",t.description):this.UIRouterMetatags.defaultDescription,this.keywords=t.keywords?this.getValue("keywords",t.keywords):this.UIRouterMetatags.defaultKeywords,this.robots=t.robots?this.getValue("robots",t.robots):this.UIRouterMetatags.defaultRobots,angular.forEach(t.properties,function(t,r){var s=e.getValue(r,t);s&&(e.properties[r]=s)})):(this.title=this.UIRouterMetatags.defaultTitle,this.description=this.UIRouterMetatags.defaultDescription,this.keywords=this.UIRouterMetatags.defaultKeywords,this.robots=this.UIRouterMetatags.defaultRobots),t&&t.prerender?(this.prerender.statusCode=t.prerender.statusCode?this.getValue("prerender.statusCode",t.prerender.statusCode):200,this.prerender.header=t.prerender.header?this.getValue("rerender.header",t.prerender.header):null):(this.prerender.statusCode=200,this.prerender.header=null),this.$window.prerenderReady=!0}catch(r){this.$log.error("error occured when extracting metatags:",r)}},t.prototype.getValue=function(t,e){try{return e?"number"==typeof e?e:"string"==typeof e&&0===e.trim().length?null:angular.isFunction(e)||Array.isArray(e)?this.$injector.invoke(e,this,this.$state.$current.locals.globals):this.$interpolate(e)(this.$state.$current.locals.globals):null}catch(r){return this.$log.error("error occured when trying to get the value of tag:",t,r),null}},t}();r.service("MetaTags",i),r.run(e)}(uiroutermetatags||(uiroutermetatags={})),angular.module("brewervacations-app",["ngMaterial","ngStorage","humanizeText","ngSanitize","ngParallax","ngCookies","smoothScroll","mdPickers","ngMaterialDateRangePicker","ui.router","ui.router.util","ui.router.metatags","ui.carousel","sly","angular-inview","bdmMaterialCarousel","angulartics","angulartics.google.analytics","angularMaterialFormBuilder","leaflet-directive","ngCart","explorer.app"]).run(["$rootScope","$state","$stateParams","$window","$document","$filter","$localStorage","$timeout","$location","$q","$anchorScroll","$mdSidenav","$mdDialog","$mdToast","$mdSelect","$analytics","$cookies","MetaTags","Person","Places","Settings","Alert","appConfig",GuestAppInit])}(),function(){"use strict";angular.module("explorer.app").controller("ContactUsCtrl",function($state,$stateParams,Settings){var vm=this;vm.CallTel=function(tel){window.location.href="tel:"+tel},vm.MailTo=function(mail){window.location.href="mailto:"+mail},Settings.enableBackButton()}).controller("AboutCtrl",function($state,$stateParams,Settings){var vm=this;Settings.enableBackButton(),vm.property=Settings.get("currentListing")}).controller("PrivacyCtrl",function($state,$stateParams,Settings){Settings.enableBackButton()}).controller("TermsCtrl",function($state,$stateParams,Settings){Settings.enableBackButton()})}(),function(){"use strict";function Configure(UIRouterMetatagsProvider,$sceDelegateProvider){UIRouterMetatagsProvider.setDefaultTitle(window.APP_CLIENT).setDefaultDescription(window.PROPERTY_DESCRIPTION),$sceDelegateProvider.resourceUrlWhitelist(["self","https://storage.googleapis.com/**","http://www.cfmedia.vfmleonardo.com/**","https://wyndham-extra-holidays.leonardocontentcloud.com/**","https://reservations.travelclick.com/**","https://api.trustyou.com/**","http://**.keen.io/**","http://**.triptease.io/**","https://**.keen.io/**","https://**.triptease.io/**","https://googleads.g.doubleclick.net/**","https://www.facebook.com/**","https://player.vimeo.com/**","https://*.vimeocdn.com/**","https://vimeo.com/**","https://*.*.doubleclick.net/**","https://api.stathat.com/**","https://www.googletagmanager.com/**","http://*.viator.com/**","http://*.tctm.co/**","https://www.opentable.com/**","https://beacon.sojern.com/**","https://*.onesignal.com/**","https://*.jscache.com/**","https://*.tacdn.com/**","https://*.tripadvisor.com/**","https://twitter.com/**","https://*.simpli.fi/**","https://*.stackla.com/**","https://*.authorize.net/**","https://*.demandforc**.com/**","https://*.flip.to/**","https://flip.to/**","https://**.book4time.com/**","https://vod-progressive.akamaized.net/**","https://**.leadconnectorhq.com/**","https://**.seekda.com/**","https://www.youtube.com/**","https://*.bookeo.com/**","https://bookeo.com/**","https://*.canva.com/**"])}function ConfigureRoutes($stateProvider,$urlMatcherFactory){function decodeHTMLEntities(str){var element=angular.element("
");return str&&"string"==typeof str&&(str=str.replace(/]*>([\S\s]*?)<\/script>/gim,""),str=str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),element.html(str),str=element.text(),element.text("")),str}$urlMatcherFactory.caseInsensitive(!0),$urlMatcherFactory.strictMode(!1);var tmpFound,subMenuCounter,tmpCounter,CDN_URL=window.CDN_URL||"/app/",APP_URL=window.APP_URL||"/",APP_THEME=window.APP_THEME||"",LANDING_PAGES=window.LANDING_PAGES||[],useHtmlH1=window.HTML_H1||!1,counter=-1,firstLoad=!0,sortedMenuOptions={},arrayMenuItems=[],noIndexPages={};if(angular.forEach(window.APP_CONFIG.menu,function(options,menuItem){1==options.isActive&&(options.menuItem=menuItem,arrayMenuItems.push(options))}),LANDING_PAGES.length){var pageCount=1,parentIndex=-1;angular.forEach(LANDING_PAGES,function(options){options.parent&&"0"!=options.parent||"1"!=options.isMenuItem||"1"!=options.isActive||(options.menuItem=options.menuName||options.title,options.type="landing",arrayMenuItems.push(options),options.slug.indexOf("stories/category/")>-1?noIndexPages.storiesCategory={pageTitle:"Stories"}:options.slug.indexOf("blog/category/")>-1?noIndexPages.storiesCategory={pageTitle:"Blog"}:options.slug.indexOf("press/category/")>-1&&(noIndexPages.storiesCategory={pageTitle:"Press"}))}),arrayMenuItems.sort(function(a,b){if(!(a.parent&&"0"!=a.parent||b.parent&&"0"!=b.parent)){if(parseInt(a.ordering)>parseInt(b.ordering))return 1;if(parseInt(a.ordering)1){var templateOptions=page.template.split(":");templateOptions[0]&&(page.templateUrl=templateOptions[0])}$stateProvider.state(page.id,{url:"/"+page.slug,templateUrl:CDN_URL+(window.APP_THEME||"default")+"/landingpage/view/"+(page.templateUrl||"landingpage")+".tpl.html",controller:(page.controller||"LandingPage")+"Ctrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},landingPage:function($state,$stateParams,Settings){return Settings.set("currentLandingPage",page),{content:page}}},metaTags:{title:page.pageTitle,description:page.metaDescription,properties:{"og:title":page.pageTitle,"og:description":page.metaDescription}},data:{id:page.id,index:parentIndex>-1?parentIndex:page.ordering,template:page.template,headerLogo:page.headerLogo,title:page.title,pageTitle:page.pageTitle||page.title,metaDescription:page.metaDescription||null,headerImage:page.headerImage,headerImageURL:page.headerImageURL,headerImageAlt:page.headerImageAlt,heroVideo:!(!page.heroVideo||"0"==page.heroVideo),heroVideoUrl:page.heroVideoUrl,xsHeroVideoUrl:page.xsHeroVideoUrl,featuredImage:page.featuredImage,featuredImageURL:page.featuredImageURL,featuredImageCaption:page.featuredImageCaption||"",featuredImagePosition:page.featuredImagePosition,bodyContent:page.bodyContent,secondaryBodyContent:page.secondaryBodyContent||null,h1:page.h1,hideH1:page.hideH1||!1,h2:page.h2,hideH2:page.hideH2||!1,hasRFP:page.hasRFP,RFPID:page.RFPID,RFPPosition:page.RFPPosition,hideBookingBarNumber:page.hideBookingBarNumber,promoCode:page.promoCode,gaEvent:page.gaEvent,productId:page.productId,altState:page.altState,altLogo:page.altLogo,headerImagePositionY:page.headerImagePositionY,propertyId:page.propertyId||null,requiresLogin:page.requiresLogin,requiresPassword:page.requiresPassword,showReviews:page.showReviews||null,showOffers:page.showOffers||null,hasFixedWidthHero:page.hasFixedWidthHero||0,hasFullWidthContent:page.hasFullWidthContent||0}}),pageCount++}})}arrayMenuItems.sort(function(a,b){return parseInt(a.ordering)>parseInt(b.ordering)?1:parseInt(a.ordering)-1?subMenuCounter:counter,headerLogo:options.headerLogo||null,menuName:options.menuName||menuItem,pageTitle:options.pageTitle||menuItem,metaDescription:options.metaDescription||null,headerImage:options.headerImage||"",headerImageURL:options.headerImageURL||"",headerImageAlt:options.headerImageAlt||"",heroVideo:!(!options.heroVideo||"0"==options.heroVideo),heroVideoUrl:options.heroVideoUrl,xsHeroVideoUrl:options.xsHeroVideoUrl,featuredImage:options.featuredImage||"",featuredImageURL:options.featuredImageURL,featuredImageCaption:options.featuredImageCaption||"",featuredImagePosition:options.featuredImagePosition,template:options.template,hasRFP:options.hasRFP,RFPID:options.RFPID,RFPPosition:options.RFPPosition,bodyContent:options.bodyContent||"",secondaryBodyContent:options.secondaryBodyContent||null,tertiaryBodyContent:options.tertiaryBodyContent||null,state:options.state,h1:options.h1?useHtmlH1?options.h1:decodeHTMLEntities(options.h1):"",hideH1:options.hideH1||!1,h2:options.h2?useHtmlH1?options.h2:decodeHTMLEntities(options.h2):"",hideH2:options.hideH2||!1,altState:options.altState,altLogo:options.altLogo,headerImagePositionY:options.headerImagePositionY,keyAmenities:options.keyAmenities,hasGallery:options.hasGallery||null,galleries:options.galleries||null,showReviews:options.showReviews||null,allowNewReviews:options.allowNewReviews||null,reviewCarouselAutoplaySpeed:options.reviewCarouselAutoplaySpeed,reviewCarouselAutoplayOn:options.reviewCarouselAutoplayOn,reviewCarouselArrows:options.reviewCarouselArrows,reviewCarouselDots:options.reviewCarouselDots,reviewsToShow:options.reviewsToShow,showOffers:options.showOffers||null,offersToShow:options.offersToShow||null,keyAmenitiesCTAUrl:options.keyAmenitiesCTAUrl||null,keyAmenitiesCTAText:options.keyAmenitiesCTAText||null},params:{template:{value:null,squash:!0}}};"rooms"==state&&$stateProvider.state("room",{url:APP_URL+"rooms/:slug",templateUrl:CDN_URL+APP_THEME+"/rooms/view/room.tpl.html",controller:"RoomCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var roomName=$filter("properCaps")($stateParams.slug),_title=(firstLoad&&window.META_TITLE?window.META_TITLE:roomName)+" at "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:"Discover "+roomName+" at "+window.APP_CLIENT+", and enjoy spacious, generously appointed accommodations, with incredible views of "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:counter,pageTitle:"Room"}}),"offers"==state&&($stateProvider.state("offer",{url:APP_URL+(window.OFFERS_URL?window.OFFERS_URL:"offers")+"/:slug",templateUrl:CDN_URL+APP_THEME+"/offers/view/offer.tpl.html",controller:"OfferCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var offerName=$stateParams.slug.match(/\d+$/);offerName=offerName&&offerName[0]?$filter("properCaps")($stateParams.slug.replace("-"+offerName[0],"")):$filter("properCaps")($stateParams.slug);var _title=(firstLoad&&window.META_TITLE?window.META_TITLE:offerName)+" at "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:offerName+" at "+window.APP_CLIENT+", the perfect hotel for business and leisure travelers alike in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:counter,pageTitle:"Offer",template:options.template}}),window.OFFERS_URL&&window.OFFERS_URL.indexOf("directory")>-1&&$stateProvider.state("directoryCategory",{url:APP_URL+(window.OFFERS_URL?window.OFFERS_URL:"offers")+"/category/:slug",templateUrl:CDN_URL+APP_THEME+"/offers/view/offers.tpl.html",controller:"OffersCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var categoryName=$filter("properCaps")($stateParams.slug),_title=firstLoad&&window.META_TITLE?window.META_TITLE:categoryName,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:categoryName;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:-1,pageTitle:"Directory Category"}})),"nearby"==state&&$stateProvider.state("nearbyListing",{url:APP_URL+"nearby/:slug",templateUrl:CDN_URL+APP_THEME+"/nearby/view/nearby-listing.tpl.html",controller:"NearbyListingCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var name=$filter("properCaps")($stateParams.slug.replace("-s-","'s-").replace("-s-","'s-")),_title=firstLoad&&window.META_TITLE?window.META_TITLE:name+" near "+window.APP_CLIENT,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:name+" near "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:counter,pageTitle:"Nearby"},params:{template:{value:null,squash:!0}}}),"events"==state&&$stateProvider.state("event",{url:APP_URL+":template/events/:slug?propertyId",templateUrl:CDN_URL+APP_THEME+"/events/view/event.tpl.html",controller:"EventCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var eventName=$filter("properCaps")($stateParams.slug),_title=firstLoad&&window.META_TITLE?window.META_TITLE:eventName+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:eventName+" event near "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:counter,pageTitle:"Event"},params:{template:{value:null,squash:!0}}}),"stories"==state&&$stateProvider.state("storiesCategory",{url:APP_URL+":template/"+(window.STORIES_URL?window.STORIES_URL:":folder")+"/category/:slug",templateUrl:CDN_URL+APP_THEME+"/stories/view/stories.tpl.html",controller:"StoriesCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var storyName=$filter("properCaps")($stateParams.slug),_title=(firstLoad&&window.META_TITLE?window.META_TITLE:storyName)+" near "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:"Discover "+storyName+" at "+window.APP_CLIENT+", and enjoy spacious, generously appointed accommodations, with incredible views of "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:noIndexPages.storiesCategory||{index:counter,pageTitle:"Stories"},params:{template:{value:null,squash:!0},folder:{value:"stories",squash:!1}}}).state("story",{url:APP_URL+":template/"+(window.STORIES_URL?window.STORIES_URL:":folder")+"/{slug:.*}",templateUrl:CDN_URL+APP_THEME+"/stories/view/story.tpl.html",controller:"StoryCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function($stateParams,$filter){var storyName=$filter("properCaps")($stateParams.slug),_title=firstLoad&&window.META_TITLE?window.META_TITLE:storyName,_description=firstLoad&&window.META_DESCRIPTION?window.META_DESCRIPTION:"Discover "+storyName+" at "+window.APP_CLIENT+", and enjoy spacious, generously appointed accommodations, with incredible views of "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE;return firstLoad=!1,{title:_title,description:_description}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:counter,pageTitle:"Story"},params:{template:{value:null,squash:!0},folder:{value:"stories",squash:!1}}}),$stateProvider.state(state,stateOptions)}}),$stateProvider.state("sitemap",{url:APP_URL+"sitemap",templateUrl:CDN_URL+APP_THEME+"/sitemap/view/sitemap.tpl.html",controller:"SiteMapCtrl as vm",resolve:{listing:function($stateParams,Places,Settings){return Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function(){return{title:"View Our Sitemap for "+window.APP_CLIENT+" in "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE,description:"Discover world-class accommodations at "+window.APP_CLIENT+", the perfect hotel for business and leisure travelers alike. Enjoy spacious, generously appointed rooms, with incredible views of "+window.PROPERTY_CITY+", "+window.PROPERTY_STATE+"+ Book online or call us today at "+window.APP_CLIENT_PHONE+" to book your next unforgettable vacation."}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:-1,pageTitle:"Sitemap"}}).state("testingHomepage",{url:"",templateUrl:CDN_URL+APP_THEME+"/home/view/home.tpl.html",controller:"HomeCtrl as vm",resolve:{meta:function($stateParams,$filter){return{title:window.APP_CLIENT,description:window.PROPERTY_DESCRIPTION}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:0,pageTitle:"Home Page"}}).state("404",{url:"*path",templateUrl:CDN_URL+APP_THEME+"/404/view/404.tpl.html",controller:"ErrorCtrl as vm",resolve:{listing:function($state,$stateParams,Places,Settings){return window.DISABLE_404&&$state.go("home",{},{reload:!0}),Places.getMetaPropertyDetails(window.PROPERTY_ID)},meta:function(){return{title:"404 Not Found",description:"Page Not Found"}}},metaTags:{title:"{{meta.title}}",description:"{{meta.description}}"},data:{index:-1,pageTitle:"404: Page Not Found"}})}angular.module("explorer.routes",["ui.router","ui.router.util","ui.router.metatags","ngSanitize"]).config(["UIRouterMetatagsProvider","$sceDelegateProvider",Configure]).config(["$stateProvider","$urlMatcherFactoryProvider",ConfigureRoutes])}(),function(){"use strict";function ErrorCtrl($state,$window,Places,Settings){function _sanitizeOrdering(menuItems){for(var i in menuItems)menuItems[i].ordering=parseInt(menuItems[i].ordering)}var _menuItems,vm=this;vm.property=Settings.get("currentListing"),_menuItems=angular.copy($window.APP_CONFIG.menu),angular.forEach(_menuItems,function(item){item.children&&(item.children=item.children.filter(function(child){return-1==child.slug.indexOf("http")}))}),$window.LANDING_PAGES&&$window.LANDING_PAGES.length&&(vm.landingPages=$window.LANDING_PAGES),vm.menuItems=_menuItems,function(){var menuArragement=[],subMenuArragement=[],menuOrdering=1,subMenuOrdering=1;angular.forEach(_menuItems,function(item){item.children&&(item.children=item.children.filter(function(child){return-1==child.slug.indexOf("http")}),angular.forEach(item.children,function(child){child.parent=item.id||item.state,subMenuArragement.push(child)}))}),angular.forEach(vm.menuItems,function(coreMenuItem){coreMenuItem.type="core",1==coreMenuItem.isActive&&(coreMenuItem.parent&&coreMenuItem.parent.length&&"0"!=coreMenuItem.parent?(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:subMenuOrdering++, subMenuArragement.push(coreMenuItem)):(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:menuOrdering++,menuArragement.push(coreMenuItem)))}),vm.landingPages&&angular.forEach(vm.landingPages,function(landingPageItem){landingPageItem.type="landing",1==landingPageItem.isActive&&(landingPageItem.parent&&landingPageItem.parent.length&&"0"!=landingPageItem.parent?(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:subMenuOrdering++,subMenuArragement.push(landingPageItem)):(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:menuOrdering++,menuArragement.push(landingPageItem)))}),vm.menuArragement=menuArragement,vm.subMenuArragement=subMenuArragement,_sanitizeOrdering(vm.subMenuArragement),_sanitizeOrdering(vm.menuArragement)}();try{var errorPage=new URL(document.querySelector("link[rel='canonical']").getAttribute("href"));console.log("error validation",vm.menuItems,vm.landingPages),Places.addErrorPage(errorPage.pathname,document.referrer).then(function(response){"ok"==response.data.status&&console.log(response)})}catch(e){console.log(e)}}angular.module("explorer.app").controller("ErrorCtrl",["$state","$window","Places","Settings",ErrorCtrl])}(),function(){"use strict";function AmenitiesCtrl($state,Settings){var vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.property=Settings.get("currentListing"),vm.iconSet={Accessible:"","Air-conditioned":"","Airport shuttle":"",Bar:"","Business center":"","Fitness Center":"","Free breakfast":"","Free parking":"","Free Wi-Fi":"","Hot tub":"","Kid-friendly":"","Kitchen in all rooms":"","Laundry service":"",Pool:"",Restaurant:"","Pet-friendly":"",Smoking:"","Smoke free":""}}angular.module("explorer.app").controller("AmenitiesCtrl",["$state","Settings",AmenitiesCtrl])}(),function(){"use strict";function ContactCtrl($state,$stateParams,$window,$analytics,$timeout,Person,Settings,Alert){var vm=this;vm.mapMarkerIcon=$window.APP_CONFIG.core.themes?$window.APP_CONFIG.core.themes.mapMarkerIcon:null,vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.property=Settings.get("currentListing"),vm.RFPID=$state.current.data.RFPID||1,vm.callTel=$window.APP_CLIENT_PHONE,vm.contactEmail=$window.APP_CLIENT_EMAIL||vm.property.schema.email,vm.contactForm={},"-1"==vm.RFPID?(vm.hasCustomRFP=!1,vm.hasRFP=!1):vm.RFPID.toString().length>1?(vm.hasRFP=!0,vm.hasCustomRFP=!0,Person.get("FormDetails",vm.RFPID).then(function(response){"ok"==response.data.status&&(vm.customForm=response.data.form)})):(vm.hasCustomRFP=!1,vm.hasRFP=!0),$timeout(function(){vm.mapCenter={lat:parseFloat(vm.property.schema.geo.latitude),lng:parseFloat(vm.property.schema.geo.longitude),focus:!0,draggable:!1,zoom:vm.mapZoom||16},vm.mapMarkers={marker:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-emerald.png",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]}}},vm.mapEvents={map:{enable:[],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.mapOptions={attributionControl:!1,dragging:!1,boxZoom:!1,doubleClickZoom:!1,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!1,tileLayer:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",minZoom:1,maxZoom:15},$timeout(function(){var mapTiles=document.getElementsByClassName("leaflet-tile");angular.forEach(mapTiles,function(elem){elem.setAttribute("alt","Map Tile"),elem.setAttribute("aria-label","Map Tile")})},600)},100),vm.submitContactUs=function(ev){vm.contactForm.name&&vm.contactForm.email&&vm.contactForm.message?Person.submitForm("ContactUs",vm.contactForm).then(function(response){response&&response.data&&"ok"==response.data.status?($window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("ContactUs"),$analytics.eventTrack("Contact Form",{category:"Contact",label:"Submit"}),Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({ev:ev,message:"There was an error, please try again later!"})}):Alert.fire({ev:ev,message:"Please fill in all the required fields."})},vm.submitCustomRFP=function(ev){vm.customForm?Person.submitForm("CustomRFP",vm.customForm).then(function(response){response&&response.data&&"ok"==response.data.status?($window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("ContactUs"),$analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:vm.customForm.submitText}),Alert.fire({ev:ev,title:vm.customForm.submissionMessageHeading||"Attention",message:vm.customForm.submissionMessageText||"Thank you. We will reach out to you shortly!"}),$state.reload()):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Server Error"}),Alert.fire({ev:ev,message:"There was an error, please try again later!"}),$state.reload())}):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Error, try again later"}))}}angular.module("explorer.app").controller("ContactCtrl",["$state","$stateParams","$window","$analytics","$timeout","Person","Settings","Alert",ContactCtrl])}(),function(){"use strict";function DiningCtrl($scope,$state,$stateParams,$window,Places,Settings,appConfig){function setupDiningOptions(options){return options.map(function(option){return option.lat&&option.lng&&(option.mapMarker={center:{lat:parseFloat(option.lat),lng:parseFloat(option.lng),focus:!0,draggable:!0,zoom:12},markers:{marker:{lat:parseFloat(option.lat),lng:parseFloat(option.lng),message:(option.image?"":"")+option.name+'
'+option.addressLocality+", "+option.addressRegion+"
",focus:!1,alt:"Map marker for "+$window.APP_CLIENT+", located in "+option.addressLocality+", "+option.addressRegion,icon:appConfig.mapMarkerIcon||{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-72]}}}}),option})}var vm=this;vm.title=$state.current.data.pageTitle,vm.pageTitle=$state.current.data.pageTitle,vm.headerImage=$state.current.data.headerImage,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.template=$state.current.data.template,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.property=Settings.get("currentListing"),vm.mapMarkerIcon=$window.APP_CONFIG.core.themes&&$window.APP_CONFIG.core.themes.attractionMapMarkerIcon?$window.APP_CONFIG.core.themes.attractionMapMarkerIcon:null,vm.mapOptions={attributionControl:!1,dragging:!0,boxZoom:!0,doubleClickZoom:!0,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!0,tileLayer:"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",minZoom:1,maxZoom:15},vm.mapEvents={map:{enable:["moveend","popupopen"],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.template&&Settings.setTemplate(vm.template),Settings.get("has_property_dining_"+$window.PROPERTY_ID)?vm.diningOptions=Settings.get("property_dining_"+$window.PROPERTY_ID):Places.get("PropertyDiningDetails",$window.PROPERTY_ID).then(function(response){if("ok"==response.data.status){var _diningOptions=response.data.details;_diningOptions&&_diningOptions.length&&(vm.diningOptions=setupDiningOptions(_diningOptions),Settings.set("property_dining_"+$window.PROPERTY_ID,vm.diningOptions),Settings.set("has_property_dining_"+$window.PROPERTY_ID,!0))}})}angular.module("explorer.app").controller("DiningCtrl",["$scope","$state","$stateParams","$window","Places","Settings","appConfig",DiningCtrl])}(),function(){"use strict";function EventCtrl($scope,$state,$stateParams,$window,$filter,$timeout,Places,Settings,Alert){function eventsSubscribe(ev){if(vm.hasEventsSubscribe){var thanksMessage="You'll be the first to know when new events are available.";OneSignal.push(function(){if(OneSignal.isPushNotificationsSupported())try{getSubscriptionState().then(function(state){state.isPushEnabled?OneSignal.sendTags({sub_url:$window.location.href,topic:"events"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})}):(OneSignal.registerForPushNotifications(),OneSignal.on("subscriptionChange",function(isSubscribed){isSubscribed&&OneSignal.sendTags({sub_url:$window.location.href,topic:"events"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})})}))})}catch(e){console.log(e)}})}return!1}var events,vm=this,found=!1;if(vm.headerImage=$state.current.data.headerImage||"",vm.bodyContent=$state.current.data.bodyContent||"",vm.h1=$state.current.data.h1||"",vm.h2=$state.current.data.h2||"",vm.template=$stateParams.template||"",vm.property=Settings.get("currentListing"),vm.propertyId=$stateParams.propertyId||vm.property.id,vm.eventsSubscribe=eventsSubscribe,vm.hasEventsSubscribe="undefined"!=typeof OneSignal,vm.template&&Settings.setTemplate(vm.template),$window.APP_CONFIG.core.events)if(Settings.get("currentEvents"))events=Settings.get("currentEvents"),events=events.filter(function(event){return moment().diff(moment(event.end_time),"days")<=0}),angular.forEach(events,function(event){found||$stateParams.slug!=$filter("toSlug")(event.name)||(found=!0,vm.event=event,vm.headerImage=event.cover&&event.cover.source,vm.h2=event.name)}),found||$state.go("events");else try{Places.get("PropertyFacebookEvents",$window.APP_CONFIG.core.events.accessToken,$window.APP_CONFIG.core.events.fbPage).then(function(response){response&&response.data&&(events=response.data.events,events=events.filter(function(event){return moment().diff(moment(event.end_time),"days")<=0}),angular.forEach(events,function(event){found||$stateParams.slug!=$filter("toSlug")(event.name)||(vm.event=event,vm.headerImage=event.cover&&event.cover.source,vm.h2=event.name,found=!0)})),found||$state.go("events")})}catch(e){console.log(e)}else $timeout(function(){Places.get("PropertyNearbyEvents",vm.propertyId||window.PROPERTY_ID).then(function(response){response&&response.data&&(events=response.data.events,events=events.filter(function(event){return"0"==event.expires||moment().diff(moment(event.end_time),"days")<=0}),angular.forEach(events,function(event){found||$stateParams.slug!=$filter("toSlug")(event.name)||(vm.event=event,vm.headerImage=event.cover&&event.cover.source,vm.h2=event.name,found=!0)})),found||$state.go("events")})},500)}angular.module("explorer.app").controller("EventCtrl",["$scope","$state","$stateParams","$window","$filter","$timeout","Places","Settings","Alert",EventCtrl])}(),function(){"use strict";function EventsCtrl($scope,$state,$window,$filter,$timeout,Places,Settings,Alert){function _setupEvents(events){var thisWeekEvents=[],nextWeekEvents=[],upcomingEvents=[],calendarEvents=[];angular.forEach(events,function(event){compareTime("lessThan",event.start_time,"this_week")&&thisWeekEvents.push(event),compareTime("moreThan",event.start_time,"this_week")&&compareTime("lessThan",event.start_time,"next_week")&&nextWeekEvents.push(event),compareTime("moreThan",event.start_time,"next_week")&&upcomingEvents.push(event)}),vm.thisWeekEvents=thisWeekEvents,vm.nextWeekEvents=nextWeekEvents,vm.upcomingEvents=upcomingEvents,calendarEvents=events.map(function(event){return{title:event.name,start:new Date(moment(event.start_time)),end:new Date(moment(event.end_time)),slug:event.slug,allDay:!1}}),vm.calendarEvents=calendarEvents}function eventsSubscribe(ev){if(vm.hasEventsSubscribe){var thanksMessage="You'll be the first to know when new events are available.";OneSignal.push(function(){if(OneSignal.isPushNotificationsSupported())try{getSubscriptionState().then(function(state){state.isPushEnabled?OneSignal.sendTags({sub_url:$window.location.href,topic:"events"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})}):(OneSignal.registerForPushNotifications(),OneSignal.on("subscriptionChange",function(isSubscribed){isSubscribed&&OneSignal.sendTags({sub_url:$window.location.href,topic:"events"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})})}))})}catch(e){console.log(e)}})}return!1}function calendarEventClick(event){console.log(event),event.slug&&$state.go("event",{slug:event.slug})}function compareTime(comparison,startTime,endString){var endTime;switch(endString){case"this_week":endTime=moment().endOf("isoWeek");break;case"next_week":endTime=moment().add(1,"weeks").endOf("isoWeek")}return"moreThan"==comparison?moment(endTime).diff(moment(startTime),"days")<=0:moment(endTime).diff(moment(startTime),"days")>0}var vm=this;vm.user=Settings.get("user")||{},vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template||"",vm.hasGallery="1"==$state.current.data.hasGallery&&$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.property=Settings.get("currentListing")||{},vm.propertyId=$state.current.data.propertyId||vm.property.id,vm.compareTime=compareTime,vm.eventsSubscribe=eventsSubscribe,vm.calendarEventClick=calendarEventClick,vm.hasEventsSubscribe="undefined"!=typeof OneSignal,vm.template&&Settings.setTemplate(vm.template),$timeout(function(){Places.get("PropertyNearbyEvents",$state.current.data.propertyId||vm.property.id).then(function(response){if("ok"==response.data.status){var _events=response.data.events;angular.forEach(_events,function(event){event.slug=$filter("toSlug")(event.name)}),vm.property.events=_events.filter(function(event){return!0}),Settings.set("currentEvents",vm.property.events),_setupEvents(vm.property.events)}})},500)}angular.module("explorer.app").controller("EventsCtrl",["$scope","$state","$window","$filter","$timeout","Places","Settings","Alert",EventsCtrl])}(),function(){function ViatorCtrl($scope,$state,$stateParams,$mdToast,$timeout,$analytics,Places,Settings){var vm=this;Places.getViatorResults().then(function(response){console.log(response),response.data&&response.data.activities&&(vm.activities=response.data.activities)})}angular.module("explorer.app").controller("ViatorCtrl",["$scope","$state","$stateParams","$mdToast","$timeout","$analytics","Places","Settings",ViatorCtrl])}(),function(){"use strict";function HomeCtrl($rootScope,$scope,$state,$timeout,$window,$http,$filter,$mdMedia,$cookies,leafletData,Places,Settings,Alert){function setupPage(){if(!$window.IS_PERFORMANCE_CHECK&&-1==navigator.userAgent.toLowerCase().indexOf("chrome-lighthouse")){vm.photoSliderImages=$window.PROPERTY_SLIDER_IMAGES.filter(function(image){var pass=!0;return"1"==image.seasonal&&(image.starts||image.ends)&&(image.starts&&moment().diff(image.starts,"days")<0&&(pass=!1),image.ends&&moment().diff(image.ends,"days")>0&&(pass=!1)),pass&&"0"!=image.isActive})||[],vm.mapMarkerIcon=$window.APP_CONFIG.core.themes?$window.APP_CONFIG.core.themes.mapMarkerIcon:null,vm.headerImage=$state.current.data.headerImage,vm.heroVideo=$state.current.data.heroVideo,vm.heroVideoUrl=$state.current.data.heroVideoUrl,vm.xsHeroVideoUrl=$state.current.data.xsHeroVideoUrl,vm.hasGallery="1"==$state.current.data.hasGallery&&$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.showReviews="1"==$state.current.data.showReviews||!1,vm.reviewCarouselAutoplaySpeed=$state.current.data.reviewCarouselAutoplaySpeed,vm.reviewCarouselAutoplayOn=$state.current.data.reviewCarouselAutoplayOn,vm.reviewCarouselArrows=$state.current.data.reviewCarouselArrows,vm.reviewCarouselDots=$state.current.data.reviewCarouselDots,vm.reviewsToShow=$state.current.data.reviewsToShow,vm.showOffers=vm.showOffers||$state.current.data.showOffers,vm.offersToShow=vm.offersToShow||$state.current.data.offersToShow,vm.keyAmenitiesCTAText=$state.current.data.keyAmenitiesCTAText,vm.keyAmenitiesCTAUrl=$state.current.data.keyAmenitiesCTAUrl,$scope.$on("triggerCalendarEvents",function(ev,events){vm.calendarEvents=events.map(function(event){return{title:event.title,start:new Date(moment(event.starts)),end:new Date(moment(event.ends)),allDay:!1,admin:event.admin,location:event.location}})});try{if(vm.mapCenter={lat:parseFloat(_property.schema.geo.latitude),lng:parseFloat(_property.schema.geo.longitude),focus:!1,draggable:!0,zoom:$window.MAP_ZOOM||16},$window.additionalLocations){var _mapMarkers={marker:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,message:_property.schema.name,focus:!0,alt:"Map marker for "+_property.schema.name+", located in "+_property.schema.address.addressLocality+", "+_property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-emerald.png",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]}}};for(var i in $window.additionalLocations)_mapMarkers["location"+(i+1)]={lat:$window.additionalLocations[i].lat,lng:$window.additionalLocations[i].lng,message:$window.additionalLocations[i].name,focus:!1,alt:"Map marker for "+$window.additionalLocations[i].name,icon:{iconUrl:$window.additionalLocations[i].icon,iconSize:[54,45],iconAnchor:[26,45],popupAnchor:[0,-45]},riseOnHover:!0};vm.mapMarkers=_mapMarkers}else vm.mapMarkers={marker:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,message:_property.schema.name,focus:!0,alt:"Map marker for "+_property.schema.name+", located in "+_property.schema.address.addressLocality+", "+_property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-emerald.png",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]}}};vm.mapEvents={map:{enable:["moveend","popupopen"],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.mapOptions={attributionControl:!1,scrollWheelZoom:!1,dragging:!L.Browser.mobile,tap:!L.Browser.mobile,zoomControlPosition:"topright",tileLayer:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",minZoom:1,maxZoom:15}}catch(e){console.log(e)}var _hasKeyAmenities=!1;if(angular.forEach(vm.keyAmenities,function(amenity){amenity.name&&(_hasKeyAmenities=!0),amenity.icon&&-1===amenity.icon.indexOf("&#")&&(amenity.icon="&#x"+amenity.icon+";")}),_hasKeyAmenities||(vm.keyAmenities=null),vm.featuredLinks=$state.current.data.featuredLinks||null,vm.user=Settings.get("user")||{},vm.query=Settings.get("query")||"",vm.frame={},vm.frame.height=$window.innerHeight+200,vm.frame.width=$window.screen.width||$window.innerWidth,vm.frame.halfwidth=Math.ceil($window.innerWidth/2),angular.forEach($window.APP_CONFIG.menu,function(menuItem){"nearby"!=menuItem.state||"nearby"!=menuItem.url&&"things-to-do"!=menuItem.url||"1"!=menuItem.isActive||(_hideNearby=!1),"amenities"==menuItem.state&&"1"==menuItem.isActive&&(_hideAmenities=!1)}),vm.hideAmenities=_hideAmenities,vm.hideNearby=_hideNearby,$window.APP_CONFIG.menu.Home.hideNearby&&"1"==$window.APP_CONFIG.menu.Home.hideNearby&&(vm.hideNearby=!0),$window.APP_CONFIG.menu.Home&&"object"==typeof $window.APP_CONFIG.menu.Home.featuredLinks&&$window.APP_CONFIG.menu.Home.featuredLinks[0]&&$window.APP_CONFIG.menu.Home.featuredLinks[0].image?(vm.siteSections=[],angular.forEach($window.APP_CONFIG.menu.Home.featuredLinks,function(link){(link.title||link.url||link.image)&&(link.state=link.url,vm.siteSections.push(link))})):(vm.siteSections=[{title:"Rooms",subtitle:"Exceptional Accommodations and Facilities",cta:"Explore Rooms",state:"rooms",image:_property&&_property.photos&&_property.photos[0]&&_property.photos[0].url},{title:"Special Offers",subtitle:"Great Deals and Packages",cta:"View Special Offers",state:"offers",image:_property&&_property.photos&&_property.photos[_property.photos.length-2]&&_property.photos[_property.photos.length-2].url}],vm.hideAmenities?vm.siteSections.push({title:"Photos",subtitle:"View Beautiful Photos of Our Location",cta:"View Photos",state:"photos",image:_property&&_property.photos&&_property.photos[_property.photos.length-2]&&_property.photos[_property.photos.length-1].url}):vm.siteSections.push({title:"Amenities",subtitle:"Quality Perks and Hotel Services",cta:"Explore Amenities",state:"amenities",image:_property&&_property.photos&&_property.photos[_property.photos.length-2]&&_property.photos[_property.photos.length-1].url})),vm.type={items:[]},vm.contentFrame={},vm.iconSet={"Airport shuttle":"",Bar:"","Business center":"","Fitness Center":"","Free breakfast":"","Free parking":"","Free Wi-Fi":"","Hot tub":"","Kid-friendly":"","Kitchen in all rooms":"","Laundry service":"",Pool:"",Restaurant:"","Pet-friendly":"",Smoking:"","Smoke free":""},!vm.keyAmenities&&_property&&_property.schema&&_property.schema.amenityFeature){vm.keyAmenities=[];var counter=6;angular.forEach(_property.schema.amenityFeature,function(feature){vm.iconSet[feature.name]&&counter-- >0&&vm.keyAmenities.push(feature)})}vm.property=_property||{schema:{}},_property&&_property.schema&&_property.schema.hasOfferCatalog&&(angular.forEach(_property.schema.hasOfferCatalog.itemListElement,function(element){element.itemOffered.slug=$filter("toSlug")(element.itemOffered.name)}),1==$window.SHOW_LEAD_RATES&&$timeout(function(){$scope.$on("triggerUpdateBookingDates",function(ev,data){updateRates(data)})},50)),Settings.setPageTitle(vm.property.schema.name),Places.get("PropertyNoticesData",vm.property.id).then(function(response){"ok"==response.data.status&&(vm.featuredNotices=response.data.content.featuredNotices,vm.priorityNotices=response.data.content.priorityNotices,vm.notices=response.data.content.notices,vm.hints=response.data.content.hints,vm.priorityNotices&&angular.forEach(vm.priorityNotices,function(notices,noticeTitle){angular.forEach(notices,function(notice){if(notice.hasPopup)if(notice.popupDuration||Settings.get("noticePopupFire_"+notice.id)){if(!$cookies.get("noticePopupFire_"+notice.id)){var expires=new Date;expires.setHours(expires.getHours()+notice.popupDuration),$cookies.put("noticePopupFire_"+notice.id,!0,{expires:expires,secure:!0}),Alert.fire({title:noticeTitle,message:notice.message})}}else Settings.set("noticePopupFire_"+notice.id,!0),Alert.fire({title:noticeTitle,message:notice.message})})}))}),$window.LANDING_PAGES&&$window.LANDING_PAGES.length&&(angular.forEach($window.LANDING_PAGES,function(page){"nearby"==page.parent&&(_nearbyPages[page.title]={url:page.slug,icon:"next",isActive:1,menuName:page.title})}),vm.nearbyPages=_nearbyPages),$timeout(function(){if(!vm.hideNearby)try{Places.get("NearbyCategories",vm.property.id).then(function(response){if(response.data&&"ok"==response.data.status&&(window.L||window.google&&window.google.maps)){var nids=[],_nearbyItems=[],_categories=angular.copy(response.data.categories);vm.mapCenter={lat:parseFloat(vm.property.schema.geo?vm.property.schema.geo.latitude:"39.00"),lng:parseFloat(vm.property.schema.geo?vm.property.schema.geo.longitude:"-98.00"),focus:!1,draggable:!1,zoom:14},vm.mapOptions={attributionControl:!1,dragging:!1,boxZoom:!1,doubleClickZoom:!1,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!1,tileLayer:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"},vm.mapEvents={map:{enable:["moveend","popupopen"],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.nearbyCategory?angular.forEach(_categories,function(category){if(category.name==vm.nearbyCategory){var items=category.items.splice(0,3);angular.forEach(items,function(item){nids.push(item.nid),item.category=category.name,item.centerMarker={lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!1,draggable:!1,zoom:13},item.markers={hotel:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[36,30],iconAnchor:[18,30],popupAnchor:[0,-30]}},location:{lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!0,alt:"Map marker for "+item.name+", located in "+item.addressLocality+", "+item.addressRegion,icon:{iconUrl:"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]},riseOnHover:!0}},_nearbyItems.push(item)})}}):angular.forEach(_categories,function(category){var items=vm.loadAllNearby?category.items:category.items.splice(0,1);angular.forEach(items,function(item){nids.push(item.nid),item.category=category.name,item.centerMarker={lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!1,draggable:!1,zoom:13},item.markers={hotel:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[36,30],iconAnchor:[18,30],popupAnchor:[0,-30]}},location:{lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!0,alt:"Map marker for "+item.name+", located in "+item.addressLocality+", "+item.addressRegion,icon:{iconUrl:"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]},riseOnHover:!0}},_nearbyItems.push(item)})}),vm.nearbyItems=_nearbyItems,_nearbyItems.length<1&&(vm.hideNearby=!0)}})}catch(e){console.log(e)}vm.showOffers&&Places.get("PropertyOffersDetails",$window.PROPERTY_ID).then(function(response){response&&response.data&&(angular.forEach(response.data.offers,function(offer){offer.slug=$filter("toSlug")(offer.title),offer.currentDate=new Date}),vm.property.offers=response.data.offers.filter(function(offer){return 0==offer.hideMicrosite}),Settings.set("hasCurrentListingOffers",!0),Settings.set("currentListingOffers",vm.property.offers))}),vm.showEvents&&Places.get("PropertyNearbyEvents",$window.PROPERTY_ID).then(function(response){response&&response.data&&(vm.property.events=response.data.events,vm.eventsSlider=response.data.events.map(function(event){return{href:"/events/"+$filter("toSlug")(event.name),url:"/events/"+$filter("toSlug")(event.name),icon:"event",title:event.name,text:event.description,src:event.cover.source,newTab:"0",seasonal:"0"}}))})},1e3)}}function dateRangeHasWeekend(dateRange){for(var startDate=dateRange.start,endDate=dateRange.end,start=new Date(startDate),end=new Date(endDate),currentDate=start;currentDate<=end;currentDate.setDate(currentDate.getDate()+1)){var dayOfWeek=currentDate.getDay();if(5===dayOfWeek||6===dayOfWeek)return!0}return!1}function updateRates(data){if(data&&data.roomStays&&data.roomStays[0]&&vm.property.schema.hasOfferCatalog&&vm.property.schema.hasOfferCatalog.itemListElement.length){dateRangeHasWeekend(data.roomStays[0].timeSpan);angular.forEach(vm.property.schema.hasOfferCatalog.itemListElement,function(offer){var minPrice,specialRateFound=!1,lowestRate=!1,currentRate=0;angular.forEach(data.roomStays[0].allRoomTypes,function(room){offer.itemOffered.name==room.roomTypeName&&(angular.forEach(room.averageRates,function(rate){"Discount"==rate.ratePlanCategory&&rate.available&&(currentRate=rate.rate-(rate.discount||0),(!lowestRate||lowestRate.rate-lowestRate.discount>currentRate)&&(lowestRate=rate,specialRateFound=!0))}),specialRateFound||angular.forEach(room.averageRates,function(rate){"Promotional"==rate.ratePlanCategory&&rate.available&&(currentRate=rate.rate-(rate.discount||0),(!lowestRate||lowestRate.rate-lowestRate.discount>currentRate)&&(lowestRate=rate,specialRateFound=!0))}),lowestRate?room.averageRates[0]=lowestRate:angular.forEach(room.averageRates,function(rate){specialRateFound||"Rack"!=rate.ratePlanCategory||(room.averageRates[0]=rate,specialRateFound=!0)}),offer.roomTypeId=room.roomTypeCode,offer.priceCurrency=data.currencyCode,offer.available=room.available,minPrice=room.averageRates[0].rate-room.averageRates[0].discount,offer.price=minPrice)})})}else angular.forEach(vm.property.schema.hasOfferCatalog.itemListElement,function(offer){offer.available=!1,offer.price=!1})}function viewListing(flipped,category,id){flipped&&Places.markView("NearbyListing",id).then(function(data){})}function getDistanceFromHotel(item){var radlat1=Math.PI*parseFloat(vm.property.schema.geo.latitude)/180,radlat2=Math.PI*parseFloat(item.lat)/180,theta=parseFloat(vm.property.schema.geo.longitude)-parseFloat(item.lng),radtheta=Math.PI*theta/180,dist=Math.sin(radlat1)*Math.sin(radlat2)+Math.cos(radlat1)*Math.cos(radlat2)*Math.cos(radtheta);return dist>1&&(dist=1),dist=Math.acos(dist),dist=180*dist/Math.PI,dist=60*dist*1.1515}var vm=this,_nearbyPages=[],_property=Settings.get("currentListing"),_hideNearby=!0,_hideAmenities=!0;vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.tertiaryBodyContent=$state.current.data.tertiaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null, vm.keyAmenities=$state.current.data.keyAmenities||null,vm.template=$state.current.data.template,vm.getDistanceFromHotel=getDistanceFromHotel,vm.viewListing=viewListing,_property?setupPage():$timeout(function(){_property=$rootScope.property,setupPage()},3e3),$timeout(function(){var mapTiles=document.getElementsByClassName("leaflet-tile");angular.forEach(mapTiles,function(elem){elem.setAttribute("alt","Map Tile"),elem.setAttribute("aria-label","Map Tile")})},600)}angular.module("explorer.app").controller("HomeCtrl",["$rootScope","$scope","$state","$timeout","$window","$http","$filter","$mdMedia","$cookies","leafletData","Places","Settings","Alert",HomeCtrl])}(),function(){"use strict";function LandingPageCtrl($rootScope,$scope,$state,$stateParams,$mdDialog,$analytics,$window,$location,$timeout,Person,Places,Settings,Alert){var vm=this,found=!1,page=Settings.get("currentLandingPage");vm.property=Settings.get("currentListing"),vm.today=new Date,vm.processingSubmit=!1,page&&(found=!0,"1"==page.requiresLogin?Settings.get("memberProfile")?vm.isLoggedIn=!0:(Settings.set("redirectAfterLogin",page.id),$state.go("memberLogin")):vm.isLoggedIn=!1,vm.title=page.pageTitle,vm.pageTitle=page.pageTitle,vm.headerImage=page.headerImage,vm.headerImageURL=page.headerImageURL,vm.headerImageAlt=page.headerImageAlt,vm.heroVideo=!(!page.heroVideo||"0"==page.heroVideo),vm.heroVideoUrl=page.heroVideoUrl,vm.xsHeroVideoUrl=page.xsHeroVideoUrl,vm.featuredImage=page.featuredImage,vm.featuredImageURL=page.featuredImageURL,vm.featuredImageCaption=page.featuredImageCaption,vm.featuredImagePosition=page.featuredImagePosition||"rightSidebar",vm.template=page.template||null,vm.h1=page.h1,vm.h2=page.h2,vm.hasRFP=page.hasRFP&&1==page.RFPID.toString().length||!1,vm.RFPID=page.RFPID||1,vm.RFPPosition=page.RFPPosition||"rightSidebar",vm.hideBookingBarNumber=page.hideBookingBarNumber||!1,vm.promoCode=page.promoCode||null,vm.productId=page.productId||null,vm.gaEvent=page.gaEvent||null,vm.headerImagePositionY=page.headerImagePositionY||null,vm.mediaMode=$rootScope.mediaMode,vm.responsiveSlidesToShow=(vm.mediaMode.nonMobile?"3":"1")||3,vm.hasFixedWidthHero=page.hasFixedWidthHero,vm.hasFullWidthContent=page.hasFullWidthContent,vm.template&&Settings.setTemplate(vm.template),vm.headerImage?Settings.setHeaderImage(vm.headerImage):Settings.setHeaderImage(null),Places.get("LandingPageDetails",page.id).then(function(response){"ok"==response.data.status&&(vm.bodyContent=response.data.page.bodyContent,vm.secondaryBodyContent=response.data.page.secondaryBodyContent,vm.hasGallery="1"==page.hasGallery&&page.galleries.toString().length>1||!1,vm.galleries=page.galleries||null)})),found||("1"==$state.current.data.requiresLogin?Settings.get("memberProfile")?vm.isLoggedIn=!0:(Settings.set("redirectAfterLogin",$state.current.data.id),$state.go("memberLogin")):vm.isLoggedIn=!1,vm.title=$state.current.data.pageTitle,vm.pageTitle=$state.current.data.pageTitle,vm.headerImage=$state.current.data.headerImage,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption,vm.featuredImagePosition=$state.current.data.featuredImagePosition||"rightSidebar",vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.template=$state.current.data.template,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.hasRFP=$state.current.data.hasRFP&&1==$state.current.data.RFPID.toString().length||!1,vm.RFPID=$state.current.data.RFPID||1,vm.RFPPosition=$state.current.data.RFPPosition||"rightSidebar",vm.hideBookingBarNumber=$state.current.data.hideBookingBarNumber||!1,vm.promoCode=$state.current.data.promoCode||null,vm.productId=$state.current.data.productId||null,vm.gaEvent=$state.current.data.gaEvent||null,vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,found=!0,vm.template&&Settings.setTemplate(vm.template)),vm.RFPID.toString().length>1?(vm.hasCustomRFP=!0,Person.get("FormDetails",vm.RFPID).then(function(response){"ok"==response.data.status&&(vm.customForm=response.data.form)})):vm.hasCustomRFP=!1,vm.promoCode&&($scope.$emit("updatePromoCode",vm.promoCode),$scope.$broadcast("updatePromoCode",vm.promoCode)),vm.productId&&($scope.$emit("updateProductId",vm.productId),$scope.$broadcast("updateProductId",vm.productId)),vm.gaEvent&&($scope.$emit("updateGaEvent",vm.gaEvent),$scope.$broadcast("updateGaEvent",vm.gaEvent)),1==parseInt(vm.hideBookingBarNumber)&&($scope.$emit("hideBookingBarElement","phone"),$scope.$broadcast("hideBookingBarElement","phone")),$scope.$on("triggerBookingBarLoaded",function(){vm.promoCode&&($scope.$emit("updatePromoCode",vm.promoCode),$scope.$broadcast("updatePromoCode",vm.promoCode)),vm.productId&&($scope.$emit("updateProductId",vm.productId),$scope.$broadcast("updateProductId",vm.productId)),vm.gaEvent&&($scope.$emit("updateGaEvent",vm.gaEvent),$scope.$broadcast("updateGaEvent",vm.gaEvent)),1==parseInt(vm.hideBookingBarNumber)&&($scope.$emit("hideBookingBarElement","phone"),$scope.$broadcast("hideBookingBarElement","phone"))}),vm.meetingForm={},$location.search().checkin&&(vm.meetingForm.arrival=new Date(moment($location.search().checkin))),$location.search().checkout&&(vm.meetingForm.departure=new Date(moment($location.search().checkout))),vm.submitMeetingRFP=function(ev){(vm.meetingForm.name||vm.meetingForm.firstName&&vm.meetingForm.lastName)&&vm.meetingForm.email?Person.submitForm("MeetingRFP",vm.meetingForm).then(function(response){response&&response.data&&"ok"==response.data.status?(vm.meetingForm={},$analytics.eventTrack("Meetings Form",{category:"Meetings",label:"Submit"}),Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"})):Alert.fire({ev:ev,message:"There was an error, please try again later!"})}):($analytics.eventTrack("Meetings Form",{category:"Meetings",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Please fill in all the required fields."}))},vm.submitGuestPreferences=function(ev){vm.pghForm&&vm.pghForm.firstName&&vm.pghForm.lastName&&vm.pghForm.email?Person.submitForm("GuestPreferences",vm.pghForm).then(function(response){response&&response.data&&"ok"==response.data.status?(vm.pghForm={},$analytics.eventTrack("Guest Preferences Form",{category:"Guest Preferences",label:"Submit"}),Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"})):($analytics.eventTrack("Guest Preferences Form",{category:"Guest Preferences",label:"Server Error"}),Alert.fire({ev:ev,message:"There was an error, please try again later!"}),$state.reload())}):($analytics.eventTrack("Guest Preferences Form",{category:"Guest Preferences",label:"User Error"}),Alert.fire({ev:ev,message:"Please fill in all the required fields."}))},vm.submitSimpleRFP=function(ev){vm.simpleForm&&vm.simpleForm.name&&vm.simpleForm.email&&vm.simpleForm.phone&&vm.simpleForm.company?Person.submitForm("SimpleRFP",vm.simpleForm).then(function(response){response&&response.data&&"ok"==response.data.status?(vm.simpleForm={},$analytics.eventTrack("Simple Form",{category:"Simple Form",label:"Submit"}),Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"})):($analytics.eventTrack("Simple Form",{category:"Simple Form",label:"Server Error"}),Alert.fire({ev:ev,message:"There was an error, please try again later!"}),$state.reload())}):($analytics.eventTrack("Simple Form",{category:"Simple Form",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Please fill in all the required fields."}))},vm.submitCustomRFP=function(ev){vm.customForm?(vm.processingSubmit=!0,Person.submitForm("CustomRFP",vm.customForm).then(function(response){vm.processingSubmit=!1,response&&response.data&&"ok"==response.data.status?($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:vm.customForm.submitText}),Alert.fire({ev:ev,title:vm.customForm.submissionMessageHeading||"Attention",message:vm.customForm.submissionMessageText||"Thank you. We will reach out to you shortly!"}),$state.reload()):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Server Error"}),Alert.fire({ev:ev,message:response.data.message||"There was an error, please try again later!"}),$state.reload())},function(error){vm.processingSubmit=!1})):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Error, try again later"}))},vm.checkPassword=function(ev,pass1,pass2){pass1&&pass2&&pass1.toLowerCase()==pass2.toLowerCase()?vm.isLoggedIn=!0:Alert.fire({ev:ev,title:"Attention",message:"Incorrect password. Please try again"})},vm.videoPopUp=function(ev,popup){$mdDialog.show({targetEvent:ev,templateUrl:"app/cards/photo-gallery.html",controller:function($scope,$cookies,$window,$analytics,$mdDialog){$scope.video=popup,$scope.closeDialog=function(){$mdDialog.hide()}},parent:angular.element(document.body),targetEvent:ev,clickOutsideToClose:!0})}}angular.module("explorer.app").controller("LandingPageCtrl",["$rootScope","$scope","$state","$stateParams","$mdDialog","$analytics","$window","$location","$timeout","Person","Places","Settings","Alert",LandingPageCtrl])}(),function(){"use strict";function LocationCtrl($state,$window,$timeout,Settings){var vm=this;vm.mapMarkerIcon=$window.APP_CONFIG.core.themes?$window.APP_CONFIG.core.themes.mapMarkerIcon:null,vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.property=Settings.get("currentListing"),vm.callTel=$window.APP_CLIENT_PHONE,vm.contactEmail=$window.APP_CLIENT_EMAIL,vm.mapCenter={lat:parseFloat(vm.property.schema.geo.latitude),lng:parseFloat(vm.property.schema.geo.longitude),focus:!0,draggable:!1,zoom:16},vm.mapMarkers={marker:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,message:vm.property.schema.name+"\n"+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-emerald.png",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]}}},vm.mapEvents={map:{enable:[],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.mapOptions={attributionControl:!1,dragging:!1,boxZoom:!1,doubleClickZoom:!1,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!1,tileLayer:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",minZoom:1,maxZoom:15},$timeout(function(){var mapTiles=document.getElementsByClassName("leaflet-tile");angular.forEach(mapTiles,function(elem){elem.setAttribute("alt","Map Tile"),elem.setAttribute("aria-label","Map Tile")})},600)}angular.module("explorer.app").controller("LocationCtrl",["$state","$window","$timeout","Settings",LocationCtrl])}(),function(){"use strict";function MeetingsCtrl($state,$location,$window,$analytics,Person,Alert,Settings){var vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.RFPID=$state.current.data.RFPID||1,vm.property=Settings.get("currentListing"),vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.meetingForm={},"-1"==vm.RFPID?(vm.hasCustomRFP=!1,vm.hasRFP=!1):vm.RFPID.toString().length>1?(vm.hasRFP=!0,vm.hasCustomRFP=!0,Person.get("FormDetails",vm.RFPID).then(function(response){"ok"==response.data.status&&(vm.customForm=response.data.form)})):(vm.hasCustomRFP=!1,vm.hasRFP=!0),$location.search().checkin&&(vm.meetingForm.arrival=new Date(moment($location.search().checkin))),$location.search().checkout&&(vm.meetingForm.departure=new Date(moment($location.search().checkout))),vm.submitMeetingRFP=function(){(vm.meetingForm.name||vm.meetingForm.firstName&&vm.meetingForm.lastName)&&vm.meetingForm.email?Person.submitForm("MeetingRFP",vm.meetingForm).then(function(response){response&&response.data&&"ok"==response.data.status?($window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("MeetingRFP"),$analytics.eventTrack("Meetings Form",{category:"Meetings",label:"Submit"}),Alert.fire({message:"Thank you. We will reach out to you shortly!"}),$state.reload()):Alert.fire({message:"There was an error, please try again later!"})}):Alert.fire({message:"Please fill in all the required fields."})},vm.submitCustomRFP=function(ev){vm.customForm?Person.submitForm("CustomRFP",vm.customForm).then(function(response){response&&response.data&&"ok"==response.data.status?($window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("MeetingRFP"),$analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:vm.customForm.submitText}),Alert.fire({ev:ev,title:vm.customForm.submissionMessageHeading||"Attention",message:vm.customForm.submissionMessageText||"Thank you. We will reach out to you shortly!"}),$state.reload()):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Server Error"}),Alert.fire({ev:ev,message:"There was an error, please try again later!"}),$state.reload())}):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Error, try again later"}))},vm.checkPassword=function(ev,pass1,pass2){pass1&&pass2&&pass1.toLowerCase()==pass2.toLowerCase()?vm.isLoggedIn=!0:Alert.fire({ev:ev,title:"Attention",message:"Incorrect password. Please try again"})}}angular.module("explorer.app").controller("MeetingsCtrl",["$state","$location","$window","$analytics","Person","Alert","Settings",MeetingsCtrl])}(),function(){function NearbyCtrl($scope,$state,$stateParams,$window,$mdToast,$timeout,$analytics,$filter,leafletData,Places,Person,Settings,appConfig){function getDistanceFromHotel(item){var dist=0;if(item){var radlat1=Math.PI*parseFloat(vm.property.schema.geo.latitude)/180,radlat2=Math.PI*parseFloat(item.lat)/180,theta=parseFloat(vm.property.schema.geo.longitude)-parseFloat(item.lng),radtheta=Math.PI*theta/180;dist=Math.sin(radlat1)*Math.sin(radlat2)+Math.cos(radlat1)*Math.cos(radlat2)*Math.cos(radtheta),dist>1&&(dist=1),dist=Math.acos(dist),dist=180*dist/Math.PI,dist=60*dist*1.1515}return dist}function getToastPosition(){return Object.keys(vm.toastPosition).filter(function(pos){return vm.toastPosition[pos]}).join(" ")}function updateUserFavorite(ev,place_id,category){if(!vm.isSignedIn)return $state.go("register"),!1;Person.updateUserFavorite(place_id,category,function(data){return $mdToast.show($mdToast.simple().content(data.message).position(vm.getToastPosition()).hideDelay(1e3)),!is_favorite})}function viewListing(flipped,category,id){flipped&&Places.markView("NearbyListing",id).then(function(data){console.log(data)})}var vm=this;vm.isSignedIn=Settings.get("token"),vm.search="",vm.types=[{type:"play",name:"Play",noItems:!0},{type:"shop",name:"Shop",noItems:!0},{type:"eat",name:"Eat",noItems:!0}],vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.pageTitle=$state.current.data.pageTitle,vm.mapMarkerIcon=$window.APP_CONFIG.core.themes?$window.APP_CONFIG.core.themes.mapMarkerIcon:null,vm.property=Settings.get("currentListing"),vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.listingId=$stateParams.listingId||"",vm.slug=$stateParams.slug||"",vm.updateUserFavorite=updateUserFavorite,vm.getToastPosition=getToastPosition,vm.viewListing=viewListing,vm.getDistanceFromHotel=getDistanceFromHotel,vm.toastPosition={bottom:!1,top:!0,left:!1,right:!0},vm.mapMarkers=[],Places.get("NearbyCategories",vm.property.id).then(function(response){if(response.data&&"ok"==response.data.status&&window.L){var nids=[];vm.mapCenter={lat:parseFloat(vm.property.schema.geo.latitude),lng:parseFloat(vm.property.schema.geo.longitude),focus:!1,draggable:!1,zoom:11},vm.mapOptions={attributionControl:!1,dragging:!0,boxZoom:!0,doubleClickZoom:!0,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!0,tileLayer:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",minZoom:1,maxZoom:15},vm.mapLayers={baselayers:{osm:{name:"Nearby Locations",type:"xyz",url:$window.TILE_LAYER||"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"}},overlays:{locations:{name:"Locations",type:"markercluster",visible:!0,layerOptions:{maxClusterRadius:appConfig.maxClusterRadius||80}}}},vm.mapEvents={map:{enable:["click","zoomstart","moveend","popupopen"],logic:"emit"},marker:{enable:["click"],logic:"emit"}},vm.mapMarkers.push({lat:parseFloat(vm.property.schema.geo.latitude),lng:parseFloat(vm.property.schema.geo.longitude),layer:"locations",message:""+vm.property.schema.name+""+vm.property.schema.name+'
'+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion+"
",focus:!0,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:$window.LOGO_MAP_MARKER?{iconUrl:hotel.brand&&hotel.brand.slug?"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/clientmedia/brands/portal/"+vm.property.schema.brand.slug+"-map-marker.png":vm.property.schema.logo,iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-72]}:appConfig.mapMarkerIcon||{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-72]}}),angular.forEach(response.data.categories,function(category){angular.forEach(category.items,function(item){nids.push(item.nid),item.centerMarker={lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!1,draggable:!1,zoom:11},item.markers={hotel:{lat:vm.mapCenter.lat,lng:vm.mapCenter.lng,zIndexOffset:1e3,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[36,30],iconAnchor:[18,30],popupAnchor:[0,-30]}},location:{lat:parseFloat(item.lat),lng:parseFloat(item.lng),focus:!0,alt:"Map marker for "+item.name+", located in "+item.addressLocality+", "+item.addressRegion,icon:{iconUrl:$window.APP_CONFIG.core.themes&&$window.APP_CONFIG.core.themes.attractionMapMarkerIcon?$window.APP_CONFIG.core.themes.attractionMapMarkerIcon:"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]},riseOnHover:!0}},vm.mapMarkers.push({lat:parseFloat(item.lat),lng:parseFloat(item.lng),layer:"locations",message:""+item.name+""+item.name+'
'+item.addressLocality+", "+item.addressRegion+"
",focus:!1,alt:"Map marker for "+item.name+", located in "+item.addressLocality+", "+item.addressRegion,icon:{iconUrl:"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-emerald.png",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]},riseOnHover:!0,category:category.name,name:item.name,item:item})})}),vm.categories=response.data.categories,$timeout(function(){angular.forEach(nids,function(nid){leafletData.getMap("map-"+nid).then(function(map){map.invalidateSize()})});var mapTiles=document.getElementsByClassName("leaflet-tile");angular.forEach(mapTiles,function(elem){elem.setAttribute("alt","Map Tile"),elem.setAttribute("aria-label","Map Tile")})},800),$scope.$on("leafletDirectiveMap.popupopen",function(event){var currentItemName=document.querySelector(".map-tip-firstline").innerText;console.log(currentItemName),angular.forEach(vm.mapMarkers,function(marker){currentItemName==marker.name&&(vm.currentItem=marker.item)})})}}),$window.LEGACY_NEARBY&&Places.nearby({category:"play"},function(data){data.places.length&&(vm.types[0].items=data.places,vm.types[0].noItems=!1),vm.contentFrame={},$timeout(function(){vm.contentFrame.width=document.getElementsByClassName("nearby-page-nearby-card")[0].clientWidth,Places.nearby({category:"shop"},function(data){data.places.length&&(vm.types[1].items=data.places,vm.types[1].noItems=!1)}),Places.nearby({category:"eat"},function(data){data.places.length&&(vm.types[2].items=data.places,vm.types[2].noItems=!1)})},100)})}function NearbyListingCtrl($state,$stateParams,$mdToast,$window,$timeout,Places,Person,Settings,leafletData){function getDistanceFromHotel(item){var dist=0;if(item){var radlat1=Math.PI*parseFloat(vm.property.schema.geo.latitude)/180,radlat2=Math.PI*parseFloat(item.lat)/180,theta=parseFloat(vm.property.schema.geo.longitude)-parseFloat(item.lng),radtheta=Math.PI*theta/180;dist=Math.sin(radlat1)*Math.sin(radlat2)+Math.cos(radlat1)*Math.cos(radlat2)*Math.cos(radtheta),dist>1&&(dist=1),dist=Math.acos(dist),dist=180*dist/Math.PI,dist=60*dist*1.1515}return dist}function setupItem(){vm.mapCenter={lat:parseFloat(vm.item.lat),lng:parseFloat(vm.item.lng),focus:!1,draggable:!1,zoom:11},vm.mapOptions={attributionControl:!1,dragging:!1,boxZoom:!1,doubleClickZoom:!1,tap:!1,keyboard:!1,scrollWheelZoom:!1,zoomControl:!1,url:"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"},vm.mapEvents={map:{enable:["moveend","popupopen"],logic:"emit"},marker:{enable:[],logic:"emit"}},vm.mapMarkers={hotel:{lat:vm.property.schema.geo.latitude,lng:vm.property.schema.geo.longitude,focus:!1,alt:"Map marker for "+vm.property.schema.name+", located in "+vm.property.schema.address.addressLocality+", "+vm.property.schema.address.addressRegion,icon:{iconUrl:vm.mapMarkerIcon||"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[36,30],iconAnchor:[18,30],popupAnchor:[0,-30]}},location:{lat:parseFloat(vm.item.lat),lng:parseFloat(vm.item.lng),focus:!0,alt:"Map marker for "+vm.item.name+", located in "+vm.item.addressLocality+", "+vm.item.addressRegion,icon:{iconUrl:"https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/map-marker-nearby.png?",iconSize:[72,60],iconAnchor:[36,60],popupAnchor:[0,-60]},riseOnHover:!0}},$timeout(function(){leafletData.getMap("nearby-listing-map").then(function(map){map.invalidateSize()});var mapTiles=document.getElementsByClassName("leaflet-tile");angular.forEach(mapTiles,function(elem){elem.setAttribute("alt","Map Tile"),elem.setAttribute("aria-label","Map Tile")})},800)}var vm=this;vm.slug=$stateParams.slug,vm.property=Settings.get("currentListing"),vm.mapMarkerIcon=$window.APP_CONFIG.core.themes?$window.APP_CONFIG.core.themes.mapMarkerIcon:null,vm.getDistanceFromHotel=getDistanceFromHotel,Settings.set("has_place_id_listing_"+vm.slug)?(vm.item=Settings.set("place_id_listing_"+vm.slug),setupItem()):Places.getNearbyListing(vm.slug).then(function(response){"ok"==response.data.status?vm.item=response.data.place:$state.go("nearby"),setupItem()})}angular.module("explorer.app").controller("NearbyCtrl",["$scope","$state","$stateParams","$window","$mdToast","$timeout","$analytics","$filter","leafletData","Places","Person","Settings","appConfig",NearbyCtrl]).controller("NearbyListingCtrl",["$state","$stateParams","$mdToast","$window","$timeout","Places","Person","Settings","leafletData",NearbyListingCtrl])}(),function(){"use strict";function OfferCtrl($state,$stateParams,$window,$timeout,$filter,Places,Settings,Alert){function offersSubscribe(ev){if(vm.hasOffersSubscribe){var thanksMessage="You'll be the first to know when new offers are available.";OneSignal.push(function(){if(OneSignal.isPushNotificationsSupported())try{getSubscriptionState().then(function(state){state.isPushEnabled?OneSignal.sendTags({sub_url:$window.location.href,topic:"offers"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})}):(OneSignal.registerForPushNotifications(),OneSignal.on("subscriptionChange",function(isSubscribed){isSubscribed&&OneSignal.sendTags({sub_url:$window.location.href,topic:"offers"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})})}))})}catch(e){console.log(e)}})}return!1}var offers,vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.offersSubscribe=offersSubscribe,vm.hasOffersSubscribe="undefined"!=typeof OneSignal,vm.property=Settings.get("currentListing"),Places.get("PropertyOffersDetails",window.PROPERTY_ID).then(function(response){if(response&&response.data){var found=!1;offers=response.data.offers,angular.forEach(offers,function(offer){if(($stateParams.slug.indexOf(offer.oid)>-1||$stateParams.slug==$filter("toSlug")(offer.title)||$stateParams.slug==offer.slug)&&0==offer.hideMicrosite){if(found=!0,offer.currentDate=new Date,0==offer.cta.indexOf("{"))try{offer.cta=JSON.parse(offer.cta),offer.cta=offer.cta[$window.PROPERTY_ID]}catch(e){}if(offer.cta&&$window.currentLanguage&&offer.cta.indexOf("travelclick")>-1){var languageID;switch($window.currentLanguage){case"zh-CN":case"zh-TW":languageID=5;break;case"es":languageID=2;break;case"id":languageID=28;break;case"en-gb":languageID=11;break;case"de":languageID=7;break;case"ja":languageID=6;break;case"ru":languageID=9;break;case"tr":languageID=19;break;case"ko":languageID=26;break;default:languageID=1}offer.cta+="&languageID="+languageID}vm.headerImage=offer.image,vm.h2=offer.title,vm.offer=angular.copy(offer),$timeout(function(){vm.offer.image=$filter("cropTo")($filter("getFirstImage")(vm.offer.image),"offer-detail-image")},100)}}),found||$state.go("offers")}})}angular.module("explorer.app").controller("OfferCtrl",["$state","$stateParams","$window","$timeout","$filter","Places","Settings","Alert",OfferCtrl])}(),function(){"use strict";function OffersCtrl($state,$stateParams,$window,$filter,$timeout,Places,Settings,Alert){function offersSubscribe(ev){if(vm.hasOffersSubscribe){var thanksMessage="You'll be the first to know when new offers are available.";OneSignal.push(function(){if(OneSignal.isPushNotificationsSupported())try{getSubscriptionState().then(function(state){state.isPushEnabled?OneSignal.sendTags({sub_url:$window.location.href,topic:"offers"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})}):(OneSignal.registerForPushNotifications(),OneSignal.on("subscriptionChange",function(isSubscribed){isSubscribed&&OneSignal.sendTags({sub_url:$window.location.href,topic:"offers"}).then(function(tagsSent){Alert.fire({ev:ev,title:"Thanks for Subscribing!",message:thanksMessage})})}))})}catch(e){console.log(e)}})}return!1}var vm=this,offerCategories=[],usedOfferCategories=[];vm.user=Settings.get("user")||{},vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.offersSubscribe=offersSubscribe,vm.hasOffersSubscribe="undefined"!=typeof OneSignal,vm.property=Settings.get("currentListing"),Places.get("PropertyOffersDetails",$window.PROPERTY_ID).then(function(response){response&&response.data&&(angular.forEach(response.data.offers,function(offer){if(offer.currentDate=new Date,0==offer.cta.indexOf("{"))try{offer.cta=JSON.parse(offer.cta),offer.cta=offer.cta[$window.PROPERTY_ID]}catch(e){}if(offer.cta&&$window.currentLanguage&&offer.cta.indexOf("travelclick")>-1){var languageID;switch($window.currentLanguage){case"zh-CN":case"zh-TW":languageID=5;break;case"es":languageID=2;break;case"id":languageID=28;break;case"en-gb":languageID=11;break;case"de":languageID=7;break;case"ja":languageID=6;break;case"ru":languageID=9;break;case"tr":languageID=19;break;case"ko":languageID=26;break;default:languageID=1}offer.cta+="&languageID="+languageID}offer.categoryName&&(usedOfferCategories.indexOf(offer.categorySlug)>-1?angular.forEach(offerCategories,function(category){category.name==offer.categoryName&&category.count++}):(usedOfferCategories.push(offer.categorySlug),offerCategories.push({name:offer.categoryName,slug:offer.categorySlug,count:1,subTitle:offer.categorySubTitle,firstOfferName:offer.title})))}),offerCategories.length&&(vm.offerCategories=offerCategories),$state.current.name.indexOf("directory")>-1&&angular.forEach(offerCategories,function(category){category.slug==$stateParams.slug&&(vm.isCategoryPage=!0,vm.filterOn=category.slug,vm.h1=category.name,vm.h2="")}),vm.property.offers=angular.copy(response.data.offers.filter(function(offer){return 0==offer.hideMicrosite})),$timeout(function(){angular.forEach(vm.property.offers,function(offer){document.getElementsByClassName("offer-image-"+offer.oid).length>0?(offer.image=$filter("cropTo")($filter("getFirstImage")(offer.image),"offer-image-"+offer.oid),offer.showImage=!0):document.getElementsByClassName("offers-offer-image").length>0&&(offer.image=$filter("cropTo")($filter("getFirstImage")(offer.image),"offers-offer-image"))})},50))})}angular.module("explorer.app").controller("OffersCtrl",["$state","$stateParams","$window","$filter","$timeout","Places","Settings","Alert",OffersCtrl])}(),function(){"use strict";function PhotosCtrl($scope,$state,$window,$filter,$analytics,$mdDialog,Person,Places,Alert,Settings){function photoPop(index,image){image.index=index,$mdDialog.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:"app/cards/photo-gallery.html", controller:function($scope,$filter,$mdDialog){var tmpIndex,timeSpent,prevTimestamp=Date.now(),currentImageSet=vm.useTagAsCategory&&vm.currentPhotoTag?vm.property.photos.filter(vm.photoTagFilter):vm.property.photos;$scope.image=image,$scope.totalImages=currentImageSet.length,$scope.closeDialog=function(){$mdDialog.hide()},$scope.nextImage=function(){tmpIndex=$scope.image.index,timeSpent=Math.floor(Date.now()-prevTimestamp)/1e3,$window.dataLayer&&timeSpent<45&&$window.dataLayer.push({event:"photo.timeSpent","photo.timeSpentDuration":timeSpent,"photo.name":"Photo "+($scope.image.index+1)+": "+($scope.image.title||$scope.image.alt||$scope.image.url)+($scope.image.id?" - "+$scope.image.id:""),"photo.gallery":"Gallery Photo View"}),prevTimestamp=Date.now(),$scope.image.index+1=0?($scope.image=currentImageSet[$scope.image.index-1],$scope.image.index=tmpIndex-1):($scope.image=currentImageSet[currentImageSet.length-1],$scope.image.index=currentImageSet.length-1)}}})}function photoTagFilter(photo){if(photo&&photo.tags&&vm.currentPhotoTag){var tags=angular.isArray(photo.tags)?photo.tags:photo.tags.split(",");for(var i in tags)if(tags[i]==vm.currentPhotoTag)return!0;return!1}return!vm.currentPhotoTag}function viewHotel(listingId){$state.go("explore",{listingId:listingId})}Settings.disableBackButton();var vm=this,_property=Settings.get("currentListing");_property.photoTags=[],_property.photos.map(function(photo){if(photo.thumb||(photo.thumb=photo.url),photo.tags){var tags=angular.isArray(photo.tags)?photo.tags:photo.tags.split(",");angular.forEach(tags,function(tag){-1==_property.photoTags.indexOf(tag)&&_property.photoTags.push(tag)})}}),vm.property=_property,vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.useTagAsCategory=!!$window.APP_CONFIG.core.gallery&&"1"==$window.APP_CONFIG.core.gallery.useTagAsCategory,vm.hasGalleryCaptions=!!$window.APP_CONFIG.core.gallery&&"1"==$window.APP_CONFIG.core.gallery.captions,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.viewHotel=viewHotel,vm.photoPop=photoPop,vm.photoTagFilter=photoTagFilter,vm.currentIndex=0,vm.setCurrentSlideIndex=function(index){vm.currentIndex=index},vm.isCurrentSlideIndex=function(index){return vm.currentIndex===index},vm.prevSlide=function(){vm.currentIndex=vm.currentIndex>0?--vm.currentIndex:vm.images.length-1},vm.nextSlide=function(){vm.currentIndex=vm.currentIndex1||!1,vm.galleries=$state.current.data.galleries||null,vm.showReviews="1"==$state.current.data.showReviews||!1,vm.allowNewReviews="1"==$state.current.data.allowNewReviews||!1,vm.submitReview=submitReview,vm.property.schema.potentialAction&&angular.forEach(vm.property.schema.potentialAction,function(action){action.name.indexOf("Google")>-1&&("ReviewAction"==action.type&&(displayReviews=!0,_reviewLinks.google.writeUrl=action.target,_reviewLinks.google.image=action.image),"ViewAction"==action.type&&(displayReviews=!0,_reviewLinks.google.readUrl=action.target,_reviewLinks.google.image=action.image)),action.name.indexOf("Facebook")>-1&&("ReviewAction"==action.type&&(displayReviews=!0,_reviewLinks.facebook.writeUrl=action.target,_reviewLinks.facebook.image=action.image),"ViewAction"==action.type&&(displayReviews=!0,_reviewLinks.facebook.readUrl=action.target,_reviewLinks.facebook.image=action.image)),action.name.indexOf("TripAdvisor")>-1&&("ReviewAction"==action.type&&(displayReviews=!0,_reviewLinks.tripadvisor.writeUrl=action.target,_reviewLinks.tripadvisor.image=action.image),"ViewAction"==action.type&&(displayReviews=!0,_reviewLinks.tripadvisor.readUrl=action.target,_reviewLinks.tripadvisor.image=action.image)),action.name.indexOf("Yelp")>-1&&("ReviewAction"==action.type&&(displayReviews=!0,_reviewLinks.yelp.writeUrl=action.target,_reviewLinks.yelp.image=action.image),"ViewAction"==action.type&&(displayReviews=!0,_reviewLinks.yelp.readUrl=action.target,_reviewLinks.yelp.image=action.image))}),displayReviews&&(vm.reviewLinks=_reviewLinks),Settings.get("hasCurrentListingReviews")?vm.reviews=Settings.get("currentListingReviews"):Places.get("PropertyReviews",vm.property.id).then(function(response){"ok"==response.data.status&&(Settings.set("hasCurrentListingReviews",!0),Settings.set("currentListingReviews",response.data.reviews),vm.reviews=response.data.reviews)})}angular.module("explorer.app").controller("ReviewsCtrl",["$state","$analytics","$mdDialog","Person","Places","Alert","Settings",ReviewsCtrl])}(),function(){"use strict";function RoomCtrl($state,$stateParams,$window,$filter,$mdDialog,Places,Settings){function isArray(value){return angular.isArray(value)}function popPhotos(ev,imageSet){$mdDialog.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,targetEvent:ev,templateUrl:"app/cards/photo-gallery.html",controller:function($scope,$filter,$mdDialog){var tmpIndex;if("string"==typeof imageSet)imageSet.indexOf(",")>-1?imageSet=imageSet.split(",").map(function(image){return{url:image}}):"h"==imageSet[0]&&(imageSet=[{url:imageSet}]);else if("object"==typeof imageSet&&"string"==typeof imageSet[0]){var tmpImageSet=[];for(var i in imageSet)tmpImageSet.push({url:imageSet[i]});imageSet=tmpImageSet}$scope.totalImages=imageSet.length,"string"==typeof imageSet[0]?$scope.image={index:0,url:imageSet[0]}:$scope.image={index:0,url:imageSet[0].url,alt:imageSet[0].alt,title:imageSet[0].title},$scope.closeDialog=function(){$mdDialog.hide()},$scope.nextImage=function(){tmpIndex=$scope.image.index,$scope.image.index+1=0?($scope.image={url:imageSet[$scope.image.index-1].url,alt:imageSet[$scope.image.index-1].alt,title:imageSet[$scope.image.index-1].title},$scope.image.index=tmpIndex-1):($scope.image={url:imageSet[$scope.image.index-1].url,alt:imageSet[$scope.image.index-1].alt,title:imageSet[$scope.image.index-1].title},$scope.image.index=imageSet.length-1)}}})}var vm=this;vm.popPhotos=popPhotos,vm.isArray=isArray,vm.bookingURL=$window.BOOKING_URL,vm.property=Settings.get("currentListing"),Places.get("PropertyRoomDetails",window.PROPERTY_ID,$stateParams.slug).then(function(response){response&&response.data&&"ok"==response.data.status&&response.data.room?(vm.item=response.data.room,vm.itemOffered=response.data.room.itemOffered,vm.headerImage=response.data.room.details&&response.data.room.details.headerImage?response.data.room.details.headerImage:$filter("getFirstImage")(response.data.room.itemOffered.image),vm.featuredImage=response.data.room.itemOffered.image,vm.floorplanImage=!!response.data.room.details&&(!!response.data.room.details.floorplanImage&&$filter("getFirstImage")(response.data.room.details.floorplanImage)),vm.bodyContent=response.data.room.details?response.data.room.details.bodyContent:"",vm.h1=response.data.room.details?response.data.room.details.h1:"",vm.h2=response.data.room.details?response.data.room.details.h2:"",vm.cta=response.data.room.details?response.data.room.details.cta:""):$state.go("rooms")})}angular.module("explorer.app").controller("RoomCtrl",["$state","$stateParams","$window","$filter","$mdDialog","Places","Settings",RoomCtrl])}(),function(){"use strict";function RoomsCtrl($scope,$state,$window,$http,$timeout,$analytics,$filter,Places,Settings){function setupRooms(){vm.property.schema&&vm.property.schema.hasOfferCatalog&&(angular.forEach(vm.property.schema.hasOfferCatalog.itemListElement,function(element,key){element.itemOffered.slug=$filter("toSlug")(element.itemOffered.name)}),1==$window.SHOW_LEAD_RATES&&$timeout(function(){$scope.$on("triggerUpdateBookingDates",function(ev,data){updateRates(data)})},50))}function dateRangeHasWeekend(dateRange){for(var startDate=dateRange.start,endDate=dateRange.end,start=new Date(startDate),end=new Date(endDate),currentDate=start;currentDate<=end;currentDate.setDate(currentDate.getDate()+1)){var dayOfWeek=currentDate.getDay();if(5===dayOfWeek||6===dayOfWeek)return!0}return!1}function updateRates(data){if(data&&data.roomStays&&data.roomStays[0]&&vm.property.schema.hasOfferCatalog&&vm.property.schema.hasOfferCatalog.itemListElement.length){dateRangeHasWeekend(data.roomStays[0].timeSpan);angular.forEach(vm.property.schema.hasOfferCatalog.itemListElement,function(offer){var minPrice,specialRateFound=!1,lowestRate=!1,currentRate=0;angular.forEach(data.roomStays[0].allRoomTypes,function(room){offer.itemOffered.name==room.roomTypeName&&(angular.forEach(room.averageRates,function(rate){"Discount"==rate.ratePlanCategory&&rate.available&&(currentRate=rate.rate-(rate.discount||0),(!lowestRate||lowestRate.rate-lowestRate.discount>currentRate)&&(lowestRate=rate,specialRateFound=!0))}),specialRateFound||angular.forEach(room.averageRates,function(rate){"Promotional"==rate.ratePlanCategory&&rate.available&&(currentRate=rate.rate-(rate.discount||0),(!lowestRate||lowestRate.rate-lowestRate.discount>currentRate)&&(lowestRate=rate,specialRateFound=!0))}),lowestRate?room.averageRates[0]=lowestRate:angular.forEach(room.averageRates,function(rate){specialRateFound||"Rack"!=rate.ratePlanCategory||(room.averageRates[0]=rate,specialRateFound=!0)}),offer.roomTypeId=room.roomTypeCode,offer.priceCurrency=data.currencyCode,offer.available=room.available,minPrice=room.averageRates[0].rate-room.averageRates[0].discount,offer.price=minPrice)})})}else angular.forEach(vm.property.schema.hasOfferCatalog.itemListElement,function(offer){offer.available=!1,offer.price=!1})}var vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.bookingURL=$window.BOOKING_URL.indexOf("?")>-1?$window.BOOKING_URL+"&landing_site="+$window.APP_DOMAIN:$window.BOOKING_URL+"?landing_site="+$window.APP_DOMAIN,vm.hasGallery="1"==$state.current.data.hasGallery&&$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,Places.get("PropertyRoomsDetails",$window.PROPERTY_ID).then(function(response){response&&response.data&&(vm.property=response.data.property,setupRooms())})}angular.module("explorer.app").controller("RoomsCtrl",["$scope","$state","$window","$http","$timeout","$analytics","$filter","Places","Settings",RoomsCtrl])}(),function(){"use strict";function SiteMapCtrl($rootScope,$scope,$state,$window,Settings){function _sanitizeOrdering(menuItems){for(var i in menuItems)menuItems[i].ordering=parseInt(menuItems[i].ordering)}var _menuItems,vm=this;vm.property=Settings.get("currentListing"),$window.APP_CONFIG.core&&$window.APP_CONFIG.core.sitemap&&(vm.headerImage=$window.APP_CONFIG.core.sitemap.headerImage,vm.bodyContent=$window.APP_CONFIG.core.sitemap.bodyContent),_menuItems=angular.copy($window.APP_CONFIG.menu),vm.menuItems=angular.copy($rootScope.menuItems),$window.LANDING_PAGES&&$window.LANDING_PAGES.length&&(vm.landingPages=$window.LANDING_PAGES.filter(function(page){return"1"!=page.noIndex&&"1"==page.isActive&&0!=page.slug.indexOf("http")})),function(){var menuArragement=[],subMenuArragement=[],menuOrdering=1,subMenuOrdering=1;angular.forEach(_menuItems,function(coreMenuItem){coreMenuItem.id||(coreMenuItem.type="core",coreMenuItem.id=coreMenuItem.state,"1"!=coreMenuItem.noIndex&&"1"==coreMenuItem.isActive&&(coreMenuItem.parent&&coreMenuItem.parent.length&&"0"!=coreMenuItem.parent?(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:subMenuOrdering++,subMenuArragement.push(coreMenuItem)):(coreMenuItem.ordering=coreMenuItem.ordering?coreMenuItem.ordering:menuOrdering++,menuArragement.push(coreMenuItem))))}),vm.landingPages&&angular.forEach(vm.landingPages,function(landingPageItem){landingPageItem.type="landing",landingPageItem.parent&&landingPageItem.parent.length&&"0"!=landingPageItem.parent?(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:subMenuOrdering++,subMenuArragement.push(landingPageItem)):(landingPageItem.ordering=landingPageItem.ordering?landingPageItem.ordering:menuOrdering++,menuArragement.push(landingPageItem))}),vm.menuArragement=menuArragement,vm.subMenuArragement=subMenuArragement,_sanitizeOrdering(vm.subMenuArragement),_sanitizeOrdering(vm.menuArragement)}()}angular.module("explorer.app").controller("SiteMapCtrl",["$rootScope","$scope","$state","$window","Settings",SiteMapCtrl])}(),function(){"use strict";function StoriesCtrl($scope,$state,$stateParams,$window,$timeout,$filter,Stories,Settings,Alert){var stories,vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.template=$stateParams.template||vm.template,vm.folder=$stateParams.folder||"stories",vm.storiesURL=$window.STORIES_URL?$window.STORIES_URL:"stories",$timeout(function(){Settings.get("hasPropertySiteStories_"+(vm.siteId||""))?(stories=Settings.get("propertySiteStories_"+(vm.siteId||"")),vm.categories=Settings.get("propertySiteStoryCategories_"+(vm.siteId||"")),$stateParams.slug&&(stories=stories.filter(function(story){var found=!1;return angular.forEach(story.categories,function(storyCategory){$filter("toSlug")(storyCategory.replace("&","and"))==$stateParams.slug&&(vm.isCategory=!0,vm.currentCategory=storyCategory,angular.forEach(vm.categories,function(category){category.name==storyCategory&&(vm.category=category,category.template&&(vm.template=category.template,Settings.setTemplate(vm.template)))}),found=!0,vm.headerImage||(vm.headerImage=story.featuredImage))}),found})),vm.stories=stories):Stories.get("PropertySiteStories",vm.siteId||null).then(function(response){"ok"==response.data.status&&(stories=response.data.stories,vm.categories=response.data.categories,vm.siteId||(Settings.set("propertySiteStories_"+(vm.siteId||""),response.data.stories),Settings.set("propertySiteStoryCategories_"+(vm.siteId||""),response.data.categories),Settings.set("hasPropertySiteStories_"+(vm.siteId||""),!0)),$stateParams.slug&&(stories=stories.filter(function(story){var found=!1;return angular.forEach(story.categories,function(storyCategory){$filter("toSlug")(storyCategory.replace("&","and"))==$stateParams.slug&&(vm.isCategory=!0,vm.currentCategory=storyCategory,angular.forEach(vm.categories,function(category){category.name==storyCategory&&(vm.category=category,category.template&&(vm.template=category.template,Settings.setTemplate(vm.template)))}),found=!0,vm.headerImage||(vm.headerImage=story.featuredImage))}),found})),vm.stories=stories)})},10)}angular.module("explorer.app").controller("StoriesCtrl",["$scope","$state","$stateParams","$window","$timeout","$filter","Stories","Settings","Alert",StoriesCtrl])}(),function(){"use strict";function StoryCtrl($scope,$state,$stateParams,$window,$location,$timeout,Stories,Settings,Alert){function setupPage(page){found=!0,vm.title=page.title,vm.pageTitle=page.title,console.log(page),Settings.setPageTitle(page.title),vm.featuredImage=page.featuredImage,vm.featuredImageURL=page.featuredImageURL,vm.featuredImageTitle=page.featuredImageTitle;const htmlContent=page.bodyContent,imgRegex=/]*?>/gi,updatedHtmlContent=(htmlContent.match(imgRegex),htmlContent.replace(imgRegex,function(imgTag){return updateSrc(imgTag)}));vm.bodyContent=updatedHtmlContent.replace("","load-external-script>"),vm.story=page,vm.currentUrl=$window.location.href,vm.template=$stateParams.template||page.template,vm.folder=$stateParams.folder||"stories",vm.story.template&&Settings.setTemplate(vm.story.template)}function updateSrc(imgTag){var widthMatch=imgTag.match(/width=["'](\d+)["']/i),heightMatch=imgTag.match(/height=["'](\d+)["']/i);if(widthMatch){var width=widthMatch[1],updatedTag=imgTag.replace(/(src="[^"]+=)\w+(")/i,"$1w"+width+"$2");if(heightMatch){var height=heightMatch[1];updatedTag=updatedTag.replace(/(src="[^"]+)=w(\d+)(")/i,"$1=w"+width+"-h"+height+"-n$3")}return updatedTag}if(heightMatch){var height=heightMatch[1];return imgTag.replace(/(src="[^"]+)(")/i,"$1=h"+height+"$2")}return imgTag}var page,vm=this,found=!1;vm.template=$stateParams.template,vm.folder=$stateParams.folder||"stories",Stories.get("StoryDetailsBySlug",$stateParams.slug,{preview:$location.search().preview}).then(function(response){"ok"==response.data.status&&response.data.story.id?(page=response.data.story,setupPage(page)):$state.go("stories")}),Settings.get("propertySiteStoryCategories")?vm.categories=Settings.get("propertySiteStoryCategories"):Stories.get("PropertySiteStories").then(function(response){"ok"==response.data.status&&(vm.categories=response.data.categories,Settings.set("propertySiteStories",response.data.stories),Settings.set("propertySiteStoryCategories",response.data.categories),Settings.set("hasPropertySiteStories",!0))})}angular.module("explorer.app").controller("StoryCtrl",["$scope","$state","$stateParams","$window","$location","$timeout","Stories","Settings","Alert",StoryCtrl])}(),function(){"use strict";function WeddingsCtrl($state,$window,$analytics,Person,Alert,Settings){var vm=this;vm.headerImage=$state.current.data.headerImage,vm.bodyContent=$state.current.data.bodyContent,vm.secondaryBodyContent=$state.current.data.secondaryBodyContent,vm.h1=$state.current.data.h1,vm.h2=$state.current.data.h2,vm.featuredImage=$state.current.data.featuredImage,vm.featuredImageURL=$state.current.data.featuredImageURL,vm.featuredImageCaption=$state.current.data.featuredImageCaption||"",vm.headerImagePositionY=$state.current.data.headerImagePositionY||null,vm.template=$state.current.data.template,vm.RFPID=$state.current.data.RFPID||1,vm.property=Settings.get("currentListing"),vm.hasGallery="1"==$state.current.data.hasGallery&&!!$state.current.data.galleries&&$state.current.data.galleries.toString().length>1||!1,vm.galleries=$state.current.data.galleries||null,vm.weddingForm={},vm.RFPID.toString().length>1?(vm.hasCustomRFP=!0,Person.get("FormDetails",vm.RFPID).then(function(response){"ok"==response.data.status&&(vm.customForm=response.data.form)})):vm.hasCustomRFP=!1,console.log("rfp",vm.RFPID),vm.submitWeddingRFP=function(ev){vm.weddingForm.name&&vm.weddingForm.phone&&vm.weddingForm.message&&vm.weddingForm.email&&vm.weddingForm["Number of Attendees"]&&vm.weddingForm["Desired Date 1"]&&vm.weddingForm["Desired Date 2"]?Person.submitForm("WeddingRFP",vm.weddingForm).then(function(response){response&&response.data&&"ok"==response.data.status?(vm.weddingForm={},$window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("WeddingRFP"),$analytics.eventTrack("Weddings Form",{category:"Weddings",label:"Submit"}),Alert.fire({ev:ev,message:"Thank you. We will reach out to you shortly!"})):Alert.fire({ev:ev,message:"There was an error, please try again later!"})}):Alert.fire({ev:ev,message:"Please fill in all the required fields."})},vm.submitCustomRFP=function(ev){vm.customForm?Person.submitForm("CustomRFP",vm.customForm).then(function(response){response&&response.data&&"ok"==response.data.status?($window.onWebsiteFormSubmit&&$window.onWebsiteFormSubmit("WeddingRFP"),$analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:vm.customForm.submitText}),Alert.fire({ev:ev,title:vm.customForm.submissionMessageHeading||"Attention",message:vm.customForm.submissionMessageText||"Thank you. We will reach out to you shortly!"}),$state.reload()):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Server Error"}),Alert.fire({ev:ev,message:"There was an error, please try again later!"}),$state.reload())}):($analytics.eventTrack(vm.customForm.heading,{category:"Custom Forms",label:"Missing Fields"}),Alert.fire({ev:ev,message:"Error, try again later"}))}}angular.module("explorer.app").controller("WeddingsCtrl",["$state","$window","$analytics","Person","Alert","Settings",WeddingsCtrl])}(),function(){"use strict";angular.module("explorer.app").directive("datePicker",function($rootScope,$state,$stateParams,$window,$timeout,$filter,$analytics,$mdpDatePicker,Settings,Alert){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/microsite/jade/cards/view/eh-date-picker.tpl.html",controller:function($rootScope,$scope,$state,$stateParams,$window,$timeout,$filter,$analytics,$mdpDatePicker,Settings,Alert){function isDisabledDate(d){return d0?$scope.attrs.endOffset-$scope.attrs.startOffset:2)+" night stay."}):$window.open($scope.attrs.cta+"&dateIn="+$filter("date")($scope.checkinDate,"MM/dd/yyyy")+"&dateOut="+$filter("date")($scope.checkoutDate,"MM/dd/yyyy")+"&adults="+($scope.attrs.adults||2)+"&children="+($scope.attrs.children||2)+"&rooms="+($scope.attrs.rooms||1),"_blank")}var prevDiff,today=new Date;$scope.isDisabledDate=isDisabledDate,$scope.checkAvailability=checkAvailability,$scope.promoCode=$window.PROMOID,$scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001&&(prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate))),Settings.set("checkinDate",scope.checkinDate)}),$scope.$watch("checkoutDate",function(oldDate,newDate){Settings.set("checkoutDate",scope.checkoutDate),moment(scope.checkoutDate).diff(moment(scope.checkinDate))!=prevDiff&&(scope.showDatePicker=!1)})},link:function(scope,element,attrs,filter){scope.attrs=attrs,scope.checkinDate=new Date(moment().add(attrs.startOffset||1,"days")),scope.checkoutDate=new Date(moment().add(attrs.endOffset||2,"days"))}}}).directive("jadeSitewideNotice",function($rootScope){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/microsite/jade/cards/view/jade-sitewide-notice.tpl.html",link:function(scope,element,attrs,filter){$rootScope.$watch("siteNotices",function(siteNotices){scope.siteNotices=siteNotices})}}}).directive("jadeBookingBar",function($rootScope,$window,$timeout,$http,$filter,$mdpDatePicker,$analytics,Settings){return{restrict:"E",scope:{},replace:!0,templateUrl:"app/microsite/jade/cards/view/jade-booking-bar.tpl.html",link:function(scope,element,attrs,filter){function updateRates(){if(Settings.get("hasCurrentListing")){var hotelCode=$window.BOOKING_URL.split("&")[0].split("?")[0].split("/");hotelCode=hotelCode[hotelCode.length-1];var ratesApi="https://extraholidays.brewervacations.com/travelclick-api/?task=avail&hotelCode="+hotelCode+"&dateIn="+moment(scope.checkinDate).format("YYYY-MM-DD")+"&dateOut="+moment(scope.checkoutDate).format("YYYY-MM-DD")+(scope.promoCode?"&corpCode="+scope.promoCode:""),ratesData=Settings.get(btoa(ratesApi));if("loading"==ratesData)return;if(ratesData){if(ratesData.roomStays&&ratesData.roomStays.length){var leadRate=!1,found=!1,currentRate=0;found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){"Discount"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){"Promotional"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(ratesData.roomStays[0].ratePlans,function(plan){!found&&plan.default&&(leadRate=plan.leadRate-(plan.discountRate||0),found=!0)}),leadRate&&(scope.leadRate=leadRate,scope.priceCurrency=ratesData.currencyCode)}else scope.leadRate=!1;$rootScope.$broadcast("triggerUpdateBookingDates",ratesData)}else Settings.set(btoa(ratesApi),"loading"),$http({url:ratesApi,method:"GET",dataType:"json"}).success(function(data,status,headers,config){if(200==status){Settings.set(btoa(ratesApi),data);var dateLabel=moment(scope.checkinDate).format("MM/DD/YYYY")+"-"+moment(scope.checkoutDate).format("MM/DD/YYYY");if(data.roomStays&&data.roomStays.length){var leadRate=!1,found=!1,currentRate=0;found||angular.forEach(data.roomStays[0].ratePlans,function(plan){"Discount"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(data.roomStays[0].ratePlans,function(plan){"Promotional"==plan.ratePlanCategory&&plan.available&&(currentRate=plan.leadRate-(plan.discountRate||0),leadRate=!leadRate||leadRate>currentRate?currentRate:leadRate,found=!0)}),found||angular.forEach(data.roomStays[0].ratePlans,function(plan){!found&&plan.default&&(leadRate=plan.leadRate-(plan.discountRate||0),found=!0)}),leadRate&&(scope.leadRate=leadRate,scope.priceCurrency=data.currencyCode,$analytics.eventTrack(hotelCode,{category:"Lead Rate - Available",label:dateLabel}))}else scope.leadRate=!1,$analytics.eventTrack(hotelCode,{category:"Lead Rate - Unavailable",label:dateLabel});$rootScope.$broadcast("triggerUpdateBookingDates",data)}}).error(function(data,status,headers,config){scope.isSearching=!1})}}function isDisabledDate(d){return d=-86400001&&(scope.checkoutDate=new Date(moment(scope.checkinDate).add(2,"days"))),checkoutDatePicker(ev)})}function checkoutDatePicker(ev){$mdpDatePicker(scope.checkoutDate,{minDate:new Date(moment(scope.checkinDate).add(2,"days")),targetEvent:ev,dateLabel:"Check-Out"}).then(function(selectedDate){scope.checkoutDate=selectedDate,moment(selectedDate).diff(moment(scope.checkinDate))<=86400001&&(scope.checkinDate=new Date(moment(scope.checkoutDate).subtract(2,"days")))})}function bookNow(ev){if($window.BOOKING_URL){var options={url:$window.BOOKING_URL,checkin:$filter("date")(scope.checkinDate,"MM/dd/yyyy"),checkout:$filter("date")(scope.checkoutDate,"MM/dd/yyyy"),numAdults:scope.numAdults,numChildren:scope.numChildren,rooms:1,promo:scope.promoCode,group:scope.groupCode,iata:scope.iataCode};options.checkin&&(options.url+=(options.url.indexOf("?")>-1?"&":"?")+"datein="+moment(options.checkin).format("MM/DD/YYYY")),options.checkout&&(options.url+="&dateout="+moment(options.checkout).format("MM/DD/YYYY")),options.numAdults&&(options.url+="&adults="+options.numAdults),options.numChildren&&(options.url+="&children="+options.numChildren),options.rooms&&(options.url+="&rooms="+options.rooms),options.promo&&(options.url+="&promo="+options.promo),options.group&&(options.url+="&group="+options.group),options.iata&&(options.url+="&iata="+options.iata),$window.open(options.url,"_blank")}}var prevDiff,today=new Date(moment().subtract(1,"days"));scope.attrs=attrs,scope.checkinDatePicker=checkinDatePicker,scope.checkoutDatePicker=checkoutDatePicker,scope.isDisabledDate=isDisabledDate,scope.bookNow=bookNow,scope.bookingMinRange=2,scope.checkinDate=new Date(Settings.get("checkinDate")?moment(Settings.get("checkinDate")):moment().add(2,"days")),scope.checkoutDate=new Date(Settings.get("checkoutDate")?moment(Settings.get("checkoutDate")):moment().add(4,"days")),scope.showDatePicker=!1,scope.phoneReservations=$window.APP_CLIENT_PHONE_RESERVATIONS||"",scope.promoCode=$window.PROMOID||"",scope.corpCode=$window.CORPID||"", scope.groupCode=$window.GROUPID||"",scope.iataCode=$window.IATA||"",scope.hasPromoOption=$window.APP_CONFIG.core.themes.hasPromoOption||!1,scope.hasPromoConfiguration=$window.APP_CONFIG.core.themes.hasPromoConfiguration||!1,scope.hasCorpOption=$window.APP_CONFIG.core.themes.hasCorpOption||!1,scope.hasGroupOption=$window.APP_CONFIG.core.themes.hasGroupOption||!1,scope.hasIataOption=$window.APP_CONFIG.core.themes.hasIataOption||!1,scope.promoCodeType="promoCorporate",scope.promoConfiguration=$window.APP_CONFIG.core.themes.promoConfiguration||!1,scope.$on("updatePromoCode",function(e,promoCode){scope.promoCode=promoCode}),scope.$watch("checkinDate",function(oldDate,newDate){moment(scope.checkinDate).diff(moment(scope.checkoutDate))>=-86400001?prevDiff=moment(scope.checkinDate).diff(moment(scope.checkoutDate)):$window.SHOW_LEAD_RATES&&$timeout(function(){scope.checkinDate!=scope.checkoutDate&&updateRates()},50),Settings.set("checkinDate",scope.checkinDate)}),scope.$watch("checkoutDate",function(oldDate,newDate){Settings.set("checkoutDate",scope.checkoutDate),moment(scope.checkoutDate).diff(moment(scope.checkinDate))!=prevDiff&&(scope.showDatePicker=!1),$window.SHOW_LEAD_RATES&&$timeout(function(){scope.checkinDate!=scope.checkoutDate&&updateRates()},50)})}}}).directive("jadeFooter",function($rootScope,$state,$stateParams,$filter,$window,$timeout,$analytics,$cookies,Person,Alert){return{restrict:"E",replace:!0,templateUrl:"app/cards/main-footer.html",link:function(scope,element,attrs){function updateLanguage(language){$analytics.eventTrack("Select Language",{category:"Language Selection",label:language}),$cookies.put("currentLanguage",language),$window.location.href=$window.location.href.split("?")[0].split("#")[0]+"?#googtrans(en|"+language+")"}scope.attrs=attrs,scope.clientPhone=$window.APP_CLIENT_PHONE||$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientReservationsPhone=$window.APP_CLIENT_PHONE_RESERVATIONS,scope.clientEmail=$window.APP_CLIENT_EMAIL,scope.currentYear=(new Date).getFullYear(),scope.menu=$window.APP_CONFIG.menu,scope.landingPages=$window.LANDING_PAGES,scope.clientName=$window.APP_CLIENT,scope.clientURL=$window.location.origin,scope.clientLogo=$window.APP_CONFIG.core.header.logo||null,scope.footer=$window.APP_CONFIG.core.footer,scope.core=$window.APP_CONFIG.core,scope.updateLanguage=updateLanguage,scope.$watch("selectedIndex",function(val){$rootScope.selectedIndex=val}),$timeout(function(){function emailSubscribe(ev){scope.subscriberEmail?Person.submitForm("EmailSubscribe",{email:scope.subscriberEmail}).then(function(response){scope.subscriberEmail="",Alert.fire({ev:ev,title:"Thanks for signing up!",message:"We’ll send our best offers and latest news straight to your inbox."})}):Alert.fire({ev:ev,message:"Please enter a valid email address."})}scope.currentState=$rootScope.currentState,scope.currentMenuItem=null,scope.currentParent=null,$rootScope.footerMenuItems&&(scope.footerMenuItems=$filter("orderBy")($filter("unique")($filter("toArray")($rootScope.footerMenuItems,!1),"state"),"ordering"));var currentMenuItems={},currentChildren=[],currentGrandChildren=[];angular.forEach(scope.menu,function(menuItem,key){1==menuItem.isActive&&(menuItem.state==scope.currentState&&menuItem.parent&&"0"!=menuItem.parent&&(scope.currentParent=menuItem.parent),menuItem.state==scope.currentState&&(scope.currentMenuItem=menuItem),currentMenuItems[key]=menuItem)}),angular.forEach(scope.landingPages,function(page){1==page.isActive&&(!scope.currentParent&&page.id==scope.currentState&&page.parent&&"0"!=page.parent&&(scope.currentParent=page.parent),page.id==scope.currentState&&(scope.currentMenuItem=page),currentMenuItems[page.id]||(currentMenuItems[page.id]=page))}),angular.forEach(currentMenuItems,function(menuItem){menuItem.parent==scope.currentState?currentChildren.push(menuItem):menuItem.parent==scope.currentParent&¤tGrandChildren.push(menuItem),menuItem.state!=scope.currentParent&&menuItem.id!=scope.currentParent||(scope.currentParentMenuItem=menuItem)}),scope.currentChildren=currentChildren,scope.currentGrandChildren=currentGrandChildren,$window.APP_CONFIG.core&&$window.APP_CONFIG.core.footer&&(scope.clientBrand=$window.APP_CONFIG.core.footer.brand||null,scope.footerText=$window.APP_CONFIG.core.footer.text||null,scope.subscribeHeading=$window.APP_CONFIG.core.footer.subscribeHeading||null,scope.subscribeText=$window.APP_CONFIG.core.footer.subscribeText||null,scope.clientAddress=$window.APP_CONFIG.core.footer.address||null,scope.termsLink=$window.APP_CONFIG.core.footer.termsLink||null,scope.privacyLink=$window.APP_CONFIG.core.footer.privacyLink||null,scope.serviceMarksLink=$window.APP_CONFIG.core.footer.serviceMarksLink||null,scope.adaLink=$window.APP_CONFIG.core.footer.adaLink||null,scope.newsletterLink=$window.APP_CONFIG.core.footer.newsletterLink||null),scope.emailSubscribe=emailSubscribe},500)}}}),angular.module("explorer.config",["ui.router"]).config(function($locationProvider,$logProvider,$urlRouterProvider,$mdThemingProvider,$mdIconProvider,$analyticsProvider){function setupGA(available){try{ga(function(){$analyticsProvider.settings.ga.additionalAccountNames=[],ga.getAll().map(function(tracker){$analyticsProvider.settings.ga.additionalAccountNames.push(tracker.get("name"))})})}catch(e){console.log(e),available&&setTimeout(function(){setupGA(!1)},1e3)}}$mdIconProvider.icon("w","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/wyndham-w-logo.svg",24).icon("home","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_home_24px.svg",24).icon("hotel","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_location_city_24px.svg",24).icon("trip","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_language_24px.svg",24).icon("stay","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_hotel_24px.svg",24).icon("camera","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_photo_camera_24px.svg",24).icon("key","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_vpn_key_24px.svg",24).icon("deals","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_local_play_24px.svg",24).icon("specials","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_local_offer_24px.svg",24).icon("reviews","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_rate_review_24px.svg",24).icon("dining","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_restaurant_24px.svg",24).icon("search","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_search_24px.svg",24).icon("message","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_message_24px.svg",24).icon("checkin","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_person_pin_24px.svg",24).icon("checkout","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_assistant_24px.svg",24).icon("plus","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_add_circle_outline_24px.svg",24).icon("info","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_info_24px.svg",24).icon("privacy","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_lock_24px.svg",24).icon("terms","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_description_24px.svg",24).icon("external","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_launch_24px.svg",24).icon("label","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_label_24px.svg",24).icon("heart","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_favorite_24px.svg",24).icon("emptyheart","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_favorite_border_24px.svg",24).icon("star","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_star_24px.svg",24).icon("person","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_person_24px.svg",24).icon("people","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_group_24px.svg",24).icon("id","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_perm_device_information_24px.svg",24).icon("personadd","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_person_add_24px.svg",24).icon("accountround","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_account_circle_24px.svg",24).icon("accountsquare","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_account_box_24px.svg",24).icon("website","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_web_24px.svg",24).icon("mail","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_email_24px.svg",24).icon("gender","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_wc_24px.svg",24).icon("occupation","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_accessibility_24px.svg",24).icon("jobtitle","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_airline_seat_recline_normal_24px.svg",24).icon("google","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/google.svg",24).icon("googleplus","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/google-plus.svg",24).icon("work","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_business_24px.svg",24).icon("check","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_check_24px.svg",24).icon("checkcircle","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_check_circle_24px.svg",24).icon("create","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_create_24px.svg",24).icon("location","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_location_on_24px.svg",24).icon("dashboard","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_dashboard_24px.svg",24).icon("people","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_people_24px.svg",24).icon("reports","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_assignment_turned_in_24px.svg",24).icon("subject","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_textsms_24px.svg",24).icon("menu","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_menu_24px.svg",24).icon("share","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/share.svg",24).icon("google_plus","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/google_plus.svg",512).icon("hangouts","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/hangouts.svg",512).icon("twitter","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/twitter.svg",512).icon("previous","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_navigate_before_24px.svg",24).icon("next","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_navigate_next_24px.svg",24).icon("skipfirst","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_skip_previous_24px.svg",24).icon("skiplast","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_skip_next_24px.svg",24).icon("uparrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_drop_down_24px.svg",24).icon("downarrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_drop_up_24px.svg",24).icon("downwardarrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_downward_24px.svg",24).icon("upwardarrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_upward_24px.svg",24).icon("leftwardarrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_back_24px.svg",24).icon("rightwardarrow","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_arrow_forward_24px.svg",24).icon("downchevron","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_keyboard_arrow_down_24px.svg",24).icon("upchevron","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_keyboard_arrow_up_24px.svg",24).icon("rightchevron","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_chevron_right_24px.svg",24).icon("settings","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_settings_24px.svg",24).icon("moresettings","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_more_vert_24px.svg",24).icon("time","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_access_time_24px.svg",24).icon("timer","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_timelapse_24px.svg",24).icon("open","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_open_in_browser_24px.svg",24).icon("delete","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_delete_24px.svg",24).icon("mailopen","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_drafts_24px.svg",24).icon("close","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_close_24px.svg",24).icon("cancel","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_cancel_24px.svg",24).icon("no","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_do_not_disturb_24px.svg",24).icon("explore","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_explore_24px.svg",24).icon("undo","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_undo_24px.svg",24).icon("redo","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_redo_24px.svg",24).icon("remove","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_remove_circle_24px.svg",24).icon("address","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_location_on_24px.svg",24).icon("phone","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_phone_24px.svg",24).icon("phonegroup","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_settings_phone_24px.svg",24).icon("room","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_hotel_24px.svg",24).icon("tag","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_local_offer_24px.svg",24).icon("child","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_face_24px.svg",24).icon("infant","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_tag_faces_24px.svg",24).icon("date","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_event_24px.svg",24).icon("datecheck","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_event_available_24px.svg",24).icon("datex","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_event_busy_24px.svg",24).icon("dateline","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_event_note_24px.svg",24).icon("directions","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_directions_24px.svg",24).icon("personfolder","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_folder_shared_24px.svg",24).icon("specialfolder","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_folder_shared_24px.svg",24).icon("web","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_web_24px.svg",24).icon("creditcard","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_credit_card_24px.svg",24).icon("noteadd","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_folder_special_24px.svg",24).icon("book","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_book_24px.svg",24).icon("money","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_attach_money_24px.svg",24).icon("earth","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_earth_24px.svg",24).icon("wallet","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_account_balance_wallet_24px.svg",24).icon("cta","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_perm_phone_msg_24px.svg",24).icon("spa","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_spa_24px.svg",24).icon("golf","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_golf_course_24px.svg",24).icon("gym","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_fitness_center_24px.svg",24).icon("beach","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_beach_access_24px.svg",24).icon("bizcenter","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_business_center_24px.svg",24).icon("hottub","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_hot_tub_24px.svg",24).icon("service","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_room_service_24px.svg",24).icon("help","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_help_24px.svg",24).icon("logout","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_power_settings_new_24px.svg",24).icon("wifi","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_wifi_24px.svg",24).icon("pool","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/swim.svg",24).icon("rss","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_rss_feed_24px.svg",24).icon("stories","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/ic_import_contacts_24px.svg",24).icon("soctripadvisor","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_tripadvisor_24.svg",24).icon("soctwitter","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_twitter_24.svg?v2",24).icon("socyoutube","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_youtube_24.svg",24).icon("socfacebook","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_facebook_24.svg",24).icon("socfoursquare","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_foursquare_24.svg",24).icon("socgoogle","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_google_24.svg",24).icon("socinstagram","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_instagram_24.svg",24).icon("socyelp","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_yelp_24.svg",24).icon("socpinterest","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_pinterest_24.svg",24).icon("socgmaps","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_gmaps_24.svg",24).icon("soclinkedin","https://storage.googleapis.com/brewer-vacations-frontend.appspot.com/content/img/icons/social_linkedin_24.svg",24);var brandPrimaryMap=$mdThemingProvider.extendPalette("teal",{300:"30beb4",500:"30beb4",800:"00828d",A100:"3bbeb4"}),brandAccentMap=$mdThemingProvider.extendPalette("pink",{A100:"DE2B52",A200:"DE2B52",A400:"DE2B52",A700:"DE2B52",contrastDefaultColor:"light",contrastDarkColors:["A100"],contrastLightColors:void 0});$mdThemingProvider.definePalette("brandPrimary",brandPrimaryMap),$mdThemingProvider.definePalette("brandAccent",brandAccentMap),$mdThemingProvider.theme("default").primaryPalette("brandPrimary").accentPalette("brandAccent"),$mdThemingProvider.theme("contrast","default").primaryPalette("brandPrimary"),"wave.webaim.org"!=window.location.hostname&&$locationProvider.html5Mode(!0),$logProvider.debugEnabled(!1),window.ga?setupGA():setTimeout(function(){setupGA(!0)},1e3),$analyticsProvider.virtualPageviews(!1)})}(),angular.module("brewervacations-app").run(["$templateCache",function($templateCache){"use strict";$templateCache.put("app/cards/booking-bar-dialog.html",'

Reserve Now

{{dialogCheckinDate | date : \'d\'}}
{{dialogCheckinDate | date : \'MMM yyyy\'}}
{{dialogCheckinDate | date : \'EEEE\'}}
{{dialogCheckoutDate | date : \'d\'}}
{{dialogCheckoutDate | date : \'MMM yyyy\'}}
{{dialogCheckoutDate | date : \'EEEE\'}}
12345678
01234567
'),$templateCache.put("app/cards/booking-bar.html",'
Reservations: {{phoneReservations}}
Reservations: {{phoneReservations}}
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
1234
From
{{(!priceCurrency || priceCurrency == \'USD\') ? \'$\' : \'\'}}{{leadRate | number:0}}
{{priceCurrency || \'USD\'}}/Night
From {{(!priceCurrency || priceCurrency == \'USD\') ? \'$\' : \'\'}}{{leadRate | number:0}} {{priceCurrency || \'USD\'}}/Night
Check Rates
'), $templateCache.put("app/cards/cobalt-footer.html",'
{{clientBrand || clientName}} © {{currentYear}}
'),$templateCache.put("app/cards/eh-booking-bar.html",'
Destination
All{{destination.name}}
Destination
{{selectedDestinationName || \'Search Destinations\'}}
Resort
Check In
{{checkinDate | date : "EEE\',\' M/d/yy"}}
Check Out
{{checkoutDate | date : "EEE\',\' M/d/yy"}}
Promo
Check Rates
'),$templateCache.put("app/cards/eh-breadcrumb.html",''),$templateCache.put("app/cards/eh-campaign-footer.html",''),$templateCache.put("app/cards/eh-category-offer-card.html",'
Click to Explore {{vm.isProperty ? \'Offer\' : \'Resort\'}}{{offer.price}}{{offer.title || offer.hotelName}} {{offer.price}} {{offer.title}}
View Photos{{offer.price}}
View Photos

{{offer.title}}{{offer.hotelName}}

{{offer.hotelCityStateText}} | Resort Overview

Available at Multiple Resorts

{{offer.categoryName}}

View ResortOffer Details
{{offer.cta_label || \'Check Rates\'}}View Offer Resorts
'),$templateCache.put("app/cards/eh-default-rfp.html",'

Plan Your Event in Extraordinary Destinations

Submit Request for Proposal

This is required.
This is required.
This is required.
This is required.
{{hotel.name}} - {{hotel.address.addressLocality}}, {{hotel.address.addressRegion}}

Flexible Dates:YesNo

Will you need meeting space?YesNo

Will you need food & beverage ?YesNo

Room Set Up?

{{type.name}}
Send Request
"), $templateCache.put("app/cards/eh-footer.html",''),$templateCache.put("app/cards/eh-hotel-hero-photos.html",'
{{::property.name}}

, ,

  ({{::property.aggregateRating.ratingCount}})  
• {{property.priceRange ? property.priceRange : \'\'}}
'),$templateCache.put("app/cards/eh-hotel-nav.html",""),$templateCache.put("app/cards/eh-resort-card.html",'
{{property.name}}

, ,
{{property.aggregateRating.ratingValue}}     ({{property.aggregateRating.ratingCount}})   • {{property.priceRange ? property.priceRange : \'~$$$\'}}

{{amenity.name}}

'),$templateCache.put("app/cards/eh-survey-dialog.html",'
Please take this brief survey to help us better serve you in the future.
Take the surveyNo Thanks
'), $templateCache.put("app/cards/eh-sweeps-rfp.html",'

Enter your info below for a chance to win!

This is required.
This is required.
This is required.
This is required.
This is required.
This is required.
Please SelectAfghanistanAlbaniaAlgeriaAmerican SamoaAndorraAngolaAnguillaAntarcticaAntigua and BarbudaArgentinaArmeniaArubaAustraliaAustriaAzerbaijanBahamasBahrainBangladeshBarbadosBelarusBelgiumBelizeBeninBermudaBhutanBoliviaBosnia and HerzegovinaBotswanaBouvet IslandBrazilBritish Indian Ocean TerritoryBrunei DarussalamBulgariaBurkina FasoBurundiCambodiaCameroonCanadaCape VerdeCayman IslandsCentral African RepublicChadChileChinaChristmas IslandCocos (Keeling) IslandsColombiaComorosCongoCook IslandsCosta RicaCroatia (Hrvatska)CubaCyprusCzech RepublicCzechoslovakia (former)DenmarkDjiboutiDominicaDominican RepublicEast TimorEcuadorEgyptEl SalvadorEquatorial GuineaEritreaEstoniaEthiopiaFalkland Islands (Malvinas)Faroe IslandsFijiFinlandFranceFrench GuianaFrench PolynesiaFrench Southern TerritoriesGabonGambiaGeorgiaGermanyGhanaGibraltarGreeceGreenlandGrenadaGuadeloupeGuamGuatemalaGuineaGuinea-BissauGuyanaHaitiHeard and McDonald IslandsHondurasHong KongHungaryIcelandIndiaIndonesiaIranIraqIrelandIsraelItalyJamaicaJapanJordanKazakhstanKenyaKiribatiKorea (North)Korea (South)KuwaitKyrgyzstanLaosLatviaLebanonLesothoLiberiaLibyaLiechtensteinLithuaniaLuxembourgMacauMacedoniaMadagascarMalawiMalaysiaMaldivesMaliMaltaMarshall IslandsMartiniqueMauritaniaMauritiusMayotteMexicoMicronesiaMoldovaMonacoMongoliaMontserratMoroccoMozambiqueMyanmarNamibiaNauruNepalNetherlandsNetherlands AntillesNeutral ZoneNew CaledoniaNew ZealandNicaraguaNigerNigeriaNiueNorfolk IslandNorthern Mariana IslandsNorwayOmanOtherPakistanPalauPanamaPapua New GuineaParaguayPeruPhilippinesPitcairnPolandPortugalPuerto RicoQatarReunionRomaniaRussian FederationRwandaSaint Kitts and NevisSaint LuciaSaint Vincent and the GrenadinSamoaSan MarinoSao Tome and PrincipeSaudi ArabiaSenegalSeychellesSierra LeoneSingaporeSlovak RepublicSloveniaSolomon IslandsSomaliaSouth AfricaSouth Georgia and South SandwiSpainSri LankaSt. HelenaSt. Pierre and MiquelonSudanSurinameSvalbard and Jan Mayen IslandsSwazilandSwedenSwitzerlandSyriaTaiwanTajikistanTanzaniaThailandTogoTokelauTongaTrinidad and TobagoTunisiaTurkeyTurkmenistanTurks and Caicos IslandsTuvaluUgandaUkraineUnited Arab EmirateUnited KingdomUnited StatesUruguayUS Minor Outlying IslandsUSSR (former)UzbekistanVanuatuVatican City State (Holy See)VenezuelaViet NamVirgin Islands (British)Virgin Islands (U.S.)Wallis and Futuna IslandsWestern SaharaYemenYugoslaviaZaireZambiaZimbabwe
This is required.

Travel Interests

{{type.name}}
Enter Sweepstakes
"),$templateCache.put("app/cards/emerald-booking-bar.html",'
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
Discount CodeGroup AttendeePromo/CorporateTravel Agency Code
{{value}}
Check Availability
'),$templateCache.put("app/cards/forms.html",'

'),$templateCache.put("app/cards/galleries.html",''),$templateCache.put("app/cards/garnet-booking-bar.html",'
Reservations
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
Check Rates
'), $templateCache.put("app/cards/garnet-footer.html",'
{{clientName}}
{{clientAddress}}
{{clientBrand}} © {{currentYear}}
'),$templateCache.put("app/cards/icon-square.html",'
{{attrs.label}}
'),$templateCache.put("app/cards/islandhopper-carousel.html",'
'),$templateCache.put("app/cards/item-carousel.html",''),$templateCache.put("app/cards/main-footer.html",''),$templateCache.put("app/cards/marker-info-window.html",''),$templateCache.put("app/cards/offers.html",'
{{::offer.price}}

{{::offer.title}}

Read More
View Details
{{::offer.cta_label || \'Check Rates\'}}
'),$templateCache.put("app/cards/opal-footer.html",'
{{clientName}}
{{clientAddress}}
{{clientBrand}} © {{currentYear}}
{{::subscribeHeading}} {{::clientName}} Specials
Looking for the latest vacation specials, news and updates from {{clientBrand}}? Enter your email below!
Best Western Rewards
Rewards Earned by {{clientName}}
'),$templateCache.put("app/cards/photo-gallery.html",'
{{image.alt || image.title || \'Gallery Photo\'}}
{{defaultLanguage == \'ja\' ? \'閉じる\' : \'Close\'}}
{{image.index + 1}}{{totalImages ? \'/\' + totalImages : \'\'}}
'),$templateCache.put("app/cards/pi-booking-bar.html",'
Hotel
{{resort.name}}
Check In
{{checkinDate | date : "EEE\',\' M/d/yy"}}
Check Out
{{checkoutDate | date : "EEE\',\' M/d/yy"}}
Check Rates
'),$templateCache.put("app/cards/pi-breadcrumb.html",''), $templateCache.put("app/cards/pi-footer.html",'
Phoenix Inn Suites Contrast Logo
Phoenix Inn Suites
Get deals and discounts in your inbox
from Phoenix Inn Suites:
Submit
Phoenix Inn Suites on the App StorePhoenix Inn Suites on the Play Store
'),$templateCache.put("app/cards/pi-hotel-nav.html",''),$templateCache.put("app/cards/pi-resort-card.html",'
{{property.name}}
{{property.address.streetAddress}}
{{property.address.addressLocality}}, {{property.address.addressRegion}} {{property.address.postalCode}} {{property.address.addressCountry}}
{{property.aggregateRating.ratingValue}}     ({{property.aggregateRating.ratingCount}})   • {{property.priceRange ? property.priceRange : \'~$$$\'}}

{{amenity.name}}

'),$templateCache.put("app/cards/placeholder.html",""),$templateCache.put("app/cards/pop-up.html",'
close
No, thanks.  (Don\'t show me this again)No, thanks.
'),$templateCache.put("app/cards/portal-booking-bar.html",'
Reservations: {{phoneReservations}}
Online Reservations
{{resort.name}}
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
From
{{(!selectedResortDestination.priceCurrency || selectedResortDestination.priceCurrency == \'USD\') ? \'$\' : \'\'}}{{selectedResortDestination.leadRate | number:0}}
{{selectedResortDestination.priceCurrency || \'USD\'}}/Night
From {{(!selectedResortDestination.priceCurrency || selectedResortDestination.priceCurrency == \'USD\') ? \'$\' : \'\'}}{{selectedResortDestination.leadRate | number:0}} {{selectedResortDestination.priceCurrency || \'USD\'}}/Night
Check Rates
'), $templateCache.put("app/cards/raphael-footer.html",''),$templateCache.put("app/cards/regional-footer.html",'
{{clientName}}
{{clientAddress}}
{{clientBrand}} © {{currentYear}}
{{clientName}}
{{clientAddress}}
{{clientBrand}} © {{currentYear}}
{{clientName}} Offers
Looking for the latest vacation offers, news and updates from {{clientBrand}}? Click the link below!
'),$templateCache.put("app/cards/regional-property-header.html",''),$templateCache.put("app/cards/reviews.html",'
'),$templateCache.put("app/cards/rfp-contact.html",'
Name is required.
Email is required.
Message is required.
Send Message
'),$templateCache.put("app/cards/rfp-meetings.html",'

Flexible Dates:YesNo

Type of Event/Meeting

{{type.name}}
Send Request
"),$templateCache.put("app/cards/rfp-simple.html",'

Flexible Dates:YesNo

Send Request
'),$templateCache.put("app/cards/rfp-weddings.html",'

Flexible Dates:YesNo

Do you require Ceremony space? (Please select your desired choice)

{{type.name}}

Tell us a little bit about your love story and wedding! Also, any additional information you would like to learn more about.

Send Request
"),$templateCache.put("app/cards/rooms-category-type.html",''),$templateCache.put("app/cards/ruby-booking-bar.html",'
Reservations
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
Check Rates
'), $templateCache.put("app/cards/ruby-footer.html",'
'),$templateCache.put("app/cards/sapphire-footer.html",'
{{clientName}} {{clientAddress}}
{{clientPhone | tel}} Reservations: {{clientReservationsPhone}} {{clientEmail}} {{clientURL}}
Looking for the latest vacation specials, news and updates from {{clientBrand}}? Enter your email below!
{{clientBrand}} © {{currentYear}}
'),$templateCache.put("app/cards/search-bar.html",'

{{title}}

'),$templateCache.put("app/cards/shell-footer.html",'
Extra Holidays HI TAT Broker ID: TA-075-433-7792-01
'),$templateCache.put("app/cards/shilo-booking-bar.html",'
Destination
All{{destination.name}}
Suites & Hotels
{{resort.name}}
Check In
{{checkinDate | date : "EEE\',\' M/d/yy"}}
Check Out
{{checkoutDate | date : "EEE\',\' M/d/yy"}}
Adults
12345
Children
01234
Rate
PreferredAAASeniorVeteransGovernmentBest Rate
Check Rates
'),$templateCache.put("app/cards/shilo-footer.html",'
Shilo Inns Hotels
Shilo Corporate | {{::clientAddress}} | Office: +1 503-641-6565
{{::clientBrand}}
All Rights Reserved © {{::currentYear}}
'), $templateCache.put("app/cards/shilo-hotel-nav.html",''),$templateCache.put("app/cards/shilo-resort-card.html",'
{{property.name}}
{{property.address.streetAddress}} {{property.address.addressLocality}}, {{property.address.addressRegion}} {{property.address.postalCode}} {{property.address.addressCountry}}
{{property.aggregateRating.ratingValue}}     ({{property.aggregateRating.ratingCount}})   • {{property.priceRange ? property.priceRange : \'~$$$\'}}

{{amenity.name}}

'),$templateCache.put("app/cards/si-resort-card.html",'

{{property.address.streetAddress}}
{{property.address.addressLocality}}, {{property.address.addressRegion}} {{property.address.postalCode}} {{property.address.addressCountry}}
{{property.aggregateRating.ratingValue}}     ({{property.aggregateRating.ratingCount || property.aggregateRating.reviewCount}})   •  {{property.priceRange ? property.priceRange : \'~$$$\'}}
{{property.telephone | tel}}

{{amenity.name}}

Check Rates
'),$templateCache.put("app/cards/sitemap-links.html",''),$templateCache.put("app/cards/sitewide-notice.html",''),$templateCache.put("app/cards/social-links.html",''),$templateCache.put("app/cards/social-share.html",''), $templateCache.put("app/cards/translate-popup.html",'

Language Select

close
English - English
English (UK) - English (UK)
Spanish - Español
Chinese (Simplified) - 简体中文
Chinese (Traditional) - 繁體中文
German - Deutsch

Afrikaans
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bengali
Bosnian
Bulgarian
Catalan
Cebuano
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
English (UK)
Esperanto
Estonian
Filipino
Finnish
French
Frisian
Galician
Georgian
German
Greek
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Khmer
Kinyarwanda
Korean
Kurdish (Kurmanji)
Kyrgyz
Lao
Latin
Latvian
Lithuanian
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mongolian
Myanmar (Burmese)
Nepali
Norwegian
Odia (Oriya)
Pashto
Persian
Polish
Portuguese
Punjabi
Romanian
Russian
Samoan
Scots Gaelic
Serbian
Sesotho
Shona
Sindhi
Sinhala
Slovak
Slovenian
Somali
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Turkish
Turkmen
Ukrainian
Urdu
Uyghur
Uzbek
Vietnamese
Welsh
Xhosa
Yiddish
Yoruba
Zulu
No, thanks.
'),$templateCache.put("app/cards/trustyou-property-review.html",'

"{{::reviewData.summary.text}}"

{{::distribution.stars}}
{{::distribution.reviews_count}}

{{::badge.text}} – {{::badge.subtext}}

Good to Know

 {{item.text}}

Traveler Types

powered by TrustYou
'), $templateCache.put("app/cards/vh-booking-bar.html",'
Island
All{{destination.name}}
Resort
Check In
{{checkinDate | date : "MMM\' \'d"}}
Check Out
{{checkoutDate | date : "MMM\' \'d"}}
Promo
From
{{(!selectedResortDestination.priceCurrency || selectedResortDestination.priceCurrency == \'USD\') ? \'$\' : \'\'}}{{selectedResortDestination.leadRate | number:0}}
{{selectedResortDestination.priceCurrency || \'USD\'}}/Night
From {{(!selectedResortDestination.priceCurrency || selectedResortDestination.priceCurrency == \'USD\') ? \'$\' : \'\'}}{{selectedResortDestination.leadRate | number:0}} {{selectedResortDestination.priceCurrency || \'USD\'}}/Night
Check Rates
'),$templateCache.put("app/cards/vh-breadcrumb.html",''),$templateCache.put("app/cards/vh-footer.html",'
Vacation Hawaii by Extra Holidays
Seller of Travel
Hawaii TAT Broker ID #: TA-075-433-7792-01
©{{::currentYear}} Extra Holidays. All Rights Reserved.
Extra Holidays Inverse Logo
'),$templateCache.put("app/cards/write-review-dialog.html",'

Write a Review

Rating *
CancelSubmit Review
')}]),angular.module("brewervacations-app").run(["$templateCache",function($templateCache){"use strict";$templateCache.put("app/microsite/jade/404/view/404.tpl.html",'

Whoops, that page could not be found. Please try one of the links below:

'),$templateCache.put("app/microsite/jade/amenities/view/amenities.tpl.html",'

Indulge in exceptional amenities at

Indulge in exceptional amenities at

Amenities & Services at

{{::vm.h2}}

Pets Allowed

100% Smoke-Free Rooms Smoking Rooms Available

local_libraryAdult Games Room & Library

groupsBoard Room

'),$templateCache.put("app/microsite/jade/cards/view/eh-date-picker.tpl.html",'
Book This Adventure:
Check In/Out
{{checkinDate | date : "EEE\',\' M/d/yy"}} - {{checkoutDate | date : "EEE\',\' M/d/yy"}}
Check Availability
'), $templateCache.put("app/microsite/jade/cards/view/jade-booking-bar.tpl.html",'
Reservations
{{checkinDate | date : \'d\'}}
{{checkinDate | date : \'MMM yyyy\'}}
{{checkinDate | date : \'EEEE\'}}
{{checkoutDate | date : \'d\'}}
{{checkoutDate | date : \'MMM yyyy\'}}
{{checkoutDate | date : \'EEEE\'}}
12345678
01234567
From
{{(!priceCurrency || priceCurrency == \'USD\') ? \'$\' : \'\'}}{{leadRate | number:0}}
{{priceCurrency || \'USD\'}}/Night
From {{(!priceCurrency || priceCurrency == \'USD\') ? \'$\' : \'\'}}{{leadRate | number:0}} {{priceCurrency || \'USD\'}}/Night
Check Rates
'),$templateCache.put("app/microsite/jade/cards/view/jade-featured-blocks.tpl.html",""),$templateCache.put("app/microsite/jade/cards/view/jade-footer.tpl.html",'
'),$templateCache.put("app/microsite/jade/cards/view/jade-sitewide-notice.tpl.html",''),$templateCache.put("app/microsite/jade/contact/view/contact.tpl.html",'

Drop us a line today!

Drop us a line today!

Contact

{{::vm.property.schema.address.streetAddress}}, {{::vm.property.schema.address.addressLocality}}, {{vm.property.schema.address.addressRegion || vm.property.schema.address.addressCountry}} {{::vm.property.schema.address.postalCode}}{{!vm.property.schema.address.addressRegion ? \'\' : \', \'+vm.property.schema.address.addressCountry}}

'),$templateCache.put("app/microsite/jade/dining/view/dining.tpl.html",'

{{::vm.h2}}

{{::vm.h2}}

{{::vm.title}}

'),$templateCache.put("app/microsite/jade/events/view/event.tpl.html",'
{{vm.event.name}}

{{vm.event.name}}

{{vm.event.category | properCaps}}

{{vm.event.start_time | date : \'MMM d, y h:mm a\'}} – {{vm.event.end_time | date : \'MMM d, y h:mm a\'}}
Read More
View Event
Subscribe to Upcoming Eventsrss_feedClick for Latest Events
'), $templateCache.put("app/microsite/jade/events/view/events.tpl.html",'

Special events at

Special events at

Events near rss_feedClick for Latest Events

Please check again soon for the latest events from !

This Week\'s Events

{{event.name}}
{{event.place.location.city}}
{{event.start_time | date : \'MMM d, y h:mm a\'}} – {{event.end_time | date : \'MMM d, y h:mm a\'}}
Read More
View Event

Next Week\'s Events

{{event.name}}
{{event.place.location.city}}
{{event.start_time | date : \'MMM d, y h:mm a\'}} – {{event.end_time | date : \'MMM d, y h:mm a\'}}
Read More
View Event

{{(vm.thisWeekEvents.length || vm.nextWeekEvents.length) ? \'Other \' : \'\'}}Upcoming Events

{{event.name}}
{{event.place.location.city}}
{{event.start_time | date : \'MMM d, y h:mm a\'}} – {{event.end_time | date : \'MMM d, y h:mm a\'}}
Read More
View Event
'),$templateCache.put("app/microsite/jade/home/view/home.tpl.html",'

Welcome to

{{::noticeTitle}}

{{::title}}

Read More
Click to View Details{{item.title}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
Click to View Details{{item.title}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
Click to View Details{{item.name}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
View All Nearby
'), $templateCache.put("app/microsite/jade/home/view/si.home.tpl.html",'

Welcome to

{{::noticeTitle}}

{{::title}}

Read More
Click to View Details{{item.title}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
Click to View Details{{item.title}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
Click to View Details{{item.name}}
{{item.name}}
{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}
View All Nearby
'),$templateCache.put("app/microsite/jade/landingpage/view/landingpage.tpl.html",'

{{::vm.title}}

'),$templateCache.put("app/microsite/jade/location/view/location.tpl.html",'

Discover our convenient {{::vm.property.Address.locality}} location

Discover our convenient {{::vm.property.Address.locality}} location

Location

{{line}}, {{::vm.property.Address.locality}} {{::vm.property.Address.administrativeArea}} {{::vm.property.Address.postalCode}} {{::vm.property.Address.country}}

'), $templateCache.put("app/microsite/jade/meetings/view/meetings.tpl.html",'

Host your next meeting or event with

Host your next meeting or event with

Meetings and Events at

'),$templateCache.put("app/microsite/jade/nearby/view/nearby-listing.tpl.html",''),$templateCache.put("app/microsite/jade/nearby/view/nearby.tpl.html",'

Discover things to do near

Discover things to do near

Things to Do Near

{{::vm.h2}}

{{::category.name}}

{{::item.name}}
On-Site

{{::item.name}} 

{{::item.streetAddress}}, {{::item.addressLocality}}, {{::item.addressRegion}} {{::item.postalCode}}  
{{vm.getDistanceFromHotel(item) | number : 1}} mi. away  
View Details
'),$templateCache.put("app/microsite/jade/offers/view/offer-category.tpl.html",'

{{vm.currentCategory.title || vm.currentCategory.name}}

{{::vm.currentCategory.subtitle}}

All Destinations{{destination.name}} All Resorts{{hotel.name}} - {{hotel.cityState}}
ListGrid
'),$templateCache.put("app/microsite/jade/offers/view/offer.tpl.html",'

{{::vm.offer.title}}

{{::vm.offer.title}}

Read More
{{::vm.offer.price}}

Offer Details | {{::vm.offer.title}}

{{::vm.offer.cta_label || \'Check Rates\'}}
rss_feedClick for Latest Offers
'), $templateCache.put("app/microsite/jade/offers/view/offers.tpl.html",'

Special offers at

Special offers at

Offers at rss_feedClick for Latest Offers

Please check again soon for the latest offers and seasonal specials from !
{{::offer.title}}
{{::offer.price}}

{{::offer.title}}

Read More
View Details
{{::offer.cta_label || \'Check Rates\'}}
'),$templateCache.put("app/microsite/jade/photos/view/photos.tpl.html",'

View beautiful photos of

View beautiful photos of

Photo Gallery

 View the Virtual Tour
All ImagesView All
{{image.alt || image.title || (\'Gallery photo \' + ($index + 1) + \' from \' + vm.property.schema.name)}}
'),$templateCache.put("app/microsite/jade/reviews/view/reviews.tpl.html",'

Explore our ratings and reviews!

Explore our ratings and reviews!

Read Reviews

{{::vm.h2}}

 Write a Review
{{::review.title}}
by {{::review.username}} | {{::review.created}}
 
{{::review.body}}
Reply from
'),$templateCache.put("app/microsite/jade/rooms/view/room.tpl.html",'

{{vm.itemOffered.name}} from

{{vm.itemOffered.name}} from

{{vm.itemOffered.name}}

Room Amenities

View all Rooms

Capacity: {{::vm.itemOffered.occupancy.maxValue}} 

Bed Details

{{::bed.name}} Bed Icon {{::bed.numberOfBeds}} {{::bed.name}}{{bed.numberOfBeds > 1 ? \'s\' : \'\'}}

Check Rates{{vm.cta.indexOf(\'tel:\') > -1 ? \'Call to Reserve\' : \'Check Rates\'}}
'),$templateCache.put("app/microsite/jade/rooms/view/rooms.tpl.html",'

Enjoy beautiful rooms at

Enjoy beautiful rooms at

Rooms at

{{offer.itemOffered.name}}
From
{{offer.priceCurrency == \'USD\' ? \'$\' : \'\'}}{{offer.price | number:0}}
{{offer.priceCurrency || \'USD\'}}/night
{{offer.itemOffered.name}}

Room Amenities

Read More
{{vm.property.schema.brand != \'Wyndham Hotel Group\' ? \'Explore Room\' : \'View Details\'}}
{{offer.details.cta.indexOf(\'tel:\') > -1 ? \'Call to Reserve\' : \'Check Rates\'}}Check Rates
'), $templateCache.put("app/microsite/jade/sitemap/view/sitemap.tpl.html","

Explore

Explore

Sitemap

"),$templateCache.put("app/microsite/jade/stories/view/stories.tpl.html",'

{{::vm.h2}}

{{::vm.h2}}

Stories from {{::vm.currentCategory}} | Stories

{{::vm.h2}}

{{story.title}}
{{story.title}}
{{story.bodyContent}}
Read More
View story
Load More
'),$templateCache.put("app/microsite/jade/stories/view/story.tpl.html",'
{{::vm.story.title}}

{{::vm.story.title}}

{{::vm.story.subtitle}}

')}]);