Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 330.24 KB | None | 0 0
  1. !function(t,e,n){"use strict";function r(t,e){return e=e||Error,function(){var n,r,i=arguments[0],o="["+(t?t+":":"")+i+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(t){var e=+t.slice(1,-1);return e+2<s.length?he(s[e+2]):t}),n=n+"\nhttp://errors.angularjs.org/1.3.20/"+(t?t+"/":"")+i,r=2;r<arguments.length;r++)n=n+(2==r?"?":"&")+"p"+(r-2)+"="+encodeURIComponent(he(arguments[r]));return new e(n)}}function i(t){if(null==t||A(t))return!1;var e="length"in Object(t)&&t.length;return t.nodeType===wi&&e?!0:w(t)||$i(t)||0===e||"number"==typeof e&&e>0&&e-1 in t}function o(t,e,n){var r,a;if(t)if(S(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||e.call(n,t[r],r,t);else if($i(t)||i(t)){var s="object"!=typeof t;for(r=0,a=t.length;a>r;r++)(s||r in t)&&e.call(n,t[r],r,t)}else if(t.forEach&&t.forEach!==o)t.forEach(e,n,t);else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t);return t}function a(t){return Object.keys(t).sort()}function s(t,e,n){for(var r=a(t),i=0;i<r.length;i++)e.call(n,t[r[i]],r[i]);return r}function u(t){return function(e,n){t(n,e)}}function c(){return++fi}function l(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function f(t){for(var e=t.$$hashKey,n=1,r=arguments.length;r>n;n++){var i=arguments[n];if(i)for(var o=Object.keys(i),a=0,s=o.length;s>a;a++){var u=o[a];t[u]=i[u]}}return l(t,e),t}function h(t){return parseInt(t,10)}function $(t,e){return f(Object.create(t),e)}function p(){}function d(t){return t}function v(t){return function(){return t}}function m(t){return"undefined"==typeof t}function g(t){return"undefined"!=typeof t}function y(t){return null!==t&&"object"==typeof t}function w(t){return"string"==typeof t}function b(t){return"number"==typeof t}function x(t){return"[object Date]"===ui.call(t)}function S(t){return"function"==typeof t}function C(t){return"[object RegExp]"===ui.call(t)}function A(t){return t&&t.window===t}function E(t){return t&&t.$evalAsync&&t.$watch}function k(t){return"[object File]"===ui.call(t)}function O(t){return"[object FormData]"===ui.call(t)}function T(t){return"[object Blob]"===ui.call(t)}function M(t){return"boolean"==typeof t}function V(t){return t&&S(t.then)}function N(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function D(t){var e,n={},r=t.split(",");for(e=0;e<r.length;e++)n[r[e]]=!0;return n}function j(t){return Zr(t.nodeName||t[0]&&t[0].nodeName)}function R(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),e}function P(t,e,n,r){if(A(t)||E(t))throw ci("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(e){if(t===e)throw ci("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],y(t)){var i=n.indexOf(t);if(-1!==i)return r[i];n.push(t),r.push(e)}var a;if($i(t)){e.length=0;for(var s=0;s<t.length;s++)a=P(t[s],null,n,r),y(t[s])&&(n.push(t[s]),r.push(a)),e.push(a)}else{var u=e.$$hashKey;$i(e)?e.length=0:o(e,function(t,n){delete e[n]});for(var c in t)t.hasOwnProperty(c)&&(a=P(t[c],null,n,r),y(t[c])&&(n.push(t[c]),r.push(a)),e[c]=a);l(e,u)}}else if(e=t,t)if($i(t))e=P(t,[],n,r);else if(x(t))e=new Date(t.getTime());else if(C(t))e=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0]),e.lastIndex=t.lastIndex;else if(y(t)){var f=Object.create(Object.getPrototypeOf(t));e=P(t,f,n,r)}return e}function _(t,e){if($i(t)){e=e||[];for(var n=0,r=t.length;r>n;n++)e[n]=t[n]}else if(y(t)){e=e||{};for(var i in t)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(e[i]=t[i])}return e||t}function I(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r,i,o,a=typeof t,s=typeof e;if(a==s&&"object"==a){if(!$i(t)){if(x(t))return x(e)?I(t.getTime(),e.getTime()):!1;if(C(t))return C(e)?t.toString()==e.toString():!1;if(E(t)||E(e)||A(t)||A(e)||$i(e)||x(e)||C(e))return!1;o={};for(i in t)if("$"!==i.charAt(0)&&!S(t[i])){if(!I(t[i],e[i]))return!1;o[i]=!0}for(i in e)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&e[i]!==n&&!S(e[i]))return!1;return!0}if(!$i(e))return!1;if((r=t.length)==e.length){for(i=0;r>i;i++)if(!I(t[i],e[i]))return!1;return!0}}return!1}function q(t,e,n){return t.concat(oi.call(e,n))}function U(t,e){return oi.call(t,e||0)}function F(t,e){var n=arguments.length>2?U(arguments,2):[];return!S(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,q(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function H(t,r){var i=r;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=n:A(r)?i="$WINDOW":r&&e===r?i="$DOCUMENT":E(r)&&(i="$SCOPE"),i}function L(t,e){return"undefined"==typeof t?n:(b(e)||(e=e?2:null),JSON.stringify(t,H,e))}function B(t){return w(t)?JSON.parse(t):t}function z(t){t=ni(t).clone();try{t.empty()}catch(e){}var n=ni("<div>").append(t).html();try{return t[0].nodeType===xi?Zr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,e){return"<"+Zr(e)})}catch(e){return Zr(n)}}function G(t){try{return decodeURIComponent(t)}catch(e){}}function W(t){var e,n,r={};return o((t||"").split("&"),function(t){if(t&&(e=t.replace(/\+/g,"%20").split("="),n=G(e[0]),g(n))){var i=g(e[1])?G(e[1]):!0;Kr.call(r,n)?$i(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function Y(t){var e=[];return o(t,function(t,n){$i(t)?o(t,function(t){e.push(Z(n,!0)+(t===!0?"":"="+Z(t,!0)))}):e.push(Z(n,!0)+(t===!0?"":"="+Z(t,!0)))}),e.length?e.join("&"):""}function J(t){return Z(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Z(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}function K(t,e){var n,r,i=mi.length;for(t=ni(t),r=0;i>r;++r)if(n=mi[r]+e,w(n=t.attr(n)))return n;return null}function X(t,e){var n,r,i={};o(mi,function(e){var i=e+"app";!n&&t.hasAttribute&&t.hasAttribute(i)&&(n=t,r=t.getAttribute(i))}),o(mi,function(e){var i,o=e+"app";!n&&(i=t.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==K(n,"strict-di"),e(n,r?[r]:[],i))}function Q(n,r,i){y(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=ni(n),n.injector()){var t=n[0]===e?"document":z(n);throw ci("btstrpd","App Already Bootstrapped with this Element '{0}'",t.replace(/</,"&lt;").replace(/>/,"&gt;"))}r=r||[],r.unshift(["$provide",function(t){t.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Be(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,e,n,r){t.$apply(function(){e.data("$injector",r),n(e)(t)})}]),o},u=/^NG_ENABLE_DEBUG_INFO!/,c=/^NG_DEFER_BOOTSTRAP!/;return t&&u.test(t.name)&&(i.debugInfoEnabled=!0,t.name=t.name.replace(u,"")),t&&!c.test(t.name)?s():(t.name=t.name.replace(c,""),li.resumeBootstrap=function(t){return o(t,function(t){r.push(t)}),s()},void(S(li.resumeDeferredBootstrap)&&li.resumeDeferredBootstrap()))}function te(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function ee(t){var e=li.element(t).injector();if(!e)throw ci("test","no injector found for element argument to getTestability");return e.get("$$testability")}function ne(t,e){return e=e||"_",t.replace(gi,function(t,n){return(n?e:"")+t.toLowerCase()})}function re(){var e;yi||(ri=t.jQuery,ri&&ri.fn.on?(ni=ri,f(ri.fn,{scope:Ui.scope,isolateScope:Ui.isolateScope,controller:Ui.controller,injector:Ui.injector,inheritedData:Ui.inheritedData}),e=ri.cleanData,ri.cleanData=function(t){var n;if(hi)hi=!1;else for(var r,i=0;null!=(r=t[i]);i++)n=ri._data(r,"events"),n&&n.$destroy&&ri(r).triggerHandler("$destroy");e(t)}):ni=we,li.element=ni,yi=!0)}function ie(t,e,n){if(!t)throw ci("areq","Argument '{0}' is {1}",e||"?",n||"required");return t}function oe(t,e,n){return n&&$i(t)&&(t=t[t.length-1]),ie(S(t),e,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function ae(t,e){if("hasOwnProperty"===t)throw ci("badname","hasOwnProperty is not a valid {0} name",e)}function se(t,e,n){if(!e)return t;for(var r,i=e.split("."),o=t,a=i.length,s=0;a>s;s++)r=i[s],t&&(t=(o=t)[r]);return!n&&S(t)?F(o,t):t}function ue(t){var e=t[0],n=t[t.length-1],r=[e];do{if(e=e.nextSibling,!e)break;r.push(e)}while(e!==n);return ni(r)}function ce(){return Object.create(null)}function le(t){function e(t,e,n){return t[e]||(t[e]=n())}var n=r("$injector"),i=r("ng"),o=e(t,"angular",Object);return o.$$minErr=o.$$minErr||r,e(o,"module",function(){var t={};return function(r,o,a){var s=function(t,e){if("hasOwnProperty"===t)throw i("badname","hasOwnProperty is not a valid {0} name",e)};return s(r,"module"),o&&t.hasOwnProperty(r)&&(t[r]=null),e(t,r,function(){function t(t,n,r,i){return i||(i=e),function(){return i[r||"push"]([t,n,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var e=[],i=[],s=[],u=t("$injector","invoke","push",i),c={_invokeQueue:e,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:u,run:function(t){return s.push(t),this}};return a&&u(a),c})}})}function fe(t){var e=[];return JSON.stringify(t,function(t,n){if(n=H(t,n),y(n)){if(e.indexOf(n)>=0)return"<<already seen>>";e.push(n)}return n})}function he(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?fe(t):t}function $e(e){f(e,{bootstrap:Q,copy:P,extend:f,equals:I,element:ni,forEach:o,injector:Be,noop:p,bind:F,toJson:L,fromJson:B,identity:d,isUndefined:m,isDefined:g,isString:w,isFunction:S,isObject:y,isNumber:b,isElement:N,isArray:$i,version:Ei,isDate:x,lowercase:Zr,uppercase:Xr,callbacks:{counter:0},getTestability:ee,$$minErr:r,$$csp:vi,reloadWithDebugInfo:te}),ii=le(t);try{ii("ngLocale")}catch(n){ii("ngLocale",[]).provider("$locale",mn)}ii("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:Zn}),t.provider("$compile",Ke).directive({a:Do,input:Zo,textarea:Zo,form:Io,script:qa,select:Ha,style:Ba,option:La,ngBind:Qo,ngBindHtml:ea,ngBindTemplate:ta,ngClass:ra,ngClassEven:oa,ngClassOdd:ia,ngCloak:aa,ngController:sa,ngForm:qo,ngHide:Da,ngIf:la,ngInclude:fa,ngInit:$a,ngNonBindable:ka,ngPluralize:Oa,ngRepeat:Ta,ngShow:Na,ngStyle:ja,ngSwitch:Ra,ngSwitchWhen:Pa,ngSwitchDefault:_a,ngOptions:Fa,ngTransclude:Ia,ngModel:Ca,ngList:pa,ngChange:na,pattern:Ga,ngPattern:Ga,required:za,ngRequired:za,minlength:Ya,ngMinlength:Ya,maxlength:Wa,ngMaxlength:Wa,ngValue:Xo,ngModelOptions:Ea}).directive({ngInclude:ha}).directive(jo).directive(ua),t.provider({$anchorScroll:ze,$animate:Zi,$browser:Ye,$cacheFactory:Je,$controller:en,$document:nn,$exceptionHandler:rn,$filter:ur,$interpolate:dn,$interval:vn,$http:fn,$httpBackend:$n,$location:Vn,$log:Nn,$parse:Bn,$rootScope:Jn,$q:zn,$$q:Gn,$sce:tr,$sceDelegate:Qn,$sniffer:er,$templateCache:Ze,$templateRequest:nr,$$testability:rr,$timeout:ir,$window:sr,$$rAF:Yn,$$asyncCallback:Ge,$$jqLite:qe})}])}function pe(){return++Oi}function de(t){return t.replace(Vi,function(t,e,n,r){return r?n.toUpperCase():n}).replace(Ni,"Moz$1")}function ve(t){return!Pi.test(t)}function me(t){var e=t.nodeType;return e===wi||!e||e===Ci}function ge(t,e){var n,r,i,a,s=e.createDocumentFragment(),u=[];if(ve(t))u.push(e.createTextNode(t));else{for(n=n||s.appendChild(e.createElement("div")),r=(_i.exec(t)||["",""])[1].toLowerCase(),i=qi[r]||qi._default,n.innerHTML=i[1]+t.replace(Ii,"<$1></$2>")+i[2],a=i[0];a--;)n=n.lastChild;u=q(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(u,function(t){s.appendChild(t)}),s}function ye(t,n){n=n||e;var r;return(r=Ri.exec(t))?[n.createElement(r[1])]:(r=ge(t,n))?r.childNodes:[]}function we(t){if(t instanceof we)return t;var e;if(w(t)&&(t=pi(t),e=!0),!(this instanceof we)){if(e&&"<"!=t.charAt(0))throw ji("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new we(t)}e?Me(this,ye(t)):Me(this,t)}function be(t){return t.cloneNode(!0)}function xe(t,e){if(e||Ce(t),t.querySelectorAll)for(var n=t.querySelectorAll("*"),r=0,i=n.length;i>r;r++)Ce(n[r])}function Se(t,e,n,r){if(g(r))throw ji("offargs","jqLite#off() does not support the `selector` argument");var i=Ae(t),a=i&&i.events,s=i&&i.handle;if(s)if(e)o(e.split(" "),function(e){if(g(n)){var r=a[e];if(R(r||[],n),r&&r.length>0)return}Mi(t,e,s),delete a[e]});else for(e in a)"$destroy"!==e&&Mi(t,e,s),delete a[e]}function Ce(t,e){var r=t.ng339,i=r&&ki[r];if(i){if(e)return void delete i.data[e];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Se(t)),delete ki[r],t.ng339=n}}function Ae(t,e){var r=t.ng339,i=r&&ki[r];return e&&!i&&(t.ng339=r=pe(),i=ki[r]={events:{},data:{},handle:n}),i}function Ee(t,e,n){if(me(t)){var r=g(n),i=!r&&e&&!y(e),o=!e,a=Ae(t,!i),s=a&&a.data;if(r)s[e]=n;else{if(o)return s;if(i)return s&&s[e];f(s,e)}}}function ke(t,e){return t.getAttribute?(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")>-1:!1}function Oe(t,e){e&&t.setAttribute&&o(e.split(" "),function(e){t.setAttribute("class",pi((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+pi(e)+" "," ")))})}function Te(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(e.split(" "),function(t){t=pi(t),-1===n.indexOf(" "+t+" ")&&(n+=t+" ")}),t.setAttribute("class",pi(n))}}function Me(t,e){if(e)if(e.nodeType)t[t.length++]=e;else{var n=e.length;if("number"==typeof n&&e.window!==e){if(n)for(var r=0;n>r;r++)t[t.length++]=e[r]}else t[t.length++]=e}}function Ve(t,e){return Ne(t,"$"+(e||"ngController")+"Controller")}function Ne(t,e,r){t.nodeType==Ci&&(t=t.documentElement);for(var i=$i(e)?e:[e];t;){for(var o=0,a=i.length;a>o;o++)if((r=ni.data(t,i[o]))!==n)return r;t=t.parentNode||t.nodeType===Ai&&t.host}}function De(t){for(xe(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function je(t,e){e||xe(t);var n=t.parentNode;n&&n.removeChild(t)}function Re(e,n){n=n||t,"complete"===n.document.readyState?n.setTimeout(e):ni(n).on("load",e)}function Pe(t,e){var n=Fi[e.toLowerCase()];return n&&Hi[j(t)]&&n}function _e(t,e){var n=t.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Li[e]}function Ie(t,e){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=e[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=_(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(t,n)}};return n.elem=t,n}function qe(){this.$get=function(){return f(we,{hasClass:function(t,e){return t.attr&&(t=t[0]),ke(t,e)},addClass:function(t,e){return t.attr&&(t=t[0]),Te(t,e)},removeClass:function(t,e){return t.attr&&(t=t[0]),Oe(t,e)}})}}function Ue(t,e){var n=t&&t.$$hashKey;if(n)return"function"==typeof n&&(n=t.$$hashKey()),n;var r=typeof t;return n="function"==r||"object"==r&&null!==t?t.$$hashKey=r+":"+(e||c)():r+":"+t}function Fe(t,e){if(e){var n=0;this.nextUid=function(){return++n}}o(t,this.put,this)}function He(t){var e=t.toString().replace(Wi,""),n=e.match(Bi);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Le(t,e,n){var r,i,a,s;if("function"==typeof t){if(!(r=t.$inject)){if(r=[],t.length){if(e)throw w(n)&&n||(n=t.name||He(t)),Yi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=t.toString().replace(Wi,""),a=i.match(Bi),o(a[1].split(zi),function(t){t.replace(Gi,function(t,e,n){r.push(n)})})}t.$inject=r}}else $i(t)?(s=t.length-1,oe(t[s],"fn"),r=t.slice(0,s)):oe(t,"fn",!0);return r}function Be(t,e){function r(t){return function(e,n){return y(e)?void o(e,u(t)):t(e,n)}}function i(t,e){if(ae(t,"service"),(S(e)||$i(e))&&(e=E.instantiate(e)),!e.$get)throw Yi("pget","Provider '{0}' must define $get factory method.",t);return A[t+b]=e}function a(t,e){return function(){var n=O.invoke(e,this);if(m(n))throw Yi("undef","Provider '{0}' must return a value from $get factory method.",t);return n}}function s(t,e,n){return i(t,{$get:n!==!1?a(t,e):e})}function c(t,e){return s(t,["$injector",function(t){return t.instantiate(e)}])}function l(t,e){return s(t,v(e),!1)}function f(t,e){ae(t,"constant"),A[t]=e,k[t]=e}function h(t,e){var n=E.get(t+b),r=n.$get;n.$get=function(){var t=O.invoke(r,n);return O.invoke(e,null,{$delegate:t})}}function $(t){var e,n=[];return o(t,function(t){function r(t){var e,n;for(e=0,n=t.length;n>e;e++){var r=t[e],i=E.get(r[0]);i[r[1]].apply(i,r[2])}}if(!C.get(t)){C.put(t,!0);try{w(t)?(e=ii(t),n=n.concat($(e.requires)).concat(e._runBlocks),r(e._invokeQueue),r(e._configBlocks)):S(t)?n.push(E.invoke(t)):$i(t)?n.push(E.invoke(t)):oe(t,"module")}catch(i){throw $i(t)&&(t=t[t.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),Yi("modulerr","Failed to instantiate module {0} due to:\n{1}",t,i.stack||i.message||i)}}}),n}function d(t,n){function r(e,r){if(t.hasOwnProperty(e)){if(t[e]===g)throw Yi("cdep","Circular dependency found: {0}",e+" <- "+x.join(" <- "));return t[e]}try{return x.unshift(e),t[e]=g,t[e]=n(e,r)}catch(i){throw t[e]===g&&delete t[e],i}finally{x.shift()}}function i(t,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,u,c=[],l=Be.$$annotate(t,e,o);for(s=0,a=l.length;a>s;s++){if(u=l[s],"string"!=typeof u)throw Yi("itkn","Incorrect injection token! Expected service name as string, got {0}",u);c.push(i&&i.hasOwnProperty(u)?i[u]:r(u,o))}return $i(t)&&(t=t[a]),t.apply(n,c)}function o(t,e,n){var r=Object.create(($i(t)?t[t.length-1]:t).prototype||null),o=i(t,r,e,n);return y(o)||S(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Be.$$annotate,has:function(e){return A.hasOwnProperty(e+b)||t.hasOwnProperty(e)}}}e=e===!0;var g={},b="Provider",x=[],C=new Fe([],!0),A={$provide:{provider:r(i),factory:r(s),service:r(c),value:r(l),constant:r(f),decorator:h}},E=A.$injector=d(A,function(t,e){throw li.isString(e)&&x.push(e),Yi("unpr","Unknown provider: {0}",x.join(" <- "))}),k={},O=k.$injector=d(k,function(t,e){var r=E.get(t+b,e);return O.invoke(r.$get,r,n,t)});return o($(t),function(t){O.invoke(t||p)}),O}function ze(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(e,n,r){function i(t){var e=null;return Array.prototype.some.call(t,function(t){return"a"===j(t)?(e=t,!0):void 0}),e}function o(){var t=s.yOffset;if(S(t))t=t();else if(N(t)){var n=t[0],r=e.getComputedStyle(n);t="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else b(t)||(t=0);return t}function a(t){if(t){t.scrollIntoView();var n=o();if(n){var r=t.getBoundingClientRect().top;e.scrollBy(0,r-n)}}else e.scrollTo(0,0)}function s(){var t,e=n.hash();e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=e.document;return t&&r.$watch(function(){return n.hash()},function(t,e){(t!==e||""!==t)&&Re(function(){r.$evalAsync(s)})}),s}]}function Ge(){this.$get=["$$rAF","$timeout",function(t,e){return t.supported?function(e){return t(e)}:function(t){return e(t,0,!1)}}]}function We(t,e,r,i){function a(t){try{t.apply(null,U(arguments,1))}finally{if(C--,0===C)for(;A.length;)try{A.pop()()}catch(e){r.error(e)}}}function s(t){var e=t.indexOf("#");return-1===e?"":t.substr(e)}function u(t,e){!function n(){o(k,function(t){t()}),E=e(n,t)}()}function c(){f(),h()}function l(){try{return y.state}catch(t){}}function f(){O=l(),O=m(O)?null:O,I(O,R)&&(O=R),R=O}function h(){(M!==d.url()||T!==O)&&(M=d.url(),T=O,o(D,function(t){t(d.url(),O)}))}function $(t){try{return decodeURIComponent(t)}catch(e){return t}}var d=this,v=e[0],g=t.location,y=t.history,b=t.setTimeout,x=t.clearTimeout,S={};d.isMock=!1;var C=0,A=[];d.$$completeOutstandingRequest=a,d.$$incOutstandingRequestCount=function(){C++},d.notifyWhenNoOutstandingRequests=function(t){o(k,function(t){t()}),0===C?t():A.push(t)};var E,k=[];d.addPollFn=function(t){return m(E)&&u(100,b),k.push(t),t};var O,T,M=g.href,V=e.find("base"),N=null;f(),T=O,d.url=function(e,n,r){if(m(r)&&(r=null),g!==t.location&&(g=t.location),y!==t.history&&(y=t.history),e){var o=T===r;if(M===e&&(!i.history||o))return d;var a=M&&xn(M)===xn(e);return M=e,T=r,!i.history||a&&o?((!a||N)&&(N=e),n?g.replace(e):a?g.hash=s(e):g.href=e):(y[n?"replaceState":"pushState"](r,"",e),f(),T=O),d}return N||g.href.replace(/%27/g,"'")},d.state=function(){return O};var D=[],j=!1,R=null;d.onUrlChange=function(e){return j||(i.history&&ni(t).on("popstate",c),ni(t).on("hashchange",c),j=!0),D.push(e),e},d.$$checkUrlChange=h,d.baseHref=function(){var t=V.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var P={},_="",q=d.baseHref();d.cookies=function(t,e){var i,o,a,s,u;if(!t){if(v.cookie!==_)for(_=v.cookie,o=_.split("; "),P={},s=0;s<o.length;s++)a=o[s],u=a.indexOf("="),u>0&&(t=$(a.substring(0,u)),P[t]===n&&(P[t]=$(a.substring(u+1))));return P}e===n?v.cookie=encodeURIComponent(t)+"=;path="+q+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(e)&&(i=(v.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path="+q).length+1,i>4096&&r.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},d.defer=function(t,e){var n;return C++,n=b(function(){delete S[n],a(t)},e||0),S[n]=!0,n},d.defer.cancel=function(t){return S[t]?(delete S[t],x(t),a(p),!0):!1}}function Ye(){this.$get=["$window","$log","$sniffer","$document",function(t,e,n,r){return new We(t,r,e,n)}]}function Je(){this.$get=function(){function t(t,n){function i(t){t!=h&&($?$==t&&($=t.n):$=t,o(t.n,t.p),o(t,h),h=t,h.n=null)}function o(t,e){t!=e&&(t&&(t.p=e),e&&(e.n=t))}if(t in e)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var a=0,s=f({},n,{id:t}),u={},c=n&&n.capacity||Number.MAX_VALUE,l={},h=null,$=null;return e[t]={put:function(t,e){if(c<Number.MAX_VALUE){var n=l[t]||(l[t]={key:t});i(n)}if(!m(e))return t in u||a++,u[t]=e,a>c&&this.remove($.key),e},get:function(t){if(c<Number.MAX_VALUE){var e=l[t];if(!e)return;i(e)}return u[t]},remove:function(t){if(c<Number.MAX_VALUE){var e=l[t];if(!e)return;e==h&&(h=e.p),e==$&&($=e.n),o(e.n,e.p),delete l[t]}delete u[t],a--},removeAll:function(){u={},a=0,l={},h=$=null},destroy:function(){u=null,s=null,l=null,delete e[t]},info:function(){return f({},s,{size:a})}}}var e={};return t.info=function(){var t={};return o(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function Ze(){this.$get=["$cacheFactory",function(t){return t("templates")}]}function Ke(t,r){function i(t,e){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,r={};return o(t,function(t,i){var o=t.match(n);if(!o)throw Ki("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",e,i,t);r[i]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||i}}),r}var a={},s="Directive",c=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,l=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=D("ngSrc,ngSrcset,src,srcset"),m=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,b=/^(on[a-z]+|formaction)$/;this.directive=function C(e,n){return ae(e,"directive"),w(e)?(ie(n,"directiveFactory"),a.hasOwnProperty(e)||(a[e]=[],t.factory(e+s,["$injector","$exceptionHandler",function(t,n){var r=[];return o(a[e],function(o,a){try{var s=t.invoke(o);S(s)?s={compile:v(s)}:!s.compile&&s.link&&(s.compile=v(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||e,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",y(s.scope)&&(s.$$isolateBindings=i(s.scope,s.name)),r.push(s)}catch(u){n(u)}}),r}])),a[e].push(n)):o(e,u(C)),this},this.aHrefSanitizationWhitelist=function(t){return g(t)?(r.aHrefSanitizationWhitelist(t),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return g(t)?(r.imgSrcSanitizationWhitelist(t),this):r.imgSrcSanitizationWhitelist()};var x=!0;this.debugInfoEnabled=function(t){return g(t)?(x=t,this):x},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(t,r,i,u,v,g,C,A,k,O,T){function M(t,e){try{t.addClass(e)}catch(n){}}function V(t,e,n,r,i){t instanceof ni||(t=ni(t)),o(t,function(e,n){e.nodeType==xi&&e.nodeValue.match(/\S+/)&&(t[n]=ni(e).wrap("<span></span>").parent()[0])});var a=D(t,e,t,n,r,i);V.$$addScopeClass(t);var s=null;return function(e,n,r){ie(e,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,u=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=N(u));var c;if(c="html"!==s?ni(X(s,ni("<div>").append(t).html())):n?Ui.clone.call(t):t,o)for(var l in o)c.data("$"+l+"Controller",o[l].instance);return V.$$addScopeInfo(c,e),n&&n(c,e),a&&a(e,c,c,i),c}}function N(t){var e=t&&t[0];return e&&"foreignobject"!==j(e)&&e.toString().match(/SVG/)?"svg":"html"}function D(t,e,r,i,o,a){function s(t,r,i,o){var a,s,u,c,l,f,h,$,v;if(p){var m=r.length;for(v=new Array(m),l=0;l<d.length;l+=3)h=d[l],v[h]=r[h]}else v=r;for(l=0,f=d.length;f>l;)u=v[d[l++]],a=d[l++],s=d[l++],a?(a.scope?(c=t.$new(),V.$$addScopeInfo(ni(u),c)):c=t,$=a.transcludeOnThisElement?P(t,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&e?P(t,e):null,a(s,c,u,i,$)):s&&s(t,u.childNodes,n,o)}for(var u,c,l,f,h,$,p,d=[],v=0;v<t.length;v++)u=new ae,c=_(t[v],[],u,0===v?i:n,o),l=c.length?H(c,t[v],u,e,r,null,[],[],a):null,l&&l.scope&&V.$$addScopeClass(u.$$element),h=l&&l.terminal||!(f=t[v].childNodes)||!f.length?null:D(f,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:e),(l||h)&&(d.push(v,l,h),$=!0,p=p||l),a=null;return $?s:null}function P(t,e,n){var r=function(r,i,o,a,s){return r||(r=t.$new(!1,s),r.$$transcluded=!0),e(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})};return r}function _(t,e,n,r,i){var o,a,s=t.nodeType,u=n.$attr;switch(s){case wi:B(e,Xe(j(t)),"E",r,i);for(var f,h,$,p,d,v,m=t.attributes,g=0,b=m&&m.length;b>g;g++){var x=!1,S=!1;f=m[g],h=f.name,d=pi(f.value),p=Xe(h),(v=fe.test(p))&&(h=h.replace(Xi,"").substr(8).replace(/_(.)/g,function(t,e){return e.toUpperCase()}));var C=p.replace(/(Start|End)$/,"");G(C)&&p===C+"Start"&&(x=h,S=h.substr(0,h.length-5)+"end",h=h.substr(0,h.length-6)),$=Xe(h.toLowerCase()),u[$]=h,(v||!n.hasOwnProperty($))&&(n[$]=d,Pe(t,$)&&(n[$]=!0)),te(t,e,d,$,v),B(e,$,"A",r,i,x,S)}if(a=t.className,y(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=l.exec(a);)$=Xe(o[2]),B(e,$,"C",r,i)&&(n[$]=pi(o[3])),a=a.substr(o.index+o[0].length);break;case xi:K(e,t.nodeValue);break;case Si:try{o=c.exec(t.nodeValue),o&&($=Xe(o[1]),B(e,$,"M",r,i)&&(n[$]=pi(o[2])))}catch(A){}}return e.sort(J),e}function q(t,e,n){var r=[],i=0;if(e&&t.hasAttribute&&t.hasAttribute(e)){do{if(!t)throw Ki("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",e,n);t.nodeType==wi&&(t.hasAttribute(e)&&i++,t.hasAttribute(n)&&i--),r.push(t),t=t.nextSibling}while(i>0)}else r.push(t);return ni(r)}function F(t,e,n){return function(r,i,o,a,s){return i=q(i[0],e,n),t(r,i,o,a,s)}}function H(t,a,s,u,c,l,f,h,$){function p(t,e,n,r){t&&(n&&(t=F(t,n,r)),t.require=A.require,t.directiveName=k,(j===A||A.$$isolateScope)&&(t=re(t,{isolateScope:!0})),f.push(t)),e&&(n&&(e=F(e,n,r)),e.require=A.require,e.directiveName=k,(j===A||A.$$isolateScope)&&(e=re(e,{isolateScope:!0})),h.push(e))}function d(t,e,n,r){var i,a,s="data",u=!1,c=n;if(w(e)){if(a=e.match(m),e=e.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",c=n.parent()),"?"===a[2]&&(u=!0),i=null,r&&"data"===s&&(i=r[e])&&(i=i.instance),i=i||c[s]("$"+e+"Controller"),!i&&!u)throw Ki("ctreq","Controller '{0}', required by directive '{1}', can't be found!",e,t);return i||null}return $i(e)&&(i=[],o(e,function(e){i.push(d(t,e,n,r))})),i}function b(t,e,i,u,c){function l(t,e,r){var i;return E(t)||(r=e,e=t,t=n),G&&(i=b),r||(r=G?S.parent():S),c(t,e,i,r,T)}var $,p,m,y,w,b,x,S,A;if(a===i?(A=s,S=s.$$element):(S=ni(i),A=new ae(S,s)),j&&(w=e.$new(!0)),c&&(x=l,x.$$boundTransclude=c),D&&(C={},b={},o(D,function(t){var n,r={$scope:t===j||t.$$isolateScope?w:e,$element:S,$attrs:A,$transclude:x};y=t.controller,"@"==y&&(y=A[t.name]),n=g(y,r,!0,t.controllerAs),b[t.name]=n,G||S.data("$"+t.name+"Controller",n.instance),C[t.name]=n})),j){V.$$addScopeInfo(S,w,!0,!(R&&(R===j||R===j.$$originalDirective))),V.$$addScopeClass(S,!0);var k=C&&C[j.name],O=w;k&&k.identifier&&j.bindToController===!0&&(O=k.instance),o(w.$$isolateBindings=j.$$isolateBindings,function(t,n){var i,o,a,s,u=t.attrName,c=t.optional,l=t.mode;switch(l){case"@":A.$observe(u,function(t){O[n]=t}),A.$$observers[u].$$scope=e,A[u]&&(O[n]=r(A[u])(e));break;case"=":if(c&&!A[u])return;o=v(A[u]),s=o.literal?I:function(t,e){return t===e||t!==t&&e!==e},a=o.assign||function(){throw i=O[n]=o(e),Ki("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",A[u],j.name)},i=O[n]=o(e);var f=function(t){return s(t,O[n])||(s(t,i)?a(e,t=O[n]):O[n]=t),i=t};f.$stateful=!0;var h;h=t.collection?e.$watchCollection(A[u],f):e.$watch(v(A[u],f),null,o.literal),w.$on("$destroy",h);break;case"&":o=v(A[u]),O[n]=function(t){return o(e,t)}}})}for(C&&(o(C,function(t){t()}),C=null),$=0,p=f.length;p>$;$++)m=f[$],oe(m,m.isolateScope?w:e,S,A,m.require&&d(m.directiveName,m.require,S,b),x);var T=e;for(j&&(j.template||null===j.templateUrl)&&(T=w),t&&t(T,i.childNodes,n,c),$=h.length-1;$>=0;$--)m=h[$],oe(m,m.isolateScope?w:e,S,A,m.require&&d(m.directiveName,m.require,S,b),x)}$=$||{};for(var x,C,A,k,O,T,M,N=-Number.MAX_VALUE,D=$.controllerDirectives,j=$.newIsolateScopeDirective,R=$.templateDirective,P=$.nonTlbTranscludeDirective,H=!1,B=!1,G=$.hasElementTranscludeDirective,J=s.$$element=ni(a),K=l,Q=u,te=0,ne=t.length;ne>te;te++){A=t[te];var ie=A.$$start,se=A.$$end;if(ie&&(J=q(a,ie,se)),O=n,N>A.priority)break;if((M=A.scope)&&(A.templateUrl||(y(M)?(Z("new/isolated scope",j||x,A,J),j=A):Z("new/isolated scope",j,A,J)),x=x||A),k=A.name,!A.templateUrl&&A.controller&&(M=A.controller,D=D||{},Z("'"+k+"' controller",D[k],A,J),D[k]=A),(M=A.transclude)&&(H=!0,A.$$tlb||(Z("transclusion",P,A,J),P=A),"element"==M?(G=!0,N=A.priority,O=J,J=s.$$element=ni(e.createComment(" "+k+": "+s[k]+" ")),a=J[0],ee(c,U(O),a),Q=V(O,u,N,K&&K.name,{nonTlbTranscludeDirective:P})):(O=ni(be(a)).contents(),J.empty(),Q=V(O,u))),A.template)if(B=!0,Z("template",R,A,J),R=A,M=S(A.template)?A.template(J,s):A.template,M=le(M),A.replace){if(K=A,O=ve(M)?[]:tn(X(A.templateNamespace,pi(M))),a=O[0],1!=O.length||a.nodeType!==wi)throw Ki("tplrt","Template for directive '{0}' must have exactly one root element. {1}",k,"");ee(c,J,a);var ue={$attr:{}},ce=_(a,[],ue),fe=t.splice(te+1,t.length-(te+1));j&&L(ce),t=t.concat(ce).concat(fe),W(s,ue),ne=t.length}else J.html(M);if(A.templateUrl)B=!0,Z("template",R,A,J),R=A,A.replace&&(K=A),b=Y(t.splice(te,t.length-te),J,s,c,H&&Q,f,h,{controllerDirectives:D,newIsolateScopeDirective:j,templateDirective:R,nonTlbTranscludeDirective:P}),ne=t.length;else if(A.compile)try{T=A.compile(J,s,Q),S(T)?p(null,T,ie,se):T&&p(T.pre,T.post,ie,se)}catch(he){i(he,z(J))}A.terminal&&(b.terminal=!0,N=Math.max(N,A.priority))}return b.scope=x&&x.scope===!0,b.transcludeOnThisElement=H,b.elementTranscludeOnThisElement=G,b.templateOnThisElement=B,b.transclude=Q,$.hasElementTranscludeDirective=G,b}function L(t){for(var e=0,n=t.length;n>e;e++)t[e]=$(t[e],{$$isolateScope:!0})}function B(e,r,o,u,c,l,f){if(r===c)return null;var h=null;if(a.hasOwnProperty(r))for(var p,d=t.get(r+s),v=0,m=d.length;m>v;v++)try{p=d[v],(u===n||u>p.priority)&&-1!=p.restrict.indexOf(o)&&(l&&(p=$(p,{$$start:l,$$end:f})),e.push(p),h=p)
  2. }catch(g){i(g)}return h}function G(e){if(a.hasOwnProperty(e))for(var n,r=t.get(e+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function W(t,e){var n=e.$attr,r=t.$attr,i=t.$$element;o(t,function(r,i){"$"!=i.charAt(0)&&(e[i]&&e[i]!==r&&(r+=("style"===i?";":" ")+e[i]),t.$set(i,r,!0,n[i]))}),o(e,function(e,o){"class"==o?(M(i,e),t["class"]=(t["class"]?t["class"]+" ":"")+e):"style"==o?(i.attr("style",i.attr("style")+";"+e),t.style=(t.style?t.style+";":"")+e):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=e,r[o]=n[o])})}function Y(t,e,n,r,i,a,s,c){var l,f,h=[],p=e[0],d=t.shift(),v=$(d,{templateUrl:null,transclude:null,replace:null,$$originalDirective:d}),m=S(d.templateUrl)?d.templateUrl(e,n):d.templateUrl,g=d.templateNamespace;return e.empty(),u(m).then(function(u){var $,w,b,x;if(u=le(u),d.replace){if(b=ve(u)?[]:tn(X(g,pi(u))),$=b[0],1!=b.length||$.nodeType!==wi)throw Ki("tplrt","Template for directive '{0}' must have exactly one root element. {1}",d.name,m);w={$attr:{}},ee(r,e,$);var S=_($,[],w);y(d.scope)&&L(S),t=S.concat(t),W(n,w)}else $=p,e.html(u);for(t.unshift(v),l=H(t,$,n,i,e,d,a,s,c),o(r,function(t,n){t==$&&(r[n]=e[0])}),f=D(e[0].childNodes,i);h.length;){var C=h.shift(),A=h.shift(),E=h.shift(),k=h.shift(),O=e[0];if(!C.$$destroyed){if(A!==p){var T=A.className;c.hasElementTranscludeDirective&&d.replace||(O=be($)),ee(E,ni(A),O),M(ni(O),T)}x=l.transcludeOnThisElement?P(C,l.transclude,k):k,l(f,C,O,r,x)}}h=null}),function(t,e,n,r,i){var o=i;e.$$destroyed||(h?h.push(e,n,r,o):(l.transcludeOnThisElement&&(o=P(e,l.transclude,i)),l(f,e,n,r,o)))}}function J(t,e){var n=e.priority-t.priority;return 0!==n?n:t.name!==e.name?t.name<e.name?-1:1:t.index-e.index}function Z(t,e,n,r){if(e)throw Ki("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",e.name,n.name,t,z(r))}function K(t,e){var n=r(e,!0);n&&t.push({priority:0,compile:function(t){var e=t.parent(),r=!!e.length;return r&&V.$$addBindingClass(e),function(t,e){var i=e.parent();r||V.$$addBindingClass(i),V.$$addBindingInfo(i,n.expressions),t.$watch(n,function(t){e[0].nodeValue=t})}}})}function X(t,n){switch(t=Zr(t||"html")){case"svg":case"math":var r=e.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function Q(t,e){if("srcdoc"==e)return k.HTML;var n=j(t);return"xlinkHref"==e||"form"==n&&"action"==e||"img"!=n&&("src"==e||"ngSrc"==e)?k.RESOURCE_URL:void 0}function te(t,e,n,i,o){var a=Q(t,i);o=h[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===j(t))throw Ki("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",z(t));e.push({priority:100,compile:function(){return{pre:function(t,e,u){var c=u.$$observers||(u.$$observers={});if(b.test(i))throw Ki("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var l=u[i];l!==n&&(s=l&&r(l,!0,a,o),n=l),s&&(u[i]=s(t),(c[i]||(c[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||t).$watch(s,function(t,e){"class"===i&&t!=e?u.$updateClass(t,e):u.$set(i,t)}))}}}})}}function ee(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;o>i;i++)if(t[i]==a){t[i++]=r;for(var c=i,l=c+s-1,f=t.length;f>c;c++,l++)f>l?t[c]=t[l]:delete t[c];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var h=e.createDocumentFragment();h.appendChild(a),ni(r).data(ni(a).data()),ri?(hi=!0,ri.cleanData([a])):delete ni.cache[a[ni.expando]];for(var $=1,p=n.length;p>$;$++){var d=n[$];ni(d).remove(),h.appendChild(d),delete n[$]}n[0]=r,n.length=1}function re(t,e){return f(function(){return t.apply(null,arguments)},t,e)}function oe(t,e,n,r,o,a){try{t(e,n,r,o,a)}catch(s){i(s,z(n))}}var ae=function(t,e){if(e){var n,r,i,o=Object.keys(e);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=e[i]}else this.$attr={};this.$$element=t};ae.prototype={$normalize:Xe,$addClass:function(t){t&&t.length>0&&O.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&O.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=Qe(t,e);n&&n.length&&O.addClass(this.$$element,n);var r=Qe(e,t);r&&r.length&&O.removeClass(this.$$element,r)},$set:function(t,e,r,a){var s,u=this.$$element[0],c=Pe(u,t),l=_e(u,t),f=t;if(c?(this.$$element.prop(t,e),a=c):l&&(this[l]=e,f=l),this[t]=e,a?this.$attr[t]=a:(a=this.$attr[t],a||(this.$attr[t]=a=ne(t,"-"))),s=j(this.$$element),"a"===s&&"href"===t||"img"===s&&"src"===t)this[t]=e=T(e,"src"===t);else if("img"===s&&"srcset"===t){for(var h="",$=pi(e),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,d=/\s/.test($)?p:/(,)/,v=$.split(d),m=Math.floor(v.length/2),g=0;m>g;g++){var y=2*g;h+=T(pi(v[y]),!0),h+=" "+pi(v[y+1])}var w=pi(v[2*g]).split(/\s/);h+=T(pi(w[0]),!0),2===w.length&&(h+=" "+pi(w[1])),this[t]=e=h}r!==!1&&(null===e||e===n?this.$$element.removeAttr(a):this.$$element.attr(a,e));var b=this.$$observers;b&&o(b[f],function(t){try{t(e)}catch(n){i(n)}})},$observe:function(t,e){var n=this,r=n.$$observers||(n.$$observers=ce()),i=r[t]||(r[t]=[]);return i.push(e),C.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(t)&&e(n[t])}),function(){R(i,e)}}};var se=r.startSymbol(),ue=r.endSymbol(),le="{{"==se||"}}"==ue?d:function(t){return t.replace(/\{\{/g,se).replace(/}}/g,ue)},fe=/^ngAttr[A-Z]/;return V.$$addBindingInfo=x?function(t,e){var n=t.data("$binding")||[];$i(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:p,V.$$addBindingClass=x?function(t){M(t,"ng-binding")}:p,V.$$addScopeInfo=x?function(t,e,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,e)}:p,V.$$addScopeClass=x?function(t,e){M(t,e?"ng-isolate-scope":"ng-scope")}:p,V}]}function Xe(t){return de(t.replace(Xi,""))}function Qe(t,e){var n="",r=t.split(/\s+/),i=e.split(/\s+/);t:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue t;n+=(n.length>0?" ":"")+a}return n}function tn(t){t=ni(t);var e=t.length;if(1>=e)return t;for(;e--;){var n=t[e];n.nodeType===Si&&ai.call(t,e,1)}return t}function en(){var t={},e=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(e,n){ae(e,"controller"),y(e)?f(t,e):t[e]=n},this.allowGlobals=function(){e=!0},this.$get=["$injector","$window",function(o,a){function s(t,e,n,i){if(!t||!y(t.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,e);t.$scope[e]=n}return function(r,u,c,l){var h,$,p,d;if(c=c===!0,l&&w(l)&&(d=l),w(r)){if($=r.match(i),!$)throw Qi("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=$[1],d=d||$[3],r=t.hasOwnProperty(p)?t[p]:se(u.$scope,p,!0)||(e?se(a,p,!0):n),oe(r,p,!0)}if(c){var v=($i(r)?r[r.length-1]:r).prototype;return h=Object.create(v||null),d&&s(u,d,h,p||r.name),f(function(){return o.invoke(r,h,u,p),h},{instance:h,identifier:d})}return h=o.instantiate(r,u,p),d&&s(u,d,h,p||r.name),h}}]}function nn(){this.$get=["$window",function(t){return ni(t.document)}]}function rn(){this.$get=["$log",function(t){return function(){t.error.apply(t,arguments)}}]}function on(t,e){if(w(t)){var n=t.replace(io,"").trim();if(n){var r=e("Content-Type");(r&&0===r.indexOf(to)||an(n))&&(t=B(n))}}return t}function an(t){var e=t.match(no);return e&&ro[e[0]].test(t)}function sn(t){var e,n,r,i=ce();return t?(o(t.split("\n"),function(t){r=t.indexOf(":"),e=Zr(pi(t.substr(0,r))),n=pi(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}function un(t){var e=y(t)?t:n;return function(n){if(e||(e=sn(t)),n){var r=e[Zr(n)];return void 0===r&&(r=null),r}return e}}function cn(t,e,n,r){return S(r)?r(t,e,n):(o(r,function(r){t=r(t,e,n)}),t)}function ln(t){return t>=200&&300>t}function fn(){var t=this.defaults={transformResponse:[on],transformRequest:[function(t){return!y(t)||k(t)||T(t)||O(t)?t:L(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:_(eo),put:_(eo),patch:_(eo)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},e=!1;this.useApplyAsync=function(t){return g(t)?(e=!!t,this):e};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,u,c,l,h,$){function p(e){function i(t){var e=f({},t);return e.data=t.data?cn(t.data,t.headers,t.status,u.transformResponse):t.data,ln(t.status)?e:h.reject(e)}function a(t){var e,n={};return o(t,function(t,r){S(t)?(e=t(),null!=e&&(n[r]=e)):n[r]=t}),n}function s(e){var n,r,i,o=t.headers,s=f({},e.headers);o=f({},o.common,o[Zr(e.method)]);t:for(n in o){r=Zr(n);for(i in s)if(Zr(i)===r)continue t;s[n]=o[n]}return a(s)}if(!li.isObject(e))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",e);var u=f({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse},e);u.headers=s(e),u.method=Xr(u.method);var c=function(e){var r=e.headers,a=cn(e.data,un(r),n,e.transformRequest);return m(a)&&o(r,function(t,e){"content-type"===Zr(e)&&delete r[e]}),m(e.withCredentials)&&!m(t.withCredentials)&&(e.withCredentials=t.withCredentials),b(e,a).then(i,i)},l=[c,n],$=h.when(u);for(o(E,function(t){(t.request||t.requestError)&&l.unshift(t.request,t.requestError),(t.response||t.responseError)&&l.push(t.response,t.responseError)});l.length;){var p=l.shift(),d=l.shift();$=$.then(p,d)}return $.success=function(t){return oe(t,"fn"),$.then(function(e){t(e.data,e.status,e.headers,u)}),$},$.error=function(t){return oe(t,"fn"),$.then(null,function(e){t(e.data,e.status,e.headers,u)}),$},$}function d(){o(arguments,function(t){p[t]=function(e,n){return p(f(n||{},{method:t,url:e}))}})}function v(){o(arguments,function(t){p[t]=function(e,n,r){return p(f(r||{},{method:t,url:e,data:n}))}})}function b(r,i){function o(t,n,r,i){function o(){s(n,t,r,i)}$&&(ln(t)?$.put(x,[t,n,sn(r),i]):$.remove(x)),e?l.$applyAsync(o):(o(),l.$$phase||l.$apply())}function s(t,e,n,i){e=e>=-1?e:0,(ln(e)?v.resolve:v.reject)({data:t,status:e,headers:un(n),config:r,statusText:i})}function c(t){s(t.data,t.status,_(t.headers()),t.statusText)}function f(){var t=p.pendingRequests.indexOf(r);-1!==t&&p.pendingRequests.splice(t,1)}var $,d,v=h.defer(),w=v.promise,b=r.headers,x=C(r.url,r.params);if(p.pendingRequests.push(r),w.then(f,f),!r.cache&&!t.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||($=y(r.cache)?r.cache:y(t.cache)?t.cache:A),$&&(d=$.get(x),g(d)?V(d)?d.then(c,c):$i(d)?s(d[1],d[0],_(d[2]),d[3]):s(d,200,{},"OK"):$.put(x,w)),m(d)){var S=ar(r.url)?u.cookies()[r.xsrfCookieName||t.xsrfCookieName]:n;S&&(b[r.xsrfHeaderName||t.xsrfHeaderName]=S),a(r.method,x,i,o,b,r.timeout,r.withCredentials,r.responseType)}return w}function C(t,e){if(!e)return t;var n=[];return s(e,function(t,e){null===t||m(t)||($i(t)||(t=[t]),o(t,function(t){y(t)&&(t=x(t)?t.toISOString():L(t)),n.push(Z(e)+"="+Z(t))}))}),n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n.join("&")),t}var A=c("$http"),E=[];return o(i,function(t){E.unshift(w(t)?$.get(t):$.invoke(t))}),p.pendingRequests=[],d("get","delete","head","jsonp"),v("post","put","patch"),p.defaults=t,p}]}function hn(){return new t.XMLHttpRequest}function $n(){this.$get=["$browser","$window","$document",function(t,e,n){return pn(t,hn,t.defer,e.angular.callbacks,n[0])}]}function pn(t,e,r,i,a){function s(t,e,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=t,r.async=!0,o=function(t){Mi(r,"load",o),Mi(r,"error",o),a.body.removeChild(r),r=null;var s=-1,u="unknown";t&&("load"!==t.type||i[e].called||(t={type:"error"}),u=t.type,s="error"===t.type?404:200),n&&n(s,u)},Ti(r,"load",o),Ti(r,"error",o),a.body.appendChild(r),o}return function(a,u,c,l,f,h,$,d){function v(){w&&w(),b&&b.abort()}function m(e,i,o,a,s){C!==n&&r.cancel(C),w=b=null,e(i,o,a,s),t.$$completeOutstandingRequest(p)}if(t.$$incOutstandingRequestCount(),u=u||t.url(),"jsonp"==Zr(a)){var y="_"+(i.counter++).toString(36);i[y]=function(t){i[y].data=t,i[y].called=!0};var w=s(u.replace("JSON_CALLBACK","angular.callbacks."+y),y,function(t,e){m(l,t,i[y].data,"",e),i[y]=p})}else{var b=e();b.open(a,u,!0),o(f,function(t,e){g(t)&&b.setRequestHeader(e,t)}),b.onload=function(){var t=b.statusText||"",e="response"in b?b.response:b.responseText,n=1223===b.status?204:b.status;0===n&&(n=e?200:"file"==or(u).protocol?404:0),m(l,n,e,b.getAllResponseHeaders(),t)};var x=function(){m(l,-1,null,null,"")};if(b.onerror=x,b.onabort=x,$&&(b.withCredentials=!0),d)try{b.responseType=d}catch(S){if("json"!==d)throw S}b.send(c||null)}if(h>0)var C=r(v,h);else V(h)&&h.then(v)}}function dn(){var t="{{",e="}}";this.startSymbol=function(e){return e?(t=e,this):t},this.endSymbol=function(t){return t?(e=t,this):e},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(t){return"\\\\\\"+t}function a(o,a,h,$){function p(n){return n.replace(c,t).replace(l,e)}function d(t){try{return t=T(t),$&&!g(t)?t:M(t)}catch(e){var n=oo("interr","Can't interpolate: {0}\n{1}",o,e.toString());r(n)}}$=!!$;for(var v,y,w,b=0,x=[],C=[],A=o.length,E=[],k=[];A>b;){if(-1==(v=o.indexOf(t,b))||-1==(y=o.indexOf(e,v+s))){b!==A&&E.push(p(o.substring(b)));break}b!==v&&E.push(p(o.substring(b,v))),w=o.substring(v+s,y),x.push(w),C.push(n(w,d)),b=y+u,k.push(E.length),E.push("")}if(h&&E.length>1)throw oo("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||x.length){var O=function(t){for(var e=0,n=x.length;n>e;e++){if($&&m(t[e]))return;E[k[e]]=t[e]}return E.join("")},T=function(t){return h?i.getTrusted(h,t):i.valueOf(t)},M=function(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=L(t)}return t};return f(function(t){var e=0,n=x.length,i=new Array(n);try{for(;n>e;e++)i[e]=C[e](t);return O(i)}catch(a){var s=oo("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:x,$$watchDelegate:function(t,e,n){var r;return t.$watchGroup(C,function(n,i){var o=O(n);S(e)&&e.call(this,o,n!==i?r:o,t),r=o},n)}})}}var s=t.length,u=e.length,c=new RegExp(t.replace(/./g,o),"g"),l=new RegExp(e.replace(/./g,o),"g");return a.startSymbol=function(){return t},a.endSymbol=function(){return e},a}]}function vn(){this.$get=["$rootScope","$window","$q","$$q",function(t,e,n,r){function i(i,a,s,u){var c=e.setInterval,l=e.clearInterval,f=0,h=g(u)&&!u,$=(h?r:n).defer(),p=$.promise;return s=g(s)?s:0,p.then(null,null,i),p.$$intervalId=c(function(){$.notify(f++),s>0&&f>=s&&($.resolve(f),l(p.$$intervalId),delete o[p.$$intervalId]),h||t.$apply()},a),o[p.$$intervalId]=$,p}var o={};return i.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),e.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},i}]}function mn(){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:"¤",posSuf:"",negPre:"(¤",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",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(t){return 1===t?"one":"other"}}}}function gn(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=J(e[n]);return e.join("/")}function yn(t,e){var n=or(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=h(n.port)||so[n.protocol]||null}function wn(t,e){var n="/"!==t.charAt(0);n&&(t="/"+t);var r=or(t);e.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),e.$$search=W(r.search),e.$$hash=decodeURIComponent(r.hash),e.$$path&&"/"!=e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function bn(t,e){return 0===e.indexOf(t)?e.substr(t.length):void 0}function xn(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function Sn(t){return t.replace(/(#.+)|#$/,"$1")}function Cn(t){return t.substr(0,xn(t).lastIndexOf("/")+1)}function An(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function En(t,e,r){this.$$html5=!0,r=r||"",yn(t,this),this.$$parse=function(t){var n=bn(e,t);if(!w(n))throw uo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,e);wn(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=Y(this.$$search),n=this.$$hash?"#"+J(this.$$hash):"";this.$$url=gn(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,u;return(a=bn(t,i))!==n?(s=a,u=(a=bn(r,a))!==n?e+(bn("/",a)||a):t+s):(a=bn(e,i))!==n?u=e+a:e==i+"/"&&(u=e),u&&this.$$parse(u),!!u}}function kn(t,e,n){yn(t,this),this.$$parse=function(r){function i(t,e,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===e.indexOf(n)&&(e=e.replace(n,"")),i.exec(e)?t:(r=i.exec(t),r?r[1]:t)}var o,a=bn(t,r)||bn(e,r);m(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",m(a)&&(t=r,this.replace())):(o=bn(n,a),m(o)&&(o=a)),wn(o,this),this.$$path=i(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+J(this.$$hash):"";this.$$url=gn(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(e){return xn(t)==xn(e)?(this.$$parse(e),!0):!1}}function On(t,e,n){this.$$html5=!0,kn.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return t==xn(r)?o=r:(a=bn(e,r))?o=t+n+a:e===r+"/"&&(o=e),o&&this.$$parse(o),!!o},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+J(this.$$hash):"";this.$$url=gn(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+n+this.$$url}}function Tn(t){return function(){return this[t]}}function Mn(t,e){return function(n){return m(n)?this[t]:(this[t]=e(n),this.$$compose(),this)}}function Vn(){var t="",e={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return g(e)?(t=e,this):t},this.html5Mode=function(t){return M(t)?(e.enabled=t,this):y(t)?(M(t.enabled)&&(e.enabled=t.enabled),M(t.requireBase)&&(e.requireBase=t.requireBase),M(t.rewriteLinks)&&(e.rewriteLinks=t.rewriteLinks),this):e},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(t,e,n){var i=c.url(),o=c.$$state;try{r.url(t,e,n),c.$$state=r.state()}catch(a){throw c.url(i),c.$$state=o,a}}function u(t,e){n.$broadcast("$locationChangeSuccess",c.absUrl(),t,c.$$state,e)}var c,l,f,h=r.baseHref(),$=r.url();if(e.enabled){if(!h&&e.requireBase)throw uo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=An($)+(h||"/"),l=i.history?En:On}else f=xn($),l=kn;var p=Cn(f);c=new l(f,p,"#"+t),c.$$parseLinkUrl($,$),c.$$state=r.state();var d=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(e.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var i=ni(t.target);"a"!==j(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");y(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=or(s.animVal).href),d.test(s)||!s||i.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,u)&&(t.preventDefault(),c.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Sn(c.absUrl())!=Sn($)&&r.url(c.absUrl(),!0);var v=!0;return r.onUrlChange(function(t,e){return m(bn(p,t))?void(a.location.href=t):(n.$evalAsync(function(){var r,i=c.absUrl(),o=c.$$state;c.$$parse(t),c.$$state=e,r=n.$broadcast("$locationChangeStart",t,i,e,o).defaultPrevented,c.absUrl()===t&&(r?(c.$$parse(i),c.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var t=Sn(r.url()),e=Sn(c.absUrl()),o=r.state(),a=c.$$replace,l=t!==e||c.$$html5&&i.history&&o!==c.$$state;(v||l)&&(v=!1,n.$evalAsync(function(){var e=c.absUrl(),r=n.$broadcast("$locationChangeStart",e,t,c.$$state,o).defaultPrevented;c.absUrl()===e&&(r?(c.$$parse(t),c.$$state=o):(l&&s(e,a,o===c.$$state?null:c.$$state),u(t,o)))})),c.$$replace=!1}),c}]}function Nn(){var t=!0,e=this;this.debugEnabled=function(e){return g(e)?(t=e,this):t},this.$get=["$window",function(n){function r(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function i(t){var e=n.console||{},i=e[t]||e.log||p,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var t=[];return o(arguments,function(e){t.push(r(e))}),i.apply(e,t)}:function(t,e){i(t,null==e?"":e)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){t&&n.apply(e,arguments)}}()}}]}function Dn(t,e){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw lo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",e);return t}function jn(t,e){if(t+="",!w(t))throw lo("iseccst","Cannot convert object to primitive value! Expression: {0}",e);return t}function Rn(t,e){if(t){if(t.constructor===t)throw lo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t.window===t)throw lo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",e);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw lo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",e);if(t===Object)throw lo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",e)}return t}function Pn(t,e){if(t){if(t.constructor===t)throw lo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t===fo||t===ho||t===$o)throw lo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",e)}}function _n(t){return t.constant}function In(t,e,n,r,i){Rn(t,i),Rn(e,i);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Dn(a.shift(),i);var u=0===s&&e&&e[o]||t[o];u||(u={},t[o]=u),t=Rn(u,i)}return o=Dn(a.shift(),i),Rn(t[o],i),t[o]=r,r}function qn(t){return"constructor"==t}function Un(t,e,r,i,o,a,s){Dn(t,a),Dn(e,a),Dn(r,a),Dn(i,a),Dn(o,a);var u=function(t){return Rn(t,a)},c=s||qn(t)?u:d,l=s||qn(e)?u:d,f=s||qn(r)?u:d,h=s||qn(i)?u:d,$=s||qn(o)?u:d;return function(a,s){var u=s&&s.hasOwnProperty(t)?s:a;return null==u?u:(u=c(u[t]),e?null==u?n:(u=l(u[e]),r?null==u?n:(u=f(u[r]),i?null==u?n:(u=h(u[i]),o?null==u?n:u=$(u[o]):u):u):u):u)}}function Fn(t,e){return function(n,r){return t(n,r,Rn,e)}}function Hn(t,e,r){var i=e.expensiveChecks,a=i?bo:wo,s=a[t];if(s)return s;var u=t.split("."),c=u.length;if(e.csp)s=6>c?Un(u[0],u[1],u[2],u[3],u[4],r,i):function(t,e){var o,a=0;do o=Un(u[a++],u[a++],u[a++],u[a++],u[a++],r,i)(t,e),e=n,t=o;while(c>a);return o};else{var l="";i&&(l+="s = eso(s, fe);\nl = eso(l, fe);\n");var f=i;o(u,function(t,e){Dn(t,r);var n=(e?"s":'((l&&l.hasOwnProperty("'+t+'"))?l:s)')+"."+t;(i||qn(t))&&(n="eso("+n+", fe)",f=!0),l+="if(s == null) return undefined;\ns="+n+";\n"}),l+="return s;";var h=new Function("s","l","eso","fe",l);h.toString=v(l),f&&(h=Fn(h,r)),s=h}return s.sharedGetter=!0,s.assign=function(e,n,r){return In(e,r,t,n,t)},a[t]=s,s}function Ln(t){return S(t.valueOf)?t.valueOf():xo.call(t)}function Bn(){var t=ce(),e=ce();this.$get=["$filter","$sniffer",function(n,r){function i(t){var e=t;return t.sharedGetter&&(e=function(e,n){return t(e,n)},e.literal=t.literal,e.constant=t.constant,e.assign=t.assign),e}function a(t,e){for(var n=0,r=t.length;r>n;n++){var i=t[n];i.constant||(i.inputs?a(i.inputs,e):-1===e.indexOf(i)&&e.push(i))}return e}function s(t,e){return null==t||null==e?t===e:"object"==typeof t&&(t=Ln(t),"object"==typeof t)?!1:t===e||t!==t&&e!==e}function u(t,e,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var u=s;return o=o[0],t.$watch(function(t){var e=o(t);return s(e,u)||(i=r(t),u=e&&Ln(e)),i},e,n)}for(var c=[],l=0,f=o.length;f>l;l++)c[l]=s;return t.$watch(function(t){for(var e=!1,n=0,a=o.length;a>n;n++){var u=o[n](t);(e||(e=!s(u,c[n])))&&(c[n]=u&&Ln(u))}return e&&(i=r(t)),i},e,n)}function c(t,e,n,r){var i,o;return i=t.$watch(function(t){return r(t)},function(t,n,r){o=t,S(e)&&e.apply(this,arguments),g(t)&&r.$$postDigest(function(){g(o)&&i()})},n)}function l(t,e,n,r){function i(t){var e=!0;return o(t,function(t){g(t)||(e=!1)}),e}var a,s;return a=t.$watch(function(t){return r(t)},function(t,n,r){s=t,S(e)&&e.call(this,t,n,r),i(t)&&r.$$postDigest(function(){i(s)&&a()})},n)}function f(t,e,n,r){var i;return i=t.$watch(function(t){return r(t)},function(){S(e)&&e.apply(this,arguments),i()},n)}function h(t,e){if(!e)return t;var n=t.$$watchDelegate,r=n!==l&&n!==c,i=r?function(n,r){var i=t(n,r);return e(i,n,r)}:function(n,r){var i=t(n,r),o=e(i,n,r);return g(i)?o:i};return t.$$watchDelegate&&t.$$watchDelegate!==u?i.$$watchDelegate=t.$$watchDelegate:e.$stateful||(i.$$watchDelegate=u,i.inputs=[t]),i}var $={csp:r.csp,expensiveChecks:!1},d={csp:r.csp,expensiveChecks:!0};return function(r,o,a){var s,v,m;switch(typeof r){case"string":m=r=r.trim();var g=a?e:t;if(s=g[m],!s){":"===r.charAt(0)&&":"===r.charAt(1)&&(v=!0,r=r.substring(2));var y=a?d:$,w=new go(y),b=new yo(w,n,y);s=b.parse(r),s.constant?s.$$watchDelegate=f:v?(s=i(s),s.$$watchDelegate=s.literal?l:c):s.inputs&&(s.$$watchDelegate=u),g[m]=s}return h(s,o);case"function":return h(r,o);default:return h(p,o)}}}]}function zn(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Wn(function(e){t.$evalAsync(e)},e)}]}function Gn(){this.$get=["$browser","$exceptionHandler",function(t,e){return Wn(function(e){t.defer(e)},e)}]}function Wn(t,e){function i(t,e,n){function r(e){return function(n){i||(i=!0,e.call(t,n))}}var i=!1;return[r(e),r(n)]}function a(){this.$$state={status:0}}function s(t,e){return function(n){e.call(t,n)}}function u(t){var r,i,o;o=t.pending,t.processScheduled=!1,t.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][t.status];try{S(r)?i.resolve(r(t.value)):1===t.status?i.resolve(t.value):i.reject(t.value)}catch(u){i.reject(u),e(u)}}}function c(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){u(e)}))}function l(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(t){var e=new l,n=0,r=$i(t)?[]:{};return o(t,function(t,i){n++,m(t).then(function(t){r.hasOwnProperty(i)||(r[i]=t,--n||e.resolve(r))},function(t){r.hasOwnProperty(i)||e.reject(t)})}),0===n&&e.resolve(r),e.promise}var h=r("$q",TypeError),$=function(){return new l};a.prototype={then:function(t,e,n){var r=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,t,e,n]),this.$$state.status>0&&c(this.$$state),r.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,e){return this.then(function(e){return v(e,!0,t)},function(e){return v(e,!1,t)},e)}},l.prototype={resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(h("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(y(t)||S(t))&&(n=t&&t.then),S(n)?(this.promise.$$state.status=-1,n.call(t,r[0],r[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,c(this.promise.$$state))}catch(o){r[1](o),e(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&t(function(){for(var t,i,o=0,a=r.length;a>o;o++){i=r[o][0],t=r[o][3];try{i.notify(S(t)?t(n):n)}catch(s){e(s)}}})}};var p=function(t){var e=new l;return e.reject(t),e.promise},d=function(t,e){var n=new l;return e?n.resolve(t):n.reject(t),n.promise},v=function(t,e,n){var r=null;try{S(n)&&(r=n())}catch(i){return d(i,!1)}return V(r)?r.then(function(){return d(t,e)},function(t){return d(t,!1)}):d(t,e)},m=function(t,e,n,r){var i=new l;return i.resolve(t),i.promise.then(e,n,r)},g=function w(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}if(!S(t))throw h("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof w))return new w(t);var r=new l;return t(e,n),r.promise};return g.defer=$,g.reject=p,g.when=m,g.all=f,g}function Yn(){this.$get=["$window","$timeout",function(t,e){function n(){for(var t=0;t<l.length;t++){var e=l[t];e&&(l[t]=null,e())}c=l.length=0}function r(t){var e=l.length;return c++,l.push(t),0===e&&(u=s(n)),function(){e>=0&&(l[e]=null,e=null,0===--c&&u&&(u(),u=null,l.length=0))}}var i=t.requestAnimationFrame||t.webkitRequestAnimationFrame,o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,a=!!i,s=a?function(t){var e=i(t);return function(){o(e)}}:function(t){var n=e(t,16.66,!1);return function(){e.cancel(n)}};r.supported=a;var u,c=0,l=[];return r}]}function Jn(){function t(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null}return e.prototype=t,e}var e=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,l,f){function h(t){t.currentScope.$$destroyed=!0}function $(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function d(t){if(C.$$phase)throw n("inprog","{0} already in progress",C.$$phase);C.$$phase=t}function v(){C.$$phase=null}function g(t,e,n){do t.$$listenerCount[n]-=e,0===t.$$listenerCount[n]&&delete t.$$listenerCount[n];while(t=t.$parent)}function w(){}function b(){for(;k.length;)try{k.shift()()}catch(t){u(t)}s=null}function x(){null===s&&(s=f.defer(function(){C.$apply(b)}))}$.prototype={constructor:$,$new:function(e,n){var r;return n=n||this,e?(r=new $,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(e||n!=this)&&r.$on("$destroy",h),r},$watch:function(t,e,n){var r=l(t);if(r.$$watchDelegate)return r.$$watchDelegate(this,e,n,r);var i=this,o=i.$$watchers,s={fn:e,last:w,get:r,exp:t,eq:!!n};return a=null,S(e)||(s.fn=p),o||(o=i.$$watchers=[]),o.unshift(s),function(){R(o,s),a=null}},$watchGroup:function(t,e){function n(){u=!1,c?(c=!1,e(i,i,s)):e(i,r,s)}var r=new Array(t.length),i=new Array(t.length),a=[],s=this,u=!1,c=!0;if(!t.length){var l=!0;return s.$evalAsync(function(){l&&e(i,i,s)}),function(){l=!1}}return 1===t.length?this.$watch(t[0],function(t,n,o){i[0]=t,r[0]=n,e(i,t===n?i:r,o)}):(o(t,function(t,e){var o=s.$watch(t,function(t,o){i[e]=t,r[e]=o,u||(u=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,e){function n(t){o=t;var e,n,r,s,u;if(!m(o)){if(y(o))if(i(o)){a!==$&&(a=$,v=a.length=0,f++),e=o.length,v!==e&&(f++,a.length=v=e);for(var c=0;e>c;c++)u=a[c],s=o[c],r=u!==u&&s!==s,r||u===s||(f++,a[c]=s)}else{a!==p&&(a=p={},v=0,f++),e=0;for(n in o)o.hasOwnProperty(n)&&(e++,s=o[n],u=a[n],n in a?(r=u!==u&&s!==s,r||u===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>e){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f}}function r(){if(d?(d=!1,e(o,o,u)):e(o,s,u),c)if(y(o))if(i(o)){s=new Array(o.length);
  3. for(var t=0;t<o.length;t++)s[t]=o[t]}else{s={};for(var n in o)Kr.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,u=this,c=e.length>1,f=0,h=l(t,n),$=[],p={},d=!0,v=0;return this.$watch(h,r)},$digest:function(){var t,r,i,o,c,l,h,$,p,m,g=e,y=this,x=[];d("$digest"),f.$$checkUrlChange(),this===C&&null!==s&&(f.defer.cancel(s),b()),a=null;do{for(l=!1,$=y;A.length;){try{m=A.shift(),m.scope.$eval(m.expression,m.locals)}catch(k){u(k)}a=null}t:do{if(o=$.$$watchers)for(c=o.length;c--;)try{if(t=o[c])if((r=t.get($))===(i=t.last)||(t.eq?I(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(t===a){l=!1;break t}}else l=!0,a=t,t.last=t.eq?P(r,null):r,t.fn(r,i===w?r:i,$),5>g&&(p=4-g,x[p]||(x[p]=[]),x[p].push({msg:S(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:r,oldVal:i}))}catch(k){u(k)}if(!(h=$.$$childHead||$!==y&&$.$$nextSibling))for(;$!==y&&!(h=$.$$nextSibling);)$=$.$parent}while($=h);if((l||A.length)&&!g--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,x)}while(l||A.length);for(v();E.length;)try{E.shift()()}catch(k){u(k)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==C){for(var e in this.$$listenerCount)g(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return l(t)(this,e)},$evalAsync:function(t,e){C.$$phase||A.length||f.defer(function(){A.length&&C.$digest()}),A.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){E.push(t)},$apply:function(t){try{return d("$apply"),this.$eval(t)}catch(e){u(e)}finally{v();try{C.$digest()}catch(e){throw u(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&k.push(e),x()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(e);-1!==r&&(n[r]=null,g(i,1,t))}},$emit:function(t){var e,n,r,i=[],o=this,a=!1,s={name:t,targetScope:o,stopPropagation:function(){a=!0},preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},c=q([s],arguments,1);do{for(e=o.$$listeners[t]||i,s.currentScope=o,n=0,r=e.length;r>n;n++)if(e[n])try{e[n].apply(null,c)}catch(l){u(l)}else e.splice(n,1),n--,r--;if(a)return s.currentScope=null,s;o=o.$parent}while(o);return s.currentScope=null,s},$broadcast:function(t){var e=this,n=e,r=e,i={name:t,targetScope:e,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return i;for(var o,a,s,c=q([i],arguments,1);n=r;){for(i.currentScope=n,o=n.$$listeners[t]||[],a=0,s=o.length;s>a;a++)if(o[a])try{o[a].apply(null,c)}catch(l){u(l)}else o.splice(a,1),a--,s--;if(!(r=n.$$listenerCount[t]&&n.$$childHead||n!==e&&n.$$nextSibling))for(;n!==e&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var C=new $,A=C.$$asyncQueue=[],E=C.$$postDigestQueue=[],k=C.$$applyAsyncQueue=[];return C}]}function Zn(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return g(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return g(t)?(e=t,this):e},this.$get=function(){return function(n,r){var i,o=r?e:t;return i=or(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function Kn(t){if("self"===t)return t;if(w(t)){if(t.indexOf("***")>-1)throw So("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=di(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(C(t))return new RegExp("^"+t.source+"$");throw So("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Xn(t){var e=[];return g(t)&&o(t,function(t){e.push(Kn(t))}),e}function Qn(){this.SCE_CONTEXTS=Co;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Xn(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Xn(t)),e},this.$get=["$injector",function(r){function i(t,e){return"self"===t?ar(e):!!t.exec(e.href)}function o(n){var r,o,a=or(n.toString()),s=!1;for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!0;break}if(s)for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!1;break}return s}function a(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var r=h.hasOwnProperty(t)?h[t]:null;if(!r)throw So("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw So("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new r(e)}function u(t){return t instanceof f?t.$$unwrapTrustedValue():t}function c(t,e){if(null===e||e===n||""===e)return e;var r=h.hasOwnProperty(t)?h[t]:null;if(r&&e instanceof r)return e.$$unwrapTrustedValue();if(t===Co.RESOURCE_URL){if(o(e))return e;throw So("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",e.toString())}if(t===Co.HTML)return l(e);throw So("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(){throw So("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(l=r.get("$sanitize"));var f=a(),h={};return h[Co.HTML]=a(f),h[Co.CSS]=a(f),h[Co.URL]=a(f),h[Co.JS]=a(f),h[Co.RESOURCE_URL]=a(h[Co.URL]),{trustAs:s,getTrusted:c,valueOf:u}}]}function tr(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>ei)throw So("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=_(Co);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=d),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,function(e){return r.getTrusted(t,e)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o(Co,function(t,e){var n=Zr(e);r[de("parse_as_"+n)]=function(e){return i(t,e)},r[de("get_trusted_"+n)]=function(e){return a(t,e)},r[de("trust_as_"+n)]=function(e){return s(t,e)}}),r}]}function er(){this.$get=["$window","$document",function(t,e){var n,r,i={},o=h((/android (\d+)/.exec(Zr((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,l=!1,f=!1;if(c){for(var $ in c)if(r=u.exec($)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),l=!!("transition"in c||n+"Transition"in c),f=!!("animation"in c||n+"Animation"in c),!o||l&&f||(l=w(s.body.style.webkitTransition),f=w(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=ei)return!1;if(m(i[t])){var e=s.createElement("div");i[t]="on"+t in e}return i[t]},csp:vi(),vendorPrefix:n,transitions:l,animations:f,android:o}}]}function nr(){this.$get=["$templateCache","$http","$q","$sce",function(t,e,n,r){function i(o,a){function s(t){if(!a)throw Ki("tpload","Failed to load template: {0}",o);return n.reject(t)}i.totalPendingRequests++,w(o)&&t.get(o)||(o=r.getTrustedResourceUrl(o));var u=e.defaults&&e.defaults.transformResponse;$i(u)?u=u.filter(function(t){return t!==on}):u===on&&(u=null);var c={cache:t,transformResponse:u};return e.get(o,c)["finally"](function(){i.totalPendingRequests--}).then(function(t){return t.data},s)}return i.totalPendingRequests=0,i}]}function rr(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var r={};return r.findBindings=function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return o(r,function(t){var r=li.element(t).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+di(e)+"(\\s|\\||$)");o.test(r)&&i.push(t)}else-1!=r.indexOf(e)&&i.push(t)})}),i},r.findModels=function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+e+'"]',s=t.querySelectorAll(a);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},r.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},r}]}function ir(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,r,i){function o(o,s,u){var c,l=g(u)&&!u,f=(l?r:n).defer(),h=f.promise;return c=e.defer(function(){try{f.resolve(o())}catch(e){f.reject(e),i(e)}finally{delete a[h.$$timeoutId]}l||t.$apply()},s),h.$$timeoutId=c,a[c]=f,h}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},o}]}function or(t){var e=t;return ei&&(Ao.setAttribute("href",e),e=Ao.href),Ao.setAttribute("href",e),{href:Ao.href,protocol:Ao.protocol?Ao.protocol.replace(/:$/,""):"",host:Ao.host,search:Ao.search?Ao.search.replace(/^\?/,""):"",hash:Ao.hash?Ao.hash.replace(/^#/,""):"",hostname:Ao.hostname,port:Ao.port,pathname:"/"===Ao.pathname.charAt(0)?Ao.pathname:"/"+Ao.pathname}}function ar(t){var e=w(t)?or(t):t;return e.protocol===Eo.protocol&&e.host===Eo.host}function sr(){this.$get=v(t)}function ur(t){function e(r,i){if(y(r)){var a={};return o(r,function(t,n){a[n]=e(n,t)}),a}return t.factory(r+n,i)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",hr),e("date",Ar),e("filter",cr),e("json",Er),e("limitTo",kr),e("lowercase",Vo),e("number",$r),e("orderBy",Or),e("uppercase",No)}function cr(){return function(t,e,n){if(!$i(t))return t;var r,i,o=null!==e?typeof e:"null";switch(o){case"function":r=e;break;case"boolean":case"null":case"number":case"string":i=!0;case"object":r=lr(e,n,i);break;default:return t}return t.filter(r)}}function lr(t,e,n){var r,i=y(t)&&"$"in t;return e===!0?e=I:S(e)||(e=function(t,e){return m(t)?!1:null===t||null===e?t===e:y(t)||y(e)?!1:(t=Zr(""+t),e=Zr(""+e),-1!==t.indexOf(e))}),r=function(r){return i&&!y(r)?fr(r,t.$,e,!1):fr(r,t,e,n)}}function fr(t,e,n,r,i){var o=null!==t?typeof t:"null",a=null!==e?typeof e:"null";if("string"===a&&"!"===e.charAt(0))return!fr(t,e.substring(1),n,r);if($i(t))return t.some(function(t){return fr(t,e,n,r)});switch(o){case"object":var s;if(r){for(s in t)if("$"!==s.charAt(0)&&fr(t[s],e,n,!0))return!0;return i?!1:fr(t,e,n,!1)}if("object"===a){for(s in e){var u=e[s];if(!S(u)&&!m(u)){var c="$"===s,l=c?t:t[s];if(!fr(l,u,n,c,c))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function hr(t){var e=t.NUMBER_FORMATS;return function(t,n,r){return m(n)&&(n=e.CURRENCY_SYM),m(r)&&(r=e.PATTERNS[1].maxFrac),null==t?t:pr(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function $r(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:pr(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function pr(t,e,n,r,i){if(!isFinite(t)||y(t))return"";var o=0>t;t=Math.abs(t);var a=t+"",s="",u=[],c=!1;if(-1!==a.indexOf("e")){var l=a.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>i+1?t=0:(s=a,c=!0)}if(c)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s));else{var f=(a.split(ko)[1]||"").length;m(i)&&(i=Math.min(Math.max(e.minFrac,f),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var h=(""+t).split(ko),$=h[0];h=h[1]||"";var p,d=0,v=e.lgSize,g=e.gSize;if($.length>=v+g)for(d=$.length-v,p=0;d>p;p++)(d-p)%g===0&&0!==p&&(s+=n),s+=$.charAt(p);for(p=d;p<$.length;p++)($.length-p)%v===0&&0!==p&&(s+=n),s+=$.charAt(p);for(;h.length<i;)h+="0";i&&"0"!==i&&(s+=r+h.substr(0,i))}return 0===t&&(o=!1),u.push(o?e.negPre:e.posPre,s,o?e.negSuf:e.posSuf),u.join("")}function dr(t,e,n){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),r+t}function vr(t,e,n,r){return n=n||0,function(i){var o=i["get"+t]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),dr(o,e,r)}}function mr(t,e){return function(n,r){var i=n["get"+t](),o=Xr(e?"SHORT"+t:t);return r[o][i]}}function gr(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=dr(Math[e>0?"floor":"ceil"](e/60),2)+dr(Math.abs(e%60),2)}function yr(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function wr(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function br(t){return function(e){var n=yr(e.getFullYear()),r=wr(e),i=+r-+n,o=1+Math.round(i/6048e5);return dr(o,t)}}function xr(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function Sr(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}function Cr(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}function Ar(t){function e(t){var e;if(e=t.match(n)){var r=new Date(0),i=0,o=0,a=e[8]?r.setUTCFullYear:r.setFullYear,s=e[8]?r.setUTCHours:r.setHours;e[9]&&(i=h(e[9]+e[10]),o=h(e[9]+e[11])),a.call(r,h(e[1]),h(e[2])-1,h(e[3]));var u=h(e[4]||0)-i,c=h(e[5]||0)-o,l=h(e[6]||0),f=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(r,u,c,l,f),r}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,u="",c=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,w(n)&&(n=Mo.test(n)?h(n):e(n)),b(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=To.exec(r),s?(c=q(c,s,1),r=c.pop()):(c.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(e){a=Oo[e],u+=a?a(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function Er(){return function(t,e){return m(e)&&(e=2),L(t,e)}}function kr(){return function(t,e){return b(t)&&(t=t.toString()),$i(t)||w(t)?(e=1/0===Math.abs(Number(e))?Number(e):h(e),e?e>0?t.slice(0,e):t.slice(e):w(t)?"":[]):t}}function Or(t){return function(e,n,r){function o(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function a(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function u(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function c(t,e){var n=typeof t,r=typeof e;return n===r&&"object"===n&&(t=u(t),e=u(e)),n===r?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}return i(e)?(n=$i(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,r=e||d;if(w(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return a(c,n);if(r=t(e),r.constant){var i=r();return a(function(t,e){return c(t[i],e[i])},n)}}return a(function(t,e){return c(r(t),r(e))},n)}),oi.call(e).sort(a(o,r))):e}}function Tr(t){return S(t)&&(t={link:t}),t.restrict=t.restrict||"AC",v(t)}function Mr(t,e){t.$name=e}function Vr(t,e,r,i,a){var s=this,u=[],c=s.$$parentForm=t.parent().controller("form")||Ro;s.$error={},s.$$success={},s.$pending=n,s.$name=a(e.name||e.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,c.$addControl(s),s.$rollbackViewValue=function(){o(u,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){o(u,function(t){t.$commitViewValue()})},s.$addControl=function(t){ae(t.$name,"input"),u.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],o(s.$pending,function(e,n){s.$setValidity(n,null,t)}),o(s.$error,function(e,n){s.$setValidity(n,null,t)}),o(s.$$success,function(e,n){s.$setValidity(n,null,t)}),R(u,t)},Gr({ctrl:this,$element:t,set:function(t,e,n){var r=t[e];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else t[e]=[n]},unset:function(t,e,n){var r=t[e];r&&(R(r,n),0===r.length&&delete t[e])},parentForm:c,$animate:i}),s.$setDirty=function(){i.removeClass(t,ma),i.addClass(t,ga),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){i.setClass(t,ma,ga+" "+Po),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(u,function(t){t.$setPristine()})},s.$setUntouched=function(){o(u,function(t){t.$setUntouched()})},s.$setSubmitted=function(){i.addClass(t,Po),s.$submitted=!0,c.$setSubmitted()}}function Nr(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Dr(t,e,n,r,i,o){jr(t,e,n,r,i,o),Nr(r)}function jr(t,e,n,r,i,o){var a=Zr(e[0].type);if(!i.android){var s=!1;e.on("compositionstart",function(){s=!0}),e.on("compositionend",function(){s=!1,u()})}var u=function(t){if(c&&(o.defer.cancel(c),c=null),!s){var i=e.val(),u=t&&t.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=pi(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,u)}};if(i.hasEvent("input"))e.on("input",u);else{var c,l=function(t,e,n){c||(c=o.defer(function(){c=null,e&&e.value===n||u(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||l(t,this,this.value)}),i.hasEvent("paste")&&e.on("paste cut",l)}e.on("change",u),r.$render=function(){e.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Rr(t,e){if(x(t))return t;if(w(t)){Go.lastIndex=0;var n=Go.exec(t);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,c=yr(r),l=7*(i-1);return e&&(o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),u=e.getMilliseconds()),new Date(r,0,c.getDate()+l,o,a,s,u)}}return 0/0}function Pr(t,e){return function(n,r){var i,a;if(x(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Uo.test(n))return new Date(n);if(t.lastIndex=0,i=t.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(t,n){n<e.length&&(a[e[n]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return 0/0}}function _r(t,e,r,i){return function(o,a,s,u,c,l,f){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function $(t){return g(t)?x(t)?t:r(t):n}Ir(o,a,s,u),jr(o,a,s,u,c,l);var p,d=u&&u.$options&&u.$options.timezone;if(u.$$parserName=t,u.$parsers.push(function(t){if(u.$isEmpty(t))return null;if(e.test(t)){var i=r(t,p);return"UTC"===d&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),u.$formatters.push(function(t){if(t&&!x(t))throw xa("datefmt","Expected `{0}` to be a date",t);if(h(t)){if(p=t,p&&"UTC"===d){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return f("date")(t,i,d)}return p=null,""}),g(s.min)||s.ngMin){var v;u.$validators.min=function(t){return!h(t)||m(v)||r(t)>=v},s.$observe("min",function(t){v=$(t),u.$validate()})}if(g(s.max)||s.ngMax){var y;u.$validators.max=function(t){return!h(t)||m(y)||r(t)<=y},s.$observe("max",function(t){y=$(t),u.$validate()})}}}function Ir(t,e,r,i){var o=e[0],a=i.$$hasNativeValidators=y(o.validity);a&&i.$parsers.push(function(t){var r=e.prop(Jr)||{};return r.badInput&&!r.typeMismatch?n:t})}function qr(t,e,r,i,o,a){if(Ir(t,e,r,i),jr(t,e,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Lo.test(t)?parseFloat(t):n}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!b(t))throw xa("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),g(r.min)||r.ngMin){var s;i.$validators.min=function(t){return i.$isEmpty(t)||m(s)||t>=s},r.$observe("min",function(t){g(t)&&!b(t)&&(t=parseFloat(t,10)),s=b(t)&&!isNaN(t)?t:n,i.$validate()})}if(g(r.max)||r.ngMax){var u;i.$validators.max=function(t){return i.$isEmpty(t)||m(u)||u>=t},r.$observe("max",function(t){g(t)&&!b(t)&&(t=parseFloat(t,10)),u=b(t)&&!isNaN(t)?t:n,i.$validate()})}}function Ur(t,e,n,r,i,o){jr(t,e,n,r,i,o),Nr(r),r.$$parserName="url",r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Fo.test(n)}}function Fr(t,e,n,r,i,o){jr(t,e,n,r,i,o),Nr(r),r.$$parserName="email",r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Ho.test(n)}}function Hr(t,e,n,r){m(n.name)&&e.attr("name",c());var i=function(t){e[0].checked&&r.$setViewValue(n.value,t&&t.type)};e.on("click",i),r.$render=function(){var t=n.value;e[0].checked=t==r.$viewValue},n.$observe("value",r.$render)}function Lr(t,e,n,r,i){var o;if(g(r)){if(o=t(r),!o.constant)throw xa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(e)}return i}function Br(t,e,n,r,i,o,a,s){var u=Lr(s,t,"ngTrueValue",n.ngTrueValue,!0),c=Lr(s,t,"ngFalseValue",n.ngFalseValue,!1),l=function(t){r.$setViewValue(e[0].checked,t&&t.type)};e.on("click",l),r.$render=function(){e[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return I(t,u)}),r.$parsers.push(function(t){return t?u:c})}function zr(t,e){return t="ngClass"+t,["$animate",function(n){function r(t,e){var n=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],o=0;o<e.length;o++)if(i==e[o])continue t;n.push(i)}return n}function i(t){if($i(t))return t;if(w(t))return t.split(" ");if(y(t)){var e=[];return o(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(a,s,u){function c(t){var e=f(t,1);u.$addClass(e)}function l(t){var e=f(t,-1);u.$removeClass(e)}function f(t,e){var n=s.data("$classCounts")||{},r=[];return o(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&r.push(t))}),s.data("$classCounts",n),r.join(" ")}function h(t,e){var i=r(e,t),o=r(t,e);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function $(t){if(e===!0||a.$index%2===e){var n=i(t||[]);if(p){if(!I(t,p)){var r=i(p);h(r,n)}}else c(n)}p=_(t)}var p;a.$watch(u[t],$,!0),u.$observe("class",function(){$(a.$eval(u[t]))}),"ngClass"!==t&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(u[t]));o===e?c(s):l(s)}})}}}]}function Gr(t){function e(t,e,u){e===n?r("$pending",t,u):i("$pending",t,u),M(e)?e?(f(s.$error,t,u),l(s.$$success,t,u)):(l(s.$error,t,u),f(s.$$success,t,u)):(f(s.$error,t,u),f(s.$$success,t,u)),s.$pending?(o(ba,!0),s.$valid=s.$invalid=n,a("",null)):(o(ba,!1),s.$valid=Wr(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,a(t,c),h.$setValidity(t,c,s)}function r(t,e,n){s[t]||(s[t]={}),l(s[t],e,n)}function i(t,e,r){s[t]&&f(s[t],e,r),Wr(s[t])&&(s[t]=n)}function o(t,e){e&&!c[t]?($.addClass(u,t),c[t]=!0):!e&&c[t]&&($.removeClass(u,t),c[t]=!1)}function a(t,e){t=t?"-"+ne(t,"-"):"",o(da+t,e===!0),o(va+t,e===!1)}var s=t.ctrl,u=t.$element,c={},l=t.set,f=t.unset,h=t.parentForm,$=t.$animate;c[va]=!(c[da]=u.hasClass(da)),s.$setValidity=e}function Wr(t){if(t)for(var e in t)return!1;return!0}var Yr=/^\/(.+)\/([a-z]*)$/,Jr="validity",Zr=function(t){return w(t)?t.toLowerCase():t},Kr=Object.prototype.hasOwnProperty,Xr=function(t){return w(t)?t.toUpperCase():t},Qr=function(t){return w(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},ti=function(t){return w(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Zr=Qr,Xr=ti);var ei,ni,ri,ii,oi=[].slice,ai=[].splice,si=[].push,ui=Object.prototype.toString,ci=r("ng"),li=t.angular||(t.angular={}),fi=0;ei=e.documentMode,p.$inject=[],d.$inject=[];var hi,$i=Array.isArray,pi=function(t){return w(t)?t.trim():t},di=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},vi=function(){if(g(vi.isActive_))return vi.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return vi.isActive_=t},mi=["ng-","data-ng-","ng:","x-ng-"],gi=/[A-Z]/g,yi=!1,wi=1,bi=2,xi=3,Si=8,Ci=9,Ai=11,Ei={full:"1.3.20",major:1,minor:3,dot:20,codeName:"shallow-translucence"};we.expando="ng339";var ki=we.cache={},Oi=1,Ti=function(t,e,n){t.addEventListener(e,n,!1)},Mi=function(t,e,n){t.removeEventListener(e,n,!1)};we._data=function(t){return this.cache[t[this.expando]]||{}};var Vi=/([\:\-\_]+(.))/g,Ni=/^moz([A-Z])/,Di={mouseleave:"mouseout",mouseenter:"mouseover"},ji=r("jqLite"),Ri=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Pi=/<|&#?\w+;/,_i=/<([\w:]+)/,Ii=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qi.optgroup=qi.option,qi.tbody=qi.tfoot=qi.colgroup=qi.caption=qi.thead,qi.th=qi.td;var Ui=we.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===e.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),we(t).on("load",r))},toString:function(){var t=[];return o(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return ni(t>=0?this[t]:this[this.length+t])},length:0,push:si,sort:[].sort,splice:[].splice},Fi={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Fi[Zr(t)]=t});var Hi={};o("input,select,option,textarea,button,form,details".split(","),function(t){Hi[t]=!0});var Li={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Ee,removeData:Ce},function(t,e){we[e]=t}),o({data:Ee,inheritedData:Ne,scope:function(t){return ni.data(t,"$scope")||Ne(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return ni.data(t,"$isolateScope")||ni.data(t,"$isolateScopeNoTemplate")},controller:Ve,injector:function(t){return Ne(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:ke,css:function(t,e,n){return e=de(e),g(n)?void(t.style[e]=n):t.style[e]},attr:function(t,e,r){var i=t.nodeType;if(i!==xi&&i!==bi&&i!==Si){var o=Zr(e);if(Fi[o]){if(!g(r))return t[e]||(t.attributes.getNamedItem(e)||p).specified?o:n;r?(t[e]=!0,t.setAttribute(e,o)):(t[e]=!1,t.removeAttribute(o))}else if(g(r))t.setAttribute(e,r);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}}},prop:function(t,e,n){return g(n)?void(t[e]=n):t[e]},text:function(){function t(t,e){if(m(e)){var n=t.nodeType;return n===wi||n===xi?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(m(e)){if(t.multiple&&"select"===j(t)){var n=[];return o(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return m(e)?t.innerHTML:(xe(t,!0),void(t.innerHTML=e))},empty:De},function(t,e){we.prototype[e]=function(e,r){var i,o,a=this.length;if(t!==De&&(2==t.length&&t!==ke&&t!==Ve?e:r)===n){if(y(e)){for(i=0;a>i;i++)if(t===Ee)t(this[i],e);else for(o in e)t(this[i],o,e[o]);return this}for(var s=t.$dv,u=s===n?Math.min(a,1):a,c=0;u>c;c++){var l=t(this[c],e,r);s=s?s+l:l}return s}for(i=0;a>i;i++)t(this[i],e,r);return this}}),o({removeData:Ce,on:function Ja(t,e,n,r){if(g(r))throw ji("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(me(t)){var i=Ae(t,!0),o=i.events,a=i.handle;a||(a=i.handle=Ie(t,o));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],u=s.length;u--;){e=s[u];var c=o[e];c||(o[e]=[],"mouseenter"===e||"mouseleave"===e?Ja(t,Di[e],function(t){var n=this,r=t.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(t,e)}):"$destroy"!==e&&Ti(t,e,a),c=o[e]),c.push(n)}}},off:Se,one:function(t,e,n){t=ni(t),t.on(e,function r(){t.off(e,n),t.off(e,r)}),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;xe(t),o(new we(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(t){var e=[];return o(t.childNodes,function(t){t.nodeType===wi&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===wi||n===Ai){e=new we(e);for(var r=0,i=e.length;i>r;r++){var o=e[r];t.appendChild(o)}}},prepend:function(t,e){if(t.nodeType===wi){var n=t.firstChild;o(new we(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=ni(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:je,detach:function(t){je(t,!0)},after:function(t,e){var n=t,r=t.parentNode;e=new we(e);for(var i=0,o=e.length;o>i;i++){var a=e[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Te,removeClass:Oe,toggleClass:function(t,e,n){e&&o(e.split(" "),function(e){var r=n;m(r)&&(r=!ke(t,e)),(r?Te:Oe)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==Ai?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:be,triggerHandler:function(t,e,n){var r,i,a,s=e.type||e,u=Ae(t),c=u&&u.events,l=c&&c[s];l&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(r=f(r,e)),i=_(l),a=n?[r].concat(n):[r],o(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(t,e){we.prototype[e]=function(e,n,r){for(var i,o=0,a=this.length;a>o;o++)m(i)?(i=t(this[o],e,n,r),g(i)&&(i=ni(i))):Me(i,t(this[o],e,n,r));return g(i)?i:this},we.prototype.bind=we.prototype.on,we.prototype.unbind=we.prototype.off}),Fe.prototype={put:function(t,e){this[Ue(t,this.nextUid)]=e},get:function(t){return this[Ue(t,this.nextUid)]},remove:function(t){var e=this[t=Ue(t,this.nextUid)];return delete this[t],e}};var Bi=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,zi=/,/,Gi=/^\s*(_?)(\S+?)\1\s*$/,Wi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Yi=r("$injector");Be.$$annotate=Le;var Ji=r("$animate"),Zi=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var r=e+"-animation";if(e&&"."!=e.charAt(0))throw Ji("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=r,t.factory(r,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function r(e){var r,i=t.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=e(function(){i.resolve()})}),i.promise}function i(t,e){var n=[],r=[],i=ce();return o((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0}),o(e,function(t,e){var o=i[e];t===!1&&o?r.push(e):t!==!0||o||n.push(e)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function a(t,e,n){for(var r=0,i=e.length;i>r;++r){var o=e[r];t[o]=n}}function s(){return c||(c=t.defer(),e(function(){c.resolve(),c=null})),c.promise}function u(t,e){if(li.isObject(e)){var n=f(e.from||{},e.to||{});t.css(n)}}var c;return{animate:function(t,e,n){return u(t,{from:e,to:n}),s()},enter:function(t,e,n,r){return u(t,r),n?n.after(t):e.prepend(t),s()},leave:function(t,e){return u(t,e),t.remove(),s()},move:function(t,e,n,r){return this.enter(t,e,n,r)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=ni(t),e=w(e)?e:$i(e)?e.join(" "):"",o(t,function(t){Te(t,e)}),u(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},$$removeClassImmediately:function(t,e,n){return t=ni(t),e=w(e)?e:$i(e)?e.join(" "):"",o(t,function(t){Oe(t,e)
  4. }),u(t,n),s()},setClass:function(t,e,n,o){var s=this,u="$$animateClasses",c=!1;t=ni(t);var l=t.data(u);l?o&&l.options&&(l.options=li.extend(l.options||{},o)):(l={classes:{},options:o},c=!0);var f=l.classes;return e=$i(e)?e:e.split(" "),n=$i(n)?n:n.split(" "),a(f,e,!0),a(f,n,!1),c&&(l.promise=r(function(e){var n=t.data(u);if(t.removeData(u),n){var r=i(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()}),t.data(u,l)),l.promise},$$setClassImmediately:function(t,e,n,r){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),u(t,r),s()},enabled:p,cancel:p}}]}],Ki=r("$compile");Ke.$inject=["$provide","$$sanitizeUriProvider"];var Xi=/^((?:x|data)[\:\-_])/i,Qi=r("$controller"),to="application/json",eo={"Content-Type":to+";charset=utf-8"},no=/^\[|^\{(?!\{)/,ro={"[":/]$/,"{":/}$/},io=/^\)\]\}',?\n/,oo=r("$interpolate"),ao=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,so={http:80,https:443,ftp:21},uo=r("$location"),co={$$html5:!1,$$replace:!1,absUrl:Tn("$$absUrl"),url:function(t){if(m(t))return this.$$url;var e=ao.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:Tn("$$protocol"),host:Tn("$$host"),port:Tn("$$port"),path:Mn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(w(t)||b(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw uo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=P(t,{}),o(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:m(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Mn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([On,kn,En],function(t){t.prototype=Object.create(co),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==En||!this.$$html5)throw uo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=m(e)?null:e,this}});var lo=r("$parse"),fo=Function.prototype.call,ho=Function.prototype.apply,$o=Function.prototype.bind,po=ce();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,po[e]=t}),po["this"]=function(t){return t},po["this"].sharedGetter=!0;var vo=f(ce(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),g(r)?g(i)?r+i:r:g(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(g(n)?n:0)-(g(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),mo={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},go=function(t){this.options=t};go.prototype={constructor:go,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=vo[e],o=vo[n],a=vo[r];if(i||o||a){var s=a?r:o?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||" "===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=g(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw lo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Zr(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=mo[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===t)return this.index++,void this.tokens.push({index:e,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",e)}};var yo=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};yo.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),yo.prototype={constructor:yo,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in po?t=po[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw lo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw lo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===r||a===i||!e&&!n&&!r&&!i)return o}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw lo("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=vo[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=vo[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Hn(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,o=t.length;o>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var o=[t].concat(e||[]);return f(function(o,a){var s=t(o,a);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&o.every(_n),inputs:!i.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(yo.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,o){var a=o||t(r,i);return null==a?n:e(a)},{assign:function(n,r,i){var o=t(n,i);return o||t.assign(n,o={},i),e.assign(o,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,o){var a,s=t(i,o),u=jn(r(i,o),e);return Dn(u,e),s?a=Rn(s[u],e):n},{assign:function(n,i,o){var a=Dn(jn(r(n,o),e),e),s=Rn(t(n,o),e);return s||t.assign(n,s={},o),s[a]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,o=r.length?[]:null;return function(a,s){var u=e?e(a,s):g(e)?n:a,c=t(a,s,u)||p;if(o)for(var l=r.length;l--;)o[l]=Rn(r[l](a,s),i);Rn(u,i),Pn(c,i);var f=c.apply?c.apply(u,o):c(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),Rn(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,o=t.length;o>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(_n),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},o=0,a=e.length;a>o;o++)i[t[o]]=e[o](n,r);return i},{literal:!0,constant:e.every(_n),inputs:e})}};var wo=ce(),bo=ce(),xo=Object.prototype.valueOf,So=r("$sce"),Co={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Ki=r("$compile"),Ao=e.createElement("a"),Eo=or(t.location.href);ur.$inject=["$provide"],hr.$inject=["$locale"],$r.$inject=["$locale"];var ko=".",Oo={yyyy:vr("FullYear",4),yy:vr("FullYear",2,0,!0),y:vr("FullYear",1),MMMM:mr("Month"),MMM:mr("Month",!0),MM:vr("Month",2,1),M:vr("Month",1,1),dd:vr("Date",2),d:vr("Date",1),HH:vr("Hours",2),H:vr("Hours",1),hh:vr("Hours",2,-12),h:vr("Hours",1,-12),mm:vr("Minutes",2),m:vr("Minutes",1),ss:vr("Seconds",2),s:vr("Seconds",1),sss:vr("Milliseconds",3),EEEE:mr("Day"),EEE:mr("Day",!0),a:xr,Z:gr,ww:br(2),w:br(1),G:Sr,GG:Sr,GGG:Sr,GGGG:Cr},To=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Mo=/^\-?\d+$/;Ar.$inject=["$locale"];var Vo=v(Zr),No=v(Xr);Or.$inject=["$parse"];var Do=v({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ui.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),jo={};o(Fi,function(t,e){if("multiple"!=t){var n=Xe("ng-"+e);jo[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),o(Li,function(t,e){jo[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Yr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),o(["src","srcset","href"],function(t){var e=Xe("ng-"+t);jo[e]=function(){return{priority:99,link:function(n,r,i){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===ui.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(e,function(e){return e?(i.$set(a,e),void(ei&&o&&r.prop(o,i[a]))):void("href"===t&&i.$set(a,null))})}}}});var Ro={$addControl:p,$$renameControl:Mr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Po="ng-submitted";Vr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var _o=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Vr,compile:function(r,i){r.addClass(ma).addClass(da);var o=i.name?"name":t&&i.ngForm?"ngForm":!1;return{pre:function(t,r,i,a){if(!("action"in i)){var s=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Ti(r[0],"submit",s),r.on("$destroy",function(){e(function(){Mi(r[0],"submit",s)},0,!1)})}var u=a.$$parentForm;o&&(In(t,null,a.$name,a,a.$name),i.$observe(o,function(e){a.$name!==e&&(In(t,null,a.$name,n,a.$name),u.$$renameControl(a,e),In(t,null,a.$name,a,a.$name))})),r.on("$destroy",function(){u.$removeControl(a),o&&In(t,null,i[o],n,a.$name),f(a,Ro)})}}}};return r}]},Io=_o(),qo=_o(!0),Uo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Fo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ho=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Lo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Bo=/^(\d{4})-(\d{2})-(\d{2})$/,zo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Go=/^(\d{4})-W(\d\d)$/,Wo=/^(\d{4})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Jo={text:Dr,date:_r("date",Bo,Pr(Bo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":_r("datetimelocal",zo,Pr(zo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:_r("time",Yo,Pr(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:_r("week",Go,Rr,"yyyy-Www"),month:_r("month",Wo,Pr(Wo,["yyyy","MM"]),"yyyy-MM"),number:qr,url:Ur,email:Fr,radio:Hr,checkbox:Br,hidden:p,button:p,submit:p,reset:p,file:p},Zo=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Jo[Zr(a.type)]||Jo.text)(i,o,a,s[0],e,t,n,r)}}}}],Ko=/^(true|false|\d+)$/,Xo=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ko.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Qo=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],ta=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,o){var a=t(i.attr(o.$attr.ngBindTemplate));e.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],ea=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var o=e(i.ngBindHtml),a=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(a,function(){r.html(t.getTrustedHtml(o(e))||"")})}}}}],na=v({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),ra=zr("",!0),ia=zr("Odd",0),oa=zr("Even",1),aa=Tr({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),sa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ua={},ca={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xe("ng-"+t);ua[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){a(e,{$event:n})};ca[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var la=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,c;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(c&&(c.remove(),c=null),u&&(u.$destroy(),u=null),s&&(c=ue(s.clone),t.leave(c).then(function(){c=null}),s=null))})}}}],fa=["$templateRequest","$anchorScroll","$animate",function(t,e,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:li.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,c,l){var f,h,$,p=0,d=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),$&&(n.leave($).then(function(){h=null}),h=$,$=null)};r.$watch(o,function(o){var u=function(){!g(s)||s&&!r.$eval(s)||e()},h=++p;o?(t(o,!0).then(function(t){if(h===p){var e=r.$new();c.template=t;var s=l(e,function(t){d(),n.enter(t,null,i).then(u)});f=e,$=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){h===p&&(d(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(d(),c.template=null)})}}}}],ha=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void t(ge(o.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],$a=Tr({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),pa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var a=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?pi(a):a,c=function(t){if(!m(t)){var e=[];return t&&o(t.split(u),function(t){t&&e.push(s?pi(t):t)}),e}};i.$parsers.push(c),i.$formatters.push(function(t){return $i(t)?t.join(a):n}),i.$isEmpty=function(t){return!t||!t.length}}}},da="ng-valid",va="ng-invalid",ma="ng-pristine",ga="ng-dirty",ya="ng-untouched",wa="ng-touched",ba="ng-pending",xa=r("ngModel"),Sa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,a,s,u,c,l,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(t);var h,$=a(r.ngModel),d=$.assign,v=$,y=d,w=null,x=this;this.$$setOptions=function(t){if(x.$options=t,t&&t.getterSetter){var e=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(t){var n=$(t);return S(n)&&(n=e(t)),n},y=function(t){S($(t))?n(t,{$$$p:x.$modelValue}):d(t,x.$modelValue)}}else if(!$.assign)throw xa("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return m(t)||""===t||null===t||t!==t};var C=i.inheritedData("$formController")||Ro,A=0;Gr({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:C,$animate:s}),this.$setPristine=function(){x.$dirty=!1,x.$pristine=!0,s.removeClass(i,ga),s.addClass(i,ma)},this.$setDirty=function(){x.$dirty=!0,x.$pristine=!1,s.removeClass(i,ma),s.addClass(i,ga),C.$setDirty()},this.$setUntouched=function(){x.$touched=!1,x.$untouched=!0,s.setClass(i,ya,wa)},this.$setTouched=function(){x.$touched=!0,x.$untouched=!1,s.setClass(i,wa,ya)},this.$rollbackViewValue=function(){u.cancel(w),x.$viewValue=x.$$lastCommittedViewValue,x.$render()},this.$validate=function(){if(!b(x.$modelValue)||!isNaN(x.$modelValue)){var t=x.$$lastCommittedViewValue,e=x.$$rawModelValue,r=x.$valid,i=x.$modelValue,o=x.$options&&x.$options.allowInvalid;x.$$runValidators(e,t,function(t){o||r===t||(x.$modelValue=t?e:n,x.$modelValue!==i&&x.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r){function i(){var t=x.$$parserName||"parse";return h!==n?(h||(o(x.$validators,function(t,e){u(e,null)}),o(x.$asyncValidators,function(t,e){u(e,null)})),u(t,h),h):(u(t,null),!0)}function a(){var n=!0;return o(x.$validators,function(r,i){var o=r(t,e);n=n&&o,u(i,o)}),n?!0:(o(x.$asyncValidators,function(t,e){u(e,null)}),!1)}function s(){var r=[],i=!0;o(x.$asyncValidators,function(o,a){var s=o(t,e);if(!V(s))throw xa("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);u(a,n),r.push(s.then(function(){u(a,!0)},function(){i=!1,u(a,!1)}))}),r.length?l.all(r).then(function(){c(i)},p):c(!0)}function u(t,e){f===A&&x.$setValidity(t,e)}function c(t){f===A&&r(t)}A++;var f=A;return i()&&a()?void s():void c(!1)},this.$commitViewValue=function(){var t=x.$viewValue;u.cancel(w),(x.$$lastCommittedViewValue!==t||""===t&&x.$$hasNativeValidators)&&(x.$$lastCommittedViewValue=t,x.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){x.$modelValue!==a&&x.$$writeModelToScope()}var r=x.$$lastCommittedViewValue,i=r;if(h=m(i)?n:!0)for(var o=0;o<x.$parsers.length;o++)if(i=x.$parsers[o](i),m(i)){h=!1;break}b(x.$modelValue)&&isNaN(x.$modelValue)&&(x.$modelValue=v(t));var a=x.$modelValue,s=x.$options&&x.$options.allowInvalid;x.$$rawModelValue=i,s&&(x.$modelValue=i,e()),x.$$runValidators(i,x.$$lastCommittedViewValue,function(t){s||(x.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){y(t,x.$modelValue),o(x.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){x.$viewValue=t,(!x.$options||x.$options.updateOnDefault)&&x.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=x.$options;i&&g(i.debounce)&&(n=i.debounce,b(n)?r=n:b(n[e])?r=n[e]:b(n["default"])&&(r=n["default"])),u.cancel(w),r?w=u(function(){x.$commitViewValue()},r):c.$$phase?x.$commitViewValue():t.$apply(function(){x.$commitViewValue()})},t.$watch(function(){var e=v(t);if(e!==x.$modelValue&&(x.$modelValue===x.$modelValue||e===e)){x.$modelValue=x.$$rawModelValue=e,h=n;for(var r=x.$formatters,i=r.length,o=e;i--;)o=r[i](o);x.$viewValue!==o&&(x.$viewValue=x.$$lastCommittedViewValue=o,x.$render(),x.$$runValidators(e,o,p))}return e})}],Ca=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sa,priority:1,compile:function(e){return e.addClass(ma).addClass(ya).addClass(da),{pre:function(t,e,n,r){var i=r[0],o=r[1]||Ro;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(t){i.$name!==t&&o.$$renameControl(i,t)}),t.$on("$destroy",function(){o.$removeControl(i)})},post:function(e,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){o.$touched||(t.$$phase?e.$evalAsync(o.$setTouched):e.$apply(o.$setTouched))})}}}}}],Aa=/(\s+|^)default(\s+|$)/,Ea=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=pi(this.$options.updateOn.replace(Aa,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ka=Tr({terminal:!0,priority:1e3}),Oa=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,a,s){function u(t){a.text(t||"")}var c,l=s.count,f=s.$attr.when&&a.attr(s.$attr.when),h=s.offset||0,$=i.$eval(f)||{},p={},d=e.startSymbol(),v=e.endSymbol(),m=d+l+"-"+h+v,g=li.noop;o(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Zr(n[2]);$[i]=a.attr(s.$attr[e])}}),o($,function(t,r){p[r]=e(t.replace(n,m))}),i.$watch(l,function(e){var n=parseFloat(e),r=isNaN(n);r||n in $||(n=t.pluralCat(n-h)),n===c||r&&isNaN(c)||(g(),g=i.$watch(p[n],u),c=n)})}}}],Ta=["$parse","$animate",function(t,a){var s="$$NG_REMOVED",u=r("ngRepeat"),c=function(t,e,n,r,i,o,a){t[n]=r,i&&(t[i]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},l=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,h){var $=h.ngRepeat,p=e.createComment(" end ngRepeat: "+$+" "),d=$.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!d)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",$);var v=d[1],m=d[2],g=d[3],y=d[4];if(d=v.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!d)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var w=d[3]||d[1],b=d[2];if(g&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(g)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",g);var x,S,C,A,E={$id:Ue};return y?x=t(y):(C=function(t,e){return Ue(e)},A=function(t){return t}),function(t,e,r,h,d){x&&(S=function(e,n,r){return b&&(E[b]=e),E[w]=n,E.$index=r,x(t,E)});var v=ce();t.$watchCollection(m,function(r){var h,m,y,x,E,k,O,T,M,V,N,D,j=e[0],R=ce();if(g&&(t[g]=r),i(r))M=r,T=S||C;else{T=S||A,M=[];for(var P in r)r.hasOwnProperty(P)&&"$"!=P.charAt(0)&&M.push(P);M.sort()}for(x=M.length,N=new Array(x),h=0;x>h;h++)if(E=r===M?h:M[h],k=r[E],O=T(E,k,h),v[O])V=v[O],delete v[O],R[O]=V,N[h]=V;else{if(R[O])throw o(N,function(t){t&&t.scope&&(v[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",$,O,k);N[h]={id:O,scope:n,clone:n},R[O]=!0}for(var _ in v){if(V=v[_],D=ue(V.clone),a.leave(D),D[0].parentNode)for(h=0,m=D.length;m>h;h++)D[h][s]=!0;V.scope.$destroy()}for(h=0;x>h;h++)if(E=r===M?h:M[h],k=r[E],V=N[h],V.scope){y=j;do y=y.nextSibling;while(y&&y[s]);l(V)!=y&&a.move(ue(V.clone),null,ni(j)),j=f(V),c(V.scope,h,w,k,b,E,x)}else d(function(t,e){V.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,a.enter(t,null,ni(j)),j=n,V.clone=t,R[V.id]=V,c(V.scope,h,w,k,b,E,x)});v=R})}}}}],Ma="ng-hide",Va="ng-hide-animate",Na=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ma,{tempClasses:Va})})}}}],Da=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ma,{tempClasses:Va})})}}}],ja=Tr(function(t,e,n){t.$watch(n.ngStyle,function(t,n){n&&t!==n&&o(n,function(t,n){e.css(n,"")}),t&&e.css(t)},!0)}),Ra=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,u=[],c=[],l=[],f=[],h=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=l.length;i>r;++r)t.cancel(l[r]);for(l.length=0,r=0,i=f.length;i>r;++r){var s=ue(c[r].clone);f[r].$destroy();var $=l[r]=t.leave(s);$.then(h(l,r))}c.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&o(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var a={clone:r};c.push(a),t.enter(r,o.parent(),o)})})})}}}],Pa=Tr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),_a=Tr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Ia=Tr({restrict:"EAC",link:function(t,e,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));o(function(t){e.empty(),e.append(t)})}}),qa=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Ua=r("ngOptions"),Fa=v({restrict:"A",terminal:!0}),Ha=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,o=this,a={},u=s;o.databound=n.ngModel,o.init=function(t,e,n){u=t,r=e,i=n},o.addOption=function(e,n){ae(e,'"option value"'),a[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(t){this.hasOption(t)&&(delete a[t],u.$viewValue===t&&this.renderUnknownOption(t))},o.renderUnknownOption=function(e){var n="? "+Ue(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},o.hasOption=function(t){return a.hasOwnProperty(t)},e.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,u,c,l){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):null==t&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function h(t,e,n){var r;n.$render=function(){var t=new Fe(n.$viewValue);o(e.find("option"),function(e){e.selected=g(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=_(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];o(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function $(e,s,u){function c(t,n,r){return I[k]=r,M&&(I[M]=n),t(e,I)
  5. }function l(){e.$apply(function(){var t,n=D(e)||[];if(m)t=[],o(s.val(),function(e){e=R?P[e]:e,t.push(f(e,n[e]))});else{var r=R?P[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),C()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=T?T:N;return c(r,t,e)}function h(){var t,n=D(e);if(n&&$i(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=c(E,r,n[r]);return t}if(n){t={};for(var o in n)n.hasOwnProperty(o)&&(t[o]=c(E,o,n[o]))}return t}function $(t){var e;if(m)if(R&&$i(t)){e=new Fe([]);for(var n=0;n<t.length;n++)e.put(c(R,null,t[n]),!0)}else e=new Fe(t);else R&&(t=c(R,null,t));return function(n,r){var i;return i=R?R:T?T:N,m?g(e.remove(c(i,n,r))):t===c(i,n,r)}}function p(){b||(e.$$postDigest(C),b=!0)}function v(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function C(){b=!1;var t,n,r,i,l,f,h,p,y,C,A,k,O,T,N,j,q,U={"":[]},F=[""],H=u.$viewValue,L=D(e)||[],B=M?a(L):L,z={},G=$(H),W=!1;for(P={},k=0;C=B.length,C>k;k++)h=k,M&&(h=B[k],"$"===h.charAt(0))||(p=L[h],t=c(V,h,p)||"",(n=U[t])||(n=U[t]=[],F.push(t)),O=G(h,p),W=W||O,j=c(E,h,p),j=g(j)?j:"",q=R?R(e,I):M?B[k]:k,R&&(P[q]=h),n.push({id:q,label:j,selected:O}));for(m||(w||null===H?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),A=0,y=F.length;y>A;A++){for(t=F[A],n=U[t],_.length<=A?(i={element:S.clone().attr("label",t),label:n.label},l=[i],_.push(l),s.append(i.element)):(l=_[A],i=l[0],i.label!=t&&i.element.attr("label",i.label=t)),T=null,k=0,C=n.length;C>k;k++)r=n[k],(f=l[k+1])?(T=f.element,f.label!==r.label&&(v(z,f.label,!1),v(z,r.label,!0),T.text(f.label=r.label),T.prop("label",f.label)),f.id!==r.id&&T.val(f.id=r.id),T[0].selected!==r.selected&&(T.prop("selected",f.selected=r.selected),ei&&T.prop("selected",f.selected))):(""===r.id&&w?N=w:(N=x.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),l.push(f={element:N,label:r.label,id:r.id,selected:r.selected}),v(z,r.label,!0),T?T.after(N):i.element.append(N),T=N);for(k++;l.length>k;)r=l.pop(),v(z,r.label,!1),r.element.remove()}for(;_.length>A;){for(n=_.pop(),k=1;k<n.length;++k)v(z,n[k].label,!1);n[0].element.remove()}o(z,function(t,e){t>0?d.addOption(e):0>t&&d.removeOption(e)})}var A;if(!(A=y.match(i)))throw Ua("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",y,z(s));var E=r(A[2]||A[1]),k=A[4]||A[6],O=/ as /.test(A[0])&&A[1],T=O?r(O):null,M=A[5],V=r(A[3]||""),N=r(A[2]?A[1]:k),D=r(A[7]),j=A[8],R=j?r(A[8]):null,P={},_=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",l),u.$render=C,e.$watchCollection(D,p),e.$watchCollection(h,p),m&&e.$watchCollection(function(){return u.$modelValue},p)}if(l[1]){for(var p,d=l[0],v=l[1],m=c.multiple,y=c.ngOptions,w=!1,b=!1,x=ni(e.createElement("option")),S=ni(e.createElement("optgroup")),C=x.clone(),A=0,E=u.children(),k=E.length;k>A;A++)if(""===E[A].value){p=w=E.eq(A);break}d.init(v,w,C),m&&(v.$isEmpty=function(t){return!t||0===t.length}),y?$(s,u,v):m?h(s,u,v):f(s,u,v,d)}}}}],La=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(m(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Ba=v({restrict:"E",terminal:!1}),za=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Ga=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(w(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));a=t||n,o.$validate()}),o.$validators.pattern=function(t,e){return o.$isEmpty(e)||m(a)||a.test(e)}}}}},Wa=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=h(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Ya=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=h(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(re(),$e(li),void ni(e).ready(function(){X(e,Q)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>');
  6. !function(e,r){"use strict";function t(e){return null!=e&&""!==e&&"hasOwnProperty"!==e&&s.test("."+e)}function a(e,a){if(!t(a))throw o("badmember",'Dotted member path "@{0}" is invalid.',a);for(var n=a.split("."),s=0,i=n.length;i>s&&r.isDefined(e);s++){var c=n[s];e=null!==e?e[c]:void 0}return e}function n(e,t){t=t||{},r.forEach(t,function(e,r){delete t[r]});for(var a in e)!e.hasOwnProperty(a)||"$"===a.charAt(0)&&"$"===a.charAt(1)||(t[a]=e[a]);return t}var o=r.$$minErr("$resource"),s=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;r.module("ngResource",["ng"]).provider("$resource",function(){var e=/^https?:\/\/[^\/]*/,t=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$log","$q","$timeout",function(s,i,c,u){function l(e){return p(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function p(e,r){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,r?"%20":"+")}function f(e,r){this.template=e,this.defaults=g({},t.defaults,r),this.urlParams={}}function d(e,l,p,b){function y(e,r){var t={};return r=g({},l,r),h(r,function(r,n){v(r)&&(r=r(e)),t[n]=r&&r.charAt&&"@"==r.charAt(0)?a(e,r.substr(1)):r}),t}function w(e){return e.resource}function E(e){n(e||{},this)}var P=new f(e,b);return p=g({},t.defaults.actions,p),E.prototype.toJSON=function(){var e=g({},this);return delete e.$promise,delete e.$resolved,e},h(p,function(e,a){var l=/^(POST|PUT|PATCH)$/i.test(e.method),p=e.timeout,f=r.isDefined(e.cancellable)?e.cancellable:b&&r.isDefined(b.cancellable)?b.cancellable:t.defaults.cancellable;p&&!r.isNumber(p)&&(i.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete e.timeout,p=null),E[a]=function(t,i,d,b){var A,R,T,O={};switch(arguments.length){case 4:T=b,R=d;case 3:case 2:if(!v(i)){O=t,A=i,R=d;break}if(v(t)){R=t,T=i;break}R=i,T=d;case 1:v(t)?R=t:l?A=t:O=t;break;case 0:break;default:throw o("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var x,D,q=this instanceof E,k=q?A:e.isArray?[]:new E(A),S={},W=e.interceptor&&e.interceptor.response||w,j=e.interceptor&&e.interceptor.responseError||void 0;h(e,function(e,r){switch(r){default:S[r]=$(e);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!q&&f&&(x=c.defer(),S.timeout=x.promise,p&&(D=u(x.resolve,p))),l&&(S.data=A),P.setUrlParams(S,g({},y(A,e.params||{}),O),e.url);var U=s(S).then(function(t){var s=t.data;if(s){if(r.isArray(s)!==!!e.isArray)throw o("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",a,e.isArray?"array":"object",r.isArray(s)?"array":"object",S.method,S.url);if(e.isArray)k.length=0,h(s,function(e){k.push("object"==typeof e?new E(e):e)});else{var i=k.$promise;n(s,k),k.$promise=i}}return t.resource=k,t},function(e){return(T||m)(e),c.reject(e)});return U["finally"](function(){k.$resolved=!0,!q&&f&&(k.$cancelRequest=r.noop,u.cancel(D),x=D=S.timeout=null)}),U=U.then(function(e){var r=W(e);return(R||m)(r,e.headers),r},j),q?U:(k.$promise=U,k.$resolved=!1,f&&(k.$cancelRequest=x.resolve),k)},E.prototype["$"+a]=function(e,r,t){v(e)&&(t=r,r=e,e={});var n=E[a].call(this,e,this,r,t);return n.$promise||n}}),E.bind=function(r){return d(e,g({},l,r),p)},E}var m=r.noop,h=r.forEach,g=r.extend,$=r.copy,v=r.isFunction;return f.prototype={setUrlParams:function(t,a,n){var s,i,c=this,u=n||c.template,f="",d=c.urlParams={};h(u.split(/\W/),function(e){if("hasOwnProperty"===e)throw o("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(u)&&(d[e]={isQueryParamValue:new RegExp("\\?.*=:"+e+"(?:\\W|$)").test(u)})}),u=u.replace(/\\:/g,":"),u=u.replace(e,function(e){return f=e,""}),a=a||{},h(c.urlParams,function(e,t){s=a.hasOwnProperty(t)?a[t]:c.defaults[t],r.isDefined(s)&&null!==s?(i=e.isQueryParamValue?p(s,!0):l(s),u=u.replace(new RegExp(":"+t+"(\\W|$)","g"),function(e,r){return i+r})):u=u.replace(new RegExp("(/?):"+t+"(\\W|$)","g"),function(e,r,t){return"/"==t.charAt(0)?t:r+t})}),c.defaults.stripTrailingSlashes&&(u=u.replace(/\/+$/,"")||"/"),u=u.replace(/\/\.(?=\w+($|\?))/,"."),t.url=f+u.replace(/\/\\\./,"/."),h(a,function(e,r){c.urlParams[r]||(t.params=t.params||{},t.params[r]=e)})}},d}]})}(window,window.angular);
  7. !function(n,t,e){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var n="$$ngAnimateChildren";return function(e,a,i){var r=i.ngAnimateChildren;t.isString(r)&&0===r.length?a.data(n,!0):e.$watch(r,function(t){a.data(n,!!t)})}}).factory("$$animateReflow",["$$rAF","$document",function(n,t){var e=t[0].body;return function(t){return n(function(){t(e.offsetWidth)})}}]).config(["$provide","$animateProvider",function(a,i){function r(n){for(var t=0;t<n.length;t++){var e=n[t];if(e.nodeType==p)return e}}function s(n){return n&&t.element(n)}function o(n){return t.element(r(n))}function u(n,t){return r(n)==r(t)}var l,c=t.noop,f=t.forEach,v=i.$$selectors,d=t.isArray,m=t.isString,g=t.isObject,p=1,C="$$ngAnimateState",h="$$ngAnimateChildren",$="ng-animate",b={running:!0};a.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function(n,e,a,p,y,D,A,w,k,x){function S(n,t){var e=n.data(C)||{};return t&&(e.running=!0,e.structural=!0,n.data(C,e)),e.disabled||e.running&&e.structural}function B(n){var t,a=e.defer();return a.promise.$$cancelFn=function(){t&&t()},A.$$postDigest(function(){t=n(function(){a.resolve()})}),a.promise}function F(n){return g(n)?(n.tempClasses&&m(n.tempClasses)&&(n.tempClasses=n.tempClasses.split(/\s+/)),n):void 0}function M(n,t,e){e=e||{};var a={};f(e,function(n,t){f(t.split(" "),function(t){a[t]=n})});var i=Object.create(null);f((n.attr("class")||"").split(/\s+/),function(n){i[n]=!0});var r=[],s=[];return f(t&&t.classes||[],function(n,t){var e=i[t],o=a[t]||{};n===!1?(e||"addClass"==o.event)&&s.push(t):n===!0&&(e&&"removeClass"!=o.event||r.push(t))}),r.length+s.length>0&&[r.join(" "),s.join(" ")]}function E(n){if(n){var t=[],e={},i=n.substr(1).split(".");(p.transitions||p.animations)&&t.push(a.get(v[""]));for(var r=0;r<i.length;r++){var s=i[r],o=v[s];o&&!e[s]&&(t.push(a.get(o)),e[s]=!0)}return t}}function R(n,e,a,i){function r(n,t){var e=n[t],a=n["before"+t.charAt(0).toUpperCase()+t.substr(1)];return e||a?("leave"==t&&(a=e,e=null),D.push({event:t,fn:e}),$.push({event:t,fn:a}),!0):void 0}function s(t,e,r){function s(n){if(e){if((e[n]||c)(),++v<o.length)return;e=null}r()}var o=[];f(t,function(n){n.fn&&o.push(n)});var v=0;f(o,function(t,r){var o=function(){s(r)};switch(t.event){case"setClass":e.push(t.fn(n,u,l,o,i));break;case"animate":e.push(t.fn(n,a,i.from,i.to,o));break;case"addClass":e.push(t.fn(n,u||a,o,i));break;case"removeClass":e.push(t.fn(n,l||a,o,i));break;default:e.push(t.fn(n,o,i))}}),e&&0===e.length&&r()}var o=n[0];if(o){i&&(i.to=i.to||{},i.from=i.from||{});var u,l;d(a)&&(u=a[0],l=a[1],u?l?a=u+" "+l:(a=u,e="addClass"):(a=l,e="removeClass"));var v="setClass"==e,m=v||"addClass"==e||"removeClass"==e||"animate"==e,g=n.attr("class"),p=g+" "+a;if(K(p)){var C=c,h=[],$=[],b=c,y=[],D=[],A=(" "+p).replace(/\s+/g,".");return f(E(A),function(n){var t=r(n,e);!t&&v&&(r(n,"addClass"),r(n,"removeClass"))}),{node:o,event:e,className:a,isClassBased:m,isSetClassOperation:v,applyStyles:function(){i&&n.css(t.extend(i.from||{},i.to||{}))},before:function(n){C=n,s($,h,function(){C=c,n()})},after:function(n){b=n,s(D,y,function(){b=c,n()})},cancel:function(){h&&(f(h,function(n){(n||c)(!0)}),C(!0)),y&&(f(y,function(n){(n||c)(!0)}),b(!0))}}}}}function N(n,e,a,i,r,s,o,u){function v(t){var i="$animate:"+t;A&&A[i]&&A[i].length>0&&D(function(){a.triggerHandler(i,{event:n,className:e})})}function d(){v("before")}function m(){v("after")}function g(){v("close"),u()}function p(){p.hasBeenRun||(p.hasBeenRun=!0,s())}function h(){if(!h.hasBeenRun){y&&y.applyStyles(),h.hasBeenRun=!0,o&&o.tempClasses&&f(o.tempClasses,function(n){l.removeClass(a,n)});var t=a.data(C);t&&(y&&y.isClassBased?T(a,e):(D(function(){var t=a.data(C)||{};N==t.index&&T(a,e,n)}),a.data(C,t))),g()}}var b=c,y=R(a,n,e,o);if(!y)return p(),d(),m(),h(),b;n=y.event,e=y.className;var A=t.element._data(y.node);if(A=A&&A.events,i||(i=r?r.parent():a.parent()),j(a,i))return p(),d(),m(),h(),b;var w=a.data(C)||{},k=w.active||{},x=w.totalActive||0,S=w.last,B=!1;if(x>0){var F=[];if(y.isClassBased){if("setClass"==S.event)F.push(S),T(a,e);else if(k[e]){var M=k[e];M.event==n?B=!0:(F.push(M),T(a,e))}}else if("leave"==n&&k["ng-leave"])B=!0;else{for(var E in k)F.push(k[E]);w={},T(a,!0)}F.length>0&&f(F,function(n){n.cancel()})}if(!y.isClassBased||y.isSetClassOperation||"animate"==n||B||(B="addClass"==n==a.hasClass(e)),B)return p(),d(),m(),g(),b;k=w.active||{},x=w.totalActive||0,"leave"==n&&a.one("$destroy",function(){var n=t.element(this),e=n.data(C);if(e){var a=e.active["ng-leave"];a&&(a.cancel(),T(n,"ng-leave"))}}),l.addClass(a,$),o&&o.tempClasses&&f(o.tempClasses,function(n){l.addClass(a,n)});var N=P++;return x++,k[e]=y,a.data(C,{last:y,active:k,index:N,totalActive:x}),d(),y.before(function(t){var i=a.data(C);t=t||!i||!i.active[e]||y.isClassBased&&i.active[e].event!=n,p(),t===!0?h():(m(),y.after(h))}),y.cancel}function O(n){var e=r(n);if(e){var a=t.isFunction(e.getElementsByClassName)?e.getElementsByClassName($):e.querySelectorAll("."+$);f(a,function(n){n=t.element(n);var e=n.data(C);e&&e.active&&f(e.active,function(n){n.cancel()})})}}function T(n,t){if(u(n,y))b.disabled||(b.running=!1,b.structural=!1);else if(t){var e=n.data(C)||{},a=t===!0;!a&&e.active&&e.active[t]&&(e.totalActive--,delete e.active[t]),(a||!e.totalActive)&&(l.removeClass(n,$),n.removeData(C))}}function j(n,e){if(b.disabled)return!0;if(u(n,y))return b.running;var a,i,r;do{if(0===e.length)break;var s=u(e,y),o=s?b:e.data(C)||{};if(o.disabled)return!0;if(s&&(r=!0),a!==!1){var l=e.data(h);t.isDefined(l)&&(a=l)}i=i||o.running||o.last&&!o.last.isClassBased}while(e=e.parent());return!r||!a&&i}l=x,y.data(C,b);var I=A.$watch(function(){return k.totalPendingRequests},function(n){0===n&&(I(),A.$$postDigest(function(){A.$$postDigest(function(){b.running=!1})}))}),P=0,q=i.classNameFilter(),K=q?function(n){return q.test(n)}:function(){return!0};return{animate:function(n,t,e,a,i){return a=a||"ng-inline-animate",i=F(i)||{},i.from=e?t:null,i.to=e?e:t,B(function(t){return N("animate",a,o(n),null,null,c,i,t)})},enter:function(e,a,i,r){return r=F(r),e=t.element(e),a=s(a),i=s(i),S(e,!0),n.enter(e,a,i),B(function(n){return N("enter","ng-enter",o(e),a,i,c,r,n)})},leave:function(e,a){return a=F(a),e=t.element(e),O(e),S(e,!0),B(function(t){return N("leave","ng-leave",o(e),null,null,function(){n.leave(e)},a,t)})},move:function(e,a,i,r){return r=F(r),e=t.element(e),a=s(a),i=s(i),O(e),S(e,!0),n.move(e,a,i),B(function(n){return N("move","ng-move",o(e),a,i,c,r,n)})},addClass:function(n,t,e){return this.setClass(n,t,[],e)},removeClass:function(n,t,e){return this.setClass(n,[],t,e)},setClass:function(e,a,i,s){s=F(s);var u="$$animateClasses";if(e=t.element(e),e=o(e),S(e))return n.$$setClassImmediately(e,a,i,s);var l,c=e.data(u),v=!!c;return c||(c={},c.classes={}),l=c.classes,a=d(a)?a:a.split(" "),f(a,function(n){n&&n.length&&(l[n]=!0)}),i=d(i)?i:i.split(" "),f(i,function(n){n&&n.length&&(l[n]=!1)}),v?(s&&c.options&&(c.options=t.extend(c.options||{},s)),c.promise):(e.data(u,c={classes:l,options:s}),c.promise=B(function(t){var a,i,s,o=r(e);if(o&&(a=e.data(u),e.removeData(u),s=e.parent(),i=o.parentNode),!i||i.$$NG_REMOVED||o.$$NG_REMOVED)return void t();var l=e.data(C)||{},c=M(e,a,l.active);return c?N("setClass",c,e,s,null,function(){c[0]&&n.$$addClassImmediately(e,c[0]),c[1]&&n.$$removeClassImmediately(e,c[1])},a.options,t):t()}))},cancel:function(n){n.$$cancelFn()},enabled:function(n,t){switch(arguments.length){case 2:if(n)T(t);else{var e=t.data(C)||{};e.disabled=!0,t.data(C,e)}break;case 1:b.disabled=!n;break;default:n=!b.disabled}return!!n}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(a,i,s,o){function u(){T||(T=o(function(){z=[],T=null,L={}}))}function v(n,t){T&&T(),z.push(t),T=o(function(){f(z,function(n){n()}),z=[],T=null,L={}})}function g(n,e){var a=r(n);n=t.element(a),X.push(n);var i=Date.now()+e;Q>=i||(s.cancel(J),Q=i,J=s(function(){C(X),X=[]},e,!1))}function C(n){f(n,function(n){var t=n.data(_);t&&f(t.closeAnimationFns,function(n){n()})})}function h(n,t){var e=t?L[t]:null;if(!e){var i=0,r=0,s=0,o=0;f(n,function(n){if(n.nodeType==p){var t=a.getComputedStyle(n)||{},e=t[M+j];i=Math.max($(e),i);var u=t[M+P];r=Math.max($(u),r);{t[R+P]}o=Math.max($(t[R+P]),o);var l=$(t[R+j]);l>0&&(l*=parseInt(t[R+q],10)||1),s=Math.max(l,s)}}),e={total:0,transitionDelay:r,transitionDuration:i,animationDelay:o,animationDuration:s},t&&(L[t]=e)}return e}function $(n){var t=0,e=m(n)?n.split(/\s*,\s*/):[];return f(e,function(n){t=Math.max(parseFloat(n)||0,t)}),t}function b(n){var t=n.parent(),e=t.data(W);return e||(t.data(W,++U),e=U),e+"-"+r(n).getAttribute("class")}function y(n,t,e,a){var i=["ng-enter","ng-leave","ng-move"].indexOf(e)>=0,s=b(t),o=s+" "+e,u=L[o]?++L[o].total:0,c={};if(u>0){var f=e+"-stagger",v=s+" "+f,d=!L[v];d&&l.addClass(t,f),c=h(t,v),d&&l.removeClass(t,f)}l.addClass(t,e);var m=t.data(_)||{},g=h(t,o),p=g.transitionDuration,C=g.animationDuration;if(i&&0===p&&0===C)return l.removeClass(t,e),!1;var $=a||i&&p>0,y=C>0&&c.animationDelay>0&&0===c.animationDuration,D=m.closeAnimationFns||[];t.data(_,{stagger:c,cacheKey:o,running:m.running||0,itemIndex:u,blockTransition:$,closeAnimationFns:D});var k=r(t);return $&&(A(k,!0),a&&t.css(a)),y&&w(k,!0),!0}function D(n,t,e,a,i){function o(){t.off(P,u),l.removeClass(t,d),l.removeClass(t,m),j&&s.cancel(j),B(t,e);var n=r(t);for(var a in C)n.style.removeProperty(C[a])}function u(n){n.stopPropagation();var t=n.originalEvent||n,e=t.$manualTimeStamp||t.timeStamp||Date.now(),i=parseFloat(t.elapsedTime.toFixed(G));Math.max(e-I,0)>=R&&i>=F&&a()}var c=r(t),v=t.data(_);if(-1==c.getAttribute("class").indexOf(e)||!v)return void a();var d="",m="";f(e.split(" "),function(n,t){var e=(t>0?" ":"")+n;d+=e+"-active",m+=e+"-pending"});var p="",C=[],$=v.itemIndex,b=v.stagger,y=0;if($>0){var D=0;b.transitionDelay>0&&0===b.transitionDuration&&(D=b.transitionDelay*$);var k=0;b.animationDelay>0&&0===b.animationDuration&&(k=b.animationDelay*$,C.push(O+"animation-play-state")),y=Math.round(100*Math.max(D,k))/100}y||(l.addClass(t,d),v.blockTransition&&A(c,!1));var x=v.cacheKey+" "+d,S=h(t,x),F=Math.max(S.transitionDuration,S.animationDuration);if(0===F)return l.removeClass(t,d),B(t,e),void a();!y&&i&&Object.keys(i).length>0&&(S.transitionDuration||(t.css("transition",S.animationDuration+"s linear all"),C.push("transition")),t.css(i));var M=Math.max(S.transitionDelay,S.animationDelay),R=M*H;if(C.length>0){var T=c.getAttribute("style")||"";";"!==T.charAt(T.length-1)&&(T+=";"),c.setAttribute("style",T+" "+p)}var j,I=Date.now(),P=N+" "+E,q=(M+F)*V,K=(y+q)*H;return y>0&&(l.addClass(t,m),j=s(function(){j=null,S.transitionDuration>0&&A(c,!1),S.animationDuration>0&&w(c,!1),l.addClass(t,d),l.removeClass(t,m),i&&(0===S.transitionDuration&&t.css("transition",S.animationDuration+"s linear all"),t.css(i),C.push("transition"))},y*H,!1)),t.on(P,u),v.closeAnimationFns.push(function(){o(),a()}),v.running++,g(t,K),o}function A(n,t){n.style[M+I]=t?"none":""}function w(n,t){n.style[R+K]=t?"paused":""}function k(n,t,e,a){return y(n,t,e,a)?function(n){n&&B(t,e)}:void 0}function x(n,t,e,a,i){return t.data(_)?D(n,t,e,a,i):(B(t,e),void a())}function S(n,t,e,a,i){var r=k(n,t,e,i.from);if(!r)return u(),void a();var s=r;return v(t,function(){s=x(n,t,e,a,i.to)}),function(n){(s||c)(n)}}function B(n,t){l.removeClass(n,t);var e=n.data(_);e&&(e.running&&e.running--,e.running&&0!==e.running||n.removeData(_))}function F(n,t){var e="";return n=d(n)?n:n.split(/\s+/),f(n,function(n,a){n&&n.length>0&&(e+=(a>0?" ":"")+n+t)}),e}var M,E,R,N,O="";n.ontransitionend===e&&n.onwebkittransitionend!==e?(O="-webkit-",M="WebkitTransition",E="webkitTransitionEnd transitionend"):(M="transition",E="transitionend"),n.onanimationend===e&&n.onwebkitanimationend!==e?(O="-webkit-",R="WebkitAnimation",N="webkitAnimationEnd animationend"):(R="animation",N="animationend");var T,j="Duration",I="Property",P="Delay",q="IterationCount",K="PlayState",W="$$ngAnimateKey",_="$$ngAnimateCSS3Data",G=3,V=1.5,H=1e3,L={},U=0,z=[],J=null,Q=0,X=[];return{animate:function(n,t,e,a,i,r){return r=r||{},r.from=e,r.to=a,S("animate",n,t,i,r)},enter:function(n,t,e){return e=e||{},S("enter",n,"ng-enter",t,e)},leave:function(n,t,e){return e=e||{},S("leave",n,"ng-leave",t,e)},move:function(n,t,e){return e=e||{},S("move",n,"ng-move",t,e)},beforeSetClass:function(n,t,e,a,i){i=i||{};var r=F(e,"-remove")+" "+F(t,"-add"),s=k("setClass",n,r,i.from);return s?(v(n,a),s):(u(),void a())},beforeAddClass:function(n,t,e,a){a=a||{};var i=k("addClass",n,F(t,"-add"),a.from);return i?(v(n,e),i):(u(),void e())},beforeRemoveClass:function(n,t,e,a){a=a||{};var i=k("removeClass",n,F(t,"-remove"),a.from);return i?(v(n,e),i):(u(),void e())},setClass:function(n,t,e,a,i){i=i||{},e=F(e,"-remove"),t=F(t,"-add");var r=e+" "+t;return x("setClass",n,r,a,i.to)},addClass:function(n,t,e,a){return a=a||{},x("addClass",n,F(t,"-add"),e,a.to)},removeClass:function(n,t,e,a){return a=a||{},x("removeClass",n,F(t,"-remove"),e,a.to)}}}])}])}(window,window.angular);
  8. !function(e,r){"use strict";function t(){function e(e,t){return r.extend(Object.create(e),t)}function t(e,r){var t=r.caseInsensitiveMatch,n={originalPath:e,regexp:e},a=n.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,r,t,n){var o="?"===n?n:null,i="*"===n?n:null;return a.push({name:t,optional:!!o}),r=r||"",""+(o?"":r)+"(?:"+(o?r:"")+(i&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),n.regexp=new RegExp("^"+e+"$",t?"i":""),n}var n={};this.when=function(e,a){var o=r.copy(a);if(r.isUndefined(o.reloadOnSearch)&&(o.reloadOnSearch=!0),r.isUndefined(o.caseInsensitiveMatch)&&(o.caseInsensitiveMatch=this.caseInsensitiveMatch),n[e]=r.extend(o,e&&t(e,o)),e){var i="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";n[i]=r.extend({redirectTo:e},t(i,o))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(t,a,o,i,u,l,s){function h(e,r){var t=r.keys,n={};if(!r.regexp)return null;var a=r.regexp.exec(e);if(!a)return null;for(var o=1,i=a.length;i>o;++o){var c=t[o-1],u=a[o];c&&u&&(n[c.name]=u)}return n}function $(e){var n=w.current;v=f(),m=v&&n&&v.$$route===n.$$route&&r.equals(v.pathParams,n.pathParams)&&!v.reloadOnSearch&&!g,m||!n&&!v||t.$broadcast("$routeChangeStart",v,n).defaultPrevented&&e&&e.preventDefault()}function p(){var e=w.current,n=v;m?(e.params=n.params,r.copy(e.params,o),t.$broadcast("$routeUpdate",e)):(n||e)&&(g=!1,w.current=n,n&&n.redirectTo&&(r.isString(n.redirectTo)?a.path(d(n.redirectTo,n.params)).search(n.params).replace():a.url(n.redirectTo(n.pathParams,a.path(),a.search())).replace()),i.when(n).then(function(){if(n){var e,t,a=r.extend({},n.resolve);return r.forEach(a,function(e,t){a[t]=r.isString(e)?u.get(e):u.invoke(e,null,null,t)}),r.isDefined(e=n.template)?r.isFunction(e)&&(e=e(n.params)):r.isDefined(t=n.templateUrl)&&(r.isFunction(t)&&(t=t(n.params)),r.isDefined(t)&&(n.loadedTemplateUrl=s.valueOf(t),e=l(t))),r.isDefined(e)&&(a.$template=e),i.all(a)}}).then(function(a){n==w.current&&(n&&(n.locals=a,r.copy(n.params,o)),t.$broadcast("$routeChangeSuccess",n,e))},function(r){n==w.current&&t.$broadcast("$routeChangeError",n,e,r)}))}function f(){var t,o;return r.forEach(n,function(n){!o&&(t=h(a.path(),n))&&(o=e(n,{params:r.extend({},a.search(),t),pathParams:t}),o.$$route=n)}),o||n[null]&&e(n[null],{params:{},pathParams:{}})}function d(e,t){var n=[];return r.forEach((e||"").split(":"),function(e,r){if(0===r)n.push(e);else{var a=e.match(/(\w+)(?:[?*])?(.*)/),o=a[1];n.push(t[o]),n.push(a[2]||""),delete t[o]}}),n.join("")}var v,m,g=!1,w={routes:n,reload:function(){g=!0,t.$evalAsync(function(){$(),p()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw c("norout","Tried updating route when with no current route");e=r.extend({},this.current.params,e),a.path(d(this.current.$$route.originalPath,e)),a.search(e)}};return t.$on("$locationChangeStart",$),t.$on("$locationChangeSuccess",p),w}]}function n(){this.$get=function(){return{}}}function a(e,t,n){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,o,i,c,u){function l(){p&&(n.cancel(p),p=null),h&&(h.$destroy(),h=null),$&&(p=n.leave($),p.then(function(){p=null}),$=null)}function s(){var i=e.current&&e.current.locals,c=i&&i.$template;if(r.isDefined(c)){var s=a.$new(),p=e.current,v=u(s,function(e){n.enter(e,null,$||o).then(function(){!r.isDefined(f)||f&&!a.$eval(f)||t()}),l()});$=v,h=p.scope=s,h.$emit("$viewContentLoaded"),h.$eval(d)}else l()}var h,$,p,f=i.autoscroll,d=i.onload||"";a.$on("$routeChangeSuccess",s),s()}}}function o(e,r,t){return{restrict:"ECA",priority:-400,link:function(n,a){var o=t.current,i=o.locals;a.html(i.$template);var c=e(a.contents());if(o.controller){i.$scope=n;var u=r(o.controller,i);o.controllerAs&&(n[o.controllerAs]=u),a.data("$ngControllerController",u),a.children().data("$ngControllerController",u)}c(n)}}}var i=r.module("ngRoute",["ng"]).provider("$route",t),c=r.$$minErr("ngRoute");i.provider("$routeParams",n),i.directive("ngView",a),i.directive("ngView",o),a.$inject=["$route","$anchorScroll","$animate"],o.$inject=["$compile","$controller","$route"]}(window,window.angular);
  9. !function(e,n){"use strict";n.module("ngMessages",[]).directive("ngMessages",["$compile","$animate","$templateRequest",function(e,t,s){var r="ng-active",i="ng-inactive";return{restrict:"AE",controller:function(){this.$renderNgMessageClasses=n.noop;var e=[];this.registerMessage=function(n,t){for(var s=0;s<e.length;s++)if(e[s].type==t.type){if(n!=s){var r=e[n];e[n]=e[s],n<e.length?e[s]=r:e.splice(0,s)}return}e.splice(n,0,t)},this.renderMessages=function(t,s){function r(e){return null!==e&&e!==!1&&e}t=t||{};var i;n.forEach(e,function(e){i&&!s||!r(t[e.type])?e.detach():(e.attach(),i=!0)}),this.renderElementClasses(i)}},require:"ngMessages",link:function(a,l,c,g){g.renderElementClasses=function(e){e?t.setClass(l,r,i):t.setClass(l,i,r)};var o,u=n.isString(c.ngMessagesMultiple)||n.isString(c.multiple),f=c.ngMessages||c["for"];a.$watchCollection(f,function(e){o=e,g.renderMessages(e,u)});var d=c.ngMessagesInclude||c.include;d&&s(d).then(function(t){var s,r=n.element("<div/>").html(t);n.forEach(r.children(),function(t){t=n.element(t),s?s.after(t):l.prepend(t),s=t,e(t)(a)}),g.renderMessages(o,u)})}}}]).directive("ngMessage",["$animate",function(e){var n=8;return{require:"^ngMessages",transclude:"element",terminal:!0,restrict:"AE",link:function(t,s,r,i,a){for(var l,c,g=s[0],o=g.parentNode,u=0,f=0;u<o.childNodes.length;u++){var d=o.childNodes[u];if(d.nodeType==n&&d.nodeValue.indexOf("ngMessage")>=0){if(d===g){l=f;break}f++}}i.registerMessage(l,{type:r.ngMessage||r.when,attach:function(){c||a(t,function(n){e.enter(n,null,s),c=n})},detach:function(){c&&(e.leave(c),c=null)}})}}}])}(window,window.angular);
  10. !function(e,t){"use strict";function r(){this.$get=["$$sanitizeUri",function(e){return function(t){var r=[];return i(t,l(r,function(t,r){return!/^unsafe/.test(e(t,r))})),r.join("")}}]}function n(e){var r=[],n=l(r,t.noop);return n.chars(e),r.join("")}function a(e){var t,r={},n=e.split(",");for(t=0;t<n.length;t++)r[n[t]]=!0;return r}function i(e,r){function n(e,n,i,o){if(n=t.lowercase(n),$[n])for(;k.last()&&A[k.last()];)a("",k.last());z[n]&&k.last()==n&&a("",n),o=y[n]||!!o,o||k.push(n);var l={};i.replace(p,function(e,t,r,n,a){var i=r||n||a||"";l[t]=s(i)}),r.start&&r.start(n,l,o)}function a(e,n){var a,i=0;if(n=t.lowercase(n))for(i=k.length-1;i>=0&&k[i]!=n;i--);if(i>=0){for(a=k.length-1;a>=i;a--)r.end&&r.end(k[a]);k.length=i}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var i,o,l,x,k=[],v=e;for(k.last=function(){return k[k.length-1]};e;){if(x="",o=!0,k.last()&&D[k.last()]?(e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+k.last()+"[^>]*>","i"),function(e,t){return t=t.replace(g,"$1").replace(b,"$1"),r.chars&&r.chars(s(t)),""}),a("",k.last())):(0===e.indexOf("<!--")?(i=e.indexOf("--",4),i>=0&&e.lastIndexOf("-->",i)===i&&(r.comment&&r.comment(e.substring(4,i)),e=e.substring(i+3),o=!1)):m.test(e)?(l=e.match(m),l&&(e=e.replace(l[0],""),o=!1)):f.test(e)?(l=e.match(h),l&&(e=e.substring(l[0].length),l[0].replace(h,a),o=!1)):d.test(e)&&(l=e.match(u),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(u,n)),o=!1):(x+="<",e=e.substring(1))),o&&(i=e.indexOf("<"),x+=0>i?e:e.substring(0,i),e=0>i?"":e.substring(i),r.chars&&r.chars(s(x)))),e==v)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);v=e}a()}function s(e){return e?(j.innerHTML=e.replace(/</g,"&lt;"),j.textContent):""}function o(e){return e.replace(/&/g,"&amp;").replace(x,function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(r-56320)+65536)+";"}).replace(k,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function l(e,r){var n=!1,a=t.bind(e,e.push);return{start:function(e,i,s){e=t.lowercase(e),!n&&D[e]&&(n=e),n||T[e]!==!0||(a("<"),a(e),t.forEach(i,function(n,i){var s=t.lowercase(i),l="img"===e&&"src"===s||"background"===s;O[s]!==!0||E[s]===!0&&!r(n,l)||(a(" "),a(i),a('="'),a(o(n)),a('"'))}),a(s?"/>":">"))},end:function(e){e=t.lowercase(e),n||T[e]!==!0||(a("</"),a(e),a(">")),e==n&&(n=!1)},chars:function(e){n||a(o(e))}}}var c=t.$$minErr("$sanitize"),u=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,h=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,d=/^</,f=/^<\//,g=/<!--(.*?)-->/g,m=/<!DOCTYPE([^>]*?)>/i,b=/<!\[CDATA\[(.*?)]]>/g,x=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,k=/([^\#-~| |!])/g,y=a("area,br,col,hr,img,wbr"),v=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),w=a("rp,rt"),z=t.extend({},w,v),$=t.extend({},v,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),A=t.extend({},w,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=a("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"),D=a("script,style"),T=t.extend({},y,$,A,z,C),E=a("background,cite,href,longdesc,src,usemap,xlink:href"),F=a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),q=a("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"),O=t.extend({},E,q,F),j=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",r),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var r=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/i,a=/^mailto:/i;return function(i,s){function o(e){e&&d.push(n(e))}function l(e,r){d.push("<a "),t.isDefined(s)&&d.push('target="',s,'" '),d.push('href="',e.replace(/"/g,"&quot;"),'">'),o(r),d.push("</a>")}if(!i)return i;for(var c,u,h,p=i,d=[];c=p.match(r);)u=c[0],c[2]||c[4]||(u=(c[3]?"http://":"mailto:")+u),h=c.index,o(p.substr(0,h)),l(u,c[0].replace(a,"")),p=p.substring(h+c[0].length);return o(p),e(d.join(""))}}])}(window,window.angular);
  11. !function(e,n){"use strict";function t(e){return n.lowercase(e.nodeName||e[0]&&e[0].nodeName)}function o(e,t){var o=!1,c=!1;this.ngClickOverrideEnabled=function(i){return n.isDefined(i)?(i&&!c&&(c=!0,r.$$moduleName="ngTouch",t.directive("ngClick",r),e.decorator("ngClickDirective",["$delegate",function(e){if(o)e.shift();else for(var n=e.length-1;n>=0;){if("ngTouch"===e[n].$$moduleName){e.splice(n,1);break}n--}return e}])),o=i,this):o},this.$get=function(){return{ngClickOverrideEnabled:function(){return o}}}}function c(e,t,o){i.directive(e,["$parse","$swipe",function(c,i){var r=75,u=.3,a=30;return function(s,l,h){function f(e){if(!d)return!1;var n=Math.abs(e.y-d.y),o=(e.x-d.x)*t;return v&&r>n&&o>0&&o>a&&u>n/o}var d,v,g=c(h[e]),p=["touch"];n.isDefined(h.ngSwipeDisableMouse)||p.push("mouse"),i.bind(l,{start:function(e){d=e,v=!0},cancel:function(){v=!1},end:function(e,n){f(e)&&s.$apply(function(){l.triggerHandler(o),g(s,{$event:n})})}},p)}}])}var i=n.module("ngTouch",[]);i.provider("$touch",o),o.$inject=["$provide","$compileProvider"],i.factory("$swipe",[function(){function e(e){var n=e.originalEvent||e,t=n.touches&&n.touches.length?n.touches:[n],o=n.changedTouches&&n.changedTouches[0]||t[0];return{x:o.clientX,y:o.clientY}}function t(e,t){var o=[];return n.forEach(e,function(e){var n=c[e][t];n&&o.push(n)}),o.join(" ")}var o=10,c={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}};return{bind:function(n,c,i){var r,u,a,s,l=!1;i=i||["mouse","touch","pointer"],n.on(t(i,"start"),function(n){a=e(n),l=!0,r=0,u=0,s=a,c.start&&c.start(a,n)});var h=t(i,"cancel");h&&n.on(h,function(e){l=!1,c.cancel&&c.cancel(e)}),n.on(t(i,"move"),function(n){if(l&&a){var t=e(n);if(r+=Math.abs(t.x-s.x),u+=Math.abs(t.y-s.y),s=t,!(o>r&&o>u))return u>r?(l=!1,void(c.cancel&&c.cancel(n))):(n.preventDefault(),void(c.move&&c.move(t,n)))}}),n.on(t(i,"end"),function(n){l&&(l=!1,c.end&&c.end(e(n),n))})}}}]);var r=["$parse","$timeout","$rootElement",function(e,o,c){function i(e,n,t,o){return Math.abs(e-t)<p&&Math.abs(n-o)<p}function r(e,n,t){for(var o=0;o<e.length;o+=2)if(i(e[o],e[o+1],n,t))return e.splice(o,o+2),!0;return!1}function u(e){if(!(Date.now()-l>g)){var n=e.touches&&e.touches.length?e.touches:[e],o=n[0].clientX,c=n[0].clientY;1>o&&1>c||f&&f[0]===o&&f[1]===c||(f&&(f=null),"label"===t(e.target)&&(f=[o,c]),r(h,o,c)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur&&e.target.blur()))}}function a(e){var n=e.touches&&e.touches.length?e.touches:[e],t=n[0].clientX,c=n[0].clientY;h.push(t,c),o(function(){for(var e=0;e<h.length;e+=2)if(h[e]==t&&h[e+1]==c)return void h.splice(e,e+2)},g,!1)}function s(e,n){h||(c[0].addEventListener("click",u,!0),c[0].addEventListener("touchstart",a,!0),h=[]),l=Date.now(),r(h,e,n)}var l,h,f,d=750,v=12,g=2500,p=25,m="ng-click-active";return function(t,o,c){function i(){f=!1,o.removeClass(m)}var r,u,a,l,h=e(c.ngClick),f=!1;o.on("touchstart",function(e){f=!0,r=e.target?e.target:e.srcElement,3==r.nodeType&&(r=r.parentNode),o.addClass(m),u=Date.now();var n=e.originalEvent||e,t=n.touches&&n.touches.length?n.touches:[n],c=t[0];a=c.clientX,l=c.clientY}),o.on("touchcancel",function(){i()}),o.on("touchend",function(e){var t=Date.now()-u,h=e.originalEvent||e,g=h.changedTouches&&h.changedTouches.length?h.changedTouches:h.touches&&h.touches.length?h.touches:[h],p=g[0],m=p.clientX,w=p.clientY,$=Math.sqrt(Math.pow(m-a,2)+Math.pow(w-l,2));f&&d>t&&v>$&&(s(m,w),r&&r.blur(),n.isDefined(c.disabled)&&c.disabled!==!1||o.triggerHandler("click",[e])),i()}),o.onclick=function(){},o.on("click",function(e,n){t.$apply(function(){h(t,{$event:n||e})})}),o.on("mousedown",function(){o.addClass(m)}),o.on("mousemove mouseup",function(){o.removeClass(m)})}}];c("ngSwipeLeft",-1,"swipeleft"),c("ngSwipeRight",1,"swiperight")}(window,window.angular);
  12. !function(){"use strict";angular.module("configs",[]).constant("API_BASE_URL","/api").constant("AUTH_BASE_URL","/auth").constant("AUTH_TOKEN_COOKIE",flns.config.cookie_base+"_AUTH_HASH_V2").constant("FACEBOOK_APP_ID","").constant("GAF_BASE_URL","").constant("GAF_CDN_URLS",flns.config.cdn_urls).constant("USER_ID_COOKIE",flns.config.cookie_base+"_USER_ID").constant("DEFAULT_AVATAR_URL","/img/unknown.png").constant("LANGUAGE_COOKIE",flns.config.cookie_base+"_LANGUAGE").constant("LANGUAGE_COOKIE_DOMAIN",flns.config.cookie_base).constant("LANGUAGE_COOKIE_EXPIRES",5184e3).constant("FLN_BILLING_BASE_URL",flns.config.fln_billing_base_url).constant("TRANSLATE_MODE_COOKIE",flns.config.cookie_base+"_TRANSLATE_MODE")}();
  13. "undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="angular-md5"),function(r){r.module("angular-md5",["gdi2290.md5"]),r.module("ngMd5",["gdi2290.md5"]),r.module("gdi2290.md5",["gdi2290.gravatar-filter","gdi2290.md5-service","gdi2290.md5-filter"]),r.module("gdi2290.gravatar-filter",[]).filter("gravatar",["md5",function(r){var n={};return function(t,e){return n[t]||(e=e?r.createHash(e.toString().toLowerCase()):"",n[t]=t?r.createHash(t.toString().toLowerCase()):e),n[t]}}]),r.module("gdi2290.md5-filter",[]).filter("md5",["md5",function(r){return function(n){return n?r.createHash(n.toString().toLowerCase()):n}}]),r.module("gdi2290.md5-service",[]).factory("md5",[function(){var r={createHash:function(r){if(null===r)return null;var n,t,e,u,o,i,a,d,f,c,l=function(r,n){return r<<n|r>>>32-n},g=function(r,n){var t,e,u,o,i;return u=2147483648&r,o=2147483648&n,t=1073741824&r,e=1073741824&n,i=(1073741823&r)+(1073741823&n),t&e?2147483648^i^u^o:t|e?1073741824&i?3221225472^i^u^o:1073741824^i^u^o:i^u^o},m=function(r,n,t){return r&n|~r&t},s=function(r,n,t){return r&t|n&~t},v=function(r,n,t){return r^n^t},h=function(r,n,t){return n^(r|~t)},p=function(r,n,t,e,u,o,i){return r=g(r,g(g(m(n,t,e),u),i)),g(l(r,o),n)},w=function(r,n,t,e,u,o,i){return r=g(r,g(g(s(n,t,e),u),i)),g(l(r,o),n)},C=function(r,n,t,e,u,o,i){return r=g(r,g(g(v(n,t,e),u),i)),g(l(r,o),n)},x=function(r,n,t,e,u,o,i){return r=g(r,g(g(h(n,t,e),u),i)),g(l(r,o),n)},y=function(r){for(var n,t=r.length,e=t+8,u=(e-e%64)/64,o=16*(u+1),i=new Array(o-1),a=0,d=0;t>d;)n=(d-d%4)/4,a=d%4*8,i[n]=i[n]|r.charCodeAt(d)<<a,d++;return n=(d-d%4)/4,a=d%4*8,i[n]=i[n]|128<<a,i[o-2]=t<<3,i[o-1]=t>>>29,i},H=function(r){var n,t,e="",u="";for(t=0;3>=t;t++)n=r>>>8*t&255,u="0"+n.toString(16),e+=u.substr(u.length-2,2);return e},L=[],S=7,A=12,b=17,M=22,j=5,k=9,q=14,z=20,B=4,D=11,E=16,F=23,G=6,I=10,J=15,K=21;for(L=y(r),a=1732584193,d=4023233417,f=2562383102,c=271733878,n=L.length,t=0;n>t;t+=16)e=a,u=d,o=f,i=c,a=p(a,d,f,c,L[t+0],S,3614090360),c=p(c,a,d,f,L[t+1],A,3905402710),f=p(f,c,a,d,L[t+2],b,606105819),d=p(d,f,c,a,L[t+3],M,3250441966),a=p(a,d,f,c,L[t+4],S,4118548399),c=p(c,a,d,f,L[t+5],A,1200080426),f=p(f,c,a,d,L[t+6],b,2821735955),d=p(d,f,c,a,L[t+7],M,4249261313),a=p(a,d,f,c,L[t+8],S,1770035416),c=p(c,a,d,f,L[t+9],A,2336552879),f=p(f,c,a,d,L[t+10],b,4294925233),d=p(d,f,c,a,L[t+11],M,2304563134),a=p(a,d,f,c,L[t+12],S,1804603682),c=p(c,a,d,f,L[t+13],A,4254626195),f=p(f,c,a,d,L[t+14],b,2792965006),d=p(d,f,c,a,L[t+15],M,1236535329),a=w(a,d,f,c,L[t+1],j,4129170786),c=w(c,a,d,f,L[t+6],k,3225465664),f=w(f,c,a,d,L[t+11],q,643717713),d=w(d,f,c,a,L[t+0],z,3921069994),a=w(a,d,f,c,L[t+5],j,3593408605),c=w(c,a,d,f,L[t+10],k,38016083),f=w(f,c,a,d,L[t+15],q,3634488961),d=w(d,f,c,a,L[t+4],z,3889429448),a=w(a,d,f,c,L[t+9],j,568446438),c=w(c,a,d,f,L[t+14],k,3275163606),f=w(f,c,a,d,L[t+3],q,4107603335),d=w(d,f,c,a,L[t+8],z,1163531501),a=w(a,d,f,c,L[t+13],j,2850285829),c=w(c,a,d,f,L[t+2],k,4243563512),f=w(f,c,a,d,L[t+7],q,1735328473),d=w(d,f,c,a,L[t+12],z,2368359562),a=C(a,d,f,c,L[t+5],B,4294588738),c=C(c,a,d,f,L[t+8],D,2272392833),f=C(f,c,a,d,L[t+11],E,1839030562),d=C(d,f,c,a,L[t+14],F,4259657740),a=C(a,d,f,c,L[t+1],B,2763975236),c=C(c,a,d,f,L[t+4],D,1272893353),f=C(f,c,a,d,L[t+7],E,4139469664),d=C(d,f,c,a,L[t+10],F,3200236656),a=C(a,d,f,c,L[t+13],B,681279174),c=C(c,a,d,f,L[t+0],D,3936430074),f=C(f,c,a,d,L[t+3],E,3572445317),d=C(d,f,c,a,L[t+6],F,76029189),a=C(a,d,f,c,L[t+9],B,3654602809),c=C(c,a,d,f,L[t+12],D,3873151461),f=C(f,c,a,d,L[t+15],E,530742520),d=C(d,f,c,a,L[t+2],F,3299628645),a=x(a,d,f,c,L[t+0],G,4096336452),c=x(c,a,d,f,L[t+7],I,1126891415),f=x(f,c,a,d,L[t+14],J,2878612391),d=x(d,f,c,a,L[t+5],K,4237533241),a=x(a,d,f,c,L[t+12],G,1700485571),c=x(c,a,d,f,L[t+3],I,2399980690),f=x(f,c,a,d,L[t+10],J,4293915773),d=x(d,f,c,a,L[t+1],K,2240044497),a=x(a,d,f,c,L[t+8],G,1873313359),c=x(c,a,d,f,L[t+15],I,4264355552),f=x(f,c,a,d,L[t+6],J,2734768916),d=x(d,f,c,a,L[t+13],K,1309151649),a=x(a,d,f,c,L[t+4],G,4149444226),c=x(c,a,d,f,L[t+11],I,3174756917),f=x(f,c,a,d,L[t+2],J,718787259),d=x(d,f,c,a,L[t+9],K,3951481745),a=g(a,e),d=g(d,u),f=g(f,o),c=g(c,i);var N=H(a)+H(d)+H(f)+H(c);return N.toLowerCase()}};return r}])}(angular);
  14. (function(e){function t(e,t,n){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:n;default:throw new Error("Implement me")}}function n(e,t){return Tt.call(e,t)}function s(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function a(e){wt.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function i(e,t){var n=!0;return _(function(){return n&&(a(e),n=!1),t.apply(this,arguments)},t)}function r(e,t){Mn[e]||(a(t),Mn[e]=!0)}function o(e,t){return function(n){return p(e.call(this,n),t)}}function u(e,t){return function(n){return this.localeData().ordinal(e.call(this,n),t)}}function c(e,t){var n,s,a=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(a,"months");return 0>t-i?(n=e.clone().add(a-1,"months"),s=(t-i)/(i-n)):(n=e.clone().add(a+1,"months"),s=(t-i)/(n-i)),-(a+s)}function l(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(s=e.isPM(n),s&&12>t&&(t+=12),s||12!==t||(t=0),t):t}function d(){}function f(e,t){t!==!1&&F(e),m(this,e),this._d=new Date(+e._d),wn===!1&&(wn=!0,wt.updateOffset(this),wn=!1)}function h(e){var t=S(e),n=t.year||0,s=t.quarter||0,a=t.month||0,i=t.week||0,r=t.day||0,o=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+36e5*o,this._days=+r+7*i,this._months=+a+3*s+12*n,this._data={},this._locale=wt.localeData(),this._bubble()}function _(e,t){for(var s in t)n(t,s)&&(e[s]=t[s]);return n(t,"toString")&&(e.toString=t.toString),n(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t){var n,s,a;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),It.length>0)for(n in It)s=It[n],a=t[s],"undefined"!=typeof a&&(e[s]=a);return e}function y(e){return 0>e?Math.ceil(e):Math.floor(e)}function p(e,t,n){for(var s=""+Math.abs(e),a=e>=0;s.length<t;)s="0"+s;return(a?n?"+":"":"-")+s}function g(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function M(e,t){var n;return t=H(t,e),e.isBefore(t)?n=g(e,t):(n=g(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function D(e,t){return function(n,s){var a,i;return null===s||isNaN(+s)||(r(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=s,s=i),n="string"==typeof n?+n:n,a=wt.duration(n,s),w(this,a,e),this}}function w(e,t,n,s){var a=t._milliseconds,i=t._days,r=t._months;s=null==s?!0:s,a&&e._d.setTime(+e._d+a*n),i&&mt(e,"Date",_t(e,"Date")+i*n),r&&ht(e,_t(e,"Month")+r*n),s&&wt.updateOffset(e,i||r)}function Y(e){return"[object Array]"===Object.prototype.toString.call(e)}function v(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function k(e,t,n){var s,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0;for(s=0;a>s;s++)(n&&e[s]!==t[s]||!n&&O(e[s])!==O(t[s]))&&r++;return r+i}function b(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=fn[e]||hn[t]||t}return e}function S(e){var t,s,a={};for(s in e)n(e,s)&&(t=b(s),t&&(a[t]=e[s]));return a}function T(t){var n,s;if(0===t.indexOf("week"))n=7,s="day";else{if(0!==t.indexOf("month"))return;n=12,s="month"}wt[t]=function(a,i){var r,o,u=wt._locale[t],c=[];if("number"==typeof a&&(i=a,a=e),o=function(e){var t=wt().utc().set(s,e);return u.call(wt._locale,t,a||"")},null!=i)return o(i);for(r=0;n>r;r++)c.push(o(r));return c}}function O(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function U(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function W(e,t,n){return ct(wt([e,11,31+t-n]),t,n).week}function C(e){return G(e)?366:365}function G(e){return e%4===0&&e%100!==0||e%400===0}function F(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[Ut]<0||e._a[Ut]>11?Ut:e._a[Wt]<1||e._a[Wt]>U(e._a[Ot],e._a[Ut])?Wt:e._a[Ct]<0||e._a[Ct]>24||24===e._a[Ct]&&(0!==e._a[Gt]||0!==e._a[Ft]||0!==e._a[Pt])?Ct:e._a[Gt]<0||e._a[Gt]>59?Gt:e._a[Ft]<0||e._a[Ft]>59?Ft:e._a[Pt]<0||e._a[Pt]>999?Pt:-1,e._pf._overflowDayOfYear&&(Ot>t||t>Wt)&&(t=Wt),e._pf.overflow=t)}function P(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===e)),t._isValid}function L(e){return e?e.toLowerCase().replace("_","-"):e}function I(e){for(var t,n,s,a,i=0;i<e.length;){for(a=L(e[i]).split("-"),t=a.length,n=L(e[i+1]),n=n?n.split("-"):null;t>0;){if(s=x(a.slice(0,t).join("-")))return s;if(n&&n.length>=t&&k(a,n,!0)>=t-1)break;t--}i++}return null}function x(e){var t=null;if(!Lt[e]&&xt)try{t=wt.locale(),require("./locale/"+e),wt.locale(t)}catch(n){}return Lt[e]}function H(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(wt.isMoment(e)||v(e)?+e:+wt(e))-+n,n._d.setTime(+n._d+s),wt.updateOffset(n,!1),n):wt(e).local()}function A(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function z(e){var t,n,s=e.match(Zt);for(t=0,n=s.length;n>t;t++)s[t]=gn[s[t]]?gn[s[t]]:A(s[t]);return function(a){var i="";for(t=0;n>t;t++)i+=s[t]instanceof Function?s[t].call(a,e):s[t];return i}}function Z(e,t){return e.isValid()?(t=E(t,e.localeData()),_n[t]||(_n[t]=z(t)),_n[t](e)):e.localeData().invalidDate()}function E(e,t){function n(e){return t.longDateFormat(e)||e}var s=5;for(Et.lastIndex=0;s>=0&&Et.test(e);)e=e.replace(Et,n),Et.lastIndex=0,s-=1;return e}function j(e,t){var n,s=t._strict;switch(e){case"Q":return Kt;case"DDDD":return tn;case"YYYY":case"GGGG":case"gggg":return s?nn:qt;case"Y":case"G":case"g":return an;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return s?sn:Vt;case"S":if(s)return Kt;case"SS":if(s)return en;case"SSS":if(s)return tn;case"DDD":return Nt;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Jt;case"a":case"A":return t._locale._meridiemParse;case"x":return Qt;case"X":return Xt;case"Z":case"ZZ":return Rt;case"T":return Bt;case"SSSS":return $t;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return s?en:jt;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return jt;case"Do":return s?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return n=new RegExp(X(Q(e.replace("\\","")),"i"))}}function N(e){e=e||"";var t=e.match(Rt)||[],n=t[t.length-1]||[],s=(n+"").match(ln)||["-",0,0],a=+(60*s[1])+O(s[2]);return"+"===s[0]?a:-a}function q(e,t,n){var s,a=n._a;switch(e){case"Q":null!=t&&(a[Ut]=3*(O(t)-1));break;case"M":case"MM":null!=t&&(a[Ut]=O(t)-1);break;case"MMM":case"MMMM":s=n._locale.monthsParse(t,e,n._strict),null!=s?a[Ut]=s:n._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(a[Wt]=O(t));break;case"Do":null!=t&&(a[Wt]=O(parseInt(t.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=t&&(n._dayOfYear=O(t));break;case"YY":a[Ot]=wt.parseTwoDigitYear(t);break;case"YYYY":case"YYYYY":case"YYYYYY":a[Ot]=O(t);break;case"a":case"A":n._meridiem=t;break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":a[Ct]=O(t);break;case"m":case"mm":a[Gt]=O(t);break;case"s":case"ss":a[Ft]=O(t);break;case"S":case"SS":case"SSS":case"SSSS":a[Pt]=O(1e3*("0."+t));break;case"x":n._d=new Date(O(t));break;case"X":n._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=N(t);break;case"dd":case"ddd":case"dddd":s=n._locale.weekdaysParse(t),null!=s?(n._w=n._w||{},n._w.d=s):n._pf.invalidWeekday=t;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(n._w=n._w||{},n._w[e]=O(t));break;case"gg":case"GG":n._w=n._w||{},n._w[e]=wt.parseTwoDigitYear(t)}}function V(e){var n,s,a,i,r,o,u;n=e._w,null!=n.GG||null!=n.W||null!=n.E?(r=1,o=4,s=t(n.GG,e._a[Ot],ct(wt(),1,4).year),a=t(n.W,1),i=t(n.E,1)):(r=e._locale._week.dow,o=e._locale._week.doy,s=t(n.gg,e._a[Ot],ct(wt(),r,o).year),a=t(n.w,1),null!=n.d?(i=n.d,r>i&&++a):i=null!=n.e?n.e+r:r),u=lt(s,a,i,o,r),e._a[Ot]=u.year,e._dayOfYear=u.dayOfYear}function $(e){var n,s,a,i,r=[];if(!e._d){for(a=R(e),e._w&&null==e._a[Wt]&&null==e._a[Ut]&&V(e),e._dayOfYear&&(i=t(e._a[Ot],a[Ot]),e._dayOfYear>C(i)&&(e._pf._overflowDayOfYear=!0),s=it(i,0,e._dayOfYear),e._a[Ut]=s.getUTCMonth(),e._a[Wt]=s.getUTCDate()),n=0;3>n&&null==e._a[n];++n)e._a[n]=r[n]=a[n];for(;7>n;n++)e._a[n]=r[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[Ct]&&0===e._a[Gt]&&0===e._a[Ft]&&0===e._a[Pt]&&(e._nextDay=!0,e._a[Ct]=0),e._d=(e._useUTC?it:at).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ct]=24)}}function J(e){var t;e._d||(t=S(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],$(e))}function R(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function B(t){if(t._f===wt.ISO_8601)return void et(t);t._a=[],t._pf.empty=!0;var n,s,a,i,r,o=""+t._i,u=o.length,c=0;for(a=E(t._f,t._locale).match(Zt)||[],n=0;n<a.length;n++)i=a[n],s=(o.match(j(i,t))||[])[0],s&&(r=o.substr(0,o.indexOf(s)),r.length>0&&t._pf.unusedInput.push(r),o=o.slice(o.indexOf(s)+s.length),c+=s.length),gn[i]?(s?t._pf.empty=!1:t._pf.unusedTokens.push(i),q(i,s,t)):t._strict&&!s&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-c,o.length>0&&t._pf.unusedInput.push(o),t._pf.bigHour===!0&&t._a[Ct]<=12&&(t._pf.bigHour=e),t._a[Ct]=l(t._locale,t._a[Ct],t._meridiem),$(t),F(t)}function Q(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,a){return t||n||s||a})}function X(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(e){var t,n,a,i,r;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(0/0));for(i=0;i<e._f.length;i++)r=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._pf=s(),t._f=e._f[i],B(t),P(t)&&(r+=t._pf.charsLeftOver,r+=10*t._pf.unusedTokens.length,t._pf.score=r,(null==a||a>r)&&(a=r,n=t));_(e,n||t)}function et(e){var t,n,s=e._i,a=rn.exec(s);if(a){for(e._pf.iso=!0,t=0,n=un.length;n>t;t++)if(un[t][1].exec(s)){e._f=un[t][0]+(a[6]||" ");break}for(t=0,n=cn.length;n>t;t++)if(cn[t][1].exec(s)){e._f+=cn[t][0];break}s.match(Rt)&&(e._f+="Z"),B(e)}else e._isValid=!1}function tt(e){et(e),e._isValid===!1&&(delete e._isValid,wt.createFromInputFallback(e))}function nt(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function st(t){var n,s=t._i;s===e?t._d=new Date:v(s)?t._d=new Date(+s):null!==(n=Ht.exec(s))?t._d=new Date(+n[1]):"string"==typeof s?tt(t):Y(s)?(t._a=nt(s.slice(0),function(e){return parseInt(e,10)}),$(t)):"object"==typeof s?J(t):"number"==typeof s?t._d=new Date(s):wt.createFromInputFallback(t)}function at(e,t,n,s,a,i,r){var o=new Date(e,t,n,s,a,i,r);return 1970>e&&o.setFullYear(e),o}function it(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function rt(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function ot(e,t,n,s,a){return a.relativeTime(t||1,!!n,e,s)}function ut(e,t,n){var s=wt.duration(e).abs(),a=St(s.as("s")),i=St(s.as("m")),r=St(s.as("h")),o=St(s.as("d")),u=St(s.as("M")),c=St(s.as("y")),l=a<mn.s&&["s",a]||1===i&&["m"]||i<mn.m&&["mm",i]||1===r&&["h"]||r<mn.h&&["hh",r]||1===o&&["d"]||o<mn.d&&["dd",o]||1===u&&["M"]||u<mn.M&&["MM",u]||1===c&&["y"]||["yy",c];return l[2]=t,l[3]=+e>0,l[4]=n,ot.apply({},l)}function ct(e,t,n){var s,a=n-t,i=n-e.day();return i>a&&(i-=7),a-7>i&&(i+=7),s=wt(e).add(i,"d"),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function lt(e,t,n,s,a){var i,r,o=it(e,0,1).getUTCDay();return o=0===o?7:o,n=null!=n?n:a,i=a-o+(o>s?7:0)-(a>o?7:0),r=7*(t-1)+(n-a)+i+1,{year:r>0?e:e-1,dayOfYear:r>0?r:C(e-1)+r}}function dt(t){var n,s=t._i,a=t._f;return t._locale=t._locale||wt.localeData(t._l),null===s||a===e&&""===s?wt.invalid({nullInput:!0}):("string"==typeof s&&(t._i=s=t._locale.preparse(s)),wt.isMoment(s)?new f(s,!0):(a?Y(a)?K(t):B(t):st(t),n=new f(t),n._nextDay&&(n.add(1,"d"),n._nextDay=e),n))}function ft(e,t){var n,s;if(1===t.length&&Y(t[0])&&(t=t[0]),!t.length)return wt();for(n=t[0],s=1;s<t.length;++s)t[s][e](n)&&(n=t[s]);return n}function ht(e,t){var n;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(n=Math.min(e.date(),U(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e)}function _t(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function mt(e,t,n){return"Month"===t?ht(e,n):e._d["set"+(e._isUTC?"UTC":"")+t](n)}function yt(e,t){return function(n){return null!=n?(mt(this,e,n),wt.updateOffset(this,t),this):_t(this,e)}}function pt(e){return 400*e/146097}function gt(e){return 146097*e/400}function Mt(e){wt.duration.fn[e]=function(){return this._data[e]}}function Dt(e){"undefined"==typeof ender&&(Yt=bt.moment,bt.moment=e?i("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",wt):wt)}for(var wt,Yt,vt,kt="2.9.0",bt="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,St=Math.round,Tt=Object.prototype.hasOwnProperty,Ot=0,Ut=1,Wt=2,Ct=3,Gt=4,Ft=5,Pt=6,Lt={},It=[],xt="undefined"!=typeof module&&module&&module.exports,Ht=/^\/?Date\((\-?\d+)/i,At=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zt=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Zt=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Et=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,jt=/\d\d?/,Nt=/\d{1,3}/,qt=/\d{1,4}/,Vt=/[+\-]?\d{1,6}/,$t=/\d+/,Jt=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Rt=/Z|[\+\-]\d\d:?\d\d/gi,Bt=/T/i,Qt=/[\+\-]?\d+/,Xt=/[\+\-]?\d+(\.\d{1,3})?/,Kt=/\d/,en=/\d\d/,tn=/\d{3}/,nn=/\d{4}/,sn=/[+-]?\d{6}/,an=/[+-]?\d+/,rn=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,on="YYYY-MM-DDTHH:mm:ssZ",un=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],cn=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ln=/([\+\-]|\d\d)/gi,dn=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),fn={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},hn={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},_n={},mn={s:45,m:45,h:22,d:26,M:11},yn="DDD w W M D d".split(" "),pn="M D H h m s w W".split(" "),gn={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return p(this.year()%100,2)},YYYY:function(){return p(this.year(),4)},YYYYY:function(){return p(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+p(Math.abs(e),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return O(this.milliseconds()/100)},SS:function(){return p(O(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var e=this.utcOffset(),t="+";return 0>e&&(e=-e,t="-"),t+p(O(e/60),2)+":"+p(O(e)%60,2)},ZZ:function(){var e=this.utcOffset(),t="+";return 0>e&&(e=-e,t="-"),t+p(O(e/60),2)+p(O(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Mn={},Dn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],wn=!1;yn.length;)vt=yn.pop(),gn[vt+"o"]=u(gn[vt],vt);for(;pn.length;)vt=pn.pop(),gn[vt+vt]=o(gn[vt],2);gn.DDDD=o(gn.DDD,3),_(d.prototype,{set:function(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,t,n){var s,a,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;12>s;s++){if(a=wt.utc([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(n=wt([2e3,1]).day(t),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,n){var s=this._calendar[e];return"function"==typeof s?s.apply(t,[n]):s},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,s){var a=this._relativeTime[n];return"function"==typeof a?a(e,t,n,s):a.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return ct(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),wt=function(t,n,a,i){var r;return"boolean"==typeof a&&(i=a,a=e),r={},r._isAMomentObject=!0,r._i=t,r._f=n,r._l=a,r._strict=i,r._isUTC=!1,r._pf=s(),dt(r)},wt.suppressDeprecationWarnings=!1,wt.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),wt.min=function(){var e=[].slice.call(arguments,0);return ft("isBefore",e)},wt.max=function(){var e=[].slice.call(arguments,0);return ft("isAfter",e)},wt.utc=function(t,n,a,i){var r;return"boolean"==typeof a&&(i=a,a=e),r={},r._isAMomentObject=!0,r._useUTC=!0,r._isUTC=!0,r._l=a,r._i=t,r._f=n,r._strict=i,r._pf=s(),dt(r).utc()},wt.unix=function(e){return wt(1e3*e)},wt.duration=function(e,t){var s,a,i,r,o=e,u=null;return wt.isDuration(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(o={},t?o[t]=e:o.milliseconds=e):(u=At.exec(e))?(s="-"===u[1]?-1:1,o={y:0,d:O(u[Wt])*s,h:O(u[Ct])*s,m:O(u[Gt])*s,s:O(u[Ft])*s,ms:O(u[Pt])*s}):(u=zt.exec(e))?(s="-"===u[1]?-1:1,i=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*s},o={y:i(u[2]),M:i(u[3]),d:i(u[4]),h:i(u[5]),m:i(u[6]),s:i(u[7]),w:i(u[8])}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=M(wt(o.from),wt(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),a=new h(o),wt.isDuration(e)&&n(e,"_locale")&&(a._locale=e._locale),a},wt.version=kt,wt.defaultFormat=on,wt.ISO_8601=function(){},wt.momentProperties=It,wt.updateOffset=function(){},wt.relativeTimeThreshold=function(t,n){return mn[t]===e?!1:n===e?mn[t]:(mn[t]=n,!0)},wt.lang=i("moment.lang is deprecated. Use moment.locale instead.",function(e,t){return wt.locale(e,t)}),wt.locale=function(e,t){var n;return e&&(n="undefined"!=typeof t?wt.defineLocale(e,t):wt.localeData(e),n&&(wt.duration._locale=wt._locale=n)),wt._locale._abbr},wt.defineLocale=function(e,t){return null!==t?(t.abbr=e,Lt[e]||(Lt[e]=new d),Lt[e].set(t),wt.locale(e),Lt[e]):(delete Lt[e],null)},wt.langData=i("moment.langData is deprecated. Use moment.localeData instead.",function(e){return wt.localeData(e)}),wt.localeData=function(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wt._locale;if(!Y(e)){if(t=x(e))return t;e=[e]}return I(e)},wt.isMoment=function(e){return e instanceof f||null!=e&&n(e,"_isAMomentObject")},wt.isDuration=function(e){return e instanceof h};for(vt=Dn.length-1;vt>=0;--vt)T(Dn[vt]);wt.normalizeUnits=function(e){return b(e)},wt.invalid=function(e){var t=wt.utc(0/0);return null!=e?_(t._pf,e):t._pf.userInvalidated=!0,t},wt.parseZone=function(){return wt.apply(null,arguments).parseZone()},wt.parseTwoDigitYear=function(e){return O(e)+(O(e)>68?1900:2e3)},wt.isDate=v,_(wt.fn=f.prototype,{clone:function(){return wt(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=wt(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():Z(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Z(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return P(this)},isDSTShifted:function(){return this._a?this.isValid()&&k(this._a,(this._isUTC?wt.utc(this._a):wt(this._a)).toArray())>0:!1},parsingFlags:function(){return _({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.utcOffset(0,e)},local:function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(e){var t=Z(this,e||wt.defaultFormat);return this.localeData().postformat(t)},add:D(1,"add"),subtract:D(-1,"subtract"),diff:function(e,t,n){var s,a,i=H(e,this),r=6e4*(i.utcOffset()-this.utcOffset());return t=b(t),"year"===t||"month"===t||"quarter"===t?(a=c(this,i),"quarter"===t?a/=3:"year"===t&&(a/=12)):(s=this-i,a="second"===t?s/1e3:"minute"===t?s/6e4:"hour"===t?s/36e5:"day"===t?(s-r)/864e5:"week"===t?(s-r)/6048e5:s),n?a:y(a)},from:function(e,t){return wt.duration({to:this,from:e}).locale(this.locale()).humanize(!t)},fromNow:function(e){return this.from(wt(),e)},calendar:function(e){var t=e||wt(),n=H(t,this).startOf("day"),s=this.diff(n,"days",!0),a=-6>s?"sameElse":-1>s?"lastWeek":0>s?"lastDay":1>s?"sameDay":2>s?"nextDay":7>s?"nextWeek":"sameElse";return this.format(this.localeData().calendar(a,this,wt(t)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=rt(e,this.localeData()),this.add(e-t,"d")):t},month:yt("Month",!0),startOf:function(e){switch(e=b(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=b(t),t===e||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(e,t){var n;return t=b("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=wt.isMoment(e)?e:wt(e),+this>+e):(n=wt.isMoment(e)?+e:+wt(e),n<+this.clone().startOf(t))},isBefore:function(e,t){var n;return t=b("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=wt.isMoment(e)?e:wt(e),+e>+this):(n=wt.isMoment(e)?+e:+wt(e),+this.clone().endOf(t)<n)},isBetween:function(e,t,n){return this.isAfter(e,n)&&this.isBefore(t,n)},isSame:function(e,t){var n;return t=b(t||"millisecond"),"millisecond"===t?(e=wt.isMoment(e)?e:wt(e),+this===+e):(n=+wt(e),+this.clone().startOf(t)<=n&&n<=+this.clone().endOf(t))},min:i("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=wt.apply(null,arguments),this>e?this:e}),max:i("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=wt.apply(null,arguments),e>this?this:e}),zone:i("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),utcOffset:function(e,t){var n,s=this._offset||0;return null!=e?("string"==typeof e&&(e=N(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&t&&(n=this._dateUtcOffset()),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),s!==e&&(!t||this._changeInProgress?w(this,wt.duration(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,wt.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(N(this._i)),this},hasAlignedHourOffset:function(e){return e=e?wt(e).utcOffset():0,(this.utcOffset()-e)%60===0},daysInMonth:function(){return U(this.year(),this.month())},dayOfYear:function(e){var t=St((wt(this).startOf("day")-wt(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},quarter:function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},weekYear:function(e){var t=ct(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=ct(this,1,4).year;return null==e?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},isoWeek:function(e){var t=ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return W(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return W(this.year(),e.dow,e.doy)},get:function(e){return e=b(e),this[e]()},set:function(e,t){var n;if("object"==typeof e)for(n in e)this.set(n,e[n]);else e=b(e),"function"==typeof this[e]&&this[e](t);return this},locale:function(t){var n;return t===e?this._locale._abbr:(n=wt.localeData(t),null!=n&&(this._locale=n),this)},lang:i("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===e?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),wt.fn.millisecond=wt.fn.milliseconds=yt("Milliseconds",!1),wt.fn.second=wt.fn.seconds=yt("Seconds",!1),wt.fn.minute=wt.fn.minutes=yt("Minutes",!1),wt.fn.hour=wt.fn.hours=yt("Hours",!0),wt.fn.date=yt("Date",!0),wt.fn.dates=i("dates accessor is deprecated. Use date instead.",yt("Date",!0)),wt.fn.year=yt("FullYear",!0),wt.fn.years=i("years accessor is deprecated. Use year instead.",yt("FullYear",!0)),wt.fn.days=wt.fn.day,wt.fn.months=wt.fn.month,wt.fn.weeks=wt.fn.week,wt.fn.isoWeeks=wt.fn.isoWeek,wt.fn.quarters=wt.fn.quarter,wt.fn.toJSON=wt.fn.toISOString,wt.fn.isUTC=wt.fn.isUtc,_(wt.duration.fn=h.prototype,{_bubble:function(){var e,t,n,s=this._milliseconds,a=this._days,i=this._months,r=this._data,o=0;r.milliseconds=s%1e3,e=y(s/1e3),r.seconds=e%60,t=y(e/60),r.minutes=t%60,n=y(t/60),r.hours=n%24,a+=y(n/24),o=y(pt(a)),a-=y(gt(o)),i+=y(a/30),a%=30,o+=y(i/12),i%=12,r.days=a,r.months=i,r.years=o},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return y(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*O(this._months/12)
  15. },humanize:function(e){var t=ut(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,t){var n=wt.duration(e,t);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(e,t){var n=wt.duration(e,t);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(e){return e=b(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,n;if(e=b(e),"month"===e||"year"===e)return t=this._days+this._milliseconds/864e5,n=this._months+12*pt(t),"month"===e?n:n/12;switch(t=this._days+Math.round(gt(this._months/12)),e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 24*t*60+this._milliseconds/6e4;case"second":return 24*t*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*t*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:wt.fn.lang,locale:wt.fn.locale,toIsoString:i("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),n=Math.abs(this.days()),s=Math.abs(this.hours()),a=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(s||a||i?"T":"")+(s?s+"H":"")+(a?a+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),wt.duration.fn.toString=wt.duration.fn.toISOString;for(vt in dn)n(dn,vt)&&Mt(vt.toLowerCase());wt.duration.fn.asMilliseconds=function(){return this.as("ms")},wt.duration.fn.asSeconds=function(){return this.as("s")},wt.duration.fn.asMinutes=function(){return this.as("m")},wt.duration.fn.asHours=function(){return this.as("h")},wt.duration.fn.asDays=function(){return this.as("d")},wt.duration.fn.asWeeks=function(){return this.as("weeks")},wt.duration.fn.asMonths=function(){return this.as("M")},wt.duration.fn.asYears=function(){return this.as("y")},wt.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===O(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),xt?module.exports=wt:"function"==typeof define&&define.amd?(define(function(e,t,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(bt.moment=Yt),wt}),Dt(!0)):Dt()}).call(this);
  16. "format global";"deps angular";"deps moment";!function(){"use strict";function e(e,n){return e.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:"",format:null,statefulFilters:!0}).constant("moment",n).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig","angularMomentConfig",function(n,t,o,i,r){return function(a,u,f){function m(){var e;if(i.serverTime){var n=(new Date).getTime(),o=n-y+i.serverTime;e=t(o)}else e=t();return e}function l(){v&&(n.clearTimeout(v),v=null)}function s(e){if(u.text(e.from(m(),T)),M&&!u.attr("title")&&u.attr("title",e.local().format(M)),!C){var t=Math.abs(m().diff(e,"minute")),o=3600;1>t?o=1:60>t?o=30:180>t&&(o=300),v=n.setTimeout(function(){s(e)},1e3*o)}}function c(e){D&&u.attr("datetime",e)}function p(){if(l(),d){var e=o.preprocessDate(d,z,h);s(e),c(e.toISOString())}}var d,g,v=null,h=r.format,T=i.withoutSuffix,M=i.titleFormat,y=(new Date).getTime(),z=r.preprocess,$=f.amTimeAgo.replace(/^::/,""),C=0===f.amTimeAgo.indexOf("::"),D="TIME"===u[0].nodeName.toUpperCase();g=a.$watch($,function(e){return"undefined"==typeof e||null===e||""===e?(l(),void(d&&(u.text(""),c(""),d=null))):(d=e,p(),void(void 0!==e&&C&&g()))}),e.isDefined(f.amWithoutSuffix)&&a.$watch(f.amWithoutSuffix,function(e){"boolean"==typeof e?(T=e,p()):T=i.withoutSuffix}),f.$observe("amFormat",function(e){"undefined"!=typeof e&&(h=e,p())}),f.$observe("amPreprocess",function(e){z=e,p()}),a.$on("$destroy",function(){l()}),a.$on("amMoment:localeChanged",function(){p()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(n,t,o,i){this.preprocessors={utc:n.utc,unix:n.unix},this.changeLocale=function(o,i){var r=n.locale(o,i);return e.isDefined(o)&&t.$broadcast("amMoment:localeChanged"),r},this.changeTimezone=function(e){i.timezone=e,t.$broadcast("amMoment:timezoneChanged")},this.preprocessDate=function(t,r,a){return e.isUndefined(r)&&(r=i.preprocess),this.preprocessors[r]?this.preprocessors[r](t,a):(r&&o.warn("angular-moment: Ignoring unsupported value for preprocess: "+r),!isNaN(parseFloat(t))&&isFinite(t)?n(parseInt(t,10)):n(t,a))},this.applyTimezone=function(e){var n=i.timezone;return e&&n&&(e.tz?e=e.tz(n):o.warn("angular-moment: timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js?")),e}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,o);var i=e(t);return i.isValid()?n.applyTimezone(i).calendar():""}return o.$stateful=t.statefulFilters,o}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i,r,a,u){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,a);var f=e(t);if(!f.isValid())return"";var m;if("undefined"==typeof o||null===o)m=e();else if(o=n.preprocessDate(o,u),m=e(o),!m.isValid())return"";return n.applyTimezone(f).diff(n.applyTimezone(m),i,r)}return o.$stateful=t.statefulFilters,o}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,i);var r=e(t);return r.isValid()?n.applyTimezone(r).format(o):""}return o.$stateful=t.statefulFilters,o}]).filter("amDurationFormat",["moment","angularMomentConfig",function(e,n){function t(n,t,o){return"undefined"==typeof n||null===n?"":e.duration(n,t).humanize(o)}return t.$stateful=n.statefulFilters,t}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(e,n,t){function o(t,o,i){if("undefined"==typeof t||null===t)return"";t=n.preprocessDate(t,o);var r=e(t);return r.isValid()?n.applyTimezone(r).fromNow(i):""}return o.$stateful=t.statefulFilters,o}])}"function"==typeof define&&define.amd?define(["angular","moment"],e):"undefined"!=typeof module&&module&&module.exports?e(angular,require("moment")):e(angular,window.moment)}();
  17. "use strict";angular.module("threepio",["ngRoute","flCookies"]);
  18. "use strict";angular.module("threepio").directive("i18nId",["$rootScope","$rootElement","$compile","$interpolate","Translation","Localization",function(n,a,t,l,o,e){return{restrict:"A",priority:-1,link:function(a,i){function r(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function u(n){o.loadTranslations(n).then(function(){o.translate(i[0])}).finally(function(){a&&i.html()&&i.html().match(r(l.startSymbol()))&&t(i,null,0)(a),i.removeAttr("i18n-cloak")})}n.$on("TranslationLanguageChange",function(){i.data("lang",e.language()),u(e.language())});var c=e.language();i.data("lang")!==c&&(i.data("lang",c),u(c))}}}]);
  19. "use strict";angular.module("threepio").directive("i18nSrc",["$rootScope","Localization",function(n,e){return{restrict:"A",link:function(i,t,a){function c(){var n=e.language();n!==e.defaultLanguage()?a.$set("src",a.i18nSrc.replace(/\.[^.]*$/,"."+n+"$&")):a.$set("src",a.i18nSrc)}c(),n.$on("LocalizationLanguageChange",function(){c()})}}}]);
  20. "use strict";angular.module("threepio").directive("script",["TranslationsCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,i){if("text/threepio"===i.type){var r=i.lang,n=e[0].textContent.trim();t.put(r,n)}}}}]);
  21. "use strict";angular.module("threepio").factory("i18n",function(){function n(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e(e,r){return angular.forEach(r,function(r,t){e=e.replace(new RegExp(n("${"+t+"}"),"g"),r)}),e}return function(n,r){return angular.isObject(n)?1===r.count?e(n.one,r):angular.isDefined(n[r.count])?e(n[r.count],r):e(n.other,r):e(n,r)}});
  22. "use strict";angular.module("threepio").provider("Localization",function(){var n,t,e="en";this.defaultLanguage=function(n){return n?void(e=n):e},this.setLanguageCookie=function(e,o){n=e,t=o},this.$get=["$q","$injector","$timeout","$rootScope","CookieStore",function(o,a,i,r,u){var c=u.get(n)||e;return{language:function(e,i){var g=o.defer();return e&&(!i||i&&!u.get(n))?(c=e,u.put(n,c,t),a.invoke(["Translation",function(n){n.loadTranslations(c).then(function(){g.resolve(),r.$broadcast("LocalizationLanguageChange")}).catch(function(){g.reject()})}]),g.promise):c},defaultLanguage:function(){return e}}}]});
  23. "use strict";angular.module("threepio").factory("TemplateCache",["$cacheFactory",function(e){return e("templatecache")}]);
  24. "use strict";angular.module("threepio").factory("ThreepioLib",["$window","$interpolate",function(e,r){var i=e.Threepio,o=i?e.Threepio.Lib:require("Threepio.Lib");return new o(document,{startExpr:r.startSymbol(),endExpr:r.endSymbol(),missing:!0})}]);
  25. "use strict";angular.module("threepio").provider("Translation",["$provide",function(n){var e;this.setTranslationsRequest=function(n){e=n},this.translateRootElement=function(){var e=!1;n.decorator("$compile",["$delegate","ThreepioLib",function(n,t){function a(n){var a=function(){if(!e){e=!0;var a=arguments[0][0];t.prepare(a)}return n.apply(this,arguments)};for(var r in n)n.hasOwnProperty(r)&&(a[r]=n[r]);return a}var r=a(n);return r}])},n.decorator("$templateRequest",["$delegate","$q","ThreepioLib","TemplateCache",function(n,e,t,a){return function(r,o){var i=a.get(r);return i?e.when(i):n(r,o).then(function(n){t.prepare(n);var e=t.serialize();return a.put(r,e),e})}}]),this.$get=["$document","$rootScope","$q","$injector","ThreepioLib","TranslationsCache","Localization",function(n,t,a,r,o,i,u){function l(n){var t=i.get(n);if(t)return a.when(t);var o={};return o.language=n,r.invoke(e)(n).then(function(e){return i.put(n,e),e})}function s(n){return l(n).then(function(n){return c=n})}var c={},g=!1,p=u.language();p!==u.defaultLanguage()&&s(p).then(function(){t.$broadcast("TranslationLanguageChange")});var f="[i18n-cloak] { display: none !important; }",h=n[0].createElement("style");return h.type="text/css",h.appendChild(n[0].createTextNode(f)),n[0].head.appendChild(h),t.$on("LocalizationLanguageChange",function(){var n=u.language();n!==u.defaultLanguage()?s(n).then(function(){t.$broadcast("TranslationLanguageChange")}):t.$broadcast("TranslationLanguageChange")}),{translations:c,translate:function(n){var e=u.language();e!==u.defaultLanguage()?(g=!0,o.process(n,function(n,e){var t=c.translations[n.getId()]?c.translations[n.getId()]:null;t||(t=n.text),e(t)})):g&&o.process(n,function(n,e){e(n.text)})},loadTranslations:function(n){return n!==u.defaultLanguage()?s(n):a.when()},annotateTemplate:function(n){return o.prepare(n),o.serialize()}}}]}]);
  26. "use strict";angular.module("threepio").factory("TranslationsCache",["$cacheFactory",function(a){return a("translationscache")}]);
  27. !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),(t.Threepio||(t.Threepio={})).Lib=e()}}(function(){var e;return function t(e,n,i){function r(o,a){if(!n[o]){if(!e[o]){var p="function"==typeof require&&require;if(!a&&p)return p(o,!0);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var l=n[o]={exports:{}};e[o][0].call(l.exports,function(t){var n=e[o][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t){var n=e("blueimp-md5").md5,i=function(e){for(var t in e)this[t]=e[t]};i.prototype={getId:function(){if(!this.id){var e=this.context?this.text+"|"+this.context:this.text;this.id=n(e)}return this.id},addContext:function(e){var t=/^\[([^\]]*)\][ ]?(.*)$/.exec(e);t&&t.length>1?(this.meaning=t[1],3===t.length&&t[2].length&&(this.comment=t[2])):e&&e.length&&(this.comment=e)}},t.exports=i},{"blueimp-md5":3}],2:[function(e,t){function n(e,t){for(var i in t)e[i]="object"==typeof t[i]?n(e[i],t[i]):t[i];return e}var i=e("../common/message"),r=1,s=3,o="[",a="]",p=":",h="${",l="}",c="{{",g="}}",f="-notranslate",u="-missing",d="-id",x="-msg",_="-cloak",m="\\s\\/\\\\+\\*\\(\\)\\[\\]\\\"\\`\\'\\-\\$,=&@#%:;",E=function(e,t,n){this.el=e,this.nodes=t,this.index=n},b=function(e,t){this._document=e,this._options=n({startExpr:"{{",endExpr:"}}",tagPrefix:"i18n",maxNesting:3,attributes:{abbr:!0,alt:!0,label:!0,prompt:!0,standby:!0,summary:!0,title:!0,placeholder:!0},missing:!1},t)};b.prototype={_hasText:function(e){var t=new RegExp("[^"+m+"]+");return e.nodeValue&&t.test(e.nodeValue)},_hasTranslatableChild:function(e){if(e.hasChildNodes())for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if(this._isTranslatableNode(n))return!0}return!1},_isTranslatableNode:function(e){return e.nodeType!==s||!this._hasText(e)||e.parentNode&&(e.parentNode.hasAttribute(this._options.tagPrefix+f)||"STYLE"===e.parentNode.nodeName||"SVG"===e.parentNode.nodeName||"SCRIPT"===e.parentNode.nodeName||"NOSCRIPT"===e.parentNode.nodeName)?!1:!0},_isTranslatableMessage:function(e){var t=new RegExp("^(?:["+m+"]*"+h.replace("$","\\$")+"[^"+l+"]*"+l+"["+m+"]*|["+m+"(?:"+o+"\\d"+p+")])+$");return e.text&&!e.text.match(t)},_decodeMsg:function(e){for(var t=[],n=[],i=0,r=0,s=0;r<e.length;){if(e[r]===o&&(2>r||"\\"!==e[r-1]&&"\\"!==e[r-1])){if(n.length+1>this._options.maxNesting)throw new Error('Invalid message "'+e+'": max nesting level ('+this._options.maxNesting+") reached");if(i!==r&&t.push(e.slice(i,r)),r++,!e[r].match(/[0-9]/))throw new Error('Invalid message "'+e+'": missing index after nesting marker');for(var h=r;e[r].match(/[0-9]/);)if(r++,r>=e.length)throw new Error('Invalid message "'+e+'": unterminated nested block');if(e[r]!==p)throw new Error('Invalid message "'+e+'": missing column in nesting block');s=parseInt(e.slice(h,r),10)-1,i=r+1;var l={};l[s]=[],t.push(l),n.push(t),t=t[t.length-1][s]}else if(e[r]===a&&(0===r||"\\"!==e[r-1])){if(n.length<1)throw new Error('Invalid message "'+e+'": negative nesting level');t.push(e.slice(i,r)),i=r+1,t=n.pop()}r++}if(0!==n.length)throw new Error('Invalid message "'+e+'": unbalanced nested blocks');return i<e.length&&t.push(e.slice(i)),t},_replace:function(e,t,n,i){function r(e,t){for(var n=0;n<e.length;n++)if(e[n]instanceof E&&e[n].index===t)return e[n];throw new Error("Invalid block index ("+(t+1)+') in "'+i+'": no element matches that position')}for(var s=[],o=[],a=[],p=0;t[p]||s.length||n[p];)if("object"==typeof t[p]){!n[p]||n[p]instanceof E||(e.removeChild(n[p]),n.splice(p,1));var h=parseInt(Object.keys(t[p])[0]),l=r(n,h);e=e.insertBefore(l.el,n[p]instanceof E?n[p].el:n[p]),n.splice(p,0,n.splice(n.indexOf(l),1)[0]),s.push(t),o.push(n),a.push(p),t=t[p][h],n=l.nodes,p=0}else if(t[p]){var c,g=this._decodeExpressions(t[p]);n[p]?n[p]instanceof E?(c=e.insertBefore(this._document.createTextNode(g),n[p].el),n.splice(p,0,c)):c=n[p]:c=e.appendChild(this._document.createTextNode(g));var f,u=0===p&&0===s.length,d=p===t.length-1&&0===s.length;u&&d?f=/[^\s](\s*[^\s])*/:u?f=/[^\s](.*)/:d&&(f=/(\s*[^\s])*/),c.nodeValue=f?c.nodeValue.replace(f,g):g,p++}else if(n[p])for(var x=p;x<n.length;x++){if(n[x]instanceof E)throw new Error('Nested block "'+n[x].el.outerHTML+'" missing from translation');e.removeChild(n[p]),p++}else t=s.pop(),n=o.pop(),p=a.pop()+1,e=e.parentNode},_escapeRegExp:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},_encodeExpressions:function(e){return h!==this._options.startExpr&&(e=e.replace(new RegExp(this._escapeRegExp(this._options.startExpr.replace(new RegExp(h,"g"),"\\"+h)),"g"),"zih6PmMtGHv9KQ"),c!==this._options.startExpr&&(e=e.replace(new RegExp(this._escapeRegExp(c.replace(new RegExp(h,"g"),"\\"+h)),"g"),"zih6PmMtGHv9KQ")),e=e.replace(new RegExp(this._escapeRegExp(h),"g"),"\\"+h).replace(new RegExp("zih6PmMtGHv9KQ","g"),h)),l!==this._options.endExpr&&(e=e.replace(new RegExp(this._escapeRegExp(l),"g"),"\\"+l).replace(new RegExp(this._escapeRegExp(this._options.endExpr.replace(new RegExp(l,"g"),"\\"+l)),"g"),l),g!==this._options.endExpr&&(e=e.replace(new RegExp(this._escapeRegExp(g.replace(new RegExp(l,"g"),"\\"+l)),"g"),l))),e.replace(new RegExp(this._escapeRegExp(o),"g"),"\\"+o).replace(new RegExp(this._escapeRegExp(a),"g"),"\\"+a)},_decodeExpressions:function(e){return h!==this._options.startExpr&&(e=e.replace(new RegExp("^"+this._escapeRegExp(h),"g"),this._options.startExpr).replace(new RegExp("([^\\\\])("+this._escapeRegExp(h)+")","g"),"$1"+this._options.startExpr).replace(new RegExp("\\"+this._escapeRegExp(h),"g"),h)),l!==this._options.endExpr&&(e=e.replace(new RegExp("^"+this._escapeRegExp(l),"g"),this._options.endExpr).replace(new RegExp("([^\\\\])("+this._escapeRegExp(l)+")","g"),"$1"+this._options.endExpr).replace(new RegExp("\\"+this._escapeRegExp(l),"g"),l)),e.replace(new RegExp("\\\\"+this._escapeRegExp(o),"g"),o).replace(new RegExp("\\\\"+this._escapeRegExp(a),"g"),a)},_checkExpressions:function(e,t){var n=new RegExp(this._escapeRegExp(h)+"(.(?!"+this._escapeRegExp(l)+"))*."+this._escapeRegExp(l),"g"),i=e.match(n),r=t.match(n);if(i||!i&&r){if(i&&!r||i.length>r.length)throw new Error('Missing interpolated expression(s) in the translated message "'+t+'"');if(i.length<r.length)throw new Error('Extra interpolated expression(s) in the translated message "'+t+'"');r.forEach(function(e){if(i.indexOf(e)<0)throw new Error('Expression "'+e+'" in translated message "'+t+'" is different from its original value')})}},_processAttributes:function(e,t){function n(t,n){return function(i){i?(this._checkExpressions(n.text,i),e.setAttribute(t,this._decodeExpressions(i))):this._options.missing&&e.setAttribute(this._options.tagPrefix+"-"+t+u,n.text)}}function r(t,n){return function(i){e.setAttribute(this._options.tagPrefix+"-"+t+d,i),e.setAttribute(this._options.tagPrefix+"-"+t+x,n.text),e.hasAttribute(this._options.tagPrefix+d)||(e.setAttribute(this._options.tagPrefix+d,""),e.setAttribute(this._options.tagPrefix+_,""))}}for(var s=0;s<e.attributes.length;s++){var o=e.attributes[s].name,a=e.getAttribute(o);if(a&&!e.hasAttribute(this._options.tagPrefix+"-"+o+f)){var p=this._options.tagPrefix+"-"+o,h=this._options.attributes;if(h[o]&&"function"==typeof h[o])(new h[o]).process(e,t);else if(h[o]||e.hasAttribute(p)){var l=new i({text:this._encodeExpressions(a)});if(l.addContext(e.getAttribute(p)),this._isTranslatableMessage(l)){var c=this._options.tagPrefix+"-"+o+d,g=this._options.tagPrefix+"-"+o+x;e.hasAttribute(c)&&e.hasAttribute(g)&&(l.id=e.getAttribute(c),l.text=e.getAttribute(g)),t(l,n(o,l).bind(this),r(o,l).bind(this))}}}}},_processNode:function(e,t){for(var n=e.childNodes[0],h=n,l=new i,c=0,g=0,f=[],m=[],b=[];h;){var v=h;if(h.nodeType===s){if(this._isTranslatableNode(h)){if(h.parentNode&&h.parentNode.hasAttribute(this._options.tagPrefix)&&!h.parentNode.getAttribute(this._options.tagPrefix))throw new Error("Unnecessary "+this._options.tagPrefix+' marker in "'+h.parentNode.innerHTML.trim()+'"\nText Node are automatically marked for translation');var w=this._encodeExpressions(h.nodeValue).replace(/(^\s+|\n\s+|\s+$)/g," ");l.text=l.text?l.text+w:w,l.addContext(e.getAttribute(this._options.tagPrefix)),m.push(h)}h=h.nextSibling}else if(h.nodeType===r){if(this._processAttributes(h,t),h.hasAttribute(this._options.tagPrefix)&&!this._hasTranslatableChild(h))throw new Error("Invalid "+this._options.tagPrefix+" marker on an empty Element Node "+h.innerHTML.trim());if(0!==m.length||this._hasTranslatableChild(h)){var R=o+(g+1)+p;if(l.text=l.text?l.text+R:R,m.push(new E(h,[],g)),g+=1,this._hasTranslatableChild(h)){if(b.push(m),m=m[m.length-1].nodes,f.push(g),g=0,c++,c>this._options.maxNesting)throw new Error("Maximum nesting level ("+this._options.maxNesting+') reached when processing "'+h.innerHTML.trim()+'"');h=h.childNodes[0]}else l.text+=a,h=h.nextSibling}else h=h.nextSibling}else h=h.nextSibling;if(!h)for(var N=v.parentNode;!h&&N!==n.parentNode;)l.text+=a,l.text=l.text.replace(/\[\d+:\]$/,""),m=b.pop(),g=f.pop(g),c--,h=N.nextSibling,h||(N=N.parentNode)}for(;l.text.match(/\[\d+:\]$/);)l.text=l.text.replace(/\[\d+:\]$/,"");if(this._isTranslatableMessage(l)){l.text=l.text.trim();var A=this._options.tagPrefix+d,T=this._options.tagPrefix+x;for(e.getAttribute(A)&&e.getAttribute(T)&&(l.id=e.getAttribute(A),l.text=e.getAttribute(T));m.length&&m[m.length-1].el&&!this._hasTranslatableChild(m[m.length-1].el);)m.pop();t(l,function(t){t?(this._checkExpressions(l.text,t),this._replace(e,this._decodeMsg(t),m,l.text)):this._options.missing&&e.setAttribute(this._options.tagPrefix+u,l.text)}.bind(this),function(t){e.setAttribute(A,t),e.setAttribute(T,l.text),e.setAttribute(this._options.tagPrefix+_,"")}.bind(this))}},_traverseTree:function(e,t){for(var n=e;n;){var i=n;if(n.nodeType===r&&this._processAttributes(n,t),this._hasTranslatableChild(n)?(this._processNode(n,t),n=n.nextSibling):n=n.childNodes&&n.childNodes.length?n.childNodes[0]:n.nextSibling,!n)for(;!n&&i!==e;)n=i.parentNode.nextSibling,i=i.parentNode;if(n&&n.previousSibling===e)break}},process:function(e,t){if("string"==typeof e)if(this._isFragment=!/<html[^>]*>/.test(e),this._isFragment){var n=this._document.createDocumentFragment();this._rootEl=n.appendChild(this._document.createElement("div")),this._rootEl.innerHTML=e}else this._document.write(e),this._rootEl=this._document.documentElement;else this._rootEl=e;this._traverseTree(this._rootEl,t)},prepare:function(e){this.process(e,function(e,t,n){n(e.getId())})},serialize:function(e){return this._isFragment?this._rootEl.innerHTML:e(this._document)}},t.exports=b},{"../common/message":1}],3:[function(){!function(t){"use strict";function n(e,t){var n=(65535&e)+(65535&t),i=(e>>16)+(t>>16)+(n>>16);return i<<16|65535&n}function i(e,t){return e<<t|e>>>32-t}function r(e,t,r,s,o,a){return n(i(n(n(t,e),n(s,a)),o),r)}function s(e,t,n,i,s,o,a){return r(t&n|~t&i,e,t,s,o,a)}function o(e,t,n,i,s,o,a){return r(t&i|n&~i,e,t,s,o,a)}function a(e,t,n,i,s,o,a){return r(t^n^i,e,t,s,o,a)}function p(e,t,n,i,s,o,a){return r(n^(t|~i),e,t,s,o,a)}function h(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var i,r,h,l,c,g=1732584193,f=-271733879,u=-1732584194,d=271733878;for(i=0;i<e.length;i+=16)r=g,h=f,l=u,c=d,g=s(g,f,u,d,e[i],7,-680876936),d=s(d,g,f,u,e[i+1],12,-389564586),u=s(u,d,g,f,e[i+2],17,606105819),f=s(f,u,d,g,e[i+3],22,-1044525330),g=s(g,f,u,d,e[i+4],7,-176418897),d=s(d,g,f,u,e[i+5],12,1200080426),u=s(u,d,g,f,e[i+6],17,-1473231341),f=s(f,u,d,g,e[i+7],22,-45705983),g=s(g,f,u,d,e[i+8],7,1770035416),d=s(d,g,f,u,e[i+9],12,-1958414417),u=s(u,d,g,f,e[i+10],17,-42063),f=s(f,u,d,g,e[i+11],22,-1990404162),g=s(g,f,u,d,e[i+12],7,1804603682),d=s(d,g,f,u,e[i+13],12,-40341101),u=s(u,d,g,f,e[i+14],17,-1502002290),f=s(f,u,d,g,e[i+15],22,1236535329),g=o(g,f,u,d,e[i+1],5,-165796510),d=o(d,g,f,u,e[i+6],9,-1069501632),u=o(u,d,g,f,e[i+11],14,643717713),f=o(f,u,d,g,e[i],20,-373897302),g=o(g,f,u,d,e[i+5],5,-701558691),d=o(d,g,f,u,e[i+10],9,38016083),u=o(u,d,g,f,e[i+15],14,-660478335),f=o(f,u,d,g,e[i+4],20,-405537848),g=o(g,f,u,d,e[i+9],5,568446438),d=o(d,g,f,u,e[i+14],9,-1019803690),u=o(u,d,g,f,e[i+3],14,-187363961),f=o(f,u,d,g,e[i+8],20,1163531501),g=o(g,f,u,d,e[i+13],5,-1444681467),d=o(d,g,f,u,e[i+2],9,-51403784),u=o(u,d,g,f,e[i+7],14,1735328473),f=o(f,u,d,g,e[i+12],20,-1926607734),g=a(g,f,u,d,e[i+5],4,-378558),d=a(d,g,f,u,e[i+8],11,-2022574463),u=a(u,d,g,f,e[i+11],16,1839030562),f=a(f,u,d,g,e[i+14],23,-35309556),g=a(g,f,u,d,e[i+1],4,-1530992060),d=a(d,g,f,u,e[i+4],11,1272893353),u=a(u,d,g,f,e[i+7],16,-155497632),f=a(f,u,d,g,e[i+10],23,-1094730640),g=a(g,f,u,d,e[i+13],4,681279174),d=a(d,g,f,u,e[i],11,-358537222),u=a(u,d,g,f,e[i+3],16,-722521979),f=a(f,u,d,g,e[i+6],23,76029189),g=a(g,f,u,d,e[i+9],4,-640364487),d=a(d,g,f,u,e[i+12],11,-421815835),u=a(u,d,g,f,e[i+15],16,530742520),f=a(f,u,d,g,e[i+2],23,-995338651),g=p(g,f,u,d,e[i],6,-198630844),d=p(d,g,f,u,e[i+7],10,1126891415),u=p(u,d,g,f,e[i+14],15,-1416354905),f=p(f,u,d,g,e[i+5],21,-57434055),g=p(g,f,u,d,e[i+12],6,1700485571),d=p(d,g,f,u,e[i+3],10,-1894986606),u=p(u,d,g,f,e[i+10],15,-1051523),f=p(f,u,d,g,e[i+1],21,-2054922799),g=p(g,f,u,d,e[i+8],6,1873313359),d=p(d,g,f,u,e[i+15],10,-30611744),u=p(u,d,g,f,e[i+6],15,-1560198380),f=p(f,u,d,g,e[i+13],21,1309151649),g=p(g,f,u,d,e[i+4],6,-145523070),d=p(d,g,f,u,e[i+11],10,-1120210379),u=p(u,d,g,f,e[i+2],15,718787259),f=p(f,u,d,g,e[i+9],21,-343485551),g=n(g,r),f=n(f,h),u=n(u,l),d=n(d,c);return[g,f,u,d]}function l(e){var t,n="";for(t=0;t<32*e.length;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function c(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;for(t=0;t<8*e.length;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function g(e){return l(h(c(e),8*e.length))}function f(e,t){var n,i,r=c(e),s=[],o=[];for(s[15]=o[15]=void 0,r.length>16&&(r=h(r,8*e.length)),n=0;16>n;n+=1)s[n]=909522486^r[n],o[n]=1549556828^r[n];return i=h(s.concat(c(t)),512+8*t.length),l(h(o.concat(i),640))}function u(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),r+=i.charAt(t>>>4&15)+i.charAt(15&t);return r}function d(e){return unescape(encodeURIComponent(e))}function x(e){return g(d(e))}function _(e){return u(x(e))}function m(e,t){return f(d(e),d(t))}function E(e,t){return u(m(e,t))}function b(e,t,n){return t?n?m(t,e):E(t,e):n?x(e):_(e)}"function"==typeof e&&e.amd?e(function(){return b}):t.md5=b}(this)},{}]},{},[2])(2)});
  28. !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self);var n=r;n=n.Threepio||(n.Threepio={}),n=n.Plugins||(n.Plugins={}),n.ngPluralize=e()}}(function(){return function e(r,n,t){function o(f,u){if(!n[f]){if(!r[f]){var p="function"==typeof require&&require;if(!u&&p)return p(f,!0);if(i)return i(f,!0);var s=new Error("Cannot find module '"+f+"'");throw s.code="MODULE_NOT_FOUND",s}var a=n[f]={exports:{}};r[f][0].call(a.exports,function(e){var n=r[f][1][e];return o(n?n:e)},a,a.exports,e,r,n,t)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(e,r){"use strict";function n(){}n.prototype.replace=function(e,r,n){n&&(Array.isArray(n)?(e[r]=n[0],e.other=n[1]):e[r]=n)},n.prototype.process=function(e,r){function n(e){return function(r){t.replace(i,e,r)}}var t=this,o=[];if("NG-PLURALIZE"===e.nodeName){var i=new Function("return"+e.getAttribute("when"))();for(var f in i){var u={};"one"===f?(u.string=i[f],i.other&&(u.plural=i.other)):"other"!==f&&(u.string=i[f]),o.push(),r(u,n(f))}r&&e.setAttribute("when",JSON.stringify(i))}},r.exports=n},{}]},{},[1])(1)});
  29. "use strict";angular.module("flAnalytics",["configs","flCookies"]).factory("Analytics",["$window","CookieStore",function(e,t){return{trackAction:function(t,n,r){e.dataLayer.push({event:"app_action",eventCategory:t,eventAction:n,eventResult:r})},trackEvent:function(t,n,r,a,o,c){e.dataLayer.push({event:"user_action",eventSection:t,eventSubsection:n,eventName:r,eventAction:a,eventValue:o,eventLabel:c})},trackAjaxTiming:function(t,n,r,a,o){e.dataLayer.push({event:"ajax_timing",ajaxMethod:t,ajaxUrl:n,ajaxStatus:r,ajaxValue:a,ajaxLabel:o})},trackError:function(t,n,r,a){e.dataLayer.push({event:"app_error",eventCategory:t,eventAction:n,eventResult:r,eventLabel:a?JSON.stringify(a):void 0})},trackABTest:function(t,n){e.dataLayer.push({event:"abtest",testName:t,testVariation:n})},getAFPROHeader:function(){var e=t.get("GETAFREE_AFPRO"),n=t.get("GETAFREE_AFPRO_ID"),r=t.get("GETAFREE_AFPRO_SESS");return e&&n&&r?"afpro="+encodeURIComponent(e)+";afpro_id="+encodeURIComponent(n)+";afro_sess="+encodeURIComponent(r):void 0},getTrackingHeader:function(){var e=t.get("_tracking_session");return e?encodeURIComponent(e):void 0},getTTREFHeader:function(){var e=t.get("GETAFREE_TTREF");return e?e:void 0}}}]).factory("AjaxTimingInterceptor",["$q","Analytics","API_BASE_URL","AUTH_BASE_URL","GAF_BASE_URL",function(e,t,n,r,a){var o={},c=function(e){var c,i=(new Date).getTime(),u=i-o[e.config.url].shift(),s=e.config.url;s.match(/^\/views\//)?c="HTML_PARTIAL":s.match(/^\/data\//)?c="JSON_DATA":0===s.indexOf(n)?c="REST_API":0===s.indexOf(r)?c="AUTH":0===s.indexOf(a)&&(c="GAF"),t.trackAjaxTiming(e.config.method,e.config.url,e.status,u,c),0===o[e.config.url].length&&delete o[e.config.url]};return{request:function(e){return o[e.url]||(o[e.url]=[]),o[e.url].push((new Date).getTime()),e},response:function(e){return c(e),e},responseError:function(t){return c(t),e.reject(t)}}}]).factory("AFPROInterceptor",["API_BASE_URL","Analytics",function(e,t){return{request:function(n){return n.url.match(e+"/users/0.1/users/")&&(n.headers["Freelancer-AFPRO"]=t.getAFPROHeader()),n}}}]).factory("TrackingInterceptor",["API_BASE_URL","Analytics",function(e,t){return{request:function(n){return n.url.match(e)&&(n.headers["Freelancer-Tracking"]=t.getTrackingHeader()),n}}}]).factory("TTREFInterceptor",["API_BASE_URL","Analytics",function(e,t){return{request:function(n){return n.url.match(e+"/projects/0.1/projects/")&&"POST"===n.method&&(n.headers["Freelancer-TTREF"]=t.getTTREFHeader()),n}}}]).config(["$httpProvider",function(e){e.interceptors.push("AjaxTimingInterceptor"),e.interceptors.push("AFPROInterceptor"),e.interceptors.push("TrackingInterceptor"),e.interceptors.push("TTREFInterceptor")}]).run(["$window",function(e){var t=encodeURIComponent(e.navigator.userAgent).replace(/%20/g," ").replace(/%2F/g,"/").replace(/%3B/g,";").replace(/%2C/g,",");e.dataLayer.push({event:"user_agent",uaString:t})}]);
  30. "use strict";angular.module("flAnalytics").directive("flAnalyticsSection",function(){return{controller:["$attrs",function(t){this.section=t.flAnalyticsSection}]}}).directive("flAnalyticsSubsection",function(){return{controller:["$attrs",function(t){this.subsection=t.flAnalyticsSubsection}]}}).directive("flAnalytics",["$parse","$log","Analytics",function(t,n,i){function e(t){return-1!==["button","submit"].indexOf(t.type)?"click":-1!==["select","input","textarea"].indexOf(t.tagName.toLowerCase())?"change":t.isContentEditable?"blur":"click"}return{require:["^flAnalyticsSection","?^flAnalyticsSubsection"],restrict:"A",scope:!1,link:function(c,l,s,o){var a=s.flAnalytics,r=o[0].section,u=o[1]?o[1].subsection:void 0;if(a&&r){var f=e(l[0]);l.on(f,function(n){var e=n.target,l=t(s.flAnalyticsValue)(c),o=s.flAnalyticsAction?s.flAnalyticsAction:f,A=s.flAnalyticsLabel;A||e.isContentEditable||(A=e.value&&e.options?e.options[e.selectedIndex].text:e.textContent.trim()),i.trackEvent(r,u,a,o,l,A)})}else n.warn("invalid event name or section")}}}]);
  31. "use strict";angular.module("flApi",["ngResource","configs","flAuth","flAnalytics","flCdn","flNotifications","flOnlineOffline"]);
  32. "use strict";angular.module("flApi").factory("AlertBoxStatus",["$q","FlResource","GafInterceptor","GAF_BASE_URL",function(e,t,r,n){var o=t(n+"/ajax/alerts/get_status.php",r,null,{close:{method:"POST",url:n+"/ajax/alertbox_dont_show_next_time.php"}});return{alertBoxStatusFactory:function(t){return{get:function(){return t},close:function(){if(t.hidden)return e.when();t.hidden=!0;var r={event:t.eventName,event_id:t.eventId};return t.otherUserId&&(r.otherparty_user_id=t.otherUserId),o.close(r).$promise.then(function(){t.hidden=!0})},shouldShow:function(){return!t.hidden}}},get:function(e,t,r){var n={event:e,event_id:t,other_party_id:r},u=this;return o.get(n).$promise.then(function(n){return angular.extend(n.result,{eventName:e,eventId:t,otherUserId:r}),u.alertBoxStatusFactory(n.result)})}}}]);
  33. "use strict";angular.module("flApi").factory("bidFactory",["$rootScope","$q","Users","Auth","Milestones","MilestoneRequests","Notifications",function(t,e,i,n,d,s,a){return a.listen("notifications","accepted"),a.listen("notifications","award"),a.listen("notifications","denyed"),a.listen("notifications","revoked"),a.listen("notifications","sponsor_bid"),a.listen("notifications","editAwardedBidRequest"),function(a,o){var r=this,c=a,u=o,f={get:function(){return c},set:function(t){angular.extend(c,t)},setShortlisted:function(t){return c.shortlisted=t,c.hidden=!1,r.shortlist(c.id,c.project_id,c.shortlisted)},setHidden:function(t){return c.hidden=t,c.shortlisted=!1,r.hide(c.id,c.project_id,c.hidden)},getBidderDetails:function(){return i.userFactory(u)},isProjectOwner:function(){return n.getUserId()===c.project_owner_id},isAwarded:function(){return"awarded"===c.award_status},isRevoked:function(){return"revoked"===c.award_status},isPending:function(){return"pending"===c.award_status},canBeAwarded:function(){return!this.isAwarded()&&!this.isPending()&&this.isProjectOwner()},canBeAccepted:function(){return!this.isAwarded()&&!this.isRevoked()&&this.isPending()&&!this.isProjectOwner()},canRequestMilestone:function(){return this.isAwarded()&&"fully_paid"!==c.paid_status&&!this.isProjectOwner()},canCreateMilestone:function(){return(this.isAwarded()||this.isPending())&&"fully_paid"!==c.paid_status&&this.isProjectOwner()},canReHire:function(){return this.isProjectOwner()&&"fully_paid"===c.paid_status},getInitialMilestoneAmount:function(){return parseInt(c.amount*(c.milestone_percentage/100),10)},getMilestones:function(){return d.getForBid(c.id)},getMilestoneRequests:function(){return s.getMilestoneRequestsForBid(c.id)},award:function(){return f.canBeAwarded()?r.award(c.id):e.reject()},accept:function(){return f.canBeAccepted()?r.accept(c.id):e.reject()},reject:function(){return f.canBeAccepted()?r.reject(c.id):e.reject()}};return t.$on("notifications:award",function(e,i){c.id===i.data.bid.bidId&&(c.award_status="pending",t.$apply())}),t.$on("notifications:accepted",function(e,i){c.id===i.data.bid.id&&(c.award_status="awarded",t.$broadcast("selectedBids.update",c.id),t.$apply())}),t.$on("notifications:denyed",function(e,i){c.id===i.data.bidId&&(c.award_status="rejected",t.$broadcast("selectedBids.update",c.id),t.$apply())}),t.$on("notifications:revoked",function(e,i){c.id===i.data.apiMessage.bid.id&&(c.award_status="revoked",t.$broadcast("selectedBids.update",c.id),t.$apply())}),t.$on("notifications:sponsor_bid",function(e,i){c.id===parseInt(i.data.object.bid.id)&&(c.sponsored=1,t.$apply())}),t.$on("notifications:editAwardedBidRequest",function(e,i){if(c.id===i.data.bid.id){var n=i.data.editBidDetails;c.editRequestDetails={comment:n.comment,newAmount:n.newAmount,newPeriod:n.newPeriod,oldAmount:n.oldAmount,oldPeriod:n.oldPeriod,status:n.status},t.$broadcast("project.changeBid"),t.$apply()}}),f}}]);
  34. "use strict";angular.module("flApi").factory("bidListFactory",["$rootScope","$q","Notifications","Users","RequestTransformation","FlResource","ApiInterceptor","GafInterceptor","API_BASE_URL","GAF_BASE_URL",function(e,r,t,i,n,d,a,o,s,u){var c=d(s+"/projects/0.1/bids/:bidId/",a,null,{getExtraInfo:{method:"GET",url:u+"/ajax/buyer/pvp_selection_extra_info.php",interceptor:o}});return t.listen("notifications","bidretracted"),t.listen("notifications","bid_updated"),function(t,d){var a,o=this,s=t,u=d||{},f={addBid:function(e){return angular.isUndefined(this.getById(e.id))?(s.push(e),!0):!1},addUser:function(e){return u[e.id]=e,!0},removeBid:function(e){for(var r=0;r<s.length;r++)if(s[r].id===e)return delete u[s[r].bidder_id],s.splice(r,1),!0;return!1},editBid:function(e){for(var r=0;r<s.length;r++)if(s[r].id===e.id)return s[r]=e,!0;return!1},getList:function(){return s},getUsers:function(){return u},getBids:function(){for(var e={},r=0;r<s.length;r++)e[s[r].id]=o.bidFactory(s[r],u[s[r].bidder_id]);return e},getBidsList:function(){for(var e=[],r=0;r<s.length;r++)e.push(o.bidFactory(s[r],u[s[r].bidder_id]));return e},getSelectedBids:function(){for(var e={},r=0;r<s.length;r++)-1===["pending","awarded","rejected"].indexOf(s[r].award_status)||s[r].is_dismissed||(e[s[r].id]=o.bidFactory(s[r],u[s[r].bidder_id]));return e},getSelectedBidArray:function(){for(var e=[],r=0;r<s.length;r++)-1===["pending","awarded","rejected"].indexOf(s[r].award_status)||s[r].is_dismissed||e.push(s[r]);return e},getUnselectedBidArray:function(){for(var e=[],r=0;r<s.length;r++)-1===["pending","awarded","rejected"].indexOf(s[r].award_status)&&e.push(o.bidFactory(s[r],u[s[r].bidder_id]));return e},getAverage:function(){for(var e=0,r=0;r<s.length;r++)e+=s[r].amount;var t=0===e?0:Math.round(e/s.length);return t},getPendingBidder:function(){for(var e=0;e<s.length;e++)if("pending"===s[e].award_status)return i.userFactory(u[s[e].bidder_id])},getRejectedBidder:function(){for(var e=0;e<s.length;e++)if("rejected"===s[e].award_status)return i.userFactory(u[s[e].bidder_id])},getAwardedBidder:function(){for(var e=0;e<s.length;e++)if("awarded"===s[e].award_status)return i.userFactory(u[s[e].bidder_id])},getBidsByAwardStatus:function(e){for(var r=[],t=0;t<s.length;t++)s[t].award_status===e&&r.push(o.bidFactory(s[t],u[s[t].bidder_id]));return r},getRecommendedBidder:function(){for(var e=0;e<s.length;e++)if(s[e].recommended)return i.userFactory(u[s[e].bidder_id])},getRecommendedBid:function(){for(var e=0;e<s.length;e++)if(s[e].recommended)return o.bidFactory(s[e],u[s[e].bidder_id])},getById:function(e){for(var r=s,t=0;t<r.length;t++)if(r[t].id===e)return o.bidFactory(r[t],u[r[t].bidder_id])},getToken:function(){return a},prepareToken:function(e){a=e},hasBidderRatedHigherThan:function(e){for(var r=0;r<s.length;r++){var t=u[s[r].bidder_id];if(t.reputation.entire_history.overall>=e)return!0}return!1},loadSelectedBidExtraVars:function(e){var t=f.getSelectedBidArray(),i=r.defer();0===t.length&&i.resolve();var n=0;return angular.forEach(t,function(r){c.getExtraInfo({project_id:e,bid_id:r.id}).$promise.then(function(e){"success"===e.status&&(r.is_rated=e.vars.is_rated,r.is_dismissed=e.vars.is_dismissed,r.has_cancel_request=e.vars.has_cancel_request,r.remaining_days=e.vars.remaining_days,r.editRequestDetails=e.vars.editRequestDetails)}).finally(function(){n++,n===t.length&&i.resolve()})}),i.promise},getBidRanges:function(){for(var e={},r=["amount","distance","period"],t=0;t<r.length;t++)e[r[t]]={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};for(var i=0;i<s.length;i++)for(var n=0;n<r.length;n++)e[r[n]].min>s[i][r[n]]&&(e[r[n]].min=s[i][r[n]]),e[r[n]].max<s[i][r[n]]&&(e[r[n]].max=s[i][r[n]]);return e},getUserRanges:function(){for(var e={},r=["rating","review"],t=0;t<r.length;t++)e[r[t]]={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};for(var i=function(e){return{rating:e.reputation.entire_history.overall,review:e.reputation.entire_history.reviews}},n=0;n<s.length;n++){var d=s[n].bidder_id;if(u.hasOwnProperty(d))for(var a=0;a<r.length;a++){var o=Math.round(i(u[d])[r[a]]);e[r[a]].min>o&&(e[r[a]].min=o),e[r[a]].max<o&&(e[r[a]].max=o)}}return e},getUserCountries:function(){for(var e={},r=0;r<s.length;r++){var t=s[r].bidder_id;if(u.hasOwnProperty(t)){var i=u[t].location.country;e.hasOwnProperty(i.code)||(e[i.code]=i)}}return e},getUserBadges:function(){for(var e={},r=0;r<s.length;r++){var t=s[r].bidder_id;if(u.hasOwnProperty(t))for(var i=0;i<u[t].qualifications.length;i++){var n=u[t].qualifications[i];e.hasOwnProperty(n.id)||(e[n.id]=n)}}return e},getInitialMilestoneRange:function(e){for(var r={},t=0;t<s.length;t++){var i=e?s[t].amount*s[t].milestone_percentage/100:s[t].amount*s[t].milestone_percentage;angular.equals(r,{})?r={min:i,max:i}:(r.min>i&&(r.min=i),r.max<i&&(r.max=i))}return r}};return e.$on("notifications:bidretracted",function(r,t){f.removeBid(t.data.bid_id)&&e.$broadcast("bidList.update")}),e.$on("notifications:bid_updated",function(r,t){var i=n.parseBidNotification(t.data);f.editBid(i)&&e.$broadcast("bidList.update")}),f}}]);
  35. "use strict";angular.module("flApi").factory("Bids",["Projects","Auth","FlResource","ApiInterceptor","GafInterceptor","bidFactory","bidListFactory","API_BASE_URL","GAF_BASE_URL",function(e,r,t,i,n,o,d,c,u){var s=t(c+"/projects/0.1/bids/:bidId/",i,null,{update:{method:"PATCH",params:{bidId:"@bidId"}},getForProject:{url:c+"/projects/0.1/projects/:projectId/bids/"},getBidInfo:{url:c+"/projects/0.1/projects/:projectId/bidinfo/"},revoke:{method:"POST",url:u+"/ajax/buyer/pick.php",interceptor:n},edit:{method:"POST",url:u+"/ajax/bid/editbid.php",interceptor:n},end:{method:"POST",url:u+"/ajax/buyer/on-end-project.php",interceptor:n},dismiss:{method:"POST",url:u+"/ajax/buyer/dismiss-rejected-bid.php",interceptor:n},acceptCounterOffer:{method:"POST",url:u+"/ajax/hireme/counteroffer/accept-seller-counter-offer.php",interceptor:n},rejectCounterOffer:{method:"POST",url:u+"/ajax/hireme/counteroffer/reject-seller-counter-offer.php",interceptor:n},acceptChangeBid:{method:"POST",url:u+"/ajax/buyer/edit-bid-respond.php",interceptor:n},rejectChangeBid:{method:"POST",url:u+"/ajax/buyer/edit-bid-respond.php",interceptor:n}});return{bidFactory:o,bidListFactory:d,bidInfoFactory:function(e){var r=e;return{get:function(){return r},getFreelancerFee:function(e){var t=e/(1-r.rate);return t*r.rate>r.minimum_fee?t*r.rate:r.minimum_fee}}},get:function(e){var r=this;return s.get(e).$promise.then(function(e){return r.bidFactory(e)})},getList:function(e){var r=this;return s.get(e).$promise.then(function(e){return r.bidListFactory(e.bids,e.users)})},getListWithUserDetails:function(e,r){var t=this,i=e?e:{};i.user_details=!0;for(var n in r)i["user_"+n]=r[n];return t.getList(i)},getListForProject:function(e,r){var t=this,i=r?r:{};return i.projectId=e,s.getForProject(i).$promise.then(function(e){return t.bidListFactory(e.bids,e.users)})},getListForProjectWithUserDetails:function(e,r,t){var i=this,n=r?r:{};n.projectId=e,n.user_details=!0;for(var o in t)n["user_"+o]=t[o];return s.getForProject(n).$promise.then(function(e){if(angular.isDefined(e.recommended_bid))for(var r=0;r<e.bids.length;r++)if(e.bids[r].id===e.recommended_bid.id){e.bids[r].recommended=!0;break}return i.bidListFactory(e.bids,e.users)}).catch(function(){return i.bidListFactory([],[])})},getBuyerFeeById:function(e,r){var t=r?r:{};return t.bidId=e,t.buyer_project_fee=!0,this.get(t)},getBidInfo:function(e){var r=this;return s.getBidInfo({projectId:e}).$promise.then(function(e){return r.bidInfoFactory(e)})},getBidderProjectsByStatus:function(t,i){var n=i?i:{};return n["bidders[]"]=r.getUserId(),n["frontend_bid_statuses[]"]=t,n.project_details=!0,s.get(n).$promise.then(function(r){var t=[],i={};for(var n in r.projects)t.push(r.projects[n]);return angular.forEach(r.bids,function(e){i[e.project_id]=[e]}),e.projectListFactory(t,r.users,i)})},create:function(e,r,t,i,n,o){return s.save({project_id:e,bidder_id:r,amount:t,period:i,description:n,milestone_percentage:o}).$promise},award:function(e,r,t){return s.update({bidId:e,work_limit:r,billing_cycle:t,action:"award"}).$promise},accept:function(e){return s.update({bidId:e,action:"accept"}).$promise},reject:function(e){return s.update({bidId:e,action:"deny"}).$promise},revoke:function(e){var r={};return r.bidId=e,r.action="revoke",s.update(r).$promise},report:function(e,r,t,i){return s.edit({hide_reason:t,pr_id:r,bid_id:e,url:i}).$promise},shortlist:function(e,r,t){return s.edit({bid_id:e,pr_id:r,action:t?"shortlist":"unshortlist",shortlist:!0}).$promise},hide:function(e,r,t){return s.edit({hide_reason:"not interesting",pr_id:r,bid_id:e,showhidden:t?"0":"1"}).$promise},endProject:function(e,r){return s.end({bid_id:e,action:r}).$promise},dismissRejectedBid:function(e,r){return s.dismiss({bidId:e,csrf_token:r}).$promise},acceptCounterOffer:function(e,r){return s.acceptCounterOffer({bidID:e,acceptSellerCounterOfferToken:r}).$promise},rejectCounterOffer:function(e){return s.rejectCounterOffer({bidID:e}).$promise},acceptChangeBid:function(e){return s.acceptChangeBid({bidID:e,action:"accept"}).$promise},rejectChangeBid:function(e){return s.rejectChangeBid({bidID:e,action:"decline"}).$promise}}}]);
  36. "use strict";angular.module("flApi").factory("Budgets",["FlResource","Currencies","ApiInterceptor","filterFilter","API_BASE_URL",function(r,t,e,n,u){var c=r(u+"/projects/0.1/budgets/",e,null,{get:{cache:!0}});return{budgetListFactory:function(r){var t=r;return{getList:function(){var r=[];return angular.forEach(t,function(t){var e=[];angular.forEach(t,function(r){e.push(r)}),t.id=e.join(),r.push(t)}),r},getByMaximum:function(r,e){if(e.currency_id)for(var n=0;n<t.length;n++)if(t[n].maximum>=r&&t[n].currency_id===e.currency_id)return t[n]},getByIndex:function(r,e){var u=t;return e.currency_id&&(u=n(u,e,!0)),u[r]}}},get:function(r){var t=this;return c.get(r).$promise.then(function(r){return t.budgetListFactory(r.budgets)})},getWithCurrencies:function(r){var e=this;return r.currency_details=!0,c.get(r).$promise.then(function(r){return{budgets:e.budgetListFactory(r.budgets),currencies:t.currencyListFactory(r.currencies)}})}}}]);
  37. "use strict";angular.module("flApi").factory("Categories",["FlResource","Jobs","ApiInterceptor","API_BASE_URL",function(t,r,e,o){var n=t(o+"/projects/0.1/categories/",e,null,{get:{cache:!0}});return{categoryListFactory:function(t){var e=t.categories,o=t.jobs;return{getList:function(){var t=angular.copy(o);return angular.forEach(t,function(t){t.id=parseInt(t.id,10)}),e},getJobs:function(){var t=[];return angular.forEach(o,function(r){t.push.apply(t,r)}),r.jobListFactory(t)},getJobsByCategoryId:function(t){return r.jobListFactory(o[t])}}},getList:function(t){var r=this;return n.get(t).$promise.then(function(t){return r.categoryListFactory(t)})},getListWithJobs:function(t){var r=t?t:{};return r.job_details=!0,this.getList(r)}}}]);
  38. "use strict";angular.module("flApi").factory("ContactRequests",["FlResource","ApiInterceptor","Users","API_BASE_URL",function(t,r,e,n){var u=t(n+"/contacts/0.1/requests/pending_sent/",r);return{sendRequestWithUserId:function(t,r){var e,n,s;return e=r?r:{},s=this,n={"user_ids[]":t},u.save(e,n).$promise.then(function(t){return s.requestResultFactory(t)})},requestFactory:function(t,r){var n=t,u=r;return{get:function(){return n},getUser:function(){return e.userFactory(u)}}},requestListFactory:function(t,r){var e=t,n=r,u=this;return{get:function(){return e},getRequests:function(){var t={};for(var r in e)t[r]=u.requestFactory(e[r],n[r]);return t},getRequestByUserId:function(t){return u.requestFactory(e[t],n[t])}}},requestResultFactory:function(t){var r=t,e=this;return{get:function(){return r},getRequestList:function(){return e.requestListFactory(r.requests,r.users)},getFriendshipList:function(){return e.friendshipListFactory(r.friendships,r.users)}}},friendshipFactory:function(t,r){var n=t,u=r;return{get:function(){return n},getUser:function(){return e.userFactory(u)}}},friendshipListFactory:function(t,r){var e=t,n=r,u=this;return{get:function(){return e},getFriendships:function(){var t={};for(var r in e)t[r]=u.friendshipFactory(e[r],n[r]);return t},getFriendshipByUserId:function(t){return u.friendshipFactory(e[t],n[t])}}}}}]);
  39. "use strict";angular.module("flApi").factory("Contests",["FlResource","GafInterceptor","GAF_BASE_URL","API_BASE_URL","ApiInterceptor",function(t,n,e,r,o){var c=t(r+"/contests/0.1/contests/",o,null,{search:{method:"GET",url:e+"/ajax/search/contests.php",interceptor:n}});return{contestFactory:function(t){var n=t;return{get:function(){return n}}},contestListFactory:function(t,n){var e,r=this;return{getMap:function(){return angular.isUndefined(e)&&(e={},t.forEach(function(t){e[t.id]=t})),e},getList:function(){return t},getById:function(t){var n=this.getMap();return angular.isDefined(n[t])?r.contestFactory(n[t]):void 0},getCount:function(){return t.length},getSearchTotal:function(){return angular.isDefined(n)&&null!==n?n:void 0}}},post:function(t){var n=this,e=t||{};return e.type=e.type||"prepaid",c.save(e).$promise.then(function(t){return n.contestFactory(t)})},search:function(t,n){var e=this,r=n?n:{};return r.keywords=t+"",c.search(n).$promise.then(function(t){return e.contestListFactory(t.results,t.total)})},getById:function(t,n){var e=this,r=n?n:{};return r["contests[]"]=t,c.get(r).$promise.then(function(n){var r=e.contestListFactory(n.contests);return r.getById(t)})}}}]);
  40. "use strict";angular.module("flApi").factory("Currencies",["FlResource","ApiInterceptor","API_BASE_URL",function(r,t,n){var e=r(n+"/projects/0.1/currencies/",t,null,{get:{cache:!0}});return{currencyFactory:function(r){var t=r;return{get:function(){return t}}},currencyListFactory:function(r){var t=r,n=this;return{getMap:function(){return t},getList:function(){var r=[];for(var n in t)r.push(t[n]);return r},getById:function(r){var e=t;for(var c in e)if(e[c].id===r)return n.currencyFactory(e[c])},get:function(r){if(1===Object.keys(r).length){var e=Object.keys(r)[0];for(var c in t)if(t[c][e]===r[e])return n.currencyFactory(t[c])}}}},get:function(r){var t=this;return e.get(r).$promise.then(function(r){return t.currencyListFactory(r.currencies)})}}}]);
  41. "use strict";angular.module("flApi").factory("Files",["$rootScope","BaseUpload","Threads","Messages","FlResource","ApiInterceptor","GafInterceptor","Notifications","API_BASE_URL","GAF_BASE_URL",function(e,t,a,r,i,n,o,s,d,u){s.listen("notifications","uploadFile"),s.listen("messages","attach");var c=i(d+"/projects/0.1/files/",n,null,{fetch:{method:"GET",url:u+"/ajax/project/getProjectFiles.php",interceptor:o},remove:{method:"DELETE",url:u+"/projects/fileshare/uploadFiles.php",interceptor:o}}),f={fileFactory:function(e){return{get:function(){return e}}},fileListFactory:function(t){var r={add:function(a){t.unshift(a),e.$broadcast("files.update")},remove:function(a){var r=t.indexOf(a);r>-1&&(t.splice(r,1),e.$broadcast("files.update"))},get:function(){return this.getList()},getList:function(){return t},getById:function(e){var a=-1;return angular.forEach(t,function(t,r){return t.id===e?(a=r,!1):void 0}),a>-1?t[a]:null}};return e.$on("notifications:uploadFile",function(t,a){var i=a.data,n={id:i.file.id,filename:i.file.name,s3_obj:i.file.s3_obj,thumb_obj:i.file.thumb_obj,submitdate:i.time,sizef:i.file.size,bid_id:i.id,from_user_id:i.accountId,submitdatef:i.file.submitdate};r.add(n),e.$broadcast("selectedBids.update",i.id),e.$broadcast("files.update")}),e.$on("messages:attach",function(t,i){var n=i.data,o="";a.getById(n.thread_id).then(function(t){var a=t.get().thread;"project"===a.context.type&&(o=a.context.id),""!==o&&(angular.forEach(n.filenames,function(e){var t;t=a.members[0]===n.from_user?a.members[1]:a.members[0];var s={filename:e,submitdate:i.timestamp,from_user_id:n.from_user,message_attachment:!0,message_id:n.message_id,project_id:o,to_user_id:t};r.add(s)}),e.$broadcast("files.update"))})}),r},getForProject:function(e,t){return c.fetch({project_id:e}).$promise.then(function(a){var r=f.fileListFactory(a.files);return f.getForThreads(e,r,t),r}).catch(function(){var a=f.fileListFactory([]);return f.getForThreads(e,a,t),a})},getForThreads:function(t,i,n){if(angular.isArray(n)&&n.length>0){var o={};o["threads[]"]=[],o.thread_attachments=!0,angular.forEach(n,function(e){o["threads[]"].push(e.id)}),a.getList(o).then(function(a){var n=a.getList(),o=[],s={};angular.forEach(n,function(e){o=o.concat(e.get().attachments),s[e.get().id]=e.get().thread.members});var d=[];angular.forEach(o,function(e){d.push(e.message_id)});var u={"messages[]":d};0!==d.length&&r.getList(u).then(function(a){angular.forEach(a.get(),function(e){var a;a=s[e.thread_id][0]===e.from_user?s[e.thread_id][1]:s[e.thread_id][0];var r={filename:e.attachments[0].filename,submitdate:e.time_created,from_user_id:e.from_user,message_attachment:!0,message_id:e.id,project_id:t,to_user_id:a};i.add(r)}),e.$broadcast("files.update")})})}},uploadFile:function(e,a){return t.upload({method:"POST",url:"/projects/fileshare/uploadFiles.php?bid_id="+a,data:{files:e}})},removeFile:function(e,t){return c.remove({bid_id:t,file_id:e}).$promise}};return f}]);
  42. "use strict";angular.module("flApi").service("Flnk",["FlResource","GafInterceptor","GAF_BASE_URL",function(e,t,r){var n=e(r+"/ajax/project/flnks/getRelatedProjects.php",t);return{getRelatedProjects:function(e){return n.get({projectId:e}).$promise.then(function(e){return e})}}}]);
  43. "use strict";angular.module("flApi").factory("HourlyContracts",["$rootScope","$q","FlResource","GafInterceptor","Bids","GAF_BASE_URL",function(t,n,e,r,i,o){var c=o+"/ajax/project/hourly/contract.php",a={request:r.request,response:function(t){return n.when(r.response(t)).then(function(t){return t.message})},responseError:function(t){switch(t.status){case 403:t.code="CREDENTIAL_ERROR";break;case 400:t.code="BAD_REQUEST";break;default:t.code="UNKNOWN_ERROR"}return n.reject(t)}},u=e(c,a,null,{get:{method:"GET",params:{bidId:"@bidId"}},save:{method:"POST"}});return{hourlyContractFactory:function(t){return{get:function(){return t},isAllowedToChangeBillingCycle:function(){return i.get({bidId:t.bidID}).then(function(t){return"pending"===t.get().award_status})},getNextBillingCycle:function(){return t.nextBillingCycle?t.nextBillingCycle:!1},hasWeeklyBillingCycle:function(){return"weekly"===t.billingCycle},hasMonthlyBillingCycle:function(){return"monthly"===t.billingCycle},hasDefaultWorkLimit:function(){return t.defaultWorkLimit>0},hasCurrentWorkLimit:function(){return t.currentWorkLimit>0},isTimeTrackingEnabled:function(){return!t.timeTrackingStopped},stopTimeTracking:function(){return u.save({action:"stop-time-tracking",bidId:t.bidID}).$promise.then(function(n){return t=n.contract,n.invoice})},enableTimeTracking:function(){return u.save({action:"enable-time-tracking",bidId:t.bidID}).$promise.then(function(n){t.id=n.id,t.timeTrackingStopped=n.timeTrackingStopped})}}},get:function(t){var n=this;return u.get({bidId:t}).$promise.then(function(t){return n.hourlyContractFactory(t)})},save:function(n,e,r,i){var o=this;return u.save({bidId:n,hourlyRate:e,workLimit:r,billingCycle:i}).$promise.then(function(e){return t.$broadcast("hourlyContract.updated",n),o.hourlyContractFactory(e)})},stopTimeTracking:function(t){var n=this;return u.save({action:"stop-time-tracking",bidId:t}).$promise.then(function(t){return{contract:n.hourlyContractFactory(t.contract),invoice:t.invoice}})},enableTimeTracking:function(t){var n=this;return u.save({action:"enable-time-tracking",bidId:t}).$promise.then(function(t){return n.hourlyContractFactory(t)})}}}]);
  44. "use strict";angular.module("flApi").factory("Invoices",["$rootScope","FlResource","ApiInterceptor","GafInterceptor","Notifications","API_BASE_URL","GAF_BASE_URL",function(e,t,n,i,o,r,c){o.listen("notifications","invoiceRequested"),o.listen("notifications","invoiceWithdrawn");var a=t(r+"/projects/0.1/invoices/",n,null,{fetch:{method:"GET",url:c+"/ajax/project/getProjectInvoices.php",interceptor:i},pay:{method:"POST",url:c+"/ajax/payment/payinvoice.php",interceptor:i},requestChange:{method:"GET",url:c+"/ajax/payment/on-request-invoice-change.php",interceptor:i}}),u={invoiceFactory:function(e){return{get:function(){return e}}},invoiceListFactory:function(t){var n={add:function(n){t.push(n),e.$broadcast("invoices.update")},update:function(n,i){angular.forEach(t,function(e,o){return e.id===n?(t[o]=i,!1):void 0}),e.$broadcast("invoices.update")},remove:function(n){var i=-1;angular.forEach(t,function(e,t){return e.id===n?(i=t,!1):void 0}),i>-1&&t.splice(i,1),e.$broadcast("invoices.update")},get:function(){return this.getList()},getList:function(){return t},getById:function(e){var n=-1;return angular.forEach(t,function(t,i){return t.id===e?(n=i,!1):void 0}),n>-1?t[n]:null}};return e.$on("notifications:invoiceRequested",function(t,i){var o=i.data,r=n.getById(o.invoiceId);r?n.update(o.invoiceId,o.invoiceVars):n.add(o.invoiceVars),e.$broadcast("selectedBids.update",o.bidId)}),e.$on("notifications:invoiceWithdrawn",function(t,i){var o=i.data;n.remove(o.invoiceId),e.$broadcast("selectedBids.update",o.bidId)}),n},getForProject:function(e){return a.fetch({project_id:e}).$promise.then(function(e){return u.invoiceListFactory(e.invoices)}).catch(function(){return u.invoiceListFactory([])})},payInvoice:function(e,t,n,i,o,r){return a.pay({invoiceId:e,invoiceOutstandingAmount:t,directPaymentAmount:n,milestone:i,external:o,token:r}).$promise},requestChangeInvoice:function(e,t,n){return a.requestChange({invoice_id:e,message:t,csrf_token:n}).$promise}};return u}]);
  45. "use strict";angular.module("flApi").factory("JobBundles",["FlResource","ApiInterceptor","API_BASE_URL",function(t,e,n){var r=t(n+"/projects/0.1/job_bundle_categories/",e,null,{get:{cache:!0}}),o=t(n+"/projects/0.1/job_bundles/",e,null,{get:{cache:!0}});return{jobBundleFactory:function(t){var e=t;return{get:function(){return e}}},jobBundleListFactory:function(t){var e=t,n=this;return{getList:function(){return e},getById:function(t){for(var r=0;r<e.length;r++)if(e[r].id===t)return n.jobBundleFactory(e[r])},getBySeoUrl:function(t){for(var r=0;r<e.length;r++){var o=e[r].name.replace(/[^A-Za-z0-9]+/g,"-");if(o===t)return n.jobBundleFactory(e[r])}}}},jobBundleCategoryFactory:function(t){var e=t;return{get:function(){return e}}},jobBundleCategoryListFactory:function(t){var e=t,n=this;return{getList:function(){return e},getById:function(t){for(var r=e,o=0;o<r.length;o++)if(r[o].id===t)return n.jobBundleCategoryFactory(r[o])},getBundles:function(){for(var t=[],r=0;r<e.length;r++)t=t.concat(e[r].job_bundles);return n.jobBundleListFactory(t)},getBundlesForCategory:function(t){for(var r=e,o=0;o<r.length;o++)if(r[o].id===t)return n.jobBundleListFactory(r[o].job_bundles)}}},getBundles:function(t){var e=this;return o.get(t).$promise.then(function(t){return e.jobBundleListFactory(t.job_bundles)})},getCategories:function(t){var e=this;return r.get(t).$promise.then(function(t){return e.jobBundleCategoryListFactory(t.job_bundle_categories)})},getCategoriesWithBundles:function(t){var e=this,n=t?t:{};return n.job_bundle_details=!0,r.get(n).$promise.then(function(t){return e.jobBundleCategoryListFactory(t.job_bundle_categories)})}}}]);
  46. "use strict";angular.module("flApi").factory("Jobs",["FlResource","ApiInterceptor","API_BASE_URL",function(t,r,e){var o=t(e+"/projects/0.1/jobs/",r,null,{get:{cache:!0}});return{jobListFactory:function(t){var r=t,e=this;return{getList:function(){return r},getJobs:function(){for(var t=[],o=0;o<r.length;o++)t.push(e.jobFactory(r[o]));return t},getById:function(t){for(var o=0;o<r.length;o++)if(r[o].id===t)return e.jobFactory(r[o])},getBySeoUrl:function(t){for(var o=0;o<r.length;o++)if(r[o].seo_url.toLowerCase()===t.toLowerCase())return e.jobFactory(r[o])},remove:function(t){if(t)for(var e=0;e<t.length;e++)for(var o=0;o<r.length;o++)if(r[o].id===t[e].id){r.splice(o,1);break}}}},jobFactory:function(t){var r=t;return{get:function(){return r}}},getList:function(t){var r=this;return o.get(t).$promise.then(function(t){return r.jobListFactory(t)})},getJobBySeoUrl:function(t){var r=this,e={seo_details:!0,"seo_urls[]":[t]};return o.get(e).$promise.then(function(e){return r.jobListFactory(e).getBySeoUrl(t)})},getListByJobIds:function(t,r){var e=this,n=r?r:{};return n["jobs[]"]=t,o.get(n).$promise.then(function(t){return e.jobListFactory(t)})}}}]);
  47. "use strict";angular.module("flApi").factory("Messages",["$q","FlResource","ApiInterceptor","Auth","API_BASE_URL",function(e,t,n,r,s){function a(e){e.errors||(e.errors=[]),e.alerts||(e.alerts=[])}function i(e){angular.forEach(e,function(e){a(e)})}var u=s+"/messages/0.1/messages/",c=t(u,n,{},{sendAction:{method:"PUT",url:u}});return{messageListFactory:function(e){var t=this,n=e;return i(e),{get:function(){return n},getMessageById:function(e){var r=null;return angular.forEach(n,function(n){n.id===e&&(r=t.messageFactory(n))}),r},addMessage:function(e){a(e),n.unshift(e)},addFakeMessage:function(e,t,n,s){var a=Date.now(),i=a+String(s);return this.addMessage({client_message_id:i,message:e,attachments:t,thread_id:n,from_user:r.getUserId(),id:null,time_created:Math.round(a/1e3)}),i},getFakeMessages:function(e){var t=[];return angular.forEach(n,function(n){n.client_message_id===e&&t.push(n)}),t},replaceFakeMessage:function(e,t){angular.forEach(this.getFakeMessages(e),function(e){e.client_message_id=null,angular.extend(e,t)})},upsertMessage:function(e){function t(e){for(var t=!1,r=0;r<n.length;r++)if(n[r].id&&e.id>n[r].id){n.splice(r,0,e),t=!0;break}t||n.push(e)}a(e);for(var r=e.client_message_id,s=0;s<n.length;s++){var i=n[s].client_message_id;if(e.id&&e.id===n[s].id||r&&r===i)return angular.extend(n[s],e),void t(n.splice(s,1)[0]);if(n[s].id&&e.id>n[s].id)return void n.splice(s,0,e)}n.push(e)},extendMessages:function(e){for(var t=0;t<e.length;t++)this.upsertMessage(e[t])}}},messageFactory:function(t){var n=this;return a(t),{get:function(){return t},markRead:function(r){return t.is_read?e.when():n.takeAction([t.id],"read",r).then(function(){t.is_read=!0})},addAttachment:function(e){-1===t.attachments.map(function(e){return e.filename}).indexOf(e)&&t.attachments.push({filename:e})},sentByMe:function(){return r.getUserId()===t.from_user}}},takeAction:function(e,t,n){e=Array.isArray(e)?e:[e];var r={messages:e,action:t,source:n};return c.sendAction({},r).$promise},getList:function(e){var t=this;return c.get(e).$promise.then(function(e){return t.messageListFactory(e.messages)})}}}]);
  48. "use strict";angular.module("flApi").factory("MilestoneRequests",["$rootScope","FlResource","ApiInterceptor","GafInterceptor","Milestones","Notifications","API_BASE_URL","GAF_BASE_URL",function(e,t,n,r,i,o,s,u){o.listen("notifications","requestMilestone"),o.listen("notifications","denyed");var c=t(s+"/projects/0.1/milestone_requests/",n,null,{create:{method:"POST",params:{project_id:"@projectId",bid_id:"@bidId",description:"@description",amount:"@amount"}},reject:{method:"POST",url:u+"/ajax/payment/on-reject-milestone-request.php",interceptor:r},update:{method:"POST",url:u+"/ajax/payment/on-request-milestone.php",interceptor:r},createBreakdown:{method:"POST",url:u+"/ajax/payment/onCreateMilestoneBreakdown.php",interceptor:r}}),d={milestoneRequestFactory:function(e){return{get:function(){return e},accept:function(t){return i.acceptRequest(e.bidder_id,e.project_id,e.description,e.id,e.amount,t)}}},milestoneRequestListFactory:function(t){var n={add:function(n,r){t[n]=r,e.$broadcast("milestones.update")},remove:function(n){delete t[n],e.$broadcast("milestones.update")},get:function(){return this.getList()},getPending:function(){var e=[];return angular.forEach(t,function(t){"pending"===t.status&&e.push(t)}),e},getMap:function(){return t},getList:function(){var e=[];return angular.forEach(t,function(t){e.push(t)}),e},getById:function(e){return d.milestoneRequestFactory(t[e])},getByBidderId:function(e){var n=[];return angular.forEach(t,function(t){t.bidder_id===e&&n.push(t)}),n}};return e.$on("notifications:requestMilestone",function(t,r){var i=r.data,o={id:i.currencyId,code:i.currencyCode,sign:i.currencySign},s={amount:i.amount,bid_id:i.bidId,bidder_id:i.sellerId,currency:o,description:i.description,id:i.requestId,project_id:i.id,project_owner_id:i.accountId,status:"pending",time_requested:i.time};s.status="pending",n.add(i.requestId,s),e.$broadcast("selectedBids.update",i.bidId)}),e.$on("notifications:denyed",function(n,r){var i=r.data.bidId;angular.forEach(t,function(e,n){e.bid_id===i&&delete t[n]}),e.$broadcast("milestones.update")}),n},getMilestoneRequestsForProject:function(e){return c.get({"projects[]":e}).$promise.then(function(e){return d.milestoneRequestListFactory(e.milestone_requests)})},getMilestoneRequestsForBid:function(e){return c.get({"bids[]":e}).$promise.then(function(e){return d.milestoneRequestListFactory(e.milestone_requests)})},createMilestoneRequest:function(e,t,n,r){return c.create({project_id:e,bid_id:t,description:r,amount:n}).$promise.then(function(e){return i.milestoneFactory(e.milestone)})},rejectMilestoneRequest:function(e,t){return c.reject({request_id:e,reason:t}).$promise},updateMilestoneRequest:function(e,t,n){return c.update({request_id:e,description:t,amount:n}).$promise},createMilestonesFromBreakdown:function(e,t,n,r,i){return c.createBreakdown({project_id:e,bid_id:t,currency_id:n,seller_name:r,milestone_requests:i}).$promise}};return d}]);
  49. "use strict";angular.module("flApi").factory("Milestones",["$rootScope","$filter","FlResource","ApiInterceptor","Notifications","API_BASE_URL",function(t,e,n,i,o,r){o.listen("notifications","requestToRelease"),o.listen("notifications","accepted"),o.listen("notifications","denyed"),o.listen("notifications","cancelMilestone"),o.listen("notifications","createMilestone");var a=n(r+"/projects/0.1/milestones/",i,null,{create:{method:"POST"},action:{url:r+"/projects/0.1/milestones/:milestoneId/",method:"PUT",params:{milestoneId:"@milestoneId"}}}),s={milestoneFactory:function(t){return{get:function(){return t}}},milestoneListFactory:function(n){var i={add:function(e){n[e.transaction_id]=e,t.$broadcast("milestones.update")},remove:function(e){delete n[e],t.$broadcast("milestones.update")},clean:function(t){var n=this,i=e("filter")(this.get(),{bid_id:t});angular.forEach(i,function(t){n.remove(t.transaction_id)})},update:function(e,i){n[e]=i,t.$broadcast("milestones.update")},get:function(){return this.getList()},getList:function(){var t=[];return angular.forEach(n,function(e){t.push(e)}),t},getMap:function(){return n},getById:function(t){return n.hasOwnProperty(t)?s.milestoneFactory(n[t]):null}};return t.$on("notifications:requestToRelease",function(e,n){var o=i.getById(n.data.tranId);o&&(o=o.get(),o.status="requested_release",i.update(o.transaction_id,o),t.$broadcast("selectedBids.update",o.bid_id))}),t.$on("notifications:accepted",function(e,i){var o=i.data.bidId;angular.forEach(n,function(t){t.bid_id===o&&"pending"===t.status&&(t.status="frozen")}),t.$broadcast("milestones.update")}),t.$on("notifications:denyed",function(e,n){var o=n.data.bidId;i.clean(o),t.$broadcast("milestones.update")}),t.$on("notifications:cancelMilestone",function(e,n){var o=i.getById(n.data.tranId);o&&(o=o.get(),o.status="canceled",i.update(o.transaction_id,o),t.$broadcast("selectedBids.update",o.bid_id))}),i},getForProject:function(t){return a.get({"projects[]":t}).$promise.then(function(t){return s.milestoneListFactory(t.milestones)})},getForBid:function(t){return a.get({"bids[]":t}).$promise.then(function(t){return s.milestoneListFactory(t.milestones)})},create:function(t,e,n,i,o,r){var c=r?r:{};return c.project_id=t,c.bidder_id=e,c.description=n,c.amount=i,c.reason=o,a.create(c).$promise.then(function(t){return s.milestoneFactory(t)})},acceptRequest:function(t,e,n,i,o,r){return a.create({bidder_id:i,description:n,project_id:e,request_id:t,amount:o,reason:r}).$promise.then(function(t){return s.milestoneFactory(t)})},cancel:function(t){return a.action({milestoneId:t},{action:"CANCEL"}).$promise.then(function(t){return s.milestoneFactory(t.milestone)})},release:function(t,e){return a.action({milestoneId:t},{action:"RELEASE",amount:e}).$promise.then(function(t){return s.milestoneFactory(t.remaining_milestone)})},requestRelease:function(t){return a.action({milestoneId:t},{action:"REQUEST_RELEASE"}).$promise.then(function(t){return s.milestoneFactory(t.milestone)})},updateDescription:function(t,e){return a.action({milestoneId:t},{action:"UPDATE",other_reason:e}).$promise}};return s}]);
  50. "use strict";angular.module("flApi").factory("ProjectFees",["FlResource","ApiInterceptor","API_BASE_URL",function(e,r,t){var n=e(t+"/projects/0.1/projects/fees/",r);return{projectFeeFactory:function(e){var r=e;return{get:function(){return r}}},get:function(e,r,t){var c=this,o={"currencies[]":e||1,free_upgrade_details:r||!1};return angular.isDefined(t)&&(o.project=t),n.get(o).$promise.then(function(e){return c.projectFeeFactory(e.project_upgrade_fees[0])})}}}]);
  51. "use strict";angular.module("flApi").factory("ProjectInvites",["FlResource","ApiInterceptor","GafInterceptor","API_BASE_URL","GAF_BASE_URL",function(t,e,n,r,i){var o=t(r+"/projects/0.1/projects/:projectId/invite/",e,{projectId:"@projectId"},{getList:{method:"POST",url:i+"/ajax/carousel/fetchInviteFreelancers.php",interceptor:n}});return{projectInviteFactory:function(t){var e=t;return{get:function(){return e},canInvite:function(){return!e.invited},setInvited:function(t){e.invited=t}}},projectInviteListFactory:function(t){var e=this,n=0,r=t;return{getList:function(){return r},setInitialInvited:function(t){n=t},getInitialInvited:function(){return n},getFactoryList:function(){for(var t=[],n=0;n<r.length;n++)t.push(e.projectInviteFactory(r[n]));return t},getByUsersId:function(t){for(var n=0;n<r.length;n++)if(r[n].users_id===t)return e.projectInviteFactory(r[n])},getInvitedCount:function(){for(var t=0,e=0;e<r.length;e++)r[e].invited&&(t+=1);return t},addList:function(t){for(var e=0;e<t.length;e++)this.getByUsersId(t[e].users_id)||r.push(t[e]);return r}}},get:function(t,e,n,r){var i=this;return angular.isUndefined(e)&&(e=0),r=r?1:0,angular.isUndefined(n)&&(n=10),o.getList({projectID:t,limit:n,online:r,offset:e}).$promise.then(function(t){var e=i.projectInviteListFactory(t.candidates);return e.setInitialInvited(t.invitedCount),e})},invite:function(t,e){return o.save({projectId:t,freelancer_id:e}).$promise}}}]);
  52. "use strict";angular.module("flApi").factory("projectNegotiated",function(){return function(e){var n=e||"";return{getState:function(){return n},setState:function(e){n=e},isFreelancerPending:function(){return"FREELANCER_PENDING"===n},isEmployerPending:function(){return"EMPLOYER_PENDING"===n},isEmployerAccepted:function(){return"EMPLOYER_ACCEPTED"===n},isEmployerRequested:function(){return"EMPLOYER_REQUESTED"===n},isEmployerRejected:function(){return"EMPLOYER_REJECTED"===n},isFreelancerRejected:function(){return"FREELANCER_REJECTED"===n}}}});
  53. "use strict";angular.module("flApi").factory("Projects",["$rootScope","$q","$timeout","RequestTransformation","Auth","Users","Jobs","projectNegotiated","Notifications","FlResource","ApiInterceptor","GafInterceptor","API_BASE_URL","GAF_BASE_URL",function(t,e,r,n,i,o,u,s,c,a,d,f,l,p){var g=a(l+"/projects/0.1/projects/:projectId/",d,null,{getActive:{method:"GET",url:l+"/projects/0.1/projects/active/"},getExtraInfo:{method:"GET",url:p+"/ajax/buyer/pvp_extra_info.php",interceptor:f},getUpgradeInfo:{method:"GET",url:p+"/ajax/buyer/upgrade_info.php",interceptor:f},doAction:{method:"PUT"},close:{method:"POST",url:p+"/buyers/onclose.php",interceptor:f},"delete":{method:"GET",url:p+"/buyers/ondelete.php",interceptor:f},bump:{method:"POST",url:p+"/ajax/buyer/bumpProject.php",interceptor:f}});c.listen("notifications","projectStatusChange"),c.listen("notifications","bid"),c.listen("notifications","negotiatedProjectStatusChange"),c.listen("notifications","counterOffer");var h;return{projectFactory:function(r,c){var a=this,d=r,f=c,l=!1,h={get:function(){return d},set:function(t){angular.extend(d,t)},getUser:function(){return o.userFactory(f)},setJobs:function(t){for(var e=[],r=0;r<t.length;r++)e.push({id:parseInt(t[r])});this.set({jobs:e})},setTitle:function(t){this.set({title:t})},getFullSeoUrl:function(){return d.seo_url?p+"/projects/"+d.seo_url+".html":null},reset:function(){for(var t in d)delete d[t];l=!1},isReady:function(){return l},isOwner:function(){return i.getUserId()===d.owner_id},markAsReady:function(t){l=t},getEndingTime:function(){return d.submitdate+60*d.bidperiod*60*24},getTimeLeft:function(){var t=this.getEndingTime()-Date.now()/1e3;return 0>t?0:t},loadExtraVars:function(){return g.getExtraInfo({id:d.id}).$promise.then(function(t){"success"===t.status&&(d.payInvoiceToken=t.vars.payInvoiceToken,d.csrftok=t.vars.csrftok,d.cur_url=t.vars.cur_url)})},loadOwnerInfo:function(t){return o.getByUserId(d.owner_id,t).then(function(t){d.user=angular.extend({},d.user,t.get())})},loadJobsDetail:function(){return d.jobs_id=[],angular.forEach(d.jobs,function(t){d.jobs_id.push(t.id)}),u.getList({"jobs[]":d.jobs_id}).then(function(t){return d.jobs_detail=t.getJobs(),!0})},getDaysLeft:function(){return Math.round(this.getTimeLeft()/60/60/24)},isHourlyProject:function(){return!!d.hourly_project_info},getSelectedBids:function(){return d.selected_bids},upgrade:function(r){return g.doAction({projectId:d.id},{action:"upgrade",upgrades:r}).$promise.then(function(e){return angular.forEach(r,function(t){"EXTEND"===t&&(d.submitdate+=604800,d.time_submitted+=604800);var e={};e[t]=!0,d.upgrades=angular.extend({},d.upgrades,e)}),t.$broadcast("project.update"),e}).catch(function(t){return t.error=t.defaultError,e.reject(t.data)})},close:function(){return a.close(d.id)},"delete":function(){return a.delete(d.id)},signNDA:function(t){return a.signNDA(d.id,t)},bump:function(){return a.bump(d.id)}};return t.$on("notifications:projectStatusChange",function(e,r){d&&d.id===parseInt(r.data.id)&&(d.status="A"===r.data.newStatus.state?"active":"F"===r.data.newStatus.state?"frozen":"closed",d.sub_status=r.data.newStatus.subStatus,t.$broadcast("project.update"))}),t.$on("notifications:bid",function(e,r){var i=n.parseBidNotification(r.data),o=n.parseUserNotification(r.data);d&&angular.isDefined(d.bidList)&&d.id===i.project_id&&d.bidList.addBid(i)&&d.bidList.addUser(o)&&t.$broadcast("bidList.update")}),t.$on("notifications:negotiatedProjectStatusChange",function(t,e){angular.isDefined(d)&&angular.isDefined(d.id)&&d.id===parseInt(e.data.project_id)&&h.set({negotiated:s(e.data.description)})}),t.$on("notifications:counterOffer",function(e,r){if(angular.isDefined(d.hireme_initial_bid)){var n=r.data.sellerCounterOffer;d.hireme_initial_bid.hireme_counter_offer={amount:n.newAmount,bid_id:n.bidID,description:n.comment,period:n.newPeriod,status:n.newStatus},t.$broadcast("project.counterOffer")}}),h},projectListFactory:function(t,e,r,n){var i=t,s=e,c=r,a=n,d=this;return{getList:function(){return i},getProjects:function(){for(var t=[],e=0;e<i.length;e++)t.push(d.projectFactory(i[e]));return t},getUsers:function(){return o.userListFactory(s)},getSelectedBidsList:function(){return c},getById:function(t){for(var e=i,r=0;r<e.length;r++)if(e[r].id===t)return d.projectFactory(e[r])},getJobsById:function(t){for(var e=0;e<i.length;e++)if(i[e].id===t)return u.jobListFactory(i[e].jobs)},getSearchTotal:function(){return angular.isDefined(a)&&null!==a?a:void 0}}},getCurrent:function(){return h||(h=this.projectFactory({})),h},setCurrent:function(t){h=t},get:function(t){var e=this;return g.get(t).$promise.then(function(t){return e.projectFactory(t)})},getById:function(t,e){var r=e?e:{};return r.projectId=t,this.get(r)},getByIdWithUserDetails:function(t,e,r){var n=this,i=e?e:{};i.projectId=t,i.user_details=!0;for(var o in r)i["user_"+o]=r[o];return g.get(i).$promise.then(function(t){return n.projectFactory(t,t.owner)})},getList:function(t){var e=this;return g.get(t).$promise.then(function(t){return e.projectListFactory(t.projects)})},getUserProjectsByStatus:function(t,e){var r=this,n=e?e:{};return n["owners[]"]=i.getUserId(),n["frontend_project_statuses[]"]=t,g.get(n).$promise.then(function(t){return r.projectListFactory(t.projects,t.users,t.selected_bids)})},searchActive:function(t,e){var r=this,n=e?e:{};return n.query=t,g.getActive(e).$promise.then(function(t){return r.projectListFactory(t.projects,null,null,t.total_count)})},searchActiveWithUserDetails:function(t,e,r){var n=this,i=e?e:{};i.query=t,i.user_details=!0;for(var o in r)i["user_"+o]=r[o];return g.getActive(i).$promise.then(function(t){return n.projectListFactory(t.projects,t.users,null,t.total_count)})},post:function(t){function n(){g.save(s).$promise.then(function(t){c.resolve(u.projectFactory(t))}).catch(function(t){a--,403===t.status&&a>0?r(n,1e3):c.reject(t)})}var o=t.get(),u=this,s={owner_id:i.getUserId(),title:o.title,description:o.description,jobs:o.jobs||(o.bundle?o.bundle.jobs:void 0),currency:{id:o.currency.id,code:o.currency.code,sign:o.currency.sign},budget:o.budget,local:o.local,location:o.location,hireme:o.hireme,hireme_initial_bid:o.hireme_initial_bid},c=e.defer(),a=30;return n(),c.promise},close:function(t){return g.close({id:t,isAjaxCall:1}).$promise},"delete":function(t){return g.delete({id:t,isAjaxCall:1}).$promise},signNDA:function(t,e){return g.doAction({projectId:t},{action:"sign_nda",fullname:e.fullname,address:e.address,city:e.city,state:e.state,country:e.country,phone:e.phone}).$promise},bump:function(t){return g.bump({projectID:t}).$promise}}}]);
  54. "use strict";angular.module("flApi").factory("ReferralProgram",["FlResource","GafInterceptor","GAF_BASE_URL",function(r,e,n){var t=r("",e,null,{send:{method:"POST",url:n+"/ajax/referrals/sendInvitations.php"}});return{sendInvitations:function(r,e){return t.send({emails:r,bonus_id:e}).$promise}}}]);
  55. "use strict";angular.module("flApi").factory("Reviews",["Users","FlResource","ApiInterceptor","API_BASE_URL",function(e,t,r,s){var n=t(s+"/projects/0.1/reviews/",r,null,{getListFromLoggedInUser:{url:s+"/projects/0.1/self/reviews/"}});return{reviewFactory:function(t,r,s){var n=t,i=r,o=s;return{get:function(){return n},getReviewerDetails:function(){return e.userFactory(i)},getContextDetails:function(){return o}}},reviewListFactory:function(e,t,r,s){var n=e,i=t,o=r,u=s,c=this;return{getList:function(){return n},getReviews:function(){for(var e=[],t=0;t<n.length;t++){var r=n[t],s="contest"===r.review_context.review_type?u:o;e.push(c.reviewFactory(r,i?i[r.from_user_id]:null,s?s[r.review_context.context_id]:null))}return e}}},getList:function(e){var t=this;return n.get(e).$promise.then(function(e){return t.reviewListFactory(e.reviews,e.users,e.projects,e.contests)})},getListForUser:function(e,t){var r=this,s=t?t:{};return s["to_users[]"]=e,n.get(s).$promise.then(function(e){return r.reviewListFactory(e.reviews,e.users,e.projects,e.contests)})},getListForUserByJobs:function(e,t,r){var s=this,i=r?r:{};return i["to_users[]"]=e,i["job_ids[]"]=t,n.get(i).$promise.then(function(e){return s.reviewListFactory(e.reviews,e.users,e.projects,e.contests)})},getListFromLoggedInUser:function(e){var t=this;return n.getListFromLoggedInUser(e).$promise.then(function(e){return t.reviewListFactory(e.reviews,e.users,e.projects,e.contests)})},save:function(e){return n.save(e).$promise}}}]);
  56. "use strict";angular.module("flApi").service("Screenshots",["FlResource","GafInterceptor","GAF_BASE_URL",function(e,r,n){var i=e(n+"/ajax/tracking/screenshots.php",r,null,{getAllPunches:{method:"GET",params:{bidId:"@bidId",queryType:"@queryType",invoiceId:"@invoiceId",page:"@page"}}});return{getAllPunches:function(e,r,n,c){return c=c?c:0,i.getAllPunches({bidId:e,queryType:r,invoiceId:n,page:c}).$promise}}}]);
  57. "use strict";angular.module("flApi").factory("ShowcaseItems",["FlResource","ApiInterceptor","API_BASE_URL",function(t,e,r){var n=t(r+"/users/0.1/showcase_items/:id/",e,null,{get:{cache:!0},update:{method:"PUT"},approve:{method:"PATCH"},reject:{method:"PATCH"},"delete":{method:"PATCH"},score:{method:"PATCH"},tag:{method:"PATCH"}});return{showcaseItemFactory:function(t){var e=t;return{get:function(){return e}}},showcaseItemListFactory:function(t){var e=this,r=t;return{get:function(){return r},getFirst:function(){return e.showcaseItemFactory(r[0])},getList:function(){var t=[];return angular.forEach(r,function(r){t.push(e.showcaseItemFactory(r))}),t}}},get:function(t,e){var r=this,o=e||{};return o.itemId=t,n.get(e).$promise.then(function(t){return r.showcaseItemFactory(t)})},getList:function(t){var e=this;return n.query(t).$promise.then(function(t){return e.showcaseItemListFactory(t)})},update:function(t){var e=this;return n.update({id:t.showcase_item.id},t).$promise.then(function(t){return e.showcaseItemFactory(t)})},approve:function(t){var e=this;return n.approve({id:t},{action:"approve"}).$promise.then(function(t){return e.showcaseItemFactory(t)})},reject:function(t,e,r){var o=this;return n.reject({id:t},{action:"reject",option_id:e,reason:r}).$promise.then(function(t){return o.showcaseItemFactory(t)})},"delete":function(t){var e=this;return n.delete({id:t},{action:"delete"}).$promise.then(function(t){return e.showcaseItemFactory(t)})},score:function(t,e){var r=this;return n.score({id:t},{action:"score",score:e}).$promise.then(function(t){return r.showcaseItemFactory(t)})},tag:function(t,e){var r=this;return n.tag({id:t},{action:"tag",tags:e}).$promise.then(function(t){return r.showcaseItemFactory(t)})}}}]);
  58. "use strict";angular.module("flApi").factory("Showcases",["ShowcaseItems","Users","FlResource","ApiInterceptor","API_BASE_URL",function(t,e,s,r,n){var o=s(n+"/users/0.1/showcases/:id",r,null,{get:{cache:!0},update:{method:"PUT"}});return{showcaseFactory:function(s,r){var n=s,o=r;return{get:function(){return n},getItems:function(){return t.showcaseItemListFactory(n.showcase_items)},getUserDetails:function(){return e.userFactory(o)}}},showcaseListFactory:function(t,e){var s=this,r=t,n=e||[];return{get:function(){return r},getList:function(){var t=[];return angular.forEach(r,function(e){t.push(s.showcaseFactory(e,n[e.user_id]))}),t}}},get:function(t,e){var s=this,r=e||{};return o.get(r).$promise.then(function(t){for(var e=t.showcases[0],r=1;r<t.showcases.length;r++){var n=t.showcases[r];e.showcase_items.push(n.showcase_items[0])}return s.showcaseFactory(e)})},getList:function(t){var e=this;return o.get(t).$promise.then(function(t){return e.showcaseListFactory(t.showcases)})},getListWithUserDetails:function(t,e){var s=this,r=t||{};r.user_details=!0;for(var n in e)r["user_"+n]=e[n];return o.get(r).$promise.then(function(t){return s.showcaseListFactory(t.showcases,t.users)})},create:function(t){var e=this;return o.save(t).$promise.then(function(t){return e.showcaseFactory(t)})}}}]);
  59. "use strict";angular.module("flApi").factory("Skills",["$q",function(e){return{get:function(r){var a;switch(r.seo_url){case"graphic-design":a={plural_phrase_worker:"Graphic Designers",category_id:4,bundle_id:79};break;case"logo-design":a={plural_phrase_worker:"Logo Designers",category_id:4,bundle_id:21};break;case"software-development":a={plural_phrase_worker:"Software Developpers",category_id:1,bundle_id:4};break;case"articles":a={plural_phrase_worker:"Article Writers",category_id:3,bundle_id:10};break;case"website-design":a={plural_phrase_worker:"Website Designers",category_id:4,bundle_id:19}}return a?e.when(a):e.reject()}}}]);
  60. "use strict";angular.module("flApi").factory("SuggestedFriends",["FlResource","ApiInterceptor","ContactRequests","Users","API_BASE_URL",function(e,t,n,r,u){var s=e(u+"/contacts/0.1/suggested_friends/",t,null,{get:{cache:!0}});return{get:function(e){var t={limit:20,display_info:!0,avatar:!0};angular.extend(t,e);var n=this;return s.get(t).$promise.then(function(e){return n.suggestedFriendListFactory(e)})},suggestedFriendFactory:function(e,t){var u=e,s=t,i=!1;return{get:function(){return r.userFactory(u)},getMutualFriendCount:function(){return s.mutual_friend_count},sendRequest:function(){return n.sendRequestWithUserId(e.id).then(function(){i=!0})},getRequested:function(){return i}}},suggestedFriendListFactory:function(e){var t=e,n=t.users,r=t.suggested_friends,u=this;return{get:function(){return r},getSuggestedFriends:function(){var e,t,s;for(s={},e=0;e<r.length;e++)t=r[e],s[t.user_id]=u.suggestedFriendFactory(n[t.user_id],t);return s}}}}}]);
  61. "use strict";angular.module("flApi").factory("threadFactory",["$q","$rootScope","$timeout","Auth","Bids","Messages","OnlineOffline","Projects","Users","Contests",function(e,t,n,r,a,s,i,u,o,c){var d=5e3;return function(f,g,h){function l(t,n){if(t.humanError){var r=angular.copy(t.humanError);r.title+=" sending your message",n(r)}return e.reject(t)}function m(e,t){var n;if(e instanceof Array){for(n=0;n<e.length;n++)if(e[n]===f.id)return void t()}else e===f.id&&t()}var p,v,y=this,M={};f.thread.members=f.thread.members.filter(function(e){return e&&e.id?!isNaN(e.id):!isNaN(e)}).map(function(e){return e&&e.id?parseInt(e.id,10):parseInt(e,10)});var _,x={fakeMessageIndex:0,get:function(){return f},chatHash:function(){var e=f.thread.members.slice(),t=r.getUserId();return-1===e.indexOf(t)&&e.push(t),y.buildChatId(f.thread.thread_type,f.thread.context,e)},isArchived:function(){return"archived"===f.folder},isMuted:function(){return f.is_muted},isRead:function(){return f.is_read||0===f.messages.length},isTyping:function(){return f.is_typing},getUsers:function(){return g},markRead:function(){return f.is_read?e.when():y.takeAction(f.id,"read").then(function(){f.is_read=!0})},markUnread:function(){return f.is_read?y.takeAction(f.id,"unread").then(function(){f.is_read=!1}):e.when()},archive:function(){return"archived"===f.folder?e.when():y.takeAction(f.id,"archive").then(function(){f.folder="archived"})},unarchive:function(){return"inbox"===f.folder?e.when():y.takeAction(f.id,"unarchive").then(function(){f.folder="inbox"})},mute:function(){return f.is_muted?e.when():y.takeAction(f.id,"mute").then(function(){f.is_muted=!0})},unmute:function(){return f.is_muted?y.takeAction(f.id,"unmute").then(function(){f.is_muted=!1}):e.when()},type:function(){return v?e.when():(this.markRead(),v=!0,n(function(){v=!1},d),y.sendTyping(f.id))},getUser:function(e){return o.userFactory(g[e])},fetchUserDetails:function(e){return o.getList(angular.extend({"users[]":f.thread.members,avatar:!0,support_status_details:!0,balance_details:!0},e)).then(function(e){g=e.getMap()})},getMessages:function(){return s.messageListFactory(f.messages)},getContextType:function(){return f.thread.context.type},getProject:function(){return u.projectFactory(h)},fetchProjectDetails:function(t){var n=f.thread.context.type,r=f.thread.context.id;return t=angular.isObject(t)?t:{},"project"===n&&angular.isNumber(r)?u.getById(f.thread.context.id,t).then(function(e){return h=e.get()}):e.when()},getContest:function(){return c.contestFactory(h)},fetchContestDetails:function(t){var n=f.thread.context.type,r=f.thread.context.id;return t=angular.isObject(t)?t:{},"contest"===n&&angular.isNumber(r)?c.getById(f.thread.context.id,t).then(function(e){return h=e.get()}):e.when()},fetchBidDetails:function(t){var n=f.thread.context.type,r=f.thread.context.id;return"project"===n&&angular.isNumber(r)?a.getList(angular.extend({"projects[]":[r],"bidders[]":f.thread.members},t)).then(function(e){return angular.forEach(e.getList(),function(t){return t.retracted?void 0:(p=t,e)}),e}):e.when()},fetchMoreMessages:function(){if(f.id){f.messages=f.messages||[];var t=f.messages.length;return s.getList({"threads[]":[f.id],offset:t}).then(function(e){return x.getMessages().extendMessages(e.get()),e.get().length})}return e.when(0)},getBid:function(){return a.bidFactory(p)},addFakeMessage:function(e,t){var n=this.getMessages().addFakeMessage(e,t,f.id,this.fakeMessageIndex);return this.fakeMessageIndex+=1,n},sendMessage:function(e,t,n){var r=this;if(v=!1,!f.id)return this.createThread(e,t,n).catch(function(e){return l(e,function(e){r.error=e})});var a=this.addFakeMessage(e,n);return this.markRead(),y.sendMessage(f.id,e,t,a,n).then(function(e){return r.getMessages().replaceFakeMessage(a,e.get()),e}).catch(function(e){return l(e,function(e){angular.forEach(r.getMessages().getFakeMessages(a),function(t){t.error=e,t.errors.push(e)})})})},createThread:function(e,t,n){var r=this,a=f.thread,s=this.addFakeMessage(e,n);return y.createThread(a.thread_type,a.context.type,a.context.id,a.members,e,t,n).then(function(e){var t=f.messages,n=e.get().messages[0];r.getMessages().replaceFakeMessage(s,n),angular.extend(f,e.get()),f.messages=t,angular.forEach(e.get().messages,function(e){r.getMessages().upsertMessage(e)})})},getOtherUsers:function(){var e=String(r.getUserId()),t=[];return angular.forEach(g,function(n,r){r!==e&&t.push(n)}),t},getOtherAvatars:function(){return x.getOtherUsers().map(function(e){return e.avatar_cdn})},otherUsersOnline:function(){var e=Object.keys(M);if(0===e.length)return!0;var t=e.map(function(e){return M[e].isOnline()}),n=!1,r=!1;return angular.forEach(t,function(e){n||(void 0===e?n=!0:e===!0&&(r=!0))}),n?void 0:r?!0:!1}};return _=g&&0!==Object.keys(g).length?e.when():x.fetchUserDetails(),_.then(function(){var e=x.getOtherUsers().map(function(e){return e.id});angular.forEach(e,function(e){var r="onlineoffline:statuschange:"+e.toString();t.$on(r,function(t,r){M[e]=r,n(function(){})})}),i.subscribe(e),angular.forEach(e,function(e){M[e]||(M[e]=i.getState(e))})}),t.$on("messages:read",function(e,n){var r=function(){f.is_read=!0,t.$apply()};m(n.data,r)}),t.$on("messages:archive",function(e,n){var r=function(){f.folder="archived",t.$apply()};m(n.data,r)}),t.$on("messages:unarchive",function(e,n){var r=function(){f.folder="inbox",t.$apply()};m(n.data,r)}),t.$on("messages:typing",function(e,r){var a=r.data.thread;f.id===a&&(f.typing=!0,n(function(){f.typing=!1},d),t.$apply())}),t.$on("messages:private",function(e,n){var a=n.data;if(!f.id&&a.from_user!==r.getUserId()){var s=a.thread_details,i=y.buildChatId(s.thread_type,s.context,s.members);x.chatHash()===i&&(f.id=a.thread_id)}a.thread_id===f.id&&(x.getMessages().upsertMessage(a),f.typing=!1,a.from_user!==r.getUserId()&&(f.is_read=!1),t.$apply())}),t.$on("messages:attach",function(e,n){if(n.data.thread_id===f.id){var r=x.getMessages().getMessageById(n.data.message_id);r&&(angular.forEach(n.data.filenames,function(e){r.addAttachment(e)}),t.$apply())}}),x}}]);
  62. "use strict";angular.module("flApi").factory("threadListFactory",function(){return function(t){var r={getList:function(){return t},getById:function(r){for(var n=0;n<t.length;n++)if(t[n].get().id===r)return t[n]}};return r}});
  63. "use strict";angular.module("flApi").factory("Threads",["$q","FlResource","ApiInterceptor","Auth","Messages","Notifications","threadFactory","threadListFactory","ApiUpload","API_BASE_URL",function(e,t,r,a,s,n,i,o,d,c){n.listen("messages","private"),n.listen("messages","read"),n.listen("messages","archive"),n.listen("messages","unarchive"),n.listen("messages","typing"),n.listen("messages","attach");var u=c+"/messages/0.1/threads/",h=t(u,r,{},{sendMessage:{method:"POST",url:u+":threadId/messages/"},createThread:{method:"POST"},sendAction:{method:"PUT"},sendTyping:{method:"POST",url:u+":threadId/typing/"}});return{threadFactory:i,threadListFactory:o,getById:function(e,t){return t=t||{},t["threads[]"]=[e],this.getList(t).then(function(t){return t.getById(e)})},getList:function(e){var t=this;return h.get(angular.extend({avatar:!0},e)).$promise.then(function(e){var r=[];return angular.forEach(e.threads,function(a){var s,n=e.users,i=e.context_details;if(i)if(i.projects&&"project"===a.thread.context.type){var o=a.thread.context.id;s=i.projects[o]}else if(i.contests&&"contest"===a.thread.context.type){var d=a.thread.context.id;s=i.contests[d]}a.messages||(a.messages=[]),r.push(t.threadFactory(a,n,s))}),t.threadListFactory(r)})},sendMessage:function(e,t,r,a,n,i){i=i||{},i.threadId=e;var o={message:t,source:r};if(a&&(o.client_message_id=a),n&&0!==n.length){o.files=n,o.attachments=n.map(function(e){return e.name});var c={method:"POST",url:u+e+"/messages/",data:o};return d.upload(c).then(function(e){return s.messageFactory(e.data)})}return h.sendMessage(i,o).$promise.then(function(e){return s.messageFactory(e)})},createThread:function(e,t,r,s,n,i,o){var c=this;s=Array.isArray(s)?s:[s];var m={thread_type:e,members:s.concat([a.getUserId()]),message:n};if(t&&(m.context_type=t),r&&(m.context_id=r),i&&(m.source=i),o&&o.length>0){m.attachments=o.map(function(e){return e.name}),m.files=o;var g={method:"POST",data:m,url:u};return d.upload(g).then(function(e){return c.threadFactory(e.data)})}return h.createThread({},m).$promise.then(function(e){return c.threadFactory(e)})},createEmptyThread:function(e,t,r,a,s){var n=[];return angular.forEach(a,function(e){e&&(e.id&&!isNaN(e.id)?n.push(parseInt(e.id,10)):isNaN(e)||n.push(parseInt(e,10)))}),this.threadFactory({thread:{thread_type:e,members:n,context:{id:r,type:t}},messages:[],source:s})},takeAction:function(e,t){e=Array.isArray(e)?e:[e];var r={action:t,threads:e};return h.sendAction({},r).$promise},sendTyping:function(t){return t?h.sendTyping({threadId:t},{}).$promise:e.when()},buildChatId:function(e,t,r){r.sort(function(e,t){return e-t}),void 0===e&&(e="private_chat");var a="null";return t&&void 0!==t.id&&"project"===t.type&&(a="p"+t.id),String()+e+":"+a+":"+r.join("|")}}}]);
  64. "use strict";angular.module("flApi").factory("TimeTracker",["FlResource","GafInterceptor","GAF_BASE_URL",function(t,e,n){var i=t(n+"/ajax/tracking/sessions.php",e,null,{getTrackedTime:{method:"GET",params:{bidId:"@bidId",startDate:"@startDate",endDate:"@endDate"}},getAllNotInvoicedSessions:{method:"GET",params:{action:"not-invoiced-sessions",bid_id:"@bidId"}},getLastSession:{method:"GET",params:{action:"last-session",bid_id:"@bidId"}}}),s={timeTrackedFactory:function(t){return{get:function(){return t},getMap:function(){var e={};return angular.forEach(t,function(t){e[t.date]=1e3*t.seconds}),e}}},sessionFactory:function(t){return{get:function(){return t}}},sessionListFactory:function(t){var e=[];return angular.forEach(t.sessions,function(t){e.push(s.sessionFactory(t))}),{get:function(){return t},getList:function(){return e}}},getTrackedTime:function(t,e,n){var r=e.toISOString().slice(0,10),o=n.toISOString().slice(0,10);return i.getTrackedTime({bidId:t,startDate:r,endDate:o}).$promise.then(function(t){return s.timeTrackedFactory(t.message)})},getNotInoivoicedSessions:function(t){return i.getAllNotInvoicedSessions({bid_id:t}).$promise.then(function(t){return s.sessionListFactory(t)})},getLastSession:function(t){return i.getLastSession({bid_id:t}).$promise.then(function(t){return s.sessionListFactory(t)})}};return s}]);
  65. "use strict";angular.module("flApi").factory("Users",["$q","Auth","Cdn","Currencies","FlResource","ApiInterceptor","GafInterceptor","API_BASE_URL","GAF_BASE_URL","DEFAULT_AVATAR_URL",function(e,r,t,n,s,o,u,i,a,c){var f=s(i+"/users/0.1/users/:userId/",o,null,{get:{cache:!0},getList:{url:i+"/users/0.1/users/"},getDirectory:{url:i+"/users/0.1/users/directory/"},getSelf:{url:i+"/users/0.1/users/self/"},updateUserInfo:{method:"PUT",url:i+"/users/0.1/users/self/"},setJobs:{method:"POST",url:i+"/users/0.1/self/jobs/"},removeJobs:{method:"DELETE",url:i+"/users/0.1/self/jobs/"},setLocation:{method:"POST",url:i+"/users/0.1/self/location/"},check:{method:"POST",url:i+"/users/0.1/users/check/"},sendPhoneVerification:{method:"POST",url:i+"/users/0.1/phone_verifications/"},submitPhoneVerification:{method:"PUT",url:i+"/users/0.1/phone_verifications/"},alertBoxClose:{method:"POST",url:a+"/ajax/alertbox_dont_show_next_time.php",interceptor:u},search:{url:i+"/users/0.1/users/directory/"},getProfile:{url:a+"/ajax/getUserProfileData.php",interceptor:u},setProfile:{method:"POST",url:a+"/ajax/user/settings/onProfileSettingsChange.php",interceptor:u},deprecatedSearch:{url:a+"/ajax/directory/getFreelancer.php",interceptor:u},setPhoneNumber:{method:"POST",url:a+"/ajax/signup/register.php",interceptor:u}}),l=s(i+"/users/0.1/users/facebook/",o,null,{link:{method:"POST",url:i+"/users/0.1/users/facebook/link/"}});return{userFactory:function(e){var r=e;return{canBeQuickHiredBy:function(e){var r=["freelancer","both"],t=["employer","both"];return-1!==r.indexOf(this.getRole())&&-1!==t.indexOf(e.getRole())},get:function(){return r},getAvatarUrl:function(){return t.getCdnUrl(r&&r.avatar?r.avatar:c)},getPrimaryCurrency:function(){return n.currencyFactory(r.primary_currency)},getBalanceForCurrency:function(r){var t;return angular.forEach(e.account_balances.balances,function(e){e.currency.id===parseInt(r)&&(t=e)}),t},getRole:function(){var r=e.role,t=e.chosen_role;return"freelancer"===r&&r!==t&&t&&(r=t),r},set:function(e){angular.extend(r,e)}}},userListFactory:function(e,r,t){var n,s=this;return{getMap:function(){return e},getList:function(){return angular.isUndefined(n)&&(angular.isUndefined(t)&&(t=Object.keys(e)),n=[],t.map(function(r){n.push(e[r])})),n},getById:function(r){return angular.isDefined(e[r])?s.userFactory(e[r]):void 0},getCount:function(){var e=this.getList();return e.length},getSearchTotal:function(){return angular.isDefined(r)&&null!==r?r:void 0}}},get:function(e){var r=this;return f.get(e).$promise.then(function(e){return r.userFactory(e)})},getDirectory:function(e){var r=this;return f.getDirectory(e).$promise.then(function(e){return r.userListFactory(e)})},getByUserId:function(e,r){var t=r?r:{};return t.userId=e,this.get(t)},getByUsername:function(r,t){var n=this,s=t?t:{};return s["usernames[]"]=[r],f.get(t).$promise.then(function(r){return Object.keys(r.users).length?n.userFactory(r.users[Object.keys(r.users)[0]]):e.reject({code:"NOT_FOUND"})})},getLoggedInUser:function(e){var r=this;return f.getSelf(e).$promise.then(function(e){return r.userFactory(e)})},getList:function(e){var r=this;return f.getList(e).$promise.then(function(e){return r.userListFactory(e.users)})},create:function(e,t,n){var s=this,o={user:{email:e.email,username:e.username,role:e.role},password:t,captcha:n||{}};return f.save(o).$promise.then(function(e){return r.set(e.auth_hash,e.user.id,!0),s.userFactory(e.user)})},createWithFacebook:function(e,t){var n=this,s={user:{email:e.email,username:e.username,role:e.role},facebook_id:t.userID,access_token:t.accessToken};return l.save(s).$promise.then(function(e){return r.set(e.auth_hash,e.user.id,!0),n.userFactory(e.user)})},linkFacebook:function(e){var r=this,t={facebook_id:e.userID,access_token:e.signedRequest};return l.link(t).$promise.then(function(e){return r.userFactory(e)})},check:function(e,r){var t=r||{};return f.check(t,{user:e}).$promise.then(function(e){return e})},updateUserInfo:function(e){return f.updateUserInfo({action:e}).$promise},setJobs:function(e){var r={"jobs[]":e};return f.setJobs(r).$promise},removeJobs:function(e){var r={"jobs[]":e};return f.removeJobs(r).$promise},setLocation:function(e){return f.setLocation({country:e.country,city:e.city,latitude:e.latitude,longitude:e.longitude,vicinity:e.vicinity,administrative_area:e.administrativeArea,full_address:e.fullAddress}).$promise},alertBoxClose:function(e,r,t){return f.alertBoxClose({event:e,event_id:r,otherparty_user_id:t}).$promise},search:function(e,r){var t=this;return r=r?r:{},r.query=e,f.search(r).$promise.then(function(e){var r={},n=[];for(var s in e.users)s=e.users[s],r[s.id]=s,n.push(s.id);return t.userListFactory(r,e.total_count,n)})},deprecatedSearch:function(e,r){var t=this;return r=r?r:{},r.freeSearch=e,f.deprecatedSearch(r).$promise.then(function(e){var r={},n=[];for(var s in e.users)s=e.users[s],r[s.user_id]=s,n.push(s.user_id);return t.userListFactory(r,e.count,n)})},setPhoneNumber:function(r,t,n){return f.setPhoneNumber({tm:t,ph:r,t:n}).$promise.catch(function(){return e.reject({code:"LOCAL_BID_INVALID_REQUEST"})})},getProfile:function(){return f.getProfile().$promise},setProfile:function(e){return f.setProfile({firstname:e.firstname,lastname:e.lastname,address1:e.address1,city:e.city,zip:e.zip,state_code:e.state_code,thm_session:e.thm_session,token:e.token}).$promise},sendPhoneVerification:function(e){return f.sendPhoneVerification(e).$promise},submitPhoneVerification:function(e){return f.submitPhoneVerification(e).$promise}}}]);
  66. "use strict";angular.module("flApi").factory("ApiInterceptor",["$q","$log","Analytics","RequestTransformation","API_BASE_URL",function(t,a,e,s,r){function n(t){var a=t.method;return t.url.match(i)&&("POST"===a||"PUT"===a)||t.url.match(c)||t.url.match(u)||t.url.match(o)}var o=r+"/contacts/0.1/requests/pending_sent/",i=r+"/messages/0.1/threads/*",c=r+"/messages/0.1/messages/*",u=r+"/messages/0.1/videochat/*",d=r+"/users/0.1/self/jobs/",p=function(t){t.data instanceof FormData||(t.headers["Content-Type"]="application/x-www-form-urlencoded",t.data=s.formUrlEncoded(t.data))},m=r+"/translations/0.1/*",f=function(t){Object.keys(t.params).forEach(function(a){t.params[a]===!1&&delete t.params[a]})};return{request:function(t){return t.params?t.params.compact=!0:t.data&&t.data instanceof FormData?t.data.append("compact","true"):t.data&&(t.data.compact=!0),t.url.match(d)&&"DELETE"===t.method&&(t.headers["Content-Type"]="application/json",t.data=t.params,delete t.params),n(t)?p(t):"PUT"!==t.method&&"PATCH"!==t.method||!t.data||!t.data.action||t.url.match("/api/users/0.1/showcase_items/")||t.url.match("/api/users/0.1/phone_verifications/")||t.url.match("/api/users/0.1/webhooks/")||p(t),t.url.match(m)&&f(t),t},response:function(s){if(!s.data||"success"!==s.data.status){var r="INVALID_RESPONSE";return a.error("api: invalid server response: "+s.data),"undefined"!=typeof Raven&&Raven.captureMessage(r,{extra:{response:JSON.stringify(s.data),config:JSON.stringify(s.config),status:s.status,status_text:s.statusText}}),e.trackError("api",s.config.method+" "+s.config.url,s.status,s.data),s.code=r,t.reject(s)}return s.data.result&&(s.data=s.data.result),s.data},responseError:function(a){var s,r={title:"Something went wrong",message:"Please check your internet connection and refresh the page."};if(a.status>=400&&a.status<500?r={title:"Something went wrong",message:"If this problem persists, please contact support with Error: "+a.data.message}:a.status>=500&&a.status<600&&(r={title:"Something went wrong with our service",message:"To continue, please refresh the page and try again."}),a.humanError=r,a.data&&a.data.error_code){var n=a.data.error_code.match(/\.(.*$)/);s=n&&n[1]?n[1]:"INVALID_ERROR"}else s="INVALID_RESPONSE";return("UNKNOWN_ERROR"===s||"GAF_EXCEPTION"===s||"INVALID_ERROR"===s||"INVALID_RESPONSE"===s||"GENERAL"===s)&&("undefined"!=typeof Raven&&Raven.captureMessage(s,{tags:{api:JSON.stringify(a.config.url)},extra:{response:JSON.stringify(a.data),config:JSON.stringify(a.config),status:a.status,status_text:a.statusText}}),e.trackError("api",a.config.method+" "+a.config.url,a.status,a.data)),a.data||(a.data={}),a.code=s,t.reject(a)}}}]);
  67. "use strict";angular.module("flApi").service("ApiUpload",["BaseUpload",function(e){var a=Object.create(e);return a.parseSuccessResult=function(e){return e.data=e.data.result,e},a}]);
  68. "use strict";angular.module("flApi").factory("BaseUpload",["$http","$q",function(e,n){var t={upload:function(t){var r=n.defer(),a=t.data;t.data=new FormData,t.headers=t.headers||{},t.headers["Content-Type"]=void 0,t.headers.__setXHR_=function(){return function(e){e.upload.addEventListener("progress",function(e){r.notify(e)},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&r.notify(e)},!1)}},t.transformRequest=function(e){for(var n in a){var t=a[n];if(Array.isArray(t))for(var r=0;r<t.length;r++)e.append(n+"[]",t[r]);else e.append(n,t)}return e};var o=this;return e(t).then(function(e){e=o.parseSuccessResult(e),r.resolve(e)},function(e){r.reject(e)},function(e){r.notify(e)}),r.promise},parseSuccessResult:function(e){return e}};return t}]);
  69. "use strict";angular.module("flApi").factory("FlResource",["$resource",function(e){return function(r,t,n,o,u){if(!t||!t.request)throw new Error("No default interceptor set");o=o||{},angular.forEach(o,function(e,r){angular.isDefined(o[r].interceptor)?o[r]._flRequestInterceptor=o[r].interceptor.request:(o[r].interceptor=t,o[r]._flRequestInterceptor=t.request)});var c={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}};return angular.forEach(c,function(e,r){angular.isDefined(o[r])||(o[r]=e,o[r].interceptor=t,o[r]._flRequestInterceptor=t.request)}),u=u||{stripTrailingSlashes:!1},e(r,n,o,u)}}]).factory("FlResourceInterceptor",function(){return{request:function(e){return e._flRequestInterceptor?e._flRequestInterceptor(e):e}}}).config(["$httpProvider",function(e){e.interceptors.push("FlResourceInterceptor")}]);
  70. "use strict";angular.module("flApi").factory("GafInterceptor",["$q","RequestTransformation",function(a,t){return{request:function(a){return a.headers["Content-Type"]="application/x-www-form-urlencoded",a.transformRequest=[],a.data=t.formUrlEncodedRecursive(a.data),a},response:function(t){return!t.data||"success"!==t.data&&"true"!==t.data&&t.data.success!==!0&&"success"!==t.data.status&&t.data.status!==!0?(t.defaultError="Internal error, please try again later.",a.reject(t)):(t.data.data&&(t.data=t.data.data),t.data)}}}]);
  71. "use strict";angular.module("flApi").factory("RequestTransformation",function(){var e=function(e){var r,i,n,t=[];if(e instanceof FormData)return e;for(r in e)if(e.hasOwnProperty(r)&&e[r])if(n=e[r],Array.isArray(n))for(i=0;i<n.length;i++)t.push(encodeURIComponent(r+"[]")+"="+encodeURIComponent(n[i]));else t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.join("&")},r=function(e){var r,n=[],t=function(e,r){r=angular.isFunction(r)?r():null===r?"":r,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(r)};if(Array.isArray(e)&&e!=={})angular.forEach(e,function(e,r){t(r,e)});else for(r in e)i(r,e[r],t);return n.join("&")},i=function(e,r,n){var t;if(Array.isArray(r))angular.forEach(r,function(r,t){i(e+"["+("object"==typeof r?t:"")+"]",r,n)});else if(angular.isObject(r))for(t in r)i(e+"["+t+"]",r[t],n);else n(e,r)},n=function(e){return{id:parseInt(e.bid.id),amount:parseInt(e.bid.sum),bidder_id:parseInt(e.bid.users_id),description:e.bid.descr,frontend_bid_status:"active",hidden:e.bidHidden,highlighted:e.bid.highlighted,milestone_percentage:e.bid.milestone_percentage,period:parseInt(e.bid.period),project_id:parseInt(e.bid.project_id),project_owner_id:parseInt(e.accountId),ranking:e.bid.ranking,retracted:!1,shortlist:!1,submitdate:parseInt(e.bid.submitdate_ts),time_submitted:parseInt(e.bid.submitdate_ts),score:parseFloat(e.bid.score)}},t=function(e){return Array.isArray(e.bid.user.insignia)&&(e.bid.user.insignia=e.bid.user.insignia.map(function(e){return{id:parseInt(e.examId,10),name:e.title,description:e.description,icon_name:e.name}})),{avatar_cdn:e.imgUrl,hourly_rate:e.bid.user.hourlyrate,id:parseInt(e.bid.user.id),location:{country:{code:e.bid.user.address.code,name:e.bid.user.flag.name}},registration_date:e.bid.user.reg_unixtime,reputation:{earnings_score:e.bid.user.earnings,entire_history:{all:e.bid.user.seller_rating.projectCount.entire_history.all,completion_rate:e.bid.user.seller_rating.projectCount.entire_history.completion_rate,overall:e.bid.user.seller_rating.avg,reviews:e.bid.user.seller_rating.count,on_time:e.bid.user.seller_rating.reputation.entire_history.ont,on_budget:e.bid.user.seller_rating.reputation.entire_history.onb,category_ratings:{quality:e.bid.user.seller_rating.reputation.entire_history.qua,communication:e.bid.user.seller_rating.reputation.entire_history.com,expertise:e.bid.user.seller_rating.reputation.entire_history.exp,professionalism:e.bid.user.seller_rating.reputation.entire_history.pro,hire_again:e.bid.user.seller_rating.reputation.entire_history.hag}},user_id:parseInt(e.bid.user.id)},username:e.bid.user.username,isPortfolioCreated:e.bid.user.isPortfolioCreated,qualifications:e.bid.user.insignia}};return{formUrlEncoded:e,formUrlEncodedRecursive:r,parseBidNotification:n,parseUserNotification:t}});
  72. "use strict";angular.module("flApi").factory("Videochat",["FlResource","ApiInterceptor","API_BASE_URL",function(e,t,i){function n(e,t,i){return d.webcam({action:"webcam_change",webcam_enabled:i,thread_id:e,session_id:t}).$promise}var s=i+"/messages/0.1/videochat/:thread_id/",d=e(s,t,{thread_id:"@thread_id",session_id:"@session_id",action:"@action"},{request:{method:"POST"},accept:{method:"PATCH"},reject:{method:"PATCH"},sdpOffer:{method:"PATCH"},sdpAnswer:{method:"PATCH"},iceExchange:{method:"PATCH"},iceRestart:{method:"PATCH"},close:{method:"PATCH"},getIceConfig:{method:"GET",url:s+"ice_config/"},webcam:{method:"PATCH"}});return{request:function(e,t){var i={thread_id:e};return t&&(i.audio_only=!0),d.request(i).$promise.then(function(e){return e.session_id})},accept:function(e,t){return d.accept({action:"accept",thread_id:e,session_id:t}).$promise},reject:function(e,t){return d.reject({action:"reject",thread_id:e,session_id:t}).$promise},close:function(e,t){return d.close({action:"close",thread_id:e,session_id:t}).$promise},sdpOffer:function(e,t,i){return d.sdpOffer({action:"sdp_offer",thread_id:e,session_id:t,sdp_type:i.type,sdp_data:i.sdp}).$promise},sdpAnswer:function(e,t,i){return d.sdpAnswer({action:"sdp_answer",thread_id:e,session_id:t,sdp_type:i.type,sdp_data:i.sdp}).$promise},iceExchange:function(e,t,i){return d.iceExchange({action:"ice_exchange",thread_id:e,session_id:t,candidate:i.candidate,sdp_m_line_index:i.sdpMLineIndex,sdp_m_id:i.sdpMid}).$promise},iceRestart:function(e,t){return d.iceRestart({action:"ice_restart",session_id:t,thread_id:e}).$promise},getIceConfig:function(e){return d.getIceConfig({thread_id:e}).$promise},enableWebcam:function(e,t){return n(e,t,!0)},disableWebcam:function(e,t){return n(e,t,!1)}}}]);
  73. "use strict";angular.module("flApiTranslations",["configs","threepio","flApi","angular-md5"]).provider("Translations",["TranslationProvider","LocalizationProvider","LANGUAGE_COOKIE","LANGUAGE_COOKIE_EXPIRES",function(n,t,a,e){var r,i;this.translate=function(o,s){r=o,n.setTranslationsRequest(["Translations",function(n){return function(t){return i=t,n.getStrings(o,t)}}]),s&&n.translateRootElement(),t.setLanguageCookie(a,{domain:window.location.hostname.match(/freelancer.*$/)?window.location.hostname.match(/freelancer.*$/)[0]:void 0,expires:e})},this.$get=["FlResource","ApiInterceptor","API_BASE_URL","md5","$q","$cacheFactory",function(n,t,a,e,o,s){var c=n(a+"/translations/0.1/translations/",t,{hashed:!0},{get:{cache:!0,headers:{Accept:"application/json"}}}),u=n(a+"/translations/0.1/languages/",t),l=s("translations");return{getStrings:function(n,t){return c.get({domain:n,language_code:t}).$promise},getDomain:function(){return r},getLanguages:function(n,t){return u.get({"language_codes[]":t,active_only:angular.isUndefined(n)?!0:n}).$promise},getTranslationFromHash:function(n,t,a){var e,s,c=this;return angular.isUndefined(t)&&(t=r),angular.isUndefined(a)&&(a=i),s=t+"#"+a,e=l.get(s),e?e[n]?o.when(e[n]):o.reject():o(function(e,r){c.getStrings(t,a).then(function(t){var a=t.translations;l.put(s,a),a[n]?e(a[n]):r()})})},getTranslationFromString:function(n,t,a){var r=this,i=e.createHash(n);return o(function(e){r.getTranslationFromHash(i,t,a).then(function(n){e(n)},function(){e(n)})})}}}]}]);
  74. "use strict";angular.module("flApiTranslations").provider("TranslationModal",function(){var t="i18n-id",n="i18n-",i="-id",r=["translatable","is-translatable"],e={"data-toggle":"tooltip","data-placement":"right","data-translations-tooltip":"false","data-original-title":"",title:""},a=!1;this.setTranslationIdAttribute=function(n){return t=n,this},this.setAttributePrefix=function(t){return n=t,this},this.setAttributeSuffix=function(t){return i=t,this},this.setModalClasses=function(t){return r=t,this},this.setModalAttributes=function(t){return e=t,this},this.$get=function(){return{getTranslationIdAttribute:function(){return t},getAttributePrefix:function(){return n},getAttributeSuffix:function(){return i},getModalClasses:function(){return r},getModalAttributes:function(){return e},getTranslationMode:function(){return a},setTranslationMode:function(t){return a=t,this}}}});
  75. "use strict";angular.module("flApiTranslations").directive("flTranslationCrawler",["TranslationModal","Translations","$window",function(t,n,a){var e="translation-crawled",r=t.getTranslationIdAttribute(),i=n.getDomain(),o=t.getAttributePrefix(),u=t.getAttributeSuffix(),l=t.getModalClasses(),s=t.getModalAttributes(),c=!1,f=[],d=function(){var t,n,a,r=function(t){angular.forEach(l,function(n){t.addClass(n)})},d=function(t){angular.forEach(s,function(n,a){t.attr(a,n)})},g=function(t){return t.name.match("^"+o)&&t.name.match(u+"$")},h=function(t,n){var a=n.data("i18n-ids")||[];angular.forEach(t[0].attributes,function(t){g(t)&&t.value&&a.push(t.value)}),n.data("i18n-ids",a)};for(c=!0;f.length;)t=f.pop(),n=angular.element(t),a="OPTION"===t.nodeName?n.parent():n,r(a),d(a),h(n,a),a.data("translation-domain",i),n.attr(e,"true");c=!1},g=function(t){t.getAttribute(e)||f.push(t),f.length&&!c&&d()},h=function E(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t.querySelectorAll("["+r+"]");t.hasAttribute(r)&&g(t),angular.forEach(n,function(t){t.hasAttribute(r)?g(t):t.nodeType===Node.ELEMENT_NODE&&E(t)})}};return{restrict:"A",link:function(n,e){if(t.getTranslationMode()){var r=new a.MutationObserver(function(t){t.forEach(function(t){h(t.target)})});h(e[0]),r.observe(e[0],{childList:!0,subtree:!0})}}}}]);
  76. "use strict";angular.module("flAuth",["configs","flAnalytics","flCookies"]).factory("Auth",["$http","$q","$rootScope","$window","CookieStore","AUTH_BASE_URL","AUTH_TOKEN_COOKIE","USER_ID_COOKIE","FACEBOOK_APP_ID",function(e,t,r,n,a,o,s,u,i){var c={accessToken:a.get(s),userId:parseInt(a.get(u))},d={domain:n.location.hostname.match(/freelancer.*$/)?n.location.hostname.match(/freelancer.*$/)[0]:void 0,secure:"https"===n.location.protocol?!0:!1};return{login:function(t,r,n){var a=new FormData;a.append("user",t),a.append("password",r);var s=this;return e.post(o+"/login/",a,{headers:{"Content-Type":void 0},transformRequest:angular.identity}).then(function(e){return s.set(e.data.token,e.data.user,n),e.data})},reset:function(){c.accessToken=null,c.userId=null,a.remove(s,d),a.remove(u,d),"undefined"!=typeof Raven&&Raven.setUser(),r.$broadcast("user.logout")},set:function(e,t,n){c.accessToken=e,c.userId=parseInt(t);var o=d;o.expires=n?1209600:null,a.put(s,e,o),a.put(u,t,o),"undefined"!=typeof Raven&&Raven.setUser({id:c.userId}),r.$broadcast("user.login")},logout:function(){if(!this.isAuthenticated())return t.reject();var r=new FormData;r.append("user",c.userId),r.append("token",c.accessToken);var n=this;return e.post(o+"/logout/",r,{headers:{"Content-Type":void 0},transformRequest:angular.identity}).then(function(){n.reset()}).catch(function(e){return n.reset(),e})},isAuthenticated:function(){return c.userId&&c.accessToken},getUserId:function(){return c.userId},getAuthHeader:function(){return this.isAuthenticated()?c.userId+"; "+encodeURIComponent(c.accessToken):void 0},checkAuthenticated:function(){return this.isAuthenticated()?e.get(o+"/check/",{params:{user:c.userId,token:c.token}}).then(function(e){return e.data.expiry}):t.reject()},changePassword:function(r,n){if(!this.isAuthenticated())return t.reject();var a=new FormData;a.append("user",c.userId),a.append("old_password",r),a.append("new_password",n);var s=this;return e.post(o+"/change/",a,{headers:{"Content-Type":void 0},transformRequest:angular.identity}).then(function(e){s.set(e.data.token,e.data.user,!0)})},resetPassword:function(t){var r=new FormData;return r.append("email",t),e.post(o+"/forgot/",r,{headers:{"Content-Type":void 0},transformRequest:angular.identity})},loginWithFacebook:function(e){return this.OAuthLogin(i,"facebook",e.signedRequest)},OAuthLogin:function(t,r,n){var a=new FormData;a.append("app_id",t),a.append("oauth_type",r),a.append("credentials",n);var s=this;return e.post(o+"/login/oauth/",a,{headers:{"Content-Type":void 0},transformRequest:angular.identity}).then(function(e){return s.set(e.data.token,e.data.user,!0),e.data})}}}]).factory("AutoLogoutInterceptor",["$q","$injector",function(e,t){return{responseError:function(r){return 401===r.status&&-1===r.config.url.indexOf("/auth/login")&&t.invoke(["Auth",function(e){e.reset()}]),e.reject(r)}}}]).factory("RESTAuthInterceptor",["$injector","API_BASE_URL",function(e,t){return{request:function(r){return r.url.match(t)&&e.invoke(["Auth",function(e){r.headers["Freelancer-Auth-V2"]=e.getAuthHeader()}]),r}}}]).factory("AuthBackendInterceptor",["$q","$log","AUTH_BASE_URL","Analytics",function(e,t,r,n){return{response:function(a){if(a.config.url.match(r+"(?:[?/]|$)"))if(a.data&&"success"===a.data.status&&(a.config.url.match(/\/logout\/$/)||a.config.url.match(/\/forgot\/$/)));else{if(!a.data||"success"!==a.data.status||!a.data.result){t.error("auth: invalid server response: "+a.data);var o="INVALID_RESPONSE";return"undefined"!=typeof Raven&&Raven.captureMessage(o,{extra:{response:JSON.stringify(a.data),config:JSON.stringify(a.config),status:a.status,status_text:a.statusText}}),n.trackError("auth",a.config.method+" "+a.config.url,a.status,a.data),a.code=o,e.reject(a)}a.data=a.data.result}return a},responseError:function(a){if(a.config.url.match(r+"(?:[?/]|$)")){var o;if(a.data&&(a.data.error_code||a.data.message)){if(a.data.error_code&&"None"!==a.data.error_code){var s=a.data.error_code.match(/\.(.*$)/);o=s&&s[1]?s[1]:"INVALID_ERROR"}else if(a.data.message){switch(a.data.message){case"Incorrect username or password provided":o="INVALID_CREDENTIALS";break;case"Invalid user provided":o="INVALID_USER";break;case"Invalid token provided":o="INVALID_TOKEN";break;case"Cannot find a user with that email address":o="UNKNOWN_EMAIL";break;case"Unable to authenticate user":o="INVALID_USER";break;case"An error occured verifying OAuth token":o="INVALID_TOKEN";break;case"Invalid user credentials provided":o="UNKNOWN_EMAIL";break;case"User could not be found":o="INVALID_USER";break;case"Your new password is too weak. Please choose a better password":o="WEAK_PASSWORD";break;case"Invalid user credentials provided":o="INVALID_CREDENTIALS";break;case"You are performing too many requests.":o="TOO_MANY_REQUESTS"}o||(o="UNKNOWN_ERROR")}}else o="INVALID_RESPONSE",t.error("auth: invalid server response: "+a.data);return("UNKNOWN_ERROR"===o||"INVALID_RESPONSE"===o||"TOO_MANY_REQUESTS"===o)&&("undefined"!=typeof Raven&&Raven.captureMessage(o,{tags:{api:JSON.stringify(a.config.url)},extra:{response:JSON.stringify(a.data),config:JSON.stringify(a.config),status:a.status,status_text:a.statusText}}),n.trackError("auth",a.config.method+" "+a.config.url,a.status,a.data)),a.code=o,e.reject(a)}return e.reject(a)}}}]).config(["$httpProvider",function(e){e.interceptors.push("AutoLogoutInterceptor"),e.interceptors.push("RESTAuthInterceptor"),e.interceptors.push("AuthBackendInterceptor")}]);
  77. "use strict";angular.module("flCdn",["configs"]).factory("Cdn",["GAF_BASE_URL","GAF_CDN_URLS",function(B,D){var C="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D",A=function(B){for(var D=-1,A=0;A<B.length;A++)D=D>>>8^C[255&(D^B.charCodeAt(A))];return(-1^D)>>>0};return{getCdnUrl:function(C){if(D.length>0){var F=D[Math.abs(A(C))%D.length];return F+C}return B+C}}}]);
  78. "use strict";angular.module("flCookies",[]).factory("CookieStore",["$document",function(e){return{get:function(o){var t=new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(o).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),r=e[0].cookie.replace(t,"$1");return decodeURIComponent(r)||null},put:function(o,t,r){var n=encodeURIComponent(o)+"="+encodeURIComponent(t);if(r){if(r.expires){var i;switch(r.expires.constructor){case Number:if(1/0===r.expires)i="Fri, 31 Dec 9999 23:59:59 GMT";else{var a=new Date;a.setTime(a.getTime()+1e3*r.expires),i=a.toUTCString()}break;case String:i=r.expires;break;case Date:i=r.expires.toUTCString()}n+=";expires="+i}n+=r.domain?";domain="+r.domain:"",n+=r.path?";path="+r.path:";path=/",n+=r.secure?";secure":""}e[0].cookie=n},remove:function(e,o){var t=o||{};t.expires=new Date(0),this.put(e,"",t)}}}]);
  79. "use strict";angular.module("flNotifications",["flAnalytics"]).factory("Notifications",["Analytics","$q","$timeout","$window","$rootScope","$log","$rootElement",function(o,n,t,e,i,r,c){var a,f=[],l=n.defer();return l.promise.then(function(){a&&t.cancel(a)}).catch(function(){var n=c.attr("fl-app");r.error("libnotify could not be loaded by "+n),o.trackEvent("CheckJS","Console Error","app_name","libnotifyLoad",n,"libnotify could not be loaded")}),void 0!==e.libnotify?l.resolve(e.libnotify):(e.onLibNotifyLoadedCallback=function(o){l.resolve(o)},a=t(function(){l.reject()},2e4)),{listen:function(o,n){var t=o+":"+n;-1===f.indexOf(t)&&(f.push(t),l.promise.then(function(e){e.register(o,n,function(o){i.$broadcast(t,o)})}))},send:function(o,n){return l.promise.then(function(t){t.ready(function(){t.send(o,n)})})},promise:l.promise}}]);
  80. "use strict";angular.module("flUi",["configs","ngTouch","ngAnimate","ngSanitize"]);
  81. "use strict";angular.module("flUi").directive("flFileDrop",["$parse",function(e){return{restrict:"A",link:function(t,i,n){var l=e(n.flFileDrop);i[0].addEventListener("dragover",function(e){e.preventDefault()},!1),i[0].addEventListener("drop",function(e){e.preventDefault(),e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&l(t,{$files:e.dataTransfer.files,$event:e})},!1)}}}]).directive("flFileSelect",["$parse",function(e){return{restrict:"A",link:function(t,i,n){function l(e){var i=e.__files__||e.target.files;i&&i.length>0&&s(t,{$files:i,$event:e}),a.remove(),r()}function r(){a=angular.element('<input type="file">'),"true"===n.multiple&&a.attr("multiple","multiple"),a.css("width","1px").css("height","1px").css("opacity",0).css("position","absolute").css("filter","alpha(opacity=0)"),i.append(a),a.bind("change",l)}var a,s=e(n.flFileSelect);i.bind("click",function(){a[0].click()}),r()}}}]);
  82. "use strict";angular.module("flUi").directive("flScrollGlue",function(){return{restrict:"A",scope:{},require:["?^thread"],link:function(e,t,i,n){function c(){return l.scrollTop+l.clientHeight+1>=l.scrollHeight}function r(){return s?void(s=!1):void(e.active=c())}function o(){e.active&&!c()&&(s=!0,l.scrollTop=l.scrollHeight)}var l=t[0],u=n[0],s=!1;e.active=!0,u&&u.onMessageSent&&u.onMessageSent(function(){e.active=!0,o()}),t.bind("scroll",r),e.$parent.$watch(o)}}});
  83. "use strict";angular.module("flUi").directive("flNoScrollOverflow",function(){return{restrict:"A",scope:!1,link:function(e,l){l.bind("DOMMouseScroll mousewheel",function(e){var o=l[0],t=o.scrollTop,r=o.scrollHeight,i=o.clientHeight,n="DOMMouseScroll"===e.type?-40*e.originalEvent.detail:e.originalEvent.wheelDelta,c=n>0;return!c&&-n>r-i-t?(e.stopPropagation(),e.preventDefault(),o.scrollTop=r,!1):c&&n>t?(e.stopPropagation(),e.preventDefault(),o.scrollTop=0,!1):void 0})}}});
  84. "use strict";angular.module("flUrl",[]).factory("URLTools",function(){return{constructGetParameters:function(e){return Object.keys(e).map(function(n){return encodeURIComponent(n)+"="+encodeURIComponent(e[n])}).join("&")},decodeGetParameters:function(e){var n={};return e?("?"===e[0]&&(e=e.slice(1)),angular.forEach(e.split("&"),function(e){if(e){var o=e.split("="),t=o[0],r=o[1];n[decodeURIComponent(t)]=decodeURIComponent(r)}}),n):n}}});
  85. "use strict";angular.module("flUtils",["configs"]);
  86. "use strict";angular.module("flUtils").factory("Arrays",function(){return{contains:function(n,t){return void 0!==this.find(n,t)},addNonDuplicate:function(n,t,r){return(void 0===r||r>n.length)&&(r=n.length),this.contains(n,t)||n.splice(r,0,t),n},findWhere:function(n,t){for(var r=0;r<n.length;r++)if(t(n[r]))return r;return void 0},find:function(n,t){return this.findWhere(n,function(n){return angular.equals(n,t)})}}});
  87. "use strict";angular.module("flUtils").directive("flSvg",function(){return{restrict:"E",templateUrl:function(t,s){return s.src},link:function(t,s,r){r.class&&(s.find("svg").addClass(r.class),s.removeAttr("class"))}}});
  88. "use strict";angular.module("flUtils").directive("flRecompile",["$compile",function(e){return{scope:!0,compile:function(n){var t=angular.element("<a></a>").append(n.clone()).html();return function(n,r,a){var l=n.$parent.$watch(a.flRecompile,function(a,c){var i=!!n.$parent;if(i&&a!==c){var o=e(t)(n.$parent);r.replaceWith(o),l(),n.$destroy()}})}}}}]);
  89. "use strict";angular.module("flUtils").directive("flInstaClick",["$parse",function(n){return{compile:function(t,i){var c=n(i.flInstaClick);return function(n,t){t.on("click",function(t){c(n,{$event:t})})}}}}]);
  90. "use strict";angular.module("flWebrtc",[]).constant("WEBRTC_DISCONNECT_TIMEOUT",5e3).constant("WEBRTC_MEDIA_ERROR","WEBRTC_MEDIA_ERROR").constant("WEBRTC_STATS_INTERVAL_MS",1e4).factory("WebRTC",["$window",function(e){var n=e.navigator.getUserMedia||e.navigator.webkitGetUserMedia||e.navigator.mozGetUserMedia,i=e.RTCIceCandidate||e.webkitRTCIceCandidate||e.mozRTCIceCandidate,t=e.RTCPeerConnection||e.webkitRTCPeerConnection||e.mozRTCPeerConnection,o=e.RTCSessionDescription||e.webkitRTCSessionDescription||e.mozRTCSessionDescription,a=e.URL||e.webkitURL||e.mozURL;return{getUserMedia:function(){if(!n)throw new Error("WebRTC not supported in this browser");n.apply(e.navigator,arguments)},RTCIceCandidate:i,RTCPeerConnection:t,RTCSessionDescription:o,URL:a,isSupported:function(){return angular.isDefined(n)&&angular.isDefined(i)&&angular.isDefined(t)&&angular.isDefined(o)&&angular.isDefined(a)}}}]);
  91. "use strict";angular.module("flWebrtc").factory("WebRtcConnection",["$log","$rootScope","$q","$timeout","WebRTC","WebrtcStats","WebRtcStream",function(e,t,n,c,i,o,r){return function(a,d){var u,s,f=!1,l=n.defer(),h=n.defer(),g=n.defer(),v=n.defer(),m=n.defer(),p=new i.RTCPeerConnection(a),b=null;return p.onaddstream=function(t){e.debug("videochat: onaddstream callback:",t);var n=t.stream;l.resolve(n),b=o(p)},p.onicecandidate=function(n){e.debug("videochat: onicecandidate callback:",n);var c=n.candidate;if(c){var i={candidate:c.candidate,sdpMid:c.sdpMid,sdpMLineIndex:c.sdpMLineIndex};t.$broadcast("webrtc:iceCandidate",i)}},p.oniceconnectionstatechange=function(){e.debug("RTCPeerConnection iceConnectionState change occurred",p.iceConnectionState),"checking"===p.iceConnectionState?(e.debug("videochat: icsc: creating checking timeout"),s=c(function(){e.debug("videochat: rejecting iceCheckingTimeoutDeferred"),m.reject()},d)):"connected"===p.iceConnectionState&&(e.debug("videochat: icsc: cancelling checking timeout"),c.cancel(s),m.resolve()),"disconnected"===p.iceConnectionState?(e.debug("videochat: creating disconnect timeout"),d&&"number"==typeof d&&(u=c(function(){e.debug("videochat: resolving connectionTimeoutDeferred"),v.resolve()},d))):u&&(c.cancel(u),u=void 0)},{addIceCandidate:function(t){var c={};for(var o in t){var r=t[o];t.hasOwnProperty(o)&&void 0!==r&&null!==r&&(c[o]=t[o])}var a=new i.RTCIceCandidate(c);return n.all([this.localDescription(),this.remoteDescription()]).then(function(){try{p.addIceCandidate(a)}catch(t){e.error(t)}})},setLocalDescription:function(t){e.debug("videochat: setLocalDescription");var c=n.defer();return f?c.reject("Local description is already set, cannot make another SDP offer or answer"):p.setLocalDescription(t,function(){c.resolve()},function(e){c.reject(e)}),c.promise.then(function(){f=!0,h.resolve()})},setRemoteDescription:function(t,n){return e.debug("videochat: setRemoteDescription",t),r.get().then(function(e){n||p.addStream(e),p.setRemoteDescription(new i.RTCSessionDescription(t),function(){g.resolve()},function(e){g.reject(e)})}),g.promise},createOffer:function(){e.debug("videochat: createOffer");var t=n.defer(),c=this;return r.get().then(function(e){p.addStream(e),p.createOffer(function(e){c.setLocalDescription(e).then(function(){t.resolve(e)}).catch(function(e){t.reject(e)})},function(e){t.reject(e)})}),t.promise},createAnswer:function(){e.debug("videochat: createAnswer");var t=n.defer(),c=this;return r.get().then(function(){p.createAnswer(function(e){c.setLocalDescription(e).then(function(){t.resolve(e)}).catch(function(e){t.reject(e)})},function(e){t.reject(e)})}),t.promise},getConnectionState:function(){return p.iceConnectionState},getStats:function(){return b?b.fetchingStats():n.when()},getOtherUserStream:function(){return l.promise},connectionTimeout:function(){return v.promise},iceCheckingTimeout:function(){return m.promise},localDescription:function(){return h.promise},remoteDescription:function(){return g.promise},close:function(){p.close()}}}}]);
  92. "use strict";angular.module("flWebrtc").factory("WebRtcStream",["$log","$q","WebRTC","WEBRTC_MEDIA_ERROR",function(e,r,t,o){var i;return{get:function(n){function u(e){i.resolve(e)}function a(r){e.debug("Videochat: Failed to fetch stream ",r),i.reject(o)}if(i)return i.promise;i=r.defer();var c=n||{video:!0,audio:!0};return t.getUserMedia(c,u,a),i.promise}}}]);
  93. "use strict";angular.module("flWebrtc").factory("WebrtcStats",["$q","$window",function(e,t){return function(o){var s={audio:{},video:{}},i=s.audio,c=s.video;return{getStats:function(){return s},getKilobytesPerSecond:function(e,t){var o,i,c;return s.fetchedAt?(o=(new Date).getTime(),c=(o-s.fetchedAt)/1e3,i=e-t,i/(1024*c)):null},getRemoteVideoTrack:function(){return o.getRemoteStreams()[0].getVideoTracks()[0]},getRemoteAudioTrack:function(){return o.getRemoteStreams()[0].getAudioTracks()[0]},getLocalVideoTrack:function(){return o.getLocalStreams()[0].getVideoTracks()[0]},getLocalAudioTrack:function(){return o.getLocalStreams()[0].getAudioTracks()[0]},gettingMozLocalAudioStats:function(){function t(e){"outboundrtp"===e.type&&(i.sentKilobytesPerSecond=s.getKilobytesPerSecond(e.bytesSent,i.bytesSent),i.bytesSent=e.bytesSent,i.packetsSent=e.packetsSent)}var s=this,c=e.defer(),n=this.getLocalAudioTrack();return o.getStats(n,function(e){e.forEach(t),c.resolve()},c.reject),c.promise},gettingMozLocalVideoStats:function(){function t(e){"outboundrtp"===e.type&&(c.sentKilobytesPerSecond=s.getKilobytesPerSecond(e.bytesSent,c.bytesSent),c.bytesSent=e.bytesSent,c.packetsSent=e.packetsSent)}var s=this,i=e.defer(),n=this.getLocalVideoTrack();return o.getStats(n,function(e){e.forEach(t),i.resolve()},i.reject),i.promise},gettingMozRemoteAudioStats:function(){function t(e){"inboundrtp"===e.type&&(i.recvKilobytesPerSecond=s.getKilobytesPerSecond(e.bytesReceived,i.bytesReceived),i.bytesReceived=e.bytesReceived,i.packetsReceived=e.packetsReceived,i.packetsLostInReceive=e.packetsLost,i.jitter=e.jitter)}var s=this,c=this.getRemoteAudioTrack(),n=e.defer();return o.getStats(c,function(e){e.forEach(t),n.resolve()},n.reject),n.promise},gettingMozRemoteVideoStats:function(){function t(e){"inboundrtp"===e.type&&(c.recvKilobytesPerSecond=s.getKilobytesPerSecond(e.bytesReceived,c.bytesReceived),c.bytesReceived=e.bytesReceived,c.bitsSecondReceivedMean=e.bitrateMean,c.bitsSecondReceivedStdDev=e.bitrateStdDev,c.jitter=e.jitter,c.packetsReceived=e.packetsReceived,c.packetsLostInReceive=e.packetsLost)}var s=this,i=this.getRemoteVideoTrack(),n=e.defer();return o.getStats(i,function(e){e.forEach(t),n.resolve()},n.reject),n.promise},gettingMozStats:function(){var t=this.gettingMozLocalAudioStats(),o=this.gettingMozLocalVideoStats(),s=this.gettingMozRemoteAudioStats(),i=this.gettingMozRemoteVideoStats();return e.all([t,o,s,i])},gettingChromeStats:function(){function t(e){var t,o,s=e.stat("googTrackId"),r="ssrc"===e.type;s===n.getRemoteAudioTrack().id&&r?(t=e.stat("bytesReceived"),i.recvKilobytesPerSecond=n.getKilobytesPerSecond(t,i.bytesReceived),i.bytesReceived=t,i.packetsReceived=e.stat("packetsReceived"),i.packetsLostInReceive=e.stat("packetsLost")):s===n.getLocalAudioTrack().id&&r?(o=e.stat("bytesSent"),i.sentKilobytesPerSecond=n.getKilobytesPerSecond(o,i.bytesSent),i.bytesSent=o,i.packetsSent=e.stat("packetsSent"),i.packetsLostInSend=e.stat("packetsLost")):s===n.getRemoteVideoTrack().id&&r?(t=e.stat("bytesReceived"),c.recvKilobytesPerSecond=n.getKilobytesPerSecond(t,c.bytesReceived),c.bytesReceived=t,c.resWidthReceived=e.stat("googFrameWidthReceived"),c.resHeightReceived=e.stat("googFrameHeightReceived"),c.packetsReceived=e.stat("packetsReceived"),c.packetsLostInReceive=e.stat("packetsLost")):s===n.getLocalVideoTrack().id&&r&&(o=e.stat("bytesSent"),c.sentKilobytesPerSecond=n.getKilobytesPerSecond(o,c.bytesSent),c.bytesSent=o,c.resWidthSent=e.stat("googFrameWidthSent"),c.resHeightSent=e.stat("googFrameHeightSent"),c.packetsSent=e.stat("packetsSent"),c.packetsLostInSend=e.stat("packetsLost"))}var s=e.defer(),n=this;return o.getStats(function(e){e.result().forEach(t),s.resolve()}),s.promise},fetchingStats:function(){var e;return e=t.navigator.mozGetUserMedia?this.gettingMozStats():this.gettingChromeStats(),e.then(function(){return s.fetchedAt=(new Date).getTime(),s})}}}}]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement