From 7cd74c04d3b6cfff31425b47345a0958045eb75f Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 30 Apr 2012 16:34:20 -0700 Subject: [PATCH] upgrade to AngularJS 1.0.0rc7 rc-generation --- app/lib/angular/angular-cookies.js | 2 +- app/lib/angular/angular-cookies.min.js | 2 +- app/lib/angular/angular-loader.js | 2 +- app/lib/angular/angular-loader.min.js | 2 +- app/lib/angular/angular-resource.js | 2 +- app/lib/angular/angular-resource.min.js | 2 +- app/lib/angular/angular-sanitize.js | 10 +- app/lib/angular/angular-sanitize.min.js | 2 +- app/lib/angular/angular.js | 190 ++++++++++++--- app/lib/angular/angular.min.js | 296 ++++++++++++------------ app/lib/angular/version.txt | 2 +- test/lib/angular/angular-mocks.js | 2 +- test/lib/angular/angular-scenario.js | 190 ++++++++++++--- test/lib/angular/version.txt | 2 +- 14 files changed, 467 insertions(+), 239 deletions(-) diff --git a/app/lib/angular/angular-cookies.js b/app/lib/angular/angular-cookies.js index f1f4b8a..bb2c0f8 100644 --- a/app/lib/angular/angular-cookies.js +++ b/app/lib/angular/angular-cookies.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/app/lib/angular/angular-cookies.min.js b/app/lib/angular/angular-cookies.min.js index 0eecce6..27eb44f 100644 --- a/app/lib/angular/angular-cookies.min.js +++ b/app/lib/angular/angular-cookies.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.0.0rc6 + AngularJS v1.0.0rc7 (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ diff --git a/app/lib/angular/angular-loader.js b/app/lib/angular/angular-loader.js index e514366..a9bc30e 100644 --- a/app/lib/angular/angular-loader.js +++ b/app/lib/angular/angular-loader.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/app/lib/angular/angular-loader.min.js b/app/lib/angular/angular-loader.min.js index f6e82d0..5b455b2 100644 --- a/app/lib/angular/angular-loader.min.js +++ b/app/lib/angular/angular-loader.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.0.0rc6 + AngularJS v1.0.0rc7 (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ diff --git a/app/lib/angular/angular-resource.js b/app/lib/angular/angular-resource.js index 9e0f76f..ddd1354 100644 --- a/app/lib/angular/angular-resource.js +++ b/app/lib/angular/angular-resource.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/app/lib/angular/angular-resource.min.js b/app/lib/angular/angular-resource.min.js index 2c6b01e..6c773f6 100644 --- a/app/lib/angular/angular-resource.min.js +++ b/app/lib/angular/angular-resource.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.0.0rc6 + AngularJS v1.0.0rc7 (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ diff --git a/app/lib/angular/angular-sanitize.js b/app/lib/angular/angular-sanitize.js index bd5bf97..f1ccfe9 100644 --- a/app/lib/angular/angular-sanitize.js +++ b/app/lib/angular/angular-sanitize.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ @@ -400,18 +400,16 @@ function htmlSanitizeWriter(buf){ // define ngSanitize module and register $sanitize service angular.module('ngSanitize', []).value('$sanitize', $sanitize); - - /** * @ngdoc directive * @name angular.module.ngSanitize.directive.ngBindHtml * * @description * Creates a binding that will sanitize the result of evaluating the `expression` with the - * {@link angular.module.ng.$sanitize $sanitize} service and innerHTML the result into the current - * element. + * {@link angular.module.ngSanitize.$sanitize $sanitize} service and innerHTML the result into the + * current element. * - * See {@link angular.module.ng.$sanitize $sanitize} docs for examples. + * See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples. * * @element ANY * @param {expression} ngBindHtml {@link guide/dev_guide.expressions Expression} to evaluate. diff --git a/app/lib/angular/angular-sanitize.min.js b/app/lib/angular/angular-sanitize.min.js index aad0f1f..e1e49c9 100644 --- a/app/lib/angular/angular-sanitize.min.js +++ b/app/lib/angular/angular-sanitize.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.0.0rc6 + AngularJS v1.0.0rc7 (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ diff --git a/app/lib/angular/angular.js b/app/lib/angular/angular.js index e6b7d7f..dca7169 100644 --- a/app/lib/angular/angular.js +++ b/app/lib/angular/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ @@ -1243,11 +1243,11 @@ function setupModuleLoader(window) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.0.0rc6', // all of these placeholder strings will be replaced by rake's + full: '1.0.0rc7', // all of these placeholder strings will be replaced by rake's major: 1, // compile task minor: 0, dot: 0, - codeName: 'runny-nose' + codeName: 'rc-generation' }; @@ -1305,6 +1305,7 @@ function publishExternalAPI(angular){ ngClass: ngClassDirective, ngClassEven: ngClassEvenDirective, ngClassOdd: ngClassOddDirective, + ngCsp: ngCspDirective, ngCloak: ngCloakDirective, ngController: ngControllerDirective, ngForm: ngFormDirective, @@ -1873,8 +1874,8 @@ function createEventHandler(element) { // Remove monkey-patched methods (IE), // as they would cause memory leaks in IE8. - if (msie < 8) { - // IE7 does not allow to delete property on native object + if (msie <= 8) { + // IE7/8 does not allow to delete property on native object event.preventDefault = null; event.stopPropagation = null; event.isDefaultPrevented = null; @@ -1918,14 +1919,12 @@ forEach({ bindFn(element, 'mouseover', function(event) { counter++; if (counter == 1) { - event.type = 'mouseenter'; mouseenter(event); } }); bindFn(element, 'mouseout', function(event) { counter --; if (counter == 0) { - event.type = 'mouseleave'; mouseleave(event); } }); @@ -5277,7 +5276,7 @@ var OPERATORS = { }; var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'}; -function lex(text){ +function lex(text, csp){ var tokens = [], token, index = 0, @@ -5437,7 +5436,7 @@ function lex(text){ if (OPERATORS.hasOwnProperty(ident)) { token.fn = token.json = OPERATORS[ident]; } else { - var getter = getterFn(ident); + var getter = getterFn(ident, csp); token.fn = extend(function(self, locals) { return (getter(self, locals)); }, { @@ -5511,10 +5510,10 @@ function lex(text){ ///////////////////////////////////////// -function parser(text, json, $filter){ +function parser(text, json, $filter, csp){ var ZERO = valueFn(0), value, - tokens = lex(text), + tokens = lex(text, csp), assignment = _assignment, functionCall = _functionCall, fieldAccess = _fieldAccess, @@ -5782,7 +5781,7 @@ function parser(text, json, $filter){ function _fieldAccess(object) { var field = expect().text; - var getter = getterFn(field); + var getter = getterFn(field, csp); return extend( function(self, locals) { return getter(object(self, locals), locals); @@ -5935,32 +5934,119 @@ function getter(obj, path, bindFnToScope) { var getterFnCache = {}; -function getterFn(path) { +/** + * Implementation of the "Black Hole" variant from: + * - http://jsperf.com/angularjs-parse-getter/4 + * - http://jsperf.com/path-evaluation-simplified/7 + */ +function cspSafeGetterFn(key0, key1, key2, key3, key4) { + return function(scope, locals) { + var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope, + promise; + + if (!pathVal) return pathVal; + + pathVal = pathVal[key0]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key1 || !pathVal) return pathVal; + + pathVal = pathVal[key1]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key2 || !pathVal) return pathVal; + + pathVal = pathVal[key2]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key3 || !pathVal) return pathVal; + + pathVal = pathVal[key3]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key4 || !pathVal) return pathVal; + + pathVal = pathVal[key4]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + return pathVal; + }; +}; + +function getterFn(path, csp) { if (getterFnCache.hasOwnProperty(path)) { return getterFnCache[path]; } - var fn, code = 'var l, fn, p;\n'; - forEach(path.split('.'), function(key, index) { - code += 'if(!s) return s;\n' + - 'l=s;\n' + - 's='+ (index - // we simply direference 's' on any .dot notation - ? 's' - // but if we are first then we check locals firs, and if so read it first - : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' + - 'if (s && s.then) {\n' + - ' if (!("$$v" in s)) {\n' + - ' p=s;\n' + - ' p.$$v = undefined;\n' + - ' p.then(function(v) {p.$$v=v;});\n' + - '}\n' + - ' s=s.$$v\n' + - '}\n'; - }); - code += 'return s;'; - fn = Function('s', 'k', code); - fn.toString = function() { return code; }; + var pathKeys = path.split('.'), + pathKeysLength = pathKeys.length, + fn; + + if (csp) { + fn = (pathKeysLength < 6) + ? cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4]) + : function(scope, locals) { + var i = 0, val; + do { + val = cspSafeGetterFn( + pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++] + )(scope, locals); + locals = undefined; // clear after first iteration + } while (i < pathKeysLength); + }; + } else { + var code = 'var l, fn, p;\n'; + forEach(pathKeys, function(key, index) { + code += 'if(!s) return s;\n' + + 'l=s;\n' + + 's='+ (index + // we simply dereference 's' on any .dot notation + ? 's' + // but if we are first then we check locals first, and if so read it first + : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' + + 'if (s && s.then) {\n' + + ' if (!("$$v" in s)) {\n' + + ' p=s;\n' + + ' p.$$v = undefined;\n' + + ' p.then(function(v) {p.$$v=v;});\n' + + '}\n' + + ' s=s.$$v\n' + + '}\n'; + }); + code += 'return s;'; + fn = Function('s', 'k', code); // s=scope, k=locals + fn.toString = function() { return code; }; + } return getterFnCache[path] = fn; } @@ -5969,13 +6055,13 @@ function getterFn(path) { function $ParseProvider() { var cache = {}; - this.$get = ['$filter', function($filter) { + this.$get = ['$filter', '$sniffer', function($filter, $sniffer) { return function(exp) { switch(typeof exp) { case 'string': return cache.hasOwnProperty(exp) ? cache[exp] - : cache[exp] = parser(exp, false, $filter); + : cache[exp] = parser(exp, false, $filter, $sniffer.csp); case 'function': return exp; default: @@ -7551,7 +7637,9 @@ function $SnifferProvider() { } return eventSupport[event]; - } + }, + // TODO(i): currently there is no way to feature detect CSP without triggering alerts + csp: false }; }]; } @@ -11373,7 +11461,7 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { * @description * Creates a binding that will innerHTML the result of evaluating the `expression` into the current * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if - * {@link angular.module.ng.$compileProvider.directive.ngBindHtml ngBindHtml} directive is too + * {@link angular.module.ngSanitize.directive.ngBindHtml ngBindHtml} directive is too * restrictive and when you absolutely trust the source of the content you are binding to. * * See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples. @@ -11694,6 +11782,32 @@ var ngControllerDirective = [function() { }; }]; +/** + * @ngdoc directive + * @name angular.module.ng.$compileProvider.directive.ngCsp + * @priority 1000 + * + * @description + * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support. + * This directive should be used on the root element of the application (typically the `` + * element or other element with the {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} + * directive). + * + * If enabled the performance of template expression evaluator will suffer slightly, so don't enable + * this mode unless you need it. + * + * @element html + */ + +var ngCspDirective = ['$sniffer', function($sniffer) { + return { + priority: 1000, + compile: function() { + $sniffer.csp = true; + } + }; +}]; + /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClick diff --git a/app/lib/angular/angular.min.js b/app/lib/angular/angular.min.js index b3bd03e..e12d854 100644 --- a/app/lib/angular/angular.min.js +++ b/app/lib/angular/angular.min.js @@ -1,151 +1,153 @@ /* - AngularJS v1.0.0rc6 + AngularJS v1.0.0rc7 (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ -(function(X,aa,u){'use strict';function m(b,a,c){var d;if(b)if(L(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(M(b)&&ua(b.length))for(d=0;d=0&&b.splice(c,1);return a}function Y(b,a){if(na(b)||b&&b.$evalAsync&&b.$watch)throw v("Can't copy Window or Scope");if(a){if(b=== -a)throw v("Can't copy equivalent objects or arrays");if(H(b)){for(;a.length;)a.pop();for(var c=0;c2?ha.call(arguments,2):[];return L(a)&&!(a instanceof RegExp)?c.length? -function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function dc(b,a){var c=a;/^\$+/.test(b)?c=u:na(a)?c="$WINDOW":a&&aa===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function ba(b,a){return JSON.stringify(b,dc,a?" ":null)}function pb(b){return E(b)?JSON.parse(b):b}function Wa(b){b&&b.length!==0?(b=J(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1; -return b}function ya(b){b=t(b).clone();try{b.html("")}catch(a){}return t("
").append(b).html().match(/^(<[^>]+>)/)[1]}function Xa(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=A(c[1])?decodeURIComponent(c[1]):!0)});return a}function qb(b){var a=[];m(b,function(b,d){a.push(Ya(d,!0)+(b===!0?"":"="+Ya(b,!0)))});return a.length?a.join("&"):""}function Za(b){return Ya(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Ya(b, -a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function ec(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app","ng-app","x-ng-app","data-ng-app"],j=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(f,function(a){f[a]=!0;c(aa.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b= -j.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&f[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function rb(b,a){b=t(b);a=a||[];a.unshift("ng");var c=sb(a);c.invoke(["$rootScope","$compile","$injector",function(a,c,g){a.$apply(function(){b.data("$injector",g);c(b)(a)})}]);return c}function $a(b,a){a=a||"_";return b.replace(fc,function(b,d){return(d?a:"")+b.toLowerCase()})}function oa(b,a,c){if(!b)throw new v("Argument '"+(a||"?")+"' is "+(c||"required")); -return b}function pa(b,a,c){c&&H(b)&&(b=b[b.length-1]);oa(L(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function gc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw v("No module: "+d);var b=[],c=[],i=a("$injector","invoke"), -k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function tb(b){return b.replace(hc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(ic, -"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,f,j,h,i,k,n,l;b.length;){f=b.shift();j=0;for(h=f.length;j 
"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function qa(b){ub(b);for(var a=0,b=b.childNodes||[];a-1}function vb(b,a){a&&m(a.split(" "),function(a){b.className=T((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+T(a)+" "," "))})}function wb(b,a){a&&m(a.split(" "),function(a){if(!Ca(b,a))b.className=T(b.className+" "+T(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&A(a.length)&&!na(a)?a:[a],c=0;c4096&&d.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),K.length>20&&d.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+K.length+" > 20 )")}else{if(i.cookie!==Q){Q=i.cookie;c=Q.split("; ");K={};for(f=0;f0&&(K[unescape(e.substring(0,g))]=unescape(e.substring(g+ -1)))}return K}};h.defer=function(a,b){var c;p++;c=l(function(){delete Z[c];g(a)},b||0);Z[c]=!0;return c};h.defer.cancel=function(a){return Z[a]?(delete Z[a],o(a),g(x),!0):!1};h.baseHref=function(){var b=a.find("base").attr("href");return b?b.replace(/^https?\:\/\/[^\/]*/,""):b}}function rc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new qc(b,d,d.find("body"),a,c)}]}function sc(){this.$get=function(){function b(b,d){function e(a){if(a!=n){if(l){if(l==a)l=a.n}else l= -a;g(a.n,a.p);g(a,n);n=a;n.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw v("cacheId "+b+" taken");var f=0,j=D({},d,{id:b}),h={},i=d&&d.capacity||Number.MAX_VALUE,k={},n=null,l=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);s(b)||(a in h||f++,h[a]=b,f>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),h[a]},remove:function(a){var b=k[a];if(b==n)n=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete h[a];f--},removeAll:function(){h={};f=0;k= -{};n=l=null},destroy:function(){k=j=h=null;delete a[b]},info:function(){return D({},j,{size:f})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function tc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Ab(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g=/\<\\>/i,f=/^\<[\s\S]*\>$/;this.directive=function h(d,e){E(d)?(oa(e,"directive"), -a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var f=b.invoke(a);if(L(f))f={compile:B(f)};else if(!f.compile&&f.link)f.compile=B(f.link);f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(g){c(g)}});return e}])),a[d].push(e)):m(d,ob(h));return this};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller", -function(b,i,k,n,l,o,Z){function p(a,b,c){a instanceof t||(a=t(a));m(a,function(b,c){b.nodeType==3&&(a[c]=t(b).wrap("").parent()[0])});var d=G(a,b,a,c);return function(b,c){oa(b,"scope");var e=c?sa.clone.call(a):a;r(e.data("$scope",b),"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function q(a,b){throw v("Unsupported '"+b+"' for '"+a+"'.");}function r(a,b){try{a.addClass(b)}catch(c){}}function G(a,b,c,d){function e(a,c,d,g){for(var h,k,i,l,n,o=0,V=0,q=f.length;oz.priority)break;if(I=z.scope)ca("isolated scope",w,z,C),M(I)&&(r(C,"ng-isolate-scope"),w=z),r(C,"ng-scope"),y=y||z;O=z.name;if(I=z.controller)D=D||{},ca("'"+O+"' controller",D[O],z,C),D[O]=z;if(I=z.transclude)ca("transclusion",x,z,C),x=z,l=z.priority,I=="element"?(I=t(b),b=(C=c.$$element=t("<\!-- "+O+": "+c[O]+" --\>"))[0],da(e,t(I[0]),b),s=p(I,d,l)):(I=t(cb(b)),C.html(""),s=p(I.contents(), -d));if(I=z.template)ca("template",R,z,C),R=z,O=I.replace(g,C.html()),b=t(O)[0],z.replace?(da(e,C,b),F={$attr:{}},a=a.concat(N(b,a.splice(A+1,a.length-(A+1)),F)),K(c,F),F=a.length):C.html(O);if(z.templateUrl)ca("template",R,z,C),R=z,G=Q(a.splice(A,a.length-A),i,C,c,e,z.replace,s),F=a.length;else if(z.compile)try{B=z.compile(C,c,s),L(B)?f(null,B):B&&f(B.pre,B.post)}catch(J){k(J,ya(C))}if(z.terminal)i.terminal=!0,l=Math.max(l,z.priority)}B=G||i;B.scope=y&&y.scope;B.transclude=x&&s;return B}function w(d, -e,f,g){var i=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),n=0,o=e.length;nl.priority)&&l.restrict.indexOf(f)!=-1)d.push(l),i=!0}catch(q){k(q)}return i}function K(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){f=="class"?r(e,b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function Q(a,b,c, -d,e,h,i){var k=[],o,q,Ga=c[0],p=a.shift(),r=D({},p,{templateUrl:null,transclude:null}),m=c.html();c.html("");n.get(p.templateUrl,{cache:l}).success(function(l){l=T(l).replace(g,m);if(h&&!l.match(f))throw v("Template must have exactly one root element: "+l);var n,p;h?(p={$attr:{}},n=t(l)[0],da(e,c,n),N(c[0],a,p),K(d,p)):(n=c[0],c.html(l));a.unshift(r);o=y(a,c,d,i);for(q=G(c.contents(),i);k.length;){var Z=k.pop(),l=k.pop();p=k.pop();var ka=k.pop(),w=n;p!==Ga&&(w=cb(n),da(l,t(p),w));o(function(){b(q, -ka,w,e,Z)},ka,w,e,Z)}k=null}).error(function(a,b,c,d){throw v("Failed to load template: "+d.url);});return function(a,c,d,e,f){k?(k.push(c),k.push(d),k.push(e),k.push(f)):o(function(){b(q,c,d,e,f)},c,d,e,f)}}function R(a,b){return b.priority-a.priority}function ca(a,b,c,d){if(b)throw v("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+ya(d));}function I(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:B(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);r(d.data("$binding", -e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function O(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:B(function(a,b,c){d==="class"&&(e=i(c[d],!0));c.$$observers[d]=[];c[d]=u;a.$watch(e,function(a){c.$set(d,a)})})})}function da(a,b,c){var d=b[0],e=d.parentNode,f,g;if(a){f=0;for(g=a.length;f0){var e=Q[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,e,f){return(b=g(b,c,e,f))?(a&&!b.json&&d("is not valid json",b),Q.shift(),b):!1}function j(a){f(a)||d("is unexpected, expecting ["+a+"]",g())}function h(a,b){return function(c,d){return a(c, -d,b)}}function i(a,b,c){return function(d,e){return b(d,e,a,c)}}function k(){for(var a=[];;)if(Q.length>0&&!g("}",")",";","]")&&a.push(da()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e","<=",">="))a=i(a,b.fn,p());return a}function q(){for(var a=r(),b;b=f("*","/","%");)a=i(a,b.fn,r());return a}function r(){var a;return f("+")?G():(a=f("-"))?i(w,a.fn,r()):(a=f("!"))?h(a.fn,r()):G()}function G(){var a;if(f("("))a=da(),j(")");else if(f("["))a=N();else if(f("{"))a= -y();else{var b=f();(a=b.fn)||d("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=ca(a,c),c=null):b.text==="["?(c=a,a=O(a)):b.text==="."?(c=a,a=I(a)):d("IMPOSSIBLE");return a}function N(){var a=[];if(e().text!="]"){do a.push(R());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,f=0;f7),hasEvent:function(c){if(s(a[c])){var d=b.document.createElement("div");a[c]="on"+c in d}return a[c]}}}]}function Qc(){this.$get=B(X)}function Ib(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=J(T(b.substr(0,e)));d=T(b.substr(e+1)); -c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Jb(b){var a=M(b)?b:u;return function(c){a||(a=Ib(b));return c?a[J(c)]||null:a}}function Kb(b,a,c){if(L(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Rc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){E(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=pb(d,!0)));return d}],transformRequest:[function(a){return M(a)&&Sa.apply(a)!=="[object File]"?ba(a):a}],headers:{common:{Accept:"application/json, text/plain, */*", -"X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json"},put:{"Content-Type":"application/json"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,h,i,k){function n(a){function c(a){var b=D({},a,{data:Kb(a.data,a.headers,g)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=la(a.method);var e=a.transformRequest||d.transformRequest,g=a.transformResponse||d.transformResponse,h=d.headers,h= -D({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},h.common,h[J(a.method)],a.headers),e=Kb(a.data,Jb(h),e),j;s(a.data)&&delete h["Content-Type"];j=l(a,e,h);j=j.then(c,c);m(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(u,[a,b,Ib(c)]):m.remove(u));f(b,a,c);h.$apply()}function f(a,c,d){c=Math.max(c, -0);(200<=c&&c<300?l.resolve:l.reject)({data:a,status:c,headers:Jb(d),config:b})}function j(){var a=Ua(n.pendingRequests,b);a!==-1&&n.pendingRequests.splice(a,1)}var l=i.defer(),k=l.promise,m,p,u=o(b.url,b.params);n.pendingRequests.push(b);k.then(j,j);b.cache&&b.method=="GET"&&(m=M(b.cache)?b.cache:Z);if(m)if(p=m.get(u))if(p.then)return p.then(j,j),p;else H(p)?f(p[1],p[0],Y(p[2])):f(p,200,{});else m.put(u,k);p||a(b.method,u,c,e,d,b.timeout,b.withCredentials);return k}function o(a,b){if(!b)return a; -var c=[];$b(b,function(a,b){a==null||a==u||(M(a)&&(a=ba(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var Z=c("$http"),p=[];m(e,function(a){p.push(E(a)?k.get(a):k.invoke(a))});n.pendingRequests=[];(function(a){m(arguments,function(a){n[a]=function(b,c){return n(D(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){n[a]=function(b,c,d){return n(D(d||{},{method:a,url:b,data:c}))}})})("post", -"put");n.defaults=d;return n}]}function Sc(){this.$get=["$browser","$window","$document",function(b,a,c){return Tc(b,Uc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Tc(b,a,c,d,e,g){function f(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;ga?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c)}return function(e,h,i,k,n,l,o){function u(a, -c,d,e){c=(h.match(Db)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(x)}b.$$incOutstandingRequestCount();h=h||b.url();if(J(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};f(h.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?u(k,200,d[p].data):u(k,-2);delete d[p]})}else{var q=new a;q.open(e,h,!0);m(n,function(a,b){a&&q.setRequestHeader(b,a)});var r;q.onreadystatechange=function(){q.readyState==4&&u(k,r||q.status, -q.responseText,q.getAllResponseHeaders())};if(o)q.withCredentials=!0;q.send(i||"");l>0&&c(function(){r=-1;q.abort()},l)}}}function Vc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","), -SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function Lb(b){function a(a,e){return b.factory(a+c, -e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Mb);a("date",Nb);a("filter",Wc);a("json",Xc);a("limitTo",Yc);a("lowercase",Zc);a("number",Ob);a("orderBy",Pb);a("uppercase",$c)}function Wc(){return function(b,a){if(!(b instanceof Array))return b;var c=[];c.check=function(a){for(var b=0;b-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c=k+n)for(var i=f.length-k,l=0;l0||e>-c)e+=c;e===0&&c==-12&&(e=12);return kb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Nb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,f=0;b[9]&&(g=F(b[9]+b[10]),f=F(b[9]+b[11]));a.setUTCFullYear(F(b[1]),F(b[2])-1,F(b[3]));a.setUTCHours(F(b[4]||0)-g,F(b[5]|| -0)-f,F(b[6]||0),F(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;return function(c,e){var g="",f=[],j,h,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;E(c)&&(c=ad.test(c)?F(c):a(c));ua(c)&&(c=new Date(c));if(!ma(c))return c;for(;e;)(h=bd.exec(e))?(f=f.concat(ha.call(h,1)),e=f.pop()):(f.push(e),e=null);m(f,function(a){j=cd[a];g+=j?j(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Xc(){return function(b){return ba(b, -!0)}}function Yc(){return function(b,a){if(!(b instanceof Array))return b;var a=F(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;dn?(d.$setValidity("maxlength",!1),u):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function lb(b,a){b="ngClass"+b;return S(function(c,d,e){c.$watch(e[b],function(b, -e){if(a===!0||c.$index%2===a)e&&b!==e&&(M(e)&&!H(e)&&(e=Ta(e,function(a,b){if(a)return b})),d.removeClass(H(e)?e.join(" "):e)),M(b)&&!H(b)&&(b=Ta(b,function(a,b){if(a)return b})),b&&d.addClass(H(b)?b.join(" "):b)},!0)})}var J=function(b){return E(b)?b.toLowerCase():b},la=function(b){return E(b)?b.toUpperCase():b},v=X.Error,ga=F((/msie (\d+)/.exec(J(navigator.userAgent))||[])[1]),t,ia,ha=[].slice,Qa=[].push,Sa=Object.prototype.toString,Ub=X.angular||(X.angular={}),ra,Bb,$=["0","0","0"];x.$inject=[]; -wa.$inject=[];Bb=ga<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var fc=/[A-Z]/g,dd={full:"1.0.0rc6",major:1,minor:0,dot:0,codeName:"runny-nose"},Aa={},za="ng-"+(new Date).getTime(),jc=1,ed=X.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},db=X.document.removeEventListener?function(b,a,c){b.removeEventListener(a, -c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},hc=/([\:\-\_]+(.))/g,ic=/^moz([A-Z])/,sa=U.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);U(X).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?t(this[b]):t(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Ea={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ea[J(b)]= -b});var zb={};m("input,select,option,textarea,button,form".split(","),function(b){zb[la(b)]=!0});m({data:Ba,inheritedData:Da,scope:function(b){return Da(b,"$scope")},controller:xb,injector:function(b){return Da(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ca,css:function(b,a,c){a=tb(a);if(A(c))b.style[a]=c;else{var d;ga<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];ga<=8&&(d=d===""?u:d);return d}},attr:function(b,a,c){var d=J(a);if(Ea[d])if(A(c))c? -(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||x).specified?d:u;else if(A(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?u:b},prop:function(b,a,c){if(A(c))b[a]=c;else return b[a]},text:D(ga<9?function(b,a){if(b.nodeType==1){if(s(a))return b.innerText;b.innerText=a}else{if(s(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(s(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(s(a))return b.value; -b.value=a},html:function(b,a){if(s(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a, -c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Hc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},jb={},Uc=X.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new v("This browser does not support XMLHttpRequest."); -};Lb.$inject=["$provide"];Mb.$inject=["$locale"];Ob.$inject=["$locale"];var Rb=".",cd={yyyy:P("FullYear",4),yy:P("FullYear",2,0,!0),y:P("FullYear",1),MMMM:Ka("Month"),MMM:Ka("Month",!0),MM:P("Month",2,1),M:P("Month",1,1),dd:P("Date",2),d:P("Date",1),HH:P("Hours",2),H:P("Hours",1),hh:P("Hours",2,-12),h:P("Hours",1,-12),mm:P("Minutes",2),m:P("Minutes",1),ss:P("Seconds",2),s:P("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=a.getTimezoneOffset(); -return kb(a/60,2)+kb(Math.abs(a%60),2)}},bd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,ad=/^\d+$/;Nb.$inject=["$locale"];var Zc=B(J),$c=B(la);Pb.$inject=["$parse"];var fd=B({restrict:"E",compile:function(a,c){c.href||c.$set("href","");return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),mb={};m(Ea,function(a,c){var d=ea("ng-"+c);mb[d]=function(){return{priority:100,compile:function(){return function(a,g,f){f.$$observers[c]=[]; -a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}});m(["src","href"],function(a){var c=ea("ng-"+a);mb[c]=function(){return{priority:99,compile:function(){return function(d,e,g){d=g[c];d==u?(g.$$observers[a]=[],g.$observe(c,function(c){g.$set(a,c)})):g.$set(a,d)}}}}});var Na={$addControl:x,$removeControl:x,$setValidity:x,$setDirty:x};Sb.$inject=["$element","$attrs","$scope"];var Qa={name:"form",restrict:"E",controller:Sb,compile:function(){return{pre:function(a,c,d,e){d.action||c.bind("submit",function(a){a.preventDefault()}); -var g=c.parent().controller("form"),f=d.name||d.ngForm;f&&(a[f]=e);g&&c.bind("$destroy",function(){g.$removeControl(e);f&&(a[f]=u);D(e,Na)})}}}},gd=B(Qa),hd=B(D(Y(Qa),{restrict:"EAC"})),id=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,jd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,kd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Wb={text:Pa,number:function(a,c,d,e,g,f){Pa(a,c,d,e,g,f);e.$parsers.push(function(a){var c=W(a);return c||kd.test(a)?(e.$setValidity("number", -!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),u)});e.$formatters.push(function(a){return W(a)?"":""+a});if(d.min){var j=parseFloat(d.min),a=function(a){return!W(a)&&ah?(e.$setValidity("max",!1),u):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return W(a)||ua(a)? -(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),u)})},url:function(a,c,d,e,g,f){Pa(a,c,d,e,g,f);a=function(a){return W(a)||id.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),u)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){Pa(a,c,d,e,g,f);a=function(a){return W(a)||jd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),u)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){s(d.name)&&c.attr("name",va());c.bind("click", -function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;E(g)||(g=!0);E(f)||(f=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:f})},hidden:x,button:x,submit:x,reset:x}, -Xb=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,f){f&&(Wb[J(g.type)]||Wb.text)(d,e,g,f,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Tb="ng-dirty",ld=["$scope","$exceptionHandler","$attrs","ngModel","$element",function(a,c,d,e,g){function f(a,c){c=c?"-"+$a(c,"-"):"";g.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine= -!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$render=x;this.$name=d.name;var j=g.inheritedData("$formController")||Na,h=0,i=this.$error={};g.addClass(Oa);f(!0);this.$setValidity=function(a,c){if(i[a]!==!c){if(c){if(i[a]&&h--,!h)f(!0),this.$valid=!0,this.$invalid=!1}else f(!1),this.$invalid=!0,this.$valid=!1,h++;i[a]=!c;f(c,a);j.$setValidity(a,c,this)}};this.$setViewValue=function(a){this.$viewValue=a;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,g.removeClass(Oa).addClass(Tb),j.$setDirty(); -m(this.$parsers,function(c){a=c(a)});if(this.$modelValue!==a)this.$modelValue=a,e(a),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var k=this;a.$watch(function(){return e()},function(a){if(k.$modelValue!==a){var c=k.$formatters,d=c.length;for(k.$modelValue=a;d--;)a=c[d](a);if(k.$viewValue!==a)k.$viewValue=a,k.$render()}})}],md=[function(){return{inject:{ngModel:"accessor"},require:["ngModel","^?form"],controller:ld,link:function(a,c,d,e){var g=e[0],f=e[1]||Na;f.$addControl(g); -c.bind("$destroy",function(){f.$removeControl(g)})}}}],nd=B({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Yb=[function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){var g=function(a){if(d.required&&(W(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}}],od=function(){return{require:"ngModel",link:function(a, -c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",",f=function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(T(a))});return c};e.$parsers.push(f);e.$formatters.push(function(a){return H(a)&&!fa(f(e.$viewValue),a)?a.join(", "):u})}}},pd=/^(true|false|\d+)$/,qd=[function(){return{priority:100,compile:function(a,c){return pd.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){g.$$observers.value=[];a.$watch(g.ngValue,function(a){g.$set("value", -a,!1)})}}}}],rd=S(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==u?"":a)})}),sd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],td=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],ud=lb("",!0),vd=lb("Odd", -0),wd=lb("Even",1),xd=S({compile:function(a,c){c.$set("ngCloak",u);a.removeClass("ng-cloak")}}),yd=[function(){return{scope:!0,controller:"@"}}],Zb={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);Zb[c]=["$parse",function(d){return function(e,g,f){var j=d(f[c]);g.bind(J(a),function(a){e.$apply(function(){j(e,{$event:a})})})}}]});var zd=S(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Ad=["$http", -"$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,f){var j=f.ngInclude||f.src,h=f.onload||"",i=f.autoscroll;return function(f,g){var l=0,o,m=function(){o&&(o.$destroy(),o=null);g.html("")};f.$watch(j,function(j){var q=++l;j?a.get(j,{cache:c}).success(function(a){q===l&&(o&&o.$destroy(),o=f.$new(),g.html(a),e(g.contents())(o),A(i)&&(!i||f.$eval(i))&&d(),o.$emit("$includeContentLoaded"),f.$eval(h))}).error(function(){q===l&&m()}):m()})}}}}], -Bd=S({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Cd=S({terminal:!0,priority:1E3}),Dd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,f){var j=f.count,h=g.attr(f.$attr.when),i=f.offset||0,k=e.$eval(h),n={};m(k,function(a,e){n[e]=c(a.replace(d,"{{"+j+"-"+i+"}}"))});e.$watch(function(){var c=parseFloat(e.$eval(j));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),n[c](e,g,!0))},function(a){g.text(a)})}}}],Ed=S({transclude:"element",priority:1E3, -terminal:!0,compile:function(a,c,d){return function(a,c,f){var j=f.ngRepeat,f=j.match(/^\s*(.+)\s+in\s+(.*)\s*$/),h,i,k;if(!f)throw v("Expected ngRepeat in form of '_item_ in _collection_' but got '"+j+"'.");j=f[1];h=f[2];f=j.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!f)throw v("'item' in 'item in collection' should be identifier or (key, value) but got '"+j+"'.");i=f[3]||f[1];k=f[2];var n=new fb;a.$watch(function(a){var e,f,j=a.$eval(h),m=bc(j,!0),r,u=new fb,t,y,w,s,x=c;if(H(j))w= -j||[];else{w=[];for(t in j)j.hasOwnProperty(t)&&t.charAt(0)!="$"&&w.push(t);w.sort()}e=0;for(f=w.length;eC;)t.pop().element.remove()}for(;r.length>v;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw v("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),n=c(i[2]?i[1]:k),o=c(i[7]),r=[[{element:f,label:""}]];q&&(a(q)(e),q.removeClass("ng-scope"),q.remove());f.html(""); -f.bind("change",function(){e.$apply(function(){var a,c=o(e)||[],d={},h,i,j,m,p,q;if(x){i=[];m=0;for(q=r.length;m@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}'); +(function(W,$,r){'use strict';function m(b,a,c){var d;if(b)if(L(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(M(b)&&sa(b.length))for(d=0;d=0&&b.splice(c,1);return a}function X(b,a){if(ka(b)||b&&b.$evalAsync&&b.$watch)throw x("Can't copy Window or Scope");if(a){if(b=== +a)throw x("Can't copy equivalent objects or arrays");if(J(b)){for(;a.length;)a.pop();for(var c=0;c2?fa.call(arguments,2):[];return L(a)&&!(a instanceof RegExp)?c.length? +function(){return arguments.length?a.apply(b,c.concat(fa.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function dc(b,a){var c=a;/^\$+/.test(b)?c=r:ka(a)?c="$WINDOW":a&&$===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function aa(b,a){return JSON.stringify(b,dc,a?" ":null)}function ob(b){return H(b)?JSON.parse(b):b}function Va(b){b&&b.length!==0?(b=G(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b} +function wa(b){b=t(b).clone();try{b.html("")}catch(a){}return t("
").append(b).html().match(/^(<[^>]+>)/)[1]}function Wa(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=E(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];m(b,function(b,d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi, +"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function ec(b,a){function c(a){a&&d.push(a)}var d=[b],e,h,g=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(g,function(a){g[a]=!0;c($.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,h=(b[2]|| +"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&g[b.name])e=a,h=b.value})}});e&&a(e,h?[h]:[])}function qb(b,a){b=t(b);a=a||[];a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$compile","$injector",function(a,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function Za(b,a){a=a||"_";return b.replace(fc,function(b,d){return(d?a:"")+b.toLowerCase()})}function la(b,a,c){if(!b)throw new x("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ma(b,a,c){c&&J(b)&& +(b=b[b.length-1]);la(L(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function gc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,h){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return j}}if(!e)throw x("No module: "+d);var b=[],c=[],k=a("$injector","invoke"),j={_invokeQueue:b,_runBlocks:c, +requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){c.push(a);return this}};h&&k(h);return j})}})}function sb(b){return b.replace(hc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(ic,"Moz$1")}function $a(b, +a){function c(){var e;for(var b=[this],c=a,g,f,i,k,j,n,l;b.length;){g=b.shift();f=0;for(i=g.length;f 
"+b;a.removeChild(a.firstChild);ab(this,a.childNodes);this.remove()}else ab(this,b)}function bb(b){return b.cloneNode(!0)}function na(b){tb(b);for(var a=0,b=b.childNodes||[];a-1}function ub(b,a){a&&m(a.split(" "),function(a){b.className=T((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+T(a)+" "," "))})}function vb(b,a){a&&m(a.split(" "),function(a){if(!Aa(b,a))b.className=T(b.className+" "+T(a))})}function ab(b,a){if(a)for(var a=!a.nodeName&&E(a.length)&&!ka(a)?a:[a],c=0;c4096&&d.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),Y.length>20&&d.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+Y.length+" > 20 )")}else{if(k.cookie!==P){P=k.cookie;c=P.split("; ");Y={};for(f=0;f0&&(Y[unescape(e.substring(0,i))]=unescape(e.substring(i+ +1)))}return Y}};i.defer=function(a,b){var c;p++;c=l(function(){delete q[c];h(a)},b||0);q[c]=!0;return c};i.defer.cancel=function(a){return q[a]?(delete q[a],u(a),h(v),!0):!1};i.baseHref=function(){var b=a.find("base").attr("href");return b?b.replace(/^https?\:\/\/[^\/]*/,""):b}}function rc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new qc(b,d,d.find("body"),a,c)}]}function sc(){this.$get=function(){function b(b,d){function e(a){if(a!=n){if(l){if(l==a)l=a.n}else l= +a;h(a.n,a.p);h(a,n);n=a;n.n=null}}function h(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw x("cacheId "+b+" taken");var g=0,f=B({},d,{id:b}),i={},k=d&&d.capacity||Number.MAX_VALUE,j={},n=null,l=null;return a[b]={put:function(a,b){var c=j[a]||(j[a]={key:a});e(c);y(b)||(a in i||g++,i[a]=b,g>k&&this.remove(l.key))},get:function(a){var b=j[a];if(b)return e(b),i[a]},remove:function(a){var b=j[a];if(b==n)n=b.p;if(b==l)l=b.n;h(b.n,b.p);delete j[a];delete i[a];g--},removeAll:function(){i={};g=0;j= +{};n=l=null},destroy:function(){j=f=i=null;delete a[b]},info:function(){return B({},f,{size:g})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function tc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function zb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,h=/\<\\>/i,g=/^\<[\s\S]*\>$/;this.directive=function i(d,e){H(d)?(la(e,"directive"), +a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var i=b.invoke(a);if(L(i))i={compile:z(i)};else if(!i.compile&&i.link)i.compile=z(i.link);i.priority=i.priority||0;i.name=i.name||d;i.require=i.require||i.controller&&i.name;i.restrict=i.restrict||"A";e.push(i)}catch(h){c(h)}});return e}])),a[d].push(e)):m(d,nb(i));return this};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller", +function(b,k,j,n,l,u,q){function p(a,b,c){a instanceof t||(a=t(a));m(a,function(b,c){b.nodeType==3&&(a[c]=t(b).wrap("").parent()[0])});var d=D(a,b,a,c);return function(b,c){la(b,"scope");var e=c?pa.clone.call(a):a;F(e.data("$scope",b),"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function o(a,b){throw x("Unsupported '"+b+"' for '"+a+"'.");}function F(a,b){try{a.addClass(b)}catch(c){}}function D(a,b,c,d){function e(a,c,d,h){for(var g,j,k,l,n,S=0,u=0,o=i.length;SA.priority)break;if(v=A.scope)R("isolated scope",Q,A,s),M(v)&&(F(s,"ng-isolate-scope"),Q=A),F(s,"ng-scope"),w=w||A;N=A.name;if(v=A.controller)E=E||{},R("'"+N+"' controller",E[N],A,s),E[N]=A;if(v=A.transclude)R("transclusion",B,A,s),B=A,l=A.priority,v=="element"?(v=t(b),b=(s=c.$$element=t("<\!-- "+N+": "+c[N]+" --\>"))[0],ea(e,t(v[0]),b),z=p(v,d,l)):(v=t(bb(b)),s.html(""),z=p(v.contents(),d)); +if(v=A.template)R("template",D,A,s),D=A,N=v.replace(h,s.html()),b=t(N)[0],A.replace?(ea(e,s,b),I={$attr:{}},a=a.concat(K(b,a.splice(G+1,a.length-(G+1)),I)),Y(c,I),I=a.length):s.html(N);if(A.templateUrl)R("template",D,A,s),D=A,Ea=P(a.splice(G,a.length-G),k,s,c,e,A.replace,z),I=a.length;else if(A.compile)try{C=A.compile(s,c,z),L(C)?i(null,C):C&&i(C.pre,C.post)}catch(O){j(O,wa(s))}if(A.terminal)k.terminal=!0,l=Math.max(l,A.priority)}C=Ea||k;C.scope=w&&w.scope;C.transclude=B&&z;return C}function w(d, +e,h,g){var k=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),n=0,u=e.length;nl.priority)&&l.restrict.indexOf(h)!=-1)d.push(l),k=!0}catch(o){j(o)}return k}function Y(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,i){i=="class"?F(e,b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function P(a,b,c, +d,e,i,j){var k=[],u,o,q=c[0],w=a.shift(),qa=B({},w,{templateUrl:null,transclude:null}),p=c.html();c.html("");n.get(w.templateUrl,{cache:l}).success(function(l){l=T(l).replace(h,p);if(i&&!l.match(g))throw x("Template must have exactly one root element: "+l);var n,w;i?(w={$attr:{}},n=t(l)[0],ea(e,c,n),K(c[0],a,w),Y(d,w)):(n=c[0],c.html(l));a.unshift(qa);u=s(a,c,d,j);for(o=D(c.contents(),j);k.length;){var F=k.pop(),l=k.pop();w=k.pop();var m=k.pop(),P=n;w!==q&&(P=bb(n),ea(l,t(w),P));u(function(){b(o, +m,P,e,F)},m,P,e,F)}k=null}).error(function(a,b,c,d){throw x("Failed to load template: "+d.url);});return function(a,c,d,e,i){k?(k.push(c),k.push(d),k.push(e),k.push(i)):u(function(){b(o,c,d,e,i)},c,d,e,i)}}function Q(a,b){return b.priority-a.priority}function R(a,b,c,d){if(b)throw x("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+wa(d));}function Ea(a,b){var c=k(b,!0);c&&a.push({priority:0,compile:z(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);F(d.data("$binding", +e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function N(a,b,c,d){var e=k(c,!0);e&&b.push({priority:100,compile:z(function(a,b,c){d==="class"&&(e=k(c[d],!0));c.$$observers[d]=[];c[d]=r;a.$watch(e,function(a){c.$set(d,a)})})})}function ea(a,b,c){var d=b[0],e=d.parentNode,i,h;if(a){i=0;for(h=a.length;i0){var e=Q[0],i=e.text;if(i==a||i==b||i==c||i==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,i){return(b=g(b,c,d,i))?(a&&!b.json&&e("is not valid json",b),Q.shift(),b):!1}function i(a){f(a)||e("is unexpected, expecting ["+a+"]",g())}function k(a,b){return function(c,d){return a(c, +d,b)}}function j(a,b,c){return function(d,e){return b(d,e,a,c)}}function n(){for(var a=[];;)if(Q.length>0&&!g("}",")",";","]")&&a.push(y()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e","<=",">="))a=j(a,b.fn,o());return a}function m(){for(var a=D(),b;b=f("*","/","%");)a=j(a,b.fn,D());return a}function D(){var a;return f("+")?K():(a=f("-"))?j(Y,a.fn,D()):(a=f("!"))?k(a.fn,D()):K()}function K(){var a;if(f("("))a=y(),i(")");else if(f("["))a=s();else if(f("{"))a= +w();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=t(a,c),c=null):b.text==="["?(c=a,a=ea(a)):b.text==="."?(c=a,a=N(a)):e("IMPOSSIBLE");return a}function s(){var a=[];if(h().text!="]"){do a.push(R());while(f(","))}i("]");return function(b,c){for(var d=[],e=0;e1;d++){var e=a.shift(),h=b[e];h||(h={},b[e]=h);b=h}return b[a.shift()]=c}function fb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,h=a.length,g=0;g7),hasEvent:function(c){if(y(a[c])){var d= +b.document.createElement("div");a[c]="on"+c in d}return a[c]},csp:!1}}]}function Qc(){this.$get=z(W)}function Ib(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=G(T(b.substr(0,e)));d=T(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Jb(b){var a=M(b)?b:r;return function(c){a||(a=Ib(b));return c?a[G(c)]||null:a}}function Kb(b,a,c){if(L(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Rc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/, +d=this.defaults={transformResponse:[function(d){H(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&Ra.apply(a)!=="[object File]"?aa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json"},put:{"Content-Type":"application/json"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a, +b,c,i,k,j){function n(a){function c(a){var b=B({},a,{data:Kb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:k.reject(b)}a.method=ia(a.method);var e=a.transformRequest||d.transformRequest,f=a.transformResponse||d.transformResponse,i=d.headers,i=B({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},i.common,i[G(a.method)],a.headers),e=Kb(a.data,Jb(i),e),h;y(a.data)&&delete i["Content-Type"];h=l(a,e,i);h=h.then(c,c);m(p,function(a){h=a(h)});h.success=function(b){h.then(function(c){b(c.data,c.status, +c.headers,a)});return h};h.error=function(b){h.then(null,function(c){b(c.data,c.status,c.headers,a)});return h};return h}function l(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(r,[a,b,Ib(c)]):m.remove(r));f(b,a,c);i.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?l.resolve:l.reject)({data:a,status:c,headers:Jb(d),config:b})}function g(){var a=Ta(n.pendingRequests,b);a!==-1&&n.pendingRequests.splice(a,1)}var l=k.defer(),j=l.promise,m,p,r=u(b.url,b.params);n.pendingRequests.push(b);j.then(g, +g);b.cache&&b.method=="GET"&&(m=M(b.cache)?b.cache:q);if(m)if(p=m.get(r))if(p.then)return p.then(g,g),p;else J(p)?f(p[1],p[0],X(p[2])):f(p,200,{});else m.put(r,j);p||a(b.method,r,c,e,d,b.timeout,b.withCredentials);return j}function u(a,b){if(!b)return a;var c=[];$b(b,function(a,b){a==null||a==r||(M(a)&&(a=aa(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var q=c("$http"),p=[];m(e,function(a){p.push(H(a)?j.get(a):j.invoke(a))});n.pendingRequests= +[];(function(a){m(arguments,function(a){n[a]=function(b,c){return n(B(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){n[a]=function(b,c,d){return n(B(d||{},{method:a,url:b,data:c}))}})})("post","put");n.defaults=d;return n}]}function Sc(){this.$get=["$browser","$window","$document",function(b,a,c){return Tc(b,Uc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Tc(b,a,c,d,e,h){function g(a,b){var c=e.createElement("script"), +d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;da?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c)}return function(e,i,k,j,n,l,u){function q(a,c,d,e){c=(i.match(Cb)||["",h])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(v)}b.$$incOutstandingRequestCount();i=i||b.url();if(G(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};g(i.replace("JSON_CALLBACK", +"angular.callbacks."+p),function(){d[p].data?q(j,200,d[p].data):q(j,-2);delete d[p]})}else{var o=new a;o.open(e,i,!0);m(n,function(a,b){a&&o.setRequestHeader(b,a)});var r;o.onreadystatechange=function(){o.readyState==4&&q(j,r||o.status,o.responseText,o.getAllResponseHeaders())};if(u)o.withCredentials=!0;o.send(k||"");l>0&&c(function(){r=-1;o.abort()},l)}}}function Vc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"", +posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM", +"PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function Lb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Mb);a("date",Nb);a("filter",Wc);a("json",Xc);a("limitTo",Yc);a("lowercase",Zc);a("number", +Ob);a("orderBy",Pb);a("uppercase",$c)}function Wc(){return function(b,a){if(!(b instanceof Array))return b;var c=[];c.check=function(a){for(var b=0;b-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c=j+n)for(var k=g.length-j,l=0;l0||e>-c)e+=c;e===0&&c==-12&&(e= +12);return jb(e,a,d)}}function Ja(b,a){return function(c,d){var e=c["get"+b](),h=ia(a?"SHORT"+b:b);return d[h][e]}}function Nb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),h=0,g=0;b[9]&&(h=C(b[9]+b[10]),g=C(b[9]+b[11]));a.setUTCFullYear(C(b[1]),C(b[2])-1,C(b[3]));a.setUTCHours(C(b[4]||0)-h,C(b[5]||0)-g,C(b[6]||0),C(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;return function(c,e){var h="",g=[],f,i,e=e|| +"mediumDate",e=b.DATETIME_FORMATS[e]||e;H(c)&&(c=ad.test(c)?C(c):a(c));sa(c)&&(c=new Date(c));if(!ja(c))return c;for(;e;)(i=bd.exec(e))?(g=g.concat(fa.call(i,1)),e=g.pop()):(g.push(e),e=null);m(g,function(a){f=cd[a];h+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return h}}function Xc(){return function(b){return aa(b,!0)}}function Yc(){return function(b,a){if(!(b instanceof Array))return b;var a=C(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?a=b.length:a< +-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;dn?(d.$setValidity("maxlength",!1),r):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return O(function(c,d,e){c.$watch(e[b],function(b,e){if(a===!0||c.$index%2===a)e&&b!==e&&(M(e)&&!J(e)&&(e=Sa(e,function(a,b){if(a)return b})),d.removeClass(J(e)?e.join(" "):e)),M(b)&&!J(b)&&(b=Sa(b, +function(a,b){if(a)return b})),b&&d.addClass(J(b)?b.join(" "):b)},!0)})}var G=function(b){return H(b)?b.toLowerCase():b},ia=function(b){return H(b)?b.toUpperCase():b},x=W.Error,da=C((/msie (\d+)/.exec(G(navigator.userAgent))||[])[1]),t,ga,fa=[].slice,Pa=[].push,Ra=Object.prototype.toString,Ub=W.angular||(W.angular={}),oa,Ab,Z=["0","0","0"];v.$inject=[];ua.$inject=[];Ab=da<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName? +b.nodeName:b[0].nodeName};var fc=/[A-Z]/g,dd={full:"1.0.0rc7",major:1,minor:0,dot:0,codeName:"rc-generation"},ya={},xa="ng-"+(new Date).getTime(),jc=1,ed=W.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},cb=W.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},hc=/([\:\-\_]+(.))/g,ic=/^moz([A-Z])/,pa=U.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded", +a);U(W).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?t(this[b]):t(this[this.length+b])},length:0,push:Pa,sort:[].sort,splice:[].splice},Ca={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ca[G(b)]=b});var yb={};m("input,select,option,textarea,button,form".split(","),function(b){yb[ia(b)]=!0});m({data:za,inheritedData:Ba,scope:function(b){return Ba(b,"$scope")},controller:wb,injector:function(b){return Ba(b, +"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Aa,css:function(b,a,c){a=sb(a);if(E(c))b.style[a]=c;else{var d;da<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];da<=8&&(d=d===""?r:d);return d}},attr:function(b,a,c){var d=G(a);if(Ca[d])if(E(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||v).specified?d:r;else if(E(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a, +2),b===null?r:b},prop:function(b,a,c){if(E(c))b[a]=c;else return b[a]},text:B(da<9?function(b,a){if(b.nodeType==1){if(y(a))return b.innerText;b.innerText=a}else{if(y(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(y(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(y(a))return b.value;b.value=a},html:function(b,a){if(y(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a, +c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Hc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Uc=W.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new x("This browser does not support XMLHttpRequest.");};Lb.$inject=["$provide"];Mb.$inject=["$locale"];Ob.$inject=["$locale"];var Rb=".",cd={yyyy:I("FullYear",4), +yy:I("FullYear",2,0,!0),y:I("FullYear",1),MMMM:Ja("Month"),MMM:Ja("Month",!0),MM:I("Month",2,1),M:I("Month",1,1),dd:I("Date",2),d:I("Date",1),HH:I("Hours",2),H:I("Hours",1),hh:I("Hours",2,-12),h:I("Hours",1,-12),mm:I("Minutes",2),m:I("Minutes",1),ss:I("Seconds",2),s:I("Seconds",1),EEEE:Ja("Day"),EEE:Ja("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=a.getTimezoneOffset();return jb(a/60,2)+jb(Math.abs(a%60),2)}},bd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/, +ad=/^\d+$/;Nb.$inject=["$locale"];var Zc=z(G),$c=z(ia);Pb.$inject=["$parse"];var fd=z({restrict:"E",compile:function(a,c){c.href||c.$set("href","");return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};m(Ca,function(a,c){var d=ba("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,h,g){g.$$observers[c]=[];a.$watch(g[d],function(a){g.$set(c,!!a)})}}}}});m(["src","href"],function(a){var c=ba("ng-"+a);lb[c]=function(){return{priority:99, +compile:function(){return function(d,e,h){d=h[c];d==r?(h.$$observers[a]=[],h.$observe(c,function(c){h.$set(a,c)})):h.$set(a,d)}}}}});var Ma={$addControl:v,$removeControl:v,$setValidity:v,$setDirty:v};Sb.$inject=["$element","$attrs","$scope"];var Pa={name:"form",restrict:"E",controller:Sb,compile:function(){return{pre:function(a,c,d,e){d.action||c.bind("submit",function(a){a.preventDefault()});var h=c.parent().controller("form"),g=d.name||d.ngForm;g&&(a[g]=e);h&&c.bind("$destroy",function(){h.$removeControl(e); +g&&(a[g]=r);B(e,Ma)})}}}},gd=z(Pa),hd=z(B(X(Pa),{restrict:"EAC"})),id=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,jd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,kd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Wb={text:Oa,number:function(a,c,d,e,h,g){Oa(a,c,d,e,h,g);e.$parsers.push(function(a){var c=V(a);return c||kd.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),r)});e.$formatters.push(function(a){return V(a)? +"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!V(a)&&ai?(e.$setValidity("max",!1),r):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return V(a)||sa(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),r)})},url:function(a,c,d,e,h,g){Oa(a,c,d,e,h,g);a= +function(a){return V(a)||id.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),r)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,h,g){Oa(a,c,d,e,h,g);a=function(a){return V(a)||jd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),r)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){y(d.name)&&c.attr("name",ta());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked= +d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var h=d.ngTrueValue,g=d.ngFalseValue;H(h)||(h=!0);H(g)||(g=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===h});e.$parsers.push(function(a){return a?h:g})},hidden:v,button:v,submit:v,reset:v},Xb=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,h,g){g&& +(Wb[G(h.type)]||Wb.text)(d,e,h,g,c,a)}}}],La="ng-valid",Ka="ng-invalid",Na="ng-pristine",Tb="ng-dirty",ld=["$scope","$exceptionHandler","$attrs","ngModel","$element",function(a,c,d,e,h){function g(a,c){c=c?"-"+Za(c,"-"):"";h.removeClass((a?Ka:La)+c).addClass((a?La:Ka)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$render=v;this.$name=d.name;var f=h.inheritedData("$formController")|| +Ma,i=0,k=this.$error={};h.addClass(Na);g(!0);this.$setValidity=function(a,c){if(k[a]!==!c){if(c){if(k[a]&&i--,!i)g(!0),this.$valid=!0,this.$invalid=!1}else g(!1),this.$invalid=!0,this.$valid=!1,i++;k[a]=!c;g(c,a);f.$setValidity(a,c,this)}};this.$setViewValue=function(a){this.$viewValue=a;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,h.removeClass(Na).addClass(Tb),f.$setDirty();m(this.$parsers,function(c){a=c(a)});if(this.$modelValue!==a)this.$modelValue=a,e(a),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})}; +var j=this;a.$watch(function(){return e()},function(a){if(j.$modelValue!==a){var c=j.$formatters,d=c.length;for(j.$modelValue=a;d--;)a=c[d](a);if(j.$viewValue!==a)j.$viewValue=a,j.$render()}})}],md=[function(){return{inject:{ngModel:"accessor"},require:["ngModel","^?form"],controller:ld,link:function(a,c,d,e){var h=e[0],g=e[1]||Ma;g.$addControl(h);c.bind("$destroy",function(){g.$removeControl(h)})}}}],nd=z({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}), +Yb=[function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){var h=function(a){if(d.required&&(V(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(h);e.$parsers.unshift(h);d.$observe("required",function(){h(e.$viewValue)})}}}}],od=function(){return{require:"ngModel",link:function(a,c,d,e){var h=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",",g=function(a){var c=[];a&&m(a.split(h),function(a){a&&c.push(T(a))});return c};e.$parsers.push(g); +e.$formatters.push(function(a){return J(a)&&!ca(g(e.$viewValue),a)?a.join(", "):r})}}},pd=/^(true|false|\d+)$/,qd=[function(){return{priority:100,compile:function(a,c){return pd.test(c.ngValue)?function(a,c,h){h.$set("value",a.$eval(h.ngValue))}:function(a,c,h){h.$$observers.value=[];a.$watch(h.ngValue,function(a){h.$set("value",a,!1)})}}}}],rd=O(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==r?"":a)})}),sd=["$interpolate",function(a){return function(c, +d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],td=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],ud=kb("",!0),vd=kb("Odd",0),wd=kb("Even",1),xd=O({compile:function(a,c){c.$set("ngCloak",r);a.removeClass("ng-cloak")}}),yd=[function(){return{scope:!0,controller:"@"}}],zd=["$sniffer",function(a){return{priority:1E3, +compile:function(){a.csp=!0}}}],Zb={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ba("ng-"+a);Zb[c]=["$parse",function(d){return function(e,h,g){var f=d(g[c]);h.bind(G(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ad=O(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Bd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(h, +g){var f=g.ngInclude||g.src,i=g.onload||"",k=g.autoscroll;return function(h,g){var l=0,m,q=function(){m&&(m.$destroy(),m=null);g.html("")};h.$watch(f,function(f){var o=++l;f?a.get(f,{cache:c}).success(function(a){o===l&&(m&&m.$destroy(),m=h.$new(),g.html(a),e(g.contents())(m),E(k)&&(!k||h.$eval(k))&&d(),m.$emit("$includeContentLoaded"),h.$eval(i))}).error(function(){o===l&&q()}):q()})}}}}],Cd=O({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Dd=O({terminal:!0,priority:1E3}), +Ed=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,h,g){var f=g.count,i=h.attr(g.$attr.when),k=g.offset||0,j=e.$eval(i),n={};m(j,function(a,e){n[e]=c(a.replace(d,"{{"+f+"-"+k+"}}"))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(j[c]||(c=a.pluralCat(c-k)),n[c](e,h,!0))},function(a){h.text(a)})}}}],Fd=O({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,g){var f=g.ngRepeat,g=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/), +i,k,j;if(!g)throw x("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=g[1];i=g[2];g=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!g)throw x("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");k=g[3]||g[1];j=g[2];var n=new eb;a.$watch(function(a){var e,f,g=a.$eval(i),m=bc(g,!0),r,v=new eb,t,s,w,y,x=c;if(J(g))w=g||[];else{w=[];for(t in g)g.hasOwnProperty(t)&&t.charAt(0)!="$"&&w.push(t);w.sort()}e=0;for(f=w.length;ez;)t.pop().element.remove()}for(;v.length>x;)v.pop()[0].element.remove()}var g;if(!(g=p.match(d)))throw x("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(g[2]||g[1]),k=g[4]||g[6],l=g[5],m=c(g[3]||""),n=c(g[2]?g[1]:k),u=c(g[7]),v=[[{element:f,label:""}]];o&&(a(o)(e),o.removeClass("ng-scope"),o.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=u(e)||[],d={},g,i, +j,m,o,p;if(q){i=[];m=0;for(p=v.length;m@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}'); diff --git a/app/lib/angular/version.txt b/app/lib/angular/version.txt index 9de6f86..2170830 100644 --- a/app/lib/angular/version.txt +++ b/app/lib/angular/version.txt @@ -1 +1 @@ -1.0.0rc6 +1.0.0rc7 diff --git a/test/lib/angular/angular-mocks.js b/test/lib/angular/angular-mocks.js index e508de1..996dab3 100644 --- a/test/lib/angular/angular-mocks.js +++ b/test/lib/angular/angular-mocks.js @@ -1,6 +1,6 @@ /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT * diff --git a/test/lib/angular/angular-scenario.js b/test/lib/angular/angular-scenario.js index 90aae04..061bdb3 100644 --- a/test/lib/angular/angular-scenario.js +++ b/test/lib/angular/angular-scenario.js @@ -9404,7 +9404,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { })( window ); /** - * @license AngularJS v1.0.0rc6 + * @license AngularJS v1.0.0rc7 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ @@ -10648,11 +10648,11 @@ function setupModuleLoader(window) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.0.0rc6', // all of these placeholder strings will be replaced by rake's + full: '1.0.0rc7', // all of these placeholder strings will be replaced by rake's major: 1, // compile task minor: 0, dot: 0, - codeName: 'runny-nose' + codeName: 'rc-generation' }; @@ -10710,6 +10710,7 @@ function publishExternalAPI(angular){ ngClass: ngClassDirective, ngClassEven: ngClassEvenDirective, ngClassOdd: ngClassOddDirective, + ngCsp: ngCspDirective, ngCloak: ngCloakDirective, ngController: ngControllerDirective, ngForm: ngFormDirective, @@ -11278,8 +11279,8 @@ function createEventHandler(element) { // Remove monkey-patched methods (IE), // as they would cause memory leaks in IE8. - if (msie < 8) { - // IE7 does not allow to delete property on native object + if (msie <= 8) { + // IE7/8 does not allow to delete property on native object event.preventDefault = null; event.stopPropagation = null; event.isDefaultPrevented = null; @@ -11323,14 +11324,12 @@ forEach({ bindFn(element, 'mouseover', function(event) { counter++; if (counter == 1) { - event.type = 'mouseenter'; mouseenter(event); } }); bindFn(element, 'mouseout', function(event) { counter --; if (counter == 0) { - event.type = 'mouseleave'; mouseleave(event); } }); @@ -14682,7 +14681,7 @@ var OPERATORS = { }; var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'}; -function lex(text){ +function lex(text, csp){ var tokens = [], token, index = 0, @@ -14842,7 +14841,7 @@ function lex(text){ if (OPERATORS.hasOwnProperty(ident)) { token.fn = token.json = OPERATORS[ident]; } else { - var getter = getterFn(ident); + var getter = getterFn(ident, csp); token.fn = extend(function(self, locals) { return (getter(self, locals)); }, { @@ -14916,10 +14915,10 @@ function lex(text){ ///////////////////////////////////////// -function parser(text, json, $filter){ +function parser(text, json, $filter, csp){ var ZERO = valueFn(0), value, - tokens = lex(text), + tokens = lex(text, csp), assignment = _assignment, functionCall = _functionCall, fieldAccess = _fieldAccess, @@ -15187,7 +15186,7 @@ function parser(text, json, $filter){ function _fieldAccess(object) { var field = expect().text; - var getter = getterFn(field); + var getter = getterFn(field, csp); return extend( function(self, locals) { return getter(object(self, locals), locals); @@ -15340,32 +15339,119 @@ function getter(obj, path, bindFnToScope) { var getterFnCache = {}; -function getterFn(path) { +/** + * Implementation of the "Black Hole" variant from: + * - http://jsperf.com/angularjs-parse-getter/4 + * - http://jsperf.com/path-evaluation-simplified/7 + */ +function cspSafeGetterFn(key0, key1, key2, key3, key4) { + return function(scope, locals) { + var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope, + promise; + + if (!pathVal) return pathVal; + + pathVal = pathVal[key0]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key1 || !pathVal) return pathVal; + + pathVal = pathVal[key1]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key2 || !pathVal) return pathVal; + + pathVal = pathVal[key2]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key3 || !pathVal) return pathVal; + + pathVal = pathVal[key3]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + if (!key4 || !pathVal) return pathVal; + + pathVal = pathVal[key4]; + if (pathVal && pathVal.then) { + if (!("$$v" in pathVal)) { + promise = pathVal; + promise.$$v = undefined; + promise.then(function(val) { promise.$$v = val; }); + } + pathVal = pathVal.$$v; + } + return pathVal; + }; +}; + +function getterFn(path, csp) { if (getterFnCache.hasOwnProperty(path)) { return getterFnCache[path]; } - var fn, code = 'var l, fn, p;\n'; - forEach(path.split('.'), function(key, index) { - code += 'if(!s) return s;\n' + - 'l=s;\n' + - 's='+ (index - // we simply direference 's' on any .dot notation - ? 's' - // but if we are first then we check locals firs, and if so read it first - : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' + - 'if (s && s.then) {\n' + - ' if (!("$$v" in s)) {\n' + - ' p=s;\n' + - ' p.$$v = undefined;\n' + - ' p.then(function(v) {p.$$v=v;});\n' + - '}\n' + - ' s=s.$$v\n' + - '}\n'; - }); - code += 'return s;'; - fn = Function('s', 'k', code); - fn.toString = function() { return code; }; + var pathKeys = path.split('.'), + pathKeysLength = pathKeys.length, + fn; + + if (csp) { + fn = (pathKeysLength < 6) + ? cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4]) + : function(scope, locals) { + var i = 0, val; + do { + val = cspSafeGetterFn( + pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++] + )(scope, locals); + locals = undefined; // clear after first iteration + } while (i < pathKeysLength); + }; + } else { + var code = 'var l, fn, p;\n'; + forEach(pathKeys, function(key, index) { + code += 'if(!s) return s;\n' + + 'l=s;\n' + + 's='+ (index + // we simply dereference 's' on any .dot notation + ? 's' + // but if we are first then we check locals first, and if so read it first + : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' + + 'if (s && s.then) {\n' + + ' if (!("$$v" in s)) {\n' + + ' p=s;\n' + + ' p.$$v = undefined;\n' + + ' p.then(function(v) {p.$$v=v;});\n' + + '}\n' + + ' s=s.$$v\n' + + '}\n'; + }); + code += 'return s;'; + fn = Function('s', 'k', code); // s=scope, k=locals + fn.toString = function() { return code; }; + } return getterFnCache[path] = fn; } @@ -15374,13 +15460,13 @@ function getterFn(path) { function $ParseProvider() { var cache = {}; - this.$get = ['$filter', function($filter) { + this.$get = ['$filter', '$sniffer', function($filter, $sniffer) { return function(exp) { switch(typeof exp) { case 'string': return cache.hasOwnProperty(exp) ? cache[exp] - : cache[exp] = parser(exp, false, $filter); + : cache[exp] = parser(exp, false, $filter, $sniffer.csp); case 'function': return exp; default: @@ -16956,7 +17042,9 @@ function $SnifferProvider() { } return eventSupport[event]; - } + }, + // TODO(i): currently there is no way to feature detect CSP without triggering alerts + csp: false }; }]; } @@ -20778,7 +20866,7 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { * @description * Creates a binding that will innerHTML the result of evaluating the `expression` into the current * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if - * {@link angular.module.ng.$compileProvider.directive.ngBindHtml ngBindHtml} directive is too + * {@link angular.module.ngSanitize.directive.ngBindHtml ngBindHtml} directive is too * restrictive and when you absolutely trust the source of the content you are binding to. * * See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples. @@ -21099,6 +21187,32 @@ var ngControllerDirective = [function() { }; }]; +/** + * @ngdoc directive + * @name angular.module.ng.$compileProvider.directive.ngCsp + * @priority 1000 + * + * @description + * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support. + * This directive should be used on the root element of the application (typically the `` + * element or other element with the {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} + * directive). + * + * If enabled the performance of template expression evaluator will suffer slightly, so don't enable + * this mode unless you need it. + * + * @element html + */ + +var ngCspDirective = ['$sniffer', function($sniffer) { + return { + priority: 1000, + compile: function() { + $sniffer.csp = true; + } + }; +}]; + /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClick diff --git a/test/lib/angular/version.txt b/test/lib/angular/version.txt index 9de6f86..2170830 100644 --- a/test/lib/angular/version.txt +++ b/test/lib/angular/version.txt @@ -1 +1 @@ -1.0.0rc6 +1.0.0rc7