"undefined"!=typeofmodule&&"undefined"!=typeofexports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";functiond(a,b){returnS(new(S(function(){},{prototype:a})),b)}functione(a){returnR(arguments,function(b){b!==a&&R(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}functionf(a,b){varc=[];for(vardina.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}returnc}functiong(a){if(Object.keys)returnObject.keys(a);varb=[];returnR(a,function(a,c){b.push(c)}),b}functionh(a,b){if(Array.prototype.indexOf)returna.indexOf(b,Number(arguments[2])||0);varc=a.length>>>0,d=Number(arguments[2])||0;for(d=d<0?Math.ceil(d):Math.floor(d),d<0&&(d+=c);d<c;d++)if(dina&&a[d]===b)returnd;return-1}functioni(a,b,c,d){vare,i=f(c,d),j={},k=[];for(varlini)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(varmine)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);returnS({},j,b)}functionj(a,b,c){if(!c){c=[];for(vardina)c.push(d)}for(vare=0;e<c.length;e++){varf=c[e];if(a[f]!=b[f])return!1}return!0}functionk(a,b){varc={};returnR(a,function(a){c[a]=b[a]}),c}functionl(a){varb={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));returnR(c,function(c){cina&&(b[c]=a[c])}),b}functionm(a){varb={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(vardina)h(c,d)==-1&&(b[d]=a[d]);returnb}functionn(a,b){varc=Q(a),d=c?[]:{};returnR(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}functiono(a,b){varc=Q(a)?[]:{};returnR(a,function(a,d){c[d]=b(a,d)}),c}functionp(a){returna.then(c,function(){})&&a}functionq(a,b){vard=1,f=2,i={},j=[],k=i,l=S(a.when(i),{$$promises:i,$$values:i});this.study=function(i){functionn(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throwr.splice(0,h(r,c)),newError("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,O(a))q.push(c,[function(){returnb.get(a)}],j);else{vare=b.annotate(a);R(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}functiono(a){returnP(a)&&a.then&&a.$$promises}if(!P(i))thrownewError("'invocables' must be an object");varp=g(i||{}),q=[],r=[],s={};returnR(i,n),i=r=s=null,function(d,f,g){functionh(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,deleter.$$inheritedValues,n.resolve(t))}functioni(a){r.$$failure=a,n.reject(a)}functionj(c,e,f){functionj(a){l.reject(a),i(a)}functionk(){if(!M(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}varl=a.defer(),m=0;R(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!P(d))thrownewError("'locals' must be an object")}elsed=k;if(f){if(!o(f))thrownewError("'parent' must be a promise returned by $resolve.resolve()")}elsef=l;varn=a.defer(),r=n.promise,s=r.$$promises={},t=S({},d),u=1+q.length/3,v=!1;if(M(f.$$failure))returni(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),S(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(varw=0,x=q.length;w<x;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);returnr}},this.resolve=function(a,b,c,d){returnthis.study(a)(b,c,d)}}functionr(a,b,c){this.fromConfig=function(a,b,c){returnM(a.template)?this.fromString(a.template,b):M(a.templateUrl)?this.fromUrl(a.templateUrl,b):M(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){returnN(a)?a(b):a},this.fromUrl=function(c,d){returnN(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){returna.data})},this.fromProvider=function(a,b,d){returnc.invoke(a,null,d||{params:b})}}functions(a,b,e){functionf(b,c,d,e){if(q.push(b),o[b])returno[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))thrownewError("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])thrownewError("Dupli