1!function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function r(e,t,n){r.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function o(e,t,n){o.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function s(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function u(t,n,f,l,c,p,h){var d,g,b,m,v,y,$;if(c=c||[],d=c.slice(0),"undefined"!=typeof p){if(l&&l(d,p))return;d.push(p)}if(g=typeof t,b=typeof n,"undefined"===g)"undefined"!==b&&f(new i(d,n));else if("undefined"===b)f(new a(d,t));else if(g!==b)f(new r(d,t,n));else if(t instanceof Date&&n instanceof Date&&t-n!=0)f(new r(d,t,n));else if("object"===g&&null!==t&&null!==n){if(h=h||[],h.indexOf(t)<0){if(h.push(t),Array.isArray(t)){for(v=t.length,m=0;m<t.length;m++)m>=n.length?f(new o(d,m,new a(e,t[m]))):u(t[m],n[m],f,l,d,m,h);for(;m<n.length;)f(new o(d,m,new i(e,n[m++])))}else y=Object.keys(t),$=Object.keys(n),y.forEach(function(r){var i=$.indexOf(r);i>=0?(u(t[r],n[r],f,l,d,r,h),$=s($,i)):u(t[r],e,f,l,d,r,h)}),$.forEach(function(t){u(e,n[t],f,l,d,t,h)});h.length=h.length-1}}else t!==n&&("number"===g&&isNaN(t)&&isNaN(n)||f(new r(d,t,n)))}function f(t,n,r,i){return i=i||[],u(t,n,function(e){e&&i.push(e)},r),i.length?i:e}function l(e,t,n){if(n.path&&n.path.length){for(var r=e[t],i=n.path.length-1,a=0;a<i;a++)r=r[n.path[a]];switch(n.kind){case"A":l(r[n.path[a]],n.index,n.item);break;case"D":delete r[n.path[a]];break;case"E":case"N":r[n.path[a]]=n.rhs}}else switch(n.kind){case"A":l(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs}return e}function c(e,t,n){if(e&&t&&n&&n.kind){for(var r=e,i=-1,a=n.path.length-1;++i<a;)"undefined"==typeof r[n.path[i]]&&(r[n.path[i]]="number"==typeof n.path[i]?[]:{}),r=r[n.path[i]];switch(n.kind){case"A":l(r[n.path[i]],n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs}}}function p(e,t,n){if(n.path&&n.path.length){for(var r=e[t],i=n.path.length-1,a=0;a<i;a++)r=r[n.path[a]];switch(n.kind){case"A":p(r[n.path[a]],n.index,n.item);break;case"D":r[n.path[a]]=n.lhs;break;case"E":r[n.path[a]]=n.lhs;break;case"N":delete r[n.path[a]]}}else switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e[t]=n.lhs;break;case"E":e[t]=n.lhs;break;case"N":e=s(e,t)}return e}function h(e,t,n){if(e&&t&&n&&n.kind){for(var r=e,i=n.path.length-1,a=0;a<i;a++)"undefined"==typeof r[n.path[a]]&&(r[n.path[a]]={}),r=r[n.path[a]];switch(n.kind){case"A":p(r[n.path[a]],n.index,n.item);break;case"D":r[n.path[a]]=n.lhs;break;case"E":r[n.path[a]]=n.lhs;break;case"N":delete r[n.path[a]]}}}function d(e,t,n){if(e&&t){var r=function(r){(!n||n(e,t,r))&&c(e,t,r)};u(e,t,r)}}var g,b,m=[];g="object"==typeof global&&global?global:"undefined"!=typeof window?window:{},b=g.DeepDiff,b&&m.push(function(){"undefined"!=typeof b&&g.DeepDiff===f&&(g.DeepDiff=b,b=e)}),t(r,n),t(i,n),t(a,n),t(o,n),Object.defineProperties(f,{diff:{value:f,enumerable:!0},observableDiff:{value:u,enumerable:!0},applyDiff:{value:d,enumerable:!0},applyChange:{value:c,enumerable:!0},revertChange:{value:h,enumerable:!0},isConflict:{get:function(){return"undefined"!=typeof b},enumerable:!0},noConflict:{value:function(){return m&&(m.forEach(function(e){e()}),m=null),f},enumerable:!0}}),"undefined"!=typeof module&&module&&"object"==typeof exports&&exports&&module.exports===exports?module.exports=f:g.DeepDiff=f}(),function(e,t){"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof module&&module.exports?module.exports=t():e.UriTemplate=t
1()}(this,function(){function e(e){return encodeURI(e).replace(/%25[0-9][0-9]/g,function(e){return"%"+e.substring(3)})}function t(t){var n,a,o,s,u,f,l,c,p="";r[t.charAt(0)]&&(p=t.charAt(0),t=t.substring(1));var h="",d="",g=!0,b=!1,m=!1;"+"==p?g=!1:"."==p?(d=".",h="."):"/"==p?(d="/",h="/"):"#"==p?(d="#",g=!1):";"==p?(d=";",h=";",b=!0,m=!0):"?"==p?(d="?",h="&",b=!0):"&"==p&&(d="&",h="&",b=!0);var v=[],y=t.split(","),$=[],O={};for(n=0;n<y.length;n++){for(a=y[n],o=null,a.indexOf(":")!=-1&&(s=a.split(":"),a=s[0],o=parseInt(s[1])),u={};i[a.charAt(a.length-1)];)u[a.charAt(a.length-1)]=!0,a=a.substring(0,a.length-1);f={truncate:o,name:a,suffices:u},$.push(f),O[a]=f,v.push(a)}return l=function(t){for(var n,r,i,a,o,s="",u=0,f=0;f<$.length;f++)if(n=$[f],r=t(n.name),null==r||Array.isArray(r)&&0==r.length||"object"==typeof r&&0==Object.keys(r).length)u++;else if(s+=f==u?d:h||",",Array.isArray(r))for(b&&(s+=n.name+"="),i=0;i<r.length;i++)i>0&&(s+=n.suffices["*"]?h||",":",",n.suffices["*"]&&b&&(s+=n.name+"=")),s+=g?encodeURIComponent(r[i]).replace(/!/g,"%21"):e(r[i]);else if("object"==typeof r){b&&!n.suffices["*"]&&(s+=n.name+"="),a=!0;for(o in r)a||(s+=n.suffices["*"]?h||",":","),a=!1,s+=g?encodeURIComponent(o).replace(/!/g,"%21"):e(o),s+=n.suffices["*"]?"=":",",s+=g?encodeURIComponent(r[o]).replace(/!/g,"%21"):e(r[o])}else b&&(s+=n.name,m&&""==r||(s+="=")),null!=n.truncate&&(r=r.substring(0,n.truncate)),s+=g?encodeURIComponent(r).replace(/!/g,"%21"):e(r);return s},c=function(e,t){var n,r,i,a,o,s,u,e,f,l,c,p;if(d){if(e.substring(0,d.length)!=d)return null;e=e.substring(d.length)}if(1==$.length&&$[0].suffices["*"]){var l=$[0],c=l.name,i=l.suffices["*"]?e.split(h||","):[e],m=g&&e.indexOf("=")!=-1;for(u=1;u<i.length;u++)e=i[u],m&&e.indexOf("=")==-1&&(i[u-1]+=(h||",")+e,i.splice(u,1),u--);for(u=0;u<i.length;u++){for(e=i[u],g&&e.indexOf("=")!=-1&&(m=!0),f=e.split(","),p=0;p<f.length;p++)g&&(f[p]=decodeURIComponent(f[p]));i[u]=1==f.length?f[0]:f}if(b||m){for(n=t[c]||{},p=0;p<i.length;p++){if(r=e,"string"==typeof i[p]){var e=i[p],v=e.split("=",1)[0],e=e.substring(v.length+1);r=e}else{var e=i[p][0],v=e.split("=",1)[0],e=e.substring(v.length+1);i[p][0]=e,r=i[p]}void 0!==n[v]?Array.isArray(n[v])?n[v].push(r):n[v]=[n[v],r]:n[v]=r}t[c]=1==Object.keys(n).length&&void 0!==n[c]?n[c]:n}else t[c]=void 0!==t[c]?Array.isArray(t[c])?t[c].concat(i):[t[c]].concat(i):1!=i.length||l.suffices["*"]?i:i[0]}else{for(i=1==$.length?[e]:e.split(h||","),a={},u=0;u<i.length;u++){for(o=0;o<$.length-1&&o<u&&!$[o].suffices["*"];o++);if(o!=u){for(s=$.length-1;s>0&&$.length-s<i.length-u&&!$[s].suffices["*"];s--);$.length-s!=i.length-u?a[u]=o:a[u]=s}else a[u]=u}for(u=0;u<i.length;u++){if(e=i[u],f=e.split(","),b){var e=f[0],c=e.split("=",1)[0],e=e.substring(c.length+1);f[0]=e,l=O[c]||$[0]}else l=$[a[u]],c=l.name;for(p=0;p<f.length;p++)g&&(f[p]=decodeURIComponent(f[p]));t[c]=(b||l.suffices["*"])&&void 0!==t[c]?Array.isArray(t[c])?t[c].concat(f):[t[c]].concat(f):1!=f.length||l.suffices["*"]?f:f[0]}}},l.varNames=v,{prefix:d,substitution:l,unSubstitution:c}}function n(e){if(!(this instanceof n))return new n(e);for(var r=e.split("{"),i=[r.shift()],a=[],o=[],s=[],u=[];r.length>0;){var f=r.shift(),l=f.split("}")[0],c=f.substring(l.length+1),p=t(l);o.push(p.substitution),s.push(p.unSubstitution),a.push(p.prefix),i.push(c),u=u.concat(p.substitution.varNames)}this.fill=function(e){for(var t,n=i[0],r=0;r<o.length;r++)t=o[r],n+=t(e),n+=i[r+1];return n},this.fromUri=function(e){for(var t,n,r,o,u,f,l={},c=0;c<i.length;c++){if(t=i[c],e.substring(0,t.length)!==t)return;if(e=e.substring(t.length),c>=i.length-1){if(""==e)break;return}for(n=i[c+1],r=c;;){if(r==i.length-2){if(o=e.substring(e.length-n.length),o!==n)return;f=e.substring(0,e.length-n.length),e=o}else if(n)u=e.indexOf(n),f=e.substring(0,u),e=e.substring(u);else if(a[r+1])u=e.indexOf(a[r+1]),f=e.substring(0,u),e=e.substring(u);else{if(i.length>r+2){r++,n=i[r+1];continue}f=e,e=""}break}s[c](f,l)}return l},this.varNames=u,this.template=e}var r={"+":!0,"#":!0,".":!0,"/":!0,";":!0,"?":!0,"&":!0},i={"*":!0};return n.prototype={toString:function(){return this.template},fillFromObject:function(e){return this.fill(function(t){return e[t]})}},n}),function(e,t){"function"==typeof define&&define.amd?define(["angular","uri-templates"],t):"undefined"!=typeof module&&module.exports?module.exports=t():e.ModelFactory=t(angular,UriTemplate)}(this,function(e,t){var n=e.module("modelFactory",[]),r=e.forEach,i=e.extend,a=e.copy,o=["$$array","$save","$destroy","$pending","$rollback","$diff","$update","$commit","$copy"],s=["actions","instance","list","defaults","pk","stripTrailingSlashes","map"],u=function(t){return r(arguments,function(n){n!==t&&r(n,function(n,r){o.indexOf(r)===-1&&(t[r]?e.isArray(t[r])?t[r].concat(n.filter(function(e){var n=t[r].indexOf(e)!==-1;return n&&u(n,e),n})):e.isObject(t[r])?u(t[r],n):t[r]=n:e.isFunction(t[r])||(t[r]=n))})}),t},f=function(t,n){n=n||{},r(n,function(e,r){t.hasOwnProperty(r)||"$"===r.charAt(0)||delete n[r]});for(var i in t)t.hasOwnProperty(i)&&"$"!==i.charAt(0)&&(n[i]=e.isObject(t[i])&&!e.isArray(t[i])?f(t[i],n[i]):t[i]);return n};n.provider("$modelFactory",function(){var n=this;n.defaultOptions={prefix:"",pk:"id",stripTrailingSlashes:!0,defaults:{},map:{},actions:{base:{wrap:!0,beforeRequest:void 0,afterRequest:void 0,cache:!1},get:{method:"GET"},query:{method:"GET",isArray:!0},post:{method:"POST",invalidateCache:!0},update:{method:"PUT",invalidateCache:!0}
1,"delete":{method:"DELETE",invalidateCache:!0}},instance:{},list:{}},n.$get=["$rootScope","$http","$q","$log","$cacheFactory",function(l,c,p,h,d){function g(h,g){function b(e){e=e||[],e.forEach(function(t,n){null!==t&&void 0!==t&&(e[n]=v(t,e))});var t=e.push;return e.push=function(){for(var n=Array.prototype.slice.call(arguments),r=0;r<n.length;r++)n[r]=v(n[r],e);t.apply(e,n)},g.list&&i(e,g.list),e}function m(t){var n=this,o=[];t=t||{},r(g.defaults,function(e,n){void 0===t[n]&&(t[n]=a("function"==typeof e?e(t):e))}),r(g.map,function(e,n){e.isModelFactory?t[n]=new e(t[n]):"function"==typeof e?t[n]=e(t[n],t):(t[n]=t[e],delete t[e])}),r(g.actions,function(e,t){"$"===t[0]&&(n[t]=function(){return m.$buildRequest(t,e,n)})}),i(n,t),i(n,a(g.instance)),"function"==typeof g.init&&g.init(n),n.$save=function(){var t=Array.prototype.slice.call(arguments),r=n[g.pk]?"update":"post",i=m[r](this,t[0]||void 0),a=p.defer();return n.$pending=!0,i.then(function(t){t&&n.$update(t);var i="post"===r?"created":"updated";l.$broadcast(O+"-"+i,n),o.push(e.toJson(n)),a.resolve(n)},a.reject)["finally"](function(){n.$pending=!1}),i},n.$destroy=function(){var e=m["delete"](this),t=p.defer();return n.$pending=!0,e.then(function(){var e=n.$$array;e&&e.splice(e.indexOf(n),1),l.$broadcast(O+"-destroyed",n)},t.reject)["finally"](function(){n.$pending=!1}),e},n.$diff=function(){return DeepDiff.deep(old,n,function(e,t){return"$"===t[0]})},n.$commit=function(){return o.push(e.toJson(n)),n},n.$rollback=function(e){var t=o[e||o.length-1];return n.$update(JSON.parse(t)),n},n.$update=function(e){return f(e,n),n},n.$copy=function(){var t=e.toJson(this);return new m(e.fromJson(t))},n.$commit()}var v,y={},$=h.split("/"),O=$[$.length-1];return g=u({},a(n.defaultOptions),g),v=function(e,t){var n=e.constructor===m?e:new m(e);return n.$$array=t,n},m.$cache=d(h),r(g.actions,function(e,t){"base"!==t&&"$"!==t[0]&&(m[t]=function(){var n=Array.prototype.slice.call(arguments);return m.$buildRequest.apply(this,[t,e].concat(n))})}),m.$buildRequest=function(t,n,r,o){var s,u,f=a(g.actions.base);return i(f,a(n)),f.cache===!0&&(f.cache=m.$cache),f.method=f.method||"GET",s=g.prefix?g.prefix+"/":"",f.override?s=f.url:(s+=h,f.url&&(s+="/"+f.url),s=m.$url(s,r,f.method),("get"===t||"post"===t||"update"===t||"delete"===t)&&(s+="/{"+g.pk+"}"),"GET"===f.method&&(e.isString(r)||e.isNumber(r))?(u={},u[g.pk]=r,r=u,o&&e.isObject(o)&&(f.params=e.merge({},f.params,o))):"GET"===f.method&&e.isObject(r)?(r={param:r},s+="{?param*}"):("POST"===f.method||"PUT"===f.method||"DELETE"===f.method)&&e.isObject(r)&&o&&(f.params=e.merge({},f.params,r))),f.url=m.$url(s,r,f.method),"delete"!==t&&"DELETE"!==f.method&&(f.data=r),m.$call(f)},m.$call=function(e){var t,n=e.method+":"+e.url;return y[n]?y[n]:(t=p.defer(),y[n]=t.promise,e.data=a(e.data),e.beforeRequest&&e.beforeRequest(e),e.data=m.$strip(e.data),c(e).then(function(n){if(e.afterRequest){var r=e.afterRequest
1(n);r&&(n=r)}e.invalidateCache&&m.$cache.removeAll(),n?e.wrap?e.isArray?t.resolve(new m.List(n.data)):t.resolve(new m(n.data)):t.resolve(n.data):t.resolve()},t.reject)["finally"](function(){y[n]=void 0}),t.promise)},m.$url=function(e,n,r){var i=new t(e||h).fill(function(e){var t=n[e];return t?(("GET"===r||"param"===e)&&delete n[e],t):null});return g.stripTrailingSlashes&&(i=i.replace(/\/+$/,"")||"/"),i},m.$strip=function(e){return e&&"object"==typeof e&&r(e,function(t,n){o.indexOf(n)>-1&&delete e[n]}),e},r(g,function(e,t){s.indexOf(t)===-1&&(m[t]=e)}),b.isModelFactory=!0,m.isModelFactory=!0,m.List=b,m}return g}]})}); 2!function(e){"use strict";function t(e){var t={};if(void 0===e.selectionStart){e.focus();var a=document.selection.createRange();t.length=a.text.length,a.moveStart("character",-e.value.length),t.end=a.text.length,t.start=t.end-t.length}else t.start=e.selectionStart,t.end=e.selectionEnd,t.length=t.end-t.start;return t}function a(e,t,a){if(void 0===e.selectionStart){e.focus();var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",a),n.moveStart("character",t),n.select()}else e.selectionStart=t,e.selectionEnd=a}function n(t,a){e.each(a,function(e,n){"function"==typeof n?a[e]=n(t,a,e):"function"==typeof t.autoNumeric[n]&&(a[e]=t.autoNumeric[n](t,a,e))})}function i(e,t){"string"==typeof e[t]&&(e[t]*=1)}function r(e,t){n(e,t),t.oEvent=null,t.tagList=["b","caption","cite","code","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","ins","kdb","label","li","output","p","q","s","sample","span","strong","td","th","u","var"];var a=t.vMax.toString().split("."),r=t.vMin||0===t.vMin?t.vMin.toString().split("."):[];if(i(t,"vMax"),i(t,"vMin"),i(t,"mDec"),t.mDec="CHF"===t.mRound?"2":t.mDec,t.allowLeading=!0,t.aNeg=t.vMin<0?"-":"",a[0]=a[0].replace("-",""),r[0]=r[0].replace("-",""),t.mInt=Math.max(a[0].length,r[0].length,1),null===t.mDec){var o=0,s=0;a[1]&&(o=a[1].length),r[1]&&(s=r[1].length),t.mDec=Math.max(o,s)}null===t.altDec&&t.mDec>0&&("."===t.aDec&&","!==t.aSep?t.altDec=",":","===t.aDec&&"."!==t.aSep&&(t.altDec="."));var u=t.aNeg?"([-\\"+t.aNeg+"]?)":"(-?)";t.aNegRegAutoStrip=u,t.skipFirstAutoStrip=new RegExp(u+"[^-"+(t.aNeg?"\\"+t.aNeg:"")+"\\"+t.aDec+"\\d].*?(\\d|\\"+t.aDec+"\\d)"),t.skipLastAutoStrip=new RegExp("(\\d\\"+t.aDec+"?)[^\\"+t.aDec+"\\d]\\D*$");var l="-"+t.aNum+"\\"+t.aDec;return t.allowedAutoStrip=new RegExp("[^"+l+"]","gi"),t.numRegAutoStrip=new RegExp(u+"(?:\\"+t.aDec+"?(\\d+\\"+t.aDec+"\\d+)|(\\d*(?:\\"+t.aDec+"\\d*)?))"),t}function o(e,t,a){if(t.aSign)for(;e.indexOf(t.aSign)>-1;)e=e.replace(t.aSign,"");e=e.replace(t.skipFirstAutoStrip,"$1$2"),e=e.replace(t.skipLastAutoStrip,"$1"),e=e.replace(t.allowedAutoStrip,""),t.altDec&&(e=e.replace(t.altDec,t.aDec));var n=e.match(t.numRegAutoStrip);if(e=n?[n[1],n[2],n[3]].join(""):"",("allow"===t.lZero||"keep"===t.lZero)&&"strip"!==a){var i=[],r="";i=e.split(t.aDec),i[0].indexOf("-")!==-1&&(r="-",i[0]=i[0].replace("-","")),i[0].length>t.mInt&&"0"===i[0].charAt(0)&&(i[0]=i[0].slice(1)),e=r+i.join(t.aDec)}if(a&&"deny"===t.lZero||a&&"allow"===t.lZero&&t.allowLeading===!1){var o="^"+t.aNegRegAutoStrip+"0*(\\d"+("leading"===a?")":"|$)");o=new RegExp(o),e=e.replace(o,"$1$2")}return e}function s(e,t,a){return t=t.split(","),"set"===a||"focusout"===a?(e=e.replace("-",""),e=t[0]+e+t[1]):"get"!==a&&"focusin"!==a&&"pageLoad"!==a||e.charAt(0)!==t[0]||(e=e.replace(t[0],"-"),e=e.replace(t[1],"")),e}function u(e,t,a){if(t&&a){var n=e.split(t);n[1]&&n[1].length>a&&(a>0?(n[1]=n[1].substring(0,a),e=n.join(t)):e=n[0])}return e}function l(e,t,a){return t&&"."!==t&&(e=e.replace(t,".")),a&&"-"!==a&&(e=e.replace(a,"-")),e.match(/\d/)||(e+="0"),e}function c(e,t){if(e){var a=+e;if(a<1e-6&&a>-1)e=+e,e<1e-6&&e>0&&(e=(e+10).toString(),e=e.substring(1)),e<0&&e>-1&&(e=(e-10).toString(),e="-"+e.substring(2)),e=e.toString();else{var n=e.split(".");void 0!==n[1]&&(0===+n[1]?e=n[0]:(n[1]=n[1].replace(/0*$/,""),e=n.join(".")))}}return"keep"===t.lZero?e:e.replace(/^0*(\d)/,"$1")}function h(e,t,a){return a&&"-"!==a&&(e=e.replace("-",a)),t&&"."!==t&&(e=e.replace(".",t)),e}function p(t,a){t=o(t,a),t=u(t,a.aDec,a.mDec),t=l(t,a.aDec,a.aNeg);var n=+t;return"set"===a.oEvent&&(n<a.vMin||n>a.vMax)&&e.error("The value ("+n+") from the 'set' method falls outside of the vMin / vMax range"),n>=a.vMin&&n<=a.vMax}function g(e,t,a){return""===e||e===t.aNeg?"zero"===t.wEmpty?e+"0":"sign"===t.wEmpty||a?e+t.aSign:e:null}function d(e,t){e=o(e,t);var a=e.replace(",","."),n=g(e,t,!0);if(null!==n)return n;var i="";i=2===t.dGroup?/(\d)((\d)(\d{2}?)+)$/:4===t.dGroup?/(\d)((\d{4}?)+)$/:/(\d)((\d{3}?)+)$/;var r=e.split(t.aDec);t.altDec&&1===r.length&&(r=e.split(t.altDec));var u=r[0];if(t.aSep)for(;i.test(u);)u=u.replace(i,"$1"+t.aSep+"$2");if(0!==t.mDec&&r.length>1?(r[1].length>t.mDec&&(r[1]=r[1].substring(0,t.mDec)),e=u+t.aDec+r[1]):e=u,t.aSign){var l=e.indexOf(t.aNeg)!==-1;e=e.replace(t.aNeg,""),e="p"===t.pSign?t.aSign+e:e+t.aSign,l&&(e=t.aNeg+e)}return"set"===t.oEvent&&a<0&&null!==t.nBracket&&(e=s(e,t.nBracket,t.oEvent)),e}function f(e,t){e=""===e?"0":e.toString(),i(t,"mDec"),"CHF"===t.mRound&&
2(e=(Math.round(20*e)/20).toString());var a="",n=0,r="",o="boolean"==typeof t.aPad||null===t.aPad?t.aPad?t.mDec:0:+t.aPad,s=function(e){var t=0===o?/(\.(?:\d*[1-9])?)0*$/:1===o?/(\.\d(?:\d*[1-9])?)0*$/:new RegExp("(\\.\\d{"+o+"}(?:\\d*[1-9])?)0*$");return e=e.replace(t,"$1"),0===o&&(e=e.replace(/\.$/,"")),e};"-"===e.charAt(0)&&(r="-",e=e.replace("-","")),e.match(/^\d/)||(e="0"+e),"-"===r&&0===+e&&(r=""),(+e>0&&"keep"!==t.lZero||e.length>0&&"allow"===t.lZero)&&(e=e.replace(/^0*(\d)/,"$1"));var u=e.lastIndexOf("."),l=u===-1?e.length-1:u,c=e.length-1-l;if(c<=t.mDec){if(a=e,c<o){u===-1&&(a+=".");for(var h="000000";c<o;)h=h.substring(0,o-c),a+=h,c+=h.length}else c>o?a=s(a):0===c&&0===o&&(a=a.replace(/\.$/,""));if("CHF"!==t.mRound)return 0===+a?a:r+a;"CHF"===t.mRound&&(u=a.lastIndexOf("."),e=a)}var p=u+t.mDec,g=+e.charAt(p+1),d=e.substring(0,p+1).split(""),f="."===e.charAt(p)?e.charAt(p-1)%2:e.charAt(p)%2,v=!0;if(1!==f&&(f=0===f&&e.substring(p+2,e.length)>0?1:0),g>4&&"S"===t.mRound||g>4&&"A"===t.mRound&&""===r||g>5&&"A"===t.mRound&&"-"===r||g>5&&"s"===t.mRound||g>5&&"a"===t.mRound&&""===r||g>4&&"a"===t.mRound&&"-"===r||g>5&&"B"===t.mRound||5===g&&"B"===t.mRound&&1===f||g>0&&"C"===t.mRound&&""===r||g>0&&"F"===t.mRound&&"-"===r||g>0&&"U"===t.mRound||"CHF"===t.mRound)for(n=d.length-1;n>=0;n-=1)if("."!==d[n]){if("CHF"===t.mRound&&d[n]<=2&&v){d[n]=0,v=!1;break}if("CHF"===t.mRound&&d[n]<=7&&v){d[n]=5,v=!1;break}if("CHF"===t.mRound&&v?(d[n]=10,v=!1):d[n]=+d[n]+1,d[n]<10)break;n>0&&(d[n]="0")}return d=d.slice(0,p+1),a=s(d.join("")),0===+a?a:r+a}function v(t,a){this.settings=a,this.that=t,this.$that=e(t),this.formatted=!1,this.settingsClone=r(this.$that,this.settings),this.value=t.value}function m(t){return"string"==typeof t&&(t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),t="#"+t.replace(/(:|\.)/g,"\\$1")),e(t)}function y(e,t,a){var n=e.data("autoNumeric");n||(n={},e.data("autoNumeric",n));var i=n.holder;return(void 0===i&&t||a)&&(i=new v(e.get(0),t),n.holder=i),i}v.prototype={init:function(e){this.value=this.that.value,this.settingsClone=r(this.$that,this.settings),this.ctrlKey=e.ctrlKey,this.cmdKey=e.metaKey,this.shiftKey=e.shiftKey,this.selection=t(this.that),"keydown"!==e.type&&"keyup"!==e.type||(this.kdCode=e.keyCode),this.which=e.which,this.processed=!1,this.formatted=!1},setSelection:function(e,t,n){e=Math.max(e,0),t=Math.min(t,this.that.value.length),this.selection={start:e,end:t,length:t-e},(void 0===n||n)&&a(this.that,e,t)},setPosition:function(e,t){this.setSelection(e,e,t)},getBeforeAfter:function(){var e=this.value,t=e.substring(0,this.selection.start),a=e.substring(this.selection.end,e.length);return[t,a]},getBeforeAfterStriped:function(){var e=this.getBeforeAfter();return e[0]=o(e[0],this.settingsClone),e[1]=o(e[1],this.settingsClone),e},normalizeParts:function(e,t){var a=this.settingsClone;t=o(t,a);var n=!!t.match(/^\d/)||"leading";e=o(e,a,n),""!==e&&e!==a.aNeg||"deny"!==a.lZero||t>""&&(t=t.replace(/^0*(\d)/,"$1"));var i=e+t;if(a.aDec){var r=i.match(new RegExp("^"+a.aNegRegAutoStrip+"\\"+a.aDec));r&&(e=e.replace(r[1],r[1]+"0"),i=e+t)}return"zero"!==a.wEmpty||i!==a.aNeg&&""!==i||(e+="0"),[e,t]},setValueParts:function(e,t){var a=this.settingsClone,n=this.normalizeParts(e,t),i=n.join(""),r=n[0].length;return!!p(i,a)&&(i=u(i,a.aDec,a.mDec),r>i.length&&(r=i.length),this.value=i,this.setPosition(r,!1),!0)},signPosition:function(){var e=this.settingsClone,t=e.aSign,a=this.that;if(t){var n=t.length;if("p"===e.pSign){var i=e.aNeg&&a.value&&a.value.charAt(0)===e.aNeg;return i?[1,n+1]:[0,n]}var r=a.value.length;return[r-n,r]}return[1e3,-1]},expandSelectionOnSign:function(e){var t=this.signPosition(),a=this.selection;a.start<t[1]&&a.end>t[0]&&((a.start<t[0]||a.end>t[1])&&this.value.substring(Math.max(a.start,t[0]),Math.min(a.end,t[1])).match(/^\s*$/)?a.start<t[0]?this.setSelection(a.start,t[0],e):this.setSelection(t[1],a.end,e):this.setSelection(Math.min(a.start,t[0]),Math.max(a.end,t[1]),e))},checkPaste:function(){if(void 0!==this.valuePartsBeforePaste){var e=this.getBeforeAfter(),t=this.valuePartsBeforePaste;delete this.valuePartsBeforePaste,e[0]=e[0].substr(0,t[0].length)+o(e[0].substr(t[0].length),this.settingsClone),this.setValueParts(e[0],e[1])||(this.value=t.join(""),this.setPosition(t[0].length,!1))}},skipAllways:function(e){var t=this.kdCode,a=this.which,n=this.ctrlKey,i=this.cmdKey,r=this.shiftKey;if((n||i)&&"keyup"===e.type&&void 0!==this.valuePartsBeforePaste||r&&45===t)return this.checkPaste(),!1;if(t>=112&&t<=123||t>=91&&t<=93||t>=9&&t<=31||t<8&&(0===a||a===t)||144===t||145===t||45===t)return!0;
2if((n||i)&&65===t)return!0;if((n||i)&&(67===t||86===t||88===t))return"keydown"===e.type&&this.expandSelectionOnSign(),86!==t&&45!==t||("keydown"===e.type||"keypress"===e.type?void 0===this.valuePartsBeforePaste&&(this.valuePartsBeforePaste=this.getBeforeAfter()):this.checkPaste()),"keydown"===e.type||"keypress"===e.type||67===t;if(n||i)return!0;if(37===t||39===t){var o=this.settingsClone.aSep,s=this.selection.start,u=this.that.value;return"keydown"===e.type&&o&&!this.shiftKey&&(37===t&&u.charAt(s-2)===o?this.setPosition(s-1):39===t&&u.charAt(s+1)===o&&this.setPosition(s+1)),!0}return t>=34&&t<=40},processAllways:function(){var e;return(8===this.kdCode||46===this.kdCode)&&(this.selection.length?(this.expandSelectionOnSign(!1),e=this.getBeforeAfterStriped(),this.setValueParts(e[0],e[1])):(e=this.getBeforeAfterStriped(),8===this.kdCode?e[0]=e[0].substring(0,e[0].length-1):e[1]=e[1].substring(1,e[1].length),this.setValueParts(e[0],e[1])),!0)},processKeypress:function(){var e=this.settingsClone,t=String.fromCharCode(this.which),a=this.getBeforeAfterStriped(),n=a[0],i=a[1];return t===e.aDec||e.altDec&&t===e.altDec||("."===t||","===t)&&110===this.kdCode?!e.mDec||!e.aDec||(!!(e.aNeg&&i.indexOf(e.aNeg)>-1)||(n.indexOf(e.aDec)>-1||(i.indexOf(e.aDec)>0||(0===i.indexOf(e.aDec)&&(i=i.substr(1)),this.setValueParts(n+e.aDec,i),!0)))):"-"===t||"+"===t?!e.aNeg||(""===n&&i.indexOf(e.aNeg)>-1&&(n=e.aNeg,i=i.substring(1,i.length)),n=n.charAt(0)===e.aNeg?n.substring(1,n.length):"-"===t?e.aNeg+n:n,this.setValueParts(n,i),!0):!(t>="0"&&t<="9")||(e.aNeg&&""===n&&i.indexOf(e.aNeg)>-1&&(n=e.aNeg,i=i.substring(1,i.length)),e.vMax<=0&&e.vMin<e.vMax&&this.value.indexOf(e.aNeg)===-1&&"0"!==t&&(n=e.aNeg+n),this.setValueParts(n+t,i),!0)},formatQuick:function(){var e=this.settingsClone,t=this.getBeforeAfterStriped(),a=this.value;if((""===e.aSep||""!==e.aSep&&a.indexOf(e.aSep)===-1)&&(""===e.aSign||""!==e.aSign&&a.indexOf(e.aSign)===-1)){var n=[],i="";n=a.split(e.aDec),n[0].indexOf("-")>-1&&(i="-",n[0]=n[0].replace("-",""),t[0]=t[0].replace("-","")),n[0].length>e.mInt&&"0"===t[0].charAt(0)&&(t[0]=t[0].slice(1)),t[0]=i+t[0]}var r=d(this.value,this.settingsClone),o=r.length;if(r){var s=t[0].split(""),u=0;for(u;u<s.length;u+=1)s[u].match("\\d")||(s[u]="\\"+s[u]);var l=new RegExp("^.*?"+s.join(".*?")),c=r.match(l);c?(o=c[0].length,(0===o&&r.charAt(0)!==e.aNeg||1===o&&r.charAt(0)===e.aNeg)&&e.aSign&&"p"===e.pSign&&(o=this.settingsClone.aSign.length+("-"===r.charAt(0)?1:0))):e.aSign&&"s"===e.pSign&&(o-=e.aSign.length)}this.that.value=r,this.setPosition(o),this.formatted=!0}};var S={init:function(t){return this.each(function(){var n=e(this),i=n.data("autoNumeric"),r=n.data();if("object"==typeof i)return this;var u={aNum:"0123456789",aSep:",",dGroup:"3",aDec:".",altDec:null,aSign:"",pSign:"p",vMax:"9999999999999.99",vMin:"0.00",mDec:null,mRound:"S",aPad:!0,nBracket:null,wEmpty:"empty",lZero:"allow",aForm:!0,onSomeEvent:function(){}};if(i=e.extend({},u,r,t),i.aDec===i.aSep)return e.error("autoNumeric will not function properly when the decimal character aDec: '"+i.aDec+"' and thousand separator aSep: '"+i.aSep+"' are the same character"),this;n.data("autoNumeric",i),i.runOnce=!1;var c=y(n,i);if(e.inArray(n.prop("tagName").toLowerCase(),i.tagList)===-1&&"input"!==n.prop("tagName").toLowerCase())return e.error("The <"+n.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),this;if(i.runOnce===!1&&i.aForm){if(n.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")){var v=!0;""===n[0].value&&"empty"===i.wEmpty&&(n[0].value="",v=!1),""===n[0].value&&"sign"===i.wEmpty&&(n[0].value=i.aSign,v=!1),v&&n.autoNumeric("set",n.val())}e.inArray(n.prop("tagName").toLowerCase(),i.tagList)!==-1&&""!==n.text()&&n.autoNumeric("set",n.text())}i.runOnce=!0,n.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")&&(n.on("keydown.autoNumeric",function(t){return c=y(n),c.settings.aDec===c.settings.aSep?(e.error("autoNumeric will not function properly when the decimal character aDec: '"+c.settings.aDec+"' and thousand separator aSep: '"+c.settings.aSep+"' are the same character"),this):c.that.readOnly?(c.processed=!0,!0):(c.init(t),c.settings.oEvent="keydown",c.skipAllways(t)?(c.processed=!0,!0):c.processAllways()?(c.processed=!0,c.formatQuick(),t.preventDefault(),!1):(c.formatted=!1,!0))}),n.on("keypress.autoNumeric",function(e){var t=y(n),a=t.processed;return t.init(e),t.settings.oEvent="keypress",!!t.skipAllways(e)||(a?(e.preventDefault(),!1):t.processAllways()||t.processKeypress()?(t.formatQuick(),e.preventDefault(),!1):void(t.formatted=!1))}),n.on("keyup.autoNumeric",function(e){var t=y(n);t.init(e),t.settings.oEvent="keyup";var i=t.skipAllways(e);return t.kdCode=0,delete t.valuePartsBeforePaste,n[0].value===t.settings.aSign&&("s"===t.settings.pSign?a(this,0,0):a(this,t.settings.aSign.length,t.settings.aSign.length)),!!i||(""===this.value||void(t.formatted||t.formatQuick()))}),n.on("focusin.autoNumeric",function(){var e=y(n);if(e.settingsClone.oEvent="focusin",null!==e.settingsClone.nBracket){var t=n.val();n.val(s(t,e.settingsClone.nBracket,e.settingsClone.oEvent))}e.inVal=n.val();var i=g(e.inVal,e.settingsClone,!0);null!==i&&(n.val(i),"s"===e.settings.pSign?a(this,0,0):a(this,e.settings.aSign.length,e.settings.aSign.length))}),n.on("focusout.autoNumeric",function(){var e=y(n),t=e.settingsClone,a=n.val(),i=a;e.settingsClone.oEvent="focusout";var r="";"allow"===t.lZero&&(t.allowLeading=!1,r="leading"),""!==a&&(a=o(a,t,r),null===g(a,t)&&p(a,t,n[0])?(a=l(a,t.aDec,t.aNeg),a=f(a,t),a=h(a,t.aDec,t.aNeg)):a="");var u=g(a,t,!1);null===u&&(u=d(a,t)),u!==i&&n.val(u),u!==e.inVal&&(n.change(),delete e.inVal),null!==t.nBracket&&n.autoNumeric("get")<0&&(e.settingsClone.oEvent="focusout",n.val(s(n.val(),t.nBracket,t.oEvent)))}))})},destroy:function(){return e(this).each(function(){var t=e(this);t.off(".autoNumeric"),t.removeData("autoNumeric")})},update:function(t){return e(this).each(function(){var a=m(e(this)),n=a.data("autoNumeric");if("object"!=typeof n)return e.error("You must initialize autoNumeric('init', {options}) prior to calling the 'update' method"),this;var i=a.autoNumeric("get");return n=e.extend(n,t),y(a,n,!0),n.aDec===n.aSep?(e.error("autoNumeric will not function properly when the decimal character aDec: '"+n.aDec+"' and thousand separator aSep: '"+n.aSep+"' are the same character"),this):(a.data("autoNumeric",n),""!==a.val()||""!==a.text()?a.autoNumeric("set",i):void 0)})},set:function(t){if(null!==t)return e(this).each(function(){var a=m(e(this)),n=a.data("autoNumeric"),i=t.toString(),r=t.toString();return"object"!=typeof n?(e.error("You must initialize autoNumeric('init', {options}) prior to calling the 'set' method"),this):(r!==a.attr("value")&&"input"===a.prop("tagName").toLowerCase()&&n.runOnce===!1&&(i=null!==n.nBracket?s(a.val(),n.nBracket,"pageLoad"):i,i=o(i,n)),r!==a.attr("value")&&r!==a.text()||n.runOnce!==!1||(i=i.replace(",",".")),e.isNumeric(+i)?(i=c(i,n),n.oEvent="set",i.toString(),""!==i&&(i=f(i,n)),i=h(i,n.aDec,n.aNeg),p(i,n)||(i=f("",n)),i=d(i,n),a.is("input[type=text], input[type=hidden], input[type=tel], input
2:not([type])")?a.val(i):e.inArray(a.prop("tagName").toLowerCase(),n.tagList)!==-1?a.text(i):(e.error("The <"+a.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),!1)):"")})},get:function(){var t=m(e(this)),a=t.data("autoNumeric");if("object"!=typeof a)return e.error("You must initialize autoNumeric('init', {options}) prior to calling the 'get' method"),this;a.oEvent="get";var n="";if(t.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])"))n=t.eq(0).val();else{if(e.inArray(t.prop("tagName").toLowerCase(),a.tagList)===-1)return e.error("The <"+t.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),!1;n=t.eq(0).text()}return""===n&&"empty"===a.wEmpty||n===a.aSign&&("sign"===a.wEmpty||"empty"===a.wEmpty)?"":(null!==a.nBracket&&""!==n&&(n=s(n,a.nBracket,a.oEvent)),(a.runOnce||a.aForm===!1)&&(n=o(n,a)),n=l(n,a.aDec,a.aNeg),0===+n&&"keep"!==a.lZero&&(n="0"),"keep"===a.lZero?n:n=c(n,a))},getString:function(){var t=!1,a=m(e(this)),n=a.serialize(),i=n.split("&"),r=e("form").index(a),o=0;for(o;o<i.length;o+=1){var s=i[o].split("="),u=e("form:eq("+r+') input[name="'+decodeURIComponent(s[0])+'"]'),l=u.data("autoNumeric");"object"==typeof l&&null!==s[1]&&(s[1]=u.autoNumeric("get"),i[o]=s.join("="),t=!0)}return t===!0?i.join("&"):n},getArray:function(){var t=!1,a=m(e(this)),n=a.serializeArray(),i=e("form").index(a);return e.each(n,function(a,n){var r=e("form:eq("+i+') input[name="'+decodeURIComponent(n.name)+'"]'),o=r.data("autoNumeric");"object"==typeof o&&(""!==n.value&&(n.value=r.autoNumeric("get").toString()),t=!0)}),t===!0?n:this},getSettings:function(){var t=m(e(this));return t.eq(0).data("autoNumeric")}};e.fn.autoNumeric=function(t){return S[t]?S[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error('Method "'+t+'" is not supported by autoNumeric()'):S.init.apply(this,arguments)}}(jQuery); 3!function(t){function e(e){try{t.module(e)}catch(n){return!1}return!0}function n(t,n,o){if(o.blockBrowserNavigation){var c=function(){t.$on("$locationChangeStart",function(t){n.$_blockLocationChange&&n.state().blockCount>0&&t.preventDefault()}),t.$on("$locationChangeSuccess",function(){n.$_blockLocationChange=o.blockBrowserNavigation})};if(e("ngRoute"))var r=t.$on("$viewContentLoaded",function(){r(),c()});else c()}}var o=t.module("blockUI",[]);o.config(["$provide","$httpProvider",function(t,e){t.decorator("$exceptionHandler",["$delegate","$injector",function(t,e){var n,o;return function(c,r){if(o=o||e.get("blockUIConfig"),o.resetOnException)try{n=n||e.get("blockUI"),n.instances.reset()}catch(i){console.log("$exceptionHandler",c)}t(c,r)}}]),e.interceptors.push("blockUIHttpInterceptor")}]),o.run(["$document","blockUIConfig","$templateCache",function(t,e,n){e.autoInjectBodyBlock&&t.find("body").attr("block-ui","main"),e.template&&(e.templateUrl="$$block-ui-template$$",n.put(e.templateUrl,e.template))}]),o.config(["$provide",function(t){t.decorator("$location",c)}]);var c=["$delegate","blockUI","blockUIConfig",function(e,n,o){if(o.blockBrowserNavigation){n.$_blockLocationChange=!0;var c=["url","path","search","hash","state"],r=function(t){var o=e[t];e[t]=function(){var t=o.apply(e,arguments);return t===e&&(n.$_blockLocationChange=!1),t}};t.forEach(c,r)}return e}];o.directive("blockUiContainer",["blockUIConfig","blockUiContainerLinkFn",function(t,e){return{scope:!0,restrict:"A",templateUrl:t.templateUrl,compile:function(t){return e}}}]).factory("blockUiContainerLinkFn",["blockUI","blockUIUtils",function(t,e){return function(t,e,n){var o=e.inheritedData("block-ui");if(!o)throw new Error("No parent block-ui service instance located.");t.state=o.state()}}]),o.directive("blockUi",["blockUiCompileFn",function(t){return{scope:!0,restrict:"A",compile:t}}]).factory("blockUiCompileFn",["blockUiPreLinkFn",function(t){return function(e,n){return e.append('<div block-ui-container class="block-ui-container"></div>'),{pre:t}}}]).factory("blockUiPreLinkFn",["blockUI","blockUIUtils","blockUIConfig",function(t,e,o){return function(c,r,i){r.hasClass("block-ui")||r.addClass(o.cssClass),i.$observe("blockUiMessageClass",function(t){c.$_blockUiMessageClass=t});var a=i.blockUi||"_"+c.$id,l=t.instances.get(a);if("main"===a)n(c,l,o);else{var s=r.inheritedData("block-ui");s&&(l._parent=s)}c.$on("$destroy",function(){l.release()}),l.addRef(),c.$_blockUiState=l.state(),c.$watch("$_blockUiState.blocking",function(t){r.attr("aria-busy",!!t),r.toggleClass("block-ui-visible",!!t)}),c.$watch("$_blockUiState.blockCount > 0",function(t){r.toggleClass("block-ui-active",!!t)});var u=i.blockUiPattern;if(u){var f=e.buildRegExp(u);l.pattern(f)}r.data("block-ui",l)}}]),o.constant("blockUIConfig",{templateUrl:"angular-block-ui/angular-block-ui.ng.html",delay:250,message:"Loading ...",autoBlock:!0,resetOnException:!0,requestFilter:t.noop,autoInjectBodyBlock:!0,cssClass:"block-ui block-ui-anim-fade",blockBrowserNavigation:!1}),o.factory("blockUIHttpInterceptor",["$q","$injector","blockUIConfig","$templateCache",function(t,e,n,o){function c(){a=a||e.get("blockUI")}function r(t){n.autoBlock&&t&&!t.$_noBlock&&t.$_blocks&&(c(),t.$_blocks.stop())}function i(e){try{r(e.config)}catch(n){console.log("httpRequestError",n)}return t.reject(e)}var a;return{request:function(t){if(n.autoBlock&&("GET"!=t.method||!o.get(t.url))){var e=n.requestFilter(t);e===!1?t.$_noBlock=!0:(c(),t.$_blocks=a.instances.locate(t),t.$_blocks.start(e))}return t},requestError:i,response:function(t){return t&&r(t.config),t},responseError:i}}]),o.factory("blockUI",["blockUIConfig","$timeout","blockUIUtils","$document",function(e,n,o,
3c){function r(r){var a,s=this,u={id:r,blockCount:0,message:e.message,blocking:!1},f=[];this._id=r,this._refs=0,this.start=function(r){r=u.blockCount>0?r||u.message||e.message:r||e.message,u.message=r,u.blockCount++;var i=t.element(c[0].activeElement);i.length&&o.isElementInBlockScope(i,s)&&(s._restoreFocus=i[0],n(function(){s._restoreFocus&&s._restoreFocus.blur()})),a||(a=n(function(){a=null,u.blocking=!0},e.delay))},this._cancelStartTimeout=function(){a&&(n.cancel(a),a=null)},this.stop=function(){u.blockCount=Math.max(0,--u.blockCount),0===u.blockCount&&s.reset(!0)},this.message=function(t){u.message=t},this.pattern=function(t){return void 0!==t&&(s._pattern=t),s._pattern},this.reset=function(e){s._cancelStartTimeout(),u.blockCount=0,u.blocking=!1,!s._restoreFocus||c[0].activeElement&&c[0].activeElement!==i[0]||(s._restoreFocus.focus(),s._restoreFocus=null);try{e&&t.forEach(f,function(t){t()})}finally{f.length=0}},this.done=function(t){f.push(t)},this.state=function(){return u},this.addRef=function(){s._refs+=1},this.release=function(){--s._refs<=0&&l.instances._destroy(s)}}var i=c.find("body"),a=[];a.get=function(t){if(!isNaN(t))throw new Error("BlockUI id cannot be a number");var e=a[t];return e||(e=a[t]=new r(t),a.push(e)),e},a._destroy=function(e){if(t.isString(e)&&(e=a[e]),e){e.reset();var n=o.indexOf(a,e);a.splice(n,1),delete a[e.state().id]}},a.locate=function(t){var e=[];o.forEachFnHook(e,"start"),o.forEachFnHook(e,"stop");for(var n=a.length;n--;){var c=a[n],r=c._pattern;r&&r.test(t.url)&&e.push(c)}return 0===e.length&&e.push(l),e},o.forEachFnHook(a,"reset");var l=a.get("main");return l.addRef(),l.instances=a,l}]),o.factory("blockUIUtils",function(){var e=t.element,n={buildRegExp:function(t){var e,n=t.match(/^\/(.*)\/([gim]*)$/);if(!n)throw Error("Incorrect regular expression format: "+t);return e=new RegExp(n[1],n[2])},forEachFn:function(t,e,n){for(var o=t.length;o--;){var c=t[o];c[e].apply(c,n)}},forEachFnHook:function(t,e){t[e]=function(){n.forEachFn(this,e,arguments)}},isElementInBlockScope:function(t,e){for(var n=t.inheritedData("block-ui");n;){if(n===e)return!0;n=n._parent}return!1},findElement:function(t,o,c){var r=null;if(o(t))r=t;else{var i;i=c?t.parent():t.children();for(var a=i.length;!r&&a--;)r=n.findElement(e(i[a]),o,c)}return r},indexOf:function(t,e,n){for(var o=n||0,c=t.length;o<c;o++)if(t[o]===e)return o;return-1}};return n}),t.module("blockUI").run(["$templateCache",function(t){t.put("angular-block-ui/angular-block-ui.ng.html",'<div class="block-ui-overlay"></div><div class="block-ui-message-container" aria-live="assertive" aria-atomic="true"><div class="block-ui-message" ng-class="$_blockUiMessageClass">{{ state.message }}</div></div>')}])}(angular); 4!function(t,i){"object"==typeof exports?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Spinner=i()}(this,function(){"use strict";function t(t,i){var e,o=document.createElement(t||"div");for(e in i)o[e]=i[e];return o}function i(t){for(var i=1,e=arguments.length;e>i;i++)t.appendChild(arguments[i]);return t}function e(t,i,e,o){var n=["opacity",i,~~(100*t),e,o].join("-"),r=.01+e/o*100,s=Math.max(1-(1-t)/i*(100-r),t),a=c.substring(0,c.indexOf("Animation")).toLowerCase(),l=a&&"-"+a+"-"||"";return p[n]||(u.insertRule("@"+l+"keyframes "+n+"{0%{opacity:"+s+"}"+r+"%{opacity:"+t+"}"+(r+.01)+"%{opacity:1}"+(r+i)%100+"%{opacity:"+t+"}100%{opacity:"+s+"}}",u.cssRules.length),p[n]=1),n}function o(t,i){var e,o,n=t.style;for(i=i.charAt(0).toUpperCase()+i.slice(1),o=0;o<d.length;o++)if(e=d[o]+i,void 0!==n[e])return e;return void 0!==n[i]?i:void 0}function n(t,i){for(var e in i)t.style[o(t,e)||e]=i[e];return t}function r(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var o in e)void 0===t[o]&&(t[o]=e[o])}return t}function s(t,i){return"string"==typeof t?t:t[i%t.length]}function a(t){this.opts=r(t||{},a.defaults,f)}function l(){function e(i,e){return t("<"+i+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}u.addRule(".spin-vml","behavior:url(#default#VML)"),a.prototype.lines=function(t,o){function r(){return n(e("group",{coordsize:d+" "+d,coordorigin:-c+" "+-c}),{width:d,height:d})}function a(t,a,l){i(u,i(n(r(),{rotation:360/o.lines*t+"deg",left:~~a}),i(n(e("roundrect",{arcsize:o.corners}),{width:c,height:o.width,left:o.radius,top:-o.width>>1,filter:l}),e("fill",{color:s(o.color,t),opacity:o.opacity}),e("stroke",{opacity:0}
4))))}var l,c=o.length+o.width,d=2*c,p=2*-(o.width+o.length)+"px",u=n(r(),{position:"absolute",top:p,left:p});if(o.shadow)for(l=1;l<=o.lines;l++)a(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=o.lines;l++)a(l);return i(t,u)},a.prototype.opacity=function(t,i,e,o){var n=t.firstChild;o=o.shadow&&o.lines||0,n&&i+o<n.childNodes.length&&(n=n.childNodes[i+o],n=n&&n.firstChild,n=n&&n.firstChild,n&&(n.opacity=e))}}var c,d=["webkit","Moz","ms","O"],p={},u=function(){var e=t("style",{type:"text/css"});return i(document.getElementsByTagName("head")[0],e),e.sheet||e.styleSheet}(),f={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};a.defaults={},r(a.prototype,{spin:function(i){this.stop();var e=this,o=e.opts,r=e.el=n(t(0,{className:o.className}),{position:o.position,width:0,zIndex:o.zIndex});if(o.radius+o.length+o.width,n(r,{left:o.left,top:o.top}),i&&i.insertBefore(r,i.firstChild||null),r.setAttribute("role","progressbar"),e.lines(r,e.opts),!c){var s,a=0,l=(o.lines-1)*(1-o.direction)/2,d=o.fps,p=d/o.speed,u=(1-o.opacity)/(p*o.trail/100),f=p/o.lines;!function h(){a++;for(var t=0;t<o.lines;t++)s=Math.max(1-(a+(o.lines-t)*f)%p*u,o.opacity),e.opacity(r,t*o.direction+l,s,o);e.timeout=e.el&&setTimeout(h,~~(1e3/d))}()}return e},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(o,r){function a(i,e){return n(t(),{position:"absolute",width:r.length+r.width+"px",height:r.width+"px",background:i,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/r.lines*d+r.rotate)+"deg) translate("+r.radius+"px,0)",borderRadius:(r.corners*r.width>>1)+"px"})}for(var l,d=0,p=(r.lines-1)*(1-r.direction)/2;d<r.lines;d++)l=n(t(),{position:"absolute",top:1+~(r.width/2)+"px",transform:r.hwaccel?"translate3d(0,0,0)":"",opacity:r.opacity,animation:c&&e(r.opacity,r.trail,p+d*r.direction,r.lines)+" "+1/r.speed+"s linear infinite"}),r.shadow&&i(l,n(a("#000","0 0 4px #000"),{top:"2px"})),i(o,i(l,a(s(r.color,d),"0 0 1px rgba(0,0,0,.1)")));return o},opacity:function(t,i,e){i<t.childNodes.length&&(t.childNodes[i].style.opacity=e)}});var h=n(t("group"),{behavior:"url(#default#VML)"});return!o(h,"transform")&&h.adj?l():c=o(h,"animation"),a}); 5!function(n){"use strict";function i(n,i){return n.module("angularSpinner",[]).provider("usSpinnerConfig",function(){var n={};return{setDefaults:function(i){n=i||n},$get:function(){return{config:n}}}}).factory("usSpinnerService",["$rootScope",function(n){var i={};return i.spin=function(i){n.$broadcast("us-spinner:spin",i)},i.stop=function(i){n.$broadcast("us-spinner:stop",i)},i}]).directive("usSpinner",["$window","usSpinnerConfig",function(e,t){return{scope:!0,link:function(r,s,o){function p(){r.spinner&&r.spinner.stop()}var u=i||e.Spinner;r.spinner=null,r.key=!!n.isDefined(o.spinnerKey)&&o.spinnerKey,r.startActive=n.isDefined(o.spinnerStartActive)?r.$eval(o.spinnerStartActive):!r.key,r.spin=function(){r.spinner&&r.spinner.spin(s[0])},r.stop=function(){r.startActive=!1,p()},r.$watch(o.usSpinner,function(n){p(),n=n||{};for(var i in t.config)void 0===n[i]&&(n[i]=t.config[i]);r.spinner=new u(n),(!r.key||r.startActive)&&r.spinner.spin(s[0])},!0),r.$on("us-spinner:spin",function(n,i){i===r.key&&r.spin()}),r.$on("us-spinner:stop",function(n,i){i===r.key&&r.stop()}),r.$on("$destroy",function(){r.stop(),r.spinner=null})}}}])}"function"==typeof define&&define.amd?define(["angular","spin"],i):i(n.angular)}(window); 6!function(e,t,r){"use strict";function n(e){var r=[];return l(r,t.noop).chars(e),r.join("")}function a(e,r){var n,a={},i=e.split(",");for(n=0;n<i.length;n++)a[r?t.lowercase(i[n]):i[n]]=!0;return a}function i(e,r){function n(e,n,i,o){if(n=t.lowercase(n),w[n])for(;b.last()&&z[b.last()];)a("",b.last());v[n]&&b.last()==n&&a("",n),(o=y[n]||!!o)||b.push(n);var l={};i.replace(h,function(e,t,r,n,a){l[t]=s(r||n||a||"")}),r.start&&r.start(n,l,o)}function a(e,n){var a,i=0;if(n=t.lowercase(n))for(i=b.length-1;0<=i&&b[i]!=n;i--);if(0<=i){for(a=b.length-1;a>=i;a--)r.end&&r.end(b[a]);b.length=i}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var i,o,l,b=[],k=e;for(b.last=function(){return b[b.length-1]};e;){if(l="",o=!0,b.last()&&$[b.last()]?(e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+b.last()+"[^>]*>","i"),function(e,t){return t=t.replace(f,"$1").replace(x,"$1"),r.chars&&r.chars(s(t)),""}),a("",b.last())):(0===e.indexOf("<!--")?(i=e.indexOf("--",4),0<=i&&e.lastIndexOf("-->",i)===i&&(r.comment&&r.comment(e.substring(4,i)),e=e.substring(i+3),o=!1)):m.test(e)?(i=e.match(m))&&(e=e.replace(i[0],""),o=!1):g.test(e)?(i=e.match(p))&&(e=e.substring(i[0].length),i[0].replace(p,a),o=!1):d.test(e)&&((i=e.match(u))?(i[4]&&(e=e.substring(i[0].length),i[0].replace(u,n)),o=!1):(l+="<",e=e.substring(1))),o&&(i=e.indexOf("<"),l+=0>i?e:e.substring(0,i),e=0>i?"":e.substring(i),r.chars&&r.chars(s(l)))),e==k)throw c("badparse",e);k=e}a()}function s(e){return e?(E.innerHTML=e.replace(/</g,"<"),E.textContent):""}function o(e){return e.replace(/&/g,"&").replace(b,function(e){var t=e.charCodeAt(0);return e=e.charCodeAt(1),"&#"+(1024*(t-55296)+(e-56320)+65536)+";"}).replace(k,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function l(e,r){var n=!1,a=t.bind(e,e.push);return{start:function(e,i,s){e=t.lowercase(e),!n&&$[e]&&(n=e),n||!0!==A[e]||(a("<"),a(e),t.forEach(i,function(n,i){var s=t.lowercase(i),l="img"===e&&"src"===s||"background"===s;!0!==D[s]||!0===C[s]&&!r(n,l)||(a(" "),a(i),a('="'),a(o(n)),a('"'))}),a(s?"/>":">"))},end:function(e){e=t.lowercase(e),n||!0!==A[e]||(a("</"),a(e),a(">")),e==n&&(n=!1)},chars:function(e){n||a(o(e))}}}var c=t.$$minErr("$sanitize"),u=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,p=/^<\/\s*([\w:-]+)[^>]*>/,h=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,d=/^</,g=/^<\//,f=/\x3c!--(.*?)--\x3e/g,m=/<!DOCTYPE([^>]*?)>/i,x=/<!\[CDATA\[(.*?)]]\x3e/g,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,k=/([^\#-~| |!])/g,y=a("area,br,col,hr,img,wbr");e=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=a("rp,rt");var v=t.extend({},r,e),w=t.extend({},e,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),z=t.extend({},r,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));e=a("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var $=a("script,style"),A=t.extend({},y,w,z,v,e),C=a("background,cite,href,longdesc,src,usemap,xlink:href");e=a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,c
6olspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),r=a("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode
6-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0);var D=t.extend({},C,r,e),E=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(e){return function(t){var r=[];return i(t,l(r,function(t,r){return!/^unsafe/.test(e(t,r))})),r.join("")}}]}),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var r=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/,a=/^mailto:/;return function(i,s){function o(e){e&&d.push(n(e))}function l(e,r){d.push("<a "),t.isDefined(s)&&d.push('target="',s,'" '),d.push('href="',e.replace(/"/g,"""),'">'),o(r),d.push("</a>")}if(!i)return i;for(var c,u,p,h=i,d=[];c=h.match(r);)u=c[0],c[2]||c[4]||(u=(c[3]?"http://":"mailto:")+u),p=c.index,o(h.substr(0,p)),l(u,c[0].replace(a,"")),h=h.substring(p+c[0].length);return o(h),e(d.join(""))}}])}(window,window.angular); 7!function(){var e=function(e,t,n){var o=e,r=t||0,a=0;this.getRawData=function(){return o},"string"==typeof e?(a=n||o.length,this.getByteAt=function(e){return 255&o.charCodeAt(e+r)},this.getBytesAt=function(e,t){for(var n=[],a=0;a<t;a++)n[a]=255&o.charCodeAt(e+a+r);return n}):"unknown"==typeof e&&(a=n||IEBinary_getLength(o),this.getByteAt=function(e){return IEBinary_getByteAt(o,e+r)},this.getBytesAt=function(e,t){return new VBArray(IEBinary_getBytesAt(o,e+r,t)).toArray()}),this.getLength=function(){return a},this.getSByteAt=function(e){var t=this.getByteAt(e);return t>127?t-256:t},this.getShortAt=function(e,t){var n=t?(this.getByteAt(e)<<8)+this.getByteAt(e+1):(this.getByteAt(e+1)<<8)+this.getByteAt(e);return n<0&&(n+=65536),n}
7,this.getSShortAt=function(e,t){var n=this.getShortAt(e,t);return n>32767?n-65536:n},this.getLongAt=function(e,t){var n=this.getByteAt(e),o=this.getByteAt(e+1),r=this.getByteAt(e+2),a=this.getByteAt(e+3),i=t?(((n<<8)+o<<8)+r<<8)+a:(((a<<8)+r<<8)+o<<8)+n;return i<0&&(i+=4294967296),i},this.getSLongAt=function(e,t){var n=this.getLongAt(e,t);return n>2147483647?n-4294967296:n},this.getStringAt=function(e,t){for(var n=[],o=this.getBytesAt(e,t),r=0;r<t;r++)n[r]=String.fromCharCode(o[r]);return n.join("")},this.getCharAt=function(e){return String.fromCharCode(this.getByteAt(e))},this.toBase64=function(){return window.btoa(o)},this.fromBase64=function(e){o=window.atob(e)}},t=function(){function e(e){return!!e.exifdata}function t(e,t){BinaryAjax(e.src,function(o){var r=n(o.binaryResponse);e.exifdata=r||{},t&&t.call(e)})}function n(e){if(255!=e.getByteAt(0)||216!=e.getByteAt(1))return!1;for(var t,n=2,o=e.getLength();n<o;){if(255!=e.getByteAt(n))return d&&console.log("Not a valid marker at offset "+n+", found: "+e.getByteAt(n)),!1;if(t=e.getByteAt(n+1),22400==t)return d&&console.log("Found 0xFFE1 marker"),a(e,n+4,e.getShortAt(n+2,!0)-2);if(225==t)return d&&console.log("Found 0xFFE1 marker"),a(e,n+4,e.getShortAt(n+2,!0)-2);n+=2+e.getShortAt(n+2,!0)}}function o(e,t,n,o,a){var i,s,u,c=e.getShortAt(n,a),h={};for(u=0;u<c;u++)i=n+12*u+2,s=o[e.getShortAt(i,a)],!s&&d&&console.log("Unknown tag: "+e.getShortAt(i,a)),h[s]=r(e,i,t,n,a);return h}function r(e,t,n,o,r){var a,i,s,u,c,h,d=e.getShortAt(t+2,r),l=e.getLongAt(t+4,r),g=e.getLongAt(t+8,r)+n;switch(d){case 1:case 7:if(1==l)return e.getByteAt(t+8,r);for(a=l>4?g:t+8,i=[],u=0;u<l;u++)i[u]=e.getByteAt(a+u);return i;case 2:return a=l>4?g:t+8,e.getStringAt(a,l-1);case 3:if(1==l)return e.getShortAt(t+8,r);for(a=l>2?g:t+8,i=[],u=0;u<l;u++)i[u]=e.getShortAt(a+2*u,r);return i;case 4:if(1==l)return e.getLongAt(t+8,r);i=[];for(var u=0;u<l;u++)i[u]=e.getLongAt(g+4*u,r);return i;case 5:if(1==l)return c=e.getLongAt(g,r),h=e.getLongAt(g+4,r),s=new Number(c/h),s.numerator=c,s.denominator=h,s;for(i=[],u=0;u<l;u++)c=e.getLongAt(g+8*u,r),h=e.getLongAt(g+4+8*u,r),i[u]=new Number(c/h),i[u].numerator=c,i[u].denominator=h;return i;case 9:if(1==l)return e.getSLongAt(t+8,r);for(i=[],u=0;u<l;u++)i[u]=e.getSLongAt(g+4*u,r);return i;case 10:if(1==l)return e.getSLongAt(g,r)/e.getSLongAt(g+4,r);for(i=[],u=0;u<l;u++)i[u]=e.getSLongAt(g+8*u,r)/e.getSLongAt(g+4+8*u,r);return i}}function a(e,t){if("Exif"!=e.getStringAt(t,4))return d&&console.log("Not valid EXIF data! "+e.getStringAt(t,4)),!1;var n,r,a,i,s,u=t+6;if(18761==e.getShortAt(u))n=!1;else{if(19789!=e.getShortAt(u))return d&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;n=!0}if(42!=e.getShortAt(u+2,n))return d&&console.log("Not valid TIFF data! (no 0x002A)"),!1;if(8!=e.getLongAt(u+4,n))return d&&console.log("Not valid TIFF data! (First offset not 8)",e.getShortAt(u+4,n)),!1;if(r=o(e,u,u+8,g,n),r.ExifIFDPointer){i=o(e,u,u+r.ExifIFDPointer,l,n);for(a in i){switch(a){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":i[a]=f[a][i[a]];break;case"ExifVersion":case"FlashpixVersion":i[a]=String.fromCharCode(i[a][0],i[a][1],i[a][2],i[a][3]);break;case"ComponentsConfiguration":i[a]=f.Components[i[a][0]]+f.Components[i[a][1]]+f.Components[i[a][2]]+f.Components[i[a][3]]}r[a]=i[a]}}if(r.GPSInfoIFDPointer){s=o(e,u,u+r.GPSInfoIFDPointer,p,n);for(a in s){switch(a){case"GPSVersionID":s[a]=s[a][0]+"."+s[a][1]+"."+s[a][2]+"."+s[a][3]}r[a]=s[a]}}return r}function i(n,o){return!!n.complete&&(e(n)?o&&o.call(n):t(n,o),!0)}function s(t,n){if(e(t))return t.exifdata[n]}function u(t){if(!e(t))return{};var n,o=t.exifdata,r={};for(n in o)o.hasOwnProperty(n)&&(r[n]=o[n]);return r}function c(t){if(!e(t))return"";var n,o=t.exifdata,r="";for(n in o)o.hasOwnProperty(n)&&(r+="object"==typeof o[n]?o[n]instanceof Number?n+" : "+o[n]+" ["+o[n].numerator+"/"+o[n].denominator+"]\r\n":n+" : ["+o[n].length+" values]\r\n":n+" : "+o[n]+"\r\n");return r}function h(e){return n(e)}var d=!1,l={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",3738
70:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},g={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},p={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},f={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};return{readFromBinaryFile:h,pretty:c,getTag:s,getAllTags:u,getData:i,Tags:l,TiffTags:g,GPSTags:p,StringValues:f}}();angular.module("ImageCropper",[]).directive("imageCrop",["$q",function(n){return{template:'<div id="image-crop-{{ rand }}" class="ng-image-crop ng-image-crop--{{ shape }}" ng-style="moduleStyles"><section ng-style="sectionStyles" ng-show="step==1"></section><section ng-style="sectionStyles" ng-show="step==2"><canvas class="cropping-canvas" width="{{ canvasWidth }}" height="{{ canvasHeight }}" ng-mousemove="onCanvasMouseMove($event)" ng-mousedown="onCanvasMouseDown($event)"></canvas><div ng-style="croppingGuideStyles" class="cropping-guide"></div><div class="zoom-handle" ng-mousemove="onHandleMouseMove($event)" ng-mousedown="onHandleMouseDown($event)" ng-mouseup="onHandleMouseUp($event)"><span>← zoom →</span></div></section><section ng-style="sectionStyles" class="image-crop-section-final" ng-show="step==3"><img class="image-crop-final" ng-src="{{ croppedDataUri }}" /></section></div>',replace:!0,restrict:"AE",scope:{crop:"=",width:"@",height:"@",shape:"@",src:"=",resultBlob:"=",result:"=",step:"=",padding:"@",maxSize:"@"},link:function(o,r,a){function i(e){return n(function(t,n){if(!z)return t(e);var o=new Image;o.src=e,o.onload=function(){var n=o.height,r=o.width;if(n<=z&&r<=z)return t(e);var a=r/n;a>1?(r=z,n=z/a):(r=z*a,n=z),r=Math.round(r),n=Math.round(n);var i=document.createElement("canvas");i.width=r,i.height=n;var s=i.getContext("2d");s.drawImage(o,0,0,o.width,o.height,0,0,i.width,i.height),s.save();var u=i.toDataURL();t(u)}})}function s(e,t){return n(function(n,o){var r=new Image;r.src=e,r.onload=function(){var e=document.createElement("canvas");t.Orientation>=5?(e.width=r.height,e.height=r.width):(e.width=r.width,e.height=r.height);var o=e.getContext("2d");switch(t.Orientation){case 1:break;case 2:o.translate(r.width,0),o.scale(-1,1);break;case 3:o.translate(r.width,r.height),o.rotate(Math.PI);break;
7case 4:o.translate(0,r.height),o.scale(1,-1);break;case 5:o.rotate(.5*Math.PI),o.scale(1,-1);break;case 6:o.rotate(.5*Math.PI),o.translate(0,-r.height);break;case 7:o.rotate(.5*Math.PI),o.translate(r.width,-r.height),o.scale(-1,1);break;case 8:o.rotate(-.5*Math.PI),o.translate(-r.width,0)}o.drawImage(r,0,0),o.save();var a=e.toDataURL();n(a)}})}function u(n){var o=atob(n.split(",")[1]),r=new e(o,0,o.length);_=t.readFromBinaryFile(r),i(n).then(function(e){return _&&_.Orientation&&_.Orientation>1?s(e,_):e}).then(function(e){M.src=e})["catch"](function(e){console.log(e)})}function c(){J=[],k=1,I=0,x=0,b=!1,G=0,E=0,R=!1,K.clearRect(0,0,w.width,w.height),M.src=""}function h(e,t){return e=e<X?X:e,e=e>V?V:e,t=t<$?$:t,t=t>j?j:t,H=e,N=t,K.clearRect(0,0,w.width,w.height),K.drawImage(M,e,t,T,U),e==X||e==V||t==$||t==j}function d(e){return Math.round(1e3*e)/1e3}function l(){X=w.width-M.width*k-v/2,$=w.height-M.height*k-v/2}function g(e){if(e){var t=d(k+e);if(!(t<Y||t>W)){k=t,l(),T=M.width*k,U=M.height*k;var n=I*k,o=x*k;n<X?n=X:n>V&&(n=V),o<$?o=$:o>j&&(o=j),K.clearRect(0,0,w.width,w.height),K.drawImage(M,n,o,T,U)}}}function p(e,t){var n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),o=d(n/O),r=d((W-Y)*o*q);return e>0?-r:r}function f(e){var t,n;t=e.split(",")[0].indexOf("base64")!==-1?atob(e.split(",")[1]):decodeURI(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0];for(var o=new Array,r=0;r<t.length;r++)o[r]=t.charCodeAt(r);return new Blob([new Uint8Array(o)],{type:n})}function m(e,t){document.documentElement.addEventListener(e,t,!1)}function S(e,t){document.documentElement.removeEventListener(e,t)}var v=o.padding?Number(o.padding):200;o.rand=Math.round(99999*Math.random()),o.step=o.step||1,o.shape=o.shape||"circle",o.width=parseInt(o.width,10)||300,o.height=parseInt(o.height,10)||300,o.canvasWidth=o.width+v,o.canvasHeight=o.height+v;var y=r[0],w=y.getElementsByClassName("cropping-canvas")[0],A=y.getElementsByClassName("zoom-handle")[0],C=y.getElementsByClassName("image-crop-final")[0],M=new Image,P=new FileReader,D=0,F=0,B=0,L=0,I=0,x=0,b=!1,G=0,E=0,R=!1,T=B,U=L,H=0,N=0,k=1,O=0,Y=0,W=2,X=0,V=v/2,$=0,j=v/2,z=o.maxSize?Number(o.maxSize):null,q=.6,K=w.getContext("2d"),_=null,J=[];o.moduleStyles={width:o.width+v+"px",height:o.height+v+"px"},o.sectionStyles={width:o.width+v+"px",height:o.height+v+"px"},o.croppingGuideStyles={width:o.width+"px",height:o.height+"px",top:v/2+"px",left:v/2+"px"},P.onload=function(e){u(this.resultBlob)},M.onload=function(){o.step=2,o.$apply(),K.drawImage(M,0,0),B=M.width,L=M.height,D=o.width+v-this.width,F=o.height+v-this.height,T=B,U=L,Y=B>=L?(w.height-v)/L:(w.width-v)/B,O=d(Math.sqrt(Math.pow(w.width,2)+Math.pow(w.height,2))),l();var e=Math.round((X+V)/2),t=Math.round(($+j)/2);h(e,t)},o.$watch("src",function(){o.src?3!=o.step&&("Blob"==typeof o.src?P.readAsDataURL(o.src):u(o.src)):(o.step=1,c())}),o.$watch("crop",function(){o.crop&&(o.doCrop(),o.crop=!1)}),C.onload=function(){var e=document.createElement("canvas");e.width=this.width-v,e.height=this.height-v,e.style.display="none";var t=e.getContext("2d");t.drawImage(C,-(v/2),-(v/2)),y.getElementsByClassName("image-crop-section-final")[0].appendChild(e);var n=e.toDataURL();o.result=n,o.resultBlob=f(n),o.$apply()},o.doCrop=function(){o.croppedDataUri=w.toDataURL(),o.step=3},o.onCanvasMouseUp=function(e){b&&(e.preventDefault(),e.stopPropagation(),G=0,E=0,b=!1,I=H,x=N,S("mouseup",o.onCanvasMouseUp),S("touchend",o.onCanvasMouseUp),S("mousemove",o.onCanvasMouseMove),S("touchmove",o.onCanvasMouseMove))},w.addEventListener("touchend",o.onCanvasMouseUp,!1),o.onCanvasMouseDown=function(e){G="touchstart"===e.type?e.changedTouches[0].clientX:e.clientX,E="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,R=!1,b=!0,m("mouseup",o.onCanvasMouseUp),m("mousemove",o.onCanvasMouseMove)},w.addEventListener("touchstart",o.onCanvasMouseDown,!1),o.onHandleMouseDown=function(e){e.preventDefault(),e.stopPropagation(),G=Z="touchstart"===e.type?e.changedTouches[0].clientX:e.clientX,E=Q="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,b=!1,R=!0,m("mouseup",o.onHandleMouseUp),m("touchend",o.onHandleMouseUp),m("mousemove",o.onHandleMouseMove),m("touchmove",o.onHandleMouseMove)},A.addEventListener("touchstart",o.onHandleMouseDown,!1),o.onHandleMouseUp=function(e){R&&(e.preventDefault(),e.stopPropagation(),G=0,E=0,R=!1,I=H,x=N,S("mouseup",o.onHandleMouseUp),S("touchend",o.onHandleMouseUp),S("mousemove",o.onHandleMouseMove),S("touchmove",o.onHandleMouseMove))},A.addEventListener("touchend",o.onHandleMouseUp,!1),o.onCanvasMouseMove=function(e){if(e.preventDefault(),e.stopPropagation(),b){var t=G-("touchmove"===e.type?e.changedTouches[0].clientX:e.clientX),n=E-("touchmove"===e.type?e.changedTouches[0].clientY:e.clientY);h(I-t,x-n)}},w.addEventListener("touchmove",o.onCanvasMouseMove,!1);var Z=null,Q=null;o.onHandleMouseMove=function(e){if(e.stopPropagation(),e.preventDefault(),!R)return!1;var t=Z-("touchmove"===e.type?e.changedTouches[0].clientX:e.clientX),n=Q-("touchmove"===e.type?e.changedTouches[0].clientY:e.clientY);Z="touchmove"===e.type?e.changedTouches[0].clientX:e.clientX,Q="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY;var o=p(t,n);g(o)},A.addEventListener("touchmove",o.onHandleMouseMove,!1),o.onHandleMouseWheel=function(e){e.preventDefault(),g(e.deltaY>0?-.05:.05)},w.addEventListener("mousewheel",o.onHandleMouseWheel),A.addEventListener("mousewheel",o.onHandleMouseWheel)}}}])}();
vendor: 9,425 bytes, line 8
8!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(i){}}if(window.FileAPI||(window.FileAPI={}),FileAPI.shouldLoad=window.XMLHttpRequest&&!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var n=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,i){e.__listeners[n]=i,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,i,r){n(this),this.__url=i;try{e.apply(this,[t,i,r])}catch(a){a.message.indexOf("Access is denied")>-1&&(this.__origError=a,e.apply(this,[t,"_fix_for_ie_crossdomain__",r]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,i){if("__setXHR_"===t){n(this);var r=i(this);r instanceof Function&&r(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=i,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var i=arguments[0],r={url:n.__url,jsonp:!1,cache:!0,complete:function(e,i){-1!==e.indexOf("#2174")&&(e=null),n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==i.status&&t(n,"status",function(){return 0===i.status&&e&&"abort"!==e?500:i.status}),void 0!==i.statusText&&t(n,"statusText",function(){return i.statusText}),t(n,"readyState",function(){return 4}),void 0!==i.response&&t(n,"response",function(){return i.response});var r=i.responseText||(e&&0===i.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return r}),t(n,"response",function(){return r}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=i,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},progress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};r.data={},r.files={};for(var a=0;a<i.data.length;a++){var o=i.data[a];null!=o.val&&null!=o.val.name&&null!=o.val.size&&null!=o.val.type?r.files[o.key]=o.val:r.data[o.key]=o.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(r)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}function t(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function n(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)do t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;while(e);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var i,r,a,o,l,s=document.createElement("script"),u=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)i=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)r=window.FileAPI.jsPath;else for(a=0;a<u.length;a++)if(l=u[a].src,o=l.search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/),o>-1){r=l.substring(0,o+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=r),s.setAttribute("src",i||r+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(s),FileAPI.hasFlash=t()}FileAPI.ngfFixIE=function(i,r,a){if(!t())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var o=function(){i.attr("disabled")?r&&r.removeClass("js-fileapi-wrapper"):(r.attr("__ngf_flash_")||(r.unbind("change"),r.unbind("click"),r.bind("change",function(e){l.apply(this,[e]),a.apply(this,[e])}),r.attr("__ngf_flash_","true")),r.addClass("js-fileapi-wrapper"),e(i)||r.css("position","absolute").css("top",n(i[0]).top+"px").css("left",n(i[0]).left+"px").css("width",i[0].offsetWidth+"px").css("height",i[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",i.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"))};i.bind("mouseenter",o);var l=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!==t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var i=0;i<n.length;i++)n[i].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var i={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(i.target.result=n.result),i},i=function(i){t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",i)));var r;"load"===i.type?(e.onloadend&&e.onloadend(n("loadend",i)),r=n("load",i),e.onload&&e.onload(r),e.dispatchEvent(r)):"progress"===i.type?(r=n("progress",i),e.onprogress&&e.onprogress(r),e.dispatchEvent(r)):(r=n("error",i),e.onerror&&e.onerror(r),e.dispatchEvent(r))};this.readAsArrayBuffer=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsBinaryString=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,i)},this.readAsText=function(e){FileAPI.readAsText(e,i)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(e){return function(t,n){if("__setXHR_"===t){var i=n(this);i instanceof Function&&i(this)}else e.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var ngFileUpload=angular.module("ngFileUpload",[]);ngFileUpload.version="7.0.9",ngFileUpload.service("UploadBase",["$http","$q","$timeout",function(e,t,n){function i(i){i.method=i.method||"POST",i.headers=i.headers||{};var r=t.defer(),a=r.promise;return i.headers.__setXHR_=function(){return function(e){e&&(i.__XHR=e,i.xhrFn&&i.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=i,r.notify?r.notify(e):a.progressFunc&&n(function(){a.progressFunc(e)})},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=i,r.notify?r.notify(e):a.progressFunc&&n(function(){a.progressFunc(e)}))},!1))}},e(i).then(function(e){r.resolve(e)},function(e){r.reject(e)},function(e){r.notify(e)}),a.success=function(e){return a.then(function(t){e(t.data,t.status,t.headers,i)}),a},a.error=function(e){return a.then(null,function(t){e(t.data,t.status,t.headers,i)}),a},a.progress=function(e){return a.progressFunc=e,a.then(null,null,function(t){e(t)}),a},a.abort=function(){return i.__XHR&&n(function(){i.__XHR.abort()}),a},a.xhr=function(e){return i.xhrFn=function(t){return function(){t&&t.apply(a,arguments),e.apply(a,arguments)}}(i.xhrFn),a},a}this.upload=function(e){function t(n,i,r){if(void 0!==i)if(angular.isDate(i)&&(i=i.toISOString()),angular.isString(i))n.append(r,i);else if("form"===e.sendFieldsAs)if(angular.isObject(i))for(var a in i)i.hasOwnProperty(a)&&t(n,i[a],r+"["+a+"]");else n.append(r,i);else i=angular.isString(i)?i:JSON.stringify(i),"json-blob"===e.sendFieldsAs?n.append(r,new Blob([i],{type:"application/json"})):n.append(r,i)}return e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(n){var i,r=new FormData,a={};for(i in e.fields)e.fields.hasOwnProperty(i)&&(a[i]=e.fields[i]);n&&(a.data=n);for(i in a)if(a.hasOwnProperty(i)){var o=a[i];e.formDataAppender?e.formDataAppender(r,i,o):t(r,o,i)}
8if(null!=e.file){var l=e.fileFormDataName||"file";if(angular.isArray(e.file))for(var s=angular.isString(l),u=0;u<e.file.length;u++)r.append(s?l:l[u],e.file[u],e.fileName&&e.fileName[u]||e.file[u].name);else r.append(l,e.file,e.fileName||e.file.name)}return r}),i(e)},this.http=function(t){return t.transformRequest=t.transformRequest||function(t){return window.ArrayBuffer&&t instanceof window.ArrayBuffer||t instanceof Blob?t:e.defaults.transformRequest[0](arguments)},i(t)},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=ngFileUpload.version}]),function(){ngFileUpload.service("Upload",["$parse","$timeout","$compile","UploadValidate",function(e,t,n,i){var r=i;return r.getAttrWithDefaults=function(e,t){return null!=e[t]?e[t]:null==r.defaults[t]?r.defaults[t]:r.defaults[t].toString()},r.attrGetter=function(t,n,i,r){if(!i)return this.getAttrWithDefaults(n,t);try{return r?e(this.getAttrWithDefaults(n,t))(i,r):e(this.getAttrWithDefaults(n,t))(i)}catch(a){if(t.search(/min|max|pattern/i))return this.getAttrWithDefaults(n,t);throw a}},r.updateModel=function(n,i,a,o,l,s,u){function f(){var u=r.attrGetter("ngfKeep",i,a);if(u===!0){var f=(n.$modelValue||[]).slice(0);if(l&&l.length)if(r.attrGetter("ngfKeepDistinct",i,a)===!0){for(var d=f.length,c=0;c<l.length;c++){for(var p=0;d>p&&l[c].name!==f[p].name;p++);p===d&&f.push(l[c])}l=f}else l=f.concat(l);else l=f}var g=l&&l.length?l[0]:null;if(n){var h=!r.attrGetter("ngfMultiple",i,a)&&!r.attrGetter("multiple",i)&&!u;t(function(){e(r.attrGetter("ngModel",i)).assign(a,h?g:l)})}var v=r.attrGetter("ngfModel",i);v&&e(v).assign(a,l),o&&e(o)(a,{$files:l,$file:g,$event:s})}u?f():r.validate(l,n,i,a,r.attrGetter("ngfValidateLater",i),function(){t(function(){f()})})},r}])}(),function(){function e(e,t,n,i,r,a,o,l){function s(){return"input"===t[0].tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()}function u(){return _("ngfChange")||_("ngfSelect")}function f(t){for(var r=t.__files_||t.target&&t.target.files,a=[],o=0;o<r.length;o++)a.push(r[o]);l.updateModel(i,n,e,u(),a.length?a:null,t)}function d(e){if(t!==e)for(var n=0;n<t[0].attributes.length;n++){var i=t[0].attributes[n];"type"!==i.name&&"class"!==i.name&&"id"!==i.name&&"style"!==i.name&&((null==i.value||""===i.value)&&("required"===i.name&&(i.value="required"),"multiple"===i.name&&(i.value="multiple")),e.attr(i.name,i.value))}}function c(){if(s())return t;var e=angular.element('<input type="file">');return d(e),e.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),document.body.appendChild(e[0]),e}function p(n){if(t.attr("disabled")||_("ngfSelectDisabled",e))return!1;var i=g(n);return null!=i?i:(v(n),h(navigator.userAgent)?setTimeout(function(){w[0].click()},0):w[0].click(),!1)}function g(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if("touchstart"===e.type)return y=t?t[0].clientY:0,!0;if(e.stopPropagation(),e.preventDefault(),"touchend"===e.type){var n=t?t[0].clientY:0;if(Math.abs(n-y)>20)return!1}}function h(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&t.length>2){var n=l.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return-1===e.indexOf("Chrome")&&/.*Windows.*Safari.*/.test(e)}function v(t){w.val()&&(w.val(null),l.updateModel(i,n,e,u(),null,t,!0))}function m(e){if(w&&!w.attr("__ngf_ie10_Fix_")){if(!w[0].parentNode)return void(w=null);e.preventDefault(),e.stopPropagation(),w.unbind("click");var t=w.clone();return w.replaceWith(t),w=t,w.attr("__ngf_ie10_Fix_","true"),w.bind("change",f),w.bind("click",m),w[0].click(),!1}w.removeAttr("__ngf_ie10_Fix_")}var _=function(e,t){return l.attrGetter(e,n,t)};l.registerValidators(i,n,e),e.$watch(_("ngfMultiple"),function(){w.attr("multiple",_("ngfMultiple",e))}),e.$watch(_("ngfCapture"),function(){w.attr("capture",_("ngfCapture",e))}),n.$observe("accept",function(){w.attr("accept",_("accept"))});var y=0,w=t;s()||(w=c()),w.bind("change",f),s()?t.bind("click",v):t.bind("click touchstart touchend",p),-1!==navigator.appVersion.indexOf("MSIE 10")&&w.bind("click",m),e.$on("$destroy",function(){s()||w.remove()}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(t,w,f)}ngFileUpload.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(t,n,i,r){return{restrict:"AEC",require:"?ngModel",link:function(a,o,l,s){e(a,o,l,s,t,n,i,r)}}}])}(),function(){function e(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/\./}
8ngFileUpload.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,t,n){var i=e;return i.dataUrl=function(e,i){if(e.dataUrl){var r=n.defer();return t(function(){r.resolve(e.dataUrl)}),r.promise}if(e.$ngfDataUrlPromise)return e.$ngfDataUrlPromise;var a=n.defer();return t(function(){if(window.FileReader&&e&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 8")||e.size<2e4)&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 9")||e.size<4e6)){var n=window.URL||window.webkitURL;if(n&&n.createObjectURL&&!i){var r;try{r=n.createObjectURL(e)}catch(o){return void a.reject()}e.dataUrl=r,r&&a.resolve(r)}else{var l=new FileReader;l.onload=function(n){t(function(){e.dataUrl=n.target.result,a.resolve(n.target.result)})},l.onerror=function(){t(function(){e.dataUrl="",a.reject()})},l.readAsDataURL(e)}}else e.dataUrl="",a.reject()}),e.$ngfDataUrlPromise=a.promise,e.$ngfDataUrlPromise["finally"](function(){delete e.$ngfDataUrlPromise}),e.$ngfDataUrlPromise},i}]);var t=angular.element("<style>.ngf-hide{display:none !important}</style>");document.getElementsByTagName("head")[0].appendChild(t[0]),ngFileUpload.directive("ngfSrc",["$compile","$timeout","Upload",function(t,n,i){return{restrict:"AE",link:function(t,r,a){n(function(){t.$watch(a.ngfSrc,function(o){o&&0===o.type.indexOf(e(r[0]))?i.dataUrl(o,i.attrGetter("ngfNoObjectUrl",a,t))["finally"](function(){n(function(){o.dataUrl?(r.removeClass("ngf-hide"),r.attr("src",o.dataUrl)):r.addClass("ngf-hide")})}):r.addClass("ngf-hide")})})}}}]),ngFileUpload.directive("ngfBackground",["Upload","$compile","$timeout",function(e,t,n){return{restrict:"AE",link:function(t,i,r){n(function(){t.$watch(r.ngfBackground,function(a){a&&0===a.type.indexOf("image")?e.dataUrl(a,e.attrGetter("ngfNoObjectUrl",r,t))["finally"](function(){n(function(){a.dataUrl?i.css("background-image","url('"+a.dataUrl+"')"):i.css("background-image","")})}):i.css("background-image","")})})}}}]),ngFileUpload.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(e,t){return function(n,i){return angular.isString(n)?t.trustAsResourceUrl(n):n&&!n.dataUrl?(void 0===n.dataUrl&&angular.isObject(n)&&(n.dataUrl=null,e.dataUrl(n,i).then(function(e){n.dataUrl=e},function(){n.dataUrl=""})),""):(n&&n.dataUrl?t.trustAsResourceUrl(n.dataUrl):n)||""}}])}(),function(){function e(t){if(t.length>2&&"/"===t[0]&&"/"===t[t.length-1])return t.substring(1,t.length-1);var n=t.split(","),i="";if(n.length>1)for(var r=0;r<n.length;r++)i+="("+e(n[r])+")",r<n.length-1&&(i+="|");else 0===t.indexOf(".")&&(t="*"+t),i="^"+t.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",i=i.replace(/\\\*/g,".*").replace(/\\\?/g,".");return i}function t(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1e3*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1e6*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1e9*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e}ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(n,i,r){var a=n;return a.registerValidators=function(e,t,n,i){function r(e){for(var t in e.$ngfValidations)e.$ngfValidations.hasOwnProperty(t)&&e.$setValidity(t,e.$ngfValidations[t])}e&&(e.$ngfValidations=e.$ngfValidations||{},e.$formatters.push(function(o){if(i)a.validate(o,e,t,n,!1,function(){r(e)});else{for(var l in e.$ngfValidations)e.$ngfValidations.hasOwnProperty(l)&&e.$setValidity(l,e.$ngfValidations[l]);r(e)}return o}))},a.validatePattern=function(t,n){if(!n)return!0;
8var i=new RegExp(e(n),"gi");return null!=t.type&&i.test(t.type.toLowerCase())||null!=t.name&&i.test(t.name.toLowerCase())},a.validate=function(e,n,i,r,o,l){function s(t,i,r){if(e){var a=null,o="ngf"+t[0].toUpperCase()+t.substr(1);if(angular.forEach(void 0===e.length?[e]:e,function(e){var n=f(o,{$file:e});return null==n&&(n=i(f("ngfValidate")||{})),null==n||(a=!0,r(e,n))?void 0:(e.$error=t,e.$errorParam=n,a=!1,!1)}),null!=a)return n.$ngfValidations[t]=a,a}return!0}function u(t,i,r,a,o){if(e){var s=0,u=!1,d="ngf"+t[0].toUpperCase()+t.substr(1);e=void 0===e.length?[e]:e,angular.forEach(e,function(e){if(0!==e.type.search(r))return!0;var p=f(d,{$file:e})||i(f("ngfValidate",{$file:e})||{});p&&(c++,s++,a(e,p).then(function(n){o(n,p)||(e.$error=t,e.$errorParam=p,u=!0)},function(){f("ngfValidateForce",{$file:e})&&(e.$error=t,e.$errorParam=p,u=!0)})["finally"](function(){c--,s--,s||(n.$ngfValidations[t]=!u),c||l.call(n,n.$ngfValidations)}))})}}n=n||{},n.$ngfValidations=n.$ngfValidations||{};var f=function(e,t){return a.attrGetter(e,i,r,t)};if(o)return void l.call(n);var d=!0;if(d=d&&s("pattern",function(e){return e.pattern},a.validatePattern),d=d&&s("minSize",function(e){return e.size&&e.size.min},function(e,n){return e.size>=t(n)}),d=d&&s("maxSize",function(e){return e.size&&e.size.max},function(e,n){return e.size<=t(n)}),d=d&&s("validateFn",function(){return null},function(e,t){return t===!0||null===t||""===t}),!d)return void l.call(n,n.$ngfValidations);var c=0;u("maxHeight",function(e){return e.height&&e.height.max},/image/,this.imageDimensions,function(e,t){return e.height<=t}),u("minHeight",function(e){return e.height&&e.height.min},/image/,this.imageDimensions,function(e,t){return e.height>=t}),u("maxWidth",function(e){return e.height&&e.width.max},/image/,this.imageDimensions,function(e,t){return e.width<=t}),u("minWidth",function(e){return e.height&&e.width.min},/image/,this.imageDimensions,function(e,t){return e.width>=t}),u("maxDuration",function(e){return e.height&&e.duration.max},/audio|video/,this.mediaDuration,function(e,n){return e<=t(n)}),u("minDuration",function(e){return e.height&&e.duration.min},/audio|video/,this.mediaDuration,function(e,n){return e>=t(n)}),u("validateAsyncFn",function(){return null},/./,function(e,t){return t},function(e){return e===!0||null===e||""===e}),c||l.call(n,n.$ngfValidations)},a.imageDimensions=function(e){if(e.width&&e.height){var t=i.defer();return r(function(){t.resolve({width:e.width,height:e.height})}),t.promise}if(e.$ngfDimensionPromise)return e.$ngfDimensionPromise;var n=i.defer();return r(function(){return 0!==e.type.indexOf("image")?void n.reject("not image"):void a.dataUrl(e).then(function(t){function i(){var t=l[0].clientWidth,i=l[0].clientHeight;l.remove(),e.width=t,e.height=i,n.resolve({width:t,height:i})}function a(){l.remove(),n.reject("load error")}function o(){r(function(){l[0].parentNode&&(l[0].clientWidth?i():s>10?a():o())},1e3)}var l=angular.element("<img>").attr("src",t).css("visibility","hidden").css("position","fixed");l.on("load",i),l.on("error",a);var s=0;o(),angular.element(document.getElementsByTagName("body")[0]).append(l)},function(){n.reject("load error")})}),e.$ngfDimensionPromise=n.promise,e.$ngfDimensionPromise["finally"](function(){delete e.$ngfDimensionPromise}),e.$ngfDimensionPromise},a.mediaDuration=function(e){if(e.duration){var t=i.defer();return r(function(){t.resolve(e.duration)}),t.promise}if(e.$ngfDurationPromise)return e.$ngfDurationPromise;var n=i.defer();return r(function(){return 0!==e.type.indexOf("audio")&&0!==e.type.indexOf("video")?void n.reject("not media"):void a.dataUrl(e).then(function(t){function i(){var t=l[0].duration;e.duration=t,l.remove(),n.resolve(t)}function a(){l.remove(),n.reject("load error")}function o(){r(function(){l[0].parentNode&&(l[0].duration?i():s>10?a():o())},1e3)}var l=angular.element(0===e.type.indexOf("audio")?"<audio>":"<video>").attr("src",t).css("visibility","none").css("position","fixed");l.on("loadedmetadata",i),l.on("error",a);var s=0;o(),angular.element(document.body).append(l)},function(){n.reject("load error")})}),e.$ngfDurationPromise=n.promise,e.$ngfDurationPromise["finally"](function(){delete e.$ngfDurationPromise}),e.$ngfDurationPromise},a}])}(),function(){function e(e,n,i,r,a,o,l,s){function u(){return n.attr("disabled")||p("ngfDropDisabled",e)}function f(e,t,n,i){var r=p("ngfDragOverClass",e,{$event:n}),a=p("ngfDragOverClass")||"dragover";if(angular.isString(r))return void i(r);if(r&&(r.delay&&(m=r.delay),r.accept||r.reject)){var o=n.dataTransfer.items;if(null!=o)for(var l=p("ngfPattern",e,{$event:n}),u=0;u<o.length;u++)if("file"===o[u].kind||""===o[u].kind){if(!s.validatePattern(o[u],l)){a=r.reject;break}a=r.accept}}i(a)}function d(e,t,n,i){function r(e,t,n){if(null!=t)if(t.isDirectory){var i=(n||"")+t.name;e.push({name:t.name,type:"directory",path:i});var a=t.createReader(),o=[];s++;var l=function(){a.readEntries(function(i){try{if(i.length)o=o.concat(Array.prototype.slice.call(i||[],0)),l();else{for(var a=0;a<o.length;a++)r(e,o[a],(n?n:"")+t.name+"/");s--}}catch(u){s--,console.error(u)}},function(){s--})};l()}else s++,t.file(function(t){try{s--,t.path=(n?n:"")+t.name,e.push(t)}catch(i){s--,console.error(i)}},function(){s--})}var a=[],s=0,u=e.dataTransfer.items;if(u&&u.length>0&&"file"!==l.protocol())for(var f=0;f<u.length;f++){if(u[f].webkitGetAsEntry&&u[f].webkitGetAsEntry()&&u[f].webkitGetAsEntry().isDirectory){var d=u[f].webkitGetAsEntry();if(d.isDirectory&&!n)continue;null!=d&&r(a,d)}else{var c=u[f].getAsFile();null!=c&&a.push(c)}if(!i&&a.length>0)break}else{var p=e.dataTransfer.files;if(null!=p)for(var g=0;g<p.length&&(a.push(p.item(g)),i||!(a.length>0));g++);}var h=0;!function v(e){o(function(){if(s)10*h++<2e4&&v(10);else{if(!i&&a.length>1){for(f=0;"directory"===a[f].type;)f++;a=[a[f]]}t(a)}},e||0)}()}var c=t(),p=function(e,t,n){return s.attrGetter(e,i,t,n)};if(p("dropAvailable")&&o(function(){e[p("dropAvailable")]?e[p("dropAvailable")].value=c:e[p("dropAvailable")]=c}),!c)return void(p("ngfHideOnDropNotAvailable",e)===!0&&n.css("display","none"));s.registerValidators(r,i,e);var g,h=null,v=a(p("ngfStopPropagation")),m=1;n[0].addEventListener("dragover",function(t){if(!u()){if(t.preventDefault(),v(e)&&t.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var r=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy"}o.cancel(h),g||(g="C",f(e,i,t,function(e){g=e,n.addClass(g)}))}},!1),n[0].addEventListener("dragenter",function(t){u()||(t.preventDefault(),v(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(){u()||(h=o(function(){n.removeClass(g),g=null},m||1))},!1),n[0].addEventListener("drop",function(t){u()||(t.preventDefault(),v(e)&&t.stopPropagation(),n.removeClass(g),g=null,d(t,function(n){s.updateModel(r,i,e,p("ngfChange")||p("ngfDrop"),n,t)},p("ngfAllowDir",e)!==!1,p("multiple")||p("ngfMultiple",e)))},!1),n[0].addEventListener("paste",function(t){if(!u()){var n=[],a=t.clipboardData||t.originalEvent.clipboardData;if(a&&a.items){for(var o=0;o<a.items.length;o++)-1!==a.items[o].type.indexOf("image")&&n.push(a.items[o].getAsFile());s.updateModel(r,i,e,p("ngfChange")||p("ngfDrop"),n,t)}}},!1)}function t(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}ngFileUpload.directive("ngfDrop",["$parse","$timeout","$location","Upload",function(t,n,i,r){return{restrict:"AEC",require:"?ngModel",link:function(a,o,l,s){e(a,o,l,s,t,n,i,r)}}}]),ngFileUpload.directive("ngfNoFileDrop",function(){return function(e,n){t()&&n.css("display","none")}}),ngFileUpload.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(e,n,i){return function(r,a,o){if(t()){var l=e(i.attrGetter("ngfDropAvailable",o));n(function(){l(r),l.assign&&l.assign(r,!0)})}}}])}();
9!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports["angular-file-upload"]=t():e["angular-file-upload"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=r(n(2)),o=r(n(3)),s=r(n(4)),a=r(n(5)),u=r(n(6)),l=r(n(7)),c=r(n(1)),f=r(n(8)),p=r(n(9)),d=r(n(10)),v=r(n(11)),h=r(n(12));angular.module(i.name,[]).value("fileUploaderOptions",o).factory("FileUploader",s).factory("FileLikeObject",a).factory("FileItem",u).factory("FileDirective",l).factory("FileSelect",c).factory("FileDrop",f).factory("FileOver",p).directive("nvFileSelect",d).directive("nvFileDrop",v).directive("nvFileOver",h).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver",function(e,t,n,r,i,o,s){e.FileLikeObject=t,e.FileItem=n,e.FileDirective=r,e.FileSelect=i,e.FileDrop=o,e.FileOver=s}])},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function l(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:l(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend);e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy",change:"onChange"},prop:"select"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n),this.uploader.isHTML5||this.element.removeAttr("multiple"),this.element.prop("value",null)}return s(t,e),i(t,{getOptions:{value:function(){}},getFilters:{value:function(){}},isEmptyAfterSelection:{value:function(){return!!this.element.attr("multiple")}},onChange:{value:function(){var e=this.uploader.isHTML5?this.element[0].files:this.element[0],t=this.getOptions(),n=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(e,t,n),this.isEmptyAfterSelection()&&this.element.prop("value",null)}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t){e.exports={name:"angularFileUpload"}},function(e,t){"use strict";e.exports={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.extend,u=angular.forEach,l=angular.isObject,c=angular.isNumber,f=angular.isDefined,p=angular.isArray,d=angular.element;e.exports=function(e,t,n,r,v,h){var m=r.File,g=r.FormData,_=function(){function r(t){o(this,r);var n=s(e);a(this,n,t,{isUploading:!1,_nextIndex:0,_failFilterIndex:-1,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return i(r,{addToQueue:{value:function(e,t,n){var r=this,i=this.isArrayLikeObject(e)?e:[e],o=this._getFilters(n),s=this.queue.length,a=[];u(i,function(e){var n=new v(e);
9if(r._isValidFile(n,o,t)){var i=new h(r,e,t);a.push(i),r.queue.push(i),r._onAfterAddingFile(i)}else{var s=o[r._failFilterIndex];r._onWhenAddingFileFailed(n,s,t)}}),this.queue.length!==s&&(this._onAfterAddingAll(a),this.progress=this._getTotalProgress()),this._render(),this.autoUpload&&this.uploadAll()}},removeFromQueue:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t];n.isUploading&&n.cancel(),this.queue.splice(t,1),n._destroy(),this.progress=this._getTotalProgress()}},clearQueue:{value:function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}},uploadItem:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t],r=this.isHTML5?"_xhrTransport":"_iframeTransport";n._prepareToUploading(),this.isUploading||(this.isUploading=!0,this[r](n))}},cancelItem:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t],r=this.isHTML5?"_xhr":"_form";n&&n.isUploading&&n[r].abort()}},uploadAll:{value:function(){var e=this.getNotUploadedItems().filter(function(e){return!e.isUploading});e.length&&(u(e,function(e){return e._prepareToUploading()}),e[0].upload())}},cancelAll:{value:function(){var e=this.getNotUploadedItems();u(e,function(e){return e.cancel()})}},isFile:{value:function(e){return this.constructor.isFile(e)}},isFileLikeObject:{value:function(e){return this.constructor.isFileLikeObject(e)}},isArrayLikeObject:{value:function(e){return this.constructor.isArrayLikeObject(e)}},getIndexOfItem:{value:function(e){return c(e)?e:this.queue.indexOf(e)}},getNotUploadedItems:{value:function(){return this.queue.filter(function(e){return!e.isUploaded})}},getReadyItems:{value:function(){return this.queue.filter(function(e){return e.isReady&&!e.isUploading}).sort(function(e,t){return e.index-t.index})}},destroy:{value:function(){var e=this;u(this._directives,function(t){u(e._directives[t],function(e){e.destroy()})})}},onAfterAddingAll:{value:function(e){}},onAfterAddingFile:{value:function(e){}},onWhenAddingFileFailed:{value:function(e,t,n){}},onBeforeUploadItem:{value:function(e){}},onProgressItem:{value:function(e,t){}},onProgressAll:{value:function(e){}},onSuccessItem:{value:function(e,t,n,r){}},onErrorItem:{value:function(e,t,n,r){}},onCancelItem:{value:function(e,t,n,r){}},onCompleteItem:{value:function(e,t,n,r){}},onCompleteAll:{value:function(){}},_getTotalProgress:{value:function(e){if(this.removeAfterUpload)return e||0;var t=this.getNotUploadedItems().length,n=t?this.queue.length-t:this.queue.length,r=100/this.queue.length,i=(e||0)*r/100;return Math.round(n*r+i)}},_getFilters:{value:function(e){if(!e)return this.filters;if(p(e))return e;var t=e.match(/[^\s,]+/g);return this.filters.filter(function(e){return-1!==t.indexOf(e.name)})}},_render:{value:function(){t.$$phase||t.$apply()}},_folderFilter:{value:function(e){return!(!e.size&&!e.type)}},_queueLimitFilter:{value:function(){return this.queue.length<this.queueLimit}},_isValidFile:{value:function(e,t,n){var r=this;return this._failFilterIndex=-1,!t.length||t.every(function(t){return r._failFilterIndex++,t.fn.call(r,e,n)})}},_isSuccessCode:{value:function(e){return e>=200&&300>e||304===e}},_transformResponse:{value:function(e,t){var r=this._headersGetter(t);return u(n.defaults.transformResponse,function(t){e=t(e,r)}),e}},_parseHeaders:{value:function(e){var t,n,r,i={};return e?(u(e.split("\n"),function(e){r=e.indexOf(":"),t=e.slice(0,r).trim().toLowerCase(),n=e.slice(r+1).trim(),t&&(i[t]=i[t]?i[t]+", "+n:n)}),i):i}},_headersGetter:{value:function(e){return function(t){return t?e[t.toLowerCase()]||null:e}}},_xhrTransport:{value:function(e){var t=this,n=e._xhr=new XMLHttpRequest,r=new g;if(this._onBeforeUploadItem(e),u(e.formData,function(e){u(e,function(e,t){r.append(t,e)})}),"number"!=typeof e._file.size)throw new TypeError("The file specified is no longer valid");r.append(e.alias,e._file,e.file.name),n.upload.onprogress=function(n){var r=Math.round(n.lengthComputable?100*n.loaded/n.total:0);t._onProgressItem(e,r)},n.onload=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r),o=t._isSuccessCode(n.status)?"Success":"Error",s="_on"+o+"Item";t[s](e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.onerror=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r);t._onErrorItem(e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.onabort=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r);t._onCancelItem(e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials,u(e.headers,function(e,t){n.setRequestHeader(t,e)}),n.send(r),this._render()}},_iframeTransport:{value:function(e){var t=this,n=d('<form style="display: none;" />'),r=d('<iframe name="iframeTransport'+Date.now()+'">'),i=e._input;e._form&&e._form.replaceWith(i),e._form=n,this._onBeforeUploadItem(e),i.prop("name",e.alias),u(e.formData,function(e){u(e,function(e,t){var r=d('<input type="hidden" name="'+t+'" />');r.val(e),n.append(r)})}),n.prop({action:e.url,method:"POST",target:r.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),r.bind("load",function(){var n="",i=200;try{n=r[0].contentDocument.body.innerHTML}catch(o){i=500}var s={response:n,status:i,dummy:!0},a={},u=t._transformResponse(s.response,a);t._onSuccessItem(e,u,s.status,a),t._onCompleteItem(e,u,s.status,a)}),n.abort=function(){var o,s={status:0,dummy:!0},a={};r.unbind("load").prop("src","javascript:false;"),n.replaceWith(i),t._onCancelItem(e,o,s.status,a),t._onCompleteItem(e,o,s.status,a)},i.after(n),n.append(i).append(r),n[0].submit(),this._render()}},_onWhenAddingFileFailed:{value:function(e,t,n){this.onWhenAddingFileFailed(e,t,n)}}
9,_onAfterAddingFile:{value:function(e){this.onAfterAddingFile(e)}},_onAfterAddingAll:{value:function(e){this.onAfterAddingAll(e)}},_onBeforeUploadItem:{value:function(e){e._onBeforeUpload(),this.onBeforeUploadItem(e)}},_onProgressItem:{value:function(e,t){var n=this._getTotalProgress(t);this.progress=n,e._onProgress(t),this.onProgressItem(e,t),this.onProgressAll(n),this._render()}},_onSuccessItem:{value:function(e,t,n,r){e._onSuccess(t,n,r),this.onSuccessItem(e,t,n,r)}},_onErrorItem:{value:function(e,t,n,r){e._onError(t,n,r),this.onErrorItem(e,t,n,r)}},_onCancelItem:{value:function(e,t,n,r){e._onCancel(t,n,r),this.onCancelItem(e,t,n,r)}},_onCompleteItem:{value:function(e,t,n,r){e._onComplete(t,n,r),this.onCompleteItem(e,t,n,r);var i=this.getReadyItems()[0];return this.isUploading=!1,f(i)?void i.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),void this._render())}}},{isFile:{value:function(e){return m&&e instanceof m}},isFileLikeObject:{value:function(e){return e instanceof v}},isArrayLikeObject:{value:function(e){return l(e)&&"length"in e}},inherit:{value:function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.super_=t}}}),r}();return _.prototype.isHTML5=!(!m||!g),_.isHTML5=_.prototype.isHTML5,_},e.exports.$inject=["fileUploaderOptions","$rootScope","$http","$window","FileLikeObject","FileItem"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.isElement,u=angular.isString;e.exports=function(){var e=function(){function e(t){o(this,e);var n=a(t),r=n?t.value:t,i=u(r)?"FakePath":"Object",s="_createFrom"+i;this[s](r)}return i(e,{_createFromFakePath:{value:function(e){this.lastModifiedDate=null,this.size=null,this.type="like/"+e.slice(e.lastIndexOf(".")+1).toLowerCase(),this.name=e.slice(e.lastIndexOf("/")+e.lastIndexOf("\\")+2)}},_createFromObject:{value:function(e){this.lastModifiedDate=s(e.lastModifiedDate),this.size=e.size,this.type=e.type,this.name=e.name}}}),e}();return e},e.exports.$inject=[]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.extend,u=angular.element,l=angular.isElement;e.exports=function(e,t){var n=function(){function n(e,r,i){o(this,n);var c=l(r),f=c?u(r):null,p=c?null:r;a(this,{url:e.url,alias:e.alias,headers:s(e.headers),formData:s(e.formData),removeAfterUpload:e.removeAfterUpload,withCredentials:e.withCredentials,method:e.method},i,{uploader:e,file:new t(r),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:p,_input:f}),f&&this._replaceNode(f)}return i(n,{upload:{value:function(){try{this.uploader.uploadItem(this)}catch(e){this.uploader._onCompleteItem(this,"",0,[]),this.uploader._onErrorItem(this,"",0,[])}}},cancel:{value:function(){this.uploader.cancelItem(this)}},remove:{value:function(){this.uploader.removeFromQueue(this)}},onBeforeUpload:{value:function(){}},onProgress:{value:function(e){}},onSuccess:{value:function(e,t,n){}},onError:{value:function(e,t,n){}},onCancel:{value:function(e,t,n){}},onComplete:{value:function(e,t,n){}},_onBeforeUpload:{value:function(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}},_onProgress:{value:function(e){this.progress=e,this.onProgress(e)}},_onSuccess:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(e,t,n)}},_onError:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(e,t,n)}},_onCancel:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(e,t,n)}},_onComplete:{value:function(e,t,n){this.onComplete(e,t,n),this.removeAfterUpload&&this.remove()}},_destroy:{value:function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input}},_prepareToUploading:{value:function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},_replaceNode:{value:function(t){var n=e(t.clone())(t.scope());n.prop("value",null),t.css("display","none"),t.after(n)}}}),n}();return n},e.exports.$inject=["$compile","FileLikeObject"]},function(e,t,n){"use strict";
9var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.extend);e.exports=function(){var e=function(){function e(t){o(this,e),s(this,t),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return i(e,{bind:{value:function(){for(var e in this.events){var t=this.events[e];this.element.bind(e,this[t])}}},unbind:{value:function(){for(var e in this.events)this.element.unbind(e,this.events[e])}},destroy:{value:function(){var e=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(e,1),this.unbind()}},_saveLinks:{value:function(){for(var e in this.events){var t=this.events[e];this[t]=this[t].bind(this)}}}}),e}();return e.prototype.events={},e},e.exports.$inject=[]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function c(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:c(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend),l=angular.forEach;e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n)}return s(t,e),i(t,{getOptions:{value:function(){}},getFilters:{value:function(){}},onDrop:{value:function(e){var t=this._getTransfer(e);if(t){var n=this.getOptions(),r=this.getFilters();this._preventAndStop(e),l(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(t.files,n,r)}}},onDragOver:{value:function(e){var t=this._getTransfer(e);this._haveFiles(t.types)&&(t.dropEffect="copy",this._preventAndStop(e),l(this.uploader._directives.over,this._addOverClass,this))}},onDragLeave:{value:function(e){e.currentTarget!==this.element[0]&&(this._preventAndStop(e),l(this.uploader._directives.over,this._removeOverClass,this))}},_getTransfer:{value:function(e){return e.dataTransfer?e.dataTransfer:e.originalEvent.dataTransfer}},_preventAndStop:{value:function(e){e.preventDefault(),e.stopPropagation()}},_haveFiles:{value:function(e){return!!e&&(e.indexOf?-1!==e.indexOf("Files"):!!e.contains&&e.contains("Files"))}},_addOverClass:{value:function(e){e.addOverClass()}},_removeOverClass:{value:function(e){e.removeOverClass()}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function l(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:l(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend);e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n)}return s(t,e),i(t,{addOverClass:{value:function(){this.element.addClass(this.getOverClass())}},removeOverClass:{value:function(){this.element.removeClass(this.getOverClass())}},getOverClass:{value:function(){return this.overClass}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t,n){"use strict";
9var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2)),e.exports=function(e,t,n){return{link:function(r,i,o){var s=r.$eval(o.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');var a=new n({uploader:s,element:i});a.getOptions=e(o.options).bind(a,r),a.getFilters=function(){return o.filters}}}},e.exports.$inject=["$parse","FileUploader","FileSelect"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2)),e.exports=function(e,t,n){return{link:function(r,i,o){var s=r.$eval(o.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');if(s.isHTML5){var a=new n({uploader:s,element:i});a.getOptions=e(o.options).bind(a,r),a.getFilters=function(){return o.filters}}}}},e.exports.$inject=["$parse","FileUploader","FileDrop"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2)),e.exports=function(e,t){return{link:function(n,r,i){var o=n.$eval(i.uploader);if(!(o instanceof e))throw new TypeError('"Uploader" must be an instance of FileUploader');var s=new t({uploader:o,element:r});s.getOverClass=function(){return i.overClass||s.overClass}}}},e.exports.$inject=["FileUploader","FileOver"]}])}); 10var mod;mod=angular.module("infinite-scroll",[]),mod.value("THROTTLE_MILLISECONDS",null),mod.directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(n,e,t,i){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"=",infiniteScrollListenForEvent:"@"},link:function(l,o,r){var c,u,a,f,m,d,s,S,g,p,v,$,w,D,h,E,T,L;return L=angular.element(e),w=null,D=null,u=null,a=null,p=!0,T=!1,E=null,g=function(n){return n=n[0]||n,isNaN(n.offsetHeight)?n.document.documentElement.clientHeight:n.offsetHeight},v=function(n){if(n[0].getBoundingClientRect&&!n.css("none"))return n[0].getBoundingClientRect().top+$(n)},$=function(n){return n=n[0]||n,isNaN(window.pageYOffset)?n.document.documentElement.scrollTop:n.ownerDocument.defaultView.pageYOffset},S=function(){var e,t,i,r,c;return a===L?(e=g(a)+$(a[0].document.documentElement),i=v(o)+g(o)):(e=g(a),t=0,void 0!==v(a)&&(t=v(a)),i=v(o)-t+g(o)),T&&(i=g((o[0].ownerDocument||o[0].document).documentElement)),r=i-e,c=r<=g(a)*w+1,c?(u=!0,D?l.$$phase||n.$$phase?l.infiniteScroll():l.$apply(l.infiniteScroll):void 0):u=!1},h=function(n,e){var i,l,o;return o=null,l=0,i=function(){var e;return l=(new Date).getTime(),t.cancel(o),o=null,n.call(),e=null},function(){var r,c;return r=(new Date).getTime(),c=e-(r-l),c<=0?(clearTimeout(o),t.cancel(o),o=null,l=r,n.call()):o?void 0:o=t(i,c,1)}},null!=i&&(S=h(S,i)),l.$on("$destroy",function(){if(a.unbind("scroll",S),null!=E)return E(),E=null}),d=function(n){return w=parseFloat(n)||0},l.$watch("infiniteScrollDistance",d),d(l.infiniteScrollDistance),m=function(n){if(D=!n,D&&u)return u=!1,S()},l.$watch("infiniteScrollDisabled",m),m(l.infiniteScrollDisabled),s=function(n){return T=n},l.$watch("infiniteScrollUseDocumentBottom",s),s(l.infiniteScrollUseDocumentBottom),c=function(n){if(null!=a&&a.unbind("scroll",S),a=n,null!=n)return a.bind("scroll",S)},c(L),l.infiniteScrollListenForEvent&&(E=n.$on(l.infiniteScrollListenForEvent,S)),f=function(n){if(null!=n&&0!==n.length){if(n instanceof HTMLElement?n=angular.element(n):"function"==typeof n.append?n=angular.element(n[n.length-1]):"string"==typeof n&&(n=angular.element(document.querySelector(n))),null!=n)return c(n);throw new Exception("invalid infinite-scroll-container attribute.")}},l.$watch("infiniteScrollContainer",f),f(l.infiniteScrollContainer||[]),null!=r.infiniteScrollParent&&c(angular.element(o.parent())),null!=r.infiniteScrollImmediateCheck&&(p=l.$eval(r.infiniteScrollImmediateCheck)),t(function(){if(p)return S()},0,1)}}}]); 11angular.module("cgNotify",[]).factory("notify",["$timeout","$http","$window","$compile","$templateCache","$rootScope",function(e,t,n,a,s,i){$.fn.emulateTransitionEndlocal=function(e){var t=!1,n=this;$(this).one("webkitTransitionEnd",function(){t=!0});var a=function(){t||$(n).trigger("webkitTransitionEnd")};setTimeout(a,e)};var o=10,r=15,l=1e4,c="angular-notify.html",u="center",d=document.body,g=0,f=/MSIE 9/i.test(n.navigator.userAgent)||/MSIE 10/i.test(n.navigator.userAgent)||/rv:11.0/i.test(n.navigator.userAgent),p=n.navigator.appVersion.substr(n.navigator.appVersion.lastIndexOf("Version/")+8,3),m=[],v=[],h=function(n){"object"!=typeof n&&(n={message:n}),n.duration=n.duration?n.duration:l,n.templateUrl=n.templateUrl?n.templateUrl:c,n.container=n.container?n.container:d,n.classes=n.classes?n.classes:"",n.mouseOver=n.mouseOver?n.mouseOver:"";var h=n.scope?n.scope.$new():i.$new();if(h.$position=n.position?n.position:u,h.$message=n.message,h.$classes=n.classes,h.$messageTemplate=n.messageTemplate,g>0)for(var y=v.length+1-g,T=0;T<y;T++)v[T].$close();
11t.get(n.templateUrl,{cache:s}).success(function(t){var s=a(t)(h);if(s.one("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",function(e){$this=$(this),("opacity"===e.propertyName||0===e.currentTarget.style.opacity||e.originalEvent&&"opacity"===e.originalEvent.propertyName||$this.hasClass("closed"))&&($this.fadeOut(function(){$this.css("z-index","-1"),$this.remove()}),m.splice(m.indexOf(s),1),v.splice(v.indexOf(h),1),c())}),(f||angular.element.browser.safari&&p<7.1)&&$(s[0]).emulateTransitionEndlocal(n.duration+50),n.messageTemplate){for(var i,l=0;l<s.children().length;l++)if(angular.element(s.children()[l]).hasClass("cg-notify-message-template")){i=angular.element(s.children()[l]);break}if(!i)throw new Error("cgNotify could not find the .cg-notify-message-template element in "+n.templateUrl+".");i.append(a(n.messageTemplate)(h))}angular.element(n.container).append(s),m.push(s),"center"===h.$position&&e(function(){h.$centerMargin="-"+s[0].offsetWidth/2+"px"}),h.$close=function(){s.css("opacity",0).addClass("closed").attr("data-closing","true").remove(),c()};var c=function(){for(var e=0,t=o,n=m.length-1;n>=0;n--){var a=10,s=m[n],i=s[0].offsetHeight,l=t+i+a;s.attr("data-closing")?l+=20:t+=i+r,s.css("top",l+"px").css("margin-top","-"+(i+a)+"px").css("visibility","visible"),e++}};if(e(function(){c()}),s.mouseenter(function(e){$(this).data("data-hover","true")}).mouseleave(function(e){$(this).data("data-hover","false")}),s.data("data-hover","false"),n.duration>0){s.data("notify-delay",n.duration);var u=setInterval(function(){var e=parseInt(s.data("notify-delay"));("pause"!=n.mouseOver||"true"!=s.data("data-hover")&&!s.find(":input").is(":focus"))&&(e-=1e3),s.data("notify-delay",e),e<=0&&(clearInterval(u),s.fadeOut(function(){s.css("z-index","-1"),s.remove()}),h.$close())},1e3)}}).error(function(e){throw new Error("Template specified for cgNotify ("+n.templateUrl+") could not be loaded. "+e)});var b={};return b.close=function(){h.$close&&h.$close()},Object.defineProperty(b,"message",{get:function(){return h.$message},set:function(e){h.$message=e}}),v.push(h),b};return h.config=function(e){o=angular.isUndefined(e.startTop)?o:e.startTop,r=angular.isUndefined(e.verticalSpacing)?r:e.verticalSpacing,l=angular.isUndefined(e.duration)?l:e.duration,c=e.templateUrl?e.templateUrl:c,u=angular.isUndefined(e.position)?u:e.position,d=e.container?e.container:d,g=e.maximumOpen?e.maximumOpen:g},h.closeAll=function(){for(var e=m.length-1;e>=0;e--){var t=m[e];t.css("opacity",0).addClass("closed"),t.remove()}},h}]),angular.module("cgNotify").run(["$templateCache",function(e){"use strict";e.put("angular-notify.html","<div class=\"cg-notify-message\" ng-class=\"[$classes, \n $position === 'center' ? 'cg-notify-message-center' : '',\n $position === 'left' ? 'cg-notify-message-left' : '',\n $position === 'right' ? 'cg-notify-message-right' : '']\"\n ng-style=\"{'margin-left': $centerMargin}\">\n\n <div ng-show=\"!$messageTemplate\">\n {{$message}}\n </div>\n\n"+' <div ng-show="$messageTemplate" class="cg-notify-message-template">\n \n </div>\n\n <button type="button" class="cg-notify-close" ng-click="$close()">\n <span aria-hidden="true">×</span>\n <span class="cg-notify-sr-only">Close</span>\n </button>\n\n</div>')}]); 12!function(e,t,n){function o(t,n){if(e.isArray(t)){for(var o=t.length-1;o>=0;o--){var r=t[o];"string"===e.type(r)&&s.transports[r]||(n.log("Invalid transport: "+r+", removing it from the transports list."),t.splice(o,1))}0===t.length&&(n.log("No transports remain within the specified transport array."),t=null)}else if(s.transports[t]||"auto"===t){if("auto"===t&&s._.ieVersion<=8)return["longPolling"]}else n.log("Invalid transport: "+t.toString()+"."),t=null;return t}function r(e){return"http:"===e?80:"https:"===e?443:void 0}function i(e,t){return t.match(/:\d+$/)?t:t+":"+r(e)}function a(t,n){var o=this,r=[];o.tryBuffer=function(n){return t.state===e.signalR.connectionState.connecting&&(r.push(n),!0)},o.drain=function(){if(t.state===e.signalR.connectionState.connected)for(;r.length>0;)n(r.shift())},o.clear=function(){r=[]}}var c={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server. Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",n
12oConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if("function"!=typeof e)throw new Error(c.nojQuery);var s,l,u="complete"===t.document.readyState,d=e(t),p="__Negotiate Aborted__",g={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},f={processData:!0,timeout:null,async:!0,global:!1,cache:!1},v=function(e,n){if(n!==!1){var o;"undefined"!=typeof t.console&&(o="["+(new Date).toTimeString()+"] SignalR: "+e,t.console.debug?t.console.debug(o):t.console.log&&t.console.log(o))}},m=function(t,n,o){return n===t.state&&(t.state=o,e(t).triggerHandler(g.onStateChanged,[{oldState:n,newState:o}]),!0)},h=function(e){return e.state===s.connectionState.disconnected},S=function(e){return e._.keepAliveData.activated&&e.transport.supportsKeepAlive(e)},b=function(n){var o,r;n._.configuredStopReconnectingTimeout||(r=function(t){var n=s._.format(s.resources.reconnectTimeout,t.disconnectTimeout);t.log(n),e(t).triggerHandler(g.onError,[s._.error(n,"TimeoutException")]),t.stop(!1,!1)},n.reconnecting(function(){var e=this;e.state===s.connectionState.reconnecting&&(o=t.setTimeout(function(){r(e)},e.disconnectTimeout))}),n.stateChanged(function(e){e.oldState===s.connectionState.reconnecting&&t.clearTimeout(o)}),n._.configuredStopReconnectingTimeout=!0)};s=function(e,t,n){return new s.fn.init(e,t,n)},s._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var e,n;return"Microsoft Internet Explorer"===t.navigator.appName&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(e=t.parseFloat(n[1]))),e}(),error:function(e,t,n){var o=new Error(e);return o.source=t,"undefined"!=typeof n&&(o.context=n),o},transportError:function(e,t,o,r){var i=this.error(e,o,r);return i.transport=t?t.name:n,i},format:function(){for(var e=arguments[0],t=0;t<arguments.length-1;t++)e=e.replace("{"+t+"}",arguments[t+1]);return e},firefoxMajorVersion:function(e){var t=e.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(n){var o=n._.config,r=function(t){e(n).triggerHandler(g.onError,[t])};o&&!n._.pingIntervalId&&o.pingInterval&&(n._.pingIntervalId=t.setInterval(function(){s.transports._logic.pingServer(n).fail(r)},o.pingInterval))}},s.events=g,s.resources=c,s.ajaxDefaults=f,s.changeState=m,s.isDisconnecting=h,s.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},s.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'></script>.")}},d.load(function(){u=!0}),s.fn=s.prototype={init:function(t,n,o){var r=e(this);this.url=t,this.qs=n,this.lastError=null,this._={keepAliveData:{},connectingMessageBuffer:new a(this,function(e){r.triggerHandler(g.onReceived,[e])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0},"boolean"==typeof o&&(this.logging=o)},_parseResponse:function(e){var t=this;return e&&"string"==typeof e?t.json.parse(e):e},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(n,o){var r;return n=e.trim(n),o=o||t.location,0===n.indexOf("http")&&(r=t.document.createElement("a"),r.href=n,r.protocol+i(r.protocol,r.host)!==o.protocol+i(o.protocol,o.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:s.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(n,r){var i,a=this,l={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},f=a._deferral||e.Deferred(),v=t.document.createElement("a");if(a.lastError=null,a._deferral=f,!a.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if("function"===e.type(n)?r=n:"object"===e.type(n)&&(e.extend(l,n),"function"===e.type(l.callback)&&(r=l.callback)),l.transport=o(l.transport,a),!l.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");
12if(a._.config=l,!u&&l.waitForPageLoad===!0)return a._.deferredStartHandler=function(){a.start(n,r)},d.bind("load",a._.deferredStartHandler),f.promise();if(a.state===s.connectionState.connecting)return f.promise();if(m(a,s.connectionState.disconnected,s.connectionState.connecting)===!1)return f.resolve(a),f.promise();b(a),v.href=a.url,v.protocol&&":"!==v.protocol?(a.protocol=v.protocol,a.host=v.host):(a.protocol=t.document.location.protocol,a.host=v.host||t.document.location.host),a.baseUrl=a.protocol+"//"+a.host,a.wsProtocol="https:"===a.protocol?"wss://":"ws://","auto"===l.transport&&l.jsonp===!0&&(l.transport="longPolling"),0===a.url.indexOf("//")&&(a.url=t.location.protocol+a.url,a.log("Protocol relative URL detected, normalizing it to '"+a.url+"'.")),this.isCrossDomain(a.url)&&(a.log("Auto detected cross domain url."),"auto"===l.transport&&(l.transport=["webSockets","serverSentEvents","longPolling"]),"undefined"==typeof l.withCredentials&&(l.withCredentials=!0),l.jsonp||(l.jsonp=!e.support.cors,l.jsonp&&a.log("Using jsonp because this browser doesn't support CORS.")),a.contentType=s._.defaultContentType),a.withCredentials=l.withCredentials,a.ajaxDataType=l.jsonp?"jsonp":"text",e(a).bind(g.onStart,function(t,n){"function"===e.type(r)&&r.call(a),f.resolve(a)}),a._.initHandler=s.transports._logic.initHandler(a),i=function(n,o){var r=s._.error(c.noTransportOnInit);if(o=o||0,o>=n.length)return 0===o?a.log("No transports supported by the server were selected."):1===o?a.log("No fallback transports were selected."):a.log("Fallback transports exhausted."),e(a).triggerHandler(g.onError,[r]),f.reject(r),void a.stop();if(a.state!==s.connectionState.disconnected){var l=n[o],u=s.transports[l],p=function(){i(n,o+1)};a.transport=u;try{a._.initHandler.start(u,function(){var n=s._.firefoxMajorVersion(t.navigator.userAgent)>=11,o=!!a.withCredentials&&n;a.log("The start request succeeded. Transitioning to the connected state."),S(a)&&s.transports._logic.monitorKeepAlive(a),s.transports._logic.startHeartbeat(a),s._.configurePingInterval(a),m(a,s.connectionState.connecting,s.connectionState.connected)||a.log("WARNING! The connection was not in the connecting state."),a._.connectingMessageBuffer.drain(),e(a).triggerHandler(g.onStart),d.bind("unload",function(){a.log("Window unloading, stopping the connection."),a.stop(o)}),n&&d.bind("beforeunload",function(){t.setTimeout(function(){a.stop(o)},0)})},p)}catch(v){a.log(u.name+" transport threw '"+v.message+"' when attempting to start."),p()}}};var h=a.url+"/negotiate",_=function(t,n){var o=s._.error(c.errorOnNegotiate,t,n._.negotiateRequest);e(n).triggerHandler(g.onError,o),f.reject(o),n.stop()};return e(a).triggerHandler(g.onStarting),h=s.transports._logic.prepareQueryString(a,h),a.log("Negotiating with '"+h+"'."),a._.negotiateRequest=s.transports._logic.ajax(a,{url:h,error:function(e,t){t!==p?_(e,a):f.reject(s._.error(c.stoppedWhileNegotiating,null,a._.negotiateRequest))},success:function(t){var n,o,r,u=[],d=[];try{n=a._parseResponse(t)}catch(p){return void _(s._.error(c.errorParsingNegotiateResponse,p),a)}return o=a._.keepAliveData,a.appRelativeUrl=n.Url,a.id=n.ConnectionId,a.token=n.ConnectionToken,a.webSocketServerUrl=n.WebSocketServerUrl,a._.pollTimeout=1e3*n.ConnectionTimeout+1e4,a.disconnectTimeout=1e3*n.DisconnectTimeout,a._.totalTransportConnectTimeout=a.transportConnectTimeout+1e3*n.TransportConnectTimeout,n.KeepAliveTimeout?(o.activated=!0,o.timeout=1e3*n.KeepAliveTimeout,o.timeoutWarning=o.timeout*a.keepAliveWarnAt,a._.beatInterval=(o.timeout-o.timeoutWarning)/3):o.activated=!1,a.reconnectWindow=a.disconnectTimeout+(o.timeout||0),n.ProtocolVersion&&n.ProtocolVersion===a.clientProtocol?(e.each(s.transports,function(e){return 0===e.indexOf("_")||"webSockets"===e&&!n.TryWebSockets||void d.push(e)}),e.isArray(l.transport)?e.each(l.transport,function(t,n){e.inArray(n,d)>=0&&u.push(n)}):"auto"===l.transport?u=d:e.inArray(l.transport,d)>=0&&u.push(l.transport),void i(u)):(r=s._.error(s._.format(c.protocolIncompatible,a.clientProtocol,n.ProtocolVersion)),e(a).triggerHandler(g.onError,[r]),void f.reject(r))}}),f.promise()},starting:function(t){var n=this;return e(n).bind(g.onStarting,function(e,o){t.call(n)}),n},send:function(e){var t=this;if(t.state===s.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===s.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,e),t},received:function(t){var n=this;return e(n).bind(g.onReceived,function(e,o){t.call(n,o)}),n},stateChanged:function(t){var n=this;return e(n).bind(g.onStateChanged,function(e,o){t.call(n,o)}),n},error:function(t){var n=this;return e(n).bind(g.onError,function(e,o,r){n.lastError=o,t.call(n,o,r)}),n},disconnected:function(t){var n=this;return e(n).bind(g.onDisconnect,function(e,o){t.call(n)}),n},connectionSlow:function(t){var n=this;return e(n).bind(g.onConnectionSlow,function(e,o){t.call(n)}),n},reconnecting:function(t){var n=this;return e(n).bind(g.onReconnecting,function(e,o){t.call(n)}),n},reconnected:function(t){var n=this;return e(n).bind(g.onReconnect,function(e,o){t.call(n)}),n},stop:function(n,o){var r=this,i=r._deferral;return r._.deferredStartHandler&&d.unbind("load",r._.deferredStartHandler),delete r._.config,delete r._.deferredStartHandler,u||r._.config&&r._.config.waitForPageLoad!==!0?r.state!==s.connectionState.disconnected?(r.log("Stopping connection."),m(r,r.state,s.connectionState.disconnected),t.clearTimeout(r._.beatHandle),t.clearInterval(r._.pingIntervalId),r.transport&&(r.transport.stop(r),o!==!1&&r.transport.abort(r,n),S(r)&&s.transports._logic.stopMonitoringKeepAlive(r),r.transport=null),r._.negotiateRequest&&(r._.negotiateRequest.abort(p),delete r._.negotiateRequest),r._.initHandler&&r._.initHandler.stop(),e(r).triggerHandler(g.onDisconnect),delete r._deferral,delete r.messageId,delete r.groupsToken,delete r.id,delete r._.pingIntervalId,delete r._.lastMessageAt,delete r._.lastActiveAt,r._.connectingMessageBuffer.clear(),r):void 0:(r.log("Stopping connection prior to negotiate."),void(i&&i.reject(s._.error(c.stoppedWhileLoading))))},log:function(e){v(e,this.logging)}},s.fn.init.prototype=s.fn,s.noConflict=function(){return e.connection===s&&(e.connection=l),s},e.connection&&(l=e.connection),e.connection=e.signalR=s}(window.jQuery,window),function(e,t,n){function o(e){e._.keepAliveData.monitoring&&r(e),c.markActive(e)&&(e._.beatHandle=t.setTimeout(function(){o(e)},e._.beatInterval))}function r(t){var n,o=t._.keepAliveData;t.state===s.connectionState.connected&&(n=(new Date).getTime()-t._.lastMessageAt,n>=o.timeout?(t.log("Keep alive timed out. Notifying transport that c
12onnection has been lost."),t.transport.lostConnection(t)):n>=o.timeoutWarning?o.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),e(t).triggerHandler(l.onConnectionSlow),o.userNotified=!0):o.userNotified=!1)}function i(e,t){var n=e.url+t;return e.transport&&(n+="?transport="+e.transport.name),c.prepareQueryString(e,n)}function a(e){this.connection=e,this.startRequested=!1,this.startCompleted=!1,this.connectionStopped=!1}var c,s=e.signalR,l=e.signalR.events,u=e.signalR.changeState,d="__Start Aborted__";s.transports={},a.prototype={start:function(e,o,r){var i=this,a=i.connection,c=!1;return i.startRequested||i.connectionStopped?void a.log("WARNING! "+e.name+" transport cannot be started. Initialization ongoing or completed."):(a.log(e.name+" transport starting."),i.transportTimeoutHandle=t.setTimeout(function(){c||(c=!0,a.log(e.name+" transport timed out when trying to connect."),i.transportFailed(e,n,r))},a._.totalTransportConnectTimeout),void e.start(a,function(){c||i.initReceived(e,o)},function(t){return c||(c=!0,i.transportFailed(e,t,r)),!i.startCompleted||i.connectionStopped}))},stop:function(){this.connectionStopped=!0,t.clearTimeout(this.transportTimeoutHandle),s.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(e,n){var o=this,r=o.connection;return o.startRequested?void r.log("WARNING! The client received multiple init messages."):void(o.connectionStopped||(o.startRequested=!0,t.clearTimeout(o.transportTimeoutHandle),r.log(e.name+" transport connected. Initiating start request."),s.transports._logic.ajaxStart(r,function(){o.startCompleted=!0,n()})))},transportFailed:function(n,o,r){var i,a=this.connection,c=a._deferral;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(i=s._.error(s.resources.errorDuringStartRequest,o),a.log(n.name+" transport failed during the start request. Stopping the connection."),e(a).triggerHandler(l.onError,[i]),c&&c.reject(i),a.stop()):(n.stop(a),a.log(n.name+" transport failed to connect. Attempting to fall back."),r()))}},c=s.transports._logic={ajax:function(t,n){return e.ajax(e.extend(!0,{},e.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},n))},pingServer:function(t){var n,o,r=e.Deferred();return t.transport?(n=t.url+"/ping",n=c.addQs(n,t.qs),o=c.ajax(t,{url:n,success:function(e){var n;try{n=t._parseResponse(e)}catch(i){return r.reject(s._.transportError(s.resources.pingServerFailedParse,t.transport,i,o)),void t.stop()}"pong"===n.Response?r.resolve():r.reject(s._.transportError(s._.format(s.resources.pingServerFailedInvalidResponse,e),t.transport,null,o))},error:function(e){401===e.status||403===e.status?(r.reject(s._.transportError(s._.format(s.resources.pingServerFailedStatusCode,e.status),t.transport,e,o)),t.stop()):r.reject(s._.transportError(s.resources.pingServerFailed,t.transport,e,o))}})):r.reject(s._.transportError(s.resources.noConnectionTransport,t.transport)),r.promise()},prepareQueryString:function(e,n){var o;return o=c.addQs(n,"clientProtocol="+e.clientProtocol),o=c.addQs(o,e.qs),e.token&&(o+="&connectionToken="+t.encodeURIComponent(e.token)),e.data&&(o+="&connectionData="+t.encodeURIComponent(e.data)),o},addQs:function(t,n){var o,r=t.indexOf("?")!==-1?"&":"?";if(!n)return t;if("object"==typeof n)return t+r+e.param(n);if("string"==typeof n)return o=n.charAt(0),"?"!==o&&"&"!==o||(r=""),t+r+n;throw new Error("Query string property must be either a string or object.")},getUrl:function(e,n,o,r,i){var a="webSockets"===n?"":e.baseUrl,s=a+e.appRelativeUrl,l="transport="+n;return!i&&e.groupsToken&&(l+="&groupsToken="+t.encodeURIComponent(e.groupsToken)),o?(s+=r?"/poll":"/reconnect",!i&&e.messageId&&(l+="&messageId="+t.encodeURIComponent(e.messageId))):s+="/connect",s+="?"+l,s=c.prepareQueryString(e,s),i||(s+="&tid="+Math.floor(11*Math.random())),s},maximizePersistentResponse:function(e){return{MessageId:e.C,Messages:e.M,Initialized:"undefined"!=typeof e.S,ShouldReconnect:"undefined"!=typeof e.T,LongPollDelay:e.L,GroupsToken:e.G}},updateGroups:function(e,t){t&&(e.groupsToken=t)},stringifySend:function(e,t){return"string"==typeof t||"undefined"==typeof t||null===t?t:e.json.stringify(t)},ajaxSend:function(t,n){var o,r=c.stringifySend(t,n),a=i(t,"/send"),u=function(t,r){e(r).triggerHandler(l.onError,[s._.transportError(s.resources.sendFailed,r.transport,t,o),n])};
12return o=c.ajax(t,{url:a,type:"jsonp"===t.ajaxDataType?"GET":"POST",contentType:s._.defaultContentType,data:{data:r},success:function(e){var n;if(e){try{n=t._parseResponse(e)}catch(o){return u(o,t),void t.stop()}c.triggerReceived(t,n)}},error:function(e,n){"abort"!==n&&"parsererror"!==n&&u(e,t)}})},ajaxAbort:function(e,t){if("undefined"!=typeof e.transport){t="undefined"==typeof t||t;var n=i(e,"/abort");c.ajax(e,{url:n,async:t,timeout:1e3,type:"POST"}),e.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,n){var o=function(e){var n=t._deferral;n&&n.reject(e)},r=function(n){t.log("The start request failed. Stopping the connection."),e(t).triggerHandler(l.onError,[n]),o(n),t.stop()};t._.startRequest=c.ajax(t,{url:i(t,"/start"),success:function(e,o,i){var a;try{a=t._parseResponse(e)}catch(c){return void r(s._.error(s._.format(s.resources.errorParsingStartResponse,e),c,i))}"started"===a.Response?n():r(s._.error(s._.format(s.resources.invalidStartResponse,e),null,i))},error:function(e,n,i){n!==d?r(s._.error(s.resources.errorDuringStartRequest,i,e)):(t.log("The start request aborted because connection.stop() was called."),o(s._.error(s.resources.stoppedDuringStartRequest,null,e)))}})},tryAbortStartRequest:function(e){e._.startRequest&&(e._.startRequest.abort(d),delete e._.startRequest)},tryInitialize:function(e,t){e.Initialized&&t()},triggerReceived:function(t,n){t._.connectingMessageBuffer.tryBuffer(n)||e(t).triggerHandler(l.onReceived,[n])},processMessages:function(t,n,o){var r;c.markLastMessage(t),n&&(r=c.maximizePersistentResponse(n),c.updateGroups(t,r.GroupsToken),r.MessageId&&(t.messageId=r.MessageId),r.Messages&&(e.each(r.Messages,function(e,n){c.triggerReceived(t,n)}),c.tryInitialize(r,o)))},monitorKeepAlive:function(t){var n=t._.keepAliveData;n.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(n.monitoring=!0,c.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){c.markLastMessage(t)},e(t).bind(l.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+n.timeoutWarning+", keep alive timeout of "+n.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var n=t._.keepAliveData;n.monitoring&&(n.monitoring=!1,e(t).unbind(l.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(e){e._.lastActiveAt=(new Date).getTime(),o(e)},markLastMessage:function(e){e._.lastMessageAt=(new Date).getTime()},markActive:function(e){return!!c.verifyLastActive(e)&&(e._.lastActiveAt=(new Date).getTime(),!0)},isConnectedOrReconnecting:function(e){return e.state===s.connectionState.connected||e.state===s.connectionState.reconnecting},ensureReconnectingState:function(t){return u(t,s.connectionState.connected,s.connectionState.reconnecting)===!0&&e(t).triggerHandler(l.onReconnecting),t.state===s.connectionState.reconnecting},clearReconnectTimeout:function(e){e&&e._.reconnectTimeout&&(t.clearTimeout(e._.reconnectTimeout),delete e._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var n=s._.format(s.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(n),e(t).triggerHandler(l.onError,[s._.error(n,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(e,n){var o=s.transports[n];if(c.isConnectedOrReconnecting(e)&&!e._.reconnectTimeout){if(!c.verifyLastActive(e))return;e._.reconnectTimeout=t.setTimeout(function(){c.verifyLastActive(e)&&(o.stop(e),c.ensureReconnectingState(e)&&(e.log(n+" reconnecting."),o.start(e)))},e.reconnectDelay)}},handleParseFailure:function(t,n,o,r,i){var a=s._.transportError(s._.format(s.resources.parseFailed,n),t.transport,o,i);r&&r(a)?t.log("Failed to parse server response while attempting to connect."):(e(t).triggerHandler(l.onError,[a]),t.stop())},initHandler:function(e){return new a(e)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic;o.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,n){var i=a.stringifySend(t,n);try{t.socket.send(i)}catch(c){e(t).triggerHandler(r.onError,[o._.transportError(o.resources.webSocketsInvalidState,t.transport,c,t.socket),n])}},start:function(n,c,s){var l,u=!1,d=this,p=!c,g=e(n);
12return t.WebSocket?void(n.socket||(l=n.webSocketServerUrl?n.webSocketServerUrl:n.wsProtocol+n.host,l+=a.getUrl(n,this.name,p),n.log("Connecting to websocket endpoint '"+l+"'."),n.socket=new t.WebSocket(l),n.socket.onopen=function(){u=!0,n.log("Websocket opened."),a.clearReconnectTimeout(n),i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&g.triggerHandler(r.onReconnect)},n.socket.onclose=function(t){var i;this===n.socket&&(u&&"undefined"!=typeof t.wasClean&&t.wasClean===!1?(i=o._.transportError(o.resources.webSocketClosed,n.transport,t),n.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):n.log("Websocket closed."),s&&s(i)||(i&&e(n).triggerHandler(r.onError,[i]),d.reconnect(n)))},n.socket.onmessage=function(t){var o;try{o=n._parseResponse(t.data)}catch(r){return void a.handleParseFailure(n,t.data,r,s,t)}o&&(e.isEmptyObject(o)||o.M?a.processMessages(n,o,c):a.triggerReceived(n,o))})):void s()},reconnect:function(e){a.reconnect(e,this.name)},lostConnection:function(e){this.reconnect(e)},stop:function(e){a.clearReconnectTimeout(e),e.socket&&(e.log("Closing the Websocket."),e.socket.close(),e.socket=null)},abort:function(e,t){a.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic,c=function(e){t.clearTimeout(e._.reconnectAttemptTimeoutHandle),delete e._.reconnectAttemptTimeoutHandle};o.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(n,s,l){var u,d=this,p=!1,g=e(n),f=!s;if(n.eventSource&&(n.log("The connection already has an event source. Stopping it."),n.stop()),!t.EventSource)return void(l&&(n.log("This browser doesn't support SSE."),l()));u=a.getUrl(n,this.name,f);try{n.log("Attempting to connect to SSE endpoint '"+u+"'."),n.eventSource=new t.EventSource(u,{withCredentials:n.withCredentials})}catch(v){return n.log("EventSource failed trying to connect with error "+v.Message+"."),void(l?l():(g.triggerHandler(r.onError,[o._.transportError(o.resources.eventSourceFailedToConnect,n.transport,v)]),f&&d.reconnect(n)))}f&&(n._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){p===!1&&n.eventSource.readyState!==t.EventSource.OPEN&&d.reconnect(n)},d.timeOut)),n.eventSource.addEventListener("open",function(e){n.log("EventSource connected."),c(n),a.clearReconnectTimeout(n),p===!1&&(p=!0,i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&g.triggerHandler(r.onReconnect))},!1),n.eventSource.addEventListener("message",function(e){var t;if("initialized"!==e.data){try{t=n._parseResponse(e.data)}catch(o){return void a.handleParseFailure(n,e.data,o,l,e)}a.processMessages(n,t,s)}},!1),n.eventSource.addEventListener("error",function(e){var i=o._.transportError(o.resources.eventSourceError,n.transport,e);this===n.eventSource&&(l&&l(i)||(n.log("EventSource readyState: "+n.eventSource.readyState+"."),e.eventPhase===t.EventSource.CLOSED?(n.log("EventSource reconnecting due to the server connection ending."),d.reconnect(n)):(n.log("EventSource error."),g.triggerHandler(r.onError,[i]))))},!1)},reconnect:function(e){a.reconnect(e,this.name)},lostConnection:function(e){this.reconnect(e)},send:function(e,t){a.ajaxSend(e,t)},stop:function(e){c(e),a.clearReconnectTimeout(e),e&&e.eventSource&&(e.log("EventSource calling close()."),e.eventSource.close(),e.eventSource=null,delete e.eventSource)},abort:function(e,t){a.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic,c=function(){var e=t.document.createElement("iframe");return e.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),e},s=function(){var e=null,n=1e3,r=0;return{prevent:function(){o._.ieVersion<=8&&(0===r&&(e=t.setInterval(function(){var e=c();t.document.body.appendChild(e),t.document.body.removeChild(e),e=null},n)),r++)},cancel:function(){1===r&&t.clearInterval(e),r>0&&r--}}}();o.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(e,n,o){var r,i=this,l=a.foreverFrame.count+=1,u=c(),d=function(){e.log("Forever frame iframe finished loading and is no longer receiving messages."),o&&o()||i.reconnect(e)};return t.EventSource?void(o&&(e.log("Forever Frame is not supported by SignalR on browsers with SSE supp
12ort."),o())):(u.setAttribute("data-signalr-connection-id",e.id),s.prevent(),r=a.getUrl(e,this.name),r+="&frameId="+l,t.document.documentElement.appendChild(u),e.log("Binding to iframe's load event."),u.addEventListener?u.addEventListener("load",d,!1):u.attachEvent&&u.attachEvent("onload",d),u.src=r,a.foreverFrame.connections[l]=e,e.frame=u,e.frameId=l,void(n&&(e.onSuccess=function(){e.log("Iframe transport started."),n()})))},reconnect:function(e){var n=this;a.isConnectedOrReconnecting(e)&&a.verifyLastActive(e)&&t.setTimeout(function(){if(a.verifyLastActive(e)&&e.frame&&a.ensureReconnectingState(e)){var t=e.frame,o=a.getUrl(e,n.name,!0)+"&frameId="+e.frameId;e.log("Updating iframe src to '"+o+"'."),t.src=o}},e.reconnectDelay)},lostConnection:function(e){this.reconnect(e)},send:function(e,t){a.ajaxSend(e,t)},receive:function(t,n){var r,i,c;if(t.json!==t._originalJson&&(n=t._originalJson.stringify(n)),c=t._parseResponse(n),a.processMessages(t,c,t.onSuccess),t.state===e.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>o.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,r=t.frame.contentWindow||t.frame.contentDocument,r&&r.document&&r.document.body)))for(i=r.document.body;i.firstChild;)i.removeChild(i.firstChild)},stop:function(e){var n=null;if(s.cancel(),e.frame){if(e.frame.stop)e.frame.stop();else try{n=e.frame.contentWindow||e.frame.contentDocument,n.document&&n.document.execCommand&&n.document.execCommand("Stop")}catch(o){e.log("Error occured when stopping foreverFrame transport. Message = "+o.message+".")}e.frame.parentNode===t.document.body&&t.document.body.removeChild(e.frame),delete a.foreverFrame.connections[e.frameId],e.frame=null,e.frameId=null,delete e.frame,delete e.frameId,delete e.onSuccess,delete e.frameMessageCount,e.log("Stopping forever frame.")}},abort:function(e,t){a.ajaxAbort(e,t)},getConnection:function(e){return a.foreverFrame.connections[e]},started:function(t){i(t,o.connectionState.reconnecting,o.connectionState.connected)===!0&&e(t).triggerHandler(r.onReconnect)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=e.signalR.isDisconnecting,c=o.transports._logic;o.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(n,s,l){var u=this,d=function(){d=e.noop,n.log("LongPolling connected."),s()},p=function(e){return!!l(e)&&(n.log("LongPolling failed to connect."),!0)},g=n._,f=0,v=function(n){t.clearTimeout(g.reconnectTimeoutId),g.reconnectTimeoutId=null,i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&(n.log("Raising the reconnect event"),e(n).triggerHandler(r.onReconnect))},m=36e5;n.pollXhr&&(n.log("Polling xhr requests already exists, aborting."),n.stop()),n.messageId=null,g.reconnectTimeoutId=null,g.pollTimeoutId=t.setTimeout(function(){!function i(s,l){var h=s.messageId,S=null===h,b=!S,_=!l,y=c.getUrl(s,u.name,b,_,!0),T={};s.messageId&&(T.messageId=s.messageId),s.groupsToken&&(T.groupsToken=s.groupsToken),a(s)!==!0&&(n.log("Opening long polling request to '"+y+"'."),s.pollXhr=c.ajax(n,{xhrFields:{onprogress:function(){c.markLastMessage(n)}},url:y,type:"POST",contentType:o._.defaultContentType,data:T,timeout:n._.pollTimeout,success:function(o){var r,l,u,m=0;n.log("Long poll complete."),f=0;try{r=n._parseResponse(o)}catch(h){return void c.handleParseFailure(s,o,h,p,s.pollXhr)}null!==g.reconnectTimeoutId&&v(s),r&&(l=c.maximizePersistentResponse(r)),c.processMessages(s,r,d),l&&"number"===e.type(l.LongPollDelay)&&(m=l.LongPollDelay),a(s)!==!0&&(u=l&&l.ShouldReconnect,u&&!c.ensureReconnectingState(s)||(m>0?g.pollTimeoutId=t.setTimeout(function(){i(s,u)},m):i(s,u)))},error:function(a,l){var d=o._.transportError(o.resources.longPollFailed,n.transport,a,s.pollXhr);if(t.clearTimeout(g.reconnectTimeoutId),g.reconnectTimeoutId=null,"abort"===l)return void n.log("Aborted xhr request.");if(!p(d)){if(f++,n.state!==o.connectionState.reconnecting&&(n.log("An error occurred using longPolling. Status = "+l+". Response = "+a.responseText+"."),e(s).triggerHandler(r.onError,[d])),(n.state===o.connectionState.connected||n.state===o.connectionState.reconnecting)&&!c.verifyLastActive(n))return;if(!c.ensureReconnectingState(s))return;g.pollTimeoutId=t.setTimeout(function(){i(s,!0)},u.reconnectDelay)}}}),b&&l===!0&&(g.reconnectTimeoutId=t.setTimeout(function(){v(s)},Math.min(1e3*(Math.pow(2,f)-1),m))))}(n)},250)},lostConnection:function(e){e.pollXhr&&e.pollXhr.abort("lostConnection")},send:function(e,t){c.ajaxSend(e,t)}, 13stop:function(e){t.clearTimeout(e._.pollTimeoutId),t.clearTimeout(e._.reconnectTimeoutId),delete e._.pollTimeoutId,delete e._.reconnectTimeoutId,e.pollXhr&&(e.pollXhr.abort(),e.pollXhr=null,delete e.pollXhr)},abort:function(e,t){c.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){function o(e){return e+u}function r(e,t,n){var o,r=e.length,i=[];for(o=0;o<r;o+=1)e.hasOwnProperty(o)&&(i[o]=t.call(n,e[o],o,e));return i}function i(t){return e.isFunction(t)?null:"undefined"===e.type(t)?null:t}function a(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function c(e,t){var n,o=e._.invocationCallbacks;a(o)&&e.log("Clearing hub invocation callbacks with error: "+t+"."),e._.invocationCallbackId=0,delete e._.invocationCallbacks,e._.invocationCallbacks={};for(var r in o)n=o[r],n.method.call(n.scope,{E:t})}function s(e,t){return new s.fn.init(e,t)}function l(t,n){var o={qs:null,logging:!1,useDefaultPath:!0};return e.extend(o,n),t&&!o.useDefaultPath||(t=(t||"")+"/signalr"),new l.fn.init(t,o)}var u=".hubProxy",d=e.signalR;s.fn=s.prototype={init:function(e,t){this.state={},this.connection=e,this.hubName=t,this._={callbackMap:{}}},constructor:s,hasSubscriptions:function(){return a(this._.callbackMap)},on:function(t,n){var r=this,i=r._.callbackMap;return t=t.toLowerCase(),i[t]||(i[t]={}),i[t][n]=function(e,t){n.apply(r,t)},e(r).bind(o(t),i[t][n]),r},off:function(t,n){var r,i=this,c=i._.callbackMap;return t=t.toLowerCase(),r=c[t],r&&(r[n]?(e(i).unbind(o(t),r[n]),delete r[n],a(r)||delete c[t]):n||(e(i).unbind(o(t)),delete c[t])),i},invoke:function(t){var n=this,o=n.connection,a=e.makeArray(arguments).slice(1),c=r(a,i),s={H:n.hubName,M:t,A:c,I:o._.invocationCallbackId},l=e.Deferred(),u=function(r){var i,a,c=n._maximizeHubResponse(r);e.extend(n.state,c.State),c.Progress?l.notifyWith?l.notifyWith(n,[c.Progress.Data]):o._.progressjQueryVersionLogged||(o.log("A hub method invocation progress update was received but the version of jQuery in use ("+e.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),o._.progressjQueryVersionLogged=!0):c.Error?(c.StackTrace&&o.log(c.Error+"\n"+c.StackTrace+"."),i=c.IsHubException?"HubException":"Exception",a=d._.error(c.Error,i),a.data=c.ErrorData,o.log(n.hubName+"."+t+" failed to execute. Error: "+a.message),l.rejectWith(n,[a])):(o.log("Invoked "+n.hubName+"."+t),l.resolveWith(n,[c.Result]))};return o._.invocationCallbacks[o._.invocationCallbackId.toString()]={scope:n,method:u},o._.invocationCallbackId+=1,e.isEmptyObject(n.state)||(s.S=n.state),o.log("Invoking "+n.hubName+"."+t),o.send(s),l.promise()},_maximizeHubResponse:function(e){return{State:e.S,Result:e.R,Progress:e.P?{Id:e.P.I,Data:e.P.D}:null,Id:e.I,IsHubException:e.H,Error:e.E,StackTrace:e.T,ErrorData:e.D}}},s.fn.init.prototype=s.fn,l.fn=l.prototype=e.connection(),l.fn.init=function(t,n){var r={qs:null,logging:!1,useDefaultPath:!0},i=this;e.extend(r,n),e.signalR.fn.init.call(i,t,r.qs,r.logging),i.proxies={},i._.invocationCallbackId=0,i._.invocationCallbacks={},i.received(function(t){var n,r,a,c,s,l;t&&("undefined"!=typeof t.P?(a=t.P.I.toString(),c=i._.invocationCallbacks[a],c&&c.method.call(c.scope,t)):"undefined"!=typeof t.I?(a=t.I.toString(),c=i._.invocationCallbacks[a],c&&(i._.invocationCallbacks[a]=null,delete i._.invocationCallbacks[a],c.method.call(c.scope,t))):(n=this._maximizeClientHubInvocation(t),i.log("Triggering client hub event '"+n.Method+"' on hub '"+n.Hub+"'."),s=n.Hub.toLowerCase(),l=n.Method.toLowerCase(),r=this.proxies[s],e.extend(r.state,n.State),e(r).triggerHandler(o(l),[n.Args])))}),i.error(function(e,t){var n,o;t&&(n=t.I,o=i._.invocationCallbacks[n],o&&(i._.invocationCallbacks[n]=null,delete i._.invocationCallbacks[n],o.method.call(o.scope,{E:e})))}),i.reconnecting(function(){i.transport&&"webSockets"===i.transport.name&&c(i,"Connection started reconnecting before invocation result was received.")}),i.disconnected(function(){c(i,"Connection was disconnected before invocation result was received.")})},l.fn._maximizeClientHubInvocation=function(e){return{Hub:e.H,Method:e.M,Args:e.A,State:e.S}},l.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var n=[];e.each(t.proxies,function(e){this.hasSubscriptions()&&(n.push({name:e}),t.log("Client subscribed to hub '"+e+"'."))}),0===n.length&&t.log("No hubs have been subscribed to. The client will not receive data from hubs. To fix, declare at least one client side function prior to connection start for each hub you wish to
vendor: 43,675 bytes, lines 13-18
13subscribe to."),t.data=t.json.stringify(n)}))},l.fn.createHubProxy=function(e){e=e.toLowerCase();var t=this.proxies[e];return t||(t=s(this,e),this.proxies[e]=t),this._registerSubscribedHubs(),t},l.fn.init.prototype=l.fn,e.hubConnection=l}(window.jQuery,window),function(e,t){e.signalR.version="2.2.0"}(window.jQuery); 14angular.module("SignalR",[]).constant("$",$).factory("Hub",["$",function(n){function o(o){var t=null;return t=o&&o.rootPath?n.hubConnection(o.rootPath,{useDefaultPath:!1}):n.hubConnection(),t.logging=!(!o||!o.logging),t}function t(n){var t=!(n&&n.useSharedConnection===!1);return t?"undefined"==typeof r[n.rootPath]?r[n.rootPath]=o(n):r[n.rootPath]:o(n)}var r=[];return function(o,r){var e=this;return e.connection=t(r),e.proxy=e.connection.createHubProxy(o),e.on=function(n,o){e.proxy.on(n,o)},e.invoke=function(n,o){return e.proxy.invoke.apply(e.proxy,arguments)},e.disconnect=function(){e.connection.stop()},e.connect=function(){return e.connection.start(r.transport?{transport:r.transport}:null)},r&&r.listeners&&angular.forEach(r.listeners,function(n,o){e.on(o,n)}),r&&r.methods&&angular.forEach(r.methods,function(o){e[o]=function(){var t=n.makeArray(arguments);return t.unshift(o),e.invoke.apply(e,t)}}),r&&r.queryParams&&(e.connection.qs=r.queryParams),r&&r.errorHandler&&e.connection.error(r.errorHandler),r&&r.hubDisconnected&&e.connection.disconnected(r.hubDisconnected),r&&r.stateChanged&&e.connection.stateChanged(r.stateChanged),e.promise=e.connect(),e}}]); 15!function(){"use strict";angular.module("ui.indeterminate",[]).directive("uiIndeterminate",[function(){return{compile:function(e,n){return n.type&&"checkbox"===n.type.toLowerCase()?function(e,n,t){e.$watch(t.uiIndeterminate,function(e){n[0].indeterminate=!!e})}:angular.noop}}}])}(); 16!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return $n.apply(null,arguments)}function e(t){$n=t}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t,e){for(var n in e)r(e,n)&&(t[n]=e[n]);return r(e,"toString")&&(t.toString=e.toString),r(e,"valueOf")&&(t.valueOf=e.valueOf),t}function o(t,e,n,i){return Wt(t,e,n,i,!0).utc()}function u(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function d(t){return null==t._pf&&(t._pf=u()),t._pf}function h(t){if(null==t._isValid){var e=d(t);t._isValid=!(isNaN(t._d.getTime())||!(e.overflow<0)||e.empty||e.invalidMonth||e.invalidWeekday||e.nullInput||e.invalidFormat||e.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function l(t){var e=o(NaN);return null!=t?a(d(e),t):d(e).userInvalidated=!0,e}function c(t){return void 0===t}function f(t,e){var n,i,s;if(c(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),c(e._i)||(t._i=e._i),c(e._f)||(t._f=e._f),c(e._l)||(t._l=e._l),c(e._strict)||(t._strict=e._strict),c(e._tzm)||(t._tzm=e._tzm),c(e._isUTC)||(t._isUTC=e._isUTC),c(e._offset)||(t._offset=e._offset),c(e._pf)||(t._pf=d(e)),c(e._locale)||(t._locale=e._locale),Jn.length>0)for(n in Jn)i=Jn[n],s=e[i],c(s)||(t[i]=s);return t}function m(e){f(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),Bn===!1&&(Bn=!0,t.updateOffset(this),Bn=!1)}function _(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function y(t){return t<0?Math.ceil(t):Math.floor(t)}function g(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=y(e)),n}function p(t,e,n){var i,s=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),a=0;for(i=0;i<s;i++)(n&&t[i]!==e[i]||!n&&g(t[i])!==g(e[i]))&&a++;return a+r}function v(){}function D(t){return t?t.toLowerCase().replace("_","-"):t}function M(t){for(var e,n,i,s,r=0;r<t.length;){for(s=D(t[r]).split("-"),e=s.length,n=D(t[r+1]),n=n?n.split("-"):null;e>0;){if(i=Y(s.slice(0,e).join("-")))return i;if(n&&n.length>=e&&p(s,n,!0)>=e-1)break;e--}r++}return null}function Y(t){var e=null;if(!Qn[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=qn._abbr,require("./locale/"+t),S(e)}catch(n){}return Qn[t]}function S(t,e){var n;return t&&(n=c(e)?k(t):w(t,e),n&&(qn=n)),qn._abbr}function w(t,e){return null!==e?(e.abbr=t,Qn[t]=Qn[t]||new v,Qn[t].set(e),S(t),Qn[t]):(delete Qn[t],null)}function k(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return qn;if(!n(t)){if(e=Y(t))return e;t=[t]}return M(t)}function T(t,e){var n=t.toLowerCase();Xn[n]=Xn[n+"s"]=Xn[e]=t}function b(t){return"string"==typeof t?Xn[t]||Xn[t.toLowerCase()]:void 0}function O(t){var e,n,i={};for(n in t)r(t,n)&&(e=b(n),e&&(i[e]=t[n]));return i}function W(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function x(e,n){return function(i){return null!=i?(G(this,e,i),t.updateOffset(this,n),this):U(this,e)}}function U(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function G(t,e,n){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](n)}function P(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=b(t),W(this[t]))return this[t](e);return this}function C(t,e,n){var i=""+Math.abs(t),s=e-i.length,r=t>=0;return(r?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+i}function F(t,e,n,i){var s=i;"string"==typeof i&&(s=function(){return this[i]()}),t&&(ni[t]=s),e&&(ni[e[0]]=function(){return C(s.apply(this,arguments),e[1],e[2])}),n&&(ni[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function H(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function V(t){var e,n,i=t.match(Kn);for(e=0,n=i.length;e<n;e++)ni[i[e]]?i[e]=ni[i[e]]:i[e]=H(i[e]);return function(s){var r="";for(e=0;e<n;e++)r+=i[e]instanceof Function?i[e].call(s,t):i[e];return r}}function L(t,e){return t.isValid()?(e=I(e,t.localeData()),ei[e]=ei[e]||V(e),ei[e](t)):t.localeData().invalidDate()}function I(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(ti.lastIndex=0;i>=0&&ti.test(t);)t=t.replace(ti,n),ti.lastIndex=0,i-=1;return t}function N(t,e,n){Di[t]=W(e)?e:function(t,i){return t&&n?n:e}}function A(t,e){return r(Di,t)?Di[t](e._strict,e._locale):new RegExp(R(t))}function R(t){return E(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,s){return e||n||i||s}))}function E(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(i=function(t,n){n[e]=g(t)}),n=0;n<t.length;n++)Mi[t[n]]=i}function Z(t,e){z(t,function(t,n,i,s){i._w=i._w||{},e(t,i._w,i,s)})}function j(t,e,n){null!=e&&r(Mi,t)&&Mi[t](e,n._a,n,t)}function $(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function q(t,e){return n(this._months)?this._months[t.month()]:this._months[Ui.test(e)?"format":"standalone"][t.month()]}function J(t,e){return n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Ui.test(e)?"format":"standalone"][t.month()]}function B(t,e,n){var i,s,r;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(s=o([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function Q(t,e){var n;return t.isValid()?"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),$(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t):t}function X(e){return null!=e?(Q(this,e),t.updateOffset(this,!0),this):U(this,"Month")}function K(){return $(this.year(),this.month())}function tt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||nt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function et(t){return this._monthsParseExact?(r(this,"_monthsRegex")||nt.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function nt(){function t(t,e){return e.length-t.length}var e,n,i=[],s=[],r=[];for(e=0;e<12;e++)n=o([2e3,e]),i.push(this.monthsShort(n,"")),s.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),s.sort(t),r.sort(t),e=0;e<12;e++)i[e]=E(i[e]),s[e]=E(s[e]),r[e]=E(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")$","i")}function it(t){var e,n=t._a;return n&&d(t).overflow===-2&&(e=n[Si]<0||n[Si]>11?Si:n[wi]<1||n[wi]>$(n[Yi],n[Si])?wi:n[ki]<0||n[ki]>24||24===n[ki]&&(0!==n[Ti]||0!==n[bi]||0!==n[Oi])?ki:n[Ti]<0||n[Ti]>59?Ti:n[bi]<0||n[bi]>59?bi:n[Oi]<0||n[Oi]>999?Oi:-1,d(t)._overflowDayOfYear&&(e<Yi||e>wi)&&(e=wi),d(t)._overflowWeeks&&e===-1&&(e=Wi),d(t)._overflowWeekday&&e===-1&&(e=xi),d(t).overflow=e),t}function st(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function rt(t,e){var n=!0;return a(function(){return n&&(st(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function at(t,e){Hi[t]||(st(e),Hi[t]=!0)}function ot(t){var e,n,i,s,r,a,o=t._i,u=Vi.exec(o)||Li.exec(o);if(u){for(d(t).iso=!0,e=0,n=Ni.length;e<n;e++)if(Ni[e][1].exec(u[1])){s=Ni[e][0],i=Ni[e][2]!==!1;break}if(null==s)return void(t._isValid=!1);if(u[3]){for(e=0,n=Ai.length;e<n;e++)if(Ai[e][1].exec(u[3])){r=(u[2]||" ")+Ai[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(u[4]){if(!Ii.exec(u[4]))return void(t._isValid=!1);a="Z"}t._f=s+(r||"")+(a||""),Yt(t)}else t._isValid=!1}function ut(e){var n=Ri.exec(e._i);return null!==n?void(e._d=new Date((+n[1]))):(ot(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function dt(t,e,n,i,s,r,a){var o=new Date(t,e,n,i,s,r,a);return t<100&&t>=0&&isFinite(o.getFullYear())&&o.setFullYear(t),o}function ht(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function lt(t){return ct(t)?366:365}function ct(t){return t%4===0&&t%100!==0||t%400===0}function ft(){return ct(this.year())}function mt(t,e,n){var i=7+e-n,s=(7+ht(t,0,i).getUTCDay()-e)%7;return-s+i-1}function _t(t,e,n,i,s){var r,a,o=(7+n-i)%7,u=mt(t,i,s),d=1+7*(e-1)+o+u;return d<=0?(r=t-1,a=lt(r)+d):d>lt(t)?(r=t+1,a=d-lt(t)):(r=t,a=d),{year:r,dayOfYear:a}}function yt(t,e,n){var i,s,r=mt(t.year(),e,n),a=Math.floor((t.dayOfYear()-r-1)/7)+1;return a<1?(s=t.year()-1,i=a+gt(s,e,n)):a>gt(t.year(),e,n)?(i=a-gt(t.year(),e,n),s=t.year()+1):(s=t.year(),i=a),{week:i,year:s}}function gt(t,e,n){var i=mt(t,e,n),s=mt(t+1,e,n);return(lt(t)-i+s)/7}function pt(t,e,n){return null!=t?t:null!=e?e:n}function vt(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Dt(t){var e,n,i,s,r=[];if(!t._d){for(i=vt(t),t._w&&null==t._a[wi]&&null==t._a[Si]&&Mt(t),t._dayOfYear&&(s=pt(t._a[Yi],i[Yi]),t._dayOfYear>lt(s)&&(d(t)._overflowDayOfYear=!0),n=ht(s,0,t._dayOfYear),t._a[Si]=n.getUTCMonth(),t._a[wi]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ki]&&0===t._a[Ti]&&0===t._a[bi]&&0===t._a[Oi]&&(t._nextDay=!0,t._a[ki]=0),t._d=(t._useUTC?ht:dt).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ki]=24)}}function Mt(t){var e,n,i,s,r,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(r=1,a=4,n=pt(e.GG,t._a[Yi],yt(xt(),1,4).year),i=pt(e.W,1),s=pt(e.E,1),(s<1||s>7)&&(u=!0)):(r=t._locale._week.dow,a=t._locale._week.doy,n=pt(e.gg,t._a[Yi],yt(xt(),r,a).year),i=pt(e.w,1),null!=e.d?(s=e.d,(s<0||s>6)&&(u=!0)):null!=e.e?(s=e.e+r,(e.e<0||e.e>6)&&(u=!0)):s=r),i<1||i>gt(n,r,a)?d(t)._overflowWeeks=!0:null!=u?d(t)._overflowWeekday=!0:(o=_t(n,i,s,r,a),t._a[Yi]=o.year,t._dayOfYear=o.dayOfYear)}function Yt(e){if(e._f===t.ISO_8601)return void ot(e);e._a=[],d(e).empty=!0;var n,i,s,r,a,o=""+e._i,u=o.length,h=0;for(s=I(e._f,e._locale).match(Kn)||[],n=0;n<s.length;n++)r=s[n],i=(o.match(A(r,e))||[])[0],i&&(a=o.substr(0,o.indexOf(i)),a.length>0&&d(e).unusedInput.push(a),o=o.slice(o.indexOf(i)+i.length),h+=i.length),ni[r]?(i?d(e).empty=!1:d(e).unusedTokens.push(r),j(r,i,e)):e._strict&&!i&&d(e).unusedTokens.push(r);d(e).charsLeftOver=u-h,o.length>0&&d(e).unusedInput.push(o),d(e).bigHour===!0&&e._a[ki]<=12&&e._a[ki]>0&&(d(e).bigHour=void 0),e._a[ki]=St(e._locale,e._a[ki],e._meridiem),Dt(e),it(e)}function St(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function wt(t){var e,n,i,s,r;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(NaN));for(s=0;s<t._f.length;s++)r=0,e=f({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[s],Yt(e),h(e)&&(r+=d(e).charsLeftOver,r+=10*d(e).unusedTokens.length,d(e).score=r,(null==i||r<i)&&(i=r,n=e));a(t,n||e)}function kt(t){if(!t._d){var e=O(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Dt(t)}}function Tt(t){var e=new m(it(bt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function bt(t){var e=t._i,s=t._f;return t._locale=t._locale||k(t._l),null===e||void 0===s&&""===e?l({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),_(e)?new m(it(e)):(n(s)?wt(t):s?Yt(t):i(e)?t._d=e:Ot(t),h(t)||(t._d=null),t))}function Ot(e){var r=e._i;void 0===r?e._d=new Date(t.now()):i(r)?e._d=new Date((+r)):"string"==typeof r?ut(e):n(r)?(e._a=s(r.slice(0),function(t){return parseInt(t,10)}),Dt(e)):"object"==typeof r?kt(e):"number"==typeof r?e._d=new Date(r):t.createFromInputFallback(e)}function Wt(t,e,n,i,s){var r={};return"boolean"==typeof n&&(i=n,n=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=s,r._l=n,r._i=t,r._f=e,r._strict=i,Tt(r)}function xt(t,e,n,i){return Wt(t,e,n,i,!1)}function Ut(t,e){var i,s;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return xt();for(i=e[0],s=1;s<e.length;++s)e[s].isValid()&&!e[s][t](i)||(i=e[s]);return i}function Gt(){var t=[].slice.call(arguments,0);return Ut("isBefore",t)}function Pt(){var t=[].slice.call(arguments,0);return Ut("isAfter",t)}function Ct(t){var e=O(t),n=e.year||0,i=e.quarter||0,s=e.month||0,r=e.week||0,a=e.day||0,o=e.hour||0,u=e.minute||0,d=e.second||0,h=e.millisecond||0;this._milliseconds=+h+1e3*d+6e4*u+36e5*o,this._days=+a+7*r,this._months=+s+3*i+12*n,this._data={},this._locale=k(),this._bubble()}function Ft(t){return t instanceof Ct}function Ht(t,e){F(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+C(~~(t/60),2)+e+C(~~t%60,2)})}function Vt(t,e){var n=(e||"").match(t)||[],i=n[n.length-1]||[],s=(i+"").match($i)||["-",0,0],r=+(60*s[1])+g(s[2]);return"+"===s[0]?r:-r}function Lt(e,n){var s,r;return n._isUTC?(s=n.clone(),r=(_(e)||i(e)?+e:+xt(e))-+s,s._d.setTime(+s._d+r),t.updateOffset(s,!1),s):xt(e).local()}function It(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Nt(e,n){var i,s=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=Vt(gi,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(i=It(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!n||this._changeInProgress?ne(this,Qt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:It(this):null!=e?this:NaN}function At(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Rt(t){return this.utcOffset(0,t)}function Et(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(It(this),"m")),this}function zt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Vt(yi,this._i)),this}function Zt(t){return!!this.isValid()&&(t=t?xt(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function jt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $t(){if(!c(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=bt(t),t._a){var e=t._isUTC?o(t._a):xt(t._a);this._isDSTShifted=this.isValid()&&p(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qt(){return!!this.isValid()&&!this._isUTC}function Jt(){return!!this.isValid()&&this._isUTC}function Bt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qt(t,e){var n,i,s,a=t,o=null;return Ft(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=qi.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:g(o[wi])*n,h:g(o[ki])*n,m:g(o[Ti])*n,s:g(o[bi])*n,ms:g(o[Oi])*n}):(o=Ji.exec(t))?(n="-"===o[1]?-1:1,a={y:Xt(o[2],n),M:Xt(o[3],n),d:Xt(o[4],n),h:Xt(o[5],n),m:Xt(o[6],n),s:Xt(o[7],n),w:Xt(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(s=te(xt(a.from),xt(a.to)),a={},a.ms=s.milliseconds,a.M=s.months),i=new Ct(a),Ft(t)&&r(t,"_locale")&&(i._locale=t._locale),i}function Xt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Kt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function te(t,e){var n;return t.isValid()&&e.isValid()?(e=Lt(e,t),t.isBefore(e)?n=Kt(t,e):(n=Kt(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ee(t,e){return function(n,i){var s,r;return null===i||isNaN(+i)||(at(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),r=n,n=i,i=r),n="string"==typeof n?+n:n,s=Qt(n,i),ne(this,s,t),this}}function ne(e,n,i,s){var r=n._milliseconds,a=n._days,o=n._months;e.isValid()&&(s=null==s||s,r&&e._d.setTime(+e._d+r*i),a&&G(e,"Date",U(e,"Date")+a*i),o&&Q(e,U(e,"Month")+o*i),s&&t.updateOffset(e,a||o))}function ie(t,e){var n=t||xt(),i=Lt(n,this).startOf("day"),s=this.diff(i,"days",!0),r=s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse",a=e&&(W(e[r])?e[r]():e[r]);return this.format(a||this.localeData().calendar(r,this,xt(n)))}function se(){return new m(this)}function re(t,e){var n=_(t)?t:xt(t);return!(!this.isValid()||!n.isValid())&&(e=b(c(e)?"millisecond":e),"millisecond"===e?+this>+n:+n<+this.clone().startOf(e))}function ae(t,e){var n=_(t)?t:xt(t);return!(!this.isValid()||!n.isValid())&&(e=b(c(e)?"millisecond":e),"millisecond"===e?+this<+n:+this.clone().endOf(e)<+n)}function oe(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function ue(t,e){var n,i=_(t)?t:xt(t);return!(!this.isValid()||!i.isValid())&&(e=b(e||"millisecond"),"millisecond"===e?+this===+i:(n=+i,+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e)))}function de(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function he(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function le(t,e,n){var i,s,r,a;return this.isValid()?(i=Lt(t,this),i.isValid()?(s=6e4*(i.utcOffset()-this.utcOffset()),e=b(e),"year"===e||"month"===e||"quarter"===e?(a=ce(this,i),"quarter"===e?a/=3:"year"===e&&(a/=12)):(r=this-i,a="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-s)/864e5:"week"===e?(r-s)/6048e5:r),n?a:y(a)):NaN):NaN}function ce(t,e){var n,i,s=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(s,"months");return e-r<0?(n=t.clone().add(s-1,"months"),i=(e-r)/(r-n)):(n=t.clone().add(s+1,"months"),i=(e-r)/(n-r)),-(s+i)}function fe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function me(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?W(Date.prototype.toISOString)?this.toDate().toISOString():L(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):L(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function _e(e){var n=L(this,e||t.defaultFormat);return this.localeData().postformat(n)}function ye(t,e){return this.isValid()&&(_(t)&&t.isValid()||xt(t).isValid())?Qt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ge(t){return this.from(xt(),t)}function pe(t,e){return this.isValid()&&(_(t)&&t.isValid()||xt(t).isValid())?Qt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ve(t){return this.to(xt(),t)}function De(t){var e;return void 0===t?this._locale._abbr:(e=k(t),null!=e&&(this._locale=e),this)}function Me(){return this._locale}function Ye(t){switch(t=b(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function Se(t){return t=b(t),void 0===t||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function we(){return+this._d-6e4*(this._offset||0)}function ke(){return Math.floor(+this/1e3)}function Te(){return this._offset?new Date((+this)):this._d}function be(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Oe(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function We(){return this.isValid()?this.toISOString():"null"}function xe(){return h(this)}function Ue(){return a({},d(this))}function Ge(){return d(this).overflow}function Pe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ce(t,e){F(0,[t,t.length],0,e)}function Fe(t){return Ie.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function He(t){return Ie.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Ve(){return gt(this.year(),1,4)}function Le(){var t=this.localeData()._week;return gt(this.year(),t.dow,t.doy)}function Ie(t,e,n,i,s){var r;return null==t?yt(this,i,s).year:(r=gt(t,i,s),e>r&&(e=r),Ne.call(this,t,e,n,i,s))}function Ne(t,e,n,i,s){var r=_t(t,e,n,i,s),a=ht(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ae(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Re(t){return yt(t,this._week.dow,this._week.doy).week}function Ee(){return this._week.dow}function ze(){return this._week.doy}function Ze(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function je(t){var e=yt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function $e(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function qe(t,e){return n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function Je(t){return this._weekdaysShort[t.day()]}function Be(t){return this._weekdaysMin[t.day()]}function Qe(t,e,n){var i,s,r;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(s=xt([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(s,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(s,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(s,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Xe(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=$e(t,this.localeData()),this.add(t-e,"d")):e}function Ke(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function tn(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function en(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function nn(){return this.hours()%12||12}function sn(t,e){F(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function rn(t,e){return e._meridiemParse}function an(t){return"p"===(t+"").toLowerCase().charAt(0)}function on(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function un(t,e){e[Oi]=g(1e3*("0."+t))}function dn(){return this._isUTC?"UTC":""}function hn(){return this._isUTC?"Coordinated Universal Time":""}function ln(t){return xt(1e3*t)}function cn(){return xt.apply(null,arguments).parseZone()}function fn(t,e,n){var i=this._calendar[t];return W(i)?i.call(e,n):i}function mn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function _n(){return this._invalidDate}function yn(t){return this._ordinal.replace("%d",t)}function gn(t){return t}function pn(t,e,n,i){var s=this._relativeTime[n];return W(s)?s(t,e,n,i):s.replace(/%d/i,t)}function vn(t,e){var n=this._relativeTime[t>0?"future":"past"];return W(n)?n(e):n.replace(/%s/i,e)}function Dn(t){var e,n;for(n in t)e=t[n],W(e)?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function Mn(t,e,n,i){var s=k(),r=o().set(i,e);return s[n](r,t)}function Yn(t,e,n,i,s){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Mn(t,e,n,s);var r,a=[];for(r=0;r<i;r++)a[r]=Mn(t,r,n,s);return a}function Sn(t,e){return Yn(t,e,"months",12,"month")}function wn(t,e){return Yn(t,e,"monthsShort",12,"month")}function kn(t,e){return Yn(t,e,"weekdays",7,"day")}function Tn(t,e){return Yn(t,e,"weekdaysShort",7,"day")}function bn(t,e){return Yn(t,e,"weekdaysMin",7,"day")}function On(){var t=this._data;return this._milliseconds=vs(this._milliseconds),this._days=vs(this._days),this._months=vs(this._months),t.milliseconds=vs(t.milliseconds),t.seconds=vs(t.seconds),t.minutes=vs(t.minutes),t.hours=vs(t.hours),t.months=vs(t.months),t.years=vs(t.years),this}function Wn(t,e,n,i){var s=Qt(e,n);return t._milliseconds+=i*s._milliseconds,t._days+=i*s._days,t._months+=i*s._months,t._bubble()}function xn(t,e){return Wn(this,t,e,1)}function Un(t,e){return Wn(this,t,e,-1)}function Gn(t){return t<0?Math.floor(t):Math.ceil(t)}function Pn(){var t,e,n,i,s,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*Gn(Fn(o)+a),a=0,o=0),u.milliseconds=r%1e3,t=y(r/1e3),u.seconds=t%60,e=y(t/60),u.minutes=e%60,n=y(e/60),u.hours=n%24,a+=y(n/24),s=y(Cn(a)),o+=s,a-=Gn(Fn(s)),i=y(o/12),o%=12,u.days=a,u.months=o,u.years=i,this}function Cn(t){return 4800*t/146097}function Fn(t){return 146097*t/4800}function Hn(t){var e,n,i=this._milliseconds;if(t=b(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+Cn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(Fn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function Vn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12)}function Ln(t){return function(){return this.as(t)}}function In(t){return t=b(t),this[t+"s"]()}function Nn(t){return function(){return this._data[t]}}function An(){return y(this.days()/7)}function Rn(t,e,n,i,s){return s.relativeTime(e||1,!!n,t,i)}function En(t,e,n){var i=Qt(t).abs(),s=Fs(i.as("s")),r=Fs(i.as("m")),a=Fs(i.as("h")),o=Fs(i.as("d")),u=Fs(i.as("M")),d=Fs(i.as("y")),h=s<Hs.s&&["s",s]||r<=1&&["m"]||r<Hs.m&&["mm",r]||a<=1&&["h"]||a<Hs.h&&["hh",a]||o<=1&&["d"]||o<Hs.d&&["dd",o]||u<=1&&["M"]||u<Hs.M&&["MM",u]||d<=1&&["y"]||["yy",d];return h[2]=e,h[3]=+t>0,h[4]=n,Rn.apply(null,h)}function zn(t,e){return void 0!==Hs[t]&&(void 0===e?Hs[t]:(Hs[t]=e,!0))}function Zn(t){var e=this.localeData(),n=En(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function jn(){var t,e,n,i=Vs(this._milliseconds)/1e3,s=Vs(this._days),r=Vs(this._months);t=y(i/60),e=y(t/60),i%=60,t%=60,n=y(r/12),r%=12;var a=n,o=r,u=s,d=e,h=t,l=i,c=this.asSeconds();return c?(c<0?"-":"")+"P"+(a?a+"Y":"")+(o?o+"M":"")+(u?u+"D":"")+(d||h||l?"T":"")+(d?d+"H":"")+(h?h+"M":"")+(l?l+"S":""):"P0D"}var $n,qn,Jn=t.momentProperties=[],Bn=!1,Qn={},Xn={},Kn=/(\[[^\[]*\])|(\\)?([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,ti=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ei={},ni={},ii=/\d/,si=/\d\d/,ri=/\d{3}/,ai=/\d{4}/,oi=/[+-]?\d{6}/,ui=/\d\d?/,di=/\d\d\d\d?/,hi=/\d\d\d\d\d\d?/,li=/\d{1,3}/,ci=/\d{1,4}/,fi=/[+-]?\d{1,6}/,mi=/\d+/,_i=/[+-]?\d+/,yi=/Z|[+-]\d\d:?\d\d/gi,gi=/Z|[+-]\d\d(?::?\d\d)?/gi,pi=/[+-]?\d+(\.\d{1,3})?/,vi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Di={},Mi={},Yi=0,Si=1,wi=2,ki=3,Ti=4,bi=5,Oi=6,Wi=7,xi=8;F("M",["MM",2],"Mo",function(){return this.month()+1}),F("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),F("MMMM",0,0,function(t){return this.localeData().months(this,t)}),T("month","M"),N("M",ui),N("MM",ui,si),N("MMM",function(t,e){return e.monthsShortRegex(t)}),N("MMMM",function(t,e){return e.monthsRegex(t)}),z(["M","MM"],function(t,e){e[Si]=g(t)-1}),z(["MMM","MMMM"],function(t,e,n,i){var s=n._locale.monthsParse(t,i,n._strict);null!=s?e[Si]=s:d(n).invalidMonth=t});var Ui=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Gi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ci=vi,Fi=vi,Hi={};t.suppressDeprecationWarnings=!1;var Vi=/^\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)?)?/,Li=/^\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)?)?/,Ii=/Z|[+-]\d\d(?::?\d\d)?/,Ni=[["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}/]],Ai=[["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/]],Ri=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=rt("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(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),F("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),F(0,["YY",2],0,function(){return this.year()%100}),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),T("year","y"),N("Y",_i),N("YY",ui,si),N("YYYY",ci,ai),N("YYYYY",fi,oi),N("YYYYYY",fi,oi),z(["YYYYY","YYYYYY"],Yi),z("YYYY",function(e,n){n[Yi]=2===e.length?t.parseTwoDigitYear(e):g(e)}),z("YY",function(e,n){n[Yi]=t.parseTwoDigitYear(e)}),z("Y",function(t,e){e[Yi]=parseInt(t,10)}),t.parseTwoDigitYear=function(t){return g(t)+(g(t)>68?1900:2e3)};var Ei=x("FullYear",!1);t.ISO_8601=function(){};var zi=rt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=xt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:l()}),Zi=rt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=xt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:l()}),ji=function(){return Date.now?Date.now():+new Date};Ht("Z",":"),Ht("ZZ",""),N("Z",gi),N("ZZ",gi),z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Vt(gi,t)});var $i=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var qi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Ji=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; 17Qt.fn=Ct.prototype;var Bi=ee(1,"add"),Qi=ee(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Xi=rt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});F(0,["gg",2],0,function(){return this.weekYear()%100}),F(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ce("gggg","weekYear"),Ce("ggggg","weekYear"),Ce("GGGG","isoWeekYear"),Ce("GGGGG","isoWeekYear"),T("weekYear","gg"),T("isoWeekYear","GG"),N("G",_i),N("g",_i),N("GG",ui,si),N("gg",ui,si),N("GGGG",ci,ai),N("gggg",ci,ai),N("GGGGG",fi,oi),N("ggggg",fi,oi),Z(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=g(t)}),Z(["gg","GG"],function(e,n,i,s){n[s]=t.parseTwoDigitYear(e)}),F("Q",0,"Qo","quarter"),T("quarter","Q"),N("Q",ii),z("Q",function(t,e){e[Si]=3*(g(t)-1)}),F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),N("w",ui),N("ww",ui,si),N("W",ui),N("WW",ui,si),Z(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=g(t)});var Ki={dow:0,doy:6};F("D",["DD",2],"Do","date"),T("date","D"),N("D",ui),N("DD",ui,si),N("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),z(["D","DD"],wi),z("Do",function(t,e){e[wi]=g(t.match(ui)[0],10)});var ts=x("Date",!0);F("d",0,"do","day"),F("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),F("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),F("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),T("day","d"),T("weekday","e"),T("isoWeekday","E"),N("d",ui),N("e",ui),N("E",ui),N("dd",vi),N("ddd",vi),N("dddd",vi),Z(["dd","ddd","dddd"],function(t,e,n,i){var s=n._locale.weekdaysParse(t,i,n._strict);null!=s?e.d=s:d(n).invalidWeekday=t}),Z(["d","e","E"],function(t,e,n,i){e[i]=g(t)});var es="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ns="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),is="Su_Mo_Tu_We_Th_Fr_Sa".split("_");F("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),N("DDD",li),N("DDDD",ri),z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=g(t)}),F("H",["HH",2],0,"hour"),F("h",["hh",2],0,nn),F("hmm",0,0,function(){return""+nn.apply(this)+C(this.minutes(),2)}),F("hmmss",0,0,function(){return""+nn.apply(this)+C(this.minutes(),2)+C(this.seconds(),2)}),F("Hmm",0,0,function(){return""+this.hours()+C(this.minutes(),2)}),F("Hmmss",0,0,function(){return""+this.hours()+C(this.minutes(),2)+C(this.seconds(),2)}),sn("a",!0),sn("A",!1),T("hour","h"),N("a",rn),N("A",rn),N("H",ui),N("h",ui),N("HH",ui,si),N("hh",ui,si),N("hmm",di),N("hmmss",hi),N("Hmm",di),N("Hmmss",hi),z(["H","HH"],ki),z(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),z(["h","hh"],function(t,e,n){e[ki]=g(t),d(n).bigHour=!0}),z("hmm",function(t,e,n){var i=t.length-2;e[ki]=g(t.substr(0,i)),e[Ti]=g(t.substr(i)),d(n).bigHour=!0}),z("hmmss",function(t,e,n){var i=t.length-4,s=t.length-2;e[ki]=g(t.substr(0,i)),e[Ti]=g(t.substr(i,2)),e[bi]=g(t.substr(s)),d(n).bigHour=!0}),z("Hmm",function(t,e,n){var i=t.length-2;e[ki]=g(t.substr(0,i)),e[Ti]=g(t.substr(i))}),z("Hmmss",function(t,e,n){var i=t.length-4,s=t.length-2;e[ki]=g(t.substr(0,i)),e[Ti]=g(t.substr(i,2)),e[bi]=g(t.substr(s))});var ss=/[ap]\.?m?\.?/i,rs=x("Hours",!0);F("m",["mm",2],0,"minute"),T("minute","m"),N("m",ui),N("mm",ui,si),z(["m","mm"],Ti);var as=x("Minutes",!1);F("s",["ss",2],0,"second"),T("second","s"),N("s",ui),N("ss",ui,si),z(["s","ss"],bi);var os=x("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)}),F(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,function(){return 10*this.millisecond()}),F(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),F(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),F(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),F(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),F(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),T("millisecond","ms"),N("S",li,ii),N("SS",li,si),N("SSS",li,ri);var us;for(us="SSSS";us.length<=9;us+="S")N(us,mi);for(us="S";us.length<=9;us+="S")z(us,un);var ds=x("Milliseconds",!1);F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var hs=m.prototype;hs.add=Bi,hs.calendar=ie,hs.clone=se,hs.diff=le,hs.endOf=Se,hs.format=_e,hs.from=ye,hs.fromNow=ge,hs.to=pe,hs.toNow=ve,hs.get=P,hs.invalidAt=Ge,hs.isAfter=re,hs.isBefore=ae,hs.isBetween=oe,hs.isSame=ue,hs.isSameOrAfter=de,hs.isSameOrBefore=he,hs.isValid=xe,hs.lang=Xi,hs.locale=De,hs.localeData=Me,hs.max=Zi,hs.min=zi,hs.parsingFlags=Ue,hs.set=P,hs.startOf=Ye,hs.subtract=Qi,hs.toArray=be,hs.toObject=Oe,hs.toDate=Te,hs.toISOString=me,hs.toJSON=We,hs.toString=fe,hs.unix=ke,hs.valueOf=we,hs.creationData=Pe,hs.year=Ei,hs.isLeapYear=ft,hs.weekYear=Fe,hs.isoWeekYear=He,hs.quarter=hs.quarters=Ae,hs.month=X,hs.daysInMonth=K,hs.week=hs.weeks=Ze,hs.isoWeek=hs.isoWeeks=je,hs.weeksInYear=Le,hs.isoWeeksInYear=Ve,hs.date=ts,hs.day=hs.days=Xe,hs.weekday=Ke,hs.isoWeekday=tn,hs.dayOfYear=en,hs.hour=hs.hours=rs,hs.minute=hs.minutes=as,hs.second=hs.seconds=os,hs.millisecond=hs.milliseconds=ds,hs.utcOffset=Nt,hs.utc=Rt,hs.local=Et,hs.parseZone=zt,hs.hasAlignedHourOffset=Zt,hs.isDST=jt,hs.isDSTShifted=$t,hs.isLocal=qt,hs.isUtcOffset=Jt,hs.isUtc=Bt,hs.isUTC=Bt,hs.zoneAbbr=dn,hs.zoneName=hn,hs.dates=rt("dates accessor is deprecated. Use date instead.",ts),hs.months=rt("months accessor is deprecated. Use month instead",X),hs.years=rt("years accessor is deprecated. Use year instead",Ei),hs.zone=rt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",At);var ls=hs,cs={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},fs={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"},ms="Invalid date",_s="%d",ys=/\d{1,2}/,gs={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"},ps=v.prototype;ps._calendar=cs,ps.calendar=fn,ps._longDateFormat=fs,ps.longDateFormat=mn,ps._invalidDate=ms,ps.invalidDate=_n,ps._ordinal=_s,ps.ordinal=yn,ps._ordinalParse=ys,ps.preparse=gn,ps.postformat=gn,ps._relativeTime=gs,ps.relativeTime=pn,ps.pastFuture=vn,ps.set=Dn,ps.months=q,ps._months=Gi,ps.monthsShort=J,ps._monthsShort=Pi,ps.monthsParse=B,ps._monthsRegex=Fi,ps.monthsRegex=et,ps._monthsShortRegex=Ci,ps.monthsShortRegex=tt,ps.week=Re,ps._week=Ki,ps.firstDayOfYear=ze,ps.firstDayOfWeek=Ee,ps.weekdays=qe,ps._weekdays=es,ps.weekdaysMin=Be,ps._weekdaysMin=is,ps.weekdaysShort=Je,ps._weekdaysShort=ns,ps.weekdaysParse=Qe,ps.isPM=an,ps._meridiemParse=ss,ps.meridiem=on,S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===g(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=rt("moment.lang is deprecated. Use moment.locale instead.",S),t.langData=rt("moment.langData is deprecated. Use moment.localeData instead.",k);var vs=Math.abs,Ds=Ln("ms"),Ms=Ln("s"),Ys=Ln("m"),Ss=Ln("h"),ws=Ln("d"),ks=Ln("w"),Ts=Ln("M"),bs=Ln("y"),Os=Nn("milliseconds"),Ws=Nn("seconds"),xs=Nn("minutes"),Us=Nn("hours"),Gs=Nn("days"),Ps=Nn("months"),Cs=Nn("years"),Fs=Math.round,Hs={s:45,m:45,h:22,d:26,M:11},Vs=Math.abs,Ls=Ct.prototype;Ls.abs=On,Ls.add=xn,Ls.subtract=Un,Ls.as=Hn,Ls.asMilliseconds=Ds,Ls.asSeconds=Ms,Ls.asMinutes=Ys,Ls.asHours=Ss,Ls.asDays=ws,Ls.asWeeks=ks,Ls.asMonths=Ts,Ls.asYears=bs,Ls.valueOf=Vn,Ls._bubble=Pn,Ls.get=In,Ls.milliseconds=Os,Ls.seconds=Ws,Ls.minutes=xs,Ls.hours=Us,Ls.days=Gs,Ls.weeks=An,Ls.months=Ps,Ls.years=Cs,Ls.humanize=Zn,Ls.toISOString=jn,Ls.toString=jn,Ls.toJSON=jn,Ls.locale=De,Ls.localeData=Me,Ls.toIsoString=rt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Ls.lang=Xi,F("X",0,0,"unix"),F("x",0,0,"valueOf"),N("x",_i),N("X",pi),z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),z("x",function(t,e,n){n._d=new Date(g(t))}),t.version="2.11.2",e(xt),t.fn=ls,t.min=Gt,t.max=Pt,t.now=ji,t.utc=o,t.unix=ln,t.months=Sn,t.isDate=i,t.locale=S,t.invalid=l,t.duration=Qt,t.isMoment=_,t.weekdays=kn,t.parseZone=cn,t.localeData=k,t.isDuration=Ft,t.monthsShort=wn,t.weekdaysMin=bn,t.defineLocale=w,t.weekdaysShort=Tn,t.normalizeUnits=b,t.relativeTimeThreshold=zn,t.prototype=ls;var Is=t;return Is}); 18"format global";"deps angular";"deps moment";!function(){"use strict";function e(e,n){return e.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:"",format:null,statefulFilters:!0}).constant("moment",n).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig","angularMomentConfig",function(n,t,o,i,r){return function(a,u,f){function m(){var e;if(i.serverTime){var n=(new Date).getTime(),o=n-y+i.serverTime;e=t(o)}else e=t();return e}function l(){v&&(n.clearTimeout(v),v=null)}function s(e){if(u.text(e.from(m(),T)),M&&!u.attr("title")&&u.attr("title",e.local().format(M)),!C){var t=Math.abs(m().diff(e,"minute")),o=3600;t<1?o=1:t<60?o=30:t<180&&(o=300),v=n.setTimeout(function(){s(e)},1e3*o)}}function c(e){D&&u.attr("datetime",e)}function p(){if(l(),d){var e=o.preprocessDate(d,z,h);s(e),c(e.toISOString())}}var d,g,v=null,h=r.format,T=i.withoutSuffix,M=i.titleFormat,y=(new Date).getTime(),z=r.preprocess,$=f.amTimeAgo.replace(/^::/,""),C=0===f.amTimeAgo.indexOf("::"),D="TIME"===u[0].nodeName.toUpperCase();g=a.$watch($,function(e){return"undefined"==typeof e||null===e||""===e?(l(),void(d&&(u.text(""),c(""),d=null))):(d=e,p(),void(void 0!==e&&C&&g()))}
18),e.isDefined(f.amWithoutSuffix)&&a.$watch(f.amWithoutSuffix,function(e){"boolean"==typeof e?(T=e,p()):T=i.withoutSuffix}),f.$observe("amFormat",function(e){"undefined"!=typeof e&&(h=e,p())}),f.$observe("amPreprocess",function(e){z=e,p()}),a.$on("$destroy",function(){l()}),a.$on("amMoment:localeChanged",function(){p()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(n,t,o,i){this.preprocessors={utc:n.utc,unix:n.unix},this.changeLocale=function(o,i){var r=n.locale(o,i);return e.isDefined(o)&&t.$broadcast("amMoment:localeChanged"),r},this.changeTimezone=function(e){i.timezone=e,t.$broadcast("amMoment:timezoneChanged")},this.preprocessDate=function(t,r,a){return e.isUndefined(r)&&(r=i.preprocess),this.preprocessors[r]?this.preprocessors[r](t,a):(r&&o.warn("angular-moment: Ignoring unsupported value for preprocess: "+r),!isNaN(parseFloat(t))&&isFinite(t)?n(parseInt(t,10)):n(t,a))},this.applyTimezone=function(e){var n=i.timezone;return e&&n&&(e.tz?e=e.tz(n):o.warn("angular-moment: timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js?")),e}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,o);var i=e(t);return i.isValid()?n.applyTimezone(i).calendar():""}return o.$stateful=t.statefulFilters,o}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i,r,a,u){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,a);var f=e(t);if(!f.isValid())return"";var m;if("undefined"==typeof o||null===o)m=e();else if(o=n.preprocessDate(o,u),m=e(o),!m.isValid())return"";return n.applyTimezone(f).diff(n.applyTimezone(m),i,r)}return o.$stateful=t.statefulFilters,o}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,i);var r=e(t);return r.isValid()?n.applyTimezone(r).format(o):""}return o.$stateful=t.statefulFilters,o}]).filter("amDurationFormat",["moment","angularMomentConfig",function(e,n){function t(n,t,o){return"undefined"==typeof n||null===n?"":e.duration(n,t).humanize(o)}return t.$stateful=n.statefulFilters,t}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,o);var r=e(t);return r.isValid()?n.applyTimezone(r).fromNow(i):""}return o.$stateful=t.statefulFilters,o}])}"function"==typeof define&&define.amd?define(["angular","moment"],e):"undefined"!=typeof module&&module&&module.exports?e(angular,require("moment")):e(angular,window.moment)}(); 19!function(t,e,i,n){"use strict";(function(){e.module("uiGmapgoogle-maps.providers",[]),e.module("uiGmapgoogle-maps.wrapped",[]),e.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),e.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),e.module("uiGmapgoogle-maps.directives.api.managers",[]),e.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),e.module("uiGmapgoogle-maps.directives.api.options.builders",[]),e.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),e.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),e.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),e.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){e.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(n,o){var r,s,a,l,u;return l=void 0,u=void 0,r=function(t){return t.china?"http://maps.google.cn/maps/api/js?":"auto"===t.transport?"//maps.googleapis.com/ma
19ps/api/js?":t.transport+"://maps.googleapis.com/maps/api/js?"},s=function(t){var e,n,s,a;return e=["transport","isGoogleMapsForWork","china","preventLoad"],t.isGoogleMapsForWork&&e.push("key"),n=i.map(i.omit(t,e),function(t,e){return e+"="+t}),l&&(a=document.getElementById(l),a.parentNode.removeChild(a)),n=n.join("&"),s=document.createElement("script"),s.id=l="ui_gmap_map_load_"+o.generate(),s.type="text/javascript",s.src=r(t)+n,document.head.appendChild(s)},a=function(){return e.isDefined(t.google)&&e.isDefined(t.google.maps)},{load:function(e){var i,o;return i=n.defer(),a()?(i.resolve(t.google.maps),i.promise):(o=e.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),t[o]=function(){t[o]=null,i.resolve(t.google.maps)},t.navigator.connection&&t.Connection&&t.navigator.connection.type===t.Connection.NONE&&!e.preventLoad?document.addEventListener("online",function(){if(!a())return s(e)}):e.preventLoad||s(e),u=e,u.randomizedFunctionName=o,i.promise)},manualLoad:function(){var e;return e=u,a()?t[e.randomizedFunctionName]?t[e.randomizedFunctionName]():void 0:s(e)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(t){e.extend(this.options,t)},this.$get=["uiGmapMapScriptLoader",function(t){return function(e){return e.load(t.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(t){return{load:function(){t.manualLoad()}}}])}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function i(){this.constructor=t}for(var n in e)r.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={}.hasOwnProperty;e.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:i.once(function(){var e;if(google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow)return google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(t,e,i){null==i&&(this._isOpen=!0,this._open(t,e,!0))},google.maps.InfoWindow.prototype.close=function(t){null==t&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(t){return null==t&&(t=void 0),null==t?this._isOpen:this._isOpen=t},t.InfoBox&&(t.InfoBox.prototype._open=t.InfoBox.prototype.open,t.InfoBox.prototype._close=t.InfoBox.prototype.close,t.InfoBox.prototype._isOpen=!1,t.InfoBox.prototype.open=function(t,e){this._isOpen=!0,this._open(t,e)},t.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},t.InfoBox.prototype.isOpen=function(t){return null==t&&(t=void 0),null==t?this._isOpen:this._isOpen=t},e=function(e){function r(e){this.getOrigCloseBoxImg_=n(this.getOrigCloseBoxImg_,this),this.getCloseBoxDiv_=n(this.getCloseBoxDiv_,this);var o;o=new t.InfoBox(e),i.extend(this,o),null!=e.closeBoxDiv&&(this.closeBoxDiv_=e.closeBoxDiv)}return o(r,e),r.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},r.prototype.getCloseBoxImg_=function(){var t,e;return t=this.getCloseBoxDiv_(),e=this.getOrigCloseBoxImg_(),t||e},r.prototype.getOrigCloseBoxImg_=function(){var t;return t="",""!==this.closeBoxURL_&&(t="<img",t+=" src='"+this.closeBoxURL_+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin_+";",t+="'>"),t},r}(t.InfoBox),t.uiGmapInfoBox=e),t.MarkerLabel_?t.MarkerLabel_.prototype.setContent=function(){var t;t=this.marker_.get("labelContent"),t&&!i.isEqual(this.oldContent,t)&&("undefined"==typeof(null!=t?t.nodeType:void 0)?(this.labelDiv_.innerHTML=t,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML,this.oldContent=t):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(t),t=t.cloneNode(!0),this.labelDiv_.innerHTML="",this.eventDiv_.appendChild(t),this.oldContent=t))}:void 0})}})}.call(this),function(){e.module("uiGmapgoogle-maps.extensions").service("uiGmapLodash",function(){var t,e,n,o,r,s,a,l;return s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,r=/\\(\\)?/g,n=function(t){var e,n,o;if(n=t.missingName,o=t.swapName,e=t.isProto,null==i[n]&&(i[n]=i[o],e))return i.prototype[n]=i[o]},[{missingName:"contains",swapName:"includes",isProto:!0},{missingName:"includes",swapName:"contains",isProto:!0},{missingName:"object",swapName:"zipObject"},{missingName:"zipObject",swapName:"object"},{missingName:"all",swapName:"every"},{missingName:"every",swapName:"all"},{missingName:"any",swapName:"some"},{missingName:"some",swapName:"any"},{missingName:"first",swapName:"head"},{missingName:"head",swapName:"first"}
19].forEach(function(t){return n(t)}),null==i.get&&(a=function(t){return i.isObject(t)?t:Object(t)},e=function(t){return null===t?"":t+""},l=function(t){var n;return i.isArray(t)?t:(n=[],e(t).replace(s,function(t,e,i,o){n.push(i?o.replace(r,"$1"):e||t)}),n)},t=function(t,e,n){var o,r;if(null!==t){void 0!==n&&n in a(t)&&(e=[n]),o=0,r=e.length;for(;!i.isUndefined(t)&&o<r;)t=t[e[o++]];return o&&o===r?t:void 0}},o=function(e,i,n){var o;return o=null===e?void 0:t(e,l(i),i+""),void 0===o?n:o},i.get=o),this.intersectionObjects=function(t,e,n){var o;return null==n&&(n=void 0),o=i.map(t,function(t){return i.find(e,function(e){return null!=n?n(t,e):i.isEqual(t,e)})}),i.filter(o,function(t){return null!=t})},this.containsObject=i.includeObject=function(t,e,n){return null==n&&(n=void 0),null!==t&&i.some(t,function(t){return null!=n?n(t,e):i.isEqual(t,e)})},this.differenceObjects=function(t,e,n){return null==n&&(n=void 0),i.filter(t,function(t){return function(i){return!t.containsObject(e,i,n)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(t,e,n,o){var r,s;if(null==t)return-1;if(r=0,s=t.length,o){if("number"!=typeof o)return r=i.sortedIndex(t,e),t[r]===e?r:-1;r=o<0?Math.max(0,s+o):o}for(;r<s;){if(null!=n){if(n(t[r],e))return r}else if(i.isEqual(t[r],e))return r;r++}return-1},this.isNullOrUndefined=function(t){return i.isNull(t||i.isUndefined(t))},this})}.call(this),function(){e.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(t){return this.contains=function(e,i){return t.indexOf(e,i)!==-1},this}})}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var t;return t=void 0,{then:function(e){return t=e},resolve:function(){return t.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(t,n,o,r,s,a){var l,u,p,h,c,d,g,f,m,v,y,_,b,w,M,k,x,C,G,D;return G=n.promiseTypes,_=n.isInProgress,C=n.promiseStatus,l=n.ExposedPromise,p=n.SniffedPromise,b=function(t,e){var i;return i=t.promise(),i.promiseType=t.promiseType,i.$$state&&o.debug("promiseType: "+i.promiseType+", state: "+C(i.$$state.status)),i.cancelCb=e,i},f=function(t,e){return t.promiseType===G.create&&e.promiseType!==G["delete"]&&e.promiseType!==G.init&&(o.debug("lastPromise.promiseType "+e.promiseType+", newPromiseType: "+t.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0)},x=function(t,e,n){var r;if(e.promiseType===G["delete"]&&n.promiseType!==G["delete"]&&null!=n.cancelCb&&i.isFunction(n.cancelCb)&&_(n)&&(o.debug("promiseType: "+e.promiseType+", CANCELING LAST PROMISE type: "+n.promiseType),n.cancelCb("cancel safe"),r=t.peek(),null!=r&&_(r)))return r.hasOwnProperty("cancelCb")&&i.isFunction(r.cancelCb)?(o.debug("promiseType: "+r.promiseType+", CANCELING FIRST PROMISE type: "+r.promiseType),r.cancelCb("cancel safe")):o.warn("first promise was not cancelable")},u=function(t,e,n){var o,r;if(t.existingPieces){if(o=i.last(t.existingPieces._content),f(e,o))return;return x(t.existingPieces,e,o),r=l(o["finally"](function(){return b(e,n)})),r.cancelCb=n,r.promiseType=e.promiseType,t.existingPieces.enqueue(r),o["finally"](function(){return t.existingPieces.dequeue()})}return t.existingPieces=new s.Queue,t.existingPieces.enqueue(b(e,n))},M=function(t,e,n,r,s){var a;return null==n&&(n=""),a=function(t){if(o.debug(t+": "+t),null!=r&&i.isFunction(r))return r(t)},u(t,p(s,e),a)},d=80,v={value:null},D=function(t,e,i){var n,o;try{return t.apply(e,i)}catch(o){return n=o,v.value=n,v}},w=function(t,e,i,n){var r,s;return s=D(t,e,n),s===v&&(r="error within chunking iterator: "+v.value,o.error(r),i.reject(r)),"cancel safe"!==s},h=function(t,e,i){var n,o;return n=t===e,o=e[i],n?o:t[o]},c=["length","forEach","map"],y=function(t,n,o,r){var s,a,l;if(e.isArray(t))s=t;else if(n)s=n;else{s=[];for(a in t)l=t[a],t.hasOwnProperty(a)&&!i.includes(c,a)&&s.push(a)}return null==r&&(r=o),e.isArray(s)&&!(null!=s?s.length:void 0)&&r!==o?o():r(s,n)},g=function(n,o,r,s,a,l,u,p){return y(n,p,function(p,c){var d,f,m,v;for(d=o&&o<p.length?o:p.length,f=u,m=!0;m&&d--&&f<(p?p.length:f+1);)v=h(n,p,f),m=!!e.isFunction(v)||w(s,void 0,l,[v,f]),++f;if(p){if(!(m&&f<p.length))return l.resolve();if(u=f,o)return null!=a&&i.isFunction(a)&&w(a,void 0,l,[]),t(function(){return g(n,o,r,s,a,l,u,c)},r,!1)}})}
19,m=function(t,e,i,r,s,a,l){var u,p,h;return null==i&&(i=d),null==s&&(s=0),null==a&&(a=1),h=void 0,p=n.defer(),h=p.promise,a?y(t,l,function(){return p.resolve(),h},function(n,o){return g(t,i,a,e,r,p,s,o),h}):(u="pause (delay) must be set from _async!",o.error(u),p.reject(u),h)},k=function(t,e,i,o,r,s,a){var l;return l=[],y(t,a,function(){return n.resolve(l)},function(n,a){return m(t,function(t){return l.push(e(t))},i,o,r,s,a).then(function(){return l})})},{each:m,map:k,managePromiseQueue:M,promiseLock:M,defaultChunkSize:d,getArrayAndKeys:y,chunkSizeFrom:function(t,e){return null==e&&(e=void 0),i.isNumber(t)&&(e=t),(a.isFalse(t)||t===!1)&&(e=!1),e}}}])}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var e,i;return i=["extended","included"],e=function(){function e(){}return e.extend=function(e){var n,o,r;for(n in e)r=e[n],t.call(i,n)<0&&(this[n]=r);return null!=(o=e.extended)&&o.apply(this),this},e.include=function(e){var n,o,r;for(n in e)r=e[n],t.call(i,n)<0&&(this.prototype[n]=r);return null!=(o=e.included)&&o.apply(this),this},e}()})}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(t){}}})}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(t){var e;return e={handle:function(i,n){return i.$on("$destroy",function(){return e.handle(i)}),i.deferred=t.defer(),{getScope:function(){return i}}},mapPromise:function(t,e){var i;return i=e.getScope(),i.deferred.promise.then(function(e){return t.map=e}),i.deferred.promise}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(t){var n,o;return o=function(t){return e.isDefined(t.events)&&null!=t.events&&e.isObject(t.events)},n=function(t,e){return o(t)?t:o(e)?e:void 0},{setEvents:function(t,o,r,s){var a;if(a=n(o,r),null!=a)return i.compact(i.map(a.events,function(n,l){var u;if(s&&(u=i(s).includes(l)),a.events.hasOwnProperty(l)&&e.isFunction(a.events[l])&&!u)return google.maps.event.addListener(t,l,function(){return o.$evalAsync||(o.$evalAsync=function(){}),o.$evalAsync(n.apply(o,[t,l,r,arguments]))})}))},removeEvents:function(t){var e,i;if(t)for(e in t)i=t[e],i&&t.hasOwnProperty(e)&&google.maps.event.removeListener(i)}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger","$timeout",function(t,e){return{fit:function(t,n){var o,r,s,a,l;if(n&&(null!=t?t.length:void 0)){o=new google.maps.LatLngBounds,r=!1;for(s in t)a=t[s],a&&(r||(r=!0),l=i.isFunction(a.getPosition)?a.getPosition():a),o.extend(l);if(r)return e(function(){return n.fitBounds(o)})}}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(t,n){var o,r,s,a,l,u;return r=function(t,e,i){return t===e||i.indexOf(t)!==-1},o=function(t){return r(t,!1,["false","FALSE",0,"n","N","no","NO"])},a=function(t){return Array.isArray(t)&&2===t.length?t[1]:e.isDefined(t.type)&&"Point"===t.type?t.coordinates[1]:t.latitude},l=function(t){return Array.isArray(t)&&2===t.length?t[0]:e.isDefined(t.type)&&"Point"===t.type?t.coordinates[0]:t.longitude},s=function(t){if(t)return t instanceof google.maps.LatLng?t:Array.isArray(t)&&2===t.length?new google.maps.LatLng(t[1],t[0]):e.isDefined(t.type)&&"Point"===t.type?new google.maps.LatLng(t.coordinates[1],t.coordinates[0]):new google.maps.LatLng(t.latitude,t.longitude)},u=function(t){if(e.isUndefined(t))return!1;if(i.isArray(t)){if(2===t.length)return!0}else if(null!=t&&(null!=t?t.type:void 0)&&"Point"===t.type&&i.isArray(t.coordinates)&&2===t.coordinates.length)return!0;return!(!t||!e.isDefined((null!=t?t.latitude:void 0)&&e.isDefined(null!=t?t.longitude:void 0)))},{setCoordsFromEvent:function(t,i){if(t)return Array.isArray(t)&&2===t.length?(t[1]=i.lat(),t[0]=i.lng()):e.isDefined(t.type)&&"Point"===t.type?(t.coordinates[1]=i.lat(),t.coordinates[0]=i.lng()):(t.latitude=i.lat(),t.longitude=i.lng()),t},getLabelPositionPoint:function(t){var e,i;if(void 0!==t)return t=/^([-\d\.]+)\s([-\d\.]+)$/.exec(t),e=parseFloat(t[1]),i=parseFloat(t[2]),null!=e&&null!=i?new google.maps.Point(e,i):void 0},createWindowOptions:function(i,o,r,a){var l;return null!=r&&null!=a&&null!=n?(l=e.extend({},a,{content:this.buildContent(o,a,r),position:null!=a.position?a.position:e.isObject(i)?i.getPosition():s(o.coords)}),null!=i&&null==(null!=l?l.pixelOffset:void 0)&&(null==l.boxClass||(l.pixelOffset={height:0,width:-2})),l):a?a:(t.error("infoWindow defaults not defined"),r?void 0:t.error("infoWindow content not defined"))}
19,buildContent:function(t,e,i){var o,r;return null!=e.content?r=e.content:null!=n?(i=i.replace(/^\s+|\s+$/g,""),o=""===i?"":n(i)(t),o.length>0&&(r=o[0])):r=i,r},defaultDelay:50,isTrue:function(t){return r(t,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:o,isFalsy:function(t){return r(t,!1,[void 0,null])||o(t)},getCoords:s,validateCoords:u,equalCoords:function(t,e){return a(t)===a(e)&&l(t)===l(e)},validatePath:function(t){var n,o,r,s;if(o=0,e.isUndefined(t.type)){if(!Array.isArray(t)||t.length<2)return!1;for(;o<t.length;){if(!(e.isDefined(t[o].latitude)&&e.isDefined(t[o].longitude)||"function"==typeof t[o].lat&&"function"==typeof t[o].lng))return!1;o++}return!0}if(e.isUndefined(t.coordinates))return!1;if("Polygon"===t.type){if(t.coordinates[0].length<4)return!1;n=t.coordinates[0]}else if("MultiPolygon"===t.type){if(s={max:0,index:0},i.forEach(t.coordinates,function(t,e){if(t[0].length>this.max)return this.max=t[0].length,this.index=e},s),r=t.coordinates[s.index],n=r[0],n.length<4)return!1}else{if("LineString"!==t.type)return!1;if(t.coordinates.length<2)return!1;n=t.coordinates}for(;o<n.length;){if(2!==n[o].length)return!1;o++}return!0},convertPathPoints:function(t){var n,o,r,s,a;if(o=0,s=new google.maps.MVCArray,e.isUndefined(t.type))for(;o<t.length;)e.isDefined(t[o].latitude)&&e.isDefined(t[o].longitude)?r=new google.maps.LatLng(t[o].latitude,t[o].longitude):"function"==typeof t[o].lat&&"function"==typeof t[o].lng&&(r=t[o]),s.push(r),o++;else for("Polygon"===t.type?n=t.coordinates[0]:"MultiPolygon"===t.type?(a={max:0,index:0},i.forEach(t.coordinates,function(t,e){if(t[0].length>this.max)return this.max=t[0].length,this.index=e},a),n=t.coordinates[a.index][0]):"LineString"===t.type&&(n=t.coordinates);o<n.length;)s.push(new google.maps.LatLng(n[o][1],n[o][0])),o++;return s},getPath:function(t,e){var n;return null!=e&&i.isString(e)?(n=t,i.each(e.split("."),function(t){if(n)return n=n[t]}),n):e},validateBoundPoints:function(t){return!(e.isUndefined(t.sw.latitude)||e.isUndefined(t.sw.longitude)||e.isUndefined(t.ne.latitude)||e.isUndefined(t.ne.longitude))},convertBoundPoints:function(t){var e;return e=new google.maps.LatLngBounds(new google.maps.LatLng(t.sw.latitude,t.sw.longitude),new google.maps.LatLng(t.ne.latitude,t.ne.longitude))},fitMapBounds:function(t,e){return t.fitBounds(e)}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapIsReady",["$q","$timeout",function(t,e){var i,n,o,r;return n=0,r=[],o=function(){return t.all(r)},i=function(t,r,s){return e(function(){return s<=0?void t.reject("Your maps are not found we have checked the maximum amount of times. :)"):void(n!==r?i(t,r,s-1):t.resolve(o()))},100)},{spawn:function(){var e;return e=t.defer(),r.push(e.promise),n+=1,{instance:n,deferred:e}},promises:o,instances:function(){return n},promise:function(e,n){var o;return null==e&&(e=1),null==n&&(n=50),o=t.defer(),i(o,e,n),o.promise},reset:function(){n=0,r.length=0},decrement:function(){n>0&&(n-=1),r.length&&(r.length-=1)}}}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(e){var i;return i=function(e){function i(t,e,i,n){this.scope=t,this.element=e,this.attrs=i,this.ctrls=n}return t(i,e),i}(e)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(t){return t.spawn()}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil",function(o,r){return function(o){function s(e,i){this.scope=e,this["interface"]=null!=i?i:{scopeKeys:[]},this.modelsLength=t(this.modelsLength,this),this.updateChild=t(this.updateChild,this),this.destroy=t(this.destroy,this),this.setChildScope=t(this.setChildScope,this),this.getChanges=t(this.getChanges,this),this.getProp=t(this.getProp,this),this.setIdKey=t(this.setIdKey,this),this.modelKeyComparison=t(this.modelKeyComparison,this),s.__super__.constructor.call(this),this.defaultIdKey="id",this.idKey=void 0}return n(s,o),s.prototype.evalModelHandle=function(t,e){if(null!=t&&null!=e)return"self"===e?t:(i.isFunction(e)&&(e=e()),r.getPath(t,e))},s.prototype.modelKeyComparison=function(t,e){var n,o,s,a,l,u;if(s=this["interface"].scopeKeys.indexOf("coords")>
19=0,(s&&null!=this.scope.coords||!s)&&(l=this.scope),null==l)throw"No scope set!";return s&&(n=this.scopeOrModelVal("coords",l,t),o=this.scopeOrModelVal("coords",l,e),a=r.equalCoords(n,o),!a)?a:(u=i.without(this["interface"].scopeKeys,"coords"),a=i.every(u,function(i){return function(n){return i.scopeOrModelVal(l[n],l,t)===i.scopeOrModelVal(l[n],l,e)}}(this)))},s.prototype.setIdKey=function(t){return this.idKey=null!=t.idKey?t.idKey:this.defaultIdKey},s.prototype.setVal=function(t,e,i){return this.modelOrKey(t,e=i),t},s.prototype.modelOrKey=function(t,e){if(null!=e)return"self"!==e?r.getPath(t,e):t},s.prototype.getProp=function(t,e,i){return this.scopeOrModelVal(t,e,i)},s.prototype.getChanges=function(t,e,n){var o,r,s;n&&(e=i.pick(e,n),t=i.pick(t,n)),r={},s={},o={};for(s in t)e&&e[s]===t[s]||(i.isArray(t[s])?r[s]=t[s]:i.isObject(t[s])?(o=this.getChanges(t[s],e?e[s]:null),i.isEmpty(o)||(r[s]=o)):r[s]=t[s]);return r},s.prototype.scopeOrModelVal=function(t,e,n,o){var r,s,a,l;return null==o&&(o=!1),r=function(t,e,i){return null==i&&(i=!1),i?{isScope:t,value:e}:e},l=i.get(e,t),i.isFunction(l)?r(!0,l(n),o):i.isObject(l)?r(!0,l,o):i.isString(l)?(s=l,a=s?"self"===s?n:i.get(n,s):i.get(n,t),i.isFunction(a)?r(!1,a(),o):r(!1,a,o)):r(!0,l,o)},s.prototype.setChildScope=function(t,e,i){var n,o,r,s;for(o in t)r=t[o],n=this.scopeOrModelVal(r,e,i,!0),null!=(null!=n?n.value:void 0)&&(s=n.value,s!==e[r]&&(e[r]=s));return e.model=i},s.prototype.onDestroy=function(t){},s.prototype.destroy=function(t){var e;return null==t&&(t=!1),null==this.scope||(null!=(e=this.scope)?e.$$destroyed:void 0)||!this.needToManualDestroy&&!t?this.clean():this.scope.$destroy()},s.prototype.updateChild=function(t,e){return null==e[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):t.updateModel(e)},s.prototype.modelsLength=function(t){var i,n;return null==t&&(t=void 0),i=0,n=t?t:this.scope.models,null==n?i:i=e.isArray(n)||null!=n.length?n.length:Object.keys(n).length},s}(o)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(t,e,i,n){return{didQueueInitPromise:function(t,i){return 0===i.models.length&&(e.promiseLock(t,n.promiseTypes.init,null,null,function(){return n.resolve()}),!0)},figureOutState:function(e,i,n,o,r){var s,a,l,u,p;return s=[],l={},u=[],p=[],i.models.forEach(function(r){var a;return null==r[e]?t.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(l[r[e]]={},null==n.get(r[e])?s.push(r):(a=n.get(r[e]),o(r,a.clonedModel,i)?void 0:p.push({model:r,child:a})))}),a=n.values(),a.forEach(function(i){var n;return null==i?void t.error("child undefined in ModelsWatcher."):null==i.model?void t.error("child.model undefined in ModelsWatcher."):(n=i.model[e],null==l[n]?u.push(i):void 0)}),{adds:s,removals:u,updates:p}}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(t,e,n){var o,r,s,a,l,u,p,h,c,d,g;return c={create:"create",update:"update","delete":"delete",init:"init"},h={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},g=function(){var t;return t={},t[""+h.IN_PROGRESS]="in-progress",t[""+h.RESOLVED]="resolved",t[""+h.REJECTED]="rejected",t}(),a=function(t){return t.$$state?t.$$state.status===h.IN_PROGRESS:!t.hasOwnProperty("$$v")||void 0},l=function(t){return t.$$state?t.$$state.status===h.RESOLVED:!!t.hasOwnProperty("$$v")||void 0},p=function(t){return g[t]||"done w error"},o=function(e){var i,n,o;return i=t.defer(),n=t.all([e,i.promise]),o=t.defer(),e.then(i.resolve,function(){},function(t){return i.notify(t),o.notify(t)}),n.then(function(t){return o.resolve(t[0]||t[1])},function(t){return o.reject(t)}),o.promise.cancel=function(t){return null==t&&(t="canceled"),i.reject(t)},o.promise.notify=function(t){if(null==t&&(t="cancel safe"),o.notify(t),e.hasOwnProperty("notify"))return e.notify(t)},null!=e.promiseType&&(o.promise.promiseType=e.promiseType),o.promise},r=function(t,e){return{promise:t,promiseType:e}}
19,s=function(){return t.defer()},d=function(){var e;return e=t.defer(),e.resolve.apply(void 0,arguments),e.promise},u=function(o){var r;return i.isFunction(o)?(r=t.defer(),e(function(){var t;return t=o(),r.resolve(t)}),r.promise):void n.error("uiGmapPromise.promise() only accepts functions")},{defer:s,promise:u,resolve:d,promiseTypes:c,isInProgress:a,isResolved:l,promiseStatus:p,ExposedPromise:o,SniffedPromise:r}}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var e;return e=function(){function e(){this.removeAll=t(this.removeAll,this),this.slice=t(this.slice,this),this.push=t(this.push,this),this.keys=t(this.keys,this),this.values=t(this.values,this),this.remove=t(this.remove,this),this.put=t(this.put,this),this.stateChanged=t(this.stateChanged,this),this.get=t(this.get,this),this.length=0,this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return e.prototype.get=function(t){return this.dict[t]},e.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},e.prototype.put=function(t,e){return null==this.get(t)&&this.length++,this.stateChanged(),this.dict[t]=e},e.prototype.remove=function(t,e){var i;if(null==e&&(e=!1),!e||this.get(t))return i=this.dict[t],delete this.dict[t],this.length--,this.stateChanged(),i},e.prototype.valuesOrKeys=function(t){var e,n;return null==t&&(t="Keys"),this["did"+t+"StateChange"]?(n=[],e=[],i.each(this.dict,function(t,i){return n.push(t),e.push(i)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=n,this.allKeys=e,this["all"+t]):this["all"+t]},e.prototype.values=function(){return this.valuesOrKeys("Vals")},e.prototype.keys=function(){return this.valuesOrKeys()},e.prototype.push=function(t,e){return null==e&&(e="key"),this.put(t[e],t)},e.prototype.slice=function(){return this.keys().map(function(t){return function(e){return t.remove(e)}}(this))},e.prototype.removeAll=function(){return this.slice()},e.prototype.each=function(t){return i.each(this.dict,function(e,i){return t(e)})},e.prototype.map=function(t){return i.map(this.dict,function(e,i){return t(e)})},e}()})}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(t){var e;return e=function(t){return this.setIfChange=function(e){return function(n,o){if(!i.isEqual(o,n))return t(e,n)}},this.sic=this.setIfChange,this}}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(i,n,o,r){var s;return s=function(){function s(e,n,r,a){null==n&&(n={}),this.opt_options=null!=r?r:{},this.opt_events=a,this.checkSync=t(this.checkSync,this),this.getGMarkers=t(this.getGMarkers,this),this.fit=t(this.fit,this),this.destroy=t(this.destroy,this),this.attachEvents=t(this.attachEvents,this),this.clear=t(this.clear,this),this.draw=t(this.draw,this),this.removeMany=t(this.removeMany,this),this.remove=t(this.remove,this),this.addMany=t(this.addMany,this),this.update=t(this.update,this),this.add=t(this.add,this),this.type=s.type,this.clusterer=new NgMapMarkerClusterer(e,n,this.opt_options),this.propMapGMarkers=new o,this.attachEvents(this.opt_events,"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,i.info(this)}return s.type="ClustererMarkerManager",s.prototype.checkKey=function(t){var e;if(null==t.key)return e="gMarker.key undefined and it is REQUIRED!!",i.error(e)},s.prototype.add=function(t){return this.checkKey(t),this.clusterer.addMarker(t,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(t.key,t),this.checkSync()},s.prototype.update=function(t){return this.remove(t),this.add(t)},s.prototype.addMany=function(t){return t.forEach(function(t){return function(e){return t.add(e)}}(this))},s.prototype.remove=function(t){var e;return this.checkKey(t),e=this.propMapGMarkers.get(t.key),e&&(this.clusterer.removeMarker(t,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(t.key)),this.checkSync()},s.prototype.removeMany=function(t){return t.forEach(function(t){return function(e){return t.remove(e)}}(this))},s.prototype.draw=function(){return this.clusterer.repaint()},s.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},s.prototype.attachEvents=function(t,n){var o,r,s;if(this.listeners=[],e.isDefined(t)&&null!=t&&e.isObject(t)){s=[];for(r in t)o=t[r],t.hasOwnProperty(r)&&e.isFunction(t[r])?(i.info(n+": Attaching event: "+r+" to clusterer"),s.push(this.listeners.push(google.maps.event.addListener(this.clusterer,r,t[r])))):s.push(void 0);return s}},s.prototype.clearEvents=function(){return r.removeEvents(this.listeners),this.listeners=[]},s.prototype.destroy=function(){return this.clearEvents(),this.clear()},s.prototype.fit=function(){return n.fit(this.getGMarkers(),this.clusterer.getMap())},s.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},s.prototype.checkSync=function(){},s}()}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var t,i;return t=[],i=[],{createMapInstance:function(n,o){var r;return r=null,0===t.length?(r=new google.maps.Map(n,o),i.push(r)):(r=t.pop(),e.element(n).append(r.getDiv()),r.setOptions(o),i.push(r)),r},recycleMapInstance:function(e){var n;if(n=i.indexOf(e),n<0)throw new Error("Expected map instance to be a previously used instance");return i.splice(n,1),t.push(e)}}}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(e,i,n){var o;return o=function(){function o(i,r,s){this.getGMarkers=t(this.getGMarkers,this),this.fit=t(this.fit,this),this.handleOptDraw=t(this.handleOptDraw,this),this.clear=t(this.clear,this),this.destroy=t(this.destroy,this),this.draw=t(this.draw,this),this.removeMany=t(this.removeMany,this),this.remove=t(this.remove,this),this.addMany=t(this.addMany,this),this.update=t(this.update,this),this.add=t(this.add,this),this.type=o.type,this.gMap=i,this.gMarkers=new n,this.$log=e,this.$log.info(this)}return o.type="MarkerManager",o.prototype.add=function(t,i){var n,o;if(null==i&&(i=!0),null==t.key)throw o="gMarker.key undefined and it is REQUIRED!!",e.error(o),o;if(n=this.gMarkers.get(t.key),!n)return this.handleOptDraw(t,i,!0),this.gMarkers.put(t.key,t)},o.prototype.update=function(t,e){return null==e&&(e=!0),this.remove(t,e),this.add(t,e)},o.prototype.addMany=function(t){return t.forEach(function(t){return function(e){return t.add(e)}}(this))},o.prototype.remove=function(t,e){if(null==e&&(e=!0),this.handleOptDraw(t,e,!1),this.gMarkers.get(t.key))return this.gMarkers.remove(t.key)},o.prototype.removeMany=function(t){return t.forEach(function(t){return function(e){return t.remove(e)}}(this))},o.prototype.draw=function(){var t;return t=[],this.gMarkers.each(function(e){return function(i){if(!i.isDrawn)return i.doAdd?(i.setMap(e.gMap),i.isDrawn=!0):t.push(i)}}(this)),t.forEach(function(t){return function(e){return e.isDrawn=!1,t.remove(e,!0)}}(this))},o.prototype.destroy=function(){return this.clear()},o.prototype.clear=function(){return this.gMarkers.each(function(t){ 20return t.setMap(null)}),delete this.gMarkers,this.gMarkers=new n}
20,o.prototype.handleOptDraw=function(t,e,i){return e===!0?(i?t.setMap(this.gMap):t.setMap(null),t.isDrawn=!0):(t.isDrawn=!1,t.doAdd=i)},o.prototype.fit=function(){return i.fit(this.getGMarkers(),this.gMap)},o.prototype.getGMarkers=function(){return this.gMarkers.values()},o}()}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(n,o,r,s){var a;return a=function(){function a(e,i,o,l,u){null==i&&(i={}),this.opt_options=null!=o?o:{},this.opt_events=l,this.scope=u,this.checkSync=t(this.checkSync,this),this.isSpiderfied=t(this.isSpiderfied,this),this.getGMarkers=t(this.getGMarkers,this),this.fit=t(this.fit,this),this.destroy=t(this.destroy,this),this.attachEvents=t(this.attachEvents,this),this.clear=t(this.clear,this),this.draw=t(this.draw,this),this.removeMany=t(this.removeMany,this),this.remove=t(this.remove,this),this.addMany=t(this.addMany,this),this.update=t(this.update,this),this.add=t(this.add,this),this.type=a.type,this.markerSpiderfier=new s(e,this.opt_options),this.propMapGMarkers=new r,this.attachEvents(this.opt_events,"opt_events"),this.noDrawOnSingleAddRemoves=!0,n.info(this)}return a.type="SpiderfierMarkerManager",a.prototype.checkKey=function(t){var e;if(null==t.key)return e="gMarker.key undefined and it is REQUIRED!!",n.error(e)},a.prototype.add=function(t){return t.setMap(this.markerSpiderfier.map),this.checkKey(t),this.markerSpiderfier.addMarker(t,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(t.key,t),this.checkSync()},a.prototype.update=function(t){return this.remove(t),this.add(t)},a.prototype.addMany=function(t){return t.forEach(function(t){return function(e){return t.add(e)}}(this))},a.prototype.remove=function(t){var e;return this.checkKey(t),e=this.propMapGMarkers.get(t.key),e&&(t.setMap(null),this.markerSpiderfier.removeMarker(t,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(t.key)),this.checkSync()},a.prototype.removeMany=function(t){return t.forEach(function(t){return function(e){return t.remove(e)}}(this))},a.prototype.draw=function(){},a.prototype.clear=function(){return this.removeMany(this.getGMarkers())},a.prototype.attachEvents=function(t,o){if(e.isDefined(t)&&null!=t&&e.isObject(t))return i.each(t,function(i){return function(r,s){if(t.hasOwnProperty(s)&&e.isFunction(t[s]))return n.info(o+": Attaching event: "+s+" to markerSpiderfier"),i.markerSpiderfier.addListener(s,function(){return"spiderfy"===s||"unspiderfy"===s?i.scope.$evalAsync(t[s].apply(t,arguments)):i.scope.$evalAsync(t[s].apply(t,[arguments[0],s,arguments[0].model,arguments]))})}}(this))},a.prototype.clearEvents=function(t,i){var o,r;if(e.isDefined(t)&&null!=t&&e.isObject(t))for(r in t)o=t[r],t.hasOwnProperty(r)&&e.isFunction(t[r])&&(n.info(i+": Clearing event: "+r+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(r))},a.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},a.prototype.fit=function(){return o.fit(this.getGMarkers(),this.markerSpiderfier.map)},a.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},a.prototype.isSpiderfied=function(){return i.find(this.getGMarkers(),function(t){return null!=(null!=t?t._omsData:void 0)})},a.prototype.checkSync=function(){},a}()}])}.call(this),function(){e.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(t){var i,n;return i=function(e,i,n){return google.maps.event.addListener(e,i,function(){return n.apply(this,arguments),t(function(){},!0)})},n=function(t,n,o){var r;return o?i(t,n,o):(r=[],e.forEach(n,function(e,n){return r.push(i(t,n,e))}),function(){return e.forEach(r,function(t){return google.maps.event.removeListener(t)}),r=null})}}])}.call(this),function(){e.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(t){return function(i,n,o,r){var s,a,l,u,p,h,c,d,g;return u=!1,d=n.$eval(o),n["static"]||(p={set_at:function(t){var e;if(!u&&(e=i.getAt(t)))return e.lng&&e.lat?(d[t].latitude=e.lat(),d[t].longitude=e.lng()):d[t]=e},insert_at:function(t){var e;if(!u&&(e=i.getAt(t)))return e.lng&&e.lat?d.splice(t,0,{latitude:e.lat(),longitude:e.lng()}):d.splice(t,0,e)},remove_at:function(t){if(!u)return d.splice(t,1)}},"Polygon"===d.type?s=d.coordinates[0]:"LineString"===d.type&&(s=d.coordinates),a={set_at:function(t){var e;if(!u&&(e=i.getAt(t),e&&e.lng&&e.lat))return s[t][1]=e.lat(),s[t][0]=e.lng()},insert_at:function(t){var e;if(!u&&(e=i.getAt(t),e&&e.lng&&e.lat))return s.splice(t,0,[e.lng(),e.lat()])},remove_at:function(t){if(!u)return s.splice(t,1)}},c=t(i,e.isUndefined(d.type)?p:a)),h=function(t){var e,n,o,s,a,l,p,h;
20if(u=!0,l=i,e=!1,t){for(n=0,p=l.getLength(),s=t.length,o=Math.min(p,s),a=void 0;n<o;)h=l.getAt(n),a=t[n],"function"==typeof a.equals?a.equals(h)||(l.setAt(n,a),e=!0):h.lat()===a.latitude&&h.lng()===a.longitude||(l.setAt(n,new google.maps.LatLng(a.latitude,a.longitude)),e=!0),n++;for(;n<s;)a=t[n],"function"==typeof a.lat&&"function"==typeof a.lng?l.push(a):l.push(new google.maps.LatLng(a.latitude,a.longitude)),e=!0,n++;for(;n<p;)l.pop(),e=!0,n++}if(u=!1,e)return r(l)},l=function(t){var e,n,o,s,a,l,p,h,c;if(u=!0,p=i,n=!1,t){for("Polygon"===d.type?e=t.coordinates[0]:"LineString"===d.type&&(e=t.coordinates),o=0,h=p.getLength(),a=e.length,s=Math.min(h,a),l=void 0;o<s;)c=p.getAt(o),l=e[o],c.lat()===l[1]&&c.lng()===l[0]||(p.setAt(o,new google.maps.LatLng(l[1],l[0])),n=!0),o++;for(;o<a;)l=e[o],p.push(new google.maps.LatLng(l[1],l[0])),n=!0,o++;for(;o<h;)p.pop(),n=!0,o++}if(u=!1,n)return r(p)},n["static"]||(g=e.isUndefined(d.type)?n.$watchCollection(o,h):n.$watch(o,l,!0)),function(){if(c&&(c(),c=null),g)return g(),g=null}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(t){return{maybeRepaint:function(e){if(e)return e.style.opacity=.9,t(function(){return e.style.opacity=1})}}}])}.call(this),function(){e.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var t,e,n,o;return t=["length","forEach","map"],e=[],n=function(e){return e.forEach=function(n){return i.each(i.omit(e,t),function(t){if(!i.isFunction(t))return n(t)})},e},e.push(n),o=function(e){return e.map=function(n){return i.map(i.omit(e,t),function(t){if(!i.isFunction(t))return n(t)})},e},e.push(o),{slapMap:o,slapForEach:n,slapAll:function(t){return e.forEach(function(e){return e(t)}),t}}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(n,o,r){var s;return s=function(n){function r(){return this.watchProps=t(this.watchProps,this),this.buildOpts=t(this.buildOpts,this),r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],r.prototype.getCorrectModel=function(t){return e.isDefined(null!=t?t.model:void 0)?t.model:t},r.prototype.buildOpts=function(t,i,n){var r,s,a;return null==t&&(t={}),null==n&&(n={}),this.scope?this.gMap?(r=this.getCorrectModel(this.scope),a=this.scopeOrModelVal("stroke",this.scope,r),s=e.extend(t,this.DEFAULTS,{map:this.gMap,strokeColor:null!=a?a.color:void 0,strokeOpacity:null!=a?a.opacity:void 0,strokeWeight:null!=a?a.weight:void 0}),e.forEach(e.extend(n,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(t){return function(n,o){var a;return a=i?i[o]:t.scopeOrModelVal(o,t.scope,r),e.isUndefined(a)?s[o]=n:s[o]=r[o]}}(this)),s["static"]&&(s.editable=!1),s):void o.error("this.map not defined in CommonOptionsBuilder can not buildOpts"):void o.error("this.scope not defined in CommonOptionsBuilder can not buildOpts")},r.prototype.watchProps=function(t){return null==t&&(t=this.props),t.forEach(function(t){return function(e){if(null!=t.attrs[e]||null!=t.attrs[null!=e?e.prop:void 0])return(null!=e?e.isColl:void 0)?t.scope.$watchCollection(e.prop,t.setMyOptions):t.scope.$watch(e,t.setMyOptions)}}(this))},r}(r)}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(e){var i;return i=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.buildOpts=function(t,e){return i.__super__.buildOpts.call(this,{path:t},e,{geodesic:!1})},i}(e)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(i){var n;return n=function(i){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,i),n.prototype.buildOpts=function(t,i,o){var r,s;return s=this.getCorrectModel(this.scope),r=i?i.fill:this.scopeOrModelVal("fill",this.scope,s),t=e.extend(t,{fillColor:null!=r?r.color:void 0,fillOpacity:null!=r?r.opacity:void 0}),n.__super__.buildOpts.call(this,t,i,o)},n}(i)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(e){var i;return i=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.buildOpts=function(t,e){return i.__super__.buildOpts.call(this,{path:t},e,{geodesic:!1})},i}(e)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(e){var i;return i=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.buildOpts=function(t,e){return i.__super__.buildOpts.call(this,{bounds:t},e)},i}(e)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(e){var i;return i=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.buildOpts=function(t,e,n){return i.__super__.buildOpts.call(this,{center:t,radius:e},n)},i}(e)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(t,n){return i.extend(n,{createOptions:function(t,i,o,r){var s;return null==o&&(o={}),s=e.extend({},o,{position:null!=o.position?o.position:n.getCoords(t),visible:null!=o.visible?o.visible:n.validateCoords(t)}),null==o.icon&&null==i||(s=e.extend(s,{icon:null!=o.icon?o.icon:i})),null!=r&&(s.map=r),s},isLabel:function(t){return null!=t&&(null!=t.labelContent||null!=t.labelAnchor||null!=t.labelClass||null!=t.labelStyle||null!=t.labelVisible)}})}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$t
20imeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(o,r,s,a,l){return function(o,r){var u;return u=function(o){function u(n){var o,a,u;this.scope=n.scope,this.attrs=n.attrs,this.gMap=n.gMap,this.defaults=n.defaults,this.model=n.model,a=n.gObjectChangeCb,this.isScopeModel=null!=(u=n.isScopeModel)&&u,this.clean=t(this.clean,this),this.isScopeModel&&(this.clonedModel=i.clone(this.model,!0)),this.isDragging=!1,this.internalEvents={dragend:function(t){return function(){return i.defer(function(){return t.isDragging=!1})}}(this),dragstart:function(t){return function(){return t.isDragging=!0}}(this)},o=function(t){return function(){var i;if(!t.isDragging)return t.pathPoints=t.convertPathPoints(t.scope.path),null!=t.gObject&&t.clean(),null!=t.scope.model&&(i=t.scope),t.pathPoints.length>0&&(t.gObject=r(t.buildOpts(t.pathPoints,i))),t.gObject?(s(t.gObject.getPath(),t.scope,"path",function(e){if(t.pathPoints=e,null!=a)return a()}),e.isDefined(t.scope.events)&&e.isObject(t.scope.events)&&(t.listeners=t.model?l.setEvents(t.gObject,t.scope,t.model):l.setEvents(t.gObject,t.scope,t.scope)),t.internalListeners=t.model?l.setEvents(t.gObject,{events:t.internalEvents},t.model):l.setEvents(t.gObject,{events:t.internalEvents},t.scope)):void 0}}(this),o(),this.scope.$watch("path",function(t){return function(e,n){if(!i.isEqual(e,n)||!t.gObject)return o()}}(this),!0),!this.scope["static"]&&e.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(t){return function(e,i){var n;if(e!==i)return e=!t.isFalse(e),null!=(n=t.gObject)?n.setEditable(e):void 0}}(this),!0),e.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(t){return function(e,i){var n;if(e!==i)return e=!t.isFalse(e),null!=(n=t.gObject)?n.setDraggable(e):void 0}}(this),!0),e.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(t){return function(e,i){var n;return e!==i&&(e=!t.isFalse(e)),null!=(n=t.gObject)?n.setVisible(e):void 0}}(this),!0),e.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(t){return function(e,i){var n;if(e!==i)return e=!t.isFalse(e),null!=(n=t.gObject)?n.setOptions(t.buildOpts(t.gObject.getPath())):void 0}}(this),!0),e.isDefined(this.scope.stroke)&&e.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(t){return function(e,i){var n;if(e!==i)return null!=(n=t.gObject)?n.setOptions(t.buildOpts(t.gObject.getPath())):void 0}}(this),!0),e.isDefined(this.scope.stroke)&&e.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(t){return function(e,i){var n;if(e!==i)return null!=(n=t.gObject)?n.setOptions(t.buildOpts(t.gObject.getPath())):void 0}}(this),!0),e.isDefined(this.scope.stroke)&&e.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(t){return function(e,i){var n;if(e!==i)return null!=(n=t.gObject)?n.setOptions(t.buildOpts(t.gObject.getPath())):void 0}}(this),!0),e.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(t){return function(e,i){var n;if(e!==i)return null!=(n=t.gObject)?n.setOptions(t.buildOpts(t.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(t){return function(){return t.clean(),t.scope=null}}(this)),e.isDefined(this.scope.fill)&&e.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(t){return function(e,i){if(e!==i)return t.gObject.setOptions(t.buildOpts(t.gObject.getPath()))}}(this)),e.isDefined(this.scope.fill)&&e.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(t){return function(e,i){if(e!==i)return t.gObject.setOptions(t.buildOpts(t.gObject.getPath()))}}(this)),e.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(t){return function(e,i){if(e!==i)return t.gObject.setOptions(t.buildOpts(t.gObject.getPath()))}}(this))}return n(u,o),u.include(a),u.prototype.clean=function(){var t;return l.removeEvents(this.listeners),l.removeEvents(this.internalListeners),null!=(t=this.gObject)&&t.setMap(null),this.gObject=null},u}(o)}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(t,e){var n,o;
20return n=function(t,e,i){var n,o;o=new google.maps.Polyline({map:t,clickable:!1}),n=google.maps.event.addListener(t,"mousemove",function(t){return o.getPath().push(t.latLng)}),google.maps.event.addListenerOnce(t,"mouseup",function(r){var s;return google.maps.event.removeListener(n),s=o.getPath(),o.setMap(null),e.push(new google.maps.Polygon({map:t,path:s})),o=null,google.maps.event.clearListeners(t.getDiv(),"mousedown"),i()})},o=function(o,r){var s,a;return this.map=o,s=function(e){return function(){var i;return i={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},t.info("disabling map move"),e.map.setOptions(i)}}(this),a=function(t){return function(){var e,n;return e={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},null!=(n=t.deferred)&&n.resolve(),i.defer(function(){return t.map.setOptions(i.extend(e,r.options))})}}(this),this.engage=function(i){return function(o){return i.polys=o,i.deferred=e.defer(),s(),t.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(i.map.getDiv(),"mousedown",function(t){return n(i.map,i.polys,a)}),i.deferred.promise}}(this),this}}])}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function i(){this.constructor=t}for(var n in e)r.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(r,s,a,l,u,p,h,c,d){var g;return g=function(r){function g(t){this.internalEvents=n(this.internalEvents,this),this.setLabelOptions=n(this.setLabelOptions,this),this.setOptions=n(this.setOptions,this),this.setIcon=n(this.setIcon,this),this.setCoords=n(this.setCoords,this),this.isNotValid=n(this.isNotValid,this),this.maybeSetScopeValue=n(this.maybeSetScopeValue,this),this.createMarker=n(this.createMarker,this),this.setMyScope=n(this.setMyScope,this),this.updateModel=n(this.updateModel,this),this.handleModelChanges=n(this.handleModelChanges,this),this.destroy=n(this.destroy,this);var e,o,r,s,l,p,h;h=t.scope,this.model=t.model,this.keys=t.keys,this.gMap=t.gMap,this.defaults=null!=(o=t.defaults)?o:{},this.doClick=t.doClick,this.gManager=t.gManager,this.doDrawSelf=null==(r=t.doDrawSelf)||r,this.trackModel=null==(s=t.trackModel)||s,this.needRedraw=null!=(l=t.needRedraw)&&l,this.isScopeModel=null!=(p=t.isScopeModel)&&p,this.isScopeModel&&(this.clonedModel=i.clone(this.model,!0)),this.deferred=d.defer(),i.each(this.keys,function(t){return function(e,n){var o;if(o=t.keys[n],null!=o&&!i.isFunction(o)&&i.isString(o))return t[n+"Key"]=o}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),g.__super__.constructor.call(this,h),this.scope.getGMarker=function(t){return function(){return t.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(t){return function(e,i){if(e!==i)return t.handleModelChanges(e,i)}}(this),!0)):(e=new u(function(t){return function(e){if(i.isFunction(e)&&(e="all"),!t.firstTime)return t.setMyScope(e,h)}}(this),(!1)),i.each(this.keys,function(t,i){return h.$watch(i,e.sic(i),!0)})),this.scope.$on("$destroy",function(t){return function(){return f(t)}}(this)),this.createMarker(this.model),a.info(this)}var f;return o(g,r),g.include(s),g.include(l),g.include(p),f=function(t){if(null!=(null!=t?t.gObject:void 0)&&(t.removeEvents(t.externalListeners),t.removeEvents(t.internalListeners),null!=t?t.gObject:void 0))return t.removeFromManager&&t.gManager.remove(t.gObject),t.gObject.setMap(null),t.gObject=null},g.prototype.destroy=function(t){return null==t&&(t=!0),this.removeFromManager=t,this.scope.$destroy()},g.prototype.handleModelChanges=function(t,e){var n,o,r;if(n=this.getChanges(t,e,h.keys),!this.firstTime)return o=0,r=i.keys(n).length,i.each(n,function(i){return function(n,s){var a;return o+=1,a=r===o,i.setMyScope(s,t,e,!1,!0,a),i.needRedraw=!0}}(this))},g.prototype.updateModel=function(t){return this.isScopeModel&&(this.clonedModel=i.clone(t,!0)),this.setMyScope("all",t,this.model)},g.prototype.renderGMarker=function(e,i){var n,o,r;if(null==e&&(e=!0),n=this.getProp("coords",this.scope,this.model),null!=(null!=(r=this.gManager)?r.isSpiderfied:void 0)&&(o=this.gManager.isSpiderfied()),null!=n){if(!this.validateCoords(n))return void a.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=i&&i(),e&&this.gObject&&this.gManager.add(this.gObject),o)return this.gManager.markerSpiderfier.spiderListener(this.gObject,t.event)}else if(e&&this.gObject)return this.gManager.remove(this.gObject)},g.prototype.setMyScope=function(t,e,n,o,r){var s;switch(null==n&&(n=void 0),null==o&&(o=!1),null==r&&(r=!0),null==e?e=this.model:this.model=e,this.gObject||(this.setOptions(this.scope,r),s=!0),t){case"all":return i.each(this.keys,function(t){return function(i,s){return t.setMyScope(s,e,n,o,r)}}(this));case"icon":return this.maybeSetScopeValue({gSetter:this.setIcon,doDraw:r});case"coords":return this.maybeSetScopeValue({gSetter:this.setCoords,doDraw:r});case"options":if(!s)return this.createMarker(e,n,o,r)}}
20,g.prototype.createMarker=function(t,e,i,n){return null==e&&(e=void 0),null==i&&(i=!1),null==n&&(n=!0),this.maybeSetScopeValue({gSetter:this.setOptions,doDraw:n}),this.firstTime=!1},g.prototype.maybeSetScopeValue=function(t){var e,i,n;if(i=t.gSetter,e=null==(n=t.doDraw)||n,null!=i&&i(this.scope,e),this.doDrawSelf&&e)return this.gManager.draw()},g.prototype.isNotValid=function(t,e){var i,n;return null==e&&(e=!0),n=!!e&&void 0===this.gObject,i=!this.trackModel&&t.$id!==this.scope.$id,i||n},g.prototype.setCoords=function(t,e){if(null==e&&(e=!0),!this.isNotValid(t)&&null!=this.gObject)return this.renderGMarker(e,function(e){return function(){var i,n,o;if(n=e.getProp("coords",t,e.model),i=e.getCoords(n),o=e.gObject.getPosition(),null==o||null==i||i.lng()!==o.lng()||i.lat()!==o.lat())return e.gObject.setPosition(i),e.gObject.setVisible(e.validateCoords(n))}}(this))},g.prototype.setIcon=function(t,e){if(null==e&&(e=!0),!this.isNotValid(t)&&null!=this.gObject)return this.renderGMarker(e,function(e){return function(){var i,n,o;if(o=e.gObject.getIcon(),n=e.getProp("icon",t,e.model),o!==n)return e.gObject.setIcon(n),i=e.getProp("coords",t,e.model),e.gObject.setPosition(e.getCoords(i)),e.gObject.setVisible(e.validateCoords(i))}}(this))},g.prototype.setOptions=function(t,e){var n;if(null==e&&(e=!0),!this.isNotValid(t,!1)){if(this.renderGMarker(e,function(e){return function(){var n,o,r;if(o=e.getProp("coords",t,e.model),r=e.getProp("icon",t,e.model),n=e.getProp("options",t,e.model),e.opts=e.createOptions(o,r,n),e.isLabel(e.gObject)!==e.isLabel(e.opts)&&null!=e.gObject&&(e.gManager.remove(e.gObject),e.gObject=void 0),null!=e.gObject&&e.gObject.setOptions(e.setLabelOptions(e.opts)),e.gObject||(e.isLabel(e.opts)?e.gObject=new MarkerWithLabel(e.setLabelOptions(e.opts)):e.opts.content?(e.gObject=new RichMarker(e.opts),e.gObject.getIcon=e.gObject.getContent,e.gObject.setIcon=e.gObject.setContent):e.gObject=new google.maps.Marker(e.opts),i.extend(e.gObject,{model:e.model})),e.externalListeners&&e.removeEvents(e.externalListeners),e.internalListeners&&e.removeEvents(e.internalListeners),e.externalListeners=e.setEvents(e.gObject,e.scope,e.model,["dragend"]),e.internalListeners=e.setEvents(e.gObject,{events:e.internalEvents(),$evalAsync:function(){}},e.model),null!=e.id)return e.gObject.key=e.id}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==c.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");null!=(n=this.gObject)&&n.getMap()&&this.gManager.type===c.type||(a.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},g.prototype.setLabelOptions=function(t){return t.labelAnchor&&(t.labelAnchor=this.getLabelPositionPoint(t.labelAnchor)),t},g.prototype.internalEvents=function(){return{dragend:function(t){return function(e,i,n,o){var r,s,a;return s=t.trackModel?t.scope.model:t.model,a=t.setCoordsFromEvent(t.modelOrKey(s,t.coordsKey),t.gObject.getPosition()),s=t.setVal(n,t.coordsKey,a),r=t.scope.events,null!=(null!=r?r.dragend:void 0)&&r.dragend(e,i,s,o),t.scope.$apply()}}(this),click:function(t){return function(i,n,o,r){var s;if(s=t.getProp("click",t.scope,t.model),t.doClick&&e.isFunction(s))return t.scope.$evalAsync(s(i,n,t.model,r))}}(this)}},g}(r)}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(e,i){var n,o,r;return r=function(t){return new google.maps.Polygon(t)},o=new e(i,r),n=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i}(o)}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(e,i){var n,o,r;return r=function(t){return new google.maps.Polyline(t)},o=e(i,r),n=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i}(o)}])}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function i(){this.constructor=t}for(var n in e)r.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(r,s,a,l,u,p,h,c){var d;return d=function(r){function d(t){this.updateModel=n(this.updateModel,this),this.destroy=n(this.destroy,this),this.remove=n(this.remove,this),this.getLatestPosition=n(this.getLatestPosition,this),this.hideWindow=n(this.hideWindow,this),this.showWindow=n(this.showWindow,this),this.handleClick=n(this.handleClick,this),this.watchOptions=n(this.watchOptions,this),this.watchCoords=n(this.watchCoords,this),this.createGWin=n(this.createGWin,this),this.watchElement=n(this.watchElement,this),this.watchAndDoShow=n(this.watchAndDoShow,this),this.doShow=n(this.doShow,this);var e,o,r,s,l;this.model=null!=(o=t.model)?o:{},this.scope=t.scope,this.opts=t.opts,this.isIconVisibleOnClick=t.isIconVisibleOnClick,this.gMap=t.gMap,this.markerScope=t.markerScope,this.element=t.element,this.needToManualDestroy=null!=(r=t.needToManualDestroy)&&r,this.markerIsVisibleAfterWindowClose
20=null==(s=t.markerIsVisibleAfterWindowClose)||s,this.isScopeModel=null!=(l=t.isScopeModel)&&l,this.isScopeModel&&(this.clonedModel=i.clone(this.model,!0)),this.getGmarker=function(){var t,e;if(null!=(null!=(t=this.markerScope)?t.getGMarker:void 0))return null!=(e=this.markerScope)?e.getGMarker():void 0},this.listeners=[],this.createGWin(),e=this.getGmarker(),null!=e&&e.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(t){return function(){return t.destroy()}}(this)),a.info(this)}return o(d,r),d.include(s),d.include(c),d.prototype.doShow=function(t){return this.scope.show===!0||t?this.showWindow():this.hideWindow()},d.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},d.prototype.watchElement=function(){return this.scope.$watch(function(t){return function(){var e,i;if(t.element||t.html)return t.html!==t.element.html()&&t.gObject?(null!=(e=t.opts)&&(e.content=void 0),i=t.gObject.isOpen(),t.remove(),t.createGWin(i)):void 0}}(this))},d.prototype.createGWin=function(e){var n,o,r,s,a;if(null==e&&(e=!1),r=this.getGmarker(),o={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),o=this.opts),this.element&&(this.html=i.isObject(this.element)?this.element.html():this.element),n=this.scope.options?this.scope.options:o,this.opts=this.createWindowOptions(r,this.markerScope||this.scope,this.html,n),null!=this.opts)return this.gObject||(this.opts.boxClass&&t.InfoBox&&"function"==typeof t.InfoBox?this.gObject=new t.InfoBox(this.opts):this.gObject=new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return h.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(t){return function(){return r&&(r.setAnimation(t.oldMarkerAnimation),t.markerIsVisibleAfterWindowClose&&i.delay(function(){return r.setVisible(!1),r.setVisible(t.markerIsVisibleAfterWindowClose)},250)),t.gObject.close(),t.model.show=!1,null!=t.scope.closeClick?t.scope.$evalAsync(t.scope.closeClick()):t.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(s=this.scope)&&null!=(a=s.options)?a.forceClick:void 0)||e),this.doShow(this.gObject.isOpen())},d.prototype.watchCoords=function(){var t;return t=null!=this.markerScope?this.markerScope:this.scope,t.$watch("coords",function(t){return function(e,i){var n;if(e!==i){if(null==e)t.hideWindow();else if(!t.validateCoords(e))return void a.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(t.model));if(n=t.getCoords(e),t.doShow(),t.gObject.setPosition(n),t.opts)return t.opts.position=n}}}(this),!0)},d.prototype.watchOptions=function(){return this.scope.$watch("options",function(t){return function(e,i){if(e!==i&&(t.opts=e,null!=t.gObject)){if(t.gObject.setOptions(t.opts),null!=t.opts.visible&&t.opts.visible)return t.showWindow();if(null!=t.opts.visible)return t.hideWindow()}}}(this),!0)},d.prototype.handleClick=function(t){var e,i;if(null!=this.gObject)return i=this.getGmarker(),e=function(t){return function(){if(null==t.gObject&&t.createGWin(),t.showWindow(),null!=i)return t.initialMarkerVisibility=i.getVisible(),t.oldMarkerAnimation=i.getAnimation(),i.setVisible(t.isIconVisibleOnClick)}}(this),t&&e(),i?this.listeners=this.listeners.concat(this.setEvents(i,{events:{click:e}},this.model)):void 0},d.prototype.showWindow=function(){var t,i,n;if(null!=this.gObject)return n=null,i=function(t){return function(){var e,i,n;if(!t.gObject.isOpen()){if(i=t.getGmarker(),null!=t.gObject&&null!=t.gObject.getPosition&&(n=t.gObject.getPosition()),i&&(n=i.getPosition()),!n)return;if(t.gObject.open(t.gMap,i),e=t.gObject.isOpen(),t.model.show!==e)return t.model.show=e}}}(this),this.scope.templateUrl?u.get(this.scope.templateUrl,{cache:p}).then(function(t){return function(o){var r;return n=t.scope.$new(),e.isDefined(t.scope.templateParameter)&&(n.parameter=t.scope.templateParameter),r=l(o.data)(n),t.gObject.setContent(r[0]),i()}}(this)):this.scope.template?(n=this.scope.$new(),e.isDefined(this.scope.templateParameter)&&(n.parameter=this.scope.templateParameter),t=l(this.scope.template)(n),this.gObject.setContent(t[0]),i()):i(),this.scope.$on("destroy",function(){return n.$destroy()})},d.prototype.hideWindow=function(){if(null!=this.gObject&&this.gObject.isOpen())return this.gObject.close()},d.prototype.getLatestPosition=function(t){var e;return e=this.getGmarker(),null==this.gObject||null==e||t?t?this.gObject.setPosition(t):void 0:this.gObject.setPosition(e.getPosition())},d.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},d.prototype.destroy=function(t){var e;if(null==t&&(t=!1),this.remove(),null!=this.scope&&!(null!=(e=this.scope)?e.$$destroyed:void 0)&&(this.needToManualDestroy||t))return this.scope.$destroy()},d.prototype.updateModel=function(t){return this.isScopeModel&&(this.clonedModel=i.clone(t,!0)), 21i.extend(this.model,this.clonedModel||t)},d}(r)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(o,r,s,a,l,u,p,h){return function(o,c,d){var g;return g=function(s){function g(e,n,s,a,u){this.element=n,this.attrs=s,this.gMap=a,this.defaults=u,this.maybeFit=t(this.maybeFit,this),this.createChild=t(this.createChild,this),this.pieceMeal=t(this.pieceMeal,this),this.createAllNew=t(this.createAllNew,this),this.watchIdKey=t(this.watchIdKey,this),this.createChildScopes=t(this.createChildScopes,this),this.watchDestroy=t(this.watchDestroy,this),this.onDestroy=t(this.onDestroy,this),this.rebuildAll=t(this.rebuildAll,this),this.doINeedToWipe=t(this.doINeedToWipe,this),this.watchModels=t(this.watchModels,this),g.__super__.constructor.call(this,e),this["interface"]=o,this.$log=r,this.plurals=new l,i.each(o.scopeKeys,function(t){return function(e){return t[e+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return n(g,s),g.include(a),g.prototype.watchModels=function(t){return t.$wat
21ch("models",function(e){return function(i,n){if(i!==n)return e.doINeedToWipe(i)||t.doRebuildAll?e.rebuildAll(t,!0,!0):e.createChildScopes(!1)}}(this),!0)},g.prototype.doINeedToWipe=function(t){var e;return e=null==t||0===t.length,this.plurals.length>0&&e},g.prototype.rebuildAll=function(t,e,i){return this.onDestroy(i).then(function(t){return function(){if(e)return t.createChildScopes()}}(this))},g.prototype.onDestroy=function(){return g.__super__.onDestroy.call(this,this.scope),u.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(t){return function(){return u.each(t.plurals.values(),function(t){return t.destroy(!0)},u.chunkSizeFrom(t.scope.cleanchunk,!1)).then(function(){var e;return null!=(e=t.plurals)?e.removeAll():void 0})}}(this))},g.prototype.watchDestroy=function(t){return t.$on("$destroy",function(e){return function(){return e.rebuildAll(t,!1,!0)}}(this))},g.prototype.createChildScopes=function(t){return null==t&&(t=!0),e.isUndefined(this.scope.models)?void this.$log.error("No models to create "+d+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),t?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},g.prototype.watchIdKey=function(t){return this.setIdKey(t),t.$watch("idKey",function(e){return function(i,n){if(i!==n&&null==i)return e.idKey=i,e.rebuildAll(t,!0,!0)}}(this))},g.prototype.createAllNew=function(t,e){var i;if(null==e&&(e=!1),this.models=t.models,this.firstTime&&(this.watchModels(t),this.watchDestroy(t)),!this.didQueueInitPromise(this,t))return i=null,u.promiseLock(this,p.promiseTypes.create,"createAllNew",function(t){return i=t},function(e){return function(){return u.map(t.models,function(t){var n;return n=e.createChild(t,e.gMap),i&&(r.debug("createNew should fall through safely"),n.isEnabled=!1),n.pathPoints.getArray()},u.chunkSizeFrom(t.chunk)).then(function(t){return e.maybeFit(t),e.firstTime=!1})}}(this))},g.prototype.pieceMeal=function(t,e){var n,o;if(null==e&&(e=!0),!t.$$destroyed)return n=null,o=null,this.models=t.models,null!=t&&this.modelsLength()&&this.plurals.length?u.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(t){return n=t},function(e){return function(){return p.promise(function(){return e.figureOutState(e.idKey,t,e.plurals,e.modelKeyComparison)}).then(function(r){return o=r,o.updates.length&&u.each(o.updates,function(t){return i.extend(t.child.scope,t.model),t.child.model=t.model}),u.each(o.removals,function(t){if(null!=t)return t.destroy(),e.plurals.remove(t.model[e.idKey]),n},u.chunkSizeFrom(t.chunk))}).then(function(){return u.each(o.adds,function(t){return n&&r.debug("pieceMeal should fall through safely"),e.createChild(t,e.gMap),n},u.chunkSizeFrom(t.chunk)).then(function(){return e.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0))},g.prototype.createChild=function(t,e){var i,n;return n=this.scope.$new(!1),this.setChildScope(o.scopeKeys,n,t),n.$watch("model",function(t){return function(e,i){if(e!==i)return t.setChildScope(o.scopeKeys,n,e)}}(this),!0),n["static"]=this.scope["static"],i=new c({isScopeModel:!0,scope:n,attrs:this.attrs,gMap:e,defaults:this.defaults,model:t,gObjectChangeCb:function(t){return function(){return t.maybeFit()}}(this)}),null==t[this.idKey]?void this.$log.error(d+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):(this.plurals.put(t[this.idKey],i),i)},g.prototype.maybeFit=function(t){if(null==t&&(t=this.plurals.map(function(t){return t.pathPoints})),this.scope.fit)return t=i.flatten(t),h.fit(t,this.gMap)},g}(s)}}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(n,o,r,s,a){var l,u;return u=function(t,e){return t.settingFromDirective=!0,e(),o(function(){return t.settingFromDirective=!1})},l=function(o){function a(t,o,s,a,l){var p,h,c;this.attrs=s,this.gMap=a,this.DEFAULTS=l,this.scope=t,c=null,p=function(t){return function(){if(c=null,null!=t.listeners)return t.removeEvents(t.listeners),t.listeners=void 0}}(this),h=new google.maps.Circle(this.buildOpts(r.getCoords(t.center),t.radiu
21s)),this.setMyOptions=function(e){return function(n,o){if(!t.settingFromDirective)return!i.isEqual(n,o)||n!==o||null!=n&&null!=o&&n.coordinates!==o.coordinates?h.setOptions(e.buildOpts(r.getCoords(t.center),t.radius)):void 0}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),null!=this.scope.control&&(this.scope.control.getCircle=function(){return h}),p(),this.listeners=this.setEvents(h,t,t,["radius_changed"])||[],this.listeners.push(google.maps.event.addListener(h,"radius_changed",function(){var n,o;if(n=h.getRadius(),n!==c)return c=n,o=function(){return u(t,function(){var e,o;if(n!==t.radius&&(t.radius=n),(null!=(e=t.events)?e.radius_changed:void 0)&&i.isFunction(null!=(o=t.events)?o.radius_changed:void 0))return t.events.radius_changed(h,"radius_changed",t,arguments)})},e.mock?o():t.$evalAsync(function(){return o()})})),this.listeners.push(google.maps.event.addListener(h,"center_changed",function(){return t.$evalAsync(function(){return u(t,function(){return e.isDefined(t.center.type)?(t.center.coordinates[1]=h.getCenter().lat(),t.center.coordinates[0]=h.getCenter().lng()):(t.center.latitude=h.getCenter().lat(),t.center.longitude=h.getCenter().lng())})})})),t.$on("$destroy",function(){return p(),h.setMap(null)}),n.info(this)}return t(a,o),a.include(r),a.include(s),a}(a)}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(e,n,o,r){var s;return s=function(e){function n(t,e,n,o){var r,s;this.scope=t,this.attrs=n,this.map=o,r=new google.maps.drawing.DrawingManager(this.scope.options),r.setMap(this.map),s=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return r}),!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(t){return null!=r?r.setOptions(t):void 0},!0),null!=this.scope.events&&(s=this.setEvents(r,this.scope,this.scope),this.scope.$watch("events",function(t){return function(e,n){if(!i.isEqual(e,n))return null!=s&&t.removeEvents(s),s=t.setEvents(r,t.scope,t.scope)}}(this))),this.scope.$on("$destroy",function(t){return function(){return null!=s&&t.removeEvents(s),r.setMap(null),r=null}}(this))}return t(n,e),n.include(r),n}(o)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(o,r){var s;return s=function(o){function s(i,n,o,a){if(this.scope=i,this.element=n,this.attrs=o,this.map=a,this.onWatch=t(this.onWatch,this),this.watch=t(this.watch,this),this.validateScope=t(this.validateScope,this),s.__super__.constructor.call(this,this.scope),this.$log=r,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=e.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(t){return function(){return t.onDestroy(t.scope)}}(this))}return n(s,o),s.prototype.DEFAULTS={},s.prototype.validateScope=function(t){var e;return null==t?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(e=null!=t.coords,e?e:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},s.prototype.watch=function(t,e,n){return null==n&&(n=!0),e.$watch(t,function(n){return function(o,r){if(!i.isEqual(o,r))return n.onWatch(t,e,o,r)}}(this),n)},s.prototype.onWatch=function(t,e,i,n){},s}(o)}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(e,i,n){var o;return o=function(e){function o(t,e,i,r,s,a,l,u){o.__super__.constructor.call(this,t),this.$log=n,this.$timeout=s,this.$compile=a,this.$http=l,this.$templateCache=u,this.DEFAULTS={},null!=t.options&&(this.DEFAULTS=t.options)}
21return t(o,e),o.include(i),o.prototype.getItem=function(t,e,i){return"models"===e?t[e][i]:t[e].get(i)},o}(e)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(n,o,r){var s;return s=function(n){function r(i,n,r,s,a,l){return this.scope=i,this.element=n,this.attrs=r,this.gMap=s,this.onLayerCreated=null!=a?a:void 0,this.$log=null!=l?l:o,this.createGoogleLayer=t(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,e.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(t){return function(e,i){if(e!==i)return t.doShow=e,e?t.gObject.setMap(t.gMap):t.gObject.setMap(null)}}(this),!0),this.scope.$watch("options",function(t){return function(e,i){if(e!==i&&t.doShow)return t.gObject.setOptions(e)}}(this),!0),void this.scope.$on("$destroy",function(t){return function(){return t.gObject.setMap(null)}}(this)))}return i(r,n),r.prototype.createGoogleLayer=function(){var t;if(null==this.attrs.options?this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&this.doShow&&this.gObject.setMap(this.gMap),null!=this.gObject&&null!=this.onLayerCreated)return"function"==typeof(t=this.onLayerCreated(this.scope,this.gObject))?t(this.gObject):void 0},r}(n)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(o,r){var s;return s=function(o){function s(n,o,s,a,l){return this.scope=n,this.element=o,this.attrs=s,this.gMap=a,this.$log=null!=l?l:r,this.hideOverlay=t(this.hideOverlay,this),this.showOverlay=t(this.showOverlay,this),this.refreshMapType=t(this.refreshMapType,this),this.createMapType=t(this.createMapType,this),null==this.attrs.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),e.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.showOverlay(),this.scope.$watch("show",function(t){return function(e,i){if(e!==i)return t.doShow=e,e?t.showOverlay():t.hideOverlay()}}(this),!0),this.scope.$watchCollection("options",function(t){return function(e,n){var o,r;if(!i.isEqual(e,n)&&(r=["tileSize","maxZoom","minZoom","name","alt"],o=i.some(r,function(t){return!n||!e||!i.isEqual(e[t],n[t])})))return t.refreshMapType()}}(this)),e.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(t){return function(e,n){if(!i.isEqual(e,n))return t.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(t){return function(){return t.hideOverlay(),t.mapType=null}}(this)))}return n(s,o),s.prototype.createMapType=function(){if(null!=this.scope.options.getTile)this.mapType=this.scope.options;else{if(null==this.scope.options.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(this.scope.options)}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),e.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},s.prototype.refreshMapType=function(){if(this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap)return this.showOverlay()},s.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},s.prototype.hideOverlay=function(){var t;
21return t=!1,this.gMap.overlayMapTypes.forEach(function(e){return function(i,n){t||i.layerId!==e.id||(t=!0,e.gMap.overlayMapTypes.removeAt(n))}}(this))},s}(o)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(o,r,s,a,l,u,p,h,c,d,g,f,m){var v,y;return y=function(t,e){return e.plurals=new s,e.scope.plurals=e.plurals,e},v=function(o){function h(e,n,o,r){this.maybeExecMappedEvent=t(this.maybeExecMappedEvent,this),this.onDestroy=t(this.onDestroy,this),this.newChildMarker=t(this.newChildMarker,this),this.pieceMeal=t(this.pieceMeal,this),this.rebuildAll=t(this.rebuildAll,this),this.createAllNew=t(this.createAllNew,this),this.bindToTypeEvents=t(this.bindToTypeEvents,this),this.createChildScopes=t(this.createChildScopes,this),this.validateScope=t(this.validateScope,this),this.onWatch=t(this.onWatch,this),h.__super__.constructor.call(this,e,n,o,r),this["interface"]=c,y(new s,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll&&this.scope.doRebuildAll,this.setIdKey(this.scope),this.scope.$watch("doRebuildAll",function(t){return function(e,i){if(e!==i)return t.doRebuildAll=e}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(t){return function(e,n){if(!i.isEqual(e,n)||!t.modelsRendered){if(0===e.length&&0===n.length)return;return t.modelsRendered=!0,t.onWatch("models",t.scope,e,n)}}}(this),!this.isTrue(o.modelsbyref)),this.watch("doCluster",this.scope),this.watch("type",this.scope),this.watch("clusterOptions",this.scope),this.watch("clusterEvents",this.scope),this.watch("typeOptions",this.scope),this.watch("typeEvents",this.scope),this.watch("fit",this.scope),this.watch("idKey",this.scope),this.gManager=void 0,this.createAllNew(this.scope)}return n(h,o),h.include(g),h.include(r),h.prototype.onWatch=function(t,e,i,n){return"idKey"===t&&i!==n&&(this.idKey=i),this.doRebuildAll||"doCluster"===t||"type"===t?this.rebuildAll(e):this.pieceMeal(e)},h.prototype.validateScope=function(t){var i;return i=e.isUndefined(t.models)||void 0===t.models,i&&this.$log.error(this.constructor.name+": no valid models attribute found"),h.__super__.validateScope.call(this,t)||i},h.prototype.createChildScopes=function(t){if(null!=this.gMap&&null!=this.scope.models)return t?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},h.prototype.bindToTypeEvents=function(t,n){var o,r;return null==n&&(n=["click","mouseout","mouseover"]),r=this,this.origTypeEvents?e.extend(t,this.origTypeEvents):(this.origTypeEvents={},i.each(n,function(e){return function(i){return e.origTypeEvents[i]=null!=t?t[i]:void 0}}(this))),o={},i.each(n,function(t){return o[t]=function(e){return r.maybeExecMappedEvent(e,t)}}),e.extend(t,o)},h.prototype.createAllNew=function(t){var e,i,n,o;if(null!=this.gManager&&(this.gManager instanceof m&&(e=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),n=t.typeEvents||t.clusterEvents,o=t.typeOptions||t.clusterOptions,t.doCluster||"cluster"===t.type?(null!=n&&this.bindToTypeEvents(n),this.gManager=new u(this.map,(void 0),o,n)):"spider"===t.type?(null!=n&&this.bindToTypeEvents(n,["spiderfy","unspiderfy"]),this.gManager=new m(this.map,(void 0),o,n,this.scope),e&&this.gManager.spiderfy()):this.gManager=new p(this.map),!this.didQueueInitPromise(this,t))return i=null,l.promiseLock(this,d.promiseTypes.create,"createAllNew",function(t){return i=t},function(e){return function(){return l.each(t.models,function(n){return e.newChildMarker(n,t),i},l.chunkSizeFrom(t.chunk)).then(function(){return e.modelsRendered=!0,t.fit&&e.gManager.fit(),e.gManager.draw(),e.scope.pluralsUpdate.updateCtr+=1},l.chunkSizeFrom(t.chunk))}}(this))},h.prototype.rebuildAll=function(t){var e;if(t.doRebuild||void 0===t.doRebuild)return(null!=(e=this.scope.plurals)?e.length:void 0)?this.onDestroy(t).then(function(e){return function(){return e.createAllNew(t)}}(this)):this.createAllNew(t)},h.prototype.pieceMeal=function(t){var e,i;if(!t.$$destroyed)return e=null,i=null,this.modelsLength()&&this.scope.plurals.length?l.promiseLock(this,d.promiseTypes.update,"pieceMeal",function(t){return e=t},function(n){return function(){return d.promise(function(){return n.figureOutState(n.idKey,t,n.scope.plurals,n.modelKeyComparison)}).then(function(o){return i=o,l.each(i.removals,function(t){if(null!=t)return null!=t.destroy&&t.destroy(),n.scope.plurals.remove(t.id),e},l.chunkSizeFrom(t.chunk))}).then(function(){return l.each(i.adds,function(i){return n.newChildMarker(i,t),e},l.chunkSizeFrom(t.chunk))}).then(function(){return l.each(i.updates,function(t){return n.updateChild(t.child,t.model),e},l.chunkSizeFrom(t.chunk))}).then(function(){return(i.adds.length>0||i.removals.length>0||i.updates.length>0)&&(t.plurals=n.scope.plurals,t.fit&&n.gManager.fit(),n.gManager.draw()),n.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(t))},h.prototype.newChildMarker=function(t,e){var i,n,o;if(!t)throw"model undefined";return null==t[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.$log.info("child",i,"markers",this.scope.markerModels),n=e.$new(!1),n.events=e.events,o={},c.scopeKeys.forEach(function(t){return o[t]=e[t]}),i=new a({scope:n,model:t,keys:o,gMap:this.map,defaults:this.DEFAULTS,doClick:this.doClick,gManager:this.gManager,doDrawSelf:!1,isScopeModel:!0}),this.scope.plurals.put(t[this.idKey],i),i)},h.prototype.onDestroy=function(t){return h.__super__.onDestroy.call(this,t),l.promiseLock(this,d.promiseTypes["delete"],void 0,void 0,function(t){return function(){return l.each(t.scope.plurals.values(),function(t){if(null!=t)return t.destroy(!1)},l.chunkSizeFrom(t.scope.cleanchunk,!1)).then(function(){return null!=t.gManager&&t.gManager.destroy(),t.plurals.removeAll(),t.plurals!==t.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),t.scope.pluralsUpdate.updateCtr+=1})}}(this))},h.prototype.maybeExecMappedEvent=function(t,e){var n,o;if(!this.scope.$$destroyed)return o=this.scope.typeEvents||this.scope.clusterEvents,i.isFunction(null!=o?o[e]:void 0)&&(n=this.mapTypeToPlurals(t),this.origTypeEvents[e])?this.origTypeEvents[e](n.group,n.mapped):void 0},h.prototype.mapTypeToPlurals=function(t){var e,n,o;return i.isArray(t)?e=t:i.isFunction(t.getMarkers)&&(e=t.getMarkers()),null==e?void f.error("Unable to map event as we cannot find the array group to map"):(n=(null!=(o=this.scope.plurals.values())?o.length:void 0)?e.map(function(t){return function(e){return t.scope.plurals.get(e.key).model}}(this)):[],{cluster:t,mapped:n,group:t})}
21,h.prototype.getItem=function(t,e,i){return"models"===e?t[e][i]:t[e].get(i)},h}(o)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(t){return e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+t+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+t+"ChildModel","uiGmapI"+t,function(e,i,n){return e(n,i,t)}])})}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(e,n,o,r){var s;return s=function(r){function s(t,n,o,r,s){var a,l,u,p,h,c,d,g,f,m,v;this.scope=t,this.attrs=o,this.gMap=r,this.DEFAULTS=s,a=void 0,p=!1,f=[],g=void 0,h=function(t){return function(){if(t.isTrue(t.attrs.fit))return t.fitMapBounds(t.gMap,a)}}(this),u=function(t){return function(){var i,n,o;return null!=t.scope.bounds&&null!=(null!=(i=t.scope.bounds)?i.sw:void 0)&&null!=(null!=(n=t.scope.bounds)?n.ne:void 0)&&t.validateBoundPoints(t.scope.bounds)?(a=t.convertBoundPoints(t.scope.bounds),e.info("new new bounds created: "+JSON.stringify(a))):null!=t.scope.bounds.getNorthEast&&null!=t.scope.bounds.getSouthWest?a=t.scope.bounds:null!=t.scope.bounds?e.error("Invalid bounds for newValue: "+JSON.stringify(null!=(o=t.scope)?o.bounds:void 0)):void 0}}(this),u(),c=new google.maps.Rectangle(this.buildOpts(a)),e.info("gObject (rectangle) created: "+c),m=!1,v=function(t){return function(){var e,i,n;
21if(e=c.getBounds(),i=e.getNorthEast(),n=e.getSouthWest(),!m)return t.scope.$evalAsync(function(t){if(null!=t.bounds&&null!=t.bounds.sw&&null!=t.bounds.ne&&(t.bounds.ne={latitude:i.lat(),longitude:i.lng()},t.bounds.sw={latitude:n.lat(),longitude:n.lng()}),null!=t.bounds.getNorthEast&&null!=t.bounds.getSouthWest)return t.bounds=e})}}(this),d=function(t){return function(){return h(),t.removeEvents(f),f.push(google.maps.event.addListener(c,"dragstart",function(){return p=!0})),f.push(google.maps.event.addListener(c,"dragend",function(){return p=!1,v()})),f.push(google.maps.event.addListener(c,"bounds_changed",function(){if(!p)return v()}))}}(this),l=function(t){return function(){return t.removeEvents(f),null!=g&&t.removeEvents(g),c.setMap(null)}}(this),null!=a&&d(),this.scope.$watch("bounds",function(t,e){var n;if(!(i.isEqual(t,e)&&null!=a||p))return m=!0,null==t?void l():(null==a?n=!0:h(),u(),c.setBounds(a),m=!1,n&&null!=a?d():void 0)},!0),this.setMyOptions=function(t){return function(e,n){if(!i.isEqual(e,n)&&null!=a&&null!=e)return c.setOptions(t.buildOpts(a))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(g=this.setEvents(c,this.scope,this.scope),this.scope.$watch("events",function(t){return function(e,n){if(!i.isEqual(e,n))return null!=g&&t.removeEvents(g),g=t.setEvents(c,t.scope,t.scope)}}(this))),this.scope.$on("$destroy",function(){return l()}),e.info(this)}return t(s,r),s.include(n),s.include(o),s}(r)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper",function(n,o,r){var s;return s=function(n){function s(i,n,r,s,a,l,u){var p;return this.scope=i,this.element=n,this.attrs=r,this.gMap=s,this.ctrlPosition=a,this.template=l,this.$log=null!=u?u:o,this.setVisibility=t(this.setVisibility,this),this.getBounds=t(this.getBounds,this),this.setBounds=t(this.setBounds,this),this.createSearchBox=t(this.createSearchBox,this),this.addToParentDiv=t(this.addToParentDiv,this),this.addAsMapControl=t(this.addAsMapControl,this),this.init=t(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):(e.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),e.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),e.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,p=e.element("<div></div>"),p.append(this.template),this.input=p.find("input")[0],void this.init())}return i(s,n),s.include(r),s.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(t){return function(i,n){if(e.isObject(i)&&(null!=i.bounds&&t.setBounds(i.bounds),null!=i.visible&&t.visible!==i.visible))return t.setVisibility(i.visible)}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.autocomplete?this.listener=google.maps.event.addListener(this.gObject,"place_changed",function(t){return function(){return t.places=t.gObject.getPlace()}}(this)):this.listener=google.maps.event.addListener(this.gObject,"places_changed",function(t){return function(){return t.places=t.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$stateChangeSuccess",function(t){return function(){if(null!=t.attrs.parentdiv)return t.addToParentDiv()}}(this)),this.scope.$on("$destroy",function(t){return function(){return t.gObject=null}}(this))},s.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},s.prototype.addToParentDiv=function(){var t;if(this.parentDiv=e.element(document.getElementById(this.scope.parentdiv)),null!=(t=this.parentDiv)?t.length:void 0)return this.parentDiv.append(this.input)},s.prototype.createSearchBox=function(){return this.autocomplete?this.gObject=ne
21w google.maps.places.Autocomplete(this.input,this.scope.options):this.gObject=new google.maps.places.SearchBox(this.input,this.scope.options)},s.prototype.setBounds=function(t){if(e.isUndefined(t.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(t.isEmpty()===!1&&null!=this.gObject)return this.gObject.setBounds(t)},s.prototype.getBounds=function(){return this.gObject.getBounds()},s.prototype.setVisibility=function(t){return null!=this.attrs.parentdiv?t===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):t===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=t},s}(n)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(o,r,s,a,l,u,p,h,c,d,g,f,m,v,y){var _;return _=function(o){function _(e,n,o,r,a,u){this.gMap=a,this.markersScope=u,this.modelKeyComparison=t(this.modelKeyComparison,this),this.interpolateContent=t(this.interpolateContent,this),this.setChildScope=t(this.setChildScope,this),this.createWindow=t(this.createWindow,this),this.setContentKeys=t(this.setContentKeys,this),this.pieceMeal=t(this.pieceMeal,this),this.createAllNew=t(this.createAllNew,this),this.watchIdKey=t(this.watchIdKey,this),this.createChildScopes=t(this.createChildScopes,this),this.watchOurScope=t(this.watchOurScope,this),this.watchDestroy=t(this.watchDestroy,this),this.onDestroy=t(this.onDestroy,this),this.rebuildAll=t(this.rebuildAll,this),this.doINeedToWipe=t(this.doINeedToWipe,this),this.watchModels=t(this.watchModels,this),this.go=t(this.go,this),_.__super__.constructor.call(this,e,n,o,r,h,c,d,g),this["interface"]=v,this.plurals=new s,i.each(v.scopeKeys,function(t){return function(e){return t[e+"Key"]=void 0}}(this)),this.linked=new l(e,n,o,r),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(e)}return n(_,o),_.include(r),_.prototype.go=function(t){return this.watchOurScope(t),this.doRebuildAll=null!=this.scope.doRebuildAll&&this.scope.doRebuildAll,t.$watch("doRebuildAll",function(t){return function(e,i){if(e!==i)return t.doRebuildAll=e}}(this)),this.createChildScopes()},_.prototype.watchModels=function(t){var e;return e=null!=this.markersScope?"pluralsUpdate":"models",t.$watch(e,function(e){return function(n,o){var r;if(!i.isEqual(n,o)||e.firstWatchModels)return e.firstWatchModels=!1,e.doRebuildAll||e.doINeedToWipe(t.models)?e.rebuildAll(t,!0,!0):(r=0===e.plurals.length,null!=e.existingPieces?i.last(e.existingPieces._content).then(function(){return e.createChildScopes(r)}):e.createChildScopes(r))}}(this),!0)},_.prototype.doINeedToWipe=function(t){var e;return e=null==t||0===t.length,this.plurals.length>0&&e}, 22_.prototype.rebuildAll=function(t,e,i){return this.onDestroy(i).then(function(t){return function(){if(e)return t.createChildScopes()}}(this))},_.prototype.onDestroy=function(t){return _.__super__.onDestroy.call(this,this.scope),u.promiseLock(this,m.promiseTypes["delete"],void 0,void 0,function(t){return function(){return u.each(t.plurals.values(),function(t){return t.destroy(!0)},u.chunkSizeFrom(t.scope.cleanchunk,!1)).then(function(){var e;return null!=(e=t.plurals)?e.removeAll():void 0})}}(this))},_.prototype.watchDestroy=function(t){return t.$on("$destroy",function(e){return function(){return e.firstWatchModels=!0,e.firstTime=!0,e.rebuildAll(t,!1,!0)}}(this))},_.prototype.watchOurScope=function(t){return i.each(v.scopeKeys,function(e){return function(i){var n;return n=i+"Key",e[n]="function"==typeof t[i]?t[i]():t[i]}}(this))},_.prototype.createChildScopes=function(t){var i,n,o;return null==t&&(t=!0),this.isIconVisibleOnClick=!0,e.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),i=e.isUndefined(this.linked.scope.models),!i||void 0!==this.markersScope&&void 0!==(null!=(n=this.markersScope)?n.plurals:void 0)&&void 0!==(null!=(o=this.markersScope)?o.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),t?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),t?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},_.prototype.watchIdKey=function(t){return this.setIdKey(t),t.$watch("idKey",function(e){return function(i,n){if(i!==n&&null==i)return e.idKey=i,e.rebuildAll(t,!0,!0)}}(this))}
22,_.prototype.createAllNew=function(t,e,i,n){var o;if(null==i&&(i="models"),null==n&&(n=!1),this.firstTime&&(this.watchModels(t),this.watchDestroy(t)),this.setContentKeys(t.models),!this.didQueueInitPromise(this,t))return o=null,u.promiseLock(this,m.promiseTypes.create,"createAllNew",function(t){return o=t},function(n){return function(){return u.each(t.models,function(r){var s,a;return s=e&&null!=(a=n.getItem(t,i,r[n.idKey]))?a.gObject:void 0,o||(!s&&n.markersScope&&p.error("Unable to get gMarker from markersScope!"),n.createWindow(r,s,n.gMap)),o},u.chunkSizeFrom(t.chunk)).then(function(){return n.firstTime=!1})}}(this))},_.prototype.pieceMeal=function(t,e,i,n){var o,r;if(null==i&&(i="models"),null==n&&(n=!0),!t.$$destroyed)return o=null,r=null,null!=t&&this.modelsLength()&&this.plurals.length?u.promiseLock(this,m.promiseTypes.update,"pieceMeal",function(t){return o=t},function(e){return function(){return m.promise(function(){return e.figureOutState(e.idKey,t,e.plurals,e.modelKeyComparison)}).then(function(i){return r=i,u.each(r.removals,function(t){if(null!=t)return e.plurals.remove(t.id),null!=t.destroy&&t.destroy(!0),o},u.chunkSizeFrom(t.chunk))}).then(function(){return u.each(r.adds,function(n){var r,s;if(r=null!=(s=e.getItem(t,i,n[e.idKey]))?s.gObject:void 0,!r)throw"Gmarker undefined";return e.createWindow(n,r,e.gMap),o})}).then(function(){return u.each(r.updates,function(t){return e.updateChild(t.child,t.model),o},u.chunkSizeFrom(t.chunk))})}}(this)):(p.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0))},_.prototype.setContentKeys=function(t){if(this.modelsLength(t))return this.contentKeys=Object.keys(t[0])},_.prototype.createWindow=function(t,e,i){var n,o,r,s,l,u;return o=this.linked.scope.$new(!1),this.setChildScope(o,t),o.$watch("model",function(t){return function(e,i){if(e!==i)return t.setChildScope(o,e)}}(this),!0),r={html:function(e){return function(){return e.interpolateContent(e.linked.element.html(),t)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,t)||{},s=this.createWindowOptions(e,o,r.html(),this.DEFAULTS),n=new a({model:t,scope:o,opts:s,isIconVisibleOnClick:this.isIconVisibleOnClick,gMap:i,markerScope:null!=(l=this.markersScope)&&null!=(u=l.plurals.get(t[this.idKey]))?u.scope:void 0,element:r,needToManualDestroy:!1,markerIsVisibleAfterWindowClose:!0,isScopeModel:!0}),null==t[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(t[this.idKey],n),n)},_.prototype.setChildScope=function(t,e){return i.each(v.scopeKeys,function(i){return function(n){var o,r;if(o=n+"Key",r="self"===i[o]?e:e[i[o]],r!==t[n])return t[n]=r}}(this)),t.model=e},_.prototype.interpolateContent=function(t,e){var i,n,o,r,s,a;if(void 0!==this.contentKeys&&0!==this.contentKeys.length){for(i=f(t),o={},a=this.contentKeys,n=0,s=a.length;n<s;n++)r=a[n],o[r]=e[r];return i(o)}},_.prototype.modelKeyComparison=function(t,e){var n,o;if(o=null!=this.scope.coords?this.scope:this.parentScope,null==o)throw"No scope or parentScope set!";return(n=y.equalCoords(this.evalModelHandle(t,o.coords),this.evalModelHandle(e,o.coords)))?n=i.every(i.without(this["interface"].scopeKeys,"coords"),function(i){return function(n){return i.evalModelHandle(t,o[n])===i.evalModelHandle(e,o[n])}}(this)):n},_}(o)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(t,e){return i.extend(t,{link:function(t,i,n,o){return o.getScope().deferred.promise.then(function(o){return new e(t,i,n,o)})}})}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(n,o,r,s,a,l){var u;return u=function(u){function p(){this.link=t(this.link,this),p.__super__.constructor.call(this)}return i(p,u),p.prototype.transclude=!0,p.prototype.link=function(t,i,u,p,h){return l.then(function(i){return function(l){var u,c,d,g;return g=h(),u=h().length>0,!u&&e.isUndefined(t.template)?void i.$log.error("mapControl: could not find a valid template property or elements for transclusion"):(c=e.isDefined(t.index&&!isNaN(parseInt(t.index)))?parseInt(t.index):void 0,d=e.isDefined(t.position)?t.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",l.ControlPosition[d]?n.mapPromise(t,p).then(function(n){var l,p,g;return l=void 0,p=e.element("<div></div>
22"),g=function(t,e,i){return i&&(e[0].index=i),t.controls[google.maps.ControlPosition[d]].push(e[0])},u?h(function(t){return p.append(t),g(n,p,c)}):o.get(t.template,{cache:r}).success(function(i){var n,o;return o=t.$new(),p.append(i),e.isDefined(t.controller)&&(n=a(t.controller,{$scope:o}),p.children().data("$ngControllerController",n)),l=s(p.children())(o)}).error(function(t){return i.$log.error("mapControl: template could not be found")}).then(function(){return g(n,l,c)})}):void i.$log.error("mapControl: invalid position property"))}}(this))},p}(n)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(t,e){return{restrict:"EMA",transclude:!0,template:'<div class="angular-google-map-dragzoom" ng-transclude style="display: none"></div>',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(e,n){return e.ctrlType="uiGmapDragZoom",i.extend(this,t.handle(e,n))}],link:function(i,n,o,r){return t.mapPromise(i,r).then(function(t){var n,o,r;return n=function(e){return t.enableKeyDragZoom(e)},o=new e(function(t,e){return e?n({key:e}):n()}),r=new e(function(t,e){if(e)return n(e)}),i.$watch("keyboardkey",o.sic("keyboardkey")),o.sic(i.keyboardkey),i.$watch("options",r.sic("options")),r.sic(i.options)})}}}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(t,e){return i.extend(t,{link:function(t,i,n,o){return o.getScope().deferred.promise.then(function(o){return new e(t,i,n,o)})}})}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(e,o,r,s,a){var l;return l=function(o){function l(){return this.link=t(this.link,this),l.__super__.constructor.apply(this,arguments)}return n(l,o),l.include(r),l.prototype.restrict="EMA",l.prototype.replace=!0,l.prototype.require="^uiGmapGoogleMap",l.prototype.scope={polygons:"=",draw:"="},l.prototype.link=function(t,n,o,r){return this.mapPromise(t,r).then(function(n){return function(n){var o,l;return t.polygons?i.isArray(t.polygons)?(o=new s(n,r.getScope()),l=void 0,t.draw=function(){return"function"==typeof l&&l(),o.engage(t.polygons).then(function(){var e;return e=!0,l=t.$watchCollection("polygons",function(t,i){var n;return e||t===i?void(e=!1):(n=a.differenceObjects(i,t),n.forEach(function(t){return t.setMap(null)}))})})}):e.error("Free Draw Polygons must be of type Array!"):e.error("No polygons to bind to!")}}(this))},l}(o)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var t;return t={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",control:"=",zIndex:"=zindex"}}}])}.call(this),function(){var t=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(e,i,n){var o;return o=function(e){function o(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"},this.$log=i}return t(o,e),o.extend(n),o.prototype.link=function(t,e,i,n){throw new Exception("Not implemented!!")},o}(e)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(e,n){var o;return o=function(e){function o(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=i.extend(this.scope||{},o.scope)}return t(o,e),o.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},o.scopeKeys=i.keys(o.scope),o.keys=o.scopeKeys,o.extend(n),o}(e)}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(e,n,o,r){var s;return s=function(n){function s(){}return t(s,n),s.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},s.scopeKeys=i.keys(s.scope),s.include(e),s.extend(r),s.prototype.restrict="EMA",s.prototype.replace=!0,s.prototype.require="^uiGmapGoogleMap",s.prototype.scope=s.scope,s.prototype.DEFAULTS={},s.prototype.$log=o,s}(n)}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(e,n,o,r){var s;return s=function(n){function s(){}return t(s,n),s.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},s.scopeKeys=i.keys(s.scope),s.include(e),s.extend(r),s.prototype.restrict="EMA",s.prototype.replace=!0,s.prototype.require="^uiGmapGoogleMap",s.prototype.scope=s.scope,s.prototype.DEFAULTS={},s.prototype.$log=o,s}(n)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var t;return t={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{boun
22ds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(e,n,o){var r;return r=function(e){function r(){this.restrict="EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=i.extend(this.scope||{},r.scope)}return t(r,e),r.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},r.scopeKeys=i.keys(r.scope),r.include(n),r.extend(o),r}(e)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},o={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","$log","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(o,r,s,a,l,u,p,h,c,d,g,f,m,v){var y,_,b;return y=void 0,b=[g,c,d],_=function(r){function l(){this.link=t(this.link,this);var e;e=function(t){var e,n;return n=void 0,t.$on("$destroy",function(){return p.decrement()}),e=u.handle(t),t.ctrlType="Map",t.deferred.promise.then(function(){return b.forEach(function(t){return t.init()})}),e.getMap=function(){return t.map},n=i.extend(this,e)},this.controller=["$scope",e]}return n(l,r),l.include(a),l.prototype.restrict="EMA",l.prototype.transclude=!0,l.prototype.replace=!1,l.prototype.template='<div class="angular-google-map"><div class="angular-google-map-container">\n</div><div ng-transclude style="display: none"></div></div>',l.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},l.prototype.link=function(t,n,r){var a;return a=[],t.$on("$destroy",function(){if(m.removeEvents(a),"true"===r.recycleMapInstance&&t.map)return v.recycleMapInstance(t.map),t.map=null}),t.idleAndZoomChanged=!1,f.then(function(l){return function(u){var c,d,g,f,_,b,w,M,k,x,C,G,D,P,L,O,S;if(y={mapTypeId:u.MapTypeId.ROADMAP},P=p.spawn(),G=function(){return P.deferred.resolve({instance:P.instance,map:c})},!e.isDefined(t.center)&&!e.isDefined(t.bounds))return void s.error("angular-google-maps: a center or bounds property is required");if(e.isDefined(t.center)||(t.center=new google.maps.LatLngBounds(l.getCoords(t.bounds.southwest),l.getCoords(t.bounds.northeast)).getCenter()),e.isDefined(t.zoom)||(t.zoom=10),_=e.element(n),_.addClass("angular-google-map"),x={options:{}},r.options&&(x.options=t.options),r.styles&&(x.styles=t.styles),r.type&&(L=r.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(L)?x.mapTypeId=google.maps.MapTypeId[r.type.toUpperCase()]:s.error("angular-google-maps: invalid map type '"+r.type+"'")),M=e.extend({},y,x,{center:l.getCoords(t.center),zoom:t.zoom,bounds:t.bounds}),c="true"===r.recycleMapInstance?v.createMapInstance(_.find("div")[1],M):new google.maps.Map(_.find("div")[1],M),c.uiGmap_id=h.generate(),f=!1,a.push(google.maps.event.addListenerOnce(c,"idle",function(){return t.deferred.resolve(c),G()})),g=r.events&&null!=(null!=(C=t.events)?C.blacklist:void 0)?t.events.blacklist:[],i.isString(g)&&(g=[g]),k=function(e,n,o){if(!i.includes(g,e))return o&&o(),a.push(google.maps.event.addListener(c,e,function(){var e;if(!(null!=(e=t.update)?e.lazy:void 0))return n()}))},i.includes(g,"all")||(k("dragstart",function(){return f=!0,t.$evalAsync(function(t){if(null!=t.dragging)return t.dragging=f})}),k("dragend",function(){return f=!1,t.$evalAsync(function(t){if(null!=t.dragging)return t.dragging=f})}),O=function(e,n){if(null==e&&(e=c.center),null==n&&(n=t),i.includes(g,"center")&&(n.center.latitude!==e.lat()&&(n.center.latitude=e.lat()),n.center.longitude!==e.lng()))return n.center.longitude=e.lng()},D=!1,k("idle",function(){var e,n,o;
22return e=c.getBounds(),n=e.getNorthEast(),o=e.getSouthWest(),D=!0,t.$evalAsync(function(e){return O(),i.isUndefined(e.bounds)||i.includes(g,"bounds")||(e.bounds.northeast={latitude:n.lat(),longitude:n.lng()},e.bounds.southwest={latitude:o.lat(),longitude:o.lng()}),i.includes(g,"zoom")||(e.zoom=c.zoom,t.idleAndZoomChanged=!t.idleAndZoomChanged),D=!1})})),e.isDefined(t.events)&&null!==t.events&&e.isObject(t.events)){w=function(e){return function(){return t.events[e].apply(t,[c,e,arguments])}},d=[];for(b in t.events)t.events.hasOwnProperty(b)&&e.isFunction(t.events[b])&&d.push(google.maps.event.addListener(c,b,w(b)));a.concat(d)}return c.getOptions=function(){return M},t.map=c,null!=r.control&&null!=t.control&&(t.control.refresh=function(t){var e,i,n;if(null!=c)return null!=("undefined"!=typeof google&&null!==google&&null!=(i=google.maps)&&null!=(n=i.event)?n.trigger:void 0)&&null!=c&&google.maps.event.trigger(c,"resize"),null!=(null!=t?t.latitude:void 0)&&null!=(null!=t?t.longitude:void 0)?(e=l.getCoords(t),l.isTrue(r.pan)?c.panTo(e):c.setCenter(e)):void 0},t.control.getGMap=function(){return c},t.control.getMapOptions=function(){return M},t.control.getCustomEventListeners=function(){return d},t.control.removeEvents=function(t){return m.removeEvents(t)}),t.$watch("center",function(e,i){var n;if(e!==i&&!D&&(n=l.getCoords(t.center),n.lat()!==c.center.lat()||n.lng()!==c.center.lng()))return f?void 0:(l.validateCoords(e)||s.error("Invalid center for newValue: "+JSON.stringify(e)),l.isTrue(r.pan)&&t.zoom===c.zoom?c.panTo(n):c.setCenter(n))},!0),S=null,t.$watch("zoom",function(e,n){var r,s;if(null!=e&&!i.isEqual(e,n)&&(null!=c?c.getZoom():void 0)!==(null!=t?t.zoom:void 0)&&!D)return null!=S&&o.cancel(S),S=o(function(){return c.setZoom(e)},(null!=(r=t.eventOpts)&&null!=(s=r.debounce)?s.zoomMs:void 0)+20,!1)}),t.$watch("bounds",function(t,e){var i,n,o,r,a,l,u;if(t!==e)return null==(null!=t&&null!=(o=t.northeast)?o.latitude:void 0)||null==(null!=t&&null!=(r=t.northeast)?r.longitude:void 0)||null==(null!=t&&null!=(a=t.southwest)?a.latitude:void 0)||null==(null!=t&&null!=(l=t.southwest)?l.longitude:void 0)?void s.error("Invalid map bounds for new value: "+JSON.stringify(t)):(n=new google.maps.LatLng(t.northeast.latitude,t.northeast.longitude),u=new google.maps.LatLng(t.southwest.latitude,t.southwest.longitude),i=new google.maps.LatLngBounds(u,n),c.fitBounds(i))}),["options","styles"].forEach(function(e){return t.$watch(e,function(t,n){if(!i.isEqual(t,n))return"options"===e?x.options=t:x.options[e]=t,null!=c?c.setOptions(x):void 0},!0)})}}(this))},l}(l)}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(e,n,o,r){var s;return s=function(s){function a(){a.__super__.constructor.call(this),this.template='<span class="angular-google-map-marker" ng-transclude></span>',r.info(this)}return t(a,s),a.prototype.controller=["$scope","$element",function(t,n){return t.ctrlType="Marker",i.extend(this,e.handle(t,n))}],a.prototype.link=function(t,r,s,a){var l;return l=e.mapPromise(t,a),l.then(function(r){var s,a,l;if(s=new o(r),a=i.object(e.keys,e.keys),l=new n({scope:t,model:t,keys:a,gMap:r,doClick:!0,gManager:s,doDrawSelf:!1,trackModel:!1}),l.deferred.promise.then(function(e){return t.deferred.resolve(e)}),null!=t.control)return t.control.getGMarkers=s.getGMarkers}),t.$on("$destroy",function(){var t;return"undefined"!=typeof t&&null!==t&&t.clear(),t=null})},a}(e)}])}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(e,n,o,r,s){var a;return a=function(r){function a(){a.__super__.constructor.call(this),this.template='<span class="angular-google-map-markers" ng-transclude></span>',n.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents"}),s.info(this)}return t(a,r),a.prototype.controller=["$scope","$element",function(t,n){return t.ctrlType="Markers",i.extend(this,e.handle(t,n))}],a.prototype.link=function(t,r,s,a){var l,u;return l=void 0,u=function(){return t.deferred.resolve()},e.mapPromise(t,a).then(function(e){var p;return p=a.getScope(),p.$watch("idleAndZoomChanged",function(){return i.defer(l.gManager.draw)}),l=new o(t,r,s,e),n.link(t,l),null!=t.control&&(t.control.getGMarkers=function(){var t;return null!=(t=l.gManager)?t.getGMarkers():void 0},t.control.getChildMarkers=function(){return l.plurals}),i.last(l.existingPieces._content).then(function(){return u()})})},a}(e)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var t;return t=function(t,e){if(null!=t.control)return t.control.updateModels=function(i){return t.models=i,e.createChildScopes(!1)},t.control.newModels=function(i){return t.models=i,e.rebuildAll(t,!0,!0)},t.control.clean=function(){return e.rebuildAll(t,!1,!0)},t.control.getPlurals=function(){return e.plurals},t.control.getManager=function(){return e.gManager},t.control.hasManager=function(){return null!=e.gManager==!0},t.control.managerDraw=function(){var e;if(t.control.hasManager())return null!=(e=t.control.getManager())?e.draw():void 0}},{extend:function(t,e){return i.extend(t.scope||{},e||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(e,i){return t(e,i)}}}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(e,n,o){var r;return r=function(n){function r(){return this.link=t(this.link,this),r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.link=function(t,i,n,r){var s,a;return s=[],a=e.mapPromise(t,r),null!=t.control&&(t.control.getInstance=this,t.control.polygons=s,t.control.promise=a),a.then(function(e){return function(i){return s.push(new o({scope:t,attrs:n,gMap:i,defaults:e.DEFAULTS}))}}(this))},r}(e)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",function(n,o,r,s){var a;return a=function(n){function o(){this.link=t(this.link,this),o.__super__.constructor.call(this),s.extend(this),this.$log.info(this)}return i(o,n),o.prototype.link=function(t,i,n,o){return o.getScope().deferred.promise.then(function(o){return function(a){return(e.isUndefined(t.path)||null===t.path)&&o.$log.warn("polygons:
22no valid path attribute found"),t.models||o.$log.warn("polygons: no models found to create from"),s.link(t,new r(t,i,n,a,o.DEFAULTS))}}(this))},o}(n)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(n,o,r){var s;return s=function(o){function s(){return this.link=t(this.link,this),s.__super__.constructor.apply(this,arguments)}return i(s,o),s.prototype.link=function(t,i,o,s){return n.mapPromise(t,s).then(function(i){return function(n){return!e.isUndefined(t.path)&&null!==t.path&&i.validatePath(t.path)||i.$log.warn("polyline: no valid path attribute found"),new r({scope:t,attrs:o,gMap:n,defaults:i.DEFAULTS})}}(this))},s}(n)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(n,o,r,s){var a;return a=function(n){function o(){this.link=t(this.link,this),o.__super__.constructor.call(this),s.extend(this),this.$log.info(this)}return i(o,n),o.prototype.link=function(t,i,n,o){return o.getScope().deferred.promise.then(function(o){return function(a){return(e.isUndefined(t.path)||null===t.path)&&o.$log.warn("polylines: no valid path attribute found"),t.models||o.$log.warn("polylines: no models found to create from"),s.link(t,new r(t,i,n,a,o.DEFAULTS))}}(this))},o}(n)}])}.call(this),function(){e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(t,e,n,o){return i.extend(n,{link:function(t,e,i,n){return n.getScope().deferred.promise.then(function(n){return new o(t,e,i,n)})}})}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(n,o,r,s,a){var l;return l=function(l){function u(){this.link=t(this.link,this),u.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='<span class="angular-google-maps-window" ng-transclude></span>',a.debug(this),this.childWindows=[]}return i(u,l),u.include(o),u.prototype.link=function(t,i,o,r){var s,a;return s=r.length>1&&null!=r[1]?r[1]:void 0,a=null!=s?s.getScope():void 0,this.mapPromise=n.mapPromise(t,r[0]),this.mapPromise.then(function(n){return function(r){var l;return l=!0,e.isDefined(o.isiconvisibleonclick)&&(l=t.isIconVisibleOnClick),s?a.deferred.promise.then(function(e){return n.init(t,i,l,r,a)}):void n.init(t,i,l,r)}}(this))},u.prototype.init=function(t,e,i,n,o){var a,l,u,p,h;if(l=null!=t.options?t.options:{},p=null!=t&&this.validateCoords(t.coords),null!=(null!=o?o.getGMarker:void 0)&&(u=o.getGMarker()),h=p?this.createWindowOptions(u,t,e.html(),l):l,null!=n&&(a=new r({scope:t,opts:h,isIconVisibleOnClick:i,gMap:n,markerScope:o,element:e}),this.childWindows.push(a),t.$on("$destroy",function(t){return function(){return t.childWindows=s.withoutObjects(t.childWindows,[a],function(t,e){return t.scope.$id===e.scope.$id}),t.childWindows.length=0}}(this))),null!=t.control&&(t.control.getGWindows=function(t){return function(){return t.childWindows.map(function(t){return t.gObject})}}(this),t.control.getChildWindows=function(t){return function(){return t.childWindows}}(this),t.control.getPlurals=t.control.getChildWindows,t.control.showWindow=function(t){return function(){return t.childWindows.map(function(t){return t.showWindow()})}}(this),t.control.hideWindow=function(t){return function(){return t.childWindows.map(function(t){return t.hideWindow()})}}(this)),null!=this.onChildCreation&&null!=a)return this.onChildCreation(a)},u}(n)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(e,n,o,r,s){var a;return a=function(e){function a(){this.link=t(this.link,this),a.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='<span class="angular-google-maps-windows" ng-transclude></span>',n.extend(this),s.debug(this)}
22return i(a,e),a.prototype.link=function(t,e,i,n){var o,s,a;return o=n[0].getScope(),s=n.length>1&&null!=n[1]?n[1]:void 0,a=null!=s?s.getScope():void 0,o.deferred.promise.then(function(o){return function(s){var l,u;return l=(null!=a&&null!=(u=a.deferred)?u.promise:void 0)||r.resolve(),l.then(function(){var r,l;return r=null!=(l=o.parentModel)?l.existingPieces:void 0,r?r.then(function(){return o.init(t,e,i,n,s,a)}):o.init(t,e,i,n,s,a)})}}(this))},a.prototype.init=function(t,e,i,r,s,a){var l;if(l=new o(t,e,i,r,s,a),n.link(t,l),null!=t.control)return t.control.getGWindows=function(){return l.plurals.map(function(t){return t.gObject})},t.control.getChildWindows=function(){return l.plurals}},a}(e)}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(t){return new t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(t,e){return new e(t)}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(t,e){return new e(t)}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(t){return new t}])}.call(this),function(){ 23e.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(t){return t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(t){return new t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(t){return new t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(t,e){return e}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(t,e,i,n,o){return new o(t,e,i,n)}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(t,e,i,n,o,r){return new r(t,e,i,n,o)}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(e,i,n){var o;return new(o=function(){function e(){this.link=t(this.link,this),this.$log=i,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="<span class='angular-google-map-layer' ng-transclude></span>",this.replace=!0,this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return e.prototype.link=function(t,e,i,o){return o.getScope().deferred.promise.then(function(o){return function(o){return null!=t.onCreated?new n(t,e,i,o,t.onCreated):new n(t,e,i,o)}}(this))},e}())}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(t){return new t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(t){return t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(t){return t}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(t){return new t}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(e,i,n){var o;return new(o=function(){function e(){this.link=t(this.link,this),this.$log=i,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='<span class="angular-google-map-layer" ng-transclude></span>',this.replace=!0,this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return e.prototype.link=function(t,e,i,o){return o.getScope().deferred.promise.then(function(o){return function(o){return new n(t,e,i,o)}}(this))},e}())}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(t){return new t}])}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(i,n,o,r,s,a){var l;
23return new(l=function(){function l(){this.link=t(this.link,this),this.$log=n,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="<span class='angular-google-map-search' ng-transclude></span>",this.replace=!0,this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return l.prototype.require="ngModel",l.prototype.link=function(t,n,l,u){return i.then(function(i){return function(p){return null==t.template&&(s.put("uigmap-searchbox-default.tpl.html",'<input type="text">'),t.template="uigmap-searchbox-default.tpl.html"),r.get(t.template,{cache:s}).success(function(r){return e.isUndefined(t.events)?void i.$log.error("searchBox: the events property is required"):u.getScope().deferred.promise.then(function(s){var u;return u=e.isDefined(t.position)?t.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",p.ControlPosition[u]?new o(t,n,l,s,u,a(r)(t)):void i.$log.error("searchBox: invalid position property")})})}}(this))},l}())}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(t,i){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(n,o){var r,s,a;return r=function(e,i){return t[e](o,"ng-hide").then(function(){return i()})},s=function(e,i){return t[e](o,"ng-hide",i)},a=function(t,n){return e.version.major>1?i.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+e.version.major+'"'):1===e.version.major&&e.version.minor<3?s(t,n):r(t,n)},n.$watch("uiGmapShow",function(t){if(t&&a("removeClass",n.uiGmapAfterShow),!t)return a("addClass",n.uiGmapAfterHide)})}}}])}.call(this),function(){e.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(t,i,n,o){var r;return r="uiGmapStreetViewPanorama",{restrict:"EMA",template:'<div class="angular-google-map-street-view-panorama"></div>',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(s,a,l){return t.then(function(t){return function(t){var l,u,p,h,c,d,g,f,m,v;return f=void 0,v=void 0,p=!1,d=void 0,g=null,m=null,l=function(){if(o.removeEvents(d),null!=f&&(f.unbind("position"),f.setVisible(!1)),null!=v)return null!=(null!=v?v.setVisible:void 0)&&v.setVisible(!1),v=void 0},c=function(t,i){var n;return n=google.maps.geometry.spherical.computeHeading(t,i),p=!0,s.radius=s.radius||50,m=e.extend({heading:n,zoom:1,pitch:0},s.povoptions||{}),g=g=e.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:t,pov:m,visible:!0},s.options||{}),p=!1},u=function(){var t;return s.focalcoord?s.radius?(l(),null==v&&(v=new google.maps.StreetViewService),s.events&&(d=o.setEvents(v,s,s)),t=n.getCoords(s.focalcoord),v.getPanoramaByLocation(t,s.radius,function(e,i){var n,o,r;if(null!=s.imagestatus&&(s.imagestatus=i),null!=(null!=(r=s.events)?r.image_status_changed:void 0)&&s.events.image_status_changed(v,"image_status_changed",s,i),"OK"===i)return o=e.location.latLng,c(o,t),n=a[0],f=new google.maps.StreetViewPanorama(n,g)})):void i.error(r+": needs a radius to set the camera view from its focal target."):void i.error(r+": focalCoord needs to be defined")},null!=s.control&&(s.control.getOptions=function(){return g},s.control.getPovOptions=function(){return m},s.control.getGObject=function(){return v},s.control.getGPano=function(){return f}),s.$watch("options",function(t,e){if(t!==e&&t!==g&&!p)return u()}),h=!0,s.$watch("focalcoord",function(t,e){if((t!==e||h)&&null!=t)return h=!1,u()}),s.$on("$destroy",function(){return l()})}}(this))}}}])}.call(this),e.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function t(){}return t.generate=function(){var e=t._gri,i=t._ha;return i(e(32),8)+"-"+i(e(16),4)+"-"+i(16384|e(12),4)+"-"+i(32768|e(14),4)+"-"+i(e(48),12)},t._gri=function(t){return 0>t?NaN:30>=t?0|Math.random()*(1<<t):53>=t?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<t-30)):NaN},t._ha=function(t,e){for(var i=t.toString(16),n=e-i.length,o="0";0<n;n>>>=1,o+=o)1&n&&(i=o+i);return i},t}),e.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:i.once(function(){+function(){function e(t,i){t.getMarkerClusterer().extend(e,google.maps.OverlayView),this.cluster_=t,this.className_=t.getMarkerClusterer().getClusterClass(),this.styles_=i,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(t.getMap())}function i(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinimumClusterSize(),this.averageCenter_=t.getAverageCenter(),this.hideLabel_=t.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new e(this,t.getStyles())}function o(t,e,i){this.extend(o,google.maps.OverlayView),e=e||[],i=i||{}
23,this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=i.gridSize||60,this.minClusterSize_=i.minimumClusterSize||2,this.maxZoom_=i.maxZoom||null,this.styles_=i.styles||[],this.title_=i.title||"",this.zoomOnClick_=!0,void 0!==i.zoomOnClick&&(this.zoomOnClick_=i.zoomOnClick),this.averageCenter_=!1,void 0!==i.averageCenter&&(this.averageCenter_=i.averageCenter),this.ignoreHidden_=!1,void 0!==i.ignoreHidden&&(this.ignoreHidden_=i.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==i.enableRetinaIcons&&(this.enableRetinaIcons_=i.enableRetinaIcons),this.hideLabel_=!1,void 0!==i.hideLabel&&(this.hideLabel_=i.hideLabel),this.imagePath_=i.imagePath||o.IMAGE_PATH,this.imageExtension_=i.imageExtension||o.IMAGE_EXTENSION,this.imageSizes_=i.imageSizes||o.IMAGE_SIZES,this.calculator_=i.calculator||o.CALCULATOR,this.batchSize_=i.batchSize||o.BATCH_SIZE,this.batchSizeIE_=i.batchSizeIE||o.BATCH_SIZE_IE,this.clusterClass_=i.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(e,!0),this.setMap(t)}function r(t){t=t||{},google.maps.OverlayView.apply(this,arguments),this.content_=t.content||"",this.disableAutoPan_=t.disableAutoPan||!1,this.maxWidth_=t.maxWidth||0,this.pixelOffset_=t.pixelOffset||new google.maps.Size(0,0),this.position_=t.position||new google.maps.LatLng(0,0),this.zIndex_=t.zIndex||null,this.boxClass_=t.boxClass||"infoBox",this.boxStyle_=t.boxStyle||{},this.closeBoxMargin_=t.closeBoxMargin||"2px",this.closeBoxURL_=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof t.visible&&("undefined"==typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden_=!t.visible,this.alignBottom_=t.alignBottom||!1,this.pane_=t.pane||"floatPane",this.enableEventPropagation_=t.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}function s(t,e){function i(){}i.prototype=e.prototype,t.superClass_=e.prototype,t.prototype=new i,t.prototype.constructor=t}function a(t,e,i){this.marker_=t,this.handCursorURL_=t.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=a.getSharedCross(e)}function l(t){t=t||{},t.labelContent=t.labelContent||"",t.labelAnchor=t.labelAnchor||new google.maps.Point(0,0),t.labelClass=t.labelClass||"markerLabels",t.labelStyle=t.labelStyle||{},t.labelInBackground=t.labelInBackground||!1,"undefined"==typeof t.labelVisible&&(t.labelVisible=!0),"undefined"==typeof t.raiseOnDrag&&(t.raiseOnDrag=!0),"undefined"==typeof t.clickable&&(t.clickable=!0),"undefined"==typeof t.draggable&&(t.draggable=!1),"undefined"==typeof t.optimized&&(t.optimized=!1),t.crossImage=t.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",t.handCursor=t.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",t.optimized=!1,this.label=new a(this,t.crossImage,t.handCursor),google.maps.Marker.apply(this,arguments)}function u(t){var e=t||{};this.ready_=!1,this.dragging_=!1,t.visible==n&&(t.visible=!0),t.shadow==n&&(t.shadow="7px -3px 5px rgba(88,88,88,0.7)"),t.anchor==n&&(t.anchor=p.BOTTOM),this.setValues(e)}e.prototype.onAdd=function(){var t,e,i=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){e=t}),google.maps.event.addDomListener(this.div_,"mousedown",function(){t=!0,e=!1}),google.maps.event.addDomListener(this.div_,"click",function(n){if(t=!1,!e){var o,r,s=i.cluster_.getMarkerClusterer();google.maps.event.trigger(s,"click",i.cluster_),google.maps.event.trigger(s,"clusterclick",i.cluster_),s.getZoomOnClick()&&(r=s.getMaxZoom(),o=i.cluster_.getBounds(),s.getMap().fitBounds(o),setTimeout(function(){s.getMap().fitBounds(o),null!==r&&s.getMap().getZoom()>
vendor: 12,239 bytes, line 23
23r&&s.getMap().setZoom(r+1)},100)),n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=i.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",i.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=i.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",i.cluster_)})},e.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},e.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},e.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},e.prototype.show=function(){if(this.div_){var t="",e=this.backgroundPosition_.split(" "),i=parseInt(e[0].trim(),10),n=parseInt(e[1].trim(),10),o=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(o),t="<img src='"+this.url_+"' style='position: absolute; top: "+n+"px; left: "+i+"px; ",t+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*n+"px, "+(-1*i+this.width_)+"px, "+(-1*n+this.height_)+"px, "+-1*i+"px);",t+="'>",this.div_.innerHTML=t+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"</div>",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},e.prototype.useStyle=function(t){this.sums_=t;var e=Math.max(0,t.index-1);e=Math.min(this.styles_.length-1,e);var i=this.styles_[e];this.url_=i.url,this.height_=i.height,this.width_=i.width,this.anchorText_=i.anchorText||[0,0],this.anchorIcon_=i.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=i.textColor||"black",this.textSize_=i.textSize||11,this.textDecoration_=i.textDecoration||"none",this.fontWeight_=i.fontWeight||"bold",this.fontStyle_=i.fontStyle||"normal",this.fontFamily_=i.fontFamily||"Arial,sans-serif",this.backgroundPosition_=i.backgroundPosition||"0 0"},e.prototype.setCenter=function(t){this.center_=t},e.prototype.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width_+"px; height: "+this.height_+"px;"),e.join("")},e.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon_[1],e.y-=this.anchorIcon_[0],e.x=parseInt(e.x,10),e.y=parseInt(e.y,10),e},i.prototype.getSize=function(){return this.markers_.length},i.prototype.getMarkers=function(){return this.markers_},i.prototype.getCenter=function(){return this.center_},i.prototype.getMap=function(){return this.map_},i.prototype.getMarkerClusterer=function(){return this.markerClusterer_},i.prototype.getBounds=function(){var t,e=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers();for(t=0;t<i.length;t++)e.extend(i[t].getPosition());return e},i.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_},i.prototype.addMarker=function(t){var e,i,n;if(this.isMarkerAlreadyAdded_(t))return!1;if(this.center_){if(this.averageCenter_){var o=this.markers_.length+1,r=(this.center_.lat()*(o-1)+t.getPosition().lat())/o,s=(this.center_.lng()*(o-1)+t.getPosition().lng())/o;this.center_=new google.maps.LatLng(r,s),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();if(t.isAdded=!0,this.markers_.push(t),i=this.markers_.length,n=this.markerClusterer_.getMaxZoom(),null!==n&&this.map_.getZoom()>n)t.getMap()!==this.map_&&t.setMap(this.map_);else if(i<this.minClusterSize_)t.getMap()!==this.map_&&t.setMap(this.map_);else if(i===this.minClusterSize_)for(e=0;i>e;e++)this.markers_[e].setMap(null);else t.setMap(null);return!0},i.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},i.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},i.prototype.updateIcon_=function(){var t=this.markers_.length,e=this.markerClusterer_.getMaxZoom();if(null!==e&&this.map_.getZoom()>e)return void this.clusterIcon_.hide();if(t<this.minClusterSize_)return void this.clusterIcon_.hide();var i=this.markerClusterer_.getStyles().length,n=this.markerClusterer_.getCalculator()(this.markers_,i);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(n),this.clusterIcon_.show()},i.prototype.isMarkerAlreadyAdded_=function(t){for(var e=0,i=this.markers_.length;i>e;e++)if(t===this.markers_[e])return!0;return!1},o.prototype.onAdd=function(){var t=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){t.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){t.redraw_()})]},o.prototype.onRemove=function(){var t;for(t=0;t<this.markers_.length;t++)this.markers_[t].getMap()!==this.activeMap_&&this.markers_[t].setMap(this.activeMap_);for(t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.listeners_.length;t++)google.maps.event.removeListener(this.listeners_[t]);this.listeners_=[],this.activeMap_=null,this.ready_=!1},o.prototype.draw=function(){},o.prototype.setupStyles_=function(){var t,e;if(!(this.styles_.length>0))for(t=0;t<this.imageSizes_.length;t++)e=this.imageSizes_[t],this.styles_.push({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:e,width:e})},o.prototype.fitMapToMarkers=function(){var t,e=this.getMarkers(),i=new google.maps.LatLngBounds;for(t=0;t<e.length;t++)i.extend(e[t].getPosition());this.getMap().fitBounds(i)},o.prototype.getGridSize=function(){return this.gridSize_},o.prototype.setGridSize=function(t){this.gridSize_=t},o.prototype.getMinimumClusterSize=function(){return this.minClusterSize_},o.prototype.setMinimumClusterSize=function(t){this.minClusterSize_=t},o.prototype.getMaxZoom=function(){return this.maxZoom_},o.prototype.setMaxZoom=function(t){this.maxZoom_=t},o.prototype.getStyles=function(){return this.styles_},o.prototype.setStyles=function(t){this.styles_=t},o.prototype.getTitle=function(){return this.title_},o.prototype.setTitle=function(t){this.title_=t},o.prototype.getZoomOnClick=function(){return this.zoomOnClick_},o.prototype.setZoomOnClick=function(t){this.zoomOnClick_=t},o.prototype.getAverageCenter=function(){return this.averageCenter_},o.prototype.setAverageCenter=function(t){this.averageCenter_=t},o.prototype.getIgnoreHidden=function(){return this.ignoreHidden_},o.prototype.setIgnoreHidden=function(t){this.ignoreHidden_=t},o.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_},o.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons_=t},o.prototype.getImageExtension=function(){return this.imageExtension_},o.prototype.setImageExtension=function(t){this.imageExtension_=t},o.prototype.getImagePath=function(){return this.imagePath_},o.prototype.setImagePath=function(t){this.imagePath_=t},o.prototype.getImageSizes=function(){return this.imageSizes_},o.prototype.setImageSizes=function(t){this.imageSizes_=t},o.prototype.getCalculator=function(){return this.calculator_},o.prototype.setCalculator=function(t){this.calculator_=t},o.prototype.setHideLabel=function(t){this.hideLabel_=t},o.prototype.getHideLabel=function(){return this.hideLabel_},o.prototype.getBatchSizeIE=function(){return this.batchSizeIE_},o.prototype.setBatchSizeIE=function(t){this.batchSizeIE_=t},o.prototype.getClusterClass=function(){return this.clusterClass_},o.prototype.setClusterClass=function(t){this.clusterClass_=t},o.prototype.getMarkers=function(){return this.markers_},o.prototype.getTotalMarkers=function(){return this.markers_.length},o.prototype.getClusters=function(){return this.clusters_},o.prototype.getTotalClusters=function(){return this.clusters_.length},o.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw_()},o.prototype.addMarkers=function(t,e){var i;for(i in t)t.hasOwnProperty(i)&&this.pushMarkerTo_(t[i]);e||this.redraw_()},o.prototype.pushMarkerTo_=function(t){if(t.getDraggable()){var e=this;google.maps.event.addListener(t,"dragend",function(){e.ready_&&(this.isAdded=!1,e.repaint())})}t.isAdded=!1,this.markers_.push(t)},o.prototype.removeMarker=function(t,e,i){var n=!i,o=this.removeMarker_(t,n);return!e&&o&&this.repaint(),o},o.prototype.removeMarkers=function(t,e,i){var n,o,r=!1,s=!i;for(n=0;n<t.length;n++)o=this.removeMarker_(t[n],s),r=r||o;return!e&&r&&this.repaint(),r},o.prototype.removeMarker_=function(t,e){var i,n=-1;if(this.markers_.indexOf)n=this.markers_.indexOf(t);else for(i=0;i<this.markers_.length;i++)if(t===this.markers_[i]){n=i;break}return-1!==n&&(e&&t.setMap(null),this.markers_.splice(n,1),!0)},o.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=[]},o.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){var e;for(e=0;e<t.length;e++)t[e].remove()},0)},o.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),n=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),o=e.fromLatLngToDivPixel(i);o.x+=this.gridSize_,o.y-=this.gridSize_;var r=e.fromLatLngToDivPixel(n);r.x-=this.gridSize_,r.y+=this.gridSize_;var s=e.fromDivPixelToLatLng(o),a=e.fromDivPixelToLatLng(r);return t.extend(s),t.extend(a),t},o.prototype.redraw_=function(){this.createClusters_(0)},o.prototype.resetViewport_=function(t){var e,i;for(e=0;e<this.clusters_.length;e++)this.clusters_[e].remove();for(this.clusters_=[],e=0;e<this.markers_.length;e++)i=this.markers_[e],i.isAdded=!1,t&&i.setMap(null)},o.prototype.distanceBetweenPoints_=function(t,e){var i=6371,n=(e.lat()-t.lat())*Math.PI/180,o=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(n/2)*Math.sin(n/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2),s=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r)),a=i*s;return a},o.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},o.prototype.addToClosestCluster_=function(t){var e,n,o,r,s=4e4,a=null;for(e=0;e<this.clusters_.length;e++)o=this.clusters_[e],r=o.getCenter(),r&&(n=this.distanceBetweenPoints_(r,t.getPosition()),s>n&&(s=n,a=o));a&&a.isMarkerInClusterBounds(t)?a.addMarker(t):(o=new i(this),o.addMarker(t),this.clusters_.push(o))},o.prototype.createClusters_=function(t){var e,i,n,o=this;if(this.ready_){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),n=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,(-178.48388434375)),new google.maps.LatLng((-85.08136444384544),178.00048865625));var r=this.getExtendedBounds(n),s=Math.min(t+this.batchSize_,this.markers_.length);for(e=t;s>e;e++)i=this.markers_[e],!i.isAdded&&this.isMarkerInBounds_(i,r)&&(!this.ignoreHidden_||this.ignoreHidden_&&i.getVisible())&&this.addToClosestCluster_(i);if(s<this.markers_.length)this.timerRefStatic=setTimeout(function(){o.createClusters_(s)},0);else for(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this),e=0;
vendor: 4,062 bytes, line 23
23e<this.clusters_.length;e++)this.clusters_[e].updateIcon_()}},o.prototype.extend=function(t,e){return function(t){var e;for(e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},o.CALCULATOR=function(t,e){for(var i=0,n="",o=t.length.toString(),r=o;0!==r;)r=parseInt(r/10,10),i++;return i=Math.min(i,e),{text:o,index:i,title:n}},o.BATCH_SIZE=2e3,o.BATCH_SIZE_IE=500,o.IMAGE_PATH="//cdn.rawgit.com/mahnunchik/markerclustererplus/master/images/m",o.IMAGE_EXTENSION="png",o.IMAGE_SIZES=[53,56,66,78,90],"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),r.prototype=new google.maps.OverlayView,r.prototype.createInfoBoxDiv_=function(){var t,e,i,n=this,o=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()},r=function(t){t.returnValue=!1,t.preventDefault&&t.preventDefault(),n.enableEventPropagation_||o(t)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),"undefined"==typeof this.content_.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:0!==this.maxWidth_&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(i=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-i.left-i.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],e=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],t=0;t<e.length;t++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,e[t],o));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,"mouseover",function(t){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",r),google.maps.event.trigger(this,"domready")}},r.prototype.getCloseBoxImg_=function(){var t="";return""!==this.closeBoxURL_&&(t="<img",t+=" src='"+this.closeBoxURL_+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin_+";",t+="'>"),t},r.prototype.addClickHandler_=function(){var t;""!==this.closeBoxURL_?(t=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(t,"click",this.getCloseClickHandler_())):this.closeListener_=null},r.prototype.getCloseClickHandler_=function(){var t=this;return function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(t,"closeclick"),t.close()}},r.prototype.panBox_=function(t){var e,i,n=0,o=0;if(!t&&(e=this.getMap(),e instanceof google.maps.Map)){e.getBounds().contains(this.position_)||e.setCenter(this.position_),i=e.getBounds();var r=e.getDiv(),s=r.offsetWidth,a=r.offsetHeight,l=this.pixelOffset_.width,u=this.pixelOffset_.height,p=this.div_.offsetWidth,h=this.div_.offsetHeight,c=this.infoBoxClearance_.width,d=this.infoBoxClearance_.height,g=this.getProjection().fromLatLngToContainerPixel(this.position_);if(g.x<-l+c?n=g.x+l-c:g.x+p+l+c>s&&(n=g.x+p+l+c-s),this.alignBottom_?g.y<-u+d+h?o=g.y+u-d-h:g.y+u+d>a&&(o=g.y+u+d-a):g.y<-u+d?o=g.y+u-d:g.y+h+u+d>a&&(o=g.y+h+u+d-a),0!==n||0!==o){e.getCenter();e.panBy(n,o)}}},r.prototype.setBoxStyle_=function(){var t,e;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",e=this.boxStyle_;for(t in e)e.hasOwnProperty(t)&&(this.div_.style[t]=e[t]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}}
23,r.prototype.getBoxWidths_=function(){var t,e={top:0,bottom:0,left:0,right:0},i=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(t=i.ownerDocument.defaultView.getComputedStyle(i,""),t&&(e.top=parseInt(t.borderTopWidth,10)||0,e.bottom=parseInt(t.borderBottomWidth,10)||0,e.left=parseInt(t.borderLeftWidth,10)||0,e.right=parseInt(t.borderRightWidth,10)||0)):document.documentElement.currentStyle&&i.currentStyle&&(e.top=parseInt(i.currentStyle.borderTopWidth,10)||0,e.bottom=parseInt(i.currentStyle.borderBottomWidth,10)||0,e.left=parseInt(i.currentStyle.borderLeftWidth,10)||0,e.right=parseInt(i.currentStyle.borderRightWidth,10)||0),e},r.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},r.prototype.draw=function(){this.createInfoBoxDiv_();var t=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=t.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(t.y+this.pixelOffset_.height)+"px":this.div_.style.top=t.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},r.prototype.setOptions=function(t){"undefined"!=typeof t.boxClass&&(this.boxClass_=t.boxClass,this.setBoxStyle_()),"undefined"!=typeof t.boxStyle&&(this.boxStyle_=t.boxStyle,this.setBoxStyle_()),"undefined"!=typeof t.content&&this.setContent(t.content),"undefined"!=typeof t.disableAutoPan&&(this.disableAutoPan_=t.disableAutoPan),"undefined"!=typeof t.maxWidth&&(this.maxWidth_=t.maxWidth),"undefined"!=typeof t.pixelOffset&&(this.pixelOffset_=t.pixelOffset),"undefined"!=typeof t.alignBottom&&(this.alignBottom_=t.alignBottom),"undefined"!=typeof t.position&&this.setPosition(t.position),"undefined"!=typeof t.zIndex&&this.setZIndex(t.zIndex),"undefined"!=typeof t.closeBoxMargin&&(this.closeBoxMargin_=t.closeBoxMargin),"undefined"!=typeof t.closeBoxURL&&(this.closeBoxURL_=t.closeBoxURL),"undefined"!=typeof t.infoBoxClearance&&(this.infoBoxClearance_=t.infoBoxClearance),"undefined"!=typeof t.isHidden&&(this.isHidden_=t.isHidden),"undefined"!=typeof t.visible&&(this.isHidden_=!t.visible),"undefined"!=typeof t.enableEventPropagation&&(this.enableEventPropagation_=t.enableEventPropagation),this.div_&&this.draw()},r.prototype.setContent=function(t){this.content_=t,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t))), 24this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},r.prototype.setPosition=function(t){this.position_=t,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},r.prototype.setZIndex=function(t){this.zIndex_=t,this.div_&&(this.div_.style.zIndex=t),google.maps.event.trigger(this,"zindex_changed")},r.prototype.setVisible=function(t){this.isHidden_=!t,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},r.prototype.getContent=function(){return this.content_},r.prototype.getPosition=function(){return this.position_},r.prototype.getZIndex=function(){return this.zIndex_},r.prototype.getVisible=function(){var t;return t="undefined"!=typeof this.getMap()&&null!==this.getMap()&&!this.isHidden_},r.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},r.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},r.prototype.open=function(t,e){var i=this;e&&(this.position_=e.getPosition(),this.moveListener_=google.maps.event.addListener(e,"position_changed",function(){i.setPosition(this.getPosition())})),this.setMap(t),this.div_&&this.panBox_()},r.prototype.close=function(){var t;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(t=0;t<this.eventListeners_.length;t++)google.maps.event.removeListener(this.eventListeners_[t]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null),this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),this.contextListener_=null),this.setMap(null)},function(){function e(t,e){var i=this,n=new google.maps.OverlayView;n.onAdd=function(){i.init_(t,e)},n.draw=function(){},n.onRemove=function(){},n.setMap(t),this.prjov_=n}var i=function(t){var e;switch(t){case"thin":e="2px";break;case"medium":e="4px";break;case"thick":e="6px";break;default:e=t}return e},n=function(t){var e,n={};if(document.defaultView&&document.defaultView.getComputedStyle){if(e=t.ownerDocument.defaultView.getComputedStyle(t,""))return n.top=parseInt(e.borderTopWidth,10)||0,n.bottom=parseInt(e.borderBottomWidth,10)||0,n.left=parseInt(e.borderLeftWidth,10)||0,n.right=parseInt(e.borderRightWidth,10)||0,n}else if(document.documentElement.currentStyle&&t.currentStyle)return n.top=parseInt(i(t.currentStyle.borderTopWidth),10)||0,n.bottom=parseInt(i(t.currentStyle.borderBottomWidth),10)||0,n.left=parseInt(i(t.currentStyle.borderLeftWidth),10)||0,n.right=parseInt(i(t.currentStyle.borderRightWidth),10)||0,n;return n.top=parseInt(t.style["border-top-width"],10)||0,n.bottom=parseInt(t.style["border-bottom-width"],10)||0,n.left=parseInt(t.style["border-left-width"],10)||0,n.right=parseInt(t.style["border-right-width"],10)||0,n},o={x:0,y:0},r=function(t){o.x="undefined"!=typeof document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,o.y="undefined"!=typeof document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop};r();var s=function(e){var i=0,n=0;return e=e||t.event,"undefined"!=typeof e.pageX?(i=e.pageX,n=e.pageY):"undefined"!=typeof e.clientX&&(i=e.clientX+o.x,n=e.clientY+o.y),{left:i,top:n}},a=function(e){for(var i=e.offsetLeft,n=e.offsetTop,o=e.offsetParent;null!==o;){o!==document.body&&o!==document.documentElement&&(i-=o.scrollLeft,n-=o.scrollTop);var r=o,s=r.offsetLeft,a=r.offsetTop;if(!s&&!a&&t.getComputedStyle){var l=document.defaultView.getComputedStyle(r,null).MozTransform||document.defaultView.getComputedStyle(r,null).WebkitTransform;if(l&&"string"==typeof l){var u=l.split(",");s+=parseInt(u[4],10)||0,a+=parseInt(u[5],10)||0}}i+=s,n+=a,o=o.offsetParent}return{left:i,top:n}},l=function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},u=function(t,e){"undefined"!=typeof e&&(t.style.opacity=e),"undefined"!=typeof t.style.opacity&&""!==t.style.opacity&&(t.style.filter="alpha(opacity="+100*t.style.opacity+")")};e.prototype.init_=function(e,i){var o,s=this;for(this.map_=e,i=i||{},this.key_=i.key||"shift",this.key_=this.key_.toLowerCase(),this.borderWidths_=n(this.map_.getDiv()),this.veilDiv_=[],o=0;o<4;o++)this.veilDiv_[o]=document.createElement("div"),this.veilDiv_[o].onselectstart=function(){return!1},l(this.veilDiv_[o].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),l(this.veilDiv_[o].style,i.paneStyle),l(this.veilDiv_[o].style,i.veilStyle),l(this.veilDiv_[o].style,{position:"absolute",overflow:"hidden",display:"none"}),"shift"===this.key_&&(this.veilDiv_[o].style.MozUserSelect="none"),u(this.veilDiv_[o]),"transparent"===this.veilDiv_[o].style.backgroundColor&&(this.veilDiv_[o].style.backgroundColor="white",u(this.veilDiv_[o],0)),this.map_.getDiv().appendChild(this.veilDiv_[o]);this.noZoom_=i.noZoom||!1,this.visualEnabled_=i.visualEnabled||!1,this.visualClass_
24=i.visualClass||"",this.visualPosition_=i.visualPosition||google.maps.ControlPosition.LEFT_TOP,this.visualPositionOffset_=i.visualPositionOffset||new google.maps.Size(35,0),this.visualPositionIndex_=i.visualPositionIndex||null,this.visualSprite_=i.visualSprite||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png",this.visualSize_=i.visualSize||new google.maps.Size(20,20),this.visualTips_=i.visualTips||{},this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode",this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode",this.boxDiv_=document.createElement("div"),l(this.boxDiv_.style,{border:"4px solid #736AFF"}),l(this.boxDiv_.style,i.boxStyle),l(this.boxDiv_.style,{position:"absolute",display:"none"}),u(this.boxDiv_),this.map_.getDiv().appendChild(this.boxDiv_),this.boxBorderWidths_=n(this.boxDiv_),this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(t){s.onKeyDown_(t)}),google.maps.event.addDomListener(document,"keyup",function(t){s.onKeyUp_(t)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(t){s.onMouseDown_(t)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(t){s.onMouseDown_(t)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(t){s.onMouseDown_(t)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(t){s.onMouseDown_(t)}),google.maps.event.addDomListener(document,"mousedown",function(t){s.onMouseDownDocument_(t)}),google.maps.event.addDomListener(document,"mousemove",function(t){s.onMouseMove_(t)}),google.maps.event.addDomListener(document,"mouseup",function(t){s.onMouseUp_(t)}),google.maps.event.addDomListener(t,"scroll",r)],this.hotKeyDown_=!1,this.mouseDown_=!1,this.dragging_=!1,this.startPt_=null,this.endPt_=null,this.mapWidth_=null,this.mapHeight_=null,this.mousePosn_=null,this.mapPosn_=null,this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),null!==this.visualPositionIndex_&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)},e.prototype.initControl_=function(t){var e,i,n=this;return e=document.createElement("div"),e.className=this.visualClass_,e.style.position="relative",e.style.overflow="hidden",e.style.height=this.visualSize_.height+"px",e.style.width=this.visualSize_.width+"px",e.title=this.visualTips_.off,i=document.createElement("img"),i.src=this.visualSprite_,i.style.position="absolute",i.style.left=-(2*this.visualSize_.width)+"px",i.style.top="0px",e.appendChild(i),e.onclick=function(t){n.hotKeyDown_=!n.hotKeyDown_,n.hotKeyDown_?(n.buttonDiv_.firstChild.style.left=-(0*n.visualSize_.width)+"px",n.buttonDiv_.title=n.visualTips_.on,n.activatedByControl_=!0,google.maps.event.trigger(n,"activate")):(n.buttonDiv_.firstChild.style.left=-(2*n.visualSize_.width)+"px",n.buttonDiv_.title=n.visualTips_.off,google.maps.event.trigger(n,"deactivate")),n.onMouseMove_(t)},e.onmouseover=function(){n.buttonDiv_.firstChild.style.left=-(1*n.visualSize_.width)+"px"},e.onmouseout=function(){n.hotKeyDown_?(n.buttonDiv_.firstChild.style.left=-(0*n.visualSize_.width)+"px",n.buttonDiv_.title=n.visualTips_.on):(n.buttonDiv_.firstChild.style.left=-(2*n.visualSize_.width)+"px",n.buttonDiv_.title=n.visualTips_.off)},e.ondragstart=function(){return!1},l(e.style,{cursor:"pointer",marginTop:t.height+"px",marginLeft:t.width+"px"}),e},e.prototype.isHotKeyDown_=function(e){var i;if(e=e||t.event,i=e.shiftKey&&"shift"===this.key_||e.altKey&&"alt"===this.key_||e.ctrlKey&&"ctrl"===this.key_,!i)switch(e.keyCode){case 16:"shift"===this.key_&&(i=!0);break;case 17:"ctrl"===this.key_&&(i=!0);break;case 18:"alt"===this.key_&&(i=!0)}return i},e.prototype.isMouseOnMap_=function(){var t=this.mousePosn_;if(t){var e=this.mapPosn_,i=this.map_.getDiv();return t.left>e.left&&t.left<e.left+i.offsetWidth&&t.top>e.top&&t.top<e.top+i.offsetHeight}return!1},e.prototype.setVeilVisibility_=function(){var t;if(this.map_&&this.hotKeyDown_&&this.isMouseOnMap_()){var e=this.map_.getDiv();if(this.mapWidth_=e.offsetWidth-(this.borderWidths_.left+this.borderWidths_.right),this.mapHeight_=e.offsetHeight-(this.borderWidths_.top+this.borderWidths_.bottom),this.activatedByControl_){var i=parseInt(this.buttonDiv_.style.left,10)+this.visualPositionOffset_.width,n=parseInt(this.buttonDiv_.style.top,10)+this.visualPositionOffset_.height,o=this.visualSize_.width,r=this.visualSize_.height;for(this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=i+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=i+o+"px",this.veilDiv_[1].style.width=this.mapWidth_-(i+o)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=i+"px",this.veilDiv_[2].style.width=o+"px",this.veilDiv_[2].style.height=n+"px",this.veilDiv_[3].style.top=n+r+"px",this.veilDiv_[3].style.left=i+"px",this.veilDiv_[3].style.width=o+"px",this.veilDiv_[3].style.height=this.mapHeight_-(n+r)+"px",t=0;t<this.veilDiv_.length;t++)this.veilDiv_[t].style.display="block"}else{for(this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.width=this.mapWidth_+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",t=1;t<this.veilDiv_.length;t++)this.veilDiv_[t].style.width="0px",this.veilDiv_[t].style.height="0px";for(t=0;t<this.veilDiv_.length;t++)this.veilDiv_[t].style.display="block"}}else for(t=0;t<this.veilDiv_.length;t++)this.veilDiv_[t].style.display="none"},e.prototype.onKeyDown_=function(t){this.map_&&!this.hotKeyDown_&&this.isHotKeyDown_(t)&&(this.mapPosn_=a(this.map_.getDiv()),this.hotKeyDown_=!0,this.activatedByControl_=!1,this.setVeilVisibility_(),google.maps.event.trigger(this,"activate"))},e.prototype.getMousePoint_=function(t){var e=s(t),i=new google.maps.Point;return i.x=e.left-this.mapPosn_.left-this.borderWidths_.left,i.y=e.top-this.mapPosn_.top-this.borderWidths_.top,i.x=Math.min(i.x,this.mapWidth_),i.y=Math.min(i.y,this.mapHeight_),i.x=Math.max(i.x,0),i.y=Math.max(i.y,0),i},e.prototype.onMouseDown_=function(t){if(this.map_&&this.hotKeyDown_){this.mapPosn_=a(this.map_.getDiv()),this.dragging_=!0,this.startPt_=this.endPt_=this.getMousePoint_(t),this.boxDiv_.style.width=this.boxDiv_.style.height="0px";var e=this.prjov_.getProjection(),i=e.fromContainerPixelToLatLng(this.startPt_);google.maps.event.trigger(this,"dragstart",i)}},e.prototype.onMouseDownDocument_=function(t){this.mouseDown_=!0},e.prototype.onMouseMove_=function(t){if(this.mousePosn_=s(t),this.dragging_){this.endPt_=this.getMousePoint_(t);var e=Math.min(this.startPt_.x,this.endPt_.x),i=Math.min(this.startPt_.y,this.endPt_.y),n=Math.abs(this.startPt_.x-this.endPt_.x),o=Math.abs(this.startPt_.y-this.endPt_.y),r=Math.max(0,n-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)),l=Math.max(0,o-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom));this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=e+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=e+n+"px",this.veilDiv_[1].style.width=this.mapWidth_-(e+n)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=e+"px",this.veilDiv_[2].style.width=n+"px",this.veilDiv_[2].style.height=i+"px",this.veilDiv_[3].style.top=i+o+"px",this.veilDiv_[3].style.left=e+"px",this.veilDiv_[3].style.width=n+"px",this.veilDiv_[3].style.height=this.mapHeight_-(i+o)+"px",this.boxDiv_.style.top=i+"px",this.boxDiv_.style.left=e+"px",this.boxDiv_.style.width=r+"px",this.boxDiv_.style.height=l+"px",this.boxDiv_.style.display="block",google.maps.event.trigger(this,"drag",new google.maps.Point(e,i+o),new google.maps.Point(e+n,i),this.prjov_.getProjection())}else this.mouseDown_||(this.mapPosn_=a(this.map_.getDiv()),this.setVeilVisibility_())},e.prototype.onMouseUp_=function(t){var e,i=this;if(this.mouseDown_=!1,this.dragging_){if(this.getMousePoint_(t).x===this.startPt_.x&&this.getMousePoint_(t).y===this.startPt_.y)return void this.onKeyUp_(t);var n=Math.min(this.startPt_.x,this.endPt_.x),o=Math.min(this.startPt_.y,this.endPt_.y),r=Math.abs(this.startPt_.x-this.endPt_.x),s=Math.abs(this.startPt_.y-this.endPt_.y),a=!0;a&&(n+=this.borderWidths_.left,o+=this.borderWidths_.top);var l=this.prjov_.getProjection(),u=l.fromContainerPixelToLatLng(new google.maps.Point(n,o+s)),p=l.fromContainerPixelToLatLng(new google.maps.Point(n+r,o)),h=new google.maps.LatLngBounds(u,p);if(this.noZoom_)this.boxDiv_.style.display="none";else{e=this.map_.getZoom(),this.map_.fitBounds(h),this.map_.getZoom()<e&&this.map_.setZoom(e);var c=l.fromLatLngToContainerPixel(u),d=l.fromLatLngToContainerPixel(p);a&&(c.x-=this.borderWidths_.left,c.y-=this.borderWidths_.top,d.x-=this.borderWidths_.left,d.y-=this.borderWidths_.top),this.boxDiv_.style.left=c.x+"px",this.boxDiv_.style.top=d.y+"px",this.boxDiv_.style.width=Math.abs(d.x-c.x)-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)+"px",this.boxDiv_.style.height=Math.abs(d.y-c.y)-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom)+"px",setTimeout(function(){i.boxDiv_.style.display="none"},1e3)}this.dragging_=!1,this.onMouseMove_(t),google.maps.event.trigger(this,"dragend",h),this.isHotKeyDown_(t)||this.onKeyUp_(t)}},e.prototype.onKeyUp_=function(t){var e,i,n,o,r,s,a,l,u=null;if(this.map_&&this.hotKeyDown_){for(this.hotKeyDown_=!1,this.dragging_&&(this.boxDiv_.style.display="none",this.dragging_=!1,i=Math.min(this.startPt_.x,this.endPt_.x),n=Math.min(this.startPt_.y,this.endPt_.y),o=Math.abs(this.startPt_.x-this.endPt_.x),r=Math.abs(this.startPt_.y-this.endPt_.y),s=this.prjov_.getProjection(),a=s.fromContainerPixelToLatLng(new google.maps.Point(i,n+r)),l=s.fromContainerPixelToLatLng(new google.maps.Point(i+o,n)),u=new google.maps.LatLngBounds(a,l)),e=0;e<this.veilDiv_.length;e++)this.veilDiv_[e].style.display="none";this.visualEnabled_&&(this.buttonDiv_.firstChild.style.left=-(2*this.visualSize_.width)+"px",this.buttonDiv_.title=this.visualTips_.off,this.buttonDiv_.style.display=""),google.maps.event.trigger(this,"deactivate",u)}},google.maps.Map.prototype.enableKeyDragZoom=function(t){this.dragZoom_=new e(this,t)},google.maps.Map.prototype.disableKeyDragZoom=function(){var t,e=this.dragZoom_;if(e){for(t=0;t<e.listeners_.length;++t)google.maps.event.removeListener(e.listeners_[t]);for(this.getDiv().removeChild(e.boxDiv_),t=0;t<e.veilDiv_.length;t++)this.getDiv().removeChild(e.veilDiv_[t]);e.visualEnabled_&&this.controls[e.visualPosition_].removeAt(e.controlIndex_),e.prjov_.setMap(null),this.dragZoom_=null}},google.maps.Map.prototype.keyDragZoomEnabled=function(){return null!==this.dragZoom_},google.maps.Map.prototype.getDragZoomObject=function(){return this.dragZoom_}}(),s(a,google.maps.OverlayView),a.getSharedCross=function(t){var e;return"undefined"==typeof a.getSharedCross.crossDiv&&(e=document.createElement("img"),e.style.cssText="position: absolute; z-index: 1000002; display: none;",e.style.marginLeft="-8px",e.style.marginTop="-9px",e.src=t,a.get
vendor: 4,122 bytes, line 24
24SharedCross.crossDiv=e),a.getSharedCross.crossDiv},a.prototype.onAdd=function(){var t,e,i,n,o,r,s,l=this,u=!1,p=!1,h=20,c="url("+this.handCursorURL_+")",d=function(t){t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()},g=function(){l.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_),"undefined"==typeof a.getSharedCross.processed&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),a.getSharedCross.processed=!0),this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(t){(l.marker_.getDraggable()||l.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(l.marker_,"mouseover",t))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(t){!l.marker_.getDraggable()&&!l.marker_.getClickable()||p||(this.style.cursor=l.marker_.getCursor(),google.maps.event.trigger(l.marker_,"mouseout",t))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(t){p=!1,l.marker_.getDraggable()&&(u=!0,this.style.cursor=c),(l.marker_.getDraggable()||l.marker_.getClickable())&&(google.maps.event.trigger(l.marker_,"mousedown",t),d(t))}),google.maps.event.addDomListener(document,"mouseup",function(e){var i;if(u&&(u=!1,l.eventDiv_.style.cursor="pointer",google.maps.event.trigger(l.marker_,"mouseup",e)),p){if(o){i=l.getProjection().fromLatLngToDivPixel(l.marker_.getPosition()),i.y+=h,l.marker_.setPosition(l.getProjection().fromDivPixelToLatLng(i));try{l.marker_.setAnimation(google.maps.Animation.BOUNCE),setTimeout(g,1406)}catch(r){}}l.crossDiv_.style.display="none",l.marker_.setZIndex(t),n=!0,p=!1,e.latLng=l.marker_.getPosition(),google.maps.event.trigger(l.marker_,"dragend",e)}}),google.maps.event.addListener(l.marker_.getMap(),"mousemove",function(n){var a;u&&(p?(n.latLng=new google.maps.LatLng(n.latLng.lat()-e,n.latLng.lng()-i),a=l.getProjection().fromLatLngToDivPixel(n.latLng),o&&(l.crossDiv_.style.left=a.x+"px",l.crossDiv_.style.top=a.y+"px",l.crossDiv_.style.display="",a.y-=h),l.marker_.setPosition(l.getProjection().fromDivPixelToLatLng(a)),o&&(l.eventDiv_.style.top=a.y+h+"px"),google.maps.event.trigger(l.marker_,"drag",n)):(e=n.latLng.lat()-l.marker_.getPosition().lat(),i=n.latLng.lng()-l.marker_.getPosition().lng(),t=l.marker_.getZIndex(),r=l.marker_.getPosition(),s=l.marker_.getMap().getCenter(),o=l.marker_.get("raiseOnDrag"),p=!0,l.marker_.setZIndex(1e6),n.latLng=l.marker_.getPosition(),google.maps.event.trigger(l.marker_,"dragstart",n)))}),google.maps.event.addDomListener(document,"keydown",function(t){p&&27===t.keyCode&&(o=!1,l.marker_.setPosition(r),l.marker_.getMap().setCenter(s),google.maps.event.trigger(document,"mouseup",t))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(t){(l.marker_.getDraggable()||l.marker_.getClickable())&&(n?n=!1:(google.maps.event.trigger(l.marker_,"click",t),d(t)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(t){(l.marker_.getDraggable()||l.marker_.getClickable())&&(google.maps.event.trigger(l.marker_,"dblclick",t),d(t))}),google.maps.event.addListener(this.marker_,"dragstart",function(t){p||(o=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(t){p||o&&(l.setPosition(h),l.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(t){p||o&&l.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){l.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){l.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){l.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){l.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){l.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){l.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){l.
24setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){l.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){l.setStyles()})]},a.prototype.onRemove=function(){var t;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),t=0;t<this.listeners_.length;t++)google.maps.event.removeListener(this.listeners_[t])},a.prototype.draw=function(){this.setContent(),this.setTitle(),this.setStyles()},a.prototype.setContent=function(){var t=this.marker_.get("labelContent");"undefined"==typeof t.nodeType?(this.labelDiv_.innerHTML=t,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(t),t=t.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(t))},a.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""},a.prototype.setStyles=function(){var t,e;this.labelDiv_.className=this.marker_.get("labelClass"),this.eventDiv_.className=this.labelDiv_.className,this.labelDiv_.style.cssText="",this.eventDiv_.style.cssText="",e=this.marker_.get("labelStyle");for(t in e)e.hasOwnProperty(t)&&(this.labelDiv_.style[t]=e[t],this.eventDiv_.style[t]=e[t]);this.setMandatoryStyles()},a.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute",this.labelDiv_.style.overflow="hidden","undefined"!=typeof this.labelDiv_.style.opacity&&""!==this.labelDiv_.style.opacity&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity='+100*this.labelDiv_.style.opacity+')"',this.labelDiv_.style.filter="alpha(opacity="+100*this.labelDiv_.style.opacity+")"),this.eventDiv_.style.position=this.labelDiv_.style.position,this.eventDiv_.style.overflow=this.labelDiv_.style.overflow,this.eventDiv_.style.opacity=.01,this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity=1)"',this.eventDiv_.style.filter="alpha(opacity=1)",this.setAnchor(),this.setPosition(),this.setVisible()},a.prototype.setAnchor=function(){var t=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-t.x+"px",this.labelDiv_.style.marginTop=-t.y+"px",this.eventDiv_.style.marginLeft=-t.x+"px",this.eventDiv_.style.marginTop=-t.y+"px"},a.prototype.setPosition=function(t){var e=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());"undefined"==typeof t&&(t=0),this.labelDiv_.style.left=Math.round(e.x)+"px",this.labelDiv_.style.top=Math.round(e.y-t)+"px",this.eventDiv_.style.left=this.labelDiv_.style.left,this.eventDiv_.style.top=this.labelDiv_.style.top,this.setZIndex()},a.prototype.setZIndex=function(){var t=this.marker_.get("labelInBackground")?-1:1;"undefined"==typeof this.marker_.getZIndex()?(this.labelDiv_.style.zIndex=parseInt(this.labelDiv_.style.top,10)+t,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+t,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)},a.prototype.setVisible=function(){this.marker_.get("labelVisible")?this.labelDiv_.style.display=this.marker_.getVisible()?"block":"none":this.labelDiv_.style.display="none",this.eventDiv_.style.display=this.labelDiv_.style.display},s(l,google.maps.Marker),l.prototype.setMap=function(t){google.maps.Marker.prototype.setMap.apply(this,arguments),this.label.setMap(t)},u.prototype=new google.maps.OverlayView,t.RichMarker=u,u.prototype.getVisible=function(){return this.get("visible")},u.prototype.getVisible=u.prototype.getVisible,u.prototype.setVisible=function(t){this.set("visible",t)},u.prototype.setVisible=u.prototype.setVisible,u.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())},u.prototype.visible_changed=u.prototype.visible_changed,u.prototype.setFlat=function(t){this.set("flat",!!t)},u.prototype.setFlat=u.prototype.setFlat,u.prototype.getFlat=function(){return this.get("flat")},u.prototype.getFlat=u.prototype.getFlat,u.prototype.getWidth=function(){return this.get("width")},u.prototype.getWidth=u.prototype.getWidth,u.prototype.getHeight=function(){return this.get("height")},u.prototype.getHeight=u.prototype.getHeight,u.prototype.setShadow=function(t){this.set("shadow",t),this.flat_changed()},u.prototype.setShadow=u.prototype.setShadow,u.prototype.getShadow=function(){return this.get("shadow")},u.prototype.getShadow=u.prototype.getShadow,u.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())},u.prototype.flat_changed=u.prototype.flat_changed,u.prototype.setZIndex=function(t){this.set("zIndex",t)},u.prototype.setZIndex=u.prototype.setZIndex,u.prototype.getZIndex=function(){return this.get("zIndex")},u.prototype.getZIndex=u.prototype.getZIndex,u.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())},u.prototype.zIndex_changed=u.prototype.zIndex_changed,u.prototype.getDraggable=function(){return this.get("draggable")},u.prototype.getDraggable=u.prototype.getDraggable,u.prototype.setDraggable=function(t){this.set("draggable",!!t)},u.prototype.setDraggable=u.prototype.setDraggable,u.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?this.addDragging_(this.markerWrapper_):this.removeDragListeners_())},u.prototype.draggable_changed=u.prototype.draggable_changed,u.prototype.getPosition=function(){return this.get("position")},u.prototype.getPosition=u.prototype.getPosition,u.prototype.setPosition=function(t){this.set("position",t)},u.prototype.setPosition=u.prototype.setPosition,u.prototype.position_changed=function(){this.draw()},u.prototype.position_changed=u.prototype.position_changed,u.prototype.getAnchor=function(){return this.get("anchor")},u.prototype.getAnchor=u.prototype.getAnchor,u.prototype.setAnchor=function(t){this.set("anchor",t)},u.prototype.setAnchor=u.prototype.setAnchor,u.prototype.anchor_changed=function(){this.draw()},u.prototype.anchor_changed=u.prototype.anchor_changed,u.prototype.htmlToDocumentFragment_=function(t){var e=document.createElement("DIV");if(e.innerHTML=t,1==e.childNodes.length)return e.removeChild(e.firstChild);for(var i=document.createDocumentFragment();e.firstChild;)i.appendChild(e.firstChild);return i},u.prototype.removeChildren_=function(t){if(t)for(var e;e=t.firstChild;)t.removeChild(e)},u.prototype.setContent=function(t){this.set("content",t)},u.prototype.setContent=u.prototype.setContent,u.prototype.getContent=function(){return this.get("content")},u.prototype.getContent=u.prototype.getContent,u.prototype.content_changed=function(){if(this.markerContent_){this.removeChildren_(this.markerContent_);var t=this.getContent();if(t){"string"==typeof t&&(t=t.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),t=this.htmlToDocumentFragment_(t)),this.markerContent_.appendChild(t);for(var e,i=this,n=this.markerContent_.getElementsByTagName("IMG"),o=0;e=n[o];o++)google.maps.event.addDomListener(e,"mousedown",function(t){i.getDraggable()&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1)}),google.maps.event.addDomListener(e,"load",function(){i.draw()});google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}},u.prototype.content_changed=u.prototype.content_changed,u.prototype.setCursor_=function(t){if(this.ready_){var e="";navigator.userAgent.indexOf("Gecko/")!==-1?("dragging"==t&&(e="-moz-grabbing"),"dragready"==t&&(e="-moz-grab"),"draggable"==t&&(e="pointer")):("dragging"!=t&&"dragready"!=t||(e="move"),"draggable"==t&&(e="pointer")),this.markerWrapper_.style.cursor!=e&&(this.markerWrapper_.style.cursor=e)}},u.prototype.startDrag=function(t){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var e=this.getMap();this.mapDraggable_=e.get("draggable"),e.set("draggable",!1),this.mouseX_=t.clientX,this.mouseY_=t.clientY,this.setCursor_("dragready"),this.markerWrapper_.style.MozUserSelect="none",this.markerWrapper_.style.KhtmlUserSelect="none",this.markerWrapper_.style.WebkitUserSelect="none",this.markerWrapper_.unselectable="on",this.markerWrapper_.onselectstart=function(){return!1},this.addDraggingListeners_(),google.maps.event.trigger(this,"dragstart")}},u.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())},u.prototype.drag=function(t){if(!this.getDraggable()||!this.dragging_)return void this.stopDrag(
24);var e=this.mouseX_-t.clientX,i=this.mouseY_-t.clientY;this.mouseX_=t.clientX,this.mouseY_=t.clientY;var n=parseInt(this.markerWrapper_.style.left,10)-e,o=parseInt(this.markerWrapper_.style.top,10)-i;this.markerWrapper_.style.left=n+"px",this.markerWrapper_.style.top=o+"px";var r=this.getOffset_(),s=new google.maps.Point(n-r.width,o-r.height),a=this.getProjection();this.setPosition(a.fromDivPixelToLatLng(s)),this.setCursor_("dragging"),google.maps.event.trigger(this,"drag")},u.prototype.removeDragListeners_=function(){this.draggableListener_&&(google.maps.event.removeListener(this.draggableListener_),delete this.draggableListener_),this.setCursor_("")},u.prototype.addDragging_=function(t){if(t){var e=this;this.draggableListener_=google.maps.event.addDomListener(t,"mousedown",function(t){e.startDrag(t)}),this.setCursor_("draggable")}},u.prototype.addDraggingListeners_=function(){var e=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",function(t){e.drag(t)},!0),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){e.stopDrag(),e.markerWrapper_.releaseCapture()},!0)]):this.draggingListeners_=[google.maps.event.addDomListener(t,"mousemove",function(t){e.drag(t)},!0),google.maps.event.addDomListener(t,"mouseup",function(){e.stopDrag()},!0)]},u.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var t,e=0;t=this.draggingListeners_[e];e++)google.maps.event.removeListener(t);this.draggingListeners_.length=0}},u.prototype.getOffset_=function(){var t=this.getAnchor();if("object"==typeof t)return t;var e=new google.maps.Size(0,0);if(!this.markerContent_)return e;var i=this.markerContent_.offsetWidth,n=this.markerContent_.offsetHeight;switch(t){case p.TOP_LEFT:break;case p.TOP:e.width=-i/2;break;case p.TOP_RIGHT:e.width=-i;break;case p.LEFT:e.height=-n/2;break;case p.MIDDLE:e.width=-i/2,e.height=-n/2;break;case p.RIGHT:e.width=-i,e.height=-n/2;break;case p.BOTTOM_LEFT:e.height=-n;break;case p.BOTTOM:e.width=-i/2,e.height=-n;break;case p.BOTTOM_RIGHT:e.width=-i,e.height=-n}return e},u.prototype.onAdd=function(){if(this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute"),this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex()),this.markerWrapper_.style.display=this.getVisible()?"":"none",!this.markerContent_){this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_);var t=this;google.maps.event.addDomListener(this.markerContent_,"click",function(e){google.maps.event.trigger(t,"click")}),google.maps.event.addDomListener(this.markerContent_,"mouseover",function(e){ 25google.maps.event.trigger(t,"mouseover")}),google.maps.event.addDomListener(this.markerContent_,"mouseout",function(e){google.maps.event.trigger(t,"mouseout")})}this.ready_=!0,this.content_changed(),this.flat_changed(),this.draggable_changed();var e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.markerWrapper_),google.maps.event.trigger(this,"ready")},u.prototype.onAdd=u.prototype.onAdd,u.prototype.draw=function(){if(this.ready_&&!this.dragging_){var t=this.getProjection();if(t){var e=this.get("position"),i=t.fromLatLngToDivPixel(e),n=this.getOffset_();this.markerWrapper_.style.top=i.y+n.height+"px",this.markerWrapper_.style.left=i.x+n.width+"px";var o=this.markerContent_.offsetHeight,r=this.markerContent_.offsetWidth;r!=this.get("width")&&this.set("width",r),o!=this.get("height")&&this.set("height",o)}}},u.prototype.draw=u.prototype.draw,u.prototype.onRemove=function(){this.markerWrapper_&&this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_),this.removeDragListeners_()},u.prototype.onRemove=u.prototype.onRemove;var p={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};t.RichMarkerPosition=p,t.InfoBox=r,t.Cluster=i,t.ClusterIcon=e,t.MarkerClusterer=o,t.MarkerLabel_=a,t.MarkerWithLabel=l,t.RichMarker=u}()})}}),function(t){function e(n){if(i[n])return i[n].exports;
25var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,i,n){e.module("uiGmapgoogle-maps.wrapped").service("uiGmapDataStructures",function(){return{Graph:n(1).Graph,Queue:n(1).Queue}})},function(t,e,i){(function(){t.exports={Graph:i(2),Heap:i(3),LinkedList:i(4),Map:i(5),Queue:i(6),RedBlackTree:i(7),Trie:i(8)}}).call(this)},function(t,e){(function(){var e,i={}.hasOwnProperty;e=function(){function t(){this._nodes={},this.nodeSize=0,this.edgeSize=0}return t.prototype.addNode=function(t){if(!this._nodes[t])return this.nodeSize++,this._nodes[t]={_outEdges:{},_inEdges:{}}},t.prototype.getNode=function(t){return this._nodes[t]},t.prototype.removeNode=function(t){var e,n,o,r,s;if(n=this._nodes[t]){r=n._outEdges;for(o in r)i.call(r,o)&&this.removeEdge(t,o);s=n._inEdges;for(e in s)i.call(s,e)&&this.removeEdge(e,t);return this.nodeSize--,delete this._nodes[t],n}},t.prototype.addEdge=function(t,e,i){var n,o,r;if(null==i&&(i=1),!this.getEdge(t,e)&&(o=this._nodes[t],r=this._nodes[e],o&&r))return n={weight:i},o._outEdges[e]=n,r._inEdges[t]=n,this.edgeSize++,n},t.prototype.getEdge=function(t,e){var i,n;if(i=this._nodes[t],n=this._nodes[e],i&&n)return i._outEdges[e]},t.prototype.removeEdge=function(t,e){var i,n,o;if(n=this._nodes[t],o=this._nodes[e],i=this.getEdge(t,e))return delete n._outEdges[e],delete o._inEdges[t],this.edgeSize--,i},t.prototype.getInEdgesOf=function(t){var e,n,o,r;o=this._nodes[t],n=[],r=null!=o?o._inEdges:void 0;for(e in r)i.call(r,e)&&n.push(this.getEdge(e,t));return n},t.prototype.getOutEdgesOf=function(t){var e,n,o,r;e=this._nodes[t],n=[],r=null!=e?e._outEdges:void 0;for(o in r)i.call(r,o)&&n.push(this.getEdge(t,o));return n},t.prototype.getAllEdgesOf=function(t){var e,i,n,o,r,s,a;if(i=this.getInEdgesOf(t),n=this.getOutEdgesOf(t),0===i.length)return n;for(o=this.getEdge(t,t),e=r=0,s=i.length;0<=s?r<s:r>s;e=0<=s?++r:--r)if(i[e]===o){a=[i[i.length-1],i[e]],i[e]=a[0],i[i.length-1]=a[1],i.pop();break}return i.concat(n)},t.prototype.forEachNode=function(t){var e,n,o;o=this._nodes;for(e in o)i.call(o,e)&&(n=o[e],t(n,e))},t.prototype.forEachEdge=function(t){var e,n,o,r,s,a;s=this._nodes;for(n in s)if(i.call(s,n)){o=s[n],a=o._outEdges;for(r in a)i.call(a,r)&&(e=a[r],t(e))}},t}(),t.exports=e}).call(this)},function(t,e){(function(){var e,i,n,o;e=function(){function t(t){var e,i,n,o,r,s;for(null==t&&(t=[]),this._data=[void 0],n=0,r=t.length;n<r;n++)i=t[n],null!=i&&this._data.push(i);if(this._data.length>1)for(e=o=2,s=this._data.length;2<=s?o<s:o>s;e=2<=s?++o:--o)this._upHeap(e);this.size=this._data.length-1}return t.prototype.add=function(t){if(null!=t)return this._data.push(t),this._upHeap(this._data.length-1),this.size++,t},t.prototype.removeMin=function(){var t;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(t=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),t)},t.prototype.peekMin=function(){return this._data[1]},t.prototype._upHeap=function(t){var e,i;for(e=this._data[t];this._data[t]<this._data[n(t)]&&t>1;)i=[this._data[n(t)],this._data[t]],this._data[t]=i[0],this._data[n(t)]=i[1],t=n(t)},t.prototype._downHeap=function(){var t,e,n;for(t=1;i(t<this._data.length)&&(e=i(t),e<this._data.length-1&&this._data[o(t)]<this._data[e]&&(e=o(t)),this._data[e]<this._data[t]);)n=[this._data[t],this._data[e]],this._data[e]=n[0],this._data[t]=n[1],t=e},t}(),n=function(t){return t>>1},i=function(t){return t<<1},o=function(t){return(t<<1)+1},t.exports=e}).call(this)},function(t,e){(function(){var e;e=function(){function t(t){var e,i,n;for(null==t&&(t=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,i=0,n=t.length;i<n;i++)e=t[i],this.add(e)}return t.prototype.at=function(t){var e,i,n,o,r;if(-this.size<=t&&t<this.size){if(t=this._adjust(t),2*t<this.size)for(e=this.head,i=n=1;n<=t;i=n+=1)e=e.next;else for(e=this.tail,i=o=1,r=this.size-t-1;o<=r;i=o+=1)e=e.prev;return e}},t.prototype.add=function(t,e){var i,n,o,r,s;if(null==e&&(e=this.size),-this.size<=e&&e<=this.size)return n={value:t},e=this._adjust(e),0===this.size?this.head=n:0===e?(o=[n,this.head,n],this.head.prev=o[0],n.next=o[1],this.head=o[2]):(i=this.at(e-1),r=[i.next,n,n,i],n.next=r[0],null!=(s=i.next)?s.prev=r[1]:void 0,i.next=r[2],n.prev=r[3]),e===this.size&&(this.tail=n),this.size++,t},t.prototype.removeAt=function(t){var e,i,n;if(null==t&&(t=this.size-1),-this.size<=t&&t<this.size&&0!==this.size)return t=this._adjust(t),1===this.size?(i=this.head.value,this.head.value=this.tail.value=void 0):0===t?(i=this.head.value,this.head=this.head.next,this.head.prev=void 0):(e=this.at(t),i=e.value,e.prev.next=e.next,null!=(n=e.next)&&(n.prev=e.prev),t===this.size-1&&(this.tail=e.prev)),this.size--,i},t.prototype.remove=function(t){var e;if(null!=t){for(e=this.head;e&&e.value!==t;)e=e.next;if(e)return 1===this.size?this.head.value=this.tail.value=void 0:e===this.head?(this.head=this.head.next,this.head.prev=void 0):e===this.tail?(this.tail=this.tail.prev,this.tail.next=void 0):(e.prev.next=e.next,e.next.prev=e.prev),this.size--,t}},t.prototype.indexOf=function(t,e){var i,n;if(null==e&&(e=0),null==this.head.value&&!this.head.next||e>=this.size)return-1;for(e=Math.max(0,this._adjust(e)),i=this.at(e),n=e;i&&i.value!==t;)i=i.next,n++;return n===this.size?-1:n},t.prototype._adjust=function(t){return t<0?this.size+t:t},t}(),t.exports=e}).call(this)},function(t,e){(function(){var e,i,n,o,r={}.hasOwnProperty;i="_mapId_",e=function(){function t(e){var i,n;this._content={},this._itemId=0,this._id=t._newMapId(),this.size=0;for(i in e)r.call(e,i)&&(n=e[i],this.set(i,n))}return t._mapIdTracker=0,t._newMapId=function(){return this._mapIdTracker++},t.prototype.hash=function(t,e){var r,s;return null==e&&(e=!1),s=n(t),o(t)?(r=i+this._id,e&&!t[r]&&(t[r]=this._itemId++),r+"_"+t[r]):s+"_"+t},t.prototype.set=function(t,e){return this.has(t)||this.size++,this._content[this.hash(t,!0)]=[e,t],e},t.prototype.get=function(t){var e;return null!=(e=this._content[this.hash(t)])?e[0]:void 0},t.prototype.has=function(t){return this.hash(t)in this._content},t.prototype["delete"]=function(t){var e;return e=this.hash(t),e in this._content&&(delete this._content[e],o(t)&&delete t[i+this._id],this.size--,!0)},t.prototype.forEach=function(t){var e,i,n;n=this._content;for(e in n)r.call(n,e)&&(i=n[e],t(i[1],i[0]))},t}(),o=function(t){var e,i,o,r,s;for(e=["Boolean","Number","String","Undefined","Null","RegExp","Function"],o=n(t),r=0,s=e.length;r<s;r++)if(i=e[r],o===i)return!1;return!0},n=function(t){return Object.prototype.toString.apply(t).match(/\[object (.+)\]/)[1]},t.exports=e}).call(this)},function(t,e){(function(){var e;e=function(){function t(t){null==t&&(t=[]),this._content=t,this._dequeueIndex=0,this.size=this._content.length}return t.prototype.enqueue=function(t){return this.size++,this._content.push(t),t},t.prototype.dequeue=function(){var t;if(0!==this.size)return this.size--,t=this._content[this._dequeueIndex],this._dequeueIndex++,2*this._dequeueIndex>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),t},t.prototype.peek=function(){return this._content[this._dequeueIndex]},t}(),t.exports=e}).call(this)},function(t,e){(function(){var e,i,n,o,r,s,a,l,u,p,h,c,d,g,f;i=0,n=1,o=2,a=3,r=1,e=2,s=function(){function t(t){var e,i,n;for(null==t&&(t=[]),this._root,this.size=0,i=0,n=t.length;i<n;i++)e=t[i],null!=e&&this.add(e)}return t.prototype.add=function(t){var s,h,c,d;if(null!=t){if(this.size++,c={value:t,_color:r},this._root){if(h=l(this._root,function(e){return t===e.value?i:t<e.value?e._left?n:(c._parent=e,e._left
25=c,a):e._right?o:(c._parent=e,e._right=c,a)}),null!=h)return}else this._root=c;for(s=c;;){if(s===this._root){s._color=e;break}if(s._parent._color===e)break;{if((null!=(d=f(s))?d._color:void 0)!==r){!p(s)&&p(s._parent)?(this._rotateLeft(s._parent),s=s._left):p(s)&&!p(s._parent)&&(this._rotateRight(s._parent),s=s._right),s._parent._color=e,u(s)._color=r,p(s)?this._rotateRight(u(s)):this._rotateLeft(u(s));break}s._parent._color=e,f(s)._color=e,u(s)._color=r,s=u(s)}}return t}},t.prototype.has=function(t){var e;return e=l(this._root,function(e){return t===e.value?i:t<e.value?n:o}),!!e},t.prototype.peekMin=function(){var t;return null!=(t=d(this._root))?t.value:void 0},t.prototype.peekMax=function(){var t;return null!=(t=c(this._root))?t.value:void 0},t.prototype.remove=function(t){var e;if(e=l(this._root,function(e){return t===e.value?i:t<e.value?n:o}))return this._removeNode(this._root,e),this.size--,t},t.prototype.removeMin=function(){var t,e;if(t=d(this._root))return e=t.value,this._removeNode(this._root,t),e},t.prototype.removeMax=function(){var t,e;if(t=c(this._root))return e=t.value,this._removeNode(this._root,t),e},t.prototype._removeNode=function(t,i){var n,o,s,a,l,u,c,f,m,v;if(i._left&&i._right&&(o=d(i._right),i.value=o.value,i=o),o=i._left||i._right,o||(o={color:e,_right:void 0,_left:void 0,isLeaf:!0}),o._parent=i._parent,null!=(s=i._parent)&&(s[h(i)]=o),i._color===e)if(o._color===r)o._color=e,o._parent||(this._root=o);else for(;;){if(!o._parent){o.isLeaf?this._root=void 0:this._root=o;break}if(n=g(o),(null!=n?n._color:void 0)===r&&(o._parent._color=r,n._color=e,p(o)?this._rotateLeft(o._parent):this._rotateRight(o._parent)),n=g(o),o._parent._color!==e||n&&(n._color!==e||n._left&&n._left._color!==e||n._right&&n._right._color!==e)){if(!(o._parent._color!==r||n&&(n._color!==e||n._left&&(null!=(a=n._left)?a._color:void 0)!==e||n._right&&(null!=(l=n._right)?l._color:void 0)!==e))){null!=n&&(n._color=r),o._parent._color=e;break}if((null!=n?n._color:void 0)===e){!p(o)||n._right&&n._right._color!==e||(null!=(u=n._left)?u._color:void 0)!==r?p(o)||n._left&&n._left._color!==e||(null!=(f=n._right)?f._color:void 0)!==r||(n._color=r,null!=(m=n._right)&&(m._color=e),this._rotateLeft(n)):(n._color=r,null!=(c=n._left)&&(c._color=e),this._rotateRight(n));break}n=g(o),n._color=o._parent._color,p(o)?(n._right._color=e,this._rotateRight(o._parent)):(n._left._color=e,this._rotateLeft(o._parent))}else null!=n&&(n._color=r),o.isLeaf&&(o._parent[h(o)]=void 0),o=o._parent}if(o.isLeaf)return null!=(v=o._parent)?v[h(o)]=void 0:void 0},t.prototype._rotateLeft=function(t){var e,i;if(null!=(e=t._parent)&&(e[h(t)]=t._right),t._right._parent=t._parent,t._parent=t._right,t._right=t._right._left,t._parent._left=t,null!=(i=t._right)&&(i._parent=t),null==t._parent._parent)return this._root=t._parent},t.prototype._rotateRight=function(t){var e,i;if(null!=(e=t._parent)&&(e[h(t)]=t._left),t._left._parent=t._parent,t._parent=t._left,t._left=t._left._right,t._parent._right=t,null!=(i=t._left)&&(i._parent=t),null==t._parent._parent)return this._root=t._parent},t}(),p=function(t){return t===t._parent._left},h=function(t){return p(t)?"_left":"_right"},l=function(t,e){var r,s,l;for(s=t,l=void 0;s;){if(r=e(s),r===i){l=s;break}if(r===n)s=s._left;else if(r===o)s=s._right;else if(r===a)break}return l},d=function(t){return l(t,function(t){return t._left?n:i})},c=function(t){return l(t,function(t){return t._right?o:i})},u=function(t){var e;return null!=(e=t._parent)?e._parent:void 0},f=function(t){if(u(t))return p(t._parent)?u(t)._right:u(t)._left},g=function(t){return p(t)?t._parent._right:t._parent._left},t.exports=s}).call(this)},function(t,e,i){(function(){var e,n,o,r,s={}.hasOwnProperty;e=i(6),o="end",n=function(){function t(t){var e,i,n;for(null==t&&(t=[]),this._root={},this.size=0,i=0,n=t.length;i<n;i++)e=t[i],this.add(e)}return t.prototype.add=function(t){var e,i,n,r;if(null!=t){for(this.size++,e=this._root,n=0,r=t.length;n<r;n++)i=t[n],null==e[i]&&(e[i]={}),e=e[i];return e[o]=!0,t}},t.prototype.has=function(t){var e,i,n,r;if(null==t)return!1;for(e=this._root,n=0,r=t.length;n<r;n++){if(i=t[n],null==e[i])return!1;e=e[i]}return!!e[o]},t.prototype.longestPrefixOf=function(t){var e,i,n,o,r;if(null==t)return"";for(e=this._root,n="",o=0,r=t.length;o<r&&(i=t[o],null!=e[i]);o++)n+=i,e=e[i];return n},t.prototype.wordsWithPrefix=function(t){var i,n,r,a,l,u,p,h,c,d;if(null==t)return[];for(null!=t||(t=""),p=[],n=this._root,h=0,c=t.length;h<c;h++)if(r=t[h],n=n[r],null==n)return[];for(l=new e,l.enqueue([n,""]);0!==l.size;){d=l.dequeue(),a=d[0],i=d[1],a[o]&&p.push(t+i);for(r in a)s.call(a,r)&&(u=a[r],l.enqueue([u,i+r]))}return p},t.prototype.remove=function(t){var e,i,n,s,a,l,u,p;if(null!=t){for(e=this._root,s=[],a=0,u=t.length;a<u;a++){if(n=t[a],null==e[n])return;e=e[n],s.push([n,e])}if(e[o]){if(this.size--,delete e[o],r(e,1))return t;for(i=l=p=s.length-1;(p<=1?l<=1:l>=1)&&!r(s[i][1],1);i=p<=1?++l:--l)delete s[i-1][1][s[i][0]];return r(this._root[s[0][0]],1)||delete this._root[s[0][0]],t}}},t}(),r=function(t,e){var i,n;if(0===e)return!0;n=0;for(i in t)if(s.call(t,i)&&(n++,n>=e))return!0;return!1},t.exports=n}).call(this)}]),e.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(e){var i=this;return+function(){var e={}.hasOwnProperty,i=[].slice;this.OverlappingMarkerSpiderfier=function(){function n(t,i){var n,r,s,a,l,u;this.map=t,null==i&&(i={});for(r in i)e.call(i,r)&&(u=i[r],this[r]=u);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={}
25,l=["click","zoom_changed","maptypeid_changed"],s=0,a=l.length;s<a;s++)n=l[s],o.addListener(this.map,n,function(t){return function(){return t.unspiderfy()}}(this))}var o,r,s,a,l,u,p,h,c,d,g;for(h=n.prototype,c=[n,h],s=0,u=c.length;s<u;s++)g=c[s],g.VERSION="0.3.3";return r=void 0,o=void 0,p=void 0,d=2*Math.PI,h.keepSpiderfied=!1,h.markersWontHide=!1,h.markersWontMove=!1,h.nearbyDistance=20,h.circleSpiralSwitchover=9,h.circleFootSeparation=23,h.circleStartAngle=d/12,h.spiralFootSeparation=26,h.spiralLengthStart=11,h.spiralLengthFactor=4,h.spiderfiedZIndex=1e3,h.usualLegZIndex=10,h.highlightedLegZIndex=20,h.event="click",h.minZoomLevel=!1,h.legWeight=1.5,h.legColors={usual:{},highlighted:{}},l=h.legColors.usual,a=h.legColors.highlighted,n.initializeGoogleMaps=function(t){return r=t.maps,o=r.event,p=r.MapTypeId,l[p.HYBRID]=l[p.SATELLITE]="#fff",a[p.HYBRID]=a[p.SATELLITE]="#f00",l[p.TERRAIN]=l[p.ROADMAP]="#444",a[p.TERRAIN]=a[p.ROADMAP]="#f00",this.ProjHelper=function(t){return this.setMap(t)},this.ProjHelper.prototype=new r.OverlayView,this.ProjHelper.prototype.draw=function(){}},h.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},h.addMarker=function(t){var e;return null!=t._oms?this:(t._oms=!0,e=[o.addListener(t,this.event,function(e){return function(i){return e.spiderListener(t,i)}}(this))],this.markersWontHide||e.push(o.addListener(t,"visible_changed",function(e){return function(){return e.markerChangeListener(t,!1)}}(this))),this.markersWontMove||e.push(o.addListener(t,"position_changed",function(e){return function(){return e.markerChangeListener(t,!0)}}(this))),this.markerListenerRefs.push(e),this.markers.push(t),this)},h.markerChangeListener=function(t,e){if(null!=t._omsData&&(e||!t.getVisible())&&null==this.spiderfying&&null==this.unspiderfying)return this.unspiderfy(e?t:null)},h.getMarkers=function(){return this.markers.slice(0)},h.removeMarker=function(t){var e,i,n,r,s;if(null!=t._omsData&&this.unspiderfy(),e=this.arrIndexOf(this.markers,t),e<0)return this;for(s=this.markerListenerRefs.splice(e,1)[0],i=0,n=s.length;i<n;i++)r=s[i],o.removeListener(r);return delete t._oms,this.markers.splice(e,1),this},h.clearMarkers=function(){var t,e,i,n,r,s,a,l,u;for(this.unspiderfy(),u=this.markers,t=e=0,i=u.length;e<i;t=++e){for(a=u[t],s=this.markerListenerRefs[t],l=0,n=s.length;l<n;l++)r=s[l],o.removeListener(r);delete a._oms}return this.initMarkerArrays(),this},h.addListener=function(t,e){var i;return(null!=(i=this.listeners)[t]?i[t]:i[t]=[]).push(e),this},h.removeListener=function(t,e){var i;return i=this.arrIndexOf(this.listeners[t],e),i<0||this.listeners[t].splice(i,1),this},h.clearListeners=function(t){return this.listeners[t]=[],this},h.trigger=function(){var t,e,n,o,r,s,a,l;for(e=arguments[0],t=2<=arguments.length?i.call(arguments,1):[],a=null!=(s=this.listeners[e])?s:[],l=[],o=0,r=a.length;o<r;o++)n=a[o],l.push(n.apply(null,t));return l},h.generatePtsCircle=function(t,e){var i,n,o,s,a,l,u,p;for(o=this.circleFootSeparation*(2+t),l=o/d,n=d/t,p=[],s=a=0,u=t;0<=u?a<u:a>u;s=0<=u?++a:--a)i=this.circleStartAngle+s*n,p.push(new r.Point(e.x+l*Math.cos(i),e.y+l*Math.sin(i)));return p},h.generatePtsSpiral=function(t,e){var i,n,o,s,a,l,u;for(s=this.spiralLengthStart,i=0,u=[],n=o=0,l=t;0<=l?o<l:o>l;n=0<=l?++o:--o)i+=this.spiralFootSeparation/s+5e-4*n,a=new r.Point(e.x+s*Math.cos(i),e.y+s*Math.sin(i)),s+=d*this.spiralLengthFactor/i,u.push(a);return u},h.spiderListener=function(e,i){var n,o,r,s,a,l,u,p,c,d,g,f,m;if(p=null!=e._omsData,p&&this.keepSpiderfied||("mouseover"===this.event?(n=this,o=function(){return n.unspiderfy()},t.clearTimeout(h.timeout),h.timeout=setTimeout(o,3e3)):this.unspiderfy()),p||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",e,i);for(d=[],g=[],c=this.nearbyDistance,f=c*c,u=this.llToPt(e.position),m=this.markers,r=0,s=m.length;r<s;r++)a=m[r],null!=a.map&&a.getVisible()&&(l=this.llToPt(a.position),this.ptDistanceSq(l,u)<f?d.push({marker:a,markerPt:l}):g.push(a));return 1===d.length?this.trigger("click",e,i):this.spiderfy(d,g)},h.markersNearMarker=function(t,e){var i,n,o,r,s,a,l,u,p,h,c;if(null==e&&(e=!1),null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearMarker";for(l=this.nearbyDistance,u=l*l,s=this.llToPt(t.position),a=[],p=this.markers,i=0,n=p.length;i<n&&(o=p[i],!(o!==t&&null!=o.map&&o.getVisible()&&(r=this.llToPt(null!=(h=null!=(c=o._omsData)?c.usualPosition:void 0)?h:o.position),this.ptDistanceSq(r,s)<u&&(a.push(o),e))));i++);return a}
25,h.markersNearAnyOtherMarker=function(){var t,e,i,n,o,r,s,a,l,u,p,h,c,d,g,f,m,v,y,_,b;if(null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker";for(g=this.nearbyDistance,f=g*g,c=function(){var t,e,i,n,o,r;for(i=this.markers,r=[],t=0,e=i.length;t<e;t++)a=i[t],r.push({pt:this.llToPt(null!=(n=null!=(o=a._omsData)?o.usualPosition:void 0)?n:a.position),willSpiderfy:!1});return r}.call(this),v=this.markers,e=n=0,o=v.length;n<o;e=++n)if(l=v[e],null!=l.map&&l.getVisible()&&(u=c[e],!u.willSpiderfy))for(y=this.markers,i=d=0,r=y.length;d<r;i=++d)if(p=y[i],i!==e&&null!=p.map&&p.getVisible()&&(h=c[i],(!(i<e)||h.willSpiderfy)&&this.ptDistanceSq(u.pt,h.pt)<f)){u.willSpiderfy=h.willSpiderfy=!0;break}for(_=this.markers,b=[],t=m=0,s=_.length;m<s;t=++m)a=_[t],c[t].willSpiderfy&&b.push(a);return b},h.makeHighlightListenerFuncs=function(t){return{highlight:function(e){return function(){return t._omsData.leg.setOptions({strokeColor:e.legColors.highlighted[e.map.mapTypeId],zIndex:e.highlightedLegZIndex})}}(this),unhighlight:function(e){return function(){return t._omsData.leg.setOptions({strokeColor:e.legColors.usual[e.map.mapTypeId],zIndex:e.usualLegZIndex})}}(this)}},h.spiderfy=function(t,e){var i,n,s,a,l,u,p,h,c,d,g;return!(this.minZoomLevel&&this.map.getZoom()<this.minZoomLevel)&&(this.spiderfying=!0,d=t.length,i=this.ptAverage(function(){var e,i,n;for(n=[],e=0,i=t.length;e<i;e++)h=t[e],n.push(h.markerPt);return n}()),a=d>=this.circleSpiralSwitchover?this.generatePtsSpiral(d,i).reverse():this.generatePtsCircle(d,i),g=function(){var e,i,h;for(h=[],e=0,i=a.length;e<i;e++)s=a[e],n=this.ptToLl(s),c=this.minExtract(t,function(t){return function(e){return t.ptDistanceSq(e.markerPt,s)}}(this)),p=c.marker,u=new r.Polyline({map:this.map,path:[p.position,n],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),p._omsData={usualPosition:p.position,leg:u},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(l=this.makeHighlightListenerFuncs(p),p._omsData.hightlightListeners={highlight:o.addListener(p,"mouseover",l.highlight),unhighlight:o.addListener(p,"mouseout",l.unhighlight)}),p.setPosition(n),p.setZIndex(Math.round(this.spiderfiedZIndex+s.y)),h.push(p);return h}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",g,e))},h.unspiderfy=function(t){var e,i,n,r,s,a,l;if(null==t&&(t=null),null==this.spiderfied)return this;for(this.unspiderfying=!0,l=[],s=[],a=this.markers,e=0,i=a.length;e<i;e++)r=a[e],null!=r._omsData?(r._omsData.leg.setMap(null),r!==t&&r.setPosition(r._omsData.usualPosition),r.setZIndex(null),n=r._omsData.hightlightListeners,null!=n&&(o.removeListener(n.highlight),o.removeListener(n.unhighlight)),delete r._omsData,l.push(r)):s.push(r);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",l,s),this},h.ptDistanceSq=function(t,e){var i,n;return i=t.x-e.x,n=t.y-e.y,i*i+n*n},h.ptAverage=function(t){var e,i,n,o,s,a;for(s=a=0,e=0,i=t.length;e<i;e++)o=t[e],s+=o.x,a+=o.y;return n=t.length,new r.Point(s/n,a/n)},h.llToPt=function(t){return this.projHelper.getProjection().fromLatLngToDivPixel(t)},h.ptToLl=function(t){return this.projHelper.getProjection().fromDivPixelToLatLng(t)},h.minExtract=function(t,e){var i,n,o,r,s,a,l;for(o=s=0,a=t.length;s<a;o=++s)r=t[o],l=e(r),("undefined"==typeof i||null===i||l<n)&&(n=l,i=o);return t.splice(i,1)[0]},h.arrIndexOf=function(t,e){var i,n,o,r;if(null!=t.indexOf)return t.indexOf(e);for(i=n=0,o=t.length;n<o;i=++n)if(r=t[i],r===e)return i;return-1},n}()}.apply(i),e.then(function(){i.OverlappingMarkerSpiderfier.initializeGoogleMaps(t.google)}),this.OverlappingMarkerSpiderfier}]),e.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(e,n){return{init:i.once(function(){(function(){var i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};t.NgMapCluster=function(t){function i(t){i.__super__.constructor.call(this,t),this.markers_=new n}return o(i,t),i.prototype.addMarker=function(t){var e,i;if(this.isMarkerAlreadyAdded_(t)){var n=this.markers_.get(t.key);if(n.getPosition().lat()==t.getPosition().lat()&&n.getPosition().lon()==t.getPosition().lon())return!1}if(this.center_){if(this.averageCenter_){var o=this.markers_.length+1,r=(this.center_.lat()*(o-1)+t.getPosition().lat())/o,s=(this.center_.lng()*(o-1)+t.getPosition().lng())/o;this.center_=new google.maps.LatLng(r,s),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();return t.isAdded=!0,this.markers_.push(t),e=this.markers_.length,i=this.markerClusterer_.getMaxZoom(),null!==i&&this.map_.getZoom()>i?t.getMap()!==this.map_&&t.setMap(this.map_):e<this.minClusterSize_?t.getMap()!==this.map_&&t.setMap(this.map_):e===this.minClusterSize_?this.markers_.each(function(t){t.setMap(null)}):t.setMap(null),!0},i.prototype.isMarkerAlreadyAdded_=function(t){return e.isNullOrUndefined(this.markers_.get(t.key))},i.prototype.getBounds=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);return this.getMarkers().each(function(e){t.extend(e.getPosition())}),t},i.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=new n,delete this.markers_},i}(Cluster),t.NgMapMarkerClusterer=function(t){function e(t,i,o){e.__super__.constructor.call(this,t,i,o),this.markers_=new n}return o(e,t),e.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=new n},e.prototype.removeMarker_=function(t){return!!this.markers_.get(t.key)&&(t.setMap(null),this.markers_.remove(t.key),!0)}
25,e.prototype.createClusters_=function(t){var e,i,n,o=this;if(this.ready_){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),n=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,(-178.48388434375)),new google.maps.LatLng((-85.08136444384544),178.00048865625));var r=this.getExtendedBounds(n),s=Math.min(t+this.batchSize_,this.markers_.length),a=this.markers_.values();for(e=t;e<s;e++)i=a[e],!i.isAdded&&this.isMarkerInBounds_(i,r)&&(!this.ignoreHidden_||this.ignoreHidden_&&i.getVisible())&&this.addToClosestCluster_(i);if(s<this.markers_.length)this.timerRefStatic=setTimeout(function(){o.createClusters_(s)},0);else{for(e=0;e<this.clusters_.length;e++)this.clusters_[e].updateIcon_();delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this)}}},e.prototype.addToClosestCluster_=function(t){var e,i,n,o,r=4e4,s=null;for(e=0;
25e<this.clusters_.length;e++)n=this.clusters_[e],o=n.getCenter(),o&&(i=this.distanceBetweenPoints_(o,t.getPosition()),i<r&&(r=i,s=n));s&&s.isMarkerInClusterBounds(t)?s.addMarker(t):(n=new NgMapCluster(this),n.addMarker(t),this.clusters_.push(n))},e.prototype.redraw_=function(){this.createClusters_(0)},e.prototype.resetViewport_=function(t){var e;for(e=0;e<this.clusters_.length;e++)this.clusters_[e].remove();this.clusters_=[],this.markers_.each(function(e){e.isAdded=!1,t&&e.setMap(null)})},e.prototype.extend=function(t,e){return function(t){var e;for(e in t.prototype)"constructor"!==e&&(this.prototype[e]=t.prototype[e]);return this}.apply(t,[e])},ClusterIcon.prototype.show=function(){if(this.div_){var t="",e=this.backgroundPosition_.split(" "),i=parseInt(e[0].trim(),10),n=parseInt(e[1].trim(),10),o=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(o),t="<img src='"+this.url_+"' style='position: absolute; top: "+n+"px; left: "+i+"px; ",t+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*n+"px, "+(-1*i+this.width_)+"px, "+(-1*n+this.height_)+"px, "+-1*i+"px);",t+="'>",this.div_.innerHTML=t+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"</div>","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},e}(MarkerClusterer)}).call(this)})}}])}(window,angular,_); 26(function(){"use strict";var n,t,e,o,r,u,i,l,c,f,s,a,h,m,d,p,w=[].slice;angular.module("angular-inview",[]).directive("inView",["$parse",function(t){return{restrict:"A",require:"?^inViewContainer",link:function(r,u,l,c){var f,s,h,m,d,p;if(l.inView)return f=t(l.inView),s={element:u,wasInView:!1,offset:0,customDebouncedCheck:null,callback:function(n,t,e){return null==n&&(n={}),r.$evalAsync(function(o){return function(){return n.inViewTarget=u[0],f(r,{$event:n,$inview:t,$inviewpart:e})}}(this))}},null!=l.inViewOptions&&(h=r.$eval(l.inViewOptions))&&(s.offset=h.offset||[h.offsetTop||0,h.offsetBottom||0],h.debounce&&(s.customDebouncedCheck=o(function(n){return e([s],u[0],n)},h.debounce))),m=null!=(d=null!=(p=s.customDebouncedCheck)?p:null!=c?c.checkInView:void 0)?d:a,null!=c?c.addItem(s):n(s),setTimeout(m),r.$on("$destroy",function(){return null!=c&&c.removeItem(s),i(s)})}}}]).directive("inViewContainer",function(){return{restrict:"AC",controller:["$element",function(n){return this.items=[],this.addItem=function(n){return this.items.push(n)},this.removeItem=function(n){var t;return this.items=function(){var e,o,r,u;for(r=this.items,u=[],e=0,o=r.length;e<o;e++)t=r[e],t!==n&&u.push(t);return u}.call(this)},this.checkInView=function(t){return function(o){var r,u,i,l;for(l=t.items,u=0,i=l.length;u<i;u++)r=l[u],null!=r.customDebouncedCheck&&r.customDebouncedCheck();return e(function(){var n,t,e,o;for(e=this.items,o=[],n=0,t=e.length;n<t;n++)r=e[n],null==r.customDebouncedCheck&&o.push(r);return o}.call(t),n[0],o)}}(this),this}],link:function(n,t,e,o){return t.bind("scroll",o.checkInView),l(o),n.$on("$destroy",function(){return t.unbind("scroll",o.checkInView),s(o)})}}}),p=[],n=function(n){return p.push(n),t()},i=function(n){var t;return p=function(){var e,o,r;for(r=[],e=0,o=p.length;e<o;e++)t=p[e],t!==n&&r.push(t);return r}(),f()},m=[],l=function(n){return m.push(n),t()},s=function(n){var t;return m=function(){var e,o,r;for(r=[],e=0,o=m.length;e<o;e++)t=m[e],t!==n&&r.push(t);return r}(),f()},d=!1,h=function(n){var t,e,o;for(e=0,o=m.length;e<o;e++)t=m[e],t.checkInView(n);if(p.length)return a(n)},t=function(){if(!d)return d=!0,angular.element(window).bind("checkInView click ready scroll resize",h)},f=function(){if(d&&!p.length&&!m.length)return d=!1,angular.element(window).unbind("checkInView click ready scroll resize",h)},c=function(n,t,e,o,u){var i,l;if(e){if(i=r(t.element[0]).top+window.pageYOffset,l=o&&u&&"neither"||o&&"top"||u&&"bottom"||"both",!t.wasInView||t.wasInView!==l||i!==t.lastOffsetTop)return t.lastOffsetTop=i,t.wasInView=l,t.callback(n,!0,l)}else if(t.wasInView)return t.wasInView=!1,t.callback(n,!1)},e=function(n,t,e){var o,i,l,f,s,a,h,m,d,p,w,b,v,g,k;if(a={top:0,bottom:u()},t&&t!==window){if(o=r(t),o.top>a.bottom||o.bottom<a.top){for(h=0,d=n.length;h<d;h++)s=n[h],c(e,s,!1);return}o.top>
26a.top&&(a.top=o.top),o.bottom<a.bottom&&(a.bottom=o.bottom)}for(k=[],m=0,p=n.length;m<p;m++)s=n[m],f=s.element[0],o=r(f),l=o.top+parseInt(null!=(w=null!=(b=s.offset)?b[0]:void 0)?w:s.offset),i=o.bottom+parseInt(null!=(v=null!=(g=s.offset)?g[1]:void 0)?v:s.offset),l<a.bottom&&i>=a.top?k.push(c(e,s,!0,i>a.bottom,l<a.top)):k.push(c(e,s,!1));return k},u=function(){var n,t,e;return(n=window.innerHeight)?n:(t=document.compatMode,!t&&("undefined"!=typeof $&&null!==$&&null!=(e=$.support)?e.boxModel:void 0)||(n="CSS1Compat"===t?document.documentElement.clientHeight:document.body.clientHeight),n)},r=function(n){var t,e,o;if(null!=n.getBoundingClientRect)return n.getBoundingClientRect();for(o=0,t=n;t;)o+=t.offsetTop,t=t.offsetParent;for(e=n.parentElement;e;)null!=e.scrollTop&&(o-=e.scrollTop),e=e.parentElement;return{top:o,bottom:o+n.offsetHeight}},o=function(n,t){var e;return e=null,function(){var o;return o=1<=arguments.length?w.call(arguments,0):[],null!=e&&clearTimeout(e),e=setTimeout(function(){return n.apply(null,o)},null!=t?t:100)}},a=function(n){var t,o,r;for(o=0,r=p.length;o<r;o++)t=p[o],null!=t.customDebouncedCheck&&t.customDebouncedCheck();return e(function(){var n,e,o;for(o=[],n=0,e=p.length;n<e;n++)t=p[n],null==t.customDebouncedCheck&&o.push(t);return o}(),null,n)}}).call(this); 27!function(){"use strict";function e(e){return angular.isUndefined(e)||null===e}var t={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(e){var s=e.which;switch(s){case t.COMMAND:case t.SHIFT:case t.CTRL:case t.ALT:return!0}return!!(e.metaKey||e.ctrlKey||e.altKey)},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123},isVerticalMovement:function(e){return~[t.UP,t.DOWN].indexOf(e)},isHorizontalMovement:function(e){return~[t.LEFT,t.RIGHT,t.BACKSPACE,t.DELETE].indexOf(e)},toSeparator:function(e){var s={ENTER:"\n",TAB:"\t",SPACE:" "}[e];return s?s:t[e]?void 0:e}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(e){for(var t=this[0],s=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(s.bind(t)(e))return t;t=t.parentElement}return!1});var s=0,i=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",removeSelected:!0,resetSearchInput:!0,generateId:function(){return s++},appendToBody:!1,spinnerEnabled:!1,spinnerClass:"glyphicon glyphicon-refresh ui-select-spin",backspaceReset:!0}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),s=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(s)}}).directive("uisTranscludeAppend",function(){return{link:function(e,t,s,i,c){c(e,function(e){t.append(e)})}}}).filter("highlight",function(){function e(e){return(""+e).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,s){return s&&t?(""+t).replace(new RegExp(e(s),"g
27i"),'<span class="ui-select-highlight">$&</span>'):t}}).factory("uisOffset",["$document","$window",function(e,t){return function(s){var i=s[0].getBoundingClientRect();return{width:i.width||s.prop("offsetWidth"),height:i.height||s.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}]);i.factory("$$uisDebounce",["$timeout",function(e){return function(t,s){var i;return function(){var c=this,n=Array.prototype.slice.call(arguments);i&&e.cancel(i),i=e(function(){t.apply(c,n)},s)}}}]),
vendor: 20,216 bytes, line 27
27i.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(e,t,s,i,c){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-choices");var s=t.parent().attr("theme")||e.theme;return s+"/choices.tpl.html"},compile:function(i,n){if(!n.repeat)throw s("repeat","Expected 'repeat' expression.");var l=n.groupBy,a=n.groupFilter;if(l){var r=i.querySelectorAll(".ui-select-choices-group");if(1!==r.length)throw s("rows","Expected 1 .ui-select-choices-group but got '{0}'.",r.length);r.attr("ng-repeat",t.getGroupNgRepeatExpression())}var o=t.parse(n.repeat),u=i.querySelectorAll(".ui-select-choices-row");if(1!==u.length)throw s("rows","Expected 1 .ui-select-choices-row but got '{0}'.",u.length);u.attr("ng-repeat",o.repeatExpression(l)).attr("ng-if","$select.open");var d=i.querySelectorAll(".ui-select-choices-row-inner");if(1!==d.length)throw s("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",d.length);d.attr("uis-transclude-append","");var p=c.document.addEventListener?u:d;return p.attr("ng-click","$select.select("+o.itemName+",$select.skipFocusser,$event)"),function(t,s,c,n){n.parseRepeatAttr(c.repeat,l,a),n.disableChoiceExpression=c.uiDisableChoice,n.onHighlightCallback=c.onHighlight,n.minimumInputLength=parseInt(c.minimumInputLength)||0,n.dropdownPosition=c.position?c.position.toLowerCase():e.dropdownPosition,t.$watch("$select.search",function(e){e&&!n.open&&n.multiple&&n.activate(!1,!0),n.activeIndex=n.tagging.isActivated?-1:0,!c.minimumInputLength||n.search.length>=c.minimumInputLength?n.refresh(c.refresh):n.items=[]}),c.$observe("refreshDelay",function(){var s=t.$eval(c.refreshDelay);n.refreshDelay=void 0!==s?s:e.refreshDelay}),t.$watch("$select.open",function(e){e?(i.attr("role","listbox"),n.refresh(c.refresh)):s.removeAttr("role")})}}}}]),i.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","$$uisDebounce","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function(s,i,c,n,l,a,r,o,u,d,p){function h(e,t,s){if(e.findIndex)return e.findIndex(t,s);for(var i,c=Object(e),n=c.length>>>0,l=0;l<n;l++)if(i=c[l],t.call(s,i,l,c))return l;return-1}function g(){y.resetSearchInput&&(y.search=x,y.selected&&y.items.length&&!y.multiple&&(y.activeIndex=h(y.items,function(e){return angular.equals(this,e)},y.selected)))}function f(e,t){var s,i,c=[];for(s=0;s<t.length;s++)for(i=0;i<e.length;i++)e[i].name==[t[s]]&&c.push(e[i]);return c}function v(e,t){var s=I.indexOf(e);t&&s===-1&&I.push(e),!t&&s>-1&&I.splice(s,1)}function m(e){return I.indexOf(e)>-1}function $(e){function t(e,t){var s=i.indexOf(e);t&&s===-1&&i.push(e),!t&&s>-1&&i.splice(s,1)}function s(e){return i.indexOf(e)>-1}if(e){var i=[];y.isLocked=function(e,i){var c=!1,n=y.selected[i];return n&&(e?(c=!!e.$eval(y.lockChoiceExpression),t(n,c)):c=s(n)),c}}}function b(e){var s=!0;switch(e){case t.DOWN:if(!y.open&&y.multiple)y.activate(!1,!0);else if(y.activeIndex<y.items.length-1)for(var i=++y.activeIndex;m(y.items[i])&&i<y.items.length;)y.activeIndex=++i;break;case t.UP:var c=0===y.search.length&&y.tagging.isActivated?-1:0;if(!y.open&&y.multiple)y.activate(!1,!0);else if(y.activeIndex>c)for(var n=--y.activeIndex;m(y.items[n])&&n>c;)y.activeIndex=--n;break;case t.TAB:y.multiple&&!y.open||y.select(y.items[y.activeIndex],!0);break;case t.ENTER:y.open&&(y.tagging.isActivated||y.activeIndex>=0)?y.select(y.items[y.activeIndex],y.skipFocusser):y.activate(!1,!0);break;case t.ESC:y.close();break;default:s=!1}return s}function w(){var e=i.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw r("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);if(!(y.activeIndex<0)){var s=t[y.activeIndex],c=s.offsetTop+s.clientHeight-e[0].scrollTop,n=e[0].offsetHeight;c>n?e[0].scrollTop+=c-n:c<s.clientHeight&&(y.isGrouped&&0===y.activeIndex?e[0].scrollTop=0:e[0].scrollTop-=s.clientHeight-c)}}var y=this,x="";if(y.placeholder=o.placeholder,y.searchEnabled=o.searchEnabled,y.sortable=o.sortable,y.refreshDelay=o.refreshDelay,y.paste=o.paste,y.resetSearchInput=o.resetSearchInput,y.refreshing=!1,y.spinnerEnabled=o.spinnerEnabled,y.spinnerClass=o.spinnerClass,y.removeSelected=o.removeSelected,y.closeOnSelect=!0,y.skipFocusser=!1,y.search=x,y.activeIndex=0,y.items=[],y.open=!1,y.focus=!1,y.disabled=!1,y.selected=void 0,y.dropdownPosition="auto",y.focusser=void 0,y.multiple=void 0,y.disableChoiceExpression=void 0,y.tagging={isActivated:!1,fct:void 0},y.taggingTokens={isActivated:!1,tokens:void 0},y.lockChoiceExpression=void 0,y.clickTriggeredSelect=!1,y.$filter=n,y.$element=i,y.$animate=function(){try{return d.get("$animate")}catch(e){return null}}(),y.searchInput=i.querySelectorAll("input.ui-select-search"),1!==y.searchInput.length)throw r("searchInput","Expected 1 input.ui-select-search but got '{0}'.",y.searchInput.length);y.isEmpty=function(){return e(y.selected)||""===y.selected||y.multiple&&0===y.selected.length},y.activate=function(e,t){if(y.disabled||y.open)y.open&&!y.searchEnabled&&y.close();else{t||g(),s.$broadcast("uis:activate"),y.open=!0,y.activeIndex=y.activeIndex>=y.items.length?0:y.activeIndex,y.activeIndex===-1&&y.taggingLabel!==!1&&(y.activeIndex=0);var n=i.querySelectorAll(".ui-select-choices-content"),l=i.querySelectorAll(".ui-select-search");if(y.$animate&&y.$animate.on&&y.$animate.enabled(n[0])){var a=function(t,s){"start"===s&&0===y.items.length?(y.$animate.off("removeClass",l[0],a),c(function(){y.focusSearchInput(e)})):"close"===s&&(y.$animate.off("enter",n[0],a),c(function(){y.focusSearchInput(e)}))};y.items.length>0?y.$animate.on("enter",n[0],a):y.$animate.on("removeClass",l[0],a)}else c(function(){y.focusSearchInput(e),!y.tagging.isActivated&&y.items.length>1&&w()})}},y.focusSearchInput=function(e){y.search=e||y.search,y.searchInput[0].focus()},y.findGroupByName=function(e){return y.groups&&y.groups.filter(function(t){return t.name===e})[0]},y.parseRepeatAttr=function(e,t,i){function c(e){var c=s.$eval(t);if(y.groups=[],angular.forEach(e,function(e){var t=angular.isFunction(c)?c(e):e[c],s=y.findGroupByName(t);s?s.items.push(e):y.groups.push({name:t,items:[e]})}),i){var n=s.$eval(i);angular.isFunction(n)?y.groups=n(y.groups):angular.isArray(n)&&(y.groups=f(y.groups,n))}y.items=[],y.groups.forEach(function(e){y.items=y.items.concat(e.items)})}function n(e){y.items=e||[]}y.setItemsFn=t?c:n,y.parserResult=a.parse(e),y.isGrouped=!!t,y.itemProperty=y.parserResult.itemName;var l=y.parserResult.source,o=function(){var e=l(s);s.$uisSource=Object.keys(e).map(function(t){var s={};return s[y.parserResult.keyName]=t,s.value=e[t],s})};y.parserResult.keyName&&(o(),y.parserResult.source=u("$uisSource"+y.parserResult.filters),s.$watch(l,function(e,t){e!==t&&o()},!0)),y.refreshItems=function(e){e=e||y.parserResult.source(s);var t=y.selected;if(y.isEmpty()||angular.isArray(t)&&!t.length||!y.multiple||!y.removeSelected)y.setItemsFn(e);else if(void 0!==e&&null!==e){var i=e.filter(function(e){return angular.isArray(t)?t.every(function(t){return!angular.equals(e,t)}):!angular.equals(e,t)});y.setItemsFn(i)}"auto"!==y.dropdownPosition&&"up"!==y.dropdownPosition||s.calculateDropdownPos(),s.$broadcast("uis:refresh")},s.$watchCollection(y.parserResult.source,function(e){if(void 0===e||null===e)y.items=[];else{if(!angular.isArray(e))throw r("items","Expected an array but got '{0}'.",e);y.refreshItems(e),angular.isDefined(y.ngModel.$modelValue)&&(y.ngModel.$modelValue=null)}})};var E;y.refresh=function(e){void 0!==e&&(E&&c.cancel(E),E=c(function(){if(s.$select.search.length>=s.$select.minimumInputLength){var t=s.$eval(e);t&&angular.isFunction(t.then)&&!y.refreshing&&(y.refreshing=!0,t["finally"](function(){y.refreshing=!1}))}},y.refreshDelay))},y.isActive=function(e){if(!y.open)return!1;var t=y.items.indexOf(e[y.itemProperty]),s=t==y.activeIndex;return!(!s||t<0)&&(s&&!angular.isUndefined(y.onHighlightCallback)&&e.$eval(y.onHighlightCallback),s)};var S=function(e){return y.selected&&angular.isArray(y.selected)&&y.selected.filter(function(t){return angular.equals(t,e)}).length>0},I=[];y.isDisabled=function(e){if(y.open){var t=e[y.itemProperty],s=y.items.indexOf(t),i=!1;if(s>=0&&(angular.isDefined(y.disableChoiceExpression)||y.multiple)){if(t.isTag)return!1;y.multiple&&(i=S(t)),!i&&angular.isDefined(y.disableChoiceExpression)&&(i=!!e.$eval(y.disableChoiceExpression)),v(t,i)}return i}},y.select=function(t,i,c){if(e(t)||!m(t)){if(!y.items&&!y.search&&!y.tagging.isActivated)return;if(!t||!m(t)){if(y.clickTriggeredSelect=!1,c&&("click"===c.type||"touchend"===c.type)&&t&&(y.clickTriggeredSelect=!0),y.tagging.isActivated&&y.clickTriggeredSelect===!1){if(y.taggingLabel===!1)if(y.activeIndex<0){if(void 0===t&&(t=void 0!==y.tagging.fct?y.tagging.fct(y.search):y.search),!t||angular.equals(y.items[0],t))return}else t=y.items[y.activeIndex];else if(0===y.activeIndex){if(void 0===t)return;if(void 0!==y.tagging.fct&&"string"==typeof t){if(t=y.tagging.fct(t),!t)return}else"string"==typeof t&&(t=t.replace(y.taggingLabel,"").trim())}if(S(t))return void y.close(i)}g(),s.$broadcast("uis:select",t),y.closeOnSelect&&y.close(i)}}},y.close=function(e){y.open&&(y.ngModel&&y.ngModel.$setTouched&&y.ngModel.$setTouched(),y.open=!1,g(),s.$broadcast("uis:close",e))},y.setFocus=function(){y.focus||y.focusInput[0].focus()},y.clear=function(e){y.select(null),e.stopPropagation(),c(function(){y.focusser[0].focus()},0,!1)},y.toggle=function(e){y.open?(y.close(),e.preventDefault(),e.stopPropagation()):y.activate()},y.isLocked=function(){return!1},s.$watch(function(){return angular.isDefined(y.lockChoiceExpression)&&""!==y.lockChoiceExpression},$);var C=null,k=!1;y.sizeSearchInput=function(){var e=y.searchInput[0],t=y.$element[0],i=function(){return t.clientWidth*!!e.offsetParent},n=function(t){if(0===t)return!1;var s=t-e.offsetLeft;return s<50&&(s=t),y.searchInput.css("width",s+"px"),!0};y.searchInput.css("width","10px"),c(function(){null!==C||n(i())||(C=s.$watch(function(){k||(k=!0,s.$$postDigest(function(){k=!1,n(i())&&(C(),C=null)}))},angular.noop))})},y.searchInput.on("keydown",function(e){var i=e.which;~[t.ENTER,t.ESC].indexOf(i)&&(e.preventDefault(),e.stopPropagation()),s.$apply(function(){var s=!1;if((y.items.length>0||y.tagging.isActivated)&&(b(i)||y.searchEnabled||(e.preventDefault(),e.stopPropagation()),y.taggingTokens.isActivated)){for(var n=0;n<y.taggingTokens.tokens.length;n++)y.taggingTokens.tokens[n]===t.MAP[e.keyCode]&&y.search.length>0&&(s=!0);s&&c(function(){y.searchInput.triggerHandler("tagged");var s=y.search.replace(t.MAP[e.keyCode],"").trim();y.tagging.fct&&(s=y.tagging.fct(s)),s&&y.select(s,!0)})}}),t.isVerticalMovement(i)&&y.items.length>0&&w(),i!==t.ENTER&&i!==t.ESC||(e.preventDefault(),e.stopPropagation())}),y.searchInput.on("paste",function(e){var s;if(s=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(e.originalEvent||e).clipboardData.getData("text/plain"),s=y.search+s,s&&s.length>0)if(y.taggingTokens.isActivated){for(var i=[],c=0;c<y.taggingTokens.tokens.length;c++){var n=t.toSeparator(y.taggingTokens.tokens[c])||y.taggingTokens.tokens[c];if(s.indexOf(n)>-1){i=s.split(n);break}}0===i.length&&(i=[s]);var l=y.search;angular.forEach(i,function(e){var t=y.tagging.fct?y.tagging.fct(e):e;t&&y.select(t,!0)}),y.search=l||x,e.preventDefault(),e.stopPropagation()}else y.paste&&(y.paste(s),y.search=x,e.preventDefault(),e.stopPropagation())}),y.searchInput.on("tagged",function(){c(function(){g()})});var A=l(function(){y.sizeSearchInput()},50);angular.element(p).bind("resize",A),s.$on("$destroy",function(){y.searchInput.off("keyup keydown tagged blur paste"),angular.element(p).off("resize",A)}),s.$watch("$select.activeIndex",function(e){e&&i.find("input").attr("aria-activedescendant","ui-select-choices-row-"+y.generatedId+"-"+e)}),s.$watch("$select.open",function(e){e||i.find("input").removeAttr("aria-activedescendant")})}]),i.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(e,t,s,i,c,n,l){return{restrict:"EA",templateUrl:function(e,s){var i=s.theme||t.theme;return i+(angular.isDefined(s.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(c,a){var r=/{(.*)}\s*{(.*)}/.exec(a.ngClass);if(r){var o="{"+r[1]+", "+r[2]+"}";a.ngClass=o,c.attr("ng-class",o)}return angular.isDefined(a.multiple)?c.append("<ui-select-multiple/>").removeAttr("multiple"):c.append("<ui-select-single/>"),a.inputId&&(c.querySelectorAll("input.ui-select-search")[0].id=a.inputId),function(c,a,r,o,u){function d(e){if(g.open){var t=!1;if(t=window.jQuery?window.jQuery.contains(a[0],e.target):a[0].contains(e.target),!t&&!g.clickTriggeredSelect){var s;if(g.skipFocusser)s=!0;else{var i=["input","button","textarea","select"],n=angular.element(e.target).controller("uiSelect");s=n&&n!==g,s||(s=~i.indexOf(e.target.tagName.toLowerCase()))}g.close(s),c.$digest()}g.clickTriggeredSelect=!1}}function p(){var t=i(a);m=angular.element('<div class="ui-select-placeholder"></div>'),m[0].style.width=t.width+"px",m[0].style.height=t.height+"px",a.after(m),$=a[0].style.width,e.find("body").append(a),a[0].style.position="absolute",a[0].style.left=t.left+"px",a[0].style.top=t.top+"px",a[0].style.width=t.width+"px"}function h(){null!==m&&(m.replaceWith(a),m=null,a[0].style.position="",a[0].style.left="",a[0].style.top="",a[0].style.width=$,g.setFocus())}var g=o[0],f=o[1];g.generatedId=t.generateId(),g.baseTitle=r.title||"Select box",g.focusserTitle=g.baseTitle+" focus",g.focusserId="focusser-"+g.generatedId,g.closeOnSelect=function(){return angular.isDefined(r.closeOnSelect)?n(r.closeOnSelect)():t.closeOnSelect}(),c.$watch("skipFocusser",function(){var e=c.$eval(r.skipFocusser);g.skipFocusser=void 0!==e?e:t.skipFocusser}),g.onSelectCallback=n(r.onSelect),g.onRemoveCallback=n(r.onRemove),g.ngModel=f,g.choiceGrouped=function(e){return g.isGrouped&&e&&e.name},r.tabindex&&r.$observe("tabindex",function(e){g.focusInput.attr("tabindex",e),a.removeAttr("tabindex")}),c.$watch(function(){return c.$eval(r.searchEnabled)},function(e){g.searchEnabled=void 0!==e?e:t.searchEnabled}),c.$watch("sortable",function(){var e=c.$eval(r.sortable);g.sortable=void 0!==e?e:t.sortable}),r.$observe("backspaceReset",function(){var e=c.$eval(r.backspaceReset);g.backspaceReset=void 0===e||e}),r.$observe("limit",function(){g.limit=angular.isDefined(r.limit)?parseInt(r.limit,10):void 0}),c.$watch("removeSelected",function(){var e=c.$eval(r.removeSelected);g.removeSelected=void 0!==e?e:t.removeSelected}),r.$observe("disabled",function(){g.disabled=void 0!==r.disabled&&r.disabled}),r.$observe("resetSearchInput",function(){var e=c.$eval(r.resetSearchInput);g.resetSearchInput=void 0===e||e}),r.$observe("paste",function(){g.paste=c.$eval(r.paste)}),r.$observe("tagging",function(){if(void 0!==r.tagging){var e=c.$eval(r.tagging);g.tagging={isActivated:!0,fct:e!==!0?e:void 0}}else g.tagging={isActivated:!1,fct:void 0}}),r.$observe("taggingLabel",function(){void 0!==r.tagging&&("false"===r.taggingLabel?g.taggingLabel=!1:g.taggingLabel=void 0!==r.taggingLabel?r.taggingLabel:"(new)")}),r.$observe("taggingTokens",function(){if(void 0!==r.tagging){var e=void 0!==r.taggingTokens?r.taggingTokens.split("|"):[",","ENTER"];g.taggingTokens={isActivated:!0,tokens:e}}}),r.$observe("spinnerEnabled",function(){var e=c.$eval(r.spinnerEnabled);g.spinnerEnabled=void 0!==e?e:t.spinnerEnabled}),r.$observe("spinnerClass",function(){var e=r.spinnerClass;g.spinnerClass=void 0!==e?r.spinnerClass:t.spinnerClass}),angular.isDefined(r.autofocus)&&l(function(){g.setFocus()}),angular.isDefined(r.focusOn)&&c.$on(r.focusOn,function(){l(function(){g.setFocus()})}),e.on("click",d),c.$on("$destroy",function(){e.off("click",d)}),u(c,function(e){var t=angular.element("<div>").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw s("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);a.querySelectorAll(".ui-select-match").replaceWith(i);var c=t.querySelectorAll(".ui-select-choices");if(c.removeAttr("ui-select-choices"),c.removeAttr("data-ui-select-choices"),1!==c.length)throw s("transcluded","Expected 1 .ui-select-choices but got '{0}'.",c.length);a.querySelectorAll(".ui-select-choices").replaceWith(c);var n=t.querySelectorAll(".ui-select-no-choice");n.removeAttr("ui-select-no-choice"),n.removeAttr("data-ui-select-no-choice"),1==n.length&&a.querySelectorAll(".ui-select-no-choice").replaceWith(n)});var v=c.$eval(r.appendToBody);(void 0!==v?v:t.appendToBody)&&(c.$watch("$select.open",function(e){e?p():h()}),c.$on("$destroy",function(){h()}));var m=null,$="",b=null,w="direction-up";c.$watch("$select.open",function(){"auto"!==g.dropdownPosition&&"up"!==g.dropdownPosition||c.calculateDropdownPos()});var y=function(e,t){e=e||i(a),t=t||i(b),b[0].style.position="absolute",b[0].style.top=t.height*-1+"px",a.addClass(w)},x=function(e,t){a.removeClass(w),e=e||i(a),t=t||i(b),b[0].style.position="",b[0].style.top=""},E=function(){l(function(){if("up"===g.dropdownPosition)y();else{a.removeClass(w);var t=i(a),s=i(b),c=e[0].documentElement.scrollTop||e[0].body.scrollTop;t.top+t.height+s.height>c+e[0].documentElement.clientHeight?y(t,s):x(t,s)}b[0].style.opacity=1})},S=!1;c.calculateDropdownPos=function(){if(g.open){if(b=angular.element(a).querySelectorAll(".ui-select-dropdown"),0===b.length)return;if(""!==g.search||S||(b[0].style.opacity=0,S=!0),!i(b).height&&g.$animate&&g.$animate.on&&g.$animate.enabled(b)){var e=!0;g.$animate.on("enter",b,function(t,s){"close"===s&&e&&(E(),e=!1)})}else E()}else{if(null===b||0===b.length)return;b[0].style.opacity=0,b[0].style.position="",b[0].style.top="",a.removeClass(w)}}}}}}]),i.directive("uiSelectMatch",["uiSelectConfig",function(e){function t(e,t){return e[0].hasAttribute(t)?e.attr(t):e[0].hasAttribute("data-"+t)?e.attr("data-"+t):e[0].hasAttribute("x-"+t)?e.attr("x-"+t):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(s){s.addClass("ui-select-match");var i=s.parent(),c=t(i,"theme")||e.theme,n=angular.isDefined(t(i,"multiple"));return c+(n?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,s,i,c){function n(e){c.allowClear=!!angular.isDefined(e)&&(""===e||"true"===e.toLowerCase())}c.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){c.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",n),n(i.allowClear),c.multiple&&c.sizeSearchInput()}}}]),i.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(s,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var s,i=this,c=e.$select;angular.isUndefined(c.selected)&&(c.selected=[]),e.$evalAsync(function(){s=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){s.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){c.refreshItems&&c.refreshItems(),c.sizeSearchInput&&c.sizeSearchInput()},i.removeChoice=function(s){if(c.isLocked(null,s))return!1;var n=c.selected[s],l={};return l[c.parserResult.itemName]=n,c.selected.splice(s,1),i.activeMatchIndex=-1,c.sizeSearchInput(),t(function(){c.onRemoveCallback(e,{$item:n,$model:c.parserResult.modelMapper(e,l)})}),i.updateModel(),!0},i.getPlaceholder=function(){if(!c.selected||!c.selected.length)return c.placeholder}}],controllerAs:"$selectMultiple",link:function(c,n,l,a){function r(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function o(e){function s(){switch(e){case t.LEFT:return~g.activeMatchIndex?u:l;case t.RIGHT:return~g.activeMatchIndex&&a!==l?o:(p.activate(),!1);case t.BACKSPACE:return~g.activeMatchIndex?g.removeChoice(a)?u:a:l;case t.DELETE:return!!~g.activeMatchIndex&&(g.removeChoice(g.activeMatchIndex),a)}}var i=r(p.searchInput[0]),c=p.selected.length,n=0,l=c-1,a=g.activeMatchIndex,o=g.activeMatchIndex+1,u=g.activeMatchIndex-1,d=a;return!(i>0||p.search.length&&e==t.RIGHT
vendor: 8,345 bytes, line 27
27||(p.close(),d=s(),p.selected.length&&d!==!1?g.activeMatchIndex=Math.min(l,Math.max(n,d)):g.activeMatchIndex=-1,0))}function u(e){if(void 0===e||void 0===p.search)return!1;var t=e.filter(function(e){return void 0!==p.search.toUpperCase()&&void 0!==e&&e.toUpperCase()===p.search.toUpperCase()}).length>0;return t}function d(e,t){var s=-1;if(angular.isArray(e))for(var i=angular.copy(e),c=0;c<i.length;c++)if(void 0===p.tagging.fct)i[c]+" "+p.taggingLabel===t&&(s=c);else{var n=i[c];angular.isObject(n)&&(n.isTag=!0),angular.equals(n,t)&&(s=c)}return s}var p=a[0],h=c.ngModel=a[1],g=c.$selectMultiple;p.multiple=!0,p.focusInput=p.searchInput,h.$isEmpty=function(e){return!e||0===e.length},h.$parsers.unshift(function(){for(var e,t={},s=[],i=p.selected.length-1;i>=0;i--)t={},t[p.parserResult.itemName]=p.selected[i],e=p.parserResult.modelMapper(c,t),s.unshift(e);return s}),h.$formatters.unshift(function(e){var t,s=p.parserResult&&p.parserResult.source(c,{$select:{search:""}}),i={};if(!s)return e;var n=[],l=function(e,s){if(e&&e.length){for(var l=e.length-1;l>=0;l--){if(i[p.parserResult.itemName]=e[l],t=p.parserResult.modelMapper(c,i),p.parserResult.trackByExp){var a=/(\w*)\./.exec(p.parserResult.trackByExp),r=/\.([^\s]+)/.exec(p.parserResult.trackByExp);if(a&&a.length>0&&a[1]==p.parserResult.itemName&&r&&r.length>0&&t[r[1]]==s[r[1]])return n.unshift(e[l]),!0}if(angular.equals(t,s))return n.unshift(e[l]),!0}return!1}};if(!e)return n;for(var a=e.length-1;a>=0;a--)l(p.selected,e[a])||l(s,e[a])||n.unshift(e[a]);return n}),c.$watchCollection(function(){return h.$modelValue},function(e,t){t!=e&&(angular.isDefined(h.$modelValue)&&(h.$modelValue=null),g.refreshComponent())}),h.$render=function(){if(!angular.isArray(h.$viewValue)){if(!e(h.$viewValue))throw s("multiarr","Expected model value to be array but got '{0}'",h.$viewValue);h.$viewValue=[]}p.selected=h.$viewValue,g.refreshComponent(),c.$evalAsync()},c.$on("uis:select",function(e,t){if(!(p.selected.length>=p.limit)){p.selected.push(t);var s={};s[p.parserResult.itemName]=t,i(function(){p.onSelectCallback(c,{$item:t,$model:p.parserResult.modelMapper(c,s)})}),g.updateModel()}}),c.$on("uis:activate",function(){g.activeMatchIndex=-1}),c.$watch("$select.disabled",function(e,t){t&&!e&&p.sizeSearchInput()}),p.searchInput.on("keydown",function(e){var s=e.which;c.$apply(function(){var i=!1;t.isHorizontalMovement(s)&&(i=o(s)),i&&s!=t.TAB&&(e.preventDefault(),e.stopPropagation())})}),p.searchInput.on("keyup",function(e){if(t.isVerticalMovement(e.which)||c.$evalAsync(function(){p.activeIndex=p.taggingLabel===!1?-1:0}),p.tagging.isActivated&&p.search.length>0){if(e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||t.isVerticalMovement(e.which))return;if(p.activeIndex=p.taggingLabel===!1?-1:0,p.taggingLabel===!1)return;var s,i,n,l,a=angular.copy(p.items),r=angular.copy(p.items),o=!1,h=-1;if(void 0!==p.tagging.fct){if(n=p.$filter("filter")(a,{isTag:!0}),n.length>0&&(l=n[0]),a.length>0&&l&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=p.tagging.fct(p.search),r.some(function(e){return angular.equals(e,s)})||p.selected.some(function(e){return angular.equals(e,s)}))return void c.$evalAsync(function(){p.activeIndex=0,p.items=a});s&&(s.isTag=!0)}else{if(n=p.$filter("filter")(a,function(e){return e.match(p.taggingLabel)}),n.length>0&&(l=n[0]),i=a[0],void 0!==i&&a.length>0&&l&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=p.search+" "+p.taggingLabel,d(p.selected,p.search)>-1)return;if(u(r.concat(p.selected)))return void(o&&(a=r,c.$evalAsync(function(){p.activeIndex=0,p.items=a})));if(u(r))return void(o&&(p.items=r.slice(1,r.length)))}o&&(h=d(p.selected,s)),h>-1?a=a.slice(h+1,a.length-1):(a=[],s&&a.push(s),a=a.concat(r)),c.$evalAsync(function(){if(p.activeIndex=0,p.items=a,p.isGrouped){var e=s?a.slice(1):a;p.setItemsFn(e),s&&(p.items.unshift(s),p.groups.unshift({name:"",items:[s],tagging:!0}))}})}}),p.searchInput.on("blur",function(){i(function(){g.activeMatchIndex=-1})})}}}]),i.directive("uiSelectNoChoice",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-no-choice");var s=t.parent().attr("theme")||e.theme;return s+"/no-choice.tpl.html"}}}]),i.directive("uiSelectSingle",["$timeout","$compile",function(s,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(c,n,l,a){var r=a[0],o=a[1];o.$parsers.unshift(function(t){if(e(t))return t;var s,i={};return i[r.parserResult.itemName]=t,s=r.parserResult.modelMapper(c,i)}),o.$formatters.unshift(function(t){if(e(t))return t;var s,i=r.parserResult&&r.parserResult.source(c,{$select:{search:""}}),n={};if(i){var l=function(e){return n[r.parserResult.itemName]=e,s=r.parserResult.modelMapper(c,n),s===t};if(r.selected&&l(r.selected))return r.selected;for(var a=i.length-1;a>=0;a--)if(l(i[a]))return i[a]}return t}),c.$watch("$select.selected",function(e){o.$viewValue!==e&&o.$setViewValue(e)}),o.$render=function(){r.selected=o.$viewValue},c.$on("uis:select",function(t,i){r.selected=i;var n={};n[r.parserResult.itemName]=i,s(function(){r.onSelectCallback(c,{$item:i,$model:e(i)?i:r.parserResult.modelMapper(c,n)})})}),c.$on("uis:close",function(e,t){s(function(){r.focusser.prop("disabled",!1),t||r.focusser[0].focus()},0,!1)}),c.$on("uis:activate",function(){u.prop("disabled",!0)});var u=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />");i(u)(c),r.focusser=u,r.focusInput=u,n.parent().append(u),u.bind("focus",function(){c.$evalAsync(function(){r.focus=!0})}),u.bind("blur",function(){c.$evalAsync(function(){r.focus=!1})}),u.bind("keydown",function(e){return e.which===t.BACKSPACE&&r.backspaceReset!==!1?(e.preventDefault(),e.stopPropagation(),r.select(void 0),void c.$apply()):void(e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||(e.which!=t.DOWN&&e.which!=t.UP&&e.which!=t.ENTER&&e.which!=t.SPACE||(e.preventDefault(),e.stopPropagation(),r.activate()),c.$digest()))}),u.bind("keyup input",function(e){e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||e.which==t.ENTER||e.which===t.BACKSPACE||(r.activate(u.val()),u.val(""),c.$digest())})}}}]),i.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,s){return{require:["^^uiSelect","^ngModel"],link:function(t,i,c,n){if(null===t[c.uiSelectSort])throw s("sort","Expected a list to sort");var l=n[0],a=n[1],r=angular.extend({axis:"horizontal"},t.$eval(c.uiSelectSortOptions)),o=r.axis,u="dragging",d="dropping",p="dropping-before",h="dropping-after";t.$watch(function(){return l.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass(u),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text",t.$index.toString())}),i.on("dragend",function(){v(u)});var g,f=function(e,t){this.splice(t,0,this.splice(e,1)[0])},v=function(e){angular.forEach(l.$element.querySelectorAll("."+e),function(t){angular.element(t).removeClass(e)})},m=function(e){e.preventDefault();var t="vertical"===o?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0);t<this["vertical"===o?"offsetHeight":"offsetWidth"]/2?(v(h),i.addClass(p)):(v(p),i.addClass(h))},$=function(t){t.preventDefault();var s=parseInt((t.dataTransfer||t.originalEvent.dataTransfer).getData("text"),10);e.cancel(g),g=e(function(){b(s)},20)},b=function(e){var s=t.$eval(c.uiSelectSort),n=s[e],l=null;l=i.hasClass(p)?e<t.$index?t.$index-1:t.$index:e<t.$index?t.$index:t.$index+1,f.apply(s,[e,l]),a.$setViewValue(Date.now()),t.$apply(function(){t.$emit("uiSelectSort:change",{array:s,item:n,from:e,to:l})}),v(d),v(p),v(h),i.off("drop",$)};i.on("dragenter",function(){i.hasClass(u)||(i.addClass(d),i.on("dragover",m),i.on("drop",$))}),i.on("dragleave",function(e){e.target==i&&(v(d),v(p),v(h),i.off("dragover",m),i.off("drop",$))})}}}]),i.directive("uisOpenClose",["$parse","$timeout",function(e,t){return{restrict:"A",require:"uiSelect",link:function(s,i,c,n){n.onOpenCloseCallback=e(c.uisOpenClose),s.$watch("$select.open",function(e,i){e!==i&&t(function(){n.onOpenCloseCallback(s,{isOpen:e})});
vendor: 13,065 bytes, line 28
28})}}}]),i.service("uisRepeatParser",["uiSelectMinErr","$parse",function(e,t){var s=this;s.parse=function(s){var i;if(i=s.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),!i)throw e("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",s);var c=i[5],n="";if(i[3]){c=i[5].replace(/(^\()|(\)$)/g,"");var l=i[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);l&&l[1].trim()&&(n=l[1],c=c.replace(n,""))}return{itemName:i[4]||i[2],keyName:i[3],source:t(c),filters:n,trackByExp:i[6],modelMapper:t(i[1]||i[4]||i[2]),repeatExpression:function(e){var t=this.itemName+" in "+(e?"$group.items":"$select.items");return this.trackByExp&&(t+=" track by "+this.trackByExp),t}}},s.getGroupNgRepeatExpression=function(){return"$group in $select.groups track by $group.name"}}])}(),angular.module("ui.select").run(["$templateCache",function(e){e.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" ng-show="$select.open && $select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div><div ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><span class="ui-select-choices-row-inner"></span></div></li></ul>'),e.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected track by $index"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)"> ×</span> <span uis-transclude-append=""></span></span></span></span>'),e.put("bootstrap/match.tpl.html",'<div class="ui-select-match" ng-hide="$select.open && $select.searchEnabled" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"></i></a></span></div>'),e.put("bootstrap/no-choice.tpl.html",'<ul class="ui-select-no-choice dropdown-menu" ng-show="$select.items.length == 0"><li ng-transclude=""></li></ul>'),e.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-expanded="{{$select.open}}" aria-label="{{$select.baseTitle}}" ng-class="{\'spinner\': $select.refreshing}" ondrop="return false;"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'),e.put("bootstrap/select.tpl.html",'<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><span ng-show="$select.open && $select.refreshing && $select.spinnerEnabled" class="ui-select-refreshing {{$select.spinnerClass}}"></span> <input type="search" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" class="form-control ui-select-search" ng-class="{ \'ui-select-search-hidden\' : !$select.searchEnabled }" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.open"><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'),e.put("select2/choices.tpl.html",'<ul tabindex="-1" class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"></div><ul id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'),e.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected track by $index" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a></li></span>'),e.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"></abbr> <span class="select2-arrow ui-select-toggle"><b></b></span></a>'),e.put("select2/no-choice.tpl.html",'<div class="ui-select-no-choice dropdown" ng-show="$select.items.length == 0"><div class="dropdown-content"><div data-selectable="" ng-transclude=""></div></div></div>'),e.put("select2/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"></li></ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open || $select.items.length === 0}"><div class="ui-select-choices"></div></div></div>'),e.put("select2/select.tpl.html",'<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="search-container" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled, \'select2-search\':$select.searchEnabled}"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" ng-class="{\'select2-active\': $select.refreshing}" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div></div>'),e.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown" ng-class="{\'single\': !$select.multiple, \'multi\': $select.multiple}"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"></div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'),e.put("selectize/match-multiple.tpl.html",'<div class="ui-select-match" data-value="" ng-repeat="$item in $select.selected track by $index" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'active\':$selectMultiple.activeMatchIndex === $index}" ui-select-sort="$select.selected"><span class="ui-select-match-item" ng-class="{\'select-locked\':$select.isLocked(this, $index)}"><span uis-transclude-append=""></span> <span class="remove ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">×</span></span></div>'),e.put("selectize/match.tpl.html",'<div ng-hide="$select.searchEnabled && ($select.open || $select.isEmpty())" class="ui-select-match"><span ng-show="!$select.searchEnabled && ($select.isEmpty() || $select.open)" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty() || $select.open" ng-transclude=""></span></div>'),e.put("selectize/no-choice.tpl.html",'<div class="ui-select-no-choice selectize-dropdown" ng-show="$select.items.length == 0"><div class="selectize-dropdown-content"><div data-selectable="" ng-transclude=""></div></div></div>'),e.put("selectize/select-multiple.tpl.html",'<div class="ui-select-container selectize-control multi plugin-remove_button" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()"><div class="ui-select-match"></div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled}" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-model="$select.search" ng-disabled="$select.disabled" aria-expanded="{{$select.open}}" aria-label="{{ $select.baseTitle }}" ondrop="return false;"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'),e.put("selectize/select.tpl.html",'<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()"><div class="ui-select-match"></div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled}" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.isEmpty() && !$select.open" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>')}]);
vendor: 1,591 bytes, lines 28-29
28 29!function(t,e,i,r){var n=t(e);t.fn.lazyload=function(o){function a(){var e=0;l.each(function(){var i=t(this);if(!h.skip_invisible||i.is(":visible"))if(t.abovethetop(this,h)||t.leftofbegin(this,h));else if(t.belowthefold(this,h)||t.rightoffold(this,h)){if(++e>h.failure_limit)return!1}else i.trigger("appear"),e=0})}var f,l=this,h={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:e,data_attribute:"original",skip_invisible:!0,appear:null,fail_attribute:"fail",load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return o&&(r!==o.failurelimit&&(o.failure_limit=o.failurelimit,delete o.failurelimit),r!==o.effectspeed&&(o.effect_speed=o.effectspeed,delete o.effectspeed),t.extend(h,o)),f=h.container===r||h.container===e?n:t(h.container),0===h.event.indexOf("scroll")&&f.bind(h.event,function(){return a()}),this.each(function(){var e=this,i=t(e);e.loaded=!1,i.attr("src")!==r&&i.attr("src")!==!1||i.is("img")&&i.attr("src",h.placeholder),i.one("appear",function(){if(!this.loaded){if(h.appear){var r=l.length;h.appear.call(e,r,h)}t("<img />").bind("load",function(){var r=i.attr("data-"+h.data_attribute);i.hide(),i.is("img")?i.attr("src",r):i.css("background-image","url('"+r+"')"),i[h.effect](h.effect_speed),e.loaded=!0;var n=t.grep(l,function(t){return!t.loaded});if(l=t(n),h.load){var o=l.length;h.load.call(e,o,h)}}).attr("src",i.attr("data-"+h.data_attribute)).error(function(){var t=i.data(h.fail_attribute);
29null!=t&&t.length?i.attr("src",t).error(function(){h.failimage.length&&i.attr("src",h.failimage)}):h.failimage.length&&i.attr("src",h.failimage)})}}),0!==h.event.indexOf("scroll")&&i.bind(h.event,function(){e.loaded||i.trigger("appear")})}),n.bind("resize",function(){a()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&n.bind("pageshow",function(e){e.originalEvent&&e.originalEvent.persisted&&l.each(function(){t(this).trigger("appear")})}),t(i).ready(function(){a()}),this},t.belowthefold=function(i,o){var a;return a=o.container===r||o.container===e?(e.innerHeight?e.innerHeight:n.height())+n.scrollTop():t(o.container).offset().top+t(o.container).height(),a<=t(i).offset().top-o.threshold},t.rightoffold=function(i,o){var a;return a=o.container===r||o.container===e?n.width()+n.scrollLeft():t(o.container).offset().left+t(o.container).width(),a<=t(i).offset().left-o.threshold},t.abovethetop=function(i,o){var a;return a=o.container===r||o.container===e?n.scrollTop():t(o.container).offset().top,a>=t(i).offset().top+o.threshold+t(i).height()},t.leftofbegin=function(i,o){var a;return a=o.container===r||o.container===e?n.scrollLeft():t(o.container).offset().left,a>=t(i).offset().left+o.threshold+t(i).width()},t.inviewport=function(e,i){return!(t.rightoffold(e,i)||t.leftofbegin(e,i)||t.belowthefold(e,i)||t.abovethetop(e,i))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document); 30!function(e,t){var o=t.isDefined,r=t.isUndefined,n=t.isNumber,i=t.isObject,a=t.isArray,c=t.extend,s=t.toJson;t.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls",this.storageType="localStorage",this.cookie={expiry:30,path:"/"},this.defaultToCookie=!0,this.notify={setItem:!0,removeItem:!1},this.setPrefix=function(e){return this.prefix=e,this},this.setStorageType=function(e){return this.storageType=e,this},this.setDefaultToCookie=function(e){return this.defaultToCookie=!!e,this},this.setStorageCookie=function(e,t){return this.cookie.expiry=e,this.cookie.path=t,this},this.setStorageCookieDomain=function(e){return this.cookie.domain=e,this},this.setNotify=function(e,t){return this.notify={setItem:e,removeItem:t},this},this.$get=["$rootScope","$window","$document","$parse","$timeout",function(e,t,u,l,g){function f(o){if(o||(o=t.event),p.setItem&&k(o.key)){var r=v(o.key);g(function(){e.$broadcast("LocalStorageModule.notification.changed",{key:r,newvalue:o.newValue,storageType:h.storageType})})}}var d,h=this,T=h.prefix,m=h.cookie,p=h.notify,S=h.storageType;u?u[0]&&(u=u[0]):u=document,"."!==T.substr(-1)&&(T=T?T+".":"");var y=function(e){return T+e},v=function(e){return e.replace(new RegExp("^"+T,"g"),"")},k=function(e){return 0===e.indexOf(T)},O=function(){try{var o=S in t&&null!==t[S],r=y("__"+Math.round(1e7*Math.random()));return o&&(d=t[S],d.setItem(r,""),d.removeItem(r)),o}catch(n){return h.defaultToCookie&&(S="cookie"),e.$broadcast("LocalStorageModule.notification.error",n.message),!1}},b=O(),L=function(t,o,n){if(P(n),o=r(o)?null:s(o),!b&&h.defaultToCookie||"cookie"===h.storageType)return b||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),p.setItem&&e.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:o,storageType:"cookie"}),C(t,o);try{d&&d.setItem(y(t),o),p.setItem&&e.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:o,storageType:h.storageType})}catch(i){return e.$broadcast("LocalStorageModule.notification.error",i.message),C(t,o)}return!0},$=function(t,o){if(P(o),!b&&h.defaultToCookie||"cookie"===h.storageType)return b||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),_(t);var r=d?d.getItem(y(t)):null;if(!r||"null"===r)return null;try{return JSON.parse(r)}catch(n){return r}},M=function(){var t=0;arguments.length>=1&&("localStorage"===arguments[arguments.length-1]||"sessionStorage"===arguments[arguments.length-1])&&(t=1,P(arguments[arguments.length-1]));var o,r;for(o=0;o<arguments.length-t;o++)if(r=arguments[o],!b&&h.defaultToCookie||"cookie"===h.storageType)b||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),p.removeItem&&e.$broadcast("LocalStorageModule.notification.removeitem",{key:r,storageType:"cookie"}),R(r);else try{d.removeItem(y(r)),p.removeItem&&e.$broadcast("LocalStorageModule.notification.removeitem",{key:r,storageType:h.storageType})}catch(n){e.$broadcast("LocalStorageModule.notification.error",n.message),R(r)}},E=function(t){if(P(t),!b)return e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),[];var o=T.length,r=[];for(var n in d)if(n.substr(0,o)===T)try{r.push(n.substr(o))}catch(i){return e.$broadcast("LocalStorageModule.notification.error",i.Description),[]}return r},w=function(t,o){P(o);var r=T?new RegExp("^"+T):new RegExp,n=t?new RegExp(t):new RegExp;if(!b&&h.defaultToCookie||"cookie"===h.storageType)return b||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),I();if(!b&&!h.defaultToCookie)return!1;var i=T.length;for(var a in d)if(r.test(a)&&n.test(a.substr(i)))try{M(a.substr(i))}catch(c){return e.$broadcast("LocalStorageModule.notification.error",c.message),I()}return!0}
30,x=function(){try{return t.navigator.cookieEnabled||"cookie"in u&&(u.cookie.length>0||(u.cookie="test").indexOf.call(u.cookie,"test")>-1)}catch(o){return e.$broadcast("LocalStorageModule.notification.error",o.message),!1}}(),C=function(t,o,c){if(r(o))return!1;if((a(o)||i(o))&&(o=s(o)),!x)return e.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var l="",g=new Date,f="";if(null===o?(g.setTime(g.getTime()+-864e5),l="; expires="+g.toGMTString(),o=""):n(c)&&0!==c?(g.setTime(g.getTime()+24*c*60*60*1e3),l="; expires="+g.toGMTString()):0!==m.expiry&&(g.setTime(g.getTime()+24*m.expiry*60*60*1e3),l="; expires="+g.toGMTString()),t){var d="; path="+m.path;m.domain&&(f="; domain="+m.domain),u.cookie=y(t)+"="+encodeURIComponent(o)+l+d+f}}catch(h){return e.$broadcast("LocalStorageModule.notification.error",h.message),!1}return!0},_=function(t){if(!x)return e.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(var o=u.cookie&&u.cookie.split(";")||[],r=0;r<o.length;r++){for(var n=o[r];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(y(t)+"=")){var i=decodeURIComponent(n.substring(T.length+t.length+1,n.length));try{return JSON.parse(i)}catch(a){return i}}}return null},R=function(e){C(e,null)},I=function(){for(var e=null,t=T.length,o=u.cookie.split(";"),r=0;r<o.length;r++){for(e=o[r];" "===e.charAt(0);)e=e.substring(1,e.length);var n=e.substring(t,e.indexOf("="));R(n)}},A=function(){return S},P=function(e){return e&&S!==e&&(S=e,b=O()),b},D=function(e,t,r,n,a){n=n||t;var s=$(n,a);return null===s&&o(r)?s=r:i(s)&&i(r)&&(s=c(s,r)),l(t).assign(e,s),e.$watch(t,function(e){L(n,e,a)},i(e[t]))};b&&(t.addEventListener?t.addEventListener("storage",f,!1):t.attachEvent&&t.attachEvent("onstorage",f));var N=function(e){P(e);for(var o=0,r=t[S],n=0;n<r.length;n++)0===r.key(n).indexOf(T)&&o++;return o};return{isSupported:b,getStorageType:A,setStorageType:P,set:L,add:L,get:$,keys:E,remove:M,clearAll:w,bind:D,deriveKey:y,underiveKey:v,length:N,defaultToCookie:this.defaultToCookie,cookie:{isSupported:x,set:C,add:C,get:_,remove:R,clearAll:I}}}]})}(window,window.angular);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.