1/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */�
vendor: 32,039 bytes, lines 1-2
1 2!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
2 3�
vendor: 7,281 bytes, lines 3-4
3 4return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{}
vendor: 1,726 bytes, line 4
4,e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>
vendor: 23,002 bytes, line 4
4=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
4�
vendor: 31,824 bytes, lines 4-5
4 5return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
5 6 7;;;/* 8 AngularJS v1.5.5 9 (c) 2010-2016 Google, Inc. http://angularjs.org 10 License: MIT 11*/ 12(function(v){'use strict';function O(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.5/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function ya(a){if(null==a||Va(a))return!1;if(K(a)||F(a)||B&&a instanceof B)return!0; 13var b="length"in Object(a)&&a.length;return Q(b)&&(0<=b&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function q(a,b,d){var c,e;if(a)if(E(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(K(a)||ya(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}
vendor: 9,927 bytes, lines 13-32
13else if(a.forEach&&a.forEach!==q)a.forEach(b,d,a);else if(oc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&& 14b.call(d,a[c],c,a);else for(c in a)ua.call(a,c)&&b.call(d,a[c],c,a);return a}function pc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function qc(a){return function(b,d){a(d,b)}}function Xd(){return++nb}function Nb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(G(g)||E(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var n=h[k],m=g[n];d&&G(m)?fa(m)?a[n]=new Date(m.valueOf()):Wa(m)?a[n]=new RegExp(m):m.nodeName?a[n]=m.cloneNode(!0): 15Ob(m)?a[n]=m.clone():(G(a[n])||(a[n]=K(m)?[]:{}),Nb(a[n],[m],!0)):a[n]=m}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function R(a){return Nb(a,za.call(arguments,1),!1)}function Yd(a){return Nb(a,za.call(arguments,1),!0)}function X(a){return parseInt(a,10)}function Pb(a,b){return R(Object.create(a),b)}function C(){}function Xa(a){return a}function da(a){return function(){return a}}function rc(a){return E(a.toString)&&a.toString!==ma}function y(a){return"undefined"===typeof a}function x(a){return"undefined"!== 16typeof a}function G(a){return null!==a&&"object"===typeof a}function oc(a){return null!==a&&"object"===typeof a&&!sc(a)}function F(a){return"string"===typeof a}function Q(a){return"number"===typeof a}function fa(a){return"[object Date]"===ma.call(a)}function E(a){return"function"===typeof a}function Wa(a){return"[object RegExp]"===ma.call(a)}function Va(a){return a&&a.window===a}function Ya(a){return a&&a.$evalAsync&&a.$watch}function Da(a){return"boolean"===typeof a}function Zd(a){return a&&Q(a.length)&& 17$d.test(ma.call(a))}function Ob(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function va(a){return P(a.nodeName||a[0]&&a[0].nodeName)}function Za(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function qa(a,b){function d(a,b){var d=b.$$hashKey,e;if(K(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(oc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&& 18(b[e]=c(a[e]));else for(e in a)ua.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!G(a))return a;var b=f.indexOf(a);if(-1!==b)return g[b];if(Va(a)||Ya(a))throw Aa("cpws");var b=!1,c=e(a);void 0===c&&(c=K(a)?[]:Object.create(sc(a)),b=!0);f.push(a);g.push(c);return b?d(a,c):c}function e(a){switch(ma.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(c(a.buffer)); 19case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(E(a.cloneNode))return a.cloneNode(!0)}var f=[], 20g=[];if(b){if(Zd(b)||"[object ArrayBuffer]"===ma.call(b))throw Aa("cpta");if(a===b)throw Aa("cpi");K(b)?b.length=0:q(b,function(a,d){"$$hashKey"!==d&&delete b[d]});f.push(a);g.push(b);return d(a,b)}return c(a)}function ha(a,b){if(K(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(G(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function pa(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&& 21"object"==d)if(K(a)){if(!K(b))return!1;if((d=a.length)==b.length){for(c=0;c<d;c++)if(!pa(a[c],b[c]))return!1;return!0}}else{if(fa(a))return fa(b)?pa(a.getTime(),b.getTime()):!1;if(Wa(a))return Wa(b)?a.toString()==b.toString():!1;if(Ya(a)||Ya(b)||Va(a)||Va(b)||K(b)||fa(b)||Wa(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!E(a[c])){if(!pa(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&x(b[c])&&!E(b[c]))return!1;return!0}return!1}function $a(a,b,d){return a.concat(za.call(b, 22d))}function tc(a,b){var d=2<arguments.length?za.call(arguments,2):[];return!E(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,$a(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function be(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:Va(b)?d="$WINDOW":b&&v.document===b?d="$DOCUMENT":Ya(b)&&(d="$SCOPE");return d}function ab(a,b){if(!y(a))return Q(b)||(b=b?2:null),JSON.stringify(a,be, 23b)}function uc(a){return F(a)?JSON.parse(a):a}function vc(a,b){a=a.replace(ce,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Qb(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=vc(b,c);d*=b-c;a=new Date(a.getTime());a.setMinutes(a.getMinutes()+d);return a}function wa(a){a=B(a).clone();try{a.empty()}catch(b){}var d=B("<div>").append(a).html();try{return a[0].nodeType===Ma?P(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+P(b)})}catch(c){return P(d)}} 24function wc(a){try{return decodeURIComponent(a)}catch(b){}}function xc(a){var b={};q((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),x(e)&&(f=x(f)?wc(f):!0,ua.call(b,e)?K(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Rb(a){var b=[];q(a,function(a,c){K(a)?q(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""} 25function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function de(a,b){var d,c,e=Na.length;for(c=0;c<e;++c)if(d=Na[c]+b,F(d=a.getAttribute(d)))return d;return null}function ee(a,b){var d,c,e={};q(Na,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))}); 26q(Na,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==de(d,"strict-di"),b(d,c?[c]:[],e))}function yc(a,b,d){G(d)||(d={});d=R({strictDi:!1},d);var c=function(){a=B(a);if(a.injector()){var c=a[0]===v.document?"document":wa(a);throw Aa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]); 27b.unshift("ng");c=bb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;v&&e.test(v.name)&&(d.debugInfoEnabled=!0,v.name=v.name.replace(e,""));if(v&&!f.test(v.name))return c();v.name=v.name.replace(f,"");ea.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};E(ea.resumeDeferredBootstrap)&&ea.resumeDeferredBootstrap()}function fe(){v.name= 28"NG_ENABLE_DEBUG_INFO!"+v.name;v.location.reload()}function ge(a){a=ea.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(he,function(a,c){return(c?b:"")+a.toLowerCase()})}function ie(){var a;if(!Ac){var b=pb();(Z=y(b)?v.jQuery:b?v[b]:void 0)&&Z.fn.on?(B=Z,R(Z.fn,{scope:Oa.scope,isolateScope:Oa.isolateScope,controller:Oa.controller,injector:Oa.injector,inheritedData:Oa.inheritedData}),a=Z.cleanData,Z.cleanData=function(b){for(var c, 29e=0,f;null!=(f=b[e]);e++)(c=Z._data(f,"events"))&&c.$destroy&&Z(f).triggerHandler("$destroy");a(b)}):B=U;ea.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Pa(a,b,d){d&&K(a)&&(a=a[a.length-1]);qb(E(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Qa(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c= 30b[g],a&&(a=(e=a)[c]);return!d&&E(a)?tc(e,a):a}function rb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=B(za.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function je(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=O("$injector"),c=O("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||O;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&& 31(a[f]=null);return b(a,f,function(){function a(b,d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return M}}function b(a,d){return function(b,e){e&&E(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return M}}if(!g)throw d("nomod",f);var c=[],e=[],r=[],N=a("$injector","invoke","push",e),M={_invokeQueue:c,_configBlocks:e,_runBlocks:r,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide", 32"constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:N,run:function(a){r.push(a);return this}};h&&N(h);return M})}})}function ke(a){R(a,{bootstrap:yc,copy:qa,extend:R,merge:Yd,equals:pa,element:B,forEac
32h:q,injector:bb,noop:C,bind:tc,toJson:ab,fromJson:uc,identity:Xa,isUndefined:y, 33isDefined:x,isString:F,isFunction:E,isObject:G,isNumber:Q,isElement:Ob,isArray:K,version:le,isDate:fa,lowercase:P,uppercase:sb,callbacks:{counter:0},getTestability:ge,$$minErr:O,$$csp:Ea,reloadWithDebugInfo:fe});Sb=je(v);Sb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:me});a.provider("$compile",Cc).directive({a:ne,input:Dc,textarea:Dc,form:oe,script:pe,select:qe,style:re,option:se,ngBind:te,ngBindHtml:ue,ngBindTemplate:ve,ngClass:we,ngClassEven:xe,ngClassOdd:ye,ngCloak:ze,ngController:Ae, 34ngForm:Be,ngHide:Ce,ngIf:De,ngInclude:Ee,ngInit:Fe,ngNonBindable:Ge,ngPluralize:He,ngRepeat:Ie,ngShow:Je,ngStyle:Ke,ngSwitch:Le,ngSwitchWhen:Me,ngSwitchDefault:Ne,ngOptions:Oe,ngTransclude:Pe,ngModel:Qe,ngList:Re,ngChange:Se,pattern:Ec,ngPattern:Ec,required:Fc,ngRequired:Fc,minlength:Gc,ngMinlength:Gc,maxlength:Hc,ngMaxlength:Hc,ngValue:Te,ngModelOptions:Ue}).directive({ngInclude:Ve}).directive(tb).directive(Ic);a.provider({$anchorScroll:We,$animate:Xe,$animateCss:Ye,$$animateJs:Ze,$$animateQueue:$e, 35$$AnimateRunner:af,$$animateAsyncRun:bf,$browser:cf,$cacheFactory:df,$controller:ef,$document:ff,$exceptionHandler:gf,$filter:Jc,$$forceReflow:hf,$interpolate:jf,$interval:kf,$http:lf,$httpParamSerializer:mf,$httpParamSerializerJQLike:nf,$httpBackend:of,$xhrFactory:pf,$location:qf,$log:rf,$parse:sf,$rootScope:tf,$q:uf,$$q:vf,$sce:wf,$sceDelegate:xf,$sniffer:yf,$templateCache:zf,$templateRequest:Af,$$testability:Bf,$timeout:Cf,$window:Df,$$rAF:Ef,$$jqLite:Ff,$$HashMap:Gf,$$cookieReader:Hf})}])}function cb(a){return a.replace(If, 36function(a,d,c,e){return e?c.toUpperCase():c}).replace(Jf,"Moz$1")}function Kc(a){a=a.nodeType;return 1===a||!a||9===a}function Lc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Tb.test(a)){d=d||e.appendChild(b.createElement("div"));c=(Kf.exec(a)||["",""])[1].toLowerCase();c=ia[c]||ia._default;d.innerHTML=c[1]+a.replace(Lf,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=$a(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";q(f,function(a){e.appendChild(a)}); 37return e}function Mc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)}function U(a){if(a instanceof U)return a;var b;F(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new U(a)}if(b){b=v.document;var d;a=(d=Mf.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Nc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||db(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)db(d[c])}function Oc(a, 38b,d,c){if(x(c))throw Ub("offargs");var e=(c=vb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];x(d)&&Za(c||[],d);x(d)&&c&&0<c.length||(a.removeEventListener(b,f,!1),delete e[b])};q(b.split(" "),function(a){g(a);wb[a]&&g(wb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function db(a,b){var d=a.ng339,c=d&&eb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Oc(a)),delete eb[d],a.ng339=void 0))}function vb(a,b){var d= 39a.ng339,d=d&&eb[d];b&&!d&&(a.ng339=d=++Nf,d=eb[d]={events:{},data:{},handle:void 0});return d}function Wb(a,b,d){if(Kc(a)){var c=x(d),e=!c&&b&&!G(b),f=!b;a=(a=vb(a,!e))&&a.data;if(c)a[b]=d;else{if(f)return a;
vendor: 5,380 bytes, lines 39-49
39if(e)return a&&a[b];R(a,b)}}}function xb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function yb(a,b){b&&a.setAttribute&&q(b.split(" "),function(b){a.setAttribute("class",V((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g, 40" ").replace(" "+V(b)+" "," ")))})}function zb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(b.split(" "),function(a){a=V(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",V(d))}}function Nc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Pc(a,b){return Ab(a,"$"+(b||"ngController")+"Controller")}function Ab(a, 41b,d){9==a.nodeType&&(a=a.documentElement);for(b=K(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(x(d=B.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function Qc(a){for(ub(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Bb(a,b){b||ub(a);var d=a.parentNode;d&&d.removeChild(a)}function Of(a,b){b=b||v;if("complete"===b.document.readyState)b.setTimeout(a);else B(b).on("load",a)}function Rc(a,b){var d=Cb[b.toLowerCase()];return d&&Sc[va(a)]&&d}function Pf(a,b){var d=function(c, 42d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(y(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||Qf;1<g&&(f=ha(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem= 43a;return d}function Qf(a,b,d){d.call(a,b)}function Rf(a,b,d){var c=b.relatedTarget;c&&(c===a||Sf.call(a,c))||d.call(a,b)}function Ff(){this.$get=function(){return R(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return xb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return yb(a,b)}})}}function Fa(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey= 44d+":"+(b||Xd)():d+":"+a}function Ra(a,b){if(b){var d=0;this.nextUid=function(){return++d}}q(a,this.put,this)}function Tc(a){a=Function.prototype.toString.call(a).replace(Tf,"");return a.match(Uf)||a.match(Vf)}function Wf(a){return(a=Tc(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function bb(a,b){function d(a){return function(b,c){if(G(b))q(b,qc(a));else return a(b,c)}}function c(a,b){Qa(a,"service");if(E(b)||K(b))b=r.instantiate(b);if(!b.$get)throw Ga("pget",a);return m[a+"Provider"]= 45b}function e(a,b){return function(){var c=w.invoke(b,this);if(y(c))throw Ga("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){qb(y(a)||K(a),"modulesToLoad","not an array");var b=[],c;q(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=r.get(e[0]);f[e[1]].apply(f,e[2])}}if(!n.get(a)){n.put(a,!0);try{F(a)?(c=Sb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):E(a)?b.push(r.invoke(a)):K(a)?b.push(r.invoke(a)): 46Pa(a,"module")}catch(e){throw K(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ga("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===k)throw Ga("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=bb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h]; 47if("string"!==typeof l)throw Ga("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);K(a)&&(a=a[a.length-1]);d=11>=Ca?!1:"function"===typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a));return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=K(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d, 48a))},get:d,annotate:bb.$$annotate,has:function(b){return m.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],n=new Ra([],!0),m={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,da(b),!1)}),constant:d(function(a,b){Qa(a,"constant");m[a]=b;N[a]=b}),decorator:function(a,b){var c=r.get(a+"Provider"),d=c.$get;c.$get=function(){var a=w.invoke(d,c);return w.invoke(b,null, 49{$delegate:a})}}}},r=m.$injector=h(m,function(a,b){ea.isString(b)&&l.push(b);throw Ga("unpr",l.join(" <- "));}),N={},M=h(N,function(a,b){var c=r.get(a+"Provider",b);return w.invoke(c.$get,c,void 0,a)}),w=M;m.$injectorProvider={$get:da(M)};var p=g(a),w=M.get("$injector");w.strictDi=b;q(p,function(a){a&&w.invoke(a)});return w}function We(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,
50function(a){if("a"===va(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;E(c)?c=c():Ob(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=F(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a=== 51b&&""===a||Of(function(){c.$evalAsync(g)})});return g}]}function fb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;K(a)&&(a=a.join(" "));K(b)&&(b=b.join(" "));return a+" "+b}function Xf(a){F(a)&&(a=a.split(" "));var b=T();q(a,function(a){a.length&&(b[a]=!0)});return b}function Ha(a){return G(a)?a:{}}function Yf(a,b,d,c){function e(a){try{a.apply(null,za.call(arguments,1))}finally{if(M--,0===M)for(;w.length;)try{w.pop()()}catch(b){d.error(b)}}}function f(){u=null;g();h()}function g(){p=I(); 52p=y(p)?null:p;pa(p,L)&&(p=L);L=p}function h(){if(t!==k.url()||H!==p)t=k.url(),H=p,q(J,function(a){a(k.url(),p)})}var k=this,l=a.location,n=a.history,m=a.setTimeout,r=a.clearTimeout,N={};k.isMock=!1;var M=0,w=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){M++};k.notifyWhenNoOutstandingRequests=function(a){0===M?a():w.push(a)};var p,H,t=l.href,z=b.find("base"),u=null,I=c.history?function(){try{return n.state}catch(a){}}:C;g();H=p;k.url=function(b,d,e){y(e)&&(e=null);l!== 53a.location&&(l=a.location);n!==a.history&&(n=a.history);if(b){var f=H===e;if(t===b&&(!c.history||f))return k;var h=t&&Ia(t)===Ia(b);t=b;H=e;if(!c.history||h&&f){if(!h||u)u=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(u=b)}else n[d?"replaceState":"pushState"](e,"",b),g(),H=p;return k}return u||l.href.replace(/%27/g,"'")};k.state=function(){return p};var J=[],D=!1,L=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange", 54f);D=!0}J.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=z.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;M++;c=m(function(){delete N[c];e(a)},b||0);N[c]=!0;return c};k.defer.cancel=function(a){return N[a]?(delete N[a],r(a),e(C),!0):!1}}function cf(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Yf(a,c,b,d)}]}function df(){this.$get= 55function(){function a(a,c){function e(a){a!=m&&(r?r==a&&(r=a.n):r=a,f(a.n,a.p),f(a,m),m=a,m.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw O("$cacheFactory")("iid",a);var g=0,h=R({},c,{id:a}),k=T(),l=c&&c.capacity||Number.MAX_VALUE,n=T(),m=null,r=null;return b[a]={put:function(a,b){if(!y(b)){if(l<Number.MAX_VALUE){var c=n[a]||(n[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(r.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=n[a];if(!b)return;e(b)}return k[a]}, 56remove:function(a){if(l<Number.MAX_VALUE){var b=n[a];if(!b)return;b==m&&(m=b.p);b==r&&(r=b.n);f(b.n,b.p);delete n[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=T();g=0;n=T();m=r=null},destroy:function(){n=h=k=null;delete b[a]},info:function(){return R({},h,{size:g})}}}var b={};a.info=function(){var a={};q(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function zf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Cc(a,b){function d(a, 57b,c){var d=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,e=T();q(a,function(a,f){if(a in n)e[f]=n[a];else{var g=a.match(d);if(!g)throw ga("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(n[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==P(b))throw ga("baddir",a);if(a!==a.trim())throw ga("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/, 58h=ae("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/,n=T();this.directive=function M(b,d){Qa(b,"directive");F(b)?(c(b),qb(d,"directiveFactory"),e.hasOwnProperty(b)||(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];q(e[b],function(e,f){try{var g=a.invoke(e);E(g)?g={compile:da(g)}:!g.compile&&g.link&&(g.compile=da(g.link));g.priority=g.priority||0;g.index=f;g.name=g.name||b;g.require=g.require||g.controller&&g.name;g.restrict= 59g.restrict||"EA";g.$$moduleName=e.$$moduleName;d.push(g)}catch(h){c(h)}});return d}])),e[b].push(d)):q(b,qc(M));return this};this.component=function(a,b){function c(a){function e(b){return E(b)||K(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Uc(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E", 60require:b.require};q(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}var d=b.controller||function(){};q(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,E(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return x(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return x(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var m=!0;this.debugInfoEnabled= 61function(a){return x(a)?(m=a,this):m};var r=10;this.onChangesTtl=function(a){return arguments.length?(r=a,this):r};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(a,b,c,n,t,z,u,I,J,D){function L(){try{if(!--qa)throw Z=void 0,ga("infchng",r);u.$apply(function(){for(var a=0,b=Z.length;a<b;++a)Z[a]();Z=void 0})}finally{qa++}}function S(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d< 62e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function $(a,b,c){na.innerHTML="<span "+b+">";b=na.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function A(a,b){try{a.addClass(b)}catch(c){}}function ba(a,b,c,d,e){a instanceof B||(a=B(a));for(var f=/\S+/,g=0,h=a.length;g<h;g++){var k=a[g];k.nodeType===Ma&&k.nodeValue.match(f)&&Mc(k,a[g]=v.document.createElement("span"))}var l=s(a,b,a,c,d,e);ba.$$addScopeClass(a);var m=null;return function(b, 63c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var f=d.parentBoundTranscludeFn,g=d.transcludeControllers;d=d.futureParentElement;f&&f.$$boundTransclude&&(f=f.$$boundTransclude);
vendor: 5,613 bytes, lines 63-74
63m||(m=(d=d&&d[0])?"foreignobject"!==va(d)&&ma.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==m?B(ca(m,B("<div>").append(a).html())):c?Oa.clone.call(a):a;if(g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);ba.$$addScopeInfo(d,b);c&&c(d,b);l&&l(b,d,d,f);return d}}function s(a,b,c,d,e,f){function g(a, 64c,d,e){var f,k,l,m,n,t,p;if(r)for(p=Array(c.length),m=0;m<h.length;m+=3)f=h[m],p[f]=c[f];else p=c;m=0;for(n=h.length;m<n;)k=p[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),ba.$$addScopeInfo(B(k),l)):l=a,t=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,t)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k,l,m,n,r,t=0;t<a.length;t++){k=new S;l=x(a[t],[],k,0===t?d:void 0,e);(f=l.length?Ba(l,a[t],k,b,c,null,[],[],f):null)&&f.scope&&ba.$$addScopeClass(k.$$element); 65k=f&&f.terminal||!(m=a[t].childNodes)||!m.length?null:s(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(t,f,k),n=!0,r=r||f;f=null}return n?g:null}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function x(a,b,c,d,e){var h=c.$attr,k;switch(a.nodeType){case 1:la(b, 66xa(va(a)),"E",d,e);for(var l,m,n,t=a.attributes,r=0,p=t&&t.length;r<p;r++){var I=!1,D=!1;l=t[r];k=l.name;m=V(l.value);l=xa(k);if(n=ya.test(l))k=k.replace(Vc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(Aa))&&Q(l[1])&&(I=k,D=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6));l=xa(k.toLowerCase());h[l]=k;if(n||!c.hasOwnProperty(l))c[l]=m,Rc(a,l)&&(c[l]=!0);fa(a,b,m,l,n);la(b,l,"A",d,e,I,D)}a=a.className;G(a)&&(a=a.animVal);if(F(a)&&""!==a)for(;k=g.exec(a);)l=xa(k[2]), 67la(b,l,"C",d,e)&&(c[l]=V(k[3])),a=a.substr(k.index+k[0].length);break;case Ma:if(11===Ca)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Ma;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);X(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=xa(k[1]),la(b,l,"M",d,e)&&(c[l]=V(k[2]))}catch(J){}}b.sort(Y);return b}function Wc(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ga("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&& 68e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function Xc(a,b,c){return function(d,e,f,g,h){e=Wc(e[0],b,c);return a(d,e,f,g,h)}}function Yb(a,b,c,d,e,f){var g;return a?ba(b,c,d,e,f):function(){g||(g=ba(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function Ba(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=Xc(a,c,d));a.require=A.require;a.directiveName=M;if(D===A||A.$$isolateScope)a=ha(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Xc(b,c,d)); 69b.require=A.require;b.directiveName=M;if(D===A||A.$$isolateScope)b=ha(b,{isolateScope:!0});k.push(b)}}function n(a,c,e,f,g){function l(a,b,c,d){var e;Ya(a)||(d=c,c=b,b=a,a=void 0);H&&(e=u);c||(c=H?z.parent():z);if(d){var f=g.$$slots[d];if(f)return f(a,b,e,c,$);if(y(f))throw ga("noslot",d,wa(z));}else return g(a,b,e,c,$)}var m,t,p,A,w,u,L,z;b===e?(f=d,z=d.$$element):(z=B(e),f=new S(z,d));w=c;D?A=c.$new(!0):r&&(w=c.$parent);g&&(L=l,L.$$boundTransclude=g,L.isSlotFilled=function(a){return!!g.$$slots[a]}); 70I&&(u=O(z,f,L,I,A,c,D));D&&(ba.$$addScopeInfo(z,A,!0,!(J&&(J===D||J===D.$$originalDirective))),ba.$$addScopeClass(z,!0),A.$$isolateBindings=D.$$isolateBindings,t=ia(c,f,A,A.$$isolateBindings,D),t.removeWatches&&A.$on("$destroy",t.removeWatches));for(m in u){t=I[m];p=u[m];var Xb=t.$$bindings.bindToController;p.bindingInfo=p.identifier&&Xb?ia(w,f,p.instance,Xb,t):{};var M=p();M!==p.instance&&(p.instance=M,z.data("$"+t.name+"Controller",M),p.bindingInfo.removeWatches&&p.bindingInfo.removeWatches(),p.bindingInfo= 71ia(w,f,p.instance,Xb,t))}q(I,function(a,b){var c=a.require;a.bindToController&&!K(c)&&G(c)&&R(u[b].instance,gb(b,c,z,u))});q(u,function(a){var b=a.instance;E(b.$onChanges)&&b.$onChanges(a.bindingInfo.initialChanges);E(b.$onInit)&&b.$onInit();E(b.$onDestroy)&&w.$on("$destroy",function(){b.$onDestroy()})});m=0;for(t=h.length;m<t;m++)p=h[m],ja(p,p.isolateScope?A:c,z,f,p.require&&gb(p.directiveName,p.require,z,u),L);var $=c;D&&(D.template||null===D.templateUrl)&&($=A);a&&a($,e.childNodes,void 0,g);for(m= 72k.length-1;0<=m;m--)p=k[m],ja(p,p.isolateScope?A:c,z,f,p.require&&gb(p.directiveName,p.require,z,u),L);q(u,function(a){a=a.instance;E(a.$postLink)&&a.$postLink()})}l=l||{};for(var t=-Number.MAX_VALUE,r=l.newScopeDirective,I=l.controllerDirectives,D=l.newIsolateScopeDirective,J=l.templateDirective,w=l.nonTlbTranscludeDirective,u=!1,L=!1,H=l.hasElementTranscludeDirective,z=d.$$element=B(b),A,M,$,s=e,Sa,ka=!1,C=!1,v,F=0,Ba=a.length;F<Ba;F++){A=a[F];var P=A.$$start,Q=A.$$end;P&&(z=Wc(b,P,Q));$=void 0; 73if(t>A.priority)break;if(v=A.scope)A.templateUrl||(G(v)?(W("new/isolated scope",D||r,A,z),D=A):W("new/isolated scope",D,A,z)),r=r||A;M=A.name;if(!ka&&(A.replace&&(A.templateUrl||A.template)||A.transclude&&!A.$$tlb)){for(v=F+1;ka=a[v++];)if(ka.transclude&&!ka.$$tlb||ka.replace&&(ka.templateUrl||ka.template)){C=!0;break}ka=!0}!A.templateUrl&&A.controller&&(v=A.controller,I=I||T(),W("'"+M+"' controller",I[M],A,z),I[M]=A);if(v=A.transclude)if(u=!0,A.$$tlb||(W("transclusion",w,A,z),w=A),"element"==v)H= 74!0,t=A.priority,$=z,z=d.$$element=B(ba.$$createComment(M,d[M])),b=z[0],da(f,za.call($,0),b),$[0].$$parentNode=$[0].parentNode,s=Yb(C,$,e,t,g&&g.name,{nonTlbTranscludeDirective:w});else{var la=T();
74$=B(Vb(b)).contents();if(G(v)){$=[];var Y=T(),X=T();q(v,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Y[a]=b;la[b]=null;X[b]=c});q(z.contents(),function(a){var b=Y[xa(va(a))];b?(X[b]=!0,la[b]=la[b]||[],la[b].push(a)):$.push(a)});q(X,function(a,b){if(!a)throw ga("reqslot",b);});for(var Z in la)la[Z]&& 75(la[Z]=Yb(C,la[Z],e))}z.empty();s=Yb(C,$,e,void 0,void 0,{needsNewScope:A.$$isolateScope||A.$$newScope});s.$$slots=la}if(A.template)if(L=!0,W("template",J,A,z),J=A,v=E(A.template)?A.template(z,d):A.template,v=ta(v),A.replace){g=A;$=Tb.test(v)?Yc(ca(A.templateNamespace,V(v))):[];b=$[0];if(1!=$.length||1!==b.nodeType)throw ga("tplrt",M,"");da(f,z,b);Ba={$attr:{}};v=x(b,[],Ba);var ea=a.splice(F+1,a.length-(F+1));(D||r)&&Zc(v,D,r);a=a.concat(v).concat(ea);U(d,Ba);Ba=a.length}else z.html(v);if(A.templateUrl)L= 76!0,W("template",J,A,z),J=A,A.replace&&(g=A),n=aa(a.splice(F,a.length-F),z,d,f,u&&s,h,k,{controllerDirectives:I,newScopeDirective:r!==A&&r,newIsolateScopeDirective:D,templateDirective:J,nonTlbTranscludeDirective:w}),Ba=a.length;else if(A.compile)try{Sa=A.compile(z,d,s),E(Sa)?m(null,Sa,P,Q):Sa&&m(Sa.pre,Sa.post,P,Q)}catch(fa){c(fa,wa(z))}A.terminal&&(n.terminal=!0,t=Math.max(t,A.priority))}n.scope=r&&!0===r.scope;n.transcludeOnThisElement=u;n.templateOnThisElement=L;n.transclude=s;l.hasElementTranscludeDirective= 77H;return n}function gb(a,b,c,d){var e;if(F(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw ga("ctreq",b,a);}else if(K(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=gb(a,b[g],c,d);else G(b)&&(e={},q(b,function(b,f){e[f]=gb(a,b,c,d)}));return e||null}function O(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f, 78$element:a,$attrs:b,$transclude:c},n=l.controller;"@"==n&&(n=b[l.name]);m=z(n,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function Zc(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Pb(a[d],{$$isolateScope:b,$$newScope:c})}function la(b,f,g,h,k,l,m){if(f===k)return null;k=null;if(e.hasOwnProperty(f)){var n;f=a.get(f+"Directive");for(var t=0,r=f.length;t<r;t++)try{if(n=f[t],(y(h)||h>n.priority)&&-1!=n.restrict.indexOf(g)){l&&(n=Pb(n,{$$start:l,$$end:m}));if(!n.$$bindings){var I= 79n,D=n,A=n.name,J={isolateScope:null,bindToController:null};G(D.scope)&&(!0===D.bindToController?(J.bindToController=d(D.scope,A,!0),J.isolateScope={}):J.isolateScope=d(D.scope,A,!1));G(D.bindToController)&&(J.bindToController=d(D.bindToController,A,!0));if(G(J.bindToController)){var w=D.controller,z=D.controllerAs;if(!w)throw ga("noctrl",A);if(!Uc(w,z))throw ga("noident",A);}var u=I.$$bindings=J;G(u.isolateScope)&&(n.$$isolateBindings=u.isolateScope)}b.push(n);k=n}}catch(L){c(L)}}return k}function Q(b){if(e.hasOwnProperty(b))for(var c= 80a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=c[d],b.multiElement)return!0;return!1}function U(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,f){"class"==f?(A(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function aa(a,b,c,d,e,f, 81g,h){var k=[],l,m,t=b[0],p=a.shift(),r=Pb(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),I=E(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,D=p.templateNamespace;b.empty();n(I).then(function(n){var J,w;n=ta(n);if(p.replace){n=Tb.test(n)?Yc(ca(D,V(n))):[];J=n[0];if(1!=n.length||1!==J.nodeType)throw ga("tplrt",p.name,I);n={$attr:{}};da(d,b,J);var z=x(J,[],n);G(p.scope)&&Zc(z,!0);a=z.concat(a);U(c,n)}else J=t,b.html(n);a.unshift(r);l=Ba(a,J,c,e,b,p,f,g,h);q(d,function(a,c){a== 82J&&(d[c]=b[0])});for(m=s(b[0].childNodes,e);k.length;){n=k.shift();w=k.shift();var u=k.shift(),L=k.shift(),z=b[0];if(!n.$$destroyed){if(w!==t){var S=w.className;h.hasElementTranscludeDirective&&p.replace||(z=Vb(J));da(u,B(w),z);A(B(z),S)}w=l.transcludeOnThisElement?ka(n,l.transclude,L):L;l(m,n,z,d,w)}}k=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(k?k.push(b,c,d,a):(l.transcludeOnThisElement&&(a=ka(b,l.transclude,e)),l(m,b,c,d,a)))}}function Y(a,b){var c=b.priority-a.priority;return 0!== 83c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function W(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ga("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,wa(d));}function X(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&ba.$$addBindingClass(a);return function(a,c){var e=c.parent();b||ba.$$addBindingClass(e);ba.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ca(a,b){a= 84P(a||"html");switch(a){case "svg":case "math":var c=v.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function ea(a,b){if("srcdoc"==b)return I.HTML;var c=va(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return I.RESOURCE_URL}function fa(a,c,d,e,f){var g=ea(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===va(a))throw ga("selmulti",wa(a));c.push({priority:100,compile:function(){return{pre:function(a,
vendor: 9,667 bytes, lines 85-103
85c,h){c=h.$$observers||(h.$$observers=T());if(l.test(e))throw ga("nodomevents");var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function da(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context= 86c);break}f&&f.replaceChild(c,d);a=v.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);B.hasData(d)&&(B.data(c,B.data(d)),B(d).off("$destroy"));B.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function ha(a,b){return R(function(){return a.apply(null,arguments)},a,b)}function ja(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,wa(d))}}function ia(a,c,d,e,f){function g(b,c,e){E(d.$onChanges)&&c!==e&&(Z||(a.$$postDigest(L),Z=[]),m||(m={},Z.push(h)),m[b]&& 87(e=m[b].previousValue),m[b]=new Db(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;q(e,function(e,h){var m=e.attrName,n=e.optional,p,r,I,D;switch(e.mode){case "@":n||ua.call(c,m)||(d[h]=c[m]=void 0);c.$observe(m,function(a){if(F(a)||Da(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;p=c[m];F(p)?d[h]=b(p)(a):Da(p)&&(d[h]=p);l[h]=new Db(Zb,d[h]);break;case "=":if(!ua.call(c,m)){if(n)break;c[m]=void 0}if(n&&!c[m])break;r=t(c[m]);D=r.literal?pa:function(a,b){return a===b||a!==a&&b!==b}; 88I=r.assign||function(){p=d[h]=r(a);throw ga("nonassign",c[m],m,f.name);};p=d[h]=r(a);n=function(b){D(b,d[h])||(D(b,p)?I(a,b=d[h]):d[h]=b);return p=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(t(c[m],n),null,r.literal);k.push(n);break;case "<":if(!ua.call(c,m)){if(n)break;c[m]=void 0}if(n&&!c[m])break;r=t(c[m]);d[h]=r(a);l[h]=new Db(Zb,d[h]);n=a.$watch(r,function(a,b){a===b&&(b=d[h]);g(h,a,b);d[h]=a},r.literal);k.push(n);break;case "&":r=c.hasOwnProperty(m)?t(c[m]):C;if(r=== 89C&&n)break;d[h]=function(b){return r(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var oa=/^\w/,na=v.document.createElement("div"),qa=r,Z;S.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&J.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&J.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=$c(a,b);c&&c.length&&J.addClass(this.$$element,c);(c=$c(b,a))&&c.length&&J.removeClass(this.$$element, 90c)},$set:function(a,b,d,e){var f=Rc(this.$$element[0],a),g=ad[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=zc(a,"-"));f=va(this.$$element);if("a"===f&&("href"===a||"xlinkHref"===a)||"img"===f&&"src"===a)this[a]=b=D(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=V(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<k;l++)var m=2*l,f=f+D(V(g[m]),!0),f= 91f+(" "+V(g[m+1]));g=V(g[2*l]).split(/\s/);f+=D(V(g[0]),!0);2===g.length&&(f+=" "+V(g[1]));this[a]=b=f}!1!==d&&(null===b||y(b)?this.$$element.removeAttr(e):oa.test(e)?this.$$element.attr(e,b):$(this.$$element[0],e,b));(a=this.$$observers)&&q(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);u.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||y(c[a])||b(c[a])});return function(){Za(e,b)}}};var ra=b.startSymbol(), 92sa=b.endSymbol(),ta="{{"==ra&&"}}"==sa?Xa:function(a){return a.replace(/\{\{/g,ra).replace(/}}/g,sa)},ya=/^ngAttr[A-Z]/,Aa=/^(.+)Start$/;ba.$$addBindingInfo=m?function(a,b){var c=a.data("$binding")||[];K(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:C;ba.$$addBindingClass=m?function(a){A(a,"ng-binding")}:C;ba.$$addScopeInfo=m?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:C;ba.$$addScopeClass=m?function(a,b){A(a,b?"ng-isolate-scope":"ng-scope")}:C;ba.$$createComment= 93function(a,b){var c="";m&&(c=" "+(a||"")+": "+(b||"")+" ");return v.document.createComment(c)};return ba}]}function Db(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return cb(a.replace(Vc,""))}function $c(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function Yc(a){a=B(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&Zf.call(a,b,1);return a}function Uc(a, 94b){if(b&&F(b))return b;if(F(a)){var d=bd.exec(a);if(d)return d[3]}}function ef(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,c){Qa(b,"controller");G(b)?R(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!G(a.$scope))throw O("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,n,m;h=!0===h;k&&F(k)&&(m=k);if(F(f)){k=f.match(bd);if(!k)throw $f("ctrlfmt",f);n=k[1];m= 95m||k[3];f=a.hasOwnProperty(n)?a[n]:Bc(g.$scope,n,!0)||(b?Bc(c,n,!0):void 0);Pa(f,n,!0)}if(h)return h=(K(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),m&&e(g,m,l,n||f.name),R(function(){var a=d.invoke(f,l,g,n);a!==l&&(G(a)||E(a))&&(l=a,m&&e(g,m,l,n||f.name));return l},{instance:l,identifier:m});l=d.instantiate(f,g,n);m&&e(g,m,l,n||f.name);return l}}]}function ff(){this.$get=["$window",function(a){return B(a.document)}]}function gf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a, 96arguments)}}]}function $b(a){return G(a)?fa(a)?a.toISOString():ab(a):a}function mf(){this.$get=function(){return function(a){if(!a)return"";var b=[];pc(a,function(a,c){null===a||y(a)||(K(a)?q(a,function(a){b.push(ja(c)+"="+ja($b(a)))}):b.push(ja(c)+"="+ja($b(a))))});return b.join("&")}}}function nf(){this.$get=function(){return function(a){function b(a,e,f){null===a||y(a)||(K(a)?q(a,function(a,c){b(a,e+"["+(G(a)?c:"")+"]")}):G(a)&&!fa(a)?pc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+ 97"="+ja($b(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function ac(a,b){if(F(a)){var d=a.replace(ag,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(cd))||(c=(c=d.match(bg))&&cg[c[0]].test(d));c&&(a=uc(d))}}return a}function dd(a){var b=T(),d;F(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var e=P(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):G(a)&&q(a,function(a,d){var f=P(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function ed(a){var b; 98return function(d){b||(b=dd(a));return d?(d=b[P(d)],void 0===d&&(d=null),d):b}}function fd(a,b,d,c){if(E(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function lf(){var a=this.defaults={transformResponse:[ac],transformRequest:[function(a){return G(a)&&"[object File]"!==ma.call(a)&&"[object Blob]"!==ma.call(a)&&"[object FormData]"!==ma.call(a)?ab(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ha(bc),put:ha(bc),patch:ha(bc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN", 99paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return x(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return x(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function n(b){function c(a){var b=R({},a);b.data=fd(a.data,a.headers,a.status,f.transformResponse);a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};q(a,function(a, 100e){E(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!G(b))throw O("$http")("badreq",b);if(!F(b.url))throw O("$http")("badreq",b.url);var f=R({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=R({},b.headers),f,g,h,c=R({},c.common,c[P(b.method)]);a:for(f in c){g=P(f);for(h in d)if(P(h)===g)continue a;d[f]=c[f]}return e(d,ha(b))}(b);f.method=sb(f.method);f.paramSerializer=F(f.paramSerializer)? 101l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=fd(b.data,ed(d),void 0,b.transformRequest);y(e)&&q(d,function(a,b){"content-type"===P(b)&&delete d[b]});y(b.withCredentials)&&!y(a.withCredentials)&&(b.withCredentials=a.withCredentials);return m(b,e).then(c,c)},void 0],h=k.when(f);for(q(M,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=g.shift();var n=g.shift(), 102h=h.then(b,n)}d?(h.success=function(a){Pa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Pa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=gd("success"),h.error=gd("error"));return h}function m(c,d){function g(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function l(a,c,d,e){function f(){m(c,a,d,e)}L&&(200<=a&&300>a?L.put(A,[a,c,dd(d), 103e]):L.remove(A));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function m(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?J.resolve:J.reject)({data:a,status:b,headers:ed(d),config:c,statusText:e})}function u(a){m(a.data,a.status,ha(a.headers()),a.statusText)}function I(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var J=k.defer(),D=J.promise,L,S,M=c.headers,A=r(c.url,c.paramSerializer(c.params));n.pendingRequests.push(c);D.then(I,I);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&
104"JSONP"!==c.method||(L=G(c.cache)?c.cache:G(a.cache)?a.cache:N);L&&(S=L.get(A),x(S)?S&&E(S.then)?S.then(u,u):K(S)?m(S[1],S[0],ha(S[2]),S[3]):m(S,200,{},"OK"):L.put(A,D));y(S)&&((S=hd(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(M[c.xsrfHeaderName||a.xsrfHeaderName]=S),e(c.method,A,d,l,M,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),g(c.uploadEventHandlers)));return D}function r(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var N=g("$http");a.paramSerializer= 105F(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var M=[];q(c,function(a){M.unshift(F(a)?l.get(a):l.invoke(a))});n.pendingRequests=[];(function(a){q(arguments,function(a){n[a]=function(b,c){return n(R({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){n[a]=function(b,c,d){return n(R({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function pf(){this.$get=function(){return function(){return new v.XMLHttpRequest}}} 106function of(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,d,c){return dg(a,c,a.defer,b.angular.callbacks,d[0])}]}function dg(a,b,d,c,e){function f(a,b,d){var f=e.createElement("script"),n=null;f.type="text/javascript";f.src=a;f.async=!0;n=function(a){f.removeEventListener("load",n,!1);f.removeEventListener("error",n,!1);e.body.removeChild(f);f=null;var g=-1,N="unknown";a&&("load"!==a.type||c[b].called||(a={type:"error"}),N=a.type,g="error"===a.type?404:200);d&&d(g,N)};f.addEventListener("load", 107n,!1);f.addEventListener("error",n,!1);e.body.appendChild(f);return n}return function(e,h,k,l,n,m,r,N,M,w){function p(){z&&z();u&&u.abort()}function H(b,c,e,f,g){x(J)&&d.cancel(J);z=u=null;b(c,e,f,g);a.$$completeOutstandingRequest(C)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"==P(e)){var t="_"+(c.counter++).toString(36);c[t]=function(a){c[t].data=a;c[t].called=!0};var z=f(h.replace("JSON_CALLBACK","angular.callbacks."+t),t,function(a,b){H(l,a,c[t].data,"",b);c[t]=C})}else{var u=b(e,h); 108u.open(e,h,!0);q(n,function(a,b){x(a)&&u.setRequestHeader(b,a)});u.onload=function(){var a=u.statusText||"",b="response"in u?u.response:u.responseText,c=1223===u.status?204:u.status;0===c&&(c=b?200:"file"==ra(h).protocol?404:0);H(l,c,b,u.getAllResponseHeaders(),a)};e=function(){H(l,-1,null,null,"")};u.onerror=e;u.onabort=e;q(M,function(a,b){u.addEventListener(b,a)});q(w,function(a,b){u.upload.addEventListener(b,a)});r&&(u.withCredentials=!0);if(N)try{u.responseType=N}catch(I){if("json"!==N)throw I; 109}u.send(y(k)?null:k)}if(0<m)var J=d(p,m);else m&&E(m.then)&&m.then(p)}}function jf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(r,b)}function h(a,b,c,d){var e;return e=a.$watch(function(a){e();return d(a)},b,c)}function k(f,k,m,r){function H(a){try{var b=a;a=m?e.getTrusted(m,b):e.valueOf(b); 110var d;if(r&&!x(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=ab(a)}d=a}return d}catch(g){c(Ja.interr(f,g))}}if(!f.length||-1===f.indexOf(a)){var t;k||(k=g(f),t=da(k),t.exp=f,t.expressions=[],t.$$watchDelegate=h);return t}r=!!r;var z,u,I=0,J=[],D=[];t=f.length;for(var L=[],S=[];I<t;)if(-1!=(z=f.indexOf(a,I))&&-1!=(u=f.indexOf(b,z+l)))I!==z&&L.push(g(f.substring(I,z))),I=f.substring(z+l,u),J.push(I),D.push(d(I,H)),I=u+n,S.push(L.length),L.push(""); 111else{I!==t&&L.push(g(f.substring(I)));break}m&&1<L.length&&Ja.throwNoconcat(f);if(!k||J.length){var q=function(a){for(var b=0,c=J.length;b<c;b++){if(r&&y(a[b]))return;L[S[b]]=a[b]}return L.join("")};return R(function(a){var b=0,d=J.length,e=Array(d);try{for(;b<d;b++)e[b]=D[b](a);return q(e)}catch(g){c(Ja.interr(f,g))}},{exp:f,expressions:J,$$watchDelegate:function(a,b){var c;return a.$watchGroup(D,function(d,e){var f=q(d);E(b)&&b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,n=b.length,m=new RegExp(a.replace(/./g, 112f),"g"),r=new RegExp(b.replace(/./g,f),"g");k.startSymbol=function(){return a};k.endSymbol=function(){return b};return k}]}
112function kf(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,d,c,e){function f(f,k,l,n){function m(){r?f.apply(null,N):f(p)}var r=4<arguments.length,N=r?za.call(arguments,4):[],q=b.setInterval,w=b.clearInterval,p=0,H=x(n)&&!n,t=(H?c:d).defer(),z=t.promise;l=x(l)?l:0;z.$$intervalId=q(function(){H?e.defer(m):a.$evalAsync(m);t.notify(p++);0<l&&p>=l&&(t.resolve(p), 113w(z.$$intervalId),delete g[z.$$intervalId]);H||a.$apply()},k);g[z.$$intervalId]=t;return z}var g={};f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1};return f}]}function cc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function id(a,b){var d=ra(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=X(d.port)||eg[d.protocol]||null}function jd(a,b){var d="/"!==a.charAt(0); 114d&&(a="/"+a);var c=ra(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function na(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Ia(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function hb(a){return a.replace(/(#.+)|#$/,"$1")}function dc(a,b,d){this.$$html5=!0;d=d||"";id(a,this);this.$$parse=function(a){var d=na(b, 115a);if(!F(d))throw Eb("ipthprfx",a,b);jd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Rb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;x(f=na(a,c))?(g=f,g=x(f=na(d,f))?b+(na("/",f)||f):a+g):x(f=na(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function ec(a,b,d){id(a,this); 116this.$$parse=function(c){var e=na(a,c)||na(b,c),f;y(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",y(e)&&(a=c,this.replace())):(f=na(d,e),y(f)&&(f=e));jd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Rb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"")};this.$$parseLinkUrl= 117function(b,d){return Ia(a)==Ia(b)?(this.$$parse(b),!0):!1}}function kd(a,b,d){this.$$html5=!0;ec.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Ia(c)?f=c:(g=na(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Rb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=cc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Fb(a){return function(){return this[a]}}function ld(a, 118b){return function(d){if(y(d))return this[a];this[a]=b(d);this.$$compose();return this}}function qf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return x(b)?(a=b,this):a};this.html5Mode=function(a){return Da(a)?(b.enabled=a,this):G(a)?(Da(a.enabled)&&(b.enabled=a.enabled),Da(a.requireBase)&&(b.requireBase=a.requireBase),Da(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d, 119c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,n;n=c.baseHref();var m=c.url(),r;if(b.enabled){if(!n&&b.requireBase)throw Eb("nobase");r=m.substring(0,m.indexOf("/",m.indexOf("//")+2))+(n||"/");n=e.history?dc:kd}else r=Ia(m),n=ec;var N=r.substr(0,Ia(r).lastIndexOf("/")+1);l=new n(r,N,"#"+a);l.$$parseLinkUrl(m,m);l.$$state=c.state(); 120var q=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==va(e[0]);
120)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");G(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=ra(h.animVal).href);q.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]= 121!0))}});hb(l.absUrl())!=hb(m)&&c.url(l.absUrl(),!0);var w=!0;c.onUrlChange(function(a,b){y(na(N,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=hb(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(w=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=hb(c.url()),b=hb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(w|| 122m)w=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function rf(){var a=!0,b=this;this.debugEnabled=function(b){return x(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& 123(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||C;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];q(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Ta(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"=== 124a||"__proto__"===a)throw ca("isecfld",b);return a}function fg(a){return a+""}function sa(a,b){if(a){if(a.constructor===a)throw ca("isecfn",b);if(a.window===a)throw ca("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ca("isecdom",b);if(a===Object)throw ca("isecobj",b);}return a}function md(a,b){if(a){if(a.constructor===a)throw ca("isecfn",b);if(a===gg||a===hg||a===ig)throw ca("isecff",b);}}function Gb(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor|| 125a==={}.constructor||a===[].constructor||a===Function.constructor))throw ca("isecaf",b);}function jg(a,b){return"undefined"!==typeof a?a:b}function nd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function aa(a,b){var d,c;switch(a.type){case s.Program:d=!0;q(a.body,function(a){aa(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:aa(a.argument,b);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch; 126break;case s.BinaryExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:aa(a.test,b);aa(a.alternate,b);aa(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant= 127!1;a.toWatch=[a];break;case s.MemberExpression:aa(a.object,b);a.computed&&aa(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];q(a.arguments,function(a){aa(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:aa(a.left,b);aa(a.right,b);a.constant=a.left.constant&&a.right.constant; 128a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];q(a.elements,function(a){aa(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];q(a.properties,function(a){aa(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1;a.toWatch=[];break;case s.LocalsExpression:a.constant=!1,a.toWatch=[]}}function od(a){if(1==a.length){a=a[0].expression; 129var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function pd(a){return a.type===s.Identifier||a.type===s.MemberExpression}
129function qd(a){if(1===a.body.length&&pd(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function rd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function sd(a, 130b){this.astBuilder=a;this.$filter=b}function td(a,b){this.astBuilder=a;this.$filter=b}function Hb(a){return"constructor"==a}function fc(a){return E(a.valueOf)?a.valueOf():kg.call(a)}function sf(){var a=T(),b=T(),d={"true":!0,"false":!1,"null":null,undefined:void 0},c,e;this.addLiteral=function(a,b){d[a]=b};this.setIdentifierFns=function(a,b){c=a;e=b;return this};this.$get=["$filter",function(f){function g(c,d,e){var g,k,D;e=e||H;switch(typeof c){case "string":D=c=c.trim();var q=e?b:a;g=q[D];if(!g){":"=== 131c.charAt(0)&&":"===c.charAt(1)&&(k=!0,c=c.substring(2));g=e?p:w;var S=new gc(g);g=(new hc(S,f,g)).parse(c);g.constant?g.$$watchDelegate=r:k?g.$$watchDelegate=g.literal?m:n:g.inputs&&(g.$$watchDelegate=l);e&&(g=h(g));q[D]=g}return N(g,d);case "function":return N(c,d);default:return N(C,d)}}function h(a){function b(c,d,e,f){var g=H;H=!0;try{return a(c,d,e,f)}finally{H=g}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate;b.assign=h(a.assign);b.constant=a.constant;b.literal=a.literal;for(var c=0;a.inputs&& 132c<a.inputs.length;++c)a.inputs[c]=h(a.inputs[c]);b.inputs=a.inputs;return b}function k(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=fc(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function l(a,b,c,d,e){var f=d.inputs,g;if(1===f.length){var h=k,f=f[0];return a.$watch(function(a){var b=f(a);k(b,h)||(g=d(a,void 0,void 0,[b]),h=b&&fc(b));return g},b,c,e)}for(var l=[],m=[],n=0,r=f.length;n<r;n++)l[n]=k,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var h=f[c](a); 133if(b||(b=!k(h,l[c])))m[c]=h,l[c]=h&&fc(h)}b&&(g=d(a,void 0,void 0,m));return g},b,c,e)}function n(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;E(b)&&b.apply(this,arguments);x(a)&&d.$$postDigest(function(){x(f)&&e()})},c)}function m(a,b,c,d){function e(a){var b=!0;q(a,function(a){x(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,c,d){g=a;E(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function r(a,b,c,d){var e; 134return e=a.$watch(function(a){e();return d(a)},b,c)}function N(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==m&&c!==n?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return x(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==l?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=l,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var M=Ea().noUnsafeEval,w={csp:M,expensiveChecks:!1,literals:qa(d),isIdentifierStart:E(c)&&c, 135isIdentifierContinue:E(e)&&e},p={csp:M,expensiveChecks:!0,literals:qa(d),isIdentifierStart:E(c)&&c,isIdentifierContinue:E(e)&&e},H=!1;g.$$runningExpensiveChecks=function(){return H};return g}]}function uf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return ud(function(b){a.$evalAsync(b)},b)}]}function vf(){this.$get=["$browser","$exceptionHandler",function(a,b){return ud(function(b){a.defer(b)},b)}]}function ud(a,b){function d(){this.$$state={status:0}}function c(a,b){return function(c){b.call(a, 136c)}}function e(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,d,e;e=c.pending;c.processScheduled=!1;c.pending=void 0;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{E(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function f(){this.promise=new d}var g=O("$q",TypeError);R(d.prototype,{then:function(a,b,c){if(y(a)&&y(b)&&y(c))return this;var d=new f;
136this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d, 137a,b,c]);0<this.$$state.status&&e(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return k(b,!0,a)},function(b){return k(b,!1,a)},b)}});R(f.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(g("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){function d(a){k||(k=!0,h.$$resolve(a))}function f(a){k||(k=!0,h.$$reject(a))}var g,h=this,k=!1;try{if(G(a)||E(a))g=a&&a.then;E(g)? 138(this.promise.$$state.status=-1,g.call(a,d,f,c(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,e(this.promise.$$state))}catch(l){f(l),b(l)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;e(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0]; 139a=d[f][3];try{e.notify(E(a)?a(c):c)}catch(h){b(h)}}})}});var h=function(a,b){var c=new f;b?c.resolve(a):c.reject(a);return c.promise},k=function(a,b,c){var d=null;try{E(c)&&(d=c())}catch(e){return h(e,!1)}return d&&E(d.then)?d.then(function(){return h(a,b)},function(a){return h(a,!1)}):h(a,b)},l=function(a,b,c,d){var e=new f;e.resolve(a);return e.promise.then(b,c,d)},n=function(a){if(!E(a))throw g("norslvr",a);var b=new f;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};n.prototype= 140d.prototype;n.defer=function(){var a=new f;a.resolve=c(a,a.resolve);a.reject=c(a,a.reject);a.notify=c(a,a.notify);return a};n.reject=function(a){var b=new f;b.reject(a);return b.promise};n.when=l;n.resolve=l;n.all=function(a){var b=new f,c=0,d=K(a)?[]:{};q(a,function(a,e){c++;l(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};return n}function Ef(){this.$get=["$window","$timeout",function(a, 141b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function tf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope= 142null}b.prototype=a;return b}var b=10,d=O("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,h){function k(a){a.currentScope.$$destroyed=!0}function l(a){9===Ca&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function n(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling= 143this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function m(a){if(H.$$phase)throw d("inprog",H.$$phase);H.$$phase=a}function r(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function N(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function w(){for(;u.length;)try{u.shift()()}catch(a){f(a)}e= 144null}function p(){null===e&&(e=h.defer(function(){H.$apply(w)}))}n.prototype={constructor:n,$new:function(b,c){var d;c=c||this;b?(d=new n,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",k);return d},$watch:function(a,b,d,e){var f=g(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f, 145a);var h=this,k=h.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;E(b)||(l.fn=C);k||(k=h.$$watchers=[]);k.unshift(l);r(this,1);return function(){0<=Za(k,l)&&r(h,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});q(a,function(a, 146b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!y(e)){if(G(e))if(ya(e))for(f!==m&&(f=m,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==r&&(f=r={},t=0,l++);a=0;for(b in e)ua.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t> 147a)for(b in l++,f)ua.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1<b.length,l=0,n=g(a,c),m=[],r={},p=!0,t=0;return this.$watch(n,function(){p?(p=!1,b(e,e,d)):b(e,h,d);if(k)if(G(e))if(ya(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ua.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,k,l,n,r,p,q,N=b,u,x=[],y,v;m("$digest");h.$$checkUrlChange();this===H&&null!==e&&(h.defer.cancel(e),w());c=null;do{q=!1; 148for(u=this;t.length;){try{v=t.shift(),v.scope.$eval(v.expression,v.locals)}catch(C){f(C)}c=null}a:do{if(r=u.$$watchers)for(p=r.length;p--;)try{if(a=r[p])if(n=a.get,(g=n(u))!==(k=a.last)&&!(a.eq?pa(g,k):"number"===typeof g&&"number"===typeof k&&isNaN(g)&&isNaN(k)))q=!0,c=a,a.last=a.eq?qa(g,null):g,l=a.fn,l(g,k===s?g:k,u),5>
vendor: 4,387 bytes, lines 148-157
148N&&(y=4-N,x[y]||(x[y]=[]),x[y].push({msg:E(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:k}));else if(a===c){q=!1;break a}}catch(F){f(F)}if(!(r=u.$$watchersCount&& 149u.$$childHead||u!==this&&u.$$nextSibling))for(;u!==this&&!(r=u.$$nextSibling);)u=u.$parent}while(u=r);if((q||t.length)&&!N--)throw H.$$phase=null,d("infdig",b,x);}while(q||t.length);for(H.$$phase=null;z.length;)try{z.shift()()}catch(B){f(B)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===H&&h.$$applicationDestroyed();r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)N(this,this.$$listenerCount[b],b);a&&a.$$childHead== 150this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=C;this.$on=this.$watch=this.$watchGroup=function(){return C};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){H.$$phase|| 151t.length||h.defer(function(){t.length&&H.$digest()});t.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){z.push(a)},$apply:function(a){try{m("$apply");try{return this.$eval(a)}finally{H.$$phase=null}}catch(b){f(b)}finally{try{H.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&u.push(b);a=g(a);p()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]= 1520),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,N(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=$a([h],arguments,1),l,n;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(n=d.length;l<n;l++)if(d[l])try{d[l].apply(null,k)}catch(m){f(m)}else d.splice(l,1),l--,n--;if(g)return h.currentScope=null,h;e=e.$parent}while(e); 153h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=$a([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope= 154null;return e}};var H=new n,t=H.$$asyncQueue=[],z=H.$$postDigestQueue=[],u=H.$$applyAsyncQueue=[];return H}]}function me(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return x(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return x(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=ra(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function lg(a){if("self"===a)return a; 155if(F(a)){if(-1<a.indexOf("***"))throw ta("iwcard",a);a=vd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Wa(a))return new RegExp("^"+a.source+"$");throw ta("imatcher");}function wd(a){var b=[];x(a)&&q(a,function(a){b.push(lg(a))});return b}function xf(){this.SCE_CONTEXTS=oa;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=wd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=wd(a));return b};this.$get=["$injector", 156function(d){function c(a,b){return"self"===a?hd(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw ta("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[oa.HTML]=e(g);h[oa.CSS]=e(g);h[oa.URL]=e(g);h[oa.JS]=e(g);h[oa.RESOURCE_URL]= 157e(h[oa.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ta("icontext",a,b);
157if(null===b||y(b)||""===b)return b;if("string"!==typeof b)throw ta("itype",a);return new c(b)},getTrusted:function(d,e){if(null===e||y(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===oa.RESOURCE_URL){var g=ra(e.toString()),m,r,q=!1;m=0;for(r=a.length;m<r;m++)if(c(a[m],g)){q=!0;break}if(q)for(m=0,r=b.length;m<r;m++)if(c(b[m], 158g)){q=!1;break}if(q)return e;throw ta("insecurl",e.toString());}if(d===oa.HTML)return f(e);throw ta("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function wf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ca)throw ta("iequirks");var c=ha(oa);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b}, 159c.valueOf=Xa);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;q(oa,function(a,b){var d=P(b);c[cb("parse_as_"+d)]=function(b){return e(a,b)};c[cb("get_trusted_"+d)]=function(b){return f(a,b)};c[cb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function yf(){this.$get=["$window","$document",function(a,b){var d={},c=!(a.chrome&&a.chrome.app&&a.chrome.app.runtime)&&a.history&&a.history.pushState, 160e=X((/android (\d+)/.exec(P((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h,k=/^(Moz|webkit|ms)(?=[A-Z])/,l=g.body&&g.body.style,n=!1,m=!1;if(l){for(var r in l)if(n=k.exec(r)){h=n[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");n=!!("transition"in l||h+"Transition"in l);m=!!("animation"in l||h+"Animation"in l);!e||n&&m||(n=F(l.webkitTransition),m=F(l.webkitAnimation))}return{history:!(!c||4>e||f),hasEvent:function(a){if("input"=== 161a&&11>=Ca)return!1;if(y(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ea(),vendorPrefix:h,transitions:n,animations:m,android:e}}]}function Af(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,e){function f(g,h){f.totalPendingRequests++;F(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var k=d.defaults&&d.defaults.transformResponse;K(k)?k=k.filter(function(a){return a!==ac}):k===ac&&(k=null);return d.get(g, 162R({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){b.put(g,a.data);return a.data},function(a){if(!h)throw mg("tpload",g,a.status,a.statusText);return c.reject(a)})}f.totalPendingRequests=0;return f}]}function Bf(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=ea.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+ 163vd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function Cf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler", 164function(a,b,d,c,e){function f(f,k,l){E(f)||(l=k,k=f,f=C);var n=za.call(arguments,3),m=x(l)&&!l,r=(m?c:d).defer(),q=r.promise,s;s=b.defer(function(){try{r.resolve(f.apply(null,n))}catch(b){r.reject(b),e(b)}finally{delete g[q.$$timeoutId]}m||a.$apply()},k);q.$$timeoutId=s;g[s]=r;return q}var g={};f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function ra(a){Ca&&(Y.setAttribute("href",a),a= 165Y.href);Y.setAttribute("href",a);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function hd(a){a=F(a)?ra(a):a;return a.protocol===xd.protocol&&a.host===xd.host}function Df(){this.$get=da(v)}function yd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{}, 166c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),y(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function Hf(){this.$get=yd}
vendor: 4,834 bytes, lines 166-175
166function Jc(a){function b(d,c){if(G(d)){var e={};q(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",zd);b("date",Ad);b("filter",ng); 167b("json",og);b("limitTo",pg);b("lowercase",qg);b("number",Bd);b("orderBy",Cd);b("uppercase",rg)}function ng(){return function(a,b,d){if(!ya(a)){if(null==a)return a;throw O("filter")("notarray",a);}var c;switch(ic(b)){case "function":break;case "boolean":case "null":case "number":case "string":c=!0;case "object":b=sg(b,d,c);break;default:return a}return Array.prototype.filter.call(a,b)}}function sg(a,b,d){var c=G(a)&&"$"in a;!0===b?b=pa:E(b)||(b=function(a,b){if(y(a))return!1;if(null===a||null===b)return a=== 168b;if(G(b)||G(a)&&!rc(a))return!1;a=P(""+a);b=P(""+b);return-1!==a.indexOf(b)});return function(e){return c&&!G(e)?Ka(e,a.$,b,!1):Ka(e,a,b,d)}}function Ka(a,b,d,c,e){var f=ic(a),g=ic(b);if("string"===g&&"!"===b.charAt(0))return!Ka(a,b.substring(1),d,c);if(K(a))return a.some(function(a){return Ka(a,b,d,c)});switch(f){case "object":var h;if(c){for(h in a)if("$"!==h.charAt(0)&&Ka(a[h],b,d,!0))return!0;return e?!1:Ka(a,b,d,!1)}if("object"===g){for(h in b)if(e=b[h],!E(e)&&!y(e)&&(f="$"===h,!Ka(f?a:a[h], 169e,d,f,f)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function ic(a){return null===a?"null":typeof a}function zd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){y(c)&&(c=b.CURRENCY_SYM);y(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Dd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(/\u00A4/g,c)}}function Bd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Dd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function tg(a){var b=0,d,c,e,f,g;-1< 170(c=a.indexOf(Ed))&&(a=a.replace(Ed,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)==jc;e++);if(e==(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)==jc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Fd&&(d=d.splice(0,Fd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ug(a,b,d,c){var e=a.d,f=e.length-a.i;b=y(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f= 171Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Dd(a,b,d,c,e){if(!F(a)&&!Q(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,h=Math.abs(a)+"",k="";if(f)k="\u221e";else{g=tg(h);ug(g,e,b.minFrac,b.maxFrac);k=g.d;h=g.i;e=g.e;f=[];for(g=k.reduce(function(a, 172b){return a&&!b},!0);0>h;)k.unshift(0),h++;0<h?f=k.splice(h):(f=k,k=[0]);h=[];for(k.length>=b.lgSize&&h.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);f.length&&(k+=c+f.join(""));e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Ib(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=jc+a;d&&(a=a.substr(a.length-b));return e+a}function W(a,b,d,c,e){d= 173d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12==d&&(f=12);return Ib(f,b,c,e)}}function ib(a,b,d){return function(c,e){var f=c["get"+a](),g=sb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Gd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Hd(a){return function(b){var d=Gd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ib(b,a)}}function kc(a,b){return 0>=a.getFullYear()? 174b.ERAS[0]:b.ERAS[1]}function Ad(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=X(b[9]+b[10]),g=X(b[9]+b[11]));h.call(a,X(b[1]),X(b[2])-1,X(b[3]));f=X(b[4]||0)-f;g=X(b[5]||0)-g;h=X(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",h= 175[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;F(c)&&(c=vg.test(c)?X(c):b(c));Q(c)&&(c=new Date(c));if(!fa(c)||!isFinite(c.getTime()))return c;for(;d;)(l=wg.exec(d))?(h=$a(h,l,1),d=h.pop()):(h.push(d),d=null);var n=c.getTimezoneOffset();f&&(n=vc(f,n),c=Qb(c,f,!0));q(h,function(b){k=xg[b];g+=k?k(c,a.DATETIME_FORMATS,n):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function og(){return function(a,b){y(b)&&(b=2);return ab(a,b)}}function pg(){return function(a,b,d){b=Infinity===
176Math.abs(Number(b))?Number(b):X(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!K(a)&&!F(a))return a;d=!d||isNaN(d)?0:X(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Cd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Xa;if(E(b))h=b;else if(F(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h, 177descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(null==a)return a;if(!ya(a))throw O("orderBy")("notarray",a);K(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"=== 178c)a:{if("function"===typeof e.valueOf&&(e=e.valueOf(),d(e)))break a;if(rc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],q=0;c.type===f.type?c.value!==f.value&&(q=c.value<f.value?-1:1):q=c.type<f.type?-1:1;if(c=q*g[d].descending)break}return c});return a=a.map(function(a){return a.value})}}function La(a){E(a)&&(a={link:a});a.restrict=a.restrict||"AC";return da(a)}function Id(a, 179b,d,c,e){var f=this,g=[];f.$error={};f.$$success={};f.$pending=void 0;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Jb;f.$rollbackViewValue=function(){q(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){q(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Qa(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c]; 180f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];q(f.$pending,function(b,c){f.$setValidity(c,null,a)});q(f.$error,function(b,c){f.$setValidity(c,null,a)});q(f.$$success,function(b,c){f.$setValidity(c,null,a)});Za(g,a);a.$$parentForm=Jb};Jd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(Za(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Ua); 181c.addClass(a,Kb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};f.$setPristine=function(){c.setClass(a,Ua,Kb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;q(g,function(a){a.$setPristine()})};f.$setUntouched=function(){q(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function lc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function jb(a,b,d,c,e,f){var g=P(b[0].type); 182if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0});b.on("compositionend",function(){h=!1;l()})}var k,l=function(a){k&&(f.defer.cancel(k),k=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var n=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15< 183b&&19>b||37<=b&&40>=b||n(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",n)}b.on("change",l);if(Kd[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=this.validity,c=b.badInput,d=b.typeMismatch;k=f.defer(function(){k=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Lb(a,b){return function(d,c){var e,f;if(fa(d))return d;if(F(d)){'"'==d.charAt(0)&& 184'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(yg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(a,b,d,c){return function(e,f,g,h,k,l,n){function m(a){return a&& 185!(a.getTime&&a.getTime()!==a.getTime())}function r(a){return x(a)&&!fa(a)?d(a)||void 0:a}Ld(e,f,g,h);jb(e,f,g,h,k,l);var q=h&&h.$options&&h.$options.timezone,s;h.$$parserName=a;
185h.$parsers.push(function(a){if(h.$isEmpty(a))return null;if(b.test(a))return a=d(a,s),q&&(a=Qb(a,q)),a});h.$formatters.push(function(a){if(a&&!fa(a))throw lb("datefmt",a);if(m(a))return(s=a)&&q&&(s=Qb(s,q,!0)),n("date")(a,c,q);s=null;return""});if(x(g.min)||g.ngMin){var w;h.$validators.min=function(a){return!m(a)||y(w)||d(a)>= 186w};g.$observe("min",function(a){w=r(a);h.$validate()})}if(x(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!m(a)||y(p)||d(a)<=p};g.$observe("max",function(a){p=r(a);h.$validate()})}}}function Ld(a,b,d,c){(c.$$hasNativeValidators=G(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function Md(a,b,d,c,e){if(x(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function mc(a,b){a="ngClass"+a;return["$animate", 187function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],n=0;n<b.length;n++)if(e==b[n])continue a;c.push(e)}return c}function e(a){var b=[];return K(a)?(q(a,function(a){b=b.concat(e(a))}),b):F(a)?a.split(" "):G(a)?(q(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",link:function(f,g,h){function k(a){a=l(a,1);h.$addClass(a)}function l(a,b){var c=g.data("$classCounts")||T(),d=[];q(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts", 188c);return d.join(" ")}function n(a,b){var e=c(b,a),f=c(a,b),e=l(e,1),f=l(f,-1);e&&e.length&&d.addClass(g,e);f&&f.length&&d.removeClass(g,f)}function m(a){if(!0===b||f.$index%2===b){var c=e(a||[]);if(!r)k(c);else if(!pa(a,r)){var d=e(r);n(d,c)}}r=K(a)?a.map(function(a){return ha(a)}):ha(a)}var r;f.$watch(h[a],m,!0);h.$observe("class",function(b){m(f.$eval(h[a]))});"ngClass"!==a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var m=e(f.$eval(h[a]));g===b?k(m):(g=l(m,-1),h.$removeClass(g))}})}}}]} 189function Jd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+zc(a,"-"):"";b(mb+a,!0===c);b(Nd+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Nd]=!(f[mb]=e.hasClass(mb));c.$setValidity=function(a,e,f){y(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&h(c.$pending,a,f),Od(c.$pending)&&(c.$pending=void 0));Da(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error, 190a,f),h(c.$$success,a,f));c.$pending?(b(Pd,!0),c.$valid=c.$invalid=void 0,d("",null)):(b(Pd,!1),c.$valid=Od(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?void 0:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Od(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var zg=/^\/(.+)\/([a-z]*)$/,ua=Object.prototype.hasOwnProperty,P=function(a){return F(a)?a.toLowerCase():a},sb=function(a){return F(a)?a.toUpperCase():a},Ca, 191B,Z,za=[].slice,Zf=[].splice,Ag=[].push,ma=Object.prototype.toString,sc=Object.getPrototypeOf,Aa=O("ng"),ea=v.angular||(v.angular={}),Sb,nb=0;Ca=v.document.documentMode;C.$inject=[];Xa.$inject=[];var K=Array.isArray,$d=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,V=function(a){return F(a)?a.trim():a},vd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ea=function(){if(!x(Ea.rules)){var a=v.document.querySelector("[ng-csp]")|| 192v.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ea.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ea;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ea.rules},pb=function(){if(x(pb.name_))return pb.name_;var a,b,d=Na.length,c,e;for(b=0;b<d;++b)if(c=Na[b],a=v.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+ 193"jq");break}return pb.name_=e},ce=/:/g,Na=["ng-","data-ng-","ng:","x-ng-"],he=/[A-Z]/g,Ac=!1,Ma=3,le={full:"1.5.5",major:1,minor:5,dot:5,codeName:"material-conspiration"};U.expando="ng339";var eb=U.cache={},Nf=1;U._data=function(a){return this.cache[a[this.expando]]||{}};
vendor: 29,386 bytes, lines 193-250
193var If=/([\:\-\_]+(.))/g,Jf=/^moz([A-Z])/,wb={mouseleave:"mouseout",mouseenter:"mouseover"},Ub=O("jqLite"),Mf=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,Kf=/<([\w:-]+)/,Lf=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, 194ia={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,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;var Sf=v.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Oa=U.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"=== 195v.document.readyState?v.setTimeout(b):(this.on("DOMContentLoaded",b),U(v).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:Ag,sort:[].sort,splice:[].splice},Cb={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[P(a)]=a});var Sc={};q("input select option textarea button form details".split(" "),function(a){Sc[a]=!0});var ad={ngMinlength:"minlength", 196ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};q({data:Wb,removeData:db,hasData:function(a){for(var b in eb[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)db(a[b])}},function(a,b){U[b]=a});q({data:Wb,inheritedData:Ab,scope:function(a){return B.data(a,"$scope")||Ab(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Pc,injector:function(a){return Ab(a, 197"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:xb,css:function(a,b,d){b=cb(b);if(x(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Ma&&2!==c&&8!==c)if(c=P(b),Cb[c])if(x(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||C).specified?c:void 0;else if(x(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?void 0:a},prop:function(a,b,d){if(x(d))a[b]= 198d;else return a[b]},text:function(){function a(a,d){if(y(d)){var c=a.nodeType;return 1===c||c===Ma?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(y(b)){if(a.multiple&&"select"===va(a)){var d=[];q(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(y(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Qc},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Qc&&y(2==a.length&& 199a!==xb&&a!==Pc?b:c)){if(G(b)){for(e=0;e<g;e++)if(a===Wb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=y(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});q({removeData:db,on:function(a,b,d,c){if(x(c))throw Ub("onargs");if(Kc(a)){c=vb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Pf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper= 200c,"$destroy"===b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],wb[b]?(h(wb[b],Rf),h(b,void 0,!0)):h(b)}},off:Oc,one:function(a,b,d){a=B(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;ub(a);q(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];q(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a, 201b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;q(new U(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){Mc(a,B(b).eq(0).clone()[0])},remove:Bb,detach:function(a){Bb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:zb,removeClass:yb,toggleClass:function(a,b,d){b&&q(b.split(" "), 202function(b){var e=d;y(e)&&(e=!xb(a,b));(e?zb:yb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Vb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=vb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped= 203!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:C,type:f,target:a},b.type&&(c=R(c,b)),b=ha(g),e=d?[c].concat(d):[c],q(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)y(f)?(f=a(this[g],b,c,e),x(f)&&(f=B(f))):Nc(f,a(this[g],b,c,e));return x(f)?f:this};U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off});Ra.prototype={put:function(a, 204b){this[Fa(a,this.nextUid)]=b},get:function(a){return this[Fa(a,this.nextUid)]},remove:function(a){var b=this[a=Fa(a,this.nextUid)];delete this[a];return b}};var Gf=[function(){this.$get=[function(){return Ra}]}],Uf=/^([^\(]+?)=>/,Vf=/^[^\(]*\(\s*([^\)]*)\)/m,Bg=/,/,Cg=/^\s*(_?)(\S+?)\1\s*$/,Tf=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ga=O("$injector");bb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw F(d)&&d||(d=a.name||Wf(a)),Ga("strictdi",d); 205b=Tc(a);q(b[1].split(Bg),function(a){a.replace(Cg,function(a,b,d){c.push(d)})})}a.$inject=c}}else K(a)?(b=a.length-1,Pa(a[b],"fn"),c=a.slice(0,b)):Pa(a,"fn",!0);return c};var Qd=O("$animate"),Ze=function(){this.$get=C},$e=function(){var a=new Ra,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=F(b)?b.split(" "):K(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){q(b,function(b){var c=a.get(b);if(c){var d=Xf(b.attr("class")),e="",f="";q(c, 206function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&zb(a,e);f&&yb(a,f)});a.remove(b)}});b.length=0}return{enabled:C,on:C,off:C,pin:C,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Xe=["$provide",function(a){var b=this;this.$$registeredAnimations= 207Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Qd("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Qd("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k= 208d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ha(h))},move:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ha(h))},leave:function(b,c){return a.push(b,"leave",Ha(c),function(){b.remove()})},addClass:function(b, 209c,g){g=Ha(g);g.addClass=fb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ha(g);g.removeClass=fb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ha(h);h.addClass=fb(h.addClass,c);h.removeClass=fb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ha(k);k.from=k.from?R(k.from,c):c;k.to=k.to?R(k.to,g):g;k.tempClasses=fb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],bf=function(){this.$get= 210["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},af=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){var d=c[0];d&&d.hidden?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0); 211else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;q(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:C,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)}, 212"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length= 2130,this._state=2)}};return f}]},Ye=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);h||k.complete();h=!0});return k}var g=e||{};g.$$prepared||(g=qa(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var h,k=new d;return{start:f,end:f}}}]},ga=O("$compile"),Zb=new function(){}; 214Cc.$inject=["$provide","$$sanitizeUriProvider"];Db.prototype.isFirstChange=function(){return this.previousValue===Zb};var Vc=/^((?:x|data)[\:\-_])/i,$f=O("$controller"),bd=/^(\S+)(\s+as\s+([\w$]+))?$/,hf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof B&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},cd="application/json",bc={"Content-Type":cd+";charset=utf-8"},bg=/^\[|^\{(?!\{)/,cg={"[":/]$/,"{":/}$/},ag=/^\)\]\}',?\n/,Dg=O("$http"),gd=function(a){return function(){throw Dg("legacy", 215a);}},Ja=ea.$interpolateMinErr=O("$interpolate");Ja.throwNoconcat=function(a){throw Ja("noconcat",a);};Ja.interr=function(a,b){return Ja("interr",a,b.toString())};var Eg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,eg={http:80,https:443,ftp:21},Eb=O("$location"),Fg={$$html5:!1,$$replace:!1,absUrl:Fb("$$absUrl"),url:function(a){if(y(a))return this.$$url;var b=Eg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Fb("$$protocol"), 216host:Fb("$$host"),port:Fb("$$port"),path:ld("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(F(a)||Q(a))a=a.toString(),this.$$search=xc(a);else if(G(a))a=qa(a,{}),q(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Eb("isrcharg");break;default:y(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:ld("$$hash",function(a){return null!== 217a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};q([kd,ec,dc],function(a){a.prototype=Object.create(Fg);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==dc||!this.$$html5)throw Eb("nostate");this.$$state=y(b)?null:b;return this}});var ca=O("$parse"),gg=Function.prototype.call,hg=Function.prototype.apply,ig=Function.prototype.bind,Mb=T();q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Mb[a]=!0});var Gg={n:"\n",f:"\f",r:"\r", 218t:"\t",v:"\v","'":"'",'"':'"'},gc=function(a){this.options=a};gc.prototype={constructor:gc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++; 219else{var b=a+this.peek(),d=b+this.peek(2),c=Mb[b],e=Mb[d];Mb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a|| 220"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a, 221b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=x(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ca("lexerr", 222a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=P(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})}, 223readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)|| 224this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=Gg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression"; 225s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal="Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.LocalsExpression="LocalsExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a); 226a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()}, 227assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a= 228this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(), 229b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")): 230this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=qa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:s.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression, 231callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!== 232this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}}, 233object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},throwError:function(a,b){throw ca("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0=== 234this.tokens.length)throw ca("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ca("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))? 235(this.tokens.shift(),a):!1},selfReferential:{"this":{type:s.ThisExpression},$locals:{type:s.LocalsExpression}}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};aa(c,d.$filter);var e="",f;this.stage="assign";if(f=qd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=od(c.body); 236d.stage="inputs";q(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext", 237"ifDefined","plus","text",e))(this.$filter,Ta,sa,md,fg,Gb,jg,nd,a);this.state=this.stage=void 0;e.literal=rd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;q(this.state.filters, 238function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,k=this,l,n;c=c||C;if(!f&&x(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:q(a.body,function(b,c){k.recurse(b.expression, 239void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:n=this.escape(a.value);this.assign(b,n);c(n);break;case s.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});n=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,n);c(n);break;case s.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});n="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g, 2400)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,n);c(n);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l", 241a.name)+"?l:s"),d.computed=!1,d.name=a.name);Ta(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Hb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())|| 242this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){e&&1!==e&&k.addEnsureSafeAssignContext(g);if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),n=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,n),d&&(d.computed=!0,d.name=h);else{Ta(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)), 243k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));n=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Hb(a.property.name))n=k.ensureSafeObject(n);k.assign(b,n);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),n=h+"("+l.join(",")+")",k.assign(b,n),c(b)):(h=k.nextId(),g={},l= 244[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);q(a.arguments,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),n=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):n=h+"("+l.join(",")+")";n=k.ensureSafeObject(n);k.assign(b,n)},function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!pd(a.left))throw ca("lval"); 245this.recurse(a.left,void 0,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);n=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,n);c(b||n)})},1);break;case s.ArrayExpression:l=[];q(a.elements,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(a)})});n="["+l.join(",")+"]";this.assign(b,n);c(n);break;case s.ObjectExpression:l=[];q(a.properties,function(a){k.recurse(a.value, 246k.nextId(),void 0,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});n="{"+l.join(",")+"}";this.assign(b,n);c(n);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.LocalsExpression:this.assign(b,"l");c("l");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a, 247"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+ 248"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/[$_a-zA-Z][$_a-zA-Z0-9]*/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a), 249";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g= 250this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCo
250deAt(0).toString(16)).slice(-4)},escape:function(a){if(F(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw ca("esc");},nextId:function(a, 251b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};td.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;aa(c,d.$filter);var e,f;if(e=qd(c))f=this.recurse(e);e=od(c.body);var g;e&&(g=[],q(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];q(c.body,function(a){h.push(d.recurse(a.expression))});e=0===c.body.length?C:1=== 252c.body.length?h[0]:function(a,b){var c;q(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=rd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right), 253this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Ta(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Hb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Ta(a.property.name,f.expression), 254e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],q(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var m=[],r=0;r<g.length;++r)m.push(g[r](a,c,d,f));a=e.apply(void 0,m,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a, 255c,d,n){var m=e(a,c,d,n),r;if(null!=m.value){sa(m.context,f.expression);md(m.value,f.expression);r=[];for(var q=0;q<g.length;++q)r.push(sa(g[q](a,c,d,n),f.expression));r=sa(m.value.apply(m.context,r),f.expression)}return b?{value:r}:r};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,n){var m=c(a,d,g,n);a=e(a,d,g,n);sa(m.value,f.expression);Gb(m.context);m.context[m.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],q(a.elements,function(a){g.push(f.recurse(a))}), 256function(a,c,d,e){for(var f=[],r=0;r<g.length;++r)f.push(g[r](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],q(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},r=0;r<g.length;++r)f[g[r].key]=g[r].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.LocalsExpression:return function(a,c){return b?{value:c}:c};case s.NGValueParameter:return function(a, 257c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=x(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=x(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=nd(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g); 258h=(x(h)?h:0)-(x(c)?c:0);return d?{value:h}:h}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c, 259e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f, 260g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0, 261name:void 0,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:void 0;b&&sa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),n,m;null!=l&&(n=b(f,g,h,k),n+="",Ta(n,e),c&&1!==c&&(Gb(l),l&&!l[n]&&(l[n]={})),m=l[n],sa(m,e));return d?{context:l,name:n,value:m}:m}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&(Gb(g), 262g&&!g[b]&&(g[b]={}));h=null!=g?g[b]:void 0;(d||Hb(b))&&sa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var hc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(a,d);this.astCompiler=d.csp?new td(this.ast,b):new sd(this.ast,b)};hc.prototype={constructor:hc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var kg=Object.prototype.valueOf,ta=O("$sce"),oa={HTML:"html",CSS:"css", 263URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},mg=O("$compile"),Y=v.document.createElement("a"),xd=ra(v.location.href);yd.$inject=["$document"];Jc.$inject=["$provide"];var Fd=22,Ed=".",jc="0";zd.$inject=["$locale"];Bd.$inject=["$locale"];var xg={yyyy:W("FullYear",4,0,!1,!0),yy:W("FullYear",2,0,!0,!0),y:W("FullYear",1,0,!1,!0),MMMM:ib("Month"),MMM:ib("Month",!0),MM:W("Month",2,1),M:W("Month",1,1),LLLL:ib("Month",!1,!0),dd:W("Date",2),d:W("Date",1),HH:W("Hours",2),H:W("Hours",1),hh:W("Hours",2,-12), 264h:W("Hours",1,-12),mm:W("Minutes",2),m:W("Minutes",1),ss:W("Seconds",2),s:W("Seconds",1),sss:W("Milliseconds",3),EEEE:ib("Day"),EEE:ib("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ib(Math[0<a?"floor":"ceil"](a/60),2)+Ib(Math.abs(a%60),2))}
vendor: 6,533 bytes, lines 264-277
264,ww:Hd(2),w:Hd(1),G:kc,GG:kc,GGG:kc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},wg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, 265vg=/^\-?\d+$/;Ad.$inject=["$locale"];var qg=da(P),rg=da(sb);Cd.$inject=["$parse"];var ne=da({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ma.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};q(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a, 266b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});q(ad,function(a,b){tb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(zg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=xa("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"=== 267ma.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ca&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Jb={$addControl:C,$$renameControl:function(a,b){a.$name=b},$removeControl:C,$setValidity:C,$setDirty:C,$setPristine:C,$setSubmitted:C};Id.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Rd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||C}return{name:"form", 268restrict:a?"EAC":"E",require:["form","^^?form"],controller:Id,compile:function(d,f){d.addClass(Ua).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var m=f[0];if(!("action"in e)){var r=function(b){a.$apply(function(){m.$commitViewValue();m.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",r,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",r,!1)},0,!1)})}(f[1]||m.$$parentForm).$addControl(m);var q=g?c(m.$name):C;g&& 269(q(a,m),e.$observe(g,function(b){m.$name!==b&&(q(a,void 0),m.$$parentForm.$$renameControl(m,b),q=c(m.$name),q(a,m))}));d.on("$destroy",function(){m.$$parentForm.$removeControl(m);q(a,void 0);R(m,Jb)})}}}}}]},oe=Rd(),Be=Rd(!0),yg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Hg=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ig=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i, 270Jg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sd=/^(\d{4,})-(\d{2})-(\d{2})$/,Td=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,nc=/^(\d{4,})-W(\d\d)$/,Ud=/^(\d{4,})-(\d\d)$/,Vd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Kd=T();q(["date","datetime-local","month","time","week"],function(a){Kd[a]=!0});var Wd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c)},date:kb("date",Sd,Lb(Sd,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Td,Lb(Td,"yyyy MM dd HH mm ss sss".split(" ")), 271"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Vd,Lb(Vd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",nc,function(a,b){if(fa(a))return a;if(F(a)){nc.lastIndex=0;var d=nc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Gd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Ud,Lb(Ud,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Ld(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName= 272"number";c.$parsers.push(function(a){if(c.$isEmpty(a))return null;if(Jg.test(a))return parseFloat(a)});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(x(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||y(g)||a>=g};d.$observe("min",function(a){x(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:void 0;c.$validate()})}if(x(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||y(h)||a<=h};d.$observe("max", 273function(a){x(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:void 0;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||Hg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);lc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||Ig.test(d)}},radio:function(a,b,d,c){y(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value, 274a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Md(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Md(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return pa(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:C,button:C,submit:C,reset:C, 275file:C},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Wd[P(g.type)]||Wd.text)(e,f,g,h[0],b,a,d,c)}}}}],Kg=/^(true|false|\d+)$/,Te=function(){return{restrict:"A",priority:100,compile:function(a,b){return Kg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},te=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b); 276return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=y(a)?"":a})}}}}],ve=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=y(a)?"":a})}}}}],ue=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g= 277b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);
277b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Se=da({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),we=mc("",!0),ye=mc("Odd",0),xe=mc("Even",1),ze=La({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ae=[function(){return{restrict:"A",scope:!0,controller:"@", 278priority:500}}],Ic={},Lg={blur:!0,focus:!0};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};Lg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var De=["$animate","$compile",function(a, 279b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var h,k,l;d.$watch(e.ngIf,function(d){d?k||g(function(d,f){k=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l=rb(h.clone),a.leave(l).then(function(){l=null}),h=null))})}}}],Ee=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0, 280transclude:"element",controller:ea.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,n,m,r){var q=0,s,w,p,y=function(){w&&(w.remove(),w=null);s&&(s.$destroy(),s=null);p&&(d.leave(p).then(function(){w=null}),w=p,p=null)};c.$watch(f,function(f){var n=function(){!x(h)||h&&!c.$eval(h)||b()},u=++q;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&u===q){var b=c.$new();m.template=a;a=r(b,function(a){y();d.enter(a,null,e).then(n)});s=b;p=a;s.$emit("$includeContentLoaded", 281f);c.$eval(g)}},function(){c.$$destroyed||u!==q||(y(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(y(),m.template=null)})}}}}],Ve=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ma.call(d[0]).match(/SVG/)?(d.empty(),a(Lc(e.template,v.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Fe=La({priority:450,compile:function(){return{pre:function(a, 282b,d){a.$eval(d.ngInit)}}}}),Re=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!y(a)){var b=[];a&&q(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(K(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",Nd="ng-invalid",Ua="ng-pristine",Kb="ng-dirty",Pd="ng-pending",lb=O("ngModel"),Mg=["$scope", 283"$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=l(d.name||"",!1)(a); 284this.$$parentForm=Jb;var n=e(d.ngModel),m=n.assign,r=n,s=m,v=null,w,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");r=function(a){var c=n(a);E(c)&&(c=b(a));return c};s=function(a,b){E(n(a))?f(a,{$$$p:b}):m(a,b)}}else if(!n.assign)throw lb("nonassign",d.ngModel,wa(c));};this.$render=C;this.$isEmpty=function(a){return y(a)||""===a||null===a||a!==a};this.$$updateEmptyClasses=function(a){p.$isEmpty(a)?(f.removeClass(c,"ng-not-empty"), 285f.addClass(c,"ng-empty")):(f.removeClass(c,"ng-empty"),f.addClass(c,"ng-not-empty"))};var H=0;Jd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Kb);f.addClass(c,Ua)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Ua);f.addClass(c,Kb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")}; 286this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:void 0,p.$modelValue!==c&&p.$$writeModelToScope())})}}; 287this.$$runValidators=function(a,b,c){function d(){var c=!0;q(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(q(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!E(h.then))throw lb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},C):g(!0)}function f(a,b){h===H&&p.$setValidity(a,b)}
287function g(a){h===H&&c(a)}H++;var h= 288H;(function(){var a=p.$$parserName||"parse";if(y(w))f(a,null);else return w||(q(p.$validators,function(a,b){f(b,null)}),q(p.$asyncValidators,function(a,b){f(b,null)})),f(a,w),w;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$updateEmptyClasses(a),p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue; 289if(w=y(b)?void 0:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),y(b)){w=!1;break}Q(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=r(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:void 0,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);q(p.$viewChangeListeners, 290function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&x(d.debounce)&&(d=d.debounce,Q(d)?c=d:Q(d[b])?c=d[b]:Q(d["default"])&&(c=d["default"]));g.cancel(v);c?v=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=r(a);if(b!==p.$modelValue&&(p.$modelValue=== 291p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;w=void 0;for(var c=p.$formatters,d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$$updateEmptyClasses(e),p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,C))}return b})}],Qe=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Mg,priority:1,compile:function(b){b.addClass(Ua).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]|| 292g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],Ng=/(\s+|^)default(\s+|$)/,Ue=function(){return{restrict:"A", 293controller:["$scope","$attrs",function(a,b){var d=this;this.$options=qa(a.$eval(b.ngModelOptions));x(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=V(this.$options.updateOn.replace(Ng,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ge=La({terminal:!0,priority:1E3}),Og=O("ngOptions"),Pg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/, 294Oe=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!q&&ya(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var m=a.match(Pg);if(!m)throw Og("iexp",a,wa(b));var r=m[5]||m[7],q=m[6];a=/ as /.test(m[0])&&m[1];var s=m[9];b=d(m[2]?m[1]:r);var w=a&&d(a)||b,p=s&&d(s),v=s?function(a,b){return p(c,b)}:function(a){return Fa(a)}, 295t=function(a,b){return v(a,L(a,b))},z=d(m[2]||m[1]),u=d(m[3]||""),y=d(m[4]||""),x=d(m[8]),D={},L=q?function(a,b){D[q]=b;D[r]=a;return D}:function(a){D[r]=a;return D};return{trackBy:s,getTrackByValue:t,getWatchables:d(x,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var h=a===d?g:d[g],l=a[h],h=L(l,h),l=v(l,h);b.push(l);if(m[2]||m[1])l=z(c,h),b.push(l);m[4]&&(h=y(c,h),b.push(h))}return b}),getOptions:function(){for(var a=[],b={},d=x(c)||[],g=f(d),h=g.length,m=0;m<h;m++){var p=d=== 296g?m:g[m],q=L(d[p],p),r=w(c,q),p=v(r,q),D=z(c,q),N=u(c,q),q=y(c,q),r=new e(p,r,D,N,q);a.push(r);b[p]=r}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[t(a)]},getViewValueFromOption:function(a){return s?ea.copy(a.viewValue):a.viewValue}}}}}var e=v.document.createElement("option"),f=v.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=C},post:function(d,h,k,l){function n(a,b){a.element= 297b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=u&&r.readValue();if(u)for(var b=u.items.length-1;0<=b;b--){var c=u.items[b];c.group?Bb(c.element.parentNode):Bb(c.element)}u=I.getOptions();var d={};t&&h.prepend(w);
297u.items.forEach(function(a){var b;if(x(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),E.appendChild(b),b.label=a.group,d[a.group]=b);var c=e.cloneNode(!1)}else b=E,c=e.cloneNode(!1);b.appendChild(c); 298n(a,c)});h[0].appendChild(E);s.$render();s.$isEmpty(a)||(b=r.readValue(),(I.trackBy||v?pa(a,b):a===b)||(s.$setViewValue(b),s.$render()))}var r=l[0],s=l[1],v=k.multiple,w;l=0;for(var p=h.children(),y=p.length;l<y;l++)if(""===p[l].value){w=p.eq(l);break}var t=!!w,z=B(e.cloneNode(!1));z.val("?");var u,I=c(k.ngOptions,h,d),E=b[0].createDocumentFragment();v?(s.$isEmpty=function(a){return!a||0===a.length},r.writeValue=function(a){u.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){if(a= 299u.getOptionFromViewValue(a))a.element.selected=!0})},r.readValue=function(){var a=h.val()||[],b=[];q(a,function(a){(a=u.selectValueMap[a])&&!a.disabled&&b.push(u.getViewValueFromOption(a))});return b},I.trackBy&&d.$watchCollection(function(){if(K(s.$viewValue))return s.$viewValue.map(function(a){return I.getTrackByValue(a)})},function(){s.$render()})):(r.writeValue=function(a){var b=u.getOptionFromViewValue(a);b?(h[0].value!==b.selectValue&&(z.remove(),t||w.remove(),h[0].value=b.selectValue,b.element.selected= 300!0),b.element.setAttribute("selected","selected")):null===a||t?(z.remove(),t||h.prepend(w),h.val(""),w.prop("selected",!0),w.attr("selected",!0)):(t||w.remove(),h.prepend(z),h.val("?"),z.prop("selected",!0),z.attr("selected",!0))},r.readValue=function(){var a=u.selectValueMap[h.val()];return a&&!a.disabled?(t||w.remove(),z.remove(),u.getViewValueFromOption(a)):null},I.trackBy&&d.$watch(function(){return I.getTrackByValue(s.$viewValue)},function(){s.$render()}));t?(w.remove(),a(w)(d),w.removeClass("ng-scope")): 301w=B(e.cloneNode(!1));h.empty();m();d.$watchCollection(I.getWatchables,m)}}}}],He=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,h){function k(a){g.text(a||"")}var l=h.count,n=h.$attr.when&&g.attr(h.$attr.when),m=h.offset||0,r=f.$eval(n)||{},s={},v=b.startSymbol(),w=b.endSymbol(),p=v+l+"-"+m+w,x=ea.noop,t;q(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+P(c[2]),r[c]=g.attr(h.$attr[b]))});q(r,function(a,d){s[d]=b(a.replace(c,p))});f.$watch(l, 302function(b){var c=parseFloat(b),e=isNaN(c);e||c in r||(c=a.pluralCat(c-m));c===t||e&&Q(t)&&isNaN(t)||(x(),e=s[c],y(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+n),x=C,k()):x=f.$watch(e,k),t=c)})}}}],Ie=["$parse","$animate","$compile",function(a,b,d){var c=O("ngRepeat"),e=function(a,b,c,d,e,n,m){a[c]=d;e&&(a[e]=n);a.$index=b;a.$first=0===b;a.$last=b===m-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3, 303terminal:!0,$$tlb:!0,compile:function(f,g){var h=g.ngRepeat,k=d.$$createComment("end ngRepeat",h),l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!l)throw c("iexp",h);var n=l[1],m=l[2],r=l[3],s=l[4],l=n.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!l)throw c("iidexp",n);var v=l[3]||l[1],w=l[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw c("badident", 304r);var p,y,t,z,u={$id:Fa};s?p=a(s):(t=function(a,b){return Fa(b)},z=function(a){return a});return function(a,d,f,g,l){p&&(y=function(b,c,d){w&&(u[w]=b);u[v]=c;u.$index=d;return p(a,u)});var n=T();a.$watchCollection(m,function(f){var g,m,p=d[0],s,u=T(),x,D,E,C,F,B,G;r&&(a[r]=f);if(ya(f))F=f,m=y||t;else for(G in m=y||z,F=[],f)ua.call(f,G)&&"$"!==G.charAt(0)&&F.push(G);x=F.length;G=Array(x);for(g=0;g<x;g++)if(D=f===F?g:F[g],E=f[D],C=m(D,E,g),n[C])B=n[C],delete n[C],u[C]=B,G[g]=B;else{if(u[C])throw q(G, 305function(a){a&&a.scope&&(n[a.id]=a)}),c("dupes",h,C,E);G[g]={id:C,scope:void 0,clone:void 0};u[C]=!0}for(s in n){B=n[s];C=rb(B.clone);b.leave(C);if(C[0].parentNode)for(g=0,m=C.length;g<m;g++)C[g].$$NG_REMOVED=!0;B.scope.$destroy()}for(g=0;g<x;g++)if(D=f===F?g:F[g],E=f[D],B=G[g],B.scope){s=p;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);B.clone[0]!=s&&b.move(rb(B.clone),null,p);p=B.clone[B.clone.length-1];e(B.scope,g,v,E,w,D,x)}else l(function(a,c){B.scope=c;var d=k.cloneNode(!1);a[a.length++]=d;b.enter(a, 306null,p);p=d;B.clone=a;u[B.id]=B;e(B.scope,g,v,E,w,D,x)});n=u})}}}}],Je=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$wat
306ch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ce=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ke=La(function(a,b,d){a.$watch(d.ngStyle,function(a, 307d){d&&a!==d&&q(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Le=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],h=[],k=[],l=[],n=function(a,b){return function(){a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;for(e=k.length;d<e;++d)a.cancel(k[d]);d=k.length=0;for(e=l.length;d<e;++d){var s=rb(h[d].clone);l[d].$destroy();(k[d]=a.leave(s)).then(n(k,d))}h.length=0;l.length=0;(g=f.cases["!"+ 308c]||f.cases["?"])&&q(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],Me=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),Ne=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a, 309b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Qg=O("ngTransclude"),Pe=La({restrict:"EAC",link:function(a,b,d,c,e){d.ngTransclude===d.$attr.ngTransclude&&(d.ngTransclude="");if(!e)throw Qg("orphan",wa(b));e(function(a){a.length&&(b.empty(),b.append(a))},null,d.ngTransclude||d.ngTranscludeSlot)}}),pe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Rg={$setViewValue:C,$render:C}, 310Sg=["$element","$scope",function(a,b){var d=this,c=new Ra;d.ngModelCtrl=Rg;d.unknownOption=B(v.document.createElement("option"));d.renderUnknownOption=function(b){b="? "+Fa(b)+" ?";d.unknownOption.val(b);a.prepend(d.unknownOption);a.val(b)};b.$on("$destroy",function(){d.renderUnknownOption=C});d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()};d.readValue=function(){d.removeUnknownOption();return a.val()};d.writeValue=function(b){d.hasOption(b)?(d.removeUnknownOption(), 311a.val(b),""===b&&d.emptyOption.prop("selected",!0)):null==b&&d.emptyOption?(d.removeUnknownOption(),a.val("")):d.renderUnknownOption(b)};d.addOption=function(a,b){if(8!==b[0].nodeType){Qa(a,'"option value"');""===a&&(d.emptyOption=b);var g=c.get(a)||0;c.put(a,g+1);d.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=!0)}};d.removeOption=function(a){var b=c.get(a);b&&(1===b?(c.remove(a),""===a&&(d.emptyOption=void 0)):c.put(a,b-1))};d.hasOption=function(a){return!!c.get(a)};d.registerOption= 312function(a,b,c,h,k){if(h){var l;c.$observe("value",function(a){x(l)&&d.removeOption(l);l=a;d.addOption(a,b)})}else k?a.$watch(k,function(a,e){c.$set("value",a);e!==a&&d.removeOption(e);d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value);d.ngModelCtrl.$render()})}}],qe=function(){return{restrict:"E",require:["select","?ngModel"],controller:Sg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})}); 313if(d.multiple){f.readValue=function(){var a=[];q(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Ra(a);q(b.find("option"),function(a){a.selected=x(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==e.$viewValue||pa(g,e.$viewValue)||(g=ha(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},se=["$interpolate", 314function(a){return{restrict:"E",priority:100,compile:function(b,d){if(x(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],re=da({restrict:"E",terminal:!1}),Fc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required", 315function(){c.$validate()}))}}},Ec=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){F(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw O("ngPattern")("noregexp",f,a,wa(b));e=a||void 0;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||y(e)||e.test(b)}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a= 316X(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=X(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};v.angular.bootstrap?v.console&&console.log("WARNING: Tried to load angular more than once."):(ie(),ke(ea),ea.module("ngLocale",[],["$provide",function(a){function b(a){a+= 317"";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "), 318WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, 319c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(v.document).ready(function(){ee(v.document,yc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<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;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); 320;;;(function(){var d;window.AmCharts?d=window.AmCharts:(d={},window.AmCharts=d,d.themes={},d.maps={},d.inheriting={},d.charts=[],d.onReadyArray=[],d.useUTC=!1,d.updateRate=60,d.uid=0,d.lang={},d.translations={},d.mapTranslations={},d.windows={},d.initHandlers=[],d.amString="am",d.pmString="pm");d.Class=function(a){var b=function(){arguments[0]!==d.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(d.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0;a<arguments.length;a++)this.events[arguments[a]]=[]},b.prototype.listenTo=function(a,b,c){this.removeListener(a,b,c);a.events[b].push({handler:c,scope:this})},b.prototype.addListener=function(a,b,c){this.removeListener(this,a,b);a&&this.events[a]&&this.events[a].push({handler:b,scope:c})},b.prototype.removeListener=function(a,b,c){if(a&&a.events&&(a=a.events[b]))for(b=a.length-1;0<=b;b--)a[b].handler===c&&a.splice(b,1)},b.prototype.fire=function(a){for(var b=this.events[a.type],c=0;c<b.length;c++){var d=b[c];d.handler.call(d.scope,a)}});for(var c in a)b.prototype[c]=a[c];return b};d.addChart=function(a){window.requestAnimationFrame?d.animationRequested||(d.animationRequested=!0,window.requestAnimationFrame(d.update)):d.updateInt||(d.updateInt=setInterval(function(){d.update()},Math.round(1E3/d.updateRate)));d.charts.push(a)};d.removeChart=function(a){for(var b=d.charts,c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);0===b.length&&(d.requestAnimation&&(window.cancelAnimationFrame(d.requestAnimation),d.animationRequested=!1),d.updateInt&&(clearInterval(d.updateInt),d.updateInt=NaN))};d.isModern=!0;d.getIEVersion=function(){var a=0,b,c;"Microsoft Internet Explorer"==navigator.appName&&(b=navigator.userAgent,c=/MSIE ([0-9]{1,}[.0-9]{0,})/,null!==c.exec(b)&&(a=parseFloat(RegExp.$1)));return a};d.applyLang=function(a,b){var c=d.translations;b.dayNames=d.extend({},d.dayNames);b.shortDayNames=d.extend({},d.shortDayNames);b.monthNames=d.extend({},d.monthNames);b.shortMonthNames=d.extend({},d.shortMonthNames);b.amString="am";b.pmString="pm";
320c&&(c=c[a])&&(d.lang=c,b.langObj=c,c.monthNames&&(b.dayNames=d.extend({},c.dayNames),b.shortDayNames=d.extend({},c.shortDayNames),b.monthNames=d.extend({},c.monthNames),b.shortMonthNames=d.extend({},c.shortMonthNames)),c.am&&(b.amString=c.am),c.pm&&(b.pmString=c.pm));d.amString=b.amString;d.pmString=b.pmString};d.IEversion=d.getIEVersion();9>d.IEversion&&0<d.IEversion&&(d.isModern=!1,d.isIE=!0);d.dx=0;d.dy=0;if(document.addEventListener||window.opera)d.isNN=!0,d.isIE=!1,d.dx=.5,d.dy=.5;document.attachEvent&&(d.isNN=!1,d.isIE=!0,d.isModern||(d.dx=0,d.dy=0));window.chrome&&(d.chrome=!0);d.handleMouseUp=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleReleaseOutside&&e.handleReleaseOutside(a)}};d.handleMouseMove=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleMouseMove&&e.handleMouseMove(a)}};d.handleKeyUp=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleKeyUp&&e.handleKeyUp(a)}};d.handleWheel=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];if(e&&e.mouseIsOver){(e.mouseWheelScrollEnabled||e.mouseWheelZoomEnabled)&&e.handleWheel&&(e.handleMouseMove(a),e.handleWheel(a));break}}};d.resetMouseOver=function(){for(var a=d.charts,b=0;b<a.length;b++){var c=a[b];c&&(c.mouseIsOver=!1)}};d.ready=function(a){d.onReadyArray.push(a)};d.handleLoad=function(){d.isReady=!0;for(var a=d.onReadyArray,b=0;b<a.length;b++){var c=a[b];isNaN(d.processDelay)?c():setTimeout(c,d.processDelay*b)}d.onReadyArray=[]};d.addInitHandler=function(a,b){d.initHandlers.push({method:a,types:b})};d.callInitHandler=function(a){var b=d.initHandlers;if(d.initHandlers)for(var c=0;c<b.length;c++){var e=b[c];e.types?d.isInArray(e.types,a.type)&&e.method(a):e.method(a)}};d.getUniqueId=function(){d.uid++;return"AmChartsEl-"+d.uid};d.addGlobalListeners=function(){d.globalListenersAdded||(d.globalListenersAdded=!0,d.isNN&&(document.addEventListener("mousemove",d.handleMouseMove),document.addEventListener("keyup",d.handleKeyUp),document.addEventListener("mouseup",d.handleMouseUp,!0),window.addEventListener("load",d.handleLoad,!0)),d.isIE&&(document.attachEvent("onmousemove",d.handleMouseMove),document.attachEvent("onmouseup",d.handleMouseUp),window.attachEvent("onload",d.handleLoad)))};d.addGlobalListeners();d.addWheelListeners=function(){d.wheelIsListened||(d.isNN&&(window.addEventListener("DOMMouseScroll",d.handleWheel,{passive:!1,useCapture:!0}),document.addEventListener("mousewheel",d.handleWheel,{passive:!1,useCapture:!0})),d.isIE&&document.attachEvent("onmousewheel",d.handleWheel));d.wheelIsListened=!0};d.clear=function(){var a=d.charts;if(a)for(var b=a.length-1;0<=b;b--)a[b].clear();d.updateInt&&clearInterval(d.updateInt);d.requestAnimation&&window.cancelAnimationFrame(d.requestAnimation);d.charts=[];d.isNN&&(document.removeEventListener("mousemove",d.handleMouseMove,!0),document.removeEventListener("keyup",d.handleKeyUp,!0),document.removeEventListener("mouseup",d.handleMouseUp,!0),window.removeEventListener("load",d.handleLoad,!0),window.removeEventListener("DOMMouseScroll",d.handleWheel,!0),document.removeEventListener("mousewheel",d.handleWheel,!0));d.isIE&&(document.detachEvent("onmousemove",d.handleMouseMove),document.detachEvent("onmouseup",d.handleMouseUp),window.detachEvent("onload",d.handleLoad));d.globalListenersAdded=!1;d.wheelIsListened=!1};d.makeChart=function(a,b,c){var e=b.type,g=b.theme;d.addGlobalListeners();d.isString(g)&&(g=d.themes[g],b.theme=g);var f;switch(e){case"serial":f=new d.AmSerialChart(g);break;case"xy":f=new d.AmXYChart(g);break;case"pie":f=new d.AmPieChart(g);break;case"radar":f=new d.AmRadarChart(g);break;case"gauge":f=new d.AmAngularGauge(g);break;case"funnel":f=new d.AmFunnelChart(g);break;case"map":f=new d.AmMap(g);break;case"stock":f=new d.AmStockChart(g);break;case"gantt":f=new d.AmGanttChart(g)}d.extend(f,b);d.isReady?isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c):d.ready(function(){isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c)});return f};d.realWrite=function(a,b){a.write(b)};d.updateCount=0;d.validateAt=Math.round(d.updateRate/10);d.update=function(){var a=d.charts;d.updateCount++;var b=!1;d.updateCount==d.validateAt&&(b=!0,d.updateCount=0);if(a)for(var c=a.length-1;0<=c;c--)a[c].update&&a[c].update(),b&&(a[c].autoResize?a[c].validateSize&&a[c].validateSize():a[c].premeasure&&a[c].premeasure());window.requestAnimationFrame&&(d.requestAnimation=window.requestAnimationFrame(d.update))};"complete"==document.readyState&&d.handleLoad()})();(function(){var d=window.AmCharts;d.toBoolean=function(a,b){if(void 0===a)return b;switch(String(a).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return!!a}};d.removeFromArray=function(a,b){var c;if(void 0!==b&&void 0!==a)for(c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1)};d.getPath=function(){var a=document.getElementsByTagName("script");
320if(a)for(var b=0;b<a.length;b++){var c=a[b].src;if(-1!==c.search(/\/(amcharts|ammap)\.js/))return c.replace(/\/(amcharts|ammap)\.js.*/,"/")}};d.normalizeUrl=function(a){return""!==a&&-1===a.search(/\/$/)?a+"/":a};d.isAbsolute=function(a){return 0===a.search(/^http[s]?:|^\//)};d.isInArray=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};d.getDecimals=function(a){var b=0;isNaN(a)||(a=String(a),-1!=a.indexOf("e-")?b=Number(a.split("-")[1]):-1!=a.indexOf(".")&&(b=a.split(".")[1].length));return b};d.wordwrap=function(a,b,c,e){var g,f,h,k;a+="";if(1>b)return a;g=-1;for(a=(k=a.split(/\r\n|\n|\r/)).length;++g<a;k[g]+=h){h=k[g];for(k[g]="";h.length>b;k[g]+=d.trim(h.slice(0,f))+((h=h.slice(f)).length?c:""))f=2==e||(f=h.slice(0,b+1).match(/\S*(\s)?$/))[1]?b:f.input.length-f[0].length||1==e&&b||f.input.length+(f=h.slice(b).match(/^\S*/))[0].length;h=d.trim(h)}return k.join(c)};d.trim=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};d.wrappedText=function(a,b,c,e,g,f,h,k){var l=d.text(a,b,c,e,g,f,h);if(l){var m=l.getBBox();if(m.width>k){var n="\n";d.isModern||(n="<br>");k=Math.floor(k/(m.width/b.length));2<k&&(k-=2);b=d.wordwrap(b,k,n,!0);l.remove();l=d.text(a,b,c,e,g,f,h)}}return l};d.getStyle=function(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle)try{c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}catch(e){}else a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};d.removePx=function(a){if(void 0!==a)return Number(a.substring(0,a.length-2))};d.getURL=function(a,b){if(a)if("_self"!=b&&b)if("_top"==b&&window.top)window.top.location.href=a;else if("_parent"==b&&window.parent)window.parent.location.href=a;else if("_blank"==b)window.open(a);else{var c=document.getElementsByName(b)[0];c?c.src=a:(c=d.windows[b])?c.opener&&!c.opener.closed?c.location.href=a:d.windows[b]=window.open(a):d.windows[b]=window.open(a)}else window.location.href=a};d.ifArray=function(a){return a&&"object"==typeof a&&0<a.length?!0:!1};d.callMethod=function(a,b){var c;for(c=0;c<b.length;c++){var e=b[c];if(e){if(e[a])e[a]();var d=e.length;if(0<d){var f;for(f=0;f<d;f++){var h=e[f];if(h&&h[a])h[a]()}}}}};d.toNumber=function(a){return"number"==typeof a?a:Number(String(a).replace(/[^0-9\-.]+/g,""))};d.toColor=function(a){if(""!==a&&void 0!==a)if(-1!=a.indexOf(",")){a=a.split(",");var b;for(b=0;b<a.length;b++){var c=a[b].substring(a[b].length-6,a[b].length);a[b]="#"+c}}else a=a.substring(a.length-6,a.length),a="#"+a;return a};d.toCoordinate=function(a,b,c){var e;void 0!==a&&(a=String(a),c&&c<b&&(b=c),e=Number(a),-1!=a.indexOf("!")&&(e=b-Number(a.substr(1))),-1!=a.indexOf("%")&&(e=b*Number(a.substr(0,a.length-1))/100));return e};d.fitToBounds=function(a,b,c){a<b&&(a=b);a>c&&(a=c);return a};d.isDefined=function(a){return void 0===a?!1:!0};d.stripNumbers=function(a){return a.replace(/[0-9]+/g,"")};d.roundTo=function(a,b){if(0>b)return a;var c=Math.pow(10,b);return Math.round(a*c)/c};d.toFixed=function(a,b){var c=!1;0>a&&(c=!0,a=Math.abs(a));var e=String(Math.round(a*Math.pow(10,b)));if(0<b){var d=e.length;if(d<b){var f;for(f=0;f<b-d;f++)e="0"+e}d=e.substring(0,e.length-b);""===d&&(d=0);e=d+"."+e.substring(e.length-b,e.length);return c?"-"+e:e}return String(e)};d.formatDuration=function(a,b,c,e,g,f){var h=d.intervals,k=f.decimalSeparator;if(a>=h[b].contains){var l=a-Math.floor(a/h[b].contains)*h[b].contains;"ss"==b?(l=d.formatNumber(l,f),1==l.split(k)[0].length&&(l="0"+l)):l=d.roundTo(l,f.precision);("mm"==b||"hh"==b)&&10>l&&(l="0"+l);c=l+""+e[b]+""+c;a=Math.floor(a/h[b].contains);b=h[b].nextInterval;return d.formatDuration(a,b,c,e,g,f)}"ss"==b&&(a=d.formatNumber(a,f),1==a.split(k)[0].length&&(a="0"+a));"mm"==b&&(a=d.roundTo(a,f.precision));("mm"==b||"hh"==b)&&10>a&&(a="0"+a);c=a+""+e[b]+""+c;if(h[g].count>h[b].count)for(a=h[b].count;a<h[g].count;a++)b=h[b].nextInterval,"ss"==b||"mm"==b||"hh"==b?c="00"+e[b]+""+c:"DD"==b&&(c="0"+e[b]+""+c);":"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));return c};d.formatNumber=function(a,b,c,e,g){a=d.roundTo(a,b.precision);isNaN(c)&&(c=b.precision);var f=b.decimalSeparator;b=b.thousandsSeparator;void 0==f&&(f=",");void 0==b&&(b=" ");var h;h=0>a?"-":"";a=Math.abs(a);var k=String(a),l=!1;-1!=k.indexOf("e")&&(l=!0);0<=c&&!l&&(k=d.toFixed(a,c));var m="";if(l)m=k;else{var k=k.split("."),l=String(k[0]),n;for(n=l.length;0<=n;n-=3)m=n!=l.length?0!==n?l.substring(n-3,n)+b+m:l.substring(n-3,n)+m:l.substring(n-3,n);void 0!==k[1]&&(m=m+f+k[1]);void 0!==c&&0<c&&"0"!=m&&(m=d.addZeroes(m,f,c))}m=h+m;""===h&&!0===e&&0!==a&&(m="+"+m);!0===g&&(m+="%");return m};d.addZeroes=function(a,b,c){a=a.split(b);void 0===a[1]&&0<c&&(a[1]="0");return a[1].length<c?(a[1]+="0",d.addZeroes(a[0]+b+a[1],b,c)):void 0!==a[1]?a[0]+b+a[1]:a[0]};d.scientificToNormal=function(a){var b;a=String(a).split("e");var c;if("-"==a[1].substr(0,1)){b="0.";for(c=0;c<Math.abs(Number(a[1]))-1;c++)b+="0";b+=a[0].split(".").join("")}else{var e=0;b=a[0].split(".");b[1]&&(e=b[1].length);
320b=a[0].split(".").join("");for(c=0;c<Math.abs(Number(a[1]))-e;c++)b+="0"}return b};d.toScientific=function(a,b){if(0===a)return"0";var c=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),e=String(e).split(".").join(b);return String(e)+"e"+c};d.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};d.hitTest=function(a,b,c){var e=!1,g=a.x,f=a.x+a.width,h=a.y,k=a.y+a.height,l=d.isInRectangle;e||(e=l(g,h,b));e||(e=l(g,k,b));e||(e=l(f,h,b));e||(e=l(f,k,b));e||!0===c||(e=d.hitTest(b,a,!0));return e};d.isInRectangle=function(a,b,c){return a>=c.x-5&&a<=c.x+c.width+5&&b>=c.y-5&&b<=c.y+c.height+5?!0:!1};d.isPercents=function(a){if(-1!=String(a).indexOf("%"))return!0};d.formatValue=function(a,b,c,e,g,f,h,k){if(b){void 0===g&&(g="");var l;for(l=0;l<c.length;l++){var m=c[l],n=b[m];void 0!==n&&(n=f?d.addPrefix(n,k,h,e):d.formatNumber(n,e),a=a.replace(new RegExp("\\[\\["+g+""+m+"\\]\\]","g"),n))}}return a};d.formatDataContextValue=function(a,b){if(a){var c=a.match(/\[\[.*?\]\]/g),e;for(e=0;e<c.length;e++){var d=c[e],d=d.substr(2,d.length-4);void 0!==b[d]&&(a=a.replace(new RegExp("\\[\\["+d+"\\]\\]","g"),b[d]))}}return a};d.massReplace=function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var e=b[c];void 0===e&&(e="");a=a.replace(c,e)}return a};d.cleanFromEmpty=function(a){return a.replace(/\[\[[^\]]*\]\]/g,"")};d.addPrefix=function(a,b,c,e,g){var f=d.formatNumber(a,e),h="",k,l,m;if(0===a)return"0";0>a&&(h="-");a=Math.abs(a);if(1<a)for(k=b.length-1;-1<k;k--){if(a>=b[k].number&&(l=a/b[k].number,m=Number(e.precision),1>m&&(m=1),c=d.roundTo(l,m),m=d.formatNumber(c,{precision:-1,decimalSeparator:e.decimalSeparator,thousandsSeparator:e.thousandsSeparator}),!g||l==c)){f=h+""+m+""+b[k].prefix;break}}else for(k=0;k<c.length;k++)if(a<=c[k].number){l=a/c[k].number;m=Math.abs(Math.floor(Math.log(l)*Math.LOG10E));l=d.roundTo(l,m);f=h+""+l+""+c[k].prefix;break}return f};d.remove=function(a){a&&a.remove()};d.getEffect=function(a){">"==a&&(a="easeOutSine");"<"==a&&(a="easeInSine");"elastic"==a&&(a="easeOutElastic");return a};d.getObjById=function(a,b){var c,e;for(e=0;e<a.length;e++){var d=a[e];if(d.id==b){c=d;break}}return c};d.applyTheme=function(a,b,c){b||(b=d.theme);try{b=JSON.parse(JSON.stringify(b))}catch(e){}b&&b[c]&&d.extend(a,b[c])};d.isString=function(a){return"string"==typeof a?!0:!1};d.extend=function(a,b,c){var e;a||(a={});for(e in b)c?a.hasOwnProperty(e)||(a[e]=b[e]):a[e]=b[e];return a};d.copyProperties=function(a,b){for(var c in a)a.hasOwnProperty(c)&&"events"!=c&&void 0!==a[c]&&"function"!=typeof a[c]&&"cname"!=c&&(b[c]=a[c])};d.processObject=function(a,b,c,e){if(!1===a instanceof b&&(a=e?d.extend(new b(c),a):d.extend(a,new b(c),!0),a.listeners))for(var g in a.listeners)b=a.listeners[g],a.addListener(b.event,b.method);return a};d.fixNewLines=function(a){var b=RegExp("\\n","g");a&&(a=a.replace(b,"<br />"));return a};d.fixBrakes=function(a){if(d.isModern){var b=RegExp("<br>","g");a&&(a=a.replace(b,"\n"))}else a=d.fixNewLines(a);return a};d.deleteObject=function(a,b){if(a){if(void 0===b||null===b)b=20;if(0!==b)if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c<a.length;c++)d.deleteObject(a[c],b-1),a[c]=null;else if(a&&!a.tagName)try{for(c in a.theme=null,a)a[c]&&("object"==typeof a[c]&&d.deleteObject(a[c],b-1),"function"!=typeof a[c]&&(a[c]=null))}catch(e){}}};d.bounce=function(a,b,c,e,d){return(b/=d)<1/2.75?7.5625*e*b*b+c:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+.9375)+c:e*(7.5625*(b-=2.625/2.75)*b+.984375)+c};d.easeInOutQuad=function(a,b,c,e,d){b/=d/2;if(1>b)return e/2*b*b+c;b--;return-e/2*(b*(b-2)-1)+c};d.easeInSine=function(a,b,c,e,d){return-e*Math.cos(b/d*(Math.PI/2))+e+c};d.easeOutSine=function(a,b,c,e,d){return e*Math.sin(b/d*(Math.PI/2))+c};d.easeOutElastic=function(a,b,c,e,d){a=1.70158;var f=0,h=e;if(0===b)return c;if(1==(b/=d))return c+e;f||(f=.3*d);h<Math.abs(e)?(h=e,a=f/4):a=f/(2*Math.PI)*Math.asin(e/h);return h*Math.pow(2,-10*b)*Math.sin(2*(b*d-a)*Math.PI/f)+e+c};d.fixStepE=function(a){a=a.toExponential(0).split("e");var b=Number(a[1]);9==Number(a[0])&&b++;return d.generateNumber(1,b)};d.generateNumber=function(a,b){var c="",e;e=0>b?Math.abs(b)-1:Math.abs(b);var d;for(d=0;d<e;d++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)};d.setCN=function(a,b,c,e){if(a.addClassNames&&b&&(b=b.node)&&c){var d=b.getAttribute("class");a=a.classNamePrefix+"-";e&&(a="");d?b.setAttribute("class",d+" "+a+c):b.setAttribute("class",a+c)}};d.removeCN=function(a,b,c){b&&(b=b.node)&&c&&(b=b.classList)&&b.remove(a.classNamePrefix+"-"+c)};d.parseDefs=function(a,b){for(var c in a){var e=typeof a[c];if(0<a[c].length&&"object"==e)for(var g=0;g<a[c].length;g++)e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c][g],e);else"object"==e?(e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c],e)):b.setAttribute(c,a[c])}}})();(function(){var d=window.AmCharts;d.AxisBase=d.Class({construct:function(a){this.createEvents("clickItem","rollOverItem","rollOutItem","rollOverGuide","rollOutGuide","clickGuide");this.titleDY=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;
320this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;this.bcn="axis-";this.centerLabels=!1;this.firstDayOfWeek=1;this.centerLabelOnFullPeriod=this.markPeriodChange=this.boldPeriodBeginning=!0;this.titleWidth=0;this.periods=[{period:"fff",count:1},{period:"fff",count:5},{period:"fff",count:10},{period:"fff",count:50},{period:"fff",count:100},{period:"fff",count:500},{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},{period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"NN:SS.QQQ"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={fff:"ss",ss:"mm",mm:"hh",hh:"DD",DD:"MM",MM:"YYYY"};d.applyTheme(this,a,"AxisBase")},zoom:function(a,b){this.start=a;this.end=b;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var a=this.position;"H"==this.orientation?("left"==a&&(a="bottom"),"right"==a&&(a="top")):("bottom"==a&&(a="left"),"top"==a&&(a="right"));this.position=a},init:function(){this.createBalloon()},draw:function(){var a=this.chart;this.prevBY=this.prevBX=NaN;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.setBalloonBounds();this.labels=[];var b=a.container,c=b.set();a.gridSet.push(c);this.set=c;b=b.set();a.axesLabelsSet.push(b);this.labelsSet=b;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(a=this.height/this.minVerticalGap,3>a&&(a=3)):a=this.width/this.minHorizontalGap,this.gridCountR=Math.max(a,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(a){this.orientation=a?"H":"V"},addTitle:function(){var a=this.title;this.titleLabel=null;if(a){var b=this.chart,c=this.titleColor;void 0===c&&(c=b.color);var e=this.titleFontSize;isNaN(e)&&(e=b.fontSize+1);a=d.text(b.container,a,c,b.fontFamily,e,this.titleAlign,this.titleBold);d.setCN(b,a,this.bcn+"title");this.titleLabel=a}},positionTitle:function(){var a=this.titleLabel;if(a){var b,c,e=this.labelsSet,g={};0<e.length()?g=e.getBBox():(g.x=0,g.y=0,g.width=this.width,g.height=this.height,d.VML&&(g.y+=this.y,g.x+=this.x));e.push(a);var e=g.x,f=g.y;d.VML&&(f-=this.y,e-=this.x);var h=g.width,g=g.height,k=this.width,l=this.height,m=0,n=a.getBBox().height/2,q=this.inside,p=this.titleAlign;switch(this.position){case"top":b="left"==p?-1:"right"==p?k:k/2;c=f-10-n;break;case"bottom":b="left"==p?-1:"right"==p?k:k/2;c=f+g+10+n;break;case"left":b=e-10-n;q&&(b-=5);m=-90;c=("left"==p?l+1:"right"==p?-1:l/2)+this.titleDY;this.titleWidth=n+10;break;case"right":b=e+h+10+n,q&&(b+=7),c=("left"==p?l+2:"right"==p?-2:l/2)+this.titleDY,this.titleWidth=n+10,m=-90}this.marginsChanged?(a.translate(b,c),this.tx=b,this.ty=c):a.translate(this.tx,this.ty);this.marginsChanged=!1;isNaN(this.titleRotation)||(m=this.titleRotation);0!==m&&a.rotate(m)}},pushAxisItem:function(a,b){var c=this,e=a.graphics();0<e.length()&&(b?c.labelsSet.push(e):c.set.push(e));if(e=a.getLabel())c.labelsSet.push(e),e.click(function(b){c.handleMouse(b,a,"clickItem")}).touchend(function(b){c.handleMouse(b,a,"clickItem")}).mouseover(function(b){c.handleMouse(b,a,"rollOverItem")}).mouseout(function(b){c.handleMouse(b,a,"rollOutItem")})},handleMouse:function(a,b,c){this.fire({type:c,value:b.value,serialDataItem:b.serialDataItem,axis:this,target:b.label,chart:this.chart,event:a})},addGuide:function(a){for(var b=this.guides,c=!1,e=b.length,g=0;g<b.length;g++)b[g]==a&&(c=!0,e=g);a=d.processObject(a,d.Guide,this.theme);a.id||(a.id="guideAuto"+e+"_"+(new Date).getTime());c||b.push(a)},removeGuide:function(a){var b=this.guides,c;for(c=0;c<b.length;c++)b[c]==a&&b.splice(c,1)},handleGuideOver:function(a){clearTimeout(this.chart.hoverInt);var b={x:0,y:0,width:0,height:0};a.graphics&&(b=a.graphics.getBBox());var c=this.x+b.x+b.width/2,b=this.y+b.y+b.height/2,e=a.fillColor;void 0===e&&(e=a.lineColor);this.chart.showBalloon(a.balloonText,e,!0,c,b);this.fire({type:"rollOverGuide",guide:a,chart:this.chart})},handleGuideOut:function(a){this.chart.hideBalloon();this.fire({type:"rollOutGuide",guide:a,chart:this.chart})},handleGuideClick:function(a){this.chart.hideBalloon();this.fire({type:"clickGuide",guide:a,chart:this.chart})},addEventListeners:function(a,b){var c=this;a.mouseover(function(){c.handleGuideOver(b)});
320a.mouseup(function(){c.handleGuideClick(b)});a.touchstart(function(){c.handleGuideOver(b)});a.mouseout(function(){c.handleGuideOut(b)})},getBBox:function(){var a;this.labelsSet&&(a=this.labelsSet.getBBox());a?d.VML||(a={x:a.x+this.x,y:a.y+this.y,width:a.width,height:a.height}):a={x:0,y:0,width:0,height:0};return a},destroy:function(){d.remove(this.set);d.remove(this.labelsSet);var a=this.axisLine;a&&d.remove(a.axisSet);d.remove(this.grid0)},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},parseDatesDraw:function(){var a,b=this.chart,c=this.showFirstLabel,e=this.showLastLabel,g,f="",h=d.extractPeriod(this.minPeriod),k=d.getPeriodDuration(h.period,h.count),l,m,n,q,p,t=this.firstDayOfWeek,r=this.boldPeriodBeginning;a=this.minorGridEnabled;var w,z=this.gridAlpha,x,u=this.choosePeriod(0),A=u.period,u=u.count,y=d.getPeriodDuration(A,u);y<k&&(A=h.period,u=h.count,y=k);h=A;"WW"==h&&(h="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var B=Math.ceil(this.timeDifference/y)+5,D=l=d.resetDateToMin(new Date(this.startTime-y),A,u,t).getTime();if(h==A&&1==u&&this.centerLabelOnFullPeriod||this.autoWrap||this.centerLabels)n=y*this.stepWidth,this.autoWrap&&!this.centerLabels&&(n=-n);this.cellWidth=k*this.stepWidth;q=Math.round(l/y);k=-1;q/2==Math.round(q/2)&&(k=-2,l-=y);q=this.firstTime;var C=0,I=0;a&&1<u&&(w=this.chooseMinorFrequency(u),x=d.getPeriodDuration(A,w),"DD"==A&&(x+=d.getPeriodDuration("hh")),"fff"==A&&(x=1));if(0<this.gridCountR)for(B-5-k>this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),a=k;a<=B;a++){p=q+y*(a+Math.floor((D-q)/y))-C;"DD"==A&&(p+=36E5);p=d.resetDateToMin(new Date(p),A,u,t).getTime();"MM"==A&&(g=(p-l)/y,1.5<=(p-l)/y&&(p=p-(g-1)*y+d.getPeriodDuration("DD",3),p=d.resetDateToMin(new Date(p),A,1).getTime(),C+=y));g=(p-this.startTime)*this.stepWidth;if("radar"==b.type){if(g=this.axisWidth-g,0>g||g>this.axisWidth)continue}else this.rotate?"date"==this.type&&"middle"==this.gridPosition&&(I=-y*this.stepWidth/2):"date"==this.type&&(g=this.axisWidth-g);f=!1;this.nextPeriod[h]&&(f=this.checkPeriodChange(this.nextPeriod[h],1,p,l,h));l=!1;f&&this.markPeriodChange?(f=this.dateFormatsObject[this.nextPeriod[h]],this.twoLineMode&&(f=this.dateFormatsObject[h]+"\n"+f,f=d.fixBrakes(f)),l=!0):f=this.dateFormatsObject[h];r||(l=!1);this.currentDateFormat=f;f=d.formatDate(new Date(p),f,b);if(a==k&&!c||a==B&&!e)f=" ";this.labelFunction&&(f=this.labelFunction(f,new Date(p),this,A,u,m).toString());this.boldLabels&&(l=!0);m=new this.axisItemRenderer(this,g,f,!1,n,I,!1,l);this.pushAxisItem(m);m=l=p;if(!isNaN(w))for(g=1;g<u;g+=w)this.gridAlpha=this.minorGridAlpha,f=p+x*g,f=d.resetDateToMin(new Date(f),A,w,t).getTime(),f=new this.axisItemRenderer(this,(f-this.startTime)*this.stepWidth,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),this.pushAxisItem(f);this.gridAlpha=z}},choosePeriod:function(a){var b=d.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=this.periods;return this.timeDifference<b&&0<a?c[a-1]:Math.ceil(this.timeDifference/b)<=this.gridCountR?c[a]:a+1<c.length?this.choosePeriod(a+1):c[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=d.extractPeriod(this.minPeriod);return d.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,b,c,e,g){c=new Date(c);var f=new Date(e),h=this.firstDayOfWeek;e=b;"DD"==a&&(b=1);c=d.resetDateToMin(c,a,b,h).getTime();b=d.resetDateToMin(f,a,b,h).getTime();return"DD"==a&&"hh"!=g&&c-b<d.getPeriodDuration(a,e)-d.getPeriodDuration("hh",1)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},hideBalloon:function(){this.balloon&&this.balloon.hide&&this.balloon.hide();this.prevBY=this.prevBX=NaN},formatBalloonText:function(a){return a},showBalloon:function(a,b,c,e){var d=this.offset;switch(this.position){case"bottom":b=this.height+d;break;case"top":b=-d;break;case"left":a=-d;break;case"right":a=this.width+d}c||(c=this.currentDateFormat);if("V"==this.orientation){if(0>b||b>this.height)return;if(isNaN(b)){this.hideBalloon();return}b=this.adjustBalloonCoordinate(b,e);e=this.coordinateToValue(b)}else{if(0>a||a>this.width)return;if(isNaN(a)){this.hideBalloon();return}a=this.adjustBalloonCoordinate(a,e);e=this.coordinateToValue(a)}var f;if(d=this.chart.chartCursor)f=d.index;if(this.balloon&&void 0!==e&&this.balloon.enabled){if(this.balloonTextFunction){if("date"==this.type||!0===this.parseDates)e=new Date(e);e=this.balloonTextFunction(e)}else this.balloonText?e=this.formatBalloonText(this.balloonText,f,c):isNaN(e)||(e=this.formatValue(e,c));if(a!=this.prevBX||b!=this.prevBY)this.balloon.setPosition(a,b),this.prevBX=a,this.prevBY=b,e&&this.balloon.showBalloon(e)}},adjustBalloonCoordinate:function(a){return a},createBalloon:function(){var a=this.chart,b=a.chartCursor;b&&(b=b.cursorPosition,"mouse"!=b&&(this.stickBalloonToCategory=!0),"start"==b&&(this.stickBalloonToStart=!0),"ValueAxis"==this.cname&&(this.stickBalloonToCategory=!1));this.balloon&&(this.balloon.destroy&&this.balloon.destroy(),d.extend(this.balloon,a.balloon,!0))},setBalloonBounds:function(){var a=this.balloon;if(a){var b=this.chart;a.cornerRadius=0;a.shadowAlpha=0;a.borderThickness=1;a.borderAlpha=1;a.adjustBorderColor=!1;a.showBullet=!1;this.balloon=a;a.chart=b;a.mainSet=b.plotBalloonsSet;a.pointerWidth=this.tickLength;if(this.parseDates||"date"==this.type)a.pointerWidth=0;a.className=this.id;b="V";"V"==this.orientation&&(b="H");this.stickBalloonToCategory||(a.animationDuration=0);var c,e,d,f,h=this.inside,k=this.width,l=this.height;switch(this.position){case"bottom":c=0;e=k;h?(d=0,f=l):(d=l,f=l+1E3);break;case"top":c=0;e=k;h?(d=0,f=l):(d=-1E3,f=0);break;case"left":d=0;f=l;h?(c=0,e=k):(c=-1E3,e=0);break;case"right":d=0,f=l,h?(c=0,e=k):(c=k,e=k+1E3)}a.drop||(a.pointerOrientation=b);a.setBounds(c,d,e,f)}}})})();(function(){var d=window.AmCharts;d.ValueAxis=d.Class({inherits:d.AxisBase,construct:function(a){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisZoomed","axisIntZoomed");d.ValueAxis.base.construct.call(this,a);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.includeAllValues=this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.axisFrequency=1;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.pointPosition="axis";this.minMaxMultiplier=1;this.logGridLimit=2;this.totalTextOffset=this.treatZeroAs=0;this.minPeriod="ss";this.relativeStart=0;this.relativeEnd=1;d.applyTheme(this,a,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();if(this.synchronizationMultiplier&&this.synchronizeWith)d.isString(this.synchronizeWith)&&(this.synchronizeWith=a.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0);else if(this.foundGraphs=!1,this.getMinMax(),0===this.start&&this.end==this.data.length-1&&isNaN(this.minZoom)&&isNaN(this.maxZoom)||isNaN(this.fullMin)&&isNaN(this.fullMax))this.fullMin=this.min,this.fullMax=this.max,"date"!=this.type&&this.strictMinMax&&(isNaN(this.minimum)||(this.fullMin=this.minimum),isNaN(this.maximum)||(this.fullMax=this.maximum)),this.logarithmic&&(this.fullMin=this.logMin,0===this.fullMin&&(this.fullMin=this.treatZeroAs)),"date"==this.type&&(this.minimumDate||(this.fullMin=this.minRR),this.maximumDate||(this.fullMax=this.maxRR),this.strictMinMax&&(this.minimumDate&&(this.fullMin=this.minimumDate.getTime()),this.maximumDate&&(this.fullMax=this.maximumDate.getTime())))},draw:function(){d.ValueAxis.base.draw.call(this);var a=this.chart,b=this.set;this.labelRotationR=this.labelRotation;
320d.setCN(a,this.set,"value-axis value-axis-"+this.id);d.setCN(a,this.labelsSet,"value-axis value-axis-"+this.id);d.setCN(a,this.axisLine.axisSet,"value-axis value-axis-"+this.id);var c=this.type;"duration"==c&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);"date"==c&&(this.logarithmic=!1,this.min=this.minRR,this.max=this.maxRR,this.reversed=!1,this.getDateMinMax());if(this.logarithmic){var e=this.treatZeroAs,g=this.getExtremes(0,this.data.length-1).min;!isNaN(this.minimum)&&this.minimum<g&&(g=this.minimum);this.logMin=g;this.minReal<g&&(this.minReal=g);isNaN(this.minReal)&&(this.minReal=g);0<e&&0===g&&(this.minReal=g=e);if(0>=g||0>=this.minimum){this.fire({type:"logarithmicAxisFailed",chart:a});return}}this.grid0=null;var f,h,k=a.dx,l=a.dy,e=!1,g=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)e=!0;else{"date"==this.type&&this.min==this.max&&(this.max+=this.minDuration(),this.min-=this.minDuration());var m=this.labelFrequency,n=this.showFirstLabel,q=this.showLastLabel,p=1,t=0;this.minCalc=this.min;this.maxCalc=this.max;if(this.strictMinMax&&(isNaN(this.minimum)||(this.min=this.minimum),isNaN(this.maximum)||(this.max=this.maximum),this.min==this.max))return;isNaN(this.minZoom)||(this.minReal=this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);if(this.logarithmic){h=this.fullMin;var r=this.fullMax;isNaN(this.minimum)||(h=this.minimum);isNaN(this.maximum)||(r=this.maximum);var r=Math.log(r)*Math.LOG10E-Math.log(h)*Math.LOG10E,w=Math.log(this.max)/Math.LN10-Math.log(h)*Math.LOG10E;this.relativeStart=d.roundTo((Math.log(this.minReal)/Math.LN10-Math.log(h)*Math.LOG10E)/r,5);this.relativeEnd=d.roundTo(w/r,5)}else this.relativeStart=d.roundTo(d.fitToBounds((this.min-this.fullMin)/(this.fullMax-this.fullMin),0,1),5),this.relativeEnd=d.roundTo(d.fitToBounds((this.max-this.fullMin)/(this.fullMax-this.fullMin),0,1),5);var r=Math.round((this.maxCalc-this.minCalc)/this.step)+1,z;!0===g?(z=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/z,z>this.logGridLimit&&(r=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,t=Math.round(Math.log(this.minReal)*Math.LOG10E),r>this.gridCountR&&(p=Math.ceil(r/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var x=0;1>this.step&&-1<this.step&&(x=d.getDecimals(this.step));this.integersOnly&&(x=0);x>this.maxDecCount&&(x=this.maxDecCount);w=this.precision;isNaN(w)||(x=w);isNaN(this.maxZoom)&&(this.max=d.roundTo(this.max,this.maxDecCount),this.min=d.roundTo(this.min,this.maxDecCount));h={};h.precision=x;h.decimalSeparator=a.nf.decimalSeparator;h.thousandsSeparator=a.nf.thousandsSeparator;this.numberFormatter=h;var u;this.exponential=!1;for(h=t;h<r;h+=p){var A=d.roundTo(this.step*h+this.min,x);-1!=String(A).indexOf("e")&&(this.exponential=!0)}this.duration&&(this.maxInterval=d.getMaxInterval(this.max,this.duration));var x=this.step,y,A=this.minorGridAlpha;this.minorGridEnabled&&(y=this.getMinorGridStep(x,this.stepWidth*x));if(this.autoGridCount||0!==this.gridCount)if("date"==c)this.generateDFObject(),this.timeDifference=this.max-this.min,this.maxTime=this.lastTime=this.max,this.startTime=this.firstTime=this.min,this.parseDatesDraw();else for(r>=this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),c=this.minCalc,g&&(r++,c=this.maxCalc-r*x),this.gridCountReal=r,h=this.startCount=t;h<r;h+=p)if(t=x*h+c,t=d.roundTo(t,this.maxDecCount+1),!this.integersOnly||Math.round(t)==t)if(isNaN(w)||Number(d.toFixed(t,w))==t){if(!0===g)if(z>this.logGridLimit){if(t=Math.pow(10,h),t>this.max)continue}else if(0>=t&&(t=c+x*h+x/2,0>=t))continue;u=this.formatValue(t,!1,h);Math.round(h/m)!=h/m&&(u=void 0);if(0===h&&!n||h==r-1&&!q)u=" ";f=this.getCoordinate(t);var B;this.rotate&&this.autoWrap&&(B=this.stepWidth*x-10);u=new this.axisItemRenderer(this,f,u,void 0,B,void 0,void 0,this.boldLabels);this.pushAxisItem(u);if(t==this.baseValue&&"radar"!=a.type){var D,C,I=this.width,H=this.height;"H"==this.orientation?0<=f&&f<=I+1&&(D=[f,f,f+k],C=[H,0,l]):0<=f&&f<=H+1&&(D=[0,I,I+k],C=[f,f,f+l]);D&&(f=d.fitToBounds(2*this.gridAlpha,0,1),isNaN(this.zeroGridAlpha)||(f=this.zeroGridAlpha),f=d.line(a.container,D,C,this.gridColor,f,1,this.dashLength),f.translate(this.x,this.y),this.grid0=f,a.axesSet.push(f),f.toBack(),d.setCN(a,f,this.bcn+"zero-grid-"+this.id
320),d.setCN(a,f,this.bcn+"zero-grid"))}if(!isNaN(y)&&0<A&&h<r-1){f=x/y;g&&(y=x*(h+p)+this.minCalc,y=d.roundTo(y,this.maxDecCount+1),z>this.logGridLimit&&(y=Math.pow(10,h+p)),f=9,y=(y-t)/f);I=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(H=1;H<f;H++){var Q=this.getCoordinate(t+y*H),Q=new this.axisItemRenderer(this,Q,"",!1,0,0,!1,!1,0,!0);this.pushAxisItem(Q)}this.gridAlpha=I}}z=this.guides;B=z.length;if(0<B){D=this.fillAlpha;for(h=this.fillAlpha=0;h<B;h++)C=z[h],k=NaN,y=C.above,isNaN(C.toValue)||(k=this.getCoordinate(C.toValue),u=new this.axisItemRenderer(this,k,"",!0,NaN,NaN,C),this.pushAxisItem(u,y)),l=NaN,isNaN(C.value)||(l=this.getCoordinate(C.value),u=new this.axisItemRenderer(this,l,C.label,!0,NaN,(k-l)/2,C),this.pushAxisItem(u,y)),isNaN(k)&&(l-=3,k=l+3),u&&(m=u.label)&&this.addEventListeners(m,C),isNaN(k-l)||0>l&&0>k||(k=new this.guideFillRenderer(this,l,k,C),this.pushAxisItem(k,y),y=k.graphics(),C.graphics=y,this.addEventListeners(y,C));this.fillAlpha=D}u=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(u=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(u=this.max);g&&u<this.minReal&&(u=this.minReal);this.baseCoord=this.getCoordinate(u,!0);u={type:"axisChanged",target:this,chart:a};u.min=g?this.minReal:this.min;u.max=this.max;this.fire(u);this.axisCreated=!0}g=this.axisLine.set;u=this.labelsSet;b.translate(this.x,this.y);u.translate(this.x,this.y);this.positionTitle();"radar"!=a.type&&g.toFront();!this.visible||e?(b.hide(),g.hide(),u.hide()):(b.show(),g.show(),u.show());this.axisY=this.y;this.axisX=this.x},getDateMinMax:function(){this.minimumDate&&(this.minimumDate instanceof Date||(this.minimumDate=d.getDate(this.minimumDate,this.chart.dataDateFormat,"fff")),this.min=this.minimumDate.getTime());this.maximumDate&&(this.maximumDate instanceof Date||(this.maximumDate=d.getDate(this.maximumDate,this.chart.dataDateFormat,"fff")),this.max=this.maximumDate.getTime())},formatValue:function(a,b,c){var e=this.exponential,g=this.logarithmic,f=this.numberFormatter,h=this.chart;if(f)return!0===this.logarithmic&&(e=-1!=String(a).indexOf("e")?!0:!1),this.useScientificNotation&&(e=!0),this.usePrefixes&&(e=!1),e?(c=-1==String(a).indexOf("e")?a.toExponential(15):String(a),e=c.split("e"),c=Number(e[0]),e=Number(e[1]),c=d.roundTo(c,14),b||isNaN(this.precision)||(c=d.roundTo(c,this.precision)),10==c&&(c=1,e+=1),c=c+"e"+e,0===a&&(c="0"),1==a&&(c="1")):(g&&(e=String(a).split("."),e[1]?(f.precision=e[1].length,0>c&&(f.precision=Math.abs(c)),b&&1<a&&(f.precision=0),b||isNaN(this.precision)||(f.precision=this.precision)):f.precision=-1),c=this.usePrefixes?d.addPrefix(a,h.prefixesOfBigNumbers,h.prefixesOfSmallNumbers,f,!b):d.formatNumber(a,f,f.precision)),this.duration&&(b&&(f.precision=0),c=d.formatDuration(a,this.duration,"",this.durationUnits,this.maxInterval,f)),"date"==this.type&&(c=d.formatDate(new Date(a),this.currentDateFormat,h)),this.recalculateToPercents?c+="%":(b=this.unit)&&(c="left"==this.unitPosition?b+c:c+b),this.labelFunction&&(c="date"==this.type?this.labelFunction(c,new Date(a),this).toString():this.labelFunction(a,c,this).toString()),c},getMinorGridStep:function(a,b){var c=[5,4,2];60>b&&c.shift();for(var e=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),d=0;d<c.length;d++){var f=a/c[d],h=Math.floor(Math.log(Math.abs(f))*Math.LOG10E);if(!(1<Math.abs(e-h)))if(1>a){if(h=Math.pow(10,-h)*f,h==Math.round(h))return f}else if(f==Math.round(f))return f}return 1},stackGraphs:function(a){var b=this.stackType;"stacked"==b&&(b="regular");"line"==b&&(b="none");"100% stacked"==b&&(b="100%");this.stackType=b;var c=[],e=[],g=[],f=[],h,k=this.chart.graphs,l,m,n,q,p,t=this.baseValue,r=!1;if("line"==a||"step"==a||"smoothedLine"==a)r=!0;if(r&&("regular"==b||"100%"==b))for(q=0;q<k.length;q++)n=k[q],n.stackGraph=null,n.hidden||(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable&&(l&&(n.stackGraph=l),l=n));n=this.start-10;l=this.end+10;q=this.data.length-1;n=d.fitToBounds(n,0,q);l=d.fitToBounds(l,0,q);for(p=n;p<=l;p++){var w=0;for(q=0;q<k.length;q++)if(n=k[q],n.hidden)n.newStack&&(g[p]=NaN,e[p]=NaN);else if(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable)if(m=this.data[p].axes[this.id].graphs[n.id],h=m.values.value,isNaN(h))n.newStack&&(g[p]=NaN,e[p]=NaN);else{var z=d.getDecimals(h);w<z&&(w=z);isNaN(f[p])?f[p]=Math.abs(h):f[p]+=Math.abs(h);
320f[p]=d.roundTo(f[p],w);z=n.fillToGraph;r&&z&&(z=this.data[p].axes[this.id].graphs[z.id])&&(m.values.open=z.values.value);"regular"==b&&(r&&(isNaN(c[p])?(c[p]=h,m.values.close=h,m.values.open=this.baseValue):(isNaN(h)?m.values.close=c[p]:m.values.close=h+c[p],m.values.open=c[p],c[p]=m.values.close)),"column"==a&&(n.newStack&&(g[p]=NaN,e[p]=NaN),m.values.close=h,0>h?(m.values.close=h,isNaN(e[p])?m.values.open=t:(m.values.close+=e[p],m.values.open=e[p]),e[p]=m.values.close):(m.values.close=h,isNaN(g[p])?m.values.open=t:(m.values.close+=g[p],m.values.open=g[p]),g[p]=m.values.close)))}}for(p=this.start;p<=this.end;p++)for(q=0;q<k.length;q++)(n=k[q],n.hidden)?n.newStack&&(g[p]=NaN,e[p]=NaN):(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable&&(m=this.data[p].axes[this.id].graphs[n.id],h=m.values.value,isNaN(h)||(c=h/f[p]*100,m.values.percents=c,m.values.total=f[p],n.newStack&&(g[p]=NaN,e[p]=NaN),"100%"==b&&(isNaN(e[p])&&(e[p]=0),isNaN(g[p])&&(g[p]=0),0>c?(m.values.close=d.fitToBounds(c+e[p],-100,100),m.values.open=e[p],e[p]=m.values.close):(m.values.close=d.fitToBounds(c+g[p],-100,100),m.values.open=g[p],g[p]=m.values.close)))))},recalculate:function(){var a=this.chart,b=a.graphs,c;for(c=0;c<b.length;c++){var e=b[c];if(e.valueAxis==this){var g="value";if("candlestick"==e.type||"ohlc"==e.type)g="open";var f,h,k=this.end+2,k=d.fitToBounds(this.end+1,0,this.data.length-1),l=this.start;0<l&&l--;var m;h=this.start;e.compareFromStart&&(h=0);if(!isNaN(a.startTime)&&(m=a.categoryAxis)){var n=m.minDuration(),n=new Date(a.startTime+n/2),q=d.resetDateToMin(new Date(a.startTime),m.minPeriod).getTime();d.resetDateToMin(new Date(n),m.minPeriod).getTime()>q&&h++}if(m=a.recalculateFromDate)m=d.getDate(m,a.dataDateFormat,"fff"),h=a.getClosestIndex(a.chartData,"time",m.getTime(),!0,0,a.chartData.length),k=a.chartData.length-1;for(m=h;m<=k&&(h=this.data[m].axes[this.id].graphs[e.id],f=h.values[g],e.recalculateValue&&(f=h.dataContext[e.valueField+e.recalculateValue]),isNaN(f));m++);this.recBaseValue=f;for(g=l;g<=k;g++){h=this.data[g].axes[this.id].graphs[e.id];h.percents={};var l=h.values,p;for(p in l)h.percents[p]="percents"!=p?l[p]/f*100-100:l[p]}}}},getMinMax:function(){var a=!1,b=this.chart,c=b.graphs,e;for(e=0;e<c.length;e++){var g=c[e].type;("line"==g||"step"==g||"smoothedLine"==g)&&this.expandMinMax&&(a=!0)}a&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==b.type&&(!0!==b.categoryAxis.parseDates||a||this.end<this.data.length-1&&this.end++);this.includeAllValues&&(this.start=0,this.end=this.data.length-1);a=this.minMaxMultiplier;b=this.getExtremes(this.start,this.end);this.min=b.min;this.max=b.max;this.minRR=this.min;this.maxRR=this.max;a=(this.max-this.min)*(a-1);this.min-=a;this.max+=a;a=this.guides.length;if(this.includeGuidesInMinMax&&0<a)for(b=0;b<a;b++)c=this.guides[b],c.toValue<this.min&&(this.min=c.toValue),c.value<this.min&&(this.min=c.value),c.toValue>this.max&&(this.max=c.toValue),c.value>this.max&&(this.max=c.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);"date"==this.type&&this.getDateMinMax();this.min>this.max&&(a=this.max,this.max=this.min,this.min=a);isNaN(this.minZoom)||(this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);this.minCalc=this.min;this.maxCalc=this.max;this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);a=this.min;b=this.max;c=this.max-this.min;e=0===c?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;isNaN(this.maximum)&&(this.max=Math.ceil(this.max/e)*e+e);isNaN(this.minimum)&&(this.min=Math.floor(this.min/e)*e-e);0>this.min&&0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);c=this.max-this.min;e=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;this.step=Math.ceil(c/this.gridCountR/e)*e;c=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));c=d.fixStepE(c);e=Math.ceil(this.step/c);5<e&&(e=10);5>=e&&2<e&&(e=5);this.step=Math.ceil(this.step/(c*e))*c*e;isNaN(this.setStep)||(this.step=this.setStep);1>c?(this.maxDecCount=Math.abs(Math.log(Math.abs(c))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=d.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);
3201<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));c=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=c);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);this.logarithmic&&(2<Math.log(b)*Math.LOG10E-Math.log(a)*Math.LOG10E?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E)),this.maxReal=this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(b))*Math.LOG10E))):(a=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E))/10,Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10<a&&(this.minReal=this.min=10*a)))},getExtremes:function(a,b){var c,e,d;for(d=a;d<=b;d++){var f=this.data[d].axes[this.id].graphs,h;for(h in f)if(f.hasOwnProperty(h)){var k=this.chart.graphsById[h];if(k.includeInMinMax&&(!k.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);isNaN(e)&&(e=-Infinity);this.foundGraphs=!0;k=f[h].values;this.recalculateToPercents&&(k=f[h].percents);var l;if(this.minMaxField)l=k[this.minMaxField],l<c&&(c=l),l>e&&(e=l);else for(var m in k)k.hasOwnProperty(m)&&"percents"!=m&&"total"!=m&&"error"!=m&&(l=k[m],l<c&&(c=l),l>e&&(e=l))}}}return{min:c,max:e}},zoomOut:function(a){this.maxZoom=this.minZoom=NaN;this.zoomToRelativeValues(0,1,a)},zoomToRelativeValues:function(a,b,c){if(this.reversed){var e=a;a=1-b;b=1-e}var d=this.fullMax,e=this.fullMin,f=e+(d-e)*a,h=e+(d-e)*b;0<=this.minimum&&0>f&&(f=0);this.logarithmic&&(isNaN(this.minimum)||(e=this.minimum),isNaN(this.maximum)||(d=this.maximum),d=Math.log(d)*Math.LOG10E-Math.log(e)*Math.LOG10E,f=Math.pow(10,d*a+Math.log(e)*Math.LOG10E),h=Math.pow(10,d*b+Math.log(e)*Math.LOG10E));return this.zoomToValues(f,h,c)},zoomToValues:function(a,b,c){if(b<a){var e=b;b=a;a=e}var g=this.fullMax,e=this.fullMin;this.relativeStart=d.roundTo((a-e)/(g-e),9);this.relativeEnd=d.roundTo((b-e)/(g-e),9);if(this.logarithmic){isNaN(this.minimum)||(e=this.minimum);isNaN(this.maximum)||(g=this.maximum);var g=Math.log(g)*Math.LOG10E-Math.log(e)*Math.LOG10E,f=Math.log(b)/Math.LN10- 321Math.log(e)*Math.LOG10E;this.relativeStart=d.roundTo((Math.log(a)/Math.LN10-Math.log(e)*Math.LOG10E)/g,9);this.relativeEnd=d.roundTo(f/g,9)}if(this.minZoom!=a||this.maxZoom!=b)return this.minZoom=a,this.maxZoom=b,e={type:"axisZoomed"},e.chart=this.chart,e.valueAxis=this,e.startValue=a,e.endValue=b,e.relativeStart=this.relativeStart,e.relativeEnd=this.relativeEnd,this.prevStartValue==a&&this.prevEndValue==b||this.fire(e),this.prevStartValue=a,this.prevEndValue=b,c||(a={},d.copyProperties(e,a),a.type="axisIntZoomed",this.fire(a)),0===this.relativeStart&&1==this.relativeEnd&&(this.maxZoom=this.minZoom=NaN),!0},coordinateToValue:function(a){if(isNaN(a))return NaN;var b=this.axisWidth,c=this.stepWidth,e=this.reversed,d=this.rotate,f=this.min,h=this.minReal;return!0===this.logarithmic?Math.pow(10,(d?!0===e?(b-a)/c:a/c:!0===e?a/c:(b-a)/c)+Math.log(h)*Math.LOG10E):!0===e?d?f-(a-b)/c:a/c+f:d?a/c+f:f-(a-b)/c},getCoordinate:function(a,b){if(isNaN(a))return NaN;var c=this.rotate,e=this.reversed,d=this.axisWidth,f=this.stepWidth,h=this.min,k=this.minReal;!0===this.logarithmic?(0===a&&(a=this.treatZeroAs),h=Math.log(a)*Math.LOG10E-Math.log(k)*Math.LOG10E,c=c?!0===e?d-f*h:f*h:!0===e?f*h:d-f*h):c=!0===e?c?d-f*(a-h):f*(a-h):c?f*(a-h):d-f*(a-h);1E7<Math.abs(c)&&(c=c/Math.abs(c)*1E7);b||(c=Math.round(c));return c},synchronizeWithAxis:function(a){this.synchronizeWith=a;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(){if(this.synchronizeWith){d.isString(this.synchronizeWith)&&(this.synchronizeWith=this.chart.getValueAxisById(this.synchronizeWith));var a=this.synchronizeWith,b=a.min,c=a.max,a=a.step,e=this.synchronizationMultiplier;e&&(this.min=b*e,this.max=c*e,this.step=a*e,b=Math.abs(Math.log(Math.abs(Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E))))*Math.LOG10E),this.maxDecCount=b=Math.round(b),this.draw())}}})})();(function(){var d=window.AmCharts;d.RecAxis=d.Class({construct:function(a){var b=a.chart,c=a.axisThickness,e=a.axisColor,g=a.axisAlpha,f=a.offset,h=a.dx,k=a.dy,l=a.x,m=a.y,n=a.height,q=a.width,p=b.container;"H"==a.orientation?(e=d.line(p,[0,q],[0,0],e,g,c),this.axisWidth=a.width,"bottom"==a.position?(k=c/2+f+n+m-1,c=l):(k=-c/2-f+m+k,c=h+l)):(this.axisWidth=a.height,"right"==a.position?(e=d.line(p,[0,0,-h],[0,n,n-k],e,g,c),k=m+k,c=c/2+f+h+q+l-1):(e=
321d.line(p,[0,0],[0,n],e,g,c),k=m,c=-c/2-f+l));e.translate(c,k);c=b.container.set();c.push(e);b.axesSet.push(c);d.setCN(b,e,a.bcn+"line");this.axisSet=c;this.set=e}})})();(function(){var d=window.AmCharts;d.RecItem=d.Class({construct:function(a,b,c,e,g,f,h,k,l,m,n,q){b=Math.round(b);var p=a.chart;this.value=c;void 0==c&&(c="");l||(l=0);void 0==e&&(e=!0);var t=p.fontFamily,r=a.fontSize;void 0==r&&(r=p.fontSize);var w=a.color;void 0==w&&(w=p.color);void 0!==n&&(w=n);var z=a.chart.container,x=z.set();this.set=x;var u=a.axisThickness,A=a.axisColor,y=a.axisAlpha,B=a.tickLength,D=a.gridAlpha,C=a.gridThickness,I=a.gridColor,H=a.dashLength,Q=a.fillColor,M=a.fillAlpha,P=a.labelsEnabled;n=a.labelRotationR;var ia=a.counter,J=a.inside,aa=a.labelOffset,ma=a.dx,na=a.dy,Pa=a.orientation,Z=a.position,da=a.previousCoord,X=a.height,xa=a.width,ea=a.offset,fa,Ba;h?(void 0!==h.id&&(q=p.classNamePrefix+"-guide-"+h.id),P=!0,isNaN(h.tickLength)||(B=h.tickLength),void 0!=h.lineColor&&(I=h.lineColor),void 0!=h.color&&(w=h.color),isNaN(h.lineAlpha)||(D=h.lineAlpha),isNaN(h.dashLength)||(H=h.dashLength),isNaN(h.lineThickness)||(C=h.lineThickness),!0===h.inside&&(J=!0,0<ea&&(ea=0)),isNaN(h.labelRotation)||(n=h.labelRotation),isNaN(h.fontSize)||(r=h.fontSize),h.position&&(Z=h.position),void 0!==h.boldLabel&&(k=h.boldLabel),isNaN(h.labelOffset)||(aa=h.labelOffset)):""===c&&(B=0);m&&!isNaN(a.minorTickLength)&&(B=a.minorTickLength);var ga="start";0<g&&(ga="middle");a.centerLabels&&(ga="middle");var V=n*Math.PI/180,Y,Da,G=0,v=0,oa=0,ha=Y=0,Qa=0;"V"==Pa&&(n=0);var ca;P&&""!==c&&(ca=a.autoWrap&&0===n?d.wrappedText(z,c,w,t,r,ga,k,Math.abs(g),0):d.text(z,c,w,t,r,ga,k),ga=ca.getBBox(),ha=ga.width,Qa=ga.height);if("H"==Pa){if(0<=b&&b<=xa+1&&(0<B&&0<y&&b+l<=xa+1&&(fa=d.line(z,[b+l,b+l],[0,B],A,y,C),x.push(fa)),0<D&&(Ba=d.line(z,[b,b+ma,b+ma],[X,X+na,na],I,D,C,H),x.push(Ba))),v=0,G=b,h&&90==n&&J&&(G-=r),!1===e?(ga="start",v="bottom"==Z?J?v+B:v-B:J?v-B:v+B,G+=3,0<g&&(G+=g/2-3,ga="middle"),0<n&&(ga="middle")):ga="middle",1==ia&&0<M&&!h&&!m&&da<xa&&(e=d.fitToBounds(b,0,xa),da=d.fitToBounds(da,0,xa),Y=e-da,0<Y&&(Da=d.rect(z,Y,a.height,Q,M),Da.translate(e-Y+ma,na),x.push(Da))),"bottom"==Z?(v+=X+r/2+ea,J?(0<n?(v=X-ha/2*Math.sin(V)-B-3,a.centerRotatedLabels||(G+=ha/2*Math.cos(V)-4+2)):0>n?(v=X+ha*Math.sin(V)-B-3+2,G+=-ha*Math.cos(V)-Qa*Math.sin(V)-4):v-=B+r+3+3,v-=aa):(0<n?(v=X+ha/2*Math.sin(V)+B+3,a.centerRotatedLabels||(G-=ha/2*Math.cos(V))):0>n?(v=X+B+3-ha/2*Math.sin(V)+2,G+=ha/2*Math.cos(V)):v+=B+u+3+3,v+=aa)):(v+=na+r/2-ea,G+=ma,J?(0<n?(v=ha/2*Math.sin(V)+B+3,a.centerRotatedLabels||(G-=ha/2*Math.cos(V))):v+=B+3,v+=aa):(0<n?(v=-(ha/2)*Math.sin(V)-B-6,a.centerRotatedLabels||(G+=ha/2*Math.cos(V))):v-=B+ 322r+3+u+3,v-=aa)),"bottom"==Z?Y=(J?X-B-1:X+u-1)+ea:(oa=ma,Y=(J?na:na-B-u+1)-ea),f&&(G+=f),r=G,0<n&&(r+=ha/2*Math.cos(V)),ca&&(f=0,J&&(f=ha/2*Math.cos(V)),r+f>xa+2||0>r))ca.remove(),ca=null}else{0<=b&&b<=X+1&&(0<B&&0<y&&b+l<=X+1&&(fa=d.line(z,[0,B+1],[b+l,b+l],A,y,C),x.push(fa)),0<D&&(Ba=d.line(z,[0,ma,xa+ma],[b,b+na,b+na],I,D,C,H),x.push(Ba)));ga="end";if(!0===J&&"left"==Z||!1===J&&"right"==Z)ga="start";v=b-Qa/2+2;
3221==ia&&0<M&&!h&&!m&&(e=d.fitToBounds(b,0,X),da=d.fitToBounds(da,0,X),V=e-da,Da=d.polygon(z,[0,a.width,a.width,0],[0,0,V,V],Q,M),Da.translate(ma,e-V+na),x.push(Da));v+=r/2;"right"==Z?(G+=ma+xa+ea,v+=na,J?(f||(v-=r/2+3),G=G-(B+4)-aa):(G+=B+4+u,v-=2,G+=aa)):J?(G+=B+4-ea,f||(v-=r/2+3),h&&(G+=ma,v+=na),G+=aa):(G+=-B-u-4-2-ea,v-=2,G-=aa);fa&&("right"==Z?(oa+=ma+ea+xa-1,Y+=na,oa=J?oa-u:oa+u):(oa-=ea,J||(oa-=B+u)));f&&(v+=f);J=-3;"right"==Z&&(J+=na);ca&&(v>X+1||v<J-r/10)&&(ca.remove(),ca=null)}fa&&(fa.translate(oa,Y),d.setCN(p,fa,a.bcn+"tick"),d.setCN(p,fa,q,!0),h&&d.setCN(p,fa,"guide"));!1===a.visible&&(fa&&fa.remove(),ca&&(ca.remove(),ca=null));ca&&(ca.attr({"text-anchor":ga}),ca.translate(G,v,NaN,!0),0!==n&&ca.rotate(-n,a.chart.backgroundColor),a.allLabels.push(ca),this.label=ca,d.setCN(p,ca,a.bcn+"label"),d.setCN(p,ca,q,!0),h&&d.setCN(p,ca,"guide"));Ba&&(d.setCN(p,Ba,a.bcn+"grid"),d.setCN(p,Ba,q,!0),h&&d.setCN(p,Ba,"guide"));Da&&(d.setCN(p,Da,a.bcn+"fill"),d.setCN(p,Da,q,!0));m?Ba&&d.setCN(p,Ba,a.bcn+"grid-minor"):(a.counter=0===ia?1:0,a.previousCoord=b);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}})})();(function(){var d=window.AmCharts;d.RecFill=d.Class({construct:function(a,b,c,e){var g=a.dx,f=a.dy,h=a.orientation,k=0;if(c<b){var l=b;b=c;c=l}var m=e.fillAlpha;isNaN(m)&&(m=0);var l=a.chart.container,n=e.fillColor;"V"==h?(b=d.fitToBounds(b,0,a.height),c=d.fitToBounds(c,0,a.height)):(b=d.fitToBounds(b,0,a.width),c=d.fitToBounds(c,0,a.width));c-=b;isNaN(c)&&(c=4,k=2,m=0);0>c&&"object"==typeof n&&(n=n.join(",").split(",").reverse());"V"==h?(h=d.rect(l,a.width,c,n,m),h.translate(g,b-k+f)):(h=d.rect(l,c,a.height,n,m),h.translate(b-k+g,f));d.setCN(a.chart,h,"guide-fill");e.id&&d.setCN(a.chart,h,"guide-fill-"+e.id);this.set=l.set([h])},graphics:function(){return this.set},getLabel:function(){}})})();(function(){var d=window.AmCharts;d.AmChart=d.Class({construct:function(a){this.svgIcons=this.tapToActivate=!0;this.theme=a;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.21.15";d.addChart(this);this.createEvents("buildStarted","dataUpdated","init","rendered","drawn","failed","resized","animationFinished");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.autoResize=!0;this.autoDisplay=!1;this.addCodeCredits=this.accessible=!0;this.touchStartTime=this.touchClickDuration=0;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var b=document.createElement("div"),c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.chartDiv=b;b=document.createElement("div");c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.legendDiv=b;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.cssScale=this.handDrawThickness=1;this.cssAngle=0;this.prefixesOfBigNumbers=[{number:1E3,prefix:"k"},{number:1E6,prefix:"M"},{number:1E9,prefix:"G"},{number:1E12,prefix:"T"},{number:1E15,prefix:"P"},{number:1E18,prefix:"E"},{number:1E21,prefix:"Z"},{number:1E24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1E-24,prefix:"y"},{number:1E-21,prefix:"z"},{number:1E-18,prefix:"a"},{number:1E-15,prefix:"f"},{number:1E-12,prefix:"p"},{number:1E-9,prefix:"n"},{number:1E-6,prefix:"\u03bc"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new d.AmBalloon(this.theme);this.balloon.chart=this;this.processTimeout=0;this.processCount=1E3;this.animatable=[];this.langObj={};d.applyTheme(this,a,"AmChart")},drawChart:function(){0<this.realWidth&&0<this.realHeight&&(this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr(),this.renderFix(),this.chartDiv&&(this.boundingRect=this.chartDiv.getBoundingClientRect()))},makeAccessible:function(a,b,c){this.accessible&&a&&(c&&a.setAttr("role",c),a.setAttr("aria-label",b))}
322,drawBackground:function(){d.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,e=this.set;d.isModern||0!==c||(c=.001);var g=this.updateWidth();this.realWidth=g;var f=this.updateHeight();this.realHeight=f;b=d.polygon(a,[0,g-1,g-1,0],[0,0,f-1,f-1],b,c,1,this.borderColor,this.borderAlpha);d.setCN(this,b,"bg");this.background=b;e.push(b);if(b=this.backgroundImage)a=a.image(b,0,0,g,f),d.setCN(this,b,"bg-image"),this.bgImg=a,e.push(a)},drawTitles:function(a){var b=this.titles;this.titleHeight=0;if(d.ifArray(b)){var c=20,e;for(e=0;e<b.length;e++){var g=b[e],g=d.processObject(g,d.Title,this.theme);if(!1!==g.enabled){var f=g.color;void 0===f&&(f=this.color);var h=g.size;isNaN(h)&&(h=this.fontSize+2);isNaN(g.alpha);var k=this.marginLeft,l=!0;void 0!==g.bold&&(l=g.bold);f=d.wrappedText(this.container,g.text,f,this.fontFamily,h,"middle",l,this.realWidth-35-this.marginRight-k);f.translate(k+(this.realWidth-this.marginRight-k)/2,c);f.node.style.pointerEvents="none";g.sprite=f;void 0!==g.tabIndex&&f.setAttr("tabindex",g.tabIndex);d.setCN(this,f,"title");g.id&&d.setCN(this,f,"title-"+g.id);f.attr({opacity:g.alpha});c+=f.getBBox().height+ 3235;a?f.remove():this.freeLabelsSet.push(f)}}this.titleHeight=c-10}},write:function(a){var b=this;if(b.listeners)for(var c=0;c<b.listeners.length;c++){var e=b.listeners[c];b.addListener(e.event,e.method)}b.fire({type:"buildStarted",chart:b});b.afterWriteTO&&clearTimeout(b.afterWriteTO);0<b.processTimeout?b.afterWriteTO=setTimeout(function(){b.afterWrite.call(b,a)},b.processTimeout):b.afterWrite(a)},afterWrite:function(a){var b;if(b="object"!=typeof a?document.getElementById(a):a){for(;b.firstChild;)b.removeChild(b.firstChild);this.div=b;b.style.overflow="hidden";b.style.textAlign="left";a=this.chartDiv;var c=this.legendDiv,e=this.legend,g=c.style,f=a.style;this.measure();this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;var h,k=document.createElement("div");h=k.style;h.position="relative";this.containerDiv=k;k.className=this.classNamePrefix+"-main-div";a.className=this.classNamePrefix+"-chart-div";b.appendChild(k);(b=this.exportConfig)&&d.AmExport&&!this.AmExport&&(this.AmExport=new d.AmExport(this,b));this.amExport&&d.AmExport&&(this.AmExport=d.extend(this.amExport,new d.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(e){e=this.addLegend(e,e.divId);if(e.enabled)switch(g.left=null,g.top=null,g.right=null,f.left=null,f.right=null,f.top=null,g.position="relative",f.position="relative",h.width="100%",h.height="100%",e.position){case"bottom":k.appendChild(a);k.appendChild(c);break;case"top":k.appendChild(c);k.appendChild(a);break;case"absolute":g.position="absolute";f.position="absolute";void 0!==e.left&&(g.left=e.left+"px");void 0!==e.right&&(g.right=e.right+"px");void 0!==e.top&&(g.top=e.top+"px");void 0!==e.bottom&&(g.bottom=e.bottom+"px");e.marginLeft=0;e.marginRight=0;k.appendChild(a);k.appendChild(c);break;case"right":g.position="relative";f.position="absolute";k.appendChild(a);k.appendChild(c);break;case"left":g.position="absolute";f.position="relative";k.appendChild(a);k.appendChild(c);break;case"outside":k.appendChild(a)}else k.appendChild(a);this.prevLegendPosition=e.position}else k.appendChild(a);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);(this.mouseWheelScrollEnabled||this.mouseWheelZoomEnabled)&&d.addWheelListeners();this.initChart()}},createLabelsSet:function(){d.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme);window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=d.getPath());void 0===this.path&&(this.path="amcharts/");this.path=d.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(d.callInitHandler(this),this.initHC=!0);d.applyLang(this.language,this);var a=this.numberFormatter;a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.destroy();(a=this.container)?(a.container.innerHTML="",a.width=this.realWidth,a.height=this.realHeight,a.addDefs(this),this.chartDiv.appendChild(a.container)):a=new d.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);this.container=a;this.extension=".png";this.svgIcons&&d.SVG&&(this.extension=".svg");this.checkDisplay();this.checkTransform(this.div);a.chart=this;
323d.VML||d.SVG?(a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,d.remove(this.set),this.set=a.set(),d.remove(this.gridSet),this.gridSet=a.set(),d.remove(this.cursorLineSet),this.cursorLineSet=a.set(),d.remove(this.graphsBehindSet),this.graphsBehindSet=a.set(),d.remove(this.bulletBehindSet),this.bulletBehindSet=a.set(),d.remove(this.columnSet),this.columnSet=a.set(),d.remove(this.graphsSet),this.graphsSet=a.set(),d.remove(this.trendLinesSet),this.trendLinesSet=a.set(),d.remove(this.axesSet),this.axesSet=a.set(),d.remove(this.cursorSet),this.cursorSet=a.set(),d.remove(this.scrollbarsSet),this.scrollbarsSet=a.set(),d.remove(this.bulletSet),this.bulletSet=a.set(),d.remove(this.freeLabelsSet),this.freeLabelsSet=a.set(),d.remove(this.axesLabelsSet),this.axesLabelsSet=a.set(),d.remove(this.balloonsSet),this.balloonsSet=a.set(),d.remove(this.plotBalloonsSet),this.plotBalloonsSet=a.set(),d.remove(this.zoomButtonSet),this.zoomButtonSet=a.set(),d.remove(this.zbSet),this.zbSet=null,d.remove(this.linkSet),this.linkSet=a.set()):this.fire({type:"failed",chart:this})},premeasure:function(){var a=this.div;if(a){try{this.boundingRect=this.chartDiv.getBoundingClientRect()}catch(e){}var b=a.offsetWidth,c=a.offsetHeight;a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);if(b!=this.mw||c!=this.mh)this.mw=b,this.mh=c,this.measure()}},measure:function(){var a=this.div;if(a){var b=this.chartDiv,c=a.offsetWidth,e=a.offsetHeight,g=this.container;a.clientHeight&&(c=a.clientWidth,e=a.clientHeight);var e=Math.round(e),c=Math.round(c),a=Math.round(d.toCoordinate(this.width,c)),f=Math.round(d.toCoordinate(this.height,e));(c!=this.previousWidth||e!=this.previousHeight)&&0<a&&0<f&&(b.style.width=a+"px",b.style.height=f+"px",b.style.padding=0,g&&g.setSize(a,f),this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme));this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,a-2,f);this.updateWidth();this.balloon.chart=this;this.realWidth=a;this.realHeight=f;this.divRealWidth=c;this.divRealHeight=e}},checkDisplay:function(){if(this.autoDisplay&&this.container){var a=d.rect(this.container,10,10),b=a.getBBox();0===b.width&&0===b.height&&(this.divRealHeight=this.divRealWidth=this.realHeight=this.realWidth=0,this.previousWidth=this.previousHeight=NaN);a.remove()}},checkTransform:function(a){if(this.autoTransform&&window.getComputedStyle&&a){if(a.style){var b=window.getComputedStyle(a,null);if(b&&(b=b.getPropertyValue("-webkit-transform")||b.getPropertyValue("-moz-transform")||b.getPropertyValue("-ms-transform")||b.getPropertyValue("-o-transform")||b.getPropertyValue("transform"))&&"none"!==b){var c=b.split("(")[1].split(")")[0].split(","),b=c[0],c=c[1],b=Math.sqrt(b*b+c*c);isNaN(b)||(this.cssScale*=b)}}a.parentNode&&this.checkTransform(a.parentNode)}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.legend&&this.legend.destroy&&this.legend.destroy()},clearTimeOuts:function(){var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},clear:function(a){try{document.removeEventListener("touchstart",this.docfn1,!0),document.removeEventListener("touchend",this.docfn2,!0)}catch(b){}d.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));a||d.removeChart(this);if(a=this.div)for(;a.firstChild;)a.removeChild(a.firstChild);this.legend&&this.legend.destroy&&this.legend.destroy();this.AmExport&&this.AmExport.clear&&this.AmExport.clear()},setMouseCursor:function(a){"auto"==a&&d.isNN&&(a="default");this.chartDiv.style.cursor=a;this.legendDiv.style.cursor=a},redrawLabels:function(){this.labels=[];var a=this.allLabels;this.createLabelsSet();var b;for(b=0;b<a.length;b++)this.drawLabel(a[b])},drawLabel:function(a){var b=this;if(b.container&&!1!==a.enabled){a=d.processObject(a,d.Label,b.theme);var c=a.y,e=a.text,g=a.align,f=a.size,h=a.color,k=a.rotation,l=a.alph
323a,m=a.bold,n=d.toCoordinate(a.x,b.realWidth),c=d.toCoordinate(c,b.realHeight);n||(n=0);c||(c=0);void 0===h&&(h=b.color);isNaN(f)&&(f=b.fontSize);g||(g="start");"left"==g&&(g="start");"right"==g&&(g="end");"center"==g&&(g="middle",k?c=b.realHeight-c+c/2:n=b.realWidth/2-n);void 0===l&&(l=1);void 0===k&&(k=0);c+=f/2;e=d.text(b.container,e,h,b.fontFamily,f,g,m,l);e.translate(n,c);void 0!==a.tabIndex&&e.setAttr("tabindex",a.tabIndex);d.setCN(b,e,"label");a.id&&d.setCN(b,e,"label-"+a.id);0!==k&&e.rotate(k);a.url?(e.setAttr("cursor","pointer"),e.click(function(){d.getURL(a.url,b.urlTarget)})):e.node.style.pointerEvents="none";b.labelsSet.push(e);b.labels.push(e)}},addLabel:function(a,b,c,e,d,f,h,k,l,m){a={x:a,y:b,text:c,align:e,size:d,color:f,alpha:k,rotation:h,bold:l,url:m,enabled:!0};this.container&&this.drawLabel(a);this.allLabels.push(a)},clearLabels:function(){var a=this.labels,b;for(b=a.length-1;0<=b;b--)a[b].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var a=this.divRealHeight,b=this.legend;if(b){var c=this.legendDiv.offsetHeight,b=b.position;if("top"==b||"bottom"==b){a-=c;if(0>a||isNaN(a))a=0;this.chartDiv.style.height=a+"px"}}return a},updateWidth:function(){var a=this.divRealWidth,b=this.divRealHeight,c=this.legend;if(c){var e=this.legendDiv,d=e.offsetWidth;isNaN(c.width)||(d=c.width);c.ieW&&(d=c.ieW);var f=e.offsetHeight,e=e.style,h=this.chartDiv.style,k=c.position;if(("right"==k||"left"==k)&&void 0===c.divId){a-=d;if(0>a||isNaN(a))a=0;h.width=a+"px";this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,a-2,this.realHeight);"left"==k?(h.left=d+"px",e.left="0px"):(h.left="0px",e.left=a+"px");b>f&&(e.top=(b-f)/2+"px")}}return a},getTitleHeight:function(){this.drawTitles(!0);return this.titleHeight},addTitle:function(a,b,c,e,d){isNaN(b)&&(b=this.fontSize+2);a={text:a,size:b,color:c,alpha:e,bold:d,enabled:!0};this.titles.push(a);return a},handleWheel:function(a){var b=0;a||(a=window.event);a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);b&&this.handleWheelReal(b,a.shiftKey);a.preventDefault&&a.preventDefault()},handleWheelReal:function(){},handleDocTouchStart:function(){this.handleMouseMove();this.tmx=this.mouseX;this.tmy=this.mouseY;this.touchStartTime=(new Date).getTime()},handleDocTouchEnd:function(){-.5<this.tmx&&this.tmx<this.divRealWidth+1&&0<this.tmy&&this.tmy<this.divRealHeight?(this.handleMouseMove(),4>Math.abs(this.mouseX-this.tmx)&&4>Math.abs(this.mouseY-this.tmy)?(this.tapped=!0,this.panRequired&&this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="none",this.chartDiv.style.touchAction="none")):this.mouseIsOver||this.resetTouchStyle()):(this.tapped=!1,this.resetTouchStyle())},resetTouchStyle:function(){this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="auto",this.chartDiv.style.touchAction="auto")},checkTouchDuration:function(a){var b=this,c=(new Date).getTime();if(a)if(a.touches)b.isTouchEvent=!0;else if(!b.isTouchEvent)return!0;if(c-b.touchStartTime>b.touchClickDuration)return!0;setTimeout(function(){b.resetTouchDuration()},300)},resetTouchDuration:function(){this.isTouchEvent=!1},checkTouchMoved:function(){if(4<Math.abs(this.mouseX-this.tmx)||4<Math.abs(this.mouseY-this.tmy))return!0},addListeners:function(){var a=this,b=a.chartDiv;document.addEventListener?("ontouchstart" in document.documentElement&&(b.addEventListener("touchstart",function(b){a.handleTouchStart.call(a,b)},!0),b.addEventListener("touchmove",function(b){a.handleMouseMove.call(a,b)},!0),b.addEventListener("touchend",function(b){a.handleTouchEnd.call(a,b)},!0),a.docfn1=function(b){a.handleDocTouchStart.call(a,b)},a.docfn2=function(b){a.handleDocTouchEnd.call(a,b)},document.addEventListener("touchstart",a.docfn1,!0),document.addEventListener("touchend",a.docfn2,!0)),b.addEventListener("mousedown",function(b){a.mouseIsOver=!0;a.handleMouseMove.call(a,b);a.handleMouseDown.call(a,b);a.handleDocTouchStart.call(a,b)},!0),b.addEventListener("mouseover",function(b){a.handleMouseOver.call(a,b)},!0),b.addEventListener("mouseout",function(b){a.handleMouseOut.call(a,b)},!0),b.addEventListener("mouseup",function(b){a.handleDocTouchEnd.call(a,b)},!0)):(b.attachEvent("onmousedown",function(b){a.handleMouseDown.call(a,b)}),b.attachEvent("onmouseover",function(b){a.handleMouseOver.call(a,b)}),b.attachEvent("onmouseout",function(b){a.handleMouseOut.call(a,b)}))},dispDUpd:function(){this.skipEvents||(this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,this.fire({type:"dataUpdated",chart:this})),this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),!this.chartRendered&&0<this.divRealWidth&&0<this.divRealHeight&&(this.fire({type:"rendered",chart:this}),this.chartRendered=!0),this.fire({type:"drawn",chart:this}));this.skipEvents=!1}
323,validateSize:function(){var a=this;a.premeasure();a.checkDisplay();a.cssScale=1;a.cssAngle=0;a.checkTransform(a.div);if(a.divRealWidth!=a.previousWidth||a.divRealHeight!=a.previousHeight){var b=a.legend;if(0<a.realWidth&&0<a.realHeight){a.sizeChanged=!0;if(b){a.legendInitTO&&clearTimeout(a.legendInitTO);var c=setTimeout(function(){b.invalidateSize()},10);a.timeOuts.push(c);a.legendInitTO=c}a.marginsUpdated=!1;clearTimeout(a.initTO);c=setTimeout(function(){a.initChart()},10);a.timeOuts.push(c);a.initTO=c}a.renderFix();b&&b.renderFix&&b.renderFix();a.positionCred();clearTimeout(a.resizedTO);a.resizedTO=setTimeout(function(){a.fire({type:"resized",chart:a})},10);a.previousHeight=a.divRealHeight;a.previousWidth=a.divRealWidth}},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var a=this;a.marginsUpdated=!1;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateSize()},5);a.timeOuts.push(b);a.validateTO=b},validateData:function(a){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated=!1,this.initChart(a))},validateNow:function(a,b){this.initTO&&clearTimeout(this.initTO);a&&(this.dataChanged=!0,this.marginsUpdated=!1);this.skipEvents=b;this.chartRendered=!1;var c=this.legend;c&&c.position!=this.prevLegendPosition&&(this.previousWidth=this.mw=0,c.invalidateSize&&(c.invalidateSize(),this.validateSize()));this.write(this.div)},showItem:function(a){a.hidden=!1;this.initChart()},hideItem:function(a){a.hidden=!0;this.initChart()},hideBalloon:function(){var a=this;clearTimeout(a.hoverInt);clearTimeout(a.balloonTO);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},a.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var a=this.balloon;a&&a.hide&&a.hide()},showBalloon:function(a,b,c,e,d){var f=this;clearTimeout(f.balloonTO);clearTimeout(f.hoverInt);f.balloonTO=setTimeout(function(){f.showBalloonReal.call(f,a,b,c,e,d)},1)},showBalloonReal:function(a,b,c,e,d){this.handleMouseMove();var f=this.balloon;f.enabled&&(f.followCursor(!1),f.changeColor(b),!c||f.fixedPosition?(f.setPosition(e,d),isNaN(e)||isNaN(d)?f.followCursor(!0):f.followCursor(!1)):f.followCursor(!0),a&&f.showBalloon(a))},handleMouseOver:function(){this.outTO&&clearTimeout(this.outTO);d.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(){var a=this;d.resetMouseOver();a.outTO&&clearTimeout(a.outTO);a.outTO=setTimeout(function(){a.handleMouseOutReal()},10)},handleMouseOutReal:function(){this.mouseIsOver=!1},handleMouseMove:function(a){a||(a=window.event);this.mouse2Y=this.mouse2X=NaN;var b,c,e,d;if(a){if(a.touches){var f=a.touches.item(1);f&&this.panEventsEnabled&&this.boundingRect&&(e=f.clientX-this.boundingRect.left,d=f.clientY-this.boundingRect.top);a=a.touches.item(0);if(!a)return}else this.wasTouched=!1;this.boundingRect&&a.clientX&&(b=a.clientX-this.boundingRect.left,c=a.clientY-this.boundingRect.top);isNaN(e)?this.mouseX=b:(this.mouseX=Math.min(b,e),this.mouse2X=Math.max(b,e));isNaN(d)?this.mouseY=c:(this.mouseY=Math.min(c,d),this.mouse2Y=Math.max(c,d));this.autoTransform&&(this.mouseX/=this.cssScale,this.mouseY/=this.cssScale)}},handleTouchStart:function(a){this.hideBalloonReal();a&&(a.touches&&this.tapToActivate&&!this.tapped||!this.panRequired)||(this.handleMouseMove(a),this.handleMouseDown(a))},handleTouchEnd:function(a){this.wasTouched=!0;this.handleMouseMove(a);d.resetMouseOver();this.handleReleaseOutside(a)},handleReleaseOutside:function(){this.handleDocTouchEnd.call(this)},handleMouseDown:function(a){d.resetMouseOver();this.mouseIsOver=!0;a&&a.preventDefault&&(this.panEventsEnabled?a.preventDefault():a.touches||a.preventDefault())},handleKeyUp:function(a){},addLegend:function(a,b){a=d.processObject(a,d.AmLegend,this.theme);a.divId=b;a.ieW=0;var c;c="object"!=typeof b&&b?document.getElementById(b):b;this.legend=a;a.chart=this;c?(a.div=c,a.position="outside",a.autoMargins=!1):a.div=this.legendDiv;return a},removeLegend:function(){this.legend=void 0;this.previousWidth=0;this.legendDiv.innerHTML=""},handleResize:function(){(d.isPercents(this.width)||d.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!d.VML){var a=this.container;a&&a.renderFix()}},getSVG:function(){if(d.hasSVG)return this.container},animate:function(a,b,c,e,g,f,h){a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);c={obj:a,frame:0,attribute:b,from:c,to:e,time:g,effect:f,suffix:h};a["an_"+b]=c;this.animations.push(c);return c},setLegendData:function(a){var b=this.legend;b&&b.setData(a)},stopAnim:function(a){d.removeFromArray(this.animations,a)},updateAnimations:function(){var a;
323this.container&&this.container.update();if(this.animations)for(a=this.animations.length- 3241;0<=a;a--){var b=this.animations[a],c=d.updateRate*b.time,e=b.frame+1,g=b.obj,f=b.attribute;if(e<=c){b.frame++;var h=Number(b.from),k=Number(b.to)-h,c=d[b.effect](0,e,h,k,c);0===k?(this.animations.splice(a,1),g.node.style[f]=Number(b.to)+b.suffix):g.node.style[f]=c+b.suffix}else g.node.style[f]=Number(b.to)+b.suffix,g.animationFinished=!0,this.animations.splice(a,1)}},update:function(){this.updateAnimations();var a=this.animatable;if(0<a.length){for(var b=!0,c=a.length-1;0<=c;c--){var e=a[c];e&&(e.animationFinished?a.splice(c,1):b=!1)}b&&(this.fire({type:"animationFinished",chart:this}),this.animatable=[])}},inIframe:function(){try{return window.self!==window.top}catch(a){return!0}},brr:function(){},positionCred:function(){var a=this.amLink;if(a){var b=this.creditsPosition,c=a.style,e=a.offsetWidth,a=a.offsetHeight,d=0,f=0,h=this.realWidth,k=this.realHeight,l=this.type;if("serial"==l||"xy"==l||"gantt"==l)d=this.marginLeftReal,f=this.marginTopReal,h=d+this.plotAreaWidth,k=f+this.plotAreaHeight;var l=5+d,m=f+5;"bottom-left"==b&&(l=5+d,m=k-a-3);"bottom-right"==b&&(l=h-e-5,m=k-a-3);"top-right"==b&&(l=h-e-5,m=f+5);c.left=l+"px";c.top=m+"px"}}});d.Slice=d.Class({construct:function(){}});d.SerialDataItem=d.Class({construct:function(){}});d.GraphDataItem=d.Class({construct:function(){}});d.Guide=d.Class({construct:function(a){this.cname="Guide";d.applyTheme(this,a,this.cname)}});d.Title=d.Class({construct:function(a){this.cname="Title";d.applyTheme(this,a,this.cname)}});d.Label=d.Class({construct:function(a){this.cname="Label";d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.AmGraph=d.Class({construct:function(a){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.accessibleLabel="[[title]] [[category]] [[value]]";this.accessibleSkipText="Press enter to skip [[title]]";this.y=this.x=0;this.switchable=!0;this.minDistance=.8;this.tcc=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;this.bcn="graph-";this.dateFormat="MMM DD, YYYY";this.noRounding=!0;d.applyTheme(this,a,this.cname)},init:function(){this.createBalloon()},draw:function(){var a=this.chart;a.isRolledOverBullet=!1;var b=a.type;if(a.drawGraphs){isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator});var c=a.container;this.container=c;this.destroy();var e=c.set();this.set=e;e.translate(this.x,this.y);var g=c.set();this.bulletSet=g;g.translate(this.x,this.y);this.behindColumns?(a.graphsBehindSet.push(e),a.bulletBehindSet.push(g)):(a.graphsSet.push(e),a.bulletSet.push(g));var f=this.bulletAxis;d.isString(f)&&(this.bulletAxis=a.getValueAxisById(f));c=c.set();d.remove(this.columnsSet);this.columnsSet=c;d.setCN(a,e,"graph-"+this.type);d.setCN(a,e,"graph-"+this.id);d.setCN(a,g,"graph-"+this.type);d.setCN(a,g,"graph-"+this.id);this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];g=this.labelPosition;g||(f=this.valueAxis.stackType,g="top","column"==this.type&&(a.rotate&&(g="right"),"100%"==f||"regular"==f)&&(g="middle"),this.labelPosition=g);d.ifArray(this.data)&&(a=!1,"xy"==b?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(a=!0):this.valueAxis.axisCreated&&(a=!0),!this.hidden&&a&&this.createGraph());e.push(c)}},createGraph:function(){var a=this,b=a.chart;a.startAlpha=b.startAlpha;a.seqAn=b.sequencedAnimation;a.baseCoord=a.valueAxis.baseCoord;void 0===a.fillAlphas&&(a.fillAlphas=0);a.bulletColorR=a.bulletColor;void 0===a.bulletColorR&&(a.bulletColorR=a.lineColorR,a.bulletColorNegative=a.negativeLineColor);void 0===a.bulletAlpha&&(a.bulletAlpha=a.lineAlpha);if("step"==c||d.VML)a.noRounding=!1;var c=b.type;"gantt"==c&&(c="serial");clearTimeout(a.playedTO);if(!isNaN(a.valueAxis.min)&&!isNaN(a.valueAxis.max)){switch(c){case"serial":a.categoryAxis&&(a.createSeri
324alGraph(),"candlestick"==a.type&&1>a.valueAxis.minMaxMultiplier&&a.positiveClip(a.set));break;case"radar":a.createRadarGraph();break;case"xy":a.createXYGraph()}a.playedTO=setTimeout(function(){a.setAnimationPlayed.call(a)},500*a.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var a=[],b=[],c=this.xAxis,e=this.yAxis;this.pmh=e.height;this.pmw=c.width;this.pmy=this.pmx=0;var d;for(d=this.start;d<=this.end;d++){var f=this.data[d].axes[c.id].graphs[this.id],h=f.values,k=h.x,l=h.y,h=c.getCoordinate(k,this.noRounding),m=e.getCoordinate(l,this.noRounding);if(!isNaN(k)&&!isNaN(l)&&(a.push(h),b.push(m),f.x=h,f.y=m,k=this.createBullet(f,h,m,d),l=this.labelText)){var l=this.createLabel(f,l),n=0;k&&(n=k.size);this.positionLabel(f,h,m,l,n)}}this.drawLineGraph(a,b);this.launchAnimation()},createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],e=[],d=[],f,h,k,l,m;for(m=this.start;m<=this.end;m++){var n=this.data[m].axes[this.valueAxis.id].graphs[this.id],q,p;"none"==a||"3d"==a?q=n.values.value:(q=n.values.close,p=n.values.open);if(isNaN(q))this.connect||(this.drawLineGraph(b,c,e,d),b=[],c=[],e=[],d=[]);else{var t=this.valueAxis.getCoordinate(q,this.noRounding)-this.height,t=t*this.valueAxis.rMultiplier,r=-360/(this.end-this.start+1)*m;"middle"==this.valueAxis.pointPosition&&(r-=180/(this.end-this.start+1));q=t*Math.sin(r/180*Math.PI);t*=Math.cos(r/180*Math.PI);b.push(q);c.push(t);if(!isNaN(p)){var w=this.valueAxis.getCoordinate(p,this.noRounding)-this.height,w=w*this.valueAxis.rMultiplier,z=w*Math.sin(r/180*Math.PI),r=w*Math.cos(r/180*Math.PI);e.push(z);d.push(r);isNaN(k)&&(k=z);isNaN(l)&&(l=r)}r=this.createBullet(n,q,t,m);n.x=q;n.y=t;if(z=this.labelText)z=this.createLabel(n,z),w=0,r&&(w=r.size),this.positionLabel(n,q,t,z,w);isNaN(f)&&(f=q);isNaN(h)&&(h=t)}}b.push(f);c.push(h);isNaN(k)||(e.push(k),d.push(l));this.drawLineGraph(b,c,e,d);this.launchAnimation()},positionLabel:function(a,b,c,e,d){if(e){var f=this.chart,h=this.valueAxis,k="middle",l=!1,m=this.labelPosition,n=e.getBBox(),q=this.chart.rotate,p=a.isNegative,t=this.fontSize;void 0===t&&(t=this.chart.fontSize);c-=n.height/2-t/2-1;void 0!==a.labelIsNegative&&(p=a.labelIsNegative);switch(m){case"right":m=q?p?"left":"right":"right";break;case"top":m=q?"top":p?"bottom":"top";break;case"bottom":m=q?"bottom":p?"top":"bottom";break;case"left":m=q?p?"right":"left":"left"}var t=a.columnGraphics,r=0,w=0;t&&(r=t.x,w=t.y);var z=this.labelOffset;switch(m){case"right":k="start";b+=d/2+z;break;case"top":c=h.reversed?c+(d/2+n.height/2+z):c-(d/2+n.height/2+z);break;case"bottom":c=h.reversed?c-(d/2+n.height/2+z):c+(d/2+n.height/2+z);break;case"left":k="end";b-=d/2+z;break;case"inside":"column"==this.type&&(l=!0,q?p?(k="end",b=r-3- 325z):(k="start",b=r+3+z):c=p?w+7+z:w-10-z);break;case"middle":"column"==this.type&&(l=!0,q?b-=(b-r)/2+z-3:c-=(c-w)/2+z-3)}"auto"!=this.labelAnchor&&(k=this.labelAnchor);e.attr({"text-anchor":k});this.labelRotation&&e.rotate(this.labelRotation);e.translate(b,c);!this.showAllValueLabels&&t&&l&&(n=e.getBBox(),n.height>a.columnHeight||n.width>a.columnWidth)&&(e.remove(),e=null);if(e&&"radar"!=f.type)if(q){if(0>c||c>this.height)e.remove(),e=null;!this.showAllValueLabels&&e&&(0>b||b>this.width)&&(e.remove(),e=null)}else{if(0>b||b>this.width)e.remove(),e=null;!this.showAllValueLabels&&e&&(0>c||c>this.height)&&(e.remove(),e=null)}e&&this.allBullets.push(e);return e}},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&(a=0);return this.gradientRotation=a},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var a=this.chart,b=this.id,c=this.index,e=this.data,g=this.chart.container,f=this.valueAxis,h=this.type,k=this.columnWidthReal,l=this.showBulletsAt;isNaN(this.columnWidth)||(k=this.columnWidth);isNaN(k)&&(k=.8);var m=this.useNegativeColorIfDown,n=this.width,q=this.height,p=this.y,t=this.rotate,r=this.columnCount,w=d.toCoordinate(this.cornerRadiusTop,k/2),z=this.connect,x=[],u=[],A,y,B,D,C=this.chart.graphs.length,I,H=this.dx/this.tcc,Q=this.dy/this.tcc,M=f.stackType,P=this.start,ia=this.end,J=this.scrollbar,aa="graph-column-";
325J&&(aa="scrollbar-graph-column-");var ma=this.categoryAxis,na=this.baseCoord,Pa=this.negativeBase,Z=this.columnIndex,da=this.lineThickness,X=this.lineAlpha,xa=this.lineColorR,ea=this.dashLength,fa=this.set,Ba,ga=this.getGradRotation(),V=this.chart.columnSpacing,Y=ma.cellWidth,Da=(Y*k-r)/r;V>Da&&(V=Da);var G,v,oa,ha=q,Qa=n,ca=0,tb=0,ub=0,vb=0,lb=0,mb=0,wb=this.fillColorsR,Ra=this.negativeFillColors,Ja=this.negativeLineColor,bb=this.fillAlphas,cb=this.negativeFillAlphas;"object"==typeof bb&&(bb=bb[0]);"object"==typeof cb&&(cb=cb[0]);var xb=this.noRounding;"step"==h&&(xb=!1);var nb=f.getCoordinate(f.min);f.logarithmic&&(nb=f.getCoordinate(f.minReal));this.minCoord=nb;this.resetBullet&&(this.bullet="none");if(!(J||"line"!=h&&"smoothedLine"!=h&&"step"!=h||(1==e.length&&"step"!=h&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!Ra&&void 0==Ja||m))){var Ua=Pa;Ua>f.max&&(Ua=f.max);Ua<f.min&&(Ua=f.min);f.logarithmic&&(Ua=f.minReal);var Ka=f.getCoordinate(Ua)+.5,Mb=f.getCoordinate(f.max);t?(ha=q,Qa=Math.abs(Mb-Ka),ub=q,vb=Math.abs(nb-Ka),mb=tb=0,f.reversed?(ca=0,lb=Ka):(ca=Ka,lb=0)):(Qa=n,ha=Math.abs(Mb-Ka),vb=n,ub=Math.abs(nb-Ka),lb=ca=0,f.reversed?(mb=p,tb=Ka):mb=Ka)}var La=Math.round;this.pmx=La(ca);this.pmy=La(tb);this.pmh=La(ha);this.pmw=La(Qa);this.nmx=La(lb);this.nmy=La(mb);this.nmh=La(ub);this.nmw=La(vb);d.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||(r=1);k="column"==h?(Y*k-V*(r-1))/r:Y*k;1>k&&(k=1);var Nb=this.fixedColumnWidth;isNaN(Nb)||(k=Nb);var L;if("line"==h||"step"==h||"smoothedLine"==h){if(0<P){for(L=P-1;-1<L;L--)if(G=e[L],v=G.axes[f.id].graphs[b],oa=v.values.value,!isNaN(oa)){P=L;break}if(this.lineColorField)for(L=P;-1<L;L--)if(G=e[L],v=G.axes[f.id].graphs[b],v.lineColor){this.lineColorSwitched=v.lineColor;void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched);break}if(this.fillColorsField)for(L=P;-1<L;L--)if(G=e[L],v=G.axes[f.id].graphs[b],v.fillColors){this.fillColorsSwitched=v.fillColors;break}if(this.dashLengthField)for(L=P;-1<L;L--)if(G=e[L],v=G.axes[f.id].graphs[b],!isNaN(v.dashLength)){this.dashLengthSwitched=v.dashLength;break}}if(ia<e.length-1)for(L=ia+1;L<e.length;L++)if(G=e[L],v=G.axes[f.id].graphs[b],oa=v.values.value,!isNaN(oa)){ia=L;break}}ia<e.length-1&&ia++;var T=[],U=[],Ma=!1;if("line"==h||"step"==h||"smoothedLine"==h)if(this.stackable&&"regular"==M||"100%"==M||this.fillToGraph)Ma=!0;var Ob=this.noStepRisers,db=-1E3,eb=-1E3,ob=this.minDistance,Sa=!0,Va=!1;for(L=P;L<=ia;L++){G=e[L];v=G.axes[f.id].graphs[b];v.index=L;var fb,Ta=NaN;if(m&&void 0==this.openField)for(var yb=L+1;yb<e.length&&(!e[yb]||!(fb=e[L+1].axes[f.id].graphs[b])||!fb.values||(Ta=fb.values.value,isNaN(Ta)));yb++);var S,R,K,ba,ja=NaN,E=NaN,F=NaN,O=NaN,N=NaN,qa=NaN,ra=NaN,sa=NaN,ta=NaN,ya=NaN,Ea=NaN,ka=NaN,la=NaN,W=NaN,zb=NaN,Ab=NaN,ua=NaN,va=void 0,Na=wb,Wa=bb,Ha=xa,Ca,za,Bb=this.proCandlesticks,pb=this.topRadius,Fa=q-1,pa=n-1,gb=this.pattern;void 0!=v.pattern&&(gb=v.pattern);isNaN(v.alpha)||(Wa=v.alpha);isNaN(v.dashLength)||(ea=v.dashLength);var Ia=v.values;f.recalculateToPercents&&(Ia=v.percents);"none"==M&&(Z=isNaN(v.columnIndex)?this.columnIndex:v.columnIndex);if(Ia){W=this.stackable&&"none"!=M&&"3d"!=M?Ia.close:Ia.value;if("candlestick"==h||"ohlc"==h)W=Ia.close,Ab=Ia.low,ra=f.getCoordinate(Ab),zb=Ia.high,ta=f.getCoordinate(zb);ua=Ia.open;F=f.getCoordinate(W,xb);isNaN(ua)||(N=f.getCoordinate(ua,xb),m&&"regular"!=M&&"100%"!=M&&(Ta=ua,ua=N=NaN));m&&(void 0==this.openField?fb&&(fb.isNegative=Ta<W?!0:!1,isNaN(Ta)&&(v.isNegative=!Sa)):v.isNegative=Ta>W?!0:!1);if(!J)switch(this.showBalloonAt){case"close":v.y=F;break;case"open":v.y=N;break;case"high":v.y=ta;break;case"low":v.y=ra}
325var ja=G.x[ma.id],Xa=this.periodSpan-1;"step"!=h||isNaN(G.cellWidth)||(Y=G.cellWidth);var wa=Math.floor(Y/2)+Math.floor(Xa*Y/2),Ga=wa,qb=0;"left"==this.stepDirection&&(qb=(2*Y+Xa*Y)/2,ja-=qb);"center"==this.stepDirection&&(qb=Y/2,ja-=qb);"start"==this.pointPosition&&(ja-=Y/2+Math.floor(Xa*Y/2),wa=0,Ga=Math.floor(Y)+Math.floor(Xa*Y));"end"==this.pointPosition&&(ja+=Y/2+Math.floor(Xa*Y/2),wa=Math.floor(Y)+Math.floor(Xa*Y),Ga=0);if(Ob){var Cb=this.columnWidth;isNaN(Cb)||(wa*=Cb,Ga*=Cb)}J||(v.x=ja);-1E5>ja&&(ja=-1E5);ja>n+1E5&&(ja=n+1E5);t?(E=F,O=N,N=F=ja,isNaN(ua)&&!this.fillToGraph&&(O=na),qa=ra,sa=ta):(O=E=ja,isNaN(ua)&&!this.fillToGraph&&(N=na));if(!Bb&&W<ua||Bb&&W<Ba)v.isNegative=!0,Ra&&(Na=Ra),cb&&(Wa=cb),void 0!=Ja&&(Ha=Ja);Va=!1;isNaN(W)||(m?W>Ta?(Sa&&(Va=!0),Sa=!1):(Sa||(Va=!0),Sa=!0):v.isNegative=W<Pa?!0:!1,Ba=W);var Pb=!1;J&&a.chartScrollbar.ignoreCustomColors&&(Pb=!0);Pb||(void 0!=v.color&&(Na=v.color),v.fillColors&&(Na=v.fillColors));F=d.fitToBounds(F,-3E4,3E4);switch(h){case"line":if(isNaN(W))z||(this.drawLineGraph(x,u,T,U),x=[],u=[],T=[],U=[]);else{if(Math.abs(E-db)>=ob||Math.abs(F-eb)>=ob)x.push(E),u.push(F),db=E,eb=F;ya=E;Ea=F;ka=E;la=F;!Ma||isNaN(N)||isNaN(O)||(T.push(O),U.push(N));if(Va||void 0!=v.lineColor&&v.lineColor!=this.lineColorSwitched||void 0!=v.fillColors&&v.fillColors!=this.fillColorsSwitched||!isNaN(v.dashLength))this.drawLineGraph(x,u,T,U),x=[E],u=[F],T=[],U=[],!Ma||isNaN(N)||isNaN(O)||(T.push(O),U.push(N)),m?(Sa?(this.lineColorSwitched=xa,this.fillColorsSwitched=wb):(this.lineColorSwitched=Ja,this.fillColorsSwitched=Ra),void 0===this.bulletColor&&(this.bulletColorSwitched=xa)):(this.lineColorSwitched=v.lineColor,this.fillColorsSwitched=v.fillColors,void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched)),this.dashLengthSwitched=v.dashLength;v.gap&&(this.drawLineGraph(x,u,T,U),x=[],u=[],T=[],U=[],eb=db=-1E3)}break;case"smoothedLine":if(isNaN(W))z||(this.drawSmoothedGraph(x,u,T,U),x=[],u=[],T=[],U=[]);else{if(Math.abs(E- 326db)>=ob||Math.abs(F-eb)>=ob)x.push(E),u.push(F),db=E,eb=F;ya=E;Ea=F;ka=E;la=F;!Ma||isNaN(N)||isNaN(O)||(T.push(O),U.push(N));if(Va||void 0!=v.lineColor&&v.lineColor!=this.lineColorSwitched||void 0!=v.fillColors&&v.fillColors!=this.fillColorsSwitched||!isNaN(v.dashLength))this.drawSmoothedGraph(x,u,T,U),x=[E],u=[F],T=[],U=[],!Ma||isNaN(N)||isNaN(O)||(T.push(O),U.push(N)),this.lineColorSwitched=v.lineColor,this.fillColorsSwitched=v.fillColors,this.dashLengthSwitched=v.dashLength;v.gap&&(this.drawSmoothedGraph(x,u,T,U),x=[],u=[],T=[],U=[])}break;case"step":if(!isNaN(W)){t?(isNaN(A)||(x.push(A),u.push(F-wa)),u.push(F-wa),x.push(E),u.push(F+Ga),x.push(E),!Ma||isNaN(N)||isNaN(O)||(isNaN(B)||(T.push(B),U.push(N-wa)),T.push(O),U.push(N-wa),T.push(O),U.push(N+Ga))):(isNaN(y)||(u.push(y),x.push(E-wa)),x.push(E-wa),u.push(F),x.push(E+Ga),u.push(F),!Ma||isNaN(N)||isNaN(O)||(isNaN(D)||(T.push(O-wa),U.push(D)),T.push(O-wa),U.push(N),T.push(O+Ga),U.push(N)));A=E;y=F;B=O;D=N;ya=E;Ea=F;ka=E;la=F;if(Va||void 0!=v.lineColor||void 0!=v.fillColors||!isNaN(v.dashLength)){var Db=x[x.length-2],dc=u[u.length-2];x.pop();u.pop();T.pop();U.pop();this.drawLineGraph(x,u,T,U);x=[Db];u=[dc];T=[];U=[];Ma&&(T=[Db,Db+wa+Ga],U=[D,D]);t?(u.push(F+Ga),x.push(E)):(x.push(E+Ga),u.push(F));this.lineColorSwitched=v.lineColor;this.fillColorsSwitched=v.fillColors;this.dashLengthSwitched=v.dashLength;m&&(Sa?(this.lineColorSwitched=xa,this.fillColorsSwitched=wb):(this.lineColorSwitched=Ja,this.fillColorsSwitched=Ra))}if(Ob||v.gap)A=y=NaN,v.gap&&2>=x.length||this.drawLineGraph(x,u,T,U),x=[],u=[],T=[],U=[]}else if(!z){if(1>=this.periodSpan||1<this.periodSpan&&E-A>wa+Ga)A=y=NaN;this.drawLineGraph(x,u,T,U);x=[];u=[];T=[];U=[]}break;case"column":Ca=Ha;void 0!=v.lineColor&&(Ca=v.lineColor);if(!isNaN(W)){m||(v.isNegative=W<Pa?!0:!1);v.isNegative&&(Ra&&(Na=Ra),void 0!=Ja&&(Ca=Ja));var Qb=f.min,Rb=f.max,rb=ua;isNaN(rb)&&(rb=Pa);if(!(W<Qb&&rb<Qb||W>Rb&&rb>Rb)){var Aa;if(t){"3d"==M?(R=F-(r/2-this.depthCount+1)*(k+V)+V/2+Q*Z,S=O+H*Z,Aa=Z):(R=Math.floor(F- 327(r/2-Z)*(k+V)+V/2),S=O,Aa=0);K=k;ya=E;Ea=R+k/2;ka=E;la=R+k/2;R+K>q+Aa*Q&&(K=q-R+Aa*Q);R<Aa*Q&&(K+=R,R=Aa*Q);ba=E-O;var ec=S;S=d.fitToBounds(S,0,n);ba+=ec-S;ba=d.fitToBounds(ba,-S,n-S+H*Z);v.labelIsNegative=0>ba?!0:!1;0===ba&&1/W===1/-0&&(v.labelIsNegative=!0);isNaN(G.percentWidthValue)||(K=this.height*G.percentWidthValue/100,R=ja-K/2,Ea=R+K/2);
327K=d.roundTo(K,2);ba=d.roundTo(ba,2);R<q&&0<K&&(va=new d.Cuboid(g,ba,K,H-a.d3x,Q-a.d3y,Na,Wa,da,Ca,X,ga,w,t,ea,gb,pb,aa),v.columnWidth=Math.abs(ba),v.columnHeight=Math.abs(K))}else{"3d"==M?(S=E-(r/2-this.depthCount+1)*(k+V)+V/2+H*Z,R=N+Q*Z,Aa=Z):(S=E-(r/2-Z)*(k+V)+V/2,R=N,Aa=0);K=k;ya=S+k/2;Ea=F;ka=S+k/2;la=F;S+K>n+Aa*H&&(K=n-S+Aa*H);S<Aa*H&&(K+=S-Aa*H,S=Aa*H);ba=F-N;v.labelIsNegative=0<ba?!0:!1;0===ba&&1/W!==1/Math.abs(W)&&(v.labelIsNegative=!0);var fc=R;R=d.fitToBounds(R,this.dy,q);ba+=fc-R;ba=d.fitToBounds(ba,-R+Q*Aa,q-R);isNaN(G.percentWidthValue)||(K=this.width*G.percentWidthValue/100,S=ja-K/2,ya=S+K/2);K=d.roundTo(K,2);ba=d.roundTo(ba,2);S<n+Z*H&&0<K&&(this.showOnAxis&&(R-=Q/2),va=new d.Cuboid(g,K,ba,H-a.d3x,Q-a.d3y,Na,Wa,da,Ca,this.lineAlpha,ga,w,t,ea,gb,pb,aa),v.columnHeight=Math.abs(ba),v.columnWidth=Math.abs(K))}}if(va){za=va.set;d.setCN(a,va.set,"graph-"+this.type);d.setCN(a,va.set,"graph-"+this.id);v.className&&d.setCN(a,va.set,v.className,!0);v.columnGraphics=za;S=d.roundTo(S,2);R=d.roundTo(R,2);za.translate(S,R);(v.url||this.showHandOnHover)&&za.setAttr("cursor","pointer");if(!J){"none"==M&&(I=t?(this.end+1-L)*C-c:C*L+c);"3d"==M&&(t?(I=(this.end+1-L)*C-c-1E3*this.depthCount,ya+=H*Z,ka+=H*Z,v.y+=H*Z):(I=(C-c)*(L+1)+1E3*this.depthCount,Ea+=Q*Z,la+=Q*Z,v.y+=Q*Z));if("regular"==M||"100%"==M)I=t?0<Ia.value?(this.end+1-L)*C+c+1E3*this.depthCount:(this.end+1-L)*C-c+1E3*this.depthCount:0<Ia.value?C*L+c:C*L-c;this.columnsArray.push({column:va,depth:I});v.x=t?R+K/2:S+K/2;this.ownColumns.push(va);this.animateColumns(va,L,E,O,F,N);this.addListeners(za,v);void 0!==this.tabIndex&&za.setAttr("tabindex",this.tabIndex)}this.columnsSet.push(za)}}break;case"candlestick":if(!isNaN(ua)&&!isNaN(W)){var Ya,hb;Ca=Ha;void 0!=v.lineColor&&(Ca=v.lineColor);ya=E;la=Ea=F;ka=E;if(t){"open"==l&&(ka=O);"high"==l&&(ka=sa);"low"==l&&(ka=qa);E=d.fitToBounds(E,0,pa);O=d.fitToBounds(O,0,pa);qa=d.fitToBounds(qa,0,pa);sa=d.fitToBounds(sa,0,pa);if(0===E&&0===O&&0===qa&&0===sa)continue;if(E==pa&&O==pa&&qa==pa&&sa==pa)continue;R=F-k/2;S=O;K=k;R+K>q&&(K=q-R);0>R&&(K+=R,R=0);if(R<q&&0<K){var Eb,Fb;W>ua?(Eb=[E,sa],Fb=[O,qa]):(Eb=[O,sa],Fb=[E,qa]);!isNaN(sa)&&!isNaN(qa)&&F<q&&0<F&&(Ya=d.line(g,Eb,[F,F],Ca,X,da),hb=d.line(g,Fb,[F,F],Ca,X,da));ba=E-O;va=new d.Cuboid(g,ba,K,H,Q,Na,bb,da,Ca,X,ga,w,t,ea,gb,pb,aa)}}else{"open"==l&&(la=N);"high"==l&&(la=ta);"low"==l&&(la=ra);F=d.fitToBounds(F,0,Fa);N=d.fitToBounds(N,0,Fa);ra=d.fitToBounds(ra,0,Fa);ta=d.fitToBounds(ta,0,Fa);if(0===F&&0===N&&0===ra&&0===ta)continue;if(F==Fa&&N==Fa&&ra==Fa&&ta==Fa)continue;S=E-k/2;R=N+da/2;K=k;S+K>n&&(K=n-S);0>S&&(K+=S,S=0);ba=F-N;if(S<n&&0<K){Bb&&W>=ua&&(Wa=0);var va=new d.Cuboid(g,K,ba,H,Q,Na,Wa,da,Ca,X,ga,w,t,ea,gb,pb,aa),Gb,Hb;W>ua?(Gb=[F,ta],Hb=[N,ra]):(Gb=[N,ta],Hb=[F,ra]);!isNaN(ta)&&!isNaN(ra)&&E<n&&0<E&&(Ya=d.line(g,[E,E],Gb,Ca,X,da),hb=d.line(g,[E,E],Hb,Ca,X,da),d.setCN(a,Ya,this.bcn+"line-high"),v.className&&d.setCN(a,Ya,v.className,!0),d.setCN(a,hb,this.bcn+"line-low"),v.className&&d.setCN(a,hb,v.className,!0))}}va&&(za=va.set,v.columnGraphics=za,fa.push(za),za.translate(S,R-da/2),(v.url||this.showHandOnHover)&&za.setAttr("cursor","pointer"),Ya&&(fa.push(Ya),fa.push(hb)),J||(v.x=t?R+K/2:S+K/2,this.animateColumns(va,L,E,O,F,N),this.addListeners(za,v),void 0!==this.tabIndex&&za.setAttr("tabindex",this.tabIndex)))}break;case"ohlc":if(!(isNaN(ua)||isNaN(zb)||isNaN(Ab)||isNaN(W))){var Sb=g.set();fa.push(Sb);W<ua&&(v.isNegative=!0,void 0!=Ja&&(Ha=Ja));void 0!=v.lineColor&&(Ha=v.lineColor);var Za,$a,ab;if(t){la=F;ka=E;"open"==l&&(ka=O);"high"==l&&(ka=sa);"low"==l&&(ka=qa);qa=d.fitToBounds(qa,0,pa);sa=d.fitToBounds(sa,0,pa);if(0===E&&0===O&&0===qa&&0===sa)continue;if(E==pa&&O==pa&&qa==pa&&sa==pa)continue;var Ib=F-k/2,Ib=d.fitToBounds(Ib,0,q),Tb=d.fitToBounds(F,0,q),Jb=F+k/2,Jb=d.fitToBounds(Jb,0,q);0<=O&&O<=pa&&($a=d.line(g,[O,O],[Ib,Tb],Ha,X,da,ea));0<F&&F<q&&(Za=d.line(g,[qa,sa],[F,F],Ha,X,da,ea));0<=E&&E<=pa&&(ab=d.line(g,[E,E],[Tb,Jb],Ha,X,da,ea))}else{la=F;"open"==l&&(la=N);"high"==l&&(la=ta);"low"==l&&(la=ra);var ka=E,ra=d.fitToBounds(ra,0,Fa),ta=d.fitToBounds(ta,0,Fa),Kb=E-k/2,Kb=d.fitToBounds(Kb,0,n),Ub=d.fitToBounds(E,0,n),Lb=E+k/2,Lb=d.fitToBounds(Lb,0,n);0<=N&&N<=Fa&&($a=d.line(g,[Kb,Ub],[N,N],Ha,X,da,ea));0<E&&E<n&&(Za=d.line(g,[E,E],[ra,ta],Ha,X,da,ea));0<=F&&F<=Fa&&(ab=d.line(g,[Ub,Lb],[F,F],Ha,X,da,ea))}fa.push($a);fa.push(Za);fa.push(ab);d.setCN(a,$a,this.bcn+"stroke-open");d.setCN(a,ab,this.bcn+"stroke-close");d.setCN(a,Za,this.bcn+"stroke");v.className&&d.setCN(a,Sb,v.className,!0);Za&&this.addListeners(Za,v);ab&&this.addListeners(ab,v);$a&&this.addListeners($a,v);ya=E;
327Ea=F}}if(!J&&!isNaN(W)){var Vb=this.hideBulletsCount;if(this.end-this.start<=Vb||0===Vb){var Wb=this.createBullet(v,ka,la,L),Xb=this.labelText;if(Xb&&!isNaN(ya)&&!isNaN(ya)){var gc=this.createLabel(v,Xb),Yb=0;Wb&&(Yb=Wb.size);this.positionLabel(v,ya,Ea,gc,Yb)}if("regular"==M||"100%"==M){var Zb=f.totalText;if(Zb){var Oa=this.createLabel(v,Zb,f.totalTextColor);d.setCN(a,Oa,this.bcn+"label-total");this.allBullets.push(Oa);if(Oa){var $b=Oa.getBBox(),ac=$b.width,bc=$b.height,ib,jb,sb=f.totalTextOffset,cc=f.totals[L];cc&&cc.remove();var kb=0;"column"!=h&&(kb=this.bulletSize);t?(jb=Ea,ib=0>W?E-ac/2-2-kb-sb:E+ac/2+3+kb+sb):(ib=ya,jb=0>W?F+bc/2+kb+sb:F-bc/2-3-kb-sb);Oa.translate(ib,jb);f.totals[L]=Oa;t?(0>jb||jb>q)&&Oa.remove():(0>ib||ib>n)&&Oa.remove()}}}}}}}this.lastDataItem=v;if("line"==h||"step"==h||"smoothedLine"==h)"smoothedLine"==h?this.drawSmoothedGraph(x,u,T,U):this.drawLineGraph(x,u,T,U),J||this.launchAnimation();this.bulletsHidden&&this.hideBullets();this.customBulletsHidden&&this.hideCustomBullets()},animateColumns:function(a,b){var c=this,e=c.chart.startDuration;0<e&&!c.animationPlayed&&(c.seqAn?(a.set.hide(),c.animationArray.push(a),e=setTimeout(function(){c.animate.call(c)},e/(c.end-c.start+1)*(b-c.start)*1E3),c.timeOuts.push(e)):c.animate(a),c.chart.animatable.push(a))},createLabel:function(a,b,c){var e=this.chart,g=a.labelColor;g||(g=this.color);g||(g=e.color);c&&(g=c);c=this.fontSize;void 0===c&&(this.fontSize=c=e.fontSize);var f=this.labelFunction;b=e.formatString(b,a);b=d.cleanFromEmpty(b);f&&(b=f(a,b));if(void 0!==b&&""!==b)return a=d.text(this.container,b,g,e.fontFamily,c),a.node.style.pointerEvents="none",d.setCN(e,a,this.bcn+"label"),this.bulletSet.push(a),a},positiveClip:function(a){a.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(a){a.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(a,b,c,e){var g=this;if(1<a.length){var f=g.noRounding,h=g.set,k=g.chart,l=g.container,m=l.set(),n=l.set();h.push(n);h.push(m);var q=g.lineAlpha,p=g.lineThickness,h=g.fillAlphas,t=g.lineColorR,r=g.negativeLineAlpha;isNaN(r)&&(r=q);var w=g.lineColorSwitched;w&&(t=w);var w=g.fillColorsR,z=g.fillColorsSwitched;z&&(w=z);var x=g.dashLength;(z=g.dashLengthSwitched)&&(x=z);var z=g.negativeLineColor,u=g.negativeFillColors,A=g.negativeFillAlphas,y=g.baseCoord;0!==g.negativeBase&&(y=g.valueAxis.getCoordinate(g.negativeBase,f),y>g.height&&(y=g.height),0>y&&(y=0));q=d.line(l,a,b,t,q,p,x,!1,!1,f);q.node.setAttribute("stroke-linejoin","round");d.setCN(k,q,g.bcn+"stroke");m.push(q);m.click(function(a){g.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){g.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){g.handleGraphEvent(a,"rollOutGraph")}).touchmove(function(a){g.chart.handleMouseMove(a)}).touchend(function(a){g.chart.handleTouchEnd(a)});void 0===z||g.useNegativeColorIfDown||(p=d.line(l,a,b,z,r,p,x,!1,!1,f),p.node.setAttribute("stroke-linejoin","round"),d.setCN(k,p,g.bcn+"stroke"),d.setCN(k,p,g.bcn+"stroke-negative"),n.push(p));if(0<h||0<A)if(p=a.join(";").split(";"),r=b.join(";").split(";"),q=k.type,"serial"==q||"radar"==q?0<c.length?(c.reverse(),e.reverse(),p=a.concat(c),r=b.concat(e)):"radar"==q?(r.push(0),p.push(0)):g.rotate?(r.push(r[r.length-1]),p.push(y),r.push(r[0]),p.push(y),r.push(r[0]),p.push(p[0])):(p.push(p[p.length-1]),r.push(y),p.push(p[0]),r.push(y),p.push(a[0]),r.push(r[0])):"xy"==q&&(b=g.fillToAxis)&&(d.isString(b)&&(b=k.getValueAxisById(b)),"H"==b.orientation?(y="top"==b.position?0:b.height,p.push(p[p.length-1]),r.push(y),p.push(p[0]),r.push(y),p.push(a[0]),r.push(r[0])):(y="left"==b.position?0:b.width,r.push(r[r.length-1]),p.push(y),r.push(r[0]),p.push(y),r.push(r[0]),p.push(p[0]))),a=g.gradientRotation,0<h&&(b=d.polygon(l,p,r,w,h,1,"#000",0,a,f),b.pattern(g.pattern,NaN,k.path),d.setCN(k,b,g.bcn+"fill"),m.push(b),b.toBack()),u||void 0!==z)isNaN(A)&&(A=h),u||(u=z),f=d.polygon(l,p,r,u,A,1,"#000",0,a,f),d.setCN(k,f,g.bcn+"fill"),d.setCN(k,f,g.bcn+"fill-negative"),f.pattern(g.pattern,NaN,k.path),n.push(f),f.toBack(),n.click(function(a){g.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){g.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){g.handleGraphEvent(a,"rollOutGraph")}).touchmove(function(a){g.chart.handleMouseMove(a)}).touchend(function(a){g.chart.handleTouchEnd(a)});
327g.applyMask(n,m)}},applyMask:function(a,b){var c=a.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(b),0<c&&this.negativeClip(a))},drawSmoothedGraph:function(a,b,c,e){if(1<a.length){var g=this.set,f=this.chart,h=this.container,k=h.set(),l=h.set();g.push(l);g.push(k);var m=this.lineAlpha,n=this.lineThickness,g=this.dashLength,q=this.fillAlphas,p=this.lineColorR,t=this.fillColorsR,r=this.negativeLineColor,w=this.negativeFillColors,z=this.negativeFillAlphas,x=this.baseCoord,u=this.lineColorSwitched;u&&(p=u);(u=this.fillColorsSwitched)&&(t=u);var A=this.negativeLineAlpha;isNaN(A)&&(A=m);u=this.getGradRotation();m=new d.Bezier(h,a,b,p,m,n,t,0,g,void 0,u);d.setCN(f,m,this.bcn+"stroke");k.push(m.path);void 0!==r&&(n=new d.Bezier(h,a,b,r,A,n,t,0,g,void 0,u),d.setCN(f,n,this.bcn+"stroke"),d.setCN(f,n,this.bcn+"stroke-negative"),l.push(n.path));0<q&&(n=a.join(";").split(";"),m=b.join(";").split(";"),p="",0<c.length?(c.push("M"),e.push("M"),c.reverse(),e.reverse(),n=a.concat(c),m=b.concat(e)):(this.rotate?(p+=" L"+x+","+b[b.length-1],p+=" L"+x+","+b[0]):(p+=" L"+a[a.length-1]+","+x,p+=" L"+a[0]+","+x),p+=" L"+a[0]+","+b[0]),a=new d.Bezier(h,n,m,NaN,0,0,t,q,g,p,u),d.setCN(f,a,this.bcn+"fill"),a.path.pattern(this.pattern,NaN,f.path),k.push(a.path),w||void 0!==r)&&(z||(z=q),w||(w=r),h=new d.Bezier(h,n,m,NaN,0,0,w,z,g,p,u),h.path.pattern(this.pattern,NaN,f.path),d.setCN(f,h,this.bcn+"fill"),d.setCN(f,h,this.bcn+"fill-negative"),l.push(h.path));this.applyMask(l,k)}},launchAnimation:function(){var a=this,b=a.chart.startDuration;if(0<b&&!a.animationPlayed){var c=a.set,e=a.bulletSet;d.VML||(c.attr({opacity:a.startAlpha}),e.attr({opacity:a.startAlpha}));c.hide();e.hide();a.seqAn?(b=setTimeout(function(){a.animateGraphs.call(a)},a.index*b*1E3),a.timeOuts.push(b)):a.animateGraphs()}},animateGraphs:function(){var a=this.chart,b=this.set,c=this.bulletSet,e=this.x,d=this.y;b.show();c.show();var f=a.startDuration,h=a.startEffect;b&&(this.rotate?(b.translate(-1E3,d),c.translate(-1E3,d)):(b.translate(e,-1E3),c.translate(e,-1E3)),b.animate({opacity:1,translate:e+","+d},f,h),c.animate({opacity:1,translate:e+","+d},f,h),a.animatable.push(b))},animate:function(a){var b=this.chart,c=this.animationArray;!a&&0<c.length&&(a=c[0],c.shift());c=d[d.getEffect(b.startEffect)];b=b.startDuration;a&&(this.rotate?a.animateWidth(b,c):a.animateHeight(b,c),a.set.show())},legendKeyColor:function(){var a=this.legendColor,b=this.lineAlpha;void 0===a&&(a=this.lineColorR,0===b&&(b=this.fillColorsR)&&(a="object"==typeof b?b[0]:b));return a},legendKeyAlpha:function(){var a=this.legendAlpha;void 0===a&&(a=this.lineAlpha,this.fillAlphas>a&&(a=this.fillAlphas),0===a&&(a=this.bulletAlpha),0===a&&(a=1));return a},createBullet:function(a,b,c){if(!isNaN(b)&&!isNaN(c)&&("none"!=this.bullet||this.customBullet||a.bullet||a.customBullet)){var e=this.chart,g=this.container,f=this.bulletOffset,h=this.bulletSize;isNaN(a.bulletSize)||(h=a.bulletSize);var k=a.values.value,l=this.maxValue,m=this.minValue,n=this.maxBulletSize,q=this.minBulletSize;isNaN(l)||(isNaN(k)||(h=(k-m)/(l-m)*(n-q)+q),m==l&&(h=n));l=h;this.bulletAxis&&(h=a.values.error,isNaN(h)||(k=h),h=this.bulletAxis.stepWidth*k);h<this.minBulletSize&&(h=this.minBulletSize);this.rotate?b=a.isNegative?b-f:b+f:c=a.isNegative?c+f:c-f;q=this.bulletColorR;a.lineColor&&void 0===this.bulletColor&&(this.bulletColorSwitched=a.lineColor);this.bulletColorSwitched&&(q=this.bulletColorSwitched);a.isNegative&&void 0!==this.bulletColorNegative&&(q=this.bulletColorNegative);void 0!==a.color&&(q=a.color);var p;"xy"==e.type&&this.valueField&&(p=this.pattern,a.pattern&&(p=a.pattern));f=this.bullet;a.bullet&&(f=a.bullet);var k=this.bulletBorderThickness,m=this.bulletBorderColorR,n=this.bulletBorderAlpha,t=this.bulletAlpha;m||(m=q);this.useLineColorForBulletBorder&&(m=this.lineColorR,a.isNegative&&this.negativeLineColor&&(m=this.negativeLineColor),this.lineColorSwitched&&(m=this.lineColorSwitched));var r=a.alpha;isNaN(r)||(t=r);p=d.bullet(g,f,h,q,t,k,m,n,l,0,p,e.path);l=this.customBullet;a.customBullet&&(l=a.customBullet);l&&(p&&p.remove(),"function"==typeof l?(l=new l,l.chart=e,a.bulletConfig&&(l.availableSpace=c,l.graph=this,l.graphDataItem=a,l.bulletY=c,a.bulletConfig.minCoord=this.minCoord-c,l.bulletConfig=a.bulletConfig),l.write(g),p&&l.showBullet&&l.set.push(p),a.customBulletGraphics=l.cset,p=l.set):(p=g.set(),l=g.image(l,0,0,h,h),p.push(l),this.centerCustomBullets&&l.translate(-h/2,-h/2)));if(p){(a.url||this.showHandOnHover)&&p.setAttr("cursor","pointer");
327if("serial"==e.type||"gantt"==e.type)if(-.5>b||b>this.width||c<-h/2||c>this.height)p.remove(),p=null;p&&(this.bulletSet.push(p),p.translate(b,c),this.addListeners(p,a),this.allBullets.push(p));a.bx=b;a.by=c;d.setCN(e,p,this.bcn+"bullet");a.className&&d.setCN(e,p,a.className,!0)}if(p){p.size=h||0;if(e=this.bulletHitAreaSize)g=d.circle(g,e,"#FFFFFF",.001,0),g.translate(b,c),a.hitBullet=g,this.bulletSet.push(g),this.addListeners(g,a);a.bulletGraphics=p;void 0!==this.tabIndex&&p.setAttr("tabindex",this.tabIndex)}else p={size:0};p.graphDataItem=a;return p}},showBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!1;for(b=0;b<a.length;b++)a[b].show()},hideBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!0;for(b=0;b<a.length;b++)a[b].hide()},showCustomBullets:function(){var a=this.allBullets,b;this.customBulletsHidden=!1;for(b=0;b<a.length;b++){var c=a[b].graphDataItem;c&&c.customBulletGraphics&&c.customBulletGraphics.show()}},hideCustomBullets:function(){var a=this.allBullets,b;this.customBulletsHidden=!0;for(b=0;b<a.length;b++){var c=a[b].graphDataItem;c&&c.customBulletGraphics&&c.customBulletGraphics.hide()}},addListeners:function(a,b){var c=this;a.mouseover(function(a){c.handleRollOver(b,a)}).mouseout(function(a){c.handleRollOut(b,a)}).touchend(function(a){c.handleRollOver(b,a);c.chart.panEventsEnabled&&c.handleClick(b,a)}).touchstart(function(a){c.handleRollOver(b,a)}).click(function(a){c.handleClick(b,a)}).dblclick(function(a){c.handleDoubleClick(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)});var e=c.chart;if(e.accessible&&c.accessibleLabel){var d=e.formatString(c.accessibleLabel,b);e.makeAccessible(a,d)}},handleRollOver:function(a,b){this.handleGraphEvent(b,"rollOverGraph");if(a){var c=this.chart;a.bulletConfig&&(c.isRolledOverBullet=!0);var e={type:"rollOverGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(e);c.fire(e);clearTimeout(c.hoverInt);(c=c.chartCursor)&&c.valueBalloonsEnabled||this.showGraphBalloon(a,"V",!0)}},handleRollOut:function(a,b){var c=this.chart;if(a){var e={type:"rollOutGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(e);c.fire(e);c.isRolledOverBullet=!1}this.handleGraphEvent(b,"rollOutGraph");(c=c.chartCursor)&&c.valueBalloonsEnabled||this.hideBalloon()},handleClick:function(a,b){if(!this.chart.checkTouchMoved()&&this.chart.checkTouchDuration(b)){if(a){var c={type:"clickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c);d.getURL(a.url,this.urlTarget)}this.handleGraphEvent(b,"clickGraph")}},handleGraphEvent:function(a,b){var c={type:b,graph:this,target:this,chart:this.chart,event:a};this.fire(c);this.chart.fire(c)},handleRightClick:function(a,b){if(a){var c={type:"rightClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c)}},handleDoubleClick:function(a,b){if(a){var c={type:"doubleClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c)}},zoom:function(a,b){this.start=a;this.end=b;this.draw()},changeOpacity:function(a){var b=this.set;b&&b.setAttr("opacity",a);if(b=this.ownColumns){var c;for(c=0;c<b.length;c++){var e=b[c].set;e&&e.setAttr("opacity",a)}}(b=this.bulletSet)&&b.setAttr("opacity",a)},destroy:function(){d.remove(this.set);d.remove(this.bulletSet);var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},createBalloon:function(){var a=this.chart;this.balloon?this.balloon.destroy&&this.balloon.destroy():this.balloon={};var b=this.balloon;d.extend(b,a.balloon,!0);b.chart=a;b.mainSet=a.plotBalloonsSet;b.className=this.id},hideBalloon:function(){var a=this,b=a.chart;b.chartCursor?b.chartCursor.valueBalloonsEnabled||b.hideBalloon():b.hideBalloon();clearTimeout(a.hoverInt);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},b.hideBalloonTime)},hideBalloonReal:function(){this.balloon&&this.balloon.hide();this.fixBulletSize()},fixBulletSize:function(){if(d.isModern){var a=this.resizedDItem;if(a){var b=a.bulletGraphics;if(b&&!b.doNotScale){b.translate(a.bx,a.by,1);var c=this.bulletAlpha;isNaN(a.alpha)||(c=a.alpha);b.setAttr("fill-opacity",c);b.setAttr("stroke-opacity",this.bulletBorderAlpha)}}this.resizedDItem=null}},showGraphBalloon:function(a,b,c,e,g){if(a){var f=this.chart,h=this.balloon,k=0,l=0,m=f.chartCursor,
327n=!0;m?m.valueBalloonsEnabled||(h=f.balloon,k=this.x,l=this.y,n=!1):(h=f.balloon,k=this.x,l=this.y,n=!1);clearTimeout(this.hoverInt);if(f.chartCursor&&(this.currentDataItem=a,"serial"==f.type&&f.isRolledOverBullet&&f.chartCursor.valueBalloonsEnabled)){this.hideBalloonReal();return}this.resizeBullet(a,e,g);if(h&&h.enabled&&this.showBalloon&&!this.hidden){var m=f.formatString(this.balloonText,a,!0),q=this.balloonFunction;q&&(m=q(a,a.graph));m&&(m=d.cleanFromEmpty(m));m&&""!==m?(e=f.getBalloonColor(this,a),h.drop||(h.pointerOrientation=b),b=a.x,g=a.y,f.rotate&&(b=a.y,g=a.x),b+=k,g+=l,isNaN(b)||isNaN(g)?this.hideBalloonReal():(a=this.width,q=this.height,n&&h.setBounds(k,l,a+k,q+l),h.changeColor(e),h.setPosition(b,g),h.fixPrevious(),h.fixedPosition&&(c=!1),!c&&"radar"!=f.type&&(b<k-.5||b>a+k||g<l-.5||g>q+l)?(h.showBalloon(m),h.hide(0)):(h.followCursor(c),h.showBalloon(m)))):(this.hideBalloonReal(),h.hide(),this.resizeBullet(a,e,g))}else this.hideBalloonReal()}},resizeBullet:function(a,b,c){this.fixBulletSize();if(a&&d.isModern&&(1!=b||!isNaN(c))){var e=a.bulletGraphics;e&&!e.doNotScale&&(e.translate(a.bx,a.by,b),isNaN(c)||(e.setAttr("fill-opacity",c),e.setAttr("stroke-opacity",c)),this.resizedDItem=a)}}})})();(function(){var d=window.AmCharts;d.ChartCursor=d.Class({construct:function(a){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","onShowCursor","draw","selected","moved","panning","zoomStarted");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonText="[[category]]";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;this.leaveCursor=!1;this.leaveAfterTouch=!0;this.valueZoomable=!1;this.balloonPointerOrientation="horizontal";this.hLineEnabled=this.vLineEnabled=!0;this.vZoomEnabled=this.hZoomEnabled=!1;d.applyTheme(this,a,this.cname)},draw:function(){this.destroy();var a=this.chart;a.panRequired=!0;var b=a.container;this.rotate=a.rotate;this.container=b;this.prevLineHeight=this.prevLineWidth=NaN;b=b.set();b.translate(this.x,this.y);this.set=b;a.cursorSet.push(b);this.createElements();d.isString(this.limitToGraph)&&(this.limitToGraph=d.getObjById(a.graphs,this.limitToGraph),this.fullWidth=!1,this.cursorPosition="middle");this.pointer=this.balloonPointerOrientation.substr(0,1).toUpperCase();this.isHidden=!1;this.hideLines();this.valueLineAxis||(this.valueLineAxis=a.valueAxes[0])},createElements:function(){var a=this,b=a.chart,c=b.dx,e=b.dy,g=a.width,f=a.height,h,k,l=a.cursorAlpha,m=a.valueLineAlpha;a.rotate?(h=m,k=l):(k=m,h=l);"xy"==b.type&&(k=l,void 0!==m&&(k=m),h=l);a.vvLine=d.line(a.container,[c,0,0],[e,0,f],a.cursorColor,h,1);d.setCN(b,a.vvLine,"cursor-line");d.setCN(b,a.vvLine,"cursor-line-vertical");a.hhLine=d.line(a.container,[0,g,g+c],[0,0,e],a.cursorColor,k,1);d.setCN(b,a.hhLine,"cursor-line");d.setCN(b,a.hhLine,"cursor-line-horizontal");a.vLine=a.rotate?a.vvLine:a.hhLine;a.set.push(a.vvLine);a.set.push(a.hhLine);a.set.node.style.pointerEvents="none";a.fullLines=a.container.set();b=b.cursorLineSet;b.push(a.fullLines);b.translate(a.x,a.y);b.clipRect(-1,-1,g+2,f+2);void 0!==a.tabIndex&&(b.setAttr("tabindex",a.tabIndex),b.keyup(function(b){a.handleKeys(b)}).focus(function(b){a.showCursor()}).blur(function(b){a.hideCursor()}));a.set.clipRect(0,0,g,f)},handleKeys:function(a){var b=this.prevIndex,c=this.chart;if(c){var e=c.chartData;e&&(isNaN(b)&&(b=e.length-1),37!=a.keyCode&&40!=a.keyCode||b--,39!=a.keyCode&&38!=a.keyCode||b++,b=d.fitToBounds(b,c.startIndex,c.endIndex),(a=this.chart.chartData[b])&&this.setPosition(a.x.categoryAxis),this.prevIndex=b)}},update:function(){var a=this.chart;if(a){var b=a.mouseX-this.x,c=a.mouseY-this.y;this.mouseX=b;this.mouseY=c;this.mouse2X=a.mouse2X-this.x;this.mouse2Y=a.mouse2Y-this.y;var e;if(a.chartData&&0<a.chartData.length){this.mouseIsOver()?(this.hideGraphBalloons=!1,this.rolledOver=e=!0,this.updateDrawing(),this.vvLine&&isNaN(this.fx)&&(a.rotate||!this.limitToGraph)&&this.vvLine.translate(b,0),!this.hhLine||!isNaN(this.fy)||a.rotate&&this.limitToGraph||this.hhLine.translate(0,c),isNaN(this.mouse2X)?this.dispatchMovedEvent(b,c):e=!1):this.forceShow||this.hideCursor();if(this.zooming){if(!isNaN(this.mouse2X)){isNaN(this.mouse2X0)||this.dispatchPanEvent();return}if(this.pan){this.dispatchPanEvent();return}(this.hZoomEnabled||this.vZoomEnabled)&&this.zooming&&this.updateSelection()}e&&this.showCursor()}}},updateDrawing:function(){this.drawing&&this.chart.setMouseCursor("crosshair");if(this.drawingNow&&(d.remove(this.drawingLine),1<Math.abs(this.drawStartX-this.mouseX)||1<Math.abs(this.drawStartY-this.mouseY))){var a=this.chart,b=a.marginTop,a=a.marginLeft;this.drawingLine=d.line(this.container,[this.drawStartX+a,this.mouseX+a],[this.drawStartY+b,this.mouseY+b],this.cursorColor,1,1)}}
327,fixWidth:function(a){if(this.fullWidth&&this.prevLineWidth!=a){var b=this.vvLine,c=0;b&&(b.remove(),c=b.x);b=this.container.set();b.translate(c,0);c=d.rect(this.container,a,this.height,this.cursorColor,this.cursorAlpha,this.cursorAlpha,this.cursorColor);d.setCN(this.chart,c,"cursor-fill");c.translate(-a/2-1,0);b.push(c);this.vvLine=b;this.fullLines.push(b);this.prevLineWidth=a}},fixHeight:function(a){if(this.fullWidth&&this.prevLineHeight!=a){var b=this.hhLine,c=0;b&&(b.remove(),c=b.y);b=this.container.set();b.translate(0,c);c=d.rect(this.container,this.width,a,this.cursorColor,this.cursorAlpha);c.translate(0,-a/2);b.push(c);this.fullLines.push(b);this.hhLine=b;this.prevLineHeight=a}},fixVLine:function(a,b){if(!isNaN(a)&&this.vvLine){if(isNaN(this.prevLineX)){var c=0,e=this.mouseX;if(this.limitToGraph){var d=this.chart.categoryAxis;d&&(this.chart.rotate||(c="bottom"==d.position?this.height:-this.height),e=a)}this.vvLine.translate(e,c)}else this.prevLineX!=a&&this.vvLine.translate(this.prevLineX,this.prevLineY);this.fx=a;this.prevLineX!=a&&(c=this.animationDuration,this.zooming&&(c=0),this.vvLine.stop(),this.vvLine.animate({translate:a+","+b},c,"easeOutSine"),this.prevLineX=a,this.prevLineY=b)}},fixHLine:function(a,b){if(!isNaN(a)&&this.hhLine){if(isNaN(this.prevLineY)){var c=0,e=this.mouseY;if(this.limitToGraph){var d=this.chart.categoryAxis;d&&(this.chart.rotate&&(c="right"==d.position?this.width:-this.width),e=a)}this.hhLine.translate(c,e)}else this.prevLineY!=a&&this.hhLine.translate(this.prevLineX,this.prevLineY);this.fy=a;this.prevLineY!=a&&(c=this.animationDuration,this.zooming&&(c=0),this.hhLine.stop(),this.hhLine.animate({translate:b+","+a},c,"easeOutSine"),this.prevLineY=a,this.prevLineX=b)}},hideCursor:function(a){this.forceShow=!1;this.chart.wasTouched&&this.leaveAfterTouch||this.isHidden||this.leaveCursor||(this.hideCursorReal(),a?this.chart.handleCursorHide():this.fire({target:this,chart:this.chart,type:"onHideCursor"}),this.chart.setMouseCursor("auto"))},hideCursorReal:function(){this.hideLines();this.isHidden=!0;this.index=this.prevLineY=this.prevLineX=this.mouseY0=this.mouseX0=this.fy=this.fx=NaN},hideLines:function(){this.vvLine&&this.vvLine.hide();this.hhLine&&this.hhLine.hide();this.fullLines&&this.fullLines.hide();this.isHidden=!0;this.chart.handleCursorHide()},showCursor:function(a){!this.drawing&&this.enabled&&(this.vLineEnabled&&this.vvLine&&this.vvLine.show(),this.hLineEnabled&&this.hhLine&&this.hhLine.show(),this.isHidden=!1,this.updateFullLine(),a||this.fire({target:this,chart:this.chart,type:"onShowCursor"}),this.pan&&this.chart.setMouseCursor("move"))},updateFullLine:function(){this.zooming&&this.fullWidth&&this.selection&&(this.rotate?0<this.selection.height&&this.hhLine.hide():0<this.selection.width&&this.vvLine.hide())},updateSelection:function(){if(!this.pan&&this.enabled){var a=this.mouseX,b=this.mouseY;isNaN(this.fx)||(a=this.fx);isNaN(this.fy)||(b=this.fy);this.clearSelection();var c=this.mouseX0,e=this.mouseY0,g=this.width,f=this.height,a=d.fitToBounds(a,0,g),b=d.fitToBounds(b,0,f),h;a<c&&(h=a,a=c,c=h);b<e&&(h=b,b=e,e=h);this.hZoomEnabled?g=a-c:c=0;this.vZoomEnabled?f=b-e:e=0;isNaN(this.mouse2X)&&0<Math.abs(g)&&0<Math.abs(f)&&(a=this.chart,b=d.rect(this.container,g,f,this.cursorColor,this.selectionAlpha),d.setCN(a,b,"cursor-selection"),b.width=g,b.height=f,b.translate(c,e),this.set.push(b),this.selection=b);this.updateFullLine()}},mouseIsOver:function(){var a=this.mouseX,b=this.mouseY;if(this.justReleased)return this.justReleased=!1,!0;if(this.mouseIsDown)return!0;if(!this.chart.mouseIsOver)return this.handleMouseOut(),!1;if(0<a&&a<this.width&&0<b&&b<this.height)return!0;this.handleMouseOut();return!1},fixPosition:function(){this.prevY=this.prevX=NaN},handleMouseDown:function(){this.update();if(this.mouseIsOver())if(this.mouseIsDown=!0,this.mouseX0=this.mouseX,this.mouseY0=this.mouseY,this.mouse2X0=this.mouse2X,this.mouse2Y0=this.mouse2Y,this.drawing)this.drawStartY=this.mouseY,this.drawStartX=this.mouseX,this.drawingNow=!0;else if(this.dispatchMovedEvent(this.mouseX,this.mouseY),!this.pan&&isNaN(this.mouse2X0)&&(isNaN(this.fx)||(this.mouseX0=this.fx),isNaN(this.fy)||(this.mouseY0=this.fy)),this.hZoomEnabled||this.vZoomEnabled){this.zooming=!0;var a={chart:this.chart,target:this,type:"zoomStarted"};a.x=this.mouseX/this.width;a.y=this.mouseY/this.height;this.index0=a.index=this.index;this.timestamp0=this.timestamp;this.fire(a)}},registerInitialMouse:function(){},handleReleaseOutside:function(){this.mouseIsDown=!1;if(this.drawingNow){this.drawingNow=!1;d.remove(this.drawingLine);var a=this.drawStartX,b=this.drawStartY,c=this.mouseX,e=this.mouseY,g=this.chart;(2<Math.abs(a-c)||2<Math.abs(b-e))&&this.fire({type:"draw",target:this,chart:g,initialX:a,initialY:b,finalX:c,finalY:e})}this.zooming&&(this.zooming=!1,this.selectWithoutZooming?this.dispatchZoomEvent("selected"):(this.hZoomEnabled||this.vZoomEnabled)&&this.dispatchZoomEvent("zoomed"),this.rolledOver&&this.dispatchMovedEvent(this.mouseX,this.mouseY));this.mouse2Y0=this.mouse2X0=this.mouseY0=this.mouseX0=NaN}
327,dispatchZoomEvent:function(a){if(!this.pan){var b=this.selection;if(b&&3<Math.abs(b.width)&&3<Math.abs(b.height)){var c=Math.min(this.index,this.index0),e=Math.max(this.index,this.index0),d=c,f=e,h=this.chart,k=h.chartData,l=h.categoryAxis;l&&l.parseDates&&!l.equalSpacing&&(d=k[c]?k[c].time:Math.min(this.timestamp0,this.timestamp),f=k[e]?h.getEndTime(k[e].time):Math.max(this.timestamp0,this.timestamp));var b={type:a,chart:this.chart,target:this,end:f,start:d,startIndex:c,endIndex:e,selectionHeight:b.height,selectionWidth:b.width,selectionY:b.y,selectionX:b.x},m;this.hZoomEnabled&&4<Math.abs(this.mouseX0-this.mouseX)&&(b.startX=this.mouseX0/this.width,b.endX=this.mouseX/this.width,m=!0);this.vZoomEnabled&&4<Math.abs(this.mouseY0-this.mouseY)&&(b.startY=1-this.mouseY0/this.height,b.endY=1-this.mouseY/this.height,m=!0);m&&(this.prevY=this.prevX=NaN,this.fire(b),"selected"!=a&&this.clearSelection());this.hideCursor()}}},dispatchMovedEvent:function(a,b,c,e){a=Math.round(a);b=Math.round(b);if(!this.isHidden&&(a!=this.prevX||b!=this.prevY||"changed"==c)){c||(c="moved");var d=this.fx,f=this.fy;isNaN(d)&&(d=a);isNaN(f)&&(f=b);var h=!1;this.zooming&&this.pan&&(h=!0);h={hidden:this.isHidden,type:c,chart:this.chart,target:this,x:a,y:b,finalX:d,finalY:f,zooming:this.zooming,panning:h,mostCloseGraph:this.mostCloseGraph,index:this.index,skip:e,hideBalloons:this.hideGraphBalloons};this.prevIndex=this.index;this.rotate?(h.position=b,h.finalPosition=f):(h.position=a,h.finalPosition=d);this.prevX=a;this.prevY=b;e?this.chart.handleCursorMove(h):(this.fire(h),"changed"==c&&this.chart.fire(h))}},dispatchPanEvent:function(){if(this.mouseIsDown){var a=d.roundTo((this.mouseX-this.mouseX0)/this.width,3),b=d.roundTo((this.mouseY-this.mouseY0)/this.height,3),c=d.roundTo((this.mouse2X-this.mouse2X0)/this.width,3),e=d.roundTo((this.mouse2Y-this.mouse2Y0)/this.height,2),g=!1;0!==Math.abs(a)&&0!==Math.abs(b)&&(g=!0);if(this.prevDeltaX==a||this.prevDeltaY==b)g=!1;isNaN(c)||isNaN(e)||(0!==Math.abs(c)&&0!==Math.abs(e)&&(g=!0),this.prevDelta2X!=c&&this.prevDelta2Y!=e)||(g=!1);g&&(this.hideLines(),this.fire({type:"panning",chart:this.chart,target:this,deltaX:a,deltaY:b,delta2X:c,delta2Y:e,index:this.index}),this.prevDeltaX=a,this.prevDeltaY=b,this.prevDelta2X=c,this.prevDelta2Y=e)}},clearSelection:function(){var a=this.selection;a&&(a.width=0,a.height=0,a.remove())},destroy:function(){this.clear();d.remove(this.selection);this.selection=null;clearTimeout(this.syncTO);d.remove(this.set)},clear:function(){},setTimestamp:function(a){this.timestamp=a},setIndex:function(a,b){a!=this.index&&(this.index=a,b||this.isHidden||this.dispatchMovedEvent(this.mouseX,this.mouseY,"changed"))},handleMouseOut:function(){this.enabled&&this.rolledOver&&(this.leaveCursor||this.setIndex(void 0),this.forceShow=!1,this.hideCursor(),this.rolledOver=!1)},showCursorAt:function(a){var b=this.chart.categoryAxis;b&&this.setPosition(b.categoryToCoordinate(a),a)},setPosition:function(a,b){var c=this.chart,e=c.categoryAxis;if(e){var d,f;void 0===b&&(b=e.coordinateToValue(a));e.showBalloonAt(b,a);this.forceShow=!0;e.stickBalloonToCategory?c.rotate?this.fixHLine(a,0):this.fixVLine(a,0):(this.showCursor(),c.rotate?this.hhLine.translate(0,a):this.vvLine.translate(a,0));c.rotate?d=a:f=a;c.rotate?(this.vvLine&&this.vvLine.hide(),this.hhLine&&this.hhLine.show()):(this.hhLine&&this.hhLine.hide(),this.vvLine&&this.vvLine.show());this.updateFullLine();this.isHidden=!1;this.dispatchMovedEvent(f,d,"moved",!0)}},enableDrawing:function(a){this.enabled=!a;this.hideCursor();this.drawing=a},syncWithCursor:function(a,b){clearTimeout(this.syncTO);a&&(a.isHidden?this.hideCursor(!0):this.syncWithCursorReal(a,b))},isZooming:function(a){this.zooming=a},syncWithCursorReal:function(a,b){var c=a.vvLine,e=a.hhLine;this.index=a.index;this.forceShow=!0;this.zooming&&this.pan||this.showCursor(!0);this.hideGraphBalloons=b;this.justReleased=a.justReleased;this.zooming=a.zooming;this.index0=a.index0;this.mouseX0=a.mouseX0;this.mouseY0=a.mouseY0;this.mouse2X0=a.mouse2X0;this.mouse2Y0=a.mouse2Y0;this.timestamp0=a.timestamp0;this.prevDeltaX=a.prevDeltaX;this.prevDeltaY=a.prevDeltaY;this.prevDelta2X=a.prevDelta2X;this.prevDelta2Y=a.prevDelta2Y;this.fx=a.fx;this.fy=a.fy;a.zooming&&this.updateSelection();var d=a.mouseX,f=a.mouseY;this.rotate?(d=NaN,this.vvLine&&this.vvLine.hide(),this.hhLine&&e&&(isNaN(a.fy)?this.hhLine.translate(0,a.mouseY):this.fixHLine(a.fy,0))):(f=NaN,this.hhLine&&this.hhLine.hide(),this.vvLine&&c&&(isNaN(a.fx)?this.vvLine.translate(a.mouseX,0):this.fixVLine(a.fx,0)));this.dispatchMovedEvent(d,f,"moved",!0)}})})();(function(){var d=window.AmCharts;d.SimpleChartScrollbar=d.Class({construct:function(a){this.createEvents("zoomed","zoomStarted","zoomEnded");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;
327this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconHeight=this.dragIconWidth=35;this.dragIcon="dragIconRoundBig";this.dragCursorHover="cursor: move; cursor: grab; cursor: -moz-grab; cursor: -webkit-grab;";this.dragCursorDown="cursor: move; cursor: grab; cursor: -moz-grabbing; cursor: -webkit-grabbing;";this.vResizeCursor="ns-resize";this.hResizeCursor="ew-resize";this.enabled=!0;this.percentStart=this.offset=0;this.percentEnd=1;d.applyTheme(this,a,"SimpleChartScrollbar")},getPercents:function(){var a=this.getDBox(),b=a.x,c=a.y,e=a.width,a=a.height;this.rotate?(b=1-c/this.height,c=1-(c+a)/this.height):(c=b/this.width,b=(b+e)/this.width);this.percentStart=c;this.percentEnd=b},draw:function(){var a=this;a.destroy();if(a.enabled){var b=a.chart.container,c=a.rotate,e=a.chart;e.panRequired=!0;var g=b.set();a.set=g;c?d.setCN(e,g,"scrollbar-vertical"):d.setCN(e,g,"scrollbar-horizontal");e.scrollbarsSet.push(g);var f,h;c?(f=a.scrollbarHeight,h=e.plotAreaHeight):(h=a.scrollbarHeight,f=e.plotAreaWidth);a.width=f;if((a.height=h)&&f){var k=d.rect(b,f,h,a.backgroundColor,a.backgroundAlpha,1,a.backgroundColor,a.backgroundAlpha);d.setCN(e,k,"scrollbar-bg");a.bg=k;g.push(k);k=d.rect(b,f,h,"#000",.005);g.push(k);a.invisibleBg=k;k.click(function(){a.handleBgClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()}).touchend(function(){a.handleBgClick()});k=d.rect(b,f,h,a.selectedBackgroundColor,a.selectedBackgroundAlpha);d.setCN(e,k,"scrollbar-bg-selected");a.selectedBG=k;g.push(k);f=d.rect(b,f,h,"#000",.005);a.dragger=f;g.push(f);f.mousedown(function(b){a.handleDragStart(b)}).mouseup(function(){a.handleDragStop()}).mouseover(function(){a.handleDraggerOver()}).mouseout(function(){a.handleMouseOut()}).touchstart(function(b){a.handleDragStart(b)}).touchend(function(){a.handleDragStop()});h=e.pathToImages;var l,k=a.dragIcon.replace(/\.[a-z]*$/i,"");d.isAbsolute(k)&&(h="");c?(l=h+k+"H"+e.extension,h=a.dragIconWidth,c=a.dragIconHeight):(l=h+k+e.extension,c=a.dragIconWidth,h=a.dragIconHeight);k=b.image(l,0,0,c,h);d.setCN(e,k,"scrollbar-grip-left");l=b.image(l,0,0,c,h);d.setCN(e,l,"scrollbar-grip-right");var m=10,n=20;e.panEventsEnabled&&(m=25,n=a.scrollbarHeight);var q=d.rect(b,m,n,"#000",.005),p=d.rect(b,m,n,"#000",.005);p.translate(-(m-c)/2,-(n-h)/2);q.translate(-(m-c)/2,-(n-h)/2);c=b.set([k,p]);b=b.set([l,q]);a.iconLeft=c;g.push(a.iconLeft);a.iconRight=b;g.push(b);a.updateGripCursor(!1);e.makeAccessible(c,a.accessibleLabel);e.makeAccessible(b,a.accessibleLabel);e.makeAccessible(f,a.accessibleLabel);c.setAttr("role","menuitem");b.setAttr("role","menuitem");f.setAttr("role","menuitem");void 0!==a.tabIndex&&(c.setAttr("tabindex",a.tabIndex),c.keyup(function(b){a.handleKeys(b,1,0)}));void 0!==a.tabIndex&&(f.setAttr("tabindex",a.tabIndex),f.keyup(function(b){a.handleKeys(b,1,1)}));void 0!==a.tabIndex&&(b.setAttr("tabindex",a.tabIndex),b.keyup(function(b){a.handleKeys(b,0,1)}));c.mousedown(function(){a.leftDragStart()}).mouseup(function(){a.leftDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(){a.leftDragStart()}).touchend(function(){a.leftDragStop()});b.mousedown(function(){a.rightDragStart()}).mouseup(function(){a.rightDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(){a.rightDragStart()}).touchend(function(){a.rightDragStop()});d.ifArray(e.chartData)?g.show():g.hide();a.hideDragIcons();a.clipDragger(!1)}g.translate(a.x,a.y);g.node.style.msTouchAction="none";g.node.style.touchAction="none"}},handleKeys:function(a,b,c){this.getPercents();var e=this.percentStart,d=this.percentEnd;if(this.rotate)var f=d,d=e,e=f;if(37==a.keyCode||40==a.keyCode)e-=.02*b,d-=.02*c;if(39==a.keyCode||38==a.keyCode)e+=.02*b,d+=.02*c;this.rotate&&(a=d,d=e,e=a);isNaN(d)||isNaN(e)||this.percentZoom(e,d,!0)},updateScrollbarSize:function(a,b){if(!isNaN(a)&&!isNaN(b)){a=Math.round(a);b=Math.round(b);var c=this.dragger,e,d,f,h,k;this.rotate?(e=0,d=a,f=this.width+1,h=b-a,c.setAttr("height",b-a),c.setAttr("y",d)):(e=a,d=0,f=b-a,h=this.height+1,k=b-a,c.setAttr("x",e),c.setAttr("width",k));this.clipAndUpdate(e,d,f,h)}},update:function(){var a,b=!1,c,e,d=this.x,f=this.y,h=this.dragger,k=this.getDBox();if(k){c=k.x+d;e=k.y+f;var l=k.width,k=k.height,m=this.rotate,n=this.chart,q=this.width,p=this.height,t=n.mouseX,n=n.mou
327seY;a=this.initialMouse;this.forceClip&&this.clipDragger(!0);if(this.dragging){var r=this.initialCoord;if(m)a=r+(n-a),0>a&&(a=0),r=p-k,a>r&&(a=r),h.setAttr("y",a);else{a=r+(t-a);0>a&&(a=0);r=q-l;if(a>r||isNaN(a))a=r;h.setAttr("x",a)}this.clipDragger(!0)}if(this.resizingRight){if(m)if(a=n-e,!isNaN(this.maxHeight)&&a>this.maxHeight&&(a=this.maxHeight),a+e>p+f&&(a=p-e+f),0>a)this.resizingRight=!1,b=this.resizingLeft=!0;else{if(0===a||isNaN(a))a=.1;h.setAttr("height",a)}else if(a=t-c,!isNaN(this.maxWidth)&&a>this.maxWidth&&(a=this.maxWidth),a+c>q+d&&(a=q-c+d),0>a)this.resizingRight=!1,b=this.resizingLeft=!0;else{if(0===a||isNaN(a))a=.1;h.setAttr("width",a)}this.clipDragger(!0)}if(this.resizingLeft){if(m)if(c=e,e=n,e<f&&(e=f),isNaN(e)&&(e=f),e>p+f&&(e=p+f),a=!0===b?c-e:k+c-e,!isNaN(this.maxHeight)&&a>this.maxHeight&&(a=this.maxHeight,e=c),0>a)this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("y",c+k-f);else{if(0===a||isNaN(a))a=.1;h.setAttr("y",e-f);h.setAttr("height",a)}else if(e=t,e<d&&(e=d),isNaN(e)&&(e=d),e>q+d&&(e=q+d),a=!0===b?c-e:l+c-e,!isNaN(this.maxWidth)&&a>this.maxWidth&&(a=this.maxWidth,e=c),0>a)this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("x",c+l-d);else{if(0===a||isNaN(a))a=.1;h.setAttr("x",e-d);h.setAttr("width",a)}this.clipDragger(!0)}}},stopForceClip:function(){this.animating=this.forceClip=!1},clipDragger:function(a){var b=this.getDBox();if(b){var c=b.x,e=b.y,d=b.width,b=b.height,f=!1;if(this.rotate){if(c=0,d=this.width+1,this.clipY!=e||this.clipH!=b)f=!0}else if(e=0,b=this.height+1,this.clipX!=c||this.clipW!=d)f=!0;f&&this.clipAndUpdate(c,e,d,b);a&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent())}},maskGraphs:function(){},clipAndUpdate:function(a,b,c,e){this.clipX=a;this.clipY=b;this.clipW=c;this.clipH=e;this.selectedBG.setAttr("width",c);this.selectedBG.setAttr("height",e);this.selectedBG.translate(a,b);this.updateDragIconPositions();this.maskGraphs(a,b,c,e)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart;a.hideBalloon();var b=this.getDBox(),c=b.x,e=b.y,d=b.width,b=b.height;this.getPercents();this.rotate?(c=e,d=this.height/b):d=this.width/d;a={type:"zoomed",position:c,chart:a,target:this,multiplier:d,relativeStart:this.percentStart,relativeEnd:this.percentEnd};if(this.percentStart!=this.prevPercentStart||this.percentEnd!=this.prevPercentEnd||this.prevMultiplier!=d)this.fire(a),this.prevPercentStart=this.percentStart,this.prevPercentEnd=this.percentEnd,this.prevMultiplier=d}},updateDragIconPositions:function(){var a=this.getDBox(),b=a.x,c=a.y,e=this.iconLeft,d=this.iconRight,f,h,k=this.scrollbarHeight;this.rotate?(f=this.dragIconWidth,h=this.dragIconHeight,e.translate((k-h)/2,c-f/2),d.translate((k-h)/2,c+a.height-f/2)):(f=this.dragIconHeight,h=this.dragIconWidth,e.translate(b-h/2,(k-f)/2),d.translate(b-h/2+a.width,(k-f)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){if(!this.resizingLeft&&!this.resizingRight&&!this.dragging){if(this.hideResizeGrips||!this.resizeEnabled)this.iconLeft.hide(),this.iconRight.hide();this.removeCursors()}},removeCursors:function(){this.chart.setMouseCursor("auto")},fireZoomEvent:function(a){this.fire({type:a,chart:this.chart,target:this})},percentZoom:function(a,b,c){a=d.fitToBounds(a,0,b);b=d.fitToBounds(b,a,1);if(this.dragger&&this.enabled){this.dragger.stop();isNaN(a)&&(a=0);isNaN(b)&&(b=1);var e,g;this.rotate?(e=this.height,b=e-e*b,g=e-e*a):(e=this.width,g=e*b,b=e*a);this.updateScrollbarSize(b,g);this.clipDragger(!1);this.getPercents();c&&this.dispatchScrollbarEvent()}},destroy:function(){this.clear();d.remove(this.set);d.remove(this.iconRight);d.remove(this.iconLeft)},clear:function(){},handleDragStart:function(){if(this.enabled){this.fireZoomEvent("zoomStarted");var a=this.chart;this.dragger.stop();this.removeCursors();d.isModern&&(this.dragger.node.style.cssText=this.dragCursorDown);this.dragging=!0;var b=this.getDBox();this.rotate?(this.initialCoord=b.y,this.initialMouse=a.mouseY):(this.initialCoord=b.x,this.initialMouse=a.mouseX)}},handleDragStop:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();d.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover);this.update();this.fireZoomEvent("zoomEnded")},handleDraggerOver:function(){this.handleMouseOver();d.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover)},leftDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingLeft=!0;this.updateGripCursor(!0)},updateGripCursor:function(a){d.isModern&&(a=this.rotate?a?this.vResizeCursorDown:this.vResizeCursorHover:a?this.hResizeCursorDown:this.hResizeCursorHover)&&(this.iconRight&&(this.iconRight.node.style.cssText=a),this.iconLeft&&(this.iconLeft.node.style.cssText=a))},leftDragStop:function(){this.resizingLeft&&(this.resizingLeft=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},rightDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingRight=!0;this.updateGripCursor(!0)},rightDragStop:function(){this.resizingRight&&(this.resizingRight=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.vResizeCursor&&this.chart.setMouseCursor(this.vResizeCursor):this.hResizeCursor&&this.chart.setMouseCursor(this.hResizeCursor);this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){var a=this;if(!a.resizingRight&&!a.resizingLeft){a.zooming=!0;var b,c,e=a.scrollDuration,g=a.dragger;b=a.getDBox();var f=b.height,h=b.width;c=a.chart;var k=a.y,l=a.x,m=a.rotate;m?(b="y",c=c.mouseY-f/2-k,c=d.fitToBounds(c,0,a.height-f)):(b="x",c=c.mouseX-h/2-l,c=d.fitToBounds(c,0,a.width-h));a.updateOnReleaseOnly?(a.skipEvent=!1,g.setAttr(b,c),a.dispatchScrollbarEvent(),a.clipDragger()):(a.animating=!0,c=Math.round(c),m?g.animate({y:c},e,">"):g.animate({x:c},e,">"),a.forceClip=!0,clearTimeout(a.forceTO),a.forceTO=setTimeout(function(){a.stopForceClip.call(a)},5E3*e))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.dragging=this.resizingRight=this.resizingLeft=!1,this.updateOnRelease(),this.removeCursors();this.animating=this.mouseIsOver=!1;this.hideDragIcons();this.update()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons();this.removeCursors()}})})();(function(){var d=window.AmCharts;d.ChartScrollbar=d.Class({inherits:d.SimpleChartScrollbar,construct:function(a){this.cname="ChartScrollbar";d.ChartScrollbar.base.construct.call(this,a);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.oppositeAxis=!0;this.accessibleLabel="Zoom chart using cursor arrows";d.applyTheme(this,a,this.cname)},init:function(){var a=this.categoryAxis,b=this.chart,c=this.gridAxis;a||("CategoryAxis"==this.gridAxis.cname?(this.catScrollbar=!0,a=new d.CategoryAxis,a.id="scrollbar"):(a=new d.ValueAxis,a.data=b.chartData,a.id=c.id,a.type=c.type,a.maximumDate=c.maximumDate,a.minimumDate=c.minimumDate,a.minPeriod=c.minPeriod,a.minMaxField=c.minMaxField),this.categoryAxis=a);a.chart=b;var e=b.categoryAxis;e&&(a.firstDayOfWeek=e.firstDayOfWeek);a.dateFormats=c.dateFormats;a.markPeriodChange=c.markPeriodChange;a.boldPeriodBeginning=c.boldPeriodBeginning;a.labelFunction=c.labelFunction;a.axisItemRenderer=d.RecItem;a.axisRenderer=d.RecAxis;a.guideFillRenderer=d.RecFill;a.inside=!0;a.fontSize=this.fontSize;a.tickLength=0;a.axisAlpha=0;d.isString(this.graph)&&(this.graph=d.getObjById(b.graphs,this.graph));(a=this.graph)&&this.catScrollbar&&(c=this.valueAxis,c||(this.valueAxis=c=new d.ValueAxis,c.visible=!1,
327c.scrollbar=!0,c.axisItemRenderer=d.RecItem,c.axisRenderer=d.RecAxis,c.guideFillRenderer=d.RecFill,c.labelsEnabled=!1,c.chart=b),b=this.unselectedGraph,b||(b=new d.AmGraph,b.scrollbar=!0,this.unselectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers),b=this.selectedGraph,b||(b=new d.AmGraph,b.scrollbar=!0,this.selectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers));this.scrollbarCreated=!0},draw:function(){var a=this;d.ChartScrollbar.base.draw.call(a);if(a.enabled){a.scrollbarCreated||a.init();var b=a.chart,c=b.chartData,e=a.categoryAxis,g=a.rotate,f=a.x,h=a.y,k=a.width,l=a.height,m=a.gridAxis,n=a.set;e.setOrientation(!g);e.parseDates=m.parseDates;"ValueAxis"==a.categoryAxis.cname&&(e.rotate=!g);e.equalSpacing=m.equalSpacing;e.minPeriod=m.minPeriod;e.startOnAxis=m.startOnAxis;e.width=k-1;e.height=l;e.gridCount=a.gridCount;e.gridColor=a.gridColor;e.gridAlpha=a.gridAlpha;e.color=a.color;e.tickLength=0;e.axisAlpha=0;e.autoGridCount=a.autoGridCount;e.parseDates&&!e.equalSpacing&&e.timeZoom(b.firstTime,b.lastTime);e.minimum=a.gridAxis.fullMin;e.maximum=a.gridAxis.fullMax;e.strictMinMax=!0;e.zoom(0,c.length-1);if((m=a.graph)&&a.catScrollbar){var q=a.valueAxis,p=m.valueAxis;q.id=p.id;q.rotate=g;q.setOrientation(g);q.width=k;q.height=l;q.dataProvider=c;q.reversed=p.reversed;q.logarithmic=p.logarithmic;q.gridAlpha=0;q.axisAlpha=0;n.push(q.set);g?(q.y=h,q.x=0):(q.x=f,q.y=0);var f=Infinity,h=-Infinity,t;for(t=0;t<c.length;t++){var r=c[t].axes[p.id].graphs[m.id].values,w;for(w in r)if(r.hasOwnProperty(w)&&"percents"!=w&&"total"!=w){var z=r[w];z<f&&(f=z);z>h&&(h=z)}}Infinity!=f&&(q.minimum=f);-Infinity!=h&&(q.maximum=h+.1*(h-f));f==h&&(--q.minimum,q.maximum+=1);void 0!==a.minimum&&(q.minimum=a.minimum);void 0!==a.maximum&&(q.maximum=a.maximum);q.zoom(0,c.length-1);w=a.unselectedGraph;w.id=m.id;w.bcn="scrollbar-graph-";w.rotate=g;w.chart=b;w.data=c;w.valueAxis=q;w.chart=m.chart;w.categoryAxis=a.categoryAxis;w.periodSpan=m.periodSpan;w.valueField=m.valueField;w.openField=m.openField;w.closeField=m.closeField;w.highField=m.highField;w.lowField=m.lowField;w.lineAlpha=a.graphLineAlpha;w.lineColorR=a.graphLineColor;w.fillAlphas=a.graphFillAlpha;w.fillColorsR=a.graphFillColor;w.connect=m.connect;w.hidden=m.hidden;w.width=k;w.height=l;w.pointPosition=m.pointPosition;w.stepDirection=m.stepDirection;w.periodSpan=m.periodSpan;p=a.selectedGraph;p.id=m.id;p.bcn=w.bcn+"selected-";p.rotate=g;p.chart=b;p.data=c;p.valueAxis=q;p.chart=m.chart;p.categoryAxis=e;p.periodSpan=m.periodSpan;p.valueField=m.valueField;p.openField=m.openField;p.closeField=m.closeField;p.highField=m.highField;p.lowField=m.lowField;p.lineAlpha=a.selectedGraphLineAlpha;p.lineColorR=a.selectedGraphLineColor;p.fillAlphas=a.selectedGraphFillAlpha;p.fillColorsR=a.selectedGraphFillColor;p.connect=m.connect;p.hidden=m.hidden;p.width=k;p.height=l;p.pointPosition=m.pointPosition;p.stepDirection=m.stepDirection;p.periodSpan=m.periodSpan;b=a.graphType;b||(b=m.type);w.type=b;p.type=b;c=c.length-1;w.zoom(0,c);p.zoom(0,c);p.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});w.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});n.push(w.set);n.push(p.set)}n.push(e.set);n.push(e.labelsSet);a.bg.toBack();a.invisibleBg.toFront();a.dragger.toFront();a.iconLeft.toFront();a.iconRight.toFront()}},timeZoom:function(a,b,c){this.startTime=a;this.endTime=b;this.timeDifference=b-a;this.skipEvent=!d.toBoolean(c);this.zoomScrollbar();this.dispatchScrollbarEvent()},zoom:function(a,b){this.start=a;this.end=b;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.categoryAxis&&"ValueAxis"==this.categoryAxis.cname)d.ChartScrollbar.base.dispatchScrollbarEvent.call(this);else if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart.chartData,b,c,e=this.dragger.getBBox();b=e.x;var g=e.y,f=e.width,e=e.height,h=this.chart;this.rotate?(b=g,c=e):c=f;f={type:"zoomed",target:this};f.chart=h;var k=this.categoryAxis,l=this.stepWidth,e=h.minSelectedTime,m=h.maxSelectedTime,g=!1;if(k.parseDates&&!k.equalSpacing){if(a=h.lastTime,h=h.firstTime,k=Math.round(b/l)+h,b=this.dragging?k+this.timeDifference:M
327ath.round((b+c)/l)+h,k>b&&(k=b),0<e&&b-k<e&&(b=Math.round(k+(b-k)/2),g=Math.round(e/2),k=b-g,b+=g,g=!0),0<m&&b-k>m&&(b=Math.round(k+(b-k)/2),g=Math.round(m/2),k=b-g,b+=g,g=!0),b>a&&(b=a),b-e<k&&(k=b-e),k<h&&(k=h),k+e>b&&(b=k+e),k!=this.startTime||b!=this.endTime)this.startTime=k,this.endTime=b,f.start=k,f.end=b,f.startDate=new Date(k),f.endDate=new Date(b),this.fire(f)}else{m=l/2;k.startOnAxis||(b+=m,c-=m);e=k.xToIndex(b);k.startOnAxis||(b=k.getCoordinate(e)-m);b=k.xToIndex(b+c);if(e!=this.start||this.end!=b)k.startOnAxis&&(this.resizingRight&&e==b&&b++,this.resizingLeft&&e==b&&(0<e?e--:b=1)),b==a.length&&(b=a.length-1),e==b&&b==a.length-1&&(e=b-1),this.start=e,this.end=this.dragging?this.start+this.difference:b,f.start=this.start,f.end=this.end,k.parseDates&&(a[this.start]&&(f.startDate=new Date(a[this.start].time)),a[this.end]&&(f.endDate=new Date(a[this.end].time))),this.fire(f);this.percentStart=e;this.percentEnd=b}g&&this.zoomScrollbar(!0)}},zoomScrollbar:function(a){if((!(this.dragging||this.resizingLeft||this.resizingRight||this.animating)||a)&&this.dragger&&this.enabled){var b,c,d=this.chart;a=d.chartData;var g=this.categoryAxis;g.parseDates&&!g.equalSpacing?(a=g.stepWidth,c=d.firstTime,b=a*(this.startTime-c),c=a*(this.endTime-c)):(a[this.start]&&(b=a[this.start].x[g.id]),a[this.end]&&(c=a[this.end].x[g.id]),a=g.stepWidth,g.startOnAxis||(d=a/2,b-=d,c+=d));this.stepWidth=a;isNaN(b)||isNaN(c)||this.updateScrollbarSize(b,c)}},maskGraphs:function(a,b,c,d){var g=this.selectedGraph;g&&g.set.clipRect(a,b,c,d)},handleDragStart:function(){d.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){d.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}})})();(function(){var d=window.AmCharts;d.AmBalloon=d.Class({construct:function(a){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!0;this.offsetY=6;this.offsetX=1;this.textAlign="center";this.disableMouseEvents=!0;this.deltaSignX=this.deltaSignY=1;d.isModern||(this.offsetY*=1.5);this.sdy=this.sdx=0;d.applyTheme(this,a,this.cname)},draw:function(){var a=this.pointToX,b=this.pointToY;d.isModern||(this.drop=!1);var c=this.chart;d.VML&&(this.fadeOutDuration=0);this.xAnim&&c.stopAnim(this.xAnim);this.yAnim&&c.stopAnim(this.yAnim);this.sdy=this.sdx=0;if(!isNaN(a)){var e=this.follow,g=c.container,f=this.set;d.remove(f);this.removeDiv();f=g.set();f.node.style.pointerEvents="none";this.set=f;this.mainSet?(this.mainSet.push(this.set),this.sdx=this.mainSet.x,this.sdy=this.mainSet.y):c.balloonsSet.push(f);if(this.show){var h=this.l,k=this.t,l=this.r,m=this.b,n=this.balloonColor,q=this.fillColor,p=this.borderColor,t=q;void 0!=n&&(this.adjustBorderColor?t=p=n:q=n);var r=this.horizontalPadding,w=this.verticalPadding,z=this.pointerWidth,x=this.pointerOrientation,u=this.cornerRadius,A=c.fontFamily,y=this.fontSize;void 0==y&&(y=c.fontSize);var n=document.createElement("div"),B=c.classNamePrefix;n.className=B+"-balloon-div";this.className&&(n.className=n.className+" "+B+"-balloon-div-"+this.className);B=n.style;this.disableMouseEvents&&(B.pointerEvents="none");B.position="absolute";var D=this.minWidth,C=document.createElement("div");n.appendChild(C);var I=C.style;isNaN(D)||(I.minWidth=D-2*r+"px");I.textAlign=this.textAlign;I.maxWidth=this.maxWidth+"px";I.fontSize=y+"px";I.color=this.color;I.fontFamily=A;C.innerHTML=this.text;c.chartDiv.appendChild(n);this.textDiv=n;var I=n.offsetWidth,H=n.offsetHeight;n.clientHeight&&(I=n.clientWidth,H=n.clientHeight);A=H+2*w;C=I+2*r;!isNaN(D)&&C<D&&(C=D);window.opera&&(A+=2);var Q=!1,y=this.offsetY;c.handDrawn&&(y+=c.handDrawScatter+2);"H"!=x?(D=a-C/2,b<k+A+10&&"down"!=x?(Q=!0,e&&(b+=y),y=b+z,this.deltaSignY=-1):(e&&(b-=y),y=b-A-z,this.deltaSignY=1)):(2*z>A&&(z=A/2),y=b-A/2,a<h+(l-h)/2?(D=a+z,this.deltaSignX=-1):(D=a-C-z,this.deltaSignX=1));y+A>=m&&(y=m-A);y<k&&(y=k);D<h&&(D=h);D+C>l&&(D=l-C);var k=y+w,m=D+r,M=this.shadowAlpha,P=this.shadowColor,r=this.borderThickness,ia=this.bulletSize,J,w=this.fillAlpha,aa=this.borderAlpha;
327this.showBullet&&(J=d.circle(g,ia,t,w),f.push(J));this.drop?(h=C/1.6,l=0,"V"==x&&(x="down"),"H"==x&&(x="left"),"down"==x&&(D=a+1,y=b-h-h/3),"up"==x&&(l=180,D=a+1,y=b+h+h/3),"left"==x&&(l=270,D=a+h+h/3+2,y=b),"right"==x&&(l=90,D=a-h-h/3+2,y=b),k=y-H/2+1,m=D-I/2-1,q=d.drop(g,h,l,q,w,r,p,aa)):0<u||0===z?(0<M&&(a=d.rect(g,C,A,q,0,r+1,P,M,u),d.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),q=d.rect(g,C,A,q,w,r,p,aa,u)):(t=[],u=[],"H"!=x?(h=a-D,h>C-z&&(h=C-z),h<z&&(h=z),t=[0,h-z,a-D,h+z,C,C,0,0],u=Q?[0,0,b-y,0,0,A,A,0]:[A,A,b-y,A,A,0,0,A]):(x=b-y,x>A-z&&(x=A-z),x<z&&(x=z),u=[0,x-z,b-y,x+z,A,A,0,0],t=a<h+(l-h)/2?[0,0,D<a?0:a-D,0,0,C,C,0]:[C,C,D+C>a?C:a-D,C,C,0,0,C]),0<M&&(a=d.polygon(g,t,u,q,0,r,P,M),a.translate(1,1),f.push(a)),q=d.polygon(g,t,u,q,w,r,p,aa));this.bg=q;f.push(q);q.toFront();d.setCN(c,q,"balloon-bg");this.className&&d.setCN(c,q,"balloon-bg-"+this.className);g=1*this.deltaSignX;m+=this.sdx;k+=this.sdy;B.left=m+"px";B.top=k+"px";f.translate(D-g,y,1,!0);q=q.getBBox();this.bottom=y+A+1;this.yPos=q.y+y;J&&J.translate(this.pointToX-D+g,b-y);b=this.animationDuration;0<this.animationDuration&&!e&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY,NaN,!0),f.animate({translate:D-g+","+y},b,"easeOutSine"),n&&(B.left=this.prevTX+"px",B.top=this.prevTY+"px",this.xAnim=c.animate({node:n},"left",this.prevTX,m,b,"easeOutSine","px"),this.yAnim=c.animate({node:n},"top",this.prevTY,k,b,"easeOutSine","px")));this.prevX=D-g;this.prevY=y;this.prevTX=m;this.prevTY=k}}},fixPrevious:function(){this.rPrevX=this.prevX;this.rPrevY=this.prevY;this.rPrevTX=this.prevTX;this.rPrevTY=this.prevTY},restorePrevious:function(){this.prevX=this.rPrevX;this.prevY=this.rPrevY;this.prevTX=this.rPrevTX;this.prevTY=this.rPrevTY},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX-this.sdx,b=this.chart.mouseY-this.sdy;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var d=c.getBBox(),a=a-d.width/2,g=b-d.height-10;a<this.l&&(a=this.l);a>this.r-d.width&&(a=this.r-d.width);g<this.t&&(g=b+10);c.translate(a,g);b=this.textDiv.style;b.left=a+this.horizontalPadding+"px";b.top=g+this.verticalPadding+"px"}}}},changeColor:function(a){this.balloonColor=a},setBounds:function(a,b,c,d){this.l=a;this.t=b;this.r=c;this.b=d;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(a){if(this.text!=a||this.positionChanged)this.text=a,this.isHiding=!1,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),a=this.chart,this.fadeAnim1&&a.stopAnim(this.fadeAnim1),this.fadeAnim2&&a.stopAnim(this.fadeAnim2),this.draw(),this.positionChanged=!1},hide:function(a){var b=this;b.text=void 0;isNaN(a)&&(a=b.fadeOutDuration);var c=b.chart;if(0<a&&!b.isHiding){b.isHiding=!0;b.destroyTO&&clearTimeout(b.destroyTO);b.destroyTO=setTimeout(function(){b.destroy.call(b)},1E3*a);b.follow=!1;b.show=!1;var d=b.set;d&&(d.setAttr("opacity",b.fillAlpha),b.fadeAnim1=d.animate({opacity:0}
327,a,"easeInSine"));b.textDiv&&(b.fadeAnim2=c.animate({node:b.textDiv},"opacity",1,0,a,"easeInSine",""))}else b.show=!1,b.follow=!1,b.destroy()},setPosition:function(a,b){if(a!=this.pointToX||b!=this.pointToY)this.previousX=this.pointToX,this.previousY=this.pointToY,this.pointToX=a,this.pointToY=b,this.positionChanged=!0},followCursor:function(a){var b=this;b.follow=a;clearInterval(b.interval);var c=b.chart.mouseX-b.sdx,d=b.chart.mouseY-b.sdy;!isNaN(c)&&a&&(b.pointToX=c-b.offsetX*b.deltaSignX,b.pointToY=d,b.followMouse(),b.interval=setInterval(function(){b.followMouse.call(b)},40))},removeDiv:function(){if(this.textDiv){var a=this.textDiv.parentNode;a&&a.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);d.remove(this.set);this.removeDiv();this.set=null}})})();(function(){var d=window.AmCharts;d.AmCoordinateChart=d.Class({inherits:d.AmChart,construct:function(a){d.AmCoordinateChart.base.construct.call(this,a);this.theme=a;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;d.applyTheme(this,a,"AmCoordinateChart")},initChart:function(){d.AmCoordinateChart.base.initChart.call(this);this.drawGraphs=!0;var a=this.categoryAxis;a&&(this.categoryAxis=d.processObject(a,d.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();d.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&(this.gridSet.toFront(),this.bulletSet.toFront(),this.balloonsSet.toFront())},createValueAxes:function(){if(0===this.valueAxes.length){var a=new d.ValueAxis;this.addValueAxis(a)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(a){this.chartData=[];if(a)if(0<this.processTimeout){1>this.processCount&&(this.processCount=1);var b=a.length/this.processCount;this.parseCount=Math.ceil(b)-1;for(var c=0;c<b;c++)this.delayParseSerialData(a,c)}else this.parseCount=0,this.parsePartSerialData(a,0,a.length,0);else this.onDataUpdated()},delayParseSerialData:function(a,b){var c=this,d=c.processCount;setTimeout(function(){c.parsePartSerialData.call(c,a,b*d,(b+1)*d,b)},c.processTimeout)},parsePartSerialData:function(a,b,c,e){c>a.length&&(c=a.length);var g=this.graphs,f={},h=this.seriesIdField;h||(h=this.categoryField);var k=!1,l,m=this.categoryAxis,n,q,p;m&&(k=m.parseDates,n=m.forceShowField,p=m.classNameField,q=m.labelColorField,l=m.categoryFunction);var t,r,w={},z;k&&(t=d.extractPeriod(m.minPeriod),r=t.period,t=t.count,z=d.getPeriodDuration(r,t));var x={};this.lookupTable=x;var u,A=this.dataDateFormat,y={};for(u=b;u<c;u++){var B={},D=a[u];b=D[this.categoryField];B.dataContext=D;B.category=l?l(b,D,m):String(b);n&&(B.forceShow=D[n]);p&&(B.className=D[p]);q&&(B.labelColor=D[q]);x[D[h]]=B;if(k&&(m.categoryFunction?b=m.categoryFunction(b,D,m):(!A||b instanceof Date||(b=b.toString()+" |"),b=d.getDate(b,A,m.minPeriod)),b=d.resetDateToMin(b,r,t,m.firstDayOfWeek),B.category=b,B.time=b.getTime(),isNaN(B.time)))continue;var C=this.valueAxes;B.axes={};B.x={};var I;for(I=0;I<C.length;I++){var H=C[I].id;B.axes[H]={};B.axes[H].graphs={};var Q;for(Q=0;Q<g.length;Q++){b=g[Q];var M=b.id,P=1.1;isNaN(b.gapPeriod)||(P=b.gapPeriod);var ia=b.periodValue;if(b.valueAxis.id==H){B.axes[H].graphs[M]={};var J={};J.index=u;var aa=D;b.dataProvider&&(aa=f);J.values=this.processValues(aa,b,ia);if(!b.connect||b.forceGap&&!isNaN(b.gapPeriod))if(y&&y[M]&&0<P&&B.time-w[M]>=z*P&&(y[M].gap=!0),b.forceGap){var P=0,ma;for(ma in J.values)P++;0<P&&(w[M]=B.time,y[M]=J)}else w[M]=B.time,y[M]=J;this.processFields(b,J,aa);J.category=B.category;J.serialDataItem=B;J.graph=b;B.axes[H].graphs[M]=J}}}this.chartData[u]=B}if(this.parseCount==e){for(a=0;a<g.length;a++)b=g[a],b.dataProvider&&this.parseGraphData(b);this.dataChanged=!1;this.dispatchDataUpdated=!0;this.onDataUpdated()}},processValues:function(a,b,c){var e={},g,f=!1;"candlestick"!=b.type&&"ohlc"!=b.type||""===c||(f=!0);for(var h="value error open close low high".split(" "),k=0;k<h.length;k++){var l=h[k];"value"!=l&&"error"!=l&&f&&(c=l.charAt(0).toUpperCase()+l.slice(1));var m=a[b[l+"Field"]+c];null!==m&&(g=Number(m),isNaN(g)||(e[l]=g),"date"==b.valueAxis.type&&void 0!==m&&(g=d.getDate(m,b.chart.dataDateFormat),e[l]=g.getTime()))}return e},parseGraphData:function(a){var b=a.dataProvider,c=a.seriesIdField;c||(c=this.seriesIdField);c||(c=this.categoryField);var d;for(d=0;d<b.length;d++){var g=b[d],f=this.lookupTable[String(g[c])],h=a.valueAxis.id;f&&(h=f.axes[h].graphs[a.id],h.serialDataItem=f,h.values=this.processValues(g,a,a.periodValue),this.processFields(a,h,g))}},addValueAxis:function(a){a.chart=this;this.valueAxes.push(a);this.validateData()},removeValueAxesAndGraphs:function(){var a=this.valueAxes,b;for(b=a.length-1;-1<b;b--)this.removeValueAxis(a[b])},removeValueAxis:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--){var d=b[c];d&&d.valueAxis==a&&this.removeGraph(d)}b=this.valueAxes;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);this.validateData()},addGraph:function(a){this.graphs.push(a);this.chooseGraphColor(a,this.graphs.length-1);this.validateData()},removeGraph:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&(b.splice(c,1),a.destroy());this.validateData()},handleValueAxisZoom:function(){},processValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;
327b++){var c=a[b],c=d.processObject(c,d.ValueAxis,this.theme);a[b]=c;c.chart=this;c.init();this.listenTo(c,"axisIntZoomed",this.handleValueAxisZoom);c.id||(c.id="valueAxisAuto"+b+"_"+(new Date).getTime());void 0===c.usePrefixes&&(c.usePrefixes=this.usePrefixes)}},processGuides:function(){var a=this.guides,b=this.categoryAxis;if(a)for(var c=0;c<a.length;c++){var e=a[c];(void 0!==e.category||void 0!==e.date)&&b&&b.addGuide(e);e.id||(e.id="guideAuto"+c+"_"+(new Date).getTime());var g=e.valueAxis;g?(d.isString(g)&&(g=this.getValueAxisById(g)),g?g.addGuide(e):this.valueAxes[0].addGuide(e)):isNaN(e.value)||this.valueAxes[0].addGuide(e)}},processGraphs:function(){var a=this.graphs,b;this.graphsById={};for(b=0;b<a.length;b++){var c=a[b],c=d.processObject(c,d.AmGraph,this.theme);a[b]=c;this.chooseGraphColor(c,b);c.chart=this;c.init();d.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.id||(c.id="graphAuto"+b+"_"+(new Date).getTime());this.graphsById[c.id]=c}},formatString:function(a,b,c){var e=b.graph,g=e.valueAxis;if(g.duration&&g.maxInterval&&b.values.value){var f=g.numberFormatter;f||(f=chart.nf);g=d.formatDuration(b.values.value,g.duration,"",g.durationUnits,g.maxInterval,f);a=a.split("[[value]]").join(g)}a=d.massReplace(a,{"[[title]]":e.title,"[[description]]":b.description});a=c?d.fixNewLines(a):d.fixBrakes(a);return a=d.cleanFromEmpty(a)},getBalloonColor:function(a,b,c){var e=a.lineColor,g=a.balloonColor;c&&(g=e);c=a.fillColorsR;"object"==typeof c?e=c[0]:void 0!==c&&(e=c);b.isNegative&&(c=a.negativeLineColor,a=a.negativeFillColors,"object"==typeof a?c=a[0]:void 0!==a&&(c=a),void 0!==c&&(e=c));void 0!==b.color&&(e=b.color);void 0!==b.lineColor&&(e=b.lineColor);b=b.fillColors;void 0!==b&&(e=b,d.ifArray(b)&&(e=b[0]));void 0===g&&(g=e);return g},getGraphById:function(a){return d.getObjById(this.graphs,a)},getValueAxisById:function(a){return d.getObjById(this.valueAxes,a)},processFields:function(a,b,c){if(a.itemColors){var e=a.itemColors,g=b.index;b.color=g<e.length?e[g]:d.randomColor()}e="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className columnIndex".split(" ");for(g=0;g<e.length;g++){var f=e[g],h=a[f+"Field"];h&&(h=c[h],d.isDefined(h)&&(b[f]=h))}b.dataContext=c},chooseGraphColor:function(a,b){if(a.lineColor)a.lineColorR=a.lineColor;else{var c;c=this.colors.length>b?this.colors[b]:a.lineColorR?a.lineColorR:d.randomColor();a.lineColorR=c}a.fillColorsR=a.fillColors?a.fillColors:a.lineColorR;a.bulletBorderColorR=a.bulletBorderColor?a.bulletBorderColor:a.useLineColorForBulletBorder?a.lineColorR:a.bulletColor;a.bulletColorR=a.bulletColor?a.bulletColor:a.lineColorR;if(c=this.patterns)a.pattern=c[b]},handleLegendEvent:function(a){var b=a.type;if(a=a.dataItem){var c=a.hidden,d=a.showBalloon;switch(b){case"clickMarker":this.textClickEnabled&&(d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a));break;case"clickLabel":d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a);break;case"rollOverItem":c||this.highlightGraph(a);break;case"rollOutItem":c||this.unhighlightGraph();break;case"hideItem":this.hideGraph(a);break;case"showItem":this.showGraph(a)}}},highlightGraph:function(a){var b=this.graphs;if(b){var c,d=.2;this.legend&&(d=this.legend.rollOverGraphAlpha);if(1!=d)for(c=0;c<b.length;c++){var g=b[c];g!=a&&g.changeOpacity(d)}}},unhighlightGraph:function(){var a;this.legend&&(a=this.legend.rollOverGraphAlpha);if(1!=a){a=this.graphs;var b;for(b=0;b<a.length;b++)a[b].changeOpacity(1)}},showGraph:function(a){a.switchable&&(a.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(a){a.switchable&&(this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),a.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(a){a.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(a){a.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){this.animatable=[];var a=this.graphs;
327if(a){var b;for(b=0;b<a.length;b++)a[b].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}})})();(function(){var d=window.AmCharts;d.TrendLine=d.Class({construct:function(a){this.cname="TrendLine";this.createEvents("click","rollOver","rollOut");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;d.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.destroy();var b=a.chart,c=b.container,e,g,f,h,k=a.categoryAxis,l=a.initialDate,m=a.initialCategory,n=a.finalDate,q=a.finalCategory,p=a.valueAxis,t=a.valueAxisX,r=a.initialXValue,w=a.finalXValue,z=a.initialValue,x=a.finalValue,u=p.recalculateToPercents,A=b.dataDateFormat;k&&(l&&(l=d.getDate(l,A,"fff"),a.initialDate=l,e=k.dateToCoordinate(l)),m&&(e=k.categoryToCoordinate(m)),n&&(n=d.getDate(n,A,"fff"),a.finalDate=n,g=k.dateToCoordinate(n)),q&&(g=k.categoryToCoordinate(q)));t&&!u&&(isNaN(r)||(e=t.getCoordinate(r)),isNaN(w)||(g=t.getCoordinate(w)));p&&!u&&(isNaN(z)||(f=p.getCoordinate(z)),isNaN(x)||(h=p.getCoordinate(x)));if(!(isNaN(e)||isNaN(g)||isNaN(f)||isNaN(f))){b.rotate?(k=[f,h],h=[e,g]):(k=[e,g],h=[f,h]);f=d.line(c,k,h,a.lineColor,a.lineAlpha,a.lineThickness,a.dashLength);e=k;g=h;n=k[1]-k[0];q=h[1]-h[0];0===n&&(n=.01);0===q&&(q=.01);l=n/Math.abs(n);m=q/Math.abs(q);q=90*Math.PI/180-Math.asin(n/(n*q/Math.abs(n*q)*Math.sqrt(Math.pow(n,2)+Math.pow(q,2))));n=Math.abs(5*Math.cos(q));q=Math.abs(5*Math.sin(q));e.push(k[1]-l*q,k[0]-l*q);g.push(h[1]+m*n,h[0]+m*n);h=d.polygon(c,e,g,"#ffffff",.005,0);c=c.set([h,f]);c.translate(b.marginLeftReal,b.marginTopReal);b.trendLinesSet.push(c);d.setCN(b,f,"trend-line");d.setCN(b,f,"trend-line-"+a.id);a.line=f;a.set=c;if(f=a.initialImage)f=d.processObject(f,d.Image,a.theme),f.chart=b,f.draw(),f.translate(e[0]+f.offsetX,g[0]+f.offsetY),c.push(f.set);if(f=a.finalImage)f=d.processObject(f,d.Image,a.theme),f.chart=b,f.draw(),f.translate(e[1]+f.offsetX,g[1]+f.offsetY),c.push(f.set);c.mouseup(function(){a.handleLineClick()}).mouseover(function(){a.handleLineOver()}).mouseout(function(){a.handleLineOut()});c.touchend&&c.touchend(function(){a.handleLineClick()});c.clipRect(0,0,b.plotAreaWidth,b.plotAreaHeight)}},handleLineClick:function(){this.fire({type:"click",trendLine:this,chart:this.chart})},handleLineOver:function(){var a=this.rollOverColor;void 0!==a&&this.line.attr({stroke:a});this.balloonText&&(clearTimeout(this.chart.hoverInt),a=this.line.getBBox(),this.chart.showBalloon(this.balloonText,this.lineColor,!0,this.x+a.x+a.width/2,this.y+a.y+a.height/2));this.fire({type:"rollOver",trendLine:this,chart:this.chart})},handleLineOut:function(){this.line.attr({stroke:this.lineColor});this.balloonText&&this.chart.hideBalloon();this.fire({type:"rollOut",trendLine:this,chart:this.chart})},destroy:function(){d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.Image=d.Class({construct:function(a){this.cname="Image";this.height=this.width=20;this.rotation=this.offsetY=this.offsetX=0;this.balloonColor=this.color="#000000";this.opacity=1;d.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.set&&a.set.remove();var b=a.chart.container;a.set=b.set();var c,d;a.url?(c=b.image(a.url,0,0,a.width,a.height),d=1):a.svgPath&&(c=b.path(a.svgPath),c.setAttr("fill",a.color),c.setAttr("stroke",a.outlineColor),b=c.getBBox(),d=Math.min(a.width/b.width,a.height/b.height));c&&(c.setAttr("opacity",a.opacity),a.set.rotate(a.rotation),c.translate(-a.width/2,-a.height/2,d),a.balloonText&&c.mouseover(function(){a.chart.showBalloon(a.balloonText,a.balloonColor,!0)}).mouseout(function(){a.chart.hideBalloon()}).touchend(function(){a.chart.hideBalloon()}).touchstart(function(){a.chart.showBalloon(a.balloonText,a.balloonColor,!0)}),a.set.push(c))},translate:function(a,b){this.set&&this.set.translate(a,b)}})})();(function(){var d=window.AmCharts;d.circle=function(a,b,c,e,g,f,h,k,l){0>=b&&(b=.001);if(void 0==g||0===g)g=.01;void 0===f&&(f="#000000");void 0===h&&(h=0);e={fill:c,stroke:f,"fill-opacity":e,"stroke-width":g,"stroke-opacity":h};a=isNaN(l)?a.circle(0,0,b).attr(e):a.ellipse(0,0,b,l).attr(e);k&&a.gradient("radialGradient",[c,d.adjustLuminosity(c,-.6)]);return a};d.text=function(a,b,c,e,g,f,h,k){f||(f="middle");"right"==f&&(f="end");"left"==f&&(f="start");isNaN(k)&&(k=1);void 0!==b&&(b=String(b),d.isIE&&!d.isModern&&(b=b.replace("&","&"),b=b.replace("&","&")));c={fill:c,"font-family":e,"font-size":g+"px",opacity:k};!0===h&&(c["font-weight"]="bold");c["text-anchor"]=f;return a.text(b,c)};d.polygon=function(a,b,c,e,g,f,h,k,l,m,n){isNaN(f)&&(f=.01);isNaN(k)&&(k=g);var q=e,p=!1;"object"==typeof q&&1<q.length&&(p=!0,q=q[0]);void 0===h&&(h=q);g={fill:q,stroke:h,"fill-opacity":g,"stroke-width":f,"stroke-opacity":k};void 0!==n&&0<n&&(g["stroke-dasharray"]=n);n=d.dx;f=d.dy;a.handDrawn&&(c=d.makeHD(b,c,a.handDrawScatter),b=c[0],c=c[1]);h=Math.round;m&&(h=Number);k="M"+(h(b[0])+n)+","+(h(c[0])+f);for(q=1;q<b.length;q++)m&&(b[q]=d.roundTo(b[q],5),c[q]=d.roundTo(c[q],5)),k+=" L"+(h(b[q])+n)+","+(h(c[q])+f);a=a.path(k+" Z").attr(g);p&&a.gradient("linearGradient",e,l);return a};d.rect=function(a,b,c,e,g,f,h,k,l,m,n){if(isNaN(b)||isNaN(c))return a.set();isNaN(f)&&(f=0);void 0===l&&(l=0);void 0===m&&(m=270);isNaN(g)&&(g=0);var q=e,p=!1;"object"==typeof q&&(q=q[0],p=!0);void 0===h&&(h=q);void 0===k&&(k=g);b=Math.round(b);c=Math.round(c);var t=0,r=0;0>b&&(b=Math.abs(b),t=-b);0>c&&(c=Math.abs(c),r=-c);t+=d.dx;r+=d.dy;g={fill:q,stroke:h,"fill-opacity":g,"stroke-opacity":k};void 0!==n&&0<n&&(g["stroke-dasharray"]=n);a=a.rect(t,r,b,c,l,f).attr(g);p&&a.gradient("linearGradient",e,m);return a};d.bullet=function(a,b,c,e,g,f,h,k,l,m,n,q,p){var t;"circle"==b&&(b="round");switch(b){case"round":t=d.circle(a,c/2,e,g,f,h,k);break;case"square":t=d.polygon(a,[-c/2,c/2,c/2,-c/2],[c/2,c/2,-c/2,-c/2],e,g,f,h,k,m-180,void 0,p);break;
327case"rectangle":t=d.polygon(a,[-c,c,c,-c],[c/2,c/2,-c/2,-c/2],e,g,f,h,k,m-180,void 0,p);break;case"diamond":t=d.polygon(a,[-c/2,0,c/2,0],[0,-c/2,0,c/2],e,g,f,h,k);break;case"triangleUp":t=d.triangle(a,c,0,e,g,f,h,k);break;case"triangleDown":t=d.triangle(a,c,180,e,g,f,h,k);break;case"triangleLeft":t=d.triangle(a,c,270,e,g,f,h,k);break;case"triangleRight":t=d.triangle(a,c,90,e,g,f,h,k);break;case"bubble":t=d.circle(a,c/2,e,g,f,h,k,!0);break;case"line":t=d.line(a,[-c/2,c/2],[0,0],e,g,f,h,k);break;case"yError":t=a.set();t.push(d.line(a,[0,0],[-c/2,c/2],e,g,f));t.push(d.line(a,[-l,l],[-c/2,-c/2],e,g,f));t.push(d.line(a,[-l,l],[c/2,c/2],e,g,f));break;case"xError":t=a.set(),t.push(d.line(a,[-c/2,c/2],[0,0],e,g,f)),t.push(d.line(a,[-c/2,-c/2],[-l,l],e,g,f)),t.push(d.line(a,[c/2,c/2],[-l,l],e,g,f))}t&&t.pattern(n,NaN,q);return t};d.triangle=function(a,b,c,d,g,f,h,k){if(void 0===f||0===f)f=1;void 0===h&&(h="#000");void 0===k&&(k=0);d={fill:d,stroke:h,"fill-opacity":g,"stroke-width":f,"stroke-opacity":k};b/=2;var l;0===c&&(l=" M"+-b+","+b+" L0,"+-b+" L"+b+","+b+" Z");180==c&&(l=" M"+-b+","+-b+" L0,"+b+" L"+b+","+-b+" Z");90==c&&(l=" M"+-b+","+-b+" L"+b+",0 L"+-b+","+b+" Z");270==c&&(l=" M"+-b+",0 L"+b+","+b+" L"+b+","+-b+" Z");return a.path(l).attr(d)};d.line=function(a,b,c,e,g,f,h,k,l,m,n){if(a.handDrawn&&!n)return d.handDrawnLine(a,b,c,e,g,f,h,k,l,m,n);f={fill:"none","stroke-width":f};void 0!==h&&0<h&&(f["stroke-dasharray"]=h);isNaN(g)||(f["stroke-opacity"]=g);e&&(f.stroke=e);e=Math.round;m&&(e=Number,b[0]=d.roundTo(b[0],5),c[0]=d.roundTo(c[0],5));m=d.dx;g=d.dy;h="M"+(e(b[0])+m)+","+(e(c[0])+g);for(k=1;k<b.length;k++)b[k]=d.roundTo(b[k],5),c[k]=d.roundTo(c[k],5),h+=" L"+(e(b[k])+m)+","+(e(c[k])+g);if(d.VML)return a.path(h,void 0,!0).attr(f);l&&(h+=" M0,0 L0,0");return a.path(h).attr(f)};d.makeHD=function(a,b,c){for(var d=[],g=[],f=1;f<a.length;f++)for(var h=Number(a[f-1]),k=Number(b[f-1]),l=Number(a[f]),m=Number(b[f]),n=Math.round(Math.sqrt(Math.pow(l- 328h,2)+Math.pow(m-k,2))/50)+1,l=(l-h)/n,m=(m-k)/n,q=0;q<=n;q++){var p=k+q*m+Math.random()*c;d.push(h+q*l+Math.random()*c);g.push(p)}return[d,g]};d.handDrawnLine=function(a,b,c,e,g,f,h,k,l,m){var n,q=a.set();for(n=1;n<b.length;n++)for(var p=[b[n-1],b[n]],t=[c[n-1],c[n]],t=d.makeHD(p,t,a.handDrawScatter),p=t[0],t=t[1],r=1;r<p.length;r++)q.push(d.line(a,[p[r-1],p[r]],[t[r-1],t[r]],e,g,f+Math.random()*a.handDrawThickness-a.handDrawThickness/2,h,k,l,m,!0));return q};d.doNothing=function(a){return a};d.drop=function(a,b,c,d,g,f,h,k){var l=1/180*Math.PI,m=c-20,n=Math.sin(m*l)*b,q=Math.cos(m*l)*b,p=Math.sin((m+40)*l)*b,t=Math.cos((m+40)*l)*b,r=.8*b,w=-b/3,z=b/3;0===c&&(w=-w,z=0);180==c&&(z=0);90==c&&(w=0);270==c&&(w=0,z=-z);c={fill:d,stroke:h,"stroke-width":f,"stroke-opacity":k,"fill-opacity":g};b="M"+n+","+q+" A"+b+","+b+",0,1,1,"+p+","+t+(" A"+r+","+r+",0,0,0,"+(Math.sin((m+20)*l)*b+z)+","+(Math.cos((m+20)*l)*b+w));b+=" A"+r+","+r+",0,0,0,"+n+","+q;return a.path(b,void 0,void 0,"1000,1000").attr(c)};d.wedge=function(a,b,c,e,g,f,h,k,l,m,n,q,p,t){var r=Math.round;f=r(f);h=r(h);k=r(k);var w=r(h/f*k),z=d.VML,x=359.5+f/100;359.94<x&&(x=359.94);g>=x&&(g=x);var u=1/180*Math.PI,x=b+Math.sin(e*u)*k,A=c-Math.cos(e*u)*w,y=b+Math.sin(e*u)*f,B=c-Math.cos(e*u)*h,D=b+Math.sin((e+g)*u)*f,C=c-Math.cos((e+g)*u)*h,I=b+Math.sin((e+g)*u)*k,u=c-Math.cos((e+g)*u)*w,H={fill:d.adjustLuminosity(m.fill,-.2),"stroke-opacity":0,"fill-opacity":m["fill-opacity"]},Q=0;180<Math.abs(g)&&(Q=1);e=a.set();var M;z&&(x=r(10*x),y=r(10*y),D=r(10*D),I=r(10*I),A=r(10*A),B=r(10*B),C=r(10*C),u=r(10*u),b=r(10*b),l=r(10*l),c=r(10*c),f*=10,h*=10,k*=10,w*=10,1>Math.abs(g)&&1>=Math.abs(D-y)&&1>=Math.abs(C-B)&&(M=!0));g="";var P;q&&(H["fill-opacity"]=0,H["stroke-opacity"]=m["stroke-opacity"]/2,H.stroke=m.stroke);if(0<l){P=" M"+x+","+(A+l)+" L"+y+","+(B+l);z?(M||(P+=" A"+(b-f)+","+(l+c-h)+","+(b+f)+","+(l+c+h)+","+y+","+(B+l)+","+D+","+(C+l)),P+=" L"+I+","+(u+l),0<k&&(M||(P+=" B"+(b-k)+","+(l+c-w)+","+(b+k)+","+(l+c+w)+","+I+","+(l+u)+","+x+","+(l+A)))):(P+=" A"+f+","+h+",0,"+Q+",1,"+D+","+(C+l)+" L"+I+","+(u+l),0<k&&(P+=" A"+k+","+w+",0,"+Q+",0,"+x+","+(A+l)));P+=" Z";var ia=l;z&&(ia/=10);for(var J=0;J<ia;J+=10){var aa=a.path(P,void 0,void 0,"1000,1000").attr(H);e.push(aa);aa.translate(0,-J)}P=a.path(" M"+x+","+A+" L"+x+","+(A+l)+" L"+y+","+(B+l)+" L"+y+","+B+" L"+x+","+A+" Z",void 0,void 0,"1000,1000").attr(H);l=a.path(" M"+D+","+C+" L"+D+","+(C+l)+" L"+I+","+(u+l)+" L"+I+","+u+" L"+D+","+C+" Z",void 0,void 0,"1000,1000").attr(H);e.push(P);e.push(l)}z?(M||(g=" A"+r(b-f)+","+r(c-h)+","+r(b+f)+","+r(c+h)+","+r(y)+","+r(B)+","+r(D)+","+r(C)),h=" M"+r(x)+","+r(A)+" L"+r(y)+","+r(B)+g+" L"+r(I)+","+r(u)):h=" M"+x+","+A+" L"+y+","+B+(" A"+f+","+h+",0,"+Q+",1,"+D+","+C)+" L"+I+","+u;0<k&&(z?M||(h+=" B"+(b-k)+","+(c-w)+","+(b+k)+","+(c+w)+","+I+","+u+","+x+","+A):h+=" A"+k+","+w+",0,"+Q+",0,"+x+","+A);a.handDrawn&&(k=d.line(a,[x,y],[A,B],m.stroke,m.thickness*Math.random()*a.handDrawThickness,m["stroke-opacity"]),e.push(k));a=a.path(h+" Z",void 0,void 0,"1000,1000").attr(m);
328if(n){k=[];for(w=0;w<n.length;w++)k.push(d.adjustLuminosity(m.fill,n[w]));"radial"!=t||d.isModern||(k=[]);0<k.length&&a.gradient(t+"Gradient",k)}d.isModern&&"radial"==t&&a.grad&&(a.grad.setAttribute("gradientUnits","userSpaceOnUse"),a.grad.setAttribute("r",f),a.grad.setAttribute("cx",b),a.grad.setAttribute("cy",c));a.pattern(q,NaN,p);e.wedge=a;e.push(a);return e};d.rgb2hex=function(a){return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],10).toString(16)).slice(-2):""};d.adjustLuminosity=function(a,b){a&&-1!=a.indexOf("rgb")&&(a=d.rgb2hex(a));a=String(a).replace(/[^0-9a-f]/gi,"");6>a.length&&(a=String(a[0])+String(a[0])+String(a[1])+String(a[1])+String(a[2])+String(a[2]));b=b||0;var c="#",e,g;for(g=0;3>g;g++)e=parseInt(a.substr(2*g,2),16),e=Math.round(Math.min(Math.max(0,e+e*b),255)).toString(16),c+=("00"+ 329e).substr(e.length);return c}})();(function(){var d=window.AmCharts;d.Bezier=d.Class({construct:function(a,b,c,e,g,f,h,k,l,m,n){var q=a.chart,p=d.bezierX,t=d.bezierY;isNaN(q.bezierX)||(p=q.bezierX);isNaN(q.bezierY)||(t=q.bezierY);isNaN(p)&&(q.rotate?(p=20,t=4):(t=20,p=4));var r,w;"object"==typeof h&&1<h.length&&(w=!0,r=h,h=h[0]);"object"==typeof k&&(k=k[0]);0===k&&(h="none");f={fill:h,"fill-opacity":k,"stroke-width":f};void 0!==l&&0<l&&(f["stroke-dasharray"]=l);isNaN(g)||(f["stroke-opacity"]=g);e&&(f.stroke=e);e="M"+Math.round(b[0])+","+Math.round(c[0])+" ";g=[];for(l=0;l<b.length;l++)isNaN(b[l])||isNaN(c[l])?(e+=this.drawSegment(g,p,t),l<b.length-1&&(e+="L"+b[l+1]+","+c[l+1]+" "),g=[]):g.push({x:Number(b[l]),y:Number(c[l])});e+=this.drawSegment(g,p,t);m&&(e+=m);this.path=a.path(e).attr(f);this.node=this.path.node;w&&this.path.gradient("linearGradient",r,n)},drawSegment:function(a,b,c){var d="";if(2<a.length)for(var g=0;g<a.length-1;g++){var f=[],h=a[g-1],k=a[g],l=a[g+1],m=a[g+2];0===g?(f.push({x:k.x,y:k.y}),f.push({x:k.x,y:k.y}),f.push({x:l.x,y:l.y}),f.push({x:m.x,y:m.y})):g>=a.length-2?(f.push({x:h.x,y:h.y}),f.push({x:k.x,y:k.y}),f.push({x:l.x,y:l.y}),f.push({x:l.x,y:l.y})):(f.push({x:h.x,y:h.y}),f.push({x:k.x,y:k.y}),f.push({x:l.x,y:l.y}),f.push({x:m.x,y:m.y}));h=[];k=Math.round;h.push({x:k(f[1].x),y:k(f[1].y)});h.push({x:k((-f[0].x+b*f[1].x+f[2].x)/b),y:k((-f[0].y+c*f[1].y+f[2].y)/c)});h.push({x:k((f[1].x+b*f[2].x-f[3].x)/b),y:k((f[1].y+c*f[2].y-f[3].y)/c)});h.push({x:k(f[2].x),y:k(f[2].y)});d+="C"+h[1].x+","+h[1].y+","+ 330h[2].x+","+h[2].y+","+h[3].x+","+h[3].y+" "}else 1<a.length&&(d+="L"+a[1].x+","+a[1].y);return d}})})();(function(){var d=window.AmCharts;d.AmDraw=d.Class({construct:function(a,b,c,e){d.SVG_NS="http://www.w3.org/2000/svg";d.SVG_XLINK="http://www.w3.org/1999/xlink";d.hasSVG=!!document.createElementNS&&!!document.createElementNS(d.SVG_NS,"svg").createSVGRect;1>b&&(b=10);1>c&&(c=10);this.div=a;this.width=b;this.height=c;this.rBin=document.createElement("div");d.hasSVG?(d.SVG=!0,b=this.createSvgElement("svg"),a.appendChild(b),this.container=b,this.addDefs(e),this.R=new d.SVGRenderer(this)):d.isIE&&d.VMLRenderer&&(d.VML=!0,d.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(b=document.createStyleSheet(),b.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),d.vmlStyleSheet=b):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=a,this.R=new d.VMLRenderer(this,e),this.R.disableSelection(a))},createSvgElement:function(a){return document.createElementNS(d.SVG_NS,a)},circle:function(a,b,c,e){var g=new d.AmDObject("circle",this);g.attr({r:c,cx:a,cy:b});this.addToContainer(g.node,e);return g},ellipse:function(a,b,c,e,g){var f=new d.AmDObject("ellipse",this);f.attr({rx:c,ry:e,cx:a,cy:b});this.addToContainer(f.node,g);return f},setSize:function(a,b){0<a&&0<b&&(this.container.style.width=a+"px",this.container.style.height=b+"px")},rect:function(a,b,c,e,g,f,h){var k=new d.AmDObject("rect",this);d.VML&&(g=Math.round(100*g/Math.min(c,e)),c+=2*f,e+=2*f,k.bw=f,k.node.style.marginLeft=-f,k.node.style.marginTop=-f);1>c&&(c=1);1>e&&(e=1);k.attr({x:a,y:b,width:c,height:e,rx:g,ry:g,"stroke-width":f});this.addToContainer(k.node,h);return k},image:function(a,b,c,e,g,f){var h=new d.AmDObject("image",this);h.attr({x:b,y:c,width:e,height:g});this.R.path(h,a);this.addToContainer(h.node,f);return h},addToContainer:function(a,b){b||(b=this.container);b.appendChild(a)},text:function(a,b,c){return this.R.text(a,b,c)},path:function(a,b,c,e){var g=new d.AmDObject("path",this);e||(e="100,100");g.attr({cs:e});c?g.attr({dd:a}):g.attr({d:a});
330this.addToContainer(g.node,b);return g},set:function(a){return this.R.set(a)},remove:function(a){if(a){var b=this.rBin;b.appendChild(a);b.innerHTML=""}},renderFix:function(){var a=this.container,b=a.style;b.top="0px";b.left="0px";try{var c=a.getBoundingClientRect(),d=c.left-Math.round(c.left),g=c.top-Math.round(c.top);d&&(b.left=d+"px");g&&(b.top=g+"px")}catch(f){}},update:function(){this.R.update()},addDefs:function(a){if(d.hasSVG){var b=this.createSvgElement("desc"),c=this.container;c.setAttribute("version","1.1");c.style.position="absolute";this.setSize(this.width,this.height);if(a.accessibleTitle){var e=this.createSvgElement("text");c.appendChild(e);e.innerHTML=a.accessibleTitle;e.style.opacity=0}d.rtl&&(c.setAttribute("direction","rtl"),c.style.left="auto",c.style.right="0px");a&&(a.addCodeCredits&&b.appendChild(document.createTextNode("JavaScript chart by amCharts "+a.version)),a.accessibleDescription&&(b.innerHTML="",b.appendChild(document.createTextNode(a.accessibleDescription))),c.appendChild(b),a.defs&&(b=this.createSvgElement("defs"),c.appendChild(b),d.parseDefs(a.defs,b),this.defs=b))}}})})();(function(){var d=window.AmCharts;d.AmDObject=d.Class({construct:function(a,b){this.D=b;this.R=b.R;this.node=this.R.create(this,a);this.y=this.x=0;this.scale=1},attr:function(a){this.R.attr(this,a);return this},getAttr:function(a){return this.node.getAttribute(a)},setAttr:function(a,b){this.R.setAttr(this,a,b);return this},clipRect:function(a,b,c,d){this.R.clipRect(this,a,b,c,d)},translate:function(a,b,c,d){d||(a=Math.round(a),b=Math.round(b));this.R.move(this,a,b,c);this.x=a;this.y=b;this.scale=c;this.angle&&this.rotate(this.angle)},rotate:function(a,b){this.R.rotate(this,a,b);this.angle=a},animate:function(a,b,c){for(var e in a)if(a.hasOwnProperty(e)){var g=e,f=a[e];c=d.getEffect(c);this.R.animate(this,g,f,b,c)}},push:function(a){if(a){var b=this.node;b.appendChild(a.node);var c=a.clipPath;c&&b.appendChild(c);(a=a.grad)&&b.appendChild(a)}},text:function(a){this.R.setText(this,a)},remove:function(){this.stop();this.R.remove(this)},clear:function(){var a=this.node;if(a.hasChildNodes())for(;1<=a.childNodes.length;)a.removeChild(a.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;b&&b.appendChild(a)}},toPrevious:function(){var a=this.node;a&&this.prevNextNode&&(a=a.parentNode)&&a.insertBefore(this.prevNextNode,null)},toBack:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;if(b){var c=b.firstChild;c&&b.insertBefore(a,c)}}},mouseover:function(a){this.R.addListener(this,"mouseover",a);return this},mouseout:function(a){this.R.addListener(this,"mouseout",a);return this},click:function(a){this.R.addListener(this,"click",a);return this},dblclick:function(a){this.R.addListener(this,"dblclick",a);return this},mousedown:function(a){this.R.addListener(this,"mousedown",a);return this},mouseup:function(a){this.R.addListener(this,"mouseup",a);return this},touchmove:function(a){this.R.addListener(this,"touchmove",a);return this},touchstart:function(a){this.R.addListener(this,"touchstart",a);return this},touchend:function(a){this.R.addListener(this,"touchend",a);return this},keyup:function(a){this.R.addListener(this,"keyup",a);return this},focus:function(a){this.R.addListener(this,"focus",a);return this},blur:function(a){this.R.addListener(this,"blur",a);return this},contextmenu:function(a){this.node.addEventListener?this.node.addEventListener("contextmenu",a,!0):this.R.addListener(this,"contextmenu",a);return this},stop:function(){d.removeFromArray(this.R.animations,this.an_translate);d.removeFromArray(this.R.animations,this.an_y);d.removeFromArray(this.R.animations,this.an_x)},length:function(){return this.node.childNodes.length},gradient:function(a,b,c){this.R.gradient(this,a,b,c)},pattern:function(a,b,c){a&&this.R.pattern(this,a,b,c)}})})();(function(){var d=window.AmCharts;d.VMLRenderer=d.Class({construct:function(a,b){this.chart=b;this.D=a;this.cNames={circle:"oval",ellipse:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(a,b){var c;if("group"==b)c=document.createElement("div"),a.type="div";else if("text"==b)c=document.createElement("div"),a.type="text";else if("image"==b)c=document.createElement("img"),a.type="image";else{a.type="shape";a.shapeType=this.cNames[b];c=document.createElement("amvml:"+this.cNames[b]);var d=document.createElement("amvml:stroke");c.appendChild(d);a.stroke=d;var g=document.createElement("amvml:fill");c.appendChild(g);a.fill=g;g.className="amvml";d.className="amvml";c.className="amvml"}c.style.position="absolute";c.style.top=0;c.style.left=0;return c},path:function(a,b){a.node.setAttribute("src",b)},setAttr:function(a,b,c){if(void 0!==c){var e;8===document.documentMode&&(e=!0);var g=a.node,f=a.type,h=g.style;"r"==b&&(h.width=2*c,h.height=2*c);"oval"==a.shapeType&&("rx"==b&&(h.width=2*c),"ry"==b&&(h.height=2*c));"roundrect"==a.shapeType&&("width"!=b&&"height"!=b||--c);"cursor"==b&&(h.cursor=c);"cx"==b&&(h.left=c-d.removePx(h.width)/2);"cy"==b&&(h.top=c-d.removePx(h.height)/2);var k=this.styleMap[b];"width"==k&&0>c&&(c=0);void 0!==k&&(h[k]=c);"text"==f&&("text-anchor"==b&&(a.anchor=c,k=g.clientWidth,"end"==c&&(h.marginLeft=-k+"px"),"middle"==c&&(h.marginLeft=-(k/2)+"px",h.textAlign="center"),"start"==c&&(h.marginLeft="0px")),"fill"==b&&(h.color=c),"font-weight"==b&&(h.fontWeight=c));if(h=a.children)for(k=0;k<h.length;k++)h[k].setAttr(b,c);if("shape"==f){"cs"==b&&(g.style.width="100px",g.style.height="100px",g.setAttribute("coordsize",c));
330"d"==b&&g.setAttribute("path",this.svgPathToVml(c));"dd"==b&&g.setAttribute("path",c);f=a.stroke;a=a.fill;"stroke"==b&&(e?f.color=c:f.setAttribute("color",c));"stroke-width"==b&&(e?f.weight=c:f.setAttribute("weight",c));"stroke-opacity"==b&&(e?f.opacity=c:f.setAttribute("opacity",c));"stroke-dasharray"==b&&(h="solid",0<c&&3>c&&(h="dot"),3<=c&&6>=c&&(h="dash"),6<c&&(h="longdash"),e?f.dashstyle=h:f.setAttribute("dashstyle",h));if("fill-opacity"==b||"opacity"==b)0===c?e?a.on=!1:a.setAttribute("on",!1):e?a.opacity=c:a.setAttribute("opacity",c);"fill"==b&&(e?a.color=c:a.setAttribute("color",c));"rx"==b&&(e?g.arcSize=c+"%":g.setAttribute("arcsize",c+"%"))}}},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},text:function(a,b,c){var e=new d.AmDObject("text",this.D),g=e.node;g.style.whiteSpace="pre";g.innerHTML=a;this.D.addToContainer(g,c);this.attr(e,b);return e},getBBox:function(a){return this.getBox(a.node)},getBox:function(a){var b=a.offsetLeft,c=a.offsetTop,d=a.offsetWidth,g=a.offsetHeight,f;if(a.hasChildNodes()){var h,k,l;for(l=0;l<a.childNodes.length;l++){f=this.getBox(a.childNodes[l]);var m=f.x;isNaN(m)||(isNaN(h)?h=m:m<h&&(h=m));var n=f.y;isNaN(n)||(isNaN(k)?k=n:n<k&&(k=n));m=f.width+m;isNaN(m)||(d=Math.max(d,m));f=f.height+n;isNaN(f)||(g=Math.max(g,f))}0>h&&(b+=h);0>k&&(c+=k)}return{x:b,y:c,width:d,height:g}},setText:function(a,b){var c=a.node;c&&(c.innerHTML=b);this.setAttr(a,"text-anchor",a.anchor)},addListener:function(a,b,c){a.node["on"+b]=c},move:function(a,b,c){var e=a.node,g=e.style;"text"==a.type&&(c-=d.removePx(g.fontSize)/2-1);"oval"==a.shapeType&&(b-=d.removePx(g.width)/2,c-=d.removePx(g.height)/2);a=a.bw;isNaN(a)||(b-=a,c-=a);isNaN(b)||isNaN(c)||(e.style.left=b+"px",e.style.top=c+"px")},svgPathToVml:function(a){var b=a.split(" ");a="";var c,d=Math.round,g;for(g=0;g<b.length;g++){var f=b[g],h=f.substring(0,1),f=f.substring(1),k=f.split(","),l=d(k[0])+","+d(k[1]);"M"==h&&(a+=" m "+l);"L"==h&&(a+=" l "+l);"Z"==h&&(a+=" x e");if("Q"==h){var m=c.length,n=c[m-1],q=k[0],p=k[1],l=k[2],t=k[3];c=d(c[m-2]/3+2/3*q);n=d(n/3+2/3*p);q=d(2/3*q+l/3);p=d(2/3*p+t/3);a+=" c "+c+","+n+","+q+","+p+","+l+","+t}"C"==h&&(a+=" c "+k[0]+","+k[1]+","+k[2]+","+k[3]+","+k[4]+","+k[5]);"A"==h&&(a+=" wa "+ 331f);"B"==h&&(a+=" at "+f);c=k}return a},animate:function(a,b,c,d,g){var f=a.node,h=this.chart;a.animationFinished=!1;if("translate"==b){b=c.split(",");c=b[1];var k=f.offsetTop;h.animate(a,"left",f.offsetLeft,b[0],d,g,"px");h.animate(a,"top",k,c,d,g,"px")}},clipRect:function(a,b,c,d,g){a=a.node;0===b&&0===c?(a.style.width=d+"px",a.style.height=g+"px",a.style.overflow="hidden"):a.style.clip="rect("+c+"px "+(b+d)+"px "+(c+g)+"px "+b+"px)"},rotate:function(a,b,c){if(0!==Number(b)){var e=a.node;a=e.style;c||(c=this.getBGColor(e.parentNode));a.backgroundColor=c;a.paddingLeft=1;c=b*Math.PI/180;var g=Math.cos(c),f=Math.sin(c),h=d.removePx(a.left),k=d.removePx(a.top),l=e.offsetWidth,e=e.offsetHeight;b/=Math.abs(b);a.left=h+l/2-l/2*Math.cos(c)-b*e/2*Math.sin(c)+3;a.top=k-b*l/2*Math.sin(c)+b*e/2*Math.sin(c);a.cssText=a.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+g+"', M12='"+-f+"', M21='"+f+"', M22='"+g+"', sizingmethod='auto expand');"}},getBGColor:function(a){var b="#FFFFFF";if(a.style){var c=a.style.backgroundColor;""!==c?b=c:a.parentNode&&(b=this.getBGColor(a.parentNode))}return b},set:function(a){var b=new d.AmDObject("group",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},gradient:function(a,b,c,d){var g="";"radialGradient"==b&&(b="gradientradial",c.reverse());"linearGradient"==b&&(b="gradient");var f;for(f=0;f<c.length;f++)g+=Math.round(100*f/(c.length-1))+"% "+c[f],f<c.length-1&&(g+=",");a=a.fill;90==d?d=0:270==d?d=180:180==d?d=90:0===d&&(d=270);8===document.documentMode?(a.type=b,a.angle=d):(a.setAttribute("type",b),a.setAttribute("angle",d));g&&(a.colors.value=g)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);this.D.remove(a.node)},disableSelection:function(a){a.onselectstart=function(){return!1};a.style.cursor="default"},pattern:function(a,b,c,e){c=a.node;a=a.fill;var g="none";b.color&&(g=b.color);c.fillColor=g;b=b.url;d.isAbsolute(b)||(b=e+b);8===document.documentMode?(a.type="tile",a.src=b):(a.setAttribute("type","tile"),a.setAttribute("src",b))},update:function(){}})})();(function(){var d=window.AmCharts;d.SVGRenderer=d.Class({construct:function(a){this.D=a;this.animations=[]},create:function(a,b){return document.createElementNS(d.SVG_NS,b)},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},setAttr:function(a,b,c){void 0!==c&&a.node.setAttribute(b,c)},animate:function(a,b,c,e,g){a.animationFinished=!1;var f=a.node;a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);"translate"==b?(f=(f=f.getAttribute("transform"))?String(f).substring(10,f.length-1):"0,0",f=f.split(", ").join(" "),f=f.split(" ").join(","),0===f&&(f="0,0")):f=Number(f.getAttribute(b));c={obj:a,frame:0,attribute:b,from:f,to:c,time:e,effect:g};this.animations.push(c);a["an_"+b]=c},update:function(){var a,b=this.animations;for(a=b.length-1;0<=a;a--){var c=b[a],e=c.time*d.updateRate,g=c.frame+1,f=c.obj,h=c.attribute,k,l,m;if(g<=e){c.frame++;if("translate"==h){k=c.from.split(",");h=Number(k[0]);k=Number(k[1]);isNaN(k)&&(k=0);l=c.to.split(",");m=Number(l[0]);l=Number(l[1]);m=0===m-h?m:Math.round(d[c.effect](0,g,h,m-h,e));c=0===l-k?l:Math.round(d[c.effect](0,g,k,l-k,e));h="transform";if(isNaN(m)||isNaN(c))continue;c="translate("+m+","+c+")"}else l=Number(c.from),k=Number(c.to),m=k-l,c=d[c.effect](0,g,l,m,e),isNaN(c)&&(c=k),0===m&&this.animations.splice(a,1);this.setAttr(f,h,c)}else"translate"==h?(l=c.to.split(","),m=Number(l[0]),l=Number(l[1]),f.translate(m,l)):(k=Number(c.to),this.setAttr(f,h,k)),f.animationFinished=!0,this.animations.splice(a,1)}}
331,getBBox:function(a){if(a=a.node)try{return a.getBBox()}catch(b){}return{width:0,height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(d.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,e,g){var f=a.node,h=a.clipPath;h&&this.D.remove(h);var k=f.parentNode;k&&(f=document.createElementNS(d.SVG_NS,"clipPath"),h=d.getUniqueId(),f.setAttribute("id",h),this.D.rect(b,c,e,g,0,0,f),k.appendChild(f),b="#",d.baseHref&&!d.isIE&&(b=this.removeTarget(window.location.href)+b),this.setAttr(a,"clip-path","url("+b+h+")"),this.clipPathC++,a.clipPath=f)},text:function(a,b,c){var e=new d.AmDObject("text",this.D);a=String(a).split("\n");var g=d.removePx(b["font-size"]),f;for(f=0;f<a.length;f++){var h=this.create(null,"tspan");h.appendChild(document.createTextNode(a[f]));h.setAttribute("y",(g+2)*f+Math.round(g/2));h.setAttribute("x",0);e.node.appendChild(h)}e.node.setAttribute("y",Math.round(g/2));this.attr(e,b);this.D.addToContainer(e.node,c);return e},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},move:function(a,b,c,d){isNaN(b)&&(b=0);isNaN(c)&&(c=0);b="translate("+b+","+c+")";d&&(b=b+" scale("+d+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),d="rotate("+b+")";c&&(d=c+" "+d);this.setAttr(a,"transform",d)},set:function(a){var b=new d.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,e){var g=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(d.SVG_NS,b);f=d.getUniqueId();b.setAttribute("id",f);if(!isNaN(e)){var h=0,k=0,l=0,m=0;90==e?l=100:270==e?m=100:180==e?h=100:0===e&&(k=100);b.setAttribute("x1",h+"%");b.setAttribute("x2",k+"%");b.setAttribute("y1",l+"%");b.setAttribute("y2",m+"%")}for(e=0;e<c.length;e++)h=document.createElementNS(d.SVG_NS,"stop"),k=100*e/(c.length-1),0===e&&(k=0),h.setAttribute("offset",k+"%"),h.setAttribute("stop-color",c[e]),b.appendChild(h);g.parentNode.appendChild(b);c="#";d.baseHref&&!d.isIE&&(c=this.removeTarget(window.location.href)+c);g.setAttribute("fill","url("+c+f+")");a.grad=b},removeTarget:function(a){return a.split("#")[0]},pattern:function(a,b,c,e){var g=a.node;isNaN(c)&&(c=1);var f=a.patternNode;f&&this.D.remove(f);var f=document.createElementNS(d.SVG_NS,"pattern"),h=d.getUniqueId(),k=b;b.url&&(k=b.url);d.isAbsolute(k)||-1!=k.indexOf("data:image")||(k=e+k);e=Number(b.width);isNaN(e)&&(e=4);var l=Number(b.height);isNaN(l)&&(l=4);e/=c;l/=c;c=b.x;isNaN(c)&&(c=0);var m=-Math.random()*Number(b.randomX);isNaN(m)||(c=m);m=b.y;isNaN(m)&&(m=0);var n=-Math.random()*Number(b.randomY);isNaN(n)||(m=n);f.setAttribute("id",h);f.setAttribute("width",e);f.setAttribute("height",l);f.setAttribute("patternUnits","userSpaceOnUse");f.setAttribute("xlink:href",k);b.color&&(n=document.createElementNS(d.SVG_NS,"rect"),n.setAttributeNS(null,"height",e),n.setAttributeNS(null,"width",l),n.setAttributeNS(null,"fill",b.color),f.appendChild(n));this.D.image(k,0,0,e,l,f).translate(c,m);k="#";d.baseHref&&!d.isIE&&(k=this.removeTarget(window.location.href)+k);g.setAttribute("fill","url("+k+h+")");a.patternNode=f;g.parentNode.appendChild(f)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}})})();(function(){var d=window.AmCharts;d.AmLegend=d.Class({construct:function(a){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.accessibleLabel="[[title]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;this.labelDx=0;d.applyTheme(this,a,this.cname)},setData:function(a){this.legendData=a;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var a=this.legendData;this.enabled&&(d.ifArray(a)||d.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var a=this.chart,b=this.position,c=this.width,e=a.divRealWidth,g=a.divRealHeight,f=this.div,h=this.legendData;this.data&&(h=this.combineLegend?this.legendData.concat(this.data):this.data);isNaN(this.fontSize)&&(this.fontSize=a.fontSize);this.maxColumnsReal=this.maxColumns;
331if("right"==b||"left"==b)this.maxColumnsReal=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=a.marginRight;this.marginLeft=a.marginLeft;var k=a.autoMarginOffset;"bottom"==b?(this.marginBottom=k,this.marginTop=0):(this.marginTop=k,this.marginBottom=0)}c=void 0!==c?d.toCoordinate(c,e):"right"!=b&&"left"!=b?a.realWidth:0<this.ieW?this.ieW:a.realWidth;"outside"==b?(c=f.offsetWidth,g=f.offsetHeight,f.clientHeight&&(c=f.clientWidth,g=f.clientHeight)):(isNaN(c)||(f.style.width=c+"px"),f.className="amChartsLegend "+a.classNamePrefix+"-legend-div");this.divWidth=c;(b=this.container)?(b.container.innerHTML="",f.appendChild(b.container),b.width=c,b.height=g,b.setSize(c,g),b.addDefs(a)):b=new d.AmDraw(f,c,g,a);this.container=b;this.lx=0;this.ly=8;g=this.markerSize;g>this.fontSize&&(this.ly=g/2-1);0<g&&(this.lx+=g+this.markerLabelGap);this.titleWidth=0;if(g=this.title)g=d.text(this.container,g,this.color,a.fontFamily,this.fontSize,"start",!0),d.setCN(a,g,"legend-title"),g.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),a=g.getBBox(),this.titleWidth=a.width+15,this.titleHeight=a.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(a=0;a<h.length;a++)this.createEntry(h[a]);for(a=this.index=0;a<h.length;a++)this.createValue(h[a])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var a=this.position,b=this.marginLeft+ 332this.titleWidth,c=this.marginRight,e=this.marginTop,g=this.marginBottom,f=this.horizontalGap,h=this.div,k=this.divWidth,l=this.maxColumnsReal,m=this.verticalGap,n=this.spacing,q=k-c-b,p=0,t=0,r=this.container;this.set&&this.set.remove();var w=r.set();this.set=w;var z=r.set();w.push(z);var x=this.entries,u,A;for(A=0;A<x.length;A++){u=x[A].getBBox();var y=u.width;y>p&&(p=y);u=u.height;u>t&&(t=u)}var y=t=0,B=f,D=0,C=0;for(A=0;A<x.length;A++){var I=x[A];this.reversedOrder&&(I=x[x.length-A-1]);u=I.getBBox();var H;this.equalWidths?H=y*(p+n+this.markerLabelGap):(H=B,B=B+u.width+f+n);H+u.width>q&&0<A&&0!==y&&(t++,H=y=0,B=H+u.width+f+n,D=D+C+m,C=0);u.height>C&&(C=u.height);I.translate(H,D);y++;!isNaN(l)&&y>=l&&(y=0,t++,D=D+C+m,B=f,C=0);z.push(I)}u=z.getBBox();l=u.height+2*m-1;"left"==a||"right"==a?(n=u.width+2*f,k=n+b+c,h.style.width=k+"px",this.ieW=k):n=k-b-c-1;c=d.polygon(this.container,[0,n,n,0],[0,0,l,l],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);d.setCN(this.chart,c,"legend-bg");w.push(c);w.translate(b,e);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(n-u.width)/2:"right"==this.align&&(b=f+n-u.width);z.translate(b,m+1);this.titleHeight>l&&(l=this.titleHeight);e=l+e+g+1;0>e&&(e=0);"absolute"!=a&&"outside"!=a&&e>this.chart.divRealHeight&&(h.style.top="0px");h.style.height=Math.round(e)+"px";r.setSize(this.divWidth,e)},createEntry:function(a){if(!1!==a.visibleInLegend&&!a.hideFromLegend){var b=this,c=b.chart,e=b.useGraphSettings,g=a.markerType;g&&(e=!1);a.legendEntryWidth=b.markerSize;g||(g=b.markerType);var f=a.color,h=a.alpha;a.legendKeyColor&&(f=a.legendKeyColor());a.legendKeyAlpha&&(h=a.legendKeyAlpha());var k;!0===a.hidden&&(k=f=b.markerDisabledColor);var l=a.pattern,m,n=a.customMarker;n||(n=b.customMarker);var q=b.container,p=b.markerSize,t=0,r=0,w=p/2;if(e){e=a.type;b.switchType=void 0;if("line"==e||"step"==e||"smoothedLine"==e||"ohlc"==e)m=q.set(),a.hidden||(f=a.lineColorR,k=a.bulletBorderColorR),t=d.line(q,[0,2*p],[p/2,p/2],f,a.lineAlpha,a.lineThickness,a.dashLength),d.setCN(c,t,"graph-stroke"),m.push(t),a.bullet&&(a.hidden||(f=a.bulletColorR),t=d.bullet(q,a.bullet,a.bulletSize,f,a.bulletAlpha,a.bulletBorderThickness,k,a.bulletBorderAlpha))&&(d.setCN(c,t,"graph-bullet"),t.translate(p+1,p/2),m.push(t)),w=0,t=p,r=p/3;else{a.getGradRotation&&(m=a.getGradRotation(),0===m&&(m=180));t=a.fillColorsR;!0===a.hidden&&(t=f);if(m=b.createMarker("rectangle",t,a.fillAlphas,a.lineThickness,f,a.lineAlpha,m,l,a.dashLength))w=p,m.translate(w,p/2);t=p}d.setCN(c,m,"graph-"+e);d.setCN(c,m,"graph-"+a.id)}else if(n)m=q.image(n,0,0,p,p);else{var z;isNaN(b.gradientRotation)||(z=180+b.gradientRotation);(m=b.createMarker(g,f,h,void 0,void 0,void 0,z,l))&&m.translate(p/2,p/2)}d.setCN(c,m,"legend-marker");b.addListeners(m,a);q=q.set([m]);b.switchable&&a.switchable&&q.setAttr("cursor","pointer");void 0!==a.id&&d.setCN(c,q,"legend-item-"+a.id);d.setCN(c,q,a.className,!0);k=b.switchType;var x;k&&"none"!=k&&0<p&&("x"==k?(x=b.createX(),x.translate(p/2,p/2)):x=b.createV(),x.dItem=a,!0!==a.hidden?"x"==k?x.hide():x.show():"x"!=k&&x.hide(),b.switchable||x.hide(),b.addListeners(x,a),a.legendSwitch=x,q.push(x),d.setCN(c,x,"legend-switch"));k=b.color;a.showBalloon&&b.textClickEnabled&&void 0!==b.selectedColor&&(k=b.selectedColor);b.useMarkerColorForLabels&&!l&&(k=f);!0===a.hidden&&(k=b.markerDisabledColor);f=d.massReplace(b.labelText,{"[[title]]":a.title});void 0!==b.tabIndex&&(q.setAttr("tabindex",b.tabIndex),q.setAttr("role","menuitem"),q.keyup(function(c){13==c.keyCode&&b.clickMarker(a,c)}));c.accessible&&b.accessibleLabel&&(l=d.massReplace(b.accessibleLabel,{"[[title]]":a.title}),c.makeAccessible(q,l));l=b.fontSize;m&&(p<=l&&(p=p/2+b.ly-l/2+(l+2-p)/2-r,m.translate(w,p),x&&x.translate(x.x,p)),a.legendEntryWidth=m.getBBox().width);var u;f&&(f=d.fixBrakes(f),a.legendTextReal=f,u=b.labelWidth,u=isNaN(u)?d.text(b.container,f,k,c.fontFamily,l,"start"):d.wrappedText(b.container,f,k,c.fontFamily,l,"start",!1,u,0),d.setCN(c,u,"legend-label"),u.translate(b.lx+t,b.ly),q.push(u),b.labelDx=t,c=u.getBBox().width,b.maxLabelWidth<c&&(b.maxLabelWidth=c));b.entries[b.index]=q;a.legendEntry=b.entries[b.index];a.legendMarker=m;a.legendLabel=u;b.index++}},addListeners:function(a,b){var c=this;a&&a.mouseover(function(a){c.rollOverMarker(b,a)}).mouseout(function(a){c.rollOutMarker(b,a)}).click(function(a){c.clickMarker(b,a)})},rollOverMarker:function(a,b){this.switchable&&this.dispatch("rollOverMarker",a,b);this.dispatch("rollOverItem",a,b)},rollOutMarker:function(a,b){this.switchable&&this.dispatch("rollOutMarker",a,b);this.dispatch("rollOutItem",a,b)},clickMarker:function(a,b){this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b));this.dispatch("clickMarker",a,b)},rollOverLabel:function(a,b){a.hidden||this.textClickEnabled&&a.legendLabel&&a.legendLabel.attr({fill:this.rollOverColor});this.dispatch("rollOverItem",a,b)},rollOutLabel:function(a,b){if(!a.hidden&&this.textClickEnabled&&a.legendLabel){var c=this.color;void 0!==this.selectedColor&&a.showBalloon&&(c=this.selectedColor);this.useMarkerColorForLabels&&(c=a.lineColor,void 0===c&&(c=a.color));a.legendLabel.attr({fill:c})}this.dispatch("rollOutItem",a,b)},clickLabel:function(a,b){this.textClickEnabled?a.hidden||this.dispatch("clickLabel",a,b):this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b))},dispatch:function(a,b,c){a={type:a,dataItem:b,target:this,event:c,chart:this.chart};this.chart&&this.chart.handleLegendEvent(a);this.fire(a)},createValue:function(a){var b=this,c=b.fontSize,e=b.chart;if(!1!==a.visibleInLegend&&!a.hideFromLegend){var g=b.maxLabelWidth,f=0;b.forceWidth&&(g=b.labelWidth);b.equalWidths||(b.valueAlign="left");f={x:0,y:0,width:0,height:0};a.legendLabel&&(f=a.legendLabel.getBBox());"left"==b.valueAlign&&(g=f.width);var f=f.height,h=g,k=b.markerSize;k<c+7&&(k=c+7,d.VML&&(k+=3));if(b.valueText&&0<b.valueWidth){var l=b.color;b.useMarkerColorForValues&&(l=a.color,a.legendKeyColor&&(l=a.legendKeyColor
332()));!0===a.hidden&&(l=b.markerDisabledColor);var m=b.valueText,g=g+b.lx+b.labelDx+b.markerLabelGap+b.valueWidth,n="end";"left"==b.valueAlign&&(g-=b.valueWidth,n="start");c=d.text(b.container,m,l,b.chart.fontFamily,c,n);d.setCN(e,c,"legend-value");c.translate(g,b.ly);b.entries[b.index].push(c);h+=b.valueWidth+2*b.markerLabelGap;c.dItem=a;b.valueLabels.push(c);k<f+5&&(k=f+5)}b.index++;e=b.container.rect(a.legendEntryWidth,0,h,k,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});e.dItem=a;b.entries[b.index- 3331].push(e);e.mouseover(function(c){b.rollOverLabel(a,c)}).mouseout(function(c){b.rollOutLabel(a,c)}).click(function(c){b.clickLabel(a,c)})}},createV:function(){var a=this.markerSize;return d.polygon(this.container,[a/5,a/2,a-a/5,a/2],[a/3,a-a/5,a/5,a/1.7],this.switchColor)},createX:function(){var a=(this.markerSize-4)/2,b={stroke:this.switchColor,"stroke-width":3},c=this.container,e=d.line(c,[-a,a],[-a,a]).attr(b),a=d.line(c,[-a,a],[a,-a]).attr(b);return this.container.set([e,a])},createMarker:function(a,b,c,e,g,f,h,k,l){var m=this.markerSize,n=this.container;g||(g=this.markerBorderColor);g||(g=b);isNaN(e)&&(e=this.markerBorderThickness);isNaN(f)&&(f=this.markerBorderAlpha);return d.bullet(n,a,m,b,c,e,g,f,m,h,k,this.chart.path,l)},validateNow:function(){this.invalidateSize()},updateValues:function(){var a=this.valueLabels,b=this.chart,c,e=this.data;if(a)for(c=0;c<a.length;c++){var g=a[c],f=g.dItem;f.periodDataItem=void 0;f.periodPercentDataItem=void 0;var h=" ";if(e)f.value?g.text(f.value):g.text("");else{var k=null;if(void 0!==f.type){var k=f.currentDataItem,l=this.periodValueText;f.legendPeriodValueText&&(l=f.legendPeriodValueText);f.legendPeriodValueTextR&&(l=f.legendPeriodValueTextR);k?(h=this.valueText,f.legendValueText&&(h=f.legendValueText),f.legendValueTextR&&(h=f.legendValueTextR),h=b.formatString(h,k)):l&&b.formatPeriodString&&(l=d.massReplace(l,{"[[title]]":f.title}),h=b.formatPeriodString(l,f))}else h=b.formatString(this.valueText,f);l=f;k&&(l=k);var m=this.valueFunction;m&&(h=m(l,h,b.periodDataItem));var n;this.useMarkerColorForLabels&&!k&&f.lastDataItem&&(k=f.lastDataItem);k?n=b.getBalloonColor(f,k):f.legendKeyColor&&(n=f.legendKeyColor());f.legendColorFunction&&(n=f.legendColorFunction(l,h,f.periodDataItem,f.periodPercentDataItem));g.text(h);if(!f.pattern&&(this.useMarkerColorForValues&&g.setAttr("fill",n),this.useMarkerColorForLabels)){if(g=f.legendMarker)g.setAttr("fill",n),g.setAttr("stroke",n);(g=f.legendLabel)&&(f.hidden?g.setAttr("fill",this.markerDisabledColor):g.setAttr("fill",n))}}}},renderFix:function(){if(!d.VML&&this.enabled){var a=this.container;a&&a.renderFix()}},destroy:function(){this.div.innerHTML="";d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.formatMilliseconds=function(a,b){if(-1!=a.indexOf("fff")){var c=b.getMilliseconds(),d=String(c);10>c&&(d="00"+c);10<=c&&100>c&&(d="0"+c);a=a.replace(/fff/g,d)}return a};d.extractPeriod=function(a){var b=d.stripNumbers(a),c=1;b!=a&&(c=Number(a.slice(0,a.indexOf(b))));return{period:b,count:c}};d.getDate=function(a,b,c){return a instanceof Date?d.newDate(a,c):b&&isNaN(a)?d.stringToDate(a,b):new Date(a)};d.daysInMonth=function(a){return(new Date(a.getYear(),a.getMonth()+ 3341,0)).getDate()};d.newDate=function(a,b){return b&&-1==b.indexOf("fff")?new Date(a):new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds())};d.resetDateToMin=function(a,b,c,e){void 0===e&&(e=1);var g,f,h,k,l,m,n;d.useUTC?(g=a.getUTCFullYear(),f=a.getUTCMonth(),h=a.getUTCDate(),k=a.getUTCHours(),l=a.getUTCMinutes(),m=a.getUTCSeconds(),n=a.getUTCMilliseconds(),a=a.getUTCDay()):(g=a.getFullYear(),f=a.getMonth(),h=a.getDate(),k=a.getHours(),l=a.getMinutes(),m=a.getSeconds(),n=a.getMilliseconds(),a=a.getDay());switch(b){case"YYYY":g=Math.floor(g/c)*c;f=0;h=1;n=m=l=k=0;break;case"MM":f=Math.floor(f/c)*c;h=1;n=m=l=k=0;break;case"WW":h=a>=e?h-a+e:h-(7+a)+e;n=m=l=k=0;break;case"DD":n=m=l=k=0;break;case"hh":k=Math.floor(k/c)*c;n=m=l=0;break;case"mm":l=Math.floor(l/c)*c;n=m=0;break;case"ss":m=Math.floor(m/c)*c;n=0;break;case"fff":n=Math.floor(n/c)*c}d.useUTC?(a=new Date,a.setUTCFullYear(g,f,h),a.setUTCHours(k,l,m,n)):a=new Date(g,f,h,k,l,m,n);return a};d.getPeriodDuration=function(a,b){void 0===b&&(b=1);var c;switch(a){case"YYYY":c=316224E5;break;case"MM":c=26784E5;break;
334case"WW":c=6048E5;break;case"DD":c=864E5;break;case"hh":c=36E5;break;case"mm":c=6E4;break;case"ss":c=1E3;break;case"fff":c=1}return c*b};d.intervals={s:{nextInterval:"ss",contains:1E3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};d.getMaxInterval=function(a,b){var c=d.intervals;return a>=c[b].contains?(a=Math.round(a/c[b].contains),b=c[b].nextInterval,d.getMaxInterval(a,b)):"ss"==b?c[b].nextInterval:b};d.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");d.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");d.monthNames="January February March April May June July August September October November December".split(" ");d.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");d.getWeekNumber=function(a){a=new Date(a);a.setHours(0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));var b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)};d.stringToDate=function(a,b){var c={},e=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],g=!0,f=b.indexOf("AA");-1!=f&&(a.substr(f,2),"pm"==a.toLowerCase&&(g=!1));var f=b,h,k,l;for(l=0;l<e.length;l++)k=e[l].period,c[k]=0,"date"==k&&(c[k]=1);for(l=0;l<e.length;l++)if(h=e[l].pattern,k=e[l].period,-1!=b.indexOf(h)){var m=d.getFromDateString(h,a,f);b=b.replace(h,"");if("KK"==h||"K"==h||"LL"==h||"L"==h)g||(m+=12);c[k]=m}d.useUTC?(e=new Date,e.setUTCFullYear(c.year,c.month,c.date),e.setUTCHours(c.hours,c.minutes,c.seconds,c.milliseconds)):e=new Date(c.year,c.month,c.date,c.hours,c.minutes,c.seconds,c.milliseconds);return e};d.getFromDateString=function(a,b,c){if(void 0!==b)return c=c.indexOf(a),b=String(b),b=b.substr(c,a.length),"0"==b.charAt(0)&&(b=b.substr(1,b.length-1)),b=Number(b),isNaN(b)&&(b=0),-1!=a.indexOf("M")&&b--,b};d.formatDate=function(a,b,c){c||(c=d);var e,g,f,h,k,l,m,n,q=d.getWeekNumber(a);d.useUTC?(e=a.getUTCFullYear(),g=a.getUTCMonth(),f=a.getUTCDate(),h=a.getUTCDay(),k=a.getUTCHours(),l=a.getUTCMinutes(),m=a.getUTCSeconds(),n=a.getUTCMilliseconds()):(e=a.getFullYear(),g=a.getMonth(),f=a.getDate(),h=a.getDay(),k=a.getHours(),l=a.getMinutes(),m=a.getSeconds(),n=a.getMilliseconds());var p=String(e).substr(2,2),t="0"+h;b=b.replace(/W/g,q);q=k;24==q&&(q=0);var r=q;10>r&&(r="0"+r);b=b.replace(/JJ/g,r);b=b.replace(/J/g,q);r=k;0===r&&(r=24,-1!=b.indexOf("H")&&(f--,0===f&&(e=new Date(a),e.setDate(e.getDate()-1),g=e.getMonth(),f=e.getDate(),e=e.getFullYear())));a=g+1;9>g&&(a="0"+a);q=f;10>f&&(q="0"+f);var w=r;10>w&&(w="0"+w);b=b.replace(/HH/g,w);b=b.replace(/H/g,r);r=k;11<r&&(r-=12);w=r;10>w&&(w="0"+w);b=b.replace(/KK/g,w);b=b.replace(/K/g,r);r=k;0===r&&(r=12);12<r&&(r-=12);w=r;10>w&&(w="0"+w);b=b.replace(/LL/g,w);b=b.replace(/L/g,r);r=l;10>r&&(r="0"+r);b=b.replace(/NN/g,r);b=b.replace(/N/g,l);l=m;10>l&&(l="0"+l);b=b.replace(/SS/g,l);b=b.replace(/S/g,m);m=n;10>m?m="00"+m:100>m&&(m="0"+m);l=n;10>l&&(l="00"+l);b=b.replace(/A/g,"@A@");b=b.replace(/QQQ/g,m);b=b.replace(/QQ/g,l);b=b.replace(/Q/g,n);b=b.replace(/YYYY/g,"@IIII@");b=b.replace(/YY/g,"@II@");b=b.replace(/MMMM/g,"@XXXX@");b=b.replace(/MMM/g,"@XXX@");b=b.replace(/MM/g,"@XX@");b=b.replace(/M/g,"@X@");b=b.replace(/DD/g,"@RR@");b=b.replace(/D/g,"@R@");b=b.replace(/EEEE/g,"@PPPP@");b=b.replace(/EEE/g,"@PPP@");b=b.replace(/EE/g,"@PP@");b=b.replace(/E/g,"@P@");b=b.replace(/@IIII@/g,e);b=b.replace(/@II@/g,p);b=b.replace(/@XXXX@/g,c.monthNames[g]);b=b.replace(/@XXX@/g,c.shortMonthNames[g]);b=b.replace(/@XX@/g,a);b=b.replace(/@X@/g,g+1);b=b.replace(/@RR@/g,q);b=b.replace(/@R@/g,f);b=b.replace(/@PPPP@/g,c.dayNames[h]);b=b.replace(/@PPP@/g,c.shortDayNames[h]);b=b.replace(/@PP@/g,t);b=b.replace(/@P@/g,h);return b=12>k?b.replace(/@A@/g,c.amString):b.replace(/@A@/g,c.pmString)};d.changeDate=function(a,b,c,e,g){if(d.useUTC)return d.changeUTCDate(
334a,b,c,e,g);var f=-1;void 0===e&&(e=!0);void 0===g&&(g=!1);!0===e&&(f=1);switch(b){case"YYYY":a.setFullYear(a.getFullYear()+c*f);e||g||a.setDate(a.getDate()+1);break;case"MM":b=a.getMonth();var h=a.getFullYear();a.setMonth(b+c*f);var k=a.getMonth();if(e&&k-b>c)for(;a.getMonth()-b>c;)a.setDate(a.getDate()-1);h==a.getFullYear()&&a.getMonth()>b+c*f&&a.setDate(a.getDate()-1);e||g||a.setDate(a.getDate()+1);break;case"DD":a.setDate(a.getDate()+c*f);break;case"WW":a.setDate(a.getDate()+c*f*7);break;case"hh":a.setHours(a.getHours()+c*f);break;case"mm":a.setMinutes(a.getMinutes()+c*f);break;case"ss":a.setSeconds(a.getSeconds()+c*f);break;case"fff":a.setMilliseconds(a.getMilliseconds()+c*f)}return a};d.changeUTCDate=function(a,b,c,d,g){var f=-1;void 0===d&&(d=!0);void 0===g&&(g=!1);!0===d&&(f=1);switch(b){case"YYYY":a.setUTCFullYear(a.getUTCFullYear()+c*f);d||g||a.setUTCDate(a.getUTCDate()+1);break;case"MM":b=a.getUTCMonth();a.setUTCMonth(a.getUTCMonth()+ 335c*f);a.getUTCMonth()>b+c*f&&a.setUTCDate(a.getUTCDate()-1);d||g||a.setUTCDate(a.getUTCDate()+1);break;case"DD":a.setUTCDate(a.getUTCDate()+c*f);break;case"WW":a.setUTCDate(a.getUTCDate()+c*f*7);break;case"hh":a.setUTCHours(a.getUTCHours()+c*f);break;case"mm":a.setUTCMinutes(a.getUTCMinutes()+c*f);break;case"ss":a.setUTCSeconds(a.getUTCSeconds()+c*f);break;case"fff":a.setUTCMilliseconds(a.getUTCMilliseconds()+c*f)}return a}})(); 336;;;angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-html.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.collapse").value("$collapseSuppressWarning",!1).directive("collapse",["$animate","$injector","$log","$collapseSuppressWarning",function(a,b,c,d){var e=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,f,g){function h(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start().done(i):a.animate(f,{},{height:f[0].scrollHeight+"px"}).then(i)}function i(){f.removeClass("collapsing").addClass("collapse in").css({height:"auto"})}function j(){return f.hasClass("collapse")||f.hasClass("in")?(f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse in").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(e?e(f,{to:{height:"0"}}).start().done(k):a.animate(f,{},{height:"0"}).then(k))):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse")}d||c.warn("collapse is now deprecated. Use uib-collapse instead."),b.$watch(g.collapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass,a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:["?^uibAccordionGroup","?^accordionGroup"],link:function(a,b,c,d){d=d[0]?d[0]:d[1],a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.accordion").value("$accordionSuppressWarning",!1).controller("AccordionController",["$scope","$attrs","$controller","$log","$accordionSuppressWarning",function(a,b,c,d,e){e||d.warn("AccordionController is now deprecated. Use UibAccordionController instead."),angular.extend(this,c("UibAccordionController",{$scope:a,$attrs:b}))}]).directive("accordion",["$log","$accordionSuppressWarning",function(a,b){return{restrict:"EA",controller:"AccordionController",controllerAs:"accordion",transclude:!0,replace:!1,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion.html"},link:function(){b||a.warn("accordion is now deprecated. Use uib-accordion instead.")}}}]).directive("accordionGroup",["$log","$accordionSuppressWarning",function(a,b){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(c,d,e,f){b||a.warn("accordion-group is now deprecated. Use uib-accordion-group instead."),f.addGroup(c),c.openClass=e.openClass||"panel-open",c.panelClass=e.panelClass,c.$watch("isOpen",function(a){d.toggleClass(c.openClass,!!a),a&&f.closeOthers(c)}),c.toggleOpen=function(a){c.isDisabled||a&&32!==a.which||(c.isOpen=!c.isOpen)}}}}]).directive("accordionHeading",["$log","$accordionSuppressWarning",function(a,b){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(c,d,e,f,g){b||a.warn("accordion-heading is now deprecated. Use uib-accordion-heading instead."),f.setHeading(g(c,angular.noop))}}}]).directive("accordionTransclude",["$log","$accordionSuppressWarning",function(a,b){return{require:"^accordionGroup",link:function(c,d,e,f){b||a.warn("accordion-transclude is now deprecated. Use uib-accordion-transclude instead."),c.$watch(function(){return f[e.accordionTransclude]},function(a){a&&(d.find("span").html(""),d.find("span").append(a))})}}}
336]),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.alert").value("$alertSuppressWarning",!1).controller("AlertController",["$scope","$attrs","$controller","$log","$alertSuppressWarning",function(a,b,c,d,e){e||d.warn("AlertController is now deprecated. Use UibAlertController instead."),angular.extend(this,c("UibAlertController",{$scope:a,$attrs:b}))}]).directive("alert",["$log","$alertSuppressWarning",function(a,b){return{controller:"AlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"},link:function(){b||a.warn("alert is now deprecated. Use uib-alert instead.")}}}]),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",function(){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(a,b,c,d){var e=d[0],f=d[1];b.find("input").css({display:"none"}),f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.uibBtnRadio)))},b.on(e.toggleEvent,function(){if(!c.disabled){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.uibBtnRadio)),f.$render()})}})}}}).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.buttons").value("$buttonsSuppressWarning",!1).controller("ButtonsController",["$controller","$log","$buttonsSuppressWarning",function(a,b,c){c||b.warn("ButtonsController is now deprecated. Use UibButtonsController instead."),angular.extend(this,a("UibButtonsController"))}]).directive("btnRadio",["$log","$buttonsSuppressWarning",function(a,b){return{require:["btnRadio","ngModel"],controller:"ButtonsController",controllerAs:"buttons",link:function(c,d,e,f){b||a.warn("btn-radio is now deprecated. Use uib-btn-radio instead.");var g=f[0],h=f[1];d.find("input").css({display:"none"}),h.$render=function(){d.toggleClass(g.activeClass,angular.equals(h.$modelValue,c.$eval(e.btnRadio)))},d.bind(g.toggleEvent,function(){if(!e.disabled){var a=d.hasClass(g.activeClass);(!a||angular.isDefined(e.uncheckable))&&c.$apply(function(){h.$setViewValue(a?null:c.$eval(e.btnRadio)),h.$render()})}})}}}]).directive("btnCheckbox",["$document","$log","$buttonsSuppressWarning",function(a,b,c){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",controllerAs:"button",link:function(d,e,f,g){function h(){return j(f.btnCheckboxTrue,!0)}function i(){return j(f.btnCheckboxFalse,!1)}function j(a,b){var c=d.$eval(a);return angular.isDefined(c)?c:b}c||b.warn("btn-checkbox is now deprecated. Use uib-btn-checkbox instead.");var k=g[0],l=g[1];e.find("input").css({display:"none"}),l.$render=function(){e.toggleClass(k.activeClass,angular.equals(l.$modelValue,h()))},e.bind(k.toggleEvent,function(){f.disabled||d.$apply(function(){l.$setViewValue(e.hasClass(k.activeClass)?i():h()),l.$render()})}),e.on("keypress",function(b){f.disabled||32!==b.which||a[0].activeElement!==e[0]||d.$apply(function(){l.$setViewValue(e.hasClass(k.activeClass)?i():h()),l.$render()})})}}}]),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$animate",function(a,b,c,d){function e(b,c,e){s||(angular.extend(b,{direction:e,active:!0}),angular.extend(m.currentSlide||{},{direction:e,active:!1}),d.enabled()&&!a.noTransition&&!a.$currentTransition&&b.$element&&m.slides.length>1&&(b.$element.data(q,b.direction),m.currentSlide&&m.currentSlide.$element&&m.currentSlide.$element.data(q,b.direction),a.$currentTransition=!0,o?d.on("addClass",b.$element,function(b,c){"close"===c&&(a.$currentTransition=null,d.off("addClass",b))}):b.$element.one("$animate:close",function(){a.$currentTransition=null})),m.currentSlide=b,r=c,g())}function f(a){if(angular.isUndefined(n[a].index))return n[a];var b;n.length;for(b=0;b<n.length;++b)if(n[b].index==a)return n[b]}function g(){h();var b=+a.interval;!isNaN(b)&&b>0&&(k=c(i,b))}function h(){k&&(c.cancel(k),k=null)}function i(){var b=+a.interval;l&&!isNaN(b)&&b>0&&n.length?a.next():a.pause()}function j(b){b.length||(a.$currentTransition=null)}var k,l,m=this,n=m.slides=a.slides=[],o=angular.version.minor>=4,p="uib-noTransition",q="uib-slideDirection",r=-1;m.currentSlide=null;var s=!1;m.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>m.getCurrentIndex()?"next":"prev"),b&&b!==m.currentSlide&&!a.$currentTransition&&e(b,d,c)},a.$on("$destroy",function(){s=!0}),m.getCurrentIndex=function(){return m.currentSlide&&angular.isDefined(m.currentSlide.index)?+m.currentSlide.index:r},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:n.indexOf(a)},a.next=function(){var b=(m.getCurrentIndex()+1)%n.length;return 0===b&&a.noWrap()?void a.pause():m.select(f(b),"next")},a.prev=function(){var b=m.getCurrentIndex()-1<0?n.length-1:m.getCurrentIndex()-1;return a.noWrap()&&b===n.length-1?void a.pause():m.select(f(b),"prev")},a.isActive=function(a){return m.currentSlide===a},a.$watch("interval",g),a.$watchCollection("slides",j),a.$on("$destroy",h),a.play=function(){l||(l=!0,g())},a.pause=function(){a.noPause||(l=!1,h())},m.addSlide=function(b,c){b.$element=c,n.push(b),1===n.length||b.active?(m.select(n[n.length-1]),1===n.length&&a.play()):b.active=!1},m.removeSlide=function(a){angular.isDefined(a.index)&&n.sort(function(a,b){return+a.index>+b.index});var b=n.indexOf(a);n.splice(b,1),n.length>0&&a.active?b>=n.length?m.select(n[b-1]):m.select(n[b]):r>b&&r--,0===n.length&&(m.currentSlide=null)}
336,a.$watch("noTransition",function(a){b.data(p,a)})}]).directive("uibCarousel",[function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("uibSlide",function(){return{require:"^uibCarousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$injector","$animate",function(a,b){function c(a,b,c){a.removeClass(b),c&&c()}var d="uib-noTransition",e="uib-slideDirection",f=null;return a.has("$animateCss")&&(f=a.get("$animateCss")),{beforeAddClass:function(a,g,h){if("active"==g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k+" "+j,h);return a.addClass(j),f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()},beforeRemoveClass:function(a,g,h){if("active"===g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k,h);return f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()}}}]),angular.module("ui.bootstrap.carousel").value("$carouselSuppressWarning",!1).controller("CarouselController",["$scope","$element","$controller","$log","$carouselSuppressWarning",function(a,b,c,d,e){e||d.warn("CarouselController is now deprecated. Use UibCarouselController instead."),angular.extend(this,c("UibCarouselController",{$scope:a,$element:b}))}]).directive("carousel",["$log","$carouselSuppressWarning",function(a,b){return{transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"},link:function(){b||a.warn("carousel is now deprecated. Use uib-carousel instead.")}}}]).directive("slide",["$log","$carouselSuppressWarning",function(a,b){return{require:"^carousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(c,d,e,f){b||a.warn("slide is now deprecated. Use uib-slide instead."),f.addSlide(c,d),c.$on("$destroy",function(){f.removeSlide(c)}),c.$watch("active",function(a){a&&f.select(c)})}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split("");return angular.forEach(g,function(c,e){var f=a.indexOf(e);if(f>-1){a=a.split(""),d[f]="("+c.regex+")",a[f]="$";for(var g=f+1,h=f+e.length;h>g;g++)d[g]="",a[g]="$";a=a.join(""),b.push({index:f,apply:c.apply})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}var f,g,h=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){f=b.id,this.parsers={},g={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},MMM:{regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:b.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},hh:{regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},H:{regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},h:{regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},mm:{regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},sss:{regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},ss:{regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},a:{regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}}}},this.init(),this.parse=function(c,g,i){if(!angular.isString(c)||!g)return c;g=b.DATETIME_FORMATS[g]||g,g=g.replace(h,"\\$&"),b.id!==f&&this.init(),this.parsers[g]||(this.parsers[g]=d(g));var j=this.parsers[g],k=j.regex,l=j.map,m=c.match(k);if(m&&m.length){var n,o;
336angular.isDate(i)&&!isNaN(i.getTime())?n={year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hours:i.getHours(),minutes:i.getMinutes(),seconds:i.getSeconds(),milliseconds:i.getMilliseconds()}:(i&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var p=1,q=m.length;q>p;p++){var r=l[p-1];r.apply&&r.apply.call(n,m[p])}return e(n.year,n.month,n.date)&&(angular.isDate(i)&&!isNaN(i.getTime())?(o=new Date(i),o.setFullYear(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds||0)):o=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds||0)),o}}}]),angular.module("ui.bootstrap.dateparser").value("$dateParserSuppressWarning",!1).service("dateParser",["$log","$dateParserSuppressWarning","uibDateParser",function(a,b,c){b||a.warn("dateParser is now deprecated. Use uibDateParser instead."),angular.extend(this,c)}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.position").value("$positionSuppressWarning",!1).service("$position",["$log","$positionSuppressWarning","$uibPosition",function(a,b,c){b||a.warn("$position is now deprecated. Use $uibPosition instead."),angular.extend(this,c)}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){i[c]=angular.isDefined(b[c])?6>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=g[d]?new Date(g[d]):null}),angular.forEach(["minMode","maxMode"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(c){i[d]=angular.isDefined(c)?c:b[d],a[d]=i[d],("minMode"==d&&i.modes.indexOf(a.datepickerMode)<i.modes.indexOf(i[d])||"maxMode"==d&&i.modes.indexOf(a.datepickerMode)>
336i.modes.indexOf(i[d]))&&(a.datepickerMode=i[d])}):(i[d]=g[d]||null,a[d]=i[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(j.$isEmpty(j.$modelValue)||j.$invalid)&&(i.activeDate=a,i.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$viewValue){var a=new Date(j.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$viewValue?new Date(j.$viewValue):null;j.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$viewValue?new Date(j.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$viewValue?new Date(j.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var k=function(){i.element[0].focus()};a.$on("uib:datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),i.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/e,10)*e+1}var e;this.element=b,this.yearpickerInit=function(){e=this.yearRange,this.step={years:e}},this._refreshView=function(){for(var b,c=new Array(e),f=0,g=d(this.activeDate.getFullYear());e>f;f++)b=new Date(this.activeDate),b.setFullYear(g+f,0,1),c[f]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+f});
336a.title=[c[0].label,c[e-1].label].join(" - "),a.rows=this.split(c,5)},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=5:"right"===a?c+=1:"down"===a?c+=5:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*this.step.years:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+e-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/day.html"},require:["^?uibDatepicker","uibDaypicker","^?datepicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0]||d[2],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/month.html"},require:["^?uibDatepicker","uibMonthpicker","^?datepicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0]||d[2],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/year.html"},require:["^?uibDatepicker","uibYearpicker","^?datepicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0]||d[2];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"template/datepicker/popup.html",datepickerTemplateUrl:"template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function n(b){if(angular.isNumber(b)&&(b=new Date(b)),b){if(angular.isDate(b)&&!isNaN(b))return b;if(angular.isString(b)){var c=j.parse(b,r,a.date);return isNaN(c)?void 0:c}return void 0}return null}function o(a,b){var d=a||b;if(!c.ngRequired&&!d)return!0;if(angular.isNumber(d)&&(d=new Date(d)),d){if(angular.isDate(d)&&!isNaN(d))return!0;if(angular.isString(d)){var e=j.parse(d,r);return!isNaN(e)}return!1}return!0}function p(c){var d=A[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}function q(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}var r,s,t,u,v,w,x,y,z,A,B={},C=!1;a.watchData={},this.init=function(h){if(z=h,s=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):k.closeOnDateSelection,t=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):k.appendToBody,u=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):k.onOpenFocus,v=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:k.datepickerPopupTemplateUrl,w=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:k.datepickerTemplateUrl,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):k.showButtonBar,k.html5Types[c.type]?(r=k.html5Types[c.type],C=!0):(r=c.datepickerPopup||c.uibDatepickerPopup||k.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||k.datepickerPopup;if(c!==r&&(r=c,z.$modelValue=null,!r))throw new Error("uibDatepickerPopup must have a date format specified.")})),!r)throw new Error("uibDatepickerPopup must have a date format specified.");if(C&&c.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");if(x=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),x.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":v}),y=angular.element(x.children()[0]),y.attr("template-url",w),C&&"month"===c.type&&(y.attr("datepicker-mode",'"month"'),y.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=l.initDate,y.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){y.attr(m(b),a)})}angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]);if(a.$parent.$watch(d,function(c){a.watchData[b]=c,("minDate"===b||"maxDate"===b)&&(B[b]=new Date(c))}),y.attr(m(b),"watchData."+b),"datepickerMode"===b){var f=d.assign;a.$watch("watchData."+b,function(b,c){angular.isFunction(f)&&b!==c&&f(a.$parent,b)})}}}),c.dateDisabled&&y.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.showWeeks&&y.attr("show-weeks",c.showWeeks),c.customClass&&y.attr("custom-class","customClass({ date: date, mode: mode })"),C?z.$formatters.push(function(b){return a.date=b,b}):(z.$$parserName="date",z.$validators.date=o,z.$parsers.unshift(n),z.$formatters.push(function(b){return a.date=b,z.$isEmpty(b)?b:i(b,r)}
336)),z.$viewChangeListeners.push(function(){a.date=j.parse(z.$viewValue,r,a.date)}),b.bind("keydown",q),A=d(x)(a),x.remove(),t?f.find("body").append(A):b.after(A),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),A.remove(),b.unbind("keydown",q),f.unbind("click",p)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,B.minDate)<0||a.watchData.maxDate&&a.compare(b,B.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,r):null;b.val(d),z.$setViewValue(d),s&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.$watch("isOpen",function(c){c?(a.position=t?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){u&&a.$broadcast("uib:datepicker.focus"),f.bind("click",p)},0,!1)):f.unbind("click",p)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.datepicker").value("$datepickerSuppressWarning",!1).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","$datepickerSuppressWarning",function(a,b,c,d,e,f,g,h,i){i||e.warn("DatepickerController is now deprecated. Use UibDatepickerController instead.");var j=this,k={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){j[c]=angular.isDefined(b[c])?6>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){j[d]=a?new Date(a):null,j.refreshView()}):j[d]=g[d]?new Date(g[d]):null}),angular.forEach(["minMode","maxMode"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(c){j[d]=angular.isDefined(c)?c:b[d],a[d]=j[d],("minMode"==d&&j.modes.indexOf(a.datepickerMode)<j.modes.indexOf(j[d])||"maxMode"==d&&j.modes.indexOf(a.datepickerMode)>j.modes.indexOf(j[d]))&&(a.datepickerMode=j[d])}):(j[d]=g[d]||null,a[d]=j[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=a,j.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=k.$viewValue?new Date(k.$viewValue):null;k.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=k.$viewValue?new Date(k.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},this.fixTimeZone=function(a){var b=a.getHours();a.setHours(23===b?b+2:0)},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?new Date(k.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),k.$setViewValue(c),
336k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var l=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",l),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).directive("datepicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(c,d,e,f){b||a.warn("datepicker is now deprecated. Use uib-datepicker instead.");var g=f[0],h=f[1];g.init(h)}}}]).directive("daypicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/day.html",require:["^datepicker","daypicker"],controller:"UibDaypickerController",link:function(c,d,e,f){b||a.warn("daypicker is now deprecated. Use uib-daypicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("monthpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/month.html",require:["^datepicker","monthpicker"],controller:"UibMonthpickerController",link:function(c,d,e,f){b||a.warn("monthpicker is now deprecated. Use uib-monthpicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("yearpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/year.html",require:["^datepicker","yearpicker"],controller:"UibYearpickerController",link:function(c,d,e,f){b||a.warn("yearpicker is now deprecated. Use uib-yearpicker instead.");var g=f[0];angular.extend(g,f[1]),g.yearpickerInit(),g.refreshView()}}}]).directive("datepickerPopup",["$log","$datepickerSuppressWarning",function(a,b){return{require:["ngModel","datepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(c,d,e,f){b||a.warn("datepicker-popup is now deprecated. Use uib-datepicker-popup instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("datepickerPopupWrap",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"},link:function(){b||a.warn("datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.")}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.bind("click",d),a.bind("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.unbind("click",d),a.unbind("keydown",e))};var d=function(a){if(c&&(!a||"disabled"!==c.getAutoClose())){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&/(38|40)/.test(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.openClass,q=angular.noop,r=c.onToggle?d(c.onToggle):angular.noop,s=!1,t=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(m=d(c.isOpen),q=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),s=angular.isDefined(c.dropdownAppendToBody),t=angular.isDefined(c.uibKeyboardNav),s&&n.dropdownMenu&&(i.find("body").append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return t},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(s&&n.dropdownMenu){var e=h.positionElements(b,n.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},m=n.dropdownMenu.hasClass("dropdown-menu-right");
336m?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),n.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,p).then(function(){angular.isDefined(c)&&c!==d&&r(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var t=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(t),n.dropdownMenu=t}f.close(o),n.selectedOption=null}angular.isFunction(q)&&q(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)});var u=a.$on("$destroy",function(){o.$destroy()});o.$on("$destroy",u)}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"AC",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibKeyboardNav",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){b.bind("keydown",function(a){if(-1!==[38,40].indexOf(a.which)){a.preventDefault(),a.stopPropagation();var b=d.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(d.selectedOption)?d.selectedOption=d.selectedOption===b.length-1?d.selectedOption:d.selectedOption+1:d.selectedOption=0;break;case 38:angular.isNumber(d.selectedOption)?d.selectedOption=0===d.selectedOption?0:d.selectedOption-1:d.selectedOption=b.length-1}b[d.selectedOption].focus()}})}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.dropdown").value("$dropdownSuppressWarning",!1).service("dropdownService",["$log","$dropdownSuppressWarning","uibDropdownService",function(a,b,c){b||a.warn("dropdownService is now deprecated. Use uibDropdownService instead."),angular.extend(this,c)}]).controller("DropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest","$log","$dropdownSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m){m||l.warn("DropdownController is now deprecated. Use UibDropdownController instead.");var n,o,p=this,q=a.$new(),r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(o=d(c.isOpen),s=o.assign,a.$watch(o,function(a){q.isOpen=!!a})),u=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.uibKeyboardNav),u&&p.dropdownMenu&&(i.find("body").append(p.dropdownMenu),b.on("$destroy",function(){p.dropdownMenu.remove()}))},this.toggle=function(a){return q.isOpen=arguments.length?!!a:!q.isOpen},this.isOpen=function(){return q.isOpen},q.getToggleElement=function(){return p.toggleElement},q.getAutoClose=function(){return c.autoClose||"always"},q.getElement=function(){return b},q.isKeynavEnabled=function(){return v},q.focusDropdownEntry=function(a){var c=p.dropdownMenu?angular.element(p.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(p.selectedOption)?p.selectedOption=p.selectedOption===c.length-1?p.selectedOption:p.selectedOption+1:p.selectedOption=0;break;case 38:angular.isNumber(p.selectedOption)?p.selectedOption=0===p.selectedOption?0:p.selectedOption-1:p.selectedOption=c.length-1}c[p.selectedOption].focus()},q.getDropdownElement=function(){return p.dropdownMenu},q.focusToggleElement=function(){p.toggleElement&&p.toggleElement[0].focus()},q.$watch("isOpen",function(c,d){if(u&&p.dropdownMenu){var e=h.positionElements(b,p.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},l=p.dropdownMenu.hasClass("dropdown-menu-right");
336l?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),p.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,r).then(function(){angular.isDefined(c)&&c!==d&&t(a,{open:!!c})}),c)p.dropdownMenuTemplateUrl&&k(p.dropdownMenuTemplateUrl).then(function(a){n=q.$new(),j(a.trim())(n,function(a){var b=a;p.dropdownMenu.replaceWith(b),p.dropdownMenu=b})}),q.focusToggleElement(),f.open(q);else{if(p.dropdownMenuTemplateUrl){n&&n.$destroy();var m=angular.element('<ul class="dropdown-menu"></ul>');p.dropdownMenu.replaceWith(m),p.dropdownMenu=m}f.close(q),p.selectedOption=null}angular.isFunction(s)&&s(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==q.getAutoClose()&&(q.isOpen=!1)});var w=a.$on("$destroy",function(){q.$destroy()});q.$on("$destroy",w)}]).directive("dropdown",["$log","$dropdownSuppressWarning",function(a,b){return{controller:"DropdownController",link:function(c,d,e,f){b||a.warn("dropdown is now deprecated. Use uib-dropdown instead."),f.init()}}}]).directive("dropdownMenu",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"AC",require:"?^dropdown",link:function(c,d,e,f){if(f&&!angular.isDefined(e.dropdownNested)){b||a.warn("dropdown-menu is now deprecated. Use uib-dropdown-menu instead."),d.addClass("dropdown-menu");var g=e.templateUrl;g&&(f.dropdownMenuTemplateUrl=g),f.dropdownMenu||(f.dropdownMenu=d)}}}}]).directive("keyboardNav",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"A",require:"?^dropdown",link:function(c,d,e,f){b||a.warn("keyboard-nav is now deprecated. Use uib-keyboard-nav instead."),d.bind("keydown",function(a){if(-1!==[38,40].indexOf(a.which)){a.preventDefault(),a.stopPropagation();var b=f.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(f.selectedOption)?f.selectedOption=f.selectedOption===b.length-1?f.selectedOption:f.selectedOption+1:f.selectedOption=0;break;case 38:angular.isNumber(f.selectedOption)?f.selectedOption=0===f.selectedOption?0:f.selectedOption-1:f.selectedOption=b.length-1}b[f.selectedOption].focus()}})}}}]).directive("dropdownToggle",["$log","$dropdownSuppressWarning",function(a,b){return{require:"?^dropdown",link:function(c,d,e,f){if(b||a.warn("dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead."),f){d.addClass("dropdown-toggle"),f.toggleElement=d;var g=function(a){a.preventDefault(),d.hasClass("disabled")||e.disabled||c.$apply(function(){f.toggle()})};d.bind("click",g),d.attr({"aria-haspopup":!0,"aria-expanded":!1}),c.$watch(f.isOpen,function(a){d.attr("aria-expanded",!!a)}),c.$on("$destroy",function(){d.unbind("click",g)})}}}}]),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,f){d.addClass("modal-backdrop"),f.modalInClass&&(e?e(d,{addClass:f.modalInClass}).start():a.addClass(d,f.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(b,c){var g=c();e?e(d,{removeClass:f.modalInClass}).start().then(g):a.removeClass(d,f.modalInClass).then(g)}))}var e=null;return b.has("$animateCss")&&(e=b.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animate","$injector",function(a,b,c,d){var e=null;return d.has("$animateCss")&&(e=d.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),d.size=g.size,d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",d.close),d.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"==a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=e?e(f,{addClass:g.modalInClass}).start():c.addClass(f,g.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();e?e(f,{removeClass:g.modalInClass}).start().then(d):c.removeClass(f,g.modalInClass).then(d)})),b.when(h).then(function(){var a=f[0].querySelector("[autofocus]");a?a.focus():f[0].focus()});var i=a.getTop();i&&a.modalRendered(i.key)})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap",function(a,b,c,d,e,f,g,h,i){function j(){for(var a=-1,b=u.keys(),c=0;c<b.length;c++)u.get(b[c]).value.backdrop&&(a=c);return a}function k(a,b){var d=c.find("body").eq(0),e=u.get(a).value;u.remove(a),n(e.modalDomEl,e.modalScope,function(){var b=e.openedClass||t;v.remove(b,a),d.toggleClass(b,v.hasKey(b)),l(!0)}
336),m(),b&&b.focus?b.focus():d.focus()}function l(a){var b;u.length()>0&&(b=u.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function m(){if(q&&-1==j()){var a=r;n(q,r,function(){a=null}),q=void 0,r=void 0}}function n(b,c,d){function e(){e.done||(e.done=!0,p?p(b,{event:"leave"}).start().then(function(){b.remove()}):a.leave(b),c.$destroy(),d&&d())}var g,h=null,i=function(){return g||(g=f.defer(),h=g.promise),function(){g.resolve()}};return c.$broadcast(w.NOW_CLOSING_EVENT,i),f.when(h).then(e)}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p=null;g.has("$animateCss")&&(p=g.get("$animateCss"));var q,r,s,t="modal-open",u=i.createNew(),v=h.createNew(),w={NOW_CLOSING_EVENT:"modal.stack.now-closing"},x=0,y="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(j,function(a){r&&(r.index=a)}),c.bind("keydown",function(a){if(a.isDefaultPrevented())return a;var b=u.top();if(b&&b.value.keyboard)switch(a.which){case 27:a.preventDefault(),e.$apply(function(){w.dismiss(b.key,"escape key press")});break;case 9:w.loadFocusElementList(b);var c=!1;a.shiftKey?w.isFocusInFirstItem(a)&&(c=w.focusLastFocusableElement()):w.isFocusInLastItem(a)&&(c=w.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}),w.open=function(a,b){var f=c[0].activeElement,g=b.openedClass||t;l(!1),u.add(a,{deferred:b.deferred,renderDeferred:b.renderDeferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard,openedClass:b.openedClass,windowTopClass:b.windowTopClass}),v.put(g,a);var h=c.find("body").eq(0),i=j();if(i>=0&&!q){r=e.$new(!0),r.index=i;var k=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');k.attr("backdrop-class",b.backdropClass),b.animation&&k.attr("modal-animation","true"),q=d(k)(r),h.append(q)}var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,"window-top-class":b.windowTopClass,size:b.size,index:u.length()-1,animate:"animate"}).html(b.content),b.animation&&m.attr("modal-animation","true");var n=d(m)(b.scope);u.top().value.modalDomEl=n,u.top().value.modalOpener=f,h.append(n),h.addClass(g),w.clearFocusListCache()},w.close=function(a,b){var c=u.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),k(a,c.value.modalOpener),!0):!c},w.dismiss=function(a,b){var c=u.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),k(a,c.value.modalOpener),!0):!c},w.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},w.getTop=function(){return u.top()},w.modalRendered=function(a){var b=u.get(a);b&&b.value.renderDeferred.resolve()},w.focusFirstFocusableElement=function(){return s.length>0?(s[0].focus(),!0):!1},w.focusLastFocusableElement=function(){return s.length>0?(s[s.length-1].focus(),!0):!1},w.isFocusInFirstItem=function(a){return s.length>0?(a.target||a.srcElement)==s[0]:!1},w.isFocusInLastItem=function(a){return s.length>0?(a.target||a.srcElement)==s[s.length-1]:!1},w.clearFocusListCache=function(){s=[],x=0},w.loadFocusElementList=function(a){if((void 0===s||!s.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(s=b[0].querySelectorAll(y))}},w}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$uibModalStack","$modalSuppressWarning","$log",function(b,c,d,e,f,g,h,i){function j(a){return a.template?d.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}function k(a){var c=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?c.push(d.when(b.invoke(a))):angular.isString(a)?c.push(d.when(b.get(a))):c.push(d.when(a))}),c}var l={},m=null;return l.getPromiseChain=function(){return m},l.open=function(b){function e(){return r}var l=d.defer(),n=d.defer(),o=d.defer(),p={result:l.promise,opened:n.promise,rendered:o.promise,close:function(a){return g.close(p,a)}
336,dismiss:function(a){return g.dismiss(p,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=d.all([j(b)].concat(k(b.resolve)));return q=m=d.all([m]).then(e,e).then(function(a){var d=(b.scope||c).$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var e,j={},k=1;b.controller&&(j.$scope=d,j.$uibModalInstance=p,Object.defineProperty(j,"$modalInstance",{get:function(){return h||i.warn("$modalInstance is now deprecated. Use $uibModalInstance instead."),p}}),angular.forEach(b.resolve,function(b,c){j[c]=a[k++]}),e=f(b.controller,j),b.controllerAs&&(b.bindToController&&angular.extend(e,d),d[b.controllerAs]=e)),g.open(p,{scope:d,deferred:l,renderDeferred:o,content:a[0],animation:b.animation,backdrop:b.backdrop,keyboard:b.keyboard,backdropClass:b.backdropClass,windowTopClass:b.windowTopClass,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size,openedClass:b.openedClass}),n.resolve(!0)},function(a){n.reject(a),l.reject(a)})["finally"](function(){m===q&&(m=null)}),p},l}]};return a}),angular.module("ui.bootstrap.modal").value("$modalSuppressWarning",!1).directive("modalBackdrop",["$animate","$injector","$modalStack","$log","$modalSuppressWarning",function(a,b,c,d,e){function f(b,f,h){e||d.warn("modal-backdrop is now deprecated. Use uib-modal-backdrop instead."),f.addClass("modal-backdrop"),h.modalInClass&&(g?g(f,{addClass:h.modalInClass}).start():a.addClass(f,h.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(b,c){var d=c();g?g(f,{removeClass:h.modalInClass}).start().then(d):a.removeClass(f,h.modalInClass).then(d)}))}var g=null;return b.has("$animateCss")&&(g=b.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),f}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector","$log","$modalSuppressWarning",function(a,b,c,d,e,f){var g=null;return d.has("$animateCss")&&(g=d.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,h,i){f||e.warn("modal-window is now deprecated. Use uib-modal-window instead."),h.addClass(i.windowClass||""),h.addClass(i.windowTopClass||""),d.size=i.size,d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},h.on("click",d.close),d.$isRendered=!0;var j=b.defer();i.$observe("modalRender",function(a){"true"==a&&j.resolve()}),j.promise.then(function(){var e=null;i.modalInClass&&(e=g?g(h,{addClass:i.modalInClass}).start():c.addClass(h,i.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();g?g(h,{removeClass:i.modalInClass}).start().then(d):c.removeClass(h,i.modalInClass).then(d)})),b.when(e).then(function(){var a=h[0].querySelector("[autofocus]");a?a.focus():h[0].focus()});var f=a.getTop();f&&a.modalRendered(f.key)})}}}]).directive("modalAnimationClass",["$log","$modalSuppressWarning",function(a,b){return{compile:function(c,d){b||a.warn("modal-animation-class is now deprecated. Use uib-modal-animation-class instead."),d.modalAnimation&&c.addClass(d.modalAnimationClass)}}}]).directive("modalTransclude",["$log","$modalSuppressWarning",function(a,b){return{link:function(c,d,e,f,g){b||a.warn("modal-transclude is now deprecated. Use uib-modal-transclude instead."),g(c.$parent,function(a){d.empty(),d.append(a)})}}}]).service("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap","$uibModalStack","$log","$modalSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l){l||k.warn("$modalStack is now deprecated. Use $uibModalStack instead."),angular.extend(this,j)}]).provider("$modal",["$uibModalProvider",function(a){angular.extend(this,a),this.$get=["$injector","$log","$modalSuppressWarning",function(b,c,d){return d||c.warn("$modal is now deprecated. Use $uibModal instead."),b.invoke(a.$get)}]}]),angular.module("ui.bootstrap.pagination",[]).controller("UibPaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(g,h){e=g,this.config=h,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=h.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];
336g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.pagination").value("$paginationSuppressWarning",!1).controller("PaginationController",["$scope","$attrs","$parse","$log","$paginationSuppressWarning",function(a,b,c,d,e){e||d.warn("PaginationController is now deprecated. Use UibPaginationController instead.");var f=this,g={$setViewValue:angular.noop},h=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(d,e){g=d,this.config=e,g.$render=function(){f.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){f.itemsPerPage=parseInt(b,10),a.totalPages=f.calculateTotalPages()}):this.itemsPerPage=e.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=f.calculateTotalPages()}),a.$watch("totalPages",function(b){h(a.$parent,b),a.page>b?a.selectPage(b):g.$render()})},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(g.$viewValue,10)||1},a.selectPage=function(b,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),g.$setViewValue(b),g.$render())},a.getText=function(b){return a[b+"Text"]||f.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).directive("pagination",["$parse","uibPaginationConfig","$log","$paginationSuppressWarning",function(a,b,c,d){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(e,f,g,h){function i(a,b,c){return{number:a,text:b,active:c}}function j(a,b){var c=[],d=1,e=b,f=angular.isDefined(m)&&b>m;f&&(n?(d=Math.max(a-Math.floor(m/2),1),e=d+m-1,e>b&&(e=b,d=e-m+1)):(d=(Math.ceil(a/m)-1)*m+1,e=Math.min(d+m-1,b)));for(var g=d;e>=g;g++){var h=i(g,g,g===a);c.push(h)}if(f&&!n){if(d>1){var j=i(d-1,"...",!1);c.unshift(j)}if(b>e){var k=i(e+1,"...",!1);c.push(k)}}return c}d||c.warn("pagination is now deprecated. Use uib-pagination instead.");var k=h[0],l=h[1];if(l){var m=angular.isDefined(g.maxSize)?e.$parent.$eval(g.maxSize):b.maxSize,n=angular.isDefined(g.rotate)?e.$parent.$eval(g.rotate):b.rotate;e.boundaryLinks=angular.isDefined(g.boundaryLinks)?e.$parent.$eval(g.boundaryLinks):b.boundaryLinks,e.directionLinks=angular.isDefined(g.directionLinks)?e.$parent.$eval(g.directionLinks):b.directionLinks,k.init(l,b),g.maxSize&&e.$parent.$watch(a(g.maxSize),function(a){m=parseInt(a,10),k.render()});var o=k.render;k.render=function(){o(),e.page>0&&e.page<=e.totalPages&&(e.pages=j(e.page,e.totalPages))}}}}}]).directive("pager",["uibPagerConfig","$log","$paginationSuppressWarning",function(a,b,c){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(d,e,f,g){c||b.warn("pager is now deprecated. Use uib-pager instead.");var h=g[0],i=g[1];i&&(d.align=angular.isDefined(f.align)?d.$parent.$eval(f.align):a.align,h.init(i,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){var n=m.createNew();return h.on("keypress",function(a){if(27===a.which){var b=n.top();b&&(b.value.close(),n.removeTop(),b=null)}}),function(e,k,m,o){function p(a){var b=(a||o.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}o=angular.extend({},b,d,o);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup title="'+r+"title"+s+'" '+(o.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen"origin-scope="origScope" style="visibility: hidden; display: block; top: -9999px; left: -9999px;"></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){L.isOpen?q():m()}function m(){(!K||a.$eval(d[k+"Enable"]))&&(u(),x(),L.popupDelay?F||(F=g(r,
336L.popupDelay,!1)):r())}function q(){s(),L.popupCloseDelay?G||(G=g(t,L.popupCloseDelay,!1)):t()}function r(){return s(),u(),L.content?(v(),void L.$evalAsync(function(){L.isOpen=!0,y(!0),Q()})):angular.noop}function s(){F&&(g.cancel(F),F=null),H&&(g.cancel(H),H=null)}function t(){s(),u(),L&&L.$evalAsync(function(){L.isOpen=!1,y(!1),L.animation?E||(E=g(w,150,!1)):w()})}function u(){G&&(g.cancel(G),G=null),E&&(g.cancel(E),E=null)}function v(){C||(D=L.$new(),C=c(D,function(a){I?h.find("body").append(a):b.after(a)}),z())}function w(){A(),E=null,C&&(C.remove(),C=null),D&&(D.$destroy(),D=null)}function x(){L.title=d[k+"Title"],O?L.content=O(a):L.content=d[e],L.popupClass=d[k+"Class"],L.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:o.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);L.popupDelay=isNaN(b)?o.popupDelay:b,L.popupCloseDelay=isNaN(c)?o.popupCloseDelay:c}function y(b){N&&angular.isFunction(N.assign)&&N.assign(a,b)}function z(){P.length=0,O?(P.push(a.$watch(O,function(a){L.content=a,!a&&L.isOpen&&t()})),P.push(D.$watch(function(){M||(M=!0,D.$$postDigest(function(){M=!1,L&&L.isOpen&&Q()}))}))):P.push(d.$observe(e,function(a){L.content=a,!a&&L.isOpen?t():Q()})),P.push(d.$observe(k+"Title",function(a){L.title=a,L.isOpen&&Q()})),P.push(d.$observe(k+"Placement",function(a){L.placement=a?a:o.placement,L.isOpen&&Q()}))}function A(){P.length&&(angular.forEach(P,function(a){a()}),P.length=0)}function B(){var a=d[k+"Trigger"];R(),J=p(a),"none"!==J.show&&J.show.forEach(function(a,c){a===J.hide[c]?b[0].addEventListener(a,j):a&&(b[0].addEventListener(a,m),J.hide[c].split(" ").forEach(function(a){b[0].addEventListener(a,q)})),b.on("keypress",function(a){27===a.which&&q()})})}var C,D,E,F,G,H,I=angular.isDefined(o.appendToBody)?o.appendToBody:!1,J=p(void 0),K=angular.isDefined(d[k+"Enable"]),L=a.$new(!0),M=!1,N=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,O=o.useContentExp?l(d[e]):!1,P=[],Q=function(){C&&C.html()&&(H||(H=g(function(){C.css({top:0,left:0});var a=i.positionElements(b,C,L.placement,I);a.top+="px",a.left+="px",a.visibility="visible",C.css(a),H=null},0,!1)))};L.origScope=a,L.isOpen=!1,n.add(L,{close:t}),L.contentExp=function(){return L.content},d.$observe("disabled",function(a){a&&s(),a&&L.isOpen&&t()}),N&&a.$watch(N,function(a){L&&!a===L.isOpen&&j()});var R=function(){J.show.forEach(function(a){b.unbind(a,m)}),J.hide.forEach(function(a){a.split(" ").forEach(function(a){b[0].removeEventListener(a,q)})})};B();var S=a.$eval(d[k+"Animation"]);L.animation=angular.isDefined(S)?!!S:o.animation;var T=a.$eval(d[k+"AppendToBody"]);I=angular.isDefined(T)?T:I,I&&a.$on("$locationChangeSuccess",function(){L.isOpen&&t()}),a.$on("$destroy",function(){s(),u(),R(),w(),n.remove(L),L=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",function(){return{restrict:"A",link:function(a,b,c){a.placement&&b.addClass(a.placement),a.popupClass&&b.addClass(a.popupClass),a.animation()&&b.addClass(c.tooltipAnimationClass)}}}).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.tooltip").value("$tooltipSuppressWarning",!1).provider("$tooltip",["$uibTooltipProvider",function(a){angular.extend(this,a),this.$get=["$log","$tooltipSuppressWarning","$injector",function(b,c,d){return c||b.warn("$tooltip is now deprecated. Use $uibTooltip instead."),d.invoke(a.$get)}]}]).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest","$log","$tooltipSuppressWarning",function(a,b,c,d,e,f){return{link:function(g,h,i){f||e.
336warn("tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.");var j,k,l,m=g.$eval(i.tooltipTemplateTranscludeScope),n=0,o=function(){k&&(k.remove(),k=null),j&&(j.$destroy(),j=null),l&&(a.leave(l).then(function(){k=null}),k=l,l=null)};g.$watch(b.parseAsResourceUrl(i.tooltipTemplateTransclude),function(b){var e=++n;b?(d(b,!0).then(function(d){if(e===n){var f=m.$new(),g=d,i=c(g)(f,function(b){o(),a.enter(b,h)});j=f,l=i,j.$emit("$includeContentLoaded",b)}},function(){e===n&&(o(),g.$emit("$includeContentError",b))}),g.$emit("$includeContentRequested",b)):o()}),g.$on("$destroy",o)}}}]).directive("tooltipClasses",["$log","$tooltipSuppressWarning",function(a,b){return{restrict:"A",link:function(c,d,e){b||a.warn("tooltip-classes is now deprecated. Use uib-tooltip-classes instead."),c.placement&&d.addClass(c.placement),c.popupClass&&d.addClass(c.popupClass),c.animation()&&d.addClass(e.tooltipAnimationClass)}}}]).directive("tooltipPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(c,d){b||a.warn("tooltip-popup is now deprecated. Use uib-tooltip-popup instead."),d.addClass("tooltip")}}}]).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(c,d){b||a.warn("tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipTemplate",["$tooltip",function(a){return a("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(c,d){b||a.warn("tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipHtml",["$tooltip",function(a){return a("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.popover").value("$popoverSuppressWarning",!1).directive("popoverTemplatePopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(c,d){b||a.warn("popover-template-popup is now deprecated. Use uib-popover-template-popup instead."),d.addClass("popover")}}}]).directive("popoverTemplate",["$tooltip",function(a){return a("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(c,d){b||a.warn("popover-html-popup is now deprecated. Use uib-popover-html-popup instead."),d.addClass("popover")}}}]).directive("popoverHtml",["$tooltip",function(a){return a("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(c,d){b||a.warn("popover-popup is now deprecated. Use uib-popover-popup instead."),d.addClass("popover")}}}]).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEac
336h(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.progressbar").value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","uibProgressConfig","$log","$progressSuppressWarning",function(a,b,c,d,e){e||d.warn("ProgressController is now deprecated. Use UibProgressController instead.");var f=this,g=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,d){g||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=d&&angular.isDefined(d.title)?d.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){b.percent=+(100*b.value/b.max).toFixed(2);var a=f.bars.reduce(function(a,b){return a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,f.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)},a.$watch("max",function(b){f.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("progress",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?",title:"@?"},templateUrl:"template/progressbar/progress.html",link:function(){b||a.warn("progress is now deprecated. Use uib-progress instead.")}}}]).directive("bar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(c,d,e,f){b||a.warn("bar is now deprecated. Use uib-bar instead."),f.addBar(c,d)}}}]).directive("progressbar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(c,d,e,f){b||a.warn("progressbar is now deprecated. Use uib-progressbar instead."),f.addBar(c,angular.element(d.children()[0]),{title:e.title})}}}]),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.rating").value("$ratingSuppressWarning",!1).controller("RatingController",["$scope","$attrs","$controller","$log","$ratingSuppressWarning",function(a,b,c,d,e){e||d.warn("RatingController is now deprecated. Use UibRatingController instead."),angular.extend(this,c("UibRatingController",{$scope:a,$attrs:b}))}]).directive("rating",["$log","$ratingSuppressWarning",function(a,b){return{require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(c,d,e,f){b||a.warn("rating is now deprecated. Use uib-rating instead.");var g=f[0],h=f[1];g.init(h)}}}]),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e==c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:["?^uibTab","?^tab"],link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase()||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:["?^uibTabset","?^tabset"],link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.tabs").value("$tabsSuppressWarning",!1).controller("TabsetController",["$scope","$controller","$log","$tabsSuppressWarning",function(a,b,c,d){d||c.warn("TabsetController is now deprecated. Use UibTabsetController instead."),angular.extend(this,b("UibTabsetController",{$scope:a}))}]).directive("tabset",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(c,d,e){b||a.warn("tabset is now deprecated. Use uib-tabset instead."),c.vertical=angular.isDefined(e.vertical)?c.$parent.$eval(e.vertical):!1,c.justified=angular.isDefined(e.justified)?c.$parent.$eval(e.justified):!1}}}]).directive("tab",["$parse","$log","$tabsSuppressWarning",function(a,b,c){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(d,e,f,g,h){c||b.warn("tab is now deprecated. Use uib-tab instead."),d.$watch("active",function(a){a&&g.select(d)}),d.disabled=!1,f.disable&&d.$parent.$watch(a(f.disable),function(a){d.disabled=!!a}),d.select=function(){d.disabled||(d.active=!0)},g.addTab(d),d.$on("$destroy",function(){g.removeTab(d)}),d.$transcludeFn=h}}}]).directive("tabHeadingTransclude",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"A",require:"^tab",link:function(c,d){b||a.warn("tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead."),c.$watch("headingElement",function(a){a&&(d.html(""),d.append(a))})}}}]).directive("tabContentTransclude",["$log","$tabsSuppressWarning",function(a,b){function c(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(d,e,f){b||a.warn("tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.");var g=d.$eval(f.tabContentTransclude);g.$transcludeFn(g.$parent,function(a){angular.forEach(a,function(a){c(a)?g.headingElement=a:e.append(a)})})}}}
336]),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===r[1]&&(b+=12)),b):void 0}function i(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function j(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function k(a){l(),q.$setViewValue(new Date(p)),m(a)}function l(){q.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function m(b){var c=p.getHours(),d=p.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:j(c),"m"!==b&&(a.minutes=j(d)),a.meridian=p.getHours()<12?r[0]:r[1]}function n(a,b){var c=new Date(a.getTime()+6e4*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes()),d}function o(a){p=n(p,a),k()}var p=new Date,q={$setViewValue:angular.noop},r=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){q=b,q.$render=this.render,q.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;h&&this.setupMousewheelEvents(e,f);var i=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;i&&this.setupArrowkeyEvents(e,f),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f)};var s=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){s=parseInt(a,10)});var t=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){t=parseInt(a,10)});var u;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);u=isNaN(b)?void 0:b});var v;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);v=isNaN(b)?void 0:b}),a.noIncrementHours=function(){var a=n(p,60*s);return a>v||p>a&&u>a},a.noDecrementHours=function(){var a=n(p,60*-s);return u>a||a>p&&a>v},a.noIncrementMinutes=function(){var a=n(p,t);return a>v||p>a&&u>a},a.noDecrementMinutes=function(){var a=n(p,-t);return u>a||a>p&&a>v},a.noToggleMeridian=function(){return p.getHours()<13?n(p,720)>v:n(p,-720)<u},a.showMeridian=g.showMeridian,c.showMeridian&&a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,q.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(p.setHours(c),k())}else m()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c){b.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply())}),c.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply())})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){q.$setViewValue(null),q.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=h(),b=i();angular.isDefined(a)&&angular.isDefined(b)?(p.setHours(a),u>p||p>v?d(!0):k("h")):d(!0)},b.bind("blur",function(b){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=j(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();angular.isDefined(a)&&angular.isDefined(b)?(p.setMinutes(a),u>p||p>v?d(void 0,!0):k("m")):d(void 0,!0)},c.bind("blur",function(b){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=j(a.minutes)})})},this.render=function(){var b=q.$viewValue;isNaN(b)?(q.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(p=b),u>
336p||p>v?(q.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):l(),m())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*s)},a.decrementHours=function(){a.noDecrementHours()||o(60*-s)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(t)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(-t)},a.toggleMeridian=function(){a.noToggleMeridian()||o(720*(p.getHours()<12?1:-1))}}]).directive("uibTimepicker",function(){return{restrict:"EA",require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.templateUrl||"template/timepicker/timepicker.html"},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.timepicker").value("$timepickerSuppressWarning",!1).controller("TimepickerController",["$scope","$element","$attrs","$controller","$log","$timepickerSuppressWarning",function(a,b,c,d,e,f){f||e.warn("TimepickerController is now deprecated. Use UibTimepickerController instead."),angular.extend(this,d("UibTimepickerController",{$scope:a,$element:b,$attrs:c}))}]).directive("timepicker",["$log","$timepickerSuppressWarning",function(a,b){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.templateUrl||"template/timepicker/timepicker.html"},link:function(c,d,e,f){b||a.warn("timepicker is now deprecated. Use uib-timepicker instead.");var g=f[0],h=f[1];h&&g.init(h,d.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){K.moveInProgress||(K.moveInProgress=!0,K.$digest()),S&&g.cancel(S),S=g(function(){K.matches.length&&n(),K.moveInProgress=!1},r)}function n(){K.position=C?k.offset(b):k.position(b),K.position.top+=b.prop("offsetHeight")}var o,p,q=[9,13,27,38,40],r=200,s=a.$eval(c.typeaheadMinLength);s||0===s||(s=1);var t,u,v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1,x=e(c.typeaheadLoading).assign||angular.noop,y=e(c.typeaheadOnSelect),z=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,A=e(c.typeaheadNoResults).assign||angular.noop,B=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,C=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,D=c.typeaheadAppendToElementId||!1,E=a.$eval(c.typeaheadFocusFirst)!==!1,F=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,G=e(c.ngModel),H=e(c.ngModel+"($$$p)"),I=function(b,c){return angular.isFunction(G(a))&&p&&p.$options&&p.$options.getterSetter?H(b,{$$$p:c}):G.assign(b,c)},J=l.parse(c.uibTypeahead),K=a.$new(),L=a.$on("$destroy",function(){K.$destroy()});K.$on("$destroy",L);var M="typeahead-"+K.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":M});var N=angular.element("<div uib-typeahead-popup></div>");N.attr({id:M,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&N.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&N.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var O=function(){K.matches=[],K.activeIdx=-1,b.attr("aria-expanded",!1)},P=function(a){return M+"-option-"+a};K.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",P(a))});var Q=function(a,b){return K.matches.length>b&&a?a.toUpperCase()===K.matches[b].label.toUpperCase():!1},R=function(c){var d={$viewValue:c};x(a,!0),A(a,!1),f.when(J.source(a,d)).then(function(e){var f=c===o.$viewValue;if(f&&t)if(e&&e.length>0){K.activeIdx=E?0:-1,A(a,!1),K.matches.length=0;for(var g=0;g<e.length;g++)d[J.itemName]=e[g],K.matches.push({id:P(g),label:J.viewMapper(K,d),model:e[g]});K.query=c,n(),b.attr("aria-expanded",!0),F&&1===K.matches.length&&Q(c,0)&&K.select(0)}else O(),A(a,!0);f&&x(a,!1)},function(){O(),x(a,!1),A(a,!0)})};C&&(angular.element(i).bind("resize",m),h.find("body").bind("scroll",m));var S;K.moveInProgress=!1,K.query=void 0;var T,U=function(a){T=g(function(){R(a)},v)},V=function(){T&&g.cancel(T)};O(),K.select=function(d){var e,f,h={};u=!0,h[J.itemName]=f=K.matches[d].model,e=J.modelMapper(a,h),I(a,e),o.$setValidity("editable",!0),o.$setValidity("parse",!0),y(a,{$item:f,$model:e,$label:J.viewMapper(a,h)}),O(),K.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)}
336,b.bind("keydown",function(a){if(0!==K.matches.length&&-1!==q.indexOf(a.which)){if(-1===K.activeIdx&&(9===a.which||13===a.which))return O(),void K.$digest();a.preventDefault(),40===a.which?(K.activeIdx=(K.activeIdx+1)%K.matches.length,K.$digest()):38===a.which?(K.activeIdx=(K.activeIdx>0?K.activeIdx:K.matches.length)-1,K.$digest()):13===a.which||9===a.which?K.$apply(function(){K.select(K.activeIdx)}):27===a.which&&(a.stopPropagation(),O(),K.$digest())}}),b.bind("blur",function(){z&&K.matches.length&&-1!==K.activeIdx&&!u&&(u=!0,K.$apply(function(){K.select(K.activeIdx)})),t=!1,u=!1});var W=function(a){b[0]!==a.target&&3!==a.which&&0!==K.matches.length&&(O(),j.$$phase||K.$digest())};h.bind("click",W),a.$on("$destroy",function(){h.unbind("click",W),(C||D)&&X.remove(),C&&(angular.element(i).unbind("resize",m),h.find("body").unbind("scroll",m)),N.remove()});var X=d(N)(K);C?h.find("body").append(X):D!==!1?angular.element(h[0].getElementById(D)).append(X):b.after(X),this.init=function(b,c){o=b,p=c,o.$parsers.unshift(function(b){return t=!0,0===s||b&&b.length>=s?v>0?(V(),U(b)):R(b):(x(a,!1),V(),O()),w?b:b?void o.$setValidity("editable",!1):(o.$setValidity("editable",!0),null)}),o.$formatters.push(function(b){var c,d,e={};return w||o.$setValidity("editable",!0),B?(e.$model=b,B(a,e)):(e[J.itemName]=b,c=J.viewMapper(a,e),e[J.itemName]=void 0,d=J.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",function(){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"template/typeahead/typeahead-match.html";a(g).then(function(a){b(a.trim())(d,function(a){e.replaceWith(a)})})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.typeahead").value("$typeaheadSuppressWarning",!1).service("typeaheadParser",["$parse","uibTypeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d){return d||c.warn("typeaheadParser is now deprecated. Use uibTypeaheadParser instead."),b}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","typeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k){var l=[9,13,27,38,40],m=200;return{require:["ngModel","^?ngModelOptions"],link:function(n,o,p,q){function r(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),V&&d.cancel(V),V=d(function(){N.matches.length&&s(),N.moveInProgress=!1},m)}function s(){N.position=F?h.offset(o):h.position(o),N.position.top+=o.prop("offsetHeight")}k||j.warn("typeahead is now deprecated. Use uib-typeahead instead.");var t=q[0],u=q[1],v=n.$eval(p.typeaheadMinLength);v||0===v||(v=1);var w,x,y=n.$eval(p.typeaheadWaitMs)||0,z=n.$eval(p.typeaheadEditable)!==!1,A=b(p.typeaheadLoading).assign||angular.noop,B=b(p.typeaheadOnSelect),C=angular.isDefined(p.typeaheadSelectOnBlur)?n.$eval(p.typeaheadSelectOnBlur):!1,D=b(p.typeaheadNoResults).assign||angular.noop,E=p.typeaheadInputFormatter?b(p.typeaheadInputFormatter):void 0,F=p.typeaheadAppendToBody?n.$eval(p.typeaheadAppendToBody):!1,G=p.typeaheadAppendToElementId||!1,H=n.$eval(p.typeaheadFocusFirst)!==!1,I=p.typeaheadSelectOnExact?n.$eval(p.typeaheadSelectOnExact):!1,J=b(p.ngModel),K=b(p.ngModel+"($$$p)"),L=function(a,b){return angular.isFunction(J(n))&&u&&u.$options&&u.$options.getterSetter?K(a,{$$$p:b}):J.assign(a,b)},M=i.parse(p.typeahead),N=n.$new(),O=n.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());o.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q=angular.element("<div typeahead-popup></div>");Q.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(p.typeaheadTemplateUrl)&&Q.attr("template-url",p.typeaheadTemplateUrl),angular.isDefined(p.typeaheadPopupTemplateUrl)&&Q.attr("popup-template-url",p.typeaheadPopupTemplateUrl);var R=function(){N.matches=[],N.activeIdx=-1,o.attr("aria-expanded",!1)},S=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?o.removeAttr("aria-activedescendant"):o.attr("aria-activedescendant",S(a))});var T=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},U=function(a){var b={$viewValue:a};A(n,!0),D(n,!1),c.when(M.source(n,b)).then(function(c){var d=a===t.$viewValue;if(d&&w)if(c&&c.length>0){N.activeIdx=H?0:-1,D(n,!1),N.matches.length=0;for(var e=0;e<c.length;e++)b[M.itemName]=c[e],N.matches.push({id:S(e),label:M.viewMapper(N,b),model:c[e]});N.query=a,s(),o.attr("aria-expanded",!0),I&&1===N.matches.length&&T(a,0)&&N.select(0)}else R(),D(n,!0);d&&A(n,!1)},function(){R(),A(n,!1),D(n,!0)})};F&&(angular.element(f).bind("resize",r),e.find("body").bind("scroll",r));var V;N.moveInProgress=!1,R(),N.query=void 0;var W,X=function(a){W=d(function(){U(a)},y)},Y=function(){W&&d.cancel(W)};t.$parsers.unshift(function(a){return w=!0,0===v||a&&a.length>=v?y>0?(Y(),X(a)):U(a):(A(n,!1),Y(),R()),z?a:a?void t.$setValidity("editable",!1):(t.$setValidity("editable",!0),null)}),t.$formatters.push(function(a){var b,c,d={};return z||t.$setValidity("editable",!0),E?(d.$model=a,E(n,d)):(d[M.itemName]=a,b=M.viewMapper(n,d),d[M.itemName]=void 0,c=M.viewMapper(n,d),b!==c?b:a)}),N.select=function(a){var b,c,e={};x=!0,e[M.itemName]=c=N.matches[a].model,b=M.modelMapper(n,e),L(n,b),t.$setValidity("editable",!0),t.$setValidity("parse",!0),B(n,{$item:c,$model:b,$label:M.viewMapper(n,e)}),R(),N.$eval(p.typeaheadFocusOnSelect)!==!1&&d(function(){o[0].focus()},0,!1)}
336,o.bind("keydown",function(a){if(0!==N.matches.length&&-1!==l.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return R(),void N.$digest();a.preventDefault(),40===a.which?(N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest()):38===a.which?(N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest()):13===a.which||9===a.which?N.$apply(function(){N.select(N.activeIdx)}):27===a.which&&(a.stopPropagation(),R(),N.$digest())}}),o.bind("blur",function(){C&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){N.select(N.activeIdx)})),w=!1,x=!1});var Z=function(a){o[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(R(),g.$$phase||N.$digest())};e.bind("click",Z),n.$on("$destroy",function(){e.unbind("click",Z),(F||G)&&$.remove(),F&&(angular.element(f).unbind("resize",r),e.find("body").unbind("scroll",r)),Q.remove()});var $=a(Q)(N);F?e.find("body").append($):G!==!1?angular.element(e[0].getElementById(G)).append($):o.after($)}}}]).directive("typeaheadPopup",["$typeaheadSuppressWarning","$log",function(a,b){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(c,d,e){a||b.warn("typeahead-popup is now deprecated. Use uib-typeahead-popup instead."),c.templateUrl=e.templateUrl,c.isOpen=function(){return c.matches.length>0},c.isActive=function(a){return c.active==a},c.selectActive=function(a){c.active=a},c.selectMatch=function(a){c.select({activeIdx:a})}}}}]).directive("typeaheadMatch",["$templateRequest","$compile","$parse","$typeaheadSuppressWarning","$log",function(a,b,c,d,e){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(f,g,h){d||e.warn("typeahead-match is now deprecated. Use uib-typeahead-match instead.");var i=c(h.templateUrl)(f.$parent)||"template/typeahead/typeahead-match.html";a(i).then(function(a){b(a.trim())(f,function(a){g.replaceWith(a)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log","$typeaheadSuppressWarning",function(a,b,c,d){function e(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(a){return/<.*>/g.test(a)}var g;return g=b.has("$sanitize"),function(b,h){return d||c.warn("typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead."),!g&&f(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=h?(""+b).replace(new RegExp(e(h),"gi"),"<strong>$&</strong>"):b,g||(b=a.trustAsHtml(b)),b}}]),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'<div class="panel {{panelClass || \'panel-default\'}}">\n <div class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">
336\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'<ul class="dropdown-menu" dropdown-nested ng-if="isOpen" style="display: block" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" style="padding:10px 9px 2px">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === max
336Mode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'<div uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-template-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-html.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classe
336s\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-template.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n</div>\n')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>\n</span>\n');}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td> </td>\n <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td>:</td>\n <td class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td> </td>\n <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>\n')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">
336.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>');angular.module('monospaced.elastic',[]).constant('msdElasticConfig',{append:''}).directive('msdElastic',['$timeout','$window','msdElasticConfig',function($timeout,$window,config){'use strict';return{require:'ngModel',restrict:'A, C',link:function(scope,element,attrs,ngModel){var ta=element[0],$ta=element;if(ta.nodeName!=='TEXTAREA'||!$window.getComputedStyle){return;} 337$ta.css({'overflow':'hidden','overflow-y':'hidden','word-wrap':'break-word'});var text=ta.value;ta.value='';ta.value=text;var append=attrs.msdElastic?attrs.msdElastic.replace(/\\n/g,'\n'):config.append,$win=angular.element($window),mirrorInitStyle='position: absolute; top: -999px; right: auto; bottom: auto;'+'left: 0; overflow: hidden; -webkit-box-sizing: content-box;'+'-moz-box-sizing: content-box; box-sizing: content-box;'+'min-height: 0 !important; height: 0 !important; padding: 0;'+'word-wrap: break-word; border: 0;',$mirror=angular.element('<textarea tabindex="-1" '+'style="'+mirrorInitStyle+'"/>').data('elastic',true),mirror=$mirror[0],taStyle=getComputedStyle(ta),resize=taStyle.getPropertyValue('resize'),borderBox=taStyle.getPropertyValue('box-sizing')==='border-box'||taStyle.getPropertyValue('-moz-box-sizing')==='border-box'||taStyle.getPropertyValue('-webkit-box-sizing')==='border-box',boxOuter=!borderBox?{width:0,height:0}:{width:parseInt(taStyle.getPropertyValue('border-right-width'),10)+ 338parseInt(taStyle.getPropertyValue('padding-right'),10)+ 339parseInt(taStyle.getPropertyValue('padding-left'),10)+ 340parseInt(taStyle.getPropertyValue('border-left-width'),10),height:parseInt(taStyle.getPropertyValue('border-top-width'),10)+ 341parseInt(taStyle.getPropertyValue('padding-top'),10)+ 342parseInt(taStyle.getPropertyValue('padding-bottom'),10)+ 343parseInt(taStyle.getPropertyValue('border-bottom-width'),10)},minHeightValue=parseInt(taStyle.getPropertyValue('min-height'),10),heightValue=parseInt(taStyle.getPropertyValue('height'),10),minHeight=Math.max(minHeightValue,heightValue)-boxOuter.height,maxHeight=parseInt(taStyle.getPropertyValue('max-height'),10),mirrored,active,copyStyle=['font-family','font-size','font-weight','font-style','letter-spacing','line-height','text-transform','word-spacing','text-indent'];if($ta.data('elastic')){return;} 344maxHeight=maxHeight&&maxHeight>0?maxHeight:9e4;if(mirror.parentNode!==document.body){angular.element(document.body).append(mirror);} 345$ta.css({'resize':(resize==='none'||resize==='vertical')?'none':'horizontal'}).data('elastic',true);function initMirror(){var mirrorStyle=mirrorInitStyle;mirrored=ta;taStyle=getComputedStyle(ta);angular.forEach(copyStyle,function(val){mirrorStyle+=val+':'+taStyle.getPropertyValue(val)+';';});mirror.setAttribute('style',mirrorStyle);} 346function adjust(){var taHeight,taComputedStyleWidth,mirrorHeight,width,overflow;if(mirrored!==ta){initMirror();} 347if(!active){active=true;mirror.value=ta.value+append;mirror.style.overflowY=ta.style.overflowY;taHeight=ta.style.height===''?'auto':parseInt(ta.style.height,10);taComputedStyleWidth=getComputedStyle(ta).getPropertyValue('width');if(taComputedStyleWidth.substr(taComputedStyleWidth.length-2,2)==='px'){width=parseInt(taComputedStyleWidth,10)-boxOuter.width;mirror.style.width=width+'px';} 348mirrorHeight=mirror.scrollHeight;if(mirrorHeight>maxHeight){mirrorHeight=maxHeight;overflow='scroll';}else if(mirrorHeight<minHeight){mirrorHeight=minHeight;} 349mirrorHeight+=boxOuter.height;ta.style.overflowY=overflow||'hidden';if(taHeight!==mirrorHeight){ta.style.height=mirrorHeight+'px';scope.$emit('elastic:resize',$ta);} 350$timeout(function(){active=false;},1);}} 351function forceAdjust(){active=false;adjust();} 352if('onpropertychange' in ta&&'oninput' in ta){ta['oninput']=ta.onkeyup=adjust;}else{ta['oninput']=adjust;} 353$win.bind('resize',forceAdjust);scope.$watch(function(){return ngModel.$modelValue;},function(newValue){forceAdjust();});scope.$on('elastic:adjust',function(){initMirror();console.log("Calkled this");forceAdjust();});$timeout(adjust);scope.$on('$destroy',function(){$mirror.remove();$win.unbind('resize',forceAdjust);});}};}]);(function(n,e){'use strict';function B(a){var c=[];w(c,e.noop).chars(a);return c.join("")}function h(a,c){var b={},d=a.split(","),l;for(l=0;l<d.length;l++)b[c?e.lowercase(d[l]):d[l]]=!0;return b}function C(a,c){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);g.innerHTML=a;var b=5;do{if(0===b)throw x("uinput");b--;n.document.documentMode&&t(g);a=g.innerHTML;g.innerHTML=a}while(a!==g.innerHTML);for(b=g.firstChild;b;
353){switch(b.nodeType){case 1:c.start(b.nodeName.toLowerCase(),D(b.attributes));break;case 3:c.chars(b.textContent)}var d;if(!(d=b.firstChild)&&(1==b.nodeType&&c.end(b.nodeName.toLowerCase()),d=b.nextSibling,!d))for(;null==d;){b=b.parentNode;if(b===g)break;d=b.nextSibling;1==b.nodeType&&c.end(b.nodeName.toLowerCase())}b=d}for(;b=g.firstChild;)g.removeChild(b)}function D(a){for(var c={},b=0,d=a.length;b<d;b++){var l=a[b];c[l.name]=l.value}return c}function y(a){return a.replace(/&/g,"&").replace(E,function(a){var b=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(b-55296)+ 354(a-56320)+65536)+";"}).replace(F,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function w(a,c){var b=!1,d=e.bind(a,a.push);return{start:function(a,f){a=e.lowercase(a);!b&&G[a]&&(b=a);b||!0!==u[a]||(d("<"),d(a),e.forEach(f,function(b,f){var g=e.lowercase(f),h="img"===a&&"src"===g||"background"===g;!0!==H[g]||!0===z[g]&&!c(b,h)||(d(" "),d(f),d('="'),d(y(b)),d('"'))}),d(">"))},end:function(a){a=e.lowercase(a);b||!0!==u[a]||!0===A[a]||(d("</"),d(a),d(">"));a==b&&(b=!1)},chars:function(a){b||d(y(a))}}}function t(a){if(a.nodeType===n.Node.ELEMENT_NODE)for(var c=a.attributes,b=0,d=c.length;b<d;b++){var e=c[b],f=e.name.toLowerCase();if("xmlns:ns1"===f||0===f.indexOf("ns1:"))a.removeAttributeNode(e),b--,d--}(c=a.firstChild)&&t(c);(c=a.nextSibling)&&t(c)}var x=e.$$minErr("$sanitize"),E=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F=/([^\#-~ |!])/g,A=h("area,br,col,hr,img,wbr"),q=h("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),k=h("rp,rt"),v=e.extend({},k,q),q=e.extend({},q,h("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,section,table,ul")),k=e.extend({},k,h("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")),I=h("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,stop,svg,switch,text,title,tspan"),G=h("script,style"),u=e.extend({},A,q,k,v),z=h("background,cite,href,longdesc,src,xlink:href"),v=h("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,tabindex,target,title,type,valign,value,vspace,width"),k=h("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,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
354-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",!0),H=e.extend({},z,k,v),g;(function(a){if(a.document&&a.document.implementation)a=a.document.implementation.createHTMLDocument("inert");else throw x("noinert");var c=(a.documentElement||a.getDocumentElement()).getElementsByTagName("body");1===c.length?g=c[0]:(c=a.createElement("html"),g=a.createElement("body"),c.appendChild(g),a.appendChild(c))})(n);e.module("ngSanitize",[]).provider("$sanitize",function(){var a=!1;this.$get=["$$sanitizeUri",function(c){a&&e.extend(u,I);return function(a){var d=[];C(a,w(d,function(a,b){return!/^unsafe:/.test(c(a,b))}));return d.join("")}}];this.enableSvg=function(c){return e.isDefined(c)?(a=c,this):a}});e.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,b=/^mailto:/i,d=e.$$minErr("linky"),g=e.isString;return function(f,h,m){function k(a){a&&p.push(B(a))}function q(a,b){var c;p.push("<a ");
354e.isFunction(m)&&(m=m(a));if(e.isObject(m))for(c in m)p.push(c+'="'+m[c]+'" ');else m={};!e.isDefined(h)||"target" in m||p.push('target="',h,'" ');p.push('href="',a.replace(/"/g,"""),'">');k(b);p.push("</a>")}if(null==f||""===f)return f;if(!g(f))throw d("notstring",f);for(var r=f,p=[],s,n;f=r.match(c);)s=f[0],f[2]||f[4]||(s=(f[3]?"http://":"mailto:")+s),n=f.index,k(r.substr(0,n)),q(s,f[0].replace(b,"")),r=r.substring(n+f[0].length);k(r);return a(p.join(""))}}])})(window,window.angular);"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return Q(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return Q(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=P(a),d=c?[]:{};return Q(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=P(a)?[]:{};return Q(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=R(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c}
354,decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return L(d)?d:!0}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return b?(N(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}
354var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K<z.length;K++,F=z[K])G=H[K]=d(G),J=v(F,c,F===b,J,G,f);var M=y.transition=J.then(function(){var d,e,g;if(y.transition!==M)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=H[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return y.transition!==M?A:(y.$current=b,y.current=b.self,y.params=c,S(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)},function(d){return y.transition!==M?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return M},y.is=function(a,b,d){d=R({relative:y.$current},d||{});var e=m(a,d.relative);return L(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=R({relative:y.$current},d||{}),N(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return L(e)?L(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=R({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!L(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));
354var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new U.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(L(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(N(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new U.ParamSet;return Q(a.params||{},function(a,c){b[c]||(b[c]=new U.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?R(a.parent.params.$$new(),b):new U.ParamSet},views:function(a){var b={};return Q(L(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?R({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=R(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e){function f(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function g(a,c){function d(a){return 1===V&&W>=4?!!j.enabled(a):1===V&&W>=2?!!j.enabled():!!i}var e={enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}};if(a.noanimation)return e;if(j)return{enter:function(a,c,f){d(a)?b.version.minor>2?j.enter(a,null,c).then(f):j.enter(a,null,c,f):e.enter(a,c,f)},leave:function(a,c){d(a)?b.version.minor>2?j.leave(a).then(c):j.leave(a,c):e.leave(a,c)}};if(i){var f=i&&i(c,a);return{enter:function(a,b,c){f.enter(a,null,b),c()},leave:function(a,b){f.leave(a),b()}}}return e}var h=f(),i=h("$animator"),j=h("$animate"),k={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,f,h){return function(c,f,i){function j(){function a(){b&&b.remove(),c&&c.$destroy()}var b=l,c=n;c&&(c._willBeDestroyed=!0),m?(r.leave(m,function(){a(),l=null}),l=m):(a(),l=null),m=null,n=null}function k(g){var k,l=A(c,i,f,e),s=l&&a.$current&&a.$current.locals[l];if((g||s!==o)&&!c._willBeDestroyed){k=c.$new(),o=a.$current.locals[l],k.$emit("$viewContentLoading",l);var t=h(k,function(a){r.enter(a,f,function(){n&&n.$emit("$viewContentAnimationEnded"),(b.isDefined(q)&&!q||c.$eval(q))&&d(a)}),j()});m=t,n=k,n.$emit("$viewContentLoaded",l),n.$eval(p)}}var l,m,n,o,p=i.onload||"",q=i.autoscroll,r=g(i,c);c.$on("$stateChangeSuccess",function(){k(!1)}),k(!0)}}};return k}function z(a,b,c,d){return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return function(e,g,h){var i=c.$current,j=A(e,h,g,d),k=i&&i.locals[j];if(k){g.data("$uiView",{name:j,state:k.$$state}),g.html(k.$template?k.$template:f);var l=a(g.contents());if(k.$$controller){k.$scope=e,k.$element=g;var m=b(k.$$controller,k);k.$$controllerAs&&(e[k.$$controllerAs]=m),g.data("$ngControllerController",m),g.children().data("$ngControllerController",m)}l(e)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h=B(f.uiSref,a.current.name),i={state:h.state,href:null,params:null},j=D(e),k=g[1]||g[0];i.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var l=function(c){c&&(i.params=b.copy(c)),i.href=a.href(h.state,i.params,i.options),k&&k.$$addStateInfo(h.state,i.params),null!==i.href&&f.$set(j.attr,i.href)};h.paramExpr&&(d.$watch(h.paramExpr,function(a){a!==i.params&&l(a)},!0),i.params=b.copy(d.$eval(h.paramExpr))),l(),j.clickable&&e.bind("click",E(e,a,c,j,function(){return i}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){l.state=b[0],l.params=b[1],l.o
354ptions=b[2],l.href=a.href(l.state,l.params,l.options),i&&i.$$addStateInfo(l.state,l.params),l.href&&e.$set(h.attr,l.href)}var h=D(d),i=f[1]||f[0],j=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],k="["+j.map(function(a){return a||"null"}).join(", ")+"]",l={state:null,params:null,options:null,href:null};c.$watch(k,g,!0),g(c.$eval(k)),h.clickable&&d.bind("click",E(d,a,b,h,function(){return l}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c);p.push({state:f||{name:b},params:c,hash:g}),q[g]=e}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(r){}o=o||c(e.uiSrefActive||"",!1)(b),O(o)&&Q(o,function(c,d){if(N(c)){var e=B(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){O(o)&&p.length>0||(g(a,b,o),i())},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;i>e;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},r.prototype.parameters=function(a){return L(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCo
354deAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).provider("$state",v),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x);var V=b.version.major,W=b.version.minor;y.$inject=["$state","$injector","$uiViewScroll","$interpolate"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),G.$inject=["$state","$timeout"],H.$inject=["$state","$timeout"],I.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",G).directive("uiSrefActive",I).directive("uiSrefActiveEq",I).directive("uiState",H),J.$inject=["$state"],K.$inject=["$state"],b.module("ui.router.state").filter("isState",J).filter("includedByState",K)}(window,window.angular);(function(){'use strict';var crop=angular.module('ngImgCrop',[]);crop.factory('cropAreaCircle',['cropArea',function(CropArea){var CropAreaCircle=function(){CropArea.apply(this,arguments);this._boxResizeBaseSize=20;this._boxResizeNormalRatio=0.9;this._boxResizeHoverRatio=1.2;this._iconMoveNormalRatio=0.9;this._iconMoveHoverRatio=1.2;this._boxResizeNormalSize=this._boxResizeBaseSize*this._boxResizeNormalRatio;this._boxResizeHoverSize=this._boxResizeBaseSize*this._boxResizeHoverRatio;this._posDragStartX=0;this._posDragStartY=0;this._posResizeStartX=0;this._posResizeStartY=0;this._posResizeStartSize=0;this._boxResizeIsHover=false;this._areaIsHover=false;this._boxResizeIsDragging=false;this._areaIsDragging=false;};CropAreaCircle.prototype=new CropArea();CropAreaCircle.prototype._calcCirclePerimeterCoords=function(angleDegrees){var hSize=this._size/2;var angleRadians=angleDegrees*(Math.PI/180),circlePerimeterX=this._x+hSize*Math.cos(angleRadians),circlePerimeterY=this._y+hSize*Math.sin(angleRadians);return[circlePerimeterX,circlePerimeterY];};CropAreaCircle.prototype._calcResizeIconCenterCoords=function(){return this._calcCirclePerimeterCoords(-45);};CropAreaCircle.prototype._isCoordWithinArea=function(coord){return Math.sqrt((coord[0]-this._x)*(coord[0]-this._x)+(coord[1]-this._y)*(coord[1]-this._y))<this._size/2;};CropAreaCircle.prototype._isCoordWithinBoxResize=function(coord){var resizeIconCenterCoords=this._calcResizeIconCenterCoords();var hSize=this._boxResizeHoverSize/2;return(coord[0]>resizeIconCenterCoords[0]-hSize&&coord[0]<resizeIconCenterCoords[0]+hSize&&coord[1]>resizeIconCenterCoords[1]-hSize&&coord[1]<resizeIconCenterCoords[1]+hSize);};CropAreaCircle.prototype._drawArea=function(ctx,centerCoords,size){ctx.arc(centerCoords[0],centerCoords[1],size/2,0,2*Math.PI);};CropAreaCircle.prototype.draw=function(){CropArea.prototype.draw.apply(this,arguments);this._cropCanvas.drawIconMove([this._x,this._y],this._areaIsHover?this._iconMoveHoverRatio:this._iconMoveNormalRatio);this._cropCanvas.drawIconResizeBoxNESW(this._calcResizeIconCenterCoords(),this._boxResizeBaseSize,this._boxResizeIsHover?this._boxResizeHoverRatio:this._boxResizeNormalRatio);};CropAreaCircle.prototype.processMouseMove=function(mouseCurX,mouseCurY){var cursor='default';var res=false;this._boxResizeIsHover=false;this._areaIsHover=false;if(this._areaIsDragging){this._x=mouseCurX-this._posDragStartX;this._y=mouseCurY-this._posDragStartY;this._areaIsHover=true;cursor='move';res=true;this._events.trigger('area-move');}else if(this._boxResizeIsDragging){cursor='nesw-resize';var iFR,iFX,iFY;iFX=mouseCurX-this._posResizeStartX;iFY=this._posResizeStartY-mouseCurY;if(iFX>iFY){iFR=this._posResizeStartSize+iFY*2;}else{iFR=this._posResizeStartSize+iFX*2;} 355this._size=Math.max(this._minSize,iFR);this._boxResizeIsHover=true;res=true;this._events.trigger('area-resize');}else if(this._isCoordWithinBoxResize([mouseCurX,mouseCurY])){cursor='nesw-resize';this._areaIsHover=false;this._boxResizeIsHover=true;res=true;}else if(this._isCoordWithinArea([mouseCurX,mouseCurY])){cursor='move';this._areaIsHover=true;res=true;} 356this._dontDragOutside();angular.element(this._ctx.canvas).css({'cursor':cursor});return res;};CropAreaCircle.prototype.processMouseDown=function(mouseDownX,mouseDownY){if(this._isCoordWithinBoxResize([mouseDownX,mouseDownY])){this._areaIsDragging=false;this._areaIsHover=false;this._boxResizeIsDragging=true;this._boxResizeIsHover=true;this._posResizeStartX=mouseDownX;this._posResizeStartY=mouseDownY;this._posResizeStartSize=this._size;this._events.trigger('area-resize-start');}else if(this._isCoordWithinArea([mouseDownX,mouseDownY])){this._areaIsDragging=true;this._areaIsHover=true;this._boxResizeIsDragging=false;this._boxResizeIsHover=false;this._posDragStartX=mouseDownX-this._x;this._posDragStartY=mouseDownY-this._y;this._events.trigger('area-move-start');}};CropAreaCircle.prototype.processMouseUp=function(){if(this._areaIsDragging){this._areaIsDragging=false;this._events.trigger('area-move-end');} 357if(this._boxResizeIsDragging){this._boxResizeIsDragging=false;this._events.trigger('area-resize-end');} 358this._areaIsHover=false;this._boxResizeIsHover=false;this._posDragStartX=0;this._posDragStartY=0;};return CropAreaCircle;}]);crop.factory('cropAreaSquare',['cropArea',function(CropArea){var CropAreaSquare=function(){CropArea.apply(this,arguments);this._resizeCtrlBaseRadius=10;this._resizeCtrlNormalRatio=0.75;this._resizeCtrlHoverRatio=1;this._iconMoveNormalRatio=0.9;this._iconMoveHoverRatio=1.2;this._resizeCtrlNormalRadius=this._resizeCtrlBaseRadius*this._resizeCtrlNormalRatio;this._resizeCtrlHoverRadius=this._resizeCtrlBaseRadius*this._resizeCtrlHoverRatio;this._posDragStartX=0;this._posDragStartY=0;this._posResizeStartX=0;this._posResizeStartY=0;this._posResizeStartSize=0;this._resizeCtrlIsHover=-1;this._areaIsHover=false;this._resizeCtrlIsDragging=-1;this._areaIsDragging=false;};CropAreaSquare.prototype=new CropArea();CropAreaSquare.prototype._calcSquareCorners=function(){var hSize=this._size/2;return[[this._x-hSize,this._y-hSize],[this._x+hSize,this._y-hSize],[this._x-hSize,this._y+hSize],[this._x+hSize,this._y+hSize]];};CropAreaSquare.prototype._calcSquareDimensions=function(){var hSize=this._size/2;return{left:this._x-hSize,top:this._y-hSize,right:this._x+hSize,bottom:this._y+hSize};};CropAreaSquare.prototype._isCoordWithinArea=function(coord){var squareDimensions=this._calcSquareDimensions();return(coord[0]>=squareDimensions.left&&coord[0]<=squareDimensions.right&&coord[1]>=squareDimensions.top&&coord[1]<=squareDimensions.bottom);};CropAreaSquare.prototype._isCoordWithinResizeCtrl=function(coord){var resizeIconsCenterCoords=this._calcSquareCorners();var res=-1;for(var i=0,len=resizeIconsCenterCoords.length;i<len;i++){var resizeIconCenterCoords=resizeIconsCenterCoords[i];if(coord[0]>resizeIconCenterCoords[0]-this._resizeCtrlHoverRadius&&coord[0]<resizeIconCenterCoords[0]+this._resizeCtrlHoverRadius&&coord[1]>resizeIconCenterCoords[1]-this._resizeCtrlHoverRadius&&coord[1]<resizeIconCenterCoords[1]+this._resizeCtrlHoverRadius){res=i;break;}} 359return res;};CropAreaSquare.prototype._drawArea=function(ctx,centerCoords,size){var hSize=size/2;ctx.rect(centerCoords[0]-hSize,centerCoords[1]-hSize,size,size);};CropAreaSquare.prototype.draw=function(){CropArea.prototype.draw.apply(this,arguments);this._cropCanvas.drawIconMove([this._x,this._y],this._areaIsHover?this._iconMoveHoverRatio:this._iconMoveNormalRatio);var resizeIconsCenterCoords=this._calcSquareCorners();for(var i=0,len=resizeIconsCenterCoords.length;i<len;i++){var resizeIconCenterCoords=resizeIconsCenterCoords[i];this._cropCanvas.drawIconResizeCircle(resizeIconCenterCoords,this._resizeCtrlBaseRadius,this._resizeCtrlIsHover===i?this._resizeCtrlHoverRatio:this._resizeCtrlNormalRatio);}};CropAreaSquare.prototype.processMouseMove=function(mouseCurX,mouseCurY){var cursor='default';var res=false;this._resizeCtrlIsHover=-1;this._areaIsHover=false;if(this._areaIsDragging){this._x=mouseCurX-this._posDragStartX;this._y=mouseCurY-this._posDragStartY;this._areaIsHover=true;cursor='move';res=true;this._events.trigger('area-move');}else if(this._resizeCtrlIsDragging>-1){var xMulti,yMulti;switch(this._resizeCtrlIsDragging){case 0:xMulti=-1;yMulti=-1;cursor='nwse-resize';break;
359case 1:xMulti=1;yMulti=-1;cursor='nesw-resize';break;case 2:xMulti=-1;yMulti=1;cursor='nesw-resize';break;case 3:xMulti=1;yMulti=1;cursor='nwse-resize';break;} 360var iFX=(mouseCurX-this._posResizeStartX)*xMulti;var iFY=(mouseCurY-this._posResizeStartY)*yMulti;var iFR;if(iFX>iFY){iFR=this._posResizeStartSize+iFY;}else{iFR=this._posResizeStartSize+iFX;} 361var wasSize=this._size;this._size=Math.max(this._minSize,iFR);var posModifier=(this._size-wasSize)/2;this._x+=posModifier*xMulti;this._y+=posModifier*yMulti;this._resizeCtrlIsHover=this._resizeCtrlIsDragging;res=true;this._events.trigger('area-resize');}else{var hoveredResizeBox=this._isCoordWithinResizeCtrl([mouseCurX,mouseCurY]);if(hoveredResizeBox>-1){switch(hoveredResizeBox){case 0:cursor='nwse-resize';break;case 1:cursor='nesw-resize';break;case 2:cursor='nesw-resize';break;case 3:cursor='nwse-resize';break;} 362this._areaIsHover=false;this._resizeCtrlIsHover=hoveredResizeBox;res=true;}else if(this._isCoordWithinArea([mouseCurX,mouseCurY])){cursor='move';this._areaIsHover=true;res=true;}} 363this._dontDragOutside();angular.element(this._ctx.canvas).css({'cursor':cursor});return res;};CropAreaSquare.prototype.processMouseDown=function(mouseDownX,mouseDownY){var isWithinResizeCtrl=this._isCoordWithinResizeCtrl([mouseDownX,mouseDownY]);if(isWithinResizeCtrl>-1){this._areaIsDragging=false;this._areaIsHover=false;this._resizeCtrlIsDragging=isWithinResizeCtrl;this._resizeCtrlIsHover=isWithinResizeCtrl;this._posResizeStartX=mouseDownX;this._posResizeStartY=mouseDownY;this._posResizeStartSize=this._size;this._events.trigger('area-resize-start');}else if(this._isCoordWithinArea([mouseDownX,mouseDownY])){this._areaIsDragging=true;this._areaIsHover=true;this._resizeCtrlIsDragging=-1;this._resizeCtrlIsHover=-1;this._posDragStartX=mouseDownX-this._x;this._posDragStartY=mouseDownY-this._y;this._events.trigger('area-move-start');}};CropAreaSquare.prototype.processMouseUp=function(){if(this._areaIsDragging){this._areaIsDragging=false;this._events.trigger('area-move-end');} 364if(this._resizeCtrlIsDragging>-1){this._resizeCtrlIsDragging=-1;this._events.trigger('area-resize-end');} 365this._areaIsHover=false;this._resizeCtrlIsHover=-1;this._posDragStartX=0;this._posDragStartY=0;};return CropAreaSquare;}]);crop.factory('cropArea',['cropCanvas',function(CropCanvas){var CropArea=function(ctx,events){this._ctx=ctx;this._events=events;this._minSize=80;this._cropCanvas=new CropCanvas(ctx);this._image=new Image();this._x=0;this._y=0;this._size=300;};CropArea.prototype.getImage=function(){return this._image;};CropArea.prototype.setImage=function(image){this._image=image;};CropArea.prototype.getX=function(){return this._x;};CropArea.prototype.setX=function(x){this._x=x;this._dontDragOutside();};CropArea.prototype.getY=function(){return this._y;};CropArea.prototype.setY=function(y){this._y=y;this._dontDragOutside();};CropArea.prototype.getSize=function(){return this._size;};CropArea.prototype.setSize=function(size){this._size=Math.max(this._minSize,size);this._dontDragOutside();};CropArea.prototype.getMinSize=function(){return this._minSize;};CropArea.prototype.setMinSize=function(size){this._minSize=size;this._size=Math.max(this._minSize,this._size);this._dontDragOutside();};CropArea.prototype._dontDragOutside=function(){var h=this._ctx.canvas.height,w=this._ctx.canvas.width;if(this._size>w){this._size=w;} 366if(this._size>h){this._size=h;} 367if(this._x<this._size/2){this._x=this._size/2;} 368if(this._x>w-this._size/2){this._x=w-this._size/2;} 369if(this._y<this._size/2){this._y=this._size/2;} 370if(this._y>h-this._size/2){this._y=h-this._size/2;}};CropArea.prototype._drawArea=function(){};CropArea.prototype.draw=function(){this._cropCanvas.drawCropArea(this._image,[this._x,this._y],this._size,this._drawArea);};CropArea.prototype.processMouseMove=function(){};CropArea.prototype.processMouseDown=function(){};CropArea.prototype.processMouseUp=function(){};return CropArea;}]);crop.factory('cropCanvas',[function(){var shapeArrowNW=[[-0.5,-2],[-3,-4.5],[-0.5,-7],[-7,-7],[-7,-0.5],[-4.5,-3],[-2,-0.5]];var shapeArrowNE=[[0.5,-2],[3,-4.5],[0.5,-7],[7,-7],[7,-0.5],[4.5,-3],[2,-0.5]];var shapeArrowSW=[[-0.5,2],[-3,4.5],[-0.5,7],[-7,7],[-7,0.5],[-4.5,3],[-2,0.5
370]];var shapeArrowSE=[[0.5,2],[3,4.5],[0.5,7],[7,7],[7,0.5],[4.5,3],[2,0.5]];var shapeArrowN=[[-1.5,-2.5],[-1.5,-6],[-5,-6],[0,-11],[5,-6],[1.5,-6],[1.5,-2.5]];var shapeArrowW=[[-2.5,-1.5],[-6,-1.5],[-6,-5],[-11,0],[-6,5],[-6,1.5],[-2.5,1.5]];var shapeArrowS=[[-1.5,2.5],[-1.5,6],[-5,6],[0,11],[5,6],[1.5,6],[1.5,2.5]];var shapeArrowE=[[2.5,-1.5],[6,-1.5],[6,-5],[11,0],[6,5],[6,1.5],[2.5,1.5]];var colors={areaOutline:'#fff',resizeBoxStroke:'#fff',resizeBoxFill:'#444',resizeBoxArrowFill:'#fff',resizeCircleStroke:'#fff',resizeCircleFill:'#444',moveIconFill:'#fff'};return function(ctx){var calcPoint=function(point,offset,scale){return[scale*point[0]+offset[0],scale*point[1]+offset[1]];};var drawFilledPolygon=function(shape,fillStyle,centerCoords,scale){ctx.save();ctx.fillStyle=fillStyle;ctx.beginPath();var pc,pc0=calcPoint(shape[0],centerCoords,scale);ctx.moveTo(pc0[0],pc0[1]);for(var p in shape){if(p>0){pc=calcPoint(shape[p],centerCoords,scale);ctx.lineTo(pc[0],pc[1]);}} 371ctx.lineTo(pc0[0],pc0[1]);ctx.fill();ctx.closePath();ctx.restore();};this.drawIconMove=function(centerCoords,scale){drawFilledPolygon(shapeArrowN,colors.moveIconFill,centerCoords,scale);drawFilledPolygon(shapeArrowW,colors.moveIconFill,centerCoords,scale);drawFilledPolygon(shapeArrowS,colors.moveIconFill,centerCoords,scale);drawFilledPolygon(shapeArrowE,colors.moveIconFill,centerCoords,scale);};this.drawIconResizeCircle=function(centerCoords,circleRadius,scale){var scaledCircleRadius=circleRadius*scale;ctx.save();ctx.strokeStyle=colors.resizeCircleStroke;ctx.lineWidth=2;ctx.fillStyle=colors.resizeCircleFill;ctx.beginPath();ctx.arc(centerCoords[0],centerCoords[1],scaledCircleRadius,0,2*Math.PI);ctx.fill();ctx.stroke();ctx.closePath();ctx.restore();};this.drawIconResizeBoxBase=function(centerCoords,boxSize,scale){var scaledBoxSize=boxSize*scale;ctx.save();ctx.strokeStyle=colors.resizeBoxStroke;ctx.lineWidth=2;ctx.fillStyle=colors.resizeBoxFill;ctx.fillRect(centerCoords[0]-scaledBoxSize/2,centerCoords[1]-scaledBoxSize/2,scaledBoxSize,scaledBoxSize);ctx.strokeRect(centerCoords[0]-scaledBoxSize/2,centerCoords[1]-scaledBoxSize/2,scaledBoxSize,scaledBoxSize);ctx.restore();};this.drawIconResizeBoxNESW=function(centerCoords,boxSize,scale){this.drawIconResizeBoxBase(centerCoords,boxSize,scale);drawFilledPolygon(shapeArrowNE,colors.resizeBoxArrowFill,centerCoords,scale);drawFilledPolygon(shapeArrowSW,colors.resizeBoxArrowFill,centerCoords,scale);};this.drawIconResizeBoxNWSE=function(centerCoords,boxSize,scale){this.drawIconResizeBoxBase(centerCoords,boxSize,scale);drawFilledPolygon(shapeArrowNW,colors.resizeBoxArrowFill,centerCoords,scale);drawFilledPolygon(shapeArrowSE,colors.resizeBoxArrowFill,centerCoords,scale);};this.drawCropArea=function(image,centerCoords,size,fnDrawClipPath){var xRatio=image.width/ctx.canvas.width,yRatio=image.height/ctx.canvas.height,xLeft=centerCoords[0]-size/2,yTop=centerCoords[1]-size/2;ctx.save();ctx.strokeStyle=colors.areaOutline;ctx.lineWidth=2;ctx.beginPath();fnDrawClipPath(ctx,centerCoords,size);ctx.stroke();ctx.clip();if(size>0){ctx.drawImage(image,xLeft*xRatio,yTop*yRatio,size*xRatio,size*yRatio,xLeft,yTop,size,size);} 372ctx.beginPath();fnDrawClipPath(ctx,centerCoords,size);ctx.stroke();ctx.clip();ctx.restore();};};}]);crop.service('cropEXIF',[function(){var debug=false;var ExifTags=this.Tags={0x9000:"ExifVersion",0xA000:"FlashpixVersion",0xA001:"ColorSpace",0xA002:"PixelXDimension",0xA003:"PixelYDimension",0x9101:"ComponentsConfiguration",0x9102:"CompressedBitsPerPixel",0x927C:"MakerNote",0x9286:"UserComment",0xA004:"RelatedSoundFile",0x9003:"DateTimeOriginal",0x9004:"DateTimeDigitized",0x9290:"SubsecTime",0x9291:"SubsecTimeOriginal",0x9292:"SubsecTimeDigitized",0x829A:"ExposureTime",0x829D:"FNumber",0x8822:"ExposureProgram",0x8824:"SpectralSensitivity",0x8827:"ISOSpeedRatings",0x8828:"OECF",0x9201:"ShutterSpeedValue",0x9202:"ApertureValue",0x9203:"BrightnessValue",0x9204:"ExposureBias",0x9205:"MaxApertureValue",0x9206:"SubjectDistance",0x9207:"MeteringMode",0x9208:"LightSource",0x9209:"Flash",0x9214:"SubjectArea",0x920A:"FocalLength",0xA20B:"FlashEnergy",0xA20C:"SpatialFrequencyResponse",0xA20E:"FocalPlaneXResolution",0xA20F:"FocalPlaneYResolution",0xA210:"FocalPlaneResolutionUnit",0xA214:"SubjectLocation",0xA215:"ExposureIndex",0xA217:"SensingMethod",0xA3
vendor: 14,303 bytes, lines 372-423
37200:"FileSource",0xA301:"SceneType",0xA302:"CFAPattern",0xA401:"CustomRendered",0xA402:"ExposureMode",0xA403:"WhiteBalance",0xA404:"DigitalZoomRation",0xA405:"FocalLengthIn35mmFilm",0xA406:"SceneCaptureType",0xA407:"GainControl",0xA408:"Contrast",0xA409:"Saturation",0xA40A:"Sharpness",0xA40B:"DeviceSettingDescription",0xA40C:"SubjectDistanceRange",0xA005:"InteroperabilityIFDPointer",0xA420:"ImageUniqueID"};var TiffTags=this.TiffTags={0x0100:"ImageWidth",0x0101:"ImageHeight",0x8769:"ExifIFDPointer",0x8825:"GPSInfoIFDPointer",0xA005:"InteroperabilityIFDPointer",0x0102:"BitsPerSample",0x0103:"Compression",0x0106:"PhotometricInterpretation",0x0112:"Orientation",0x0115:"SamplesPerPixel",0x011C:"PlanarConfiguration",0x0212:"YCbCrSubSampling",0x0213:"YCbCrPositioning",0x011A:"XResolution",0x011B:"YResolution",0x0128:"ResolutionUnit",0x0111:"StripOffsets",0x0116:"RowsPerStrip",0x0117:"StripByteCounts",0x0201:"JPEGInterchangeFormat",0x0202:"JPEGInterchangeFormatLength",0x012D:"TransferFunction",0x013E:"WhitePoint",0x013F:"PrimaryChromaticities",0x0211:"YCbCrCoefficients",0x0214:"ReferenceBlackWhite",0x0132:"DateTime",0x010E:"ImageDescription",0x010F:"Make",0x0110:"Model",0x0131:"Software",0x013B:"Artist",0x8298:"Copyright"};var GPSTags=this.GPSTags={0x0000:"GPSVersionID",0x0001:"GPSLatitudeRef",0x0002:"GPSLatitude",0x0003:"GPSLongitudeRef",0x0004:"GPSLongitude",0x0005:"GPSAltitudeRef",0x0006:"GPSAltitude",0x0007:"GPSTimeStamp",0x0008:"GPSSatellites",0x0009:"GPSStatus",0x000A:"GPSMeasureMode",0x000B:"GPSDOP",0x000C:"GPSSpeedRef",0x000D:"GPSSpeed",0x000E:"GPSTrackRef",0x000F:"GPSTrack",0x0010:"GPSImgDirectionRef",0x0011:"GPSImgDirection",0x0012:"GPSMapDatum",0x0013:"GPSDestLatitudeRef",0x0014:"GPSDestLatitude",0x0015:"GPSDestLongitudeRef",0x0016:"GPSDestLongitude",0x0017:"GPSDestBearingRef",0x0018:"GPSDestBearing",0x0019:"GPSDestDistanceRef",0x001A:"GPSDestDistance",0x001B:"GPSProcessingMethod",0x001C:"GPSAreaInformation",0x001D:"GPSDateStamp",0x001E:"GPSDifferential"};var StringValues=this.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0x0000:"Flash did not fire",0x0001:"Flash fired",0x0005:"Strobe return light not detected",0x0007:"Strobe return light detected",0x0009:"Flash fired, compulsory flash mode",0x000D:"Flash fired, compulsory flash mode, return light not detected",0x000F:"Flash fired, compulsory flash mode, return light detected",0x0010:"Flash did not fire, compulsory flash mode",0x0018:"Flash did not fire, auto mode",0x0019:"Flash fired, auto mode",0x001D:"Flash fired, auto mode, return light not detected",0x001F:"Flash fired, auto mode, return light detected",0x0020:"No flash function",0x0041:"Flash fired, red-eye reduction mode",0x0045:"Flash fired, red-eye reduction mode, return light not detected",0x0047:"Flash fired, red-eye reduction mode, return light detected",0x0049:"Flash fired, compulsory flash mode, red-eye reduction mode",0x004D:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",0x004F:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",0x0059:"Flash fired, auto mode, red-eye reduction mode",0x005D:"Flash fired, auto mode, return light not detected, red-eye reduction mode",0x005F:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function addEvent(element,event,handler){if(element.addEventListener){element.addEventListener(event,handler,false);}else if(element.attachEvent){element.attachEvent("on"+event,handler);}} 373function imageHasData(img){return!!(img.exifdata);} 374function base64ToArrayBuffer(base64,contentType){contentType=contentType||base64.match(/^data\:([^\;]+)\;base64,/mi)[1]||'';base64=base64.replace(/^data\:([^\;]+)\;base64,/gmi,'');var binary=atob(base64);var len=binary.length;var buffer=new ArrayBuffer(len);var view=new Uint8Array(buffer);for(var i=0;i<len;i++){view[i]=binary.charCodeAt(i);} 375return buffer;} 376function objectURLToBlob(url,callback){var http=new XMLHttpRequest();http.open("GET",url,true);http.responseType="blob";http.onload=function(e){if(this.status==200||this.status===0){callback(this.response);}};http.send();} 377function getImageData(img,callback){function handleBinaryFile(binFile){var data=findEXIFinJPEG(binFile);var iptcdata=findIPTCinJPEG(binFile);img.exifdata=data||{};img.iptcdata=iptcdata||{};if(callback){callback.call(img);}} 378if(img.src){if(/^data\:/i.test(img.src)){var arrayBuffer=base64ToArrayBuffer(img.src);handleBinaryFile(arrayBuffer);}else if(/^blob\:/i.test(img.src)){var fileReader=new FileReader();fileReader.onload=function(e){handleBinaryFile(e.target.result);};objectURLToBlob(img.src,function(blob){fileReader.readAsArrayBuffer(blob);});}else{var http=new XMLHttpRequest();http.onload=function(){if(this.status==200||this.status===0){handleBinaryFile(http.response);}else{throw"Could not load image";} 379http=null;};http.open("GET",img.src,true);http.responseType="arraybuffer";http.send(null);}}else if(window.FileReader&&(img instanceof window.Blob||img instanceof window.File)){var fileReader=new FileReader();fileReader.onload=function(e){if(debug)console.log("Got file of length "+e.target.result.byteLength);handleBinaryFile(e.target.result);};fileReader.readAsArrayBuffer(img);}} 380function findEXIFinJPEG(file){var dataView=new DataView(file);if(debug)console.log("Got file of length "+file.byteLength);if((dataView.getUint8(0)!=0xFF)||(dataView.getUint8(1)!=0xD8)){if(debug)console.log("Not a valid JPEG");return false;} 381var offset=2,length=file.byteLength,marker;while(offset<length){if(dataView.getUint8(offset)!=0xFF){if(debug)console.log("Not a valid marker at offset "+offset+", found: "+dataView.getUint8(offset));return false;} 382marker=dataView.getUint8(offset+1);if(debug)console.log(marker);if(marker==225){if(debug)console.log("Found 0xFFE1 marker");return readEXIFData(dataView,offset+4,dataView.getUint16(offset+2)-2);}else{offset+=2+dataView.getUint16(offset+2);}}} 383function findIPTCinJPEG(file){var dataView=new DataView(file);if(debug)console.log("Got file of length "+file.byteLength);if((dataView.getUint8(0)!=0xFF)||(dataView.getUint8(1)!=0xD8)){if(debug)console.log("Not a valid JPEG");return false;} 384var offset=2,length=file.byteLength;var isFieldSegmentStart=function(dataView,offset){return(dataView.getUint8(offset)===0x38&&dataView.getUint8(offset+1)===0x42&&dataView.getUint8(offset+2)===0x49&&dataView.getUint8(offset+3)===0x4D&&dataView.getUint8(offset+4)===0x04&&dataView.getUint8(offset+5)===0x04);};while(offset<length){if(isFieldSegmentStart(dataView,offset)){var nameHeaderLength=dataView.getUint8(offset+7);if(nameHeaderLength%2!==0)nameHeaderLength+=1;if(nameHeaderLength===0){nameHeaderLength=4;} 385var startOffset=offset+8+nameHeaderLength;var sectionLength=dataView.getUint16(offset+6+nameHeaderLength);return readIPTCData(file,startOffset,sectionLength);break;} 386offset++;}} 387var IptcFieldMap={0x78:'caption',0x6E:'credit',0x19:'keywords',0x37:'dateCreated',0x50:'byline',0x55:'bylineTitle',0x7A:'captionWriter',0x69:'headline',0x74:'copyright',0x0F:'category'};function readIPTCData(file,startOffset,sectionLength){var dataView=new DataView(file);var data={};var fieldValue,fieldName,dataSize,segmentType,segmentSize;var segmentStartPos=startOffset;while(segmentStartPos<startOffset+sectionLength){if(dataView.getUint8(segmentStartPos)===0x1C&&dataView.getUint8(segmentStartPos+1)===0x02){segmentType=dataView.getUint8(segmentStartPos+2);if(segmentType in IptcFieldMap){dataSize=dataView.getInt16(segmentStartPos+3);segmentSize=dataSize+5;fieldName=IptcFieldMap[segmentType];fieldValue=getStringFromDB(dataView,segmentStartPos+5,dataSize);if(data.hasOwnProperty(fieldName)){if(data[fieldName]instanceof Array){data[fieldName].push(fieldValue);} 388else{data[fieldName]=[data[fieldName],fieldValue];}} 389else{data[fieldName]=fieldValue;}}} 390segmentStartPos++;} 391return data;} 392function readTags(file,tiffStart,dirStart,strings,bigEnd){var entries=file.getUint16(dirStart,!bigEnd),tags={},entryOffset,tag,i;for(i=0;i<entries;i++){entryOffset=dirStart+i*12+2;tag=strings[file.getUint16(entryOffset,!bigEnd)];if(!tag&&debug)console.log("Unknown tag: "+file.getUint16(entryOffset,!bigEnd));tags[tag]=readTagValue(file,entryOffset,tiffStart,dirStart,bigEnd);} 393return tags;} 394function readTagValue(file,entryOffset,tiffStart,dirStart,bigEnd){var type=file.getUint16(entryOffset+2,!bigEnd),numValues=file.getUint32(entryOffset+4,!bigEnd),valueOffset=file.getUint32(entryOffset+8,!bigEnd)+tiffStart,offset,vals,val,n,numerator,denominator;switch(type){case 1:case 7:if(numValues==1){return file.getUint8(entryOffset+8,!bigEnd);}else{offset=numValues>4?valueOffset:(entryOffset+8);vals=[];for(n=0;n<numValues;n++){vals[n]=file.getUint8(offset+n);} 395return vals;} 396case 2:offset=numValues>4?valueOffset:(entryOffset+8);return getStringFromDB(file,offset,numValues-1);case 3:if(numValues==1){return file.getUint16(entryOffset+8,!bigEnd);}else{offset=numValues>2?valueOffset:(entryOffset+8);vals=[];for(n=0;n<numValues;n++){vals[n]=file.getUint16(offset+2*n,!bigEnd);} 397return vals;} 398case 4:if(numValues==1){return file.getUint32(entryOffset+8,!bigEnd);}else{vals=[];for(n=0;n<numValues;n++){vals[n]=file.getUint32(valueOffset+4*n,!bigEnd);} 399return vals;} 400case 5:if(numValues==1){numerator=file.getUint32(valueOffset,!bigEnd);denominator=file.getUint32(valueOffset+4,!bigEnd);val=new Number(numerator/denominator);val.numerator=numerator;val.denominator=denominator;return val;}else{vals=[];for(n=0;n<numValues;n++){numerator=file.getUint32(valueOffset+8*n,!bigEnd);denominator=file.getUint32(valueOffset+4+8*n,!bigEnd);vals[n]=new Number(numerator/denominator);vals[n].numerator=numerator;vals[n].denominator=denominator;} 401return vals;} 402case 9:if(numValues==1){return file.getInt32(entryOffset+8,!bigEnd);}else{vals=[];for(n=0;n<numValues;n++){vals[n]=file.getInt32(valueOffset+4*n,!bigEnd);} 403return vals;} 404case 10:if(numValues==1){return file.getInt32(valueOffset,!bigEnd)/file.getInt32(valueOffset+4,!bigEnd);}else{vals=[];for(n=0;n<numValues;n++){vals[n]=file.getInt32(valueOffset+8*n,!bigEnd)/file.getInt32(valueOffset+4+8*n,!bigEnd);} 405return vals;}}} 406function getStringFromDB(buffer,start,length){var outstr="";for(var n=start;n<start+length;n++){outstr+=String.fromCharCode(buffer.getUint8(n));} 407return outstr;} 408function readEXIFData(file,start){if(getStringFromDB(file,start,4)!="Exif"){if(debug)console.log("Not valid EXIF data! "+getStringFromDB(file,start,4));return false;} 409var bigEnd,tags,tag,exifData,gpsData,tiffOffset=start+6;if(file.getUint16(tiffOffset)==0x4949){bigEnd=false;}else if(file.getUint16(tiffOffset)==0x4D4D){bigEnd=true;}else{if(debug)console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)");return false;} 410if(file.getUint16(tiffOffset+2,!bigEnd)!=0x002A){if(debug)console.log("Not valid TIFF data! (no 0x002A)");return false;} 411var firstIFDOffset=file.getUint32(tiffOffset+4,!bigEnd);if(firstIFDOffset<0x00000008){if(debug)console.log("Not valid TIFF data! (First offset less than 8)",file.getUint32(tiffOffset+4,!bigEnd));return false;} 412tags=readTags(file,tiffOffset,tiffOffset+firstIFDOffset,TiffTags,bigEnd);if(tags.ExifIFDPointer){exifData=readTags(file,tiffOffset,tiffOffset+tags.ExifIFDPointer,ExifTags,bigEnd);for(tag in exifData){switch(tag){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":exifData[tag]=StringValues[tag][exifData[tag]];break;case"ExifVersion":case"FlashpixVersion":exifData[tag]=String.fromCharCode(exifData[tag][0],exifData[tag][1],exifData[tag][2],exifData[tag][3]);break;case"ComponentsConfiguration":exifData[tag]=StringValues.Components[exifData[tag][0]]+ 413StringValues.Components[exifData[tag][1]]+ 414StringValues.Components[exifData[tag][2]]+ 415StringValues.Components[exifData[tag][3]];break;} 416tags[tag]=exifData[tag];}} 417if(tags.GPSInfoIFDPointer){gpsData=readTags(file,tiffOffset,tiffOffset+tags.GPSInfoIFDPointer,GPSTags,bigEnd);for(tag in gpsData){switch(tag){case"GPSVersionID":gpsData[tag]=gpsData[tag][0]+"."+gpsData[tag][1]+"."+gpsData[tag][2]+"."+gpsData[tag][3];break;} 418tags[tag]=gpsData[tag];}} 419return tags;} 420this.getData=function(img,callback){if((img instanceof Image||img instanceof HTMLImageElement)&&!img.complete)return false;if(!imageHasData(img)){getImageData(img,callback);}else{if(callback){callback.call(img);}} 421return true;} 422this.getTag=function(img,tag){if(!imageHasData(img))return;return img.exifdata[tag];} 423this.getAllTags=function(img){if(!imageHasData(img))return{};var a,data=img.exifdata,tags={};for(a in data){if(data.hasOwnProperty(a)){tags[a]=data[a];}}
423 424return tags;} 425this.pretty=function(img){if(!imageHasData(img))return"";var a,data=img.exifdata,strPretty="";for(a in data){if(data.hasOwnProperty(a)){if(typeof data[a]=="object"){if(data[a]instanceof Number){strPretty+=a+" : "+data[a]+" ["+data[a].numerator+"/"+data[a].denominator+"]\r\n";}else{strPretty+=a+" : ["+data[a].length+" values]\r\n";}}else{strPretty+=a+" : "+data[a]+"\r\n";}}} 426return strPretty;} 427this.readFromBinaryFile=function(file){return findEXIFinJPEG(file);}}]);crop.factory('cropHost',['$document','cropAreaCircle','cropAreaSquare','cropEXIF',function($document,CropAreaCircle,CropAreaSquare,cropEXIF){var getElementOffset=function(elem){var box=elem.getBoundingClientRect();var body=document.body;var docElem=document.documentElement;var scrollTop=window.pageYOffset||docElem.scrollTop||body.scrollTop;var scrollLeft=window.pageXOffset||docElem.scrollLeft||body.scrollLeft;var clientTop=docElem.clientTop||body.clientTop||0;var clientLeft=docElem.clientLeft||body.clientLeft||0;var top=box.top+scrollTop-clientTop;var left=box.left+scrollLeft-clientLeft;return{top:Math.round(top),left:Math.round(left)};};return function(elCanvas,opts,events){var ctx=null,image=null,theArea=null;var minCanvasDims=[100,100],maxCanvasDims=[300,300];var resImgSize=300;var resImgFormat='image/png';var resImgQuality=null;function drawScene(){ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);if(image!==null){ctx.drawImage(image,0,0,ctx.canvas.width,ctx.canvas.height);ctx.save();ctx.fillStyle='rgba(0, 0, 0, 0.65)';ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height);ctx.restore();theArea.draw();}} 428var resetCropHost=function(){if(image!==null){theArea.setImage(image);var imageDims=[image.width,image.height],imageRatio=image.width/image.height,canvasDims=imageDims;if(canvasDims[0]>maxCanvasDims[0]){canvasDims[0]=maxCanvasDims[0];canvasDims[1]=canvasDims[0]/imageRatio;}else if(canvasDims[0]<minCanvasDims[0]){canvasDims[0]=minCanvasDims[0];canvasDims[1]=canvasDims[0]/imageRatio;} 429if(canvasDims[1]>maxCanvasDims[1]){canvasDims[1]=maxCanvasDims[1];canvasDims[0]=canvasDims[1]*imageRatio;}else if(canvasDims[1]<minCanvasDims[1]){canvasDims[1]=minCanvasDims[1];canvasDims[0]=canvasDims[1]*imageRatio;} 430elCanvas.prop('width',canvasDims[0]).prop('height',canvasDims[1]).css({'margin-left':-canvasDims[0]/2+'px','margin-top':-canvasDims[1]/2+'px'});theArea.setX(ctx.canvas.width/2);theArea.setY(ctx.canvas.height/2);theArea.setSize(Math.min(300,ctx.canvas.width/2,ctx.canvas.height/2));}else{elCanvas.prop('width',0).prop('height',0).css({'margin-top':0});} 431drawScene();};var getChangedTouches=function(event){if(angular.isDefined(event.changedTouches)){return event.changedTouches;}else{return event.originalEvent.changedTouches;}};var onMouseMove=function(e){if(image!==null){var offset=getElementOffset(ctx.canvas),pageX,pageY;if(e.type==='touchmove'){pageX=getChangedTouches(e)[0].pageX;pageY=getChangedTouches(e)[0].pageY;}else{pageX=e.pageX;pageY=e.pageY;} 432theArea.processMouseMove(pageX-offset.left,pageY-offset.top);drawScene();}};var onMouseDown=function(e){e.preventDefault();e.stopPropagation();if(image!==null){var offset=getElementOffset(ctx.canvas),pageX,pageY;if(e.type==='touchstart'){pageX=getChangedTouches(e)[0].pageX;pageY=getChangedTouches(e)[0].pageY;}else{pageX=e.pageX;pageY=e.pageY;} 433theArea.processMouseDown(pageX-offset.left,pageY-offset.top);drawScene();}};var onMouseUp=function(e){if(image!==null){var offset=getElementOffset(ctx.canvas),pageX,pageY;if(e.type==='touchend'){pageX=getChangedTouches(e)[0].pageX;pageY=getChangedTouches(e)[0].pageY;}else{pageX=e.pageX;pageY=e.pageY;} 434theArea.processMouseUp(pageX-offset.left,pageY-offset.top);drawScene();}};this.getResultImageDataURI=function(){var temp_ctx,temp_canvas;temp_canvas=angular.element('<canvas></canvas>')[0];temp_ctx=temp_canvas.getContext('2d');temp_canvas.width=resImgSize;temp_canvas.height=resImgSize;if(image!==null){temp_ctx.drawImage(image,(theArea.getX()-theArea.getSize()/2)*(image.width/ctx.canvas.width),(theArea.getY()-theArea.getSize()/2)*(image.height/ctx.canvas.height),theArea.getSize()*(image.width/ctx.canvas.width),theArea.getSize()*(image.height/ctx.canvas.height),0,0,resImgSize,resImgSize);} 435if(resImgQuality!==null){return temp_canvas.toDataURL(resImgFormat,resImgQuality);} 436return temp_canvas.toDataURL(resImgFormat);};this.setNewImageSource=function(imageSource){image=null;resetCropHost();events.trigger('image-updated');if(!!imageSource){var newImage=new Image();if(imageSource.substring(0,4).toLowerCase()==='http'){newImage.crossOrigin='anonymous';} 437newImage.onload=function(){events.trigger('load-done');cropEXIF.getData(newImage,function(){var orientationTemp=cropEXIF.getTag(newImage,'Orientation');var newDimensionsW=newImage.width,newDimensionsH=newImage.height;var aspectRaioTemp=newDimensionsW/newDimensionsH;var temp_ctx,temp_canvas;temp_canvas=angular.element('<canvas></canvas>')[0];temp_ctx=temp_canvas.getContext('2d');newDimensionsH=maxCanvasDims[0];newDimensionsW=maxCanvasDims[1]*aspectRaioTemp;var deg=0;temp_canvas.width=newDimensionsW;temp_canvas.height=newDimensionsH;switch(orientationTemp){case 3:deg=180;break;case 6:temp_canvas.width=newDimensionsH;temp_canvas.height=newDimensionsW;deg=90;break;case 8:temp_canvas.width=newDimensionsH;temp_canvas.height=newDimensionsW;deg=270;break;} 438if(deg!=0){temp_ctx.translate(temp_canvas.width/2,temp_canvas.height/2);temp_ctx.rotate(deg*Math.PI/180);temp_ctx.drawImage(newImage,-newDimensionsW/2,-newDimensionsH/2,newDimensionsW,newDimensionsH);}else{temp_ctx.drawImage(newImage,0,0,newDimensionsW,newDimensionsH);} 439image=new Image();image.src=temp_canvas.toDataURL("image/png");resetCropHost();events.trigger('image-updated');setTimeout(function(){resetCropHost();},1000);});};newImage.onerror=function(){events.trigger('load-error');};events.trigger('load-start');newImage.src=imageSource;}};this.setMaxDimensions=function(width,height){maxCanvasDims=[width,height];if(image!==null){var curWidth=ctx.canvas.width,curHeight=ctx.canvas.height;var imageDims=[image.width,image.height],imageRatio=image.width/image.height,canvasDims=imageDims;if(canvasDims[0]>maxCanvasDims[0]){canvasDims[0]=maxCanvasDims[0];canvasDims[1]=canvasDims[0]/imageRatio;}else if(canvasDims[0]<minCanvasDims[0]){canvasDims[0]=minCanvasDims[0];canvasDims[1]=canvasDims[0]/imageRatio;} 440if(canvasDims[1]>maxCanvasDims[1]){canvasDims[1]=maxCanvasDims[1];canvasDims[0]=canvasDims[1]*imageRatio;}else if(canvasDims[1]<minCanvasDims[1]){canvasDims[1]=minCanvasDims[1];canvasDims[0]=canvasDims[1]*imageRatio;} 441elCanvas.prop('width',canvasDims[0]).prop('height',canvasDims[1]).css({'margin-left':-canvasDims[0]/2+'px','margin-top':-canvasDims[1]/2+'px'});var ratioNewCurWidth=ctx.canvas.width/curWidth,ratioNewCurHeight=ctx.canvas.height/curHeight,ratioMin=Math.min(ratioNewCurWidth,ratioNewCurHeight);theArea.setX(theArea.getX()*ratioNewCurWidth);theArea.setY(theArea.getY()*ratioNewCurHeight);theArea.setSize(theArea.getSize()*ratioMin);}else{elCanvas.prop('width',0).prop('height',0).css({'margin-top':0});} 442drawScene();};this.setAreaMinSize=function(size){size=parseInt(size,10);if(!isNaN(size)){theArea.setMinSize(size);drawScene();}};this.setResultImageSize=function(size){size=parseInt(size,10);if(!isNaN(size)){resImgSize=size;}};this.setResultImageFormat=function(format){resImgFormat=format;};this.setResultImageQuality=function(quality){quality=parseFloat(quality);if(!isNaN(quality)&&quality>=0&&quality<=1){resImgQuality=quality;}};this.setAreaType=function(type){var curSize=theArea.getSize(),curMinSize=theArea.getMinSize(),curX=theArea.getX(),curY=theArea.getY();var AreaClass=CropAreaCircle;if(type==='square'){AreaClass=CropAreaSquare;} 443theArea=new AreaClass(ctx,events);theArea.setMinSize(curMinSize);theArea.setSize(curSize);theArea.setX(curX);theArea.setY(curY);if(image!==null){theArea.setImage(image);} 444drawScene();};ctx=elCanvas[0].getContext('2d');theArea=new CropAreaCircle(ctx,events);$document.on('mousemove',onMouseMove);elCanvas.on('mousedown',onMouseDown);$document.on('mouseup',onMouseUp);$document.on('touchmove',onMouseMove);elCanvas.on('touchstart',onMouseDown);$document.on('touchend',onMouseUp);this.destroy=function(){$document.off('mousemove',onMouseMove);elCanvas.off('mousedown',onMouseDown);$document.off('mouseup',onMouseMove);$document.off('touchmove',onMouseMove);elCanvas.off('touchstart',onMouseDown);$document.off('touchend',onMouseMove);elCanvas.remove();};};}]);crop.factory('cropPubSub',[function(){return function(){var events={};this.on=function(names,handler){names.split(' ').forEach(function(name){if(!events[name]){events[name]=[];} 445events[name].push(handler);});return this;};this.trigger=function(name,args){angular.forEach(events[name],function(handler){handler.call(null,args);});return this;};};}
445]);crop.directive('imgCrop',['$timeout','cropHost','cropPubSub',function($timeout,CropHost,CropPubSub){return{restrict:'E',scope:{image:'=',resultImage:'=',changeOnFly:'=',areaType:'@',areaMinSize:'=',resultImageSize:'=',resultImageFormat:'@',resultImageQuality:'=',onChange:'&',onLoadBegin:'&',onLoadDone:'&',onLoadError:'&'},template:'<canvas></canvas>',controller:['$scope',function($scope){$scope.events=new CropPubSub();}],link:function(scope,element){var events=scope.events;var cropHost=new CropHost(element.find('canvas'),{},events);var storedResultImage;var updateResultImage=function(scope){var resultImage=cropHost.getResultImageDataURI();if(storedResultImage!==resultImage){storedResultImage=resultImage;if(angular.isDefined(scope.resultImage)){scope.resultImage=resultImage;} 446scope.onChange({$dataURI:scope.resultImage});}};var fnSafeApply=function(fn){return function(){$timeout(function(){scope.$apply(function(scope){fn(scope);});});};};events.on('load-start',fnSafeApply(function(scope){scope.onLoadBegin({});})).on('load-done',fnSafeApply(function(scope){scope.onLoadDone({});})).on('load-error',fnSafeApply(function(scope){scope.onLoadError({});})).on('area-move area-resize',fnSafeApply(function(scope){if(!!scope.changeOnFly){updateResultImage(scope);}})).on('area-move-end area-resize-end image-updated',fnSafeApply(function(scope){updateResultImage(scope);}));scope.$watch('image',function(){cropHost.setNewImageSource(scope.image);});scope.$watch('areaType',function(){cropHost.setAreaType(scope.areaType);updateResultImage(scope);});scope.$watch('areaMinSize',function(){cropHost.setAreaMinSize(scope.areaMinSize);updateResultImage(scope);});scope.$watch('resultImageSize',function(){cropHost.setResultImageSize(scope.resultImageSize);updateResultImage(scope);});scope.$watch('resultImageFormat',function(){cropHost.setResultImageFormat(scope.resultImageFormat);updateResultImage(scope);});scope.$watch('resultImageQuality',function(){cropHost.setResultImageQuality(scope.resultImageQuality);updateResultImage(scope);});scope.$watch(function(){return[element[0].clientWidth,element[0].clientHeight];},function(value){cropHost.setMaxDimensions(value[0],value[1]);updateResultImage(scope);},true);scope.$on('$destroy',function(){cropHost.destroy();});}};}]);}()); 447;;;(function(){var e=window.AmCharts;e.AmRectangularChart=e.Class({inherits:e.AmCoordinateChart,construct:function(a){e.AmRectangularChart.base.construct.call(this,a);this.theme=a;this.createEvents("zoomed","changed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.depth3D=this.angle=0;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.maxZoomFactor=20;this.zoomOutButtonImageSize=19;this.zoomOutButtonImage="lens";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;e.applyTheme(this,a,"AmRectangularChart")},initChart:function(){e.AmRectangularChart.base.initChart.call(this);this.updateDxy();!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),this.drawGraphs=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();this.scrollbarOnly||this.updateGraphs()},drawChart:function(){e.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(e.ifArray(this.chartData)){var a=this.chartCursor;a&&a.draw()}},resetMargins:function(){var a={},b;if("xy"==this.type){var c=this.xAxes,d=this.yAxes;for(b=0;b<c.length;b++){var g=c[b];g.ignoreAxisWidth||(g.setOrientation(!0),g.fixAxisPosition(),a[g.position]=!0)}for(b=0;b<d.length;b++)c=d[b],c.ignoreAxisWidth||(c.setOrientation(!1),c.fixAxisPosition(),a[c.position]=!0)}else{d=this.valueAxes;for(b=0;b<d.length;b++)c=d[b],c.ignoreAxisWidth||(c.setOrientation(this.rotate),c.fixAxisPosition(),a[c.position]=!0);(b=this.categoryAxis)&&!b.ignoreAxisWidth&&(b.setOrientation(!this.rotate),b.fixAxisPosition(),b.fixAxisPosition(),a[b.position]=!0)}a.left&&(this.marginLeft=0);a.right&&(this.marginRight=0);a.top&&(this.marginTop=0);a.bottom&&(this.marginBottom=0);this.fixMargins=a},measureMargins:function(){var a=this.valueAxes,b,c=this.autoMarginOffset,d=this.fixMargins,g=this.realWidth,h=this.realHeight,f=c,e=c,k=g;b=h;var m;for(m=0;m<a.length;m++)a[m].handleSynchronization(),b=this.getAxisBounds(a[m],f,k,e,b),f=Math.round(b.l),k=Math.round(b.r),e=Math.round(b.t),b=Math.round(b.b);if(a=this.categoryAxis)b=this.getAxisBounds(a,f,k,e,b),f=Math.round(b.l),k=Math.round(b.r),e=Math.round(b.t),b=Math.round(b.b);d.left&&f<c&&(this.marginLeft=Math.round(-f+c),!isNaN(this.minMarginLeft)&&this.marginLeft<this.minMarginLeft&&(this.marginLeft=this.minMarginLeft));d.right&&k>=g-c&&(this.marginRight=Math.round(k-g+c),!isNaN(this.minMarginRight)&&this.marginRight<this.minMarginRight&&(this.marginRight=this.minMarginRight));d.top&&e<c+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-e+c+this.titleHeight),!isNaN(this.minMarginTop)&&this.marginTop<this.minMarginTop&&(this.marginTop=this.minMarginTop));d.bottom&&b>h-c&&(this.marginBottom=Math.round(this.marginBottom+b-h+c),!isNaN(this.minMarginBottom)&&this.marginBottom<this.minMarginBottom&&(this.marginBottom=this.minMarginBottom));this.initChart()},getAxisBounds:function(a,b,c,d,g){if(!a.ignoreAxisWidth){var h=a.labelsSet,f=a.tickLength;a.inside&&(f=0);if(h)switch(h=a.getBBox(),a.position){case"top":a=h.y;d>a&&(d=a);break;case"bottom":a=h.y+h.height;g<a&&(g=a);break;case"right":a=h.x+h.width+f+3;c<a&&(c=a);break;case"left":a=h.x-f,b>a&&(b=a)}}return{l:b,t:d,r:c,b:g}},drawZoomOutButton:function(){var a=this;if(!a.zbSet){var b=a.container.set();a.zoomButtonSet.push(b);var c=a.color,d=a.fontSize,g=a.zoomOutButtonImageSize,h=a.zoomOutButtonImage.replace(/\.[a-z]*$/i,""),f=a.langObj.zoomOutText||a.zoomOutText,l=a.zoomOutButtonColor,k=a.zoomOutButtonAlpha,m=a.zoomOutButtonF
447ontSize,p=a.zoomOutButtonPadding;isNaN(m)||(d=m);(m=a.zoomOutButtonFontColor)&&(c=m);var m=a.zoomOutButton,n;m&&(m.fontSize&&(d=m.fontSize),m.color&&(c=m.color),m.backgroundColor&&(l=m.backgroundColor),isNaN(m.backgroundAlpha)||(a.zoomOutButtonRollOverAlpha=m.backgroundAlpha));var u=m=0,u=a.pathToImages;if(h){if(e.isAbsolute(h)||void 0===u)u="";n=a.container.image(u+h+a.extension,0,0,g,g);e.setCN(a,n,"zoom-out-image");b.push(n);n=n.getBBox();m=n.width+5}void 0!==f&&(c=e.text(a.container,f,c,a.fontFamily,d,"start"),e.setCN(a,c,"zoom-out-label"),d=c.getBBox(),u=n?n.height/2-3:d.height/2,c.translate(m,u),b.push(c));n=b.getBBox();c=1;e.isModern||(c=0);l=e.rect(a.container,n.width+2*p+5,n.height+2*p-2,l,1,1,l,c);l.setAttr("opacity",k);l.translate(-p,-p);e.setCN(a,l,"zoom-out-bg");b.push(l);l.toBack();a.zbBG=l;n=l.getBBox();b.translate(a.marginLeftReal+a.plotAreaWidth-n.width+p,a.marginTopReal+p);b.hide();b.mouseover(function(){a.rollOverZB()}).mouseout(function(){a.rollOutZB()}).click(function(){a.clickZB()}).touchstart(function(){a.rollOverZB()}).touchend(function(){a.rollOutZB();a.clickZB()});for(k=0;k<b.length;k++)b[k].attr({cursor:"pointer"});void 0!==a.zoomOutButtonTabIndex&&(b.setAttr("tabindex",a.zoomOutButtonTabIndex),b.setAttr("role","menuitem"),b.keyup(function(b){13==b.keyCode&&a.clickZB()}));a.zbSet=b}},rollOverZB:function(){this.rolledOverZB=!0;this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.rolledOverZB=!1;this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.rolledOverZB=!1;this.zoomOut()},zoomOut:function(){this.zoomOutValueAxes()},drawPlotArea:function(){var a=this.dx,b=this.dy,c=this.marginLeftReal,d=this.marginTopReal,g=this.plotAreaWidth-1,h=this.plotAreaHeight-1,f=this.plotAreaFillColors,l=this.plotAreaFillAlphas,k=this.plotAreaBorderColor,m=this.plotAreaBorderAlpha;"object"==typeof l&&(l=l[0]);f=e.polygon(this.container,[0,g,g,0,0],[0,0,h,h,0],f,l,1,k,m,this.plotAreaGradientAngle);e.setCN(this,f,"plot-area");f.translate(c+a,d+b);this.set.push(f);0!==a&&0!==b&&(f=this.plotAreaFillColors,"object"==typeof f&&(f=f[0]),f=e.adjustLuminosity(f,-.15),g=e.polygon(this.container,[0,a,g+a,g,0],[0,b,b,0,0],f,l,1,k,m),e.setCN(this,g,"plot-area-bottom"),g.translate(c,d+h),this.set.push(g),a=e.polygon(this.container,[0,0,a,a,0],[0,h,h+b,b,0],f,l,1,k,m),e.setCN(this,a,"plot-area-left"),a.translate(c,d),this.set.push(a));(c=this.bbset)&&this.scrollbarOnly&&c.remove()},updatePlotArea:function(){var a=this.updateWidth(),b=this.updateHeight(),c=this.container;this.realWidth=a;this.realWidth=b;c&&this.container.setSize(a,b);var c=this.marginLeftReal,d=this.marginTopReal,a=a-c-this.marginRightReal-this.dx,b=b-d-this.marginBottomReal;1>a&&(a=1);1>b&&(b=1);this.plotAreaWidth=Math.round(a);this.plotAreaHeight=Math.round(b);this.plotBalloonsSet.translate(c,d)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var a=this.getTitleHeight();this.titleHeight=a;this.marginTopReal=this.marginTop-this.dy;this.fixMargins&&!this.fixMargins.top&&(this.marginTopReal+=a);this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b];this.setAxisRenderers(c);this.updateObjectSize(c)}},setAxisRenderers:function(a){a.axisRenderer=e.RecAxis;a.guideFillRenderer=e.RecFill;a.axisItemRenderer=e.RecItem;a.marginsChanged=!0},updateGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.index=b;c.rotate=this.rotate;this.updateObjectSize(c)}},updateObjectSize:function(a){a.width=this.plotAreaWidth-1;a.height=this.plotAreaHeight-1;a.x=this.marginLeftReal;a.y=this.marginTopReal;a.dx=this.dx;a.dy=this.dy},updateChartCursor:function(){var a=this.chartCursor;a&&(a=e.processObject(a,e.ChartCursor,this.theme),this.updateObjectSize(a),this.addChartCursor(a),a.chart=this)},processScrollbars:function(){var a=this.chartScrollbar;a&&(a=e.processObject(a,e.ChartScrollbar,this.theme),this.addChartScrollbar(a))},updateScrollbars:function(){},removeChartCursor:function(){e.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b];c.valueAxis.recalculateToPercents?c.set&&c.set.hide():(c.x=this.marginLeftReal,c.y=this.marginTopReal,c.draw())}},handleCursorValueZoom:function(){},addTrendLine:function(a){this.trendLines.push(a)},zoomOutValueAxes:function(){for(var a=this.valueAxes,b=0;b<a.length;b++)a[b].zoomOut()},removeTrendLine:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)},adjustMargins:function(a,b){var c=a.position,d=a.scrollbarHeight+a.offset;a.enabled&&("top"==c?b?this.marginLeftReal+=d:this.marginTopReal+=d:b?this.marginRightReal+=d:this.marginBottomReal+=d)},getScrollbarPosition:function(a,b,c){var d="bottom",g="top";a.oppositeAxis||(g=d,d="top");a.position=b?"bottom"==c||"left"==c?d:g:"top"==c||"right"==c?d:g},updateChartScrollbar:function(a,b){if(a){a.rotate=b;var c=this.marginTopReal,d=this.marginLeftReal,g=a.scrollbarHeight,h=this.dx,f=this.dy,e=a.offset;
447"top"==a.position?b?(a.y=c,a.x=d-g-e):(a.y=c-g+f-e,a.x=d+h):b?(a.y=c+f,a.x=d+this.plotAreaWidth+h+e):(a.y=c+this.plotAreaHeight+e,a.x=this.marginLeftReal)}},showZB:function(a){var b=this.zbSet;a&&(b=this.zoomOutText,""!==b&&b&&this.drawZoomOutButton());if(b=this.zbSet)this.zoomButtonSet.push(b),a?b.show():b.hide(),this.rollOutZB()},handleReleaseOutside:function(a){e.AmRectangularChart.base.handleReleaseOutside.call(this,a);(a=this.chartCursor)&&a.handleReleaseOutside&&a.handleReleaseOutside()},handleMouseDown:function(a){e.AmRectangularChart.base.handleMouseDown.call(this,a);var b=this.chartCursor;b&&b.handleMouseDown&&!this.rolledOverZB&&b.handleMouseDown(a)},update:function(){e.AmRectangularChart.base.update.call(this);this.chartCursor&&this.chartCursor.update&&this.chartCursor.update()},handleScrollbarValueZoom:function(a){this.relativeZoomValueAxes(a.target.valueAxes,a.relativeStart,a.relativeEnd);this.zoomAxesAndGraphs()},zoomValueScrollbar:function(a){if(a&&a.enabled){var b=a.valueAxes[0],c=b.relativeStart,d=b.relativeEnd;b.reversed&&(d=1-c,c=1-b.relativeEnd);a.percentZoom(c,d)}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var a=this.valueAxes,b;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);a=this.graphs;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);(b=this.chartCursor)&&b.clearSelection();this.zoomTrendLines()}},handleValueAxisZoomReal:function(a,b){var c=a.relativeStart,d=a.relativeEnd;if(c>d)var g=c,c=d,d=g;this.relativeZoomValueAxes(b,c,d);this.updateAfterValueZoom()},updateAfterValueZoom:function(){this.zoomAxesAndGraphs();this.zoomScrollbar()},relativeZoomValueAxes:function(a,b,c){this.hideBalloonReal();b=e.fitToBounds(b,0,1);c=e.fitToBounds(c,0,1);if(b>c){var d=b;b=c;c=d}var d=1/this.maxZoomFactor,g=e.getDecimals(d)+4;c-b<d&&(c=b+(c-b)/2,b=c-d/2,c+=d/2,1<c&&(b-=c-1,c=1),0>b&&(b=0,c=d));b=e.roundTo(b,g);c=e.roundTo(c,g);d=!1;if(a){for(g=0;g<a.length;g++){var h=a[g].zoomToRelativeValues(b,c,!0);h&&(d=h)}this.showZB()}return d},addChartCursor:function(a){e.callMethod("destroy",[this.chartCursor]);a&&(this.listenTo(a,"moved",this.handleCursorMove),this.listenTo(a,"zoomed",this.handleCursorZoom),this.listenTo(a,"zoomStarted",this.handleCursorZoomStarted),this.listenTo(a,"panning",this.handleCursorPanning),this.listenTo(a,"onHideCursor",this.handleCursorHide));this.chartCursor=a},handleCursorChange:function(){},handleCursorMove:function(a){var b,c=this.valueAxes;for(b=0;b<c.length;b++)if(!a.panning){var d=c[b];d&&d.showBalloon&&d.showBalloon(a.x,a.y)}},handleCursorZoom:function(a){if(this.skipZoomed)this.skipZoomed=!1;else{var b=this.startX0,c=this.endX0,d=this.endY0,g=this.startY0,e=a.startX,f=a.endX,l=a.startY,k=a.endY;this.startX0=this.endX0=this.startY0=this.endY0=NaN;this.handleCursorZoomReal(b+e*(c-b),b+f*(c-b),g+l*(d-g),g+k*(d-g),a)}},handleCursorHide:function(){var a,b=this.valueAxes;for(a=0;a<b.length;a++)b[a].hideBalloon();b=this.graphs;for(a=0;a<b.length;a++)b[a].hideBalloonReal()}})})();(function(){var e=window.AmCharts;e.AmSerialChart=e.Class({inherits:e.AmRectangularChart,construct:function(a){this.type="serial";e.AmSerialChart.base.construct.call(this,a);this.cname="AmSerialChart";this.theme=a;this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=.8;var b=new e.CategoryAxis(a);b.chart=this;this.categoryAxis=b;this.zoomOutOnDataUpdate=!0;this.mouseWheelZoomEnabled=this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=!1;this.minSelectedTime=0;e.applyTheme(this,a,this.cname)},initChart:function(){e.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");if(this.dataChanged)this.parseData();else this.onDataUpdated();this.drawGraphs=!0},onDataUpdated:function(){var a=this.countColumns(),b=this.chartData,c=this.graphs,d;for(d=0;d<c.length;d++){var g=c[d];g.data=b;g.columnCount=a}0<b.length&&(this.firstTime=this.getStartTime(b[0].time),this.lastTime=this.getEndTime(b[b.length-1].time));this.drawChart();this.autoMargins&&!this.marginsUpdated?(this.marginsUpdated=!0,this.measureMargins()):this.dispDUpd()},syncGrid:function(){if(this.synchronizeGrid){var a=this.valueAxes,b,c;if(0<a.length){var d=0;for(c=0;c<a.length;c++)b=a[c],d<b.gridCountReal&&(d=b.gridCountReal);var g=!1;for(c=0;c<a.length;
447c++)if(b=a[c],b.gridCountReal<d){var h=(d-b.gridCountReal)/2,f=g=h;0!==h-Math.round(h)&&(g-=.5,f+=.5);0<=b.min&&0>b.min-g*b.step&&(f+=g,g=0);0>=b.max&&0<b.max+f*b.step&&(g+=f,f=0);h=e.getDecimals(b.step);b.minimum=e.roundTo(b.min- 448g*b.step,h);b.maximum=e.roundTo(b.max+f*b.step,h);b.setStep=b.step;g=b.strictMinMax=!0}g&&this.updateAfterValueZoom();for(c=0;c<a.length;c++)b=a[c],b.minimum=NaN,b.maximum=NaN,b.setStep=NaN,b.strictMinMax=!1}}},handleWheelReal:function(a,b){if(!this.wheelBusy){var c=this.categoryAxis,d=c.parseDates,g=c.minDuration(),e=1,f=1;this.mouseWheelZoomEnabled?b||(e=-1):b&&(e=-1);var l=this.chartCursor;if(l)if(l.mouseIsOver()){var k=l.mouseX,l=l.mouseY;e!=f&&(k=this.rotate?l/this.plotAreaHeight:k/this.plotAreaWidth,e*=k,f*=1-k);k=.05*(this.end-this.start);d&&(k=.05*(this.endTime-this.startTime)/g);1>k&&(k=1);e*=k;f*=k;if(!d||c.equalSpacing)e=Math.round(e),f=Math.round(f);l=this.chartData.length;c=this.lastTime;k=this.firstTime;0>a?d?(l=this.endTime-this.startTime,d=this.startTime+e*g,g=this.endTime+f*g,0<f&&0<e&&g>=c&&(g=c,d=c-l),this.zoomToDates(new Date(d),new Date(g))):(0<f&&0<e&&this.end>=l-1&&(e=f=0),d=this.start+e,g=this.end+f,this.zoomToIndexes(d,g)):d?(l=this.endTime-this.startTime,d=this.startTime- 449e*g,g=this.endTime-f*g,0<f&&0<e&&d<=k&&(d=k,g=k+l),this.zoomToDates(new Date(d),new Date(g))):(0<f&&0<e&&1>this.start&&(e=f=0),d=this.start-e,g=this.end-f,this.zoomToIndexes(d,g))}else this.handleMouseOut()}},validateData:function(a){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!a&&(this.endTime=this.end=this.startTime=this.start=NaN);var b=a=!1,c=!1,d=this.chartScrollbar;d&&(d.dragging&&(a=!0,d.handleDragStop()),d.resizingRight&&(c=!0,d.rightDragStop()),d.resizingLeft&&(b=!0,d.leftDragStop()));e.AmSerialChart.base.validateData.call(this);a&&d.handleDragStart();c&&d.rightDragStart();b&&d.leftDragStart()},drawChart:function(){if(0<this.realWidth&&0<this.realHeight){e.AmSerialChart.base.drawChart.call(this);var a=this.chartData;if(e.ifArray(a)){var b=this.chartScrollbar;!b||!this.marginsUpdated&&this.autoMargins||b.draw();(b=this.valueScrollbar)&&b.draw();var b=a.length-1,c,d;c=this.categoryAxis;if(c.parseDates&&!c.equalSpacing){if(c=this.startTime,d=this.endTime,isNaN(c)||isNaN(d))c=this.firstTime,d=this.lastTime}else{c=this.start;d=this.end;if(isNaN(c)||isNaN(d))d=c=NaN;isNaN(c)&&(isNaN(this.startTime)||(c=this.getClosestIndex(a,"time",this.startTime,!0,0,a.length)));isNaN(d)&&(isNaN(this.endTime)||(d=this.getClosestIndex(a,"time",this.endTime,!1,0,a.length)));if(isNaN(c)||isNaN(d))c=0,d=b}this.endTime=this.startTime=this.end=this.start=void 0;this.zoom(c,d)}}else this.cleanChart()},cleanChart:function(){e.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor,this.valueScrollbar])},updateCategoryAxis:function(a,b,c){a.chart=this;a.id=c;a.rotate=b;a.setOrientation(!this.rotate);a.init();this.setAxisRenderers(a);this.updateObjectSize(a)},updateValueAxes:function(){e.AmSerialChart.base.updateValueAxes.call(this);var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],d=this.rotate;c.rotate=d;c.setOrientation(d);d=this.categoryAxis;if(!d.startOnAxis||d.parseDates)c.expandMinMax=!0}},getStartTime:function(a){var b=this.categoryAxis;return e.resetDateToMin(new Date(a),b.minPeriod,1,b.firstDayOfWeek).getTime()},getEndTime:function(a){var b=e.extractPeriod(this.categoryAxis.minPeriod);return e.changeDate(new Date(a),b.period,b.count,!0).getTime()-1},updateMargins:function(){e.AmSerialChart.base.updateMargins.call(this);var a=this.chartScrollbar;a&&(this.getScrollbarPosition(a,this.rotate,this.categoryAxis.position),this.adjustMargins(a,this.rotate));if(a=this.valueScrollbar)this.getScrollbarPosition(a,!this.rotate,this.valueAxes[0].position),this.adjustMargins(a,!this.rotate)},updateScrollbars:function(){e.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,this.rotate);this.updateChartScrollbar(this.valueScrollbar,!this.rotate)},zoom:function(a,b){var c=this.categoryAxis;c.parseDates&&!c.equalSpacing?(this.timeZoom(a,b),isNaN(a)&&this.zoomOutValueAxes()):this.indexZoom(a,b);(c=this.chartCursor)&&(c.pan||c.hideCursorReal());this.updateLegendValues()},timeZoom:function(a,b){var c=this.maxSelectedTime;isNaN(c)||(b!=this.endTime&&b-a>c&&(a=b-c),a!=this.startTime&&b-a>c&&(b=a+c));var d=this.minSelectedTime;if(0<d&&b-a<d){var g=Math.round(a+(b-a)/2),d=Math.round(d/2);a=g-d;b=g+d}d=this.chartData;g=this.categoryAxis;if(e.ifArray(d)&&(a!=this.startTime||b!=this.endTime)){var h=g.minDuration(),f=this.firstTime,l=this.lastTime;a||(a=f,isNaN(c)||(a=l-c));b||(b=l);a>l&&(a=l);b<f&&(b=f);
449a<f&&(a=f);b>l&&(b=l);b<a&&(b=a+h);b-a<h/5&&(b<l?b=a+h/5:a=b-h/5);this.startTime=a;this.endTime=b;c=d.length-1;h=this.getClosestIndex(d,"time",a,!0,0,c);d=this.getClosestIndex(d,"time",b,!1,h,c);g.timeZoom(a,b);g.zoom(h,d);this.start=e.fitToBounds(h,0,c);this.end=e.fitToBounds(d,0,c);this.zoomAxesAndGraphs();this.zoomScrollbar();this.fixCursor();this.showZB();this.syncGrid();this.updateColumnsDepth();this.dispatchTimeZoomEvent()}},showZB:function(){var a,b=this.categoryAxis;b&&b.parseDates&&!b.equalSpacing&&(this.startTime>this.firstTime&&(a=!0),this.endTime<this.lastTime&&(a=!0));0<this.start&&(a=!0);this.end<this.chartData.length- 4501&&(a=!0);if(b=this.valueAxes)b=b[0],isNaN(b.relativeStart)||(0!==e.roundTo(b.relativeStart,3)&&(a=!0),1!=e.roundTo(b.relativeEnd,3)&&(a=!0));e.AmSerialChart.base.showZB.call(this,a)},updateAfterValueZoom:function(){e.AmSerialChart.base.updateAfterValueZoom.call(this);this.updateColumnsDepth()},indexZoom:function(a,b){var c=this.maxSelectedSeries,d=!1;isNaN(c)||(b!=this.end&&b-a>c&&(a=b-c,d=!0),a!=this.start&&b-a>c&&(b=a+c,d=!0));if(d&&(d=this.chartScrollbar)&&d.dragger){var g=d.dragger.getBBox();d.maxWidth=g.width;d.maxHeight=g.height}if(a!=this.start||b!=this.end)d=this.chartData.length-1,isNaN(a)&&(a=0,isNaN(c)||(a=d-c)),isNaN(b)&&(b=d),b<a&&(b=a),b>d&&(b=d),a>d&&(a=d-1),0>a&&(a=0),this.start=a,this.end=b,this.categoryAxis.zoom(a,b),this.zoomAxesAndGraphs(),this.zoomScrollbar(),this.fixCursor(),0!==a||b!=this.chartData.length-1?this.showZB(!0):this.showZB(!1),this.syncGrid(),this.updateColumnsDepth(),this.dispatchIndexZoomEvent()},updateGraphs:function(){e.AmSerialChart.base.updateGraphs.call(this);var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.columnWidthReal=this.columnWidth;c.categoryAxis=this.categoryAxis;e.isString(c.fillToGraph)&&(c.fillToGraph=this.graphsById[c.fillToGraph])}},zoomAxesAndGraphs:function(){e.AmSerialChart.base.zoomAxesAndGraphs.call(this);this.updateColumnsDepth()},updateColumnsDepth:function(){if(0!==this.depth3D||0!==this.angle){var a,b=this.graphs,c;this.columnsArray=[];for(a=0;a<b.length;a++){c=b[a];var d=c.columnsArray;if(d){var g;for(g=0;g<d.length;g++)this.columnsArray.push(d[g])}}this.columnsArray.sort(this.compareDepth);b=this.columnsSet;if(0<this.columnsArray.length){d=this.container.set();this.columnSet.push(d);for(a=0;a<this.columnsArray.length;a++)d.push(this.columnsArray[a].column.set);c&&d.translate(c.x,c.y);this.columnsSet=d}e.remove(b)}},compareDepth:function(a,b){return a.depth>b.depth?1:-1},zoomScrollbar:function(){var a=this.chartScrollbar,b=this.categoryAxis;if(a){if(!this.zoomedByScrollbar){var c=a.dragger;c&&c.stop()}this.zoomedByScrollbar=!1;b.parseDates&&!b.equalSpacing?a.timeZoom(this.startTime,this.endTime):a.zoom(this.start,this.end)}this.zoomValueScrollbar(this.valueScrollbar)},updateTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b],c=e.processObject(c,e.TrendLine,this.theme);a[b]=c;c.chart=this;c.id||(c.id="trendLineAuto"+b+"_"+(new Date).getTime());e.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.categoryAxis=this.categoryAxis}},validateNow:function(a,b){a&&this.zoomOutOnDataUpdate&&(this.endTime=this.end=this.startTime=this.start=NaN);e.AmSerialChart.base.validateNow.call(this,a,b)},countColumns:function(){var a=0,b=this.valueAxes.length,c=this.graphs.length,d,g,e=!1,f,l;for(l=0;l<b;l++){g=this.valueAxes[l];var k=g.stackType,m=0;if("100%"==k||"regular"==k)for(e=!1,f=0;f<c;f++)d=this.graphs[f],d.tcc=1,d.valueAxis==g&&"column"==d.type&&(!e&&d.stackable&&(a++,e=!0),(!d.stackable&&d.clustered||d.newStack&&0!==m)&&a++,d.columnIndex=a-1,d.clustered||(d.columnIndex=0),m++);if("none"==k||"3d"==k){m=!1;for(f=0;f<c;f++)d=this.graphs[f],d.valueAxis==g&&"column"==d.type&&(d.clustered?(d.tcc=1,d.newStack&&(a=0),d.hidden||(d.columnIndex=a,a++)):d.hidden||(m=!0,d.tcc=1,d.columnIndex=0));m&&0===a&&(a=1)}if("3d"==k){g=1;for(m=0;m<c;m++)d=this.graphs[m],d.newStack&&g++,d.depthCount=g,d.tcc=a;a=g}if("regular"==k||"100%"==k)for(g=10,m=0;m<c;m++)d=this.graphs[m],d.newStack&&g--,d.depthCount=g,d.tcc=a}return a},parseData:function(){e.AmSerialChart.base.parseData.call(this);this.parseSerialData(this.dataProvider)},getCategoryIndexByValue:function(a){var b=this.chartData,c;for(c=0;c<b.length;c++)if(b[c].category==a)return c},handleScrollbarZoom:function(a){this.zoomedByScrollbar=!0;this.zoom(a.start,a.end)},dispatchTimeZoomEvent:function(){if(this.drawGraphs&&(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime)){var a={type:"zoomed"};a.startDate=new Date(this.startTime);a.endDate=new Date(this.endTime);a.startIndex=this.start;a.endIndex=this.end;this.startIndex=this.start;this.endIndex=this.end;this.startDate=a.startDate;this.endDate=a.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;
450var b=this.categoryAxis,c=e.extractPeriod(b.minPeriod).period,b=b.dateFormatsObject[c];a.startValue=e.formatDate(a.startDate,b,this);a.endValue=e.formatDate(a.endDate,b,this);a.chart=this;a.target=this;this.fire(a)}},dispatchIndexZoomEvent:function(){if(this.drawGraphs&&(this.prevStartIndex!=this.start||this.prevEndIndex!=this.end)){this.startIndex=this.start;this.endIndex=this.end;var a=this.chartData;if(e.ifArray(a)&&!isNaN(this.start)&&!isNaN(this.end)){var b={chart:this,target:this,type:"zoomed"};b.startIndex=this.start;b.endIndex=this.end;b.startValue=a[this.start].category;b.endValue=a[this.end].category;this.categoryAxis.parseDates&&(this.startTime=a[this.start].time,this.endTime=a[this.end].time,b.startDate=new Date(this.startTime),b.endDate=new Date(this.endTime));this.prevStartIndex=this.start;this.prevEndIndex=this.end;this.fire(b)}}},updateLegendValues:function(){this.legend&&this.legend.updateValues()},getClosestIndex:function(a,b,c,d,g,e){0>g&&(g=0);e>a.length-1&&(e=a.length-1);var f=g+Math.round((e-g)/2),l=a[f][b];return c==l?f:1>=e-g?d?g:Math.abs(a[g][b]-c)<Math.abs(a[e][b]-c)?g:e:c==l?f:c<l?this.getClosestIndex(a,b,c,d,g,f):this.getClosestIndex(a,b,c,d,f,e)},zoomToIndexes:function(a,b){var c=this.chartData;if(c){var d=c.length;0<d&&(0>a&&(a=0),b>d-1&&(b=d-1),d=this.categoryAxis,d.parseDates&&!d.equalSpacing?this.zoom(c[a].time,this.getEndTime(c[b].time)):this.zoom(a,b))}},zoomToDates:function(a,b){var c=this.chartData;if(c)if(this.categoryAxis.equalSpacing){var d=this.getClosestIndex(c,"time",a.getTime(),!0,0,c.length);b=e.resetDateToMin(b,this.categoryAxis.minPeriod,1);c=this.getClosestIndex(c,"time",b.getTime(),!1,0,c.length);this.zoom(d,c)}else this.zoom(a.getTime(),b.getTime())},zoomToCategoryValues:function(a,b){this.chartData&&this.zoom(this.getCategoryIndexByValue(a),this.getCategoryIndexByValue(b))},formatPeriodString:function(a,b){if(b){b.periodDataItem={};b.periodPercentDataItem={};var c=["value","open","low","high","close"],d="value open low high close average sum count".split(" "),g=b.valueAxis,h=this.chartData,f=b.numberFormatter;f||(f=this.nf);for(var l=0;l<c.length;l++){for(var k=c[l],m=0,p=0,n=0,u=0,v,x,E,t,r,B,q,w,y,C,F=this.start;F<=this.end;F++){var D=h[F];if(D){var A=D.axes[g.id].graphs[b.id];if(A){if(A.values){var z=A.values[k],D=D.x.categoryAxis;if(this.rotate){if(0>D||D>A.graph.height)z=NaN}else if(0>D||D>A.graph.width)z=NaN;if(!isNaN(z)){isNaN(v)&&(v=z);x=z;if(isNaN(E)||E>z)E=z;if(isNaN(t)||t<z)t=z;r=e.getDecimals(m);D=e.getDecimals(z);m+=z;m=e.roundTo(m,Math.max(r,D));p++;r=m/p}}if(A.percents&&(A=A.percents[k],!isNaN(A))){isNaN(B)&&(B=A);q=A;if(isNaN(w)||w>A)w=A;if(isNaN(y)||y<A)y=A;C=e.getDecimals(n);z=e.getDecimals(A);n+=A;n=e.roundTo(n,Math.max(C,z));u++;C=n/u}}}}m={open:v,close:x,high:t,low:E,average:r,sum:m,count:p};n={open:B,close:q,high:y,low:w,average:C,sum:n,count:u};a=e.formatValue(a,m,d,f,k+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=e.formatValue(a,n,d,this.pf,"percents\\."+k+"\\.");b.periodDataItem[k]=m;b.periodPercentDataItem[k]=n}}return a=e.cleanFromEmpty(a)},formatString:function(a,b,c){if(b){var d=b.graph;if(void 0!==a){if(-1!=a.indexOf("[[category]]")){var g=b.serialDataItem.category;if(this.categoryAxis.parseDates){var h=this.balloonDateFormat,f=this.chartCursor;f&&f.categoryBalloonDateFormat&&(h=f.categoryBalloonDateFormat);h=e.formatDate(g,h,this);-1!=h.indexOf("fff")&&(h=e.formatMilliseconds(h,g));g=h}a=a.replace(/\[\[category\]\]/g,String(g.replace("$","$$$")))}g=d.numberFormatter;g||(g=this.nf);h=b.graph.valueAxis;(f=h.duration)&&!isNaN(b.values.value)&&h.maxInterval&&(f=e.formatDuration(b.values.value,f,"",h.durationUnits,h.maxInterval,g),a=a.replace(RegExp("\\[\\[value\\]\\]","g"),f));"date"==h.type&&(h=e.formatDate(new Date(b.values.value),d.dateFormat,this),f=RegExp("\\[\\[value\\]\\]","g"),a=a.replace(f,h),h=e.formatDate(new Date(b.values.open),d.dateFormat,this),f=RegExp("\\[\\[open\\]\\]","g"),a=a.replace(f,h));d="value open low high close total".split(" ");h=this.pf;a=e.formatValue(a,b.percents,d,h,"percents\\.");a=e.formatValue(a,b.values,d,g,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=e.formatValue(a,b.values,["percents"],h);-1!=a.indexOf("[[")&&(a=e.formatDataContextValue(a,b.dataContext));-1!=a.indexOf("[[")&&b.graph.customData&&(a=e.formatDataContextValue(a,b.graph.customData));
450a=e.AmSerialChart.base.formatString.call(this,a,b,c)}return a}},updateChartCursor:function(){e.AmSerialChart.base.updateChartCursor.call(this);var a=this.chartCursor,b=this.categoryAxis;if(a){var c=a.categoryBalloonAlpha,d=a.categoryBalloonColor,g=a.color;void 0===d&&(d=a.cursorColor);var h=a.valueZoomable,f=a.zoomable,l=a.valueLineEnabled;this.rotate?(a.vLineEnabled=l,a.hZoomEnabled=h,a.vZoomEnabled=f):(a.hLineEnabled=l,a.vZoomEnabled=h,a.hZoomEnabled=f);if(a.valueLineBalloonEnabled)for(l=0;l<this.valueAxes.length;l++)h=this.valueAxes[l],(f=h.balloon)||(f={}),f=e.extend(f,this.balloon,!0),f.fillColor=d,f.balloonColor=d,f.fillAlpha=c,f.borderColor=d,f.color=g,h.balloon=f;else for(f=0;f<this.valueAxes.length;f++)h=this.valueAxes[f],h.balloon&&(h.balloon=null);b&&(b.balloonTextFunction=a.categoryBalloonFunction,a.categoryLineAxis=b,b.balloonText=a.categoryBalloonText,a.categoryBalloonEnabled&&((f=b.balloon)||(f={}),f=e.extend(f,this.balloon,!0),f.fillColor=d,f.balloonColor=d,f.fillAlpha=c,f.borderColor=d,f.color=g,b.balloon=f),b.balloon&&(b.balloon.enabled=a.categoryBalloonEnabled))}},addChartScrollbar:function(a){e.callMethod("destroy",[this.chartScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarZoom));this.rotate?void 0===a.width&&(a.width=a.scrollbarHeight):void 0===a.height&&(a.height=a.scrollbarHeight);a.gridAxis=this.categoryAxis;this.chartScrollbar=a},addValueScrollbar:function(a){e.callMethod("destroy",[this.valueScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarValueZoom),this.listenTo(a,"zoomStarted",this.handleCursorZoomStarted));var b=a.scrollbarHeight;this.rotate?void 0===a.height&&(a.height=b):void 0===a.width&&(a.width=b);a.gridAxis||(a.gridAxis=this.valueAxes[0]);a.valueAxes=this.valueAxes;this.valueScrollbar=a},removeChartScrollbar:function(){e.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},removeValueScrollbar:function(){e.callMethod("destroy",[this.valueScrollbar]);this.valueScrollbar=null},handleReleaseOutside:function(a){e.AmSerialChart.base.handleReleaseOutside.call(this,a);e.callMethod("handleReleaseOutside",[this.chartScrollbar,this.valueScrollbar])},update:function(){e.AmSerialChart.base.update.call(this);this.chartScrollbar&&this.chartScrollbar.update&&this.chartScrollbar.update();this.valueScrollbar&&this.valueScrollbar.update&&this.valueScrollbar.update()},processScrollbars:function(){e.AmSerialChart.base.processScrollbars.call(this);var a=this.valueScrollbar;a&&(a=e.processObject(a,e.ChartScrollbar,this.theme),a.id="valueScrollbar",this.addValueScrollbar(a))},handleValueAxisZoom:function(a){this.handleValueAxisZoomReal(a,this.valueAxes)},zoomOut:function(){e.AmSerialChart.base.zoomOut.call(this);this.zoom();this.syncGrid()},getNextItem:function(a){var b=a.index,c=this.chartData,d=a.graph;if(b+1<c.length)for(b+=1;b<c.length;b++)if(a=c[b])if(a=a.axes[d.valueAxis.id].graphs[d.id],!isNaN(a.y))return a},handleCursorZoomReal:function(a,b,c,d,e){var h=e.target,f,l;this.rotate?(isNaN(a)||isNaN(b)||this.relativeZoomValueAxes(this.valueAxes,a,b)&&this.updateAfterValueZoom(),h.vZoomEnabled&&(f=e.start,l=e.end)):(isNaN(c)||isNaN(d)||this.relativeZoomValueAxes(this.valueAxes,c,d)&&this.updateAfterValueZoom(),h.hZoomEnabled&&(f=e.start,l=e.end));isNaN(f)||isNaN(l)||(a=this.categoryAxis,a.parseDates&&!a.equalSpacing?this.zoomToDates(new Date(f),new Date(l)):this.zoomToIndexes(f,l))},handleCursorZoomStarted:function(){var a=this.valueAxes;if(a){var a=a[0],b=a.relativeStart,c=a.relativeEnd;a.reversed&&(b=1-a.relativeEnd,c=1-a.relativeStart);this.rotate?(this.startX0=b,this.endX0=c):(this.startY0=b,this.endY0=c)}this.categoryAxis&&(this.start0=this.start,this.end0=this.end,this.startTime0=this.startTime,this.endTime0=this.endTime)},fixCursor:function(){this.chartCursor&&this.chartCursor.fixPosition();this.prevCursorItem=null},handleCursorMove:function(a){e.AmSerialChart.base.handleCursorMove.call(this,a);var b=a.target,c=this.categoryAxis;if(a.panning)this.handleCursorHide(a);else if(this.chartData&&!b.isHidden){var d=this.graphs;if(d){var g;g=c.xToIndex(this.rotate?a.y:a.x);if(g=this.chartData[g]){var h,f,l,k;if(b.oneBalloonOnly&&b.valueBalloonsEnabled){var m=Infinity;for(h=d.length-1;0<=h;h--)if(f=d[h],f.balloon.enabled&&f.showBalloon&&!f.hidden){l=f.valueAxis.id;l=g.axes[l].graphs[f.id];if(b.showNextAvailable&&isNaN(l.y)&&(l=this.getNextItem(l),!l))continue;l=l.y;"top"==f.showBalloonAt&&(l=0);"bottom"==f.showBalloonAt&&(l=this.height);var p=b.mouseX,n=b.mouseY;l=this.rotate?Math.abs(p-l):Math.abs(n-l);l<m&&(m=l,k=f)}b.mostCloseGraph=k}if(this.prevCursorItem!=g||k!=this.prevMostCloseGraph){m=[];for(h=0;h<d.length;h++){f=d[h];l=f.valueAxis.id;l=g.axes[l].graphs[f.id];if(b.showNextAvailable&&isNaN(l.y)&&(l=this.getNextItem(l),!l&&f.balloon)){f.balloon.hide();continue}k&&f!=k?(f.showGraphBalloon(l,b.pointer,!1,b.graphBulletSize,b.graphBulletAlpha),f.balloon.hide(0)):b.valueBalloonsEnabled?(f.balloon.showBullet=b.bulletsEnabled,f.balloon.bulletSize=b.bulletSize/2,a.hideBalloons||(f.showGraphBalloon(l,b.pointer,!1,b.graphBulletSize,b.graphBulletAlpha),f.balloon.set&&m.push({balloon:f.balloon,y:f.balloon.pointToY}))):(f.currentDataItem=l,f.resizeBullet(l,b.graphBulletSize,b.graphBulletAlpha))}b.avoidBalloonOverlapping&&this.arrangeBalloons(m);this.prevCursorItem=g}this.prevMostCloseGraph=k}}d=e.fitToBounds(a.x,0,b.width);k=e.fitToBounds(a.y,0,b.height);c.showBalloon(d,k,b.categoryBalloonDateFormat,a.skip);this.updateLegendValues()}},handleCursorHide:function(a){e.AmSerialChart.base.handleCursorHide.call(this,a);a=this.categoryAxis;this.prevCursorItem=null;this.updateLegendValues();a&&a.hideBalloon();a=this.graphs;var b;for(b=0;b<a.length;b++)a[b].currentDataItem=null}
450,handleCursorPanning:function(a){var b=a.target,c,d=a.deltaX,g=a.deltaY,h=a.delta2X,f=a.delta2Y;a=!1;if(this.rotate){isNaN(h)&&(h=d,a=!0);var l=this.endX0;c=this.startX0;var k=l-c,l=l-k*h,m=k;a||(m=0);a=e.fitToBounds(c-k*d,0,1-m)}else isNaN(f)&&(f=g,a=!0),l=this.endY0,c=this.startY0,k=l-c,l+=k*g,m=k,a||(m=0),a=e.fitToBounds(c+k*f,0,1-m);c=e.fitToBounds(l,m,1);var p;b.valueZoomable&&(p=this.relativeZoomValueAxes(this.valueAxes,a,c));var n;c=this.categoryAxis;this.rotate&&(d=g,h=f);a=!1;isNaN(h)&&(h=d,a=!0);if(b.zoomable&&(0<Math.abs(d)||0<Math.abs(h)))if(c.parseDates&&!c.equalSpacing){if(f=this.startTime0,g=this.endTime0,c=g-f,h*=c,k=this.firstTime,l=this.lastTime,m=c,a||(m=0),a=Math.round(e.fitToBounds(f-c*d,k,l-m)),h=Math.round(e.fitToBounds(g-h,k+m,l)),this.startTime!=a||this.endTime!=h)n={chart:this,target:b,type:"zoomed",start:a,end:h},this.skipZoomed=!0,b.fire(n),this.zoom(a,h),n=!0}else if(f=this.start0,g=this.end0,c=g-f,d=Math.round(c*d),h=Math.round(c*h),k=this.chartData.length-1,a||(c=0),a=e.fitToBounds(f-d,0,k-c),c=e.fitToBounds(g-h,c,k),this.start!=a||this.end!=c)this.skipZoomed=!0,b.fire({chart:this,target:b,type:"zoomed",start:a,end:c}),this.zoom(a,c),n=!0;!n&&p&&this.updateAfterValueZoom()},arrangeBalloons:function(a){var b=this.plotAreaHeight;a.sort(this.compareY);var c,d,e,h=this.plotAreaWidth,f=a.length;for(c=0;c<f;c++)d=a[c].balloon,d.setBounds(0,0,h,b),d.restorePrevious(),d.draw(),b=d.yPos-3;a.reverse();for(c=0;c<f;c++){d=a[c].balloon;var b=d.bottom,l=d.bottom-d.yPos;0<c&&b-l<e+3&&d.setBounds&&(d.setBounds(0,e+3,h,e+l+3),d.restorePrevious(),d.draw());d.set&&d.set.show();e=d.bottom}},compareY:function(a,b){return a.y<b.y?1:-1}})})();(function(){var e=window.AmCharts;e.Cuboid=e.Class({construct:function(a,b,c,d,e,h,f,l,k,m,p,n,u,v,x,E,t){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=h;this.alpha=f;this.bwidth=l;this.bcolor=k;this.balpha=m;this.dashLength=v;this.topRadius=E;this.pattern=x;this.rotate=u;this.bcn=t;u?0>b&&0===p&&(p=180):0>c&&270==p&&(p=90);this.gradientRotation=p;0===d&&0===e&&(this.cornerRadius=n);this.draw()},draw:function(){var a=this.set;a.clear();var b=this.container,c=b.chart,d=this.w,g=this.h,h=this.dx,f=this.dy,l=this.colors,k=this.alpha,m=this.bwidth,p=this.bcolor,n=this.balpha,u=this.gradientRotation,v=this.cornerRadius,x=this.dashLength,E=this.pattern,t=this.topRadius,r=this.bcn,B=l,q=l;"object"==typeof l&&(B=l[0],q=l[l.length-1]);var w,y,C,F,D,A,z,L,M,Q=k;E&&(k=0);var G,H,I,J,K=this.rotate;if(0<Math.abs(h)||0<Math.abs(f))if(isNaN(t))z=q,q=e.adjustLuminosity(B,-.2),q=e.adjustLuminosity(B,-.2),w=e.polygon(b,[0,h,d+h,d,0],[0,f,f,0,0],q,k,1,p,0,u),0<n&&(M=e.line(b,[0,h,d+h],[0,f,f],p,n,m,x)),y=e.polygon(b,[0,0,d,d,0],[0,g,g,0,0],q,k,1,p,0,u),y.translate(h,f),0<n&&(C=e.line(b,[h,h],[f,f+g],p,n,m,x)),F=e.polygon(b,[0,0,h,h,0],[0,g,g+f,f,0],q,k,1,p,0,u),D=e.polygon(b,[d,d,d+h,d+h,d],[0,g,g+f,f,0],q,k,1,p,0,u),0<n&&(A=e.line(b,[d,d+h,d+h,d],[0,f,g+f,g],p,n,m,x)),q=e.adjustLuminosity(z,.2),z=e.polygon(b,[0,h,d+h,d,0],[g,g+f,g+f,g,g],q,k,1,p,0,u),0<n&&(L=e.line(b,[0,h,d+h],[g,g+f,g+f],p,n,m,x));else{var N,O,P;K?(N=g/2,q=h/2,P=g/2,O=d+h/2,H=Math.abs(g/2),G=Math.abs(h/2)):(q=d/2,N=f/2,O=d/2,P=g+f/2+1,G=Math.abs(d/2),H=Math.abs(f/2));I=G*t;J=H*t;.1<G&&.1<G&&(w=e.circle(b,G,B,k,m,p,n,!1,H),w.translate(q,N));.1<I&&.1<I&&(z=e.circle(b,I,e.adjustLuminosity(B,.5),k,m,p,n,!1,J),z.translate(O,P))}k=Q;1>Math.abs(g)&&(g=0);1>Math.abs(d)&&(d=0);!isNaN(t)&&(0<Math.abs(h)||0<Math.abs(f))?(l=[B],l={fill:l,stroke:p,"stroke-width":m,"stroke-opacity":n,"fill-opacity":k},K?(k="M0,0 L"+d+","+(g/2-g/2*t),m=" B",0<d&&(m=" A"),e.VML?(k+=m+Math.round(d- 451I)+","+Math.round(g/2-J)+","+Math.round(d+I)+","+Math.round(g/2+J)+","+d+",0,"+d+","+g,k=k+(" L0,"+g)+(m+Math.round(-G)+","+Math.round(g/2-H)+","+Math.round(G)+","+Math.round(g/2+H)+",0,"+g+",0,0")):(k+="A"+I+","+J+",0,0,0,"+d+","+(g-g/2*(1-t))+"L0,"+g,k+="A"+G+","+H+",0,0,1,0,0"),G=90):(m=d/2-d/2*t,k="M0,0 L"+m+","+g,e.VML?(k="M0,0 L"+m+","+g,m=" B",0>g&&(m=" A"),k+=m+Math.round(d/2-I)+","+Math.round(g-J)+","+Math.round(d/2+I)+","+Math.round(g+J)+",0,"+g+","+d+","+g,k+=" L"+d+",0",k+=m+Math.round(d/2+G)+","+Math.round(H)+","+Math.round(d/2-G)+","+Math.round(-H)+","+d+",0,0,0"):(k+="A"+I+","+J+",0,0,0,"+(d-d/2*(1-t))+","+g+"L"+d+",0",k+="A"+G+","+H+",0,0,1,0,0"),G=180),b=b.path(k).attr(l),b.gradient("linearGradient",[B,e.adjustLuminosity(B,-.3),e.adjustLuminosity(B,-.3),B],G),K?b.translate(h/2,0):b.translate(0,f/2)):b=0===g?e.line(b,[0,d],[0,0],p,n,m,x):0===d?e.line(b,[0,0],[0,g],p,n,m,x):0<v?e.rect(b,d,g,l,k,m,p,n,v,u,x):e.polygon(b,[0,0,d,d,0],[0,g,g,0,0],l,k,m,p,n,u,!1,x);d=isNaN(t)?0>g?[w,M,y,C,F,D,A,z,L,b]:[z,L,y,C,F,D,w,M,A,b]:K?0<d?[w,b,z]:[z,b,w]:0>g?[w,b,z]:[z,b,w];e.setCN(c,b,r+"front");e.setCN(c,y,r+"back");
451e.setCN(c,z,r+"top");e.setCN(c,w,r+"bottom");e.setCN(c,F,r+"left");e.setCN(c,D,r+"right");for(w=0;w<d.length;w++)if(y=d[w])a.push(y),e.setCN(c,y,r+"element");E&&b.pattern(E,NaN,c.path)},width:function(a){isNaN(a)&&(a=0);this.w=Math.round(a);this.draw()},height:function(a){isNaN(a)&&(a=0);this.h=Math.round(a);this.draw()},animateHeight:function(a,b){var c=this;c.animationFinished=!1;c.easing=b;c.totalFrames=a*e.updateRate;c.rh=c.h;c.frame=0;c.height(1);setTimeout(function(){c.updateHeight.call(c)},1E3/e.updateRate)},updateHeight:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b?(b=a.easing(0,a.frame,1,a.rh-1,b),a.height(b),window.requestAnimationFrame?window.requestAnimationFrame(function(){a.updateHeight.call(a)}):setTimeout(function(){a.updateHeight.call(a)},1E3/e.updateRate)):(a.height(a.rh),a.animationFinished=!0)},animateWidth:function(a,b){var c=this;c.animationFinished=!1;c.easing=b;c.totalFrames=a*e.updateRate;c.rw=c.w;c.frame=0;c.width(1);setTimeout(function(){c.updateWidth.call(c)},1E3/e.updateRate)},updateWidth:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b?(b=a.easing(0,a.frame,1,a.rw-1,b),a.width(b),window.requestAnimationFrame?window.requestAnimationFrame(function(){a.updateWidth.call(a)}):setTimeout(function(){a.updateWidth.call(a)},1E3/e.updateRate)):(a.width(a.rw),a.animationFinished=!0)}})})();(function(){var e=window.AmCharts;e.CategoryAxis=e.Class({inherits:e.AxisBase,construct:function(a){this.cname="CategoryAxis";e.CategoryAxis.base.construct.call(this,a);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.gridPosition="middle";this.safeDistance=30;this.stickBalloonToCategory=!1;e.applyTheme(this,a,this.cname)},draw:function(){e.CategoryAxis.base.draw.call(this);this.generateDFObject();var a=this.chart.chartData;this.data=a;this.labelRotationR=this.labelRotation;this.type=null;if(e.ifArray(a)){var b,c=this.chart;"scrollbar"!=this.id?(e.setCN(c,this.set,"category-axis"),e.setCN(c,this.labelsSet,"category-axis"),e.setCN(c,this.axisLine.axisSet,"category-axis")):this.bcn=this.id+"-";var d=this.start,g=this.labelFrequency,h=0,f=this.end-d+1,l=this.gridCountR,k=this.showFirstLabel,m=this.showLastLabel,p,n="",n=e.extractPeriod(this.minPeriod),u=e.getPeriodDuration(n.period,n.count),v,x,E,t,r,B=this.rotate,q=this.firstDayOfWeek,w=this.boldPeriodBeginning;b=e.resetDateToMin(new Date(a[a.length-1].time+1.05*u),this.minPeriod,1,q).getTime();this.firstTime=c.firstTime;this.endTime>b&&(this.endTime=b);r=this.minorGridEnabled;x=this.gridAlpha;var y=0,C=0;if(this.widthField)for(b=this.start;b<=this.end;b++)if(t=this.data[b]){var F=Number(this.data[b].dataContext[this.widthField]);isNaN(F)||(y+=F,t.widthValue=F)}if(this.parseDates&&!this.equalSpacing)this.lastTime=a[a.length-1].time,this.maxTime=e.resetDateToMin(new Date(this.lastTime+1.05*u),this.minPeriod,1,q).getTime(),this.timeDifference=this.endTime-this.startTime,this.parseDatesDraw();else if(!this.parseDates){if(this.cellWidth=this.getStepWidth(f),f<l&&(l=f),h+=this.start,this.stepWidth=this.getStepWidth(f),0<l)for(q=Math.floor(f/l),t=this.chooseMinorFrequency(q),f=h,f/2==Math.round(f/2)&&f--,0>f&&(f=0),w=0,this.widthField&&(f=this.start,q=1),this.end-f+1>=this.autoRotateCount&&(this.labelRotationR=this.autoRotateAngle),b=f;b<=this.end+2;b++){l=!1;0<=b&&b<this.data.length?(v=this.data[b],n=v.category,l=v.forceShow):n="";if(r&&!isNaN(t))if(b/t==Math.round(b/t)||l)b/q==Math.round(b/q)||l||(this.gridAlpha=this.minorGridAlpha,n=void 0);else continue;else if(b/q!=Math.round(b/q)&&!l)continue;f=this.getCoordinate(b-h);l=0;"start"==this.gridPosition&&(f-=this.cellWidth/2,l=this.cellWidth/2);p=!0;E=l;"start"==this.tickPosition&&(E=0,p=!1,l=0);if(b==d&&!k||b==this.end&&!m)n=void 0;Math.round(w/g)!=w/g&&(n=void 0);w++;a=this.cellWidth;B&&(a=NaN,this.ignoreAxisWidth||!c.autoMargins)&&(a="right"==this.position?c.marginRight-this.titleWidth:c.marginLeft-this.titleWidth,a-=this.tickLength+10);this.labelFunction&&v&&(n=this.labelFunction(n,v,this));n=e.fixBrakes(n);u=!1;this.boldLabels&&(u=!0);b>this.end&&"start"==this.tickPosition&&(n=" ");this.rotate&&this.inside&&(l-=2);isNaN(v.widthValue)||(v.percentWidthValue=v.widthValue/y*100,a=this.rotate?this.height*v.widthValue/y:this.width*v.widthValue/y,f=C,C+=a,E=l=a/2);p=new this.axisItemRenderer(this,f,n,p,a,l,void 0,u,E,!1,v.labelColor,v.className);
451p.serialDataItem=v;this.pushAxisItem(p);this.gridAlpha=x}}else if(this.parseDates&&this.equalSpacing){h=this.start;this.startTime=this.data[this.start].time;this.endTime=this.data[this.end].time;this.timeDifference=this.endTime-this.startTime;b=this.choosePeriod(0);g=b.period;v=b.count;b=e.getPeriodDuration(g,v);b<u&&(g=n.period,v=n.count,b=u);x=g;"WW"==x&&(x="DD");this.currentDateFormat=this.dateFormatsObject[x];this.stepWidth=this.getStepWidth(f);l=Math.ceil(this.timeDifference/b)+1;n=e.resetDateToMin(new Date(this.startTime- 452b),g,v,q).getTime();this.cellWidth=this.getStepWidth(f);f=Math.round(n/b);d=-1;f/2==Math.round(f/2)&&(d=-2,n-=b);f=this.start;f/2==Math.round(f/2)&&f--;0>f&&(f=0);C=this.end+2;C>=this.data.length&&(C=this.data.length);a=!1;a=!k;this.previousPos=-1E3;20<this.labelRotationR&&(this.safeDistance=5);F=f;if(this.data[f].time!=e.resetDateToMin(new Date(this.data[f].time),g,v,q).getTime()){var u=0,D=n;for(b=f;b<C;b++)t=this.data[b].time,this.checkPeriodChange(g,v,t,D)&&(u++,2<=u&&(F=b,b=C),D=t)}r&&1<v&&(t=this.chooseMinorFrequency(v),e.getPeriodDuration(g,t));if(0<this.gridCountR)for(b=f;b<C;b++)if(t=this.data[b].time,this.checkPeriodChange(g,v,t,n)&&b>=F){f=this.getCoordinate(b-this.start);r=!1;this.nextPeriod[x]&&(r=this.checkPeriodChange(this.nextPeriod[x],1,t,n,x))&&e.resetDateToMin(new Date(t),this.nextPeriod[x],1,q).getTime()!=t&&(r=!1);u=!1;r&&this.markPeriodChange?(r=this.dateFormatsObject[this.nextPeriod[x]],u=!0):r=this.dateFormatsObject[x];n=e.formatDate(new Date(t),r,c);
452if(b==d&&!k||b==l&&!m)n=" ";a?a=!1:(w||(u=!1),f-this.previousPos>this.safeDistance*Math.cos(this.labelRotationR*Math.PI/180)&&(this.labelFunction&&(n=this.labelFunction(n,new Date(t),this,g,v,E)),this.boldLabels&&(u=!0),p=new this.axisItemRenderer(this,f,n,void 0,void 0,void 0,void 0,u),r=p.graphics(),this.pushAxisItem(p),r=r.getBBox().width,e.isModern||(r-=f),this.previousPos=f+r));E=n=t}}for(b=k=0;b<this.data.length;b++)if(t=this.data[b])this.parseDates&&!this.equalSpacing?(m=t.time,d=this.cellWidth,"MM"==this.minPeriod&&(d=864E5*e.daysInMonth(new Date(m))*this.stepWidth,t.cellWidth=d),m=Math.round((m-this.startTime)*this.stepWidth+d/2)):m=this.getCoordinate(b-h),t.x[this.id]=m;if(this.widthField)for(b=this.start;b<=this.end;b++)t=this.data[b],d=t.widthValue,t.percentWidthValue=d/y*100,this.rotate?(m=this.height*d/y/2+k,k=this.height*d/y+k):(m=this.width*d/y/2+k,k=this.width*d/y+k),t.x[this.id]=m;y=this.guides.length;for(b=0;b<y;b++)if(k=this.guides[b],q=q=q=r=d=NaN,m=k.above,k.toCategory&&(q=c.getCategoryIndexByValue(k.toCategory),isNaN(q)||(d=this.getCoordinate(q-h),k.expand&&(d+=this.cellWidth/2),p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,k),this.pushAxisItem(p,m))),k.category&&(q=c.getCategoryIndexByValue(k.category),isNaN(q)||(r=this.getCoordinate(q-h),k.expand&&(r-=this.cellWidth/2),q=(d-r)/2,p=new this.axisItemRenderer(this,r,k.label,!0,NaN,q,k),this.pushAxisItem(p,m))),w=c.dataDateFormat,k.toDate&&(!w||k.toDate instanceof Date||(k.toDate=k.toDate.toString()+" |"),k.toDate=e.getDate(k.toDate,w),this.equalSpacing?(q=c.getClosestIndex(this.data,"time",k.toDate.getTime(),!1,0,this.data.length-1),isNaN(q)||(d=this.getCoordinate(q-h))):d=(k.toDate.getTime()-this.startTime)*this.stepWidth,p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,k),this.pushAxisItem(p,m)),k.date&&(!w||k.date instanceof Date||(k.date=k.date.toString()+" |"),k.date=e.getDate(k.date,w),this.equalSpacing?(q=c.getClosestIndex(this.data,"time",k.date.getTime(),!1,0,this.data.length-1),isNaN(q)||(r=this.getCoordinate(q-h))):r=(k.date.getTime()- 453this.startTime)*this.stepWidth,q=(d-r)/2,p=!0,k.toDate&&(p=!1),p="H"==this.orientation?new this.axisItemRenderer(this,r,k.label,p,2*q,NaN,k):new this.axisItemRenderer(this,r,k.label,!1,NaN,q,k),this.pushAxisItem(p,m)),p&&(q=p.label)&&this.addEventListeners(q,k),0<d||0<r){q=!1;if(this.rotate){if(d<this.height||r<this.height)q=!0}else if(d<this.width||r<this.width)q=!0;q&&(d=new this.guideFillRenderer(this,r,d,k),r=d.graphics(),this.pushAxisItem(d,m),k.graphics=r,r.index=b,this.addEventListeners(r,k))}if(c=c.chartCursor)B?c.fixHeight(this.cellWidth):(c.fixWidth(this.cellWidth),c.fullWidth&&this.balloon&&(this.balloon.minWidth=this.cellWidth));this.previousHeight=A}this.axisCreated=!0;this.set.translate(this.x,this.y);this.labelsSet.translate(this.x,this.y);this.labelsSet.show();this.positionTitle();(B=this.axisLine.set)&&B.toFront();var A=this.getBBox().height;2<A-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1)},xToIndex:function(a){var b=this.data,c=this.chart,d=c.rotate,g=this.stepWidth,h;if(this.parseDates&&!this.equalSpacing)a=this.startTime+Math.round(a/g)-this.minDuration()/2,h=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1);else if(this.widthField)for(c=Infinity,g=this.start;g<=this.end;g++){var f=this.data[g];f&&(f=Math.abs(f.x[this.id]-a),f<c&&(c=f,h=g))}else this.startOnAxis||(a-=g/2),h=this.start+Math.round(a/g);h=e.fitToBounds(h,0,b.length-1);var l;b[h]&&(l=b[h].x[this.id]);d?l>this.height+1&&h--:l>this.width+1&&h--;0>l&&h++;return h=e.fitToBounds(h,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){if(this.chart){if(this.parseDates)return this.dateToCoordinate(new Date(a));a=this.chart.getCategoryIndexByValue(a);if(!isNaN(a))return this.getCoordinate(a- 454this.start)}else return NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)},coordinateToValue:function(a){a=this.xToIndex(a);if(a=this.data[a])return this.parseDates?a.time:a.category},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},formatValue:function(a,b){b||(b=this.currentDateFormat);this.parseDates&&(a=e.formatDate(new Date(a),b,this.chart));return a},showBalloonAt:function(a,b){void 0===b&&(b=this.parseDates?this.dateToCoordinate(new Date(a)):this.categoryToCoordinate(a));return this.adjustBalloonCoordinate(b)},formatBalloonText:function(a,b,c){var d="",g="",h=this.chart,f=this.data[b];if(f)if(this.parseDates)d=e.formatDate(f.category,c,h),b=e.changeDate(new Date(f.category),this.minPeriod,1),g=e.formatDate(b,c,h),-1!=d.indexOf("fff")&&(d=e.formatMilliseconds(d,f.category),g=e.formatMilliseconds(g,b));else{var l;this.data[b+1]&&(l=this.data[b+ 4551]);d=e.fixNewLines(f.category);l&&(g=e.fixNewLines(l.category))}a=a.replace(/\[\[category\]\]/g,String(d));return a=a.replace(/\[\[toCategory\]\]/g,String(g))},adjustBalloonCoordinate:function(a,b){var c=this.xToIndex(a),d=this.chart.chartCursor;if(this.stickBalloonToCategory){var e=this.data[c];e&&(a=e.x[this.id]);this.stickBalloonToStart&&(a-=this.cellWidth/2);var h=0;if(d){var f=d.limitToGraph;if(f){var l=f.valueAxis.id;f.hidden||(h=e.axes[l].graphs[f.id].y)}this.rotate?("left"==this.position?(f&&(h-=d.width),0<h&&(h=0)):0>h&&(h=0),d.fixHLine(a,h)):("top"==this.position?(f&&(h-=d.height),0<h&&(h=0)):0>h&&(h=0),d.fullWidth&&(a+=1),d.fixVLine(a,h))}}d&&!b&&(d.setIndex(c),this.parseDates&&d.setTimestamp(this.coordinateToDate(a).getTime()));return a}})})(); 456;;;
456angular.module('ccc-app',['ui.bootstrap','monospaced.elastic','ngSanitize','ui.router','ngImgCrop']); 457;;;(function(){var e=window.AmCharts;e.AmStockChart=e.Class({construct:function(a){this.type="stock";this.cname="AmStockChart";e.addChart(this);this.version="3.21.15";this.theme=a;this.createEvents("buildStarted","zoomed","rollOverStockEvent","rollOutStockEvent","clickStockEvent","panelRemoved","dataUpdated","init","rendered","drawn","resized");this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.firstDayOfWeek=1;this.glueToTheEnd=!1;this.dataSetCounter=-1;this.zoomOutOnDataSetChange=!1;this.panels=[];this.dataSets=[];this.chartCursors=[];this.comparedDataSets=[];this.classNamePrefix="amcharts";this.categoryAxesSettings=new e.CategoryAxesSettings(a);this.valueAxesSettings=new e.ValueAxesSettings(a);this.panelsSettings=new e.PanelsSettings(a);this.chartScrollbarSettings=new e.ChartScrollbarSettings(a);this.chartCursorSettings=new e.ChartCursorSettings(a);this.stockEventsSettings=new e.StockEventsSettings(a);this.legendSettings=new e.LegendSettings(a);this.balloon=new e.AmBalloon(a);this.previousEndDate=new Date(0);this.previousStartDate=new Date(0);this.dataSetCount=this.graphCount=0;this.chartCreated=!1;this.processTimeout=0;this.autoResize=this.extendToFullPeriod=!0;this.langObj={};e.applyTheme(this,a,this.cname)},write:function(a){var b=this;if(b.listeners)for(var c in b.listeners){var d=b.listeners[c];b.addListener(d.event,d.method)}b.fire({type:"buildStarted",chart:b});b.afterWriteTO&&clearTimeout(b.afterWriteTO);0<b.processTimeout?b.afterWriteTO=setTimeout(function(){b.afterWrite.call(b,a)},b.processTimeout):b.afterWrite(a)},afterWrite:function(a){var b=this.theme;window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=e.getPath());void 0===this.path&&(this.path="amcharts/");this.path=e.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(e.callInitHandler(this),this.initHC=!0);e.applyLang(this.language,this);this.chartCursors=[];var c=this.exportConfig;c&&e.AmExport&&!this.AmExport&&(this.AmExport=new e.AmExport(this,c));this.amExport&&e.AmExport&&(this.AmExport=e.extend(this.amExport,new e.AmExport(this),!0));this.AmExport&&this.AmExport.init();this.chartRendered=!1;a="object"!=typeof a?document.getElementById(a):a;this.zoomOutOnDataSetChange&&(this.endDate=this.startDate=void 0);this.categoryAxesSettings=e.processObject(this.categoryAxesSettings,e.CategoryAxesSettings,b);this.valueAxesSettings=e.processObject(this.valueAxesSettings,e.ValueAxesSettings,b);this.chartCursorSettings=e.processObject(this.chartCursorSettings,e.ChartCursorSettings,b);this.chartScrollbarSettings=e.processObject(this.chartScrollbarSettings,e.ChartScrollbarSettings,b);this.legendSettings=e.processObject(this.legendSettings,e.LegendSettings,b);this.panelsSettings=e.processObject(this.panelsSettings,e.PanelsSettings,b);this.stockEventsSettings=e.processObject(this.stockEventsSettings,e.StockEventsSettings,b);this.dataSetSelector&&(this.dataSetSelector=e.processObject(this.dataSetSelector,e.DataSetSelector,b));this.periodSelector&&(this.periodSelector=e.processObject(this.periodSelector,e.PeriodSelector,b));a.innerHTML="";this.div=a;this.measure();this.createLayout();this.updateDataSets();this.addDataSetSelector();this.addPeriodSelector();this.addPanels();this.updatePanels();this.addChartScrollbar();this.updateData();this.skipDefault||this.setDefaultPeriod();this.skipEvents=!1},setDefaultPeriod:function(){var a=this.periodSelector;a&&(this.animationPlayed=!1,a.setDefaultPeriod())},validateSize:function(){this.measurePanels()},updateDataSets:function(){var a=this.mainDataSet,b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c],d=e.processObject(d,e.DataSet);b[c]=d;d.id||(this.dataSetCount++,d.id="ds"+this.dataSetCount);void 0===d.color&&(d.color=this.colors.length-1>c?this.colors[c]:e.randomColor())}!a&&e.ifArray(b)&&(this.mainDataSet=this.dataSets[0]);this.getSelections()},getLastDate:function(a){var b=e.getDate(a,this.dataDateFormat,"fff");a=this.categoryAxesSettings.minPeriod;
457var c=e.extractPeriod(a),b=e.changeDate(b,c.period,1*c.count,!0).getTime();-1==a.indexOf("fff")&&--b;return new Date(b)},getFirstDate:function(a){a=e.getDate(a,this.dataDateFormat,"fff");var b=e.extractPeriod(this.categoryAxesSettings.minPeriod);return new Date(e.resetDateToMin(a,b.period,1*b.count,this.firstDayOfWeek))},updateData:function(){var a=this,b=a.mainDataSet;if(b){a.parsingData=!1;var c=a.categoryAxesSettings;-1==e.getItemIndex(c.minPeriod,c.groupToPeriods)&&c.groupToPeriods.unshift(c.minPeriod);var d=b.dataProvider;if(e.ifArray(d)){var k=b.categoryField;a.firstDate=a.getFirstDate(d[0][k]);a.lastDate=a.getLastDate(d[d.length-1][k]);a.periodSelector&&a.periodSelector.setRanges(a.firstDate,a.lastDate);b.dataParsed||(a.parsingData=!0,0<a.processTimeout?setTimeout(function(){a.parseStockData.call(a,b,c.minPeriod,c.groupToPeriods,a.firstDayOfWeek,a.dataDateFormat)},a.processTimeout):a.parseStockData(b,c.minPeriod,c.groupToPeriods,a.firstDayOfWeek,a.dataDateFormat));this.updateComparingData()}else a.firstDate=void 0,a.lastDate=void 0;a.fixGlue();if(!a.parsingData)a.onDataUpdated()}},fixGlue:function(){if(this.glueToTheEnd&&this.startDate&&this.endDate&&this.lastDate){this.startDate=new Date(this.startDate.getTime()+(this.lastDate.getTime()-this.endDate.getTime())+1);var a=e.extractPeriod(this.categoryAxesSettings.minPeriod);this.startDate=e.resetDateToMin(this.startDate,a.period,a.count,this.firstDayOfWeek);this.endDate=this.lastDate;this.updateScrollbar=!0}},isDataParsed:function(){if(this.mainDataSet){for(var a=!0,b=0;b<this.comparedDataSets.length;b++)this.comparedDataSets[b].dataParsed||(a=!1);if(this.mainDataSet.dataParsed&&a)return!0}return!1},onDataUpdated:function(){this.isDataParsed()&&(this.updatePanelsWithNewData(),this.skipEvents||this.fire({type:"dataUpdated",chart:this}))},updateComparingData:function(){var a=this.comparedDataSets,b=this.categoryAxesSettings,c;for(c=0;c<a.length;c++){var d=a[c];d.dataParsed||(this.parsingData=!0,0<this.processTimeout?this.delayedParseStockData(c,d):this.parseStockData(d,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat))}},delayedParseStockData:function(a,b){var c=this,d=c.categoryAxesSettings;setTimeout(function(){c.parseStockData.call(c,b,d.minPeriod,d.groupToPeriods,c.firstDayOfWeek,c.dataDateFormat)},c.processTimeout*a)},parseStockData:function(a,b,c,d,k){var g=this,l={},h=a.dataProvider,n=a.categoryField;if(n){var f=e.getItemIndex(b,c),m=c.length,q,t=h.length,p,y={};for(q=f;q<m;q++)p=c[q],l[p]=[];var v={},A=a.fieldMappings,E=A.length;for(q=0;q<t;q++){var B=h[q],D=e.getDate(B[n],k,b),C=D.getTime(),r={},z;for(z=0;z<E;z++)r[A[z].toField]=B[A[z].fromField];for(z=f;z<m;z++){p=c[z];var u=e.extractPeriod(p),F=u.period,G=u.count,w,x;if(z==f||C>=y[p]||!y[p]){v[p]={};v[p].amCategoryIdField=String(e.resetDateToMin(D,F,G,d).getTime());var H;for(H=0;H<E;H++)u=A[H].toField,w=v[p],null!==r[u]&&(x=Number(r[u]),w[u+"Count"]=0,isNaN(x)||(w[u+"Open"]=x,w[u+"Sum"]=x,w[u+"High"]=x,w[u+"AbsHigh"]=x,w[u+"Low"]=x,w[u+"Close"]=x,w[u+"Count"]=1,w[u+"Average"]=x));w.dataContext=B;w.rawData=[];w.rawData.push(B);l[p].push(v[p]);z>f&&(u=e.newDate(D,b),u=e.changeDate(u,F,G,!0),u=e.resetDateToMin(u,F,G,d),y[p]=u.getTime());if(z==f)for(var I in B)B.hasOwnProperty(I)&&(v[p][I]=B[I]);v[p][n]=e.newDate(D,b)}else for(w=v[p],w.rawData&&w.rawData.push(B),p=0;p<E;p++)u=A[p].toField,q==t-1&&(w[n]=e.newDate(D,b)),null!==r[u]&&(x=Number(r[u]),isNaN(x)||(isNaN(w[u+"Low"])&&(w[u+"Low"]=x),x<w[u+"Low"]&&(w[u+"Low"]=x),isNaN(w[u+"High"])&&(w[u+"High"]=x),x>w[u+"High"]&&(w[u+"High"]=x),isNaN(w[u+"AbsHigh"])&&(w[u+"AbsHigh"]=x),Math.abs(x)>w[u+"AbsHigh"]&&(w[u+"AbsHigh"]=x),w[u+"Close"]=x,F=e.getDecimals(w[u+"Sum"]),G=e.getDecimals(x),isNaN(w[u+"Sum"])&&(w[u+"Sum"]=0),w[u+"Sum"]+=x,w[u+"Sum"]=e.roundTo(w[u+"Sum"],Math.max(F,G)),w[u+"Count"]++,w[u+"Average"]=w[u+"Sum"]/w[u+"Count"]))}}}a.agregatedDataProviders=l;e.ifArray(a.stockEvents)?0<g.processTimeout?setTimeout(function(){g.parseEvents.call(g,a,g.panels,g.stockEventsSettings,g.firstDayOfWeek,g,g.dataDateFormat)},g.processTimeout):g.parseEvents(a,g.panels,g.stockEventsSettings,g.firstDayOfWeek,g,g.dataDateFormat):(a.dataParsed=!0,g.onDataUpdated())},parseEvents:function(a,b,c,d,k,g){d=a.stockEvents;d.sort(function(a,b){return a.showOnAxis||b.showOnAxis?(1==a.showOnAxis)-(1==b.showOnAxis):isNaN(a.value)&&isNaN(b.value)?0:!isNaN(a.value)-!isNaN(b.value)});var l=a.agregatedDataProviders,h=b.length,n,f,m,q,t,p;for(n=0;n<h;n++){p=b[n];t=p.graphs;m=t.length;for(f=0;f<m;f++)q=t[f],q.customBulletField="amCustomBullet"+q.id+"_"+p.id,q.bulletConfigField="amCustomBulletConfig"+q.id+"_"+p.id,q.chart=p;for(f=0;f<d.length;f++)m=d[f],q=m.graph,e.isString(q)&&(q=e.getObjById(t,q))&&(m.graph=q),q&&(m.panel=q.chart)}for(var y in l)if(l.hasOwnProperty(y))for(b=l[y],h=e.extractPerio
457d(y),n=b.length,f=0;f<d.length;f++){m=d[f];q=m.date instanceof Date;g&&!q&&(m.date=e.stringToDate(m.date,g));q=m.date.getTime();var v=this.getEventDataItem(q,b,a,0,n,h);v&&(q=m.graph,p=m.panel,q&&(t="amCustomBullet"+q.id+"_"+p.id,q="amCustomBulletConfig"+q.id+"_"+p.id,v[q]?p=v[q]:(p={},p.eventDispatcher=k,p.eventObjects=[],p.letters=[],p.descriptions=[],p.shapes=[],p.backgroundColors=[],p.backgroundAlphas=[],p.borderColors=[],p.borderAlphas=[],p.colors=[],p.rollOverColors=[],p.showOnAxis=[],p.values=[],p.showAts=[],p.fontSizes=[],p.showBullets=[],v[t]=e.StackedBullet,v[q]=p),p.eventObjects.push(m),p.letters.push(m.text),p.descriptions.push(m.description),m.type?p.shapes.push(m.type):p.shapes.push(c.type),void 0!==m.backgroundColor?p.backgroundColors.push(m.backgroundColor):p.backgroundColors.push(c.backgroundColor),isNaN(m.backgroundAlpha)?p.backgroundAlphas.push(c.backgroundAlpha):p.backgroundAlphas.push(m.backgroundAlpha),isNaN(m.borderAlpha)?p.borderAlphas.push(c.borderAlpha):p.borderAlphas.push(m.borderAlpha),void 0!==m.borderColor?p.borderColors.push(m.borderColor):p.borderColors.push(c.borderColor),void 0!==m.rollOverColor?p.rollOverColors.push(m.rollOverColor):p.rollOverColors.push(c.rollOverColor),void 0!==m.showAt?p.showAts.push(m.showAt):p.showAts.push(c.showAt),void 0!==m.fontSize&&p.fontSizes.push(m.fontSize),p.colors.push(m.color),p.values.push(m.value),p.showOnAxis.push(m.showOnAxis),p.showBullets.push(m.showBullet),p.date=new Date(m.date)))}a.dataParsed=!0;this.onDataUpdated()},getEventDataItem:function(a,b,c,d,k,g){var l=g.period,h=g.count,n=Math.floor(d+(k-d)/2),f=b[n],m=f[c.categoryField],q=this.dataDateFormat,t=m instanceof Date;q&&!t&&(m=e.stringToDate(m,q));q=m.getTime();"YYYY"==l&&(q=e.resetDateToMin(new Date(m),l,h,this.firstDayOfWeek).getTime());l="fff"==l?m.getTime()+1:e.resetDateToMin(e.changeDate(new Date(m),g.period,g.count),l,h,this.firstDayOfWeek).getTime();if(a>=q&&a<l)return f;if(!(1>=k-d))return a<q?this.getEventDataItem(a,b,c,d,n,g):this.getEventDataItem(a,b,c,n,k,g)},createLayout:function(){var a=this.div,b,c,d=this.classNamePrefix,e=document.createElement("div");e.style.position="relative";this.containerDiv=e;e.className=d+"-stock-div";a.appendChild(e);if(a=this.periodSelector)b=a.position;if(a=this.dataSetSelector)c=a.position;if("left"==b||"left"==c)a=document.createElement("div"),a.className=d+"-left-div",a.style.cssFloat="left",a.style.styleFloat="left",a.style.width="0px",a.style.position="absolute",e.appendChild(a),this.leftContainer=a;if("right"==b||"right"==c)b=document.createElement("div"),b.className=d+"-right-div",b.style.cssFloat="right",b.style.styleFloat="right",b.style.width="0px",e.appendChild(b),this.rightContainer=b;b=document.createElement("div");b.className=d+"-center-div";e.appendChild(b);this.centerContainer=b;e=document.createElement("div");e.className=d+"-panels-div";b.appendChild(e);this.panelsContainer=e},addPanels:function(){this.measurePanels(!0);for(var a=this.panels,b=0;b<a.length;b++){var c=a[b],c=e.processObject(c,e.StockPanel,this.theme,!0);a[b]=c;this.addStockPanel(c,b)}this.panelsAdded=!0},measurePanels:function(a){this.measure();var b=this.chartScrollbarSettings,c=this.divRealHeight,d=this.divRealWidth;if(this.div){var e=this.panelsSettings.panelSpacing;b.enabled&&(c-=b.height);(b=this.periodSelector)&&!b.vertical&&(b=b.offsetHeight,c-=b+e);(b=this.dataSetSelector)&&!b.vertical&&(b=b.offsetHeight,c-=b+e);a||c==this.prevPH&&this.prevPW==d||this.fire({type:"resized",chart:this});this.prevPW!=d&&(this.prevPW=d);if(c!=this.prevPH){a=this.panels;0<c&&(this.panelsContainer.style.height=c+"px");for(var d=0,g,b=0;b<a.length;b++)if(g=a[b]){var l=g.percentHeight;isNaN(l)&&(l=100/a.length,g.percentHeight=l);d+=l}this.panelsHeight=Math.max(c-e*(a.length-1),0);for(b=0;b<a.length;b++)if(g=a[b])g.percentHeight=g.percentHeight/d*100,g.panelBox&&(g.panelBox.style.height=Math.round(g.percentHeight*this.panelsHeight/100)+"px");this.prevPH=c}}},addStockPanel:function(a,b){var c=this.panelsSettings,d=document.createElement("div");0<b&&!this.panels[b-1].showCategoryAxis&&(d.style.marginTop=c.panelSpacing+"px");a.hideBalloonReal();a.panelBox=d;a.stockChart=this;a.langObj=this.langObj;a.id||(a.id="stockPanel"+b);d.className="amChartsPanel "+this.classNamePrefix+"-stock-panel-div "+this.classNamePrefix+"-stock-panel-div-"+ 458a.id;a.pathToImages=this.pathToImages;a.path=this.path;d.style.height=Math.round(a.percentHeight*this.panelsHeight/100)+"px";d.style.width="100%";this.panelsContainer.appendChild(d);0<c.backgroundAlpha&&(d.style.backgroundColor=c.backgroundColor);
458if(d=a.stockLegend)d=e.processObject(d,e.StockLegend,this.theme),d.container=void 0,d.title=a.title,d.marginLeft=c.marginLeft,d.marginRight=c.marginRight,d.verticalGap=3,d.position="top",e.copyProperties(this.legendSettings,d),a.addLegend(d,d.divId);a.zoomOutText="";this.addCursor(a)},enableCursors:function(a){var b=this.chartCursors,c;for(c=0;c<b.length;c++)b[c].enabled=a},updatePanels:function(){var a=this.panels,b;for(b=0;b<a.length;b++)this.updatePanel(a[b]);this.mainDataSet&&this.updateGraphs();this.currentPeriod=void 0},updatePanel:function(a){a.seriesIdField="amCategoryIdField";a.dataProvider=[];a.chartData=[];a.graphs=[];var b=a.categoryAxis,c=this.categoryAxesSettings;e.copyProperties(this.panelsSettings,a);e.copyProperties(c,b);b.parseDates=!0;a.addClassNames=this.addClassNames;a.classNamePrefix=this.classNamePrefix;a.zoomOutOnDataUpdate=!1;void 0!==this.mouseWheelScrollEnabled&&(a.mouseWheelScrollEnabled=this.mouseWheelScrollEnabled);void 0!==this.mouseWheelZoomEnabled&&(a.mouseWheelZoomEnabled=this.mouseWheelZoomEnabled);a.dataDateFormat=this.dataDateFormat;a.language=this.language;a.showCategoryAxis?"top"==b.position?a.marginTop=c.axisHeight:a.marginBottom=c.axisHeight:(a.categoryAxis.labelsEnabled=!1,a.chartCursor&&(a.chartCursor.categoryBalloonEnabled=!1));var c=a.valueAxes,d=c.length,k;0===d&&(k=new e.ValueAxis(this.theme),a.addValueAxis(k));b=new e.AmBalloon(this.theme);e.copyProperties(this.balloon,b);a.balloon=b;c=a.valueAxes;d=c.length;for(b=0;b<d;b++)k=c[b],e.copyProperties(this.valueAxesSettings,k);a.listenersAdded=!1;a.write(a.panelBox)},zoom:function(a,b){this.zoomChart(a,b)},zoomOut:function(){this.zoomChart(this.firstDate,this.lastDate)},updatePanelsWithNewData:function(){var a=this.mainDataSet,b=this.scrollbarChart;this.updateGraphs();if(a){var c=this.panels;this.currentPeriod=void 0;var d;for(d=0;d<c.length;d++){var k=c[d];k.categoryField=a.categoryField;0===a.dataProvider.length&&(k.dataProvider=[]);k.scrollbarChart=b}if(b){c=this.categoryAxesSettings;d=c.minPeriod;b.categoryField=a.categoryField;k=b.dataProvider;if(0<a.dataProvider.length){var g=this.chartScrollbarSettings.usePeriod;if(g){var l=a.agregatedDataProviders[d],h=a.categoryField,n=this.getFirstDate(l[0][h]).getTime();this.getLastDate(l[l.length-1][h]).getTime()-n<e.getPeriodDuration(g)&&(g=d);b.dataProvider=a.agregatedDataProviders[g]}else b.dataProvider=a.agregatedDataProviders[d]}else b.dataProvider=[];g=b.categoryAxis;g.minPeriod=d;g.firstDayOfWeek=this.firstDayOfWeek;g.equalSpacing=c.equalSpacing;g.axisAlpha=0;g.markPeriodChange=c.markPeriodChange;b.bbsetr=!0;k!=b.dataProvider&&b.validateData();c=this.panelsSettings;b.maxSelectedTime=c.maxSelectedTime;b.minSelectedTime=c.minSelectedTime}0<a.dataProvider.length&&(this.fixGlue(),this.zoomChart(this.startDate,this.endDate))}this.panelDataInvalidated=!1},addChartScrollbar:function(){var a=this.chartScrollbarSettings,b=this.scrollbarChart;b&&(b.clear(),b.destroy());if(a.enabled){var c=this.panelsSettings,d=this.categoryAxesSettings,b=new e.AmSerialChart(this.theme);b.svgIcons=c.svgIcons;b.language=this.language;b.pathToImages=this.pathToImages;b.autoMargins=!1;b.addClassNames=!0;this.scrollbarChart=b;b.id="scrollbarChart";b.scrollbarOnly=!0;b.zoomOutText="";c.fontFamily&&(b.fontFamily=c.fontFamily);isNaN(c.fontSize)||(b.fontSize=c.fontSize);b.marginLeft=c.marginLeft;b.marginRight=c.marginRight;b.marginTop=0;b.marginBottom=0;var c=d.dateFormats,k=b.categoryAxis;k.boldPeriodBeginning=d.boldPeriodBeginning;c&&(k.dateFormats=d.dateFormats);k.labelsEnabled=!1;k.parseDates=!0;d=a.graph;if(e.isString(d)){c=this.panels;for(k=0;k<c.length;k++){var g=e.getObjById(c[k].stockGraphs,a.graph);g&&(d=g)}a.graph=d}var l;d&&(l=new e.AmGraph(this.theme),l.valueField=d.valueField,l.periodValue=d.periodValue,l.type=d.type,l.connect=d.connect,l.minDistance=a.minDistance,b.addGraph(l));d=new e.ChartScrollbar(this.theme);b.addChartScrollbar(d);e.copyProperties(a,d);d.scrollbarHeight=a.height;d.graph=l;this.listenTo(d,"zoomed",this.handleScrollbarZoom);l=document.createElement("div");l.className=this.classNamePrefix+"-scrollbar-chart-div";l.style.height=a.height+"px";d=this.periodSelectorContainer;c=this.periodSelector;k=this.centerContainer;"bottom"==a.position?c?"bottom"==c.position?k.insertBefore(l,d):k.appendChild(l):k.appendChild(l):c?"top"==c.position?k.insertBefore(l,d.nextSibling):k.insertBefore(l,k.firstChild):k.insertBefore(l,k.firstChild);b.write(l)}}
458,handleScrollbarZoom:function(a){if(this.skipScrollbarEvent)this.skipScrollbarEvent=!1;else{var b=a.endDate,c={};c.startDate=a.startDate;c.endDate=b;this.updateScrollbar=!1;this.handleZoom(c)}},addPeriodSelector:function(){var a=this.periodSelector;if(a){var b=this.categoryAxesSettings.minPeriod;a.minDuration=e.getPeriodDuration(b);a.minPeriod=b;a.chart=this;var c=this.dataSetSelector,d,b=this.dssContainer;c&&(d=c.position);var c=this.panelsSettings.panelSpacing,k=document.createElement("div");this.periodSelectorContainer=k;var g=this.leftContainer,l=this.rightContainer,h=this.centerContainer,n=this.panelsContainer,f=a.width+2*c+"px";switch(a.position){case"left":g.style.width=a.width+"px";g.appendChild(k);h.style.paddingLeft=f;break;case"right":h.style.marginRight=f;l.appendChild(k);l.style.width=a.width+"px";break;case"top":n.style.clear="both";h.insertBefore(k,n);k.style.paddingBottom=c+"px";k.style.overflow="hidden";break;case"bottom":k.style.marginTop=c+"px","bottom"==d?h.insertBefore(k,b):h.appendChild(k)}this.listenTo(a,"changed",this.handlePeriodSelectorZoom);a.write(k)}},addDataSetSelector:function(){var a=this.dataSetSelector;if(a){a.chart=this;a.dataProvider=this.dataSets;var b=a.position,c=this.panelsSettings.panelSpacing,d=document.createElement("div");this.dssContainer=d;var e=this.leftContainer,g=this.rightContainer,l=this.centerContainer,h=this.panelsContainer,c=a.width+2*c+"px";switch(b){case"left":e.style.width=a.width+"px";e.appendChild(d);l.style.paddingLeft=c;break;case"right":l.style.marginRight=c;g.appendChild(d);g.style.width=a.width+"px";break;case"top":h.style.clear="both";l.insertBefore(d,h);d.style.overflow="hidden";break;case"bottom":l.appendChild(d)}a.write(d)}},handlePeriodSelectorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);a.predefinedPeriod?(this.predefinedStart=a.startDate,this.predefinedEnd=a.endDate):this.predefinedEnd=this.predefinedStart=null;this.zoomOutValueAxes();this.zoomChart(a.startDate,a.endDate)},zoomOutValueAxes:function(){var a=this.panels;if(this.panelsSettings.zoomOutAxes)for(var b=0;b<a.length;b++){var c=a[b].valueAxes;if(c)for(var d=0;d<c.length;d++){var e=c[d];e.minZoom=NaN;e.maxZoom=NaN}}},addCursor:function(a){var b=this.chartCursorSettings;if(b.enabled){var c=e.processObject(a.chartCursor,e.ChartCursor,this.theme);e.copyProperties(b,c);var d=b.categoryBalloonFunction;a.chartCursor&&(e.copyProperties(a.chartCursor,c),a.chartCursor.categoryBalloonFunction&&(d=a.chartCursor.categoryBalloonFunction));c.categoryBalloonFunction=d;a.removeChartCursor();a.addChartCursor(c);"mouse"==b.cursorPosition?this.listenTo(c,"moved",this.handleCursorChange):this.listenTo(c,"changed",this.handleCursorChange);this.listenTo(c,"onHideCursor",this.handleCursorChange);this.listenTo(c,"zoomStarted",this.handleCursorChange);this.listenTo(c,"zoomed",this.handleCursorZoom);this.chartCursors.push(c)}},handleCursorChange:function(a){a=a.target;var b=this.chartCursors,c;for(c=0;c<b.length;c++){var d=b[c];d!=a&&d.syncWithCursor(a,this.chartCursorSettings.onePanelOnly)}},handleCursorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);var b={},c,d;if(this.categoryAxesSettings.equalSpacing){d=this.mainDataSet.categoryField;var e=this.mainDataSet.agregatedDataProviders[this.currentPeriod];c=new Date(e[a.start][d]);d=new Date(e[a.end][d])}else c=new Date(a.start),d=new Date(a.end);b.startDate=c;b.endDate=d;this.handleZoom(b);this.handleCursorChange(a)},handleZoom:function(a){this.zoomChart(a.startDate,a.endDate)},zoomChart:function(a,b){var c=this;a||(a=c.firstDate);var d=e.newDate(a),k=c.firstDate,g=c.lastDate,l=c.currentPeriod,h=c.categoryAxesSettings,n=h.minPeriod,f=c.panelsSettings,m=c.periodSelector,q=c.panels,t=c.comparedGraphs,p=c.scrollbarChart,y=c.firstDayOfWeek;if(k&&g){a||(a=k);b||(b=g);if(l){var v=e.extractPeriod(l);a.getTime()==b.getTime()&&v!=n&&(b=e.changeDate(b,v.period,v.count),b.setTime(b.getTime()- 4591))}a.getTime()<k.getTime()&&(a=k);a.getTime()>g.getTime()&&(a=g);b.getTime()<k.getTime()&&(b=k);b.getTime()>g.getTime()&&(b=g);n=e.getItemIndex(n,h.groupToPeriods);h=l;l=c.choosePeriod(n,a,b);c.currentPeriod=l;
459var n=e.extractPeriod(l),A=e.getPeriodDuration(n.period,n.count);1>b.getTime()-a.getTime()&&(a=new Date(b.getTime()-1));v=e.newDate(a);c.extendToFullPeriod&&(v.getTime()-k.getTime()<.1*A&&(v=e.resetDateToMin(a,n.period,n.count,y)),g.getTime()-b.getTime()<.1*A&&(b=e.resetDateToMin(g,n.period,n.count,y),b=e.changeDate(b,n.period,n.count,!0)));for(k=0;k<q.length;k++)g=q[k],g.chartCursor&&g.chartCursor.panning&&(v=d);for(k=0;k<q.length;k++){g=q[k];d=!1;if(l!=h){for(d=0;d<t.length;d++)A=t[d].graph,A.dataProvider=A.dataSet.agregatedDataProviders[l];d=g.categoryAxis;d.firstDayOfWeek=y;d.minPeriod=l;g.dataProvider=c.mainDataSet.agregatedDataProviders[l];if(d=g.chartCursor)d.categoryBalloonDateFormat=c.chartCursorSettings.categoryBalloonDateFormat(n.period),g.showCategoryAxis||(d.categoryBalloonEnabled=!1);g.startTime=v.getTime();g.endTime=b.getTime();g.start=NaN;g.validateData(!0);d=!0}g.chartCursor&&g.chartCursor.panning&&(d=!0);d||(g.startTime=void 0,g.endTime=void 0,g.zoomToDates(v,b));0<f.startDuration&&c.animationPlayed&&!d?(g.startDuration=0,g.animateAgain()):0<f.startDuration&&!d&&g.animateAgain()}c.animationPlayed=!0;f=e.newDate(b);p&&c.updateScrollbar&&(p.zoomToDates(a,f),c.skipScrollbarEvent=!0,setTimeout(function(){c.resetSkip.call(c)},100));c.updateScrollbar=!0;c.startDate=a;c.endDate=b;m&&m.zoom(a,b);c.skipEvents||a.getTime()==c.previousStartDate.getTime()&&b.getTime()==c.previousEndDate.getTime()||(m={type:"zoomed"},m.startDate=a,m.endDate=b,m.chart=c,m.period=l,c.fire(m),c.previousStartDate=e.newDate(a),c.previousEndDate=e.newDate(b))}c.eventsHidden&&c.showHideEvents(!1);c.dispDUpd()},dispDUpd:function(){this.skipEvents||(this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),this.chartRendered||(this.chartRendered=!0,this.fire({type:"rendered",chart:this})),this.fire({type:"drawn",chart:this}));this.animationPlayed=this.chartCreated=!0},resetSkip:function(){this.skipScrollbarEvent=!1},updateGraphs:function(){this.getSelections();if(0<this.dataSets.length){var a=this.panels;this.comparedGraphs=[];var b;for(b=0;b<a.length;b++){var c=a[b],d=c.valueAxes,k;for(k=0;k<d.length;k++){var g=d[k];g.prevLog&&(g.logarithmic=g.prevLog);g.recalculateToPercents="always"==c.recalculateToPercents?!0:!1}d=this.mainDataSet;k=this.comparedDataSets;g=c.stockGraphs;c.graphs=[];var l,h,n;for(l=0;l<g.length;l++){var f=g[l],f=e.processObject(f,e.StockGraph,this.theme);g[l]=f;if(!f.title||f.resetTitleOnDataSetChange)f.title=d.title,f.resetTitleOnDataSetChange=!0;f.useDataSetColors&&(f.lineColor=d.color,f.fillColors=void 0,f.bulletColor=void 0);var m=!1,q=d.fieldMappings;for(h=0;h<q.length;h++){n=q[h];var t=f.valueField;t&&n.toField==t&&(m=!0);(t=f.openField)&&n.toField==t&&(m=!0);(t=f.closeField)&&n.toField==t&&(m=!0);(t=f.lowField)&&n.toField==t&&(m=!0)}c.graphs.push(f);c.processGraphs();f.hideFromLegend=m?!1:!0;t=!1;"always"==c.recalculateToPercents&&(t=!0);var p=c.stockLegend,y,v,A,E;p&&(p=e.processObject(p,e.StockLegend,this.theme),c.stockLegend=p,y=p.valueTextComparing,v=p.valueTextRegular,A=p.periodValueTextComparing,E=p.periodValueTextRegular);if(f.comparable){var B=k.length;if(f.valueAxis){0<B&&f.valueAxis.logarithmic&&"never"!=c.recalculateToPercents&&(f.valueAxis.logarithmic=!1,f.valueAxis.prevLog=!0);0<B&&"whenComparing"==c.recalculateToPercents&&(f.valueAxis.recalculateToPercents=!0);p&&f.valueAxis&&!0===f.valueAxis.recalculateToPercents&&(t=!0);var D;for(D=0;D<B;D++){var C=k[D],r=f.comparedGraphs[C.id];r||(r=new e.AmGraph(this.theme),r.id="comparedGraph_"+f.id+"_"+C.id);f.compareGraphType&&(r.type=f.compareGraphType);f.compareGraph&&(e.copyProperties(f.compareGraph,r),f.compareGraph.balloon&&(r.balloon={},e.copyProperties(f.compareGraph.balloon,r.balloon)));r.periodValue=f.periodValue;r.recalculateValue=f.recalculateValue;r.dataSet=C;r.behindColumns=f.behindColumns;f.comparedGraphs[C.id]=r;r.seriesIdField="amCategoryIdField";r.connect=f.connect;r.clustered=f.clustered;r.showBalloon=f.showBalloon;this.passFields(f,r);var z=f.compareField;z||(z=f.valueField);r.customBulletsHidden=!f.showEventsOnComparedGraphs;m=!1;q=C.fieldMappings;for(h=0;h<q.length;h++)n=q[h],n.toField==z&&(m=!0);if(m){r.valueField=z;r.title=C.title?C.title:f.title;r.lineColor=C.color;f.compareGraphLineColor&&(r.lineColor=f.compareGraphLineColor);h=f.compareGraphLineThickness;isNaN(h)||(r.lineThickness=h);h=f.compareGraphDashLength;isNaN(h)||(r.dashLength=h);h=f.compareGraphLineAlpha;isNaN(h)||(r.lineAlpha=h);h=f.compareGraphCornerRadiusTop;isNaN(h)||(r.cornerRadiusTop=h);h=f.compareGraphCornerRadiusBottom;isNaN(h)||(r.cornerRadiusBottom=h);h=f.compareGraphBalloonColor;isNaN(h)||(r.balloonColor=h);h=f.compareGraphBulletColor;isNaN(h)||(r.bulletColor=h);if(h=f.compareGraphFillColors)r.fillColors=h;if(h=f.compareGraphNegativeFillColors)r.negativeFillColors=h;if(h=f.compareGraphFillAlphas)r.fillAlphas=h;if(h=f.compareGraphNegativeFillAlphas)r.negativeFillAlphas=h;if(h=f.compareGraphBullet)r.bullet=h;if(h=f.compareGraphNumberFormatter)r.numberFormatter=h;h=f.compareGraphPrecision;isNaN(h)||(r.precision=h);if(h=f.compareGraphBalloonText)r.balloonText=h;h=f.compareGraphBulletSize;isNaN(h)||(r.bulletSize=h);h=f.compareGraphBulletAlpha;isNaN(h)||(r.bulletAlpha=h);h=f.compareGraphBulletBorderAlpha;isNaN(h)||(r.bulletBorderAlpha=h);if(h=f.compareGraphBulletBorderColor)r.bulletBorderColor=h;h=f.compareGraphBulletBorderThickness;isNaN(h)||(r.bulletBorderThickness=h);r.visibleInLegend=f.compareGraphVisibleInLegend;r.balloonFunction=f.compareGraphBalloonFunction;r.hideBulletsCount=f.hideBulletsCount;r.valueAxis=f.valueAxis;p&&(t&&y?(r.legendValueTextR=y,r.legendPeriodValueTextR=A):(v&&(r.legendValueTextR=v),r.legendPeriodValueTextR=E));c.showComparedOnTop?c.graphs.push(r):c.graphs.unshift(r);this.comparedGraphs.push({graph:r,dataSet:C})}}}}p&&(t&&y?(f.legendValueTextR=y,f.legendPeriodValueTextR=A):(v&&(f.legendValueTextR=v),f.legendPeriodValueTextR=E))}}}},passFields:function(a,b){for(var c="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className".split(" "),d=0;d<c.length;d++){var e=c[d];b[e+"Field"]=a[e+"Field"]}}
459,choosePeriod:function(a,b,c){var d=this.categoryAxesSettings,k=d.groupToPeriods,g=k[a],l=k[a+1],h=e.extractPeriod(g),h=e.getPeriodDuration(h.period,h.count),n=b.getTime(),f=c.getTime(),m=d.maxSeries;d.alwaysGroup&&g==d.minPeriod&&(g=1<k.length?k[1]:k[0]);return(f- 460n)/h>m&&0<m&&l?this.choosePeriod(a+1,b,c):g},getSelections:function(){var a=[],b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c];d.compared&&a.push(d)}this.comparedDataSets=a;b=this.panels;for(c=0;c<b.length;c++)d=b[c],d.hideDrawingIcons&&("never"!=d.recalculateToPercents&&0<a.length?d.hideDrawingIcons(!0):d.drawingIconsEnabled&&d.hideDrawingIcons(!1))},addPanel:function(a){this.panels.push(a);this.prevPH=void 0;e.removeChart(a);e.addChart(a)},addPanelAt:function(a,b){this.panels.splice(b,0,a);this.prevPH=void 0;e.removeChart(a);e.addChart(a)},removePanel:function(a){var b=this.panels;this.prevPH=void 0;var c;for(c=b.length-1;0<=c;c--)b[c]==a&&(this.fire({type:"panelRemoved",panel:a,chart:this}),b.splice(c,1),a.destroy(),a.clear())},validateData:function(a){var b=this;b.validateDataTO&&clearTimeout(b.validateDataTO);b.validateDataTO=setTimeout(function(){b.validateDataReal.call(b,a)},100)},validateDataReal:function(a){a||this.resetDataParsed();this.updateDataSets();this.mainDataSet.compared=!1;this.updateData();(a=this.dataSetSelector)&&a.write(a.div)},resetDataParsed:function(){var a=this.dataSets,b;for(b=0;b<a.length;b++)a[b].dataParsed=!1},validateNow:function(a,b){this.skipDefault=!0;this.chartRendered=!1;this.prevPH=void 0;this.skipEvents=b;this.clear(!0);this.initTO&&clearTimeout(this.initTO);a&&this.resetDataParsed();this.write(this.div)},hideStockEvents:function(){this.showHideEvents(!1);this.eventsHidden=!0},showStockEvents:function(){this.showHideEvents(!0);this.eventsHidden=!1},showHideEvents:function(a){var b=this.panels,c;for(c=0;c<b.length;c++){var d=b[c].graphs,e;for(e=0;e<d.length;e++){var g=d[e];!0===a?g.showCustomBullets(!0):g.hideCustomBullets(!0)}}},invalidateSize:function(){var a=this;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateNow()},5);a.validateTO=b},measure:function(){var a=this.div;if(a){var b=a.offsetWidth,c=a.offsetHeight;a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);this.divRealWidth=b;this.divRealHeight=c}},handleResize:function(){var a=this,b=setTimeout(function(){a.validateSizeReal()},150);a.initTO=b},validateSizeReal:function(){this.previousWidth=this.divRealWidth;this.previousHeight=this.divRealHeight;this.measure();if(this.divRealWidth!=this.previousWidth||this.divRealHeight!=this.previousHeight)0<this.divRealWidth&&0<this.divRealHeight&&this.fire({type:"resized",chart:this}),this.divRealHeight!=this.previousHeight&&this.validateNow()},clear:function(a){var b=this.panels,c;if(b)for(c=0;c<b.length;c++){var d=b[c];a||(d.cleanChart(),d.destroy());d.clear(a)}(b=this.scrollbarChart)&&b.clear();this.validateDataTO&&clearTimeout(this.validateDataTO);if(b=this.div)b.innerHTML="";a||(e.removeChart(this),this.div=null,e.deleteObject(this))}});e.StockEvent=e.Class({construct:function(){}})})();(function(){var e=window.AmCharts;e.DataSet=e.Class({construct:function(){this.cname="DataSet";this.fieldMappings=[];this.dataProvider=[];this.agregatedDataProviders=[];this.stockEvents=[];this.compared=!1;this.showInCompare=this.showInSelect=!0}})})();(function(){var e=window.AmCharts;e.PeriodSelector=e.Class({construct:function(a){this.cname="PeriodSelector";this.theme=a;this.createEvents("changed");this.inputFieldsEnabled=!0;this.position="bottom";this.width=180;this.fromText="From: ";this.toText="to: ";this.periodsText="Zoom: ";this.accessibilityText="Select a timeframe to show chart data";this.periods=[];this.inputFieldWidth=100;this.dateFormat="DD-MM-YYYY";this.hideOutOfScopePeriods=!0;this.offsetHeight=0;e.applyTheme(this,a,this.cname)},zoom:function(a,b){var c=this.chart;this.inputFieldsEnabled&&(this.startDateField.value=e.formatDate(a,this.dateFormat,c),this.endDateField.value=e.formatDate(b,this.dateFormat,c));this.markButtonAsSelected()},write:function(a){var b=this,c=b.chart,d=c.classNamePrefix;a.className="amChartsPeriodSelector "+d+"-period-selector-div";var k=b.width,g=b.position;b.width=void 0;b.position=void 0;e.applyStyles(a.style,b);b.width=k;b.position=g;b.div=a;a.innerHTML='<fieldset style="border: none; padding:0"><legend style="display: none;">'+ 461(c.langObj.periodSelectorAccessibilityText||b.accessibilityText)+"</legend></fieldset>";var l=a.firstChild;a=b.theme;k=b.position;k="top"==k||"bottom"==k?!1:!0;b.vertical=k;var h=g=0;if(b.inputFieldsEnabled){var n=document.createElement("div");l.appendChild(n);var f=document.createTextNode(c.langObj.fromText||b.fromText);n.appendChild(f);k?e.addBr(n):(n.style.styleFloat="left",n.style.display="inline");var m=document.createElement("input");m.setAttribute("aria-label",c.langObj.fromText||b.fromText);m.className="amChartsInputField "+d+"-start-date-input";a&&e.applyStyles(m.style,a.PeriodInputField);
461m.style.textAlign="center";m.onblur=function(a){b.handleCalChange(a)};e.isNN&&m.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);e.isIE&&m.attachEvent("onkeypress",function(a){b.handleCalendarChange.call(b,a)});n.appendChild(m);b.startDateField=m;if(k)f=b.width-6+"px",e.addBr(n);else{var f=b.inputFieldWidth+"px",q=document.createTextNode(" ");n.appendChild(q)}m.style.width=f;m=document.createTextNode(c.langObj.toText||b.toText);n.appendChild(m);k&&e.addBr(n);m=document.createElement("input");m.setAttribute("aria-label",c.langObj.toText||b.toText);m.className="amChartsInputField "+d+"-end-date-input";a&&e.applyStyles(m.style,a.PeriodInputField);m.style.textAlign="center";m.onblur=function(){b.handleCalChange()};e.isNN&&m.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);e.isIE&&m.attachEvent("onkeypress",function(a){b.handleCalendarChange.call(b,a)});n.appendChild(m);b.endDateField=m;k?e.addBr(n):g=m.offsetHeight+2;f&&(m.style.width=f)}n=b.periods;if(e.ifArray(n)){f=document.createElement("div");k||(f.style.cssFloat="right",f.style.styleFloat="right",f.style.display="inline");l.appendChild(f);k&&e.addBr(f);c=document.createTextNode(c.langObj.periodsText||b.periodsText);f.appendChild(c);b.periodContainer=f;for(var t,c=0;c<n.length;c++)l=n[c],t=document.createElement("input"),t.type="button",t.value=l.label,t.period=l.period,t.count=l.count,t.periodObj=l,t.className="amChartsButton "+d+"-period-input",a&&e.applyStyles(t.style,a.PeriodButton),k&&(t.style.width=b.width-1+"px"),t.style.boxSizing="border-box",f.appendChild(t),b.addEventListeners(t),l.button=t;!k&&t&&(h=t.offsetHeight)}b.offsetHeight=Math.max(g,h)},addEventListeners:function(a){var b=this;e.isNN&&a.addEventListener("click",function(a){b.handlePeriodChange.call(b,a)},!0);e.isIE&&a.attachEvent("onclick",function(a){b.handlePeriodChange.call(b,a)})},getPeriodDates:function(){var a=this.periods,b;for(b=0;b<a.length;b++)this.selectPeriodButton(a[b],!0)},handleCalendarChange:function(a){13==a.keyCode&&this.handleCalChange(a)},handleCalChange:function(a){var b=this.dateFormat,c=e.stringToDate(this.startDateField.value,b),b=this.chart.getLastDate(e.stringToDate(this.endDateField.value,b));try{this.startDateField.blur(),this.endDateField.blur()}catch(k){}if(c&&b){var d={type:"changed"};d.startDate=c;d.endDate=b;d.chart=this.chart;d.event=a;this.fire(d)}},handlePeriodChange:function(a){this.selectPeriodButton((a.srcElement?a.srcElement:a.target).periodObj,!1,a)},setRanges:function(a,b){this.firstDate=a;this.lastDate=b;this.getPeriodDates()},selectPeriodButton:function(a,b,c){var d=a.button,k=d.count,g=d.period,l=this.chart,h,n,f=this.firstDate,m=this.lastDate,q,t=this.theme;h=this.selectFromStart;f&&m&&("MAX"==g?(h=f,n=m):"YTD"==g?(h=new Date,h.setMonth(0,1),h.setHours(0,0,0,0),0===k&&h.setDate(h.getDate()-1),n=this.lastDate):"YYYY"==g||"MM"==g?h?(h=f,n=new Date(f),"YYYY"==g&&(k*=12),n.setMonth(n.getMonth()+k)):(h=new Date(m),"YYYY"==g&&(g="MM",k*=12),"MM"==g&&(h=e.resetDateToMin(h,"DD")),e.changeDate(h,g,k,!1),n=m):"fff"==g?(e.getPeriodDuration(g,k),q=e.getPeriodDuration(g,k),h?(h=f,n.setMilliseconds(f.getMilliseconds()-q+1)):(h=new Date(m.getTime()),h.setMilliseconds(h.getMilliseconds()-q+1),n=this.lastDate)):(q=e.getPeriodDuration(g,k),h?(h=f,n=new Date(f.getTime()+q-1)):(h=new Date(m.getTime()-q+1),n=m)),a.startTime=h.getTime(),this.hideOutOfScopePeriods&&(b&&a.startTime<f.getTime()?d.style.display="none":d.style.display="inline"),h.getTime()>m.getTime()&&(q=e.getPeriodDuration("DD",1),h=new Date(m.getTime()-q)),h.getTime()<f.getTime()&&(h=f),"YTD"==g&&(a.startTime=h.getTime(),m.getFullYear()<(new Date).getFullYear()&&(d.style.display="none")),a.endTime=n.getTime(),b||(this.skipMark=!0,this.unselectButtons(),d.className="amChartsButtonSelected "+l.classNamePrefix+"-period-input-selected",t&&e.applyStyles(d.style,t.PeriodButtonSelected),a={type:"changed"},a.startDate=h,a.endDate=n,a.predefinedPeriod=g,a.chart=this.chart,a.count=k,a.event=c,this.fire(a)))},markButtonAsSelected:function(){if(!this.skipMark){var a=this.chart,b=this.periods,c=a.startDate.getTime(),d=a.endDate.getTime(),k=this.lastDate.getTime();d>k&&(d=k);k=this.theme;this.unselectButtons();var g;for(g=b.length-1;0<=g;g--){var l=b[g],h=l.button;l.startTime&&l.endTime&&c==l.startTime&&d==l.endTime&&(this.unselectButtons(),h.className="amChartsButtonSelected "+a.classNamePrefix+"-period-input-selected",k&&e.applyStyles(h.style,k.PeriodButtonSelected))}}this.skipMark=!1},unselectButtons:function(){var a=this.chart,b=this.periods,c,d=this.theme;for(c=b.length-1;0<=c;c--){var k=b[c].button;k.className="amChartsButton "+a.classNamePrefix+"-period-input";d&&e.applyStyles(k.style,d.PeriodButton)}},setDefaultPeriod:function(){var a=this.periods,b;if(this.chart.chartCreated)for(b=0;b<a.length;b++){var c=a[b];c.selected&&this.selectPeriodButton(c)}}})})();(function(){var e=window.AmCharts;e.StockGraph=e.Class({inherits:e.AmGraph,construct:function(a){e.StockGraph.base.construct.call(this,a);this.cname="StockGraph";this.useDataSetColors=!0;this.periodValue="Close";this.compareGraphType="line";this.compareGraphVisibleInLegend=!0;
461this.comparable=this.resetTitleOnDataSetChange=!1;this.comparedGraphs={};this.showEventsOnComparedGraphs=!1;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.StockPanel=e.Class({inherits:e.AmSerialChart,construct:function(a){e.StockPanel.base.construct.call(this,a);this.cname="StockPanel";this.theme=a;this.showCategoryAxis=this.showComparedOnTop=!0;this.recalculateToPercents="whenComparing";this.panelHeaderPaddingBottom=this.panelHeaderPaddingLeft=this.panelHeaderPaddingRight=this.panelHeaderPaddingTop=0;this.trendLineAlpha=1;this.trendLineColor="#00CC00";this.trendLineColorHover="#CC0000";this.trendLineThickness=2;this.trendLineDashLength=0;this.stockGraphs=[];this.drawingIconsEnabled=!1;this.iconSize=38;this.autoMargins=this.allowTurningOff=this.eraseAll=this.erasingEnabled=this.drawingEnabled=!1;e.applyTheme(this,a,this.cname)},initChart:function(a){e.StockPanel.base.initChart.call(this,a);this.drawingIconsEnabled&&this.createDrawIcons();(a=this.chartCursor)&&this.listenTo(a,"draw",this.handleDraw)},addStockGraph:function(a){this.stockGraphs.push(a);return a},handleCursorZoom:function(a){a.start=NaN;a.end=NaN;e.StockPanel.base.handleCursorZoom.call(this,a)},removeStockGraph:function(a){var b=this.stockGraphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)},createDrawIcons:function(){var a=this,b=a.iconSize,c=a.container,d=a.pathToImages,k=a.realWidth-2*b-1-a.marginRight,g=e.rect(c,b,b,"#000",.005),l=e.rect(c,b,b,"#000",.005);l.translate(b+1,0);var h=c.image(d+"pencilIcon"+a.extension,0,0,b,b);e.setCN(a,h,"pencil");a.pencilButton=h;l.setAttr("cursor","pointer");g.setAttr("cursor","pointer");g.mouseup(function(){a.handlePencilClick()});var n=c.image(d+"pencilIconH"+a.extension,0,0,b,b);e.setCN(a,n,"pencil-pushed");a.pencilButtonPushed=n;a.drawingEnabled||n.hide();var f=c.image(d+"eraserIcon"+a.extension,b+1,0,b,b);e.setCN(a,f,"eraser");a.eraserButton=f;l.mouseup(function(){a.handleEraserClick()});g.touchend&&(g.touchend(function(){a.handlePencilClick()}),l.touchend(function(){a.handleEraserClick()}));b=c.image(d+"eraserIconH"+a.extension,b+1,0,b,b);e.setCN(a,b,"eraser-pushed");a.eraserButtonPushed=b;a.erasingEnabled||b.hide();c=c.set([h,n,f,b,g,l]);e.setCN(a,c,"drawing-tools");c.translate(k,1);this.hideIcons&&c.hide()},handlePencilClick:function(){var a=!this.drawingEnabled;this.disableDrawing(!a);this.erasingEnabled=!1;var b=this.eraserButtonPushed;b&&b.hide();b=this.pencilButtonPushed;a?b&&b.show():(b&&b.hide(),this.setMouseCursor("auto"))},disableDrawing:function(a){this.drawingEnabled=!a;var b=this.chartCursor;this.stockChart&&(this.stockChart.enableCursors(a),b&&b.enableDrawing(!a))},handleEraserClick:function(){this.disableDrawing(!0);var a=this.pencilButtonPushed;a&&a.hide();a=this.eraserButtonPushed;if(this.eraseAll){var a=this.trendLines,b;for(b=a.length-1;0<=b;b--){var c=a[b];c.isProtected||this.removeTrendLine(c)}this.validateNow()}else(this.erasingEnabled=b=!this.erasingEnabled)?(a&&a.show(),this.setTrendColorHover(this.trendLineColorHover),this.setMouseCursor("auto")):(a&&a.hide(),this.setTrendColorHover())},setTrendColorHover:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--){var d=b[c];d.isProtected||(d.rollOverColor=a);this.listenTo(d,"click",this.handleTrendClick)}},handleDraw:function(a){var b=this.drawOnAxis;e.isString(b)&&(b=this.getValueAxisById(b));b||(b=this.valueAxes[0]);this.drawOnAxis=b;var c=this.categoryAxis,d=a.initialX,k=a.finalX,g=a.initialY;a=a.finalY;var l=new e.TrendLine(this.theme);l.initialDate=c.coordinateToDate(d);l.finalDate=c.coordinateToDate(k);l.initialValue=b.coordinateToValue(g);l.finalValue=b.coordinateToValue(a);l.lineAlpha=this.trendLineAlpha;l.lineColor=this.trendLineColor;l.lineThickness=this.trendLineThickness;l.dashLength=this.trendLineDashLength;l.valueAxis=b;l.categoryAxis=c;this.addTrendLine(l);this.listenTo(l,"click",this.handleTrendClick);this.validateNow()},hideDrawingIcons:function(a){(this.hideIcons=a)&&this.disableDrawing(a)},handleTrendClick:function(a){this.erasingEnabled&&(a=a.trendLine,this.eraseAll||a.isProtected||this.removeTrendLine(a),this.validateNow())},handleWheelReal:function(a,b){var c=this.scrollbarChart;if(!this.wheelBusy&&c){var d=1,e=1;this.mouseWheelZoomEnabled?b||(d=-1):b&&(d=-1);if(d!=e)var g=this.mouseX/this.plotAreaWidth,d=d*g,e=e*(1-g);if(c=c.chartScrollbar)c.getPercents(),g=.05*(c.percentEnd-c.percentStart),.005>g&&(g=.005),0>a?(d=c.percentStart+d*g,e=c.percentEnd+e*g):(d=c.percentStart-d*g,e=c.percentEnd-e*g),e>d&&c.percentZoom(d,e,!0)}}})})();(function(){var e=window.AmCharts;e.CategoryAxesSettings=e.Class({construct:function(a){this.cname="CategoryAxesSettings";this.minPeriod="DD";this.equalSpacing=!1;this.axisHeight=28;this.tickLength=this.axisAlpha=0;this.gridCount=10;this.maxSeries=150;this.groupToPeriods="ss 10ss 30ss mm 10mm 30mm hh DD WW MM YYYY".split(" ");this.markPeriodChange=this.autoGridCount=!0;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.ChartCursorSettings=e.Class({construct:function(a){this.cname="ChartCursorSettings";this.enabled=!0;this.bulletsEnabled=this.valueBalloonsEnabled=!1;this.graphBulletSize=1;this.onePanelOnly=!1;this.categoryBalloonDateFormats=[{period:"YYYY",format:"YYYY"}
461,{period:"MM",format:"MMM, YYYY"},{period:"WW",format:"MMM DD, YYYY"},{period:"DD",format:"MMM DD, YYYY"},{period:"hh",format:"JJ:NN"},{period:"mm",format:"JJ:NN"},{period:"ss",format:"JJ:NN:SS"},{period:"fff",format:"JJ:NN:SS"}];e.applyTheme(this,a,this.cname)},categoryBalloonDateFormat:function(a){var b=this.categoryBalloonDateFormats,c,d;for(d=0;d<b.length;d++)b[d].period==a&&(c=b[d].format);return c}})})();(function(){var e=window.AmCharts;e.ChartScrollbarSettings=e.Class({construct:function(a){this.cname="ChartScrollbarSettings";this.height=40;this.enabled=!0;this.color="#FFFFFF";this.updateOnReleaseOnly=this.autoGridCount=!0;this.hideResizeGrips=!1;this.position="bottom";this.minDistance=1;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.LegendSettings=e.Class({construct:function(a){this.cname="LegendSettings";this.marginBottom=this.marginTop=0;this.usePositiveNegativeOnPercentsOnly=!0;this.positiveValueColor="#00CC00";this.negativeValueColor="#CC0000";this.autoMargins=this.equalWidths=this.textClickEnabled=!1;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.PanelsSettings=e.Class({construct:function(a){this.cname="PanelsSettings";this.marginBottom=this.marginTop=this.marginRight=this.marginLeft=0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.panelSpacing=8;this.panEventsEnabled=!0;this.creditsPosition="top-right";this.svgIcons=this.zoomOutAxes=!0;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.StockEventsSettings=e.Class({construct:function(a){this.cname="StockEventsSettings";this.type="sign";this.backgroundAlpha=1;this.backgroundColor="#DADADA";this.borderAlpha=1;this.borderColor="#888888";this.balloonColor=this.rollOverColor="#CC0000";e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.ValueAxesSettings=e.Class({construct:function(a){this.cname="ValueAxesSettings";this.tickLength=0;this.showFirstLabel=this.autoGridCount=this.inside=!0;this.showLastLabel=!1;this.axisAlpha=0;e.applyTheme(this,a,this.cname)}})})();(function(){var e=window.AmCharts;e.getItemIndex=function(a,b){var c=-1,d;for(d=0;d<b.length;d++)a==b[d]&&(c=d);return c};e.addBr=function(a){a.appendChild(document.createElement("br"))};e.applyStyles=function(a,b){if(b&&a)for(var c in a){var d=c,e=b[d];if(void 0!==e)try{a[d]=e}catch(g){}}}})();(function(){var e=window.AmCharts;e.StockLegend=e.Class({inherits:e.AmLegend,construct:function(a){e.StockLegend.base.construct.call(this,a);this.cname="StockLegend";this.valueTextComparing="[[percents.value]]%";this.valueTextRegular="[[value]]";e.applyTheme(this,a,this.cname)},drawLegend:function(){var a=this;e.StockLegend.base.drawLegend.call(a);var b=a.chart;if(b.allowTurningOff){var c=a.container,d=c.image(b.pathToImages+"xIcon"+b.extension,b.realWidth-19,3,19,19),b=c.image(b.pathToImages+"xIconH"+ 462b.extension,b.realWidth-19,3,19,19);b.hide();a.xButtonHover=b;d.mouseup(function(){a.handleXClick()}).mouseover(function(){a.handleXOver()});b.mouseup(function(){a.handleXClick()}).mouseout(function(){a.handleXOut()})}},handleXOver:function(){this.xButtonHover.show()},handleXOut:function(){this.xButtonHover.hide()},handleXClick:function(){var a=this.chart,b=a.stockChart;b.removePanel(a);b.validateNow()}})})();(function(){var e=window.AmCharts;e.DataSetSelector=e.Class({construct:function(a){this.cname="DataSetSelector";this.theme=a;this.createEvents("dataSetSelected","dataSetCompared","dataSetUncompared");this.position="left";this.selectText="Select:";this.comboBoxSelectText="Select...";this.compareText="Compare to:";this.width=180;this.dataProvider=[];this.listHeight=150;this.listCheckBoxSize=14;this.rollOverBackgroundColor="#b2e1ff";this.selectedBackgroundColor="#7fceff";this.offsetHeight=0;e.applyTheme(this,a,this.cname)},write:function(a){var b=this,c,d=b.theme,k=b.chart;a.className="amChartsDataSetSelector "+k.classNamePrefix+"-data-set-selector-div";var g=b.width;c=b.position;b.width=void 0;b.position=void 0;e.applyStyles(a.style,b);b.div=a;b.width=g;b.position=c;a.innerHTML="";var g=b.position,l;l="top"==g||"bottom"==g?!1:!0;b.vertical=l;var h;l&&(h=b.width+"px");var g=b.dataProvider,n,f;if(1<b.countDataSets("showInSelect")){c=document.createTextNode(k.langObj.selectText||b.selectText);a.appendChild(c);l&&e.addBr(a);var m=document.createElement("select");h&&(m.style.width=h);b.selectCB=m;d&&e.applyStyles(m.style,d.DataSetSelect);m.className=k.classNamePrefix+"-data-set-select";a.appendChild(m);e.isNN&&m.addEventListener("change",function(a){b.handleDataSetChange.call(b,a)},!0);e.isIE&&m.attachEvent("onchange",function(a){b.handleDataSetChange.call(b,a)});for(c=0;c<g.length;c++)if(n=g[c],!0===n.showInSelect){f=document.createElement("option");f.className=k.classNamePrefix+"-data-set-select-option";f.text=n.title;f.value=c;n==b.chart.mainDataSet&&(f.selected=!0);try{m.add(f,null)}catch(q){m.add(f)}}b.offsetHeight=m.offsetHeight}if(0<b.countDataSets("showInCompare")&&1<g.length)if(l?(e.addBr(a),e.addBr(a)):(c=document.createTextNode(" "),a.appendChild(c)),c=document.createTextNode(k.langObj.compareText||b.compareText),a.appendChild(c),f=b.listCheckBoxSize,l){e.addBr(a);h=document.createElement("div");a.appendChild(h);h.className="amChartsCompareList "+k.classNamePrefix+"-compare-div";d&&e.applyStyles(h.style,d.DataSetCompareList);h.style.overflow="auto";h.style.overflowX="hidden";
462h.style.width=b.width-2+"px";h.style.maxHeight=b.listHeight+"px";for(c=0;c<g.length;c++)n=g[c],!0===n.showInCompare&&n!=b.chart.mainDataSet&&(d=document.createElement("div"),d.style.padding="4px",d.style.position="relative",d.name="amCBContainer",d.className=k.classNamePrefix+"-compare-item-div",d.dataSet=n,d.style.height=f+"px",n.compared&&(d.style.backgroundColor=b.selectedBackgroundColor),h.appendChild(d),l=document.createElement("div"),l.style.width=f+"px",l.style.height=f+"px",l.style.position="absolute",l.style.backgroundColor=n.color,d.appendChild(l),l=document.createElement("div"),l.style.width="100%",l.style.position="absolute",l.style.left=f+10+"px",d.appendChild(l),n=document.createTextNode(n.title),l.style.whiteSpace="nowrap",l.style.cursor="default",l.appendChild(n),b.addEventListeners(d));e.addBr(a);e.addBr(a)}else{d=document.createElement("select");b.compareCB=d;h&&(d.style.width=h);a.appendChild(d);e.isNN&&d.addEventListener("change",function(a){b.handleCBSelect.call(b,a)},!0);e.isIE&&d.attachEvent("onchange",function(a){b.handleCBSelect.call(b,a)});f=document.createElement("option");f.text=k.langObj.comboBoxSelectText||b.comboBoxSelectText;try{d.add(f,null)}catch(q){d.add(f)}for(c=0;c<g.length;c++)if(n=g[c],!0===n.showInCompare&&n!=b.chart.mainDataSet){f=document.createElement("option");f.text=n.title;f.value=c;n.compared&&(f.selected=!0);try{d.add(f,null)}catch(q){d.add(f)}}b.offsetHeight=d.offsetHeight}},addEventListeners:function(a){var b=this;e.isNN&&(a.addEventListener("mouseover",function(a){b.handleRollOver.call(b,a)},!0),a.addEventListener("mouseout",function(a){b.handleRollOut.call(b,a)},!0),a.addEventListener("click",function(a){b.handleClick.call(b,a)},!0));e.isIE&&(a.attachEvent("onmouseout",function(a){b.handleRollOut.call(b,a)}),a.attachEvent("onmouseover",function(a){b.handleRollOver.call(b,a)}),a.attachEvent("onclick",function(a){b.handleClick.call(b,a)}))},handleDataSetChange:function(){var a=this.selectCB,a=this.dataProvider[a.options[a.selectedIndex].value],b=this.chart;b.mainDataSet=a;b.zoomOutOnDataSetChange&&(b.startDate=void 0,b.endDate=void 0);b.validateData(!0);this.fire({type:"dataSetSelected",dataSet:a,chart:this.chart})},handleRollOver:function(a){a=this.getRealDiv(a);a.dataSet.compared||(a.style.backgroundColor=this.rollOverBackgroundColor)},handleRollOut:function(a){a=this.getRealDiv(a);a.dataSet.compared||(a.style.removeProperty&&a.style.removeProperty("background-color"),a.style.removeAttribute&&a.style.removeAttribute("backgroundColor"))},handleCBSelect:function(a){var b=this.compareCB,c=this.dataProvider,d,e;for(d=0;d<c.length;d++)e=c[d],e.compared&&(a={type:"dataSetUncompared",dataSet:e}),e.compared=!1;c=b.selectedIndex;0<c&&(e=this.dataProvider[b.options[c].value],e.compared||(a={type:"dataSetCompared",dataSet:e}),e.compared=!0);b=this.chart;b.validateData(!0);a.chart=b;this.fire(a)},handleClick:function(a){a=this.getRealDiv(a).dataSet;!0===a.compared?(a.compared=!1,a={type:"dataSetUncompared",dataSet:a}):(a.compared=!0,a={type:"dataSetCompared",dataSet:a});var b=this.chart;b.validateData(!0);a.chart=b;this.fire(a)},getRealDiv:function(a){a||(a=window.event);a=a.currentTarget?a.currentTarget:a.srcElement;"amCBContainer"==a.parentNode.name&&(a=a.parentNode);return a},countDataSets:function(a){var b=this.dataProvider,c=0,d;for(d=0;d<b.length;d++)!0===b[d][a]&&c++;return c}})})();(function(){var e=window.AmCharts;e.StackedBullet=e.Class({construct:function(){this.stackDown=!1;this.mastHeight=8;this.shapes=[];this.backgroundColors=[];this.backgroundAlphas=[];this.borderAlphas=[];this.borderColors=[];this.colors=[];this.rollOverColors=[];this.showOnAxiss=[];this.values=[];this.showAts=[];this.textColor="#000000";this.nextY=0;this.size=16},parseConfig:function(){var a=this.bulletConfig;this.eventObjects=a.eventObjects;this.letters=a.letters;this.shapes=a.shapes;this.backgroundColors=a.backgroundColors;this.backgroundAlphas=a.backgroundAlphas;this.borderColors=a.borderColors;this.borderAlphas=a.borderAlphas;this.colors=a.colors;this.rollOverColors=a.rollOverColors;this.date=a.date;this.showOnAxiss=a.showOnAxis;this.axisCoordinate=a.minCoord;this.showAts=a.showAts;this.values=a.values;this.fontSizes=a.fontSizes;this.showBullets=a.showBullets},write:function(a){this.parseConfig();this.container=a;this.bullets=[];this.fontSize=this.chart.fontSize;if(this.graph){var b=this.graph.fontSize;b&&(this.fontSize=b)}b=this.letters.length;(this.mastHeight+2*(this.fontSize/2+2))*b>this.availableSpace&&(this.stackDown=!0);this.set=a.set();this.cset=a.set();this.set.push(this.cset);this.set.doNotScale=!0;a=0;var c;for(c=0;c<b;c++){this.shape=this.shapes[c];this.backgroundColor=this.backgroundColors[c];this.backgroundAlpha=this.backgroundAlphas[c];this.borderAlpha=this.borderAlphas[c];this.borderColor=this.borderColors[c];this.rollOverColor=this.rollOverColors[c];this.showOnAxis=this.showOnAxiss[c];this.showBullet=this.showBullets[c];this.color=this.colors[c];this.value=this.values[c];this.showAt=this.showAts[c];var d=this.fontSizes[c];isNaN(d)||(this.fontSize=d);this.addLetter(this.letters[c],a,c);this.showOnAxis||a++}},addLetter:function(a,b,c){var d=this.container;b=d.set();var k=-1,g=this.stackDown,l=this.graph.valueAxis;this.showOnAxis&&(this.stackDown=l.reversed?!0:!1);this.stackDown&&(k=1);var h=0,n=0,f=0,m,q=this.fontSize,t=this.mastHeight,p=this.shape,y=this.textColor;void 0!==this.color&&(y=this.color);void 0===a&&(a="");a=e.fixBrakes(a);a=e.text(d,a,y,this.chart.fontFamily,this.fontSize);a.node.style.pointerEvents="none";d=a.getBBox();this.labelWidth=y=d.width;this.labelHeight=d.height;var v,d=0;switch(p){case"sign":v=this.drawSign(b);h=t+4+q/2;d=t+q+4;1==k&&(h-=4);break;case"flag":v=this.drawFlag(b);n=y/2+3;h=t+4+q/2;d=t+q+4;1==k&&(h-=4);break;case"pin":v=this.drawPin(b);h=6+q/2;d=q+8;break;case"triangleUp":v=this.drawTriangleUp(b);h=-q-1;d=q+4;k=-1;break;case"triangleDown":v=this.drawTriangleDown(b);h=q+1;d=q+4;k=-1;break;case"triangleLeft":v=this.drawTriangleLeft(b);n=q;d=q+4;k=-1;break;case"triangleRight":v=this.drawTriangleRight(b);n=-q;k=-1;d=q+4;break;case"arrowUp":v=this.drawArrowUp(b);a.hide();break;case"arrowDown":v=this.drawArrowDown(b);a.hide();d=q+4;break;case"text":k=-1;
462v=this.drawTextBackground(b,a);h=this.labelHeight+3;d=q+10;break;case"round":v=this.drawCircle(b)}this.bullets[c]=v;this.showOnAxis?(m=isNaN(this.nextAxisY)?this.axisCoordinate:this.nextY,f=h*k,this.nextAxisY=m+k*d):this.value?(m=this.value,l.recalculateToPercents&&(m=m/l.recBaseValue*100-100),m=l.getCoordinate(m)-this.bulletY,f=h*k):this.showAt?(v=this.graphDataItem.values,l.recalculateToPercents&&(v=this.graphDataItem.percents),v&&(m=l.getCoordinate(v[this.showAt])-this.bulletY,f=h*k)):(m=this.nextY,f=h*k);a.translate(n,f);b.push(a);b.translate(0,m);this.addEventListeners(b,c);this.nextY=m+k*d;this.stackDown=g},addEventListeners:function(a,b){var c=this;a.click(function(){c.handleClick(b)}).mouseover(function(){c.handleMouseOver(b)}).touchend(function(){c.handleMouseOver(b,!0);c.handleClick(b);setTimeout(function(){c.handleMouseOut.call(c,b)},200)}).mouseout(function(){c.handleMouseOut(b)}).touchstart(function(){c.handleMouseOver(b)})},drawPin:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4;return this.drawRealPolygon(a,[0,c/2,c/2,-c/2,-c/2,0],[0,b*c/4,b*(c+c/4),b*(c+c/4),b*c/4,0])},drawSign:function(a){var b=-1;this.stackDown&&(b=1);var c=this.mastHeight*b,d=this.fontSize/2+2,k=e.line(this.container,[0,0],[0,c],this.borderColor,this.borderAlpha,1),g=e.circle(this.container,d,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);g.translate(0,c+d*b);a.push(k);a.push(g);this.cset.push(a);return g},drawFlag:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4,d=this.labelWidth+6,k=this.mastHeight,b=1==b?b*k:b*k-c,k=e.line(this.container,[0,0],[0,b],this.borderColor,this.borderAlpha,1),c=e.polygon(this.container,[0,d,d,0],[0,0,c,c],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);c.translate(0,b);a.push(k);a.push(c);this.cset.push(a);return c},drawTriangleUp:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,b,b,0])},drawArrowUp:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,[0,c,d,d,-d,-d,-c,0],[0,c,c,b,b,c,c,0])},drawArrowDown:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,[0,c,d,d,-d,-d,-c,0],[0,-c,-c,-b,-b,-c,-c,0])},drawTriangleDown:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,-b,-b,0])},drawTriangleLeft:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b,b,0],[0,-b/2,b/2,0])},drawTriangleRight:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,-b,-b,0],[0,-b/2,b/2,0])},drawRealPolygon:function(a,b,c){b=e.polygon(this.container,b,c,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(b);this.cset.push(a);return b}
462,drawCircle:function(a){var b=e.circle(this.container,this.fontSize/2,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(b);this.cset.push(a);return b},drawTextBackground:function(a,b){var c=b.getBBox(),d=-c.width/2-5,e=c.width/2+5,c=-c.height-12;return this.drawRealPolygon(a,[d,-5,0,5,e,e,d,d],[-5,-5,0,-5,-5,c,c,-5])},handleMouseOver:function(a,b){b||this.bullets[a].attr({fill:this.rollOverColors[a]});var c=this.eventObjects[a],d={type:"rollOverStockEvent",eventObject:c,graph:this.graph,date:this.date},k=this.bulletConfig.eventDispatcher;d.chart=k;k.fire(d);c.url&&this.bullets[a].setAttr("cursor","pointer");d=this.chart;d.showBalloon(e.fixNewLines(c.description),k.stockEventsSettings.balloonColor,!0);c=d.graphs;if(d.chartCursor&&d.chartCursor.valueBalloonsEnabled)for(k=0;k<c.length;k++)c[k].hideBalloon()},handleClick:function(a){a=this.eventObjects[a];var b={type:"clickStockEvent",eventObject:a,graph:this.graph,date:this.date},c=this.bulletConfig.eventDispatcher;b.chart=c;c.fire(b);b=a.urlTarget;b||(b=c.stockEventsSettings.urlTarget);e.getURL(a.url,b)},handleMouseOut:function(a){this.bullets[a].attr({fill:this.backgroundColors[a]});a={type:"rollOutStockEvent",eventObject:this.eventObjects[a],graph:this.graph,date:this.date};var b=this.bulletConfig.eventDispatcher;a.chart=b;this.chart.hideBalloonReal();b.fire(a)}})})(); 463;;;(function(){var k=window.AmCharts;k.AmSlicedChart=k.Class({inherits:k.AmChart,construct:function(a){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");k.AmSlicedChart.base.construct.call(this,a);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=10;this.gradientRatio=[];this.maxLabelWidth=200;this.accessibleLabel="[[title]]: [[percents]]% [[value]] [[description]]";k.applyTheme(this,a,"AmSlicedChart")},initChart:function(){k.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(a){var b=a.type,c=a.dataItem,d=this.legend;if(c.wedge&&c){var g=c.hidden;a=a.event;switch(b){case"clickMarker":g||d.switchable||this.clickSlice(c,a);break;case"clickLabel":g||this.clickSlice(c,a,!1);break;case"rollOverItem":g||this.rollOverSlice(c,!1,a);break;case"rollOutItem":g||this.rollOutSlice(c,a);break;case"hideItem":this.hideSlice(c,a);break;case"showItem":this.showSlice(c,a)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var a=this.legend;a&&a.invalidateSize()},addEventListeners:function(a,b){var c=this;a.mouseover(function(a){c.rollOverSlice(b,!0,a)}).mouseout(function(a){c.rollOutSlice(b,a)}).touchend(function(a){c.rollOverSlice(b,a)}).mouseup(function(a){c.clickSlice(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)}).focus(function(a){c.rollOverSlice(b,a)}).blur(function(a){c.rollOutSlice(b,a)})},formatString:function(a,b,c){a=k.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);var d=this.pf.precision;isNaN(this.tempPrec)||(this.pf.precision=this.tempPrec);a=k.formatValue(a,b,["percents"],this.pf);a=k.massReplace(a,{"[[title]]":b.title,"[[description]]":b.description});this.pf.precision=d;-1!=a.indexOf("[[")&&(a=k.formatDataContextValue(a,b.dataContext));a=c?k.fixNewLines(a):k.fixBrakes(a);return a=k.cleanFromEmpty(a)},startSlices:function(){var a;for(a=0;a<this.chartData.length;a++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(a):this.startSlice(this.chartData[a])},setStartTO:function(a){var b=this;a=setTimeout(function(){b.startSequenced.call(b)},b.startDuration/b.chartData.length*500*a);b.timeOuts.push(a)}
463,pullSlices:function(a){var b=this.chartData,c;for(c=0;c<b.length;c++){var d=b[c];d.pulled&&this.pullSlice(d,1,a)}},startSequenced:function(){var a=this.chartData,b;for(b=0;b<a.length;b++)if(!a[b].started){this.startSlice(this.chartData[b]);break}},startSlice:function(a){a.started=!0;var b=a.wedge,c=this.startDuration,d=a.labelSet;b&&0<c&&(0<a.alpha&&b.show(),b.translate(a.startX,a.startY),this.animatable.push(b),b.animate({opacity:1,translate:"0,0"},c,this.startEffect));d&&0<c&&(0<a.alpha&&d.show(),d.translate(a.startX,a.startY),d.animate({opacity:1,translate:"0,0"},c,this.startEffect))},showLabels:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(0<c.alpha){var d=c.label;d&&d.show();(c=c.tick)&&c.show()}}},showSlice:function(a){isNaN(a)?a.hidden=!1:this.chartData[a].hidden=!1;this.invalidateVisibility()},hideSlice:function(a){isNaN(a)?a.hidden=!0:this.chartData[a].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(a,b,c){isNaN(a)||(a=this.chartData[a]);clearTimeout(this.hoverInt);if(!a.hidden){this.pullOnHover&&this.pullSlice(a,1);1>this.hoverAlpha&&a.wedge&&a.wedge.attr({opacity:this.hoverAlpha});var d=a.balloonX,g=a.balloonY;a.pulled&&(d+=a.pullX,g+=a.pullY);var f=this.formatString(this.balloonText,a,!0),h=this.balloonFunction;h&&(f=h(a,f));h=k.adjustLuminosity(a.color,-.15);f?this.showBalloon(f,h,b,d,g):this.hideBalloon();0===a.value&&this.hideBalloon();this.fire({type:"rollOverSlice",dataItem:a,chart:this,event:c})}},rollOutSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.wedge&&a.wedge.attr({opacity:1});this.hideBalloon();this.fire({type:"rollOutSlice",dataItem:a,chart:this,event:b})},clickSlice:function(a,b,c){this.checkTouchDuration(b)&&(isNaN(a)||
463(a=this.chartData[a]),a.pulled?this.pullSlice(a,0):this.pullSlice(a,1),k.getURL(a.url,this.urlTarget),c||this.fire({type:"clickSlice",dataItem:a,chart:this,event:b}))},handleRightClick:function(a,b){isNaN(a)||(a=this.chartData[a]);this.fire({type:"rightClickSlice",dataItem:a,chart:this,event:b})},drawTicks:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(c.label&&!c.skipTick){var d=c.ty,d=k.line(this.container,[c.tx0,c.tx,c.tx2],[c.ty0,d,d],this.labelTickColor,this.labelTickAlpha);k.setCN(this,d,this.type+"-tick");k.setCN(this,d,c.className,!0);c.tick=d;c.wedge.push(d);"AmFunnelChart"==this.cname&&d.toBack()}}},initialStart:function(){var a=this,b=a.startDuration,c=setTimeout(function(){a.showLabels.call(a)},1E3*b);a.timeOuts.push(c);a.chartCreated?a.pullSlices(!0):(a.startSlices(),0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices(!0))},pullSlice:function(a,b,c){var d=this.pullOutDuration;!0===c&&(d=0);if(c=a.wedge)0<d?(c.animate({translate:b*a.pullX+","+b*a.pullY},d,this.pullOutEffect),a.labelSet&&a.labelSet.animate({translate:b*a.pullX+","+b*a.pullY},d,this.pullOutEffect)):(a.labelSet&&a.labelSet.translate(b*a.pullX,b*a.pullY),c.translate(b*a.pullX,b*a.pullY));1==b?(a.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(a.index),a={type:"pullOutSlice",dataItem:a,chart:this}):(a.pulled=!1,a={type:"pullInSlice",dataItem:a,chart:this});this.fire(a)},pullInAll:function(a){var b=this.chartData,c;for(c=0;c<this.chartData.length;c++)c!=a&&b[c].pulled&&this.pullSlice(b[c],0)},pullOutAll:function(){var a=this.chartData,b;for(b=0;b<a.length;b++)a[b].pulled||this.pullSlice(a[b],1)},parseData:function(){var a=[];this.chartData=a;var b=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==b){var c=b.length,d=0,g,f,h;for(g=0;g<c;g++){f={};var e=b[g];f.dataContext=e;null!==e[this.valueField]&&(f.value=Number(e[this.valueField]));(h=e[this.titleField])||(h="");f.title=h;f.pulled=k.toBoolean(e[this.pulledField],!1);(h=e[this.descriptionField])||(h="");f.description=h;f.labelRadius=Number(e[this.labelRadiusField]);f.switchable=!0;f.className=e[this.classNameField];f.url=e[this.urlField];h=e[this.patternField];!h&&this.patterns&&(h=this.patterns[g]);f.pattern=h;f.visibleInLegend=k.toBoolean(e[this.visibleInLegendField],!0);h=e[this.alphaField];f.alpha=void 0!==h?Number(h):this.alpha;h=e[this.colorField];void 0!==h&&(f.color=h);f.labelColor=k.toColor(e[this.labelColorField]);d+=f.value;f.hidden=!1;a[g]=f}for(g=b=0;g<c;g++)f=a[g],f.percents=f.value/d*100,f.percents<this.groupPercent&&b++;1<b&&(this.groupValue=0,this.removeSmallSlices(),a.push({title:this.groupedTitle,value:this.groupValue,percents:this.groupValue/d*100,pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha,pattern:this.groupedPattern,className:this.groupedClassName,dataContext:{}}));c=this.baseColor;c||(c=this.pieBaseColor);d=this.brightnessStep;d||(d=this.pieBrightnessStep);for(g=0;g<a.length;g++)c?h=k.adjustLuminosity(c,g*d/100):(h=this.colors[g],void 0===h&&(h=k.randomColor())),void 0===a[g].color&&(a[g].color=h);this.recalculatePercents()}},recalculatePercents:function(){var a=this.chartData,b=0,c,d;for(c=0;c<a.length;c++)d=a[c],!d.hidden&&0<d.value&&(b+=d.value);for(c=0;c<a.length;c++)d=this.chartData[c],d.percents=!d.hidden&&0<d.value?100*d.value/b:0},removeSmallSlices:function(){var a=this.chartData,b;for(b=a.length-1;0<=b;b--)a[b].percents<this.groupPercent&&(this.groupValue+=a[b].value,a.splice(b,1))},animateAgain:function(){var a=this;a.startSlices();for(var b=0;b<a.chartData.length;b++){var c=a.chartData[b];c.started=!1;var d=c.wedge;d&&(d.setAttr("opacity",a.startAlpha),d.translate(c.startX,c.startY));if(d=c.labelSet)d.setAttr("opacity",a.startAlpha),d.translate(c.startX,c.startY)}b=a.startDuration;0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices()},measureMaxLabel:function(){var a=this.chartData,b=0,c;for(c=0;c<a.length;c++){var d=a[c],g=this.formatString(this.labelText,d),f=this.labelFunction;
463f&&(g=f(d,g));d=k.text(this.container,g,this.color,this.fontFamily,this.fontSize);g=d.getBBox().width;g>b&&(b=g);d.remove()}return b}})})();(function(){var k=window.AmCharts;k.AmPieChart=k.Class({inherits:k.AmSlicedChart,construct:function(a){this.type="pie";k.AmPieChart.base.construct.call(this,a);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;this.adjustPrecision=!1;this.gradientType="radial";k.applyTheme(this,a,this.cname)},drawChart:function(){k.AmPieChart.base.drawChart.call(this);var a=this.chartData;if(k.ifArray(a)){if(0<this.realWidth&&0<this.realHeight){k.VML&&(this.startAlpha=1);var b=this.startDuration,c=this.container,d=this.updateWidth();this.realWidth=d;var g=this.updateHeight();this.realHeight=g;var f=k.toCoordinate,h=f(this.marginLeft,d),e=f(this.marginRight,d),z=f(this.marginTop,g)+this.getTitleHeight(),n=f(this.marginBottom,g)+this.depth3D,A,B,m,w=k.toNumber(this.labelRadius),q=this.measureMaxLabel();q>this.maxLabelWidth&&(q=this.maxLabelWidth);this.labelText&&this.labelsEnabled||(w=q=0);A=void 0===this.pieX?(d-h-e)/2+h:f(this.pieX,this.realWidth);B=void 0===this.pieY?(g-z-n)/2+z:f(this.pieY,g);m=f(this.radius,d,g);m||(d=0<=w?d-h-e-2*q:d-h-e,g=g-z-n,m=Math.min(d,g),g<d&&(m/=1-this.angle/90,m>d&&(m=d)),g=k.toCoordinate(this.pullOutRadius,m),m=(0<=w?m-1.8*(w+g):m-1.8*g)/2);m<this.minRadius&&(m=this.minRadius);g=f(this.pullOutRadius,m);z=k.toCoordinate(this.startRadius,m);f=f(this.innerRadius,m);f>=m&&(f=m-1);n=k.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(n=270<=n?270:90);n-=90;360<n&&(n-=360);d=m-m*this.angle/90;for(h=q=0;h<a.length;h++)e=a[h],!0!==e.hidden&&(q+=k.roundTo(e.percents,this.pf.precision));q=k.roundTo(q,this.pf.precision);this.tempPrec=NaN;this.adjustPrecision&&100!=q&&(this.tempPrec=this.pf.precision+1);for(var E,h=0;h<a.length;h++)if(e=a[h],!0!==e.hidden&&(this.showZeroSlices||0!==e.percents)){var r=360*e.percents/100,q=Math.sin((n+r/2)/180*Math.PI),C=d/m*-Math.cos((n+r/2)/180*Math.PI),p=this.outlineColor;p||(p=e.color);var u=this.alpha;isNaN(e.alpha)||(u=e.alpha);p={fill:e.color,stroke:p,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":u};e.url&&(p.cursor="pointer");p=k.wedge(c,A,B,n,r,m,d,f,this.depth3D,p,this.gradientRatio,e.pattern,this.path,this.gradientType);k.setCN(this,p,"pie-item");k.setCN(this,p.wedge,"pie-slice");k.setCN(this,p,e.className,!0);this.addEventListeners(p,e);e.startAngle=n;a[h].wedge=p;0<b&&(this.chartCreated||p.setAttr("opacity",this.startAlpha));e.ix=q;e.iy=C;e.wedge=p;e.index=h;e.label=null;u=c.set();if(this.labelsEnabled&&this.labelText&&e.percents>=this.hideLabelsPercent){var l=n+r/2;0>l&&(l+=360);360<l&&(l-=360);var t=w;isNaN(e.labelRadius)||(t=e.labelRadius,0>t&&(e.skipTick=!0));var r=A+q*(m+t),D=B+C*(m+t),x,v=0;isNaN(E)&&350<l&&1<a.length-h&&(E=h-1+Math.floor((a.length-h)/2));if(0<=t){var y;90>=l&&0<=l?(y=0,x="start",v=8):90<=l&&180>l?(y=1,x="start",v=8):180<=l&&270>l?(y=2,x="end",v=-8):270<=l&&354>=l?(y=3,x="end",v=-8):354<=l&&(h>E?(y=0,x="start",v=8):(y=3,x="end",v=-8));e.labelQuarter=y}else x="middle";l=this.formatString(this.labelText,e);(t=this.labelFunction)&&(l=t(e,l));t=e.labelColor;t||(t=this.color);""!==l&&(l=k.wrappedText(c,l,t,this.fontFamily,this.fontSize,x,!1,this.maxLabelWidth),k.setCN(this,l,"pie-label"),k.setCN(this,l,e.className,!0),l.translate(r+1.5*v,D),0>w&&(l.node.style.pointerEvents="none"),l.node.style.cursor="default",e.ty=D,e.textX=r+1.5*v,u.push(l),this.axesSet.push(u),e.labelSet=u,e.label=l,this.addEventListeners(u,e));e.tx=r;e.tx2=r+v;e.tx0=A+q*m;e.ty0=B+C*m}r=f+(m-f)/2;e.pulled&&(r+=g);this.accessible&&this.accessibleLabel&&(D=this.formatString(this.accessibleLabel,e),this.makeAccessible(p,D));void 0!==this.tabIndex&&p.setAttr("tabindex",this.tabIndex);e.balloonX=q*r+A;e.balloonY=C*r+B;e.startX=Math.round(q*z);e.startY=Math.round(C*z);e.pullX=Math.round(q*g);e.pullY=Math.round(C*g);this.graphsSet.push(p);if(0===e.alpha||0<b&&!this.chartCreated)p.hide(),u&&u.hide();n+=360*e.percents/100;360<n&&(n-=360)}0<w&&this.arrangeLabels();this.pieXReal=A;this.pieYReal=B;this.radiusReal=m;this.innerRadiusReal=f;0<w&&this.drawTicks();this.initialStart();this.setDepths()}(a=this.legend)&&a.invalidateSize()}else this.cleanChart();this.dispDUpd()},setDepths:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b],d=c.wedge,c=c.startAngle;0<=c&&180>c?d.toFront():180<=c&&d.toBack()}},arrangeLabels:function(){var a=this.chartData,b=a.length,c,d;for(d=b-1;0<=d;d--)c=a[d],0!==c.labelQuarter||c.hidden||this.checkOverlapping(d,c,0,!0,0);for(d=0;d<b;d++)c=a[d],1!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,1,!1,0);for(d=b-1;0<=d;d--)c=a[d],2!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,2,!0,0);for(d=0;d<b;d++)c=a[d],3!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,3,!1,0)},checkOverlapping:function(a,b,c,d,g){var f,h,e=this.chartData,k=e.length,n=b.label;if(n){if(!0===d)for(h=a+1;h<k;h++)e[h].labelQuarter==c&&(f=this.checkOverlappingReal(b,e[h],c))&&(h=k);else for(h=a-1;0<=h;h--)e[h].labelQuarter==c&&(f=this.checkOverlappingReal(b,e[h],c))&&(h=0);!0===f&&200>g&&isNaN(b.labelRadius)&&(f=b.ty+3*b.iy,b.ty=f,n.translate(b.textX,f),this.checkOverlapping(a,b,c,d,g+1))}},checkOverlappingReal:function(a,b,c){var d=!1,g=a.label,f=b.label;a.labelQuarter!=c||a.hidden||b.hidden||!f||(g=g.getBBox(),c={},c.width=g.width,c.height=g.height,c.y=a.ty,c.x=a.tx,a=f.getBBox(),f={},f.width=a.width,f.height=a.height,f.y=b.ty,f.x=b.tx,k.hitTest(c,f)&&(d=!0));return d}})})(); 464;;;!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exp
464orts.io=e():t.io=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t,e){"object"===("undefined"==typeof t?"undefined":o(t))&&(e=t,t=void 0),e=e||{};var n,r=i(t),s=r.source,u=r.id,h=r.path,f=p[u]&&h in p[u].nsps,l=e.forceNew||e["force new connection"]||!1===e.multiplex||f;return l?(c("ignoring socket cache for %s",s),n=a(s,e)):(p[u]||(c("new io instance for %s",s),p[u]=a(s,e)),n=p[u]),r.query&&!e.query&&(e.query=r.query),n.socket(r.path,e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(1),s=n(7),a=n(13),c=n(3)("socket.io-client");t.exports=e=r;var p=e.managers={};e.protocol=s.protocol,e.connect=r,e.Manager=n(13),e.Socket=n(39)},function(t,e,n){(function(e){"use strict";function r(t,n){var r=t;n=n||e.location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof n?n.protocol+"//"+t:"https://"+t),i("parse %s",t),r=o(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var s=r.host.indexOf(":")!==-1,a=s?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}var o=n(2),i=n(3)("socket.io-client:url");t.exports=r}).call(e,function(){return this}())},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");o!=-1&&i!=-1&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return o!=-1&&i!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e,n){(function(r){function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function c(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!=typeof r&&"env" in r&&(t=r.env.DEBUG),t}function p(){try{return window.localStorage}catch(t){}}e=t.exports=n(5),e.log=s,e.formatArgs=i,e.save=a,e.load=c,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:p(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(c())}).call(e,n(4))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){y&&l&&(y=!1,l.length?d=l.concat(d):m=-1,d.length&&a())}function a(){if(!y){var t=o(s);y=!0;for(var e=d.length;e;){for(l=d,d=[];++m<e;)l&&l[m].run();m=-1,e=d.length}l=null,y=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function p(){}var u,h,f=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var l,d=[],y=!1,m=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||y||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=p,f.addListener=p,f.once=p,f.off=p,f.removeListener=p,f.removeAllListeners=p,f.emit=p,f.prependListener=p,f.prependOnceListener=p,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){function r(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function o(t){function n(){if(n.enabled){var t=n,r=+new Date,o=r-(p||r);
464t.diff=o,t.prev=p,t.curr=r,p=r;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=e.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var a=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;a++;var o=e.formatters[r];if("function"==typeof o){var s=i[a];n=o.call(t,s),i.splice(a,1),a--}return n}),e.formatArgs.call(t,i);var c=n.log||e.log||console.log.bind(console);c.apply(t,i)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=r(t),"function"==typeof e.init&&e.init(n),n}function i(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&(t=n[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o.debug=o["default"]=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=n(6),e.names=[],e.skips=[],e.formatters={};var p},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"days":case"day":case"d":return n*p;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=p?Math.round(t/p)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,p,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,p=24*c,u=365.25*p;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return n(t);if("number"===i&&isNaN(t)===!1)return e["long"]?o(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(){}function o(t){var n=""+t.type;return e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data&&(n+=JSON.stringify(t.data)),h("encoded %j as %s",t,n),n}function i(t,e){function n(t){var n=d.deconstructPacket(t),r=o(n.packet),i=n.buffers;i.unshift(r),e(i)}d.removeBlobs(t,n)}function s(){this.reconstructor=null}function a(t){var n=0,r={type:Number(t.charAt(0))};if(null==e.types[r.type])return u();if(e.BINARY_EVENT===r.type||e.BINARY_ACK===r.type){for(var o="";"-"!==t.charAt(++n)&&(o+=t.charAt(n),n!=t.length););if(o!=Number(o)||"-"!==t.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"===t.charAt(n+1))for(r.nsp="";++n;){var i=t.charAt(n);if(","===i)break;if(r.nsp+=i,n===t.length)break}else r.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(r.id="";++n;){var i=t.charAt(n);if(null==i||Number(i)!=i){--n;break}if(r.id+=t.charAt(n),n===t.length)break}r.id=Number(r.id)}return t.charAt(++n)&&(r=c(r,t.substr(n))),h("decoded %s as %j",t,r),r}function c(t,e){try{t.data=JSON.parse(e)}catch(n){return u()}return t}function p(t){this.reconPack=t,this.buffers=[]}function u(){return{type:e.ERROR,data:"parser error"}}var h=n(3)("socket.io-parser"),f=n(8),l=n(9),d=n(11),y=n(12);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=s,r.prototype.encode=function(t,n){if(t.type!==e.EVENT&&t.type!==e.ACK||!l(t.data)||(t.type=t.type===e.EVENT?e.BINARY_EVENT:e.BINARY_ACK),h("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)i(t,n);else{var r=o(t);n([r])}},f(s.prototype),s.prototype.add=function(t){var n;if("string"==typeof t)n=a(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.t
464ype?(this.reconstructor=new p(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!y(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,this.emit("decoded",n))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){(function(e){function r(t){if(!t||"object"!=typeof t)return!1;if(o(t)){for(var n=0,i=t.length;n<i;n++)if(r(t[n]))return!0;return!1}if("function"==typeof e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(t)||"function"==typeof e.ArrayBuffer&&t instanceof ArrayBuffer||s&&t instanceof Blob||a&&t instanceof File)return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return r(t.toJSON(),!0);for(var c in t)if(Object.prototype.hasOwnProperty.call(t,c)&&r(t[c]))return!0;return!1}var o=n(10),i=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===i.call(e.Blob),a="function"==typeof e.File||"[object FileConstructor]"===i.call(e.File);t.exports=r}).call(e,function(){return this}())},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function r(t,e){if(!t)return t;if(s(t)){var n={_placeholder:!0,num:e.length};return e.push(t),n}if(i(t)){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=r(t[a],e);return o}if("object"==typeof t&&!(t instanceof Date)){var o={};for(var c in t)o[c]=r(t[c],e);return o}return t}function o(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(i(t))for(var n=0;n<t.length;n++)t[n]=o(t[n],e);else if("object"==typeof t)for(var r in t)t[r]=o(t[r],e);return t}var i=n(10),s=n(12),a=Object.prototype.toString,c="function"==typeof t.Blob||"[object BlobConstructor]"===a.call(t.Blob),p="function"==typeof t.File||"[object FileConstructor]"===a.call(t.File);e.deconstructPacket=function(t){var e=[],n=t.data,o=t;return o.data=r(n,e),o.attachments=e.length,{packet:o,buffers:e}},e.reconstructPacket=function(t,e){return t.data=o(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){function n(t,a,u){if(!t)return t;if(c&&t instanceof Blob||p&&t instanceof File){r++;var h=new FileReader;h.onload=function(){u?u[a]=this.result:o=this.result,--r||e(o)},h.readAsArrayBuffer(t)}else if(i(t))for(var f=0;f<t.length;f++)n(t[f],f,t);else if("object"==typeof t&&!s(t))for(var l in t)n(t[l],l,t)}var r=0,o=t;n(o),r||e(o)}}).call(e,function(){return this}())},function(t,e){(function(e){function n(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=n}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t,e){if(!(this instanceof r))return new r(t,e);t&&"object"===("undefined"==typeof t?"undefined":o(t))&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||c;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=e.autoConnect!==!1,this.autoConnect&&this.open()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(14),s=n(39),a=n(8),c=n(7),p=n(41),u=n(42),h=n(3)("socket.io-client:manager"),f=n(37),l=n(43),d=Object.prototype.hasOwnProperty;t.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)d.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},r.prototype.updateSocketIds=function(){for(var t in this.nsps)d.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},r.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},a(r.prototype),r.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},r.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},r.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(t,e){if(h("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=i(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var o=p(n,"open",function(){r.onopen(),t&&t()}),s=p(n,"error",function(e){if(h("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;h("connect attempt will timeout after %d",a);
464var c=setTimeout(function(){h("connect attempt timed out after %d",a),o.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(s),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(p(t,"data",u(this,"ondata"))),this.subs.push(p(t,"ping",u(this,"onping"))),this.subs.push(p(t,"pong",u(this,"onpong"))),this.subs.push(p(t,"error",u(this,"onerror"))),this.subs.push(p(t,"close",u(this,"onclose"))),this.subs.push(p(this.decoder,"decoded",u(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(t){this.decoder.add(t)},r.prototype.ondecoded=function(t){this.emit("packet",t)},r.prototype.onerror=function(t){h("error",t),this.emitAll("error",t)},r.prototype.socket=function(t,e){function n(){~f(o.connecting,r)||o.connecting.push(r)}var r=this.nsps[t];if(!r){r=new s(this,t,e),this.nsps[t]=r;var o=this;r.on("connecting",n),r.on("connect",function(){r.id=o.generateId(t)}),this.autoConnect&&n()}return r},r.prototype.destroy=function(t){var e=f(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},r.prototype.packet=function(t){h("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},r.prototype.cleanup=function(){h("cleanup");for(var t=this.subs.length,e=0;e<t;e++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){h("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(t){h("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();h("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(h("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(h("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(h("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){t.exports=n(15)},function(t,e,n){t.exports=n(16),t.exports.parser=n(23)},function(t,e,n){(function(e){function r(t,n){if(!(this instanceof r))return new r(t,n);n=n||{},t&&"object"==typeof t&&(n=t,t=null),t?(t=u(t),n.hostname=t.host,n.secure="https"===t.protocol||"wss"===t.protocol,n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=u(n.host).host),this.secure=null!=n.secure?n.secure:e.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(e.location?location.hostname:"localhost"),this.port=n.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.
464ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var o="object"==typeof e&&e;o.global===o&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=n(17),s=n(8),a=n(3)("engine.io-client:socket"),c=n(37),p=n(23),u=n(2),h=n(38),f=n(31);t.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=p.protocol,r.Socket=r,r.Transport=n(22),r.transports=n(17),r.parser=n(23),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=p.protocol,e.transport=t;var n=this.transportOptions[t]||{};this.id&&(e.sid=this.id);var r=new i[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNo
464de||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0});return r},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(f.onlyBinaryUpgrades){var e=!this.supportsBinary&&f.transport.supportsBinary;h=h||e}h||(a('probe transport "%s" opened',t),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(e){if(!h)if("pong"===e.type&&"probe"===e.data){if(a('probe transport "%s" pong',t),f.upgrading=!0,f.emit("upgrading",u),!u)return;r.priorWebsocketSuccess="websocket"===u.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){h||"closed"!==f.readyState&&(a("changing transport and sending upgrade packet"),p(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){h||(h=!0,p(),u.close(),u=null)}function o(e){var r=new Error("probe error: "+e);r.transport=u.name,n(),a('probe transport "%s" failed because of error: %s',t,e),f.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){u&&t.name!==u.name&&(a('"%s" works - aborting "%s"',t.name,u.name),n())}function p(){u.removeListener("open",e),u.removeListener("error",o),u.removeListener("close",i),f.removeListener("close",s
464),f.removeListener("upgrading",c)}a('probing transport "%s"',t);var u=this.createTransport(t,{probe:1}),h=!1,f=this;r.priorWebsocketSuccess=!1,u.once("open",e),u.once("error",o),u.once("close",i),this.once("close",s),this.once("upgrading",c),u.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(h(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},r.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function t(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function e(){r.removeListener("upgrade",e),r.removeListener("upgradeError",e),t()}function n(){r.once("upgrade",e),r.once("upgradeError",e)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}return this},r.prototype.onError=function(t){a("socket error %j",t),r.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},r.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}}).call(e,function(){return this}())},function(t,e,n){(function(t){function r(e){var n,r=!1,a=!1,c=!1!==e.jsonp;if(t.location){var p="https:"===location.protocol,u=location.port;
464u||(u=p?443:80),r=e.hostname!==location.hostname||u!==e.port,a=e.secure!==p}if(e.xdomain=r,e.xscheme=a,n=new o(e),"open" in n&&!e.forceJSONP)return new i(e);if(!c)throw new Error("JSONP disabled");return new s(e)}var o=n(18),i=n(20),s=n(34),a=n(35);e.polling=r,e.websocket=a}).call(e,function(){return this}())},function(t,e,n){(function(e){var r=n(19);t.exports=function(t){var n=t.xdomain,o=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(s){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(s){}if(!n)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}}).call(e,function(){return this}())},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials" in new XMLHttpRequest}catch(n){t.exports=!1}},function(t,e,n){(function(e){function r(){}function o(t){if(c.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==n}}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=n(18),c=n(21),p=n(8),u=n(32),h=n(3)("engine.io-client:polling-xhr");t.exports=o,t.exports.Request=i,u(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new i(t)},o.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},o.prototype.doPoll=function(){h("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},p(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new a(t),r=this;try{h("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.extraHeaders[o])}}catch(s){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{n.setRequestHeader("Accept","*/*")}catch(s){}"withCredentials" in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState){var t;try{t=n.getResponseHeader("Content-Type")}catch(e){}"application/octet-stream"===t&&(n.responseType="arraybuffer")}4===n.readyState&&(200===n.status||1223===n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},h("xhr data %s",this.data),n.send(this.data)}catch(s){return void setTimeout(function(){r.onError(s)},0)}e.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}
464,i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,t)try{this.xhr.abort()}catch(n){}e.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(n){}t="application/octet-stream"===e?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof e.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},i.requestsCount=0,i.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",s):e.addEventListener&&e.addEventListener("beforeunload",s,!1))}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),o.call(this,t)}var o=n(22),i=n(31),s=n(23),a=n(32),c=n(33),p=n(3)("engine.io-client:polling");t.exports=r;var u=function(){var t=n(18),e=new t({xdomain:!1});return null!=e.responseType}();a(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(t){function e(){p("paused"),n.readyState="paused",t()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(p("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){p("pre-pause polling complete"),--r||e()})),this.writable||(p("we are currently writing - waiting to pause"),r++,this.once("drain",function(){p("pre-pause writing complete"),--r||e()}))}else e()},r.prototype.poll=function(){p("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(t){var e=this;p("polling got data %s",t);var n=function(t,n,r){return"opening"===e.readyState&&e.onOpen(),"close"===t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,n),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():p('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){p("writing close packet"),e.write([{type:"close"}])}var e=this;"open"===this.readyState?(p("transport open - closing"),t()):(p("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){function r(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}var o=n(23),i=n(8);t.exports=r,i(r.prototype),r.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit
464("open")},r.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},r.prototype.onPacket=function(t){this.emit("packet",t)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){(function(t){function r(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}function o(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=v[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}function i(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){t.data=o.result,e.encodePacket(t,n,!0,r)},o.readAsArrayBuffer(t.data)}function s(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(g)return i(t,n,r);var o=new Uint8Array(1);o[0]=v[t.type];var s=new k([o.buffer,t.data]);return r(s)}function a(t){try{t=d.decode(t,{strict:!1})}catch(e){return!1}return t}function c(t,e,n){for(var r=new Array(t.length),o=l(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}var p,u=n(24),h=n(9),f=n(25),l=n(26),d=n(27);t&&t.ArrayBuffer&&(p=n(29));var y="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),m="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),g=y||m;e.protocol=3;var v=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=u(v),w={type:"error",data:"parser error"},k=n(30);e.encodePacket=function(e,n,i,a){"function"==typeof n&&(a=n,n=!1),"function"==typeof i&&(a=i,i=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return o(e,n,a);if(k&&c instanceof t.Blob)return s(e,n,a);if(c&&c.base64)return r(e,a);var p=v[e.type];return void 0!==e.data&&(p+=i?d.encode(String(e.data),{strict:!1}):String(e.data)),a(""+p)},e.encodeBase64Packet=function(n,r){var o="b"+e.packets[n.type];if(k&&n.data instanceof t.Blob){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];r(o+t)},i.readAsDataURL(n.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(a){for(var c=new Uint8Array(n.data),p=new Array(c.length),u=0;u<c.length;u++)p[u]=c[u];s=String.fromCharCode.apply(null,p)}return o+=t.btoa(s),r(o)},e.decodePacket=function(t,n,r){if(void 0===t)return w;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&(t=a(t),t===!1))return w;var o=t.charAt(0);return Number(o)==o&&b[o]?t.length>1?{type:b[o],data:t.substring(1)}:{type:b[o]}:w}var i=new Uint8Array(t),o=i[0],s=f(t,1);return k&&"blob"===n&&(s=new k([s])),{type:b[o],data:s}},e.decodeBase64Packet=function(t,e){var n=b[t.charAt(0)];if(!p)return{type:n,data:{base64:!0,data:t.substr(1)}};var r=p.decode(t.substr(1));return"blob"===e&&k&&(r=new k([r])),{type:n,data:r}},e.encodePayload=function(t,n,r){function o(t){return t.length+":"+t}function i(t,r){e.encodePacket(t,!!s&&n,!1,function(t){r(null,o(t))})}"function"==typeof n&&(r=n,n=null);var s=h(t);return n&&s?k&&!g?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void c(t,i,function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""===t)return r(w,0,1);for(var i,s,a="",c=0,p=t.length;c<p;c++){var u=t.charAt(c);if(":"===u){if(""===a||a!=(i=Number(a)))return r(w,0,1);if(s=t.substr(c+1,i),a!=s.length)return r(w,0,1);if(s.length){if(o=e.decodePacket(s,n,!1),w.type===o.type&&w.data===o.data)return r(w,0,1);var h=r(o,c+i,p);if(!1===h)return}c+=i,a=""}else a+=u}return""!==a?r(w,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})}return t.length?void c(t,r,function(t,e){var r=e.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}e?o[i++]=0:o[i++]=1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;
464for(var r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),n(o.buffer)}):n(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,k){var c=new k([e.buffer,a.buffer,t]);n(null,c)}})}c(t,r,function(t,e){return n(new k(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var s=new Uint8Array(o),a=0===s[0],c="",p=1;255!==s[p];p++){if(c.length>310)return r(w,0,1);c+=s[p]}o=f(o,2+c.length),c=parseInt(c);var u=f(o,0,c);if(a)try{u=String.fromCharCode.apply(null,new Uint8Array(u))}catch(h){var l=new Uint8Array(u);u="";for(var p=0;p<l.length;p++)u+=String.fromCharCode(l[p])}i.push(u),o=f(o,c)}var d=i.length;i.forEach(function(t,o){r(e.decodePacket(t,n,!0),o,d)})}}).call(e,function(){return this}())},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function n(t,e,n){function o(t,r){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(i=!0,e(t),e=n):0!==o.count||i||e(null,r)}var i=!1;return n=n||r,o.count=t,0===t?e():o}function r(){}t.exports=n},function(t,e,n){var r;(function(t,o){!function(i){function s(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function a(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],e>65535&&(e-=65536,o+=w(e>>>10&1023|55296),e=56320|1023&e),o+=w(e);return o}function c(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function p(t,e){return w(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return w(t);var n="";return 0==(4294965248&t)?n=w(t>>6&31|192):0==(4294901760&t)?(c(t,e)||(t=65533),n=w(t>>12&15|224),n+=p(t,6)):0==(4292870144&t)&&(n=w(t>>18&7|240),n+=p(t,12),n+=p(t,6)),n+=w(63&t|128)}function h(t,e){e=e||{};for(var n,r=!1!==e.strict,o=s(t),i=o.length,a=-1,c="";++a<i;)n=o[a],c+=u(n,r);return c}function f(){if(b>=v)throw Error("Invalid byte index");var t=255&g[b];if(b++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(t){var e,n,r,o,i;if(b>v)throw Error("Invalid byte index");if(b==v)return!1;if(e=255&g[b],b++,0==(128&e))return e;if(192==(224&e)){if(n=f(),i=(31&e)<<6|n,i>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if(n=f(),r=f(),i=(15&e)<<12|n<<6|r,i>=2048)return c(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=f(),r=f(),o=f(),i=(7&e)<<18|n<<12|r<<6|o,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}function d(t,e){e=e||{};var n=!1!==e.strict;g=s(t),v=g.length,b=0;for(var r,o=[];(r=l(n))!==!1;)o.push(r);return a(o)}var y="object"==typeof e&&e,m=("object"==typeof t&&t&&t.exports==y&&t,"object"==typeof o&&o);m.global!==m&&m.window!==m||(i=m);var g,v,b,w=String.fromCharCode,k={version:"2.1.2",encode:h,decode:d};r=function(){return k}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(28)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;
464e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,r,o,i,s,a=.75*t.length,c=t.length,p=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),h=new Uint8Array(u);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],s=n[t.charCodeAt(e+3)],h[p++]=r<<2|o>>4,h[p++]=(15&o)<<4|i>>2,h[p++]=(3&i)<<6|63&s;return u}}()},function(t,e){(function(e){function n(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}t[e]=r}}}function r(t,e){e=e||{};var r=new i;n(t);for(var o=0;o<t.length;o++)r.append(t[o]);return e.type?r.getBlob(e.type):r.getBlob()}function o(t,e){return n(t),new Blob(t,e||{})}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(e){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return s?a?e.Blob:o:c?r:void 0}()}).call(e,function(){return this}())},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){"use strict";function n(t){var e="";do e=s[t%a]+e,t=Math.floor(t/a);while(t>0);return e}function r(t){var e=0;for(u=0;u<t.length;u++)e=e*a+c[t.charAt(u)];return e}function o(){var t=n(+new Date);return t!==i?(p=0,i=t):t+"."+n(p++)}for(var i,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,c={},p=0,u=0;u<a;u++)c[s[u]]=u;o.encode=n,o.decode=r,t.exports=o},function(t,e,n){(function(e){function r(){}function o(t){i.call(this,t),this.query=this.query||{},a||(e.___eio||(e.___eio=[]),a=e.___eio),this.index=a.length;var n=this;a.push(function(t){n.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(21),s=n(32);t.exports=o;var a,c=/\n/g,p=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(e)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=u,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),t=t.replace(p,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(h){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(t,e,n){(function(e){function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=h&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=o),i.call(this,t)}var o,i=n(22),s=n(23),a=n(31),c=n(32),p=n(33),u=n(3)("engine.io-client:websocket"),h=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{o=n(36)}catch(f){}var l=h;l||"undefined"!=typeof window||(l=o),t.exports=r,c(r,i),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new l(t,e):new l(t):new l(t,e,n)}
464catch(r){return this.emit("error",r)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},r.prototype.write=function(t){function n(){r.emit("flush"),setTimeout(function(){r.writable=!0,r.emit("drain")},0)}var r=this;this.writable=!1;for(var o=t.length,i=0,a=o;i<a;i++)!function(t){s.encodePacket(t,r.supportsBinary,function(i){if(!r.usingBrowserWebSocket){var s={};if(t.options&&(s.compress=t.options.compress),r.perMessageDeflate){var a="string"==typeof i?e.Buffer.byteLength(i):i.length;a<r.perMessageDeflate.threshold&&(s.compress=!1)}}try{r.usingBrowserWebSocket?r.ws.send(i):r.ws.send(i,s)}catch(c){u("websocket closed before onclose event")}--o||n()})}(t[i])},r.prototype.onClose=function(){i.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=p()),this.supportsBinary||(t.b64=1),t=a.encode(t),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t},r.prototype.check=function(){return!(!l||"__initialize" in l&&this.name===r.prototype.name)}
464}).call(e,function(){return this}())},function(t,e){},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e){(function(e){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(s,"").replace(a,""),e.JSON&&JSON.parse?JSON.parse(t):n.test(t.replace(r,"@").replace(o,"]").replace(i,""))?new Function("return "+t)():void 0):null}}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(7),s=n(8),a=n(40),c=n(41),p=n(42),u=n(3)("socket.io-client:socket"),h=n(31);t.exports=e=r;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},l=s.prototype.emit;s(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[c(t,"open",p(this,"onopen")),c(t,"packet",p(this,"onpacket")),c(t,"close",p(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var t=a(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(f.hasOwnProperty(t))return l.apply(this,arguments),this;var e=a(arguments),n={type:i.EVENT,data:e};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"===o(this.query)?h.encode(this.query):this.query;u("sending connect packet with query %s",t),this.packet({type:i.CONNECT,query:t})}else this.packet({type:i.CONNECT})},r.prototype.onclose=function(t){u("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case i.CONNECT:this.onconnect();break;case i.EVENT:this.onevent(t);break;case i.BINARY_EVENT:this.onevent(t);break;case i.ACK:this.onack(t);break;case i.BINARY_ACK:this.onack(t);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];u("emitting event %j",e),null!=t.id&&(u("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?l.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);u("sending ack %j",r),e.packet({type:i.ACK,id:t,data:r})}}},r.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(u("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):u("bad ack %s",t.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)l.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:i.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(t){return this.flags=this.flags||{},this.flags.compress=t,this}},function(t,e){function n(t,e){var n=[];e=e||0;for(var r=e||0;r<t.length;r++)n[r-e]=t[r];return n}t.exports=n},function(t,e){"use strict";function n(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}t.exports=n},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}}])}); 465;;;!function(e,n){var o=e();e.fn.dropdownHover=function(t){return"ontouchstart" in document?this:(o=o.add(this.parent()),this.each(function(){function r(){n.clearTimeout(a),n.clearTimeout(i),i=n.setTimeout(function(){o.find(":focus").blur(),f.instantlyCloseOthers===!0&&o.removeClass("open"),n.clearTimeout(i),d.attr("aria-expanded","true"),s.addClass("open"),d.trigger(l)},f.hoverDelay)}var a,i,d=e(this),s=d.parent(),u={delay:500,hoverDelay:0,instantlyCloseOthers:!0},h={delay:e(this).data("delay"),hoverDelay:e(this).data("hover-delay"),instantlyCloseOthers:e(this).data("close-others")},l="show.bs.dropdown",c="hide.bs.dropdown",f=e.extend(!0,{},u,t,h);s.hover(function(e){return s.hasClass("open")||d.is(e.target)?void r(e):!0},function(){n.clearTimeout(i),a=n.setTimeout(function(){d.attr("aria-expanded","fal
465se"),s.removeClass("open"),d.trigger(c)},f.delay)}),d.hover(function(e){return s.hasClass("open")||s.is(e.target)?void r(e):!0}),s.find(".dropdown-submenu").each(function(){var o,t=e(this);t.hover(function(){n.clearTimeout(o),t.children(".dropdown-menu").show(),t.siblings().children(".dropdown-menu").hide()},function(){var e=t.children(".dropdown-menu");o=n.setTimeout(function(){e.hide()},f.delay)})})}))},e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window); 466;;;var CCC=CCC||{};CCC.STATIC=CCC.STATIC||{};CCC.STATIC.BASEIMAGEPATH="https://images.cryptocompare.com/" 467CCC.STATIC.TYPE={'TRADE':'0','NEWS':'1','CURRENT':'2','LOADCOMPLETE':'3','COINPAIRS':'4','CURRENTAGG':'5','TOPLIST':'6','TOPLISTCHANGE':'7','ORDERBOOK':'8','ORDERBOOKSNASPHOT':'9','ACTIVATION':'10','FULLVOLUME':'11','REMOVEEXCHANGE':'12','UNMAPPEDTRADE':'14','TOTALVALUE':'15','SUBSCRIBECOMPLETE':'16','UNSUBSCRIBECOMPLETE':'17','UNSUBSCRIBEALLCOMPLETE':'18','FORCEDUNSUBSCRIBE':'19','TOPTIERFULLVOLUME':'21','HISTO':'24','TOPOFORDERBOOK':'30','TOPOFORDERBOOKNOVALUE':'31','TRADECATCHUP':'100','NEWSCATCHUP':'101','FORUM':'102','NOTIFICATION':'103','UNMAPPEDTRADECATCHUP':'114','TRADECATCHUPCOMPLETE':'300','NEWSCATCHUPCOMPLETE':'301','UNMAPPEDTRADECATCHUPCOMPLETE':'314','UNAUTHORIZED':'401','RATELIMIT':'429','NOTFOUND':'404','ERROR':'500','HEARTBEAT':'999'};CCC.STATIC.CURRENCY=CCC.STATIC.CURRENCY||{};CCC.STATIC.CURRENCY.SYMBOL={'BTC':'É','WBTC':'wÉ','LTC':'Å','DAO':'Ã','USD':'$','CNY':'Â¥','EUR':'â¬','GBP':'£','JPY':'Â¥','PLN':'zÅ','RUB':'â½','ETH':'Î','WETH':'wÎ','GOLD':'Gold g','INR':'â¹','BRL':'R$','KRW':'â©','RUR':'â½','USDT':'â®'};CCC.STATIC.CURRENCY.getSymbol=function(symbol){if(CCC.STATIC.CURRENCY.SYMBOL[symbol]!==undefined){return CCC.STATIC.CURRENCY.SYMBOL[symbol];} 468return symbol;};CCC.STATIC.UTIL={chartColors:{Green:{Title:"Green",Hex:"#5cb85c"},LightGrey:{Title:"Grey",Hex:"#D7D7D7"},Red:{Title:"Red",Hex:"#A11B0A"},Blue:{Title:"Blue",Hex:"#0A1623"},Black:{Title:"Black",Hex:"#000000"},Orange:{Title:"Orange",Hex:"#F89017"},BrightGreen:{Title:"Bright Green",Hex:"#00D665"},DarkGreen:{Title:"Dark Green",Hex:"#398439"},LighRed:{Title:"Light Red",Hex:"#D44E3D"},DarkBlue:{Title:"Dark Blue",Hex:"#002387"},Yellow:{Title:"Yellow",Hex:"#FFF700"},White:{Title:"White",Hex:"#FFFFFF"}}
468,exchangeNameMapping:{'CCCAGG':'CryptoCompare Index','BTCChina':'BTCC','GDAX':'Coinbase','SafeCoin':'SafeTrade','trxmarket':'Poloni DEX'},isMobile:function(userAgent){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0,4))) 469return true;return false;},convertToMB:function(bytes){return(parseInt(bytes,10)/1024/1024).toFixed(2)+' MB';},getNameForExchange:function(exchangeName){if(this.exchangeNameMapping.hasOwnProperty(exchangeName)){return this.exchangeNameMapping[exchangeName];} 470return exchangeName;},noExponents:function(value){var data=String(value).split(/[eE]/);if(data.length==1)return data[0];var z='',sign=value<0?'-':'',str=data[0].replace('.',''),mag=Number(data[1])+1;if(mag<0){z=sign+'0.';while(mag++)z+='0';return z+str.replace(/^\-/,'');} 471mag-=str.length;while(mag--)z+='0';return str+z;},reduceFloatVal:function(value){value=parseFloat(value);var absValue=Math.abs(value);if(absValue>10){value=Math.round(value*100)/100;return value;} 472if(absValue>=0.00001000){return parseFloat(value.toPrecision(4));} 473if(absValue>=0.00000100){return parseFloat(value.toPrecision(3));} 474if(absValue>=0.00000010){return parseFloat(value.toPrecision(2));} 475return parseFloat(value.toPrecision(1));},reduceReal:function(value){value=parseFloat(value);return parseFloat(value.toFixed(8));},convertCurrentKeyToAll:function(key){var valuesArray=key.split("~");valuesArray[0]=CCC.STATIC.TYPE.CURRENTAGG;valuesArray[1]='CCCAGG';return valuesArray.join('~');},convertCurrentKeyToTrade:function(key){var valuesArray=key.split("~");valuesArray[0]=CCC.STATIC.TYPE.TRADE;return valuesArray.join('~');},convertValueToDisplay:function(symbol,value,filterNumberFunctionAngularJS,type,fullNumbers){var prefix='';var valueSign=1;value=parseFloat(value);var valueAbs=Math.abs(value);var decimalsOnBigNumbers=2;var decimalsOnNormalNumbers=2;var decimalsOnSmallNumbers=4;if(fullNumbers===true){decimalsOnBigNumbers=2;decimalsOnNormalNumbers=0;decimalsOnSmallNumbers=4;} 476if(type=="8decimals"){decimalsOnBigNumbers=4;decimalsOnNormalNumbers=8;decimalsOnSmallNumbers=8;if(value<0.0001&&value>=0.00001){decimalsOnSmallNumbers=4;} 477if(value<0.001&&value>=0.0001){decimalsOnSmallNumbers=5;} 478if(value<0.01&&value>=0.001){decimalsOnSmallNumbers=6;} 479if(value<0.1&&value>=0.01){decimalsOnSmallNumbers=7;}} 480if(symbol!=''){prefix=symbol+' ';} 481if(value<0){valueSign=-1;} 482if(value==0){return prefix+'0';} 483if(value<0.00001000&&value>=0.00000100&&decimalsOnSmallNumbers>3){decimalsOnSmallNumbers=3;} 484if(value<0.00000100&&value>=0.00000010&&decimalsOnSmallNumbers>2){decimalsOnSmallNumbers=2;} 485if(value<0.00000010&&decimalsOnSmallNumbers>1){decimalsOnSmallNumbers=1;} 486if(type=="short"||type=="8decimals"){if(valueAbs>1000000000){valueAbs=valueAbs/1000000000;return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnBigNumbers)+' B';} 487if(valueAbs>1000000){valueAbs=valueAbs/1000000;return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnBigNumbers)+' M';} 488if(valueAbs>10000){valueAbs=valueAbs/1000;return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnBigNumbers)+' k';} 489if(type=="8decimals"&&valueAbs>=100){return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnBigNumbers);} 490if(valueAbs>=1){return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnNormalNumbers);} 491return prefix+(valueSign*valueAbs).toPrecision(decimalsOnSmallNumbers);}else{if(valueAbs>1000000000){valueAbs=valueAbs/1000000000;return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnSmallNumbers)+' B';} 492if(valueAbs>1000000){valueAbs=valueAbs/1000000;return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnSmallNumbers)+' M';} 493if(valueAbs>=10){return prefix+filterNumberFunctionAngularJS(valueSign*valueAbs,decimalsOnNormalNumbers);} 494return prefix+this.noExponents((valueSign*valueAbs).toPrecision(decimalsOnSmallNumbers));}}};CCC.TRADE=CCC.TRADE||{};CCC.TRADE.FLAGS={'SELL':0x1,'BUY':0x2,'UNKNOWN':0x4} 495CCC.TRADE.FIELDS={'T':0x0,'M':0x0,'FSYM':0x0,'TSYM':0x0,'F':0x0,'ID':0x1,'TS':0x2,'Q':0x4,'P':0x8,'TOTAL':0x10};CCC.TRADE.DISPLAY=CCC.TRADE.DISPLAY||{};CCC.TRADE.DISPLAY.FIELDS={'T':{"Show":false},'M':{"Show":true,'Filter':'Market'},'FSYM':{"Show":true,'Filter':'CurrencySymbol'},'TSYM':{"Show":true,'Filter':'CurrencySymbol'},'F':{"Show":true,'Filter':'TradeFlag'},'ID':{"Show":true,'Filter':'Text'},'TS':{'Show':true,'Filter':'Date','Format':'yyyy MMMM dd HH:mm:ss'},'Q':{'Show':true,'Filter':'Number','Symbol':'FSYM'},'P':{'Show':true,'Filter':'Number','Symbol':'TSYM'},'TOTAL':{'Show':true,'Filter':'Number','Symbol':'TSYM'}};CCC.TRADE.pack=function(tradeObject){var mask=0;var packedTrade='';for(var field in tradeObject){packedTrade+='~'+tradeObject[field];mask|=this.FIELDS[field];} 496return packedTrade.substr(1)+'~'+mask.toString(16);};CCC.TRADE.unpack=function(tradeString){var valuesArray=tradeString.split("~");var valuesArrayLenght=valuesArray.length;var mask=valuesArray[valuesArrayLenght-1];var maskInt=parseInt(mask,16);var unpackedTrade={};var currentField=0;for(var property in this.FIELDS){if(this.FIELDS[property]===0) 497{unpackedTrade[property]=valuesArray[currentField];currentField++;} 498else if(maskInt&this.FIELDS[property]) 499{unpackedTrade[property]=valuesArray[currentField];currentField++;}} 500return unpackedTrade;} 501CCC.TRADE.getKey=function(tradeObject){return tradeObject['T']+'~'+tradeObject['M']+'~'+tradeObject['FSYM']+'~'+tradeObject['TSYM'];};CCC.CURRENT=CCC.CURRENT||{};CCC.CURRENT.FLAGS={'PRICEUP':0x1,'PRICEDOWN':0x2,'PRICEUNCHANGED':0x4,'BIDUP':0x8,'BIDDOWN':0x10,'BIDUNCHANGED':0x20,'OFFERUP':0x40,'OFFERDOWN':0x80,'OFFERUNCHANGED':0x100,'MEDIANUP':0x200,'MEDIANDOWN':0x400,'MEDIANUNCHANGED':0x800};CCC.CURRENT.FIELDS={'TYPE':0x0,'MARKET':0x0,'FROMSYMBOL':0x0,'TOSYMBOL':0x0,'FLAGS':0x0,'PRICE':0x1,'BID':0x2,'OFFER':0x4,'LASTUPDATE':0x8,'MEDIAN':0x10,'LASTVOLUME':0x20,'LASTVOLUMETO':0x40,'LASTTRADEID':0x80,'VOLUMEDAY':0x100,'VOLUMEDAYTO':0x200,'VOLUME24HOUR':0x400,'VOLUME24HOURTO':0x800,'OPENDAY':0x1000,'HIGHDAY':0x2000,'LOWDAY':0x4000,'OPEN24HOUR':0x8000,'HIGH24HOUR':0x10000,'LOW24HOUR':0x20000,'LASTMARKET':0x40000,'VOLUMEHOUR':0x80000,'VOLUMEHOURTO':0x100000,'OPENHOUR':0x200000,'HIGHHOUR':0x400000,'LOWHOUR':0x800000};CCC.CURRENT.FIELDSOPERATION={'TYPE':{'Multiply':{'Op':'obj1','Field':'TYPE'},'Divide':{'Op':'obj1','Field':'TYPE'},'Invert':{'Op':'obj1','Field':'TYPE'}},'MARKET':{'Multiply':{'Op':'obj1','Field':'MARKET'},'Divide':{'Op':'obj1','Field':'MARKET'},'Invert':{'Op':'obj1','Field':'MARKET'}},'FROMSYMBOL':{'Multiply':{'Op':'obj1','Field':'FROMSYMBOL'},'Divide':{'Op':'obj1','Field':'FROMSYMBOL'},'Invert':{'Op':'obj1','Field':'TOSYMBOL'}},'TOSYMBOL':{'Multiply':{'Op':'obj2','Field':'TOSYMBOL'},'Divide':{'Op':'obj2','Field':'FROMSYMBOL'},'Invert':{'Op':'obj1','Field':'FROMSYMBOL'}},'FLAGS':{'Multiply':{'Op':'obj1','Field':'FLAGS'},'Divide':{'Op':'obj1','Field':'FLAGS'},'Invert':{'Op':'obj1','Field':'FLAGS'}},'PRICE':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'PRICE'}},'BID':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'BID'}},'OFFER':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'OFFER'}},'LASTUPDATE':{'Multiply':{'Op':'obj2','Field':'LASTUPDATE'},'Divide':{'Op':'obj1','Field':'LASTUPDATE'},'Invert':{'Op':'obj1','Field':'LASTUPDATE'}},'MEDIAN':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'MEDIAN'}},'LASTVOLUME':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'LASTVOLUMETO':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'LASTTRADEID':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'VOLUMEDAY':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'VOLUMEDAYTO':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'VOLUME24HOUR':{'Multiply':{'Op':'Volume24H'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'obj1','Field':'VOLUME24HOURTO'}},'VOLUME24HOURTO':{'Multiply':{'Op':'Volume24HTo'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'obj1','Field':'VOLUME24HOUR'}},'OPENDAY':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'OPENDAY'}},'HIGHDAY':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'LOWDAY'},'Invert':{'Op':'invert','Field':'LOWDAY'}},'LOWDAY':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'HIGHDAY'},'Invert':{'Op':'invert','Field':'HIGHDAY'}},'OPEN24HOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'OPEN24HOUR'}},'HIGH24HOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'LOW24HOUR'},'Invert':{'Op':'invert','Field':'LOW24HOUR'}},'LOW24HOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'HIGH24HOUR'},'Invert':{'Op':'invert','Field':'HIGH24HOUR'}},'LASTMARKET':{'Multiply':{'Op':'obj1','Field':'LASTMARKET'},'Divide':{'Op':'obj1','Field':'LASTMARKET'},'Invert':{'Op':'obj1','Field':'LASTMARKET'}},'VOLUMEHOUR':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'VOLUMEHOURTO':{'Multiply':{'Op':'NotAplicable'},'Divide':{'Op':'NotAplicable'},'Invert':{'Op':'NotAplicable'}},'OPENHOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide'},'Invert':{'Op':'invert','Field':'OPENHOUR'}},'HIGHHOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'LOWHOUR'},'Invert':{'Op':'invert','Field':'HIGHHOUR'}},'LOWHOUR':{'Multiply':{'Op':'multiply'},'Divide':{'Op':'divide','Field':'HIGHHOUR'},'Invert':{'Op':'invert','Field':'LOWHOUR'}}};CCC.CURRENT.DISPLAY=CCC.CURRENT.DISPLAY||{};CCC.CURRENT.DISPLAY.FLAGSLINK={'PRICEUP':['PRICEDOWN','PRICEUNCHANGED'],'PRICEDOWN':['PRICEUP','PRICEUNCHANGED'],'PRICEUNCHANGED':['PRICEUP','PRICEDOWN'],'BIDUP':['BIDDOWN','BIDUNCHANGED'],'BIDDOWN':['BIDUP','BIDUNCHANGED'],'BIDUNCHANGED':['BIDUP','BIDDOWN'],'OFFERUP':['OFFERDOWN','OFFERUNCHANGED'],'OFFERDOWN':['OFFERUP','OFFERUNCHANGED'],'OFFERUNCHANGED':['OFFERUP','OFFERDOWN'],'MEDIANUP':['MEDIANDOWN','MEDIANUNCHANGED'],'MEDIANDOWN':['MEDIANUP','MEDIANUNCHANGED'],'MEDIANUNCHANGED':['MEDIANUP','MEDIANDOWN']};CCC.CURRENT.DISPLAY.FIELDS={'TYPE':{'Show':false,'Default':'5'},'MARKET':{'Show':true,'Filter':'Market','Default':'N/A'},'FROMSYMBOL':{'Show':false,'Default':'BTC'},'TOSYMBOL':{'Show':false,'Default':'BTC'},'FLAGS':{'Show':false,'Default':0},'PRICE':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'BID':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'OFFER':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'LASTUPDATE':{'Show':true,'Filter':'Date','Format':'yyyy MMMM dd HH:mm:ss','Default':Math.floor((new Date()).getTime()/1000)},'MEDIAN':{'Show':true,' Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'LASTVOLUME':{'Show':true,'Filter':'Number','Symbol':'FROMSYMBOL','Default':0,'SortNumberAsWell':false},'LASTVOLUMETO':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':0,'SortNumberAsWell':false}
501,'LASTTRADEID':{'Show':true,'Filter':'String','Default':0},'VOLUMEDAY':{'Show':true,'Filter':'Number','Symbol':'FROMSYMBOL','Default':0,'SortNumberAsWell':false},'VOLUMEDAYTO':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':0,'SortNumberAsWell':false},'VOLUME24HOUR':{'Show':true,'Filter':'Number','Symbol':'FROMSYMBOL','Default':0,'SortNumberAsWell':true},'VOLUME24HOURTO':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':0,'SortNumberAsWell':true},'OPENDAY':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'HIGHDAY':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'LOWDAY':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'OPEN24HOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'HIGH24HOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'LOW24HOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL','Default':1,'SortNumberAsWell':false},'LASTMARKET':{'Show':true,'Filter':'String','Default':'N/A'},'VOLUMEHOUR':{'Show':true,'Filter':'Number','Symbol':'FROMSYMBOL'},'VOLUMEHOURTO':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'OPENHOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'HIGHHOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'LOWHOUR':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'}};CCC.CURRENT.pack=function(currentObject) 502{var mask=0;var packedCurrent='';for(var property in this.FIELDS) 503{if(currentObject.hasOwnProperty(property)){packedCurrent+='~'+currentObject[property];mask|=this.FIELDS[property];}} 504return packedCurrent.substr(1)+'~'+mask.toString(16);};CCC.CURRENT.unpack=function(value) 505{var valuesArray=value.split("~");var valuesArrayLenght=valuesArray.length;var mask=valuesArray[valuesArrayLenght-1];var maskInt=parseInt(mask,16);var unpackedCurrent={};var currentField=0;for(var property in this.FIELDS) 506{if(this.FIELDS[property]===0) 507{unpackedCurrent[property]=valuesArray[currentField];currentField++;} 508else if(maskInt&this.FIELDS[property]) 509{if(property==='LASTMARKET'){unpackedCurrent[property]=valuesArray[currentField];}else{unpackedCurrent[property]=parseFloat(valuesArray[currentField]);} 510currentField++;}} 511return unpackedCurrent;};CCC.CURRENT.getKey=function(currentObject){return currentObject['TYPE']+'~'+currentObject['MARKET']+'~'+currentObject['FROMSYMBOL']+'~'+currentObject['TOSYMBOL'];};CCC.CURRENT.getKeyFromStreamerData=function(streamerData){var valuesArray=streamerData.split("~");return valuesArray[0]+'~'+valuesArray[1]+'~'+valuesArray[2]+'~'+valuesArray[3];};CCC.CURRENT.conversionInfoToObj=function(conversionInfo){var toSymbol=CCC.STATIC.CURRENCY.getSymbol(conversionInfo['CurrencyTo']);var fromSymbol=CCC.STATIC.CURRENCY.getSymbol(conversionInfo['CurrencyFrom']);var totalCoinsMined=conversionInfo['Supply'];var fullVolume=conversionInfo['FULLVOLUME'];var topTierFullVolume=conversionInfo['TOPTIERFULLVOLUME'];var conversionType=conversionInfo['Conversion'];var objToReturn={};switch(conversionType){case"direct":objToReturn=CCC.CURRENT.unpack(conversionInfo.RAW[0]);break;case"multiply":var obj1=CCC.CURRENT.unpack(conversionInfo.RAW[0]) 512var obj2=CCC.CURRENT.unpack(conversionInfo.RAW[1]);objToReturn=CCC.CURRENT.multiply(obj1,obj2,obj1.VOLUME24HOUR);break;case"divide":var obj1=CCC.CURRENT.unpack(conversionInfo.RAW[0]) 513var obj2=CCC.CURRENT.unpack(conversionInfo.RAW[1]);objToReturn=CCC.CURRENT.divide(obj1,obj2);break;case"invert":objToReturn=CCC.CURRENT.invert(CCC.CURRENT.unpack(conversionInfo.RAW[0]));break;case"invert_divide":var obj1=CCC.CURRENT.unpack(conversionInfo.RAW[0]) 514var obj2=CCC.CURRENT.unpack(conversionInfo.RAW[1]);objToReturn=CCC.CURRENT.divide(CCC.CURRENT.invert(obj1),CCC.CURRENT.invert(obj2));} 515objToReturn.FULLVOLUME=fullVolume;objToReturn.FULLVOLUMETO=fullVolume*objToReturn.PRICE;objToReturn.TOPTIERFULLVOLUME=topTierFullVolume;objToReturn.TOPTIERFULLVOLUMETO=topTierFullVolume*objToReturn.PRICE;objToReturn.CHANGE24HOUR=objToReturn.PRICE-objToReturn.OPEN24HOUR;objToReturn.CHANGEPCT24HOUR=objToReturn.CHANGE24HOUR/objToReturn.OPEN24HOUR*100;if(totalCoinsMined>0){objToReturn.MKTCAP=objToReturn.PRICE*totalCoinsMined;}else{objToReturn.MKTCAP=0;} 516return objToReturn;} 517CCC.CURRENT.multiply=function(obj1,obj2,volume24H,volume24HTo){var newObject={};for(var property in this.FIELDSOPERATION){switch(this.FIELDSOPERATION[property].Multiply.Op){case'obj1':if(obj1.hasOwnProperty(this.FIELDSOPERATION[property].Multiply.Field)){newObject[property]=obj1[this.FIELDSOPERATION[property].Multiply.Field];} 518break;case'obj2':if(obj2.hasOwnProperty(this.FIELDSOPERATION[property].Multiply.Field)){newObject[property]=obj2[this.FIELDSOPERATION[property].Multiply.Field];} 519break;case'multiply':if(obj1.hasOwnProperty(property)&&obj2.hasOwnProperty(property)){newObject[property]=obj1[property]*obj2[property];} 520break;case'NotAplicable':if(obj1.hasOwnProperty(property)){newObject[property]=0;} 521break;case'Volume24H':newObject[property]=volume24H||0;break;case'Volume24HTo':newObject[property]=volume24HTo||0;break;case'highest':if(obj1.hasOwnProperty(property)&&obj2.hasOwnProperty(property)){if(obj1[property]>obj2[property]){newObject[property]=obj1[property];}else{newObject[property]=obj2[property];}} 522break;}} 523return newObject;};CCC.CURRENT.divide=function(obj1,obj2){var newObject={};for(var property in this.FIELDSOPERATION){switch(this.FIELDSOPERATION[property].Divide.Op){case'obj1':if(obj1.hasOwnProperty(this.FIELDSOPERATION[property].Divide.Field)){newObject[property]=obj1[this.FIELDSOPERATION[property].Divide.Field];} 524break;case'obj2':if(obj2.hasOwnProperty(this.FIELDSOPERATION[property].Divide.Field)){newObject[property]=obj2[this.FIELDSOPERATION[property].Divide.Field];} 525break;case'divide':var divideField=property;if(this.FIELDSOPERATION[property]!==undefined&&this.FIELDSOPERATION[property].Divide.Field!==un
525defined){divideField=this.FIELDSOPERATION[property].Divide.Field;} 526if(obj1[property]!==undefined&&obj2[divideField]!==undefined){let fullNumber=obj2[divideField]===0?0:obj1[property]/obj2[divideField];newObject[property]=fullNumber;} 527break;case'NotAplicable':if(obj1.hasOwnProperty(property)){newObject[property]=0;} 528break;case'highest':if(obj1.hasOwnProperty(property)&&obj2.hasOwnProperty(property)){if(obj1[property]>obj2[property]){newObject[property]=obj1[property];}else{newObject[property]=obj2[property];}} 529break;}} 530return newObject;};CCC.CURRENT.invert=function(obj1){var newObject={};for(var property in this.FIELDSOPERATION){switch(this.FIELDSOPERATION[property].Invert.Op){case'obj1':if(obj1.hasOwnProperty(this.FIELDSOPERATION[property].Invert.Field)){newObject[property]=obj1[this.FIELDSOPERATION[property].Invert.Field];} 531break;case'invert':if(obj1.hasOwnProperty(this.FIELDSOPERATION[property].Invert.Field)&&obj1[this.FIELDSOPERATION[property].Invert.Field]>0){newObject[property]=1/obj1[this.FIELDSOPERATION[property].Invert.Field];}else{newObject[property]=0;} 532break;case'NotAplicable':if(obj1.hasOwnProperty(property)){newObject[property]=0;} 533break;}} 534return newObject;};CCC.ORDER=CCC.ORDER||{};CCC.ORDER.FLAGS={'ADD':0x1,'REMOVE':0x2,'CHANGE':0x4,'NOACTION':0x8};CCC.ORDER.SIDE={'BID':0x1,'ASK':0x2};CCC.ORDER.FIELDS={'T':0x0,'M':0x0,'FSYM':0x0,'TSYM':0x0,'S':0x0,'F':0x0,'SEQ':0x0,'P':0x0,'Q':0x0};CCC.ORDER.FIELDSNOKEY={'P':0x0,'Q':0x0};CCC.ORDER.DISPLAY=CCC.ORDER.DISPLAY||{};CCC.ORDER.DISPLAY.FIELDS={'T':{"Show":false,'Filter':'None'},'M':{"Show":true,'Filter':'Market'},'FSYM':{"Show":true,'Filter':'CurrencySymbol'},'TSYM':{"Show":true,'Filter':'CurrencySymbol'},'S':{"Show":true,'Filter':'Integer'},'F':{"Show":true,'Filter':'Integer'},'SEQ':{'Show':false,'Filter':'Integer'},'P':{'Show':true,'Filter':'Number','Symbol':'TSYM'},'Q':{'Show':true,'Filter':'Number','Symbol':'NONE'}};CCC.ORDER.pack=function(orderObject){var packedOrder='';for(var property in this.FIELDS){if(orderObject.hasOwnProperty(property)){packedOrder+='~'+orderObject[property];}} 535return packedOrder.substr(1);};CCC.ORDER.packNoType=function(orderObject){var packedOrder='';for(var property in this.FIELDS){if(property=='T'){continue;} 536if(orderObject.hasOwnProperty(property)){packedOrder+='~'+orderObject[property];}} 537return packedOrder.substr(1);};CCC.ORDER.packNoKey=function(orderObject){var packedOrder='';for(var property in this.FIELDSNOKEY){if(orderObject.hasOwnProperty(property)){packedOrder+='~'+orderObject[property];}} 538return packedOrder.substr(1);};CCC.ORDER.unpack=function(orderString){var valuesArray=orderString.split("~");var totalValues=valuesArray.length;var unpackedOrder={};var currentField=0;for(var property in this.FIELDS){if(this.FIELDS[property]===0&¤tField<totalValues){if(this.DISPLAY.FIELDS[property].Filter=='Number'){unpackedOrder[property]=parseFloat(valuesArray[currentField]);}else if(this.DISPLAY.FIELDS[property].Filter=='Integer'){unpackedOrder[property]=parseInt(valuesArray[currentField],10);}else{unpackedOrder[property]=valuesArray[currentField];} 539currentField++;}} 540return unpackedOrder;};CCC.ORDER.getKey=function(orderObject){return orderObject['T']+'~'+orderObject['M']+'~'+orderObject['FSYM']+'~'+orderObject['TSYM'];};CCC.ORDER.getOrderBookKey=function(orderObject){return orderObject['M']+'~'+orderObject['FSYM']+'~'+orderObject['TSYM'];};CCC.ORDER.unpackOrderBookKey=function(orderBookKey){var parts=orderBookKey.split('~');return{M:parts[0],FSYM:parts[1],TSYM:parts[2]};};CCC.ORDER.getObjectKey=function(orderObject){return orderObject['P']+'~'+orderObject['S'];};CCC.ORDER.getExchangeKey=function(orderObject){return orderObject['T']+'~'+orderObject['M'];};CCC.ORDER.getTypeText=function(orderObject){for(var property in this.FLAGS){if(this.FLAGS[property]===orderObject.F){return property;}} 541return"N/A";};CCC.FULLVOLUME=CCC.FULLVOLUME||{};CCC.FULLVOLUME.FIELDS={'TYPE':0x0,'SYMBOL':0x0,'FULLVOLUME':0x0};CCC.FULLVOLUME.unpack=function(volStr){var valuesArray=volStr.split("~");var unpackedCurrent={};var currentField=0;var fields=this.FIELDS;for(var property in fields){if(fields[property]==0){if(property=='FULLVOLUME'){unpackedCurrent[property]=parseFloat(valuesArray[currentField]);}else{unpackedCurrent[property]=valuesArray[currentField];} 542currentField++;}} 543return unpackedCurrent;};CCC.FULLVOLUME.pack=function(volObj){var packedVol='';for(var property in volObj){packedVol+='~'+volObj[property];} 544var strToReturn=packedVol.substr(1);return strToReturn;};CCC.FULLVOLUME.getKey=function(currentObject){return CCC.STATIC.TYPE.FULLVOLUME+'~'+currentObject['SYMBOL'];};CCC.TOPTIERFULLVOLUME=CCC.TOPTIERFULLVOLUME||{};CCC.TOPTIERFULLVOLUME.FIELDS={'TYPE':0x0,'SYMBOL':0x0,'TOPTIERFULLVOLUME':0x0};CCC.TOPTIERFULLVOLUME.unpack=function(volStr){var valuesArray=volStr.split("~");var unpackedCurrent={};var currentField=0;var fields=this.FIELDS;for(var property in fields){if(fields[property]==0){if(property=='TOPTIERFULLVOLUME'){if(valuesArray[currentField]!==undefined){unpackedCurrent[property]=parseFloat(valuesArray[currentField]);}else{unpackedCurrent[property]=0;}}else{unpackedCurrent[property]=valuesArray[currentField];} 545currentField++;}} 546return unpackedCurrent;};CCC.TOPTIERFULLVOLUME.pack=function(volObj){var packedVol='';for(var property in volObj){packedVol+='~'+volObj[property];} 547var strToReturn=packedVol.substr(1);return strToReturn;};CCC.TOPTIERFULLVOLUME.getKey=function(currentObject){return CCC.STATIC.TYPE.TOPTIERFULLVOLUME+'~'+currentObject['SYMBOL'];};CCC.HISTO=CCC.HISTO||{};CCC.HISTO.DISPLAY={};CCC.HISTO.DISPLAY.FIELDS={'TYPE':{'Show':false},'MARKET':{'Show':true,'Filter':'Market'},'FROMSYMBOL':{'Show':true,'Filter':'CurrencySymbol'},'TOSYMBOL':{'Show':true,'Filter':'CurrencySymbol'},'TS':{'Show':true,'Filter':'Number'},'UNIT':{'Show':true,'Filter':'Unit'},'ACTION':{'Show':true,'Filter':'Action'},'OPEN':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'HIGH':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'LOW':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'CLOSE':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'VOLUMEFROM':{'Show':true,'Filter':'Number','Symbol':'FROMSYMBOL'},'VOLUMETO':{'Show':true,'Filter':'Number','Symbol':'TOSYMBOL'},'TOTALTRADES':{'Show':true,'Filter':'Number'},'FIRSTTS':{'Show':true,'Filter':'Number'},'LASTTS':{'Show':true,'Filter':'Number'},'FIRSTPRICE':{'Show':true,'Filter':'Number'},'MAXPRICE':{'Show':true,'Filter':'Number'},'MINPRICE':{'Show':true,'Filter':'Number'},'LASTPRICE':{'Show':true,'Filter':'Number'},};CCC.HISTO.FIELDS={'TYPE':0x0,'MARKET':0x0,'FROMSYMBOL':0x0,'TOSYMBOL':0x0,'TS':0x0,'UNIT':0x0,'ACTION':0x0,'OPEN':0x1,'HIGH':0x2,'LOW':0x4,'CLOSE':0x8,'VOLUMEFROM':0x10,'VOLUMETO':0x20,'TOTALTRADES':0x40,'FIRSTTS':0x80,'LASTTS':0x100,'FIRSTPRICE':0x200,'MAXPRICE':0x400,'MINPRICE':0x800,'LASTPRICE':0x1000};CCC.HISTO.getKey=function(currentObject){return CCC.STATIC.TYPE.HISTO+'~'+currentObject['MARKET']+'~'+currentObject['FROMSYMBOL']+'~'+currentObject['TOSYMBOL']+'~'+currentObject['UNIT'];};CCC.HISTO.unpack=function(histoString){var valuesArray=histoString.split("~");var valuesArrayLenght=valuesArray.length;var mask=valuesArray[valuesArrayLenght-1];var maskInt=parseInt(mask,16);var unpackedHisto={};var currentField=0;var fieldDefinition=CCC.HISTO.FIELDS;for(var property in fieldDefinition){if(fieldDefinition[property]===0){if(property==='TS'){unpackedHisto[property]=parseInt(valuesArray[currentField],10);}else{unpackedHisto[property]=valuesArray[currentField];} 548currentField++;}else if(maskInt&fieldDefinition[property]){unpackedHisto[property]=parseFloat(valuesArray[currentField]);currentField++;}} 549return unpackedHisto;};CCC.SUBSCRIBECOMPLETE=CCC.STATUS||{};CCC.SUBSCRIBECOMPLETE.DISPLAY={};CCC.SUBSCRIBECOMPLETE.DISPLAY.FIELDS={'TYPE':{'Show':false}
549,'KEY':{'Show':true,'Filter':'String'},};CCC.SUBSCRIBECOMPLETE.getKey=function(currentObject){return CCC.STATIC.TYPE.SUBSCRIBECOMPLETE+'~'+currentObject['KEY'];};CCC.SUBSCRIBECOMPLETE.unpack=function(histoString){var valuesArray=histoString.split("~");return{STATUS:valuesArray[1],KEY:valuesArray.slice(2).join('~')};};CCC.ERROR=CCC.STATUS||{};CCC.ERROR.DISPLAY={};CCC.ERROR.DISPLAY.FIELDS={'TYPE':{'Show':false},'KEY':{'Show':true,'Filter':'String'},};CCC.ERROR.getKey=function(currentObject){return currentObject['KEY'];};CCC.ERROR.unpack=function(histoString){var valuesArray=histoString.split("~");return{STATUS:valuesArray[1],KEY:valuesArray.slice(-4).join('~')};};CCC.NEWS=CCC.NEWS||{};CCC.NEWS.DATA={newsFeed:[],acceptedNewsCategories:[],defaultNewsApiParams:{'feeds':'ALL_NEWS_FEEDS','categories':'ALL_NEWS_CATEGORIES','excludeCategories':'NO_EXCLUDED_NEWS_CATEGORIES'},newsFilters:{'feeds':{'name':'Feeds','headerText':'News Feeds','urlParam':'feeds','filterType':'feeds','buttonText':'Reset News Feeds'},'categories':{'name':'Include','headerText':'Categories','urlParam':'categories','filterType':'categories','buttonText':'Reset'},'excludeCategories':{'name':'Exclude','headerText':'Exclude','urlParam':'excludeCategories','filterType':'categories','buttonText':'Reset'}},newsUserActions:{2:{'name':'Downvote','key':'downvotes','userActionNumber':2,'className':'news-downvote','actionSelectedSymbol':'fa-thumbs-down','actionNotSelectedSymbol':'fa-thumbs-o-down','oppositeAction':'upvotes'},1:{'name':'Upvote','key':'upvotes','userActionNumber':1,'className':'news-upvote','actionSelectedSymbol':'fa-thumbs-up','actionNotSelectedSymbol':'fa-thumbs-o-up','oppositeAction':'downvotes'}},newsSortOrders:{'latest':{sortOrderName:'Latest News Articles',urlParam:'latest'},'popular':{sortOrderName:'Most Popular Articles',urlParam:'popular'}}};CCC.COUNTRYINFO=CCC.COUNTRYINFO||{};CCC.COUNTRYINFO.data={"AF":{"Timezone":"(UTC+04:30) Kabul","DisplayName":"Afghanistan","Currency":["AFN"],"TimeDifferenceFromUTCInMinutes":240},"AX":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Aland Islands","TimeDifferenceFromUTCInMinutes":120},"AL":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","DisplayName":"Albania","TimeDifferenceFromUTCInMinutes":60},"DZ":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Algeria","TimeDifferenceFromUTCInMinutes":60},"AS":{"Timezone":"(UTC-11:00) Coordinated Universal Time -11","DisplayName":"American Samoa","TimeDifferenceFromUTCInMinutes":-660},"AD":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Andorra","TimeDifferenceFromUTCInMinutes":60},"AO":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Angola","TimeDifferenceFromUTCInMinutes":60},"AI":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Anguilla","TimeDifferenceFromUTCInMinutes":-240},"AQ":{"Timezone":"(UTC+07:00) Novosibirsk","DisplayName":"Antarctica","TimeDifferenceFromUTCInMinutes":420},"AG":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Antigua and Barbuda","TimeDifferenceFromUTCInMinutes":-240},"AR":{"Timezone":"(UTC-03:00) Buenos Aires","DisplayName":"Argentina","TimeDifferenceFromUTCInMinutes":-180},"AM":{"Timezone":"(UTC+04:00) Yerevan","DisplayName":"Armenia","TimeDifferenceFromUTCInMinutes":240},"AW":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Aruba","TimeDifferenceFromUTCInMinutes":-240},"AU":{"Timezone":"(UTC+10:00) Canberra, Melbourne, Sydney","DisplayName":"Australia","TimeDifferenceFromUTCInMinutes":600},"AT":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Austria","TimeDifferenceFromUTCInMinutes":60},"AZ":{"Timezone":"(UTC+04:00) Baku","DisplayName":"Azerbaijan","TimeDifferenceFromUTCInMinutes":240},"BS":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Bahamas","TimeDifferenceFromUTCInMinutes":-300},"BH":{"Timezone":"(UTC+03:00) Kuwait, Riyadh","DisplayName":"Bahrain","TimeDifferenceFromUTCInMinutes":180},"BD":{"Timezone":"(UTC+06:00) Dhaka","DisplayName":"Bangladesh","TimeDifferenceFromUTCInMinutes":360},"BB":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Barbados","TimeDifferenceFromUTCInMinutes":-240},"BY":{"Timezone":"(UTC+02:00) Minsk","DisplayName":"Belarus","TimeDifferenceFromUTCInMinutes":120},"BE":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Belgium","TimeDifferenceFromUTCInMinutes":60},"BZ":{"Timezone":"(UTC-06:00) Central America","DisplayName":"Belize","TimeDifferenceFromUTCInMinutes":-360},"BJ":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Benin","TimeDifferenceFromUTCInMinutes":60},"BM":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Bermuda","TimeDifferenceFromUTCInMinutes":-240},"BT":{"Timezone":"(UTC+06:00) Astana","DisplayName":"Bhutan","TimeDifferenceFromUTCInMinutes":360},"BO":{"Timezone":"(UTC-04:00) Cuiaba","DisplayName":"Bolivia","TimeDifferenceFromUTCInMinutes":-240},"BQ":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Bonaire, Saint Eustatius and Saba","TimeDifferenceFromUTCInMinutes":-240},"BA":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","Dis
549playName":"Bosnia and Herzegovina","TimeDifferenceFromUTCInMinutes":60},"BW":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Botswana","TimeDifferenceFromUTCInMinutes":120},"BV":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Bouvet Island","TimeDifferenceFromUTCInMinutes":0},"BR":{"Timezone":"(UTC-03:00) Brasilia","DisplayName":"Brazil","TimeDifferenceFromUTCInMinutes":-180},"IO":{"Timezone":"(UTC+06:00) Astana","DisplayName":"British Indian Ocean Territory","TimeDifferenceFromUTCInMinutes":360},"BN":{"Timezone":"(UTC+08:00) Kuala Lumpur, Singapore","DisplayName":"Brunei Darussalam","TimeDifferenceFromUTCInMinutes":480},"BG":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Bulgaria","TimeDifferenceFromUTCInMinutes":120},"BF":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Burkina Faso","TimeDifferenceFromUTCInMinutes":0},"BI":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Burundi","TimeDifferenceFromUTCInMinutes":120},"KH":{"Timezone":"(UTC+07:00) Bangkok, Hanoi, Jakarta","DisplayName":"Cambodia","TimeDifferenceFromUTCInMinutes":420},"CM":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Cameroon","TimeDifferenceFromUTCInMinutes":60},"CA":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Canada","TimeDifferenceFromUTCInMinutes":-300},"CV":{"Timezone":"(UTC-01:00) Cabo Verde Is.","DisplayName":"Cape Verde","TimeDifferenceFromUTCInMinutes":-60},"KY":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Cayman Islands","TimeDifferenceFromUTCInMinutes":-300},"CF":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Central African Republic","TimeDifferenceFromUTCInMinutes":60},"TD":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Chad","TimeDifferenceFromUTCInMinutes":60},"CL":{"Timezone":"(UTC-04:00) Santiago","DisplayName":"Chile","TimeDifferenceFromUTCInMinutes":-240},"CN":{"Timezone":"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi","DisplayName":"China","TimeDifferenceFromUTCInMinutes":480},"CX":{"Timezone":"(UTC+14:00) Kiritimati Island","DisplayName":"Christmas Island","TimeDifferenceFromUTCInMinutes":840},"CC":{"Timezone":"(UTC+06:30) Yangon (Rangoon)","DisplayName":"Cocos (Keeling) Islands","TimeDifferenceFromUTCInMinutes":360},"CO":{"Timezone":"(UTC-05:00) Bogota, Lima, Quito","DisplayName":"Colombia","TimeDifferenceFromUTCInMinutes":-300},"KM":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Comoros","TimeDifferenceFromUTCInMinutes":180},"CG":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Congo (Brazzaville)","TimeDifferenceFromUTCInMinutes":60},"CD":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Congo [DRC]","TimeDifferenceFromUTCInMinutes":60},"CK":{"Timezone":"(UTC-10:00) Hawaii","DisplayName":"Cook Islands","TimeDifferenceFromUTCInMinutes":-600},"CR":{"Timezone":"(UTC-06:00) Central America","DisplayName":"Costa Rica","TimeDifferenceFromUTCInMinutes":-360},"CI":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Ivory Coast","TimeDifferenceFromUTCInMinutes":0},"HR":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","DisplayName":"Croatia","TimeDifferenceFromUTCInMinutes":60},"CU":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Cuba","TimeDifferenceFromUTCInMinutes":-240},"CW":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Curaçao","TimeDifferenceFromUTCInMinutes":-240},"CY":{"Timezone":"(UTC+02:00) Istanbul","DisplayName":"Cyprus","TimeDifferenceFromUTCInMinutes":120},"CZ":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Czech Republic","TimeDifferenceFromUTCInMinutes":60},"DK":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Denmark","TimeDifferenceFromUTCInMinutes":60},"DJ":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Djibouti","TimeDifferenceFromUTCInMinutes":180},"DM":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Dominica","TimeDifferenceFromUTCInMinutes":-240},"DO":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Dominican Republic","TimeDifferenceFromUTCInMinutes":-240},"EC":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Ecuador","TimeDifferenceFromUTCInMinutes":-300},"EG":{"Timezone":"(UTC+02:00) Cairo","DisplayName":"Egypt","TimeDifferenceFromUTCInMinutes":120},"SV":{"Timezone":"(UTC-06:00) Central America","DisplayName":"El Salvador","TimeDifferenceFromUTCInMinutes":-360},"GQ":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Equatorial Guinea","TimeDifferenceFromUTCInMinutes":60},"ER":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Eritrea","TimeDifferenceFromUTCInMinutes":180},"EE":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Estonia","TimeDifferenceFromUTCInMinutes":120},"ET":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Ethiopia","TimeDifferenceFromUTCInMinutes":180},"FK":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Falkland Islands (Malvinas)","TimeDifferenceFromUTCInMinutes":-240},"FO":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Faroe Islands","TimeDifferenceFromUTCInMinutes":0},"FJ":{"Timezone":"(UTC+12:00) Fiji","DisplayName":"Fiji","TimeDifferenceFromUTCInMinutes":720},"FI":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Finland","TimeDifferenceFromUTCInMinutes":120},"FR":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"France","TimeDifferenceFromUTCInMinutes":60},"GF":{"Timezone":"(UTC-03:00) Cayenne, Fortaleza","DisplayName":"French Guiana","TimeDifferenceFromUTCInMinutes":-180},"PF":{"Timezone":"(UTC-10:00) Hawaii","DisplayName":"French Polynesia","TimeDifferenceFromUTCInMinutes":-600},"TF":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"French Southern Territories","TimeDifferenceFromUTCInMinutes":300},"GA":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Gabon","TimeDifferenceFromUTCInMinutes":60},"GM":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Gambia","TimeDifferenceFromUTCInMinutes":0},"GE":{"Timezone":"(UTC+04:00) Tbilisi","DisplayName":"Georgia","TimeDifferenceFromUTCInMinutes":240},"DE":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Germany","TimeDifferenceFromUTCInMinutes":60},"GH":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Ghana","TimeDifferenceFromUTCInMinutes":0},"GI":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Gibraltar","TimeDifferenceFromUTCInMinutes":60},"GR":{"Timezone":"(UTC+02:00) Athens, Bucharest","DisplayName":"Greece","TimeDifferenceFromUTCInMinutes":120},"GL":{"Timezone":"(UTC-03:00) Greenland","DisplayName":"Greenland","TimeDifferenceFromUTCInMinutes":-180},"GD":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Grenada","TimeDifferenceFromUTCInMinutes":-240},"GP":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Guadeloupe","TimeDifferenceFromUTCInMinutes":-240},"GU":{"Timezone":"(UTC+10:00) Canberra, Melbourne, Sydney","DisplayName":"Guam","TimeDifferenceFromUTCInMinutes":600},"GT":{"Timezone":"(UTC-06:00) Central Time (US and Canada)","DisplayName":"Guatemala","TimeDifferenceFromUTCInMinutes":-360},"GG":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Guernsey","TimeDifferenceFromUTCInMinutes":0},"GN":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Guinea","TimeDifferenceFromUTCInMinutes":0},"GW":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Guinea-Bissau","TimeDifferenceFromUTCInMinutes":0},"GY":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Guyana","TimeDifferenceFromUTCInMinutes":-240},"HT":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Haiti","TimeDifferenceFromUTCInMinutes":-300},"HM":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"Heard Island and McDonald Islands","TimeDifferenceFromUTCInMinutes":300},"VA":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Holy See","TimeDifferenceFromUTCInMinutes":60},"HN":{"Timezone":"(UTC-06:00) Central America","DisplayName":"Honduras","TimeDifferenceFromUTCInMinutes":-360},"HK":{"Timezone":"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi","DisplayName":"Hong Kong","TimeDifferenceFromUTCInMinutes":480},"HU":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Hungary","TimeDifferenceFromUTCInMinutes":60},"IS":{"Timezone":"(UTC) Monrovia, Reykjavik","DisplayName":"Iceland","TimeDifferenceFromUTCInMinutes":0},"IN":{"Timezone":"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","DisplayName":"India","TimeDifferenceFromUTCInMinutes":300},"ID":{"Timezone":"(UTC+07:00) Bangkok, Hanoi, Jakarta","DisplayName":"Indonesia","TimeDifferenceFromUTCInMinutes":420},"IR":{"Timezone":"(UTC+03:30) Tehran","DisplayName":"Iran","TimeDifferenceFromUTCInMinutes":180},"IQ":{"Timezone":"(UTC+03:00) Baghdad","DisplayName":"Iraq","TimeDifferenceFromUTCInMinutes":180},"IE":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"Ireland","TimeDifferenceFromUTCInMinutes":0},"IM":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"Isle of Man","TimeDifferenceFromUTCInMinutes":0},"IL":{"Timezone":"(UTC+02:00) Jerusalem","DisplayName":"Israel","TimeDifferenceFromUTCInMinutes":120},"IT":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Italy","TimeDifferenceFromUTCInMinutes":60},"JM":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"Jamaica","TimeDifferenceFromUTCInMinutes":-300},"JP":{"Timezone":"(UTC+09:00) Osaka, Sapporo, Tokyo","DisplayName":"Japan","TimeDifferenceFromUTCInMinutes":540},"JE":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"Jersey","TimeDifferenceFromUTCInMinutes":0},"JO":{"Timezone":"(UTC+02:00) Amman","DisplayName":"Jordan","TimeDifferenceFromUTCInMinutes":120},"KZ":{"Timezone":"(UTC+06:00) Astana","DisplayName":"Kazakhstan","TimeDifferenceFromUTCInMinutes":360},"KE":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Kenya","TimeDifferenceFromUTCInMinutes":180},"KI":{"Timezone":"(UTC+12:00) Coordinated Universal Time +12","DisplayName":"Kiribati","TimeDifferenceFromUTCInMinutes":720},"KP":{"Timezone":"(UTC+09:00) Seoul","DisplayName":"Korea, Democratic People's Republic of","TimeDifferenceFromUTCInMinutes":540},"KR":{"Timezone":"(UTC+09:00) Seoul","DisplayName":"Korea","TimeDifferenceFromUTCInMinutes":540},"KW":{"Timezone":"(UTC+03:00) Kuwait, Riyadh","DisplayName":"Kuwait","TimeDifferenceFromUTCInMinutes":180},"KG":{"Timezone":"(UTC+06:00) Astana","DisplayName":"Kyrgyzstan","TimeDifferenceFromUTCInMinutes":360},"LA":{"Timezone":"(UTC+07:00) Bangkok, Hanoi, Jakarta","DisplayName":"Lao PDR","TimeDifferenceFromUTCInMinutes":420},"LV":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Latvia","TimeDifferenceFromUTCInMinutes":120}
549,"LB":{"Timezone":"(UTC+02:00) Beirut","DisplayName":"Lebanon","TimeDifferenceFromUTCInMinutes":120},"LS":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Lesotho","TimeDifferenceFromUTCInMinutes":120},"LR":{"Timezone":"(UTC) Monrovia, Reykjavik","DisplayName":"Liberia","TimeDifferenceFromUTCInMinutes":0},"LY":{"Timezone":"(UTC+02:00) Cairo","DisplayName":"Libya","TimeDifferenceFromUTCInMinutes":120},"LI":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Liechtenstein","TimeDifferenceFromUTCInMinutes":60},"LT":{"Timezone":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","DisplayName":"Lithuania","TimeDifferenceFromUTCInMinutes":120},"LU":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Luxembourg","TimeDifferenceFromUTCInMinutes":60},"MO":{"Timezone":"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi","DisplayName":"Macao SAR","TimeDifferenceFromUTCInMinutes":480},"MK":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","DisplayName":"Macedonia (Former Yugoslav Republic of Macedonia)","TimeDifferenceFromUTCInMinutes":60},"MG":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Madagascar","TimeDifferenceFromUTCInMinutes":180},"MW":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Malawi","TimeDifferenceFromUTCInMinutes":120},"MY":{"Timezone":"(UTC+08:00) Kuala Lumpur, Singapore","DisplayName":"Malaysia","TimeDifferenceFromUTCInMinutes":480},"MV":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"Maldives","TimeDifferenceFromUTCInMinutes":300},"ML":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Mali","TimeDifferenceFromUTCInMinutes":0},"MT":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Malta","TimeDifferenceFromUTCInMinutes":60},"MH":{"Timezone":"(UTC+12:00) Coordinated Universal Time +12","DisplayName":"Marshall Islands","TimeDifferenceFromUTCInMinutes":720},"MQ":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Martinique","TimeDifferenceFromUTCInMinutes":-240},"MR":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Mauritania","TimeDifferenceFromUTCInMinutes":0},"MU":{"Timezone":"(UTC+04:00) Port Louis","DisplayName":"Mauritius","TimeDifferenceFromUTCInMinutes":240},"YT":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Mayotte","TimeDifferenceFromUTCInMinutes":180},"MX":{"Timezone":"(UTC-06:00) Guadalajara, Mexico City, Monterrey","DisplayName":"Mexico","TimeDifferenceFromUTCInMinutes":-360},"FM":{"Timezone":"(UTC+10:00) Canberra, Melbourne, Sydney","DisplayName":"Micronesia, Federated States of","TimeDifferenceFromUTCInMinutes":600},"MD":{"Timezone":"(UTC+02:00) Athens, Bucharest","DisplayName":"Moldova","TimeDifferenceFromUTCInMinutes":120},"MC":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Principality of Monaco","TimeDifferenceFromUTCInMinutes":60},"MN":{"Timezone":"(UTC+08:00) Ulaanbaatar","DisplayName":"Mongolia","TimeDifferenceFromUTCInMinutes":480},"ME":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","DisplayName":"Montenegro","TimeDifferenceFromUTCInMinutes":60},"MS":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Montserrat","TimeDifferenceFromUTCInMinutes":-240},"MA":{"Timezone":"(UTC) Casablanca","DisplayName":"Morocco","TimeDifferenceFromUTCInMinutes":0},"MZ":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Mozambique","TimeDifferenceFromUTCInMinutes":120},"MM":{"Timezone":"(UTC+06:30) Yangon (Rangoon)","DisplayName":"Myanmar","TimeDifferenceFromUTCInMinutes":360},"NA":{"Timezone":"(UTC+01:00) Windhoek","DisplayName":"Namibia","TimeDifferenceFromUTCInMinutes":60},"NR":{"Timezone":"(UTC+12:00) Coordinated Universal Time +12","DisplayName":"Nauru","TimeDifferenceFromUTCInMinutes":720},"NP":{"Timezone":"(UTC+05:45) Kathmandu","DisplayName":"Nepal","TimeDifferenceFromUTCInMinutes":300},"NL":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Netherlands","TimeDifferenceFromUTCInMinutes":60},"NC":{"Timezone":"(UTC+11:00) Solomon Is., New Caledonia","DisplayName":"New Caledonia","TimeDifferenceFromUTCInMinutes":660},"NZ":{"Timezone":"(UTC+12:00) Auckland, Wellington","DisplayName":"New Zealand","TimeDifferenceFromUTCInMinutes":720},"NI":{"Timezone":"(UTC-06:00) Central America","DisplayName":"Nicaragua","TimeDifferenceFromUTCInMinutes":-360},"NE":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Niger","TimeDifferenceFromUTCInMinutes":60},"NG":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Nigeria","TimeDifferenceFromUTCInMinutes":60},"NU":{"Timezone":"(UTC-11:00) Coordinated Universal Time -11","DisplayName":"Niue","TimeDifferenceFromUTCInMinutes":-660},"NF":{"Timezone":"(UTC+12:00) Auckland, Wellington","DisplayName":"Norfolk Island","TimeDifferenceFromUTCInMinutes":720},"MP":{"Timezone":"(UTC+10:00) Canberra, Melbourne, Sydney","DisplayName":"Northern Mariana Islands","TimeDifferenceFromUTCInMinutes":600},"NO":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Norway","TimeDifferenceFromUTCInMinutes":60},"OM":{"Timezone":"(UTC+04:00) Abu Dhabi, Muscat","DisplayName":"Oman","TimeDifferenceFromUTCInMinutes":240},"PK":{"Timezone":"(UTC+05:00) Islamabad, Karachi","DisplayName":"Pakistan","TimeDifferenceFromUTCInMinutes":300},"PW":{"Timezone":"(UTC+09:00) Seoul","DisplayName":"Palau","TimeDifferenceFromUTCInMinutes":540},"PS":{"Timezone":"(UTC+02:00) Jerusalem","DisplayName":"Palestine, State of","TimeDifferenceFromUTCInMinutes":120},"PA":{"Timezone":"(UTC-05:00) Bogota, Lima, Quito","DisplayName":"Panama","TimeDifferenceFromUTCInMinutes":-300},"PG":{"Timezone":"(UTC+10:00) Canberra, Melbourne, Sydney","DisplayName":"Papua New Guinea","TimeDifferenceFromUTCInMinutes":600},"PY":{"Timezone":"(UTC-04:00) Asuncion","DisplayName":"Paraguay","TimeDifferenceFromUTCInMinutes":-240},"PE":{"Timezone":"(UTC-05:00) Bogota, Lima, Quito","DisplayName":"Peru","TimeDifferenceFromUTCInMinutes":-300},"PH":{"Timezone":"(UTC+08:00) Kuala Lumpur, Singapore","DisplayName":"Philippines","TimeDifferenceFromUTCInMinutes":480},"PN":{"Timezone":"(UTC-08:00) Pacific Time (US and Canada)","DisplayName":"Pitcairn","TimeDifferenceFromUTCInMinutes":-480},"PL":{"Timezone":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","Dis
549playName":"Poland","TimeDifferenceFromUTCInMinutes":60},"PT":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"Portugal","TimeDifferenceFromUTCInMinutes":0},"PR":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Puerto Rico","TimeDifferenceFromUTCInMinutes":-240},"QA":{"Timezone":"(UTC+03:00) Kuwait, Riyadh","DisplayName":"Qatar","TimeDifferenceFromUTCInMinutes":180},"RE":{"Timezone":"(UTC+04:00) Abu Dhabi, Muscat","DisplayName":"Réunion","TimeDifferenceFromUTCInMinutes":240},"RO":{"Timezone":"(UTC+02:00) Athens, Bucharest","DisplayName":"Romania","TimeDifferenceFromUTCInMinutes":120},"RU":{"Timezone":"(UTC+04:00) Moscow, St. Petersburg, Volgograd","DisplayName":"Russia","Currency":["RUR","RUB"],"TimeDifferenceFromUTCInMinutes":240},"RW":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Rwanda","TimeDifferenceFromUTCInMinutes":120},"BL":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Saint Barthélemy","TimeDifferenceFromUTCInMinutes":-240},"SH":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Saint Helena, Ascension and Tristan da Cunha","TimeDifferenceFromUTCInMinutes":0},"KN":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Saint Kitts and Nevis","TimeDifferenceFromUTCInMinutes":-240},"LC":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Saint Lucia","TimeDifferenceFromUTCInMinutes":-240},"MF":{"Timezone":"(UTC-04:00) Asuncion","DisplayName":"Saint Martin (French part)","TimeDifferenceFromUTCInMinutes":-240},"PM":{"Timezone":"(UTC-03:00) Cayenne, Fortaleza","DisplayName":"Saint Pierre and Miquelon","TimeDifferenceFromUTCInMinutes":-180},"VC":{"Timezone":"(UTC-04:00) Santiago","DisplayName":"Saint Vincent and the Grenadines","TimeDifferenceFromUTCInMinutes":-240},"WS":{"Timezone":"(UTC+13:00) Samoa","DisplayName":"Samoa","TimeDifferenceFromUTCInMinutes":780},"SM":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"San Marino","TimeDifferenceFromUTCInMinutes":60},"ST":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Sao Tome and Principe","TimeDifferenceFromUTCInMinutes":0},"SA":{"Timezone":"(UTC+03:00) Kuwait, Riyadh","DisplayName":"Saudi Arabia","TimeDifferenceFromUTCInMinutes":180},"SN":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Senegal","TimeDifferenceFromUTCInMinutes":0},"RS":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Serbia","TimeDifferenceFromUTCInMinutes":60},"SC":{"Timezone":"(UTC+04:00) Abu Dhabi, Muscat","DisplayName":"Seychelles","TimeDifferenceFromUTCInMinutes":240},"SL":{"Timezone":"(UTC) Monrovia, Reykjavik","DisplayName":"Sierra Leone","TimeDifferenceFromUTCInMinutes":0},"SG":{"Timezone":"(UTC+08:00) Kuala Lumpur, Singapore","DisplayName":"Singapore","TimeDifferenceFromUTCInMinutes":480},"SX":{"Timezone":"(UTC-04:00) Asuncion","DisplayName":"Sint Maarten (Dutch part)","TimeDifferenceFromUTCInMinutes":-240},"SK":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Slovakia","TimeDifferenceFromUTCInMinutes":60},"SI":{"Timezone":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","DisplayName":"Slovenia","TimeDifferenceFromUTCInMinutes":60},"SB":{"Timezone":"(UTC+11:00) Solomon Is., New Caledonia","DisplayName":"Solomon Islands","TimeDifferenceFromUTCInMinutes":660},"SO":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Somalia","TimeDifferenceFromUTCInMinutes":180},"ZA":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"South Africa","TimeDifferenceFromUTCInMinutes":120},"GS":{"Timezone":"(UTC-02:00) Mid-Atlantic","DisplayName":"South Georgia and the South Sandwich Islands","TimeDifferenceFromUTCInMinutes":-120},"SS":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"South Sudan","TimeDifferenceFromUTCInMinutes":180},"ES":{"Timezone":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","DisplayName":"Spain","TimeDifferenceFromUTCInMinutes":60},"LK":{"Timezone":"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","DisplayName":"Sri Lanka","TimeDifferenceFromUTCInMinutes":300},"SD":{"Timezone":"(UTC+02:00) Amman","DisplayName":"Sudan","TimeDifferenceFromUTCInMinutes":120},"SR":{"Timezone":"(UTC-03:00) Montevideo","DisplayName":"Suriname","TimeDifferenceFromUTCInMinutes":-180},"SJ":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Svalbard and Jan Mayen","TimeDifferenceFromUTCInMinutes":60},"SZ":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Swaziland","TimeDifferenceFromUTCInMinutes":120},"SE":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Sweden","TimeDifferenceFromUTCInMinutes":60},"CH":{"Timezone":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","DisplayName":"Switzerland","TimeDifferenceFromUTCInMinutes":60},"SY":{"Timezone":"(UTC+02:00) Damascus","DisplayName":"Syria","TimeDifferenceFromUTCInMinutes":120},"TW":{"Timezone":"(UTC+08:00) Taipei","DisplayName":"Taiwan","TimeDifferenceFromUTCInMinutes":480},"TJ":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"Tajikistan","TimeDifferenceFromUTCInMinutes":300},"TZ":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Tanzania, United Republic of","TimeDifferenceFromUTCInMinutes":180},"TH":{"Timezone":"(UTC+07:00) Bangkok, Hanoi, Jakarta","DisplayName":"Thailand","TimeDifferenceFromUTCInMinutes":420},"TL":{"Timezone":"(UTC+09:00) Osaka, Sapporo, Tokyo","DisplayName":"Timor-Leste","TimeDifferenceFromUTCInMinutes":540},"TG":{"Timezone":"(UTC) Coordinated Universal Time","DisplayName":"Togo","TimeDifferenceFromUTCInMinutes":0},"TK":{"Timezone":"(UTC+13:00)Samoa","DisplayName":"Tokelau","TimeDifferenceFromUTCInMinutes":780},"TO":{"Timezone":"(UTC+13:00) Nuku'alofa","DisplayName":"Tonga","TimeDifferenceFromUTCInMinutes":780},"TT":{"Timezone":"(UTC-04:00) Atlantic Time (Canada)","DisplayName":"Trinidad and Tobago","TimeDifferenceFromUTCInMinutes":-240},"TN":{"Timezone":"(UTC+01:00) West Central Africa","DisplayName":"Tunisia","TimeDifferenceFromUTCInMinutes":60},"TR":{"Timezone":"(UTC+02:00) Istanbul","DisplayName":"Turkey","TimeDifferenceFromUTCInMinutes":120},"TM":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"Turkmenistan","TimeDifferenceFromUTCInMinutes":300},"TC":{"Timezone":"(UTC-05:00) Bogota, Lima, Quito","DisplayName":"Turks and Caicos Islands","TimeDifferenceFromUTCInMinutes":-300},"TV":{"Timezone":"(UTC+12:00) Magadan","DisplayName":"Tuvalu","TimeDifferenceFromUTCInMinutes":720},"UG":{"Timezone":"(UTC+03:00) Nairobi","DisplayName":"Uganda","TimeDifferenceFromUTCInMinutes":180},"UA":{"Timezone":"(UTC+02:00) Minsk","DisplayName":"Ukraine","TimeDifferenceFromUTCInMinutes":120},"AE":{"Timezone":"(UTC+04:00) Abu Dhabi, Muscat","DisplayName":"U.A.E.","TimeDifferenceFromUTCInMinutes":240},"GB":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"United Kingdom","TimeDifferenceFromUTCInMinutes":0},"US":{"Timezone":"(UTC-05:00) Eastern Time (US and Canada)","DisplayName":"United States","TimeDifferenceFromUTCInMinutes":-300},"UM":{"Timezone":"(UTC+12:00) Magadan","DisplayName":"United States Minor Outlying Islands","TimeDifferenceFromUTCInMinutes":720},"UY":{"Timezone":"(UTC-03:00) Montevideo","DisplayName":"Uruguay","TimeDifferenceFromUTCInMinutes":-180},"UZ":{"Timezone":"(UTC+05:00) Tashkent","DisplayName":"Uzbekistan","TimeDifferenceFromUTCInMinutes":300},"VU":{"Timezone":"(UTC+11:00) Solomon Is., New Caledonia","DisplayName":"Vanuatu","TimeDifferenceFromUTCInMinutes":660},"VE":{"Timezone":"(UTC-04:30) Caracas","DisplayName":"Bolivarian Republic of Venezuela","TimeDifferenceFromUTCInMinutes":-240},"VN":{"Timezone":"(UTC+07:00) Bangkok, Hanoi, Jakarta","DisplayName":"Vietnam","TimeDifferenceFromUTCInMinutes":420},"VG":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Virgin Islands, British","TimeDifferenceFromUTCInMinutes":-240},"VI":{"Timezone":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","DisplayName":"Virgin Islands, U.S.","TimeDifferenceFromUTCInMinutes":-240},"WF":{"Timezone":"(UTC+12:00) Coordinated Universal Time +12","DisplayName":"Wallis and Futuna","TimeDifferenceFromUTCInMinutes":720},"EH":{"Timezone":"(UTC) Casablanca","DisplayName":"Western Sahara","TimeDifferenceFromUTCInMinutes":0},"YE":{"Timezone":"(UTC+03:00) Kuwait, Riyadh","DisplayName":"Yemen","TimeDifferenceFromUTCInMinutes":180},"ZM":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Zambia","TimeDifferenceFromUTCInMinutes":120},"ZW":{"Timezone":"(UTC+02:00) Harare, Pretoria","DisplayName":"Zimbabwe","TimeDifferenceFromUTCInMinutes":120},"NotAvailable":{"Timezone":"(UTC) Dublin, Edinburgh, Lisbon, London","DisplayName":"","TimeDifferenceFromUTCInMinutes":0}};CCC.COUNTRYINFO.countryToCurrency={"US":"USD","GB":"GBP","DE":"EUR","FR":"EUR","IT":"EUR","PT":"EUR","RO":"RON","HU":"HUF","AU":"AUD","BR":"BRL","CA":"CAD","CH":"CHF","CN":"CNY","HK":"HKD","IN":"INR","JP":"JPY","KR":"KRW","MX":"MXN","NZ":"NZD","PH":"PHP","PL":"PLN","RU":"RUB","SG":"SGD","VE":"VEF","VN":"VND"};CCC.COUNTRYINFO.getFiatCurrencies=function(){var fiatCurrenciesArrayToReturn=[];for(var countrySymbol in CCC.COUNTRYINFO.countryToCurrency){var currentFiatCurrency=CCC.COUNTRYINFO.countryToCurrency[countrySymbol];if(fiatCurrenciesArrayToReturn.indexOf(currentFiatCurrency)===-1){fiatCurrenciesArrayToReturn.push(currentFiatCurrency);}} 550return fiatCurrenciesArrayToReturn;};CCC.COUNTRYINFO.getCountryTimezoneOptions=function(){var timezoneArrayToReturn=[];for(var countryCode in CCC.COUNTRYINFO.data){var indexOfTimezone=timezoneArrayToReturn.findIndex(function(obj){return obj.Timezone===CCC.COUNTRYINFO.data[countryCode].Timezone}) 551if(indexOfTimezone===-1){timezoneArrayToReturn.push(CCC.COUNTRYINFO.data[countryCode]);}} 552timezoneArrayToReturn.sort(function(a,b){return a.TimeDifferenceFromUTCInMinutes-b.TimeDifferenceFromUTCInMinutes;});return timezoneArrayToReturn.map(function(obj){return obj.Timezone});};CCC.COUNTRYINFO.getCountryDisplayNames=function(){var countryDisplayNamesArrayToReturn=[];for(var countryCode in CCC.COUNTRYINFO.data){countryDisplayNamesArrayToReturn.push(CCC.COUNTRYINFO.data[countryCode].DisplayName);} 553return countryDisplayNamesArrayToReturn.sort();};CCC.FORUM=CCC.FORUM||{};let getCryptopianObject=function(mask){return{'Mask':mask||0x0,'Description':'Object of the Cryptopian who performed the action','Type':'object','ObjectDataFields':{'Id':{'Mask':0x0,'Type':'number'},'Avatar':{'Mask':0x1,'Type':'string'},'Name':{'Mask':0x2,'Type':'string'},'Url':{'Mask':0x4,'Type':'string'},"TotalPoints":{'Mask':0x8,'Type':'number'},"CreateDateTS":{'Mask':0x10,'Type':'number'},},'Show':true,'Required':false};};let getActionsObject=function(mask){return{'Mask':mask||0x0,'Description':'Object of actions which have occurred on the post','Type':'object','ObjectDataFields':{"Agree":{'Mask':0x1,'Type':'object','ObjectDataFields':{"Total":{'Mask':0x0,'Type':'number','Show':true,'Required':true},"Involved":{'Mask':0x1,'Type':'bool','Show':true,'Required':true}},'Show':true,'Required':true},"Disagree":{'Mask':0x2,'Type':'object','ObjectDataFields':{"Total":{'Mask':0x0,'Type':'number','Show':true,'Required':true},"Involved":{'Mask':0x1,'Type':'bool','Show':true,'Required':true}},'Show':true,'Required':true},"Comment":{'Mask':0x4,'Type':'object','ObjectDataFields':{"Total":{'Mask':0x0,'Type':'number','Show':true,'Required':true},"Involved":{'Mask':0x1,'Type':'bool','Show':true,'Required':true}},'Show':true,'Required':true},"Report":{'Mask':0x8,'Type':'object','ObjectDataFields':{"Total":{'Mask':0x0,'Type':'number','Show':true,'Required':true},"Involved":{'Mask':0x1,'Type':'bool','Show':true,'Required':true}},'Show':true,'Required':true},},'Show':true,'Required':false};};CCC.FORUM.FIELDS={"TYPE":{'Mask':0x0,'Description':'Type of the message, this is '+CCC.STATIC.TYPE.FORUM+' for a top of order book.','Type':'string','Show':false,'Required':true},"Id":{'Mask':0x0,'Description':'ID of the forum message','Type':'number','Show':true,'Filter':'Market','Required':true},"Timestamp":{'Mask':0x0,'Description':'The timestamp the action occurred','Type':'number','Show':true,'Required':true},"Cryptopian":getCryptopianObject(),"Type":{'Mask':0x0,'Description':'The type of the action Post or PostA','Type':'string','Show':true,'Filter':'Market','Required':true},"ThreadId":{'Mask':0x1,'Description':'The ID of the entity (Forum or Review page) on which the action is occurring','Type':'number','Show':true,'Required':true},"ActionType":{'Mask':0x2,'Description':'If the action is agree (0) or disagree (1)','Type':'number','Show':true,'Filter':'Market','Required':false},"Body":{'Mask':0x4,'Description':'The body of the post','Type':'string','Show':true,'Required':true},"Sticky":{'Mask':0x8,'Description':'Whether or not the performed action is stickied','Type':'bool','Show':true,'Required':true},"Edited":{'Mask':0x10,'Description':'Whether or not the performed action is an edit','Type':'bool','Show':true,'Required':true},"Actions":getActionsObject(0x20),"Notification":{'Mask':0x40,'Type':'bool','Show':true,'Required':true},"ReplyTo":{'Mask':0x80,'Description':'The ID of the post being replied to','Type':'number','Show':true,'Required':true},"Target":{'Mask':0x100,'Type':'object','ObjectDataFields':{"Id":{'Mask':0x1,'Type':'number','Show':true,'Required':true},"Type":{'Mask':0x2,'Type':'string','Show':true,'Required':true},"ReplyTo":{'Mask':0x0,'Description':'The ID of the post being replied to','Type':'number','Show':true,'Required':true},'ThreadId':{'Mask':0x0,'Description':'The ID of the entity (Forum or Review page) on which the action is occurring','Type':'string','Show':true,'Required':true},'Parent':{'Mask':0x0,'Description':'Object of the parent forum thread','Type':'object','ObjectDataFields':{"Id":{'Mask':0x0,'Type':'number'},"Name":{'Mask':0x0,'Type':'string'},"ImageUrl":{'Mask':0x1,'Type':'string'},"Url":{'Mask':0x2,'Type':'string'},"Type":{'Mask':0x4,'Type':'string'},},'Show':true,'Required':false},'Cryptopian':getCryptopianObject(),"Body":{'Mask':0x4,'Type':'string','Show':true,'Required':false},"Timestamp":{'Mask':0x8,'Type':'number','Show':true,'Required':true},"Actions":getActionsObject(0x10),},'Show':true,'Required':true},"Parent":{'Mask':0x200,'Type':'object','ObjectDataFields':{"Id":{'Mask':0x1,'Type':'number','Show':true,'Required':true},"Name":{'Mask':0x2,'Type':'string','Show':true,'Required':true},"ImageUrl":{'Mask':0x4,'Type':'string','Show':true,'Required':true},"Url":{'Mask':0x8,'Type':'string','Show':true,'Required':true},"Type":{'Mask':0x10,'Type':'string','Show':true,'Required':true},},'Show':true,'Required':true},"ReplyToPost":{'Mask':0x400,'Type':'object','ObjectDataFields':{"Id":{'Mask':0x1,'Type':'number','Show':true,'Required':true},"Type":{'Mask':0x2,'Type':'string','Show':true,'Required':true},'Cryptopian':getCryptopianObject(0x4),"Body":{'Mask':0x8,'Type':'string','Show':true,'Required':false},"Timestamp":{'Mask':0x10,'Type':'number','Show':true,'Required':true},"Actions":getActionsObject(0x20)},'Show':true,'Required':true},"Recipient":{'Type':'object','ObjectDataFields':{"user_id":{Type:'number',Required:true},},'Show':true,'Required':true},};CCC.FORUM.unpack=function(forumMessagePacked,fieldDefinition){if(!fieldDefinition){fieldDefinition=CCC.FORUM.FIELDS;} 554let currentValue='';let messageLevels={0:[]};let currentMessageLevel=0;let currentIndex=0;let topOfBookPackedLength=forumMessagePacked.length;while(currentIndex<topOfBookPackedLength){switch(forumMessagePacked[currentIndex]){case'~':messageLevels[currentMessageLevel].push(currentValue);currentValue='';break;case'{':currentMessageLevel++;messageLevels[currentMessageLevel]=[];currentMessageLevel++;messageLevels[currentMessageLevel]=[];break;case'[':currentMessageLevel++;messageLevels[currentMessageLevel]=[];currentMessageLevel++;messageLevels[currentMessageLevel]=[];break;case'}':if(currentValue!==''){messageLevels[currentMessageLevel].push(currentValue);currentValue=messageLevels[currentMessageLevel];currentMessageLevel--;messageLevels[currentMessageLevel]='{'+currentValue.join('~')+'}';}else{currentMessageLevel--;} 555currentValue=messageLevels[currentMessageLevel];currentMessageLevel--;break;case']':if(currentValue!==''){messageLevels[currentMessageLevel].push(currentValue
555);currentValue=messageLevels[currentMessageLevel];messageLevels[currentMessageLevel]=[];currentMessageLevel--;messageLevels[currentMessageLevel].push(currentValue);}else{currentMessageLevel--;} 556currentValue=messageLevels[currentMessageLevel];currentMessageLevel--;break;case';':messageLevels[currentMessageLevel].push(currentValue);currentValue=messageLevels[currentMessageLevel];messageLevels[currentMessageLevel]=[];currentMessageLevel--;messageLevels[currentMessageLevel].push(currentValue);currentMessageLevel++;currentValue='';break;default:currentValue+=forumMessagePacked[currentIndex];} 557currentIndex++;} 558messageLevels[0].push(currentValue);let messageParts=messageLevels[0];let maskInt=parseInt(messageParts[messageParts.length-1],16);let forumSnapshotObject={};let currentField=0;for(let property in fieldDefinition){let currentPropertyInfo=fieldDefinition[property];if(currentPropertyInfo.Mask===0||maskInt¤tPropertyInfo.Mask){if(currentPropertyInfo.Type==='string'&&messageParts[currentField]){forumSnapshotObject[property]=decodeString(messageParts[currentField]);}else if(currentPropertyInfo.Type==='bool'){forumSnapshotObject[property]=messageParts[currentField]=='true';}else if(currentPropertyInfo.Type==='number'||currentPropertyInfo.Type==='timestamp'){forumSnapshotObject[property]=parseFloat(messageParts[currentField]);}else if(currentPropertyInfo.Type==='array'){forumSnapshotObject[property]=[];for(let i=0,len=messageParts[currentField].length;i<len;i++){let currentSubMessageParts=messageParts[currentField][i];let subMessageObject={};let objectMaskInt=currentSubMessageParts[currentSubMessageParts.length-1];let currentPropertyInArray=0;for(let propertyInArrayDataFields in currentPropertyInfo.ArrayDataFields){let currentSubPropertyField=currentPropertyInfo.ArrayDataFields[propertyInArrayDataFields];if(currentSubPropertyField.Mask===0||currentSubPropertyField.Mask&objectMaskInt){if(currentSubPropertyField.Type==='string'){subMessageObject[propertyInArrayDataFields]=currentSubMessageParts[currentPropertyInArray];}else if(currentSubPropertyField.Type==='number'||currentSubPropertyField.Type==='timestamp'){subMessageObject[propertyInArrayDataFields]=parseFloat(currentSubMessageParts[currentPropertyInArray]);} 559currentPropertyInArray++;}} 560forumSnapshotObject[property].push(subMessageObject);}}else if(currentPropertyInfo.Type==='object'){if(messageParts[currentField]){forumSnapshotObject[property]=CCC.FORUM.unpack(messageParts[currentField].substring(1,messageParts[currentField].length-1),fieldDefinition[property].ObjectDataFields);}} 561currentField++;}} 562return forumSnapshotObject;};function decodeString(str){var charsToDecode=['~','{','}','[',']',';','|'];for(var i=0;i<charsToDecode.length;i++){str=str.replace(new RegExp('&#'+charsToDecode[i].charCodeAt()+':','g'),charsToDecode[i]);} 563return str;} 564CCC.FORUM.getKey=function(forumMessage){switch(forumMessage.Type){case'Post':case'PostEdit':case'PostDelete':case'PostUnDelete':return CCC.STATIC.TYPE.FORUM+'~'+forumMessage.ThreadId;case'PostA':return CCC.STATIC.TYPE.FORUM+'~'+forumMessage.Target.Parent.Id;}};CCC.FORUM.getKeyWithParams=function(threadId){return CCC.STATIC.TYPE.FORUM+'~'+threadId;};CCC.NOTIFICATION=CCC.NOTIFICATION||{};CCC.NOTIFICATION.pack=function(notificationMessageObject){return CCC.STATIC.TYPE.NOTIFICATION+'~'+JSON.stringify(notificationMessageObject)} 565CCC.NOTIFICATION.unpack=function(notificationString){let notification=JSON.parse(notificationString.split('~')[1]);notification.TYPE=CCC.STATIC.TYPE.NOTIFICATION;return notification;} 566CCC.NOTIFICATION.getRecipientKey=function(notificationMessage){let recipientKey='';if(notificationMessage.Recipient!==undefined&¬ificationMessage.Recipient.user_id){recipientKey=CCC.STATIC.TYPE.NOTIFICATION+'~'+notificationMessage.Recipient.user_id;} 567return recipientKey;} 568CCC.NOTIFICATION.getRecipientKeyWithParams=function(recipientId){return CCC.STATIC.TYPE.NOTIFICATION+'~'+recipientId;}; 569;;;angular.module('ccc-app').factory('cookieService',['$rootScope',function cookieServiceFactory($rootScope){var cookieServiceInterface={};
569cookieServiceInterface.setItem=function(key,value){cookieServiceInterface.setCookie(key,value,1000,'/');};cookieServiceInterface.removeItem=function(key,value){cookieServiceInterface.setCookie(key,value,-1,'/');};cookieServiceInterface.setCookie=function(cname,cvalue,exdays,path){var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000));var expires="expires="+d.toUTCString();var cookieString=cname+"="+cvalue+"; "+expires+"; path="+path;document.cookie=cookieString;};cookieServiceInterface.getCookie=function(cname){var name=cname+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length);} 570return"";};return cookieServiceInterface;}]);angular.module('ccc-app').factory('urlGetParamsService',['$rootScope',function cookieServiceFactory($rootScope){var getParams={} 571getParams.getParamsAsObj=function(){var objectToReturn={};var getParamsArray=window.location.search.split("&");if(getParamsArray[0]===''){return objectToReturn;} 572if(getParamsArray[0][0]==='?'){getParamsArray[0]=getParamsArray[0].substring(1);} 573for(var i=0,len=getParamsArray.length;i<len;i++){var paramsSplit=getParamsArray[i].split("=");if(paramsSplit.length===2){objectToReturn[decodeURIComponent(paramsSplit[0])]=decodeURIComponent(paramsSplit[1]);}} 574return objectToReturn;};return getParams;}]);angular.module('ccc-app').factory('pageInfo',['$http','$timeout','$filter','$window','$location','$rootScope',function pageInfoFactory($http,$timeout,$filter,$window,$location,$rootScope){var utilStatic=CCC.STATIC.UTIL;var aboutItems=[];var displayAboutItems=[];var userCountryCode='US';var exchangesInfo={};var pageTrackingCode=0;var pageTrackingPromise;var pageTrackingType;var secondLevelNav=[];var currentPostId=0;var currentReviewId=0;var seoInfo={};var initialSeoInfo={};var generalInfo={};var supportedPlatforms=[];var pageSubs=[];var highestMarketSubs=[];var streamerDataRaw=[];var pageViewRecorded=true;var idsForInfo={};var idsForInfoView={};var ICOInfo={Status:"N/A"};var ICOInfos=[];var ICOTableItems=[];var supportedPlatformItems=[];var serviceObjectToReturn={};serviceObjectToReturn.isMobile=function(){var stringForCheck=navigator.userAgent||navigator.vendor||window.opera;var regexForCheck=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i 575var fourCharsRegexForCheck=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i 576if(regexForCheck.test(stringForCheck)||fourCharsRegexForCheck.test(stringForCheck.substr(0,4))){return true;} 577return false;};serviceObjectToReturn.setTopSlots=function(arrayOfSlots){for(var i=0;i<arrayOfSlots.length;i++){serviceObjectToReturn.addIdForInfo(arrayOfSlots[i].externalId,arrayOfSlots[i].countriesList,arrayOfSlots[i].typePosition,arrayOfSlots[i]);}};serviceObjectToReturn.setSideBarSlot=function(arrayOfSlots){for(var i=0;i<arrayOfSlots.length;i++){serviceObjectToReturn.addIdForInfo(arrayOfSlots[i].externalId,arrayOfSlots[i].countriesList,'sidebar',arrayOfSlots[i]);}};serviceObjectToReturn.setSlots=function(arrayOfSlots,typeInfo){for(var i=0;i<arrayOfSlots.length;i++){serviceObjectToReturn.addIdForInfo(arrayOfSlots[i].externalId,arrayOfSlots[i].countriesList,typeInfo,arrayOfSlots[i]);}};serviceObjectToReturn.setDropdownSlots=function(arrayOfSlots){for(var i=0;i<arrayOfSlots.length;i++){serviceObjectToReturn.addIdForInfo(arrayOfSlots[i].name+arrayOfSlots[i].id,arrayOfSlots[i].countriesList,'dropdown',arrayOfSlots[i]);}};serviceObjectToReturn.setHomepageChartSlots=function(arrayOfSlots){for(var i=0;i<arrayOfSlots.length;i++){serviceObjectToReturn.addIdForInfo(arrayOfSlots[i].externalId,arrayOfSlots[i].countriesList,arrayOfSlots[i].typePosition,arrayOfSlots[i]);}};serviceObjectToReturn.shouldShowInfoDisplay=function(idForInfo){if(idsForInfo[idForInfo].excludedCountries.length>0&&idsForInfo[idForInfo].excludedCountries.indexOf(userCountryCode)===-1){return false;} 578if(idsForInfo[idForInfo].countries.length>0&&idsForInfo[idForInfo].countries.indexOf(userCountryCode)!==-1){return false;} 579return true;};serviceObjectToReturn.timeOutIncreaseInfo=function(){$timeout(function(){serviceObjectToReturn.increaseInfo(Object.keys(idsForInfoView))},5000,false);};serviceObjectToReturn.increaseInfo=function(ids){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params'].type="YES";if(window.canHaveIt==='yes'){paramsForCall['params'].type="NO";} 580paramsForCall['params'].ids=ids.join(',');paramsForCall['params'].view=serviceObjectToReturn.isMobile()?'2':'1';$http.get(CCC.toolsApiUrl+"people/increase",paramsForCall).then(function(res){},function(err){});};serviceObjectToReturn.addIdForInfo=function(idForInfo,countryInfo,typeInfo,data){idsForInfo[idForInfo]={'id':idForInfo,'excludedCountries':[],'countries':[],'typeInfo':typeInfo,'data':data};let currentTsMs=new Date().getTime();if(idsForInfo[idForInfo].data['externalInfoImageURLDesktop']!==undefined&&idsForInfo[idForInfo].data['externalInfoImageURLDesktop']!==''){idsForInfo[idForInfo].data['externalInfoImageURLDesktop']=idsForInfo[idForInfo].data['externalInfoImageURLDesktop'].replace('[timestamp]',currentTsMs);} 581if(idsForInfo[idForInfo].data['externalInfoImageURLMobile']!==undefined&&idsForInfo[idForInfo].data['externalInfoImageURLMobile']!==''){idsForInfo[idForInfo].data['externalInfoImageURLMobile']=idsForInfo[idForInfo].data['externalInfoImageURLMobile'].replace('[timestamp]',currentTsMs);} 582if(typeof idsForInfo[idForInfo].data['externalInfoImageURL']==='string'){idsForInfo[idForInfo].data['externalInfoImageURL']=idsForInfo[idForInfo].data['externalInfoImageURL'].replace('[timestamp]',currentTsMs);} 583if(countryInfo!==''){if(countryInfo[0]==='!'){idsForInfo[idForInfo].excludedCountries=countryInfo.substr(1).split(",");}else{idsForInfo[idForInfo].countries=countryInfo.split(",");}} 584if(data.options&&data.options.length){var options=[];for(var i=0;i<data.options.length;i++){var option=data.options[i];serviceObjectToReturn.addIdForInfo(idForInfo+i,option.countriesList,typeInfo+'_child',option);options.push(idsForInfo[idForInfo+i])} 585idsForInfo[idForInfo].data.options=options;}};serviceObjectToReturn.filterByCountry=function(slotItem){if(slotItem.excludedCountries&&slotItem.excludedCountries.length>0&&slotItem.excludedCountries.indexOf(userCountryCode)!==-1){return false;} 586if(slotItem.countries&&slotItem.countries.length>0&&slotItem.countries.indexOf(userCountryCode)===-1){return false;} 587return true;} 588serviceObjectToReturn.getSlotInfo=function(typeInfo,getAllAvailableOptions){let options=[] 589let objectToReturn={isActive:false};for(let idForInfo in idsForInfo){if(idsForInfo[idForInfo].typeInfo===typeInfo){objectToReturn.name=idsForInfo[idForInfo].name 590if(idsForInfo[idForInfo].data.options){for(var i=idsForInfo[idForInfo].data.options.length;i--;){var childOption=idsForInfo[idForInfo].data.options[i];if(!serviceObjectToReturn.filterByCountry(childOption)){idsForInfo[idForInfo].data.options.splice(i,1);}}} 591if(serviceObjectToReturn.filterByCountry(idsForInfo[idForInfo])){options.push(idsForInfo[idForInfo].data);}}} 592if(getAllAvailableOptions){options.map(function(option){option.isActive=true});objectToReturn=options;}else{if(options.length===0){return objectToReturn;} 593if(options.length===1){objectToReturn=options[0];objectToReturn.isActive=true;idsForInfoView[objectToReturn.externalId]=true;return objectToReturn;} 594objectToReturn=options[Math.floor(Math.random()*options.length)];objectToReturn.isActive=true;idsForInfoView[objectToReturn.externalId]=true;} 595return objectToReturn;};serviceObjectToReturn.addIdForInfoView=function(id){idsForInfoView[id]=true;} 596serviceObjectToReturn.setUserCountryCode=function(countryCode){userCountryCode=countryCode;};serviceObjectToReturn.getUserCountryCode=function(countryCode){return userCountryCode;};serviceObjectToReturn.trackPage=function(trackingCode,type){if(trackingCode){pageTrackingCode=trackingCode;pageTrackingType=type;if(pageTrackingPromise){$timeout.cancel(pageTrackingPromise);} 597pageTrackingPromise=$timeout(function(){var objectToPost={};objectToPost.Code=pageTrackingCode;objectToPost.Type=pageTrackingType;$http.post("/api/tracking/pageview/",objectToPost);if(!pageViewRecorded){$window.ga('send','pageview',{page:$location.url()});}else{pageViewRecorded=false;}},10000,false);}};serviceObjectToReturn.changeICOToOngoing=function(){if(ICOInfo.Status=="Upcoming"){ICOInfo.Status="Ongoing"};};serviceObjectToReturn.changeICOToFinished=function(){if(ICOInfo.Status=="Ongoing"){ICOInfo.Status="Finished"};};serviceObjectToReturn.isICOStage=function(){return ICOInfo.Status=="Ongoing"||ICOInfo.Status=="Upcoming";};serviceObjectToReturn.getTokenSaleType=function(){return ICOInfo.TokenSaleType;};serviceObjectToReturn.isTradingStage=function(){return ICOInfo.Status=="N/A"||ICOInfo.Status=="Finished";};serviceObjectToReturn.didNotDoAnICO=function(){return ICOInfo.Status=="N/A";};serviceObjectToReturn.isICOOngoing=function(){return ICOInfo.Status=="Ongoing";};
597serviceObjectToReturn.isICOUpcoming=function(){return ICOInfo.Status=="Upcoming";};serviceObjectToReturn.isICOFinished=function(){return ICOInfo.Status=="Finished";};serviceObjectToReturn.hasICOData=function(){return ICOInfo.Status!=null&&ICOInfo.Status!="N/A";};serviceObjectToReturn.hasSupportedPlatforms=function(){return supportedPlatforms.length>0;};serviceObjectToReturn.hasICOStartDate=function(){return ICOInfo.hasOwnProperty('Date')&&ICOInfo.Date>0;};serviceObjectToReturn.hasICOEndDate=function(){return ICOInfo.hasOwnProperty('EndDate')&&ICOInfo.EndDate>0;};serviceObjectToReturn.getICOFeatures=function(){return ICOInfo.Features;};serviceObjectToReturn.getICOWebsite=function(){return ICOInfo.WebsiteLink;};serviceObjectToReturn.getICOWhitePaper=function(){return ICOInfo.WhitePaperLink;};serviceObjectToReturn.getTotalSupply=function(){return generalInfo.TotalCoinSupply;};serviceObjectToReturn.getInvestorPercent=function(){return ICOInfo.TokenPercentageForInvestors;};serviceObjectToReturn.getICOFundingTarget=function(){return ICOInfo.FundingTarget;};serviceObjectToReturn.getICOFundinCap=function(){return ICOInfo.FundingCap;};serviceObjectToReturn.getICOStartPrice=function(){if(ICOInfo.StartPrice=="N/A"){return ICOInfo.StartPrice};return utilStatic.convertValueToDisplay(ICOInfo.StartPriceCurrency,ICOInfo.StartPrice,$filter('number'),'short',false)};serviceObjectToReturn.getFundsRaisedUSD=function(){return ICOInfo.FundsRaisedUSD;};serviceObjectToReturn.getAveragePriceUSD=function(ICOInfo){var avgPrice="N/A";var funds=parseInt(ICOInfo.FundsRaisedUSD);var percent=parseInt(ICOInfo.TokenPercentageForInvestors);var tokens=parseInt(ICOInfo.ICOTokenSupply);if(isNaN(funds)||funds==0){return avgPrice;} 598if(isNaN(percent)||percent==0){return avgPrice;} 599if(isNaN(tokens)||tokens==0){return avgPrice;} 600avgPrice=funds/(percent/100*tokens);return utilStatic.convertValueToDisplay("USD",avgPrice,$filter('number'),'short',false);};serviceObjectToReturn.getICOCoinsOffered=function(){var coinsOffered="N/A";var percent=parseInt(ICOInfo.TokenPercentageForInvestors);var tokens=parseInt(ICOInfo.ICOTokenSupply);if(isNaN(percent)||percent==0){return coinsOffered;} 601if(isNaN(tokens)||tokens==0){return coinsOffered;} 602coinsOffered=percent/100*tokens;return utilStatic.convertValueToDisplay('',coinsOffered,$filter('number'),'short',false)+' ('+percent+'%)';};serviceObjectToReturn.convertStringToNumber=function(data){if(data!=''){if(data=="0"){return"Not Applicable";} 603return $filter('number')(data,2);} 604return'-';};serviceObjectToReturn.parseTokenReserveSplit=function(tokenReserveSplit,tokenSaleSupply){if(tokenReserveSplit.length===0){return"N/A";} 605let splitArray=[];for(let splitItem of tokenReserveSplit){splitArray.push(((splitItem.TOTAL_TOKENS/tokenSaleSupply)*100).toFixed(1)+'% '+splitItem.CATEGORY[0])} 606return splitArray.join(', ');};serviceObjectToReturn.parseFundsRaised=function(fundsRaisedList){if(fundsRaisedList.length===0){return"N/A";} 607let fundsArray=[];for(let fundsRaisedItem of fundsRaisedList){fundsArray.push(utilStatic.convertValueToDisplay("",fundsRaisedItem.TOTAL_VALUE,$filter('number'),'short')+' '+fundsRaisedItem.CURRENCY);} 608return fundsArray.join(', ');};function getExplorerLink(coinInfo){if(!coinInfo.SmartContractAddress){return'';} 609var smartContractAddress=coinInfo.SmartContractAddress.Value||coinInfo.SmartContractAddress;var blockExplorerUrl=coinInfo.BlockExplorerUrl.Value||coinInfo.BlockExplorerUrl;var abbreviatedAddress='';if(smartContractAddress.length>13){abbreviatedAddress=smartContractAddress.slice(0,10)+'...'+smartContractAddress.slice(-10);}else{abbreviatedAddress=smartContractAddress;} 610return'<a target="_blank" href="'+blockExplorerUrl+'">'+abbreviatedAddress+'</a>';};serviceObjectToReturn.setCoinPageInfo=function(apiResponse){seoInfo=apiResponse.Data.SEO;for(var attr in apiResponse.Data.SEO){initialSeoInfo[attr]=apiResponse.Data.SEO[attr];} 611generalInfo=apiResponse.Data.General;supportedPlatforms=apiResponse.Data.SupportedPlatforms;ICOInfos=apiResponse.Data.ICO;if(ICOInfos.length>0){ICOInfo=ICOInfos[0];} 612pageSubs=apiResponse.Data.Subs;highestMarketSubs=apiResponse.Data.NonCCCAGGSubs;streamerDataRaw=apiResponse.Data.StreamerDataRaw;var totalSupply=serviceObjectToReturn.convertStringToNumber(generalInfo.TotalCoinSupply);var startDateString='-';var mktCapPenaltyString='0 %';if(totalSupply==='0.00'||totalSupply==='-'){totalSupply='Not Available';} 613if(totalSupply==='-1.00'){totalSupply='Not Applicable';} 614var totalCoinsMined=serviceObjectToReturn.convertStringToNumber(generalInfo.TotalCoinsMined);var circulatingSupply=serviceObjectToReturn.convertStringToNumber(generalInfo.SupplyCirculating);if(generalInfo.StartDate!==undefined&&generalInfo.StartDate!=='0000-00-00'){startDateString=generalInfo.StartDate;} 615if(generalInfo.MktCapPenalty!==undefined){mktCapPenaltyString=generalInfo.MktCapPenalty+' %';} 616serviceObjectToReturn.addDisplayAboutItem({'label':'Whitepaper','text':generalInfo.WhitePaper||'-','visible':true,'hasExtraInfo':true,'extraInfo':'A white paper, also written as "whitepaper", a document released by the project that gives investors technical information about its concept, its purpose, how it works, etc.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Launch Date','text':startDateString,'visible':true,'hasExtraInfo':true,'extraInfo':'The launch date of the asset is indicated as (yyyy-mm-dd). However, if the asset was initially established as a token before being integrated into a blockchain, the launch date is reset to the creation of the first block when the blockchain is launched for the token.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Max Supply','text':totalSupply,'visible':true,'hasExtraInfo':true,'extraInfo':"The maximum number of asset parts (coins/tokens) that will ever be issued (supply_circulating + supply_burnt + supply_locked + all supply that has not been issued yet but is planned to be issued in the future). For assets (coins/tokens) that have infinite supply, we use -1."});serviceObjectToReturn.addDisplayAboutItem({'label':'Total Supply','text':totalCoinsMined,'visible':true,'hasExtraInfo':true,'extraInfo':"The number of asset parts (coins/tokens) that have been issued so far excluding burnt tokens. (supply_circulating + supply_locked)"});serviceObjectToReturn.addDisplayAboutItem({'label':'Circulating Supply','text':circulatingSupply,'visible':true,'hasExtraInfo':true,'extraInfo':"Also referred to as free float or public float. The number of asset parts (coins/tokens) that are available to be traded and it excludes burnt supply and locked supply."});serviceObjectToReturn.addDisplayAboutItem({'label':'Mkt. Cap. Penalty','text':mktCapPenaltyString,'visible':true,'hasExtraInfo':true,'extraInfo':'The penalty we apply when we calculate the mkt cap of this asset.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Website','text':generalInfo.Website||'-','visible':true,'hasExtraInfo':true,'extraInfo':'The link for the official project website.'});if(supportedPlatforms.length>0){supportedPlatforms.sort(function(a,b){return b.LaunchDate.Value-a.LaunchDate.Value;}) 617for(let supportedPlatform of supportedPlatforms){serviceObjectToReturn.addSupportedPlatformItems({isInherited:supportedPlatform.IsInherited,isAssetIssuer:supportedPlatform.IsAssetIssuer,items:[{'label':'Trading As','text':supportedPlatform.TradingAs.V
617alue||'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.TradingAs.Description},{'label':'Token Standard','text':supportedPlatform.TokenStandard.Value||'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.TokenStandard.Description},{'label':'Built On','text':supportedPlatform.BuiltOn.Value||'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.BuiltOn.Description},{'label':'Bridge Operator','text':supportedPlatform.BridgeOperator.Value||'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.BridgeOperator.Description},{'label':'Smart Contract Address','text':getExplorerLink(supportedPlatform)||'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.SmartContractAddress.Description},{'label':'Launch Date','text':supportedPlatform.LaunchDate.Value?$filter('date')(supportedPlatform.LaunchDate.Value*1000,"yyyy-MM-dd"):'-','visible':true,'hasExtraInfo':true,'extraInfo':supportedPlatform.LaunchDate.Description},]});}} 618if(generalInfo.PlatformType.Value==='Blockchain'){serviceObjectToReturn.addDisplayAboutItem({'label':'Consensus Mechanisms','text':generalInfo.ProofType.Value||'-','visible':true,'hasExtraInfo':true,'extraInfo':generalInfo.ProofType.Description});serviceObjectToReturn.addDisplayAboutItem({'label':'Hashing Algorithms','text':generalInfo.Algorithm.Value||'-','visible':true,'hasExtraInfo':true,'extraInfo':generalInfo.Algorithm.Description});serviceObjectToReturn.addDisplayAboutItem({'label':'Block Nr.','text':serviceObjectToReturn.convertStringToNumber(generalInfo.BlockNumber),'visible':true,'hasExtraInfo':true,'extraInfo':'The latest block number issued by the network.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Block Reward','text':serviceObjectToReturn.convertStringToNumber(generalInfo.BlockReward),'visible':true,'hasExtraInfo':true,'extraInfo':'The total reward that is distributed to opeartors of the network (miners, validators, etc). LAST_BLOCK_MINT + LAST_BLOCK_TRANSACTION_FEE_TOTAL - LAST_BLOCK_BURN.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Network H/s','text':serviceObjectToReturn.convertStringToNumber(generalInfo.NetHashesPerSecond),'visible':true,'hasExtraInfo':true,'extraInfo':'The total rounds of hashing that are estimated to have been computed in order to produce the most recently issued block. Use -1 for not applicable.'});}else{serviceObjectToReturn.addDisplayAboutItem({'label':'Built On','text':generalInfo.BuiltOn,'visible':true,'hasExtraInfo':true,'extraInfo':'The is linked to the asset representing a specific chain.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Token Standard','text':generalInfo.TokenStandard||'-','visible':true,'hasExtraInfo':true,'extraInfo':'This is linked to the Blockhain field and it is one of the SUPPORTED_STANDARDS available on that platform.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Smart Contract Address','text':getExplorerLink(generalInfo),'visible':true,'hasExtraInfo':false,'extraInfo':''});serviceObjectToReturn.addDisplayAboutItem({'label':'Decimal Places','text':generalInfo.Decimals||'-','visible':true,'hasExtraInfo':true,'extraInfo':'The number of decimal points on the specific blockchain platform for this token.'});serviceObjectToReturn.addDisplayAboutItem({'label':'Parent Asset Symbol','text':generalInfo.ParentAssetSymbol||'-','visible':true,'hasExtraInfo':true,'extraInfo':'The base asset / parent asset / main asset that this token is liked to / pegged to.'});} 619if(ICOInfos.length>0){for(let ICOInfo of ICOInfos){var ICOTable=[];ICOTable.push({'label':'Status','text':ICOInfo.Status,'visible':true,'hasExtraInfo':false,'extraInfo':''});ICOTable.push({'label':'Sale Type','text':ICOInfo.TokenSaleType.Value,'visible':true,'hasExtraInfo':false,'extraInfo':ICOInfo.TokenSaleType.Description});ICOTable.push({'label':'Reserve Split','text':serviceObjectToReturn.parseTokenReserveSplit(ICOInfo.TokenReserveSplit,generalInfo.TotalCoinsMined),'visible':true,'hasExtraInfo':true,'extraInfo':'T - team, partners, contributors, and avisers, B - bounties, C - held by company or foundation, O - other'});ICOTable.push({'label':'Percentage for investors','text':ICOInfo.TokenPercentageForInvestors!="N/A"?ICOInfo.TokenPercentageForInvestors+"%":'N/A','visible':true,'hasExtraInfo':true,'extraInfo':'This is the percentage of token sale supply not of max supply.'});if(ICOInfo.ICOTokenSupply=="N/A"){ICOTable.push({'label':'Total token supply','text':'N/A','visible':true,'hasExtraInfo':true,'extraInfo':'Total max supply is '+serviceObjectToReturn.convertStringToNumber(generalInfo.TotalCoinSupply)});}else{ICOTable.push({'label':'Total token sale supply','text':utilStatic.
619convertValueToDisplay("",ICOInfo.ICOTokenSupply,$filter('number'),'short',false),'visible':true,'hasExtraInfo':true,'extraInfo':'Total tokens reserved for token sale is '+serviceObjectToReturn.convertStringToNumber(ICOInfo.ICOTokenSupply)});} 620if(ICOInfo.Date>0){ICOTable.push({'label':'Start Date','text':$filter('date')(ICOInfo.Date*1000,"yyyy, dd MMM H:mm:ss"),'visible':true,'hasExtraInfo':false,'extraInfo':''});}else{ICOTable.push({'label':'Start Date','text':'Not Available','visible':true,'hasExtraInfo':false,'extraInfo':''});} 621if(ICOInfo.EndDate>0){ICOTable.push({'label':'End Date','text':$filter('date')(ICOInfo.EndDate*1000,"yyyy, dd MMM H:mm:ss"),'visible':true,'hasExtraInfo':false,'extraInfo':''});}else{ICOTable.push({'label':'End Date','text':'Not Available','visible':true,'hasExtraInfo':false,'extraInfo':''});} 622ICOTable.push({'label':'Supply post sale','text':ICOInfo.TokenSupplyPostICO.Value,'visible':true,'hasExtraInfo':false,'extraInfo':''});if(ICOInfo.StartPrice=="N/A"){ICOTable.push({'label':'Start price','text':'N/A','visible':true,'hasExtraInfo':false,'extraInfo':''});}else{ICOTable.push({'label':'Start price','text':utilStatic.convertValueToDisplay(ICOInfo.StartPriceCurrency,ICOInfo.StartPrice,$filter('number'),'short',false),'visible':true,'hasExtraInfo':true,'extraInfo':'Full Price: '+ICOInfo.StartPrice});} 623ICOTable.push({'label':'Funding target','text':ICOInfo.FundingTarget,'visible':true,'hasExtraInfo':false,'extraInfo':''});ICOTable.push({'label':'Funding cap','text':ICOInfo.FundingCap,'visible':true,'hasExtraInfo':false,'extraInfo':''});ICOTable.push({'label':'Average price','text':serviceObjectToReturn.getAveragePriceUSD(ICOInfo),'visible':true,'hasExtraInfo':true,'extraInfo':'This is calculated as:funds raised USD / (total tokens sold * pct sold to investors)'});ICOTable.push({'label':'Funds raised list','text':serviceObjectToReturn.parseFundsRaised(ICOInfo.FundsRaisedList),'visible':true,'hasExtraInfo':true,'extraInfo':'Funds raised in total over different payment methods'});if(ICOInfo.FundsRaisedUSD=="N/A"){ICOTable.push({'label':'Funds raised USD','text':'N/A','visible':true,'hasExtraInfo':false,'extraInfo':''});}else{ICOTable.push({'label':'Funds raised USD','text':utilStatic.convertValueToDisplay("USD",ICOInfo.FundsRaisedUSD,$filter('number'),'short',false),'visible':true,'hasExtraInfo':false,'extraInfo':''});} 624ICOTable.push({'label':'Payment method','text':ICOInfo.PaymentMethod.Value,'visible':true,'hasExtraInfo':true,'extraInfo':'Ways of contributing to the token sale'});ICOTable.push({'label':'Security Audit','text':ICOInfo.SecurityAuditCompany.Value,'visible':true,'hasExtraInfo':true,'extraInfo':ICOInfo.SecurityAuditCompany.Description});ICOTable.push({'label':'Legal Form','text':ICOInfo.LegalForm.Value,'visible':true,'hasExtraInfo':true,'extraInfo':ICOInfo.LegalForm.Description});ICOTable.push({'label':'Jurisdiction','text':ICOInfo.Jurisdiction.Value,'visible':true,'hasExtraInfo':true,'extraInfo':ICOInfo.Jurisdiction.Description});ICOTable.push({'label':'Legal Advisers','text':ICOInfo.LegalAdvisers.Value,'visible':true,'hasExtraInfo':true,'extraInfo':ICOInfo.LegalAdvisers.Description});ICOTable.push({'label':'Sale Website','text':ICOInfo.Website,'visible':true,'hasExtraInfo':false,'extraInfo':''});ICOTable.push({'label':'Blog','text':ICOInfo.Blog,'visible':true,'hasExtraInfo':false,'extraInfo':''});serviceObjectToReturn.addICOTable(ICOTable);}}};serviceObjectToReturn.setCurrentPageSection=function(pageSection){generalInfo.CurrentPageSection=pageSection;};serviceObjectToReturn.setExchangePageInfo=function(apiResponse){seoInfo=apiResponse.Data.SEO;for(var attr in apiResponse.Data.SEO){initialSeoInfo[attr]=apiResponse.Data.SEO[attr];} 625generalInfo=apiResponse.Data.General;pageSubs=apiResponse.Data.Subs;streamerDataRaw=apiResponse.Data.StreamerDataRaw;serviceObjectToReturn.addDisplayAboutItem({'label':'Twitter','text':'<a href="https://twitter.com/'+generalInfo.Twitter.replace('@','')+'" target="_blank">'+generalInfo.Twitter+'</a>'||'-','visible':true,'hasExtraInfo':false,'extraInfo':''});serviceObjectToReturn.addDisplayAboutItem({'label':'Website','text':generalInfo.Website||'-','visible':true,'hasExtraInfo':false,'extraInfo':''});};
625serviceObjectToReturn.setExchangeTopSymbols=function(symbols){generalInfo.TopSymbols=symbols;},serviceObjectToReturn.getExchangeTopSymbols=function(){return generalInfo.TopSymbols;},serviceObjectToReturn.setExchangePageTopItems=function(items){generalInfo.Volume=items.DISPLAYTOTALVOLUME24H.BTC;generalInfo.Grade=items.Grade;generalInfo.GradePoints=items.GradePoints;generalInfo.ItemType=items.ItemType.join(', ');},serviceObjectToReturn.setAllExchangesInfo=function(apiResponse){$rootScope.$broadcast('exchangeData',apiResponse);exchangesInfo=apiResponse.Data;},serviceObjectToReturn.setPaymentMethods=function(methodsList){generalInfo.PaymentMethods=[];if(methodsList!=""){generalInfo.PaymentMethods=methodsList.split(",");}};serviceObjectToReturn.setDepositMethods=function(methodsList){generalInfo.DepositMethods=[];if(methodsList!=""){generalInfo.DepositMethods=methodsList.split(",");}};serviceObjectToReturn.setWithdrawalMethods=function(methodsList){generalInfo.WithdrawalMethods=[];if(methodsList!=""){generalInfo.WithdrawalMethods=methodsList.split(",");}};serviceObjectToReturn.setHistoricalPriceData=function(apiHistoricalData){generalInfo.HistoricalPriceData=apiHistoricalData.Data;};serviceObjectToReturn.setPageId=function(id){generalInfo.Id=id;};serviceObjectToReturn.setBaseUrl=function(bUrl){generalInfo.BaseAngularUrl=bUrl;};serviceObjectToReturn.setDocumentType=function(dType){generalInfo.DocumentType=dType;};serviceObjectToReturn.setH1Text=function(value){generalInfo.H1Text=value;};serviceObjectToReturn.setSymbol=function(value){generalInfo.Symbol=value;};serviceObjectToReturn.setToSymbol=function(value){generalInfo.ToSymbol=value;};serviceObjectToReturn.setInfoName=function(value){generalInfo.Name=value;};serviceObjectToReturn.setInfoDescription=function(value){generalInfo.Description=value;};serviceObjectToReturn.setFeaturesInfo=function(value){generalInfo.Features=value;};serviceObjectToReturn.setTechnologyInfo=function(value){generalInfo.Technology=value;};serviceObjectToReturn.setLogo=function(value){generalInfo.ImageUrl=value;};serviceObjectToReturn.addICOTable=function(items){ICOTableItems.push(items);};serviceObjectToReturn.addSupportedPlatformItems=function(items){supportedPlatformItems.push(items);};serviceObjectToReturn.addDisplayAboutItem=function(item){displayAboutItems.push(item);};serviceObjectToReturn.setDisplayAboutItems=function(arrayOfObjects){displayAboutItems=arrayOfObjects;};serviceObjectToReturn.setForumId=function(value){generalInfo.Id=value;};serviceObjectToReturn.setReviewsId=function(value){generalInfo.Id=value;};serviceObjectToReturn.setSecondLevelNav=function(arrayOfObjects){secondLevelNav=arrayOfObjects;};serviceObjectToReturn.setCurrentPostId=function(postId){currentPostId=postId;};serviceObjectToReturn.setCurrentReviewId=function(reviewId){currentReviewId=reviewId;};serviceObjectToReturn.setBaseSEOTitle=function(baseSEOTitle){seoInfo.BaseSEOTitle=baseSEOTitle;};serviceObjectToReturn.setSEOTitle=function(seoTitle){seoInfo.PageTitle=seoTitle;};serviceObjectToReturn.setInitialSEOTitle=function(){seoInfo.BaseSEOTitle=initialSeoInfo.PageTitle.replace(generalInfo.H1Text+' - ','');};serviceObjectToReturn.addToSymbolToSEOTitle=function(){seoInfo.PageTitle=generalInfo.H1Text+' - '+generalInfo.ToSymbol+' - '+seoInfo.BaseSEOTitle;};serviceObjectToReturn.setBaseSEODescription=function(baseSEODescription){seoInfo.BaseSEOPageDescription=baseSEODescription;};serviceObjectToReturn.setSEODescription=function(seoDescription){seoInfo.PageDescription=seoDescription;};serviceObjectToReturn.setInitialSEODescription=function(){seoInfo.BaseSEOPageDescription="{{currencyPair}} - "+initialSeoInfo.PageDescription;};serviceObjectToReturn.addToSymbolToSEODescription=function(){seoInfo.PageDescription=seoInfo.BaseSEOPageDescription.replace(/{{currencyPair}}/g,generalInfo.H1Text+' - '+generalInfo.ToSymbol);};serviceObjectToReturn.setOgImageWidth=function(ogImageWidth){seoInfo.OgImageWidth=ogImageWidth;};serviceObjectToReturn.setInitialOgImageWidth=function(){seoInfo.OgImageWidth=initialSeoInfo.OgImageWidth;};serviceObjectToReturn.setOgImageHeight=function(ogImageHeight){seoInfo.OgImageHeight=ogImageHeight;};serviceObjectToReturn.setInitialOgImageHeight=function(){seoInfo.OgImageHeight=initialSeoInfo.OgImageHeight;};serviceObjectToReturn.setOgImage=function(ogImageUrl){seoInfo.OgImageUrl=ogImageUrl;};serviceObjectToReturn.setInitialOgImage=function(){seoInfo.OgImage=initialSeoInfo.OgImage;};serviceObjectToReturn.getIndividualInfo=function(){return generalInfo.IndividualInfo};serviceObjectToReturn.getBaseUrl=function(){return generalInfo.BaseAngularUrl;};serviceObjectToReturn.getDocumentType=function(){return generalInfo.DocumentType;};serviceObjectToReturn.getH1Text=function(){return generalInfo.H1Text;};serviceObjectToReturn.getH1TextTrimChars=function(stringToTrim){var index=generalInfo.H1Text.indexOf(stringToTrim);if(index!=-1) 626return generalInfo.H1Text.substr(0,index) 627return generalInfo.H1Text;};serviceObjectToReturn.getSymbol=function(){return generalInfo.Symbol;};serviceObjectToReturn.getInfoName=function(){return generalInfo.Name;};serviceObjectToReturn.getInfoDescription=function(){return generalInfo.Description;};serviceObjectToReturn.getICODescription=function(index){return ICOInfos[index].Description;};serviceObjectToReturn.getICOStatus=function(){return ICOInfo.Status;};serviceObjectToReturn.getICOTokenType=function(){return ICOInfo.TokenType;};serviceObjectToReturn.getICOStartDate=function(){return ICOInfo.Date*1000;};serviceObjectToReturn.getICOEndDate=function(){return ICOInfo.EndDate*1000;};serviceObjectToReturn.getFeaturesInfo=function(){return generalInfo.Features;};serviceObjectToReturn.getTechnologyInfo=function(){return generalInfo.Technology;};serviceObjectToReturn.getLogo=function(){return generalInfo.ImageUrl;};serviceObjectToReturn.getDisplayAboutItems=function(){return dis
627playAboutItems;};serviceObjectToReturn.getSupportedPlatformItems=function(){return supportedPlatformItems;} 628serviceObjectToReturn.getICOTableItems=function(){return ICOTableItems;};serviceObjectToReturn.getPageId=function(){return generalInfo.Id;};serviceObjectToReturn.getForumId=function(){return generalInfo.Id;};serviceObjectToReturn.getReviewsId=function(){return generalInfo.Id;};serviceObjectToReturn.getSecondLevelNav=function(){return secondLevelNav;};serviceObjectToReturn.getCoinsMined=function(){return generalInfo.TotalCoinsMined;};serviceObjectToReturn.getMktCapPenalty=function(){return generalInfo.MktCapPenalty;} 629serviceObjectToReturn.getTwitterHandle=function(){return generalInfo.Twitter;};serviceObjectToReturn.getTwitterHandleNoAtSign=function(){return generalInfo.Twitter.replace('@','');};serviceObjectToReturn.getCurrentPostId=function(){return currentPostId;};serviceObjectToReturn.getCurrentReviewId=function(){return currentReviewId;};serviceObjectToReturn.getGeneralInfoItem=function(itemName){if(generalInfo.hasOwnProperty(itemName)){return generalInfo[itemName];} 630return"";};serviceObjectToReturn.getDangerTop=function(){return generalInfo.DangerTop;};serviceObjectToReturn.getWarningTop=function(){return generalInfo.WarningTop;};serviceObjectToReturn.getToSymbol=function(){return generalInfo.ToSymbol;};serviceObjectToReturn.getInfoTop=function(){return generalInfo.InfoTop;};serviceObjectToReturn.getSEOTitle=function(){return seoInfo.PageTitle;};serviceObjectToReturn.getSEODescription=function(){return seoInfo.PageDescription;};serviceObjectToReturn.getOgImageWidth=function(){return seoInfo.OgImageWidth;};serviceObjectToReturn.getOgImageHeight=function(){return seoInfo.OgImageHeight;};serviceObjectToReturn.getOgImage=function(){return seoInfo.OgImageUrl;};serviceObjectToReturn.getPageSubs=function(){return pageSubs;};serviceObjectToReturn.getHighestMarketSubs=function(){return highestMarketSubs;};serviceObjectToReturn.getStreamerDataRaw=function(){return streamerDataRaw;};serviceObjectToReturn.getPaymentMethods=function(){return generalInfo.PaymentMethods||[];};serviceObjectToReturn.getDepositMethods=function(){return generalInfo.DepositMethods||[];};serviceObjectToReturn.getWithdrawalMethods=function(){return generalInfo.WithdrawalMethods||[];};serviceObjectToReturn.getWebsite=function(){return generalInfo.AffiliateURL||generalInfo.WebsiteUrl||"";};serviceObjectToReturn.getAllExchangesInfo=function(){return exchangesInfo;};serviceObjectToReturn.hasHistoricalPriceData=function(){return generalInfo.hasOwnProperty("HistoricalPriceData");};serviceObjectToReturn.getSideBarSlot=function(){return serviceObjectToReturn.getSlotInfo('sidebar');};serviceObjectToReturn.getBasesCanURL=function(){if(generalInfo.hasOwnProperty('ToSymbol')&&generalInfo.hasOwnProperty('CurrentPageSection')){if(generalInfo.CurrentPageSection=="post"){return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+generalInfo.CurrentPageSection+'/p_'+currentPostId+'/';}else if(generalInfo.CurrentPageSection=="influence"||generalInfo.CurrentPageSection=="forum"){return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+generalInfo.CurrentPageSection+'/';}else{return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+generalInfo.CurrentPageSection+'/'+generalInfo.ToSymbol;}} 631return'';};serviceObjectToReturn.getAMPURL=function(){if(generalInfo.CurrentPageSection=="post"){return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+generalInfo.CurrentPageSection+'/p_'+currentPostId+'/';}else if(generalInfo.CurrentPageSection=="forum"){return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+generalInfo.CurrentPageSection+'/';} 632if(generalInfo.hasOwnProperty('ToSymbol')){return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+'overview/'+generalInfo.ToSymbol;} 633return seoInfo.BaseUrl+generalInfo.BaseAngularUrl+'overview/USD';} 634return serviceObjectToReturn;}]);angular.module('ccc-app').factory('coinTabsAPI',['$http','$filter','toastNotifications',function coinTabsAPIFactory($http,$filter,toastNotifications){var utilStatic=CCC.STATIC.UTIL;function getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback){var formattedCoinData=[];var formattedSponsoredCoinData=[];var paramsForCall={};paramsForCall['withCredentials']=true;var conversionNotAvailable={Conversion:'not_available',ConversionSymbol:'',CurrencyFrom:'-',CurrencyTo:'-',Market:'-',Supply:0,TotalVolume24H:0,SubBase:'5~',SubsNeeded:[],RAW:[]} 635paramsForCall['params']={};paramsForCall['params']['limit']=limit;paramsForCall['params']['assetClass']=assetClass||'ALL';paramsForCall['params']['tsym']=toSymbol;paramsForCall['params']['page']=pageNumber;
635paramsForCall['params']['ascending']=ascending;paramsForCall['params']['extraParams']=CCC.pathForWebsite;$http.get(CCC.minApiUrl+endpointUrl,paramsForCall).then(function(res){var responseData=res.data.Data;var responseSponsoredData=res.data.SponsoredData||[];var metaData=res.data.MetaData;for(var iCoinData=0,lenCoinData=responseData.length;iCoinData<lenCoinData;iCoinData++){var coinInfo=responseData[iCoinData]['CoinInfo'];var subInfo=responseData[iCoinData]['ConversionInfo']||conversionNotAvailable;var coinObj={"CommonData":coinInfo,"SubInfo":subInfo,"Raw":subInfo['RAW'],"DATA":{},"DISPLAY":{},"VISUAL":{}};formattedCoinData.push(coinObj);} 636for(var iSponsoredCoinData=0,lenSponsoredCoinData=responseSponsoredData.length;iSponsoredCoinData<lenSponsoredCoinData;iSponsoredCoinData++){var coinInfo=responseSponsoredData[iSponsoredCoinData]['CoinInfo'];var subInfo=responseSponsoredData[iSponsoredCoinData]['ConversionInfo'];if(subInfo!==undefined){var coinObj={"CommonData":coinInfo,"SubInfo":subInfo,"Raw":subInfo['RAW'],"DATA":{},"DISPLAY":{},"VISUAL":{}};formattedSponsoredCoinData.push(coinObj);}};callback(formattedCoinData,formattedSponsoredCoinData,metaData);},function(err){toastNotifications.addNotification('error','Could not get coin data. Try reloading page');});} 637return{getToplistByTopTierTotalVolume:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/totaltoptiervol";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getToplistByDirectVolume:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/directvol";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getToplistByTotalVolume:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/totalvol";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getToplistByMktCap:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/mktcap";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getToplistByPrice:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/price";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getToplistByPercentageChange:function(limit,assetClass,toSymbol,pageNumber,ascending,callback){var endpointUrl="data/top/percent";getDataFromAPI(endpointUrl,limit,assetClass,toSymbol,pageNumber,ascending,callback);},getICOCoinData:function(status,limit,callback){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['status']=status;paramsForCall['params']['limit']=limit;$http.get('https://www.cryptocompare.com/api/data/icolist',paramsForCall).then(function(res){var icoArray=[];var icoList=res.data.Data;for(var key in icoList){var dataObj={};var displayObj={};var coin=icoList[key];coin.Symbol=key;var coinsOffered=0;var percent=parseFloat(coin.ICOTokenPercentageForInvestors);var tokens=parseInt(coin.ICOTokenSupply);if(isNaN(percent)||percent==0||isNaN(tokens)||tokens==0){dataObj.ICOCOINSOFFERED=0;displayObj.ICOCOINSOFFERED="-";}else{var offered=percent/100*tokens;dataObj.ICOCOINSOFFERED=offered;displayObj.ICOCOINSOFFERED=utilStatic.convertValueToDisplay("",offered,$filter('number'),'short');displayObj.ICOCOINSOFFERED+=" ("+utilStatic.convertValueToDisplay("",coin.ICOTokenPercentageForInvestors,$filter('number'),'short')+"%)";} 638coin.ICOStartPrice=parseFloat(coin.ICOStartPrice);if(isNaN(coin.ICOStartPrice)){dataObj.ICOSTARTPRICE=0;displayObj.ICOSTARTPRICE="-";}else if(icoList[key].ICOStartPriceCurrency=='USD'){dataObj.ICOSTARTPRICE=coin.ICOStartPrice;displayObj.ICOSTARTPRICE=displayObj.ICOPRICE=utilStatic.convertValueToDisplay('$',dataObj.ICOSTARTPRICE,$filter('number'));}else{dataObj.ICOSTARTPRICE=coin.ICOStartPrice;} 639if(!isNaN(coin.ICOFundsRaisedUSD)&&!isNaN(dataObj.ICOCOINSOFFERED)&&coin.ICOFundsRaisedUSD>0&&dataObj.ICOCOINSOFFERED>0){var averagePrice=coin.ICOFundsRaisedUSD/dataObj.ICOCOINSOFFERED;dataObj.ICOPRICE=averagePrice;
639displayObj.ICOPRICE=utilStatic.convertValueToDisplay('$',averagePrice,$filter('number'));}else{dataObj.ICOPRICE=0;displayObj.ICOPRICE="-";} 640if(isNaN(coin.ICOFundsRaisedUSD)||coin.ICOFundsRaisedUSD==0){dataObj.ICOFUNDSRAISEDUSD=0;displayObj.ICOFUNDSRAISEDUSD="-";}else{dataObj.ICOFUNDSRAISEDUSD=coin.ICOFundsRaisedUSD;displayObj.ICOFUNDSRAISEDUSD=utilStatic.convertValueToDisplay('$',coin.ICOFundsRaisedUSD,$filter('number'),'short');} 641dataObj.CHANGEPCT24HOUR=0;displayObj.CHANGEPCT24HOUR="-";dataObj.CHANGE24HOUR=0;displayObj.CHANGE24HOUR="-";dataObj.ICOSTATUS=coin.ICOStatus;var objToAdd={CommonData:icoList[key],Coin:{},DATA:dataObj,DISPLAY:displayObj,Subs:[],VISUAL:{},Sponsored:icoList[key].Sponsored} 642icoArray.push(objToAdd);};callback(icoArray);},function(err){toastNotifications.addNotification('error','Could not get ICO data. Try reloading page');});},getICOSubData:function(commaSeparatedSymbols,toCurrency){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['fsyms']=commaSeparatedSymbols;paramsForCall['params']['tsym']=toCurrency;paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/subsWatchlist",paramsForCall)}}}]);angular.module('ccc-app').factory('cccLocalStorage',['cookieService',function cccLocalStorageFactory(cookieService){var cccLocalStorageInterface={};var localStorageSupported=false;try{localStorage.setItem("localStorageSupported",true);localStorage.removeItem("localStorageSupported");localStorageSupported=true;}catch(e){localStorageSupported=false;};cccLocalStorageInterface.setObject=function(key,value){if(localStorageSupported){localStorage.setItem(key,JSON.stringify(value));}};cccLocalStorageInterface.getObject=function(key){var objectToReturn={};if(localStorageSupported){objectToReturn=localStorage.getItem(key);if(objectToReturn==null){objectToReturn={};}else{objectToReturn=JSON.parse(objectToReturn);}} 643return objectToReturn;};cccLocalStorageInterface.getArray=function(key){var objectToReturn=[];if(localStorageSupported){objectToReturn=localStorage.getItem(key);if(objectToReturn==null){objectToReturn=[];}else{objectToReturn=JSON.parse(objectToReturn);}} 644return objectToReturn;};cccLocalStorageInterface.setItem=function(key,value){if(localStorageSupported){localStorage.setItem(key,value);}else{cookieService.setItem(key,value);}};cccLocalStorageInterface.removeItem=function(key){if(localStorageSupported){localStorage.removeItem(key);}else{cookieService.removeItem(key);}};cccLocalStorageInterface.getText=function(key){var itemValue='';if(localStorageSupported){itemValue=localStorage.getItem(key);}else{itemValue=cookieService.getCookie(key);} 645if(itemValue===null){return'';} 646return itemValue;} 647cccLocalStorageInterface.getInteger=function(key){var itemValue=0;if(localStorageSupported){itemValue=localStorage.getItem(key);}else{itemValue=cookieService.getCookie(key);} 648if(itemValue===null){return 0;} 649return parseInt(itemValue,10);};return cccLocalStorageInterface;}]);angular.module('ccc-app').factory('cccLightsService',['$rootScope','cookieService',function cccLightsService($rootScope,cookieService){var cccLightsServiceInterface={};var lightsOffKey='lightsOff';cccLightsServiceInterface.isOn=function(){if(cookieService.getCookie(lightsOffKey)===''){return true;} 650return false;};cccLightsServiceInterface.turnOn=function(){cookieService.removeItem(lightsOffKey,'1');$rootScope.$emit("LightsChange");};cccLightsServiceInterface.turnOff=function(){cookieService.setItem(lightsOffKey,'1');$rootScope.$emit("LightsChange",'1');};return cccLightsServiceInterface;}]);angular.module('ccc-app').factory('profileManager',['$http','$filter',function profileManagerFactory($http,$filter){var profileStatsData={};var profileData={};var utilStatic=CCC.STATIC.UTIL;return{setAvatarUrl:function(avatarUrl){profileData.avatar_url=avatarUrl;},setId:function(cryptopianId){profileData.user_id=cryptopianId;},setBannedStatus:function(isBanned){profileData.is_banned=isBanned;},setCreationDate:function(createdOnTimestamp){profileData.creation_date=createdOnTimestamp;},setUsername:function(username){profileData.username=username;},setDescription:function(userDescription){profileData.description=userDescription;},setProfileStatsData:function(apiResponse){profileStatsData=apiResponse["Data"];},getProfileStatsData:function(){return profileStatsData;},getBannedStatus:function(){return profileData.is_banned;},getStatus:function(){if(profileData.is_banned==true){return"Banned";} 651return"Active";},getCreationDate:function(){return $filter('date')(new Date(profileData.creation_date*1000),'mediumDate');},getProfileStat:function(statName,showSummaryValue){if(profileStatsData.hasOwnProperty(statName)){if(showSummaryValue){return utilStatic.
651convertValueToDisplay("",profileStatsData[statName].Value||0,$filter('number'),'short',true);} 652return profileStatsData[statName].Value||0;} 653return 0;},hasUserTakenAQuiz:function(){var hasUserTakenAQuiz=false;if(profileStatsData.hasOwnProperty("Badges")){if(profileStatsData.Badges.length>0){hasUserTakenAQuiz=true;}} 654return hasUserTakenAQuiz;},getProfileBadges:function(){if(profileStatsData.hasOwnProperty("Badges")){return profileStatsData["Badges"];} 655return[];},getFollowers:function(userId,lastId){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['cId']=userId;if(lastId){paramsForCall['params']['lId']=lastId;} 656return $http.get("/api/cryptopian/followers/",paramsForCall);},getFollowing:function(userId,lastId){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['cId']=userId;if(lastId){paramsForCall['params']['lId']=lastId;} 657return $http.get("/api/cryptopian/following/",paramsForCall);},getAvatarUrl:function(){return profileData.avatar_url;},getId:function(){return profileData.user_id;},getUsername:function(){return profileData.username;},getDescription:function(){return profileData.description;},getTotalActivity:function(showSummaryValue){var totalActivities=0;if(profileStatsData.hasOwnProperty('Posts')){totalActivities+=parseInt(profileStatsData.Posts.Value);} 658if(profileStatsData.hasOwnProperty('Following')){totalActivities+=parseInt(profileStatsData.Following.Value);} 659if(profileStatsData.hasOwnProperty('Comments')){totalActivities+=parseInt(profileStatsData.Comments.Value);} 660if(profileStatsData.hasOwnProperty('Agrees')){totalActivities+=parseInt(profileStatsData.Agrees.Value);} 661if(profileStatsData.hasOwnProperty('Disagrees')){totalActivities+=parseInt(profileStatsData.Disagrees.Value);} 662if(profileStatsData.hasOwnProperty('QuizzesTaken')){totalActivities+=parseInt(profileStatsData.QuizzesTaken.Value);} 663if(showSummaryValue){return utilStatic.convertValueToDisplay("",totalActivities,$filter('number'),'short',true);} 664return totalActivities;}};}]);angular.module('ccc-app').factory('userManager',['$rootScope','$http','toastNotifications','$q','$window','auth0',function userManagerFactory($rootScope,$http,toastNotifications,$q,$window,auth0){var userProperties={'is_loading_auth':false,'is_logged_in':false,'user_id':'','username':'','is_activated':false,'avatar_url':'','email':'','roles':[],'portfolios':[],'is_following':false,'is_showing_login':false};var defaultApiResponseNamesForDisplay={'general':'General','email_notifications':'Email Notifications','web_notifications':'Web Notifications','security_info':'Security','api_key':'API Key','billing_history':'Billing'};var userProfileData={};var userStatsData={};var setLoggedInPrivate=function(value){userProperties.is_logged_in=value;$rootScope.$emit("LoginValueChange",value);};var mergeUserProperties=function(newUserProperties){for(var userProp in newUserProperties){userProperties[userProp]=newUserProperties[userProp];}};var addDisplayNameToResponseObj=function(objToAddDisplayNamesTo){for(var objKey in objToAddDisplayNamesTo){if(defaultApiResponseNamesForDisplay.hasOwnProperty(objKey)){objToAddDisplayNamesTo[objKey]["nameToDisplay"]=defaultApiResponseNamesForDisplay[objKey];}} 665return objToAddDisplayNamesTo;};return{FOLLOWING:{CRYPTOPIAN:0,COIN:1,EXCHANGE:2},handleAuth0Flow:function(){var logout=this.logout.bind(this);var loginAuth0=this.loginAuth0.bind(this);var isLoggedIn=this.isLoggedIn.bind(this);var hasCode=sessionStorage.getItem('oauth_return_code');var hasState=sessionStorage.getItem('oauth_return_state');var url=new URL(window.location.href);var loginError=url.searchParams.has('login_error');var disableMfa=url.searchParams.has('disable_mfa');if(hasCode&&hasState){return auth0.handleRedirectIfPresent().then(function(accessToken){if(!accessToken){auth0.logout(false,true);return null;} 666if(disableMfa){return;} 667return loginAuth0(accessToken).then(function(termsAndConditionsAgreed){if(termsAndConditionsAgreed===false){$rootScope.$broadcast('showTerms');} 668return accessToken;});}).catch(function(err){console.error('handleRedirectIfPresent failed:',err);auth0.logout(false,true);return null;});} 669if(loginError){toastNotifications.addNotification('error',"Unable to login at this time. Please contact [email protected]");} 670return auth0.verifyWithAuth0().then(function(verified){if(verified&&isLoggedIn()){return true;}
671if(!verified&&isLoggedIn()){logout();return null;} 672if(verified&&!isLoggedIn()){auth0.logout();return null;} 673return null;}).catch(function(err){console.error('getToken failed:',err);logout();return null;});},loginAuth0:function(accessToken){const setAvatarUrl=this.setAvatarUrl;const initUser=this.initUser;const setLoggedIn=this.setLoggedIn;const urlParams=new URLSearchParams(window.location.search);const bodyToSend={access_token:accessToken,referrer:document.referrer||'Referrer',campaign:urlParams.get('campaign')||'Campaign',reg_page:urlParams.get('reg_page')||window.location.href,action:urlParams.get('action')||'Action'};return new Promise((resolve)=>{$http.post(CCC.authApiUrl+'cryptopian/login/auth0',bodyToSend,{withCredentials:true}).then(function(res){if(res.data.Type===100){const user=res.data.Data.User;const termsAndConditionsAgreed=res.data.Data.TermsAndConditionsAgreed;user.avatar_url=CCC.STATIC.BASEIMAGEPATH+user.avatar_url;setAvatarUrl(user.avatar_url);initUser(user);setLoggedIn(true);toastNotifications.addNotification('success','<div>Login successful.</div>'+'<div>Welcome '+user.username+'!</div>');resolve(termsAndConditionsAgreed);}else{auth0.logout();resolve();}}).catch(function(){auth0.logout(false,true);resolve();});});},auth0Redirect:async function(mode='login'){let auth0Client;const domain=CCC.auth0Domain;const clientId=CCC.auth0ClientId;const audience=undefined;auth0Client=await createAuth0Client({domain,clientId,authorizationParams:{redirect_uri:window.location.origin,scope:"openid profile email",...(audience?{audience}:{})},cacheLocation:"localstorage",useRefreshTokens:true});const qs=window.location.search;if(qs.includes("code=")&&qs.includes("state=")){await auth0Client.handleRedirectCallback();window.history.replaceState({},document.title,window.location.pathname);} 674const opts={authorizationParams:{}};if(mode==="signup"){opts.authorizationParams.screen_hint="signup";} 675await auth0Client.loginWithRedirect(opts);},auth0EnableTwoFactor:function(){$http.get(CCC.authApiUrl+"cryptopian/two-factor/auth0/start",{withCredentials:true}).then(function(response){var url=response.data?.Data?.data?.ticket_url 676if(url){window.open(url,'_blank','noopener,noreferrer');}else{toastNotifications.addNotification('error','<div>Could not enable two-factor auth.</div><div>Missing enrollment URL.</div>');}}).catch(function(errResponse){toastNotifications.addNotification('error','<div>Could not enable two-factor auth.</div>'+'<div>'+(errResponse?.data?.Message||'An unexpected error occurred.')+'</div>');});},auth0DisableTwoFactor:function(accessToken,mfaId){return $http.get(CCC.authApiUrl+"cryptopian/two-factor/auth0/disable",{withCredentials:true,params:{access_token:accessToken,mfa_id:mfaId}});},initUser:function(newUserProperties){mergeUserProperties(newUserProperties);},setUserProfileData:function(apiResponse){userProfileData=apiResponse;},updateProfileEmailNotificationsNoEmail:function(value){if(userProfileData.hasOwnProperty('Notifications')){var notifications=userProfileData['Notifications'];notifications[0].CurrentValue=value;if(value){for(var i=1;i<notifications.length;i++){if(notifications[i].Type=='checkbox'){notifications[i].CurrentValue=false;} 677if(notifications[i].Type=='dropdown'){notifications[i].CurrentValue=notifications[i].Values[notifications[i].Values.length-1];}}}else{for(var i=1;i<notifications.length;i++){if(notifications[i].Type=='checkbox'){notifications[i].CurrentValue=true;} 678if(notifications[i].Type=='dropdown'){notifications[i].CurrentValue=notifications[i].Values[0];}}} 679userProfileData['Notifications']=notifications;}},setUserStatsData:function(apiResponse){userStatsData=apiResponse["Data"];},setCryptopianRoles:function(value){userProperties.roles=value;},setLoggedIn:function(value){setLoggedInPrivate(value);},setCryptopianId:function(value){userProperties.user_id=value;},setUsername:function(value){userProperties.username=value;},setAvatarUrl:function(value){userProperties.avatar_url=value;},setEmailAddress:function(value){userProperties.email=value;},setActivated:function(value){userProperties.is_activated=value;},setFollowing:function(value){userProperties.is_following=value;},setShowingLogin:function(value){userProperties.is_showing_login=value;},setPortfolioSummary:function(apiResponse){userProperties.portfolio_summary=apiResponse.Data;},getActivated:function(){return userProperties.is_activated;},isFollowing:function(){return userProperties.is_following;},isLoggedIn:function(){return userProperties.is_logged_in;},isLoadingAuth:function(){return userProperties.is_loading_auth;},isShowingLogin:function(){return userProperties.is_showing_login;},getCryptopianId:function(){return userProperties.user_id;},getUsername:function(){return userProperties.username;},getAvatarUrl:function(){return userProperties.avatar_url;},getEmailAddress:function(){return userProperties.email;},getUserProfileData:function(){return addDisplayNameToResponseObj(userProfileData);},getUserProfileDataByKey:function(key){if(userProfileData[key]!==undefined){return userProfileData[key];} 680return;},getUserStatsData:function(){return userStatsData;},getCryptopianAsFollower:function(){return{Id:userProperties.user_id,Name:userProperties.username,ImageUrl:userProperties.avatar_url,Url:"/profile/"+userProperties.username+"/",Type:"Cryptopian"};},logout:function(){$http.get(CCC.authApiUrl+"cryptopian/logout",{"withCredentials":true}).then(function(response){response=response["data"];setLoggedInPrivate(false);mergeUserProperties(response.Data.User);auth0.logout();},function(errResponse){errResponse=errResponse["data"];toastNotifications.addNotification('error','<div>Could not log out.</div>'+'<div>It seems you are not logged in.</div>');});},getPricingInfo:function(){var deferred=$q.defer();if(CCC.API){deferred.resolve({plans:CCC.API.FIELDS['PricingInfo']['Plans'],default_limits:CCC.API.FIELDS['PricingInfo']['DefaultLimits']}
680);}else{$http.post(CCC.minApiUrl+"stats/calls/api/keys",{api_type:"price_api"},{"withCredentials":true}).then(function(response){deferred.resolve(response.data.Data);});} 681return deferred.promise;},startTwoFactorAuth:function(password){return $http.post(CCC.authApiUrl+"cryptopian/two-factor/start",{"password":password},{"withCredentials":true});},enableTwoFactorAuth:function(twoFactorCode){return $http.post(CCC.authApiUrl+"cryptopian/two-factor/enable",{"two_factor_code":twoFactorCode},{"withCredentials":true});},requestPasswordReset:function(email){return $http.post(CCC.authApiUrl+"cryptopian/pass/reset/request",{"email":email},{"withCredentials":true});},requestDelete:function(password){return $http.post(CCC.authApiUrl+"cryptopian/delete/user/request",{"password":password},{"withCredentials":true}).then(function(response){setLoggedInPrivate(false);mergeUserProperties({});});},getUserAuthKeys:function(getUserAuthKeysCallback){$http.post(CCC.authApiUrl+"cryptopian/list/auth/keys",{},{"withCredentials":true}).then(function(response){getUserAuthKeysCallback(response.data.Data);},function(err){getUserAuthKeysCallback([]);});},getUserMFAList:function(getUserMFAListCallback){$http.get(CCC.authApiUrl+"cryptopian/two-factor/auth0/enabled",{"withCredentials":true}).then(function(response){getUserMFAListCallback(response.data.Data);},function(err){getUserMFAListCallback([]);});},addKeyDescription:function(authKeyToAddDescriptionTo,addKeyDescriptionCallback){var hasError=false;var paramsToPass={"key_to_update":authKeyToAddDescriptionTo.key} 682if(authKeyToAddDescriptionTo.info!==""){paramsToPass["key_info"]=authKeyToAddDescriptionTo.info;} 683$http.post(CCC.authApiUrl+"cryptopian/update/key/info",paramsToPass,{"withCredentials":true}).then(function(response){addKeyDescriptionCallback(hasError);},function(err){hasError=true;addKeyDescriptionCallback(hasError);});},getApiPermissions:function(getApiPermissionsCallback){$http.post(CCC.authApiUrl+"cryptopian/get/permissions",{},{"withCredentials":true}).then(function(response){getApiPermissionsCallback(response.data.Data);},function(err){getApiPermissionsCallback(response.data.Data);});},generateApiKey:function(permissions,key_info,callback){$http.post(CCC.authApiUrl+"cryptopian/create/api/key",{permissions:permissions,key_info:key_info},{"withCredentials":true}).then(function(response){callback(response.data);},function(err){callback(err.data);});},updateApiKeyPermissions:function(permissions,key_info,callback){$http.post(CCC.authApiUrl+"cryptopian/update/key/permissions",{permissions:permissions,key_to_update:key_info},{"withCredentials":true}).then(function(response){callback(response.data);},function(err){callback(err.data);});},getEndpointUsageStats:function(callback){$http.post(CCC.minApiUrl+"stats/user/endpoint/usage",{"api_type":"price_api","key_type":"ApiKey","path":""},{"withCredentials":true}).then(function(response){callback(false,response.data.Data);},function(err){callback(true,[]);});},getApiStats:function(callback){$http.post(CCC.minApiUrl+"stats/calls/api/keys",{"api_type":"price_api"},{"withCredentials":true}).then(function(response){callback(false,response.data.Data);},function(err){callback(true,{keys_data:[],keys:[],account:{}});});},getAvailablePlans:function(callback){$http.post(CCC.authApiUrl+"cryptopian/get/plan/list",{"api_type":"price_api"},{"withCredentials":true}).then(function(response){callback(false,response.data.Data);},function(err){callback(true,{});});},removeAnApiKey:function(key){return $http.post(CCC.authApiUrl+"cryptopian/remove/api/key",{"key_to_remove":key},{"withCredentials":true});},removeAnAuthKey:function(authKeyToRemove){return $http.post(CCC.authApiUrl+"cryptopian/remove/auth/key",{"key_to_remove":authKeyToRemove},{"withCredentials":true});},removeAllAuthKeys:function(authKeyToRemove){return $http.get(CCC.authApiUrl+"cryptopian/remove/auth/keys/all",{"withCredentials":true});},disableTwoFactor:function(password){return $http.post(CCC.authApiUrl+"cryptopian/two-factor/disable",{"password":password},{"withCredentials":true});},cancelAPISubscription:function(){return $http.post(CCC.authApiUrl+"cryptopian/cancel-api-subscription",{},{"withCredentials":true});},getBillingPortalSession:function(){return $http.get(CCC.authApiUrl+"cryptopian/user/get/billing-portal-session",{"withCredentials":true});},getPaymentDetails:function(){return $http.post(CCC.authApiUrl+"cryptopian/user/get/payment-details",{},{"withCredentials":true});},updateFields:function(objectWithUpdateFields){return $http.post(CCC.authApiUrl+"cryptopian/update/user/all",objectWithUpdateFields,{"withCredentials":true});}
683,getCouponDetails:function(id){return $http.post(CCC.authApiUrl+"cryptopian/get/coupon-details",{id:id},{"withCredentials":true});},termsAndConditionsAgreed:function(isAffiliateEnabled,isMarketwatchEnabled,isForumEnabled){var objectWithUpdateFields={affiliate:isAffiliateEnabled,market_watch:isMarketwatchEnabled,forum:isForumEnabled};return $http.post(CCC.authApiUrl+"cryptopian/update/user/terms-and-conditions-agreed",objectWithUpdateFields,{"withCredentials":true});},changeFollowingStatus:function(nodeId,followingType){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['id']=nodeId;paramsForCall['params']['ft']=followingType;return $http.get("/api/cryptopian/follow/",paramsForCall);},banCryptopian:function(nodeId,reason){var paramsForCall={};paramsForCall['user_id']=nodeId;paramsForCall['ban_reason']=reason;return $http.post(CCC.authApiUrl+"cryptopian/ban",paramsForCall,{"withCredentials":true});},unBanCryptopian:function(nodeId){var paramsForCall={};paramsForCall['user_id']=nodeId;return $http.post(CCC.authApiUrl+"cryptopian/un-ban",paramsForCall,{"withCredentials":true});},checkFollowingStatus:function(nodeId){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['id']=nodeId;return $http.get("/api/cryptopian/isfollowing/",paramsForCall);},getFollowers:function(userId,lastId){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['cId']=userId;if(lastId){paramsForCall['params']['lId']=lastId;} 684return $http.get("/api/cryptopian/followers/",paramsForCall);},deleteAllForumActivity:function(cryptopianId){return $http.get("/api/forum/post/delete/",{params:{cryptopianId:cryptopianId}});},restoreCryptopian:function(cryptopianId){return $http.post(CCC.authApiUrl+'cryptopian/admin/restore/user',{"user_id":cryptopianId},{"withCredentials":true});},getFollowing:function(userId,lastId){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['cId']=userId;if(lastId){paramsForCall['params']['lId']=lastId;} 685return $http.get("/api/cryptopian/following/",paramsForCall);},loadProfileDataFromApi:function(){return $http.get("/api/cryptopian/userinfo/");},hasRole:function(subName){if(userProperties.roles.length==0){return false;} 686if(userProperties.roles.indexOf(subName)>-1){return true;} 687return false;},canDelete:function(){if(userProperties.roles.length==0){return false;} 688if(userProperties.roles.indexOf("forum_mod")>-1){return true;} 689return false;},canMakeSticky:function(){if(userProperties.roles.length==0){return false;} 690if(userProperties.roles.indexOf("sales_manager")>-1){return true;} 691return false;},canBan:function(){if(userProperties.roles.length==0){return false;} 692if(userProperties.roles.indexOf("forum_mod")>-1){return true;} 693return false;},canDeleteAllForumActivity:function(){if(userProperties.roles.length==0){return false;} 694if(userProperties.roles.indexOf("forum_admin")>-1){return true;} 695return false;},canEdit:function(idOfOwner){if(!userProperties.is_logged_in){return userProperties.is_logged_in;} 696if(userProperties.user_id==idOfOwner){return true;} 697if(userProperties.roles.length==0){return false;} 698if(userProperties.roles.indexOf("forum_admin")>-1){return true;} 699return false;},retrieveUserDataFromApi:function(userSectionsToRetrieveArray,retrieveUserDataCallback){var errorRetrievingUserData=false;userProperties.is_loading_auth=true;$http.post(CCC.authApiUrl+"cryptopian/get",{"user_info_sections":userSectionsToRetrieveArray},{"withCredentials":true}).then(function(userDataResponse){userProperties.is_loading_auth=false;userProperties.is_logged_in=true;addDisplayNameToResponseObj(userDataResponse.data.Data);retrieveUserDataCallback(errorRetrievingUserData,userDataResponse.data);userProperties.is_loading_auth=false;},function(errResponse){userProperties.is_loading_auth=false;userProperties.is_logged_in=false;errorRetrievingUserData=true;retrieveUserDataCallback(errorRetrievingUserData,[]);userProperties.is_loading_auth=false;});},};}]);angular.module('ccc-app').factory('totals',['$filter',function totalsFactory($filter){var totals={};var utilStatic=CCC.STATIC.UTIL;var text={'comment':{'p':'comments','s':'comment','sValues':[1]},'pageView':{'p':'page views','s':'page view','sValues':[1]}} 700var totalsInterface={};totalsInterface.postsOnPage=function(pageId,apiResponse){totals['totalPosts']=apiResponse['Total'][pageId]['Posts'];};totalsInterface.pageViews=function(apiResponse){if(apiResponse.Type=="100"){totals['totalPageViews']=apiResponse.PageViews;}else{totals['totalPageViews']=0;}};totalsInterface.new=function(name,value){totals[name]=value;};totalsInterface.exists=function(name){if(totals.hasOwnProperty(name)){return true;} 701return false;};totalsInterface.getText=function(name,base){var currentTotal=totals[name]||0;if(text.hasOwnProperty(base)){if(text[base].sValues.indexOf(currentTotal)>-1){return text[base].s;}else{return text[base].p;}} 702return"";};totalsInterface.inc=function(name,value){if(totals.hasOwnProperty(name)){totals[name]+=value;}};totalsInterface.dec=function(name,value){if(totals.hasOwnProperty(name)){totals[name]-=value;}};totalsInterface.get=function(name){if(totals.hasOwnProperty(name)){return utilStatic.
702convertValueToDisplay('',totals[name],$filter('number'),'short',true)} 703return 0;};totalsInterface.getFullNumber=function(name){if(totals.hasOwnProperty(name)){return utilStatic.convertValueToDisplay('',totals[name],$filter('number'),'full',true)} 704return 0;};return totalsInterface;}]);angular.module('ccc-app').factory('pageAlerts',[function pageAlertsFactory(){var topAlerts=[];return{setTopAlerts:function(arrayOfObjects){topAlerts=arrayOfObjects;},addDangerTopAlert:function(alertMessage){topAlerts.push({type:'danger',msg:alertMessage});},addWarningTopAlert:function(alertMessage){topAlerts.push({type:'warning',msg:alertMessage});},addSuccessTopAlert:function(alertMessage){topAlerts.push({type:'success',msg:alertMessage});},removeTopAlert:function(index){topAlerts.splice(index,1);},getTopAlerts:function(){return topAlerts;}};}]);angular.module('ccc-app').factory('toastNotifications',['$timeout','$http',function toastNotificationsFactory($timeout,$http){var toastNotifications=[];var messageTypes=['info','warning','error','success'];var messageTypeToTitle={'info':"Update",'warning':"Warning...",'error':"Error!",'success':"Thanks!"} 705var removeNotification=function(ts){for(var i=0,length=toastNotifications.length;i<length;i++){if(toastNotifications[i].Timestamp==ts){toastNotifications.splice(i,1);return;}}} 706return{addNotification:function(type,message){var timestamp=new Date().getTime();toastNotifications.push({'Timestamp':timestamp,'Title':messageTypeToTitle[type],'Type':type,'Message':message});$timeout(function(){removeNotification(timestamp)},8000);},deleteNotification:function(timestamp){removeNotification(timestamp);},getNotifications:function(){return toastNotifications;}};}]);angular.module('ccc-app').factory('notificationsManager',['$http','$interval',function notificationsManagerFactory($http,$interval){var notificationGroups=[];var itemIds=[];var unreadCount=0;var total=0;var itemCount=0;var loading=false;var open=false;var pageSize=10;return{resetNotifications:function(){notificationGroups=[];itemIds=[];unreadCount=0;total=0;itemCount=0;},addNotification:function(notificationItem){if(itemIds.indexOf(notificationItem.Id)===-1){var group={};group.type=notificationItem.NotificationType;group.items=[notificationItem];group.item_ids=[notificationItem.Id];group.timestamp=notificationItem.Timestamp/1000;notificationGroups.unshift(group);itemIds.push(notificationItem.Id);unreadCount++;total++;itemCount++;}},setNotifications:function(notificationsArray){notificationGroups=notificationsArray;},getNotifications:function(){return notificationGroups;},getNewNotificaticationsCount:function(){return unreadCount;},getNotificationsFromApi:function(start,limit){loading=true;return $http.get(CCC.authApiUrl+'cryptopian/get/notifications',{"withCredentials":true,"params":{"start":start||0,"limit":limit||pageSize}}).success(function(response){if(response.Data){unreadCount=response.Data.metadata.unread;total=response.Data.metadata.total;for(var notification of response.Data.notifications){itemCount+=notification.items.length;notification.type=notification.items[0].NotificationType;for(var item of notification.items){itemIds.push(item.Id);}} 707notificationGroups=notificationGroups.concat(response.Data.notifications);} 708loading=false;});},loadMore:function(){var t=this;if(!loading&&total>itemCount){this.getNotificationsFromApi(notificationGroups.length).then(function(){t.markAsReadAPI();});}},markAsReadLocal:function(){angular.forEach(notificationGroups,function(notification){notification.read=true;});},markAsReadAPI:function(readIds){unreadCount=0;
708if(!readIds){var readIds=[];angular.forEach(notificationGroups,function(notification){if(!notification.read){readIds=readIds.concat(notification.item_ids);}});} 709if(readIds.length>0){$http.post(CCC.authApiUrl+'cryptopian/notifications/read',{item_ids:readIds},{withCredentials:true}).success(function(data){});}}};}]);angular.module('ccc-app').factory('subscriptionManager',['$rootScope','$http',function subscriptionManagerFactory($rootScope,$http){var utilStatic=CCC.STATIC.UTIL;var currentSubs=[];var currentToSymbol='';var tradeSubs=[];var currentAGGSubsObj={};var currentExchangesInfo={};var currentSubsClasification=[];var currentSubsObject={};var currentChartSubsObj={};var currentTradeSubsObj={};var currentAggKeysOrder={};var orderOnEqual={'BTC':1,'USD':2,'EUR':3,'GBP':4};var currentAGGCharts={};var currentOrderBookSubsObj={};var defaultAggChart={'exchange':'N/A','fromsymbol':'N/A','tosymbol':'N/A'};var splitSub=function(sub){var subParts=sub.split("~");var obj={'TYPE':subParts[0]};switch(subParts[0]){case CCC.STATIC.TYPE.TRADE:obj['EXCHANGE']=subParts[1];obj['FROMSYMBOL']=subParts[2];obj['TOSYMBOL']=subParts[3];break;case CCC.STATIC.TYPE.CURRENTAGG:case CCC.STATIC.TYPE.CURRENT:obj['EXCHANGE']=subParts[1];obj['FROMSYMBOL']=subParts[2];obj['TOSYMBOL']=subParts[3];break;} 710return obj;};var createTradeSub=function(obj){return CCC.STATIC.TYPE.TRADE+'~'+obj.EXCHANGE+'~'+obj.FROMSYMBOL+'~'+obj.TOSYMBOL;};var createAggSub=function(obj){return CCC.STATIC.TYPE.CURRENTAGG+'~CCCAGG~'+obj.FROMSYMBOL+'~'+obj.TOSYMBOL;};var createCurrentSub=function(obj){return CCC.STATIC.TYPE.CURRENT+'~'+obj.EXCHANGE+'~'+obj.FROMSYMBOL+'~'+obj.TOSYMBOL;};var createOrderBookSub=function(obj){return CCC.STATIC.TYPE.ORDERBOOK+'~'+obj.EXCHANGE+'~'+obj.FROMSYMBOL+'~'+obj.TOSYMBOL;};var createAggChart=function(obj){return{'exchange':'CCCAGG','fromsymbol':obj.FROMSYMBOL,'tosymbol':obj.TOSYMBOL}};var createChartSub=function(obj){return{'exchange':obj.EXCHANGE,'fromsymbol':obj.FROMSYMBOL,'tosymbol':obj.TOSYMBOL}};var aggSubsByToSymbol=function(){for(var i=0;i<currentSubs.length;i++){var addOrderBookSub=false;var subObj=splitSub(currentSubs[i]);if(!currentSubsObject.hasOwnProperty(subObj.TOSYMBOL)){currentSubsObject[subObj.TOSYMBOL]=[];} 711if(!currentTradeSubsObj.hasOwnProperty(subObj.TOSYMBOL)){currentTradeSubsObj[subObj.TOSYMBOL]=[];} 712if(!currentChartSubsObj.hasOwnProperty(subObj.TOSYMBOL)){currentChartSubsObj[subObj.TOSYMBOL]=[];} 713if(currentExchangesInfo.hasOwnProperty(subObj.EXCHANGE)&¤tExchangesInfo[subObj.EXCHANGE].OrderBook==true){currentOrderBookSubsObj[subObj.TOSYMBOL]=currentOrderBookSubsObj[subObj.TOSYMBOL]||[];currentOrderBookSubsObj[subObj.TOSYMBOL].push(createOrderBookSub(subObj));} 714currentTradeSubsObj[subObj.TOSYMBOL].push(createTradeSub(subObj));currentSubsObject[subObj.TOSYMBOL].push(createCurrentSub(subObj));currentChartSubsObj[subObj.TOSYMBOL].push(createChartSub(subObj));if(!currentAGGCharts.hasOwnProperty(subObj.TOSYMBOL)){currentAGGCharts[subObj.TOSYMBOL]=createAggChart(subObj);} 715if(!currentAGGSubsObj.hasOwnProperty(subObj.TOSYMBOL)){currentAGGSubsObj[subObj.TOSYMBOL]=createAggSub(subObj);}} 716currentSubsClasification=Object.keys(currentSubsObject);if(currentSubsClasification.length>1){currentSubsClasification.sort(function(a,b){if(currentSubsObject[a].length>currentSubsObject[b].length){return-1;} 717if(currentSubsObject[a].length<currentSubsObject[b].length){return 1;} 718if(orderOnEqual.hasOwnProperty(a)){if(orderOnEqual.hasOwnProperty(b)){if(orderOnEqual[a]<orderOnEqual[b]){return-1;}else{return 1;}}else{return-1;}}else if(orderOnEqual.hasOwnProperty(b)){return 1;} 719return 0;});};};return{hasSubs:function(){if(currentSubs.length>0) 720return true;if(tradeSubs.length>0) 721return true;return false;},hasOrderBook:function(exchange){if(currentExchangesInfo.hasOwnProperty(exchange)){return currentExchangesInfo[exchange].OrderBook;} 722return false;},setCurrentToSymbol:function(toSymbol){currentToSymbol=toSymbol;},setCurrentSubs:function(subs,exchangesInfo){currentSubs=subs;currentExchangesInfo=exchangesInfo;aggSubsByToSymbol();currentToSymbol=currentSubsClasification[0]||"";},setHighestMarketSubs:function(subs){for(var i=0;i<subs.length;i++){var subObj=splitSub(subs[i]);currentAGGSubsObj[subObj.TOSYMBOL]=createCurrentSub(subObj);currentAGGCharts[subObj.TOSYMBOL]=createChartSub(subObj);}},setTradeSubs:function(subs){tradeSubs=subs;},getTopCurrentSubs:function(){if(currentToSymbol!=""&¤tSubsObject.hasOwnProperty(currentToSymbol)) 723return currentSubsObject[currentToSymbol];return[];},getCurrentSubsObj:function(){return currentSubsObject;},getCurrentSubsByToSymbol:function(toSymbol){return currentSubsObject[toSymbol]||[];},getCurrentSubsClassification:function(){return currentSubsClasification;},getCurrentDisplaySubs:function(){return currentSubsDisplay||[];},getComputedTradeSubsObj:function(){return currentTradeSubsObj;},getComputedTradeSubsBySymbol:function(toSymbol){return currentTradeSubsObj[toSymbol]||[];},getComputedTradeSubs:function(){if(currentToSymbol!=""&¤tTradeSubsObj.hasOwnProperty(currentToSymbol)) 724return currentTradeSubsObj[currentToSymbol];return[];},getComputedOrderBookSubsObj:function(){return currentOrderBookSubsObj;},getComputedOrderBookSubsBySymbol:function(toSymbol){return currentOrderBookSubsObj[toSymbol]||[];},getComputedOrderBookSubs:function(){if(currentToSymbol!=""&¤tOrderBookSubsObj.hasOwnProperty(currentToSymbol)) 725return currentOrderBookSubsObj[currentToSymbol];return[];},getInputTradeSubs:function(){return tradeSubs||[];},getCurrentAGGSubsObj:function(toSymbol){return currentAGGSubsObj;},getCurrentAGGSubByToSymbol:function(toSymbol){if(currentAGGSubsObj.hasOwnProperty(toSymbol)) 726return[currentAGGSubsObj[toSymbol]] 727return[];},getCurrentAGGSub:function(){if(currentToSymbol!=""&¤tAGGSubsObj.hasOwnProperty(currentToSymbol)) 728return[currentAGGSubsObj[currentToSymbol]] 729return[];},getCurrentChartObj:function(){return currentChartSubsObj;},getCurrentChartDataSets:function(){if(currentToSymbol!=""&¤tChartSubsObj.hasOwnProperty(currentToSymbol)) 730return currentChartSubsObj[currentToSymbol];return[];},getCurrentChartDataSetsByToSymbol:function(toSymbol){return currentChartSubsObj[toSymbol]||[];},getCurrentAggChartByToSymbol:function(toSymbol){return currentAGGCharts[toSymbol]||defaultAggChart;},getCurrentAggChartObj:function(){return currentAGGCharts},getCurrentAggChart:function(){if(currentToSymbol!=""&¤tAGGCharts.hasOwnProperty(currentToSymbol)) 731return currentAGGCharts[currentToSymbol];return defaultAggChart;},changeCurrency:function(symbol){if(symbol!=currentToSymbol){currentToSymbol
731=symbol;$rootScope.$emit("ChangeCurrency",symbol);}},changeView:function(viewName){$rootScope.$emit("ChangeView",viewName);},getCurrentToSymbol:function(){return currentToSymbol;},getNameForExchange:function(exchangeName){return utilStatic.getNameForExchange(exchangeName);},getTopPairsFromMinApi:function(fsym,limit){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['fsym']=fsym;if(limit){paramsForCall['params']['limit']=limit;} 732paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/top/pairs",paramsForCall);},getTopVolumeSymbolsFromMinApi:function(e,limit){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['e']=e;if(limit){paramsForCall['params']['limit']=limit;} 733paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/exchange/top/volume",paramsForCall);},getTopExchangesFromMinApi:function(fsym,tsym,limit){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['fsym']=fsym;paramsForCall['params']['tsym']=tsym;if(limit){paramsForCall['params']['limit']=limit;} 734paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/top/exchanges",paramsForCall);},getAllExchangesInfoFromMin:function(){var paramsToSend={withCredentials:true,params:{}};return $http.get(CCC.minApiUrl+'data/exchanges/general',paramsToSend);}};}]);angular.module('ccc-app').factory('dateParsing',['$filter',function dateParsingFactory($filter){return{formatTimePast:function(timestamp){var seconds=Math.floor((new Date()-new Date(timestamp))/1000);var interval=Math.floor(seconds/31536000);if(interval>1){return interval+" years";}else if(interval==1){return"year";} 735interval=Math.floor(seconds/2592000);if(interval>1){return interval+" months";}else if(interval==1){return"month";} 736interval=Math.floor(seconds/86400);if(interval>1){return interval+" days";}else if(interval==1){return"day";} 737interval=Math.floor(seconds/3600);if(interval>1){return interval+" hours";}else if(interval==1){return"hour";} 738interval=Math.floor(seconds/60);if(interval>=1){return interval+" minutes";} 739return"minute";},formatFromNow:function(timestamp){var seconds=Math.floor((new Date()-new Date(timestamp))/1000);var interval=Math.floor(seconds/31536000);if(interval>1){return interval+" years ago";}else if(interval==1){return"1 year ago";} 740interval=Math.floor(seconds/2592000);if(interval>1){return interval+" months ago";}else if(interval==1){return"1 month ago";} 741interval=Math.floor(seconds/86400);if(interval>1){return interval+" days ago";}else if(interval==1){return"1 day ago";} 742interval=Math.floor(seconds/3600);if(interval>1){return interval+" hours ago";}else if(interval==1){return"1 hour ago";} 743interval=Math.floor(seconds/60);if(interval>=1){return interval+" min ago";} 744return"Just now";},formatFromNowDays:function(timestamp){var seconds=Math.floor((new Date()-new Date(timestamp))/1000);var interval=Math.floor(seconds/31536000);if(interval>1){return"over "+interval+" years ago";}else if(interval==1){return"over 1 year ago";} 745interval=Math.floor(seconds/2592000);if(interval>1){if(interval==12){return"1 year ago";} 746return interval+" months ago";}else if(interval==1){return"1 month ago";} 747interval=Math.floor(seconds/86400);if(interval>1){return interval+" days ago";}else if(interval==1){return"yesterday";} 748return"today";},formatTimespan:function(seconds){seconds=Math.floor(seconds);var d=Math.floor(seconds/86400);var h=Math.floor(seconds%86400/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%3600%60);return((d>0?d+"d:":"")+(h>0?(d>0&&h<10?"0":"")+h+"h:":"0h:")+(m>0?(h>0&&m<10?"0":"")+m+"m:":"0m:")+(s<10?"0":"")+s+"s");},formatLongDate:function(timestamp){return $filter('date')(new Date(timestamp),"EEEE, dd MMMM yyyy 'at' HH:mm");},formatShortDate:function(timestamp){return $filter('date')(new Date(timestamp),"yyyy-MM-dd");},formatShortTime:function(timestamp){return $filter('date')(new Date(timestamp),"HH:mm");},formatShortYear:function(timestamp){return $filter('date')(new Date(timestamp),"yyyy");},formatMediumDateNoTime:function(timestamp){return $filter('date')(new Date(timestamp),"dd MMMM yyyy");},formatLongDateNoTime:function(timestamp){return $filter('date')(new Date(timestamp),"EEEE, dd MMMM yyyy");},formatDateMonthYear:function(timestamp){return $filter('date')(new Date(timestamp),"MMMM yyyy");},formatLongDateNoTimeWS:function(timestamp){var dayOfWeek=new Date(timestamp).getDay();var diffFromCurrentToWeekStart=new Date(timestamp).getDate()-dayOfWeek+(dayOfWeek==0?-6:1);var startOfWeek=new Date(new Date(timestamp).setDate(diffFromCurrentToWeekStart));return $filter('date')(startOfWeek,"dd MMMM yyyy");},formatLongDateNoTimeWE:function(timestamp){var dayOfWeek=new Date(timestamp).getDay();var diffFromCurrentToWeekStart=new Date(timestamp).getDate()-dayOfWeek+(dayOfWeek==0?-6:1);var endOfWeek=new Date(new Date(timestamp).setDate(diffFromCurrentToWeekStart+6));return $filter('date')(endOfWeek,"dd MMMM yyyy");},formatLongDateNoTimeMS:function(timestamp){var currentDate=new Date(timestamp);var startOfMonth=new Date(currentDate.getFullYear(),currentDate.getMonth(),1);return $filter('date')(startOfMonth,"dd MMMM yyyy");},formatLongDateNoTimeME:function(timestamp){var currentDate=new Date(timestamp);var endOfMonth=new Date(currentDate.getFullYear(),currentDate.getMonth()+1,0);return $filter('date')(endOfMonth,"dd MMMM yyyy");},unixTimestamp:function(secondsToSubstract){return Math.round((new Date()).getTime()/1000)-secondsToSubstract;}}}]);
748angular.module('ccc-app').service('cModalService',['$uibModal','userManager','$q','$rootScope','toastNotifications',function($uibModal,userManager,$q,$rootScope,toastNotifications){var cModalService=this;cModalService.showLoginModal=function(messageForLogin,action,callback,actionStage){if(userManager.isShowingLogin()){return;} 749userManager.setShowingLogin(true);var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/login',controller:'LoginRegisterCtrl',size:'cm',backdrop:false,keyboard:false,resolve:{params:function(){return{ActionStage:actionStage,Message:messageForLogin,Action:action};}}});modalInstance.result.then(function(message){userManager.setShowingLogin(false);if(callback){callback();}},function(){userManager.setShowingLogin(false);});};$rootScope.$on('showTerms',function(){cModalService.showLoginModal("","",function(){},4);});$rootScope.$on('rateLimitExceeded',function(){if(!userManager.isLoggedIn()){cModalService.showLoginModal("You've hit the usage limit for a guest, please log in or sign up to continue using CryptoCompare","");}else{toastNotifications.addNotification('error','Your account has exceeded the rate limit for open websocket connections. Please close any other CryptoCompare.com tabs.');}});cModalService.showPasswordResetModal=function(){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/login',controller:'LoginRegisterCtrl',size:'md',resolve:{params:function(){return{ActionStage:2,Message:''};}}});modalInstance.result.then(function(message){userManager.setShowingLogin(false);},function(){userManager.setShowingLogin(false);});};cModalService.showChangeAvatarModal=function(){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/changeavatar',controller:'ChangeAvatarCtrl'});};cModalService.showGenericModal=function(title,body,options,confirmCallback,cancelCallback){var template=''+'<div class="modal-header"> '+' <h3 class="modal-title text-center">'+title+' <button type="button" class="close" aria-label="Close" ng-click="close()"><span aria-hidden="true">×</span></button>'+' </h3>'+'</div>'+'<div class="modal-body" style="text-align: center;">'+ 750body+'</div>'+'<div class="modal-footer" style="text-align: center;">';if(options.showCancel===undefined||options.showCancel===true){template+='<a class="btn btn-default"><span ng-click="close()">';template+=options.cancelText||"Cancel";template+='</span></a>';} 751if(options.showConfirm===undefined||options.showConfirm===true){template+='<span ng-click="confirm()"><a class="btn btn-success">';template+=options.confirmText||"Confirm";template+='</a></span>';} 752template+='</div>';var modalInstance=$uibModal.open({template:template,controller:function($scope,$uibModalInstance,confirmCallback,cancelCallback){$scope.close=function(){cancelCallback($scope);$uibModalInstance.close();};$scope.confirm=function(){confirmCallback($scope);$uibModalInstance.close();}},resolve:{confirmCallback:function(){return confirmCallback;},cancelCallback:function(){return cancelCallback;}}});};cModalService.paymentFailedModal=function(){var template=''+'<div class="modal-header">'+' <h3 class="modal-title">Payment Unsuccessful'+' <button type="button" class="close" aria-label="Close" ng-click="close()"><span aria-hidden="true">×</span></button>'+' </h3>'+'</div>'+'<div class="modal-body" style="text-align: center;">'+' Your chosen payment method was unsuccessful, please try again, or if the problem persists, contact our support team.'+'</div>'+'<div class="modal-footer" style="text-align: center;">'+' <a class="btn btn-success"><span ng-click="close()">Ok :(</span></a>'+'</div>';var modalInstance=$uibModal.open({template:template,controller:function($scope,$uibModalInstance){$scope.close=function(){$uibModalInstance.close();};},resolve:{}});};cModalService.showUpgradeSubscriptionModal=function(doUpgrade,type,newPrice,yearToMonth){var yearToMonthMessage='';if(yearToMonth){yearToMonthMessage='<p>Please note you are changing from a yearly subscription to a monthly subscription. This will take immediate effect.</p>';}
753if(type==="upgrade"){var template=''+'<div class="modal-header">'+' <h3 class="modal-title">Upgrade API Subscription'+' <button type="button" class="close" aria-label="Close" ng-click="cancel()"><span aria-hidden="true">×</span></button>'+' </h3>'+'</div>'+'<div class="modal-body" style="text-align: center;">'+' Upgrading to this tier will immediately charge you $'+newPrice+'. '+yearToMonthMessage+' <p>For enquiries please contact our <a href="mailto:[email protected]">Support Team</a></p>'+'</div>'+'<div class="modal-footer" style="text-align: center;">'+' <a class="btn btn-default"><span ng-click="cancel()">Cancel</span></a>'+' <a class="btn btn-success"><span ng-click="confirm()">Confirm</span></a>'+'</div>';}else{var template=''+'<div class="modal-header">'+' <h3 class="modal-title">Downgrade API Subscription'+' <button type="button" class="close" aria-label="Close" ng-click="cancel()"><span aria-hidden="true">×</span></button>'+' </h3>'+'</div>'+'<div class="modal-body" style="text-align: center;">'+' <p>Your API Subscription will be downgraded at the next payment period.</p>'+' <p>For enquiries please contact our <a href="mailto:[email protected]">Support Team</a></p>'+'</div>'+'<div class="modal-footer" style="text-align: center;">'+' <a class="btn btn-default"><span ng-click="cancel()">Cancel</span></a>'+' <a class="btn btn-success"><span ng-click="confirm()">Confirm</span></a>'+'</div>';} 754var modalInstance=$uibModal.open({template:template,controller:'UpgradeSubscriptionModal',resolve:{doUpgrade:function(){return doUpgrade;},type:function(){return type;}}});};cModalService.showPayByCryptoModal=function(email){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/paywithcrypto',controller:function($scope,$uibModalInstance,$state,$http,params,toastNotifications){$scope.formData={email:params.email};$scope.invalidEmail=false;$scope.formError=false;$scope.plans=[];userManager.getPricingInfo().then(function(data){$scope.plans={"type":"select","name":"Service","value":'',"values":{'':'Please Select'}};angular.forEach(Object.keys(data.plans),function(planKey){$scope.plans.values[planKey+'_month']=data.plans[planKey].name+' Monthly';$scope.plans.values[planKey+'_year']=data.plans[planKey].name+' Yearly';});});$scope.currencies=[{id:'btc',name:'Bitcoin'},{id:'eth',name:'Ethereum'}];$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.submitPayWithCryptoForm=function(){$scope.submitted=true;$scope.formError=false;$scope.formInvalid=false;$scope.formData.plan=$scope.plans.value;if($scope.payWithCryptoForm.$valid){$http.post(CCC.authApiUrl+'cryptopian/pay-with-crypto',$scope.formData).then(function(urlResponse){if(urlResponse&&urlResponse.data.Data.success===true){$uibModalInstance.close();toastNotifications.addNotification('success','We will be in touch shortly.');}},function(urlResponse){$scope.formError=true;});}else{$scope.formInvalid=true;}}},resolve:{params:function(){return{"email":email};}}});};cModalService.showEnterpriseInformationModal=function(email,otherInformation,showComparePlans){if(otherInformation===undefined){otherInformation="";} 755if(showComparePlans===undefined){showComparePlans=true;} 756var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/enterprise-information',controller:function($scope,$uibModalInstance,$state,$http,params,toastNotifications){$scope.formData={email:params.email,otherInformation:params.otherInformation};$scope.invalidEmail=false;$scope.formError=false;$scope.showComparePlans=params.showComparePlans;$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.confirm=function(){$state.go("pricing");$uibModalInstance.close();};$scope.submitEnterpriseInformation=function(){$scope.submitted=true;$scope.formError=false;if($scope.enterpriseInformationForm.$valid){$http.post(CCC.authApiUrl+'cryptopian/enterprise-api-information',$scope.formData).then(function(urlResponse){if(urlResponse&&urlResponse.data.Data.success===true){$uibModalInstance.close();toastNotifications.addNotification('success','We will be in touch shortly.');}},function(urlResponse){$scope.formError=true;});}}},resolve:{params:function(){return{"email":email,"otherInformation":otherInformation,"showComparePlans":sh
756owComparePlans};}}});};cModalService.showActivationReminderModal=function(){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/activationreminder',controller:'ActivationReminderCtrl'});} 757cModalService.showBanModal=function(passedCryptopian){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/ban',controller:'BanCtrl',size:'md',resolve:{passedCryptopian:function(){return passedCryptopian;}}});} 758cModalService.showQrCodeModal=function(showQrCodeCallback){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/addqr',controller:['$scope','$uibModalInstance','$http','params','toastNotifications',function showCurrentPasswordModalCtrl($scope,$uibModalInstance,$http,params,toastNotifications){$scope.sendingDetailsToApi=false;$scope.passwordError=false;$scope.twoFactorCodeErr=false;$scope.sendingAuthCodeToApi=false;$scope.twoFactorCodeErrMessage="";$scope.twoFactorAuthCode="";$scope.currentPassword="";$scope.qrCodeCreated=false;$scope.secretCodeFromApi="";$scope.cancelModal=function(messageToPassToToast){$uibModalInstance.dismiss(messageToPassToToast);};var dataForQrCodeString="";var demoId=document.getElementById("qrcode");$scope.isQrCodeValid=function(qrCode){if(qrCode.length!==6||isNaN(qrCode)){return false;} 759return true;};userManager.startTwoFactorAuth().then(function(response){$scope.sendingDetailsToApi=false;if(response.status===200){var qrCodeResponseObjFromApi=response.data.Data;dataForQrCodeString+=qrCodeResponseObjFromApi.protocol;dataForQrCodeString+=qrCodeResponseObjFromApi.info;dataForQrCodeString+="?secret="+qrCodeResponseObjFromApi.secret;dataForQrCodeString+="&issuer="+qrCodeResponseObjFromApi.issuer;dataForQrCodeString+="&algorithm="+qrCodeResponseObjFromApi.algorithm;dataForQrCodeString+="&digits="+qrCodeResponseObjFromApi.digits;dataForQrCodeString+="&period="+qrCodeResponseObjFromApi.period;new QRCode(document.getElementById("qrcode"),{"text":dataForQrCodeString,"height":150,"width":150});$scope.secretCodeFromApi=qrCodeResponseObjFromApi.secret;$scope.passwordError=false;$scope.passwordApproved=true;$scope.qrCodeCreated=true;}else{$scope.passwordError=true;$scope.errorMessage=response.data.Data.Message;}},function(errorResponse){$scope.sendingDetailsToApi=false;$scope.passwordError=true;$scope.errorMessage=errorResponse.data.Message;});$scope.enableTwoFactor=function(twoFactorAuthCode){$scope.sendingAuthCodeToApi=true;if(twoFactorAuthCode===undefined){$scope.sendingAuthCodeToApi=false;$scope.twoFactorCodeErr=true;$scope.twoFactorCodeErrMessage="QR Code must be 6 digits";return;} 760twoFactorAuthCode=twoFactorAuthCode.replace(/\s+/g,'');if($scope.isQrCodeValid(twoFactorAuthCode)){userManager.enableTwoFactorAuth(twoFactorAuthCode).then(function(twoFactorResp){$scope.sendingAuthCodeToApi=false;if(twoFactorResp){$uibModalInstance.close();showQrCodeCallback();}else{}},function(errTwoFactor){$scope.sendingAuthCodeToApi=false;$scope.twoFactorCodeErr=true;$scope.twoFactorCodeErrMessage=errTwoFactor.data.Message;});}else{$scope.sendingAuthCodeToApi=false;$scope.twoFactorCodeErr=true;$scope.twoFactorCodeErrMessage="QR Code must be 6 digits";}};}],size:'md',resolve:{params:function(){return{"fieldBeingUpdated":"qrCode"};}}});};cModalService.showCurrentPasswordModal=function(fieldBeingUpdated,objectToSendToApiWithUpdatedUserDetails,showCurrentPasswordModalCallback){var deferred=$q.defer();var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/currentpassword',controller:['$scope','$uibModalInstance','$http','params','toastNotifications',function showCurrentPasswordModalCtrl($scope,$uibModalInstance,$http,params,toastNotifications){$scope.sendingDetailsToApi=false;$scope.userHasForgottenPass=false;$scope.currentPassword="";$scope.cancelModal=function(messageToPassToToast){$uibModalInstance.dismiss(messageToPassToToast);};$scope.showPassReset=function(){$scope.userHasForgottenPass=true;};$scope.submitPassword=function(password){$scope.sendingDetailsToApi=true;objectToSendToApiWithUpdatedUserDetails["password"]=password;var responseObjToPassToCallback={"hasError":false,"password":$scope.currentPassword};$scope.passwordError=false;showCurrentPasswordModalCallback(responseObjToPassToCallback).then(function(response){$scope.sendingDetailsToApi=false;if(response.success===true){$uibModalInstance.dismiss();deferred.resolve();}else{$scope.passwordError=true;if(!("pass" in response.field)){toastNotifications.addNotification('error',response.errorMsg);$uibModalInstance.dismiss();} 761deferred.reject();}});};}],size:'cm',resolve:{params:function(){return{"fieldBeingUpdated":fieldBeingUpdated};}}});return deferred.promise;};cModalService.showModalAddAPIKey=function(permissionsObj,editInfo,callback){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/addkey',controller:['$scope','$uibModalInstance','$http','params','toastNotifications','$uibModal','userManager',function showModalAddAPIKeyCtrl($scope,$uibModalInstance,$http,params,toastNotifications){$scope.editMode=false;if(params.editInfo!==null){$scope.editInfo=params.editInfo;$scope.editMode=true;} 762$scope.secretCodeFromApi="";$scope.keyName='';$scope.errorKeyName=null;$scope.errorPermissions=null;$scope.cancelModal=function(messageToPassToToast){$uibModalInstance.dismiss(messageToPassToToast);};var dataForQrCodeString="";$scope.permissionsObj=params.permissionsObj;$scope.permissionsFlat=Object.keys($scope.permissionsObj);$scope.permissions={};$scope.selectedPermissions=[];$scope.pathArray=null;if($scope.editMode===true){$scope.keyName=$scope.editInfo.apiKeyObject.info;$scope.selectedPermissions=JSON.parse(JSON.stringify($scope.editInfo.apiKeyObject.rights));} 763for(var key in permissionsObj){if(permissionsObj.hasOwnProperty(key)){for(var parentIndex in permissionsObj[key].parents){var parent=permissionsObj[key].parents[parentIndex];if(!$scope.permissions.hasOwnProperty(parent)){$scope.permissions[parent]=[key];} 764else{$scope.permissions[parent].push(key);}}}};$scope.togglePermissionRWALL=function(key,event){var index=$scope.selectedPermissions.indexOf(key);if(index>-1){$scope.selectedPermissions=[];}else{$scope.selectedPermissions=[key];}};$scope.togglePermission=function(key,event){var index=$scope.selectedPermissions.indexOf(key);if(index>-1){$scope.selectedPermissions.splice(index,1);}else{$scope.selectedPermissions.push(key);} 765$scope.parsePermissions();};$scope.toggleParentSubs=function($event,parentObj){$event.preventDefault();$event.stopPropagation();var subsArray=Object.keys(parentObj.sub);for(i in subsArray){var currentSub=subsArray[i];if(parentObj.sub[currentSub].implemented===false){continue;} 766var index=$scope.selectedPermissions.indexOf(currentSub);if(parentObj.countTotal>parentObj.countSelected){if(index===-1){$scope.selectedPermissions.push(currentSub);}} 767else{if(index>-1){$scope.selectedPermissions.splice(index,1);}}} 768$scope.parsePermissions();};$scope.checkPermissionSelection=function(key){var index=$scope.selectedPermissions.indexOf(key);if(index>-1){return true;} 769return false};var recursiveCountProps=function(obj){for(property in obj){if(property==='sub'){var filteredSubsObj={},key;recursiveCountProps(obj[property]);for(key in obj.sub){if(obj.sub[key].hasOwnProperty('display')){if(obj.sub[key].display===true){filteredSubsObj[key]=obj.sub[key];}}} 770var props=Object.keys(filteredSubsObj);var propsSelected=0;for(index in props){if($scope.selectedPermissions.indexOf(props[index])>-1){propsSelected++;}} 771obj.countTotal=props.length;obj.countSelected=propsSelected;}else if(obj[property]instanceof Object){recursiveCountProps(obj[property]);}}};var findPropPath=function(obj,name){for(var prop in obj){if(prop==name){return name;}else if(typeof obj[prop]=="object"){var result=findPropPath(obj[prop],name);if(result){return prop+'.'+result;}}} 772return null;} 773if($scope.editInfo!==null&&$scope.editInfo!==undefined){if($scope.editInfo.selectedKey!==undefined){var path=findPropPath($scope.permissionsObj,$scope.editInfo.selectedKey);var pathArray=path.split('.');$scope.pathArray=pathArray.filter(function(e){return e!=='sub'});}} 774$scope.parsePermissions=function(){recursiveCountProps($scope.permissionsObj);};recursiveCountProps($scope.permissionsObj);$scope.submit=function(){if($scope.keyName===undefined){$scope.errorKeyName='The Name field must have at least 3 characters';} 775else{if($scope.keyName===''){$scope.errorKeyName='The Name field is mandatory';} 776if($scope.keyName.length<1){$scope.errorKeyName='The Name field must have at least 1 characters';} 777if($scope.keyName.length>50){$scope.errorKeyName='The Name field must have a maximum of 50 characters';}} 778if($scope.keyName.length>=1&&$scope.keyName.length<50){$scope.errorKeyName='';} 779if($scope.selectedPermissions.length===0){$scope.errorPermissions='Choose permissions';} 780else{$scope.errorPermissions='';} 781if($scope.errorKeyName===''&&$scope.errorPermissions===''){if($scope.editMode===false){callback({permissionsArray:$scope.selectedPermissions,keyName:$scope.keyName,edit:false});} 782else{if($scope.editInfo.field==='permissions'){callback({permissionsArray:$scope.selectedPermissions,key:$scope.editInfo.apiKeyObject.key,edit:$scope.editInfo.field,apiKeyObject:params.editInfo.apiKeyObject});} 783if($scope.editInfo.field==='name'){callback({key:$scope.editInfo.apiKeyObject,newKey:$scope.keyName,edit:$scope.editInfo.field,apiKeyObject:params.editInfo.apiKeyObject});}} 784$scope.cancelModal();}};}],size:'md',backdrop:false,resolve:{params:function(){return{"permissionsObj":permissionsObj,"editInfo":editInfo};}}});};cModalService.showModalDeleteAPIKey=function(keyObject,callback){keyObject.title="Revoke API Key";keyObject.description="By revoking this key all API requests made against it will be rate limited by IP. Once deleted there is no way to recover this key, you'll have to generate a new one. The key you are deleting is:" 785var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/deletekey',controller:['$scope','$uibModalInstance','$http','params','toastNotifications',function deleteCurrentPasswordModalCtrl($scope,$uibModalInstance,$http,params,toastNotifications){$scope.sendingDetailsToApi=false;$scope.keyObject=params.keyObject;$scope.cancelModal=function(messageToPassToToast){$uibModalInstance.dismiss(messageToPassToToast);};$scope.ok=function(){$scope.cancelModal();callback($scope.keyObject.key);};}],size:'md',resolve:{params:function(){return{"keyObject":keyObject};}}});};cModalService.showModalDeletePermission=function(apiKey,permissionToDelete,callback){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/cryptopian/deletepermission',controller:['$scope','$uibModalInstance','$http','params','toastNotifications',function deleteCurrentPasswordModalCtrl($scope,$uibModalInstance,$http,params,toastNotifications){$scope.sendingDetailsToApi=false;$scope.key=params.key;$scope.permissionToDelete=params.permissionToDelete;$scope.cancelModal=function(messageToPassToToast){$uibModalInstance.dismiss(messageToPassToToast);};$scope.ok=function(){$scope.cancelModal();callback(params.apiKey,permissionToDelete);};}],size:'md',resolve:{params:function(){return{"apiKey":apiKey,"permissionToDelete":permissionToDelete};}}});};}]);
785angular.module('ccc-app').service('gModalService',['$uibModal','$log',function($uibModal,$log){this.showMessageModal=function(message){var modalInstance=$uibModal.open({templateUrl:'gModalService/showMessage.html',controller:'ShowMessageCtrl',resolve:{message:function(){return message;}}});};this.showTipUsModal=function(){var message={btcQr:false,ltcQr:false,dogeQr:false,dashQr:false,nmcQr:false,show:function(item){this.btcQr=false;this.ltcQr=false;this.dogeQr=false;this.dashQr=false;this.nmcQr=false;this[item]=true;},hide:function(item){this[item]=false;}};var modalInstance=$uibModal.open({templateUrl:'gModalService/showTipMessage.html',controller:'ShowMessageCtrl',resolve:{message:function(){return message;}}});};this.showFeedbackModal=function(debugInfo){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/sendfeedback',controller:'ShowFeedackCtrl',resolve:{debugInfo:function(){return debugInfo;}}});};this.showCryptopianList=function(obj){var modalInstance=$uibModal.open({templateUrl:CCC.pathForWebsite+'/angular/forum-list/cryptopians/',controller:'CryptopianListModalCtrl',size:'cm',resolve:{initObj:function(){return obj;}}});};}]);angular.module('ccc-app').factory('chartUtil',['$rootScope','$filter','$http','$q',function chartUtilFactory($rootScope,$filter,$http,$q){var chartsData={};var chartPeriods=[];var currentStatus={'fromSymbol':'','toSymbol':'','dataLoaded':false,'dataIsLoading':true,'period':{},'data':[],'stats':{},'tableDisplay':[]};var makeKey=function(type,e,fsym,tsym,limit){return type+'~'+e+'~'+fsym+'~'+tsym+'~'+limit;} 786var util=CCC.STATIC.UTIL;var displayCurrency=CCC.STATIC.CURRENCY;var colorOptions=CCC.STATIC.UTIL.chartColors;var symbolsByTsCache={};return{availableChartPeriods:function(periods){chartPeriods=periods;},isPeriodSelected:function(periodId){return currentStatus.period.name==chartPeriods[periodId].name;},setFromSymbol:function(symbol){currentStatus.fromSymbol=symbol;},setToSymbol:function(symbol){currentStatus.toSymbol=symbol;},saveCurrentPeriod:function(period){currentStatus.period=period;},handleNewPeriod:function(periodId){$rootScope.$emit("ChartPeriodChange",periodId);},saveCurrentData:function(dataSet){currentStatus.data=dataSet;var tableDisplayData=[];var prevValue="";for(var i=0,length=dataSet.length;i<length;i++){if(i%currentStatus.period.periodForTable==0){var objectToAdd={};objectToAdd.dateDisplay=$filter('date')(new Date(dataSet[i].time),'yyyy-MM-dd HH:mm');objectToAdd.close=dataSet[i].close;objectToAdd.priceDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),objectToAdd.close);if(i>0){objectToAdd.chgValue=this.convertValueForChart(objectToAdd.close-prevValue.close);objectToAdd.chgValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),objectToAdd.chgValue);var pctChange=(objectToAdd.chgValue/prevValue.close)*100;if(pctChange<1){objectToAdd.pct=pctChange.toFixed(2);}else{objectToAdd.pct=this.convertValueToDisplay('',pctChange);}}else{objectToAdd.chgValue=0;objectToAdd.chgValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),objectToAdd.chgValue);objectToAdd.pct=0;} 787prevValue=objectToAdd;tableDisplayData.push(objectToAdd);}} 788currentStatus.tableDisplay=tableDisplayData.reverse();},setChartStats:function(stats){currentStatus.stats=stats;currentStatus.stats.chgValue=this.convertValueForChart(stats['close']-stats['open']);currentStatus.stats.pct=this.convertValueToDisplay('',(currentStatus.stats.chgValue/stats['open'])*100);currentStatus.stats.chgValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.chgValue);currentStatus.stats.highValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.high);currentStatus.stats.lowValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.low);currentStatus.stats.openValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.open);currentStatus.stats.closeValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.close);currentStatus.stats.volumeFromValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.fromSymbol),stats.volumefrom);currentStatus.stats.volumeToValueDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.volumeto);currentStatus.stats.highDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.high);currentStatus.stats.lowDisplay=this.convertValueToDisplay(this.getSymbolFromCurrencyCode(currentStatus.toSymbol),stats.low);},getChartStats:function(){return currentStatus.stats;},setLoaded:function(isLoaded){currentStatus.dataLoaded=isLoaded;},setLoading:function(isLoading){currentStatus.dataIsLoading=isLoading;},getToSymbol:function(){return currentStatus.toSymbol;},getLoaded:function(){return currentStatus.dataLoaded;},getLoading:function(){return currentStatus.dataIsLoading;},getCurrentPeriod:function(){return currentStatus.period;}
788,getAvailableChartPeriods:function(){return chartPeriods;},getCurrentData:function(){return currentStatus.data;},getTableDisplay:function(){return currentStatus.tableDisplay;},saveData:function(type,e,fsym,tsym,limit,chartData){var key=makeKey(type,e,fsym,tsym,limit);chartsData[key]=chartData;},hasData:function(type,e,fsym,tsym,limit){var key=makeKey(type,e,fsym,tsym,limit);if(chartsData.hasOwnProperty(key)){return true;} 789return false;},getHistoFromMemory:function(type,e,fsym,tsym,limit){var key=makeKey(type,e,fsym,tsym,limit);return chartsData[key];},getSocialHistoFromApi:function(type,id,limit,aggregate){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['coinId']=id;paramsForCall['params']['limit']=limit;if(aggregate){paramsForCall['params']['aggregate']=aggregate;} 790paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/social/histo/"+type,paramsForCall);},getBlockchainHistoFromApi:function(symbol,limit){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['fsym']=symbol;paramsForCall['params']['limit']=limit;paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/blockchain/histo/day",paramsForCall);},getHistoFromMinApi:function(type,e,fsym,tsym,limit,aggregate,position,toTs){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['e']=e;paramsForCall['params']['fsym']=fsym;paramsForCall['params']['tsym']=tsym;if(limit){paramsForCall['params']['limit']=limit;}else{paramsForCall['params']['allData']=true;} 791if(aggregate){paramsForCall['params']['aggregate']=aggregate;}else{paramsForCall['params']['aggregate']=1;} 792if(toTs){paramsForCall['params']['toTs']=toTs;} 793paramsForCall['params']['tryConversion']=false;paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/v2/histo"+type,paramsForCall);},getHistoExchangeVolume:function(type,e,fsym,tsym,limit,aggregate,total){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['e']=e;paramsForCall['params']['fsym']=fsym;paramsForCall['params']['tsym']=tsym;if(limit){paramsForCall['params']['limit']=limit;}else{paramsForCall['params']['allData']=true;} 794if(aggregate){paramsForCall['params']['aggregate']=aggregate;}else{paramsForCall['params']['aggregate']=1;} 795let url=CCC.minApiUrl+(total?"data/exchange/histo":"data/exchange/symbol/histo");paramsForCall['params']['tryConversion']=false;paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(url+type,paramsForCall);},getPortfolioHistoFromMinApi:function(type,e,fsym,tsym,limit,aggregate,position,toTs,cacheReset){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['e']=e;paramsForCall['params']['fsym']=fsym;paramsForCall['params']['tsym']=tsym;if(limit){paramsForCall['params']['limit']=limit;}else{paramsForCall['params']['allData']=true;} 796if(aggregate){paramsForCall['params']['aggregate']=aggregate;}else{paramsForCall['params']['aggregate']=1;} 797if(toTs){paramsForCall['params']['toTs']=toTs;} 798if(cacheReset!==undefined&&cacheReset==true){paramsForCall['params']['cb']=Math.floor(Date.now());} 799paramsForCall['params']['tryConversion']=true;paramsForCall['params']['extraParams']=CCC.pathForWebsite;return $http.get(CCC.minApiUrl+"data/v2/histo"+type,paramsForCall);},getSymbolFromCurrencyCode:function(currencyCode){return displayCurrency.getSymbol(currencyCode);},getDaysSoFarInYear:function(){var currentDate=new Date();var startOfYear=new Date(currentDate.getFullYear(),0,0);var diffInMilliSeconds=currentDate-startOfYear;var oneDayInMilliSeconds=86400000;var currentDay=Math.floor(diffInMilliSeconds/oneDayInMilliSeconds);if(currentDay==0){currentDay=1;} 800return currentDay-1;},convertValueForChart:function(value){return util.reduceFloatVal(value);},convertValueToDisplay:function(symbol,value){return util.convertValueToDisplay(symbol,value,$filter('number'),'short',false);},convertValueToDisplayLong:function(symbol,value){return util.convertValueToDisplay(symbol,value,$filter('number'));},convertExchangeName:function(value){return util.getNameForExchange(value);},topVolumeColumn:function(graphs,text,valuefield){graphs.push({id:"base",valueField:valuefield,type:"column",fillAlphas:0.8,lineColor:'#006098',title:text+" Volume",balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>[[value]]</span></span>"});},addGuideLine:function(guides,value,text,color){guides.push({value:value,label:text,lineAlpha:0.5,lineThickness:1,color:color,inside:true,position:"right",lineColor:color});},topLineSerial:function(graphs,text,valuefield,currencyField){graphs.push({id:"base",valueField:valuefield,type:"line",fillAlphas:0.1,lineColor:'#006098',title:text,balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>"+currencyField+" [[value]]</span></span>"});},topLineSerialWithBullet:function(graphs,text,valuefield,bulletField,currencyField){graphs.push({id:"base",valueField:valuefield,type:"line",bulletField:bulletField,fillAlphas:0.1,lineColor:'#006098',title:text,balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>"+currencyField+" [[value]]</span></span>"});},topLineSerialSecondary:function(graphs,text,valuefield,currencyField){graphs.push({id:"secondary",valueField:valuefield,type:"line",fillAlphas:0,lineColor:'#00FF00',title:text,balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>"+currencyField+" [[value]]</span></span>"});},topLineSerialVolatility:function(graphs,text,valuefield){graphs.push({id:"volatility",valueField:valuefield,type:"line",fillAlphas:0.1,lineColor:'#006098',title:text,balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>[[value]]%</span></span>"});},topPositiveNegativeBarsSerial:function(graphs,text,valuefield,currencyField){graphs.push({id:"base",valueField:valuefield,type:"column",fillAlphas:0.8,useDataSetColors:false,lineColor:colorOptions.Green.Hex,negativeLineColor:colorOptions.Red.Hex,negativeFillColors:colorOptions.Red.Hex,title:text,balloonText:"<span style='font-size:12px;'>[[title]]:<br><span style='font-size:16px;'>"+currencyField+" [[value]]</span></span>"});},topApiCallsSerial:function(graphs,valuefield,displayfield){graphs.push({id:"base",valueField:valuefield,type:"column",fillAlphas:0.2,lineAlpha:0.8,useDataSetColors:false,fillColorsField:"fillColor",lineColorField:"lineColor",labelText:"[[label]]",balloonFunction:function(graphDataItem,graph){var isInThePast=graphDataItem.dataContext.in_the_past;if(isInThePast===true){return"<span style='font-size:12px;'>Calls used<br><span style='font-size:16px;'>"+graphDataItem.dataContext[displayfield]+"</span></span>";}else{return"<span style='font-size:12px;'>Calls projected<br><span style='font-size:16px;'>"+graphDataItem.dataContext[displayfield]+"</span></span>";}},balloonText:"<span style='font-size:12px;'>[[labelText]]<br><span style='font-size:16px;'>[[value]]</span></span>"});},topStacked:function(graphs,text,valuefield,colorHex){graphs.push({id:text+'_'+valuefield,valueField:text+'_'+valuefield,lineAlpha:0.8,fillAlphas:0.4,lineColor:colorHex,fillColor:colorHex,title:text,balloonText:"<span style='font-size:11px;'>[[title]] : [[value]] ([[percents]]%)</span>"});},bottomVolume:function(dataSet,panel,text,ballonText){dataSet.fieldMappings.push({fromField:"volumefrom",toField:"volumefrom"});panel.title="Volume "+text;if(ballonText===undefined){ballonText=text;} 801panel.stockGraphs.push({valueField:"volumefrom",type:"column",fillAlphas:0.8,balloonFunction:function(graphDataItem,graph){var formattedValue=AmCharts.addPrefix(graphDataItem.values.value,[{number:1e+6,prefix:"M"},{number:1e+9,prefix:"B"},{number:1e+12,prefix:"T"}],[],{precision:-1,decimalSeparator:'.',thousandsSeparator:','})
802return ballonText+": <b>"+formattedValue+"</b>";}});},bottomVolumeTo:function(dataSet,panel,text,ballonText){dataSet.fieldMappings.push({fromField:"volumeto",toField:"volumeto"});panel.title="Volume "+text;if(ballonText===undefined){ballonText=text;} 803panel.stockGraphs.push({valueField:"volumeto",type:"column",fillAlphas:0.8,balloonFunction:function(graphDataItem,graph){var formattedValue=AmCharts.addPrefix(graphDataItem.values.value,[{number:1e+6,prefix:"M"},{number:1e+9,prefix:"B"},{number:1e+12,prefix:"T"}],[],{precision:-1,decimalSeparator:'.',thousandsSeparator:','}) 804return ballonText+": <b>"+formattedValue+"</b>";}});},topCandleStick:function(dataSet,panel,text){dataSet.fieldMappings.push({fromField:"close",toField:"close",});dataSet.fieldMappings.push({fromField:"open",toField:"open"});dataSet.fieldMappings.push({fromField:"high",toField:"high"});dataSet.fieldMappings.push({fromField:"low",toField:"low"});panel.stockGraphs.push({id:"base",type:"candlestick",balloonText:"Open:<b>[[open]]</b><br>Low:<b>[[low]]</b><br>High:<b>[[high]]</b><br>Close:<b>[[close]]</b><br>",closeField:"close",fillColors:"#3d9400",highField:"high",lineColor:"#3d9400",lineAlpha:1,lowField:"low",fillAlphas:0.8,negativeFillColors:"#d14836",negativeLineColor:"#d14836",openField:"open",valueField:"close",valueAxis:"a1",legendValueText:"[[close]] "+text,proCandlesticks:false});panel.stockLegend.valueTextRegular="[[close]] "+text;},topLine:function(dataSet,panel,text,withFill,valueField,valueToDisplay){valueField=valueField||'close';valueToDisplay=valueToDisplay||valueField;var valueFieldName=valueField.charAt(0).toUpperCase()+valueField.slice(1);dataSet.fieldMappings.push({fromField:valueField,toField:valueField,});var lineChart={id:"base",valueField:valueField,lineThickness:1,balloonFunction:function(graphDataItem,graph){var formattedValue=AmCharts.addPrefix(graphDataItem.values.value,[{number:1e+6,prefix:"M"},{number:1e+9,prefix:"B"},{number:1e+12,prefix:"T"}],[],{precision:-1,decimalSeparator:'.',thousandsSeparator:','}) 805return text+": <b>"+formattedValue+"</b>";},valueAxis:"a1",legendValueText:"[["+valueField+"]] "+text,bullet:"none"};if(withFill){lineChart.fillAlphas=0.1;};panel.stockGraphs.push(lineChart);panel.stockLegend.valueTextRegular="[["+valueField+"]] "+text;},topOHLC:function(dataSet,panel,text){dataSet.fieldMappings.push({fromField:"close",toField:"close",});dataSet.fieldMappings.push({fromField:"open",toField:"open"});dataSet.fieldMappings.push({fromField:"high",toField:"high"});dataSet.fieldMappings.push({fromField:"low",toField:"low"});panel.stockGraphs.push({id:"base",type:"ohlc",balloonText:"Open:<b>[[open]]</b><br>Low:<b>[[low]]</b><br>High:<b>[[high]]</b><br>Close:<b>[[close]]</b><br>",closeField:"close",fillColors:"#3d9400",highField:"high",lineColor:"#3d9400",lineAlpha:1,lowField:"low",fillAlphas:0.8,negativeFillColors:"#d14836",negativeLineColor:"#d14836",openField:"open",valueField:"close",legendValueText:"[[close]] "+text,valueAxis:"a1",proCandlesticks:false});panel.stockLegend.valueTextRegular="[[close]] "+text;},addDownloadButtonToChart:function(){return[{label:"<i class='fa fa-floppy-o'></i>",title:"Save as... ",menu:[{label:"PNG",click:function(){if(this.drawing.buffer.enabled){this.drawing.handler.done();this.toPNG({},function(data){this.download(data,"image/png",this.config.fileName+Date.now()+'.png');});}else{this.capture({},function(){this.toPNG({},function(data){this.download(data,"text/xml",this.config.fileName+Date.now()+'.png');});});}}},{label:"JPG",click:function(){if(this.drawing.buffer.enabled){this.drawing.handler.done();this.toJPG({},function(data){this.download(data,"image/jpg",this.config.fileName+Date.now()+'.jpg');});}else{this.capture({},function(){this.toJPG({},function(data){this.download(data,"text/xml",this.config.fileName+Date.now()+'.jpg');});});}}},{label:"SVG",click:function(){if(this.drawing.buffer.enabled){this.drawing.handler.done();this.toSVG({},function(data){this.download(data,"text/xml",this.config.fileName+Date.now()+'.svg');});}else{this.capture({},function(){this.toSVG({},function(data){this.download(data,"text/xml",this.config.fileName+Date.now()+'.svg');});});}}},{label:"CSV",click:function(){this.toCSV({},function(data){this.download(data,"text/plain",this.config.fileName+Date.now()+".csv");});}},{label:"JSON",click:function(){this.toJSON({},function(data){this.download(data,"text/plain",this.config.fileName+Date.now()+".json");});}},{label:"XLSX",click:function(){this.toXLSX({},function(data){this.download(data,"application/octet-stream",this.config.fileName+Date.now()+".xlsx");});}}]}];},appendData:function(originalDataSet,newDataSet,field,prefix){var indexODS=0;var indexNDS=0;if(originalDataSet.length==0){for(var i=0,len=newDataSet.length;i<len;i++){var newObj={};newObj['time']=newDataSet[i]['time'];newObj['timeDate']=new Date(newObj['time']);newObj[prefix+'_'+field]=newDataSet[i][field];originalDataSet.push(newObj);} 806return;} 807if(newDataSet.length==0){for(var i=0,len=originalDataSet.length;i<len;i++){originalDataSet[i][prefix+'_'+field]=0;} 808return;} 809while(indexODS<originalDataSet.length&&originalDataSet[indexODS]['time']<newDataSet[indexNDS]['time']){originalDataSet[indexODS][prefix+'_'+field]=0;indexODS++;} 810var newDataSetToAdd=[];while(originalDataSet[indexODS]['time']>newDataSet[indexNDS]['time']){var newObj={};for(var propertyName in originalDataSet[indexODS]){newObj[propertyName]=0;} 811newObj['time']=newDataSet[indexNDS]['time'];newObj['timeDate']=new Date(newDataSet[indexNDS]['time']);newObj[prefix+'_'+field]=newDataSet[indexNDS][field];newDataSetToAdd.push(newObj);indexNDS++;} 812if(newDataSetToAdd.length>0){indexODS=newDataSetToAdd.length;originalDataSet=newDataSetToAdd.concat(originalDataSet);} 813while(indexODS<originalDataSet.length&&indexNDS<newDataSet.length&&originalDataSet[indexODS]['time']==newDataSet[indexNDS]['time']){originalDataSet[indexODS][prefix+'_'+field]=newDataSet[indexNDS][field];indexNDS++;indexODS++;} 814while(indexODS<originalDataSet.length&&originalDataSet[indexODS]['time']>newDataSet[indexNDS]['time']){originalDataSet[indexODS][prefix+'_'+field]=0;indexODS++;} 815while(indexNDS<newDataSet.length&&originalDataSet[indexODS]['time']<newDataSet[indexNDS]['time']){var newObj={};for(var propertyName in originalDataSet[indexODS]){newObj[propertyName]=0;} 816newObj['time']=newDataSet[indexNDS]['time'];newObj['timeDate']=new Date(newObj['time']);newObj[prefix+'_'+field]=newDataSet[indexNDS][field];originalDataSet.push(newObj);indexNDS++;indexODS++;}}
816,polyfillSocialData:function(chartData,interval){var arrayToReturn=[];var valueToAddAtEnd={};var allData=chartData['Data'];var timestampToStop;var currentTimestamp=chartData.TimeFrom;if(!chartData.hasOwnProperty('Data')){return arrayToReturn;} 817if(allData.length>0){timestampToStop=allData[0]['time'];}else{timestampToStop=chartData.TimeTo;} 818if(!chartData.FirstValueInArray){var initalValue={};for(var attrname in chartData['FirstValue']){initalValue[attrname]=chartData['FirstValue'][attrname];} 819initalValue['time']=chartData.TimeFrom*1000;initalValue['timeDate']=new Date(initalValue['time']);arrayToReturn.push(initalValue);currentTimestamp=currentTimestamp+interval;while(currentTimestamp<timestampToStop){var newValue={};for(var attrname in chartData['FirstValue']){newValue[attrname]=chartData['FirstValue'][attrname];} 820newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;}} 821if(allData.length==0){return arrayToReturn;} 822var newValue={};currentTimestamp=allData[0]['time'];for(var attrname in allData[0]){newValue[attrname]=allData[0][attrname];} 823newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;for(var i=1;i<allData.length;i++){timestampToStop=allData[i]['time'];while(currentTimestamp<timestampToStop){var newValue={};for(var attrname in allData[i-1]){newValue[attrname]=allData[i-1][attrname];} 824newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;} 825var newValue={};for(var attrname in allData[i]){newValue[attrname]=allData[i][attrname];} 826newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);valueToAddAtEnd=newValue;arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;};timestampToStop=chartData.TimeTo;while(currentTimestamp<=timestampToStop){var newValue={};for(var attrname in valueToAddAtEnd){newValue[attrname]=valueToAddAtEnd[attrname];} 827newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;} 828return arrayToReturn;},generateEmptyData:function(interval,totalPoints,initalTS){var emptyDataArray=[];for(var i=0;i<totalPoints;i++){var emptyValueToAdd={};emptyValueToAdd['time']=(initalTS+(interval*i))*1000;emptyValueToAdd['timeDate']=new Date(emptyValueToAdd['time']);emptyValueToAdd['close']=0;emptyValueToAdd['high']=0;emptyValueToAdd['low']=0;emptyValueToAdd['open']=0;emptyValueToAdd['volumefrom']=0;emptyValueToAdd['volumeto']=0;emptyDataArray.push(emptyValueToAdd);} 829return emptyDataArray;},aggregateChartData:function(chartData,aggregate){var tempChartObjectData=[];if(aggregate===1){for(let gocdIndex=0,gocdLength=chartData.length;gocdIndex<gocdLength;gocdIndex++){var currentAggregationStep={};for(var property in chartData[gocdIndex]){currentAggregationStep[property]=chartData[gocdIndex][property];} 830tempChartObjectData.push(currentAggregationStep);} 831return tempChartObjectData;} 832let needToAddlastPoint=true;var currentAggregationStep={};for(let gocdIndex=0,gocdLength=chartData.length;gocdIndex<gocdLength;gocdIndex++){if(gocdIndex%aggregate===aggregate-1){if(currentAggregationStep.open==0){currentAggregationStep.open=chartData[gocdIndex].open;} 833currentAggregationStep.high=Math.max(currentAggregationStep.high,chartData[gocdIndex].high);if(currentAggregationStep.low>0){currentAggregationStep.low=Math.min(currentAggregationStep.low,chartData[gocdIndex].low);}else{currentAggregationStep.low=chartData[gocdIndex].low;} 834currentAggregationStep.volumeto=currentAggregationStep.volumeto+chartData[gocdIndex].volumeto;currentAggregationStep.volumefrom=currentAggregationStep.volumefrom+chartData[gocdIndex].volumefrom;currentAggregationStep.close=chartData[gocdIndex].close;needToAddlastPoint=false;tempChartObjectData.push(currentAggregationStep);}else if(gocdIndex%aggregate==0){currentAggregationStep={};for(var property in chartData[gocdIndex]){currentAggregationStep[property]=chartData[gocdIndex][property];} 835needToAddlastPoint=true;}else{if(currentAggregationStep.open==0){currentAggregationStep.open=chartData[gocdIndex].open;} 836currentAggregationStep.high=Math.max(currentAggregationStep.high,chartData[gocdIndex].high);if(currentAggregationStep.low>0){currentAggregationStep.low=Math.min(currentAggregationStep.low,chartData[gocdIndex].low);}else{currentAggregationStep.low=chartData[gocdIndex].low;} 837currentAggregationStep.volumeto=currentAggregationStep.volumeto+chartData[gocdIndex].volumeto;currentAggregationStep.volumefrom=currentAggregationStep.volumefrom+chartData[gocdIndex].volumefrom;currentAggregationStep.close=chartData[gocdIndex].close;needToAddlastPoint=true;}} 838if(needToAddlastPoint){tempChartObjectData.push(currentAggregationStep);} 839return tempChartObjectData;}
839,roundCurrentDateToInterval:function(interval){var currentDate=Math.floor(new Date().getTime()/1000);return currentDate-currentDate%interval;},calculateChartStats:function(chartData){var chartStats={close:0,high:0,tsHigh:0,low:0,tsLow:0,open:0,volumefrom:0,volumeto:0};if(chartData.length===0){return chartStats;} 840chartStats['high']=chartData[0]['high'];chartStats['tsHigh']=chartData[0]['ts'];chartStats['low']=chartData[0]['low'];chartStats['tsLow']=chartData[0]['ts'];chartStats['close']=chartData[0]['close'];chartStats['open']=chartData[0]['open'];chartStats['volumefrom']=chartData[0]['volumefrom'];chartStats['volumeto']=chartData[0]['volumeto'];for(var i=1,len=chartData.length;i<len;i++){chartStats['close']=chartData[i]['close'];chartStats['volumefrom']+=chartData[i]['volumefrom'];chartStats['volumeto']+=chartData[i]['volumeto'];if(chartData[i]['high']>chartStats['high']){chartStats['high']=chartData[i]['high'];chartStats['tsHigh']=chartData[i]['ts'];} 841if(chartData[i]['low']<chartStats['low']){chartStats['low']=chartData[i]['low'];chartStats['tsLow']=chartData[i]['ts'];}} 842return chartStats;},convertChartDataToDisplay:function(chartData){if(chartData.length===0){return chartData;} 843for(var i=0,len=chartData.length;i<len;i++){chartData[i]['close']=util.reduceFloatVal(chartData[i]['close']);chartData[i]['high']=util.reduceFloatVal(chartData[i]['high']);chartData[i]['low']=util.reduceFloatVal(chartData[i]['low']);chartData[i]['open']=util.reduceFloatVal(chartData[i]['open']);chartData[i]['volumefrom']=util.reduceFloatVal(chartData[i]['volumefrom']);chartData[i]['volumeto']=util.reduceFloatVal(chartData[i]['volumeto']);} 844return chartData;},appendTimesToData:function(chartData){if(chartData.length===0){return chartData;} 845for(var i=0,len=chartData.length;i<len;i++){chartData[i]['ts']=chartData[i]['time'];chartData[i]['time']=chartData[i]['time']*1000;chartData[i]['timeDate']=new Date(chartData[i]['time']);} 846return chartData;},polyfillChartData:function(chartData,interval,indexForStats,dateFormat){var chartStats={close:0,high:0,low:0,open:0,volumefrom:0,volumeto:0};var arrayToReturn=[];var prevClose;var allData=chartData['Data'];var timestampToStop;var currentTimestamp=chartData.TimeFrom;if(!chartData.hasOwnProperty('Data')){return{data:arrayToReturn,stats:chartStats};} 847if(allData.length>0){timestampToStop=allData[0]['time'];}else{timestampToStop=chartData.TimeTo;} 848if(allData.length==0){chartStats['high']=arrayToReturn[0]['high'];chartStats['tsHigh']=arrayToReturn[0]['time'];chartStats['low']=arrayToReturn[0]['low'];chartStats['tsLow']=arrayToReturn[0]['time'];chartStats['close']=arrayToReturn[0]['close'];chartStats['open']=arrayToReturn[0]['open'];chartStats['volumefrom']=arrayToReturn[0]['volumefrom'];chartStats['volumeto']=arrayToReturn[0]['volumeto'];return{data:arrayToReturn,stats:chartStats};} 849var newValue={};currentTimestamp=allData[0]['time'];newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);newValue['close']=util.reduceFloatVal(allData[0]['close']);newValue['high']=util.reduceFloatVal(allData[0]['high']);newValue['low']=util.reduceFloatVal(allData[0]['low']);newValue['open']=util.reduceFloatVal(allData[0]['open']);newValue['volumefrom']=util.reduceFloatVal(allData[0]['volumefrom']);newValue['volumeto']=util.reduceFloatVal(allData[0]['volumeto']);if(arrayToReturn.length>=indexForStats){chartStats['high']=allData[0]['high'];chartStats['tsHigh']=allData[0]['time'];chartStats['low']=allData[0]['low'];chartStats['tsLow']=allData[0]['time'];chartStats['open']=allData[0]['open'];chartStats['volumefrom']=allData[0]['volumefrom'];chartStats['volumeto']=allData[0]['volumeto'];} 850if(dateFormat){newValue['formatedDate']=$filter('date')(new Date(newValue['time']),dateFormat);} 851arrayToReturn.push(newValue);prevClose=newValue['close'];currentTimestamp=currentTimestamp+interval;for(var i=1;i<allData.length;i++){timestampToStop=allData[i]['time'];while(currentTimestamp<timestampToStop){var newValue={};newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);newValue['close']=prevClose;newValue['high']=prevClose;newValue['low']=prevClose;newValue['open']=prevClose;newValue['volumefrom']=0;newValue['volumeto']=0;
851if(dateFormat){newValue['formatedDate']=$filter('date')(new Date(newValue['time']),dateFormat);} 852arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;} 853var newValue={};newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);newValue['close']=util.reduceFloatVal(allData[i]['close']);newValue['high']=util.reduceFloatVal(allData[i]['high']);newValue['low']=util.reduceFloatVal(allData[i]['low']);newValue['open']=util.reduceFloatVal(allData[i]['open']);newValue['volumefrom']=util.reduceFloatVal(allData[i]['volumefrom']);newValue['volumeto']=util.reduceFloatVal(allData[i]['volumeto']);if(dateFormat){newValue['formatedDate']=$filter('date')(new Date(newValue['time']),dateFormat);} 854arrayToReturn.push(newValue);prevClose=newValue['close'];if(arrayToReturn.length>indexForStats&&chartStats['open']>0){chartStats['close']=allData[i]['close'];if(allData[i]['high']>=chartStats['high']){chartStats['tsHigh']=allData[i]['time'];chartStats['high']=allData[i]['high'];} 855if(allData[i]['low']<=chartStats['low']){chartStats['tsLow']=allData[i]['time'];chartStats['low']=allData[i]['low'];} 856chartStats['volumefrom']+=allData[i]['volumefrom'];chartStats['volumeto']+=allData[i]['volumeto'];}else if(arrayToReturn.length==indexForStats||chartStats['open']==0){chartStats['close']=allData[i]['close'];chartStats['open']=allData[i]['open'];chartStats['high']=allData[i]['high'];chartStats['tsHigh']=allData[i]['time'];chartStats['low']=allData[i]['low'];chartStats['tsLow']=allData[i]['time'];chartStats['volumefrom']=allData[i]['volumefrom'];chartStats['volumeto']=allData[i]['volumeto'];} 857currentTimestamp=currentTimestamp+interval;};timestampToStop=chartData.TimeTo;while(currentTimestamp<=timestampToStop){var newValue={};newValue['time']=currentTimestamp*1000;newValue['timeDate']=new Date(newValue['time']);newValue['close']=prevClose;newValue['high']=prevClose;newValue['low']=prevClose;newValue['open']=prevClose;newValue['volumefrom']=0;newValue['volumeto']=0;if(dateFormat){newValue['formatedDate']=$filter('date')(new Date(newValue['time']),dateFormat);} 858arrayToReturn.push(newValue);currentTimestamp=currentTimestamp+interval;} 859return{data:arrayToReturn,stats:chartStats};},getTradingSignals:function(fsym){var paramsForCall={};paramsForCall['withCredentials']=true;paramsForCall['params']={};paramsForCall['params']['fsym']=fsym;return $http.get(CCC.minApiUrl+"data/tradingsignals/intotheblock/latest",paramsForCall);},getPriceByTs:function(fsym,tsym,timestamp){var deferred=$q.defer();if(symbolsByTsCache[fsym]&&symbolsByTsCache[fsym][tsym]&&symbolsByTsCache[fsym][tsym][timestamp]){deferred.resolve(symbolsByTsCache[fsym][tsym][timestamp]);}else{var paramsForCall={fsym:fsym,tsyms:tsym,ts:timestamp} 860$http.get(CCC.minApiUrl+"data/pricehistorical",{params:paramsForCall,"withCredentials":true}).then(function(response){symbolsByTsCache[fsym]=symbolsByTsCache[fsym]?symbolsByTsCache[fsym]:{};symbolsByTsCache[fsym][tsym]=symbolsByTsCache[fsym][tsym]?symbolsByTsCache[fsym][tsym]:{};symbolsByTsCache[fsym][tsym][timestamp]=response.data[fsym][tsym];deferred.resolve(symbolsByTsCache[fsym][tsym][timestamp]);});} 861return deferred.promise;}};}]);angular.module('ccc-app').filter('parseUrlFilter',function(){var urlPattern=/(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/gi;var imagePattern=/(\.jpeg|\.jpg|\.png|\.gif)/;var noFollow='';return function(text,target){return text.replace(urlPattern,function(url){if(imagePattern.test(url)){return'<img src="'+url+'" class="forum-image-embed"/>';} 862if(url.length>29&&url.substring(0,29)==='https://www.cryptocompare.com'){noFollow='';}else{noFollow='rel="nofollow" ';} 863return'<a target="'+target+'" href="'+url+'" '+noFollow+'class="link-external"><span class="fa fa-external-link"></span>'+url+'</a>';});};});angular.module('ccc-app').filter('cutText',function(){return function(value,wordwise,max,tail){if(!value)return'';value=value.replace(/<br\/>/g,'') 864max=parseInt(max,10);if(!max)return value;if(value.length<=max)return value;value=value.substr(0,max);
864if(wordwise){var lastspace=value.lastIndexOf(' ');if(lastspace!=-1){value=value.substr(0,lastspace);}} 865return value+(tail||' â¦');};}); 866;;;angular.module('ccc-app').controller('HeaderSEOCtrl',['$scope','pageInfo',function($scope,pageInfo){$scope.pageInfo=pageInfo;pageInfo.timeOutIncreaseInfo();}]);angular.module('ccc-app').controller('GeoDisplayCtrl',['$scope','pageInfo',function($scope,pageInfo){$scope.showForCountries=function(allowedCountries){if(allowedCountries.indexOf(pageInfo.getUserCountryCode())===-1){return false;} 867return true;} 868$scope.hideForCountries=function(hiddenCountries){if(hiddenCountries.indexOf(pageInfo.getUserCountryCode())===-1){return true;} 869return false}}]);angular.module('ccc-app').controller('HeaderCtrl',['$scope','$element',function($scope,$element){var affectedElement=$element[0];var offsetElement=document.getElementById('navigation-tabs');$(window).bind("scroll",function(){var offsetHeight=offsetElement.offsetHeight;if(this.pageYOffset>0){$('body').addClass('navigation-fixed');$(affe
869ctedElement).addClass("scrolled");}else{$('body').removeClass('navigation-fixed');$(affectedElement).removeClass("scrolled");} 870if(this.pageYOffset>offsetHeight){$('body').addClass('navigation-fixed');$(affectedElement).addClass("attached");}else{$('body').removeClass('navigation-fixed');$(affectedElement).removeClass("attached");}});}]);angular.module('ccc-app').controller('DropdownCtrl',['$scope',function($scope){$scope.menuCoins=false;$scope.menuExchanges=false;$scope.menuMining=false;$scope.menuWallets=false;$scope.menuForum=false;$scope.status={isopen:false};$scope.toggled=function(open){};$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();$scope.status.isopen=!$scope.status.isopen;};}]);angular.module('ccc-app').controller('RatingCtrl',['$scope',function($scope){$scope.currentStars=0;$scope.initStars=function(stars){$scope.currentStars=stars;};}]);angular.module('ccc-app').controller('UsernameOptionsCtrl',['$scope','$window','userManager','gModalService','cModalService','toastNotifications',function($scope,$window,userManager,gModalService,cModalService,toastNotifications){$scope.changingFollowStatus=false;$scope.userManager=userManager;$scope.followingHover=false;$scope.status={isopen:false};$scope.alreadyFollowing=false;$scope.alreadyBanned=false;$scope.itIsMe=false;$scope.isLoadingFollowing=false;$scope.isDeleting=false;$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();if($scope.isLoadingFollowing){return;} 871if($scope.cryptopian.Name=='[removed]'&&(!userManager.hasRole('forum_mod')&&!userManager.hasRole('forum_admin'))){return;} 872if(!$scope.status.isopen){if(userManager.getCryptopianId()==$scope.cryptopian.Id){$scope.itIsMe=true;$scope.status.isopen=!$scope.status.isopen;return;} 873if(userManager.isLoggedIn()){$scope.isLoadingFollowing=true;userManager.checkFollowingStatus($scope.cryptopian.Id).success(function(data){$scope.isLoadingFollowing=false;if(data.Type==100){$scope.alreadyFollowing=true;} 874if(data.Type==200){$scope.alreadyFollowing=false;} 875$scope.status.isopen=!$scope.status.isopen;});}else{$scope.status.isopen=!$scope.status.isopen;$scope.alreadyFollowing=false;}}else{$scope.status.isopen=!$scope.status.isopen;}};$scope.profileUrl='/profile/'+$scope.cryptopian.Name+'/';$scope.goToProfile=function(){$window.location=$scope.profileUrl;};$scope.changeFollowingStatus=function(){if($scope.changingFollowStatus){return;} 876$scope.changingFollowStatus=true;userManager.changeFollowingStatus($scope.cryptopian.Id,userManager.FOLLOWING.CRYPTOPIAN).then(function successCallback(response){var data=response.data;if(data["Response"]=="Success"){if(data.Type==100){toastNotifications.addNotification('success','Following '+$scope.cryptopian.Name+'!');$scope.alreadyFollowing=true;} 877if(data.Type==200){toastNotifications.addNotification('success','Unfollowed '+$scope.cryptopian.Name+'!');$scope.alreadyFollowing=false;}}else{if(data.Type==1){cModalService.showLoginModal('','Username Options Change Following Status');} 878if(data.Type==5){cModalService.showActivationReminderModal();};} 879$scope.changingFollowStatus=false;},function errorCallback(response){var data=response.data;$scope.changingFollowStatus=false;toastNotifications.addNotification('error',data["Message"]);});};$scope.restoreCryptopian=function(){if($scope.isRestoring){return;} 880var warning={'Title':'Restore Cryptopian','Body':'Are you sure you want to restore this Cryptopian?','Type':'warning','ShowOk':true,'OkAction':function(){$scope.isRestoring=true;userManager.restoreCryptopian($scope.cryptopian.Id).success(function(data){if(data["Response"]=="Success"){$scope.cryptopian.Name=data.Data.general.username;$scope.cryptopian.Avatar=CCC.STATIC.BASEIMAGEPATH+data.Data.general.avatar_url;$scope.profileUrl='/profile/'+$scope.cryptopian.Name+'/';$scope.isRestoring=true;toastNotifications.addNotification('success','Cryptopian has been successfully restored');}else{toastNotifications.addNotification('error','We could not restore this Cryptopian because: '+data["Message"]);} 881$scope.isRestoring=false;}).error(function(){$scope.isRestoring=false;toastNotifications.addNotification('error','We could not restore this Cryptopian because there was an internal error!');});}};gModalService.showMessageModal(warning);};$scope.deleteAllForumActivityCryptopian=function(){if($scope.isDeleting){return;} 882var warning={'Title':'Confirm delete all forum activity','Body':'Are you sure you want to delete all c
882omments and posts made by this cryptopian?','Type':'warning','ShowOk':true,'OkAction':function(){$scope.isDeleting=true;userManager.deleteAllForumActivity($scope.cryptopian.Id).success(function(data){if(data["Response"]=="Success"){$scope.isDeleted=true;toastNotifications.addNotification('success','All posts and comments have been successfully deleted');}else{toastNotifications.addNotification('error','We could not delete all posts and comments because: '+data["Message"]);} 883$scope.isDeleting=false;}).error(function(){$scope.isDeleting=false;toastNotifications.addNotification('error','We could not delete all posts and comments because there was an internal error!');});}};gModalService.showMessageModal(warning);};$scope.banOrUnbanCryptopian=function(){if(!$scope.alreadyBanned){cModalService.showBanModal({Id:$scope.cryptopian.Id,Name:$scope.cryptopian.Name,setBanned:function(){$scope.alreadyBanned=true;}});} 884if($scope.alreadyBanned){userManager.unBanCryptopian($scope.cryptopian.Id).success(function(data){if(data["Response"]=="Success"){if(data.Type==100){toastNotifications.addNotification('success','Cryptopian '+$scope.cryptopian.Name+' successfully un-banned!');$scope.alreadyBanned=false;}}else{if(data.Type==1){cModalService.showLoginModal('','Username Options Ban/Unban Cryptopian');} 885if(data.Type==5){cModalService.showActivationReminderModal();};if(data.Type==10){toastNotifications.addNotification('success','Cryptopian '+$scope.cryptopian.Name+' is already un-banned. Somebody beat you to it!');$scope.alreadyBanned=false;};}});}}}]);angular.module('ccc-app').controller('FollowableItemOptionsCtrl',['$scope','$window','userManager','cModalService','toastNotifications',function($scope,$window,userManager,cModalService,toastNotifications){$scope.changingFollowStatus=false;$scope.followingHover=false;$scope.status={isopen:false};$scope.alreadyFollowing=false;$scope.itIsMe=false;$scope.isLoadingFollowing=false;$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();if($scope.isLoadingFollowing){return;} 886if(!$scope.status.isopen){if(userManager.getCryptopianId()==$scope.item.Id){$scope.itIsMe=true;$scope.status.isopen=!$scope.status.isopen;return;} 887if(userManager.isLoggedIn()){$scope.isLoadingFollowing=true;userManager.checkFollowingStatus($scope.item.Id).success(function(data){$scope.isLoadingFollowing=false;if(data.Type==100){$scope.alreadyFollowing=true;} 888if(data.Type==200){$scope.alreadyFollowing=false;} 889$scope.status.isopen=!$scope.status.isopen;});}else{$scope.status.isopen=!$scope.status.isopen;$scope.alreadyFollowing=false;}}else{$scope.status.isopen=!$scope.status.isopen;}};$scope.profileUrl=$scope.item.Url;$scope.goToProfile=function(){$window.location=$scope.profileUrl;};$scope.changeFollowingStatus=function(){if($scope.changingFollowStatus){return;} 890$scope.changingFollowStatus=true;var followingType=userManager.FOLLOWING.CRYPTOPIAN;if($scope.item.Type=="Webpagecoinp"){followingType=userManager.FOLLOWING.COIN;} 891if($scope.item.Type=="Webpageexchangep"){followingType=userManager.FOLLOWING.EXCHANGE;} 892userManager.changeFollowingStatus($scope.item.Id,followingType).success(function(data){if(data["Response"]=="Success"){if(data.Type==100){toastNotifications.addNotification('success','Following '+$scope.item.Name+'!');$scope.alreadyFollowing=true;} 893if(data.Type==200){toastNotifications.addNotification('success','Unfollowed '+$scope.item.Name+'!');$scope.alreadyFollowing=false;}}else{if(data.Type==1){cModalService.showLoginModal('','Followable Options Following Status');} 894if(data.Type==5){cModalService.showActivationReminderModal();};} 895$scope.changingFollowStatus=false;});};}]);angular.module('ccc-app').controller('FollowPageItemOptionsCtrl',['$scope','$window','userManager','cModalService','toastNotifications',function($scope,$window,userManager,cModalService,toastNotifications){$scope.changingFollowStatus=false;$scope.followingHover=false;$scope.status={isopen:false};$scope.alreadyFollowing=false;$scope.itIsMe=false;$scope.isLoadingFollowing=false;$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();if($scope.isLoadingFollowing){return;} 896if(!$scope.status.isopen){if(userManager.getCryptopianId()==$scope.item.Data.Id){$scope.itIsMe=true;$scope.status.isopen=!$scope.status.isopen;return;} 897if(userManager.isLoggedIn()){$scope.isLoadingFollowing=true;userManager.checkFollowingStatus($scope.item.Data.Id).success(function(data){$scope.isLoadingFollowing=false;
897if(data.Type==100){$scope.alreadyFollowing=true;} 898if(data.Type==200){$scope.alreadyFollowing=false;} 899$scope.status.isopen=!$scope.status.isopen;});}else{$scope.status.isopen=!$scope.status.isopen;$scope.alreadyFollowing=false;}}else{$scope.status.isopen=!$scope.status.isopen;}};$scope.profileUrl=$scope.item.Data.Url;$scope.goToProfile=function(){$window.location=$scope.profileUrl;};$scope.changeFollowingStatus=function(){if($scope.changingFollowStatus){return;} 900$scope.changingFollowStatus=true;var followingType=userManager.FOLLOWING.CRYPTOPIAN;if($scope.item.Data.DocumentType=="Webpagecoinp"){followingType=userManager.FOLLOWING.COIN;} 901if($scope.item.Data.DocumentType=="Webpageexchangep"){followingType=userManager.FOLLOWING.EXCHANGE;} 902userManager.changeFollowingStatus($scope.item.Data.Id,followingType).success(function(data){if(data["Response"]=="Success"){if(data.Type==100){toastNotifications.addNotification('success','Following '+$scope.item.Data.Name+'!');$scope.alreadyFollowing=true;$scope.item.isFollowing=true;} 903if(data.Type==200){toastNotifications.addNotification('success','Unfollowed '+$scope.item.Data.Name+'!');$scope.alreadyFollowing=false;$scope.item.isFollowing=false;}}else{if(data.Type==1){cModalService.showLoginModal('','Followable Items Change Following Status');} 904if(data.Type==5){cModalService.showActivationReminderModal();};} 905$scope.changingFollowStatus=false;});};}]);angular.module('ccc-app').controller('CookieNotificationPopupCtrl',['$scope','cccLocalStorage',function($scope,cccLocalStorage){$scope.cookiePopupSeen=false;if(cccLocalStorage.getText('account_migration')==""){$scope.cookiePopupSeen=false;}else{$scope.cookiePopupSeen=true;} 906$scope.hideCookieNotification=function(){cccLocalStorage.setItem('account_migration',1);$scope.cookiePopupSeen=true;}}]);angular.module('ccc-app').controller('SocialShareCtrl',['$scope',function($scope){$scope.shareTwitter=function(){var url="https://twitter.com/intent/tweet?text=";var hashTags="%23CryptoCompare%20"+encodeURIComponent(document.URL);url+=encodeURIComponent(document.title.replace(" | CryptoCompare.com",""))+"%20"+hashTags;var width=600;var height=400;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);var jsPopupDetails='toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, height='+height+',width='+width+',top='+top+', left='+left;newwindow=window.open(url,'name',jsPopupDetails);if(window.focus){newwindow.focus()} 907return false;};$scope.shareFacebook=function(){var url="https://www.facebook.com/sharer/sharer.php?u=";url+=encodeURIComponent(document.URL);var width=600;var height=400;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);var jsPopupDetails='toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, height='+height+',width='+width+',top='+top+', left='+left;newwindow=window.open(url,'name',jsPopupDetails);if(window.focus){newwindow.focus()} 908return false;};$scope.shareGooglePlus=function(){var url="https://plus.google.com/share?url=";url+=encodeURIComponent(document.URL);var width=500;var height=400;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);var jsPopupDetails='toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, height='+height+',width='+width+',top='+top+', left='+left;newwindow=window.open(url,'name',jsPopupDetails);if(window.focus){newwindow.focus()} 909return false;};}]);angular.module('ccc-app').controller('DropdownMenuUserSectionCtrl',['$rootScope','$scope','userManager','auth0','notificationsManager','cModalService','gModalService','cccLightsService',function($rootScope,$scope,userManager,auth0,notificationsManager,cModalService,gModalService,cccLightsService){$scope.status={isopen:false};$scope.userManager=userManager;$scope.notificationsManager=notificationsManager;$scope.LightsStatus="Off";if(cccLightsService.isOn()){$scope.LightsStatus="Off";}else{$scope.LightsStatus="On";}
910$rootScope.$on('LightsChange',function(event,isOn){if(isOn=='1'){$scope.LightsStatus="On";}else{$scope.LightsStatus="Off";}});$scope.toggled=function(open,type){$scope.status.isopen=open;};$scope.showLogin=function(){auth0.login('login');};$scope.showSignup=function(){auth0.login('signup');};$scope.showTipUs=function(){gModalService.showTipUsModal();};$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();$scope.status.isopen=!$scope.status.isopen;};$scope.switchLights=function(){if(cccLightsService.isOn()){cccLightsService.turnOff();}else{cccLightsService.turnOn();}}}]);angular.module('ccc-app').controller('LoginButtonCtrl',['$scope','userManager','notificationsManager','cModalService',function($scope,userManager,notificationsManager,cModalService){$scope.status={isopen:false};$scope.userManager=userManager;$scope.notificationsManager=notificationsManager;$scope.toggled=function(open,type){if(open&&type=='notifications'){notificationsManager.markAsRead();}};$scope.showLogin=function(){cModalService.showLoginModal("","Login Button");};$scope.showPasswordReset=function(){cModalService.showPasswordResetModal();};$scope.toggleDropdown=function($event){$event.preventDefault();$event.stopPropagation();$scope.status.isopen=!$scope.status.isopen;};}]);angular.module('ccc-app').controller('AutosuggestCtrl',['$scope','$http','$q','pageInfo','$window','$timeout','cccLocalStorage',function($scope,$http,$q,pageInfo,$window,$timeout,cccLocalStorage){var searchBarInfo=pageInfo.getSlotInfo('search_bar_info',true);$scope.asyncDataResult="";var activeInfo=[];var loggedIds=false;var externalIds=[];for(var info of searchBarInfo){if(info.isActive){externalIds.push(info.externalId);activeInfo.push({firstInGroup:true,nodeName:info.topSubtext,textTop:info.textTop,group:"Sponsored",fullPath:info.link,imageUrl:info.logo,});}} 911$scope.results=activeInfo;$scope.activeIdx=activeInfo.length;$scope.openTrending=function(event){const clickedElement=event.target;if(angular.element(clickedElement).controller('ngModel').$viewValue.length===0){angular.element(clickedElement).controller('ngModel').$setViewValue(' ');angular.element(clickedElement).controller('ngModel').$setViewValue('');}else{angular.element(clickedElement).controller('ngModel').$setViewValue('');angular.element(clickedElement).controller('ngModel').$setViewValue($scope.lastSearch);}} 912$scope.getAutosuggest=function(val){if(!loggedIds){pageInfo.increaseInfo(externalIds);loggedIds=true;} 913let recentSearches=[];if(val.length===0){recentSearches=cccLocalStorage.getArray('recentSearches');if(recentSearches.length>0){recentSearches[0].firstInGroup=true;}} 914$scope.lastSearch=val;const autoSuggestRequest=$http.get('/api/autosuggest/all/',{params:{q:val,maxRows:10}});const searchRequest=$http.get('https://data-api.cryptocompare.com/asset/v1/search',{params:{search_string:val,limit:10}});return $q.all([autoSuggestRequest,searchRequest]).then(([autoSuggestResponse,searchResponse])=>{const coinResults=(searchResponse.data?.Data?.LIST||[]).map(asset=>({nodeName:`${asset.NAME} (${asset.SYMBOL})`,symbol:asset.SYMBOL,fullPath:`/coins/${asset.SYMBOL}/overview`,imageUrl:asset.LOGO_URL,firstInGroup:asset===searchResponse.data.Data.LIST[0],__NodeTypeAlias:'webpagecoinp',group:'Assets'}));let otherResults=(autoSuggestResponse.data.Type>99)?autoSuggestResponse.data.Results.slice(0,10):[];if(coinResults.length==0){return activeInfo.concat(recentSearches).concat(otherResults);} 915const instrumentsParam=coinResults.map(coin=>`${coin.symbol}-USD`).join(',');const latestTickRequest=$http.get('https://data-api.cryptocompare.com/index/cc/v1/latest/tick',{params:{instruments:instrumentsParam,market:'cadli'}});otherResults=otherResults.slice(0,Math.max(5,10-coinResults.length));return latestTickRequest.then(tickResponse=>{if(tickResponse.data?.Data){coinResults.forEach(coin=>{const tickData=tickResponse.data.Data[coin.symbol+'-USD'];if(tickData)coin.changePct=tickData.MOVING_24_HOUR_CHANGE_PERCENTAGE;});} 916return activeInfo.concat(recentSearches).concat(coinResults.slice(0,15-otherResults.length),otherResults);}).catch(error=>{return activeInfo.concat(recentSearches).concat(coinResults.slice(0,15-otherResults.length),otherResults);});});};$scope.onSelect=function($item,$model,$label){if($item.group==="Sponsored"){$window.open($item.fullPath,"_blank");$scope.asyncDataResult="";}else{$item.group='Recent';$item.firstInGroup=false;let recentSearches=cccLocalStorage.getArray('recentSearches');recentSearches=recentSearches.filter(function(search){return search.fullPath!==$item.fullPath;});recentSearches.unshift($item);recentSearches=recentSearches.slice(0,3);cccLocalStorage.setObject('recentSearches',recentSearches);window.location.href=$item.fullPath;}};}]);
916angular.module('ccc-app').controller('ShowMessageCtrl',['$scope','$uibModalInstance','message',function($scope,$uibModalInstance,message){$scope.message=message;$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.doOkAction=function(){if($scope.message.hasOwnProperty("OkAction")){$scope.message.OkAction();} 917$uibModalInstance.close('Ok');};}]);angular.module('ccc-app').controller('ShowFeedackCtrl',['$rootScope','$scope','$http','$uibModalInstance','$templateCache','gModalService','cModalService','toastNotifications','userManager','debugInfo',function($rootScope,$scope,$http,$uibModalInstance,$templateCache,gModalService,cModalService,toastNotifications,userManager,debugInfo){$scope.debugInfo=debugInfo;$scope.title=debugInfo.Title||"Website Feeback";$scope.sendingFeedback=false;$scope.requestType="Support";$scope.debugInfo.ModalLoaded=new Date();$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.sendFeedback=function(){if(!$scope.feedbackText||$scope.feedbackText.trim()==""){var message={'Title':'Feedback text appears to be blank...','Body':'It seems that the feedback box is empty. Please write something and try to send your feedback again.','Type':'warning'};gModalService.showMessageModal(message);return;} 918$scope.sendingFeedback=true;$scope.debugInfo.FeedbackText=$scope.feedbackText;$scope.debugInfo.RequestType=$scope.requestType;$http.post('/api/cryptopian/sendfeedback',$scope.debugInfo).success(function(response,status,headers,config){$scope.sendingFeedback=false;if(response.Type>99){toastNotifications.addNotification('success','<div>Message sent.</div>'+'<div>Our team will address you issue, request or suggestion as soon as possible</div>');$uibModalInstance.dismiss("Message sent");return;} 919if(response.Type==1){cModalService.showLoginModal(response["Message"],"Show Feedback Send Feedback");} 920if(response.Type==2){$scope.alerts=[{type:'danger',msg:"There was no data to update."}];} 921if(response.Type==99){$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];}}).error(function(response,status,headers,config){$scope.sendingFeedback=false;$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];});};}]);angular.module('ccc-app').controller('ContactUsFooterCtrl',['$rootScope','$scope','$http','gModalService','userManager','cccLightsService',function($rootScope,$scope,$http,gModalService,userManager,cccLightsService){$scope.pageLoaded=new Date();$scope.LightsStatus="Off";if(cccLightsService.isOn()){$scope.LightsStatus="Off";}else{$scope.LightsStatus="On";} 922$scope.debugInfo={"URL":document.URL,"PageLoaded":$scope.pageLoaded} 923$rootScope.$on('LightsChange',function(event,isOn){if(isOn=='1'){$scope.LightsStatus="On";}else{$scope.LightsStatus="Off";}});$scope.switchLights=function(){if(cccLightsService.isOn()){cccLightsService.turnOff();}else{cccLightsService.turnOn();}} 924$scope.sendFeedback=function(){$scope.debugInfo.Title='Website Feedback';$scope.debugInfo.Action='footerFeedback';$scope.debugInfo.ReportLinkClicked=new Date();$scope.debugInfo.UserName=userManager.getUsername();gModalService.showFeedbackModal($scope.debugInfo);};$scope.sendProblem=function(location){$scope.debugInfo.Title='Website Issue';$scope.debugInfo.Action=location;$scope.debugInfo.ReportLinkClicked=new Date();$scope.debugInfo.UserName=userManager.getUsername();gModalService.showFeedbackModal($scope.debugInfo);} 925$scope.contactUs=function(){$scope.debugInfo.Title='Contact Us';$scope.debugInfo.Action='footerContactUs';$scope.debugInfo.ReportLinkClicked=new Date();$scope.debugInfo.UserName=userManager.getUsername();gModalService.showFeedbackModal($scope.debugInfo);};$scope.showTipUs=function(){gModalService.showTipUsModal();};}]);angular.module('ccc-app').controller('LoginRegisterCtrl',['$scope','$timeout','$uibModalInstance','$templateCache','$http','urlGetParamsService','cccLocalStorage','cModalService','userManager','auth0','params','toastNotifications',function($scope,$timeout,$uibModalInstance,$templateCache,$http,urlGetParamsService,cccLocalStorage,cModalService,userManager,auth0,params,toastNotifications){$scope.tabSelected="Login";$scope.actionTypeToTitle={0:'Sign in',1:'Sign out',2:'Forgotten Password',3:'Email sent',4:'Your Contact Preferences',5:'Register',6:'Two Factor Social',7:'Two Factor Auth'};$scope.cryptopian={};$scope.loginStatus=params.ActionStage;$scope.loginMessage=params.Message||'';$scope.signingIn=false;$scope.signingInFacebook=false;$scope.signingInGoogle=false;$scope.sendingPassResetEmail=false;$scope.registering=false;$scope.canSubmit=true;$scope.alerts=[];$scope.twoFactorAuthCode="";$scope.loginSocialType="";var getParamasObj=urlGetParamsService.getParamsAsObj();var campaignForRegistration="N/A";if(getParamasObj['utm_campaign']!==undefined){campaignForRegistration=getParamasObj['utm_campaign'];} 926$scope.paramsToAddToRequest={"referrer":document.referrer||"Direct","campaign":campaignForRegistration,"reg_page":window.location.href,"action":params.Action||"Other"};$scope.tcButtonIsColoured=false;$scope.notifications={affiliate:false,marketwatch:false,forum:false};userManager.setShowingLogin(true);$scope.ok=function(){$uibModalInstance.close();};$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.closeAlert=function(index){$scope.alerts.splice(index,1);};$scope.showPassReset=function(){$scope.loginStatus=2;};$scope.backToLogin=function(){$scope.loginStatus=0;};$scope.selectTabClick=function(loginStatus){$scope.loginStatus=loginStatus;
926$scope.alerts=[];};$scope.goToLogin=function(){auth0.login('login');} 927$scope.goToSignup=function(){auth0.login('signup');} 928$scope.sendPassResetEmail=function(){$scope.sendingPassResetEmail=true;$scope.canSubmit=false;return $http.post(CCC.authApiUrl+"cryptopian/pass/reset/request",{"email":$scope.cryptopian.email}).then(function(response){response=response.data;$scope.sendingPassResetEmail=false;$scope.canSubmit=true;$scope.passReset.email.$valid=true;$scope.passReset.email.$invalid=false;$scope.passResetAlerts=[];if(response["Type"]===100){$scope.loginStatus=3;}},function(response){$scope.sendingPassResetEmail=false;$scope.canSubmit=true;$scope.passReset.email.$valid=true;$scope.passReset.email.$invalid=false;$scope.passResetAlerts=[];if(response["Type"]<100){var currentAlert={type:"danger",msg:response["Message"]};$scope.passResetAlerts.push(currentAlert);} 929if(response["Type"]===2||response["Type"]===1){$scope.passReset.email.$valid=false;$scope.passReset.email.$invalid=true;}});};$scope.initUserDetails=function(userDataObjToInit){userDataObjToInit.avatar_url=CCC.STATIC.BASEIMAGEPATH+userDataObjToInit.avatar_url;userManager.setAvatarUrl(userDataObjToInit.avatar_url);userManager.initUser(userDataObjToInit);userManager.setLoggedIn(true);};$scope.loginFacebookAuthorize=function(response){$scope.alerts=[];if(response.authResponse){$scope.socialTypeToAppendToUrl="facebook";$scope.sendSocialToAuthApi(response.authResponse.accessToken,"",$scope.socialTypeToAppendToUrl);}else{$scope.signingInFacebook=false;$scope.canSubmit=true;$scope.alerts.push({type:'danger',msg:"It seems that you have cancelled the login box. Please try again or use another authentication method."});$scope.$apply();}};$scope.initFacebook=function(callback){if(document.getElementById('facebook-jssdk')){callback();return;} 930(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="//connect.facebook.net/en_US/sdk.js";fjs.parentNode.insertBefore(js,fjs);js.onload=()=>{FB.init({appId:'255894636980379',cookie:true,xfbml:true,version:'v18.0'});callback();}}(document,'script','facebook-jssdk'));} 931$scope.loginFacebook=function(){$scope.initFacebook(function(){$scope.signingInFacebook=true;$scope.canSubmit=false;FB.login(function(response){$scope.loginFacebookAuthorize(response);},{scope:'email, public_profile',auth_type:'rerequest'});})};$scope.sendSocialToAuthApi=function(accessToken,twoFactorAuthCode,socialTypeToAppendToUrl){$scope.paramsToAddToRequest["access_token"]=accessToken;$scope.alerts=[];if($scope.loginStatus==6){var hasError=true;if(twoFactorAuthCode!==undefined){twoFactorAuthCode=twoFactorAuthCode.replace(/\s+/g,'');if(twoFactorAuthCode.length===6&&!isNaN(twoFactorAuthCode)){hasError=false;}} 932if(hasError){$scope.alerts=[{type:'danger',msg:"Two factor code must be 6 digits"}];$scope.twpFactorCodeError=true;$scope.twoFactorSocialForm.twoFactor.$dirty=true;$scope.canSubmit=true;$scope.signingIn=false;return;} 933$scope.paramsToAddToRequest["two_factor_code"]=twoFactorAuthCode;} 934$http.post(CCC.authApiUrl+"cryptopian/login/"+socialTypeToAppendToUrl,$scope.paramsToAddToRequest,{"withCredentials":true}).then(function(response){response=response.data;if(socialTypeToAppendToUrl=="google"){$scope.signingInGoogle=false;cccLocalStorage.removeItem("creating_g_account");}else{$scope.signingInFacebook=false;} 935$scope.canSubmit=true;if(response["Type"]===100||response["Type"]===101){$scope.initUserDetails(response.Data.User);if(!response.Data.TermsAndConditionsAgreed){$scope.loginStatus=4;}else{$scope.loginStatus=1;$uibModalInstance.dismiss(socialTypeToAppendToUrl+" Login");toastNotifications.addNotification('success','<div>Login successful.</div>'+'<div>Good to see you again '+userManager.getUsername()+'!</div>');}}},function(errResponse){errResponse=errResponse.data;if(socialTypeToAppendToUrl=="google"){$scope.signingInGoogle=false;cccLocalStorage.removeItem("creating_g_account");}else{$scope.signingInFacebook=false;} 936$scope.canSubmit=true;if(errResponse["Type"]===30){$scope.loginStatus=6;$scope.accessToken=accessToken;};if(errResponse["Type"]===31){$scope.twpFactorCodeError=true;};if(errResponse["Type"]<100&&errResponse["Type"]!==30){$scope.alerts.push({type:'danger',msg:errResponse["Message"]});};});};$scope.loginGooglePlusAuthorize=function(authResult){$scope.alerts=[];if(authResult['status']['signed_in']&&authResult['status']['method']=='PROMPT'){if(cccLocalStorage.getText("creating_g_account")!=""){return;} 937cccLocalStorage.setItem("creating_g_account",1);$scope.socialTypeToAppendToUrl="google";$scope.sendSocialToAuthApi(authResult["access_token"],"",$scope.socialTypeToAppendToUrl);}else if(authResult['error']!=='immediate_failed'){$scope.signingInGoogle=false;cccLocalStorage.removeItem("creating_g_account");$scope.canSubmit=true;$scope.alerts.push({type:'danger',msg:"It seems that you have cancelled the login box. Please try again or use another authentication method."});$scope.$apply();}};$scope.initGoogle=function(callback){if(document.getElementById('googleplus-jssdk')){callback();return;} 938(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;} 939js=d.createElement(s);js.id=id;js.src="https://plus.google.com/js/client:platform.js";fjs.parentNode.insertBefore(js,fjs);js.onload=()=>{gapi.load('auth',function(){callback();});}})(document,'script','googleplus-jssdk');} 940$scope.loginGooglePlus=function(){$scope.initGoogle(function(){$scope.signingInGoogle=true;$scope.canSubmit=false;var googlePlusParams={'clientid':'972420808852-gjedh6d1hset5i78tk68iloak1rs2gdk.apps.googleusercontent.com','cookiepolicy':'single_host_origin','scope':'email'};if(gapi.auth.getToken()==null){googlePlusParams['callback']=$scope.loginGooglePlusAuthorize;}else{$uibModalInstance.dismiss("Google Login");} 941gapi.auth.signIn(googlePlusParams);})};$scope.login=function(userEmail,userPassword,twoFactorAuthCode){$scope.signingIn=true;$scope.canSubmit=false;userEmail=userEmail||"";userPassword=userPassword||"";$scope.paramsToAddToRequest["email"]=userEmail;$scope.paramsToAddToRequest["password"]=userPassword;if($scope.loginStatus===7){var hasError=true;if(twoFactorAuthCode!==undefined){twoFactorAuthCode=twoFactorAuthCode.replace(/\s+/g,'');if(twoFactorAuthCode.length===6&&!isNaN(twoFactorAuthCode)){hasError=false;}} 942if(hasError){$scope.alerts=[{type:'danger',msg:"Two factor code must be 6 digits"}];$scope.twpFactorCodeError=true;$scope.loginForm.twoFactor.$dirty=true;$scope.canSubmit=true;$scope.signingIn=false;return;} 943$scope.paramsToAddToRequest["two_factor_code"]=twoFactorAuthCode;} 944grecaptcha.execute('6Le3TrMUAAAAAJf-cqN5ZCubOFW-jHhC_cc2ybni',{action:$scope.paramsToAddToRequest["action"].replace(/ /g,"")}).then(function(token){$scope.paramsToAddToRequest["captcha_token"]=token;$http.post(CCC.authApiUrl+"cryptopian/login/web",$scope.paramsToAddToRequest,{"withCredentials":true}).then(function(response){response=response["data"];$scope.signingIn=false;$scope.canSubmit=true;$scope.loginForm.email.$valid=true;
944$scope.loginForm.email.$invalid=false;$scope.loginForm.password.$valid=true;$scope.loginForm.password.$invalid=false;$scope.alerts=[];if(response["Type"]===100){$scope.initUserDetails(response.Data.User);if(!response.Data.TermsAndConditionsAgreed){$scope.loginStatus=4;}else{$scope.loginStatus=1;$uibModalInstance.close("Website Registration");toastNotifications.addNotification('success','<div>Login successful.</div>'+'<div>Welcome back '+userManager.getUsername()+'!</div>');}}},function(errResponse){errResponse=errResponse["data"];$scope.signingIn=false;$scope.canSubmit=true;$scope.loginForm.email.$valid=true;$scope.loginForm.email.$invalid=false;$scope.loginForm.password.$valid=true;$scope.loginForm.password.$invalid=false;$scope.alerts=[];if(errResponse["Type"]===5){$scope.loginStatus=1;$uibModalInstance.close("Showing Activation Reminder");userManager.setLoggedIn(true);userManager.initUser(errResponse.Data.User);cModalService.showActivationReminderModal();return;};if(errResponse["Type"]===30){$scope.loginStatus=7;};if(errResponse["Type"]===31){$scope.twpFactorCodeError=true;};if(errResponse["Type"]<100&&errResponse["Type"]!==30){$scope.alerts.push({type:'danger',msg:errResponse["Message"]});};if(errResponse["Type"]===2||errResponse["Type"]===1){$scope.loginForm.email.$valid=false;$scope.loginForm.email.$invalid=true;};if(errResponse["Type"]===3||errResponse["Type"]===1){$scope.loginForm.password.$valid=false;$scope.loginForm.password.$invalid=true;};});});};$scope.termsAndConditionsAgreed=function(){userManager.termsAndConditionsAgreed($scope.notifications.affiliate,$scope.notifications.marketwatch,$scope.notifications.forum).then(function(response){response=response["data"];if(response["Type"]===100){$scope.loginStatus=1;$uibModalInstance.close("Website Registration");toastNotifications.addNotification('success','<div>User preferences updated successfully.</div>');}},function(errResponse){$uibModalInstance.close("Website Registration");toastNotifications.addNotification('error','<div>Unable to update preferences, please try again later.</div>');});};$scope.setAffiliate=function(newAffiliateValue){$scope.notifications.affiliate=newAffiliateValue;$scope.setTermsAndConditionsText();};$scope.setMarketwatch=function(newMarketwatchValue){$scope.notifications.marketwatch=newMarketwatchValue;$scope.setTermsAndConditionsText();};$scope.setForum=function(newForumValue){$scope.notifications.forum=newForumValue;$scope.setTermsAndConditionsText();};$scope.setTermsAndConditionsText=function(){if($scope.notifications.affiliate||$scope.notifications.marketwatch||$scope.notifications.forum){$scope.tcButtonIsColoured=true;}else{$scope.tcButtonIsColoured=false;}};$scope.register=function(userEmail,userPassword){$scope.alerts=[];if($scope.loginForm.email.$invalid){$scope.alerts.push({type:'danger',msg:'Please enter a valid email address'});return;} 945if($scope.loginForm.password.$invalid){if($scope.loginForm.password.$error.minlength){$scope.alerts.push({type:'danger',msg:'Password must be at least 6 characters long'});}else if($scope.loginForm.password.$error.maxlength){$scope.alerts.push({type:'danger',msg:'Password must be less than 500 characters long'});} 946return;} 947$scope.registering=true;$scope.canSubmit=false;userEmail=userEmail||"";userPassword=userPassword||"";$scope.paramsToAddToRequest["email"]=userEmail;$scope.paramsToAddToRequest["password"]=userPassword;grecaptcha.execute('6Le3TrMUAAAAAJf-cqN5ZCubOFW-jHhC_cc2ybni',{action:$scope.paramsToAddToRequest["action"].replace(/ /g,"")}).then(function(token){$scope.paramsToAddToRequest["captcha_token"]=token;$http.post(CCC.authApiUrl+"cryptopian/register/web",$scope.paramsToAddToRequest,{"withCredentials":true}).then(function(response){response=response["data"];$scope.registering=false;$scope.canSubmit=true;$scope.loginForm.email.$valid=true;$scope.loginForm.email.$invalid=false;$scope.loginForm.password.$valid=true;$scope.loginForm.password.$invalid=false;$scope.alerts=[];if(response["Type"]===100){if(!response.Data.TermsAndConditionsAgreed){$scope.loginStatus=4;}else{$scope.loginStatus=1;$uibModalInstance.close("Website Registration");toastNotifications.addNotification('success','<div>Registration successful.</div>'+'<div>Welcome '+userManager.getUsername()+'!</div>');} 948$scope.initUserDetails(response.Data.User);}},function(errResponse){errResponse=errResponse["data"];$scope.registering=false;$scope.canSubmit=true;$scope.loginForm.email.$valid=true;
948$scope.loginForm.email.$invalid=false;$scope.loginForm.password.$valid=true;$scope.loginForm.password.$invalid=false;$scope.alerts=[];if(errResponse["Type"]<100){$scope.alerts.push({type:'danger',msg:errResponse["Message"]});} 949if(errResponse["ObjectWithError"].general==='email'&&(errResponse["Type"]===2||errResponse["Type"]===1)){$scope.loginForm.email.$valid=false;$scope.loginForm.email.$invalid=true;} 950if(errResponse["ObjectWithError"].general==='password'&&(errResponse["Type"]===3||errResponse["Type"]===1)){$scope.loginForm.password.$valid=false;$scope.loginForm.password.$invalid=true;}});});};$scope.logout=function(){toastNotifications.addNotification('success','<div>Logout successful.</div>'+'<div>Bye, bye '+userManager.getUsername()+'. We hope to see you again soon!</div>');userManager.logout();$scope.loginStatus=0;};}]);angular.module('ccc-app').controller('ActivationReminderCtrl',['$scope','$uibModalInstance','$http','$templateCache','cModalService','userManager',function($scope,$uibModalInstance,$http,$templateCache,cModalService,userManager){$scope.alerts=[];$scope.email="";$scope.previousEmail="";$scope.activationStep=1;$scope.canSubmit=true;$scope.changingEmail=false;$scope.sendingActivationReminder=false;$scope.email=userManager.getEmailAddress();$scope.previousEmail=userManager.getEmailAddress();$scope.closeAlert=function(index){$scope.alerts.splice(index,1);};$scope.cancel=function(){$templateCache.remove('/angular/activationreminder');$uibModalInstance.dismiss('Cancel');};$scope.sendActivationReminder=function(){$scope.alerts=[];$scope.canSubmit=false;$scope.sendingActivationReminder=true;return $http.get(CCC.authApiUrl+'cryptopian/activation-reminder',{"withCredentials":true}).success(function(response,status,headers,config){$scope.canSubmit=true;$scope.sendingActivationReminder=false;if(response.Type==3){$scope.activationStep=3;return;} 951if(response.Type==1){return;} 952$scope.activationStep=2;}).error(function(response,status,headers,config){$scope.canSubmit=true;$scope.sendingActivationReminder=false;$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];});};$scope.changeEmail=function(){if(!$scope.email||$scope.email.trim()==""){$scope.alerts=[{type:'danger',msg:'It seems that the email address you have typed in is invalid',contact:false}];return;} 953$scope.email=$scope.email.trim();if($scope.email==$scope.previousEmail){$scope.alerts=[{type:'warning',msg:'It seems that you have not typed in a different email address.',contact:false}];return;} 954$scope.alerts=[];$scope.canSubmit=false;$scope.changingEmail=true;$http.post(CCC.authApiUrl+'cryptopian/update/user/email/unactivated',{'email_address':$scope.email},{"withCredentials":true}).success(function(response,status,headers,config){$scope.canSubmit=true;$scope.changingEmail=false;if(response.Type>99){$scope.previousEmail=$scope.email;$scope.alerts=[{type:'success',msg:'Email address successfully changed. You can now request the verification email to be sent to this address if you click on the Send Verification Email button.',contact:false}];$templateCache.remove('/angular/activationreminder');} 955else if(response.Type==4){$scope.alerts=[{type:'danger',msg:"Could not update your email because "+$scope.email+" is already registered under a different account.",contact:false}];$scope.email=$scope.previousEmail;}else if(response.Type==3){$scope.alerts=[{type:'danger',msg:"Could not update your email because "+$scope.email+" is not a valid email address.",contact:false}];$scope.email=$scope.previousEmail;}else{$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];}}).error(function(response,status,headers,config){$scope.canSubmit=true;$scope.changingEmail=false;$scope.alerts=[{type:'danger',msg:"Could not update your email because "+$scope.email+" is already registered.",contact:false}];});};}]);angular.module('ccc-app').controller('BanCtrl',['$scope','$uibModalInstance','cModalService','$http','userManager','toastNotifications','passedCryptopian',function($scope,$uibModalInstance,cModalService,$http,userManager,toastNotifications,passedCryptopian){$scope.selectedBanReason=0;$scope.randomBanJokeAsArray=['Loading....'];$http({method:'GET',url:'https://icanhazdadjoke.com/',headers:{'Accept':'application/json'}}).then(function successCallback(response){$scope.randomBanJokeAsArray=response.data.joke.replace(/\r\n\r\n/,'\r\n').split('\r\n');},function errorCallback(response){$scope.randomBanJokeAsArray=['Sorry, no random joke available. Check back later.'];});$scope.otherReasonText='';$scope.banReasons=[{'Key':'Spam','DisplayName':'Spam','Description':'Spamming the forum b
955y posting links with no added value for the rest of the community'},{'Key':'InappropriateBehaviour','DisplayName':'Inappropriate Behaviour','Description':'Threatening, trying to scam or trick other users, using offensive language or generally behaving in an unpleasant manner.'},{'Key':'AffiliateLinks','DisplayName':'Affiliate Links','Description':'Adding a post or a review that has one or more affiliate links. '}];$scope.isBanningUser=false;$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.banUser=function(){$scope.isBanningUser=true;var banReasonDescription='';if($scope.selectedBanReason=='Other'){banReasonDescription=$scope.otherReasonText;}else{banReasonDescription=$scope.banReasons[$scope.selectedBanReason].Description;} 956userManager.banCryptopian(passedCryptopian.Id,banReasonDescription).then(function(response){var data=response.data;$scope.isBanningUser=false;if(data["Response"]=="Success"){if(data.Type==100){passedCryptopian.setBanned();toastNotifications.addNotification('success','Cryptopian '+passedCryptopian.Name+' successfully banned!');$uibModalInstance.close("Banned");}}else{if(data.Type==1){cModalService.showLoginModal("","Ban User");} 957if(data.Type==5){cModalService.showActivationReminderModal();};if(data.Type==10){passedCryptopian.setBanned();toastNotifications.addNotification('success','Cryptopian '+passedCryptopian.Name+' is already banned. Somebody beat you to it!');$uibModalInstance.close("Already Banned");};}},function(response){$scope.isBanningUser=false;$uibModalInstance.close("Error: Could Not Ban");})};}]);angular.module('ccc-app').controller('CryptopianListModalCtrl',['$rootScope','$scope','$uibModalInstance','userManager','toastNotifications','cModalService','initObj',function($rootScope,$scope,$uibModalInstance,userManager,toastNotifications,cModalService,initObj){$scope.allCryptopianIds=[];$scope.showLoadingStatus=false;for(var iCList=0,lCList=initObj.Data.length;iCList<lCList;iCList++){initObj.Data[iCList].changingFollowStatus=false;$scope.allCryptopianIds.push(initObj.Data[iCList].Data.Id);} 958$scope.cryptopianList=initObj;$scope.itIsMe=function(cryptopianId){if(!userManager.isLoggedIn()){return false;} 959return userManager.getCryptopianId()==cryptopianId;} 960$scope.cancel=function(){$scope.loginChange();$uibModalInstance.dismiss('Cancel');};$scope.closingModal=$scope.$on("modal.closing",function(event,newValue){$scope.loginChange();$scope.closingModal();});$scope.loadFollowingStatus=function(newValue){if(newValue==true){userManager.checkFollowingStatus($scope.allCryptopianIds.join()).success(function(data){if(data.Type==100){$scope.cryptopianList.Data.map(function(item){if(data.Followed.indexOf(item.Data.Id)>-1){item.amFollowing=true;}else{item.amFollowing=false;} 961if(data.Following.indexOf(item.Data.Id)>-1){item.isFollowing=true;}else{item.isFollowing=false;} 962return item;});}else{$scope.cryptopianList.Data.map(function(item){item.isFollowing=false;item.amFollowing=false;return item;});} 963$scope.showLoadingStatus=false;});}else{$scope.cryptopianList.Data.map(function(item){item.isFollowing=false;item.amFollowing=false;return item;});$scope.showLoadingStatus=false;}};$scope.loginChange=$rootScope.$on("LoginValueChange",function(event,newValue){$scope.showLoadingStatus=true;$scope.loadFollowingStatus(newValue);});$scope.changeFollowingStatus=function(cryptopian){if(cryptopian.changingFollowStatus==true){return;} 964cryptopian.changingFollowStatus=true;userManager.changeFollowingStatus(cryptopian.Data.Id,userManager.FOLLOWING.CRYPTOPIAN).success(function(data){if(data["Response"]=="Success"){if(data.Type==100){toastNotifications.addNotification('success','Following '+cryptopian.Data.Name+'!');cryptopian.amFollowing=true;} 965if(data.Type==200){toastNotifications.addNotification('success','Unfollowed '+cryptopian.Data.Name+'!');cryptopian.amFollowing=false;}}else{if(data.Type==1){cModalService.showLoginModal("Please login or signup and you'll be able to follow "+cryptopian.Data.Name+".","Cryptopian List Modal Change Follow Status");} 966if(data.Type==5){cModalService.showActivationReminderModal();};} 967cryptopian.changingFollowStatus=false;});};$scope.loadMore=function(){if(initObj.ActionType=="0"){initObj.LoadMoreService.getAgreeCryptopians($scope.cryptopianList.ItemId,$scope.cryptopianList.Data[$scope.cryptopianList.Data.length-1].Id).success(function(data){$scope.cryptopianList.MoreAvailable=data.MoreAvailable;for(var iAgree=0,lAgree=data.Data.length;iAgree<lAgree;iAgree++){$scope.cryptopianList.Data.push(data.Data[iAgree]);}});}else{initObj.LoadMoreService.getDisagreeCryptopians($scope.cryptopianList.ItemId,$scope.cryptopianList.Data[$scope.cryptopianList.Data.length-1].Id).success(function(data){$scope.cryptopianList.MoreAvailable=data.MoreAvailable;for(var iDisagree=0,lDisagree=data.Data.length;iDisagree<lDisagree;iDisagree++){$scope.cryptopianList.Data.push(data.Data[iDisagree]);}});}};}]);
967angular.module('ccc-app').controller('PasswordResetCtrl',['$scope','$http','cModalService','userManager','toastNotifications',function($scope,$http,cModalService,userManager,toastNotifications){$scope.alerts=[];$scope.resetStage=1;$scope.sendingNewPass=false;$scope.cryptopian={'newPassword':'','hash':''};$scope.initPasswordReset=function(hashValue){$scope.cryptopian.hash=hashValue;} 968$scope.closeAlert=function(index){$scope.alerts.splice(index,1);};$scope.passwordReset=function(){if(!$scope.cryptopian.newPassword||$scope.cryptopian.newPassword.trim()==""){$scope.alerts=[{type:'danger',msg:'It seems that the new password you have typed in is invalid',contact:false}];return;} 969$scope.alerts=[];$scope.sendingNewPass=true;$http.post('/api/cryptopian/passreset/',$scope.cryptopian).success(function(response,status,headers,config){$scope.sendingNewPass=false;if(response.Type>99){$scope.resetStage=2;userManager.initUser(response["Data"]);toastNotifications.addNotification('success','<div>Pass reset successful.</div>'+'<div>Welcome back '+userManager.getUsername()+'!</div>');userManager.setLoggedIn(true);}}).error(function(response,status,headers,config){$scope.sendingNewPass=false;if(response.Type<100){$scope.alerts=[{type:'danger',msg:response["Message"],contact:false}];}else{$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];}});};}]);angular.module('ccc-app').controller('ChangeAvatarCtrl',['$scope','$uibModalInstance','$timeout','$templateCache','cModalService','userManager','toastNotifications',function($scope,$uibModalInstance,$timeout,$templateCache,cModalService,userManager,toastNotifications){$scope.alerts=[];$scope.canSubmit=true;$scope.changingAvatar=false;$scope.oldCryptopianAvatar=userManager.getAvatarUrl();$scope.newCryptopianAvatar=userManager.getAvatarUrl();$scope.closeAlert=function(index){$scope.alerts.splice(index,1);};$scope.cancel=function(){$uibModalInstance.dismiss('Cancel');};$scope.handleFileSelect=function(currentTarget){if(currentTarget.files.length!=1){return;} 970var file=currentTarget.files[0];var reader=new FileReader();reader.onload=function(_file){$scope.$apply(function($scope){$scope.oldCryptopianAvatar=_file.target.result;});};reader.readAsDataURL(file);};$scope.selectFile=function(){$timeout(function(){angular.element('#newImageFile').trigger('click')},100);} 971$scope.sendNewImageToServer=function(){if($scope.oldCryptopianAvatar==$scope.newCryptopianAvatar){$scope.alerts=[{type:'warning',msg:'It seems that you have not selected a new avatar.',contact:false}];return;} 972$scope.alerts=[];$scope.canSubmit=false;$scope.changingAvatar=true;var objectWithUpdateFields={"general":{"avatar":$scope.newCryptopianAvatar}};userManager.updateFields({"update_data":objectWithUpdateFields}).success(function(data){if(data["Response"]=="Success"){$scope.changingAvatar=false;$scope.oldCryptopianAvatar=$scope.newCryptopianAvatar;userManager.setAvatarUrl($scope.newCryptopianAvatar) 973toastNotifications.addNotification('success','Profile image successfully updated!');$scope.canSubmit=true;$uibModalInstance.dismiss('Avatar Changed');}}).error(function(response,status,headers,config){toastNotifications.addNotification('error','Oops! Something went wrong. Please refresh the page and try again.');$scope.canSubmit=true;$scope.changingAvatar=false;$scope.alerts=[{type:'danger',msg:'Oops! Something went wrong. Please refresh the page and try again.',contact:true}];});};}]); 974;;;angular.module('ccc-app').directive('passReset',function(){return{restrict:'E',templateUrl:'general/pass-reset.html',controller:['$scope','$http','toastNotifications',function($scope,$http,toastNotifications){$scope.sentDataToApi=false;$scope.passwordResetError=false;$scope.sendingNewPass=true;$scope.hasHashKeyExpired=false;$scope.paramsToSendToUrl={'h':$scope.h,'user_id':$scope.id,'new_password':''} 975$scope.sendNewPasswordToApi=function(){$http.post(CCC.authApiUrl+'cryptopian/pass/reset',$scope.paramsToSendToUrl,{"withCredentials":true}).then(function(resetPassResponse){resetPassResponse=resetPassResponse.data;$scope.sentDataToApi=true;},function(errResetPass){$scope.sentDataToApi=true;$scope.passwordResetError=true;if(errResetPass.data===undefined){toastNotifications.addNotification("error","Error trying to reset your account. Try again later.");}else{if(errResetPass.data.Type===41){$scope.hasHashKeyExpired=true;} 976toastNotifications.addNotification("error",errResetPass.data.Message);}});};}],scope:{h:'@',id:'@'}};});
976angular.module('ccc-app').directive('requestPasswordReset',function(){return{restrict:'E',template:'<form ng-hide="hasResetPassEmailBeenSent === true" class="clearfix" role="form" name="passReset" novalidate>'+'<p style="margin-left: 15px; margin-right: 15px; margin-top: 15px;">To reset your password, please enter your email address below.</p>'+'<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" class="text-center" style="margin-top:10px; margin-bottom:10px;">'+' <span class="glyphicon glyphicon-exclamation-sign" ng-show="alert.type==\'danger\'" aria-hidden="true"></span> {{alert.msg}}'+'</uib-alert>'+'<div class="col-md-12">'+' <div class="form-group has-feedback" ng-class="{\'has-success\': passReset.email.$valid, \'has-error\': passReset.email.$dirty && passReset.email.$invalid}">'+' <label for="email" class="control-label" title="Your registred email address.">Email</label>'+' <input type="email" class="form-control" name="email" ng-model="emailToSend" placeholder="Type in your email" required />'+' <span class="glyphicon glyphicon-ok form-control-feedback" ng-show="passReset.email.$valid" aria-hidden="true"></span>'+' <span class="glyphicon glyphicon-remove form-control-feedback" ng-show="passReset.email.$dirty && passReset.email.$invalid" aria-hidden="true"></span>'+' </div>'+' <div class="form-group col-sm-12 col-xs-12">'+' <button type="submit" class="btn btn-success btn-lg btn-block" value="SendPassResetEmail" ng-class="{\'disabled\':!canSubmit}" ng-click="sendPassResetEmail()">'+' <i class="glyphicon glyphicon-play"></i> Reset <i ng-show="sendingPassResetEmail" class="glyphicon glyphicon-refresh glyphicon-spin"></i>'+' </button>'+' </div>'+'</div>'+'</form>'+'<div ng-show="hasResetPassEmailBeenSent === true">'+' <div class="alert alert-info">'+' <b>An email has been sent to {{cryptopian.email}} containing instructions on how to reset your password.</b>'+' </div>'+' <p>'+' If you have not received the email within 10 minutes, please check your emails SPAM / junk folders.'+' If you continue to have problems, please email us at <a href="mailto:[email protected]?subject=Password rest not working" target="_blank">[email protected]</a>.'+' </p>'+'</div>',controller:['$scope','$http','toastNotifications','userManager',function($scope,$http,toastNotifications,userManager){$scope.canSubmit=true;$scope.emailToSend=userManager.getEmailAddress();$scope.alerts=[];$scope.sendPassResetEmail=function(){$scope.sendingPassResetEmail=true;$scope.canSubmit=false;return $http.post(CCC.authApiUrl+"cryptopian/pass/reset/request",{"email":$scope.emailToSend}).then(function(response){response=response.data;$scope.sendingPassResetEmail=false;$scope.canSubmit=true;$scope.passReset.email.$valid=true;$scope.passReset.email.$invalid=false;$scope.passResetAlerts=[];if(response["Type"]===100){$scope.hasResetPassEmailBeenSent=true;}},function(errResponse){errResponse=errResponse.data;$scope.sendingPassResetEmail=false;$scope.canSubmit=true;$scope.passReset.email.$invalid=true;$scope.passResetAlerts=[];if(errResponse["Type"]<100){$scope.alerts.push({type:"danger",msg:errResponse["Message"]});} 977if(errResponse["Type"]===2||errResponse["Type"]===1){$scope.passReset.email.$valid=false;$scope.passReset.email.$invalid=true;}});};}]}});angular.module('ccc-app').directive('activateCryptopian',function(){return{restrict:'E',templateUrl:'general/activate-cryptopian.html',controller:['$scope','$http','toastNotifications',function($scope,$http,toastNotifications){$scope.sentDataToApi=false;$scope.userNeedsToResetPassword=false;$scope.userHasAlreadyActivated=false;$scope.userActivationErr=false;$scope.hitApiToActivateUser=function(){var paramsToSendToUrl={'h':$scope.h,'user_id':$scope.id};$http.post(CCC.authApiUrl+'cryptopian/activate',paramsToSendToUrl,{"withCredentials":true}).then(function(activateUserResponse){activateUserResponse=activateUserResponse.data;$scope.userNeedsToResetPassword=activateUserResponse.Data.NeedsPasswordReset;$scope.sentDataToApi=true;},function(errActivateUser){$scope.sentDataToApi=true;if(errActivateUser.data===undefined){$scope.userActivationErr=true;toastNotifications.addNotification("error","Error activating account. Try again later.");}else if(errActivateUser.data.Type===64){$scope.userHasAlreadyActivated=true;toastNotifications.addNotification("error",errActivateUser.data.Message);}else{$scope.userActivationErr=true;toastNotifications.addNotification("error",errActivateUser.data.Message);}});};$scope.hitApiToActivateUser();}],scope:{h:'@',id:'@'}};});
977angular.module('ccc-app').directive('restoreCryptopian',function(){return{restrict:'E',templateUrl:'general/restore-cryptopian.html',controller:['$scope','$http','toastNotifications','cModalService',function($scope,$http,toastNotifications,cModalService){$scope.sentDataToApi=false;$scope.invalidKey=false;var paramsToSendToUrl={'restore_key':$scope.restore,'email':$scope.email,'username':$scope.username};$scope.submit=function(user){$scope.usernameIsTaken=false;$scope.emailIsTaken=false;$scope.error=false;if(user&&user.username){paramsToSendToUrl.username=user.username;}if(user&&user.email){paramsToSendToUrl.email=user.email;} 978$http.post(CCC.authApiUrl+'cryptopian/restore/user',paramsToSendToUrl,{"withCredentials":true}).then(function(response){$scope.sentDataToApi=true;$scope.success=true;cModalService.showLoginModal("Account restored successfully, please login","Profile Update");},function(error){$scope.error=true;$scope.sentDataToApi=true;if(!error.data){toastNotifications.addNotification("error","Error restoring account. Try again later.");}else if(error.data.Type===52){$scope.emailIsTaken=true;toastNotifications.addNotification("error",error.data.Message);}else if(error.data.Type===36){$scope.usernameIsTaken=true;toastNotifications.addNotification("error",error.data.Message);}else{toastNotifications.addNotification("error",error.data.Message);}});} 979$scope.submit();}],scope:{restore:'@',email:'@',username:'@'}};});angular.module('ccc-app').directive('ngMetaUpdateContent',function(){return{restrict:'A',link:function(scope,element,attrs){scope.$watch(attrs.ngMetaUpdateContent,function(value){attrs.$set('content',value);});}};});angular.module('ccc-app').directive('includeExtrenalScriptInTemplate',['$compile',function($compile){return{restrict:'E',link:function(scope,element,attr){if(attr.externalScriptUrl){var domElem='<script src="'+attr.externalScriptUrl+'" async defer></script>';$(element).append($compile(domElem)(scope));}}};}]);angular.module('ccc-app').directive('ngClassForLights',['$rootScope','cccLightsService',function($rootScope,cccLightsService){return{restrict:'A',link:function(scope,elem,attrs){if(cccLightsService.isOn()){angular.element(elem).addClass('lights-on').removeClass('lights-off');}else{angular.element(elem).addClass('lights-off').removeClass('lights-on');} 980$rootScope.$on("LightsChange",function(){if(cccLightsService.isOn()){angular.element(elem).addClass('lights-on').removeClass('lights-off');}else{angular.element(elem).addClass('lights-off').removeClass('lights-on');}});}};}]);angular.module('ccc-app').directive('ngMetaBaseCanUrl',function(){return{restrict:'A',link:function(scope,element,attrs){scope.$watch(attrs.ngMetaBaseCanUrl,function(value){if(value!=""){attrs.$set('rel','canonical');attrs.$set('href',value);}else{attrs.$set('rel','');attrs.$set('href','');}});}};});angular.module('ccc-app').directive('ngMetaBaseAmpUrl',function(){return{restrict:'A',link:function(scope,element,attrs){scope.$watch(attrs.ngMetaBaseAmpUrl,function(value){if(value!=""){attrs.$set('rel','amphtml');attrs.$set('href',value);}else{attrs.$set('rel','');attrs.$set('href','');}});}};});angular.module('ccc-app').directive('notificationsList',['notificationsManager','streamerUtilities','userManager','$rootScope',function(notificationsManager,streamerUtilities,userManager,$rootScope){return{restrict:'A',controller:['$scope',function($scope){}],link:function(scope,element,attrs){function attachNotifications(){if(userManager.isLoggedIn()){scope.$watch('status.isopen',function(open,oldValue){if(open){notificationsManager.markAsReadAPI();}else{notificationsManager.markAsReadLocal();}});let container=angular.element(element);container.bind("scroll",function(e){if(container[0].offsetHeight+container[0].scrollTop>=container[0].scrollHeight){notificationsManager.loadMore();}});streamerUtilities.addGlobalPageSubs([CCC.STATIC.TYPE.NOTIFICATION+'~'+userManager.getCryptopianId()],function(messageInfo){notificationsManager.addNotification(messageInfo.Data);});$rootScope.$on('NotificationMessage',function(event,messageInfo){notificationsManager.addNotification(messageInfo.Data);if(scope.status.isopen){notificationsManager.markAsReadAPI([messageInfo.Data.Id]);}});}else{streamerUtilities.removeGlobalPageSubs([CCC.STATIC.TYPE.NOTIFICATION+'~'+userManager.getCryptopianId()]);}} 981attachNotifications();$rootScope.$on("LoginValueChange",function(event,newValue){attachNotifications();});}};}]);
981angular.module('ccc-app').directive('notificationAction',[function(){return{restrict:'E',templateUrl:'general/notification-user-action.html',controller:['$scope','dateParsing',function($scope,dateParsing){$scope.latestItem=$scope.notification.items[$scope.notification.items.length-1];$scope.DateParsing=dateParsing;$scope.markAsRead=function(){$scope.notification.isRead=true;};$scope.cryptopians=[];for(var i=0;i<$scope.notification.items.length;i++){var item=$scope.notification.items[i];if($scope.latestItem.Cryptopian.Name!==item.Cryptopian.Name&&$scope.cryptopians.indexOf(item.Cryptopian.Name)===-1){$scope.cryptopians.push(item.Cryptopian.Name);}} 982$scope.tooltip=$scope.cryptopians.join('<br>');$scope.decodeHTML=function(html){html=html.replace(/(<([^>]+)>)/gi,"");var txt=document.createElement('textarea');txt.innerHTML=html;var decoded=txt.value;if(decoded.indexOf('<br/>')!==-1){decoded=decoded.split('<br/>')[0]+'...';} 983return decoded;};$scope.getFullImageUrl=function(url){if(!url.startsWith('https://')){url=CCC.STATIC.BASEIMAGEPATH+url;} 984return url;}}],scope:{notification:"="},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('topAlerts',['$compile','pageAlerts',function($compile,pageAlerts){return{restrict:'E',templateUrl:'general/top-alerts.html',controller:function($scope){},scope:{},link:function(scope,element,attrs){scope.pageAlerts=pageAlerts;}};}]);angular.module('ccc-app').directive('usernameOptions',[function(){return{restrict:'E',templateUrl:'general/username-options.html',controller:'UsernameOptionsCtrl',scope:{cryptopian:"=",icon:"=",avatar:"="},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('followableItemOptions',[function(){return{restrict:'E',templateUrl:'general/followable-item-options.html',controller:'FollowableItemOptionsCtrl',scope:{item:"=",icon:"=",avatar:"=",bubbleAlign:"@?bubbleAlign"},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('followPageItemOptions',[function(){return{restrict:'E',templateUrl:'general/follow-page-item-options.html',controller:'FollowPageItemOptionsCtrl',scope:{item:"=",icon:"=",avatar:"="},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('showTotal',['$compile','totals',function($compile,totals){return{restrict:'E',template:'<meta itemprop="interactionCount" content="UserComments:{{totals.get(totalName)}}"/>'+'<span class="total-value" ng-class="totalName" ng-title="{{totals.getFullNumber(totalName)}}">{{totals.get(totalName)}} {{totals.getText(totalName,text)}}</span>',controller:function($scope){},scope:{},link:function(scope,element,attrs){scope.totals=totals;scope.totalName=attrs["name"];scope.text=attrs["text"];}};}]);angular.module('ccc-app').directive('showTotalPageViews',['$compile','totals',function($compile,totals){return{restrict:'E',template:'<span class="total-value" ng-class="totalName" title="{{totals.getFullNumber(totalName)}} {{totals.getText(totalName,text)}}">{{totals.get(totalName)}}</span>',controller:function($scope){},scope:{},link:function(scope,element,attrs){scope.totals=totals;scope.totalName=attrs["name"];scope.text=attrs["text"];}};}]);angular.module('ccc-app').directive('toastNotifications',['$compile','toastNotifications',function($compile,toastNotifications){return{restrict:'E',templateUrl:'general/toast-notifications.html',controller:function($scope){},scope:{},link:function(scope,element,attrs){scope.toastNotifications=toastNotifications;}};}]);angular.module('ccc-app').directive('cookieNotificationPopup',[function(){return{restrict:'E',templateUrl:'general/cookie-notification-popup.html',controller:'CookieNotificationPopupCtrl',scope:{},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('moreStuffDesktopSidebar',[function(){return{restrict:'E',template:'<div id="{{idForPanel}}" class="{{classForPanel}} panel-sim" ng-if="isActive">'+' <div class="panel-heading">Sponsored</div>'+' <div class="panel-body">'+' <a rel="nofollow" ng-href="{{link}}" class="more-stuff-to-show-image">'+' <img ng-src="{{imageUrl}}">'+' <img ng-if= "externalInfoImageURL !== \'\'" ng-src="{{externalInfoImageURL}}" style="height:1px; width:1px; border:0px;" border="0" width="1" height="1"/>'+' </a>'+' </div>'+'</div>',controller:function($scope,pageInfo){var sidebarSlot=pageInfo.getSideBarSlot();$scope.isActive=sidebarSlot.isActive;$scope.link=sidebarSlot.link;$scope.imageUrl=sidebarSlot.imageUrl;$scope.externalInfoImageURL=sidebarSlot.externalInfoImageURL;},scope:{classForPanel:"@",idForPanel:"@"},link:function(scope,element,attrs){}};}]);
984angular.module('ccc-app').directive('infoDesktopAndMobileProfileViewPage',[function(){return{restrict:'E',template:'<div class="more-stuff-to-show-top" ng-if="isActive">'+' <div class="more-stuff-to-show-container">'+' <a rel="nofollow" ng-href="{{link}}" class="more-stuff-to-show-image">'+' <span ng-if="textTop!=\'\'">{{textTop}}<br/></span>'+' <img ng-src="{{imageUrl}}"/>'+' </a>'+' </div>'+'</div>',controller:function($scope,pageInfo){var coinInfoStuff=pageInfo.getSlotInfo('side_thing');$scope.isActive=coinInfoStuff.isActive;$scope.link=coinInfoStuff.link;$scope.textTop=coinInfoStuff.textTop;$scope.imageUrl=coinInfoStuff.imageUrl;},scope:{},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('sendIdToApi',[function(){return{restrict:'A',controller:function($scope,pageInfo){pageInfo.addIdForInfoView($scope.idToSend);},scope:{idToSend:'=',}};}]);angular.module('ccc-app').directive('infoDesktopAndMobileProfileDropdown',[function(){return{restrict:'E',templateUrl:'streamers/info-desktop-and-mobile-profile-dropdown.html',controller:function($scope,pageInfo){var externalIds=$scope.button.options?$scope.button.options.map(function(option){return option.data.externalId;}):[];var hasBeenOpened=false;$scope.gambleDropdownId=936912;$scope.toggled=function(open){if(open&&!hasBeenOpened&&externalIds.length>0){pageInfo.increaseInfo(externalIds);hasBeenOpened=true;}} 985$scope.button.type='Dropdown';$scope.button.isActive=true;},scope:{type:'@',button:'=',indexNumber:'@'}};}]);angular.module('ccc-app').directive('infoDesktopAndMobileProfileDropdownOption',[function(){return{restrict:'E',templateUrl:'streamers/info-desktop-and-mobile-profile-dropdown-option.html',scope:{option:'='},replace:true,};}]);angular.module('ccc-app').directive('transakWidget',[function(){return{restrict:'E',templateUrl:'streamers/info-desktop-and-mobile-profile-dropdown-option.html',controller:function($scope,pageInfo,userManager,toastNotifications,cModalService){var template='<h4 class="text-left">Where am I going to buy from?</h4>\n'+'<p class="text-left">You will be using a <strong>third-party service called Transak</strong>. It is a Fiat/crypto on/offramp, which you can use via Cryptocompare to quickly and securely purchase (almost) any cryptocurrency directly to your wallet.</p>\n'+'<h4 class="text-left">What are the rates and fees?</h4>\n'+'<p class="text-left">For a limited time only, we\'re offering <strong>Zero fees</strong> on all transactions.</p>\n'+'<p class="text-left">Exchange rates are competitve and often better than the leading cryptocurrency vendors.</p>\n'+'<h4 class="text-left">How long will it take me to complete the process?</h4>\n'+'<p class="text-left">Your first purchase will include a registration and verification process (standard KYC), which usually takes <strong>5-10 minutes</strong>. Once this is complete and your payment accepted, your chosen crypto should be in your wallet in <strong>1-3 minutes</strong>, depending on transaction times.</p>\n'+'<p class="text-left">Subsequent purchases will be much faster, as registration and verification is a one time process.</p>\n'+'<h4 class="text-left">What does the KYC process involve?</h4>\n'+'<p class="text-left">Verification requires some form of government-authenticated ID, such as a <strong>driver\'s license, national identity card, or a passport</strong>.</p>\n'+'<p class="text-left">Once you are verified, you can purchase with your credit/debit card or by making a bank transfer. <a title="Transak purchase options and currencies" href="https://www.notion.so/Coverage-Payment-Methods-Fees-Limits-30c0954fbdf04beca68622d9734c59f9" target="_blank">You can view all Transak purchase options and supported currencies here.</a></p>\n'+'<p class="text-left"><strong>Your data will be stored with Transak for future purchases.</strong></p>\n';$scope.showModal=function($event){$event.preventDefault();$scope.loadWidget();cModalService.showGenericModal('Buy '+pageInfo.getSymbol()+' via Transak',template,{showCancel:false,confirmText:'Continue'},loadTransak,function(){});} 986var transakSrc='https://global.transak.com/sdk/v1.1/widget.js';$scope.loadWidget=function(){var resource=document.createElement('script');resource.src=transakSrc;var script=document.getElementsByTagName('script')[0];script.parentNode.insertBefore(resource,script);} 987var loadAttempt=0;function loadTransak(){try{let transak=new TransakSDK.default({apiKey:CCC.transakProductionKey,environment:'PRODUCTION',defaultCryptoCurrency:pageInfo.getSymbol(),walletAddress:'',themeColor:'000000',fiatCurrency:'',email:userManager.getEmailAddress(),redirectURL:'',hostURL:window.location.origin,widgetHeight:'650px',widgetWidth:'100%',isAutoFillUserData:true});transak.init();transak.on(transak.ALL_EVENTS,function(data){});transak.on(transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL,function(orderData){});}catch(e){if(e instanceof ReferenceError){if(loadAttempt<10){loadAttempt++;setTimeout(loadTransak,500);}else{toastNotifications.addNotification("error","Transak is currently unavailable, please try again later");}}else{toastNotifications.addNotification("error","Transak is currently unavailable, please try again later");}}}},scope:{option:'='},replace:true,link:function(scope,element,attrs){}};}]);
987angular.module('ccc-app').directive('moreStuffMobileSidebar',[function(){return{restrict:'E',template:'<div class="panel panel-block panel-more-stuff-to-show mobile" ng-if="isActive">'+' <div class="panel-heading">Sponsored</div>'+' <div class="panel-body">'+' <a rel="nofollow" ng-href="{{link}}" class="more-stuff-to-show-image">'+' <img ng-src="{{imageUrl}}">'+' </a>'+' </div>'+'</div>',controller:function($scope,pageInfo){var sidebarSlot=pageInfo.getSideBarSlot();$scope.isActive=sidebarSlot.isActive;$scope.link=sidebarSlot.link;$scope.imageUrl=sidebarSlot.imageUrl;},scope:{},link:function(scope,element,attrs){}};}]);angular.module('ccc-app').directive('infiniteScroll',['$rootScope','$window','$timeout',function($rootScope,$window,$timeout){return{restrict:'A',scope:{scrollControllerObject:'='},link:function(scope,elem,attrs){$window=angular.element($window);handler=function(){var windowBottom,elementBottom,remaining,loadMore;windowBottom=$window.height()+$window.scrollTop();elementBottom=elem.offset().top+elem.height();remaining=elementBottom-windowBottom;loadMore=remaining<=$window.height();if(loadMore){$timeout(function(){scope.scrollControllerObject.loadMoreOnScroll();},0,true);}};$window.on('scroll',handler);var isScrolling=true;scope.$on('$destroy',function(){if(isScrolling){isScrolling=false;return $window.off('scroll',handler);}});scope.newView=$rootScope.$on('$stateChangeSuccess',function(event){if(!isScrolling){$window.on('scroll',handler);}});scope.changeView=$rootScope.$on('ChangeView',function(event,viewChangeParams){isScrolling=false;$window.off('scroll',handler);scope.changeView();scope.newView();});}};}]);angular.module('ccc-app').directive('homepageUnderTop10InfoSection',function(){return{restrict:'E',template:'<div id="homepage-under-top-10-info-section" class="front-page-bespoke-wrapper main-sizes"'+' ng-if="chosenInfo.isActive === true">'+' <div class="main-image-sizes">'+' <div ng-if="isMobile" class="is-mobile-fpiw">'+' <a ng-href="{{chosenInfo.mobileUrl}}" target="_blank">'+' <img ng-src="{{chosenInfo.mobileImage}}" />'+` <img ng-if= "chosenInfo.externalInfoImageURLMobile!==''" ng-src="chosenInfo.externalInfoImageURLMobile" border="0" width="1" height="1"/>`+' </a>'+' </div>'+' <div ng-if="!isMobile" class="is-desktop-fpiw">'+' <a ng-href="{{chosenInfo.desktopUrl}}" target="_blank">'+' <img ng-src="{{chosenInfo.desktopImage}}" />'+` <img ng-if= "chosenInfo.externalInfoImageURLDesktop !== ''" ng-src="chosenInfo.externalInfoImageURLDesktop" class="externalinfoimage-fpiw" border="0" width="1" height="1"/>`+' </a>'+' </div>'+' <div ng-if="chosenInfo.disclaimerText" class="disclaimer">{{chosenInfo.disclaimerText}}</div>'+' </div>'+'</div>',controller:['$scope','cModalService','userManager','pageInfo',function($scope,cModalService,userManager,pageInfo){$scope.chosenInfo=pageInfo.getSlotInfo('homepage_banner_under_top_10');$scope.isMobile=pageInfo.isMobile();}],scope:{},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('bigInfoSection',function(){return{restrict:'E',templateUrl:'general/big-info-section.html',controller:['$scope','cModalService','userManager','pageInfo',function($scope,cModalService,userManager,pageInfo){$scope.pageNameWithNoExtenalAd={'webPageIndicesH':true,'webPageIndicesP':true,'webPageIndicesPV2':true,'webPageStaticExternalWidget':true,'webPageBackendAccountActivity':true,'webPageBackendActivation':true,'webPageBackendAPIStats':true,'webPageBackendBlockExplorer':true,'Webpagebackendcoinmanagement':true,'Webpagebackendcryptopianlist':true,'Webpagebackendstreamers':true,'Webpagebackendstatus':true,'Webpagecryptopianactivate':true,'Webpagecryptopianh':true,'Webpagecryptopianpassreset':true,'webPageCryptopianPayment':true,'Webpagecryptopianprofile':true,'webPageCryptopianRestore':true,'Webpagecryptopianunsubscribe':true,'webPageDeveloperWidgetH':true,'Webpageerror404':true,'webPagePressReleaseH':true,'webPagePressReleaseP':true,'Webpagestaticaboutus':true,'Webpagestaticadvertise':true,'Webpagestaticsimple':true,'
987webPageStaticTimeline':true,'webPageStaticCareers':true,'webPageStaticCareersOpenPosition':true} 988$scope.isHidden=$scope.pageNameWithNoExtenalAd[$scope.page]!==undefined;$scope.chosenInfo=pageInfo.getSlotInfo('top_info');if($scope.chosenInfo.isActive===false){$scope.chosenInfo=pageInfo.getSlotInfo('top_info_backup');} 989$scope.isMobile=pageInfo.isMobile();$scope.openEnterpriseModal=function(message){cModalService.showEnterpriseInformationModal(userManager.getEmailAddress(),message,false);}}],scope:{page:"@"},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('focusMe',function($timeout){return{scope:{trigger:'=focusMe',focusContainer:'@'},link:function(scope,element){scope.$watch('trigger',function(value){if(value===true){$timeout(function(){element[0].focus();scope.trigger=false;});}});scope.$watch(function(){return element.attr('class')},function(newValue){$timeout(function(){if(newValue.match(/ng-hide/)!==null){return;} 990element[0].focus();scope.trigger=false;});});}};});angular.module('ccc-app').directive('histoPriceCalculator',function(){return{restrict:'E',template:'<div class="histo-price-calculator">\n'+' On <input name="conversionDate" ng-model="conversionDate" type="date" '+' tooltip-trigger="none" tooltip-is-open="priceOnDate === 0 || conversionDate > maxDate" tooltip-placement="bottom" uib-tooltip="Please enter more recent date" />\n'+' <span ng-show="priceOnDate !== 0 && conversionDate <= maxDate"> '+' the price of\n'+' <input class="historical-calculator" ng-model="symbolMultiplier" type="text" ng-init="symbolMultiplier=1"> {{fsym}}\n'+' was <span ng-show="!loading" ng-bind="priceOnDate * symbolMultiplier"></span>\n'+' <i ng-show="loading" class="glyphicon glyphicon-refresh glyphicon-spin"></i>\n'+' {{tsym}}.\n'+' </span>'+' </div>',controller:['$scope','chartUtil','pageInfo',function($scope,chartUtil,pageInfo){$scope.conversionDate=new Date();$scope.loading=false;$scope.maxDate=new Date();$scope.priceOnDate=$scope.initPrice;$scope.$watch('parentLoading',function(loading){$scope.loading=loading;});$scope.$watch('initPrice',function(newPrice){if($scope.conversionDate.getTime()===$scope.maxDate.getTime()){$scope.priceOnDate=newPrice;}}) 991$scope.$watchGroup(['fsym','tsym','conversionDate'],function(newValues){if($scope.conversionDate>$scope.maxDate){return;} 992if($scope.initPrice&&$scope.conversionDate.getTime()===$scope.maxDate.getTime()){$scope.priceOnDate=$scope.initPrice;return;} 993var ts=Math.floor(($scope.conversionDate).getTime()/1000);$scope.loading=true;chartUtil.getPriceByTs($scope.fsym,$scope.tsym,ts).then(function(price){$scope.loading=false;$scope.priceOnDate=price;});})}],scope:{fsym:'=',tsym:'=',initPrice:'=',parentLoading:'='},link:function(scope,element,attrs){}};}); 994;;;$(function(){var $swiper_charts=false;var isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);var isSafari=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);if(isSafari){$('html').addClass('safari');} 995else{$('html').addClass('other');} 996$(document).on('click','.nav-login-modal li a',function(){$('.nav-login-modal li').removeClass('active');$(this).parent('li').addClass('active');if($(this).hasClass('activate-login')){$('.btn-login').removeClass('hidden');$('.btn-signup').addClass('hidden');$('.modal-footer-login').addClass('hidden');} 997if($(this).hasClass('activate-signup')){$('.btn-signup').removeClass('hidden');$('.btn-login').addClass('hidden');$('.modal-footer-login').removeClass('hidden');}});}); 998;;;angular.module('ccc-app').factory('socketWrapper',['$rootScope','$interval',function socketWrapperFactory($rootScope,$interval){$interval(function(){$rootScope.$apply();},200,0,false);return function(onOpen,onClose,onMessage,onError){var ws=new WebSocket(CCC.streamerUrl);ws.onopen=onOpen;ws.onclose=onClose;ws.onmessage=onMessage;ws.onerror=onError;return ws;}}]);angular.module('ccc-app').factory('streamerUtilities',['$rootScope','$filter','$timeout','socketWrapper','subscriptionManager','orderBook',function streamerUtilitiesFactory($rootScope,$filter,$timeout,socketWrapper,subscriptionManager,orderBook){var displaySettings=CCC.CURRENT.DISPLAY.FIELDS;var displayFlagsLinked=CCC.CURRENT.DISPLAY.FLAGSLINK;var tradeDisplaySettings=CCC.TRADE.DISPLAY.FIELDS;var displayCurrency=CCC.STATIC.CURRENCY;var utilStatic=CCC.STATIC.UTIL;var isStreaming=true;var isConnected=false;var alreadyStopped=false;var durationOfAnimation=900;var globalPageSubs={};var globalAuthKey="";var streamerUtilitiesInstance={};var cachedMessages={};var aggPreLoaded=false;var monitorPreLoaded=false;var heartbeatTimeout=30000;var reconnectTimeout=5000;var subsToAddOnInitialConnection=[];var reconnectSocket=function(){if(socket.readyState!==WebSocket.CLOSED){socket.close();} 999socket=socketWrapper(socketOpen,socketClose,socketMessage,socketError);$timeout.cancel(timeoutForReconnection);timeoutForReconnection=$timeout(reconnectSocket,reconnectTimeout,false);};var timeoutForReconnection=$timeout(reconnectSocket,reconnectTimeout,false);var socketOpen=function(data){isConnected=true;$timeout.cancel(timeoutForReconnection);timeoutForReconnection=$timeout(reconnectSocket,heartbeatTimeout*2,false);$rootScope.$emit("SocketConnected",true);if(subsToAddOnInitialConnection.length>0){socket.send(JSON.stringify({action:'SubAdd',subs:subsToAddOnInitialConnection}));subsToAddOnInitialConnection=[];}};var socketClose=function(){if(isConnected){globalPageSubs={};isConnected=false;} 1000$timeout.cancel(timeoutForReconnection);timeoutForReconnection=$timeout(reconnectSocket,reconnectTimeout,false);};var socketMessage=function(rawMessage){var message=rawMessage.data;var messageType=message.substring(0,message.indexOf("~"));switch(messageType){case CCC.STATIC.TYPE.TRADE:streamerUtilitiesInstance.emitCurrentTrade('TradeMessage',message);break;case CCC.STATIC.TYPE.CURRENT:streamerUtilitiesInstance.emitCurrentMessage('CurrentMessage',message);break;case CCC.STATIC.TYPE.CURRENTAGG:streamerUtilitiesInstance.emitCurrentMessage('CurrentAggMessage',message);break;case CCC.STATIC.TYPE.ORDERBOOK:streamerUtilitiesInstance.emitOrderBookMessage('OrderBookMessage',message);break;case CCC.STATIC.TYPE.FULLORDERBOOK:streamerUtilitiesInstance.emitFullOrderBookMessage('FullOrderBookMessage',message);break;case CCC.STATIC.TYPE.FULLVOLUME:streamerUtilitiesInstance.emitFullVolumeMessage('FullVolumeMessage',message);break;case CCC.STATIC.TYPE.TOPTIERFULLVOLUME:streamerUtilitiesInstance.emitTopTierFullVolumeMessage('TopTierFullVolumeMessage',message);break;case CCC.STATIC.TYPE.HISTO:streamerUtilitiesInstance.emitOHLCMessage('OHLCMessage',message);break;case CCC.STATIC.TYPE.FORUM:streamerUtilitiesInstance.emitForumMessage('ForumMessage',message);break;case CCC.STATIC.TYPE.NOTIFICATION:streamerUtilitiesInstance.emitNotificationMessage('NotificationMessage',message);break;case CCC.STATIC.TYPE.ACTIVATION:streamerUtilitiesInstance.emitActivationMessage('ActivationMessage',message);break;case CCC.STATIC.TYPE.SUBSCRIBECOMPLETE:streamerUtilitiesInstance.emitSubscribeCompleteMessage('SubscribeCompleteMessage',message);break;case CCC.STATIC.TYPE.LOADCOMPLETE:if(!isStreaming&&!alreadyStopped){streamerUtilitiesInstance.stopStreaming();alreadyStopped=true;} 1001$rootScope.$emit('LoadComplete',true);break;case CCC.STATIC.TYPE.ERROR:streamerUtilitiesInstance.emitErrorMessage('ErrorMessage',message);break;case CCC.STATIC.TYPE.UNAUTHORIZED:console.log(message);break;case CCC.STATIC.TYPE.HEARTBEAT:$timeout.cancel(timeoutForReconnection);timeoutForReconnection=$timeout(reconnectSocket,heartbeatTimeout*2,false);break;case CCC.STATIC.TYPE.RATELIMIT:$rootScope.$emit('rateLimitExceeded');break;}};var socketError=function(){$rootScope.$emit('SocketError',true);};var socket=socketWrapper(socketOpen,socketClose,socketMessage,socketError);streamerUtilitiesInstance.getStreamingStatus=function(){return isStreaming;};streamerUtilitiesInstance.stopStreaming=function(){var subsToSend=[];for(var sub in globalPageSubs){if(globalPageSubs.hasOwnProperty(sub)){subsToSend.push(sub);}} 1002if(subsToSend.length>0){let objectToSend={action:'SubAdd',subs:subsToSend};socket.send(JSON.stringify(objectToSend));isStreaming=false;return true;} 1003return false;};streamerUtilitiesInstance.startStreaming=function(){var subsToSend=[];if(isStreaming){return false;} 1004for(var sub in globalPageSubs){if(globalPageSubs.hasOwnProperty(sub)){subsToSend.push(sub);}} 1005if(subsToSend.length>0){let objectToSend={action:'SubAdd',subs:subsToSend};socket.send(JSON.stringify(objectToSend));isStreaming=true;return true;} 1006return false;};streamerUtilitiesInstance.addGlobalPageSubs=function(subs,callback){var subsToSend=[];for(var i=0;i<subs.length;i++){var currentSub=subs[i];if(globalPageSubs.hasOwnProperty(currentSub)){globalPageSubs[currentSub]=globalPageSubs[currentSub]+1;if(cachedMessages.hasOwnProperty(currentSub)){callback(cachedMessages[currentSub]);}}else{globalPageSubs[currentSub]=1;subsToSend.push(currentSub);if(cachedMessages.hasOwnProperty(currentSub)){callback(cachedMessages[currentSub]);}}} 1007if(subsToSend.length>0){if(isConnected){let objectToSend={action:'SubAdd',subs:subsToSend};socket.send(JSON.stringify(objectToSend));}else{subsToAddOnInitialConnection=subsToAddOnInitialConnection.concat(subsToSend);}} 1008alreadyStopped=false;};streamerUtilitiesInstance.removeGlobalPageSubs=function(subs){var subsToRemove=[];for(var i=0;i<subs.length;i++){if(globalPageSubs.hasOwnProperty(subs[i])){globalPageSubs[subs[i]]=globalPageSubs[subs[i]]-1;if(globalPageSubs[subs[i]]==0){subsToRemove.push(subs[i]);delete globalPageSubs[subs[i]];}}} 1009if(subsToRemove.length>0){if(isConnected){let objectToSend={action:'SubRemove',subs:subsToRemove};socket.send(JSON.stringify(objectToSend));}else{subsToAddOnInitialConnection=subsToAddOnInitialConnection.filter(function(subToAdd){return subsToRemove.indexOf(subToAdd)===-1;});}}};streamerUtilitiesInstance.initConnection=function(){return{connected:isConnected,loadingData:true,aggPreLoaded:aggPreLoaded,monitorPreLoaded:monitorPreLoaded,subs:[],data:[],orderbook:orderBook,keyToPosition:{},subsInvolvedIn:{},totalvolume24hour:0};};streamerUtilitiesInstance.initProgressBar=function(){if(isConnected){return{current:2,message:'Loading data...',max:3};}else{return{current:1,message:'Connecting...',max:3};}};
1009streamerUtilitiesInstance.initOrdering=function(){return{isAscending:false,sortingField:''};};streamerUtilitiesInstance.emitFullVolumeMessage=function(messageType,messageRaw){var messageToEmit={};var displayObj={};var fullVolume;messageToEmit.Raw=messageRaw;messageToEmit.Data=CCC.FULLVOLUME.unpack(messageRaw);var symbol=displayCurrency.getSymbol(messageToEmit.Data['SYMBOL']);messageToEmit.SubKey=CCC.FULLVOLUME.getKey(messageToEmit.Data);displayObj.FROMSYMBOL=symbol;displayObj.FULLVOLUME=utilStatic.convertValueToDisplay(symbol,messageToEmit.Data['FULLVOLUME'],$filter('number'),'short');messageToEmit.Display=displayObj;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitTopTierFullVolumeMessage=function(messageType,messageRaw){var messageToEmit={};var displayObj={};var fullVolume;messageToEmit.Raw=messageRaw;messageToEmit.Data=CCC.TOPTIERFULLVOLUME.unpack(messageRaw);var symbol=displayCurrency.getSymbol(messageToEmit.Data['SYMBOL']);messageToEmit.SubKey=CCC.TOPTIERFULLVOLUME.getKey(messageToEmit.Data);displayObj.FROMSYMBOL=symbol;displayObj.TOPTIERFULLVOLUME=utilStatic.convertValueToDisplay(symbol,messageToEmit.Data['TOPTIERFULLVOLUME'],$filter('number'),'short');messageToEmit.Display=displayObj;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitOHLCMessage=function(messageType,messageRaw){var messageToEmit={};var displayObj={};messageToEmit.Raw=messageRaw;messageToEmit.Data=CCC.HISTO.unpack(messageRaw);var symbol=displayCurrency.getSymbol(messageToEmit.Data['SYMBOL']);messageToEmit.SubKey=CCC.HISTO.getKey(messageToEmit.Data);displayObj.FROMSYMBOL=symbol;displayObj.HISTO=utilStatic.convertValueToDisplay(symbol,messageToEmit.Data['HISTO'],$filter('number'),'short');messageToEmit.Display=displayObj;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitForumMessage=function(messageType,messageRaw){var messageToEmit={};messageToEmit.Raw=messageRaw;messageToEmit.Data=CCC.FORUM.unpack(messageRaw);messageToEmit.SubKey=CCC.FORUM.getKey(messageToEmit.Data);$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitNotificationMessage=function(messageType,messageRaw){var messageToEmit={};messageToEmit.Raw=messageRaw;messageToEmit.Data=CCC.NOTIFICATION.unpack(messageRaw);messageToEmit.SubKey=CCC.NOTIFICATION.getRecipientKey(messageToEmit.Data);$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitSubscribeCompleteMessage=function(messageType,messageRaw){var messageToEmit={};messageToEmit.Data=CCC.SUBSCRIBECOMPLETE.unpack(messageRaw);messageToEmit.Raw=messageRaw;messageToEmit.SubKey=CCC.SUBSCRIBECOMPLETE.getKey(messageToEmit.Data);$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitErrorMessage=function(messageType,messageRaw){var messageToEmit={};messageToEmit.Data=CCC.ERROR.unpack(messageRaw);messageToEmit.Raw=messageRaw;messageToEmit.SubKey=CCC.ERROR.getKey(messageToEmit.Data);$rootScope.$emit(messageType,messageToEmit);} 1010streamerUtilitiesInstance.emitOrderBookMessage=function(messageType,messageRaw){var messageToEmit={};var currentOBMessage=CCC.ORDER.unpack(messageRaw);var subKey=CCC.ORDER.getKey(currentOBMessage);var orderBookKey=CCC.ORDER.getOrderBookKey(currentOBMessage);orderBook.decorateDisplayProperties(currentOBMessage);messageToEmit.Raw=messageRaw;messageToEmit.SubKey=subKey;messageToEmit.OrderBookKey=orderBookKey;messageToEmit.Obj=currentOBMessage;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitFullOrderBookMessage=function(messageType,messageRaw){var messageToEmit={};var orderBookKey=orderBook.getKeyFromPacked(messageRaw);var subKey=CCC.STATIC.TYPE.ORDERBOOK+'~'+orderBookKey;messageToEmit.Raw=messageRaw;messageToEmit.SubKey=subKey;messageToEmit.OrderBookKey=orderBookKey;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitActivationMessage=function(messageType,messageRaw){var messageToEmit={};var subKey=CCC.STATIC.TYPE.ACTIVATION+'~ACTIVATION';var currentParts=messageRaw.split('~');var currentActivationMessage={};currentActivationMessage.T=CCC.STATIC.TYPE.ACTIVATION;currentActivationMessage.COUNTRY=currentParts[2]||'N/A';currentActivationMessage.IP=currentParts[3]||'N/A';currentActivationMessage.EMAILDOMAIN=currentParts[4]||'N/A';currentActivationMessage.TS=parseInt(currentParts[5],10);messageToEmit.Raw=messageRaw;messageToEmit.SubKey=subKey;messageToEmit.Obj=currentActivationMessage;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.emitCurrentTrade=function(messageType,messageRaw){var currentTrade=CCC.TRADE.unpack(messageRaw);var subKey=CCC.TRADE.getKey(currentTrade);var currentDisplay={};for(var property in currentTrade){if(tradeDisplaySettings[property].Show){switch(tradeDisplaySettings[property].Filter){case'Date':currentDisplay[property]=$filter('date')(currentTrade[property]*1000,tradeDisplaySettings[property].Format);break;case'Number':var symbolType=tradeDisplaySettings[property].Symbol;
1010currentDisplay[property]=utilStatic.convertValueToDisplay(currentDisplay[symbolType],currentTrade[property],$filter('number'));break;case'Text':currentDisplay[property]=currentTrade[property];break;case'CurrencySymbol':currentDisplay[property]=displayCurrency.getSymbol(currentTrade[property]);break;case'Market':currentDisplay[property]=subscriptionManager.getNameForExchange(currentTrade[property]);break 1011case'TradeFlag':if(parseInt(currentTrade[property],16)&CCC.TRADE.FLAGS.SELL){currentDisplay[property]='Sell';}else if(parseInt(currentTrade[property],16)&CCC.TRADE.FLAGS.BUY){currentDisplay[property]='Buy';}else{currentDisplay[property]='Unknown';} 1012break;}}} 1013currentTrade['ARRIVEDON']=new Date();currentTrade['highlight']=true;currentTrade['DISPLAY']=currentDisplay;var messageToEmit={};messageToEmit.Raw=messageRaw;messageToEmit.SubKey=subKey;messageToEmit.Obj=currentTrade;$rootScope.$emit(messageType,messageToEmit);};streamerUtilitiesInstance.mergeObjects=function(obj1,obj2){for(var attrname in obj2){obj1[attrname]=obj2[attrname];} 1014return obj1;} 1015streamerUtilitiesInstance.copyObject=function(obj1){var obj2={};for(var attrname in obj1){obj2[attrname]=obj1[attrname];} 1016return obj2;} 1017streamerUtilitiesInstance.decorateCurrent=function(prevMessage,newMessage){prevMessage=prevMessage||{};prevMessage['SUBKEY']=prevMessage['SUBKEY']||newMessage.SubKey;prevMessage['DATA']=newMessage.Obj;prevMessage['DISPLAY']=newMessage.Display;if(prevMessage['VISUAL']){prevMessage['VISUAL']=streamerUtilitiesInstance.mergeObjects(prevMessage['VISUAL'],newMessage.Visual);}else{prevMessage['VISUAL']=newMessage.Visual;} 1018return prevMessage;};streamerUtilitiesInstance.populatePortfolioPrice=function(price,secondPrice,conversionType){var calculatedPrice=0;switch(conversionType){case"multiply":calculatedPrice=price*secondPrice;break;case"divide":case"invert_divide":calculatedPrice=price/secondPrice;break;case"invert_muliply":calculatedPrice=1/(price*secondPrice);break;} 1019return calculatedPrice;};streamerUtilitiesInstance.populateConvertedVisual=function(coin,subs,subIndex){var isFirstObject=subIndex==0;var newMessage=subs[subIndex];var subKey=newMessage.SubKey;var setOppositeDirection=function(visualObject){coin.VISUAL={};coin.VISUAL["PRICEUP"]=visualObject["PRICEDOWN"];coin.VISUAL["PRICEDOWN"]=visualObject["PRICEUP"];coin.VISUAL["PRICEUNCHANGED"]=visualObject["PRICEUNCHANGED"];};switch(coin.Coin.Conversion){case"direct":case"multiply":streamerUtilitiesInstance.mergeObjects(coin.VISUAL,newMessage.Visual);break;case"divide":case"invert_divide":if(isFirstObject){streamerUtilitiesInstance.mergeObjects(coin.VISUAL,newMessage.Visual);}else{setOppositeDirection(newMessage.Visual);} 1020break;case"invert":case"invert_muliply":if(isFirstObject){setOppositeDirection(newMessage.Visual);}else{streamerUtilitiesInstance.mergeObjects(coin.VISUAL,newMessage.Visual);} 1021break;}};streamerUtilitiesInstance.populateVisualBasedOnPrice=function(previousPriceValue,previousPriceDisplay,currentPriceValue,currentPriceDisplay){var newVisual={};if(previousPriceDisplay!=currentPriceDisplay){var dateNow=new Date();var animationExpires=dateNow.setMilliseconds(dateNow.getMilliseconds()+durationOfAnimation);if(previousPriceValue>currentPriceValue){newVisual["PRICEDOWN"]=animationExpires;}else{newVisual["PRICEUP"]=animationExpires;}} 1022return newVisual;};streamerUtilitiesInstance.decorateICOUpcomingOngoingMember=function(coin,subsNeeded,subIndex){var conversion=coin.Coin.Conversion;var currentMessage=coin.DATA;var currentDisplay=coin.DISPLAY;if(isNaN(coin.CommonData.ICOStartPrice)||coin.CommonData.ICOStartPrice==0){currentMessage.ICOSTARTPRICE=0;currentDisplay.ICOSTARTPRICE="-";return coin;} 1023var previousPriceValue=currentMessage.ICOSTARTPRICE||0;var previousPriceDisplay=currentDisplay.ICOSTARTPRICE||"0";if(conversion=='direct'){currentMessage.ICOSTARTPRICE=subsNeeded[0].Obj.PRICE*coin.CommonData.ICOStartPrice;currentMessage.OPEN24HOUR=subsNeeded[0].Obj.OPEN24HOUR*coin.CommonData.ICOStartPrice;}else if(conversion=='invert'){currentMessage.ICOSTARTPRICE=coin.CommonData.ICOStartPrice/coin.subsNeeded[0].Obj.PRICE;currentMessage.OPEN24HOUR=coin.CommonData.ICOStartPrice/coin.subsNeeded[0].Obj.OPEN24HOUR;}else{currentMessage.ICOSTARTPRICE=streamerUtilitiesInstance.populatePortfolioPrice(coin.subsNeeded[0].Obj.PRICE,coin.subsNeeded[1].Obj.PRICE,conversion)*coin.CommonData.ICOStartPrice;currentMessage.OPEN24HOUR=streamerUtilitiesInstance.populatePortfolioPrice(coin.subsNeeded[0].Obj.OPEN24HOUR,coin.subsNeeded[1].Obj.OPEN24HOUR,conversion)*coin.CommonData.ICOStartPrice;} 1024if(currentMessage.ICOSTARTPRICE>0&¤tMessage.OPEN24HOUR>0){currentMessage.CHANGE24HOUR=currentMessage.ICOSTARTPRICE-currentMessage.OPEN24HOUR;}
1025currentDisplay.ICOSTARTPRICE=utilStatic.convertValueToDisplay("$",currentMessage.ICOSTARTPRICE,$filter('number'));var newVisual=streamerUtilitiesInstance.populateVisualBasedOnPrice(previousPriceValue,previousPriceDisplay,currentMessage.ICOSTARTPRICE,currentDisplay.ICOSTARTPRICE);streamerUtilitiesInstance.mergeObjects(coin.VISUAL,newVisual);return coin;};streamerUtilitiesInstance.decorateICOPastMember=function(coin,subsNeeded,subIndex){var conversion=coin.Coin.Conversion;var currentMessage=coin.DATA;var currentDisplay=coin.DISPLAY;var previousPriceValue=currentMessage.PRICE;var previousPriceDisplay=currentDisplay.PRICE;if(conversion=='direct'){currentMessage.PRICE=subsNeeded[0].Obj.PRICE;currentMessage.OPEN24HOUR=subsNeeded[0].Obj.OPEN24HOUR;}else if(conversion=='invert'){currentMessage.PRICE=1/subsNeeded[0].Obj.PRICE;currentMessage.OPEN24HOUR=1/subsNeeded[0].Obj.OPEN24HOUR;}else{currentMessage.PRICE=streamerUtilitiesInstance.populatePortfolioPrice(subsNeeded[0].Obj.PRICE,subsNeeded[1].Obj.PRICE,conversion);currentMessage.OPEN24HOUR=streamerUtilitiesInstance.populatePortfolioPrice(subsNeeded[0].Obj.OPEN24HOUR,subsNeeded[1].Obj.OPEN24HOUR,conversion);} 1026currentDisplay.PRICE=utilStatic.convertValueToDisplay("$",currentMessage.PRICE,$filter('number'));currentDisplay.OPEN24HOUR=utilStatic.convertValueToDisplay("$",currentMessage.OPEN24HOUR,$filter('number'));var newCHANGE24HOUR=currentMessage.PRICE-currentMessage.OPEN24HOUR;currentMessage.CHANGE24HOUR=newCHANGE24HOUR;currentMessage.CHANGEPCT24HOUR=currentMessage.CHANGE24HOUR/currentMessage.OPEN24HOUR*100;if(Math.abs(currentMessage.CHANGE24HOUR)>10000){currentDisplay.CHANGE24HOUR='$ '+$filter('number')(currentMessage.CHANGE24HOUR,0);}else if(Math.abs(currentMessage.CHANGE24HOUR)>1){currentDisplay.CHANGE24HOUR='$ '+$filter('number')(currentMessage.CHANGE24HOUR,2);}else{currentDisplay.CHANGE24HOUR='$ '+currentMessage.CHANGE24HOUR.toPrecision(2);} 1027currentDisplay.CHANGEPCT24HOUR=$filter('number')(currentMessage.CHANGEPCT24HOUR,2)+"%";if(isNaN(coin.CommonData.TotalCoinsMined)||coin.CommonData.TotalCoinsMined==0){currentMessage.MKTCAP=0;currentDisplay.MKTCAP="-";}else{currentMessage.MKTCAP=currentMessage.PRICE*coin.CommonData.TotalCoinsMined;if(coin.CommonData.MktCapPenalty>0){currentMessage.MKTCAP=currentMessage.MKTCAP*(100-coin.CommonData.MktCapPenalty)/100;} 1028currentDisplay.MKTCAP=utilStatic.convertValueToDisplay("$",currentMessage.MKTCAP,$filter('number'),'short');} 1029if(currentMessage.ICOPRICE){currentMessage.ROI=(currentMessage.PRICE/coin.DATA.ICOPRICE-1)*100;currentDisplay.ROI=utilStatic.convertValueToDisplay("",currentMessage.ROI,$filter('number'),'short')+"%";}else{currentMessage.ROI=0;currentDisplay.ROI="-";} 1030var newVisual=streamerUtilitiesInstance.populateVisualBasedOnPrice(previousPriceValue,previousPriceDisplay,currentMessage.PRICE,currentDisplay.PRICE);streamerUtilitiesInstance.mergeObjects(coin.VISUAL,newVisual);return coin;};streamerUtilitiesInstance.decorateCurrentPorfolioMember=function(prevMessage,newMessage,type,portfolioCurrency,conversionType){var dateNow=new Date();var animationExpires=dateNow.setMilliseconds(dateNow.getMilliseconds()+durationOfAnimation);prevMessage.PriceInfo[type].RAW=newMessage.Obj;prevMessage.PriceInfo[type].DISPLAY=newMessage.Display;var currentPrice=newMessage.Obj.PRICE;var currentOpen=newMessage.Obj.OPEN24HOUR;var lastUpdate=newMessage.Obj.LASTUPDATE;var displaySymbol=displayCurrency.getSymbol(portfolioCurrency);var isRealatedToConversion=false;prevMessage.PriceInfo.PortfolioValues.RAW.LastUpdate=lastUpdate;switch(type){case'Current':prevMessage.PriceInfo.PortfolioValues.RAW.PrevPrice=prevMessage.PriceInfo.PortfolioValues.RAW.Price;if(conversionType=='invert'){prevMessage.PriceInfo.PortfolioValues.RAW.Price=1/currentPrice;prevMessage.PriceInfo.PortfolioValues.RAW.Open24Hour=1/currentOpen;}else{prevMessage.PriceInfo.PortfolioValues.RAW.Price=currentPrice;prevMessage.PriceInfo.PortfolioValues.RAW.Open24Hour=currentOpen;} 1031break;case'Conversion':if(prevMessage.PriceInfo.SubOne.RAW.hasOwnProperty('PRICE')){prevMessage.PriceInfo.PortfolioValues.RAW.PrevPrice=prevMessage.PriceInfo.PortfolioValues.RAW.Price;prevMessage.PriceInfo.PortfolioValues.RAW.Price=streamerUtilitiesInstance.populatePortfolioPrice(prevMessage.PriceInfo.SubOne.RAW.PRICE,currentPrice,conversionType);} 1032if(prevMessage.PriceInfo.SubOne.RAW.hasOwnProperty('OPEN24HOUR')){prevMessage.PriceInfo.PortfolioValues.RAW.Open24Hour=streamerUtilitiesInstance.populatePortfolioPrice(prevMessage.PriceInfo.SubOne.RAW.OPEN24HOUR,currentOpen,conversionType);} 1033break;case'SubOne':if(prevMessage.PriceInfo.Conversion.RAW.hasOwnProperty('PRICE')){prevMessage.PriceInfo.PortfolioValues.RAW.PrevPrice=prevMessage.PriceInfo.PortfolioValues.RAW.Price;prevMessage.PriceInfo.PortfolioValues.RAW.Price=streamerUtilitiesInstance.populatePortfolioPrice(currentPrice,prevMessage.PriceInfo.Conversion.RAW.PRICE,conversionType);} 1034if(prevMessage.PriceInfo.Conversion.RAW.hasOwnProperty('OPEN24HOUR')){prevMessage.PriceInfo.PortfolioValues.RAW.Open24Hour=streamerUtilitiesInstance.populatePortfolioPrice(currentOpen,prevMessage.PriceInfo.Conversion.RAW.OPEN24HOUR,conversionType);} 1035break;case'CurrentBuy':if(conversionType=='invert'){prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionPrice=1/currentPrice;prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionOpen24Hour=1/currentOpen;}else{prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionPrice=currentPrice;prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionOpen24Hour=currentOpen;} 1036isRealatedToConversion=true;break;case'ConversionBuy':if(prevMessage.PriceInfo.ConversionBuySubOne.RAW.hasOwnProperty('PRICE')){prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionPrice=streamerUtilitiesInstance.populatePortfolioPrice(prevMessage.PriceInfo.ConversionBuySubOne.RAW.PRICE,currentPrice,conversionType);isRealatedToConversion=true;} 1037if(prevMessage.PriceInfo.ConversionBuySubOne.RAW.hasOwnProperty('OPEN24HOUR')){prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionOpen24Hour=streamerUtilitiesInstance.populatePortfolioPrice(prevMessage.PriceInfo.ConversionBuySubOne.RAW.OPEN24HOUR,currentOpen,conversionType);isRealatedToConversion=true;} 1038break;case'ConversionBuySubOne':if(prevMessage.PriceInfo.ConversionBuy.RAW.hasOwnProperty('PRICE')){prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionPrice=streamerUtilitiesInstance.populatePortfolioPrice(currentPrice,prevMessage.PriceInfo.ConversionBuy.RAW.PRICE,conversionType);isRealatedToConversion=true;} 1039if(prevMessage.PriceInfo.ConversionBuy.RAW.hasOwnProperty('OPEN24HOUR')){prevMessage.PriceInfo.PortfolioValues.RAW.BuyConversionOpen24Hour=streamerUtilitiesInstance.populatePortfolioPrice(currentOpen,prevMessage.PriceInfo.ConversionBuy.RAW.OPEN24HOUR,conversionType);isRealatedToConversion=true;} 1040break;} 1041if(isRealatedToConversion==true){prevMessage.PriceInfo.Visual.CONVERSIONBUY=animationExpires;} 1042return prevMessage;};streamerUtilitiesInstance.decorateCoinDataWithNewObj=function(prevMessage,newMessage,priceData){var priceDataDisplay=priceData||'';var toSymbol=displayCurrency.getSymbol(prevMessage['SubInfo']['CurrencyTo']);var fromSymbol=displayCurrency.getSymbol(prevMessage['SubInfo']['CurrencyFrom']);var totalCoinsMined=prevMessage['SubInfo']['Supply'];var mktCapPenalty=prevMessage['SubInfo']['MktCapPenalty'];var oldDisplayArray=streamerUtilitiesInstance.copyObject(prevMessage.DISPLAY);var oldDataArray=streamerUtilitiesInstance.copyObject(prevMessage.DATA);var fullVolume=prevMessage['DATA']['FULLVOLUME'];var topTierFullVolume=prevMessage['DATA']['TOPTIERFULLVOLUME'];var conversionType=prevMessage['SubInfo']['Conversion'];
1042switch(conversionType){case"direct":var subKey=prevMessage['SubInfo']['SubsNeeded'][0];prevMessage.DATA=cachedMessages[subKey]['Obj'];break;case"multiply":var subNeeded1=prevMessage['SubInfo']['SubsNeeded'][0];var subNeeded2=prevMessage['SubInfo']['SubsNeeded'][1];prevMessage['DATA']=CCC.CURRENT.multiply(cachedMessages[subNeeded1]['Obj'],cachedMessages[subNeeded2]['Obj'],prevMessage.DATA.VOLUME24HOUR);break;case"divide":var subNeeded1=prevMessage['SubInfo']['SubsNeeded'][0];var subNeeded2=prevMessage['SubInfo']['SubsNeeded'][1];prevMessage['DATA']=CCC.CURRENT.divide(cachedMessages[subNeeded1]['Obj'],cachedMessages[subNeeded2]['Obj']);break;case"invert":var subKey=prevMessage['SubInfo']['SubsNeeded'][0];prevMessage.DATA=CCC.CURRENT.invert(cachedMessages[subKey]['Obj']);break;case"invert_divide":var subNeeded1=prevMessage['SubInfo']['SubsNeeded'][0];var subNeeded2=prevMessage['SubInfo']['SubsNeeded'][1];prevMessage['DATA']=CCC.CURRENT.divide(CCC.CURRENT.invert(cachedMessages[subNeeded2]['Obj']),CCC.CURRENT.invert(cachedMessages[subNeeded1]['Obj']));} 1043prevMessage.DATA.FULLVOLUME=fullVolume;prevMessage.DATA.FULLVOLUMETO=fullVolume*prevMessage['DATA']['PRICE'];prevMessage.DISPLAY.FULLVOLUME=utilStatic.convertValueToDisplay(fromSymbol,fullVolume,$filter('number'),'short');prevMessage.DISPLAY.FULLVOLUMETO=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.PRICE*fullVolume,$filter('number'),'short');prevMessage.DATA.TOPTIERFULLVOLUME=topTierFullVolume;prevMessage.DATA.TOPTIERFULLVOLUMETO=topTierFullVolume*prevMessage['DATA']['PRICE'];prevMessage.DISPLAY.FULLTOPIERVOLUME=utilStatic.convertValueToDisplay(fromSymbol,topTierFullVolume,$filter('number'),'short');prevMessage.DISPLAY.TOPTIERFULLVOLUMETO=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.PRICE*topTierFullVolume,$filter('number'),'short');prevMessage.DATA.CHANGE24HOUR=prevMessage.DATA.PRICE-prevMessage.DATA.OPEN24HOUR;prevMessage.DATA.CHANGEPCT24HOUR=prevMessage.DATA.CHANGE24HOUR/prevMessage.DATA.OPEN24HOUR*100;prevMessage.DISPLAY.CHANGEPCT24HOUR=$filter('number')(prevMessage.DATA.CHANGEPCT24HOUR,2);prevMessage.DISPLAY.PRICE=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.PRICE,$filter('number'),priceDataDisplay);prevMessage.DISPLAY.OPEN24HOUR=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.OPEN24HOUR,$filter('number'),priceDataDisplay);prevMessage.DISPLAY.WEISS=prevMessage.CommonData.Rating.Weiss.Rating;if(prevMessage.SubInfo.DirectSecondary){var subKey=prevMessage['SubInfo']['SubsNeeded'].slice(-1)[0];if(cachedMessages[subKey]){prevMessage.DISPLAY.VOLUME24HOURTO=utilStatic.convertValueToDisplay(toSymbol,cachedMessages[subKey]['Obj'].VOLUME24HOURTO,$filter('number'),'short');prevMessage.DATA.VOLUME24HOURTO=cachedMessages[subKey]['Obj'].VOLUME24HOURTO;prevMessage.DISPLAY.VOLUME24HOUR=utilStatic.convertValueToDisplay(toSymbol,cachedMessages[subKey]['Obj'].VOLUME24HOUR,$filter('number'),'short');prevMessage.DATA.VOLUME24HOUR=cachedMessages[subKey]['Obj'].VOLUME24HOUR;}}else if(conversionType==='direct'||prevMessage.DATA.VOLUME24HOUR>0){prevMessage.DISPLAY.VOLUME24HOURTO=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.VOLUME24HOURTO,$filter('number'),'short');prevMessage.DISPLAY.VOLUME24HOUR=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.VOLUME24HOUR,$filter('number'),'short');}else{prevMessage.DISPLAY.VOLUME24HOURTO='-';} 1044if(totalCoinsMined>0){prevMessage.DATA.MKTCAP=prevMessage.DATA.PRICE*totalCoinsMined;if(mktCapPenalty>0){prevMessage.DATA.MKTCAP=prevMessage.DATA.MKTCAP*(100-mktCapPenalty)/100;} 1045prevMessage.DISPLAY.MKTCAP=utilStatic.convertValueToDisplay(toSymbol,prevMessage.DATA.MKTCAP,$filter('number'),'short');}else{prevMessage.DATA.MKTCAP=0;prevMessage.DISPLAY.MKTCAP="-";} 1046if(oldDisplayArray.PRICE!==prevMessage.DISPLAY.PRICE){prevMessage['VISUAL']=prevMessage['VISUAL']?streamerUtilitiesInstance.mergeObjects(prevMessage['VISUAL'],newMessage.Visual):newMessage.Visual;if(oldDisplayArray.MKTCAP!==prevMessage.DISPLAY.MKTCAP){if(prevMessage.VISUAL.PRICEUP){prevMessage.VISUAL.MKTCAPUP=prevMessage.VISUAL.PRICEUP;}else if(prevMessage.VISUAL.PRICEDOWN){prevMessage.VISUAL.MKTCAPDOWN=prevMessage.VISUAL.PRICEDOWN;}}} 1047return prevMessage;};streamerUtilitiesInstance.decorateNotNeededSubTypeArray=function(coinArrayToDecorate){var symbol=displayCurrency.getSymbol(coinArrayToDecorate.SubInfo.CurrencyTo);var fullVolume=coinArrayToDecorate.DATA.FULLVOLUME;var TotalTopTierVolume24H=coinArrayToDecorate.DATA.TOPTIERFULLVOLUME;coinArrayToDecorate.DATA={"PRICE":1,"VOLUME24HOURTO":0,"MKTCAP":coinArrayToDecorate.SubInfo.Supply,"FULLVOLUME":fullVolume,"FULLVOLUMETO":fullVolume,"TOPTIERFULLVOLUME":TotalTopTierVolume24H,"TOPTIERFULLVOLUMETO":TotalTopTierVolume24H,"CHANGEPCT24HOUR":0} 1048if(coinArrayToDecorate.SubInfo.MktCapPenalty>0){coinArrayToDecorate.DATA.MKTCAP=coinArrayToDecorate.DATA.MKTCAP*(100-coinArrayToDecorate.SubInfo.MktCapPenalty)/100;}
1049coinArrayToDecorate.DISPLAY={"PRICE":utilStatic.convertValueToDisplay(symbol,coinArrayToDecorate.DATA.PRICE,$filter('number')),"VOLUME24HOURTO":"-","MKTCAP":utilStatic.convertValueToDisplay(symbol,coinArrayToDecorate.DATA.MKTCAP,$filter('number'),'short'),"FULLVOLUMETO":utilStatic.convertValueToDisplay(symbol,coinArrayToDecorate.DATA.FULLVOLUME,$filter('number'),'short'),"CHANGEPCT24HOUR":$filter('number')(coinArrayToDecorate.DATA.CHANGEPCT24HOUR,2)} 1050return coinArrayToDecorate;};streamerUtilitiesInstance.decorateCurrentWithMktCap=function(prevMessage,newMessage,totalCoinsMined,mktCapPenalty){prevMessage=prevMessage||{};prevMessage['SUBKEY']=prevMessage['SUBKEY']||newMessage.SubKey;prevMessage['DATA']=newMessage.Obj;prevMessage['DISPLAY']=newMessage.Display;prevMessage.DATA.MKTCAP=0;prevMessage.DISPLAY.MKTCAP="-";if(totalCoinsMined!=0){prevMessage.DATA.MKTCAP=prevMessage['DATA'].PRICE*totalCoinsMined;if(mktCapPenalty>0){prevMessage.DATA.MKTCAP=prevMessage.DATA.MKTCAP*(100-mktCapPenalty)/100;} 1051prevMessage.DISPLAY.MKTCAP=utilStatic.convertValueToDisplay(prevMessage.DISPLAY.TOSYMBOL,prevMessage.DATA.MKTCAP,$filter('number'),'short');} 1052if(prevMessage['VISUAL']){prevMessage['VISUAL']=streamerUtilitiesInstance.mergeObjects(prevMessage['VISUAL'],newMessage.Visual);}else{prevMessage['VISUAL']=newMessage.Visual;} 1053return prevMessage;};streamerUtilitiesInstance.decorateCurrenyMktShare=function(messageInfo,totalVolume){var messageToReturn={};messageToReturn.DATA={};messageToReturn.DISPLAY={};var volumeForm=messageInfo.Obj.VOLUME24HOUR;var volumeTo=messageInfo.Obj.VOLUME24HOURTO;var displayToSymbol=messageInfo.Display.TOSYMBOL;var displayFromSymbol=messageInfo.Display.FROMSYMBOL;messageToReturn.DATA.VOLUME24HOUR=volumeForm;messageToReturn.DATA.VOLUME24HOURTO=volumeTo;messageToReturn.DISPLAY.VOLUME24HOUR=utilStatic.convertValueToDisplay(displayFromSymbol,volumeForm,$filter('number'));messageToReturn.DISPLAY.VOLUME24HOURTO=utilStatic.convertValueToDisplay(displayToSymbol,volumeTo,$filter('number'));messageToReturn.DISPLAY.TOSYMBOL=displayToSymbol;messageToReturn.DISPLAY.FROMSYMBOL=displayFromSymbol;return messageToReturn;};streamerUtilitiesInstance.initMonitorFromServer=function(rawDataArray){for(var i=0,length=rawDataArray.length;i<length;i++){streamerUtilitiesInstance.emitCurrentMessage('CurrentMessage',rawDataArray[i]);} 1054monitorPreLoaded=true;};streamerUtilitiesInstance.initAggFromServer=function(rawDataArray){for(var i=0,length=rawDataArray.length;i<length;i++){streamerUtilitiesInstance.emitCurrentMessage('CurrentAggMessage',rawDataArray[i]);} 1055aggPreLoaded=true;};streamerUtilitiesInstance.generateCurrentMessage=function(messageRaw){var lastestMessage=CCC.CURRENT.unpack(messageRaw);var subKey=CCC.CURRENT.getKey(lastestMessage);var dateNow=new Date();var animationExpires=dateNow.setMilliseconds(dateNow.getMilliseconds()+durationOfAnimation);var currentMessageFull=cachedMessages[subKey]||{};var currentMessage=currentMessageFull['Obj']||{};var currentDisplay=currentMessageFull['Display']||{};var currentVisual={};currentDisplay.FROMSYMBOL=displayCurrency.getSymbol(lastestMessage.FROMSYMBOL);currentDisplay.TOSYMBOL=displayCurrency.getSymbol(lastestMessage.TOSYMBOL);for(var flag in CCC.CURRENT.FLAGS){if(parseInt(lastestMessage['FLAGS'],16)&CCC.CURRENT.FLAGS[flag]){currentVisual[flag]=animationExpires;for(var i=0;i<displayFlagsLinked[flag].length;i++){currentVisual[displayFlagsLinked[flag][i]]=false;}}} 1056for(var property in lastestMessage){currentMessage[property]=lastestMessage[property];if(displaySettings[property].Show){currentVisual[property]=animationExpires;switch(displaySettings[property].Filter){case'Date':currentDisplay[property]=$filter('date')(lastestMessage[property]*1000,displaySettings[property].Format);break;case'Number':var symbolType=displaySettings[property].Symbol;var symbolForDisplay=currentDisplay[symbolType];if(symbolForDisplay.length>4){symbolForDisplay=symbolForDisplay.substring(0,3)+'.';} 1057currentDisplay[property]=utilStatic.convertValueToDisplay(symbolForDisplay,lastestMessage[property],$filter('number'));if(displaySettings[property].SortNumberAsWell===true){currentDisplay[property+'_SHORT']=utilStatic.
1057convertValueToDisplay(symbolForDisplay,lastestMessage[property],$filter('number'),'short');} 1058break;case'String':currentDisplay[property]=lastestMessage[property];break;case'Market':currentDisplay[property]=subscriptionManager.getNameForExchange(lastestMessage[property]);break}}} 1059var newCHANGE24HOUR=currentMessage.PRICE-currentMessage.OPEN24HOUR;currentVisual.CHANGE24HOUR=animationExpires;currentMessage.CHANGE24HOUR=newCHANGE24HOUR;currentMessage.CHANGEPCT24HOUR=currentMessage.CHANGE24HOUR/currentMessage.OPEN24HOUR*100;if(Math.abs(currentMessage.CHANGE24HOUR)>10000){currentDisplay.CHANGE24HOUR=currentDisplay.TOSYMBOL+' '+$filter('number')(currentMessage.CHANGE24HOUR,0);}else if(Math.abs(currentMessage.CHANGE24HOUR)>1){currentDisplay.CHANGE24HOUR=currentDisplay.TOSYMBOL+' '+$filter('number')(currentMessage.CHANGE24HOUR,2);}else{currentDisplay.CHANGE24HOUR=currentDisplay.TOSYMBOL+' '+currentMessage.CHANGE24HOUR.toPrecision(2);} 1060currentDisplay.CHANGEPCT24HOUR=$filter('number')(currentMessage.CHANGEPCT24HOUR,2);if(currentMessage.CHANGE24HOUR>0){currentDisplay.CHANGE24HOURUP=animationExpires;currentDisplay.CHANGE24HOURUNCHANGED=false;currentDisplay.CHANGE24HOURDOWN=false;}else if(currentMessage.CHANGE24HOUR<0){currentDisplay.CHANGE24HOURDOWN=animationExpires;currentDisplay.CHANGE24HOURUNCHANGED=false;currentDisplay.CHANGE24HOURUP=false;}else{currentDisplay.CHANGE24HOURUNCHANGED=animationExpires;currentDisplay.CHANGE24HOURDOWN=false;currentDisplay.CHANGE24HOURUP=false;} 1061var messageToEmit={};messageToEmit.Raw=messageRaw;messageToEmit.SubKey=subKey;messageToEmit.Obj=currentMessage;messageToEmit.Visual=currentVisual;messageToEmit.Display=currentDisplay;cachedMessages[subKey]=messageToEmit;return messageToEmit;};streamerUtilitiesInstance.emitCurrentMessage=function(messageType,messageRaw){$rootScope.$emit(messageType,streamerUtilitiesInstance.generateCurrentMessage(messageRaw));};streamerUtilitiesInstance.decorateFullVolume=function(prevMessage,newMessage){var currentPrice=prevMessage['DATA']['PRICE'];var fullVol=newMessage['Data']['FULLVOLUME'];var coinSymbol=displayCurrency.getSymbol(prevMessage['SubInfo']['CurrencyTo']);prevMessage['DATA']['FULLVOLUME']=fullVol;if(currentPrice!==undefined){prevMessage['DATA']['FULLVOLUMETO']=fullVol*currentPrice;prevMessage['DISPLAY']['FULLVOLUMETO']=utilStatic.convertValueToDisplay(coinSymbol,prevMessage['DATA']['FULLVOLUMETO'],$filter('number'),'short');}else{prevMessage['DATA']['FULLVOLUMETO']=0;prevMessage['DISPLAY']['FULLVOLUMETO']='-';} 1062return prevMessage;};streamerUtilitiesInstance.decorateTopTierFullVolume=function(prevMessage,newMessage){var currentPrice=prevMessage['DATA']['PRICE'];var topTierFullVolume=newMessage['Data']['TOPTIERFULLVOLUME'];var coinSymbol=displayCurrency.getSymbol(prevMessage['SubInfo']['CurrencyTo']);prevMessage['DATA']['TOPTIERFULLVOLUME']=topTierFullVolume;if(currentPrice!==undefined){prevMessage['DATA']['TOPTIERFULLVOLUMETO']=topTierFullVolume*currentPrice;prevMessage['DISPLAY']['TOPTIERFULLVOLUMETO']=utilStatic.convertValueToDisplay(coinSymbol,prevMessage['DATA']['TOPTIERFULLVOLUMETO'],$filter('number'),'short');}else{prevMessage['DATA']['TOPTIERFULLVOLUMETO']=0;prevMessage['DISPLAY']['TOPTIERFULLVOLUMETO']='-';} 1063return prevMessage;};return streamerUtilitiesInstance;}]);angular.module('ccc-app').factory('orderBook',['$rootScope','$filter','$interval',function orderBookFactory($rootScope,$filter,$interval){var displayCurrency=CCC.STATIC.CURRENCY;var utilStatic=CCC.STATIC.UTIL;var orderDisplaySettings=CCC.ORDER.DISPLAY.FIELDS;var orderBookInstance={};var DATA={};var KEYS={};var ORDERSARRAY={};var AGGREGATING=false;orderBookInstance.reset=function(){KEYS={};DATA={};ORDERSARRAY={};};orderBookInstance.generateKeyBasedOnParams=function(exchange,fsym,tsym){return CCC.STATIC.TYPE.ORDERBOOK+'~'+exchange+'~'+fsym+'~'+tsym;};orderBookInstance.initOrderBookKey=function(orderBookKey,seq){if(!seq){seq=0;} 1064KEYS[orderBookKey]={};KEYS[orderBookKey][CCC.ORDER.SIDE.BID]=[];KEYS[orderBookKey][CCC.ORDER.SIDE.ASK]=[];KEYS[orderBookKey]['SEQUENCE']=parseFloat(seq);KEYS[orderBookKey]['LOADING']=true;if(!KEYS[orderBookKey].hasOwnProperty('QUEUE')){KEYS[orderBookKey]['QUEUE']=[];} 1065DATA[orderBookKey]={};ORDERSARRAY[orderBookKey]={};ORDERSARRAY[orderBookKey][CCC.ORDER.SIDE.BID]=[];ORDERSARRAY[orderBookKey][CCC.ORDER.SIDE.ASK]=[];};orderBookInstance.resetOrderBookKeepQueue=function(orderBookKey,seq){if(!KEYS.hasOwnProperty(orderBookKey)){KEYS[orderBookKey]={};KEYS[orderBookKey]['QUEUE']=[];} 1066KEYS[orderBookKey][CCC.ORDER.SIDE.BID]=[];KEYS[orderBookKey][CCC.ORDER.SIDE.ASK]=[];KEYS[orderBookKey]['SEQUENCE']=parseFloat(seq);DATA[orderBookKey]={};ORDERSARRAY[orderBookKey]={};ORDERSARRAY[orderBookKey][CCC.ORDER.SIDE.BID]=[];ORDERSARRAY[orderBookKey][CCC.ORDER.SIDE.ASK]=[];};orderBookInstance.hasOrderBookKey=function(orderBookKey){if(KEYS.hasOwnProperty(orderBookKey)){return true;} 1067return false;};orderBookInstance.isLoading=function(orderBookKey){return KEYS[orderBookKey]['LOADING'];};orderBookInstance.getTopOrderKeysByLimit=function(orderBookKey,side,max){return KEYS[orderBookKey][side].slice(0,max);};orderBookInstance.getTotalSizeQuantity=function(orderBookKey,side){if(KEYS[orderBookKey]['LOADING']){return"Loading...";} 1068var currentObArray=ORDERSARRAY[orderBookKey][side];var lastOrderKey=currentObArray.length-1;return currentObArray[lastOrderKey]['DISPLAY']['TOTAL'];};orderBookInstance.getTotalSizeValue=function(orderBookKey,side){if(KEYS[orderBookKey]['LOADING']){return"Loading...";} 1069var currentObArray=ORDERSARRAY[orderBookKey][side];var lastOrderKey=currentObArray.length-1;return currentObArray[lastOrderKey]['DISPLAY']['QTOTAL'];};orderBookInstance.getTopOrders=function(orderBookKey,side){return ORDERSARRAY[orderBookKey][side];};orderBookInstance.startAggregating=function(){if(AGGREGATING==false){AGGREGATING=true;$interval(function(){for(var orderBookKey in KEYS){orderBookInstance.decorateAggregatedProperties(orderBookKey,CCC.ORDER.SIDE.BID);orderBookInstance.decorateAggregatedProperties(orderBookKey,CCC.ORDER.SIDE.ASK);}},250,0,false);}};orderBookInstance.finishedLoading=function(orderBookKey){KEYS[orderBookKey]['LOADING']=false;
1069orderBookInstance.startAggregating();};orderBookInstance.getSequenceNumber=function(orderBookKey){return KEYS[orderBookKey]['SEQUENCE'];};orderBookInstance.decorateAggregatedProperties=function(orderBookKey,side){var currentOb=KEYS[orderBookKey][side];var obSideLength=currentOb.length;var qtotal=0,total=0;var timestampToCheckAgainst=new Date().getTime()-600;ORDERSARRAY[orderBookKey][side]=[];for(var i=0,len=obSideLength;i<len;i++){var currentItem=DATA[orderBookKey][currentOb[i]];qtotal+=currentItem['QuantityTotal'];total+=currentItem['Q'];currentItem['TOTAL']=total;currentItem['QTOTAL']=qtotal;currentItem['DISPLAY']['TOTAL']=utilStatic.convertValueToDisplay(currentItem['DISPLAY']['FSYM'],total,$filter('number'),'short');currentItem['DISPLAY']['QTOTAL']=utilStatic.convertValueToDisplay(currentItem['DISPLAY']['TSYM'],qtotal,$filter('number'),'short');if(currentItem['HIGHLIGHT']==true&×tampToCheckAgainst>currentItem['ARRIVEDONTS']){currentItem['HIGHLIGHT']=false;} 1070ORDERSARRAY[orderBookKey][side].push(currentItem);}};orderBookInstance.decorateDisplayProperties=function(currentOBMessage){var currentDisplay={};for(var property in currentOBMessage){if(orderDisplaySettings[property].Show){switch(orderDisplaySettings[property].Filter){case'Number':if(orderDisplaySettings[property].Symbol=="NONE"){currentDisplay[property]=utilStatic.convertValueToDisplay('',currentOBMessage[property],$filter('number'),'8decimals');}else{var symbolType=orderDisplaySettings[property].Symbol;currentDisplay[property]=utilStatic.convertValueToDisplay(currentDisplay[symbolType],currentOBMessage[property],$filter('number'),'8decimals');} 1071break;case'Text':currentDisplay[property]=currentOBMessage[property];break;case'CurrencySymbol':currentDisplay[property]=displayCurrency.getSymbol(currentOBMessage[property]);break;case'Market':currentDisplay[property]=utilStatic.getNameForExchange(currentOBMessage[property]);break;}}} 1072currentOBMessage['QuantityTotal']=currentOBMessage['P']*currentOBMessage['Q'];if(parseInt(currentOBMessage['S'],16)&CCC.ORDER.SIDE.BID){currentDisplay['S']='BID';}else if(parseInt(currentOBMessage['S'],16)&CCC.ORDER.SIDE.ASK){currentDisplay['S']='ASK';} 1073if(parseInt(currentOBMessage['F'],16)&CCC.ORDER.FLAGS.CHANGE){currentDisplay['F']='CHANGE';currentDisplay['QT']=utilStatic.convertValueToDisplay(currentDisplay['TSYM'],currentOBMessage['QuantityTotal'],$filter('number'),'8decimals');}else if(parseInt(currentOBMessage['F'],16)&CCC.ORDER.FLAGS.REMOVE){currentDisplay['F']='REMOVE';}else if(parseInt(currentOBMessage['F'],16)&CCC.ORDER.FLAGS.ADD){currentDisplay['F']='ADD';currentDisplay['QT']=utilStatic.convertValueToDisplay(currentDisplay['TSYM'],currentOBMessage['QuantityTotal'],$filter('number'),'8decimals');} 1074currentOBMessage['ARRIVEDONTS']=new Date().getTime();currentOBMessage['HIGHLIGHT']=true;currentOBMessage['DISPLAY']=currentDisplay;} 1075orderBookInstance.getAllOrderBookKeysWithQueue=function(){var keysWithQueue=[];for(var orderBookKey in KEYS){if(KEYS[orderBookKey]['QUEUE'].length>0){keysWithQueue.push(orderBookKey);}} 1076return keysWithQueue;};orderBookInstance.getQueueSequanceMissmatchLength=function(orderBookKey){return KEYS[orderBookKey]['QUEUE'].length;};orderBookInstance.queueOrderSequenceMissmatch=function(orderBookKey,orderObject){KEYS[orderBookKey]['QUEUE'].push(orderObject);};orderBookInstance.getQueueItemSequenceMissmatch=function(orderBookKey){if(KEYS[orderBookKey]['QUEUE'].length>0){return KEYS[orderBookKey]['QUEUE'].pop();} 1077return null;};orderBookInstance.unpackFromAPI=function(orderBookPacked){var orderBookKey=orderBookPacked.M+'~'+orderBookPacked.FSYM+'~'+orderBookPacked.TSYM;var staticOrderBookKey='FROM_API';var obSequance=orderBookPacked.CCSEQ;var bidOrdersArray=orderBookPacked.BID;var askOrdersArray=orderBookPacked.ASK;orderBookInstance.resetOrderBookKeepQueue(staticOrderBookKey,obSequance);for(var indexOB=0,lengthOB=bidOrdersArray.length;indexOB<lengthOB;indexOB++){var orderObjectBid=CCC.ORDER.unpack(CCC.STATIC.TYPE.ORDERBOOK+'~'+orderBookKey+'~'+CCC.ORDER.SIDE.BID+'~'+CCC.ORDER.FLAGS.ADD+'~'+obSequance+'~'+bidOrdersArray[indexOB].P+'~'+bidOrdersArray[indexOB].Q);var objectKeyBid=CCC.ORDER.getObjectKey(orderObjectBid);KEYS[staticOrderBookKey][orderObjectBid.S].push(objectKeyBid);orderBookInstance.decorateDisplayProperties(orderObjectBid);DATA[staticOrderBookKey][objectKeyBid]=orderObjectBid;} 1078orderBookInstance.decorateAggregatedProperties(staticOrderBookKey,CCC.ORDER.SIDE.BID);for(var indexOA=0,lengthOA=askOrdersArray.length;indexOA<lengthOA;indexOA++){var orderObjectAsk=CCC.ORDER.unpack(CCC.STATIC.TYPE.ORDERBOOK+'~'+orderBookKey+'~'+CCC.ORDER.SIDE.ASK+'~'+CCC.ORDER.FLAGS.ADD+'~'+obSequance+'~'+askOrdersArray[indexOA].P+'~'+askOrdersArray[indexOA].Q);var objectKeyAsk=CCC.ORDER.getObjectKey(orderObjectAsk);
1078KEYS[staticOrderBookKey][orderObjectAsk.S].push(objectKeyAsk);orderBookInstance.decorateDisplayProperties(orderObjectAsk);DATA[staticOrderBookKey][objectKeyAsk]=orderObjectAsk;} 1079orderBookInstance.decorateAggregatedProperties(staticOrderBookKey,CCC.ORDER.SIDE.ASK);KEYS[staticOrderBookKey]['LOADING']=false;};orderBookInstance.unpack=function(orderBookPacked){var splitPosition=orderBookPacked.indexOf(':');var orderBookKeyAndSeq=orderBookPacked.substring((CCC.STATIC.TYPE.FULLORDERBOOK.length+1),splitPosition);var obkPosition=orderBookKeyAndSeq.indexOf('|');var orderBookKey=orderBookKeyAndSeq.substring(0,obkPosition);var obSequance=orderBookKeyAndSeq.substring(obkPosition+1);var orderBookBothOrderTypes=orderBookPacked.substring(splitPosition+1);var secSplitPosition=orderBookBothOrderTypes.indexOf(':');var bidOrdersArray=orderBookBothOrderTypes.substring(0,secSplitPosition).split(',');var askOrdersArray=orderBookBothOrderTypes.substring(secSplitPosition+1).split(',');orderBookInstance.resetOrderBookKeepQueue(orderBookKey,obSequance);for(var indexOB=0,lengthOB=bidOrdersArray.length;indexOB<lengthOB;indexOB++){var orderObjectBid=CCC.ORDER.unpack(CCC.STATIC.TYPE.ORDERBOOK+'~'+orderBookKey+'~'+CCC.ORDER.SIDE.BID+'~'+CCC.ORDER.FLAGS.ADD+'~'+obSequance+'~'+bidOrdersArray[indexOB]);var objectKeyBid=CCC.ORDER.getObjectKey(orderObjectBid);KEYS[orderBookKey][orderObjectBid.S].push(objectKeyBid);orderBookInstance.decorateDisplayProperties(orderObjectBid);DATA[orderBookKey][objectKeyBid]=orderObjectBid;} 1080orderBookInstance.decorateAggregatedProperties(orderBookKey,CCC.ORDER.SIDE.BID);for(var indexOA=0,lengthOA=askOrdersArray.length;indexOA<lengthOA;indexOA++){var orderObjectAsk=CCC.ORDER.unpack(CCC.STATIC.TYPE.ORDERBOOK+'~'+orderBookKey+'~'+CCC.ORDER.SIDE.ASK+'~'+CCC.ORDER.FLAGS.ADD+'~'+obSequance+'~'+askOrdersArray[indexOA]);var objectKeyAsk=CCC.ORDER.getObjectKey(orderObjectAsk);KEYS[orderBookKey][orderObjectAsk.S].push(objectKeyAsk);orderBookInstance.decorateDisplayProperties(orderObjectAsk);DATA[orderBookKey][objectKeyAsk]=orderObjectAsk;} 1081orderBookInstance.decorateAggregatedProperties(orderBookKey,CCC.ORDER.SIDE.ASK);orderBookInstance.finishedLoading(orderBookKey);};orderBookInstance.getKeyFromPacked=function(orderBookPacked){var splitPosition=orderBookPacked.indexOf(':');var orderBookKeyAndSeq=orderBookPacked.substring((CCC.STATIC.TYPE.FULLORDERBOOK.length+1),splitPosition);var obkPosition=orderBookKeyAndSeq.indexOf('|');return orderBookKeyAndSeq.substring(0,obkPosition);};orderBookInstance.handleOrder=function(orderObject){if(orderObject.T!=CCC.STATIC.TYPE.ORDERBOOK){return false;} 1082var orderBookKey=CCC.ORDER.getOrderBookKey(orderObject);var objectKey=CCC.ORDER.getObjectKey(orderObject);var inserted=false,removed=false,changed=false;if(KEYS[orderBookKey].SEQUENCE>orderObject.SEQ){orderObject.F=CCC.ORDER.FLAGS.NOACTION;return false;} 1083KEYS[orderBookKey].SEQUENCE=orderObject.SEQ;if(orderObject.F==CCC.ORDER.FLAGS.NOACTION){return false;} 1084switch(orderObject.F){case CCC.ORDER.FLAGS.ADD:var sideLength=KEYS[orderBookKey][orderObject.S].length;DATA[orderBookKey][objectKey]=orderObject;if(sideLength==0){KEYS[orderBookKey][orderObject.S].push(objectKey);inserted=true;}else{var currentItemKey;var insertPositionBid=0,insertPositionAsk=0;if(orderObject.S==CCC.ORDER.SIDE.BID){while(insertPositionBid<sideLength&&!inserted){currentItemKey=KEYS[orderBookKey][orderObject.S][insertPositionBid];if(orderObject.P>DATA[orderBookKey][currentItemKey].P){KEYS[orderBookKey][orderObject.S].splice(insertPositionBid,0,objectKey);inserted=true;} 1085insertPositionBid++;}}else{while(insertPositionAsk<sideLength&&!inserted){currentItemKey=KEYS[orderBookKey][orderObject.S][insertPositionAsk];if(orderObject.P<DATA[orderBookKey][currentItemKey].P){KEYS[orderBookKey][orderObject.S].splice(insertPositionAsk,0,objectKey);inserted=true;} 1086insertPositionAsk++;}} 1087if(!inserted){KEYS[orderBookKey][orderObject.S].push(objectKey);}} 1088break;case CCC.ORDER.FLAGS.REMOVE:var sidePosition=KEYS[orderBookKey][orderObject.S].indexOf(objectKey);if(sidePosition>-1){KEYS[orderBookKey][orderObject.S].splice(sidePosition,1);delete DATA[orderBookKey][objectKey];removed=true;} 1089break;case CCC.ORDER.FLAGS.CHANGE:var orderExists=KEYS[orderBookKey][orderObject.S].indexOf(objectKey);if(orderExists>-1){DATA[orderBookKey][objectKey]=orderObject;changed=true;} 1090break;} 1091var action=inserted||removed||changed;return action;};return orderBookInstance;}]); 1092;;;
1092angular.module('ccc-app').factory('auth0',function($q,$http,$window,$rootScope,$timeout,$location,$browser,toastNotifications){const AUTH0_CONFIG={domain:CCC.auth0Domain,clientId:CCC.auth0ClientId,redirectUri:window.location.origin+'/auth0',scope:'openid profile email offline_access',audience:undefined};var LSK={AT:'cc_at',IDT:'cc_idt',RT:'cc_rt',EXP:'cc_exp'};var SS=$window.sessionStorage,LS=$window.localStorage;function randomString(len){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r="",a=new Uint8Array(len||43);crypto.getRandomValues(a);for(var i=0;i<a.length;i++)r+=c[a[i]%c.length];return r;} 1093function sha256(s){var e=new TextEncoder().encode(s);return crypto.subtle.digest("SHA-256",e).then(function(b){return new Uint8Array(b);});} 1094function b64u(buf){var s=btoa(String.fromCharCode.apply(null,buf));return s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");} 1095function pkceChallenge(ver){return sha256(ver).then(b64u);} 1096function setTokens(t){if(t.access_token)LS.setItem(LSK.AT,t.access_token);if(t.id_token)LS.setItem(LSK.IDT,t.id_token);if(t.refresh_token)LS.setItem(LSK.RT,t.refresh_token);if(t.expires_in)LS.setItem(LSK.EXP,(Date.now()+t.expires_in*1000).toString());$rootScope.$broadcast('auth:changed',{isAuthenticated:!!t.access_token,user:service.getUser()});} 1097function clearTokens(localOnly,isError){[LSK.AT,LSK.IDT,LSK.RT,LSK.EXP].forEach(LS.removeItem.bind(LS));$rootScope.$broadcast('auth:changed',{isAuthenticated:false,user:null});if(localOnly)return;SS.setItem('oauth_return_to',$window.location.pathname+$window.location.search+$window.location.hash);var p=new URLSearchParams({client_id:AUTH0_CONFIG.clientId,returnTo:AUTH0_CONFIG.redirectUri+(isError?'?login_error=true':'')});$window.location.assign("https://"+AUTH0_CONFIG.domain+"/v2/logout?"+p.toString());} 1098var service={login:function(mode){var state=randomString(),verifier=randomString(64);SS.setItem("oauth_state",state);SS.setItem("pkce_verifier",verifier);SS.setItem('oauth_return_to',$window.location.pathname+$window.location.search+$window.location.hash);return pkceChallenge(verifier).then(function(ch){var qp=new URLSearchParams({response_type:"code",client_id:AUTH0_CONFIG.clientId,redirect_uri:AUTH0_CONFIG.redirectUri,scope:AUTH0_CONFIG.scope,state:state,code_challenge:ch,code_challenge_method:"S256"});if(AUTH0_CONFIG.audience)qp.set("audience",AUTH0_CONFIG.audience);if(mode==='signup')qp.set("screen_hint","signup");$window.location.assign("https://"+AUTH0_CONFIG.domain+"/authorize?"+qp.toString());});},verifyWithAuth0:function(){return this.getToken().then(function(token){if(!token)return $q.resolve(false);return $http.get('https://'+AUTH0_CONFIG.domain+'/userinfo',{headers:{Authorization:'Bearer '+token}}).then(function(){return true;},function(){return false;});});},reauthPassword:function(email,mfaId){var state=randomString(),verifier=randomString(64);SS.setItem('oauth_state',state);SS.setItem('pkce_verifier',verifier);SS.setItem('oauth_return_to',$window.location.pathname+$window.location.search+$window.location.hash);return pkceChallenge(verifier).then(function(ch){var cb=new URL(AUTH0_CONFIG.redirectUri,$window.location.origin);cb.searchParams.set('disable_mfa','true');if(mfaId!=null)cb.searchParams.set('mfa_id',String(mfaId));var qp=new URLSearchParams({response_type:'code',client_id:AUTH0_CONFIG.clientId,redirect_uri:cb.toString(),scope:AUTH0_CONFIG.scope,state:state,code_challenge:ch,code_challenge_method:'S256',prompt:'login',max_age:'0'});if(email)qp.set('login_hint',email);$window.location.assign('https://'+AUTH0_CONFIG.domain+'/authorize?'+qp.toString());});},handleRedirectIfPresent:function(){var url=new URL($window.location.href);const loginError=url.searchParams.get("login_error") 1099if(loginError){toastNotifications.addNotification('error','Unable to login at this time, please contact [email protected]');return $q.resolve(null);} 1100var code=SS.getItem('oauth_return_code');var state=SS.getItem('oauth_return_state');if(!code||!state)return $q.resolve(null);var expected=SS.getItem("oauth_state"),verifier=SS.getItem("pkce_verifier");if(!expected||expected!==state||!verifier)return $q.reject("state/verifier mismatch");var body=new URLSearchParams({grant_type:"authorization_code",client_id:AUTH0_CONFIG.clientId,code_verifier:verifier,code:code,redirect_uri:AUTH0_CONFIG.redirectUri}).toString();return $http({method:'POST',url:"https://"+AUTH0_CONFIG.domain+"/oauth/token",headers:{'Content-Type':'application/x-www-form-urlencoded'},data:body}).then(function(resp){setTokens(resp.data||{});SS.removeItem('oauth_return_code') 1101SS.removeItem('oauth_return_state') 1102SS.removeItem("pkce_verifier");SS.removeItem("oauth_state");return $q(function(resolve){$timeout(function(){$location.replace();var params=angular.copy($location.search());delete params.code;delete params.state;delete params.iss;$location.search(params);resolve(LS.getItem(LSK.AT)||null);},0,false);});},function(err){return $q.reject(err);});}
1102,getToken:function(){var at=LS.getItem(LSK.AT),exp=parseInt(LS.getItem(LSK.EXP)||"0",10);if(at&&Date.now()<exp-60000)return $q.resolve(at);var rt=LS.getItem(LSK.RT);if(!rt)return $q.resolve(null);var body=new URLSearchParams({grant_type:"refresh_token",client_id:AUTH0_CONFIG.clientId,refresh_token:rt}).toString();return $http({method:'POST',url:"https://"+AUTH0_CONFIG.domain+"/oauth/token",headers:{'Content-Type':'application/x-www-form-urlencoded'},data:body}).then(function(resp){setTokens(resp.data||{});return LS.getItem(LSK.AT)||null;},function(){clearTokens(true);return $q.resolve(null);});},silentCheckSSO:function(){var state=randomString();var verifier=randomString(64);SS.setItem('oauth_state_silent',state);SS.setItem('pkce_verifier_silent',verifier);return pkceChallenge(verifier).then(function(challenge){var p=new URLSearchParams({response_type:'code',client_id:AUTH0_CONFIG.clientId,redirect_uri:window.location.origin+'/auth0',scope:AUTH0_CONFIG.scope,state:state,code_challenge:challenge,code_challenge_method:'S256',prompt:'none'});var authorizeUrl='https://'+AUTH0_CONFIG.domain+'/authorize?'+p.toString();return $q(function(resolve){function onMsg(ev){if(ev.origin!==window.location.origin)return;if(!ev.data||ev.data.type!=='auth0:silent-result')return;window.removeEventListener('message',onMsg);if(frame&&frame.parentNode)frame.parentNode.removeChild(frame);var d=ev.data.data;if(d&&d.code&&d.state===SS.getItem('oauth_state_silent')){var body=new URLSearchParams({grant_type:'authorization_code',client_id:AUTH0_CONFIG.clientId,code_verifier:SS.getItem('pkce_verifier_silent'),code:d.code,redirect_uri:window.location.origin+'/auth0'}).toString();$http({method:'POST',url:'https://'+AUTH0_CONFIG.domain+'/oauth/token',headers:{'Content-Type':'application/x-www-form-urlencoded'},data:body}).then(function(resp){setTokens(resp.data||{});SS.removeItem('oauth_state_silent');SS.removeItem('pkce_verifier_silent');resolve(LS.getItem(LSK.AT)||null);},function(){SS.removeItem('oauth_state_silent');SS.removeItem('pkce_verifier_silent');resolve(false);});}else{SS.removeItem('oauth_state_silent');SS.removeItem('pkce_verifier_silent');resolve(false);}} 1103window.addEventListener('message',onMsg);var frame=document.createElement('iframe');frame.style.display='none';frame.src=authorizeUrl;document.body.appendChild(frame);});});},logout:function(localOnly,isError){clearTokens(!!localOnly,isError);},getUser:function(){var jwt=LS.getItem(LSK.IDT);if(!jwt)return null;try{return JSON.parse($window.atob(jwt.split(".")[1]));}catch(e){return null;}}};return service;}); 1104;;;angular.module('ccc-app').factory('listsBehaviour',['$location','$filter','$http',function listsBehaviourFactory($location,$filter,$http){var utilStatic=CCC.STATIC.UTIL;var acceptedTabs=[];var defaultFilter={};var hasDefaultFilter=false;var addToUrl=true;var filterTypes=[];var sorters=[];var currentSorter;var viewStepSize=30;var isLoading=false;var currentViewSize=viewStepSize;var allData=[];var commonTabData={};var filteredData=[];var filters=[];var auxData={};var increaseTabSize=function(tabIndex,dataIndex){if(acceptedTabs[tabIndex].FilterField=="NoFilter"){acceptedTabs[tabIndex].Size++;}else{if(acceptedTabs[tabIndex].FilterValue=="ArrayHasData"){if(allData[dataIndex][acceptedTabs[tabIndex].FilterField].length>0){acceptedTabs[tabIndex].Size++;}}else if(acceptedTabs[tabIndex].FilterValue=="ArrayHasExactData"){if(allData[dataIndex][acceptedTabs[tabIndex].FilterField].indexOf(acceptedTabs[tabIndex].ArrayValue)!==-1){acceptedTabs[tabIndex].Size++;}} 1105else if(acceptedTabs[tabIndex].FilterValue=="SpecialFilter"){if(acceptedTabs[tabIndex].SpecialFilter(allData[dataIndex])){acceptedTabs[tabIndex].Size++;}}else{if(allData[dataIndex][acceptedTabs[tabIndex].FilterField]==acceptedTabs[tabIndex].FilterValue){acceptedTabs[tabIndex].Size++;}}}} 1106var calculateTabSizes=function(){var tabsLength=acceptedTabs.length;var currentTabIndex=tabPosition(filters[0].value);var currentTab=acceptedTabs[currentTabIndex];for(var i=0;i<tabsLength;i++){acceptedTabs[i].Size=0} 1107for(var i=0,length=allData.length;i<length;i++){if(currentTab["OnlyCurrentSize"]){increaseTabSize(currentTabIndex,i);}else{for(var j=0;j<tabsLength;j++){increaseTabSize(j,i);}}}};var tabPosition=function(tabName){for(var i=0,length=acceptedTabs.length;i<length;i++){if(acceptedTabs[i].Id==tabName){return i;}} 1108return-1;};var filterTypePosition=function(filterField){for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].FilterField==filterField){return i;}} 1109return-1;};var filterPosition=function(newFilter){for(var i=0,length=filters.length;i<length;i++){if(filters[i].type==newFilter.type&&filters[i].value==newFilter.value){return i;}} 1110return-1;};var applyTabFilter=function(filterName){var tempDisplay=[];var tab=acceptedTabs[tabPosition(filterName)];if(tab.FilterField=="NoFilter"){return allData;} 1111for(var i=0,length=allData.length;i<length;i++){if(tab.FilterValue=="ArrayHasData"){if(allData[i][tab.FilterField].length>0){tempDisplay.push(allData[i]);}}else if(tab.FilterValue=="ArrayHasExactData"){if(allData[i][tab.FilterField].indexOf(tab.ArrayValue)!==-1){tempDisplay.push(allData[i]);}}else if(tab.FilterValue=="SpecialFilter"){if(tab.SpecialFilter(allData[i])){tempDisplay.push(allData[i]);}}else{if(allData[i][tab.FilterField]==tab.FilterValue){tempDisplay.push(allData[i]);}}} 1112return tempDisplay;};var generateFilterOptions=function(){for(var i=0,length=filterTypes.length;i<length;i++){filterTypes[i].Options={};} 1113for(var i=0,length=filteredData.length;i<length;i++){addToFilterOptions(filteredData[i]);}};var generateFilterOptionsArray=function(){for(var i=0,length=filterTypes.length;i<length;i++){filterTypes[i].OptionsArray=[];for(var optionName in filterTypes[i].Options){filterTypes[i].OptionsArray.push({'Key':optionName,'Value':filterTypes[i].Options[optionName]});} 1114filterTypes[i].OptionsArray.sort(function(a,b){return b.Value-a.Value});}};var addFilter=function(filterToAdd){if(filterToAdd.type=="Tab"){filteredData=applyTabFilter(filterToAdd.value);return;} 1115if(filterToAdd.type=="Default"){var tempData=filteredData;filteredData=defaultFilter.FilterToRun(tempData);acceptedTabs[tabPosition(filters[0].value)].Size=filteredData.length;return;} 1116var currentFilterType=filterTypes[filterTypePosition(filterToAdd.type)];switch(currentFilterType.Type){case"FieldValue":var tempFilteredData=[];for(var i=0,length=filteredData.length;i<length;i++){if(filteredData[i][filterToAdd.type]==filterToAdd.value){tempFilteredData.push(filteredData[i]);}} 1117filteredData=tempFilteredData;break;case"ArrayValue":var tempFilteredData=[];for(var i=0,length=filteredData.length;i<length;i++){if(filteredData[i][filterToAdd.type].indexOf(filterToAdd.value)>-1){tempFilteredData.push(filteredData[i]);}} 1118filteredData=tempFilteredData;break;case"SpecialFilter":filteredData=currentFilterType.SpecialFilter(filteredData,filterToAdd);break;case"MoreThanOrEqual":var tempFilteredData=[];for(var i=0,length=filteredData.length;i<length;i++){if(filteredData[i][filterToAdd.type]>=filterToAdd.value){tempFilteredData.push(filteredData[i]);}} 1119filteredData=tempFilteredData;break;case"LessThanOrEqual":var tempFilteredData=[];for(var i=0,length=filteredData.length;i<length;i++){if(filteredData[i][filterToAdd.type]<=filterToAdd.value){tempFilteredData.push(filteredData[i]);}} 1120filteredData=tempFilteredData;break;}};var resetViewSizeAndLength=function(){var filteredDataLength=filteredData.length;if(viewStepSize<filteredDataLength){currentViewSize=viewStepSize;}else{currentViewSize=filteredDataLength;} 1121acceptedTabs[tabPosition(filters[0].value)].Size=filteredDataLength;};var applyFilters=function(filtersToApply){for(var i=0,length=filtersToApply.length;i<length;i++){addFilter(filtersToApply[i]);} 1122applySort(filteredData);generateFilterOptions();generateFilterOptionsArray();resetViewSizeAndLength();};var addToFilterOptions=function(item){var currentTabId=filters[0]['value'];for(var i=0,length=filterTypes.length;i<length;i++){var currentFilter=filterTypes[i];if(currentFilter.DisplayOn.indexOf(currentTabId)>-1){switch(currentFilter.Type){case"FieldValue":if(item[currentFilter.FilterField]){var itemValue=item[currentFilter.FilterField];if(currentFilter.Options.hasOwnProperty(itemValue)){currentFilter.Options[itemValue]++;}else{currentFilter.Options[itemValue]=1;}} 1123break;case"ArrayValue":for(var j=0,lengthArray=item[currentFilter.FilterField].length;j<lengthArray;j++){if(currentFilter.Options.hasOwnProperty(item[currentFilter.FilterField][j])){currentFilter.Options[item[currentFilter.FilterField][j]]++;}else{currentFilter.Options[item[currentFilter.FilterField][j]]=1;}} 1124break;case"SpecialFilter":currentFilter.SpecialFilterOptions(item,currentFilter);break;}}}};var applySort=function(dataToSort){var primaryField=currentSorter.PrimaryField;var secondaryField=currentSorter.SecondaryField||"";var secondaryType=currentSorter.SecondaryType||"Numeric";var excludeField=currentSorter.ExcludeField||"";var keepSponsoredFirst=currentSorter.KeepSponsoredFirst||false;currentSorter.Applied=true;dataToSort.sort(function(a,b){var aData=a;var bData=b;var excludedAData=a;var excludedBData=b;if(currentSorter.IsObject){aData=a[currentSorter.ObjectName];bData=b[currentSorter.ObjectName];} 1125if(currentSorter.IsObjectExcluded){excludedAData=a[currentSorter.ExcludedObjectName];excludedBData=b[currentSorter.ExcludedObjectName];} 1126if(currentSorter.Type=='Numeric'){var aDataPrimaryField;var bDataPrimaryField;if(!aData||!aData.hasOwnProperty(primaryField)){aDataPrimaryField=0}else{aDataPrimaryField=parseFloat(aData[primaryField]);} 1127if(!bData||!bData.hasOwnProperty(primaryField)){bDataPrimaryField=0}else{bDataPrimaryField=parseFloat(bData[primaryField]);} 1128if(currentSorter.IsAscending){if(excludeField!=""){if(excludedAData[excludeField]==currentSorter.ExcludeFieldValue){return 1;} 1129if(excludedBData[excludeField]==currentSorter.ExcludeFieldValue){return-1;}} 1130var valueToReturn=aDataPrimaryField-bDataPrimaryField;if(valueToReturn==0&&secondaryField.length>0){if(secondaryType=='Numeric'){var aDataSecondaryField;var bDataSecondaryField;if(!aData.hasOwnProperty(secondaryField)){aDataSecondaryField=0}else{aDataSecondaryField=parseFloat(aData[secondaryField]);} 1131if(!bData.hasOwnProperty(secondaryField)){bDataSecondaryField=0}else{bDataSecondaryField=parseFloat(bData[secondaryField]);} 1132return aDataSecondaryField-bDataSecondaryField;}else{var aDataSecondaryField=aData[secondaryField]||"";var bDataSecondaryField=bData[secondaryField]||"";if(aDataSecondaryField<bDataSecondaryField){return-1;} 1133if(aDataSecondaryField>bDataSecondaryField){return 1;} 1134return 0;}} 1135return valueToReturn;}else{if(excludeField!=""){if(excludedAData[excludeField]==currentSorter.ExcludeFieldValue){return 1;} 1136if(excludedBData[excludeField]==currentSorter.ExcludeFieldValue){return-1;}} 1137var valueToReturn=bDataPrimaryField-aDataPrimaryField;if(valueToReturn==0&&secondaryField.length>0){if(secondaryType=='Numeric'){var aDataSecondaryField;var bDataSecondaryField;if(!aData||!aData.hasOwnProperty(secondaryField)){aDataSecondaryField=0}else{aDataSecondaryField=parseFloat(aData[secondaryField]);} 1138if(!bData||!bData.hasOwnProperty(secondaryField)){bDataSecondaryField=0}else{bDataSecondaryField=parseFloat(bData[secondaryField]);} 1139return bDataSecondaryField-aDataSecondaryField;}else{var aDataSecondaryField=aData[secondaryField]||"";var bDataSecondaryField=bData[secondaryField]||"";if(aDataSecondaryField<bDataSecondaryField){return-1;} 1140if(aDataSecondaryField>bDataSecondaryField){return 1;} 1141return 0;}} 1142return valueToReturn;}}else{var aDataPrimaryField=aData[primaryField];var bDataPrimaryField=bData[primaryField];if(aDataPrimaryField<bDataPrimaryField){if(currentSorter.IsAscending){return-1;}else{return 1;}} 1143if(aDataPrimaryField>bDataPrimaryField){if(currentSorter.IsAscending){return 1;}else{return-1;}}} 1144return 0;});for(var iDTS=0,lDTS=dataToSort.length;iDTS<lDTS;iDTS++){dataToSort[iDTS].Rank=iDTS+1;} 1145if(keepSponsoredFirst){dataToSort.sort(function(a,b){if(a['Sponsored']===true&&b['Sponsored']===true){return a.Rank-b.Rank;} 1146if(a['Sponsored']===true){return-1;} 1147if(b['Sponsored']===true){return 1;} 1148return a.Rank-b.Rank;});}} 1149return{setDefaultFilter:function(filter){defaultFilter=filter;hasDefaultFilter=true;},setInitData:function(initialData){allData=initialData.Data;},setInitPortfolioData:function(initialData){allData=initialData.Data;var totalImagesToShow=3;for(var i=0,length=allData.length;i<length;
1149i++){allData[i].DisplayTotalViews=utilStatic.convertValueToDisplay('',allData[i].TotalViews,$filter('number'),'short',true);allData[i].TotalCoins=allData[i].Members.length;allData[i].TotalSoldCoins=allData[i].SoldMembers.length;allData[i].CoinHolding=[];allData[i].SoldCoins=[];allData[i].DisplayMembers=[];allData[i].DisplaySoldMembers=[];for(var iMembers=0;iMembers<allData[i].TotalCoins;iMembers++){var symbol=allData[i].Members[iMembers].Coin.Symbol;if(allData[i].CoinHolding.indexOf(symbol)===-1){allData[i].CoinHolding.push(symbol);if(allData[i].DisplayMembers.length<totalImagesToShow){allData[i].DisplayMembers.push(allData[i].Members[iMembers].Coin);}}} 1150for(var iSoldMembers=0;iSoldMembers<allData[i].TotalSoldCoins;iSoldMembers++){var symbol=allData[i].SoldMembers[iSoldMembers].Coin.Symbol;if(allData[i].SoldCoins.indexOf(symbol)===-1){allData[i].SoldCoins.push(symbol);if(allData[i].DisplaySoldMembers.length<totalImagesToShow){allData[i].DisplaySoldMembers.push(allData[i].SoldMembers[iSoldMembers].Coin);}}} 1151allData[i].TotalCoins=allData[i].CoinHolding.length;
1151allData[i].TotalSoldCoins=allData[i].SoldCoins.length;};applyFilters(filters);},addMiningToInitData:function(miningDataToAdd){for(var id in miningDataToAdd){allData.push(miningDataToAdd[id]);}},addWalletsToInitData:function(walletData){for(var id in walletData){allData.push(walletData[id]);}},addGamblingToInitData:function(gamblingData){for(var id in gamblingData){allData.push(gamblingData[id]);}},resetAllData:function(){allData=[];},addToAllData:function(streamObject){var objectToAdd=streamObject;objectToAdd.CommonData=commonTabData[objectToAdd.DATA.FROMSYMBOL];objectToAdd.Sponsored=commonTabData[objectToAdd.DATA.FROMSYMBOL].Sponsored;allData.push(objectToAdd);},updateFieldData:function(index,updateField,updatedObject){allData[index][updateField]=updatedObject;},setCommonTabData:function(apiResponse){commonTabData=apiResponse.Data;},setAddToUrl:function(value){addToUrl=value;},setICOTabData:function(apiResponse){allData=[];commonTabData=apiResponse.Data;for(var key in commonTabData){var dataObj={};var displayObj={};var coin=commonTabData[key];coin.Symbol=key;var coinsOffered=0;var percent=parseFloat(coin.ICOTokenPercentageForInvestors);var tokens=parseInt(coin.ICOTokenSupply);if(isNaN(percent)||percent==0||isNaN(tokens)||tokens==0){dataObj.ICOCOINSOFFERED=0;displayObj.ICOCOINSOFFERED="-";}else{var offered=percent/100*tokens;dataObj.ICOCOINSOFFERED=offered;displayObj.ICOCOINSOFFERED=utilStatic.convertValueToDisplay("",offered,$filter('number'),'short');displayObj.ICOCOINSOFFERED+=" ("+utilStatic.convertValueToDisplay("",coin.ICOTokenPercentageForInvestors,$filter('number'),'short')+"%)";} 1152coin.ICOStartPrice=parseFloat(coin.ICOStartPrice);if(isNaN(coin.ICOStartPrice)){dataObj.ICOSTARTPRICE=0;displayObj.ICOSTARTPRICE="-";}else if(coin.ICOStartPriceCurrency=="USD"){dataObj.ICOSTARTPRICE=coin.ICOStartPrice;displayObj.ICOSTARTPRICE=utilStatic.convertValueToDisplay('$',coin.ICOStartPrice,$filter('number'));} 1153if(!isNaN(coin.ICOFundsRaisedUSD)&&!isNaN(dataObj.ICOCOINSOFFERED)&&coin.ICOFundsRaisedUSD>0&&dataObj.ICOCOINSOFFERED>0){var averagePrice=coin.ICOFundsRaisedUSD/dataObj.ICOCOINSOFFERED;dataObj.ICOPRICE=averagePrice;displayObj.ICOPRICE=utilStatic.convertValueToDisplay('$',averagePrice,$filter('number'));}else{dataObj.ICOPRICE=0;displayObj.ICOPRICE="-";} 1154if(isNaN(coin.ICOFundsRaisedUSD)||coin.ICOFundsRaisedUSD==0){dataObj.ICOFUNDSRAISEDUSD=0;displayObj.ICOFUNDSRAISEDUSD="-";}else{dataObj.ICOFUNDSRAISEDUSD=coin.ICOFundsRaisedUSD;displayObj.ICOFUNDSRAISEDUSD=utilStatic.convertValueToDisplay('$',coin.ICOFundsRaisedUSD,$filter('number'),'short');} 1155dataObj.CHANGEPCT24HOUR=0;displayObj.CHANGEPCT24HOUR="-";dataObj.CHANGE24HOUR=0;displayObj.CHANGE24HOUR="-";allData.push({CommonData:commonTabData[key],Coin:{},DATA:dataObj,DISPLAY:displayObj,Subs:[],VISUAL:{},AllSubsLoaded:false,Sponsored:commonTabData[key].Sponsored});}},addBlockExporerToCommonTabData:function(apiResponse){var blockExporerData=apiResponse['Data'];for(var symbol in blockExporerData){if(commonTabData.hasOwnProperty(symbol)){for(var blockExplorerProperty in blockExporerData[symbol]){if(blockExplorerProperty=="TotalCoinsMined"){if(commonTabData[symbol].PreMinedValue!="N/A"){commonTabData[symbol][blockExplorerProperty]=parseFloat(blockExporerData[symbol][blockExplorerProperty])-parseFloat(commonTabData[symbol].PreMinedValue);}else{commonTabData[symbol][blockExplorerProperty]=blockExporerData[symbol][blockExplorerProperty];}}else{commonTabData[symbol][blockExplorerProperty]=blockExporerData[symbol][blockExplorerProperty];}}}}},getCommonTabDataField:function(key,field,fieldType){if(commonTabData.hasOwnProperty(key)){if(commonTabData[key].hasOwnProperty(field)){return commonTabData[key][field];}} 1156if(fieldType=='Number'){return 0;}else{return'-';}},hasCommonTabKey:function(key){return commonTabData.hasOwnProperty(key);},addTotalPosts:function(apiResponse){var totalPostsData=apiResponse['Total'];for(var i=0,length=allData.length;i<length;i++){allData[i]["Total"]=totalPostsData[allData[i]['Id']];};applySort(allData);},addReviews:function(apiResponse){var reviewData=apiResponse['Ratings'];for(var i=0,length=allData.length;i<length;
1156i++){allData[i]["Rating"]=reviewData[allData[i]['Id']];};applySort(allData);},setLatestPostsData:function(latestPosts){var latestData=latestPosts.PostArray;for(var i=0,length=latestData.length;i<length;i++){latestData[i]['ItemType']="LatestPost";allData.push(latestData[i]);}},addPostStats:function(apiResponse){var statsData=apiResponse['Stats'];for(var i=0,length=allData.length;i<length;i++){if(statsData[allData[i]['Id']]){allData[i]["TotalActiviy"]=statsData[allData[i]['Id']].TotalActivity;allData[i]["LatestActiviy"]=statsData[allData[i]['Id']].LatestPost;allData[i]["PostTotal"]=statsData[allData[i]['Id']].PostTotal;allData[i]["DisplayPostTotal"]=utilStatic.convertValueToDisplay('',allData[i]["PostTotal"],$filter('number'),'short',true);allData[i]["CommentTotal"]=statsData[allData[i]['Id']].CommentTotal;allData[i]["DisplayCommentTotal"]=utilStatic.convertValueToDisplay('',allData[i]["CommentTotal"],$filter('number'),'short',true);allData[i]["Cryptopian"]=statsData[allData[i]['Id']].Cryptopian;allData[i]["PostBody"]=statsData[allData[i]['Id']].PostBody;allData[i]["ReplyTo"]=statsData[allData[i]['Id']].ReplyTo;allData[i]["IdForLinkItem"]=statsData[allData[i]['Id']].IdForLinkItem;}else{allData[i]["TotalActiviy"]=0;allData[i]["LatestActiviy"]=0;allData[i]["PostTotal"]=0;allData[i]["DisplayPostTotal"]=0;allData[i]["CommentTotal"]=0;allData[i]["DisplayCommentTotal"]=0;allData[i]["Cryptopian"]={'cId':'','cName':'','cAvatarUrl':''};allData[i]["PostBody"]="";allData[i]["ReplyTo"]=0;}};applySort(allData);},addTotalViews:function(apiResponse){var viewsData=apiResponse['Views'];for(var i=0,length=allData.length;i<length;i++){if(viewsData[allData[i]['Id']]){allData[i]["TotalViews"]=viewsData[allData[i]['Id']];allData[i]["DisplayTotalViews"]=utilStatic.convertValueToDisplay('',allData[i]["TotalViews"],$filter('number'),'short',true);}else{if(!allData[i]["TotalViews"]){allData[i]["TotalViews"]=0;allData[i]["DisplayTotalViews"]=0;}}};},setAcceptedTabs:function(tabsArray){acceptedTabs=tabsArray;},setFilterTypes:function(filterTypesArray){filterTypes=filterTypesArray;},setSorters:function(sortersArray){var defaultSorterSet=false;sorters=sortersArray;for(var i=0,length=sorters.length;i<length;i++){if(sorters[i].Applied==true){currentSorter=sorters[i];defaultSorterSet=true;}} 1157if(!defaultSorterSet){currentSorter=sorters[0];}},setViewStepSize:function(size){viewStepSize=size;currentViewSize=size;},getViewSize:function(size){return currentViewSize;},getTabs:function(){return acceptedTabs;},getAllData:function(){return allData;},getFiltered:function(){return filteredData.slice(0,currentViewSize);},getAllFiltered:function(){return filteredData;},getSorters:function(){return sorters;},getSorterOptions:function(index){return sorters[index];},getButtonFiltersForCurrentView:function(){var filterTypesForCurrentView=[];var currentTabId=this.getTabName();for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].DisplayType=='Buttons'&&filterTypes[i].DisplayOn.indexOf(currentTabId)>-1){filterTypesForCurrentView.push(filterTypes[i]);}}
1157;return filterTypesForCurrentView;},getDropdownFiltersForCurrentView:function(){var filterTypesForCurrentView=[];var currentTabId=this.getTabName();for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].DisplayType=='Dropdown'&&filterTypes[i].DisplayOn.indexOf(currentTabId)>-1){filterTypesForCurrentView.push(filterTypes[i]);}};return filterTypesForCurrentView;},getDatePickerFiltersForCurrentView:function(){var filterTypesForCurrentView=[];var currentTabId=this.getTabName();for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].DisplayType=='DatePicker'&&filterTypes[i].DisplayOn.indexOf(currentTabId)>-1){filterTypesForCurrentView.push(filterTypes[i]);}};return filterTypesForCurrentView;},getAllFiltersForCurrentView:function(){var filterTypesForCurrentView=[];var currentTabId=this.getTabName();for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].DisplayOn.indexOf(currentTabId)>-1){filterTypesForCurrentView.push(filterTypes[i]);}};return filterTypesForCurrentView;},getFilterPositionInCurrentView:function(filterField){var currentTabId=this.getTabName();var position=0;for(var i=0,length=filterTypes.length;i<length;i++){if(filterTypes[i].DisplayOn.indexOf(currentTabId)>-1){if(filterTypes[i].FilterField==filterField){return position;};position++;}};return position;},getTabName:function(){if(filters.length) 1158return filters[0].value;return acceptedTabs[0].Id;},getTabPosition:function(){if(filters.length) 1159return tabPosition(filters[0].value);return-1;},getTabObject:function(id){for(var i=0,length=acceptedTabs.length;i<length;i++){if(acceptedTabs[i].Id==id){return acceptedTabs[i];}} 1160return{};},hasData:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];return Object.keys(currentFilter.Options).length>0;},getFilterOptions:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];return currentFilter.Options;},getFilterOptionsArray:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];return currentFilter.OptionsArray;},getFilterTypesArray:function(){return filterTypes;},hasFilterFilters:function(){if(hasDefaultFilter){return filters.length>2;}else{return filters.length>1;}},isApplied:function(filterField,filterValue){return filterPosition({"type":filterField,'value':filterValue})>-1;},getSelectedText:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];var selectedText=currentFilter.DisplayName+': ';var filterKeys=Object.keys(currentFilter.Options);if(filterKeys.length==1){selectedText+=filterKeys[0]+', ';}else{for(var i=0,length=filters.length;i<length;i++){if(filters[i].type==currentFilter.FilterType){selectedText+=filters[i].value+', ';}}} 1161selectedText=selectedText.slice(0,-2);if(selectedText.length>38){selectedText=selectedText.substring(0,35)+'...';} 1162return selectedText;},showDropdown:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];return Object.keys(currentFilter.Options).length>1;},filterBy:function(filterField,filterValue){var newFilter={"type":filterField,'value':filterValue};var newFilterPos=filterPosition(newFilter);var newFilterPositionInView=this.getFilterPositionInCurrentView(filterField);if(newFilterPos==-1){if(addToUrl){$location.search('f'+newFilterPositionInView,filterValue);} 1163filters.push(newFilter);applyFilters([newFilter]);}else{filters.splice(newFilterPos,1);if(addToUrl){$location.search('f'+newFilterPositionInView,null);} 1164applyFilters(filters);};},removeFilterBySingle:function(filterField){var currentFilter=filterTypes[filterTypePosition(filterField)];var filterKeys=Object.keys(currentFilter.Options);if(filterKeys.length!=1){return false;} 1165var newFilter={"type":currentFilter.FilterField,'value':filterKeys[0]};var newFilterPos=filterPosition(newFilter);if(newFilterPos>-1){var newFilterPositionInView=this.getFilterPositionInCurrentView(filterField);filters.splice(newFilterPos,1);if(addToUrl){$location.search('f'+newFilterPositionInView,null);} 1166applyFilters(filters);}},resetFilters:function(){filters=[filters[0]];if(addToUrl){$location.search({});} 1167if(hasDefaultFilter){filters.push({'type':'Default','value':'NotRelevant'});} 1168applyFilters(filters);},filterByTab:function(tabName){filters=[{'type':'Tab','value':tabName}];if(currentSorter.DisplayOn.indexOf(tabName)==-1){currentSorter.Applied=false;for(var i=0,length=sorters.length;i<length;i++){if(sorters[i].DisplayOn.indexOf(tabName)>-1){currentSorter=sorters[i];break;}}};if(hasDefaultFilter){filters.push({'type':'Default','value':tabName});} 1169applyFilters(filters);if(!hasDefaultFilter){calculateTabSizes();}},tabExists:function(tabName){return tabPosition(tabName)>-1;},displaySorterInCurrentTab:function(index){return sorters[index].DisplayOn.indexOf(this.getTabName())>-1;},getCurrentSorter:function(){return currentSorter;}
1169,sortBy:function(index){if(!sorters[index]||sorters[index].Disabled){return;} 1170if(sorters[index].DisplayName==currentSorter.DisplayName){currentSorter.IsAscending=!currentSorter.IsAscending;applySort(filteredData);}else{currentSorter.Applied=false;currentSorter=sorters[index];applySort(filteredData);}},isSorterIdApplied:function(id){return sorters[id].Applied;},getProperty:function(field){return auxData[field]||false;},setProperty:function(field,value){auxData[field]=value;},increaseViewSizeOnScorll:function(){currentViewSize=currentViewSize+viewStepSize;if(currentViewSize>filteredData.length){currentViewSize=filteredData.length;}},loadMoreOnScroll:function(){this.increaseViewSizeOnScorll();},getToplistData:function(symbol){var paramsForCall={};paramsForCall['params']={};paramsForCall['params']['symbol']=symbol;paramsForCall['params']['limit']="ALL";return $http.get("/api/data/toplistvolumesnapshot/",paramsForCall)},getICOListData:function(commaSeparatedSymbols,toCurrency){var params={};params['withCredentials']=true;params['params']={};params['params']['fsyms']=commaSeparatedSymbols;params['params']['tsym']=toCurrency;return $http.get(CCC.minApiUrl+"data/subsWatchlist",params)},startedLoading:function(){isLoading=true;},isLoadingData:function(){return isLoading;},finishedLoading:function(){isLoading=false;}}}]);angular.module('ccc-app').factory('listsBehaviourWithAPI',['$location',function listsBehaviourWithAPIFactory($location){var filterTypes=[];var allData=[];var currentFiltersApplied=[];var auxData={};return{setInitData:function(initialData){allData=initialData.Data;},appendData:function(newData){allData=allData.concat(newData);},resetAllData:function(){allData=[];},getAllData:function(){return allData;},setFilterTypes:function(filterTypesArray){filterTypes=filterTypesArray;for(var i=0,l=filterTypes.length;i<l;i++){currentFiltersApplied=currentFiltersApplied.concat(filterTypes[i].Default);}},getCSVFilters:function(){return currentFiltersApplied.join(',');},getFilterTypes:function(displayType){if(displayType=="ALL"){return filterTypes;} 1171var filtersToReturn=[];for(var i=0,l=filterTypes.length;i<l;i++){if(filterTypes[i]['DisplayType']==displayType){filtersToReturn.push(filterTypes[i]);}}
1171 1172return filtersToReturn;},isApplied:function(filterKey){return currentFiltersApplied.indexOf(filterKey)>-1;},filterBy:function(filterKey){var filterIndex=currentFiltersApplied.indexOf(filterKey);if(filterIndex==-1){$location.search(filterKey,1);currentFiltersApplied.push(filterKey);}else{$location.search(filterKey,null);currentFiltersApplied.splice(filterIndex,1);} 1173this.reloadData();},getLastDataPointTs:function(){if(allData.length>0){return allData[allData.length-1]["Timestamp"];} 1174return-1;},getProperty:function(field){return auxData[field]||false;},setProperty:function(field,value){auxData[field]=value;},loadMoreOnScroll:function(reset){alert("loadMoreOnScroll needs to be implemented on the controller");},reloadData:function(){alert("reloadData needs to be implemented on the controller");},loadDataFromAPI:function(reset){alert("loadDataFromAPI needs to be implemented on the controller");}}}]); 1175;;;angular.module('ccc-app').config(function($stateProvider,$urlRouterProvider){$urlRouterProvider.otherwise('/overview');$stateProvider.state('tab',{url:'/:tabname?f0&f1&f2&f3&s'});});angular.module('ccc-app').factory('exchangesData',['listsBehaviour','$q','$http','$state','$stateParams',function exchangesDataFactory(listsBehaviour,$q,$http,$state,$stateParams){var acceptedTabs=[{'Id':'overview','Name':'Overview','FilterField':'NoFilter','Size':0}];var filterTypes=[{'DisplayName':'Type','FilterField':'ItemType','Type':'ArrayValue','DisplayType':'Dropdown','UseFontAwesome':false,'Options':{},'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'','FilterField':'CentralizationType','Type':'FieldValue','DisplayType':'Buttons','GroupName':'','UseFontAwesome':false,'Options':{},'DisplayOn':[acceptedTabs[0].Id]}];var sorters=[{'DisplayName':'Name','Type':'String','IsAscending':false,'Applied':false,'IsObject':false,'PrimaryField':'Name','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'Country','Type':'String','IsAscending':false,'Applied':false,'IsObject':false,'PrimaryField':'Country','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'24H Volume','Type':'Numeric','IsAscending':false,'Applied':false,'IsObject':true,'ObjectName':'TOTALVOLUME24H','PrimaryField':'USD','SecondaryField':'BTC','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'Grade Points','Type':'Numeric','IsAscending':false,'Applied':true,'IsObject':false,'PrimaryField':'GradePoints','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'Grade','Type':'String','IsAscending':false,'Applied':false,'IsObject':false,'PrimaryField':'GradePoints','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},{'DisplayName':'Rating','Type':'Numeric','IsAscending':false,'Applied':false,'IsObject':true,'ObjectName':'Rating','PrimaryField':'Avg','SecondaryField':'Rating','KeepSponsoredFirst':true,'DisplayOn':[acceptedTabs[0].Id]},];listsBehaviour.setAcceptedTabs(acceptedTabs);listsBehaviour.setFilterTypes(filterTypes);listsBehaviour.setSorters(sorters);listsBehaviour.setViewStepSize(20);listsBehaviour.getExchanges=function(){var deferred=$q.defer();var paramsForCall={withCredentials:true,params:{tsym:'USD'}};$http.get(CCC.minApiUrl+"data/exchanges/general",paramsForCall).then(function(response){let dataToReturn=[];for(let itemId in response.data.Data){dataToReturn.push(response.data.Data[itemId]);} 1176deferred.resolve(dataToReturn);});return deferred.promise;} 1177return listsBehaviour;}]);angular.module('ccc-app').controller('exchangeListCtrl',['$scope','$state','$stateParams','exchangesData','listsBehaviour','$q','$http','chartUtil',function($scope,$state,$stateParams,exchangesData,listsBehaviour,$q,$http,chartUtil){$scope.acceptedTabs=exchangesData.getTabs();$scope.allData=exchangesData;$scope.currentTab="";$scope.headings=[{name:'LogoUrl',class:'LogoUrl',display:""},{name:'Name',class:'Name',display:"Name",sortIndex:0},{name:'ItemType',class:'ItemType',display:"Type"},{name:'24H Volume',class:'Vol24H',display:"Vol. 24H",sortIndex:2},{name:'GradePoints',class:'Points',display:"Points",sortIndex:3,tooltip:"Points represent the sum of "+"various category ratings (Legal/Regulation, Data Provision, Security, Team/Exchange, Investment, Trade Monitoring, "+"Negative Reports). The maximum score is 100 points."},{name:'Grade',class:'Grade',display:"Grade",sortIndex:4,tooltip:"Exchange grades have been assigned based "+"on a percentile system. The top 10% of aggregate points are assigned an AA, those within the top 20% are"+" assigned a A, those in the top 30% are assigned a B...etc"},];$scope.isActive=function(tabname){return tabname==$scope.currentTab.tabname;};$scope.loadingData=true;exchangesData.getExchanges().then(function(data){$scope.loadingData=false;listsBehaviour.setInitData({Data:data});applyFilters();});function applyFilters(){exchangesData.filterByTab($scope.currentTab.tabname);var filters=exchangesData.getAllFiltersForCurrentView();if($scope.currentTab.f0!=undefined&&filters.length>0){exchangesData.filterBy(filters[0].FilterField,$scope.currentTab.f0);} 1178if($scope.currentTab.f1!=undefined&&filters.length>1){exchangesData.filterBy(filters[1].FilterField,$scope.currentTab.f1);} 1179if($scope.currentTab.f2!=undefined&&filters.length>2){exchangesData.filterBy(filters[2].FilterField,$scope.currentTab.f2);} 1180if($scope.currentTab.f3!=undefined&&filters.length>3){exchangesData.filterBy(filters[3].FilterField,$scope.currentTab.f3);}} 1181$scope.$root.$on('$stateChangeSuccess',function(event,toState,toParams,fromState,fromParams){if(exchangesData.tabExists(toParams.tabname)){$scope.currentTab=toParams;applyFilters();}else{$state.go("tab",{tabname:$scope.acceptedTabs[0].Id});}});}]);
1181angular.module('ccc-app').controller('exchangeFilterCtrl',['$scope','exchangesData',function($scope,exchangesData){$scope.allData=exchangesData;}]);angular.module('ccc-app').controller('exchangeSorterCtrl',['$scope','exchangesData',function($scope,exchangesData){$scope.allData=exchangesData;}]);angular.module('ccc-app').directive('exchangeList',function(){return{restrict:'E',templateUrl:'lists/exchange-list.html',controller:'exchangeListCtrl',scope:{},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('exchangeFilter',function(){return{restrict:'E',templateUrl:'lists/exchange-list-filter.html',controller:'exchangeFilterCtrl',scope:{},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('exchangeSorter',function(){return{restrict:'E',templateUrl:'lists/list-sorter.html',controller:'exchangeSorterCtrl',scope:{},link:function(scope,element,attrs){}};}); 1182;;;angular.module('ccc-app').directive('chartHistoSimple',function(){return{restrict:'E',templateUrl:'charts/histo-simple.html',controller:'chartHistoSimpleCtrl',scope:{chartid:"@"},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartHistoSimpleV2',function(){return{restrict:'E',templateUrl:'charts/histo-simple-v2.html',controller:'chartHistoSimpleCtrl',scope:{chartid:"@"},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartHistoExchangeVol',function(){return{restrict:'E',templateUrl:'charts/histo-exchange-vol.html',controller:'chartHistoExchangeVolCtrl',scope:{chartid:"@",exchange:'@',tosymbol:'@',compare:'=',chartHeight:'=',},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartHistoExchangeSymbolVol',function(){return{restrict:'E',templateUrl:'charts/histo-exchange-vol.html',controller:'chartHistoExchangeSymbolVolCtrl',scope:{chartid:"@",exchange:'@',tosymbol:'@',compare:'=',chartHeight:'=',},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartHistoExchangeMultiVol',function(){return{restrict:'E',templateUrl:'charts/histo-exchange-vol.html',controller:'chartHistoExchangeMultiVolCtrl',scope:{chartid:"@",exchange:'@',tosymbol:'@',chartHeight:'=',},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartSocialSimpleV2',function(){return{restrict:'E',templateUrl:'charts/social-simple-v2.html',controller:'chartSocialSimpleCtrl',scope:{chartid:"@"},link:function(scope,element,attrs){}};});angular.module('ccc-app').directive('chartHistoPlaceholder',function(){return{restrict:'E',templateUrl:'charts/histo-placeholder.html',controller:'chartHistoSimpleCtrl',scope:{chartid:"@"},link:function(scope,element,attrs){}};}); 1183;;;angular.module('ccc-app').controller('chartHistoExchangeVolCtrl',['$rootScope','$scope','$http','$stateParams','$filter','pageInfo','subscriptionManager','chartUtil','cModalService','userManager',function($rootScope,$scope,$http,$stateParams,$filter,pageInfo,subscriptionManager,chartUtil,cModalService,userManager){$scope.userManager=userManager;$scope.currentDataSet=[];$scope.hideTitle=true;$scope.chartPeriod=[{key:'1W',name:'1 Week',shortName:'1 W',maxPoints:168,type:'hour',aggregation:1,format:'MMM DD, JJ:NN',period:'hh',polyfill:60*60,requiresLogin:false},{key:'1M',name:'1 Month',shortName:'1 M',maxPoints:120,type:'hour',aggregation:6,format:'MMM DD, JJ:NN',period:'6hh',polyfill:6*60*60,requiresLogin:false},{key:'3M',name:'3 Months',shortName:'3 M',maxPoints:90,type:'day',aggregation:1,format:'MMM DD',period:'DD',polyfill:24*60*60,requiresLogin:false},{key:'6M',name:'6 Months',shortName:'6 M',maxPoints:180,type:'day',aggregation:1,format:'MMM DD',period:'DD',polyfill:24*60*60,requiresLogin:true},];$scope.currentPeriod=$scope.chartPeriod[2];$scope.dataIsLoading=true;$scope.isPeriodSelected=function(periodId){return $scope.currentPeriod.key===$scope.chartPeriod[periodId].key;};$scope.handleNewPeriod=function(periodId){if($scope.currentPeriod.key==$scope.chartPeriod[periodId].key){return;};if($scope.chartPeriod[periodId].requiresLogin&&!userManager.isLoggedIn()){cModalService.showLoginModal("Please login or signup and you'll be able to see the "+$scope.chartPer
1183iod[periodId].name+" chart time period.","Chart Histo Simple New Period");}else{$scope.currentPeriod=$scope.chartPeriod[periodId];$scope.buildChart();}};$scope.generateNewChart=function(){$scope.chartConfig={type:"serial",theme:"none",legend:{enabled:false},zoomOutText:'',dataProvider:$scope.currentDataSet,panEventsEnabled:false,marginTop:10,marginRight:10,marginLeft:10,marginBottom:30,autoMargins:false,balloon:{adjustBorderColor:false,horizontalPadding:10,verticalPadding:8,color:"#ffffff",borderThickness:2},addClassNames:true,categoryField:"timeDate",guides:[],valueAxes:[{axisAlpha:0,position:"left",gridThickness:0,labelFunction:function(value,valueText,valueAxis){if(value>1000000000){return'$ '+Math.floor(value/1000000000)+' B';} 1184if(value>1000000){return'$ '+Math.floor(value/1000000)+' M';} 1185if(value>10000){return'$ '+Math.floor(value/10000)+' k';} 1186return'$ '+value;},inside:true}],parseDates:true,categoryAxis:{minPeriod:$scope.currentPeriod.period,maxSeries:$scope.currentDataSet.length+10,parseDates:true,equalSpacing:true,gridThickness:0,labelsEnabled:true},graphs:[],chartCursor:{valueBalloonsEnabled:true,zoomable:false,categoryBalloonEnabled:true,categoryBalloonDateFormat:$scope.currentPeriod.format},panelsSettings:{panEventsEnabled:false,usePrefixes:false},chartScrollbar:{enabled:false}} 1187chartUtil.topLineSerial($scope.chartConfig.graphs,'Total Volume','volume','$');if($scope.chart!==undefined){$scope.chart.clear();$scope.chart=null;} 1188$scope.chart=AmCharts.makeChart($scope.chartid,$scope.chartConfig);$scope.dataIsLoading=false;};$scope.buildChart=function(){$scope.getHistoData();};$scope.getHistoData=function(){$scope.dataIsLoading=true;chartUtil.getHistoExchangeVolume($scope.currentPeriod.type,'CCCAGG',null,'USD',$scope.currentPeriod.maxPoints,$scope.currentPeriod.aggregation,true).success(function(data){$scope.chartHasData=true;$scope.currentDataSet=data.Data;angular.forEach($scope.currentDataSet,function(datum){datum.timeDate=new Date(datum.time*1000);});$scope.generateNewChart();});};$scope.buildChart();}]); 1189;;;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.