From bb4c1b511298a746b5ee2d4b951720aa144a3047 2019-03-09 23:03:29 From: Marcin Lulek Date: 2019-03-09 23:03:29 Subject: [PATCH] frontend: angular 1.7.7 --- diff --git a/backend/src/appenlight/static/js/appenlight.js b/backend/src/appenlight/static/js/appenlight.js index 7f08bf1..768831e 100644 --- a/backend/src/appenlight/static/js/appenlight.js +++ b/backend/src/appenlight/static/js/appenlight.js @@ -1343,417 +1343,458 @@ }).call(this); ;/* - AngularJS v1.5.5 - (c) 2010-2016 Google, Inc. http://angularjs.org + AngularJS v1.7.7 + (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ -(function(v){'use strict';function O(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.5/"+(a?a+"/":"")+b;for(b=1;b").append(a).html();try{return a[0].nodeType===Ma?P(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+P(b)})}catch(c){return P(d)}} -function wc(a){try{return decodeURIComponent(a)}catch(b){}}function xc(a){var b={};q((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),x(e)&&(f=x(f)?wc(f):!0,ua.call(b,e)?K(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Rb(a){var b=[];q(a,function(a,c){K(a)?q(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""} -function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function de(a,b){var d,c,e=Na.length;for(c=0;c/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]); -b.unshift("ng");c=bb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;v&&e.test(v.name)&&(d.debugInfoEnabled=!0,v.name=v.name.replace(e,""));if(v&&!f.test(v.name))return c();v.name=v.name.replace(f,"");ea.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};E(ea.resumeDeferredBootstrap)&&ea.resumeDeferredBootstrap()}function fe(){v.name= -"NG_ENABLE_DEBUG_INFO!"+v.name;v.location.reload()}function ge(a){a=ea.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(he,function(a,c){return(c?b:"")+a.toLowerCase()})}function ie(){var a;if(!Ac){var b=pb();(Z=y(b)?v.jQuery:b?v[b]:void 0)&&Z.fn.on?(B=Z,R(Z.fn,{scope:Oa.scope,isolateScope:Oa.isolateScope,controller:Oa.controller,injector:Oa.injector,inheritedData:Oa.inheritedData}),a=Z.cleanData,Z.cleanData=function(b){for(var c, -e=0,f;null!=(f=b[e]);e++)(c=Z._data(f,"events"))&&c.$destroy&&Z(f).triggerHandler("$destroy");a(b)}):B=U;ea.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Pa(a,b,d){d&&K(a)&&(a=a[a.length-1]);qb(E(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Qa(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=$a(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";q(f,function(a){e.appendChild(a)}); -return e}function Mc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)}function U(a){if(a instanceof U)return a;var b;F(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new U(a)}if(b){b=v.document;var d;a=(d=Mf.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Nc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||db(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c=Ca?!1:"function"===typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a));return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=K(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d, -a))},get:d,annotate:bb.$$annotate,has:function(b){return m.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],n=new Ra([],!0),m={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,da(b),!1)}),constant:d(function(a,b){Qa(a,"constant");m[a]=b;N[a]=b}),decorator:function(a,b){var c=r.get(a+"Provider"),d=c.$get;c.$get=function(){var a=w.invoke(d,c);return w.invoke(b,null, -{$delegate:a})}}}},r=m.$injector=h(m,function(a,b){ea.isString(b)&&l.push(b);throw Ga("unpr",l.join(" <- "));}),N={},M=h(N,function(a,b){var c=r.get(a+"Provider",b);return w.invoke(c.$get,c,void 0,a)}),w=M;m.$injectorProvider={$get:da(M)};var p=g(a),w=M.get("$injector");w.strictDi=b;q(p,function(a){a&&w.invoke(a)});return w}function We(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a, -function(a){if("a"===va(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;E(c)?c=c():Ob(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=F(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a=== -b&&""===a||Of(function(){c.$evalAsync(g)})});return g}]}function fb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;K(a)&&(a=a.join(" "));K(b)&&(b=b.join(" "));return a+" "+b}function Xf(a){F(a)&&(a=a.split(" "));var b=T();q(a,function(a){a.length&&(b[a]=!0)});return b}function Ha(a){return G(a)?a:{}}function Yf(a,b,d,c){function e(a){try{a.apply(null,za.call(arguments,1))}finally{if(M--,0===M)for(;w.length;)try{w.pop()()}catch(b){d.error(b)}}}function f(){u=null;g();h()}function g(){p=I(); -p=y(p)?null:p;pa(p,L)&&(p=L);L=p}function h(){if(t!==k.url()||H!==p)t=k.url(),H=p,q(J,function(a){a(k.url(),p)})}var k=this,l=a.location,n=a.history,m=a.setTimeout,r=a.clearTimeout,N={};k.isMock=!1;var M=0,w=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){M++};k.notifyWhenNoOutstandingRequests=function(a){0===M?a():w.push(a)};var p,H,t=l.href,z=b.find("base"),u=null,I=c.history?function(){try{return n.state}catch(a){}}:C;g();H=p;k.url=function(b,d,e){y(e)&&(e=null);l!== -a.location&&(l=a.location);n!==a.history&&(n=a.history);if(b){var f=H===e;if(t===b&&(!c.history||f))return k;var h=t&&Ia(t)===Ia(b);t=b;H=e;if(!c.history||h&&f){if(!h||u)u=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(u=b)}else n[d?"replaceState":"pushState"](e,"",b),g(),H=p;return k}return u||l.href.replace(/%27/g,"'")};k.state=function(){return p};var J=[],D=!1,L=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange", -f);D=!0}J.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=z.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;M++;c=m(function(){delete N[c];e(a)},b||0);N[c]=!0;return c};k.defer.cancel=function(a){return N[a]?(delete N[a],r(a),e(C),!0):!1}}function cf(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Yf(a,c,b,d)}]}function df(){this.$get= -function(){function a(a,c){function e(a){a!=m&&(r?r==a&&(r=a.n):r=a,f(a.n,a.p),f(a,m),m=a,m.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw O("$cacheFactory")("iid",a);var g=0,h=R({},c,{id:a}),k=T(),l=c&&c.capacity||Number.MAX_VALUE,n=T(),m=null,r=null;return b[a]={put:function(a,b){if(!y(b)){if(ll&&this.remove(r.key);return b}},get:function(a){if(l";b=na.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function A(a,b){try{a.addClass(b)}catch(c){}}function ba(a,b,c,d,e){a instanceof B||(a=B(a));for(var f=/\S+/,g=0,h=a.length;g").append(a).html())):c?Oa.clone.call(a):a;if(g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);ba.$$addScopeInfo(d,b);c&&c(d,b);l&&l(b,d,d,f);return d}}function s(a,b,c,d,e,f){function g(a, -c,d,e){var f,k,l,m,n,t,p;if(r)for(p=Array(c.length),m=0;mA.priority)break;if(v=A.scope)A.templateUrl||(G(v)?(W("new/isolated scope",D||r,A,z),D=A):W("new/isolated scope",D,A,z)),r=r||A;M=A.name;if(!ka&&(A.replace&&(A.templateUrl||A.template)||A.transclude&&!A.$$tlb)){for(v=F+1;ka=a[v++];)if(ka.transclude&&!ka.$$tlb||ka.replace&&(ka.templateUrl||ka.template)){C=!0;break}ka=!0}!A.templateUrl&&A.controller&&(v=A.controller,I=I||T(),W("'"+M+"' controller",I[M],A,z),I[M]=A);if(v=A.transclude)if(u=!0,A.$$tlb||(W("transclusion",w,A,z),w=A),"element"==v)H= -!0,t=A.priority,$=z,z=d.$$element=B(ba.$$createComment(M,d[M])),b=z[0],da(f,za.call($,0),b),$[0].$$parentNode=$[0].parentNode,s=Yb(C,$,e,t,g&&g.name,{nonTlbTranscludeDirective:w});else{var la=T();$=B(Vb(b)).contents();if(G(v)){$=[];var Y=T(),X=T();q(v,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Y[a]=b;la[b]=null;X[b]=c});q(z.contents(),function(a){var b=Y[xa(va(a))];b?(X[b]=!0,la[b]=la[b]||[],la[b].push(a)):$.push(a)});q(X,function(a,b){if(!a)throw ga("reqslot",b);});for(var Z in la)la[Z]&& -(la[Z]=Yb(C,la[Z],e))}z.empty();s=Yb(C,$,e,void 0,void 0,{needsNewScope:A.$$isolateScope||A.$$newScope});s.$$slots=la}if(A.template)if(L=!0,W("template",J,A,z),J=A,v=E(A.template)?A.template(z,d):A.template,v=ta(v),A.replace){g=A;$=Tb.test(v)?Yc(ca(A.templateNamespace,V(v))):[];b=$[0];if(1!=$.length||1!==b.nodeType)throw ga("tplrt",M,"");da(f,z,b);Ba={$attr:{}};v=x(b,[],Ba);var ea=a.splice(F+1,a.length-(F+1));(D||r)&&Zc(v,D,r);a=a.concat(v).concat(ea);U(d,Ba);Ba=a.length}else z.html(v);if(A.templateUrl)L= -!0,W("template",J,A,z),J=A,A.replace&&(g=A),n=aa(a.splice(F,a.length-F),z,d,f,u&&s,h,k,{controllerDirectives:I,newScopeDirective:r!==A&&r,newIsolateScopeDirective:D,templateDirective:J,nonTlbTranscludeDirective:w}),Ba=a.length;else if(A.compile)try{Sa=A.compile(z,d,s),E(Sa)?m(null,Sa,P,Q):Sa&&m(Sa.pre,Sa.post,P,Q)}catch(fa){c(fa,wa(z))}A.terminal&&(n.terminal=!0,t=Math.max(t,A.priority))}n.scope=r&&!0===r.scope;n.transcludeOnThisElement=u;n.templateOnThisElement=L;n.transclude=s;l.hasElementTranscludeDirective= -H;return n}function gb(a,b,c,d){var e;if(F(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw ga("ctreq",b,a);}else if(K(b))for(e=[],g=0,f=b.length;gn.priority)&&-1!=n.restrict.indexOf(g)){l&&(n=Pb(n,{$$start:l,$$end:m}));if(!n.$$bindings){var I= -n,D=n,A=n.name,J={isolateScope:null,bindToController:null};G(D.scope)&&(!0===D.bindToController?(J.bindToController=d(D.scope,A,!0),J.isolateScope={}):J.isolateScope=d(D.scope,A,!1));G(D.bindToController)&&(J.bindToController=d(D.bindToController,A,!0));if(G(J.bindToController)){var w=D.controller,z=D.controllerAs;if(!w)throw ga("noctrl",A);if(!Uc(w,z))throw ga("noident",A);}var u=I.$$bindings=J;G(u.isolateScope)&&(n.$$isolateBindings=u.isolateScope)}b.push(n);k=n}}catch(L){c(L)}}return k}function Q(b){if(e.hasOwnProperty(b))for(var c= -a.get(b+"Directive"),d=0,f=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function ea(a,b){if("srcdoc"==b)return I.HTML;var c=va(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return I.RESOURCE_URL}function fa(a,c,d,e,f){var g=ea(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===va(a))throw ga("selmulti",wa(a));c.push({priority:100,compile:function(){return{pre:function(a, -c,h){c=h.$$observers||(h.$$observers=T());if(l.test(e))throw ga("nodomevents");var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function da(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;)8===a[b].nodeType&&Zf.call(a,b,1);return a}function Uc(a, -b){if(b&&F(b))return b;if(F(a)){var d=bd.exec(a);if(d)return d[3]}}function ef(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,c){Qa(b,"controller");G(b)?R(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!G(a.$scope))throw O("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,n,m;h=!0===h;k&&F(k)&&(m=k);if(F(f)){k=f.match(bd);if(!k)throw $f("ctrlfmt",f);n=k[1];m= -m||k[3];f=a.hasOwnProperty(n)?a[n]:Bc(g.$scope,n,!0)||(b?Bc(c,n,!0):void 0);Pa(f,n,!0)}if(h)return h=(K(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),m&&e(g,m,l,n||f.name),R(function(){var a=d.invoke(f,l,g,n);a!==l&&(G(a)||E(a))&&(l=a,m&&e(g,m,l,n||f.name));return l},{instance:l,identifier:m});l=d.instantiate(f,g,n);m&&e(g,m,l,n||f.name);return l}}]}function ff(){this.$get=["$window",function(a){return B(a.document)}]}function gf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a, -arguments)}}]}function $b(a){return G(a)?fa(a)?a.toISOString():ab(a):a}function mf(){this.$get=function(){return function(a){if(!a)return"";var b=[];pc(a,function(a,c){null===a||y(a)||(K(a)?q(a,function(a){b.push(ja(c)+"="+ja($b(a)))}):b.push(ja(c)+"="+ja($b(a))))});return b.join("&")}}}function nf(){this.$get=function(){return function(a){function b(a,e,f){null===a||y(a)||(K(a)?q(a,function(a,c){b(a,e+"["+(G(a)?c:"")+"]")}):G(a)&&!fa(a)?pc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+ -"="+ja($b(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function ac(a,b){if(F(a)){var d=a.replace(ag,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(cd))||(c=(c=d.match(bg))&&cg[c[0]].test(d));c&&(a=uc(d))}}return a}function dd(a){var b=T(),d;F(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var e=P(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):G(a)&&q(a,function(a,d){var f=P(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function ed(a){var b; -return function(d){b||(b=dd(a));return d?(d=b[P(d)],void 0===d&&(d=null),d):b}}function fd(a,b,d,c){if(E(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function lf(){var a=this.defaults={transformResponse:[ac],transformRequest:[function(a){return G(a)&&"[object File]"!==ma.call(a)&&"[object Blob]"!==ma.call(a)&&"[object FormData]"!==ma.call(a)?ab(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ha(bc),put:ha(bc),patch:ha(bc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN", -paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return x(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return x(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function n(b){function c(a){var b=R({},a);b.data=fd(a.data,a.headers,a.status,f.transformResponse);a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};q(a,function(a, -e){E(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!G(b))throw O("$http")("badreq",b);if(!F(b.url))throw O("$http")("badreq",b.url);var f=R({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=R({},b.headers),f,g,h,c=R({},c.common,c[P(b.method)]);a:for(f in c){g=P(f);for(h in d)if(P(h)===g)continue a;d[f]=c[f]}return e(d,ha(b))}(b);f.method=sb(f.method);f.paramSerializer=F(f.paramSerializer)? -l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=fd(b.data,ed(d),void 0,b.transformRequest);y(e)&&q(d,function(a,b){"content-type"===P(b)&&delete d[b]});y(b.withCredentials)&&!y(a.withCredentials)&&(b.withCredentials=a.withCredentials);return m(b,e).then(c,c)},void 0],h=k.when(f);for(q(M,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=g.shift();var n=g.shift(), -h=h.then(b,n)}d?(h.success=function(a){Pa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Pa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=gd("success"),h.error=gd("error"));return h}function m(c,d){function g(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function l(a,c,d,e){function f(){m(c,a,d,e)}L&&(200<=a&&300>a?L.put(A,[a,c,dd(d), -e]):L.remove(A));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function m(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?J.resolve:J.reject)({data:a,status:b,headers:ed(d),config:c,statusText:e})}function u(a){m(a.data,a.status,ha(a.headers()),a.statusText)}function I(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var J=k.defer(),D=J.promise,L,S,M=c.headers,A=r(c.url,c.paramSerializer(c.params));n.pendingRequests.push(c);D.then(I,I);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&& -"JSONP"!==c.method||(L=G(c.cache)?c.cache:G(a.cache)?a.cache:N);L&&(S=L.get(A),x(S)?S&&E(S.then)?S.then(u,u):K(S)?m(S[1],S[0],ha(S[2]),S[3]):m(S,200,{},"OK"):L.put(A,D));y(S)&&((S=hd(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(M[c.xsrfHeaderName||a.xsrfHeaderName]=S),e(c.method,A,d,l,M,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),g(c.uploadEventHandlers)));return D}function r(a,b){0=l&&(t.resolve(p), -w(z.$$intervalId),delete g[z.$$intervalId]);H||a.$apply()},k);g[z.$$intervalId]=t;return z}var g={};f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1};return f}]}function cc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function id(a,b){var d=ra(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=X(d.port)||eg[d.protocol]||null}function jd(a,b){var d="/"!==a.charAt(0); -d&&(a="/"+a);var c=ra(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function na(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Ia(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function hb(a){return a.replace(/(#.+)|#$/,"$1")}function dc(a,b,d){this.$$html5=!0;d=d||"";id(a,this);this.$$parse=function(a){var d=na(b, -a);if(!F(d))throw Eb("ipthprfx",a,b);jd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Rb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;x(f=na(a,c))?(g=f,g=x(f=na(d,f))?b+(na("/",f)||f):a+g):x(f=na(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function ec(a,b,d){id(a,this); -this.$$parse=function(c){var e=na(a,c)||na(b,c),f;y(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",y(e)&&(a=c,this.replace())):(f=na(d,e),y(f)&&(f=e));jd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Rb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"")};this.$$parseLinkUrl= -function(b,d){return Ia(a)==Ia(b)?(this.$$parse(b),!0):!1}}function kd(a,b,d){this.$$html5=!0;ec.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Ia(c)?f=c:(g=na(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Rb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Fb(a){return function(){return this[a]}}function ld(a, -b){return function(d){if(y(d))return this[a];this[a]=b(d);this.$$compose();return this}}function qf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return x(b)?(a=b,this):a};this.html5Mode=function(a){return Da(a)?(b.enabled=a,this):G(a)?(Da(a.enabled)&&(b.enabled=a.enabled),Da(a.requireBase)&&(b.requireBase=a.requireBase),Da(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d, -c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,n;n=c.baseHref();var m=c.url(),r;if(b.enabled){if(!n&&b.requireBase)throw Eb("nobase");r=m.substring(0,m.indexOf("/",m.indexOf("//")+2))+(n||"/");n=e.history?dc:kd}else r=Ia(m),n=ec;var N=r.substr(0,Ia(r).lastIndexOf("/")+1);l=new n(r,N,"#"+a);l.$$parseLinkUrl(m,m);l.$$state=c.state(); -var q=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==va(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");G(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=ra(h.animVal).href);q.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]= -!0))}});hb(l.absUrl())!=hb(m)&&c.url(l.absUrl(),!0);var w=!0;c.onUrlChange(function(a,b){y(na(N,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=hb(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(w=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=hb(c.url()),b=hb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(w|| -m)w=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function rf(){var a=!0,b=this;this.debugEnabled=function(b){return x(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& -(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||C;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];q(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Ta(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"=== -a||"__proto__"===a)throw ca("isecfld",b);return a}function fg(a){return a+""}function sa(a,b){if(a){if(a.constructor===a)throw ca("isecfn",b);if(a.window===a)throw ca("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ca("isecdom",b);if(a===Object)throw ca("isecobj",b);}return a}function md(a,b){if(a){if(a.constructor===a)throw ca("isecfn",b);if(a===gg||a===hg||a===ig)throw ca("isecff",b);}}function Gb(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor|| -a==={}.constructor||a===[].constructor||a===Function.constructor))throw ca("isecaf",b);}function jg(a,b){return"undefined"!==typeof a?a:b}function nd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function aa(a,b){var d,c;switch(a.type){case s.Program:d=!0;q(a.body,function(a){aa(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:aa(a.argument,b);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch; -break;case s.BinaryExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:aa(a.test,b);aa(a.alternate,b);aa(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant= -!1;a.toWatch=[a];break;case s.MemberExpression:aa(a.object,b);a.computed&&aa(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];q(a.arguments,function(a){aa(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant; -a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];q(a.elements,function(a){aa(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];q(a.properties,function(a){aa(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1;a.toWatch=[];break;case s.LocalsExpression:a.constant=!1,a.toWatch=[]}}function od(a){if(1==a.length){a=a[0].expression; -var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function pd(a){return a.type===s.Identifier||a.type===s.MemberExpression}function qd(a){if(1===a.body.length&&pd(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function rd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function sd(a, -b){this.astBuilder=a;this.$filter=b}function td(a,b){this.astBuilder=a;this.$filter=b}function Hb(a){return"constructor"==a}function fc(a){return E(a.valueOf)?a.valueOf():kg.call(a)}function sf(){var a=T(),b=T(),d={"true":!0,"false":!1,"null":null,undefined:void 0},c,e;this.addLiteral=function(a,b){d[a]=b};this.setIdentifierFns=function(a,b){c=a;e=b;return this};this.$get=["$filter",function(f){function g(c,d,e){var g,k,D;e=e||H;switch(typeof c){case "string":D=c=c.trim();var q=e?b:a;g=q[D];if(!g){":"=== -c.charAt(0)&&":"===c.charAt(1)&&(k=!0,c=c.substring(2));g=e?p:w;var S=new gc(g);g=(new hc(S,f,g)).parse(c);g.constant?g.$$watchDelegate=r:k?g.$$watchDelegate=g.literal?m:n:g.inputs&&(g.$$watchDelegate=l);e&&(g=h(g));q[D]=g}return N(g,d);case "function":return N(c,d);default:return N(C,d)}}function h(a){function b(c,d,e,f){var g=H;H=!0;try{return a(c,d,e,f)}finally{H=g}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate;b.assign=h(a.assign);b.constant=a.constant;b.literal=a.literal;for(var c=0;a.inputs&& -c=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f -a)for(b in l++,f)ua.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1N&&(y=4-N,x[y]||(x[y]=[]),x[y].push({msg:E(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:k}));else if(a===c){q=!1;break a}}catch(F){f(F)}if(!(r=u.$$watchersCount&& -u.$$childHead||u!==this&&u.$$nextSibling))for(;u!==this&&!(r=u.$$nextSibling);)u=u.$parent}while(u=r);if((q||t.length)&&!N--)throw H.$$phase=null,d("infdig",b,x);}while(q||t.length);for(H.$$phase=null;z.length;)try{z.shift()()}catch(B){f(B)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===H&&h.$$applicationDestroyed();r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)N(this,this.$$listenerCount[b],b);a&&a.$$childHead== -this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=C;this.$on=this.$watch=this.$watchGroup=function(){return C};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){H.$$phase|| -t.length||h.defer(function(){t.length&&H.$digest()});t.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){z.push(a)},$apply:function(a){try{m("$apply");try{return this.$eval(a)}finally{H.$$phase=null}}catch(b){f(b)}finally{try{H.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&u.push(b);a=g(a);p()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]= -0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,N(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=$a([h],arguments,1),l,n;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(n=d.length;lCa)throw ta("iequirks");var c=ha(oa);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b}, -c.valueOf=Xa);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;q(oa,function(a,b){var d=P(b);c[cb("parse_as_"+d)]=function(b){return e(a,b)};c[cb("get_trusted_"+d)]=function(b){return f(a,b)};c[cb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function yf(){this.$get=["$window","$document",function(a,b){var d={},c=!(a.chrome&&a.chrome.app&&a.chrome.app.runtime)&&a.history&&a.history.pushState, -e=X((/android (\d+)/.exec(P((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h,k=/^(Moz|webkit|ms)(?=[A-Z])/,l=g.body&&g.body.style,n=!1,m=!1;if(l){for(var r in l)if(n=k.exec(r)){h=n[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");n=!!("transition"in l||h+"Transition"in l);m=!!("animation"in l||h+"Animation"in l);!e||n&&m||(n=F(l.webkitTransition),m=F(l.webkitAnimation))}return{history:!(!c||4>e||f),hasEvent:function(a){if("input"=== -a&&11>=Ca)return!1;if(y(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ea(),vendorPrefix:h,transitions:n,animations:m,android:e}}]}function Af(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,e){function f(g,h){f.totalPendingRequests++;F(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var k=d.defaults&&d.defaults.transformResponse;K(k)?k=k.filter(function(a){return a!==ac}):k===ac&&(k=null);return d.get(g, -R({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){b.put(g,a.data);return a.data},function(a){if(!h)throw mg("tpload",g,a.status,a.statusText);return c.reject(a)})}f.totalPendingRequests=0;return f}]}function Bf(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=ea.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+ -vd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;hc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)==jc;e++);if(e==(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)==jc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Fd&&(d=d.splice(0,Fd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ug(a,b,d,c){var e=a.d,f=e.length-a.i;b=y(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fh;)k.unshift(0),h++;0=b.lgSize&&h.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);f.length&&(k+=c+f.join(""));e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Ib(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12==d&&(f=12);return Ib(f,b,c,e)}}function ib(a,b,d){return function(c,e){var f=c["get"+a](),g=sb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Gd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Hd(a){return function(b){var d=Gd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ib(b,a)}}function kc(a,b){return 0>=a.getFullYear()? -b.ERAS[0]:b.ERAS[1]}function Ad(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=X(b[9]+b[10]),g=X(b[9]+b[11]));h.call(a,X(b[1]),X(b[2])-1,X(b[3]));f=X(b[4]||0)-f;g=X(b[5]||0)-g;h=X(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",h= -[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;F(c)&&(c=vg.test(c)?X(c):b(c));Q(c)&&(c=new Date(c));if(!fa(c)||!isFinite(c.getTime()))return c;for(;d;)(l=wg.exec(d))?(h=$a(h,l,1),d=h.pop()):(h.push(d),d=null);var n=c.getTimezoneOffset();f&&(n=vc(f,n),c=Qb(c,f,!0));q(h,function(b){k=xg[b];g+=k?k(c,a.DATETIME_FORMATS,n):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function og(){return function(a,b){y(b)&&(b=2);return ab(a,b)}}function pg(){return function(a,b,d){b=Infinity=== -Math.abs(Number(b))?Number(b):X(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!K(a)&&!F(a))return a;d=!d||isNaN(d)?0:X(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Cd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Xa;if(E(b))h=b;else if(F(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h, -descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(null==a)return a;if(!ya(a))throw O("orderBy")("notarray",a);K(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"=== -c)a:{if("function"===typeof e.valueOf&&(e=e.valueOf(),d(e)))break a;if(rc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;db||37<=b&&40>=b||n(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",n)}b.on("change",l);if(Kd[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=this.validity,c=b.badInput,d=b.typeMismatch;k=f.defer(function(){k=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Lb(a,b){return function(d,c){var e,f;if(fa(d))return d;if(F(d)){'"'==d.charAt(0)&& -'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(yg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(e,function(a,c){c= -w};g.$observe("min",function(a){w=r(a);h.$validate()})}if(x(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!m(a)||y(p)||d(a)<=p};g.$observe("max",function(a){p=r(a);h.$validate()})}}}function Ld(a,b,d,c){(c.$$hasNativeValidators=G(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function Md(a,b,d,c,e){if(x(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function mc(a,b){a="ngClass"+a;return["$animate", -function(d){function c(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,Kf=/<([\w:-]+)/,Lf=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, -ia={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;var Sf=v.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Oa=U.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"=== -v.document.readyState?v.setTimeout(b):(this.on("DOMContentLoaded",b),U(v).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:Ag,sort:[].sort,splice:[].splice},Cb={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[P(a)]=a});var Sc={};q("input select option textarea button form details".split(" "),function(a){Sc[a]=!0});var ad={ngMinlength:"minlength", -ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};q({data:Wb,removeData:db,hasData:function(a){for(var b in eb[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b/,Vf=/^[^\(]*\(\s*([^\)]*)\)/m,Bg=/,/,Cg=/^\s*(_?)(\S+?)\1\s*$/,Tf=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ga=O("$injector");bb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw F(d)&&d||(d=a.name||Wf(a)),Ga("strictdi",d); -b=Tc(a);q(b[1].split(Bg),function(a){a.replace(Cg,function(a,b,d){c.push(d)})})}a.$inject=c}}else K(a)?(b=a.length-1,Pa(a[b],"fn"),c=a.slice(0,b)):Pa(a,"fn",!0);return c};var Qd=O("$animate"),Ze=function(){this.$get=C},$e=function(){var a=new Ra,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=F(b)?b.split(" "):K(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){q(b,function(b){var c=a.get(b);if(c){var d=Xf(b.attr("class")),e="",f="";q(c, -function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&zb(a,e);f&&yb(a,f)});a.remove(b)}});b.length=0}return{enabled:C,on:C,off:C,pin:C,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Xe=["$provide",function(a){var b=this;this.$$registeredAnimations= -Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Qd("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Qd("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h <= >= && || ! = |".split(" "),function(a){Mb[a]=!0});var Gg={n:"\n",f:"\f",r:"\r", -t:"\t",v:"\v","'":"'",'"':'"'},gc=function(a){this.options=a};gc.prototype={constructor:gc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a|| -"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a, -b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=x(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ca("lexerr", -a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(), -b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")): -this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=qa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:s.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression, -callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!== -this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}}, -object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},throwError:function(a,b){throw ca("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0=== -this.tokens.length)throw ca("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ca("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))? -(this.tokens.shift(),a):!1},selfReferential:{"this":{type:s.ThisExpression},$locals:{type:s.LocalsExpression}}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};aa(c,d.$filter);var e="",f;this.stage="assign";if(f=qd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=od(c.body); -d.stage="inputs";q(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext", -"ifDefined","plus","text",e))(this.$filter,Ta,sa,md,fg,Gb,jg,nd,a);this.state=this.stage=void 0;e.literal=rd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;q(this.state.filters, -function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,k=this,l,n;c=c||C;if(!f&&x(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:q(a.body,function(b,c){k.recurse(b.expression, -void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:n=this.escape(a.value);this.assign(b,n);c(n);break;case s.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});n=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,n);c(n);break;case s.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});n="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g, -0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,n);c(n);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l", -a.name)+"?l:s"),d.computed=!1,d.name=a.name);Ta(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Hb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())|| -this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){e&&1!==e&&k.addEnsureSafeAssignContext(g);if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),n=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,n),d&&(d.computed=!0,d.name=h);else{Ta(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)), -k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));n=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Hb(a.property.name))n=k.ensureSafeObject(n);k.assign(b,n);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),n=h+"("+l.join(",")+")",k.assign(b,n),c(b)):(h=k.nextId(),g={},l= -[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);q(a.arguments,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),n=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):n=h+"("+l.join(",")+")";n=k.ensureSafeObject(n);k.assign(b,n)},function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!pd(a.left))throw ca("lval"); -this.recurse(a.left,void 0,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);n=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,n);c(b||n)})},1);break;case s.ArrayExpression:l=[];q(a.elements,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(a)})});n="["+l.join(",")+"]";this.assign(b,n);c(n);break;case s.ObjectExpression:l=[];q(a.properties,function(a){k.recurse(a.value, -k.nextId(),void 0,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});n="{"+l.join(",")+"}";this.assign(b,n);c(n);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.LocalsExpression:this.assign(b,"l");c("l");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a, -"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+ -"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/[$_a-zA-Z][$_a-zA-Z0-9]*/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a), -";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g= -this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(F(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw ca("esc");},nextId:function(a, -b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};td.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;aa(c,d.$filter);var e,f;if(e=qd(c))f=this.recurse(e);e=od(c.body);var g;e&&(g=[],q(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];q(c.body,function(a){h.push(d.recurse(a.expression))});e=0===c.body.length?C:1=== -c.body.length?h[0]:function(a,b){var c;q(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=rd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right), -this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Ta(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Hb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Ta(a.property.name,f.expression), -e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],q(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var m=[],r=0;r":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f, -g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0, -name:void 0,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:void 0;b&&sa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),n,m;null!=l&&(n=b(f,g,h,k),n+="",Ta(n,e),c&&1!==c&&(Gb(l),l&&!l[n]&&(l[n]={})),m=l[n],sa(m,e));return d?{context:l,name:n,value:m}:m}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&(Gb(g), -g&&!g[b]&&(g[b]={}));h=null!=g?g[b]:void 0;(d||Hb(b))&&sa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var hc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(a,d);this.astCompiler=d.csp?new td(this.ast,b):new sd(this.ast,b)};hc.prototype={constructor:hc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var kg=Object.prototype.valueOf,ta=O("$sce"),oa={HTML:"html",CSS:"css", -URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},mg=O("$compile"),Y=v.document.createElement("a"),xd=ra(v.location.href);yd.$inject=["$document"];Jc.$inject=["$provide"];var Fd=22,Ed=".",jc="0";zd.$inject=["$locale"];Bd.$inject=["$locale"];var xg={yyyy:W("FullYear",4,0,!1,!0),yy:W("FullYear",2,0,!0,!0),y:W("FullYear",1,0,!1,!0),MMMM:ib("Month"),MMM:ib("Month",!0),MM:W("Month",2,1),M:W("Month",1,1),LLLL:ib("Month",!1,!0),dd:W("Date",2),d:W("Date",1),HH:W("Hours",2),H:W("Hours",1),hh:W("Hours",2,-12), -h:W("Hours",1,-12),mm:W("Minutes",2),m:W("Minutes",1),ss:W("Seconds",2),s:W("Seconds",1),sss:W("Milliseconds",3),EEEE:ib("Day"),EEE:ib("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ib(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},wg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, -vg=/^\-?\d+$/;Ad.$inject=["$locale"];var qg=da(P),rg=da(sb);Cd.$inject=["$parse"];var ne=da({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ma.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};q(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a, -b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});q(ad,function(a,b){tb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(zg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=xa("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"=== -ma.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ca&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Jb={$addControl:C,$$renameControl:function(a,b){a.$name=b},$removeControl:C,$setValidity:C,$setDirty:C,$setPristine:C,$setSubmitted:C};Id.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Rd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||C}return{name:"form", -restrict:a?"EAC":"E",require:["form","^^?form"],controller:Id,compile:function(d,f){d.addClass(Ua).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var m=f[0];if(!("action"in e)){var r=function(b){a.$apply(function(){m.$commitViewValue();m.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",r,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",r,!1)},0,!1)})}(f[1]||m.$$parentForm).$addControl(m);var q=g?c(m.$name):C;g&& -(q(a,m),e.$observe(g,function(b){m.$name!==b&&(q(a,void 0),m.$$parentForm.$$renameControl(m,b),q=c(m.$name),q(a,m))}));d.on("$destroy",function(){m.$$parentForm.$removeControl(m);q(a,void 0);R(m,Jb)})}}}}}]},oe=Rd(),Be=Rd(!0),yg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Hg=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ig=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i, -Jg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sd=/^(\d{4,})-(\d{2})-(\d{2})$/,Td=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,nc=/^(\d{4,})-W(\d\d)$/,Ud=/^(\d{4,})-(\d\d)$/,Vd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Kd=T();q(["date","datetime-local","month","time","week"],function(a){Kd[a]=!0});var Wd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c)},date:kb("date",Sd,Lb(Sd,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Td,Lb(Td,"yyyy MM dd HH mm ss sss".split(" ")), -"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Vd,Lb(Vd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",nc,function(a,b){if(fa(a))return a;if(F(a)){nc.lastIndex=0;var d=nc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Gd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Ud,Lb(Ud,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Ld(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName= -"number";c.$parsers.push(function(a){if(c.$isEmpty(a))return null;if(Jg.test(a))return parseFloat(a)});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(x(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||y(g)||a>=g};d.$observe("min",function(a){x(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:void 0;c.$validate()})}if(x(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||y(h)||a<=h};d.$observe("max", -function(a){x(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:void 0;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||Hg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||Ig.test(d)}},radio:function(a,b,d,c){y(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value, -a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Md(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Md(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return pa(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:C,button:C,submit:C,reset:C, -file:C},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Wd[P(g.type)]||Wd.text)(e,f,g,h[0],b,a,d,c)}}}}],Kg=/^(true|false|\d+)$/,Te=function(){return{restrict:"A",priority:100,compile:function(a,b){return Kg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},te=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b); -return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=y(a)?"":a})}}}}],ve=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=y(a)?"":a})}}}}],ue=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g= -b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Se=da({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),we=mc("",!0),ye=mc("Odd",0),xe=mc("Even",1),ze=La({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ae=[function(){return{restrict:"A",scope:!0,controller:"@", -priority:500}}],Ic={},Lg={blur:!0,focus:!0};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};Lg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var De=["$animate","$compile",function(a, -b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var h,k,l;d.$watch(e.ngIf,function(d){d?k||g(function(d,f){k=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l=rb(h.clone),a.leave(l).then(function(){l=null}),h=null))})}}}],Ee=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0, -transclude:"element",controller:ea.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,n,m,r){var q=0,s,w,p,y=function(){w&&(w.remove(),w=null);s&&(s.$destroy(),s=null);p&&(d.leave(p).then(function(){w=null}),w=p,p=null)};c.$watch(f,function(f){var n=function(){!x(h)||h&&!c.$eval(h)||b()},u=++q;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&u===q){var b=c.$new();m.template=a;a=r(b,function(a){y();d.enter(a,null,e).then(n)});s=b;p=a;s.$emit("$includeContentLoaded", -f);c.$eval(g)}},function(){c.$$destroyed||u!==q||(y(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(y(),m.template=null)})}}}}],Ve=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ma.call(d[0]).match(/SVG/)?(d.empty(),a(Lc(e.template,v.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Fe=La({priority:450,compile:function(){return{pre:function(a, -b,d){a.$eval(d.ngInit)}}}}),Re=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!y(a)){var b=[];a&&q(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(K(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",Nd="ng-invalid",Ua="ng-pristine",Kb="ng-dirty",Pd="ng-pending",lb=O("ngModel"),Mg=["$scope", -"$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=l(d.name||"",!1)(a); -this.$$parentForm=Jb;var n=e(d.ngModel),m=n.assign,r=n,s=m,v=null,w,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");r=function(a){var c=n(a);E(c)&&(c=b(a));return c};s=function(a,b){E(n(a))?f(a,{$$$p:b}):m(a,b)}}else if(!n.assign)throw lb("nonassign",d.ngModel,wa(c));};this.$render=C;this.$isEmpty=function(a){return y(a)||""===a||null===a||a!==a};this.$$updateEmptyClasses=function(a){p.$isEmpty(a)?(f.removeClass(c,"ng-not-empty"), -f.addClass(c,"ng-empty")):(f.removeClass(c,"ng-empty"),f.addClass(c,"ng-not-empty"))};var H=0;Jd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Kb);f.addClass(c,Ua)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Ua);f.addClass(c,Kb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")}; -this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:void 0,p.$modelValue!==c&&p.$$writeModelToScope())})}}; -this.$$runValidators=function(a,b,c){function d(){var c=!0;q(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(q(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!E(h.then))throw lb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},C):g(!0)}function f(a,b){h===H&&p.$setValidity(a,b)}function g(a){h===H&&c(a)}H++;var h= -H;(function(){var a=p.$$parserName||"parse";if(y(w))f(a,null);else return w||(q(p.$validators,function(a,b){f(b,null)}),q(p.$asyncValidators,function(a,b){f(b,null)})),f(a,w),w;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$updateEmptyClasses(a),p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue; -if(w=y(b)?void 0:!0)for(var c=0;ce||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=X(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};v.angular.bootstrap?v.console&&console.log("WARNING: Tried to load angular more than once."):(ie(),ke(ea),ea.module("ngLocale",[],["$provide",function(a){function b(a){a+= -"";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "), -WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, -c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(v.document).ready(function(){ee(v.document,yc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); +(function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(a)&&0c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"), +function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, +b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(//,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", +function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& +ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): +x=Y;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split("."); +for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b= +C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events, +f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0l&&this.remove(n.key);return b}},get:function(a){if(l";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}} +function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("
").append(a).html())):c?Wa.clone.call(a): +a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;mu.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller", +J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.document.createDocumentFragment();var Xa=T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(), +ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt", +Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib): +q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function W(a,b,c,d){var e;if(A(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&& +!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;gc.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController, +t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL: +"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e= +p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&& +f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b, +"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h); +a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function If(){this.$get=["$log",function(a){return function(b, +d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){this.$get=function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}): +(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&& +r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return D(a)&&"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"}, +post:ja(wc),put:ja(wc),patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;da?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!A(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam}, +b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=ub(g.method);g.paramSerializer=A(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)}); +b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a, +c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:yd(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method), +O=c.url;x?O=p.getTrustedResourceUrl(O):A(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]= +q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=gc(a.search); +b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)}; +this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))? +f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=xa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Lb(a){return function(){return this[a]}}function Dd(a, +b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer", +"$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0, +Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!A(e)||!z(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")|| +a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){xc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation= +!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&& +f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b, +arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression, +b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test, +b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e, +a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e, +a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}} +function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Nb(G), +d=(new Mb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;fa)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1r&&(z=4-r,N[z]|| +(N[z]=[]),N[z].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;JCa)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a}; +c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}}); +return c}]}function ag(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c|| +4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(a){function b(){var a=e.pop();return a&&a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e, +h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):a()}}function dg(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!A(k)|| +z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},function(a){h||(a=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a, +b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],k=0;kc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fk;)h.unshift(0),k++;0=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+h+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>= +a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c, +d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a, +b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e= +d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=hb||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity, +c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(), +ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){cf.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function nb(a,b,d,c){return function(e,f,g,k,h,l,m,p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Sc(b,ec(v)));var e=d(a, +b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a, +d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=s(a),x=a,k.$validate())})}if(w(g.max)||g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d, +c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(), +d=b.indexOf(".");return-1===d?-1a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Jc(a):0,k=e?Jc(b):0,h=f?Jc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[]; +if(!b||!b.length)return a;var c=[],d=0;a:for(;d(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"", +"
"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "), +function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,hasData:function(a){for(var b in Ka[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector"); +fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "): +H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=zg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1), +k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw je("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp? +a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb, +lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart? +this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0): +(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index< +this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index< +this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression, +operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")? +a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")): +"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(",")) +}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break; +b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}"); +return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c, +e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing= +"assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+ +d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a, +b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b, +this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left, +void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent, +b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l", +a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g, +a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant? +void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b, +a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0: +h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a, +b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}}, +not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g= +this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a, +b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c= +d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right), +this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}), +a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c= +a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}: +e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b= +this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var Ea=F("$sce"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl", +JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2), +d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}}, +fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c], +function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=wa("ng-"+a);vb[b]= +["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject= +["$element","$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&& +this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element, +Za,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==lb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ae({clazz:Pb,set:function(a, +b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ke=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue(); +p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, +sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/, +oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a); +if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(c);Sa(a,b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a), +l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||z(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||z(s)||ee(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.url=function(a,b){var d= +a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a, +c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(c.$modelValue)||(m?(a=b.val(),n=p},g("min",k));e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}: +function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},Yc=["$browser","$sniffer", +"$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&& +Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Re=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0]; +b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Se=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c); +return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), +function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=tb(k.clone), +a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1=== +a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)? +(d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)}); +c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet= +function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element, +"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched= +!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!X(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!== +c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!B(h.then))throw ob("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&& +h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(z(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!== +a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=z(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;dg||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Tb(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Tb(a)||-1,f=a,e.$validate())}); +e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6, +MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a", +shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ae(C.document,Uc)}))})(window); +!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); //# sourceMappingURL=angular.min.js.map ;/* - AngularJS v1.5.5 - (c) 2010-2016 Google, Inc. http://angularjs.org + AngularJS v1.7.7 + (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ -(function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", -["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); +(function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.7"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject= +["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular); //# sourceMappingURL=angular-cookies.min.js.map ;/* - AngularJS v1.5.5 - (c) 2010-2016 Google, Inc. http://angularjs.org + AngularJS v1.7.7 + (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ -(function(C,d){'use strict';function z(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,y){function k(){n&&(g.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=g.leave(m),n.then(function(){n=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),f=r.current;m=y(b,function(b){g.enter(b,null,m||c).then(function(){!d.isDefined(t)||t&&!a.$eval(t)||h()});k()});l=f.scope=b;l.$emit("$viewContentLoaded"); -l.$eval(u)}else k()}var l,m,n,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(d,h,g){return{restrict:"ECA",priority:-400,link:function(a,c){var b=g.current,f=b.locals;c.html(f.$template);var y=d(c.contents());if(b.controller){f.$scope=a;var k=h(b.controller,f);b.controllerAs&&(a[b.controllerAs]=k);c.data("$ngControllerController",k);c.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=f;y(a)}}}var w=d.module("ngRoute",["ng"]).provider("$route",function(){function r(a, -c){return d.extend(Object.create(a),c)}function h(a,d){var b=d.caseInsensitiveMatch,f={originalPath:a,regexp:a},g=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g,function(a,d,b,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=new RegExp("^"+a+"$",b?"i":"");return f}var g={};this.when=function(a,c){var b= -d.copy(c);d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=d.extend(b,a&&h(a,b));if(a){var f="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[f]=d.extend({redirectTo:a},h(f,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest", -"$sce",function(a,c,b,f,h,k,x){function l(b){var e=s.current;(w=(p=n())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!u)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function m(){var v=s.current,e=p;if(w)v.params=e.params,d.copy(v.params,b),a.$broadcast("$routeUpdate",v);else if(e||v)u=!1,(s.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?c.path(t(e.redirectTo,e.params)).search(e.params).replace():c.url(e.redirectTo(e.pathParams, -c.path(),c.search())).replace()),f.when(e).then(function(){if(e){var a=d.extend({},e.resolve),b,c;d.forEach(a,function(b,e){a[e]=d.isString(b)?h.get(b):h.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(c=e.templateUrl)&&(d.isFunction(c)&&(c=c(e.params)),d.isDefined(c)&&(e.loadedTemplateUrl=x.valueOf(c),b=k(c)));d.isDefined(b)&&(a.$template=b);return f.all(a)}}).then(function(c){e==s.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess", -e,v))},function(b){e==s.current&&a.$broadcast("$routeChangeError",e,v,b)})}function n(){var a,b;d.forEach(g,function(f,g){var q;if(q=!b){var h=c.path();q=f.keys;var l={};if(f.regexp)if(h=f.regexp.exec(h)){for(var k=1,n=h.length;k=a&&(a=e,e=0,b.push(f),f=[]);f.push(x.fn);x.children.forEach(function(a){e++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var I=[],q=U(a);return function(u,B,w){function x(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];r(a,function(a){var c= -a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function R(a){var b=[],c={};r(a,function(a,g){var d=D(a.element),e=0<=["enter","move"].indexOf(a.event),d=a.structural?x(d):[];if(d.length){var k=e?"to":"from";r(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][k]={animationID:g,element:G(a)}})}else b.push(a)});var d={},e={};r(c,function(c,h){var k=c.from,f=c.to;if(k&&f){var p=a[k.animationID],y=a[f.animationID],l=k.animationID.toString();if(!e[l]){var x=e[l]= -{structural:!0,beforeStart:function(){p.beforeStart();y.beforeStart()},close:function(){p.close();y.close()},classes:J(p.classes,y.classes),from:p,to:y,anchors:[]};x.classes.length?b.push(x):(b.push(p),b.push(y))}e[l].anchors.push({out:k.element,"in":f.element})}else k=k?k.animationID:f.animationID,f=k.toString(),d[f]||(d[f]=!0,b.push(a[k]))});return b}function J(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d=S&&b>=m&&(G=!0,l())}function H(){function b(){if(!R){K(!1);r(A,function(a){h.style[a[0]]=a[1]});x(a,g);e.addClass(a,da);if(n.recalculateTimingStyles){na=h.className+" "+fa;ja=q(h,na);E=w(h,na,ja);$=E.maxDelay;ha=Math.max($,0);m=E.maxDuration;if(0===m){l();return}n.hasTransitions= -0p.expectedEndTime)?z.cancel(p.timer):f.push(l)}s&&(H=z(c,H,!1),f[0]={timer:H,expectedEndTime:d},f.push(l),a.data("$$animateCss",f));if(ea.length)a.on(ea.join(" "),y);g.to&&(g.cleanupStyles&&Ia(J,h,Object.keys(g.to)),Da(a,g))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;d=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e, +H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c, +t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" "); +b=b.split(" ");for(var c=[],d=0;d=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W= +Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c= Xs', - example: 'min_duration:4.5', - tag: 'Min. duration' - }, - { - type: 'url_path', - text: 'url_path:', - 'description': 'Show reports from specific URL paths', - example: 'url_path:/foo/bar/baz', - tag: 'Url Path' - }, - { - type: 'url_domain', - text: 'url_domain:', - 'description': 'Show reports from specific domain', - example: 'url_domain:domain.com', - tag: 'Domain' - }, - { - type: 'request_id', - text: 'request_id:', - 'description': 'Show reports with specific request id', - example: "request_id:883143dc572e4c38aceae92af0ea5ae0", - tag: 'Request ID' - }, - { - type: 'report_status', - text: 'report_status:', - 'description': 'Show reports from groups with specific status', - example: 'report_status:never_reviewed', - tag: 'Status' - }, - { - type: 'server_name', - text: 'server_name:', - 'description': 'Show reports tagged with this key/value pair', - example: 'server_name:hostname', - tag: 'Tag' - }, - { - type: 'start_date', - text: 'start_date:', - 'description': 'Show reports newer than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T13:00', - tag: 'Start Date' - }, - { - type: 'end_date', - text: 'end_date:', - 'description': 'Show reports older than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T23:59', - tag: 'End Date' - } - ]; - - vm.filterTypeAhead = undefined; - vm.showDatePicker = false; - vm.aheadFilter = typeAheadTagHelper.aheadFilter; + vm.$onInit = function () { + vm.applications = stateHolder.AeUser.applications_map; + stateHolder.section = 'slow_reports'; + vm.today = function () { + vm.pickerDate = new Date(); + }; + vm.today(); + vm.reportsPage = []; + vm.page = 1; + vm.itemCount = 0; + vm.itemsPerPage = 250; + typeAheadTagHelper.tags = []; + vm.searchParams = {tags: [], page: 1, type: 'slow_report'}; + vm.is_loading = false; + vm.filterTypeAheadOptions = [ + { + type: 'view_name', + text: 'view_name:', + 'description': 'Query reports occured in specific views', + tag: 'View Name', + example: "view_name:module.foo" + }, + { + type: 'resource', + text: 'resource:', + 'description': 'Restrict resultset to application', + tag: 'Application', + example: "resource:ID" + }, + { + type: 'priority', + text: 'priority:', + 'description': 'Show reports with specific priority', + example: 'priority:8', + tag: 'Priority' + }, + { + type: 'min_occurences', + text: 'min_occurences:', + 'description': 'Show reports from groups with at least X occurences', + example: 'min_occurences:25', + tag: 'Min. occurences' + }, + { + type: 'min_duration', + text: 'min_duration:', + 'description': 'Show reports from groups with average duration >= Xs', + example: 'min_duration:4.5', + tag: 'Min. duration' + }, + { + type: 'url_path', + text: 'url_path:', + 'description': 'Show reports from specific URL paths', + example: 'url_path:/foo/bar/baz', + tag: 'Url Path' + }, + { + type: 'url_domain', + text: 'url_domain:', + 'description': 'Show reports from specific domain', + example: 'url_domain:domain.com', + tag: 'Domain' + }, + { + type: 'request_id', + text: 'request_id:', + 'description': 'Show reports with specific request id', + example: "request_id:883143dc572e4c38aceae92af0ea5ae0", + tag: 'Request ID' + }, + { + type: 'report_status', + text: 'report_status:', + 'description': 'Show reports from groups with specific status', + example: 'report_status:never_reviewed', + tag: 'Status' + }, + { + type: 'server_name', + text: 'server_name:', + 'description': 'Show reports tagged with this key/value pair', + example: 'server_name:hostname', + tag: 'Tag' + }, + { + type: 'start_date', + text: 'start_date:', + 'description': 'Show reports newer than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T13:00', + tag: 'Start Date' + }, + { + type: 'end_date', + text: 'end_date:', + 'description': 'Show reports older than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T23:59', + tag: 'End Date' + } + ]; + + vm.filterTypeAhead = undefined; + vm.showDatePicker = false; + vm.aheadFilter = typeAheadTagHelper.aheadFilter; + + vm.manualOpen = false; + vm.notRelativeTime = false; + if ($cookies.notRelativeTime) { + vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); + } + + _.each(_.range(1, 11), function (priority) { + vm.filterTypeAheadOptions.push({ + type: 'priority', + text: 'priority:' + priority.toString(), + description: 'Show entries with specific priority', + example: 'priority:' + priority, + tag: 'Priority' + }); + }); + _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { + vm.filterTypeAheadOptions.push({ + type: 'report_status', + text: 'report_status:' + status, + 'description': 'Show only reports with this status', + example: 'report_status:' + status, + tag: 'Status ' + status.toUpperCase() + }); + }); + _.each(stateHolder.AeUser.applications, function (item) { + vm.filterTypeAheadOptions.push({ + type: 'resource', + text: 'resource:' + item.resource_id + ':' + item.resource_name, + example: 'resource:' + item.resource_id, + 'tag': item.resource_name, + 'description': 'Restrict resultset to this application' + }); + }); + + //initial load + vm.refresh(); + } + vm.removeSearchTag = function (tag) { $location.search(tag.type, null); vm.refresh(); @@ -10220,45 +10336,12 @@ function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type $location.search(tag.type, tag.value); vm.refresh(); }; - vm.manualOpen = false; - vm.notRelativeTime = false; - if ($cookies.notRelativeTime) { - vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); - } vm.changeRelativeTime = function () { $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime); }; - _.each(_.range(1, 11), function (priority) { - vm.filterTypeAheadOptions.push({ - type: 'priority', - text: 'priority:' + priority.toString(), - description: 'Show entries with specific priority', - example: 'priority:' + priority, - tag: 'Priority' - }); - }); - _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { - vm.filterTypeAheadOptions.push({ - type: 'report_status', - text: 'report_status:' + status, - 'description': 'Show only reports with this status', - example: 'report_status:' + status, - tag: 'Status ' + status.toUpperCase() - }); - }); - _.each(stateHolder.AeUser.applications, function (item) { - vm.filterTypeAheadOptions.push({ - type: 'resource', - text: 'resource:' + item.resource_id + ':' + item.resource_name, - example: 'resource:' + item.resource_id, - 'tag': item.resource_name, - 'description': 'Restrict resultset to this application' - }); - }); - vm.typeAheadTag = function (event) { var text = vm.filterTypeAhead; if (_.isObject(vm.filterTypeAhead)) { @@ -10369,8 +10452,6 @@ function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type vm.fetchReports(params); }; - //initial load - vm.refresh(); } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -10396,9 +10477,11 @@ angular.module('appenlight.components.settingsView', []) SettingsViewController.$inject = ['$state', 'AeConfig']; function SettingsViewController($state, AeConfig) { - this.$state = $state; - this.AeConfig = AeConfig; - console.info('SettingsViewController'); + this.$onInit = function () { + this.$state = $state; + this.AeConfig = AeConfig; + console.info('SettingsViewController'); + } } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -10421,15 +10504,17 @@ angular.module('appenlight.components.userAlertChannelsEmailNewView', []) controller: AlertChannelsEmailController }); -AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource']; +AlertChannelsEmailController.$inject = ['$state', 'userSelfPropertyResource']; function AlertChannelsEmailController($state, userSelfPropertyResource) { var vm = this; - vm.$state = $state; - vm.loading = {email: false}; - vm.form = {}; - + vm.$onInit = function () { + var vm = this; + vm.$state = $state; + vm.loading = {email: false}; + vm.form = {}; + } vm.createChannel = function () { vm.loading.email = true; @@ -10467,75 +10552,76 @@ angular.module('appenlight.components.userAlertChannelsListView', []) controller: userAlertChannelsListViewController }); -userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource']; +userAlertChannelsListViewController.$inject = ['$state', 'userSelfPropertyResource', 'applicationsNoIdResource']; function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) { var vm = this; - vm.$state = $state; - vm.loading = {channels: true, applications: true, actions:true}; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {channels: true, applications: true, actions: true}; - vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'}, - function (data) { - vm.loading.channels = false; - }); + vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'}, + function (data) { + vm.loading.channels = false; + }); - vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'}, - function (data) { - vm.loading.actions = false; - }); + vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'}, + function (data) { + vm.loading.actions = false; + }); - vm.applications = applicationsNoIdResource.query({permission: 'view'}, - function (data) { - vm.loading.applications = false; - }); + vm.applications = applicationsNoIdResource.query({permission: 'view'}, + function (data) { + vm.loading.applications = false; + }); - var allOps = { - 'eq': 'Equal', - 'ne': 'Not equal', - 'ge': 'Greater or equal', - 'gt': 'Greater than', - 'le': 'Lesser or equal', - 'lt': 'Lesser than', - 'startswith': 'Starts with', - 'endswith': 'Ends with', - 'contains': 'Contains' - }; - - var fieldOps = {}; - fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['duration'] = ['ge', 'le']; - fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; - - var possibleFields = { - '__AND__': 'All met (composite rule)', - '__OR__': 'One met (composite rule)', - '__NOT__': 'Not met (composite rule)', - 'http_status': 'HTTP Status', - 'duration': 'Request duration', - 'group:priority': 'Group -> Priority', - 'url_domain': 'Domain', - 'url_path': 'URL Path', - 'error': 'Error', - 'tags:server_name': 'Tag -> Server name', - 'group:occurences': 'Group -> Occurences' - }; - - vm.ruleDefinitions = { - fieldOps: fieldOps, - allOps: allOps, - possibleFields: possibleFields - }; + var allOps = { + 'eq': 'Equal', + 'ne': 'Not equal', + 'ge': 'Greater or equal', + 'gt': 'Greater than', + 'le': 'Lesser or equal', + 'lt': 'Lesser than', + 'startswith': 'Starts with', + 'endswith': 'Ends with', + 'contains': 'Contains' + }; + + var fieldOps = {}; + fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['duration'] = ['ge', 'le']; + fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; + + var possibleFields = { + '__AND__': 'All met (composite rule)', + '__OR__': 'One met (composite rule)', + '__NOT__': 'Not met (composite rule)', + 'http_status': 'HTTP Status', + 'duration': 'Request duration', + 'group:priority': 'Group -> Priority', + 'url_domain': 'Domain', + 'url_path': 'URL Path', + 'error': 'Error', + 'tags:server_name': 'Tag -> Server name', + 'group:occurences': 'Group -> Occurences' + }; + vm.ruleDefinitions = { + fieldOps: fieldOps, + allOps: allOps, + possibleFields: possibleFields + }; + } vm.addAction = function (channel) { userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) { @@ -10569,7 +10655,7 @@ function userAlertChannelsListViewController($state, userSelfPropertyResource, a channel_name: channel.channel_name, channel_value: channel.channel_value }, function () { - vm.alertChannels = _.filter(vm.alertChannels, function(item){ + vm.alertChannels = _.filter(vm.alertChannels, function (item) { return item != channel; }); }); @@ -10603,16 +10689,17 @@ userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'A function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) { var vm = this; - vm.$state = $state; - vm.loading = {tokens: true}; - - vm.expireOptions = AeConfig.timeOptions; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {tokens: true}; - vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'}, - function (data) { - vm.loading.tokens = false; - }); + vm.expireOptions = AeConfig.timeOptions; + vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'}, + function (data) { + vm.loading.tokens = false; + }); + } vm.addToken = function () { vm.loading.tokens = true; userSelfPropertyResource.save({key: 'auth_tokens'}, @@ -10669,17 +10756,18 @@ UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeCon function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { var vm = this; - vm.$state = $state; - vm.AeConfig = AeConfig; - vm.loading = {identities: true}; - - vm.identities = userSelfPropertyResource.query( - {key: 'external_identities'}, - function (data) { - vm.loading.identities = false; - - }); + vm.$onInit = function () { + vm.$state = $state; + vm.AeConfig = AeConfig; + vm.loading = {identities: true}; + vm.identities = userSelfPropertyResource.query( + {key: 'external_identities'}, + function (data) { + vm.loading.identities = false; + + }); + } vm.removeProvider = function (provider) { userSelfPropertyResource.delete( @@ -10689,7 +10777,7 @@ function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { id: provider.id }, function (status) { - if (status){ + if (status) { vm.identities = _.filter(vm.identities, function (item) { return item != provider }); @@ -10724,10 +10812,11 @@ UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource']; function UserPasswordViewController($state, userSelfPropertyResource) { var vm = this; - vm.$state = $state; - vm.loading = {password: false}; - vm.form = {}; - + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {password: false}; + vm.form = {}; + } vm.updatePassword = function () { vm.loading.password = true; @@ -10771,14 +10860,15 @@ UserProfileViewController.$inject = ['$state', 'userSelfResource']; function UserProfileViewController($state, userSelfResource) { var vm = this; - vm.$state = $state; - vm.loading = {profile: true}; - - vm.user = userSelfResource.get(null, function (data) { - vm.loading.profile = false; - - }); + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {profile: true}; + vm.user = userSelfResource.get(null, function (data) { + vm.loading.profile = false; + + }); + } vm.updateProfile = function () { vm.loading.profile = true; @@ -10863,19 +10953,21 @@ BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'in function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.priorities = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.priorities = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -10894,8 +10986,7 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -10919,8 +11010,7 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -10928,7 +11018,6 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -10952,19 +11041,21 @@ GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.assignees = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.assignees = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -10975,8 +11066,7 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.loading = false; if (data.error_messages) { vm.error_messages = data.error_messages; - } - else { + } else { vm.assignees = data.assignees; vm.statuses = data.statuses; vm.form.responsible = vm.assignees[0]; @@ -10985,8 +11075,7 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -11003,15 +11092,13 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.loading = false; if (data.error_messages) { vm.error_messages = data.error_messages; - } - else { + } else { $uibModalInstance.dismiss('success'); } }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -11019,7 +11106,6 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -11043,20 +11129,22 @@ JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integra function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.priorities = []; - vm.issue_types = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.priorities = []; + vm.issue_types = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -11078,8 +11166,7 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -11103,8 +11190,7 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -11112,7 +11198,6 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -11134,22 +11219,24 @@ AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) { var vm = this; - vm.loading = true; - vm.assignedUsers = []; - vm.unAssignedUsers = []; - vm.report = report; - vm.fetchAssignments = function () { - reportGroupPropertyResource.get({ - groupId: vm.report.group_id, - key: 'assigned_users' - }, null, - function (data) { - vm.assignedUsers = data.assigned; - vm.unAssignedUsers = data.unassigned; - vm.loading = false; - }); + vm.$onInit = function () { + vm.loading = true; + vm.assignedUsers = []; + vm.unAssignedUsers = []; + vm.report = report; + vm.fetchAssignments = function () { + reportGroupPropertyResource.get({ + groupId: vm.report.group_id, + key: 'assigned_users' + }, null, + function (data) { + vm.assignedUsers = data.assigned; + vm.unAssignedUsers = data.unassigned; + vm.loading = false; + }); + } + vm.fetchAssignments(); } - vm.reassignUser = function (user) { var is_assigned = vm.assignedUsers.indexOf(user); if (is_assigned != -1) { @@ -11191,9 +11278,6 @@ function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - - vm.fetchAssignments(); - } ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors @@ -11481,64 +11565,65 @@ ApplicationPermissionsController.$inject = ['sectionViewResource', function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) { var vm = this; - vm.form = { - autocompleteUser: '', - selectedGroup: null, - selectedUserPermissions: {}, - selectedGroupPermissions: {} - } - vm.possibleGroups = groupsResource.query(null, function(){ - if (vm.possibleGroups.length > 0){ - vm.form.selectedGroup = vm.possibleGroups[0].id; - } - }); - - vm.possibleUsers = []; - _.each(vm.resource.possible_permissions, function (perm) { - vm.form.selectedUserPermissions[perm] = false; - vm.form.selectedGroupPermissions[perm] = false; - }); - - /** - * Converts the permission list into {user, permission_list objects} - * for rendering in templates - * **/ - var tmpObj = { - user: {}, - group: {} - }; - _.each(vm.currentPermissions, function (perm) { + vm.$onInit = function () { + vm.form = { + autocompleteUser: '', + selectedGroup: null, + selectedUserPermissions: {}, + selectedGroupPermissions: {} + } + vm.possibleGroups = groupsResource.query(null, function () { + if (vm.possibleGroups.length > 0) { + vm.form.selectedGroup = vm.possibleGroups[0].id; + } + }); - if (perm.type == 'user') { - if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { - tmpObj[perm.type][perm.user_name] = { - self: perm, - permissions: [] + vm.possibleUsers = []; + _.each(vm.resource.possible_permissions, function (perm) { + vm.form.selectedUserPermissions[perm] = false; + vm.form.selectedGroupPermissions[perm] = false; + }); + + /** + * Converts the permission list into {user, permission_list objects} + * for rendering in templates + * **/ + var tmpObj = { + user: {}, + group: {} + }; + _.each(vm.currentPermissions, function (perm) { + + if (perm.type == 'user') { + if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { + tmpObj[perm.type][perm.user_name] = { + self: perm, + permissions: [] + } } - } - if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) { - tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name); - } - } - else { - if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') { - tmpObj[perm.type][perm.group_name] = { - self: perm, - permissions: [] + if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) { + tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name); + } + } else { + if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') { + tmpObj[perm.type][perm.group_name] = { + self: perm, + permissions: [] + } + } + if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) { + tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name); } - } - if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) { - tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name); - } - } - }); - vm.currentPermissions = { - user: _.values(tmpObj.user), - group: _.values(tmpObj.group), - }; + } + }); + vm.currentPermissions = { + user: _.values(tmpObj.user), + group: _.values(tmpObj.group), + }; + + } - vm.searchUsers = function (searchPhrase) { @@ -11701,8 +11786,10 @@ angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig PluginConfig.$inject = ['stateHolder']; function PluginConfig(stateHolder) { - this.plugins = {}; - this.inclusions = stateHolder.plugins.inclusions[this.section]; + this.$onInit = function () { + this.plugins = {}; + this.inclusions = stateHolder.plugins.inclusions[this.section]; + } } }); @@ -11723,69 +11810,71 @@ angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig angular.module('appenlight.directives.postProcessAction', []).directive('postProcessAction', ['applicationsPropertyResource', function (applicationsPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { action: '=', resource: '=' }, - controller:postProcessActionController, - controllerAs:'ctrl', + controller: postProcessActionController, + controllerAs: 'ctrl', restrict: 'E', templateUrl: 'directives/postprocess_action/postprocess_action.html' }; - function postProcessActionController(){ - var vm = this; - - var allOps = { - 'eq': 'Equal', - 'ne': 'Not equal', - 'ge': 'Greater or equal', - 'gt': 'Greater than', - 'le': 'Lesser or equal', - 'lt': 'Lesser than', - 'startswith': 'Starts with', - 'endswith': 'Ends with', - 'contains': 'Contains' - }; - - var fieldOps = {}; - fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['duration'] = ['ge', 'le']; - fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; - var possibleFields = { - '__AND__': 'All met (composite rule)', - '__OR__': 'One met (composite rule)', - '__NOT__': 'Not met (composite rule)', - 'http_status': 'HTTP Status', - 'duration': 'Request duration', - 'group:priority': 'Group -> Priority', - 'url_domain': 'Domain', - 'url_path': 'URL Path', - 'error': 'Error', - 'tags:server_name': 'Tag -> Server name', - 'group:occurences': 'Group -> Occurences' - }; + function postProcessActionController() { + var vm = this; + vm.$onInit = function () { + + var allOps = { + 'eq': 'Equal', + 'ne': 'Not equal', + 'ge': 'Greater or equal', + 'gt': 'Greater than', + 'le': 'Lesser or equal', + 'lt': 'Lesser than', + 'startswith': 'Starts with', + 'endswith': 'Ends with', + 'contains': 'Contains' + }; - vm.ruleDefinitions = { - fieldOps: fieldOps, - allOps: allOps, - possibleFields: possibleFields - }; + var fieldOps = {}; + fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['duration'] = ['ge', 'le']; + fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; + + var possibleFields = { + '__AND__': 'All met (composite rule)', + '__OR__': 'One met (composite rule)', + '__NOT__': 'Not met (composite rule)', + 'http_status': 'HTTP Status', + 'duration': 'Request duration', + 'group:priority': 'Group -> Priority', + 'url_domain': 'Domain', + 'url_path': 'URL Path', + 'error': 'Error', + 'tags:server_name': 'Tag -> Server name', + 'group:occurences': 'Group -> Occurences' + }; - vm.possibleActions = [ - ['1', 'Priority +1'], - ['-1', 'Priority -1'] - ]; + vm.ruleDefinitions = { + fieldOps: fieldOps, + allOps: allOps, + possibleFields: possibleFields + }; + vm.possibleActions = [ + ['1', 'Priority +1'], + ['-1', 'Priority -1'] + ]; + } vm.deleteAction = function (action) { applicationsPropertyResource.remove({ pkey: vm.action.pkey, @@ -11816,7 +11905,7 @@ angular.module('appenlight.directives.postProcessAction', []).directive('postPro }); }; - vm.setDirty = function() { + vm.setDirty = function () { vm.action.dirty = true; }; @@ -11874,20 +11963,36 @@ angular.module('appenlight.directives.recursive', []).directive("recursive", fun angular.module('appenlight.directives.reportAlertAction', []).directive('reportAlertAction', ['userSelfPropertyResource', function (userSelfPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { action: '=', applications: '=', possibleChannels: '=', actions: '=', ruleDefinitions: '=' }, - controller:reportAlertActionController, - controllerAs:'ctrl', + controller: reportAlertActionController, + controllerAs: 'ctrl', restrict: 'E', templateUrl: 'directives/report_alert_action/report_alert_action.html' }; - function reportAlertActionController(){ + + function reportAlertActionController() { var vm = this; + vm.$onInit = function () { + vm.possibleNotifications = [ + ['always', 'Always'], + ['only_first', 'Only New'], + ]; + + vm.possibleChannels = _.filter(vm.possibleChannels, function (c) { + return c.supports_report_alerting + } + ); + + if (vm.possibleChannels.length > 0) { + vm.channelToBind = vm.possibleChannels[0]; + } + } vm.deleteAction = function (actions, action) { var get = { key: 'alert_channels_rules', @@ -11899,7 +12004,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }; - vm.bindChannel = function(){ + vm.bindChannel = function () { var post = { channel_pkey: vm.channelToBind.pkey, action_pkey: vm.action.pkey @@ -11916,7 +12021,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }); }; - vm.unBindChannel = function(channel){ + vm.unBindChannel = function (channel) { userSelfPropertyResource.delete({ key: 'alert_channels_actions_binds', channel_pkey: channel.pkey, @@ -11949,20 +12054,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }); }; - vm.possibleNotifications = [ - ['always', 'Always'], - ['only_first', 'Only New'], - ]; - - vm.possibleChannels = _.filter(vm.possibleChannels, function(c){ - return c.supports_report_alerting } - ); - - if (vm.possibleChannels.length > 0){ - vm.channelToBind = vm.possibleChannels[0]; - } - - vm.setDirty = function() { + vm.setDirty = function () { vm.action.dirty = true; }; @@ -11987,7 +12079,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly', ['userSelfPropertyResource', function (userSelfPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { parentObj: '=', rule: '=', ruleDefinitions: '=', @@ -11996,16 +12088,19 @@ angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly }, restrict: 'E', templateUrl: 'directives/rule_read_only/rule_read_only.html', - controller:RuleController, - controllerAs:'rule_ctrlr' + controller: RuleController, + controllerAs: 'rule_ctrlr' } - function RuleController(){ + + function RuleController() { var vm = this; - vm.readOnlyPossibleFields = {}; - var labelPairs = _.pairs(vm.parentObj.config); - _.each(labelPairs, function (entry) { - vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label; - }); + vm.$onInit = function () { + vm.readOnlyPossibleFields = {}; + var labelPairs = _.pairs(vm.parentObj.config); + _.each(labelPairs, function (entry) { + vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label; + }); + } } }]); @@ -12040,10 +12135,10 @@ angular.module('appenlight.directives.rule', []).directive('rule', function () { }; function RuleController(){ var vm = this; - - vm.rule.dirty = false; - vm.oldField = vm.rule.field; - + vm.$onInit = function () { + vm.rule.dirty = false; + vm.oldField = vm.rule.field; + } vm.add = function () { vm.rule.rules.push( {op: "eq", field: 'http_status', value: ""} diff --git a/frontend/bower.json b/frontend/bower.json index f07fe23..40b5c51 100644 --- a/frontend/bower.json +++ b/frontend/bower.json @@ -20,16 +20,16 @@ "tests" ], "dependencies": { - "angular": "1.5.5", - "angular-resource": "1.5.5", - "angular-cookies": "1.5.5", - "angular-sanitize": "1.5.5", - "angular-animate": "1.5.5", - "angular-touch": "1.5.5", - "angular-route": "1.5.5", - "angular-messages": "1.5.5", - "angular-mocks": "1.5.5", - "angular-scenario": "1.5.5", + "angular": "1.7.7", + "angular-resource": "1.7.7", + "angular-cookies": "1.7.7", + "angular-sanitize": "1.7.7", + "angular-animate": "1.7.7", + "angular-touch": "1.7.7", + "angular-route": "1.7.7", + "angular-messages": "1.7.7", + "angular-mocks": "1.7.7", + "angular-scenario": "1.7.7", "angular-bootstrap": "1.3.2", "angular-ui-router": "1.0.0-beta.3", "angular-toArrayFilter" : "1.0.1", diff --git a/frontend/package.json b/frontend/package.json index f146396..221f8cc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,8 +1,8 @@ { "name": "errormator", - "description": "JS layer for Errormator", + "description": "JS layer for AppEnlight", "devDependencies": { - "bower": "1.7.9", + "bower": "^1.8.8", "bower-requirejs": "1.2.0", "grunt": "1.0.1", "grunt-angular-templates": "1.0.4", @@ -17,9 +17,12 @@ "grunt-contrib-uglify": "1.0.1", "grunt-contrib-watch": "1.0.0", "grunt-remove-logging": "0.2.0", + "ini": "1.3.4", "karma": "0.13.22", "underscore": "1.8.3", - "yo": "1.8.4", - "ini": "1.3.4" + "yo": "1.8.4" + }, + "dependencies": { + "grunt-cli": "^1.3.2" } } diff --git a/frontend/src/components/appenlight-footer.js b/frontend/src/components/appenlight-footer.js index 9437e55..8a2f2a4 100644 --- a/frontend/src/components/appenlight-footer.js +++ b/frontend/src/components/appenlight-footer.js @@ -20,8 +20,11 @@ angular.module('appenlight.components.appenlightHeader', []) ChannelstreamController.$inject = ['stateHolder', 'AeConfig']; -function AppEnlightFooterController(stateHolder, AeConfig){ +function AppEnlightFooterController(stateHolder, AeConfig) { var vm = this; - vm.AeConfig = AeConfig; - vm.stateHolder = stateHolder; + + vm.$onInit = function () { + vm.AeConfig = AeConfig; + vm.stateHolder = stateHolder; + } } diff --git a/frontend/src/components/appenlight-header/appenlight-header.js b/frontend/src/components/appenlight-header/appenlight-header.js index 73ec03f..6902ab0 100644 --- a/frontend/src/components/appenlight-header/appenlight-header.js +++ b/frontend/src/components/appenlight-header/appenlight-header.js @@ -20,33 +20,36 @@ angular.module('appenlight.components.appenlightHeader', []) ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig']; -function AppEnlightHeaderController($state, stateHolder, AeConfig){ +function AppEnlightHeaderController($state, stateHolder, AeConfig) { var vm = this; - vm.AeConfig = AeConfig; - vm.stateHolder = stateHolder; - vm.assignedReports = stateHolder.AeUser.assigned_reports; - vm.latestEvents = stateHolder.AeUser.latest_events; - vm.activeEvents = 0; - _.each(vm.latestEvents, function (event) { - if (event.status === 1 && event.end_date === null) { - vm.activeEvents += 1; - } - }); - vm.clickedEvent = function(event){ + vm.$onInit = function () { + + vm.AeConfig = AeConfig; + vm.stateHolder = stateHolder; + vm.assignedReports = stateHolder.AeUser.assigned_reports; + vm.latestEvents = stateHolder.AeUser.latest_events; + vm.activeEvents = 0; + _.each(vm.latestEvents, function (event) { + if (event.status === 1 && event.end_date === null) { + vm.activeEvents += 1; + } + }); + } + + vm.clickedEvent = function (event) { // exception reports - if (_.contains([1,2], event.event_type)){ - $state.go('report.list', {resource:event.resource_id, start_date:event.start_date}); + if (_.contains([1, 2], event.event_type)) { + $state.go('report.list', {resource: event.resource_id, start_date: event.start_date}); } // slowness reports - else if (_.contains([3,4], event.event_type)){ - $state.go('report.list_slow', {resource:event.resource_id, start_date:event.start_date}); + else if (_.contains([3, 4], event.event_type)) { + $state.go('report.list_slow', {resource: event.resource_id, start_date: event.start_date}); } // uptime reports - else if (_.contains([7,8], event.event_type)){ - $state.go('uptime', {resource:event.resource_id, start_date:event.start_date}); - } - else{ + else if (_.contains([7, 8], event.event_type)) { + $state.go('uptime', {resource: event.resource_id, start_date: event.start_date}); + } else { console.log('other'); } } diff --git a/frontend/src/components/views/admin-applications-list-view/admin-applications-list-view.js b/frontend/src/components/views/admin-applications-list-view/admin-applications-list-view.js index 345b308..209cd0f 100644 --- a/frontend/src/components/views/admin-applications-list-view/admin-applications-list-view.js +++ b/frontend/src/components/views/admin-applications-list-view/admin-applications-list-view.js @@ -23,12 +23,14 @@ AdminApplicationsListController.$inject = ['applicationsResource']; function AdminApplicationsListController(applicationsResource) { console.debug('AdminApplicationsListController'); var vm = this; - vm.loading = {applications: true}; + vm.$onInit = function () { + vm.loading = {applications: true}; - vm.applications = applicationsResource.query({ - root_list: true, - resource_type: 'application' - }, function (data) { - vm.loading = {applications: false}; - }); + vm.applications = applicationsResource.query({ + root_list: true, + resource_type: 'application' + }, function (data) { + vm.loading = {applications: false}; + }); + } }; diff --git a/frontend/src/components/views/admin-configuration-view/admin-configuration-view.js b/frontend/src/components/views/admin-configuration-view/admin-configuration-view.js index 3150fc3..7803408 100644 --- a/frontend/src/components/views/admin-configuration-view/admin-configuration-view.js +++ b/frontend/src/components/views/admin-configuration-view/admin-configuration-view.js @@ -22,29 +22,30 @@ AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResou function AdminConfigurationViewController(configsResource, configsNoIdResource) { var vm = this; - vm.loading = {config: true}; - - var filters = [ - 'template_footer_html:global', - 'list_groups_to_non_admins:global', - 'per_application_reports_rate_limit:global', - 'per_application_logs_rate_limit:global', - 'per_application_metrics_rate_limit:global', - ]; - - vm.configs = {}; - - vm.configList = configsResource.query({filter: filters}, - function (data) { - vm.loading = {config: false}; - _.each(data, function (item) { - if (vm.configs[item.section] === undefined) { - vm.configs[item.section] = {}; - } - vm.configs[item.section][item.key] = item; + vm.$onInit = function () { + vm.loading = {config: true}; + + var filters = [ + 'template_footer_html:global', + 'list_groups_to_non_admins:global', + 'per_application_reports_rate_limit:global', + 'per_application_logs_rate_limit:global', + 'per_application_metrics_rate_limit:global', + ]; + + vm.configs = {}; + + vm.configList = configsResource.query({filter: filters}, + function (data) { + vm.loading = {config: false}; + _.each(data, function (item) { + if (vm.configs[item.section] === undefined) { + vm.configs[item.section] = {}; + } + vm.configs[item.section][item.key] = item; + }); }); - }); - + } vm.save = function () { vm.loading.config = true; _.each(vm.configList, function (item) { diff --git a/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js b/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js index b833cda..f3497bd 100644 --- a/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js +++ b/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js @@ -23,60 +23,62 @@ AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPr function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) { console.debug('AdminGroupsCreateController'); var vm = this; - vm.$state = $state; - vm.loading = { - group: false, - resource_permissions: false, - users: false - }; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = { + group: false, + resource_permissions: false, + users: false + }; - vm.form = { - autocompleteUser: '', - } + vm.form = { + autocompleteUser: '', + } - if (typeof $state.params.groupId !== 'undefined') { - vm.loading.group = true; - var groupId = $state.params.groupId; - vm.group = groupsResource.get({groupId: groupId}, function (data) { - vm.loading.group = false; - }); + if (typeof $state.params.groupId !== 'undefined') { + vm.loading.group = true; + var groupId = $state.params.groupId; + vm.group = groupsResource.get({groupId: groupId}, function (data) { + vm.loading.group = false; + }); - vm.resource_permissions = groupsPropertyResource.query( - {groupId: groupId, key: 'resource_permissions'}, function (data) { - vm.loading.resource_permissions = false; - var tmpObj = { - 'group': { - 'application': {}, - 'dashboard': {} - } - }; - _.each(data, function (item) { - console.log(item); - var section = tmpObj[item.type][item.resource_type]; - if (typeof section[item.resource_id] == 'undefined') { - section[item.resource_id] = { - self: item, - permissions: [] + vm.resource_permissions = groupsPropertyResource.query( + {groupId: groupId, key: 'resource_permissions'}, function (data) { + vm.loading.resource_permissions = false; + var tmpObj = { + 'group': { + 'application': {}, + 'dashboard': {} + } + }; + _.each(data, function (item) { + console.log(item); + var section = tmpObj[item.type][item.resource_type]; + if (typeof section[item.resource_id] == 'undefined') { + section[item.resource_id] = { + self: item, + permissions: [] + } } - } - section[item.resource_id].permissions.push(item.perm_name); + section[item.resource_id].permissions.push(item.perm_name); + }); + console.log(tmpObj) + vm.resourcePermissions = tmpObj; }); - console.log(tmpObj) - vm.resourcePermissions = tmpObj; - }); - vm.users = groupsPropertyResource.query( - {groupId: groupId, key: 'users'}, function (data) { - vm.loading.users = false; - }, function () { - vm.loading.users = false; - }); + vm.users = groupsPropertyResource.query( + {groupId: groupId, key: 'users'}, function (data) { + vm.loading.users = false; + }, function () { + vm.loading.users = false; + }); + + } else { + var groupId = null; + } - } - else { - var groupId = null; } var formResponse = function (response) { @@ -93,8 +95,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR setServerValidation(vm.groupForm); vm.loading.group = false; }, formResponse); - } - else { + } else { groupsResource.save(vm.group, function (data) { $state.go('admin.group.update', {groupId: data.id}); }, formResponse); @@ -134,9 +135,9 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR view: 'search_users', 'user_name': searchPhrase }).$promise.then(function (data) { - return _.map(data, function (item) { - return item.user; - }); + return _.map(data, function (item) { + return item.user; }); + }); } }; diff --git a/frontend/src/components/views/admin-groups-list-view/admin-groups-list-view.js b/frontend/src/components/views/admin-groups-list-view/admin-groups-list-view.js index c475594..c4a2947 100644 --- a/frontend/src/components/views/admin-groups-list-view/admin-groups-list-view.js +++ b/frontend/src/components/views/admin-groups-list-view/admin-groups-list-view.js @@ -23,24 +23,25 @@ AdminGroupsListViewController.$inject = ['$state', 'groupsResource']; function AdminGroupsListViewController($state, groupsResource) { console.debug('AdminGroupsListViewController'); var vm = this; - vm.$state = $state; - vm.loading = {groups: true}; - - vm.groups = groupsResource.query({}, function (data) { - vm.loading = {groups: false}; - vm.activeUsers = _.reduce(vm.groups, function(memo, val){ - if (val.status == 1){ - return memo + 1; - } - return memo; - }, 0); - console.log(vm.groups); - }); + this.$onInit = function () { + vm.$state = $state; + vm.loading = {groups: true}; + vm.groups = groupsResource.query({}, function (data) { + vm.loading = {groups: false}; + vm.activeUsers = _.reduce(vm.groups, function (memo, val) { + if (val.status == 1) { + return memo + 1; + } + return memo; + }, 0); + console.log(vm.groups); + }); + } vm.removeGroup = function (group) { groupsResource.remove({groupId: group.id}, function (data, responseHeaders) { - console.log('x',data, responseHeaders()); + console.log('x', data, responseHeaders()); if (data) { var index = vm.groups.indexOf(group); if (index !== -1) { diff --git a/frontend/src/components/views/admin-partitions-view/admin-partitions-view.js b/frontend/src/components/views/admin-partitions-view/admin-partitions-view.js index 069193b..4ea2ea4 100644 --- a/frontend/src/components/views/admin-partitions-view/admin-partitions-view.js +++ b/frontend/src/components/views/admin-partitions-view/admin-partitions-view.js @@ -22,14 +22,18 @@ AdminPartitionsViewController.$inject = ['sectionViewResource']; function AdminPartitionsViewController(sectionViewResource) { var vm = this; - vm.permanentPartitions = []; - vm.dailyPartitions = []; - vm.loading = {partitions: true}; - vm.dailyChecked = false; - vm.permChecked = false; - vm.dailyConfirm = ''; - vm.permConfirm = ''; + this.$onInit = function () { + vm.permanentPartitions = []; + vm.dailyPartitions = []; + vm.loading = {partitions: true}; + vm.dailyChecked = false; + vm.permChecked = false; + vm.dailyConfirm = ''; + vm.permConfirm = ''; + sectionViewResource.get({section: 'admin_section', view: 'partitions'}, + vm.loadPartitions); + } vm.loadPartitions = function (data) { var permanentPartitions = vm.transformPartitionList( @@ -43,17 +47,15 @@ function AdminPartitionsViewController(sectionViewResource) { vm.setCheckedList = function (scope) { var toTest = null; - if (scope === 'dailyPartitions'){ + if (scope === 'dailyPartitions') { toTest = 'dailyChecked'; - } - else{ + } else { toTest = 'permChecked'; } if (vm[toTest]) { var val = true; - } - else { + } else { var val = false; } console.log('scope', scope); @@ -90,9 +92,6 @@ function AdminPartitionsViewController(sectionViewResource) { return outputList; }; - sectionViewResource.get({section:'admin_section', view: 'partitions'}, - vm.loadPartitions); - vm.partitionsDelete = function (partitionType) { var es_indices = []; var pg_indices = []; @@ -111,8 +110,10 @@ function AdminPartitionsViewController(sectionViewResource) { console.log(es_indices, pg_indices); vm.loading = {partitions: true}; - sectionViewResource.save({section:'admin_section', - view: 'partitions_remove'}, { + sectionViewResource.save({ + section: 'admin_section', + view: 'partitions_remove' + }, { es_indices: es_indices, pg_indices: pg_indices, confirm: 'CONFIRM' diff --git a/frontend/src/components/views/admin-system-view/admin-system-view.js b/frontend/src/components/views/admin-system-view/admin-system-view.js index 0ca3d95..6b5d2c4 100644 --- a/frontend/src/components/views/admin-system-view/admin-system-view.js +++ b/frontend/src/components/views/admin-system-view/admin-system-view.js @@ -22,22 +22,24 @@ AdminSystemViewController.$inject = ['sectionViewResource']; function AdminSystemViewController(sectionViewResource) { var vm = this; - vm.tables = []; - vm.loading = {system: true}; - sectionViewResource.get({ - section: 'admin_section', - view: 'system' - }, null, function (data) { - vm.DBtables = data.db_tables; - vm.ESIndices = data.es_indices; - vm.queueStats = data.queue_stats; - vm.systemLoad = data.system_load; - vm.packages = data.packages; - vm.processInfo = data.process_info; - vm.disks = data.disks; - vm.memory = data.memory; - vm.selfInfo = data.self_info; + this.$onInit = function () { + vm.tables = []; + vm.loading = {system: true}; - vm.loading.system = false; - }); + sectionViewResource.get({ + section: 'admin_section', + view: 'system' + }, null, function (data) { + vm.DBtables = data.db_tables; + vm.ESIndices = data.es_indices; + vm.queueStats = data.queue_stats; + vm.systemLoad = data.system_load; + vm.packages = data.packages; + vm.processInfo = data.process_info; + vm.disks = data.disks; + vm.memory = data.memory; + vm.selfInfo = data.self_info; + vm.loading.system = false; + }); + } }; diff --git a/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js b/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js index 3c3d07a..72367cc 100644 --- a/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js +++ b/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js @@ -23,55 +23,56 @@ AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPrope function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) { console.debug('AdminUsersCreateViewController'); var vm = this; - vm.$state = $state; - vm.loading = {user: false}; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {user: false}; - if (typeof $state.params.userId !== 'undefined') { - vm.loading.user = true; - var userId = $state.params.userId; - vm.user = usersResource.get({userId: userId}, function (data) { - vm.loading.user = false; - // cast to true for angular checkbox - if (vm.user.status === 1) { - vm.user.status = true; - } - }); + if (typeof $state.params.userId !== 'undefined') { + vm.loading.user = true; + var userId = $state.params.userId; + vm.user = usersResource.get({userId: userId}, function (data) { + vm.loading.user = false; + // cast to true for angular checkbox + if (vm.user.status === 1) { + vm.user.status = true; + } + }); - vm.resource_permissions = usersPropertyResource.query( - {userId: userId, key: 'resource_permissions'}, function (data) { - vm.loading.resource_permissions = false; - var tmpObj = { - 'user': { - 'application': {}, - 'dashboard': {} - }, - 'group': { - 'application': {}, - 'dashboard': {} - } - }; - _.each(data, function (item) { - console.log(item); - var section = tmpObj[item.type][item.resource_type]; - if (typeof section[item.resource_id] == 'undefined'){ - section[item.resource_id] = { - self:item, - permissions: [] + vm.resource_permissions = usersPropertyResource.query( + {userId: userId, key: 'resource_permissions'}, function (data) { + vm.loading.resource_permissions = false; + var tmpObj = { + 'user': { + 'application': {}, + 'dashboard': {} + }, + 'group': { + 'application': {}, + 'dashboard': {} } - } - section[item.resource_id].permissions.push(item.perm_name); + }; + _.each(data, function (item) { + console.log(item); + var section = tmpObj[item.type][item.resource_type]; + if (typeof section[item.resource_id] == 'undefined') { + section[item.resource_id] = { + self: item, + permissions: [] + } + } + section[item.resource_id].permissions.push(item.perm_name); + }); + console.log(tmpObj) + vm.resourcePermissions = tmpObj; }); - console.log(tmpObj) - vm.resourcePermissions = tmpObj; - }); - } - else { - var userId = null; - vm.user = { - status: true + } else { + var userId = null; + vm.user = { + status: true + } } } diff --git a/frontend/src/components/views/admin-users-list-view/admin-users-list-view.js b/frontend/src/components/views/admin-users-list-view/admin-users-list-view.js index b1bd36e..5ca556c 100644 --- a/frontend/src/components/views/admin-users-list-view/admin-users-list-view.js +++ b/frontend/src/components/views/admin-users-list-view/admin-users-list-view.js @@ -23,19 +23,20 @@ AdminUserListViewController.$inject = ['usersResource']; function AdminUserListViewController(usersResource) { console.debug('AdminUsersController'); var vm = this; - vm.loading = {users: true}; - - vm.users = usersResource.query({}, function (data) { - vm.loading = {users: false}; - vm.activeUsers = _.reduce(vm.users, function(memo, val){ - if (val.status == 1){ - return memo + 1; - } - return memo; - }, 0); - console.log(vm.users); - }); + vm.$onInit = function () { + vm.loading = {users: true}; + vm.users = usersResource.query({}, function (data) { + vm.loading = {users: false}; + vm.activeUsers = _.reduce(vm.users, function (memo, val) { + if (val.status == 1) { + return memo + 1; + } + return memo; + }, 0); + console.log(vm.users); + }); + } vm.removeUser = function (user) { usersResource.remove({userId: user.id}, function (data, responseHeaders) { diff --git a/frontend/src/components/views/admin-view/admin-view.js b/frontend/src/components/views/admin-view/admin-view.js index c941418..81d9a4f 100644 --- a/frontend/src/components/views/admin-view/admin-view.js +++ b/frontend/src/components/views/admin-view/admin-view.js @@ -21,7 +21,10 @@ angular.module('appenlight.components.adminView', []) AdminViewController.$inject = ['$state', 'AeConfig']; function AdminViewController($state, AeConfig) { - this.$state = $state; - this.AeConfig = AeConfig; - console.info('AdminViewController'); + this.$onInit = function () { + this.$state = $state; + this.AeConfig = AeConfig; + console.info('AdminViewController'); + } + } diff --git a/frontend/src/components/views/applications-integrations-view/applications-integrations-view.js b/frontend/src/components/views/applications-integrations-view/applications-integrations-view.js index 92a1a52..1c69dfd 100644 --- a/frontend/src/components/views/applications-integrations-view/applications-integrations-view.js +++ b/frontend/src/components/views/applications-integrations-view/applications-integrations-view.js @@ -23,9 +23,11 @@ IntegrationsListViewController.$inject = ['$state', 'applicationsResource']; function IntegrationsListViewController($state, applicationsResource) { console.debug('IntegrationsListController'); var vm = this; - vm.loading = {application: true}; - vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) { - vm.loading.application = false; - $state.current.data.resource = vm.resource; - }); + vm.$onInit = function () { + vm.loading = {application: true}; + vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) { + vm.loading.application = false; + $state.current.data.resource = vm.resource; + }); + } } diff --git a/frontend/src/components/views/applications-list-view/applications-list-view.js b/frontend/src/components/views/applications-list-view/applications-list-view.js index 3474274..e9521e0 100644 --- a/frontend/src/components/views/applications-list-view/applications-list-view.js +++ b/frontend/src/components/views/applications-list-view/applications-list-view.js @@ -23,9 +23,11 @@ ApplicationsListViewController.$inject = ['$state', 'applicationsResource']; function ApplicationsListViewController($state, applicationsResource) { console.debug('ApplicationsListController'); var vm = this; - vm.$state = $state; - vm.loading = {applications: true}; - vm.applications = applicationsResource.query(null, function(){ - vm.loading.applications = false; - }); + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {applications: true}; + vm.applications = applicationsResource.query(null, function () { + vm.loading.applications = false; + }); + } } diff --git a/frontend/src/components/views/applications-purge-logs-view/applications-purge-logs-view.js b/frontend/src/components/views/applications-purge-logs-view/applications-purge-logs-view.js index c3c648e..0d27105 100644 --- a/frontend/src/components/views/applications-purge-logs-view/applications-purge-logs-view.js +++ b/frontend/src/components/views/applications-purge-logs-view/applications-purge-logs-view.js @@ -18,23 +18,25 @@ angular.module('appenlight.components.applicationsPurgeLogsView', []) controller: applicationsPurgeLogsViewController }); -applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource', 'sectionViewResource', 'logsNoIdResource']; +applicationsPurgeLogsViewController.$inject = ['$state', 'applicationsResource', 'sectionViewResource', 'logsNoIdResource']; function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) { console.debug('applicationsPurgeLogsViewController'); var vm = this; - vm.$state = $state; - vm.loading = {applications: true}; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {applications: true}; - vm.namespace = null; - vm.selectedResource = null; - vm.commonNamespaces = []; + vm.namespace = null; + vm.selectedResource = null; + vm.commonNamespaces = []; - vm.applications = applicationsResource.query({'type':'update_reports'}, function () { - vm.loading.applications = false; - vm.selectedResource = vm.applications[0].resource_id; - vm.getCommonKeys(); - }); + vm.applications = applicationsResource.query({'type': 'update_reports'}, function () { + vm.loading.applications = false; + vm.selectedResource = vm.applications[0].resource_id; + vm.getCommonKeys(); + }); + } /** * Fetches most commonly used tags in logs @@ -51,8 +53,10 @@ function applicationsPurgeLogsViewController($state, applicationsResource, secti vm.purgeLogs = function () { vm.loading.applications = true; - logsNoIdResource.delete({resource:vm.selectedResource, - namespace: vm.namespace}, function(){ + logsNoIdResource.delete({ + resource: vm.selectedResource, + namespace: vm.namespace + }, function () { vm.loading.applications = false; }); } diff --git a/frontend/src/components/views/applications-update-view/applications-update-view.js b/frontend/src/components/views/applications-update-view/applications-update-view.js index 6b9ed2b..313f4b3 100644 --- a/frontend/src/components/views/applications-update-view/applications-update-view.js +++ b/frontend/src/components/views/applications-update-view/applications-update-view.js @@ -24,41 +24,41 @@ function applicationsUpdateViewController($state, applicationsNoIdResource, appl 'use strict'; console.debug('applicationsUpdateView'); var vm = this; - vm.AeConfig = AeConfig; - vm.$state = $state; - vm.loading = {application: false}; + vm.$onInit = function () { + vm.AeConfig = AeConfig; + vm.$state = $state; + vm.loading = {application: false}; - vm.groupingOptions = [ - ['url_type', 'Error Type + location'], - ['url_traceback', 'Traceback + location'], - ['traceback_server', 'Traceback + Server'], - ]; - var resourceId = $state.params.resourceId; - var options = {}; - vm.momentJs = moment; - vm.formTransferModel = {password:''}; + vm.groupingOptions = [ + ['url_type', 'Error Type + location'], + ['url_traceback', 'Traceback + location'], + ['traceback_server', 'Traceback + Server'], + ]; + var resourceId = $state.params.resourceId; + var options = {}; + vm.momentJs = moment; + vm.formTransferModel = {password: ''}; - // set initial data + // set initial data - if (resourceId === 'new') { - vm.resource = { - resource_id: null, - slow_report_threshold: 10, - error_report_threshold: 10, - allow_permanent_storage: true, - default_grouping: vm.groupingOptions[1][0] - }; - } - else { - vm.loading.application = true; - vm.resource = applicationsResource.get({ - 'resourceId': resourceId - }, function (data) { - vm.loading.application = false; - }); + if (resourceId === 'new') { + vm.resource = { + resource_id: null, + slow_report_threshold: 10, + error_report_threshold: 10, + allow_permanent_storage: true, + default_grouping: vm.groupingOptions[1][0] + }; + } else { + vm.loading.application = true; + vm.resource = applicationsResource.get({ + 'resourceId': resourceId + }, function (data) { + vm.loading.application = false; + }); + } } - vm.updateBasicForm = function () { vm.loading.application = true; if (vm.resource.resource_id === null) { diff --git a/frontend/src/components/views/event-browser/event-browser.js b/frontend/src/components/views/event-browser/event-browser.js index 6d1d9b8..e04a8d5 100644 --- a/frontend/src/components/views/event-browser/event-browser.js +++ b/frontend/src/components/views/event-browser/event-browser.js @@ -23,15 +23,16 @@ EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource']; function EventBrowserController(eventsNoIdResource, eventsResource) { console.info('EventBrowserController'); var vm = this; + vm.$onInit = function () { - vm.loading = {events: true}; - - vm.events = eventsNoIdResource.query( - {key: 'events'}, - function (data) { - vm.loading.events = false; - }); + vm.loading = {events: true}; + vm.events = eventsNoIdResource.query( + {key: 'events'}, + function (data) { + vm.loading.events = false; + }); + } vm.closeEvent = function (event) { console.log('closeEvent'); diff --git a/frontend/src/components/views/index-dashboard/index-dashboard.js b/frontend/src/components/views/index-dashboard/index-dashboard.js index 19c6666..89c11ef 100644 --- a/frontend/src/components/views/index-dashboard/index-dashboard.js +++ b/frontend/src/components/views/index-dashboard/index-dashboard.js @@ -22,359 +22,376 @@ IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookie function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) { var vm = this; - stateHolder.section = 'dashboard'; - vm.timeOptions = {}; - var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M']; - _.each(allowed, function (key) { - if (allowed.indexOf(key) !== -1) { - vm.timeOptions[key] = AeConfig.timeOptions[key]; - } - }); - vm.stateHolder = stateHolder; - vm.urls = AeConfig.urls; - vm.applications = stateHolder.AeUser.applications_map; - vm.show_dashboard = false; - vm.resource = null; - vm.graphType = {selected: null}; - vm.timeSpan = vm.timeOptions['1h']; - vm.trendingReports = []; - vm.exceptions = 0; - vm.satisfyingRequests = 0; - vm.toleratedRequests = 0; - vm.frustratingRequests = 0; - vm.uptimeStats = 0; - vm.apdexStats = []; - vm.seriesRequestsData = []; - vm.seriesMetricsData = []; - vm.seriesSlowData = []; - vm.slowCalls = []; - vm.slowURIS = []; - - vm.reportChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - culling: { - max: 6 // the number of tick texts will be adjusted to less than this value - }, - format: '%Y-%m-%d %H:%M' + vm.$onInit = function () { + stateHolder.section = 'dashboard'; + vm.timeOptions = {}; + var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M']; + _.each(allowed, function (key) { + if (allowed.indexOf(key) !== -1) { + vm.timeOptions[key] = AeConfig.timeOptions[key]; + } + }); + vm.stateHolder = stateHolder; + vm.urls = AeConfig.urls; + vm.applications = stateHolder.AeUser.applications_map; + vm.show_dashboard = false; + vm.resource = null; + vm.graphType = {selected: null}; + vm.timeSpan = vm.timeOptions['1h']; + vm.trendingReports = []; + vm.exceptions = 0; + vm.satisfyingRequests = 0; + vm.toleratedRequests = 0; + vm.frustratingRequests = 0; + vm.uptimeStats = 0; + vm.apdexStats = []; + vm.seriesRequestsData = []; + vm.seriesMetricsData = []; + vm.seriesSlowData = []; + vm.slowCalls = []; + vm.slowURIS = []; + + vm.reportChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' + }, + color: { + pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + culling: { + max: 6 // the number of tick texts will be adjusted to less than this value + }, + format: '%Y-%m-%d %H:%M' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2s') + } } }, - y: { - tick: { - count: 5, - format: d3.format('.2s') + subchart: { + show: true, + size: { + height: 20 } - } - }, - subchart: { - show: true, + }, size: { - height: 20 - } - }, - size: { - height: 250 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true - }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + height: 250 + }, + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true } - } - } - }; - vm.reportChartData = {}; - - vm.reportSlowChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - culling: { - max: 6 // the number of tick texts will be adjusted to less than this value + }, + tooltip: { + format: { + title: function (d) { + return '' + d; }, - format: '%Y-%m-%d %H:%M' + value: function (v) { + return v + } } + } + }; + vm.reportChartData = {}; + + vm.reportSlowChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' }, - y: { - tick: { - count: 5, - format: d3.format('.2s') + color: { + pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + culling: { + max: 6 // the number of tick texts will be adjusted to less than this value + }, + format: '%Y-%m-%d %H:%M' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2s') + } } - } - }, - subchart: { - show: true, + }, + subchart: { + show: true, + size: { + height: 20 + } + }, size: { - height: 20 - } - }, - size: { - height: 250 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true - }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + height: 250 + }, + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true } - } - } - }; - vm.reportSlowChartData = {}; - - vm.metricsChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S', - keys: { - x: 'x', - value: ["main", "sql", "nosql", "tmpl", "remote", "custom"] - }, - names: { - main: 'View/Application logic', - sql: 'Relational database queries', - nosql: 'NoSql datastore calls', - tmpl: 'Template rendering', - custom: 'Custom timed calls', - remote: 'Requests to remote resources' - }, - type: 'area', - groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]], - order: null - }, - color: { - pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - culling: { - max: 6 // the number of tick texts will be adjusted to less than this value + }, + tooltip: { + format: { + title: function (d) { + return '' + d; }, - format: '%Y-%m-%d %H:%M' + value: function (v) { + return v + } + } + } + }; + vm.reportSlowChartData = {}; + + vm.metricsChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S', + keys: { + x: 'x', + value: ["main", "sql", "nosql", "tmpl", "remote", "custom"] + }, + names: { + main: 'View/Application logic', + sql: 'Relational database queries', + nosql: 'NoSql datastore calls', + tmpl: 'Template rendering', + custom: 'Custom timed calls', + remote: 'Requests to remote resources' + }, + type: 'area', + groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]], + order: null + }, + color: { + pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + culling: { + max: 6 // the number of tick texts will be adjusted to less than this value + }, + format: '%Y-%m-%d %H:%M' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2f') + } } }, - y: { - tick: { - count: 5, - format: d3.format('.2f') + point: { + show: false + }, + subchart: { + show: true, + size: { + height: 20 } - } - }, - point: { - show: false - }, - subchart: { - show: true, + }, size: { - height: 20 - } - }, - size: { - height: 350 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true - }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + height: 350 + }, + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true } - } - } - }; - vm.metricsChartData = {}; - - vm.responseChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#d6616b', '#6baed6', '#fd8d3c'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - culling: { - max: 6 // the number of tick texts will be adjusted to less than this value + }, + tooltip: { + format: { + title: function (d) { + return '' + d; }, - format: '%Y-%m-%d %H:%M' + value: function (v) { + return v + } } + } + }; + vm.metricsChartData = {}; + + vm.responseChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' }, - y: { - tick: { - count: 5, - format: d3.format('.2f') + color: { + pattern: ['#d6616b', '#6baed6', '#fd8d3c'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + culling: { + max: 6 // the number of tick texts will be adjusted to less than this value + }, + format: '%Y-%m-%d %H:%M' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2f') + } } - } - }, - point: { - show: false - }, - subchart: { - show: true, + }, + point: { + show: false + }, + subchart: { + show: true, + size: { + height: 20 + } + }, size: { - height: 20 - } - }, - size: { - height: 350 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true - }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + height: 350 + }, + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true } - } - } - }; - vm.responseChartData = {}; - - vm.requestsChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#d6616b', '#6baed6', '#fd8d3c'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - culling: { - max: 6 // the number of tick texts will be adjusted to less than this value + }, + tooltip: { + format: { + title: function (d) { + return '' + d; }, - format: '%Y-%m-%d %H:%M' + value: function (v) { + return v + } } + } + }; + vm.responseChartData = {}; + + vm.requestsChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' + }, + color: { + pattern: ['#d6616b', '#6baed6', '#fd8d3c'] }, - y: { - tick: { - count: 5, - format: d3.format('.2f') + axis: { + x: { + type: 'timeseries', + tick: { + culling: { + max: 6 // the number of tick texts will be adjusted to less than this value + }, + format: '%Y-%m-%d %H:%M' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2f') + } } - } - }, - point: { - show: false - }, - subchart: { - show: true, + }, + point: { + show: false + }, + subchart: { + show: true, + size: { + height: 20 + } + }, size: { - height: 20 - } - }, - size: { - height: 350 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true - }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + height: 350 + }, + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true } + }, + tooltip: { + format: { + title: function (d) { + return '' + d; + }, + value: function (v) { + return v + } + } + } + }; + vm.requestsChartData = {}; + + vm.loading = { + 'apdex': true, + 'reports': true, + 'graphs': true, + 'slowCalls': true, + 'slowURIS': true, + 'requestsBreakdown': true, + 'series': true + }; + vm.stream = {paused: false, filtered: false, messages: [], reports: []}; + + vm.intervalId = $interval(function () { + if (_.contains(['30m', "1h"], vm.timeSpan.key)) { + // don't do anything if window is unfocused + if(document.hidden === true){ + return ; + } + vm.refreshData(); } + }, 60000); + + if (stateHolder.AeUser.applications.length){ + vm.show_dashboard = true; + vm.determineStartState(); } - }; - vm.requestsChartData = {}; - - vm.loading = { - 'apdex': true, - 'reports': true, - 'graphs': true, - 'slowCalls': true, - 'slowURIS': true, - 'requestsBreakdown': true, - 'series': true - }; - vm.stream = {paused: false, filtered: false, messages: [], reports: []}; + } $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){ var ws_report = message.message.report; if (ws_report.http_status != 500) { @@ -463,16 +480,6 @@ function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte vm.refreshData(); }; - vm.intervalId = $interval(function () { - if (_.contains(['30m', "1h"], vm.timeSpan.key)) { - // don't do anything if window is unfocused - if(document.hidden === true){ - return ; - } - vm.refreshData(); - } - }, 60000); - vm.fetchApdexStats = function () { vm.loading.apdex = true; vm.apdexStats = applicationsPropertyResource.query({ @@ -653,9 +660,4 @@ function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte $scope.$on('$destroy',function(){ $interval.cancel(vm.intervalId); }); - - if (stateHolder.AeUser.applications.length){ - vm.show_dashboard = true; - vm.determineStartState(); - } } diff --git a/frontend/src/components/views/integrations/applications-integrations-edit-view.js b/frontend/src/components/views/integrations/applications-integrations-edit-view.js index b0704da..4931010 100644 --- a/frontend/src/components/views/integrations/applications-integrations-edit-view.js +++ b/frontend/src/components/views/integrations/applications-integrations-edit-view.js @@ -18,17 +18,18 @@ ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationReso function ApplicationsIntegrationsEditViewController($state, integrationResource) { console.debug('IntegrationController'); var vm = this; - vm.$state = $state; - vm.loading = {integration: true}; - vm.config = integrationResource.get( - { - integration: $state.params.integration, - action: 'setup', - resourceId: $state.params.resourceId - }, function (data) { - vm.loading.integration = false; - }); - + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {integration: true}; + vm.config = integrationResource.get( + { + integration: $state.params.integration, + action: 'setup', + resourceId: $state.params.resourceId + }, function (data) { + vm.loading.integration = false; + }); + } vm.configureIntegration = function () { console.info('configureIntegration'); vm.loading.integration = true; diff --git a/frontend/src/components/views/logs-browser/logs-browser.js b/frontend/src/components/views/logs-browser/logs-browser.js index d38bc94..7a340bc 100644 --- a/frontend/src/components/views/logs-browser/logs-browser.js +++ b/frontend/src/components/views/logs-browser/logs-browser.js @@ -22,142 +22,156 @@ LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) { var vm = this; - vm.logEventsChartConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - format: '%Y-%m-%d' + vm.$onInit = function () { + vm.logEventsChartConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' + }, + color: { + pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + format: '%Y-%m-%d' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2s') + } } }, - y: { - tick: { - count: 5, - format: d3.format('.2s') + subchart: { + show: true, + size: { + height: 20 } - } - }, - subchart: { - show: true, + }, size: { - height: 20 - } - }, - size: { - height: 250 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true + height: 250 }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true + } + }, + tooltip: { + format: { + title: function (d) { + return '' + d; + }, + value: function (v) { + return v + } } } - } - }; - vm.logEventsChartData = {}; - stateHolder.section = 'logs'; - vm.today = function () { - vm.pickerDate = new Date(); - }; - vm.today(); + }; + vm.logEventsChartData = {}; + stateHolder.section = 'logs'; + vm.today = function () { + vm.pickerDate = new Date(); + }; + vm.today(); - vm.applications = stateHolder.AeUser.applications_map; - vm.logsPage = []; - vm.itemCount = 0; - vm.itemsPerPage = 250; - vm.page = 1; - vm.$location = $location; - vm.isLoading = { - logs: true, - series: true - }; - vm.filterTypeAheadOptions = [ - { - type: 'message', - text: 'message:', - 'description': 'Full-text search in your logs', - tag: 'Message', - example: 'message:text-im-looking-for' - }, - { - type: 'namespace', - text: 'namespace:', - 'description': 'Query logs from specific namespace', - tag: 'Namespace', - example: "namespace:module.foo" - }, - { - type: 'resource', - text: 'resource:', - 'description': 'Restrict resultset to application', - tag: 'Application', - example: "resource:ID" - }, - { - type: 'request_id', - text: 'request_id:', - 'description': 'Show logs with specific request id', - example: "request_id:883143dc572e4c38aceae92af0ea5ae0", - tag: 'Request ID' - }, - { - type: 'level', - text: 'level:', - 'description': 'Show entries with specific log level', - example: 'level:warning', - tag: 'Level' - }, - { - type: 'server_name', - text: 'server_name:', - 'description': 'Show entries tagged with this key/value pair', - example: 'server_name:hostname', - tag: 'Tag' - }, - { - type: 'start_date', - text: 'start_date:', - 'description': 'Show results newer than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T13:00', - tag: 'Start Date' - }, - { - type: 'end_date', - text: 'end_date:', - 'description': 'Show results older than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T23:59', - tag: 'End Date' - }, - {type: 'level', value: 'debug', text: 'level:debug'}, - {type: 'level', value: 'info', text: 'level:info'}, - {type: 'level', value: 'warning', text: 'level:warning'}, - {type: 'level', value: 'critical', text: 'level:critical'} - ]; - vm.filterTypeAhead = null; - vm.showDatePicker = false; - vm.manualOpen = false; - vm.aheadFilter = typeAheadTagHelper.aheadFilter; + vm.applications = stateHolder.AeUser.applications_map; + vm.logsPage = []; + vm.itemCount = 0; + vm.itemsPerPage = 250; + vm.page = 1; + vm.$location = $location; + vm.isLoading = { + logs: true, + series: true + }; + vm.filterTypeAheadOptions = [ + { + type: 'message', + text: 'message:', + 'description': 'Full-text search in your logs', + tag: 'Message', + example: 'message:text-im-looking-for' + }, + { + type: 'namespace', + text: 'namespace:', + 'description': 'Query logs from specific namespace', + tag: 'Namespace', + example: "namespace:module.foo" + }, + { + type: 'resource', + text: 'resource:', + 'description': 'Restrict resultset to application', + tag: 'Application', + example: "resource:ID" + }, + { + type: 'request_id', + text: 'request_id:', + 'description': 'Show logs with specific request id', + example: "request_id:883143dc572e4c38aceae92af0ea5ae0", + tag: 'Request ID' + }, + { + type: 'level', + text: 'level:', + 'description': 'Show entries with specific log level', + example: 'level:warning', + tag: 'Level' + }, + { + type: 'server_name', + text: 'server_name:', + 'description': 'Show entries tagged with this key/value pair', + example: 'server_name:hostname', + tag: 'Tag' + }, + { + type: 'start_date', + text: 'start_date:', + 'description': 'Show results newer than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T13:00', + tag: 'Start Date' + }, + { + type: 'end_date', + text: 'end_date:', + 'description': 'Show results older than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T23:59', + tag: 'End Date' + }, + {type: 'level', value: 'debug', text: 'level:debug'}, + {type: 'level', value: 'info', text: 'level:info'}, + {type: 'level', value: 'warning', text: 'level:warning'}, + {type: 'level', value: 'critical', text: 'level:critical'} + ]; + vm.filterTypeAhead = null; + vm.showDatePicker = false; + vm.manualOpen = false; + vm.aheadFilter = typeAheadTagHelper.aheadFilter; + + _.each(vm.applications, function (item) { + vm.filterTypeAheadOptions.push({ + type: 'resource', + text: 'resource:' + item.resource_id + ':' + item.resource_name, + example: 'resource:' + item.resource_id, + 'tag': item.resource_name, + 'description': 'Restrict resultset to this application' + }); + }); + console.info('page load'); + vm.refresh(); + } vm.removeSearchTag = function (tag) { $location.search(tag.type, null); vm.refresh(); @@ -172,17 +186,6 @@ function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN vm.refresh(); }; - - _.each(vm.applications, function (item) { - vm.filterTypeAheadOptions.push({ - type: 'resource', - text: 'resource:' + item.resource_id + ':' + item.resource_name, - example: 'resource:' + item.resource_id, - 'tag': item.resource_name, - 'description': 'Restrict resultset to this application' - }); - }); - vm.typeAheadTag = function (event) { var text = vm.filterTypeAhead; if (_.isObject(vm.filterTypeAhead)) { @@ -288,6 +291,5 @@ function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN vm.fetchLogs(params); vm.fetchSeriesData(params); }; - console.info('page load'); - vm.refresh(); + } diff --git a/frontend/src/components/views/report-view/report-view.js b/frontend/src/components/views/report-view/report-view.js index 1e9b3b0..080164f 100644 --- a/frontend/src/components/views/report-view/report-view.js +++ b/frontend/src/components/views/report-view/report-view.js @@ -24,78 +24,98 @@ ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal', function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) { var vm = this; - vm.window = $window; - vm.stateHolder = stateHolder; - vm.$state = $state; - vm.reportHistoryConfig = { - data: { - json: [], - xFormat: '%Y-%m-%dT%H:%M:%S' - }, - color: { - pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] - }, - axis: { - x: { - type: 'timeseries', - tick: { - format: '%Y-%m-%d' + vm.$onInit = function () { + vm.window = $window; + vm.stateHolder = stateHolder; + vm.$state = $state; + vm.reportHistoryConfig = { + data: { + json: [], + xFormat: '%Y-%m-%dT%H:%M:%S' + }, + color: { + pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b'] + }, + axis: { + x: { + type: 'timeseries', + tick: { + format: '%Y-%m-%d' + } + }, + y: { + tick: { + count: 5, + format: d3.format('.2s') + } } }, - y: { - tick: { - count: 5, - format: d3.format('.2s') + subchart: { + show: true, + size: { + height: 20 } - } - }, - subchart: { - show: true, + }, size: { - height: 20 - } - }, - size: { - height: 250 - }, - zoom: { - rescale: true - }, - grid: { - x: { - show: true + height: 250 }, - y: { - show: true - } - }, - tooltip: { - format: { - title: function (d) { - return '' + d; + zoom: { + rescale: true + }, + grid: { + x: { + show: true }, - value: function (v) { - return v + y: { + show: true + } + }, + tooltip: { + format: { + title: function (d) { + return '' + d; + }, + value: function (v) { + return v + } } } + }; + vm.mentionedPeople = []; + vm.reportHistoryData = {}; + vm.textTraceback = true; + vm.rawTraceback = ''; + vm.traceback = ''; + vm.reportType = 'report'; + vm.report = null; + vm.showLong = false; + vm.reportLogs = null; + vm.requestStats = null; + vm.comment = null; + vm.is_loading = { + report: true, + logs: true, + history: true + }; + + vm.tabs = { + slow_calls:false, + request_details:false, + logs:false, + comments:false, + affected_users:false + }; + if ($cookies.selectedReportTab) { + vm.tabs[$cookies.selectedReportTab] = true; + } + else{ + $cookies.selectedReportTab = 'request_details'; + vm.tabs.request_details = true; } - }; - vm.mentionedPeople = []; - vm.reportHistoryData = {}; - vm.textTraceback = true; - vm.rawTraceback = ''; - vm.traceback = ''; - vm.reportType = 'report'; - vm.report = null; - vm.showLong = false; - vm.reportLogs = null; - vm.requestStats = null; - vm.comment = null; - vm.is_loading = { - report: true, - logs: true, - history: true - }; + + // load report + vm.fetchReport(); + } vm.searchMentionedPeople = function(term){ //vm.mentionedPeople = []; @@ -114,7 +134,7 @@ function ReportViewController($window, $location, $state, $uibModal, $cookies, r }); var result = _.filter(users, function(u){ - return u.label.toLowerCase().indexOf(term) !== -1; + return u.label.toLowerCase().indexOf(term) !== -1; }); vm.mentionedPeople = result; }); @@ -131,21 +151,6 @@ function ReportViewController($window, $location, $state, $uibModal, $cookies, r $location.search(tag, value); }; - vm.tabs = { - slow_calls:false, - request_details:false, - logs:false, - comments:false, - affected_users:false - }; - if ($cookies.selectedReportTab) { - vm.tabs[$cookies.selectedReportTab] = true; - } - else{ - $cookies.selectedReportTab = 'request_details'; - vm.tabs.request_details = true; - } - vm.fetchLogs = function () { if (!vm.report.request_id){ return @@ -171,6 +176,7 @@ function ReportViewController($window, $location, $state, $uibModal, $cookies, r }; vm.fetchReport = function () { + console.log(vm); vm.is_loading.report = true; reportGroupResource.get($state.params, function (data) { vm.is_loading.report = false; @@ -346,9 +352,4 @@ function ReportViewController($window, $location, $state, $uibModal, $cookies, r }); }; - - // load report - vm.fetchReport(); - - } diff --git a/frontend/src/components/views/reports-browser-view/reports-browser-view.js b/frontend/src/components/views/reports-browser-view/reports-browser-view.js index ed9081f..2d2a333 100644 --- a/frontend/src/components/views/reports-browser-view/reports-browser-view.js +++ b/frontend/src/components/views/reports-browser-view/reports-browser-view.js @@ -22,133 +22,173 @@ reportsBrowserViewController.$inject = ['$location', '$cookies', 'stateHolder', 'typeAheadTagHelper', 'reportsResource']; function reportsBrowserViewController($location, $cookies, stateHolder, - typeAheadTagHelper, reportsResource) { + typeAheadTagHelper, reportsResource) { var vm = this; - vm.applications = stateHolder.AeUser.applications_map; - stateHolder.section = 'reports'; - vm.today = function () { - vm.pickerDate = new Date(); - }; - vm.today(); - vm.reportsPage = []; - vm.page = 1; - vm.itemCount = 0; - vm.itemsPerPage = 250; - typeAheadTagHelper.tags = []; - vm.searchParams = {tags: [], page: 1, type: 'report'}; - vm.is_loading = false; - vm.filterTypeAheadOptions = [ - { - type: 'error', - text: 'error:', - 'description': 'Full-text search in your reports', - example: 'error:text-im-looking-for', - tag: 'Error' - }, - { - type: 'view_name', - text: 'view_name:', - 'description': 'Query reports occured in specific views', - example: "view_name:module.foo", - tag: 'View Name' - }, - { - type: 'resource', - text: 'resource:', - 'description': 'Restrict resultset to application', - example: "resource:ID", - tag: 'Application' - }, - { - type: 'priority', - text: 'priority:', - 'description': 'Show reports with specific priority', - example: 'priority:8', - tag: 'Priority' - }, - { - type: 'min_occurences', - text: 'min_occurences:', - 'description': 'Show reports from groups with at least X occurences', - example: 'min_occurences:25', - tag: 'Occurences' - }, - { - type: 'url_path', - text: 'url_path:', - 'description': 'Show reports from specific URL paths', - example: 'url_path:/foo/bar/baz', - tag: 'Url Path' - }, - { - type: 'url_domain', - text: 'url_domain:', - 'description': 'Show reports from specific domain', - example: 'url_domain:domain.com', - tag: 'Domain' - }, - { - type: 'report_status', - text: 'report_status:', - 'description': 'Show reports from groups with specific status', - example: 'report_status:never_reviewed', - tag: 'Status' - }, - { - type: 'request_id', - text: 'request_id:', - 'description': 'Show reports with specific request id', - example: "request_id:883143dc572e4c38aceae92af0ea5ae0", - tag: 'Request ID' - }, - { - type: 'server_name', - text: 'server_name:', - 'description': 'Show reports tagged with this key/value pair', - example: 'server_name:hostname', - tag: 'Tag' - }, - { - type: 'http_status', - text: 'http_status:', - 'description': 'Show reports with specific HTTP status code', - example: "http_status:", - tag: 'HTTP Status' - }, - { - type: 'http_status', - text: 'http_status:500', - 'description': 'Show reports with specific HTTP status code', - example: "http_status:500", - tag: 'HTTP Status' - }, - { - type: 'http_status', - text: 'http_status:404', - 'description': 'Include 404 reports in your search', - example: "http_status:404", - tag: 'HTTP Status' - }, - { - type: 'start_date', - text: 'start_date:', - 'description': 'Show reports newer than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T13:00', - tag: 'Start Date' - }, - { - type: 'end_date', - text: 'end_date:', - 'description': 'Show reports older than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T23:59', - tag: 'End Date' + vm.$onInit = function () { + vm.applications = stateHolder.AeUser.applications_map; + stateHolder.section = 'reports'; + vm.today = function () { + vm.pickerDate = new Date(); + }; + vm.today(); + vm.reportsPage = []; + vm.page = 1; + vm.itemCount = 0; + vm.itemsPerPage = 250; + typeAheadTagHelper.tags = []; + vm.searchParams = {tags: [], page: 1, type: 'report'}; + vm.is_loading = false; + vm.filterTypeAheadOptions = [ + { + type: 'error', + text: 'error:', + 'description': 'Full-text search in your reports', + example: 'error:text-im-looking-for', + tag: 'Error' + }, + { + type: 'view_name', + text: 'view_name:', + 'description': 'Query reports occured in specific views', + example: "view_name:module.foo", + tag: 'View Name' + }, + { + type: 'resource', + text: 'resource:', + 'description': 'Restrict resultset to application', + example: "resource:ID", + tag: 'Application' + }, + { + type: 'priority', + text: 'priority:', + 'description': 'Show reports with specific priority', + example: 'priority:8', + tag: 'Priority' + }, + { + type: 'min_occurences', + text: 'min_occurences:', + 'description': 'Show reports from groups with at least X occurences', + example: 'min_occurences:25', + tag: 'Occurences' + }, + { + type: 'url_path', + text: 'url_path:', + 'description': 'Show reports from specific URL paths', + example: 'url_path:/foo/bar/baz', + tag: 'Url Path' + }, + { + type: 'url_domain', + text: 'url_domain:', + 'description': 'Show reports from specific domain', + example: 'url_domain:domain.com', + tag: 'Domain' + }, + { + type: 'report_status', + text: 'report_status:', + 'description': 'Show reports from groups with specific status', + example: 'report_status:never_reviewed', + tag: 'Status' + }, + { + type: 'request_id', + text: 'request_id:', + 'description': 'Show reports with specific request id', + example: "request_id:883143dc572e4c38aceae92af0ea5ae0", + tag: 'Request ID' + }, + { + type: 'server_name', + text: 'server_name:', + 'description': 'Show reports tagged with this key/value pair', + example: 'server_name:hostname', + tag: 'Tag' + }, + { + type: 'http_status', + text: 'http_status:', + 'description': 'Show reports with specific HTTP status code', + example: "http_status:", + tag: 'HTTP Status' + }, + { + type: 'http_status', + text: 'http_status:500', + 'description': 'Show reports with specific HTTP status code', + example: "http_status:500", + tag: 'HTTP Status' + }, + { + type: 'http_status', + text: 'http_status:404', + 'description': 'Include 404 reports in your search', + example: "http_status:404", + tag: 'HTTP Status' + }, + { + type: 'start_date', + text: 'start_date:', + 'description': 'Show reports newer than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T13:00', + tag: 'Start Date' + }, + { + type: 'end_date', + text: 'end_date:', + 'description': 'Show reports older than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T23:59', + tag: 'End Date' + } + ]; + + vm.filterTypeAhead = undefined; + vm.showDatePicker = false; + vm.manualOpen = false; + vm.aheadFilter = typeAheadTagHelper.aheadFilter; + + vm.notRelativeTime = false; + if ($cookies.notRelativeTime) { + vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); } - ]; - vm.filterTypeAhead = undefined; - vm.showDatePicker = false; - vm.manualOpen = false; - vm.aheadFilter = typeAheadTagHelper.aheadFilter; + _.each(_.range(1, 11), function (priority) { + vm.filterTypeAheadOptions.push({ + type: 'priority', + text: 'priority:' + priority.toString(), + description: 'Show entries with specific priority', + example: 'priority:' + priority, + tag: 'Priority' + }); + }); + _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { + vm.filterTypeAheadOptions.push({ + type: 'report_status', + text: 'report_status:' + status, + 'description': 'Show only reports with this status', + example: 'report_status:' + status, + tag: 'Status ' + status.toUpperCase() + }); + }); + _.each(stateHolder.AeUser.applications, function (item) { + vm.filterTypeAheadOptions.push({ + type: 'resource', + text: 'resource:' + item.resource_id + ':' + item.resource_name, + example: 'resource:' + item.resource_id, + 'tag': item.resource_name, + 'description': 'Restrict resultset to this application' + }); + }); + + // initial load + vm.refresh(); + + } + vm.removeSearchTag = function (tag) { $location.search(tag.type, null); vm.refresh(); @@ -157,44 +197,12 @@ function reportsBrowserViewController($location, $cookies, stateHolder, $location.search(tag.type, tag.value); vm.refresh(); }; - vm.notRelativeTime = false; - if ($cookies.notRelativeTime) { - vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); - } vm.changeRelativeTime = function () { $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime); }; - _.each(_.range(1, 11), function (priority) { - vm.filterTypeAheadOptions.push({ - type: 'priority', - text: 'priority:' + priority.toString(), - description: 'Show entries with specific priority', - example: 'priority:' + priority, - tag: 'Priority' - }); - }); - _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { - vm.filterTypeAheadOptions.push({ - type: 'report_status', - text: 'report_status:' + status, - 'description': 'Show only reports with this status', - example: 'report_status:' + status, - tag: 'Status ' + status.toUpperCase() - }); - }); - _.each(stateHolder.AeUser.applications, function (item) { - vm.filterTypeAheadOptions.push({ - type: 'resource', - text: 'resource:' + item.resource_id + ':' + item.resource_name, - example: 'resource:' + item.resource_id, - 'tag': item.resource_name, - 'description': 'Restrict resultset to this application' - }); - }); - - vm.paginationChange = function(){ + vm.paginationChange = function () { $location.search('page', vm.page); vm.refresh(); }; @@ -222,8 +230,7 @@ function reportsBrowserViewController($location, $cookies, stateHolder, if (tagValue) { tag.value = tagValue.join(':'); } - } - else { + } else { tag.type = 'error'; tag.value = parsed.join(':'); } @@ -232,8 +239,7 @@ function reportsBrowserViewController($location, $cookies, stateHolder, if ('start_date:' == text) { vm.showDatePicker = true; vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format(); - } - else if ('end_date:' == text) { + } else if ('end_date:' == text) { vm.showDatePicker = true; vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format(); } @@ -248,11 +254,10 @@ function reportsBrowserViewController($location, $cookies, stateHolder, vm.filterTypeAhead = undefined; }; - vm.pickerDateChanged = function(){ + vm.pickerDateChanged = function () { if (vm.filterTypeAhead.indexOf('start_date:') == '0') { vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format(); - } - else if (vm.filterTypeAhead.indexOf('end_date:') == '0') { + } else if (vm.filterTypeAhead.indexOf('end_date:') == '0') { vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format(); } vm.showDatePicker = false; @@ -263,16 +268,13 @@ function reportsBrowserViewController($location, $cookies, stateHolder, if (report.group.public) { report.presentation.className = 'public'; report.presentation.tooltip = 'Public'; - } - else if (report.group.fixed) { + } else if (report.group.fixed) { report.presentation.className = 'fixed'; report.presentation.tooltip = 'Fixed'; - } - else if (report.group.read) { + } else if (report.group.read) { report.presentation.className = 'reviewed'; report.presentation.tooltip = 'Reviewed'; - } - else { + } else { report.presentation.className = 'new'; report.presentation.tooltip = 'New'; } @@ -303,13 +305,12 @@ function reportsBrowserViewController($location, $cookies, stateHolder, vm.refresh(); }; - vm.refresh = function(){ + vm.refresh = function () { vm.searchParams = parseSearchToTags($location.search()); vm.page = Number(vm.searchParams.page) || 1; var params = parseTagsToSearch(vm.searchParams); console.log(params); vm.fetchReports(params); }; - // initial load - vm.refresh(); + } diff --git a/frontend/src/components/views/reports-slow-browser-view/reports-slow-browser-view.js b/frontend/src/components/views/reports-slow-browser-view/reports-slow-browser-view.js index b318f18..560af17 100644 --- a/frontend/src/components/views/reports-slow-browser-view/reports-slow-browser-view.js +++ b/frontend/src/components/views/reports-slow-browser-view/reports-slow-browser-view.js @@ -27,109 +27,149 @@ ReportsSlowBrowserViewController.$inject = ['$location', '$cookies', function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) { var vm = this; - vm.applications = stateHolder.AeUser.applications_map; - stateHolder.section = 'slow_reports'; - vm.today = function () { - vm.pickerDate = new Date(); - }; - vm.today(); - vm.reportsPage = []; - vm.page = 1; - vm.itemCount = 0; - vm.itemsPerPage = 250; - typeAheadTagHelper.tags = []; - vm.searchParams = {tags: [], page: 1, type: 'slow_report'}; - vm.is_loading = false; - vm.filterTypeAheadOptions = [ - { - type: 'view_name', - text: 'view_name:', - 'description': 'Query reports occured in specific views', - tag: 'View Name', - example: "view_name:module.foo" - }, - { - type: 'resource', - text: 'resource:', - 'description': 'Restrict resultset to application', - tag: 'Application', - example: "resource:ID" - }, - { - type: 'priority', - text: 'priority:', - 'description': 'Show reports with specific priority', - example: 'priority:8', - tag: 'Priority' - }, - { - type: 'min_occurences', - text: 'min_occurences:', - 'description': 'Show reports from groups with at least X occurences', - example: 'min_occurences:25', - tag: 'Min. occurences' - }, - { - type: 'min_duration', - text: 'min_duration:', - 'description': 'Show reports from groups with average duration >= Xs', - example: 'min_duration:4.5', - tag: 'Min. duration' - }, - { - type: 'url_path', - text: 'url_path:', - 'description': 'Show reports from specific URL paths', - example: 'url_path:/foo/bar/baz', - tag: 'Url Path' - }, - { - type: 'url_domain', - text: 'url_domain:', - 'description': 'Show reports from specific domain', - example: 'url_domain:domain.com', - tag: 'Domain' - }, - { - type: 'request_id', - text: 'request_id:', - 'description': 'Show reports with specific request id', - example: "request_id:883143dc572e4c38aceae92af0ea5ae0", - tag: 'Request ID' - }, - { - type: 'report_status', - text: 'report_status:', - 'description': 'Show reports from groups with specific status', - example: 'report_status:never_reviewed', - tag: 'Status' - }, - { - type: 'server_name', - text: 'server_name:', - 'description': 'Show reports tagged with this key/value pair', - example: 'server_name:hostname', - tag: 'Tag' - }, - { - type: 'start_date', - text: 'start_date:', - 'description': 'Show reports newer than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T13:00', - tag: 'Start Date' - }, - { - type: 'end_date', - text: 'end_date:', - 'description': 'Show reports older than this date (press TAB for dropdown)', - example: 'start_date:2014-08-15T23:59', - tag: 'End Date' + vm.$onInit = function () { + vm.applications = stateHolder.AeUser.applications_map; + stateHolder.section = 'slow_reports'; + vm.today = function () { + vm.pickerDate = new Date(); + }; + vm.today(); + vm.reportsPage = []; + vm.page = 1; + vm.itemCount = 0; + vm.itemsPerPage = 250; + typeAheadTagHelper.tags = []; + vm.searchParams = {tags: [], page: 1, type: 'slow_report'}; + vm.is_loading = false; + vm.filterTypeAheadOptions = [ + { + type: 'view_name', + text: 'view_name:', + 'description': 'Query reports occured in specific views', + tag: 'View Name', + example: "view_name:module.foo" + }, + { + type: 'resource', + text: 'resource:', + 'description': 'Restrict resultset to application', + tag: 'Application', + example: "resource:ID" + }, + { + type: 'priority', + text: 'priority:', + 'description': 'Show reports with specific priority', + example: 'priority:8', + tag: 'Priority' + }, + { + type: 'min_occurences', + text: 'min_occurences:', + 'description': 'Show reports from groups with at least X occurences', + example: 'min_occurences:25', + tag: 'Min. occurences' + }, + { + type: 'min_duration', + text: 'min_duration:', + 'description': 'Show reports from groups with average duration >= Xs', + example: 'min_duration:4.5', + tag: 'Min. duration' + }, + { + type: 'url_path', + text: 'url_path:', + 'description': 'Show reports from specific URL paths', + example: 'url_path:/foo/bar/baz', + tag: 'Url Path' + }, + { + type: 'url_domain', + text: 'url_domain:', + 'description': 'Show reports from specific domain', + example: 'url_domain:domain.com', + tag: 'Domain' + }, + { + type: 'request_id', + text: 'request_id:', + 'description': 'Show reports with specific request id', + example: "request_id:883143dc572e4c38aceae92af0ea5ae0", + tag: 'Request ID' + }, + { + type: 'report_status', + text: 'report_status:', + 'description': 'Show reports from groups with specific status', + example: 'report_status:never_reviewed', + tag: 'Status' + }, + { + type: 'server_name', + text: 'server_name:', + 'description': 'Show reports tagged with this key/value pair', + example: 'server_name:hostname', + tag: 'Tag' + }, + { + type: 'start_date', + text: 'start_date:', + 'description': 'Show reports newer than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T13:00', + tag: 'Start Date' + }, + { + type: 'end_date', + text: 'end_date:', + 'description': 'Show reports older than this date (press TAB for dropdown)', + example: 'start_date:2014-08-15T23:59', + tag: 'End Date' + } + ]; + + vm.filterTypeAhead = undefined; + vm.showDatePicker = false; + vm.aheadFilter = typeAheadTagHelper.aheadFilter; + + vm.manualOpen = false; + vm.notRelativeTime = false; + if ($cookies.notRelativeTime) { + vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); } - ]; - vm.filterTypeAhead = undefined; - vm.showDatePicker = false; - vm.aheadFilter = typeAheadTagHelper.aheadFilter; + _.each(_.range(1, 11), function (priority) { + vm.filterTypeAheadOptions.push({ + type: 'priority', + text: 'priority:' + priority.toString(), + description: 'Show entries with specific priority', + example: 'priority:' + priority, + tag: 'Priority' + }); + }); + _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { + vm.filterTypeAheadOptions.push({ + type: 'report_status', + text: 'report_status:' + status, + 'description': 'Show only reports with this status', + example: 'report_status:' + status, + tag: 'Status ' + status.toUpperCase() + }); + }); + _.each(stateHolder.AeUser.applications, function (item) { + vm.filterTypeAheadOptions.push({ + type: 'resource', + text: 'resource:' + item.resource_id + ':' + item.resource_name, + example: 'resource:' + item.resource_id, + 'tag': item.resource_name, + 'description': 'Restrict resultset to this application' + }); + }); + + //initial load + vm.refresh(); + } + vm.removeSearchTag = function (tag) { $location.search(tag.type, null); vm.refresh(); @@ -138,45 +178,12 @@ function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type $location.search(tag.type, tag.value); vm.refresh(); }; - vm.manualOpen = false; - vm.notRelativeTime = false; - if ($cookies.notRelativeTime) { - vm.notRelativeTime = JSON.parse($cookies.notRelativeTime); - } vm.changeRelativeTime = function () { $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime); }; - _.each(_.range(1, 11), function (priority) { - vm.filterTypeAheadOptions.push({ - type: 'priority', - text: 'priority:' + priority.toString(), - description: 'Show entries with specific priority', - example: 'priority:' + priority, - tag: 'Priority' - }); - }); - _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) { - vm.filterTypeAheadOptions.push({ - type: 'report_status', - text: 'report_status:' + status, - 'description': 'Show only reports with this status', - example: 'report_status:' + status, - tag: 'Status ' + status.toUpperCase() - }); - }); - _.each(stateHolder.AeUser.applications, function (item) { - vm.filterTypeAheadOptions.push({ - type: 'resource', - text: 'resource:' + item.resource_id + ':' + item.resource_name, - example: 'resource:' + item.resource_id, - 'tag': item.resource_name, - 'description': 'Restrict resultset to this application' - }); - }); - vm.typeAheadTag = function (event) { var text = vm.filterTypeAhead; if (_.isObject(vm.filterTypeAhead)) { @@ -287,6 +294,4 @@ function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type vm.fetchReports(params); }; - //initial load - vm.refresh(); } diff --git a/frontend/src/components/views/settings-view/settings-view.js b/frontend/src/components/views/settings-view/settings-view.js index b5387ae..df338fa 100644 --- a/frontend/src/components/views/settings-view/settings-view.js +++ b/frontend/src/components/views/settings-view/settings-view.js @@ -21,7 +21,9 @@ angular.module('appenlight.components.settingsView', []) SettingsViewController.$inject = ['$state', 'AeConfig']; function SettingsViewController($state, AeConfig) { - this.$state = $state; - this.AeConfig = AeConfig; - console.info('SettingsViewController'); + this.$onInit = function () { + this.$state = $state; + this.AeConfig = AeConfig; + console.info('SettingsViewController'); + } } diff --git a/frontend/src/components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.js b/frontend/src/components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.js index 2d9b733..71ddc67 100644 --- a/frontend/src/components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.js +++ b/frontend/src/components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.js @@ -18,15 +18,17 @@ angular.module('appenlight.components.userAlertChannelsEmailNewView', []) controller: AlertChannelsEmailController }); -AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource']; +AlertChannelsEmailController.$inject = ['$state', 'userSelfPropertyResource']; function AlertChannelsEmailController($state, userSelfPropertyResource) { console.debug('AlertChannelsEmailController'); var vm = this; - vm.$state = $state; - vm.loading = {email: false}; - vm.form = {}; - + vm.$onInit = function () { + var vm = this; + vm.$state = $state; + vm.loading = {email: false}; + vm.form = {}; + } vm.createChannel = function () { vm.loading.email = true; console.log('createChannel'); diff --git a/frontend/src/components/views/user-alert-channels-list-view/user-alert-channels-list-view.js b/frontend/src/components/views/user-alert-channels-list-view/user-alert-channels-list-view.js index 4e0bbce..0fc29f9 100644 --- a/frontend/src/components/views/user-alert-channels-list-view/user-alert-channels-list-view.js +++ b/frontend/src/components/views/user-alert-channels-list-view/user-alert-channels-list-view.js @@ -18,75 +18,76 @@ angular.module('appenlight.components.userAlertChannelsListView', []) controller: userAlertChannelsListViewController }); -userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource']; +userAlertChannelsListViewController.$inject = ['$state', 'userSelfPropertyResource', 'applicationsNoIdResource']; function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) { console.debug('AlertChannelsController'); var vm = this; - vm.$state = $state; - vm.loading = {channels: true, applications: true, actions:true}; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {channels: true, applications: true, actions: true}; - vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'}, - function (data) { - vm.loading.channels = false; - }); - - vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'}, - function (data) { - vm.loading.actions = false; - }); + vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'}, + function (data) { + vm.loading.channels = false; + }); - vm.applications = applicationsNoIdResource.query({permission: 'view'}, - function (data) { - vm.loading.applications = false; - }); + vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'}, + function (data) { + vm.loading.actions = false; + }); - var allOps = { - 'eq': 'Equal', - 'ne': 'Not equal', - 'ge': 'Greater or equal', - 'gt': 'Greater than', - 'le': 'Lesser or equal', - 'lt': 'Lesser than', - 'startswith': 'Starts with', - 'endswith': 'Ends with', - 'contains': 'Contains' - }; + vm.applications = applicationsNoIdResource.query({permission: 'view'}, + function (data) { + vm.loading.applications = false; + }); - var fieldOps = {}; - fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['duration'] = ['ge', 'le']; - fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; + var allOps = { + 'eq': 'Equal', + 'ne': 'Not equal', + 'ge': 'Greater or equal', + 'gt': 'Greater than', + 'le': 'Lesser or equal', + 'lt': 'Lesser than', + 'startswith': 'Starts with', + 'endswith': 'Ends with', + 'contains': 'Contains' + }; - var possibleFields = { - '__AND__': 'All met (composite rule)', - '__OR__': 'One met (composite rule)', - '__NOT__': 'Not met (composite rule)', - 'http_status': 'HTTP Status', - 'duration': 'Request duration', - 'group:priority': 'Group -> Priority', - 'url_domain': 'Domain', - 'url_path': 'URL Path', - 'error': 'Error', - 'tags:server_name': 'Tag -> Server name', - 'group:occurences': 'Group -> Occurences' - }; + var fieldOps = {}; + fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['duration'] = ['ge', 'le']; + fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; - vm.ruleDefinitions = { - fieldOps: fieldOps, - allOps: allOps, - possibleFields: possibleFields - }; + var possibleFields = { + '__AND__': 'All met (composite rule)', + '__OR__': 'One met (composite rule)', + '__NOT__': 'Not met (composite rule)', + 'http_status': 'HTTP Status', + 'duration': 'Request duration', + 'group:priority': 'Group -> Priority', + 'url_domain': 'Domain', + 'url_path': 'URL Path', + 'error': 'Error', + 'tags:server_name': 'Tag -> Server name', + 'group:occurences': 'Group -> Occurences' + }; + vm.ruleDefinitions = { + fieldOps: fieldOps, + allOps: allOps, + possibleFields: possibleFields + }; + } vm.addAction = function (channel) { console.log('test'); userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) { @@ -120,7 +121,7 @@ function userAlertChannelsListViewController($state, userSelfPropertyResource, a channel_name: channel.channel_name, channel_value: channel.channel_value }, function () { - vm.alertChannels = _.filter(vm.alertChannels, function(item){ + vm.alertChannels = _.filter(vm.alertChannels, function (item) { return item != channel; }); }); diff --git a/frontend/src/components/views/user-auth-tokens-view/user-auth-tokens-view.js b/frontend/src/components/views/user-auth-tokens-view/user-auth-tokens-view.js index b963db6..a2f6301 100644 --- a/frontend/src/components/views/user-auth-tokens-view/user-auth-tokens-view.js +++ b/frontend/src/components/views/user-auth-tokens-view/user-auth-tokens-view.js @@ -23,16 +23,17 @@ userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'A function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) { console.debug('userAuthTokensViewController'); var vm = this; - vm.$state = $state; - vm.loading = {tokens: true}; + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {tokens: true}; - vm.expireOptions = AeConfig.timeOptions; - - vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'}, - function (data) { - vm.loading.tokens = false; - }); + vm.expireOptions = AeConfig.timeOptions; + vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'}, + function (data) { + vm.loading.tokens = false; + }); + } vm.addToken = function () { vm.loading.tokens = true; userSelfPropertyResource.save({key: 'auth_tokens'}, diff --git a/frontend/src/components/views/user-identities-view/user-identities-view.js b/frontend/src/components/views/user-identities-view/user-identities-view.js index b70e43a..901b24b 100644 --- a/frontend/src/components/views/user-identities-view/user-identities-view.js +++ b/frontend/src/components/views/user-identities-view/user-identities-view.js @@ -23,17 +23,18 @@ UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeCon function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { console.debug('UserIdentitiesController'); var vm = this; - vm.$state = $state; - vm.AeConfig = AeConfig; - vm.loading = {identities: true}; - - vm.identities = userSelfPropertyResource.query( - {key: 'external_identities'}, - function (data) { - vm.loading.identities = false; - console.log(vm.identities); - }); + vm.$onInit = function () { + vm.$state = $state; + vm.AeConfig = AeConfig; + vm.loading = {identities: true}; + vm.identities = userSelfPropertyResource.query( + {key: 'external_identities'}, + function (data) { + vm.loading.identities = false; + console.log(vm.identities); + }); + } vm.removeProvider = function (provider) { console.log('provider', provider); userSelfPropertyResource.delete( @@ -43,7 +44,7 @@ function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { id: provider.id }, function (status) { - if (status){ + if (status) { vm.identities = _.filter(vm.identities, function (item) { return item != provider }); diff --git a/frontend/src/components/views/user-password-view/user-password-view.js b/frontend/src/components/views/user-password-view/user-password-view.js index 9f0f1da..cc03a3e 100644 --- a/frontend/src/components/views/user-password-view/user-password-view.js +++ b/frontend/src/components/views/user-password-view/user-password-view.js @@ -23,10 +23,11 @@ UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource']; function UserPasswordViewController($state, userSelfPropertyResource) { console.debug('UserPasswordViewController'); var vm = this; - vm.$state = $state; - vm.loading = {password: false}; - vm.form = {}; - + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {password: false}; + vm.form = {}; + } vm.updatePassword = function () { vm.loading.password = true; console.log('updatePassword'); diff --git a/frontend/src/components/views/user-profile-view/user-profile-view.js b/frontend/src/components/views/user-profile-view/user-profile-view.js index 1ca8c45..9eb6ce3 100644 --- a/frontend/src/components/views/user-profile-view/user-profile-view.js +++ b/frontend/src/components/views/user-profile-view/user-profile-view.js @@ -23,14 +23,15 @@ UserProfileViewController.$inject = ['$state', 'userSelfResource']; function UserProfileViewController($state, userSelfResource) { console.debug('UserProfileViewController'); var vm = this; - vm.$state = $state; - vm.loading = {profile: true}; - - vm.user = userSelfResource.get(null, function (data) { - vm.loading.profile = false; - console.log('loaded profile'); - }); + vm.$onInit = function () { + vm.$state = $state; + vm.loading = {profile: true}; + vm.user = userSelfResource.get(null, function (data) { + vm.loading.profile = false; + console.log('loaded profile'); + }); + } vm.updateProfile = function () { vm.loading.profile = true; diff --git a/frontend/src/controllers/integrations/bitbucket.js b/frontend/src/controllers/integrations/bitbucket.js index 7dc3051..cffe936 100644 --- a/frontend/src/controllers/integrations/bitbucket.js +++ b/frontend/src/controllers/integrations/bitbucket.js @@ -19,19 +19,21 @@ BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'in function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.priorities = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.priorities = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -50,8 +52,7 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -75,8 +76,7 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -84,5 +84,4 @@ function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } diff --git a/frontend/src/controllers/integrations/github.js b/frontend/src/controllers/integrations/github.js index e9b1eeb..2d2f961 100644 --- a/frontend/src/controllers/integrations/github.js +++ b/frontend/src/controllers/integrations/github.js @@ -19,19 +19,21 @@ GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.assignees = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.assignees = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -42,8 +44,7 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.loading = false; if (data.error_messages) { vm.error_messages = data.error_messages; - } - else { + } else { vm.assignees = data.assignees; vm.statuses = data.statuses; vm.form.responsible = vm.assignees[0]; @@ -52,8 +53,7 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -70,15 +70,13 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.loading = false; if (data.error_messages) { vm.error_messages = data.error_messages; - } - else { + } else { $uibModalInstance.dismiss('success'); } }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -86,5 +84,4 @@ function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } diff --git a/frontend/src/controllers/integrations/jira.js b/frontend/src/controllers/integrations/jira.js index 1acb5d3..8a91d6f 100644 --- a/frontend/src/controllers/integrations/jira.js +++ b/frontend/src/controllers/integrations/jira.js @@ -19,20 +19,22 @@ JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integra function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) { var vm = this; - vm.loading = true; - vm.assignees = []; - vm.report = report; - vm.integrationName = integrationName; - vm.statuses = []; - vm.priorities = []; - vm.issue_types = []; - vm.error_messages = []; - vm.form = { - content: '\n' + - 'Issue created for report: ' + - $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true}) - }; - + vm.$onInit = function () { + vm.loading = true; + vm.assignees = []; + vm.report = report; + vm.integrationName = integrationName; + vm.statuses = []; + vm.priorities = []; + vm.issue_types = []; + vm.error_messages = []; + vm.form = { + content: '\n' + + 'Issue created for report: ' + + $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true}) + }; + vm.fetchInfo(); + } vm.fetchInfo = function () { integrationResource.get({ resourceId: vm.report.resource_id, @@ -54,8 +56,7 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, console.log('ERROR'); if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -79,8 +80,7 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, }, function (error_data) { if (error_data.data.error_messages) { vm.error_messages = error_data.data.error_messages; - } - else { + } else { vm.error_messages = ['There was a problem processing your request']; } }); @@ -88,5 +88,4 @@ function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - vm.fetchInfo(); } diff --git a/frontend/src/controllers/reports/assign_report.js b/frontend/src/controllers/reports/assign_report.js index d1a1d21..5c36732 100644 --- a/frontend/src/controllers/reports/assign_report.js +++ b/frontend/src/controllers/reports/assign_report.js @@ -17,22 +17,24 @@ AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) { var vm = this; - vm.loading = true; - vm.assignedUsers = []; - vm.unAssignedUsers = []; - vm.report = report; - vm.fetchAssignments = function () { - reportGroupPropertyResource.get({ - groupId: vm.report.group_id, - key: 'assigned_users' - }, null, - function (data) { - vm.assignedUsers = data.assigned; - vm.unAssignedUsers = data.unassigned; - vm.loading = false; - }); + vm.$onInit = function () { + vm.loading = true; + vm.assignedUsers = []; + vm.unAssignedUsers = []; + vm.report = report; + vm.fetchAssignments = function () { + reportGroupPropertyResource.get({ + groupId: vm.report.group_id, + key: 'assigned_users' + }, null, + function (data) { + vm.assignedUsers = data.assigned; + vm.unAssignedUsers = data.unassigned; + vm.loading = false; + }); + } + vm.fetchAssignments(); } - vm.reassignUser = function (user) { var is_assigned = vm.assignedUsers.indexOf(user); if (is_assigned != -1) { @@ -74,7 +76,4 @@ function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report vm.cancel = function () { $uibModalInstance.dismiss('cancel'); }; - - vm.fetchAssignments(); - } diff --git a/frontend/src/directives/permissions/permissions.js b/frontend/src/directives/permissions/permissions.js index 2452ad7..d989796 100644 --- a/frontend/src/directives/permissions/permissions.js +++ b/frontend/src/directives/permissions/permissions.js @@ -21,64 +21,65 @@ ApplicationPermissionsController.$inject = ['sectionViewResource', function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) { var vm = this; - vm.form = { - autocompleteUser: '', - selectedGroup: null, - selectedUserPermissions: {}, - selectedGroupPermissions: {} - } - vm.possibleGroups = groupsResource.query(null, function(){ - if (vm.possibleGroups.length > 0){ - vm.form.selectedGroup = vm.possibleGroups[0].id; + vm.$onInit = function () { + vm.form = { + autocompleteUser: '', + selectedGroup: null, + selectedUserPermissions: {}, + selectedGroupPermissions: {} } - }); - console.log('g', vm.possibleGroups); - vm.possibleUsers = []; - _.each(vm.resource.possible_permissions, function (perm) { - vm.form.selectedUserPermissions[perm] = false; - vm.form.selectedGroupPermissions[perm] = false; - }); - - /** - * Converts the permission list into {user, permission_list objects} - * for rendering in templates - * **/ - var tmpObj = { - user: {}, - group: {} - }; - _.each(vm.currentPermissions, function (perm) { - console.log(perm); - if (perm.type == 'user') { - if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { - tmpObj[perm.type][perm.user_name] = { - self: perm, - permissions: [] - } + vm.possibleGroups = groupsResource.query(null, function () { + if (vm.possibleGroups.length > 0) { + vm.form.selectedGroup = vm.possibleGroups[0].id; } - if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) { - tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name); - } - } - else { - if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') { - tmpObj[perm.type][perm.group_name] = { - self: perm, - permissions: [] + }); + console.log('g', vm.possibleGroups); + vm.possibleUsers = []; + _.each(vm.resource.possible_permissions, function (perm) { + vm.form.selectedUserPermissions[perm] = false; + vm.form.selectedGroupPermissions[perm] = false; + }); + + /** + * Converts the permission list into {user, permission_list objects} + * for rendering in templates + * **/ + var tmpObj = { + user: {}, + group: {} + }; + _.each(vm.currentPermissions, function (perm) { + console.log(perm); + if (perm.type == 'user') { + if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { + tmpObj[perm.type][perm.user_name] = { + self: perm, + permissions: [] + } + } + if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) { + tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name); + } + } else { + if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') { + tmpObj[perm.type][perm.group_name] = { + self: perm, + permissions: [] + } + } + if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) { + tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name); } - } - if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) { - tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name); - } - } - }); - vm.currentPermissions = { - user: _.values(tmpObj.user), - group: _.values(tmpObj.group), - }; + } + }); + vm.currentPermissions = { + user: _.values(tmpObj.user), + group: _.values(tmpObj.group), + }; + console.log('test', tmpObj, vm.currentPermissions); + } - console.log('test', tmpObj, vm.currentPermissions); vm.searchUsers = function (searchPhrase) { console.log('SEARCHING'); diff --git a/frontend/src/directives/plugin_config/plugin_config.js b/frontend/src/directives/plugin_config/plugin_config.js index dbbba0d..d5a9a56 100644 --- a/frontend/src/directives/plugin_config/plugin_config.js +++ b/frontend/src/directives/plugin_config/plugin_config.js @@ -28,7 +28,9 @@ angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig PluginConfig.$inject = ['stateHolder']; function PluginConfig(stateHolder) { - this.plugins = {}; - this.inclusions = stateHolder.plugins.inclusions[this.section]; + this.$onInit = function () { + this.plugins = {}; + this.inclusions = stateHolder.plugins.inclusions[this.section]; + } } }); diff --git a/frontend/src/directives/postprocess_action/postprocess_action.js b/frontend/src/directives/postprocess_action/postprocess_action.js index c372b18..94a5dbd 100644 --- a/frontend/src/directives/postprocess_action/postprocess_action.js +++ b/frontend/src/directives/postprocess_action/postprocess_action.js @@ -15,69 +15,71 @@ angular.module('appenlight.directives.postProcessAction', []).directive('postProcessAction', ['applicationsPropertyResource', function (applicationsPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { action: '=', resource: '=' }, - controller:postProcessActionController, - controllerAs:'ctrl', + controller: postProcessActionController, + controllerAs: 'ctrl', restrict: 'E', templateUrl: 'directives/postprocess_action/postprocess_action.html' }; - function postProcessActionController(){ - var vm = this; - console.log(vm); - var allOps = { - 'eq': 'Equal', - 'ne': 'Not equal', - 'ge': 'Greater or equal', - 'gt': 'Greater than', - 'le': 'Lesser or equal', - 'lt': 'Lesser than', - 'startswith': 'Starts with', - 'endswith': 'Ends with', - 'contains': 'Contains' - }; - var fieldOps = {}; - fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; - fieldOps['duration'] = ['ge', 'le']; - fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', - 'contains']; - fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; + function postProcessActionController() { + var vm = this; + vm.$onInit = function () { + console.log(vm); + var allOps = { + 'eq': 'Equal', + 'ne': 'Not equal', + 'ge': 'Greater or equal', + 'gt': 'Greater than', + 'le': 'Lesser or equal', + 'lt': 'Lesser than', + 'startswith': 'Starts with', + 'endswith': 'Ends with', + 'contains': 'Contains' + }; - var possibleFields = { - '__AND__': 'All met (composite rule)', - '__OR__': 'One met (composite rule)', - '__NOT__': 'Not met (composite rule)', - 'http_status': 'HTTP Status', - 'duration': 'Request duration', - 'group:priority': 'Group -> Priority', - 'url_domain': 'Domain', - 'url_path': 'URL Path', - 'error': 'Error', - 'tags:server_name': 'Tag -> Server name', - 'group:occurences': 'Group -> Occurences' - }; + var fieldOps = {}; + fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le']; + fieldOps['duration'] = ['ge', 'le']; + fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith', + 'contains']; + fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le']; - vm.ruleDefinitions = { - fieldOps: fieldOps, - allOps: allOps, - possibleFields: possibleFields - }; + var possibleFields = { + '__AND__': 'All met (composite rule)', + '__OR__': 'One met (composite rule)', + '__NOT__': 'Not met (composite rule)', + 'http_status': 'HTTP Status', + 'duration': 'Request duration', + 'group:priority': 'Group -> Priority', + 'url_domain': 'Domain', + 'url_path': 'URL Path', + 'error': 'Error', + 'tags:server_name': 'Tag -> Server name', + 'group:occurences': 'Group -> Occurences' + }; - vm.possibleActions = [ - ['1', 'Priority +1'], - ['-1', 'Priority -1'] - ]; + vm.ruleDefinitions = { + fieldOps: fieldOps, + allOps: allOps, + possibleFields: possibleFields + }; + vm.possibleActions = [ + ['1', 'Priority +1'], + ['-1', 'Priority -1'] + ]; + } vm.deleteAction = function (action) { applicationsPropertyResource.remove({ pkey: vm.action.pkey, @@ -108,7 +110,7 @@ angular.module('appenlight.directives.postProcessAction', []).directive('postPro }); }; - vm.setDirty = function() { + vm.setDirty = function () { vm.action.dirty = true; console.log('set dirty'); }; diff --git a/frontend/src/directives/report_alert_action/report_alert_action.js b/frontend/src/directives/report_alert_action/report_alert_action.js index 0958b13..ef2c5e9 100644 --- a/frontend/src/directives/report_alert_action/report_alert_action.js +++ b/frontend/src/directives/report_alert_action/report_alert_action.js @@ -15,20 +15,36 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportAlertAction', ['userSelfPropertyResource', function (userSelfPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { action: '=', applications: '=', possibleChannels: '=', actions: '=', ruleDefinitions: '=' }, - controller:reportAlertActionController, - controllerAs:'ctrl', + controller: reportAlertActionController, + controllerAs: 'ctrl', restrict: 'E', templateUrl: 'directives/report_alert_action/report_alert_action.html' }; - function reportAlertActionController(){ + + function reportAlertActionController() { var vm = this; + vm.$onInit = function () { + vm.possibleNotifications = [ + ['always', 'Always'], + ['only_first', 'Only New'], + ]; + + vm.possibleChannels = _.filter(vm.possibleChannels, function (c) { + return c.supports_report_alerting + } + ); + + if (vm.possibleChannels.length > 0) { + vm.channelToBind = vm.possibleChannels[0]; + } + } vm.deleteAction = function (actions, action) { var get = { key: 'alert_channels_rules', @@ -40,7 +56,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }; - vm.bindChannel = function(){ + vm.bindChannel = function () { var post = { channel_pkey: vm.channelToBind.pkey, action_pkey: vm.action.pkey @@ -57,7 +73,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }); }; - vm.unBindChannel = function(channel){ + vm.unBindChannel = function (channel) { userSelfPropertyResource.delete({ key: 'alert_channels_actions_binds', channel_pkey: channel.pkey, @@ -90,20 +106,7 @@ angular.module('appenlight.directives.reportAlertAction', []).directive('reportA }); }; - vm.possibleNotifications = [ - ['always', 'Always'], - ['only_first', 'Only New'], - ]; - - vm.possibleChannels = _.filter(vm.possibleChannels, function(c){ - return c.supports_report_alerting } - ); - - if (vm.possibleChannels.length > 0){ - vm.channelToBind = vm.possibleChannels[0]; - } - - vm.setDirty = function() { + vm.setDirty = function () { vm.action.dirty = true; console.log('set dirty'); }; diff --git a/frontend/src/directives/rule/rule.js b/frontend/src/directives/rule/rule.js index e7efa66..86e9c62 100644 --- a/frontend/src/directives/rule/rule.js +++ b/frontend/src/directives/rule/rule.js @@ -29,10 +29,10 @@ angular.module('appenlight.directives.rule', []).directive('rule', function () { }; function RuleController(){ var vm = this; - - vm.rule.dirty = false; - vm.oldField = vm.rule.field; - + vm.$onInit = function () { + vm.rule.dirty = false; + vm.oldField = vm.rule.field; + } vm.add = function () { vm.rule.rules.push( {op: "eq", field: 'http_status', value: ""} diff --git a/frontend/src/directives/rule_read_only/rule_read_only.js b/frontend/src/directives/rule_read_only/rule_read_only.js index f8e0d5b..a57a8c5 100644 --- a/frontend/src/directives/rule_read_only/rule_read_only.js +++ b/frontend/src/directives/rule_read_only/rule_read_only.js @@ -15,7 +15,7 @@ angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly', ['userSelfPropertyResource', function (userSelfPropertyResource) { return { scope: {}, - bindToController:{ + bindToController: { parentObj: '=', rule: '=', ruleDefinitions: '=', @@ -24,15 +24,18 @@ angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly }, restrict: 'E', templateUrl: 'directives/rule_read_only/rule_read_only.html', - controller:RuleController, - controllerAs:'rule_ctrlr' + controller: RuleController, + controllerAs: 'rule_ctrlr' } - function RuleController(){ + + function RuleController() { var vm = this; - vm.readOnlyPossibleFields = {}; - var labelPairs = _.pairs(vm.parentObj.config); - _.each(labelPairs, function (entry) { - vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label; - }); + vm.$onInit = function () { + vm.readOnlyPossibleFields = {}; + var labelPairs = _.pairs(vm.parentObj.config); + _.each(labelPairs, function (entry) { + vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label; + }); + } } }]);