text: angular.mock={};angular.mock.$BrowserProvider=function(){this.$get=function(){return new angular.mock.$Browser()}};angular.mock.$Browser=function(){var a=this;this.isMock=true;a.$$url="http://server";a.$$lastUrl=a.$$url;a.pollFns=[];a.$$completeOutstandingRequest=angular.noop;a.$$incOutstandingRequestCount=angular.noop;a.onUrlChange=function(b){a.pollFns.push(function(){if(a.$$lastUrl!=a.$$url){a.$$lastUrl=a.$$url;b(a.$$url)}});return b};a.cookieHash={};a.lastCookieHash={};a.deferredFns=[];a.deferredNextId=0;a.defer=function(c,b){b=b||0;a.deferredFns.push({time:(a.defer.now+b),fn:c,id:a.deferredNextId});a.deferredFns.sort(function(e,d){return e.time-d.time});return a.deferredNextId++};a.defer.now=0;a.defer.cancel=function(c){var b;angular.forEach(a.deferredFns,function(e,d){if(e.id===c){b=d}});if(b!==undefined){a.deferredFns.splice(b,1);return true}return false};a.defer.flush=function(b){if(angular.isDefined(b)){a.defer.now+=b}else{if(a.deferredFns.length){a.defer.now=a.deferredFns[a.deferredFns.length-1].time}else{throw Error("No deferred tasks to be flushed")}}while(a.deferredFns.length&&a.deferredFns[0].time<=a.defer.now){a.deferredFns.shift().fn()}};a.$$baseHref="";a.baseHref=function(){return this.$$baseHref};a.$$scripts=[];a.addJs=function(d,b){var c={url:d,done:b};a.$$scripts.push(c);return c}};angular.mock.$Browser.prototype={poll:function poll(){angular.forEach(this.pollFns,function(a){a()})},addPollFn:function(a){this.pollFns.push(a);return a},url:function(a,b){if(a){this.$$url=a;return this}return this.$$url},cookies:function(a,b){if(a){if(b==undefined){delete this.cookieHash[a]}else{if(angular.isString(b)&&b.length<=4096){this.cookieHash[a]=b}}}else{if(!angular.equals(this.cookieHash,this.lastCookieHash)){this.lastCookieHash=angular.copy(this.cookieHash);this.cookieHash=angular.copy(this.cookieHash)}return this.cookieHash}},notifyWhenNoOutstandingRequests:function(a){a()}};angular.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"rethrow":a=function(d){throw d};break;case"log":var c=[];a=function(d){c.push(d)};a.errors=c;break;default:throw Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}};this.$get=function(){return a};this.mode("rethrow")};angular.mock.$LogProvider=function(){function a(d,c,b){return d.concat(Array.prototype.slice.call(c,b))}this.$get=function(){var b={log:function(){b.log.logs.push(a([],arguments,0))},warn:function(){b.warn.logs.push(a([],arguments,0))},info:function(){b.info.logs.push(a([],arguments,0))},error:function(){b.error.logs.push(a([],arguments,0))}};b.reset=function(){b.log.logs=[];b.warn.logs=[];b.info.logs=[];b.error.logs=[]};b.assertEmpty=function(){var c=[];angular.forEach(["error","warn","info","log"],function(d){angular.forEach(b[d].logs,function(e){angular.forEach(e,function(f){c.push("MOCK $log ("+d+"): "+String(f)+"\n"+(f.stack||""))})})});if(c.length){c.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:");c.push("");throw new Error(c.join("\n---------\n"))}};b.reset();return b}};angular.mock.TzDate=function(f,d){var a=new Date(0);if(angular.isString(d)){var b=d;a.origDate=angular.fromJson(angular.toJson({date:d})).date;d=a.origDate.getTime();if(isNaN(d)){throw {name:"Illegal Argument",message:"Arg '"+b+"' passed into TzDate constructor is not a valid date string"}}}else{a.origDate=new Date(d)}var e=new Date(d).getTimezoneOffset();a.offsetDiff=e*60*1000-f*1000*60*60;a.date=new Date(d+a.offsetDiff);a.getTime=function(){return a.date.getTime()-a.offsetDiff};a.toLocaleDateString=function(){return a.date.toLocaleDateString()};a.getFullYear=function(){return a.date.getFullYear()};a.getMonth=function(){return a.date.getMonth()};a.getDate=function(){return a.date.getDate()};a.getHours=function(){return a.date.getHours()};a.getMinutes=function(){return a.date.getMinutes()};a.getSeconds=function(){return a.date.getSeconds()};a.getTimezoneOffset=function(){return f*60};a.getUTCFullYear=function(){return a.origDate.getUTCFullYear()};a.getUTCMonth=function(){return a.origDate.getUTCMonth()};a.getUTCDate=function(){return a.origDate.getUTCDate()};a.getUTCHours=function(){return a.origDate.getUTCHours()};a.getUTCMinutes=function(){return a.origDate.getUTCMinutes()};a.getUTCSeconds=function(){return a.origDate.getUTCSeconds()};a.getDay=function(){return a.origDate.getDay()};var c=["getMilliseconds","getUTCDay","getUTCMilliseconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toJSON","toGMTString","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];angular.forEach(c,function(g){a[g]=function(){throw Error("Method '"+g+"' is not implemented in the TzDate mock")}});return a};angular.mock.TzDate.prototype=Date.prototype;angular.mock.dump=function(a){return b(a);function b(e){var d;if(angular.isElement(e)){e=angular.element(e);d=angular.element("<div></div>");angular.forEach(e,function(f){d.append(angular.element(f).clone())});d=d.html()}else{if(angular.isArray(e)){d=[];angular.forEach(e,function(f){d.push(b(f))});d="[ "+d.join(", ")+" ]"}else{if(angular.isObject(e)){if(angular.isFunction(e.$eval)&&angular.isFunction(e.$apply)){d=c(e)}else{if(e instanceof Error){d=e.stack||(""+e.name+": "+e.message)}else{d=angular.toJson(e,true)}}}else{d=String(e)}}}return d}function c(f,g){g=g||"  ";var e=[g+"Scope("+f.$id+"): {"];for(var d in f){if(f.hasOwnProperty(d)&&!d.match(/^(\$|this)/)){e.push("  "+d+": "+angular.toJson(f[d]))}}var h=f.$$childHead;while(h){e.push(c(h,g+"  "));h=h.$$nextSibling}e.push("}");return e.join("\n"+g)}};angular.mock.$HttpBackendProvider=function(){this.$get=[createHttpBackendMock]};function createHttpBackendMock(c,i){var h=[],b=[],f=[],d=angular.bind(f,f.push);function e(j,k,l){if(angular.isFunction(j)){return j}return function(){return angular.isNumber(j)?[j,k,l]:[200,j,k]}}function g(j,k,q,s,n){var t=new MockXhr(),l=b[0],r=false;function o(u){return(angular.isString(u)||angular.isFunction(u)||u instanceof RegExp)?u:angular.toJson(u)}if(l&&l.match(j,k)){if(!l.matchData(q)){throw Error("Expected "+l+" with different data\nEXPECTED: "+o(l.data)+"\nGOT:      "+q)}if(!l.matchHeaders(n)){throw Error("Expected "+l+" with different headers\nEXPECTED: "+o(l.headers)+"\nGOT:      "+o(n))}b.shift();if(l.response){f.push(function(){var u=l.response(j,k,q,n);t.$$respHeaders=u[2];s(u[0],u[1],t.getAllResponseHeaders())});return}r=true}var p=-1,m;while((m=h[++p])){if(m.match(j,k,q,n||{})){if(m.response){(i?i.defer:d)(function(){var u=m.response(j,k,q,n);t.$$respHeaders=u[2];s(u[0],u[1],t.getAllResponseHeaders())})}else{if(m.passThrough){c(j,k,q,s,n)}else{throw Error("No response defined !")}}return}}throw r?Error("No response defined !"):Error("Unexpected request: "+j+" "+k+"\n"+(l?"Expected "+l:"No more request expected"))}g.when=function(o,j,m,n){var l=new MockHttpExpectation(o,j,m,n),k={respond:function(p,q,r){l.response=e(p,q,r)}};if(i){k.passThrough=function(){l.passThrough=true}}h.push(l);return k};a("when");g.expect=function(n,k,l,m){var j=new MockHttpExpectation(n,k,l,m);b.push(j);return{respond:function(o,p,q){j.response=e(o,p,q)}}};a("expect");g.flush=function(j){if(!f.length){throw Error("No pending request to flush !")}if(angular.isDefined(j)){while(j--){if(!f.length){throw Error("No more pending request to flush !")}f.shift()()}}else{while(f.length){f.shift()()}}g.verifyNoOutstandingExpectation()};g.verifyNoOutstandingExpectation=function(){if(b.length){throw Error("Unsatisfied requests: "+b.join(", "))}};g.verifyNoOutstandingRequest=function(){if(f.length){throw Error("Unflushed requests: "+f.length)}};g.resetExpectations=function(){b.length=0;f.length=0};return g;function a(j){angular.forEach(["GET","DELETE","JSONP"],function(k){g[j+k]=function(l,m){return g[j](k,l,undefined,m)}});angular.forEach(["PUT","POST"],function(k){g[j+k]=function(l,m,n){return g[j](k,l,m,n)}})}}function MockHttpExpectation(d,a,b,c){this.data=b;this.headers=c;this.match=function(e,f,i,g){if(d!=e){return false}if(!this.matchUrl(f)){return false}if(angular.isDefined(i)&&!this.matchData(i)){return false}if(angular.isDefined(g)&&!this.matchHeaders(g)){return false}return true};this.matchUrl=function(e){if(!a){return true}if(angular.isFunction(a.test)){return a.test(e)}return a==e};this.matchHeaders=function(e){if(angular.isUndefined(c)){return true}if(angular.isFunction(c)){return c(e)}return angular.equals(c,e)};this.matchData=function(e){if(angular.isUndefined(b)){return true}if(b&&angular.isFunction(b.test)){return b.test(e)}if(b&&!angular.isString(b)){return angular.toJson(b)==e}return b==e};this.toString=function(){return d+" "+a}}function MockXhr(){MockXhr.$$lastInstance=this;this.open=function(c,a,b){this.$$method=c;this.$$url=a;this.$$async=b;this.$$reqHeaders={};this.$$respHeaders={}};this.send=function(a){this.$$data=a};this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b};this.getResponseHeader=function(a){var b=this.$$respHeaders[a];if(b){return b}a=angular.lowercase(a);b=this.$$respHeaders[a];if(b){return b}b=undefined;angular.forEach(this.$$respHeaders,function(c,d){if(!b&&angular.lowercase(d)==a){b=c}});return b};this.getAllResponseHeaders=function(){var a=[];angular.forEach(this.$$respHeaders,function(c,b){a.push(b+": "+c)});return a.join("\n")};this.abort=angular.noop}angular.module("ngMock",["ng"]).service({$browser:angular.mock.$BrowserProvider,$exceptionHandler:angular.mock.$ExceptionHandlerProvider,$log:angular.mock.$LogProvider,$httpBackend:angular.mock.$HttpBackendProvider});angular.module("ngMockE2E",["ng"]).config(function(a){a.decorator("$httpBackend",angular.mock.e2e.$httpBackendDecorator)});angular.mock.e2e={};angular.mock.e2e.$httpBackendDecorator=["$delegate","$browser",createHttpBackendMock];window.jstestdriver&&(function(a){a.dump=function(){var b=[];angular.forEach(arguments,function(c){b.push(angular.mock.dump(c))});jstestdriver.console.log.apply(jstestdriver.console,b)}})(window);window.jasmine&&(function(c){function b(){return jasmine.getEnv().currentSpec}function a(){var d=b();return d&&d.queue.running}c.module=angular.mock.module=function(){var e=Array.prototype.slice.call(arguments,0);var d=new Error("Module Declaration Location:").stack;return a()?f():f;function f(){var g=b();if(g.$injector){throw Error("Injector already created, can not register a module!")}else{var h=g.$modules||(g.$modules=[]);angular.forEach(e,function(i){h.push(i)})}}};c.inject=angular.mock.inject=function(){var e=Array.prototype.slice.call(arguments,0);var d=new Error("Declaration Location").stack;return a()?f():f;function f(){var g=b();var h=g.$modules||[];h.unshift("ngMock");h.unshift("ng");var m=g.$injector;if(!m){m=g.$injector=angular.injector(h)}for(var j=0,k=e.length;j<k;j++){try{m.invoke(e[j]||angular.noop,this)}catch(l){if(l.stack){l.stack+="\n"+d}throw l}}}}})(window);