Version 0.4.0 merged with default branch. stable

Sun, 26 May 2019 20:45:01 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 26 May 2019 20:45:01 +0200
branch
stable
changeset 377
6e80a5515dd3
parent 366
a14a31bfc73b (current diff)
parent 376
1de1623e1760 (diff)
child 387
541503502b1b

Version 0.4.0 merged with default branch.

config.status file | annotate | diff | comparison | revisions
configure file | annotate | diff | comparison | revisions
configure.ac file | annotate | diff | comparison | revisions
--- a/README.design	Sun May 12 19:41:18 2019 +0200
+++ b/README.design	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,6 @@
+
+MIT licentie?
+
 
 	Main table: products.
 	  In Progress: view logs. 
@@ -14,3 +17,7 @@
 Gisten diastaticus bit toevoegen.
 Gist typen: kveik en brett? Apart of niet.
 
+Popups is de editors met rekenhulpjes.
+
+Beerxml cool tot temp toevoegen.
+
--- a/config.status	Sun May 12 19:41:18 2019 +0200
+++ b/config.status	Sun May 26 20:45:01 2019 +0200
@@ -621,7 +621,7 @@
 S["CC"]="gcc"
 S["CYEARS"]="2016-2019"
 S["COPYRIGHT"]="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
-S["VERSION"]="0.2.0"
+S["VERSION"]="0.4.0"
 S["PACKAGE"]="bms"
 S["SUBDIRS"]="bmsd doc script tools www"
 S["target_alias"]=""
@@ -710,7 +710,7 @@
 D["PACKAGE_STRING"]=" \"\""
 D["PACKAGE_BUGREPORT"]=" \"\""
 D["PACKAGE_URL"]=" \"\""
-D["VERSION"]=" \"0.2.0\""
+D["VERSION"]=" \"0.4.0\""
 D["COPYRIGHT"]=" \"Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved\""
 D["STDC_HEADERS"]=" 1"
 D["HAVE_SYS_TYPES_H"]=" 1"
--- a/configure	Sun May 12 19:41:18 2019 +0200
+++ b/configure	Sun May 26 20:45:01 2019 +0200
@@ -2043,7 +2043,7 @@
 
 
 PACKAGE="bms"
-VERSION="0.2.0"
+VERSION="0.4.0"
 COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
 CYEARS="2016-2019"
 
--- a/configure.ac	Sun May 12 19:41:18 2019 +0200
+++ b/configure.ac	Sun May 26 20:45:01 2019 +0200
@@ -8,7 +8,7 @@
 dnl General settings
 dnl After changeing the version number, run autoconf!
 PACKAGE="bms"
-VERSION="0.2.0"
+VERSION="0.4.0"
 COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
 CYEARS="2016-2019"
 AC_SUBST(PACKAGE)
--- a/www/gen_about.php	Sun May 12 19:41:18 2019 +0200
+++ b/www/gen_about.php	Sun May 26 20:45:01 2019 +0200
@@ -10,6 +10,9 @@
       <tr><th colspan=2>Over BMS</th></tr>
       <tr><td> </td><td> </td></tr>
       <tr><td>Versie:</td><td><?php echo $my_version;?> </td></tr>
+      <tr><td>Geschreven door:</td><td>M. Broek</td></tr>
+      <tr><td>Diverse berekeningen:</td><td>A. Otte, H. Halberstadt</td></tr>
+      <tr><td>Widgets en stijl:</td><td><a style="color:white; text-decoration:none;" href="https://www.jqwidgets.com/">jQWidgets</a></td></tr>
      </table>
     </div>
    </div>
--- a/www/includes/db_product.php	Sun May 12 19:41:18 2019 +0200
+++ b/www/includes/db_product.php	Sun May 26 20:45:01 2019 +0200
@@ -223,17 +223,23 @@
 	$sql .= "', wa_acid_name='" . $_POST['wa_acid_name'];
 	$sql .= "', wa_acid_perc='" . $_POST['wa_acid_perc'];
 	$sql .= "', wa_base_name='" . $_POST['wa_base_name'];
-	$sql .= "', starter_enable='" . $_POST['starter_enable'];
-	$sql .= "', starter_type='" . $_POST['starter_type'];
-	$sql .= "', starter_sg='" . $_POST['starter_sg'];
-	$sql .= "', prop1_type='" . $_POST['prop1_type'];
-	$sql .= "', prop1_volume='" . $_POST['prop1_volume'];
-	$sql .= "', prop2_type='" . $_POST['prop2_type'];
-	$sql .= "', prop2_volume='" . $_POST['prop2_volume'];
-	$sql .= "', prop3_type='" . $_POST['prop3_type'];
-	$sql .= "', prop3_volume='" . $_POST['prop3_volume'];
-	$sql .= "', prop4_type='" . $_POST['prop4_type'];
-	$sql .= "', prop4_volume='" . $_POST['prop4_volume'];
+	if ($_POST['starter_enable'] == 0) {
+		$sql .= "', starter_enable='0', starter_type='0', starter_sg='1.040";
+		$sql .= "', prop1_type='0', prop1_volume='0', prop2_type='0', prop2_volume='0";
+		$sql .= "', prop3_type='0', prop3_volume='0', prop4_type='0', prop4_volume='0";
+	} else {
+		$sql .= "', starter_enable='1";
+		$sql .= "', starter_type='" . $_POST['starter_type'];
+		$sql .= "', starter_sg='" . $_POST['starter_sg'];
+		$sql .= "', prop1_type='" . $_POST['prop1_type'];
+		$sql .= "', prop1_volume='" . $_POST['prop1_volume'];
+		$sql .= "', prop2_type='" . $_POST['prop2_type'];
+		$sql .= "', prop2_volume='" . $_POST['prop2_volume'];
+		$sql .= "', prop3_type='" . $_POST['prop3_type'];
+		$sql .= "', prop3_volume='" . $_POST['prop3_volume'];
+		$sql .= "', prop4_type='" . $_POST['prop4_type'];
+		$sql .= "', prop4_volume='" . $_POST['prop4_volume'];
+	}
 	syslog(LOG_NOTICE, $sql);
 
 	$fermentables = '[';
--- a/www/includes/global.inc.php	Sun May 12 19:41:18 2019 +0200
+++ b/www/includes/global.inc.php	Sun May 26 20:45:01 2019 +0200
@@ -118,7 +118,7 @@
   <link type="text/css" href="css/style.css" rel="stylesheet" media="all" />
   <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" />
   <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" />
-  <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <script>
 	var theme = "<?php echo $my_style; ?>";
 	var my_record = "<?php echo $my_record; ?>";
--- a/www/jqwidgets/globalization/globalize.culture.cs-CZ.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.cs-CZ.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture cs-CZ
--- a/www/jqwidgets/globalization/globalize.culture.de-DE.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.de-DE.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture de-DE
--- a/www/jqwidgets/globalization/globalize.culture.en-CA.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.en-CA.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture en-CA
--- a/www/jqwidgets/globalization/globalize.culture.en-US.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.en-US.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture en-US
--- a/www/jqwidgets/globalization/globalize.culture.fr-FR.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.fr-FR.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture fr-FR
--- a/www/jqwidgets/globalization/globalize.culture.he-IL.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.he-IL.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture he-IL
--- a/www/jqwidgets/globalization/globalize.culture.hr-HR.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.hr-HR.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture hr-HR
--- a/www/jqwidgets/globalization/globalize.culture.hu-HU.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.hu-HU.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture hu-HU
--- a/www/jqwidgets/globalization/globalize.culture.it-IT.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.it-IT.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture it-IT
--- a/www/jqwidgets/globalization/globalize.culture.ja-JP.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.ja-JP.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture ja-JP
--- a/www/jqwidgets/globalization/globalize.culture.lt.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.lt.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture lt
--- a/www/jqwidgets/globalization/globalize.culture.ru-RU.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.ru-RU.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture ru-RU
--- a/www/jqwidgets/globalization/globalize.culture.sa-IN.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.culture.sa-IN.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,4 @@
+/* tslint:disable */
 /* eslint-disable */
 /*
  * Globalize Culture sa-IN
--- a/www/jqwidgets/globalization/globalize.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/globalization/globalize.js	Sun May 26 20:45:01 2019 +0200
@@ -1,3 +1,5 @@
+/* tslint:disable */
+/* eslint-disable */
 /*!
  * Globalize
  *
@@ -7,4 +9,1599 @@
  * Dual licensed under the MIT or GPL Version 2 licenses.
  * http://jquery.org/license
  */
-(function(j,g){if(document.Globalize){return}var r,w,l,x,p,v,u,t,m,a,k,y,q,c,n,s,z,o,i,h,d,f,e,b;r=function(A){return new r.prototype.init(A)};if(typeof require!=="undefined"&&typeof exports!=="undefined"&&typeof module!=="undefined"){module.exports=r}else{j.Globalize=r}r.cultures={};r.prototype={constructor:r,init:function(A){this.cultures=r.cultures;this.cultureSelector=A;return this}};r.prototype.init.prototype=r.prototype;r.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:false,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-","NaN":"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"}}},messages:{}};r.cultures["default"].calendar=r.cultures["default"].calendars.standard;r.cultures.en=r.cultures["default"];r.cultureSelector="en";w=/^0x[a-f0-9]+$/i;l=/^[+\-]?infinity$/i;x=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/;p=/^\s+|\s+$/g;v=function(D,C){if(D.indexOf){return D.indexOf(C)}for(var A=0,B=D.length;A<B;A++){if(D[A]===C){return A}}return -1};u=function(B,A){return B.substr(B.length-A.length)===A};t=function(){var J,C,A,B,G,H,F=arguments[0]||{},E=1,D=arguments.length,I=false;if(typeof F==="boolean"){I=F;F=arguments[1]||{};E=2}if(typeof F!=="object"&&!a(F)){F={}}for(;E<D;E++){if((J=arguments[E])!=null){for(C in J){A=F[C];B=J[C];if(F===B){continue}if(I&&B&&(k(B)||(G=m(B)))){if(G){G=false;H=A&&m(A)?A:[]}else{H=A&&k(A)?A:{}}F[C]=t(I,H,B)}else{if(B!==g){F[C]=B}}}}}return F};m=Array.isArray||function(A){return Object.prototype.toString.call(A)==="[object Array]"};a=function(A){return Object.prototype.toString.call(A)==="[object Function]"};k=function(A){return Object.prototype.toString.call(A)==="[object Object]"};y=function(B,A){return B.indexOf(A)===0};q=function(A){return(A+"").replace(p,"")};c=function(A){if(isNaN(A)){return NaN}return Math[A<0?"ceil":"floor"](A)};n=function(D,B,C){var A;for(A=D.length;A<B;A+=1){D=(C?("0"+D):(D+"0"))}return D};s=function(D,A){var C=0,F=false;for(var E=0,B=D.length;E<B;E++){var G=D.charAt(E);switch(G){case"'":if(F){A.push("'")}else{C++}F=false;break;case"\\":if(F){A.push("\\")}F=!F;break;default:A.push(G);F=false;break}}return C};z=function(E,D){D=D||"F";var C,B=E.patterns,A=D.length;if(A===1){C=B[D];if(!C){throw"Invalid date format string '"+D+"'."}D=C}else{if(A===2&&D.charAt(0)==="%"){D=D.charAt(1)}}return D};o=function(U,Y,Z){var M=Z.calendar,I=M.convert,ab;if(!Y||!Y.length||Y==="i"){if(Z&&Z.name.length){if(I){ab=o(U,M.patterns.F,Z)}else{var J=new Date(U.getTime()),Q=d(U,M.eras);J.setFullYear(f(U,M,Q));ab=J.toLocaleString()}}else{ab=U.toString()}return ab}var V=M.eras,B=Y==="s";Y=z(M,Y);ab=[];var F,W=["0","00","000"],K,L,A=/([^d]|^)(d|dd)([^d]|$)/g,aa=0,R=h(),C;function H(ac,af){if(ac<0){return"-"+H(-ac,af)}var ae,ad=ac+"";if(af>1&&ad.length<af){ae=(W[af-2]+ad);return ae.substr(ae.length-af,af)}else{ae=ad}return ae}function X(){if(K||L){return K}K=A.test(Y);L=true;return K}function D(ad,ac){if(C){return C[ac]}switch(ac){case 0:return ad.getFullYear();case 1:return ad.getMonth();case 2:return ad.getDate();default:throw"Invalid part value "+ac}}if(!B&&I){C=I.fromGregorian(U)}for(;;){var G=R.lastIndex,P=R.exec(Y);var N=Y.slice(G,P?P.index:Y.length);aa+=s(N,ab);if(!P){break}if(aa%2){ab.push(P[0]);continue}var S=P[0],E=S.length;switch(S){case"ddd":case"dddd":var O=(E===3)?M.days.namesAbbr:M.days.names;ab.push(O[U.getDay()]);break;case"d":case"dd":K=true;ab.push(H(D(U,2),E));break;case"MMM":case"MMMM":var T=D(U,1);ab.push((M.monthsGenitive&&X())?(M.monthsGenitive[E===3?"namesAbbr":"names"][T]):(M.months[E===3?"namesAbbr":"names"][T]));break;case"M":case"MM":ab.push(H(D(U,1)+1,E));break;case"y":case"yy":case"yyyy":T=C?C[0]:f(U,M,d(U,V),B);if(E<4){T=T%100}ab.push(H(T,E));break;case"h":case"hh":F=U.getHours()%12;if(F===0){F=12}ab.push(H(F,E));break;case"H":case"HH":ab.push(H(U.getHours(),E));break;case"m":case"mm":ab.push(H(U.getMinutes(),E));break;case"s":case"ss":ab.push(H(U.getSeconds(),E));break;case"t":case"tt":T=U.getHours()<12?(M.AM?M.AM[0]:" "):(M.PM?M.PM[0]:" ");ab.push(E===1?T.charAt(0):T);break;case"f":case"ff":case"fff":ab.push(H(U.getMilliseconds(),3).substr(0,E));break;case"z":case"zz":F=U.getTimezoneOffset()/60;ab.push((F<=0?"+":"-")+H(Math.floor(Math.abs(F)),E));break;case"zzz":F=U.getTimezoneOffset()/60;ab.push((F<=0?"+":"-")+H(Math.floor(Math.abs(F)),2)+":"+H(Math.abs(U.getTimezoneOffset()%60),2));break;case"g":case"gg":if(M.eras){ab.push(M.eras[d(U,V)].name)}break;case"/":ab.push(M["/"]);break;default:throw"Invalid date format pattern '"+S+"'."}}return ab.join("")};(function(){var A;A=function(H,I,P){var F=P.groupSizes,B=F[0],C=1,M=Math.pow(10,I),D=Math.round(H*M)/M;if(!isFinite(D)){D=H}H=D;var G=H+"",O="",L=G.split(/e/i),N=L.length>1?parseInt(L[1],10):0;G=L[0];L=G.split(".");G=L[0];O=L.length>1?L[1]:"";var E;if(N>0){O=n(O,N,false);G+=O.slice(0,N);O=O.substr(N)}else{if(N<0){N=-N;G=n(G,N+1,true);O=G.slice(-N,G.length)+O;G=G.slice(0,-N)}}if(I>0){O=P["."]+((O.length>I)?O.slice(0,I):n(O,I))}else{O=""}var K=G.length-1,Q=P[","],J="";while(K>=0){if(B===0||B>K){return G.slice(0,K+1)+(J.length?(Q+J+O):O)}J=G.slice(K-B+1,K+1)+(J.length?(Q+J):"");K-=B;if(C<F.length){B=F[C];C++}}return G.slice(0,K+1)+Q+J+O};i=function(M,L,F){if(!isFinite(M)){if(M===Infinity){return F.numberFormat.positiveInfinity}if(M===-Infinity){return F.numberFormat.negativeInfinity}return F.numberFormat.NaN}if(!L||L==="i"){return F.name.length?M.toLocaleString():M.toString()}L=L||"D";var D=F.numberFormat,E=Math.abs(M),G=-1,K;if(L.length>1){G=parseInt(L.slice(1),10)}var J=L.charAt(0).toUpperCase(),N;switch(J){case"D":K="n";E=c(E);if(G!==-1){E=n(""+E,G,true)}if(M<0){E="-"+E}break;case"N":N=D;case"C":N=N||D.currency;case"P":N=N||D.percent;K=M<0?N.pattern[0]:(N.pattern[1]||"n");if(G===-1){G=N.decimals}E=A(E*(J==="P"?100:1),G,N);break;default:throw"Bad number format specifier: "+J}var B=/n|\$|-|%/g,I="";for(;;){var H=B.lastIndex,C=B.exec(K);I+=K.slice(H,C?C.index:K.length);if(!C){break}switch(C[0]){case"n":I+=E;break;case"$":I+=D.currency.symbol;break;case"-":if(/[1-9]/.test(E)){I+=D["-"]}break;case"%":I+=D.percent.symbol;break}}return I}}());h=function(){return(/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g)};d=function(C,B){if(!B){return 0}var F,E=C.getTime();for(var D=0,A=B.length;D<A;D++){F=B[D].start;if(F===null||E>=F){return D}}return 0};f=function(B,D,A,E){var C=B.getFullYear();if(!E&&D.eras){C-=D.eras[A].offset}return C};(function(){var B,A,D,C,G,F,E;B=function(M,K){if(K<100){var I=new Date(),H=d(I),L=f(I,M,H),J=M.twoDigitYearMax;J=typeof J==="string"?new Date().getFullYear()%100+parseInt(J,10):J;K+=L-(L%100);if(K>J){K-=100}}return K};A=function(L,K,I){var H,M=L.days,J=L._upperDays;if(!J){L._upperDays=J=[E(M.names),E(M.namesAbbr),E(M.namesShort)]}K=F(K);if(I){H=v(J[1],K);if(H===-1){H=v(J[2],K)}}else{H=v(J[0],K)}return H};D=function(O,N,J){var H=O.months,I=O.monthsGenitive||O.months,L=O._upperMonths,M=O._upperMonthsGen;if(!L){O._upperMonths=L=[E(H.names),E(H.namesAbbr)];O._upperMonthsGen=M=[E(I.names),E(I.namesAbbr)]}N=F(N);var K=v(J?L[1]:L[0],N);if(K<0){K=v(J?M[1]:M[0],N)}return K};C=function(H,S){var U=H._parseRegExp;if(!U){H._parseRegExp=U={}}else{var L=U[S];if(L){return L}}var R=z(H,S).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),P=["^"],I=[],O=0,K=0,X=h(),M;while((M=X.exec(R))!==null){var W=R.slice(O,M.index);O=X.lastIndex;K+=s(W,P);if(K%2){P.push(M[0]);continue}var J=M[0],N=J.length,T;switch(J){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":T="(\\D+)";break;case"tt":case"t":T="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":T="(\\d{"+N+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":T="(\\d\\d?)";break;case"zzz":T="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":T="([+-]?\\d\\d?)";break;case"/":T="(\\/)";break;default:throw"Invalid date format pattern '"+J+"'."}if(T){P.push(T)}I.push(M[0])}s(R.slice(O),P);P.push("$");var V=P.join("").replace(/\s+/g,"\\s+"),Q={regExp:V,groups:I};return U[S]=Q};G=function(J,H,I){return J<H||J>I};F=function(H){return H.split("\u00A0").join(" ").toUpperCase()};E=function(H){var K=[];for(var J=0,I=H.length;J<I;J++){K[J]=F(H[J])}return K};e=function(ab,ai,aj){ab=q(ab);var U=aj.calendar,ao=C(U,ai),O=new RegExp(ao.regExp).exec(ab);if(O===null){return null}var ak=ao.groups,Z=null,S=null,an=null,am=null,T=null,M=0,ae,ad=0,al=0,H=0,J=null,V=false;for(var af=0,ah=ak.length;af<ah;af++){var I=O[af+1];if(I){var aa=ak[af],L=aa.length,N=parseInt(I,10);switch(aa){case"dd":case"d":am=N;if(G(am,1,31)){return null}break;case"MMM":case"MMMM":an=D(U,I,L===3);if(G(an,0,11)){return null}break;case"M":case"MM":an=N-1;if(G(an,0,11)){return null}break;case"y":case"yy":case"yyyy":S=L<4?B(U,N):N;if(G(S,0,9999)){return null}break;case"h":case"hh":M=N;if(M===12){M=0}if(G(M,0,11)){return null}break;case"H":case"HH":M=N;if(G(M,0,23)){return null}break;case"m":case"mm":ad=N;if(G(ad,0,59)){return null}break;case"s":case"ss":al=N;if(G(al,0,59)){return null}break;case"tt":case"t":V=U.PM&&(I===U.PM[0]||I===U.PM[1]||I===U.PM[2]);if(!V&&(!U.AM||(I!==U.AM[0]&&I!==U.AM[1]&&I!==U.AM[2]))){return null}break;case"f":case"ff":case"fff":H=N*Math.pow(10,3-L);if(G(H,0,999)){return null}break;case"ddd":case"dddd":T=A(U,I,L===3);if(G(T,0,6)){return null}break;case"zzz":var K=I.split(/:/);if(K.length!==2){return null}ae=parseInt(K[0],10);if(G(ae,-12,13)){return null}var Q=parseInt(K[1],10);if(G(Q,0,59)){return null}J=(ae*60)+(y(I,"-")?-Q:Q);break;case"z":case"zz":ae=N;if(G(ae,-12,13)){return null}J=ae*60;break;case"g":case"gg":var W=I;if(!W||!U.eras){return null}W=q(W.toLowerCase());for(var ag=0,ac=U.eras.length;ag<ac;ag++){if(W===U.eras[ag].name.toLowerCase()){Z=ag;break}}if(Z===null){return null}break}}}var R=new Date(),Y,P=U.convert;Y=P?P.fromGregorian(R)[0]:R.getFullYear();if(S===null){S=Y}else{if(U.eras){S+=U.eras[(Z||0)].offset}}if(an===null){an=0}if(am===null){am=1}if(P){R=P.toGregorian(S,an,am);if(R===null){return null}}else{R.setFullYear(S,an,am);if(R.getDate()!==am){return null}if(T!==null&&R.getDay()!==T){return null}}if(V&&M<12){M+=12}R.setHours(M,ad,al,H);if(J!==null){var X=R.getMinutes()-(J+R.getTimezoneOffset());R.setHours(R.getHours()+parseInt(X/60,10),X%60)}return R}}());b=function(D,C,B){var F=C["-"],E=C["+"],A;switch(B){case"n -":F=" "+F;E=" "+E;case"n-":if(u(D,F)){A=["-",D.substr(0,D.length-F.length)]}else{if(u(D,E)){A=["+",D.substr(0,D.length-E.length)]}}break;case"- n":F+=" ";E+=" ";case"-n":if(y(D,F)){A=["-",D.substr(F.length)]}else{if(y(D,E)){A=["+",D.substr(E.length)]}}break;case"(n)":if(y(D,"(")&&u(D,")")){A=["-",D.substr(1,D.length-2)]}break}return A||["",D]};r.prototype.findClosestCulture=function(A){return r.findClosestCulture.call(this,A)};r.prototype.format=function(A,B,C){return r.format.call(this,A,B,C)};r.prototype.localize=function(A,B){return r.localize.call(this,A,B)};r.prototype.parseInt=function(B,A,C){return r.parseInt.call(this,B,A,C)};r.prototype.parseFloat=function(B,A,C){return r.parseFloat.call(this,B,A,C)};r.prototype.culture=function(A){return r.culture.call(this,A)};r.addCultureInfo=function(E,B,D){var C={},A=false;if(typeof E!=="string"){D=E;E=this.culture().name;C=this.cultures[E]}else{if(typeof B!=="string"){D=B;A=(this.cultures[E]==null);C=this.cultures[E]||this.cultures["default"]}else{A=true;C=this.cultures[B]}}this.cultures[E]=t(true,{},C,D);if(A){this.cultures[E].calendar=this.cultures[E].calendars.standard}};r.findClosestCulture=function(A){var I;if(!A){return this.findClosestCulture(this.cultureSelector)||this.cultures["default"]}if(typeof A==="string"){A=A.split(",")}if(m(A)){var C,M=this.cultures,K=A,H,D=K.length,L=[];for(H=0;H<D;H++){A=q(K[H]);var B,G=A.split(";");C=q(G[0]);if(G.length===1){B=1}else{A=q(G[1]);if(A.indexOf("q=")===0){A=A.substr(2);B=parseFloat(A);B=isNaN(B)?0:B}else{B=1}}L.push({lang:C,pri:B})}L.sort(function(O,N){if(O.pri<N.pri){return 1}else{if(O.pri>N.pri){return -1}}return 0});for(H=0;H<D;H++){C=L[H].lang;I=M[C];if(I){return I}}for(H=0;H<D;H++){C=L[H].lang;do{var J=C.lastIndexOf("-");if(J===-1){break}C=C.substr(0,J);I=M[C];if(I){return I}}while(1)}for(H=0;H<D;H++){C=L[H].lang;for(var F in M){var E=M[F];if(E.language==C){return E}}}}else{if(typeof A==="object"){return A}}return I||null};r.format=function(B,C,D){var A=this.findClosestCulture(D);if(B instanceof Date){B=o(B,C,A)}else{if(typeof B==="number"){B=i(B,C,A)}}return B};r.localize=function(A,B){return this.findClosestCulture(B).messages[A]||this.cultures["default"].messages[A]};r.parseDate=function(I,G,E){E=this.findClosestCulture(E);var C,A,B;if(G){if(typeof G==="string"){G=[G]}if(G.length){for(var F=0,D=G.length;F<D;F++){var H=G[F];if(H){C=e(I,H,E);if(C){break}}}}}else{B=E.calendar.patterns;for(A in B){C=e(I,B[A],E);if(C){break}}}return C||null};r.parseInt=function(B,A,C){return c(r.parseFloat(B,A,C))};r.parseFloat=function(O,H,J){if(typeof H!=="number"){J=H;H=10}var Q=this.findClosestCulture(J);var T=NaN,F=Q.numberFormat;if(O.indexOf(Q.numberFormat.currency.symbol)>-1){O=O.replace(Q.numberFormat.currency.symbol,"");O=O.replace(Q.numberFormat.currency["."],Q.numberFormat["."])}if(O.indexOf(Q.numberFormat.percent.symbol)>-1){O=O.replace(Q.numberFormat.percent.symbol,"")}O=O.replace(/ /g,"");if(l.test(O)){T=parseFloat(O)}else{if(!H&&w.test(O)){T=parseInt(O,16)}else{var C=b(O,F,F.pattern[0]),S=C[0],I=C[1];if(S===""&&F.pattern[0]!=="(n)"){C=b(O,F,"(n)");S=C[0];I=C[1]}if(S===""&&F.pattern[0]!=="-n"){C=b(O,F,"-n");S=C[0];I=C[1]}S=S||"+";var N,K,R=I.indexOf("e");if(R<0){R=I.indexOf("E")}if(R<0){K=I;N=null}else{K=I.substr(0,R);N=I.substr(R+1)}var P,G,D=F["."],A=K.indexOf(D);if(A<0){P=K;G=null}else{P=K.substr(0,A);G=K.substr(A+D.length)}var L=F[","];P=P.split(L).join("");var E=L.replace(/\u00A0/g," ");if(L!==E){P=P.split(E).join("")}var M=S+P;if(G!==null){M+="."+G}if(N!==null){var B=b(N,F,"-n");M+="e"+(B[0]||"+")+B[1]}if(x.test(M)){T=parseFloat(M)}}}return T};r.culture=function(A){if(typeof A!=="undefined"){this.cultureSelector=A}return this.findClosestCulture(A)||this.cultures["default"]};document.Globalize=r}(this));
\ No newline at end of file
+
+(function( window, undefined ) {
+if (document.Globalize) {
+    return;
+}
+
+var Globalize,
+	// private variables
+	regexHex,
+	regexInfinity,
+	regexParseFloat,
+	regexTrim,
+	// private JavaScript utility functions
+	arrayIndexOf,
+	endsWith,
+	extend,
+	isArray,
+	isFunction,
+	isObject,
+	startsWith,
+	trim,
+	truncate,
+	zeroPad,
+	// private Globalization utility functions
+	appendPreOrPostMatch,
+	expandFormat,
+	formatDate,
+	formatNumber,
+	getTokenRegExp,
+	getEra,
+	getEraYear,
+	parseExact,
+	parseNegativePattern;
+
+// Global variable (Globalize) or CommonJS module (globalize)
+Globalize = function( cultureSelector ) {
+	return new Globalize.prototype.init( cultureSelector );
+};
+
+if ( typeof require !== "undefined" &&
+	typeof exports !== "undefined" &&
+	typeof module !== "undefined" ) {
+	// Assume CommonJS
+	module.exports = Globalize;
+} else {
+	// Export as global variable
+	window.Globalize = Globalize;
+}
+
+Globalize.cultures = {};
+
+Globalize.prototype = {
+	constructor: Globalize,
+	init: function( cultureSelector ) {
+		this.cultures = Globalize.cultures;
+		this.cultureSelector = cultureSelector;
+
+		return this;
+	}
+};
+Globalize.prototype.init.prototype = Globalize.prototype;
+
+// 1. When defining a culture, all fields are required except the ones stated as optional.
+// 2. Each culture should have a ".calendars" object with at least one calendar named "standard"
+//    which serves as the default calendar in use by that culture.
+// 3. Each culture should have a ".calendar" object which is the current calendar being used,
+//    it may be dynamically changed at any time to one of the calendars in ".calendars".
+Globalize.cultures[ "default" ] = {
+	// A unique name for the culture in the form <language code>-<country/region code>
+	name: "en",
+	// the name of the culture in the english language
+	englishName: "English",
+	// the name of the culture in its own language
+	nativeName: "English",
+	// whether the culture uses right-to-left text
+	isRTL: false,
+	// "language" is used for so-called "specific" cultures.
+	// For example, the culture "es-CL" means "Spanish, in Chili".
+	// It represents the Spanish-speaking culture as it is in Chili,
+	// which might have different formatting rules or even translations
+	// than Spanish in Spain. A "neutral" culture is one that is not
+	// specific to a region. For example, the culture "es" is the generic
+	// Spanish culture, which may be a more generalized version of the language
+	// that may or may not be what a specific culture expects.
+	// For a specific culture like "es-CL", the "language" field refers to the
+	// neutral, generic culture information for the language it is using.
+	// This is not always a simple matter of the string before the dash.
+	// For example, the "zh-Hans" culture is netural (Simplified Chinese).
+	// And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage
+	// field is "zh-CHS", not "zh".
+	// This field should be used to navigate from a specific culture to it's
+	// more general, neutral culture. If a culture is already as general as it
+	// can get, the language may refer to itself.
+	language: "en",
+	// numberFormat defines general number formatting rules, like the digits in
+	// each grouping, the group separator, and how negative numbers are displayed.
+	numberFormat: {
+		// [negativePattern]
+		// Note, numberFormat.pattern has no "positivePattern" unlike percent and currency,
+		// but is still defined as an array for consistency with them.
+		//   negativePattern: one of "(n)|-n|- n|n-|n -"
+		pattern: [ "-n" ],
+		// number of decimal places normally shown
+		decimals: 2,
+		// string that separates number groups, as in 1,000,000
+		",": ",",
+		// string that separates a number from the fractional portion, as in 1.99
+		".": ".",
+		// array of numbers indicating the size of each number group.
+		// TODO: more detailed description and example
+		groupSizes: [ 3 ],
+		// symbol used for positive numbers
+		"+": "+",
+		// symbol used for negative numbers
+		"-": "-",
+		// symbol used for NaN (Not-A-Number)
+		"NaN": "NaN",
+		// symbol used for Negative Infinity
+		negativeInfinity: "-Infinity",
+		// symbol used for Positive Infinity
+		positiveInfinity: "Infinity",
+		percent: {
+			// [negativePattern, positivePattern]
+			//   negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %"
+			//   positivePattern: one of "n %|n%|%n|% n"
+			pattern: [ "-n %", "n %" ],
+			// number of decimal places normally shown
+			decimals: 2,
+			// array of numbers indicating the size of each number group.
+			// TODO: more detailed description and example
+			groupSizes: [ 3 ],
+			// string that separates number groups, as in 1,000,000
+			",": ",",
+			// string that separates a number from the fractional portion, as in 1.99
+			".": ".",
+			// symbol used to represent a percentage
+			symbol: "%"
+		},
+		currency: {
+			// [negativePattern, positivePattern]
+			//   negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
+			//   positivePattern: one of "$n|n$|$ n|n $"
+			pattern: [ "($n)", "$n" ],
+			// number of decimal places normally shown
+			decimals: 2,
+			// array of numbers indicating the size of each number group.
+			// TODO: more detailed description and example
+			groupSizes: [ 3 ],
+			// string that separates number groups, as in 1,000,000
+			",": ",",
+			// string that separates a number from the fractional portion, as in 1.99
+			".": ".",
+			// symbol used to represent currency
+			symbol: "$"
+		}
+	},
+	// calendars defines all the possible calendars used by this culture.
+	// There should be at least one defined with name "standard", and is the default
+	// calendar used by the culture.
+	// A calendar contains information about how dates are formatted, information about
+	// the calendar's eras, a standard set of the date formats,
+	// translations for day and month names, and if the calendar is not based on the Gregorian
+	// calendar, conversion functions to and from the Gregorian calendar.
+	calendars: {
+		standard: {
+			// name that identifies the type of calendar this is
+			name: "Gregorian_USEnglish",
+			// separator of parts of a date (e.g. "/" in 11/05/1955)
+			"/": "/",
+			// separator of parts of a time (e.g. ":" in 05:44 PM)
+			":": ":",
+			// the first day of the week (0 = Sunday, 1 = Monday, etc)
+			firstDay: 0,
+			days: {
+				// full day names
+				names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
+				// abbreviated day names
+				namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
+				// shortest day names
+				namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ]
+			},
+			months: {
+				// full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
+				names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ],
+				// abbreviated month names
+				namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ]
+			},
+			// AM and PM designators in one of these forms:
+			// The usual view, and the upper and lower case versions
+			//   [ standard, lowercase, uppercase ]
+			// The culture does not use AM or PM (likely all standard date formats use 24 hour time)
+			//   null
+			AM: [ "AM", "am", "AM" ],
+			PM: [ "PM", "pm", "PM" ],
+			eras: [
+				// eras in reverse chronological order.
+				// name: the name of the era in this culture (e.g. A.D., C.E.)
+				// start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
+				// offset: offset in years from gregorian calendar
+				{
+					"name": "A.D.",
+					"start": null,
+					"offset": 0
+				}
+			],
+			// when a two digit year is given, it will never be parsed as a four digit
+			// year greater than this year (in the appropriate era for the culture)
+			// Set it as a full year (e.g. 2029) or use an offset format starting from
+			// the current year: "+19" would correspond to 2029 if the current year 2010.
+			twoDigitYearMax: 2029,
+			// set of predefined date and time patterns used by the culture
+			// these represent the format someone in this culture would expect
+			// to see given the portions of the date that are shown.
+			patterns: {
+				// short date pattern
+				d: "M/d/yyyy",
+				// long date pattern
+				D: "dddd, MMMM dd, yyyy",
+				// short time pattern
+				t: "h:mm tt",
+				// long time pattern
+				T: "h:mm:ss tt",
+				// long date, short time pattern
+				f: "dddd, MMMM dd, yyyy h:mm tt",
+				// long date, long time pattern
+				F: "dddd, MMMM dd, yyyy h:mm:ss tt",
+				// month/day pattern
+				M: "MMMM dd",
+				// month/year pattern
+				Y: "yyyy MMMM",
+				// S is a sortable format that does not vary by culture
+				S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
+			}
+			// optional fields for each calendar:
+			/*
+			monthsGenitive:
+				Same as months but used when the day preceeds the month.
+				Omit if the culture has no genitive distinction in month names.
+				For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx
+			convert:
+				Allows for the support of non-gregorian based calendars. This convert object is used to
+				to convert a date to and from a gregorian calendar date to handle parsing and formatting.
+				The two functions:
+					fromGregorian( date )
+						Given the date as a parameter, return an array with parts [ year, month, day ]
+						corresponding to the non-gregorian based year, month, and day for the calendar.
+					toGregorian( year, month, day )
+						Given the non-gregorian year, month, and day, return a new Date() object
+						set to the corresponding date in the gregorian calendar.
+			*/
+		}
+	},
+	// For localized strings
+	messages: {}
+};
+
+Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard;
+
+Globalize.cultures.en = Globalize.cultures[ "default" ];
+
+Globalize.cultureSelector = "en";
+
+//
+// private variables
+//
+
+regexHex = /^0x[a-f0-9]+$/i;
+regexInfinity = /^[+\-]?infinity$/i;
+regexParseFloat = /^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/;
+regexTrim = /^\s+|\s+$/g;
+
+//
+// private JavaScript utility functions
+//
+
+arrayIndexOf = function( array, item ) {
+	if ( array.indexOf ) {
+		return array.indexOf( item );
+	}
+	for ( var i = 0, length = array.length; i < length; i++ ) {
+		if ( array[i] === item ) {
+			return i;
+		}
+	}
+	return -1;
+};
+
+endsWith = function( value, pattern ) {
+	return value.substr( value.length - pattern.length ) === pattern;
+};
+
+extend = function() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !isFunction(target) ) {
+		target = {};
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && isArray(src) ? src : [];
+
+					} else {
+						clone = src && isObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+isArray = Array.isArray || function( obj ) {
+	return Object.prototype.toString.call( obj ) === "[object Array]";
+};
+
+isFunction = function( obj ) {
+	return Object.prototype.toString.call( obj ) === "[object Function]";
+};
+
+isObject = function( obj ) {
+	return Object.prototype.toString.call( obj ) === "[object Object]";
+};
+
+startsWith = function( value, pattern ) {
+	return value.indexOf( pattern ) === 0;
+};
+
+trim = function( value ) {
+	return ( value + "" ).replace( regexTrim, "" );
+};
+
+truncate = function( value ) {
+	if ( isNaN( value ) ) {
+		return NaN;
+	}
+	return Math[ value < 0 ? "ceil" : "floor" ]( value );
+};
+
+zeroPad = function( str, count, left ) {
+	var l;
+	for ( l = str.length; l < count; l += 1 ) {
+		str = ( left ? ("0" + str) : (str + "0") );
+	}
+	return str;
+};
+
+//
+// private Globalization utility functions
+//
+
+appendPreOrPostMatch = function( preMatch, strings ) {
+	// appends pre- and post- token match strings while removing escaped characters.
+	// Returns a single quote count which is used to determine if the token occurs
+	// in a string literal.
+	var quoteCount = 0,
+		escaped = false;
+	for ( var i = 0, il = preMatch.length; i < il; i++ ) {
+		var c = preMatch.charAt( i );
+		switch ( c ) {
+			case "\'":
+				if ( escaped ) {
+					strings.push( "\'" );
+				}
+				else {
+					quoteCount++;
+				}
+				escaped = false;
+				break;
+			case "\\":
+				if ( escaped ) {
+					strings.push( "\\" );
+				}
+				escaped = !escaped;
+				break;
+			default:
+				strings.push( c );
+				escaped = false;
+				break;
+		}
+	}
+	return quoteCount;
+};
+
+expandFormat = function( cal, format ) {
+	// expands unspecified or single character date formats into the full pattern.
+	format = format || "F";
+	var pattern,
+		patterns = cal.patterns,
+		len = format.length;
+	if ( len === 1 ) {
+		pattern = patterns[ format ];
+		if ( !pattern ) {
+			throw "Invalid date format string \'" + format + "\'.";
+		}
+		format = pattern;
+	}
+	else if ( len === 2 && format.charAt(0) === "%" ) {
+		// %X escape format -- intended as a custom format string that is only one character, not a built-in format.
+		format = format.charAt( 1 );
+	}
+	return format;
+};
+
+formatDate = function( value, format, culture ) {
+	var cal = culture.calendar,
+		convert = cal.convert,
+		ret;
+
+	if ( !format || !format.length || format === "i" ) {
+		if ( culture && culture.name.length ) {
+			if ( convert ) {
+				// non-gregorian calendar, so we cannot use built-in toLocaleString()
+				ret = formatDate( value, cal.patterns.F, culture );
+			}
+			else {
+				var eraDate = new Date( value.getTime() ),
+					era = getEra( value, cal.eras );
+				eraDate.setFullYear( getEraYear(value, cal, era) );
+				ret = eraDate.toLocaleString();
+			}
+		}
+		else {
+			ret = value.toString();
+		}
+		return ret;
+	}
+
+	var eras = cal.eras,
+		sortable = format === "s";
+	format = expandFormat( cal, format );
+
+	// Start with an empty string
+	ret = [];
+	var hour,
+		zeros = [ "0", "00", "000" ],
+		foundDay,
+		checkedDay,
+		dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
+		quoteCount = 0,
+		tokenRegExp = getTokenRegExp(),
+		converted;
+
+	//function padZeros( num, c ) {
+	//	var r, s = num + "";
+	//	if ( c > 1 && s.length < c ) {
+	//		r = ( zeros[c - 2] + s);
+	//		return r.substr( r.length - c, c );
+	//	}
+	//	else {
+	//		r = s;
+	//	}
+	//	return r;
+	//}
+
+	function padZeros(num, c) {
+	    if (num < 0) {
+	        return "-" + padZeros(-num, c);
+	    }
+	    var r, s = num + "";
+	    if (c > 1 && s.length < c) {
+	        r = (zeros[c - 2] + s);
+	        return r.substr(r.length - c, c);
+	    }
+	    else {
+	        r = s;
+	    }
+	    return r;
+	}
+
+	function hasDay() {
+		if ( foundDay || checkedDay ) {
+			return foundDay;
+		}
+		foundDay = dayPartRegExp.test( format );
+		checkedDay = true;
+		return foundDay;
+	}
+
+	function getPart( date, part ) {
+		if ( converted ) {
+			return converted[ part ];
+		}
+		switch ( part ) {
+			case 0:
+				return date.getFullYear();
+			case 1:
+				return date.getMonth();
+			case 2:
+				return date.getDate();
+			default:
+				throw "Invalid part value " + part;
+		}
+	}
+
+	if ( !sortable && convert ) {
+		converted = convert.fromGregorian( value );
+	}
+
+	for ( ; ; ) {
+		// Save the current index
+		var index = tokenRegExp.lastIndex,
+			// Look for the next pattern
+			ar = tokenRegExp.exec( format );
+
+		// Append the text before the pattern (or the end of the string if not found)
+		var preMatch = format.slice( index, ar ? ar.index : format.length );
+		quoteCount += appendPreOrPostMatch( preMatch, ret );
+
+		if ( !ar ) {
+			break;
+		}
+
+		// do not replace any matches that occur inside a string literal.
+		if ( quoteCount % 2 ) {
+			ret.push( ar[0] );
+			continue;
+		}
+
+		var current = ar[ 0 ],
+			clength = current.length;
+
+		switch ( current ) {
+			case "ddd":
+				//Day of the week, as a three-letter abbreviation
+			case "dddd":
+				// Day of the week, using the full name
+				var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names;
+				ret.push( names[value.getDay()] );
+				break;
+			case "d":
+				// Day of month, without leading zero for single-digit days
+			case "dd":
+				// Day of month, with leading zero for single-digit days
+				foundDay = true;
+				ret.push(
+					padZeros( getPart(value, 2), clength )
+				);
+				break;
+			case "MMM":
+				// Month, as a three-letter abbreviation
+			case "MMMM":
+				// Month, using the full name
+				var part = getPart( value, 1 );
+				ret.push(
+					( cal.monthsGenitive && hasDay() ) ?
+					( cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) :
+					( cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] )
+				);
+				break;
+			case "M":
+				// Month, as digits, with no leading zero for single-digit months
+			case "MM":
+				// Month, as digits, with leading zero for single-digit months
+				ret.push(
+					padZeros( getPart(value, 1) + 1, clength )
+				);
+				break;
+			case "y":
+				// Year, as two digits, but with no leading zero for years less than 10
+			case "yy":
+				// Year, as two digits, with leading zero for years less than 10
+			case "yyyy":
+				// Year represented by four full digits
+				part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable );
+				if ( clength < 4 ) {
+					part = part % 100;
+				}
+				ret.push(
+					padZeros( part, clength )
+				);
+				break;
+			case "h":
+				// Hours with no leading zero for single-digit hours, using 12-hour clock
+			case "hh":
+				// Hours with leading zero for single-digit hours, using 12-hour clock
+				hour = value.getHours() % 12;
+				if ( hour === 0 ) hour = 12;
+				ret.push(
+					padZeros( hour, clength )
+				);
+				break;
+			case "H":
+				// Hours with no leading zero for single-digit hours, using 24-hour clock
+			case "HH":
+				// Hours with leading zero for single-digit hours, using 24-hour clock
+				ret.push(
+					padZeros( value.getHours(), clength )
+				);
+				break;
+			case "m":
+				// Minutes with no leading zero for single-digit minutes
+			case "mm":
+				// Minutes with leading zero for single-digit minutes
+				ret.push(
+					padZeros( value.getMinutes(), clength )
+				);
+				break;
+			case "s":
+				// Seconds with no leading zero for single-digit seconds
+			case "ss":
+				// Seconds with leading zero for single-digit seconds
+				ret.push(
+					padZeros( value.getSeconds(), clength )
+				);
+				break;
+			case "t":
+				// One character am/pm indicator ("a" or "p")
+			case "tt":
+				// Multicharacter am/pm indicator
+				part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " );
+				ret.push( clength === 1 ? part.charAt(0) : part );
+				break;
+			case "f":
+				// Deciseconds
+			case "ff":
+				// Centiseconds
+			case "fff":
+				// Milliseconds
+				ret.push(
+					padZeros( value.getMilliseconds(), 3 ).substr( 0, clength )
+				);
+				break;
+			case "z":
+				// Time zone offset, no leading zero
+			case "zz":
+				// Time zone offset with leading zero
+				hour = value.getTimezoneOffset() / 60;
+				ret.push(
+					( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength )
+				);
+				break;
+			case "zzz":
+				// Time zone offset with leading zero
+				hour = value.getTimezoneOffset() / 60;
+				ret.push(
+					( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 ) +
+					// Hard coded ":" separator, rather than using cal.TimeSeparator
+					// Repeated here for consistency, plus ":" was already assumed in date parsing.
+					":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 )
+				);
+				break;
+			case "g":
+			case "gg":
+				if ( cal.eras ) {
+					ret.push(
+						cal.eras[ getEra(value, eras) ].name
+					);
+				}
+				break;
+		case "/":
+			ret.push( cal["/"] );
+			break;
+		default:
+			throw "Invalid date format pattern \'" + current + "\'.";
+		}
+	}
+	return ret.join( "" );
+};
+
+// formatNumber
+(function() {
+	var expandNumber;
+
+	expandNumber = function( number, precision, formatInfo ) {
+		var groupSizes = formatInfo.groupSizes,
+			curSize = groupSizes[ 0 ],
+			curGroupIndex = 1,
+			factor = Math.pow( 10, precision ),
+			rounded = Math.round( number * factor ) / factor;
+
+		if ( !isFinite(rounded) ) {
+			rounded = number;
+		}
+		number = rounded;
+
+		var numberString = number+"",
+			right = "",
+			split = numberString.split( /e/i ),
+			exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0;
+		numberString = split[ 0 ];
+		split = numberString.split( "." );
+		numberString = split[ 0 ];
+		right = split.length > 1 ? split[ 1 ] : "";
+
+		var l;
+		if ( exponent > 0 ) {
+			right = zeroPad( right, exponent, false );
+			numberString += right.slice( 0, exponent );
+			right = right.substr( exponent );
+		}
+		else if ( exponent < 0 ) {
+			exponent = -exponent;
+			numberString = zeroPad( numberString, exponent + 1, true );
+			right = numberString.slice( -exponent, numberString.length ) + right;
+			numberString = numberString.slice( 0, -exponent );
+		}
+
+		if ( precision > 0 ) {
+			right = formatInfo[ "." ] +
+				( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) );
+		}
+		else {
+			right = "";
+		}
+
+		var stringIndex = numberString.length - 1,
+			sep = formatInfo[ "," ],
+			ret = "";
+
+		while ( stringIndex >= 0 ) {
+			if ( curSize === 0 || curSize > stringIndex ) {
+				return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right );
+			}
+			ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" );
+
+			stringIndex -= curSize;
+
+			if ( curGroupIndex < groupSizes.length ) {
+				curSize = groupSizes[ curGroupIndex ];
+				curGroupIndex++;
+			}
+		}
+
+		return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right;
+	};
+
+	formatNumber = function( value, format, culture ) {
+		if ( !isFinite(value) ) {
+			if ( value === Infinity ) {
+				return culture.numberFormat.positiveInfinity;
+			}
+			if ( value === -Infinity ) {
+				return culture.numberFormat.negativeInfinity;
+			}
+			return culture.numberFormat.NaN;
+		}
+		if ( !format || format === "i" ) {
+			return culture.name.length ? value.toLocaleString() : value.toString();
+		}
+		format = format || "D";
+
+		var nf = culture.numberFormat,
+			number = Math.abs( value ),
+			precision = -1,
+			pattern;
+		if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 );
+
+		var current = format.charAt( 0 ).toUpperCase(),
+			formatInfo;
+
+		switch ( current ) {
+			case "D":
+				pattern = "n";
+				number = truncate( number );
+				if ( precision !== -1 ) {
+					number = zeroPad( "" + number, precision, true );
+				}
+				if ( value < 0 ) number = "-" + number;
+				break;
+			case "N":
+				formatInfo = nf;
+				/* falls through */
+			case "C":
+				formatInfo = formatInfo || nf.currency;
+				/* falls through */
+			case "P":
+				formatInfo = formatInfo || nf.percent;
+				pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" );
+				if ( precision === -1 ) precision = formatInfo.decimals;
+				number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo );
+				break;
+			default:
+				throw "Bad number format specifier: " + current;
+		}
+
+		var patternParts = /n|\$|-|%/g,
+			ret = "";
+		for ( ; ; ) {
+			var index = patternParts.lastIndex,
+				ar = patternParts.exec( pattern );
+
+			ret += pattern.slice( index, ar ? ar.index : pattern.length );
+
+			if ( !ar ) {
+				break;
+			}
+
+			switch ( ar[0] ) {
+				case "n":
+					ret += number;
+					break;
+				case "$":
+					ret += nf.currency.symbol;
+					break;
+				case "-":
+					// don't make 0 negative
+					if ( /[1-9]/.test(number) ) {
+						ret += nf[ "-" ];
+					}
+					break;
+				case "%":
+					ret += nf.percent.symbol;
+					break;
+			}
+		}
+
+		return ret;
+	};
+
+}());
+
+getTokenRegExp = function() {
+	// regular expression for matching date and time tokens in format strings.
+	return (/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g);
+};
+
+getEra = function( date, eras ) {
+	if ( !eras ) return 0;
+	var start, ticks = date.getTime();
+	for ( var i = 0, l = eras.length; i < l; i++ ) {
+		start = eras[ i ].start;
+		if ( start === null || ticks >= start ) {
+			return i;
+		}
+	}
+	return 0;
+};
+
+getEraYear = function( date, cal, era, sortable ) {
+	var year = date.getFullYear();
+	if ( !sortable && cal.eras ) {
+		// convert normal gregorian year to era-shifted gregorian
+		// year by subtracting the era offset
+		year -= cal.eras[ era ].offset;
+	}
+	return year;
+};
+
+// parseExact
+(function() {
+	var expandYear,
+		getDayIndex,
+		getMonthIndex,
+		getParseRegExp,
+		outOfRange,
+		toUpper,
+		toUpperArray;
+
+	expandYear = function( cal, year ) {
+		// expands 2-digit year into 4 digits.
+		if ( year < 100 ) {
+			var now = new Date(),
+				era = getEra( now ),
+				curr = getEraYear( now, cal, era ),
+				twoDigitYearMax = cal.twoDigitYearMax;
+			twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax;
+			year += curr - ( curr % 100 );
+			if ( year > twoDigitYearMax ) {
+				year -= 100;
+			}
+		}
+		return year;
+	};
+
+	getDayIndex = function	( cal, value, abbr ) {
+		var ret,
+			days = cal.days,
+			upperDays = cal._upperDays;
+		if ( !upperDays ) {
+			cal._upperDays = upperDays = [
+				toUpperArray( days.names ),
+				toUpperArray( days.namesAbbr ),
+				toUpperArray( days.namesShort )
+			];
+		}
+		value = toUpper( value );
+		if ( abbr ) {
+			ret = arrayIndexOf( upperDays[1], value );
+			if ( ret === -1 ) {
+				ret = arrayIndexOf( upperDays[2], value );
+			}
+		}
+		else {
+			ret = arrayIndexOf( upperDays[0], value );
+		}
+		return ret;
+	};
+
+	getMonthIndex = function( cal, value, abbr ) {
+		var months = cal.months,
+			monthsGen = cal.monthsGenitive || cal.months,
+			upperMonths = cal._upperMonths,
+			upperMonthsGen = cal._upperMonthsGen;
+		if ( !upperMonths ) {
+			cal._upperMonths = upperMonths = [
+				toUpperArray( months.names ),
+				toUpperArray( months.namesAbbr )
+			];
+			cal._upperMonthsGen = upperMonthsGen = [
+				toUpperArray( monthsGen.names ),
+				toUpperArray( monthsGen.namesAbbr )
+			];
+		}
+		value = toUpper( value );
+		var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value );
+		if ( i < 0 ) {
+			i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value );
+		}
+		return i;
+	};
+
+	getParseRegExp = function( cal, format ) {
+		// converts a format string into a regular expression with groups that
+		// can be used to extract date fields from a date string.
+		// check for a cached parse regex.
+		var re = cal._parseRegExp;
+		if ( !re ) {
+			cal._parseRegExp = re = {};
+		}
+		else {
+			var reFormat = re[ format ];
+			if ( reFormat ) {
+				return reFormat;
+			}
+		}
+
+		// expand single digit formats, then escape regular expression characters.
+		var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ),
+			regexp = [ "^" ],
+			groups = [],
+			index = 0,
+			quoteCount = 0,
+			tokenRegExp = getTokenRegExp(),
+			match;
+
+		// iterate through each date token found.
+		while ( (match = tokenRegExp.exec(expFormat)) !== null ) {
+			var preMatch = expFormat.slice( index, match.index );
+			index = tokenRegExp.lastIndex;
+
+			// don't replace any matches that occur inside a string literal.
+			quoteCount += appendPreOrPostMatch( preMatch, regexp );
+			if ( quoteCount % 2 ) {
+				regexp.push( match[0] );
+				continue;
+			}
+
+			// add a regex group for the token.
+			var m = match[ 0 ],
+				len = m.length,
+				add;
+			switch ( m ) {
+				case "dddd": case "ddd":
+				case "MMMM": case "MMM":
+				case "gg": case "g":
+					add = "(\\D+)";
+					break;
+				case "tt": case "t":
+					add = "(\\D*)";
+					break;
+				case "yyyy":
+				case "fff":
+				case "ff":
+				case "f":
+					add = "(\\d{" + len + "})";
+					break;
+				case "dd": case "d":
+				case "MM": case "M":
+				case "yy": case "y":
+				case "HH": case "H":
+				case "hh": case "h":
+				case "mm": case "m":
+				case "ss": case "s":
+					add = "(\\d\\d?)";
+					break;
+				case "zzz":
+					add = "([+-]?\\d\\d?:\\d{2})";
+					break;
+				case "zz": case "z":
+					add = "([+-]?\\d\\d?)";
+					break;
+				case "/":
+					add = "(\\/)";
+					break;
+				default:
+					throw "Invalid date format pattern \'" + m + "\'.";
+			}
+			if ( add ) {
+				regexp.push( add );
+			}
+			groups.push( match[0] );
+		}
+		appendPreOrPostMatch( expFormat.slice(index), regexp );
+		regexp.push( "$" );
+
+		// allow whitespace to differ when matching formats.
+		var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ),
+			parseRegExp = { "regExp": regexpStr, "groups": groups };
+
+		// cache the regex for this format.
+		return re[ format ] = parseRegExp;
+	};
+
+	outOfRange = function( value, low, high ) {
+		return value < low || value > high;
+	};
+
+	toUpper = function( value ) {
+		// "he-IL" has non-breaking space in weekday names.
+		return value.split( "\u00A0" ).join( " " ).toUpperCase();
+	};
+
+	toUpperArray = function( arr ) {
+		var results = [];
+		for ( var i = 0, l = arr.length; i < l; i++ ) {
+			results[ i ] = toUpper( arr[i] );
+		}
+		return results;
+	};
+
+	parseExact = function( value, format, culture ) {
+		// try to parse the date string by matching against the format string
+		// while using the specified culture for date field names.
+		value = trim( value );
+		var cal = culture.calendar,
+			// convert date formats into regular expressions with groupings.
+			// use the regexp to determine the input format and extract the date fields.
+			parseInfo = getParseRegExp( cal, format ),
+			match = new RegExp( parseInfo.regExp ).exec( value );
+		if ( match === null ) {
+			return null;
+		}
+		// found a date format that matches the input.
+		var groups = parseInfo.groups,
+			era = null, year = null, month = null, date = null, weekDay = null,
+			hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,
+			pmHour = false;
+		// iterate the format groups to extract and set the date fields.
+		for ( var j = 0, jl = groups.length; j < jl; j++ ) {
+			var matchGroup = match[ j + 1 ];
+			if ( matchGroup ) {
+				var current = groups[ j ],
+					clength = current.length,
+					matchInt = parseInt( matchGroup, 10 );
+				switch ( current ) {
+					case "dd": case "d":
+						// Day of month.
+						date = matchInt;
+						// check that date is generally in valid range, also checking overflow below.
+						if ( outOfRange(date, 1, 31) ) return null;
+						break;
+					case "MMM": case "MMMM":
+						month = getMonthIndex( cal, matchGroup, clength === 3 );
+						if ( outOfRange(month, 0, 11) ) return null;
+						break;
+					case "M": case "MM":
+						// Month.
+						month = matchInt - 1;
+						if ( outOfRange(month, 0, 11) ) return null;
+						break;
+					case "y": case "yy":
+					case "yyyy":
+						year = clength < 4 ? expandYear( cal, matchInt ) : matchInt;
+						if ( outOfRange(year, 0, 9999) ) return null;
+						break;
+					case "h": case "hh":
+						// Hours (12-hour clock).
+						hour = matchInt;
+						if ( hour === 12 ) hour = 0;
+						if ( outOfRange(hour, 0, 11) ) return null;
+						break;
+					case "H": case "HH":
+						// Hours (24-hour clock).
+						hour = matchInt;
+						if ( outOfRange(hour, 0, 23) ) return null;
+						break;
+					case "m": case "mm":
+						// Minutes.
+						min = matchInt;
+						if ( outOfRange(min, 0, 59) ) return null;
+						break;
+					case "s": case "ss":
+						// Seconds.
+						sec = matchInt;
+						if ( outOfRange(sec, 0, 59) ) return null;
+						break;
+					case "tt": case "t":
+						// AM/PM designator.
+						// see if it is standard, upper, or lower case PM. If not, ensure it is at least one of
+						// the AM tokens. If not, fail the parse for this format.
+						pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] );
+						if (
+							!pmHour && (
+								!cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] )
+							)
+						) return null;
+						break;
+					case "f":
+						// Deciseconds.
+					case "ff":
+						// Centiseconds.
+					case "fff":
+						// Milliseconds.
+						msec = matchInt * Math.pow( 10, 3 - clength );
+						if ( outOfRange(msec, 0, 999) ) return null;
+						break;
+					case "ddd":
+						// Day of week.
+					case "dddd":
+						// Day of week.
+						weekDay = getDayIndex( cal, matchGroup, clength === 3 );
+						if ( outOfRange(weekDay, 0, 6) ) return null;
+						break;
+					case "zzz":
+						// Time zone offset in +/- hours:min.
+						var offsets = matchGroup.split( /:/ );
+						if ( offsets.length !== 2 ) return null;
+						hourOffset = parseInt( offsets[0], 10 );
+						if ( outOfRange(hourOffset, -12, 13) ) return null;
+						var minOffset = parseInt( offsets[1], 10 );
+						if ( outOfRange(minOffset, 0, 59) ) return null;
+						tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset );
+						break;
+					case "z": case "zz":
+						// Time zone offset in +/- hours.
+						hourOffset = matchInt;
+						if ( outOfRange(hourOffset, -12, 13) ) return null;
+						tzMinOffset = hourOffset * 60;
+						break;
+					case "g": case "gg":
+						var eraName = matchGroup;
+						if ( !eraName || !cal.eras ) return null;
+						eraName = trim( eraName.toLowerCase() );
+						for ( var i = 0, l = cal.eras.length; i < l; i++ ) {
+							if ( eraName === cal.eras[i].name.toLowerCase() ) {
+								era = i;
+								break;
+							}
+						}
+						// could not find an era with that name
+						if ( era === null ) return null;
+						break;
+				}
+			}
+		}
+		var result = new Date(), defaultYear, convert = cal.convert;
+		defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear();
+		if ( year === null ) {
+			year = defaultYear;
+		}
+		else if ( cal.eras ) {
+			// year must be shifted to normal gregorian year
+			// but not if year was not specified, its already normal gregorian
+			// per the main if clause above.
+			year += cal.eras[( era || 0 )].offset;
+		}
+		// set default day and month to 1 and January, so if unspecified, these are the defaults
+		// instead of the current day/month.
+		if ( month === null ) {
+			month = 0;
+		}
+		if ( date === null ) {
+			date = 1;
+		}
+		// now have year, month, and date, but in the culture's calendar.
+		// convert to gregorian if necessary
+		if ( convert ) {
+			result = convert.toGregorian( year, month, date );
+			// conversion failed, must be an invalid match
+			if ( result === null ) return null;
+		}
+		else {
+			// have to set year, month and date together to avoid overflow based on current date.
+			result.setFullYear( year, month, date );
+			// check to see if date overflowed for specified month (only checked 1-31 above).
+			if ( result.getDate() !== date ) return null;
+			// invalid day of week.
+			if ( weekDay !== null && result.getDay() !== weekDay ) {
+				return null;
+			}
+		}
+		// if pm designator token was found make sure the hours fit the 24-hour clock.
+		if ( pmHour && hour < 12 ) {
+			hour += 12;
+		}
+		result.setHours( hour, min, sec, msec );
+		if ( tzMinOffset !== null ) {
+			// adjust timezone to utc before applying local offset.
+			var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() );
+			// Safari limits hours and minutes to the range of -127 to 127.  We need to use setHours
+			// to ensure both these fields will not exceed this range.	adjustedMin will range
+			// somewhere between -1440 and 1500, so we only need to split this into hours.
+			result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 );
+		}
+		return result;
+	};
+}());
+
+parseNegativePattern = function( value, nf, negativePattern ) {
+	var neg = nf[ "-" ],
+		pos = nf[ "+" ],
+		ret;
+	switch ( negativePattern ) {
+		case "n -":
+			neg = " " + neg;
+			pos = " " + pos;
+			/* falls through */
+		case "n-":
+			if ( endsWith(value, neg) ) {
+				ret = [ "-", value.substr(0, value.length - neg.length) ];
+			}
+			else if ( endsWith(value, pos) ) {
+				ret = [ "+", value.substr(0, value.length - pos.length) ];
+			}
+			break;
+		case "- n":
+			neg += " ";
+			pos += " ";
+			/* falls through */
+		case "-n":
+			if ( startsWith(value, neg) ) {
+				ret = [ "-", value.substr(neg.length) ];
+			}
+			else if ( startsWith(value, pos) ) {
+				ret = [ "+", value.substr(pos.length) ];
+			}
+			break;
+		case "(n)":
+			if ( startsWith(value, "(") && endsWith(value, ")") ) {
+				ret = [ "-", value.substr(1, value.length - 2) ];
+			}
+			break;
+	}
+	return ret || [ "", value ];
+};
+
+//
+// public instance functions
+//
+
+Globalize.prototype.findClosestCulture = function( cultureSelector ) {
+	return Globalize.findClosestCulture.call( this, cultureSelector );
+};
+
+Globalize.prototype.format = function( value, format, cultureSelector ) {
+	return Globalize.format.call( this, value, format, cultureSelector );
+};
+
+Globalize.prototype.localize = function( key, cultureSelector ) {
+	return Globalize.localize.call( this, key, cultureSelector );
+};
+
+Globalize.prototype.parseInt = function( value, radix, cultureSelector ) {
+	return Globalize.parseInt.call( this, value, radix, cultureSelector );
+};
+
+Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) {
+	return Globalize.parseFloat.call( this, value, radix, cultureSelector );
+};
+
+Globalize.prototype.culture = function( cultureSelector ) {
+	return Globalize.culture.call( this, cultureSelector );
+};
+
+//
+// public singleton functions
+//
+
+Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) {
+
+	var base = {},
+		isNew = false;
+
+	if ( typeof cultureName !== "string" ) {
+		// cultureName argument is optional string. If not specified, assume info is first
+		// and only argument. Specified info deep-extends current culture.
+		info = cultureName;
+		cultureName = this.culture().name;
+		base = this.cultures[ cultureName ];
+	} else if ( typeof baseCultureName !== "string" ) {
+		// baseCultureName argument is optional string. If not specified, assume info is second
+		// argument. Specified info deep-extends specified culture.
+		// If specified culture does not exist, create by deep-extending default
+		info = baseCultureName;
+		isNew = ( this.cultures[ cultureName ] == null );
+		base = this.cultures[ cultureName ] || this.cultures[ "default" ];
+	} else {
+		// cultureName and baseCultureName specified. Assume a new culture is being created
+		// by deep-extending an specified base culture
+		isNew = true;
+		base = this.cultures[ baseCultureName ];
+	}
+
+	this.cultures[ cultureName ] = extend(true, {},
+		base,
+		info
+	);
+	// Make the standard calendar the current culture if it's a new culture
+	if ( isNew ) {
+		this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard;
+	}
+};
+
+Globalize.findClosestCulture = function( name ) {
+	var match;
+	if ( !name ) {
+		return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ];
+	}
+	if ( typeof name === "string" ) {
+		name = name.split( "," );
+	}
+	if ( isArray(name) ) {
+		var lang,
+			cultures = this.cultures,
+			list = name,
+			i, l = list.length,
+			prioritized = [];
+		for ( i = 0; i < l; i++ ) {
+			name = trim( list[i] );
+			var pri, parts = name.split( ";" );
+			lang = trim( parts[0] );
+			if ( parts.length === 1 ) {
+				pri = 1;
+			}
+			else {
+				name = trim( parts[1] );
+				if ( name.indexOf("q=") === 0 ) {
+					name = name.substr( 2 );
+					pri = parseFloat( name );
+					pri = isNaN( pri ) ? 0 : pri;
+				}
+				else {
+					pri = 1;
+				}
+			}
+			prioritized.push({ lang: lang, pri: pri });
+		}
+		prioritized.sort(function( a, b ) {
+			if ( a.pri < b.pri ) {
+				return 1;
+			} else if ( a.pri > b.pri ) {
+				return -1;
+			}
+			return 0;
+		});
+		// exact match
+		for ( i = 0; i < l; i++ ) {
+			lang = prioritized[ i ].lang;
+			match = cultures[ lang ];
+			if ( match ) {
+				return match;
+			}
+		}
+
+		// neutral language match
+		for ( i = 0; i < l; i++ ) {
+			lang = prioritized[ i ].lang;
+			do {
+				var index = lang.lastIndexOf( "-" );
+				if ( index === -1 ) {
+					break;
+				}
+				// strip off the last part. e.g. en-US => en
+				lang = lang.substr( 0, index );
+				match = cultures[ lang ];
+				if ( match ) {
+					return match;
+				}
+			}
+			while ( 1 );
+		}
+
+		// last resort: match first culture using that language
+		for ( i = 0; i < l; i++ ) {
+			lang = prioritized[ i ].lang;
+			for ( var cultureKey in cultures ) {
+				var culture = cultures[ cultureKey ];
+				if ( culture.language == lang ) {
+					return culture;
+				}
+			}
+		}
+	}
+	else if ( typeof name === "object" ) {
+		return name;
+	}
+	return match || null;
+};
+
+Globalize.format = function( value, format, cultureSelector ) {
+	var culture = this.findClosestCulture( cultureSelector );
+	if ( value instanceof Date ) {
+		value = formatDate( value, format, culture );
+	}
+	else if ( typeof value === "number" ) {
+		value = formatNumber( value, format, culture );
+	}
+	return value;
+};
+
+Globalize.localize = function( key, cultureSelector ) {
+	return this.findClosestCulture( cultureSelector ).messages[ key ] ||
+		this.cultures[ "default" ].messages[ key ];
+};
+
+Globalize.parseDate = function( value, formats, culture ) {
+	culture = this.findClosestCulture( culture );
+
+	var date, prop, patterns;
+	if ( formats ) {
+		if ( typeof formats === "string" ) {
+			formats = [ formats ];
+		}
+		if ( formats.length ) {
+			for ( var i = 0, l = formats.length; i < l; i++ ) {
+				var format = formats[ i ];
+				if ( format ) {
+					date = parseExact( value, format, culture );
+					if ( date ) {
+						break;
+					}
+				}
+			}
+		}
+	} else {
+		patterns = culture.calendar.patterns;
+		for ( prop in patterns ) {
+			date = parseExact( value, patterns[prop], culture );
+			if ( date ) {
+				break;
+			}
+		}
+	}
+
+	return date || null;
+};
+
+Globalize.parseInt = function( value, radix, cultureSelector ) {
+	return truncate( Globalize.parseFloat(value, radix, cultureSelector) );
+};
+
+Globalize.parseFloat = function( value, radix, cultureSelector ) {
+	// radix argument is optional
+	if ( typeof radix !== "number" ) {
+		cultureSelector = radix;
+		radix = 10;
+	}
+
+	var culture = this.findClosestCulture( cultureSelector );
+	var ret = NaN,
+		nf = culture.numberFormat;
+
+	if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) {
+		// remove currency symbol
+		value = value.replace( culture.numberFormat.currency.symbol, "" );
+		// replace decimal seperator
+		value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] );
+	}
+
+	//Remove percentage character from number string before parsing
+	if ( value.indexOf(culture.numberFormat.percent.symbol) > -1){
+		value = value.replace( culture.numberFormat.percent.symbol, "" );
+	}
+
+	// remove spaces: leading, trailing and between - and number. Used for negative currency pt-BR
+	value = value.replace( / /g, "" );
+
+	// allow infinity or hexidecimal
+	if ( regexInfinity.test(value) ) {
+		ret = parseFloat( value );
+	}
+	else if ( !radix && regexHex.test(value) ) {
+		ret = parseInt( value, 16 );
+	}
+	else {
+
+		// determine sign and number
+		var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ),
+			sign = signInfo[ 0 ],
+			num = signInfo[ 1 ];
+
+		// #44 - try parsing as "(n)"
+		if ( sign === "" && nf.pattern[0] !== "(n)" ) {
+			signInfo = parseNegativePattern( value, nf, "(n)" );
+			sign = signInfo[ 0 ];
+			num = signInfo[ 1 ];
+		}
+
+		// try parsing as "-n"
+		if ( sign === "" && nf.pattern[0] !== "-n" ) {
+			signInfo = parseNegativePattern( value, nf, "-n" );
+			sign = signInfo[ 0 ];
+			num = signInfo[ 1 ];
+		}
+
+		sign = sign || "+";
+
+		// determine exponent and number
+		var exponent,
+			intAndFraction,
+			exponentPos = num.indexOf( "e" );
+		if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" );
+		if ( exponentPos < 0 ) {
+			intAndFraction = num;
+			exponent = null;
+		}
+		else {
+			intAndFraction = num.substr( 0, exponentPos );
+			exponent = num.substr( exponentPos + 1 );
+		}
+		// determine decimal position
+		var integer,
+			fraction,
+			decSep = nf[ "." ],
+			decimalPos = intAndFraction.indexOf( decSep );
+		if ( decimalPos < 0 ) {
+			integer = intAndFraction;
+			fraction = null;
+		}
+		else {
+			integer = intAndFraction.substr( 0, decimalPos );
+			fraction = intAndFraction.substr( decimalPos + decSep.length );
+		}
+		// handle groups (e.g. 1,000,000)
+		var groupSep = nf[ "," ];
+		integer = integer.split( groupSep ).join( "" );
+		var altGroupSep = groupSep.replace( /\u00A0/g, " " );
+		if ( groupSep !== altGroupSep ) {
+			integer = integer.split( altGroupSep ).join( "" );
+		}
+		// build a natively parsable number string
+		var p = sign + integer;
+		if ( fraction !== null ) {
+			p += "." + fraction;
+		}
+		if ( exponent !== null ) {
+			// exponent itself may have a number patternd
+			var expSignInfo = parseNegativePattern( exponent, nf, "-n" );
+			p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ];
+		}
+		if ( regexParseFloat.test(p) ) {
+			ret = parseFloat( p );
+		}
+	}
+	return ret;
+};
+
+Globalize.culture = function( cultureSelector ) {
+	// setter
+	if ( typeof cultureSelector !== "undefined" ) {
+		this.cultureSelector = cultureSelector;
+	}
+	// getter
+	return this.findClosestCulture( cultureSelector ) || this.cultures[ "default" ];
+};
+
+document.Globalize = Globalize;
+}(this));
\ No newline at end of file
--- a/www/jqwidgets/jqx-all.js	Sun May 12 19:41:18 2019 +0200
+++ b/www/jqwidgets/jqx-all.js	Sun May 26 20:45:01 2019 +0200
@@ -1,6 +1,6 @@
 /*
-jQWidgets v6.2.0 (2018-Dec)
-Copyright (c) 2011-2018 jQWidgets.
+jQWidgets v7.2.0 (2019-Apr)
+Copyright (c) 2011-2019 jQWidgets.
 License: https://jqwidgets.com/license/
 */
 /* eslint-disable */
@@ -16,7 +16,7 @@
 
 (function(){var c=[];var a=function(){var d=c;for(var e=0;e<d.length;e++){var g=d[e];var f=false;if(g.element.offsetWidth!==g.width){f=true}if(g.element.offsetHeight!==g.height){f=true}if(f){g.width=g.element.offsetWidth;g.height=g.element.offsetHeight;g.callback()}}};var b=setInterval(function(){a()},100);window.addResizeHandler=function(d,e){c.push({element:d,width:d.offsetWidth,height:d.offsetHeight,callback:e});return};window.removeResizeHandler=function(g){var d=c;var e=-1;for(var f=0;f<d.length;f++){if(d[f].element===g){e=f}}if(e>=0){c.splice(e,1)}return}})();(function(a){if(!a.jqx.elements){a.jqx.elements=new Array()}a.extend(a.event.special,{close:{noBubble:false},open:{noBubble:false}});window.JQXElements={settings:{}};a.jqx.elements.push({name:"jqxCalendar",template:"<div></div>",attributeSync:true,properties:{disabled:{attributeSync:false},width:{type:"length"},height:{type:"length"},min:{type:"date"},max:{type:"date"},value:{type:"date"}}});a.jqx.elements.push({name:"jqxButton",template:"<div></div>"});a.jqx.elements.push({name:"jqxButtonGroup",template:"<div></div>"});a.jqx.elements.push({name:"jqxBulletChart",template:"<div></div>"});a.jqx.elements.push({name:"jqxRadioButton",template:"<div></div>"});a.jqx.elements.push({name:"jqxCheckBox",template:"<div></div>"});a.jqx.elements.push({name:"jqxRepeatButton",template:"<button></button>"});a.jqx.elements.push({name:"jqxSwitchButton",template:"<div></div>"});a.jqx.elements.push({name:"jqxLinkButton",template:"<a></a>"});a.jqx.elements.push({name:"jqxToggleButton",template:"<button></button>"});a.jqx.elements.push({name:"jqxBarGauge",template:"<div></div>"});a.jqx.elements.push({name:"jqxChart",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxColorPicker",template:"<div></div>"});a.jqx.elements.push({name:"jqxComboBox",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxComplexInput",template:"<div><input/><div></div></div>",});a.jqx.elements.push({name:"jqxDraw",template:"<div></div>"});a.jqx.elements.push({name:"jqxDataTable",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxDateTimeInput",template:"<div></div>"});a.jqx.elements.push({name:"jqxDocking",template:"<div></div>"});a.jqx.elements.push({name:"jqxDockPanel",template:"<div></div>"});a.jqx.elements.push({name:"jqxDragDrop",template:"<div></div>"});a.jqx.elements.push({name:"jqxDropDownList",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxDropDownButton",template:"<div></div>"});a.jqx.elements.push({name:"jqxEditor",template:"<div></div>"});a.jqx.elements.push({name:"jqxExpander",template:"<div></div>"});a.jqx.elements.push({name:"jqxFileUpload",template:"<div></div>"});a.jqx.elements.push({name:"jqxFormattedInput",template:"<div><input/><div></div></div>",});a.jqx.elements.push({name:"jqxGauge",template:"<div></div>",propertyMap:{style:"backgroundStyle"}});a.jqx.elements.push({name:"jqxLinearGauge",template:"<div></div>",propertyMap:{style:"backgroundStyle"}});a.jqx.elements.push({name:"jqxGrid",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxPivotGrid",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxPivotDesigner",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxInput",template:"<input/>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxKanban",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxKnob",template:"<div></div>"});a.jqx.elements.push({name:"jqxLayout",template:"<div></div>"});a.jqx.elements.push({name:"jqxDockingLayout",template:"<div></div>"});a.jqx.elements.push({name:"jqxListBox",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxListMenu",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxLoader",template:"<div></div>"});a.jqx.elements.push({name:"jqxMaskedInput",template:"<input/>",});a.jqx.elements.push({name:"jqxMenu",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxNavBar",template:"<div></div>"});a.jqx.elements.push({name:"jqxNavigationBar",template:"<div></div>"});a.jqx.elements.push({name:"jqxNotification",template:"<div></div>",properties:{appendContainer:{type:"string"}}});a.jqx.elements.push({name:"jqxNumberInput",template:"<div></div>"});a.jqx.elements.push({name:"jqxPanel",template:"<div></div>"});a.jqx.elements.push({name:"jqxPasswordInput",template:"<input type='password'/>"});a.jqx.elements.push({name:"jqxPopover",template:"<div></div>",properties:{title:{type:"string"},arrowOffsetValue:{type:"number"},offset:{type:"json"},selector:{type:"string"},initContent:{type:"object"}}});a.jqx.elements.push({name:"jqxProgressBar",template:"<div></div>"});a.jqx.elements.push({name:"jqxRangeSelector",template:"<div></div>"});a.jqx.elements.push({name:"jqxRating",tagName:"jqx-rating",template:"<div></div>"});a.jqx.elements.push({name:"jqxResponsivePanel",template:"<div></div>"});a.jqx.elements.push({name:"jqxRibbon",template:"<div></div>"});a.jqx.elements.push({name:"jqxScheduler",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxSlider",template:"<div></div>"});a.jqx.elements.push({name:"jqxScrollBar",template:"<div></div>"});a.jqx.elements.push({name:"jqxScrollView",template:"<div></div>"});a.jqx.elements.push({name:"jqxSortable",template:"<div></div>",propertyMap:{appendTo:"addTo"}});a.jqx.elements.push({name:"jqxSplitter",template:"<div></div>",properties:{panels:{type:"array"}}});a.jqx.elements.push({name:"jqxTabs",template:"<div></div>"});a.jqx.elements.push({name:"jqxTagCloud",template:"<div></div>"});a.jqx.elements.push({name:"jqxTextArea",template:"<div></div>"});a.jqx.elements.push({name:"jqxToolBar",template:"<div></div>"});a.jqx.elements.push({name:"jqxTooltip",tagName:"jqx-tool-tip",template:"<div></div>"});a.jqx.elements.push({name:"jqxTree",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxTreeGrid",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxTreeMap",template:"<div></div>",properties:{source:{attributeSync:false}}});a.jqx.elements.push({name:"jqxValidator",template:"<div></div>"});a.jqx.elements.push({name:"jqxWindow",template:"<div></div>"});if(document.registerElement){if(!Object.is){Object.is=function(b,c){if(b===c){return b!==0||1/b===1/c}else{return b!==b&&c!==c}}}a(document).ready(function(){a.each(a.jqx.elements,function(){var c=this.name;var j=this;if(!j.tagName){j.tagName=j.name.split(/(?=[A-Z])/).join("-").toLowerCase()}var g=Object.create(HTMLElement.prototype);g.name=c;g.instances=new Array();var i={};var f=(function(){var m={},n=function(q,p,r){if(m[q]===undefined){m[q]={}}m[q][p]=r},o=function(q,p){if(m[q]===undefined||m[q][p]===undefined){return undefined}else{return m[q][p]}},l=function(p){return m[p]};return{addAttributeConfig:n,getAttributeConfig:o,getAttributeList:l}}());if(!a.jqx["_"+c]){return true}var h=a.jqx["_"+c].prototype.defineInstance();if(c=="jqxDockingLayout"){h=a.extend(h,a.jqx._jqxLayout.prototype.defineInstance())}if(c=="jqxToggleButton"||c=="jqxRepeatButton"||c=="jqxLinkButton"){h=a.extend(h,a.jqx._jqxButton.prototype.defineInstance())}if(c=="jqxTreeGrid"){h=a.extend(h,a.jqx._jqxDataTable.prototype.defineInstance())}g.initElement=function(){var l=this;if(!h){console.log(c+" is undefined");return}a.each(h,function(o,n){var m="_"+o;l[m]=n})};if(!h){console.log(c+" is undefined");return}a.each(h,function(o,r){if(!j.properties){j.properties=[]}if(o.indexOf("_")>=0){return true}var p=j.properties[o];var q=o.split(/(?=[A-Z])/).join("-").toLowerCase();var t=typeof r;var n=(p&&p.attributeSync)||j.attributeSync;if(!p&&j.attributeSync===undefined){n=true}var s="_"+o;if(o==="width"||o==="height"){t="length"}if(p&&p.type){t=p.type}var m={defaultValue:r,type:t,propertyName:o,attributeSync:n};f.addAttributeConfig(j.tagName,q,Object.freeze(m));i[o]=q;var l=function(x){var w=this;this[s]=x;if(this.widget){if(j.propertyMap&&j.propertyMap[o]){o=j.propertyMap[o]}var y={};y[o]=x;this.widget[c](y);var v=i[o];var u=f.getAttributeConfig(j.tagName,v);if(u.attributeSync){w.isUpdatingAttribute=true;w.setAttributeTyped(v,u,x);w.isUpdatingAttribute=false}w.propertyUpdated(o,x)}else{this.initialSettings[o]=x}};if(j.propertyMap&&j.propertyMap[o]){o=j.propertyMap[o]}Object.defineProperty(g,o,{configurable:false,enumerable:true,get:function(){return this[s]},set:function(u){l.call(this,u)}})});g.getAttributeTyped=function(l,m){return this.attributeStringToTypedValue(l,m,this.getAttribute(l))};g.setAttributeTyped=function(l,o,n){var p,m;m=this.getAttributeTyped(l,o);p=this.typedValueToAttributeString(n);if(p===undefined){this.removeAttribute(l)}else{this.setAttribute(l,p)}};g.typedValueToAttributeString=function(m){var l=typeof m;if(l==="boolean"){if(m){return""}else{return undefined}}else{if(l==="number"){if(Object.is(m,-0)){return"-0"}else{return m.toString()}}else{if(l==="string"||l==="length"){return m}else{if(l==="object"){return JSON.stringify(m,function(o,n){if(typeof n==="number"){if(isFinite(n)===false){return n.toString()}else{if(Object.is(n,-0)){return"-0"}}}return n})}}}}};g.attributeStringToTypedValue=function(l,m,n){if(m.type==="boolean"){if(n===""||n===l||n==="true"){return true}else{return false}}else{if(m.type==="number"){if(n===null||n===undefined){return undefined}else{return parseFloat(n)}}else{if(m.type==="string"){if(n===null||n===undefined){return undefined}else{return n}}else{if(m.type==="length"){if(n===null){return null}if(n!==null&&n.indexOf("px")>=0){return parseFloat(n)}if(n!==null&&n.indexOf("%")>=0){return n}if(!isNaN(parseFloat(n))){return parseFloat(n)}return n}else{if(m.type==="json"||m.type==="array"){return JSON.parse(n.replace(/'/g,'"'))}else{if(m.type==="object"){return window.JQXElements.settings[n]||window[n]}}}}}}return undefined};g.createdCallback=function(){var l=this;l.isReady=false;l.initialSettings={};l.initElement()};g.setup=function(){var r=this;if(r.isReady){return}r.isReady=true;var r=this;var z=null;var x=null;var u,l,s;var n=[];var F=true;var y=f.getAttributeList(j.tagName);var E=r.settings||{};var m=r.initialSettings;var G=j.template;for(var o in y){if(y.hasOwnProperty(o)&&r.hasAttribute(o)){var C=y[o];var p=r.getAttributeTyped(o,C);var H;if(p===undefined){H=C.defaultValue}else{H=p}E[C.propertyName]=H}}s=r.attributes;for(var o in s){var B=s[o];if(B&&B.name){if(B.name.indexOf("on-")>=0){var w=B.value;var A="";if(w.indexOf("(")>=0){A=w.substring(0,w.indexOf("("))}n.push({name:B.name.substring(3),handler:A})}else{if(B.name.substring(0,2)==="on"){var w=B.value;var A="";if(w.indexOf("(")>=0){A=w.substring(0,w.indexOf("("))}n.push({name:B.name.substring(2),handler:A})}else{if(B.name.indexOf("(")>=0){var w=B.value;var A="";if(w.indexOf("(")>=0){A=w.substring(0,w.indexOf("("))}var q=B.name.replace("(","").replace(")","");n.push({name:q,handler:A})}}}}}var D=function(M){var J=document.createDocumentFragment();var P=document.createElement("div");J.appendChild(P);var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;var K=/<([\w:]+)/;M=M.replace(O,"<$1></$2>");var I=(K.exec(M)||["",""])[1].toLowerCase();var L=[0,"",""];var N=L[0];P.innerHTML=L[1]+M+L[2];while(N--){P=P.lastChild}M=P.childNodes;P.parentNode.removeChild(P);D=M[0];return D}(G);u=D;var t=function(T){var J=false;if(c==="jqxDragDrop"||c==="jqxPopover"||c==="jqxResponsivePanel"||c==="jqxLoader"||c==="jqxWindow"||c==="jqxSortable"||c==="jqxDraw"||c==="jqxValidator"){J=true;r.style.overflow="visible"}if(c==="jqxExpander"||c==="jqxRibbon"||c==="jqxBulletChart"||c==="jqxComboBox"){r.style.overflow="visible"}if(!J){while(r.childNodes.length){u.appendChild(r.firstChild)}r.appendChild(u)}else{u=r}if(c==="jqxScrollBar"||c==="jqxNotification"){r.style.overflow="visible";r.style.borderLeftWidth="0px";r.style.borderRightWidth="0px";r.style.borderTopWidth="0px";r.style.borderBottomWidth="0px"}a.extend(E,T);var R=c.toLowerCase();if(G.indexOf("button")>=0||G.indexOf("input")==1||G.indexOf("textarea")>=0||R.indexOf("button")>=0||R.indexOf("checkbox")>=0||R.indexOf("radio")>=0){r.style.display="inline-block"}else{r.style.display="block"}var M=function(Z,aa){if(!F||J){return}if(typeof aa==="string"&&aa.indexOf("%")>=0){r.style[Z]=aa}else{if(typeof aa==="string"&&aa.indexOf("px")>=0){r.style[Z]=2+parseFloat(aa)+"px"}else{if(aa==="auto"){r.style[Z]=aa}else{if(aa){r.style[Z]=2+aa+"px"}else{if(r.style[Z]){r.style[Z]=null}}}}}};if(E.width){M("width",E.width)}if(E.height){M("height",E.height)}l=new jqxBaseFramework(r);l.data(r,"jqxWidget",{element:r});z=l.width();x=l.height();var Y=2;if(c==="jqxPivotDesigner"||c==="jqxPivotGrid"||c==="jqxChart"||c==="jqxMenu"||c==="jqxToolBar"){u.style.width=u.style.height="100%"}else{if(!J){if(z&&!E.width&&r.style.width!=="auto"){if(c==="jqxButton"||c==="jqxCheckBox"||c==="jqxToggleButton"||c==="jqxRadioButton"||c==="jqxRepeatButton"||c==="jqxLinkButton"){z+=30}E.width=z-Y}if(x&&!E.height&&r.style.height!=="auto"&&x!==r.firstChild.offsetHeight){E.height=x-Y}}}var I={};var L={};var N=Object.getOwnPropertyNames(a.jqx["_"+c].prototype);if(c=="jqxDockingLayout"){L=a.extend(L,Object.keys(a.jqx._jqxLayout.prototype));I=a.extend(I,a.jqx._jqxLayout.prototype)}if(c=="jqxToggleButton"||c=="jqxRepeatButton"||c=="jqxLinkButton"){L=a.extend(L,Object.keys(a.jqx._jqxButton.prototype));I=a.extend(I,a.jqx._jqxButton.prototype)}if(c=="jqxTreeGrid"){L=a.extend(L,Object.keys(a.jqx._jqxDataTable.prototype));I=a.extend(I,a.jqx._jqxDataTable.prototype)}I=a.extend(I,a.jqx["_"+c].prototype);L=a.extend(L,Object.getOwnPropertyNames(I));for(var Q in L){var W=L[Q];if(W.indexOf("_")>=0){continue}if(W==="base"||W==="baseType"){continue}if(W==="onmousemove"||W==="resize"||W==="scrollWidth"||W==="scrollHeight"||W==="constructor"||W==="createInstance"||W==="defineInstance"){continue}if(typeof I[W]!=="function"){continue}var O=function(ad,aa){var ab=Array.prototype.slice.call(arguments,2);var Z=r;var ac=function(){if(Z._isUpdating){return}if(a.event.triggered){return}if(!Z.widget){Z._isUpdating=true;var af=arguments;var ae=ad.apply(a(u).data().jqxWidget,ab.concat(Array.prototype.slice.call(af)));Z._isUpdating=false;return ae}if(-1===N.indexOf(aa)){var ae=ad.apply(Z.widget.data().jqxWidget.base,ab.concat(Array.prototype.slice.call(arguments)))}else{var ae=ad.apply(Z.widget.data().jqxWidget,ab.concat(Array.prototype.slice.call(arguments)))}Z._isUpdating=false;return ae};return ac};r[W]=O(I[W],W)}var S=r.widget=a(u)[c](E);if(E.ready){r._isUpdating=false;if(!S.data().jqxWidget._loading){if(!S.data().jqxWidget.isInitialized){E.ready()}}else{var K=setInterval(function(){if(!S.data().jqxWidget._loading){if(!S.data().jqxWidget.isInitialized){E.ready()}clearInterval(K)}},100)}}if(c==="jqxMaskedInput"||c==="jqxPasswordInput"||c==="jqxButtonGroup"||c==="jqxButton"||c==="jqxToggleButton"||c==="jqxRepeatButton"){r.firstChild.style.boxSizing="border-box"}r.propertyUpdated=function(Z,aa){if(Z==="width"||Z==="height"){M(Z,aa)}};if(!J){var X=S.data().jqxWidget;!X.base?X.host.addClass("jqx-element-container"):X.base.host.addClass("jqx-element-container");if(E.multiSelect){r.style.height="auto"}l.addClass("jqx-widget jqx-element");l.addClass("jqx-element-no-border");if(c==="jqxRangeSelector"||c=="jqxButtonGroup"){l.css("overflow","visible")}}for(var P=0;P<n.length;P++){var U=n[P];S.on(U.name,function(Z){if(!Z.args){Z.args={}}if(window.JQXElements.settings[U.handler]&&Z.args){window.JQXElements.settings[U.handler].apply(r,[Z])}else{if(window[U.handler]&&Z.args){window[U.handler].apply(r,[Z])}}})}var V=function(){if(J){return}F=false;z=l.width();x=l.height();var ac=0;if(c==="jqxChart"||c==="jqxPivotGrid"||c==="jqxPivotDesigner"||c==="jqxDraw"){S[0].style.width="100%";S[0].style.height="100%"}else{var ae=parseInt(S.css("padding-left"));var ab=parseInt(S.css("padding-right"));var ad=parseInt(S.css("padding-top"));var aa=parseInt(S.css("padding-bottom"));var Z=r.firstChild?window.getComputedStyle(r.firstChild):null;var af=true;if(!Z){return}ac=0;if(Z&&Z.boxSizing!=="border-box"){ac=2}if(r.autoheight||r.height===null||r.height==="auto"||r.multiSelect){af=false}if(c==="jqxBarGauge"){ac=0}S[c]({width:z-ac});if(af){S[c]({height:x-ac})}}F=true};if(!J){addResizeHandler(r,function(){V()})}};if(r.hasAttribute("settings")){var v=r.getAttribute("settings");m=window.JQXElements.settings[v]||window[v];if(m){a.each(m,function(J,I){r["_"+J]=I})}}if(r.hasAttribute("delayed-create")){r.isCreated=false;r.createElement=function(){if(r.isCreated){return}if(r.hasAttribute("settings")){t(m)}else{t(r.settings)}r.isCreated=true}}else{t(m)}};var b=g.addEventListener;var e=g.addEventListener;g.addEventListener=function(l,m){var n=this;if(n.widget&&n.widget.on){if(c==="jqxDragDrop"||c==="jqxPopover"||c==="jqxResponsivePanel"||c==="jqxLoader"||c==="jqxWindow"||c==="jqxSortable"||c==="jqxDraw"||c==="jqxValidator"){JQXLite(n.parentNode).on(l,m)}else{n.widget.on(l,m)}}else{b.apply(this,[l,m])}};g.removeEventListener=function(l,m){var n=this;if(n.widget&&n.widget.off){if(c==="jqxDragDrop"||c==="jqxPopover"||c==="jqxResponsivePanel"||c==="jqxLoader"||c==="jqxWindow"||c==="jqxSortable"||c==="jqxDraw"||c==="jqxValidator"){JQXLite(n.parentNode).off(l,m)}else{n.widget.off(l,m)}}else{e.apply(this,[l,m])}};g.attachedCallback=function(){var l=this;l.setup()};g.attributeChangedCallback=function(q,n,o){var r=this;var p=f.getAttributeConfig(j.tagName,q);if(!r.isUpdatingAttribute&&p){var l=r.getAttributeTyped(q,p);var m;if(l===undefined){if(currAttrConfig){m=currAttrConfig.defaultValue}else{return}}else{m=l}r[currAttrConfig.propertyName]=m}};var k=function(){var m=document.querySelectorAll(j.tagName);for(var l=0;l<m.length;l++){if(m[l].hasAttribute("tagHelper")){return true}}return false};if(k()){return}var d=document.registerElement(j.tagName,{prototype:g});return d})})}})(jqxBaseFramework);
 
-(function(i){i.jqx.observableArray=function(e,J){if(typeof(e)=="string"){e=i.parseJSON(e)}if(!Object.defineProperty||!(function(){try{Object.defineProperty({},"x",{});return true}catch(M){return false}}())){var L=Object.defineProperty;Object.defineProperty=function(O,P,N){if(L){try{return L(O,P,N)}catch(M){}}if(O!==Object(O)){throw TypeError("Object.defineProperty called on non-object")}if(Object.prototype.__defineGetter__&&("get" in N)){Object.prototype.__defineGetter__.call(O,P,N.get)}if(Object.prototype.__defineSetter__&&("set" in N)){Object.prototype.__defineSetter__.call(O,P,N.set)}if("value" in N){O[P]=N.value}else{if(!O[P]){O[P]=N}}return O}}if(!Array.prototype.forEach){Array.prototype.forEach=function(N){if(this===void 0||this===null){throw TypeError()}var Q=Object(this);var M=Q.length>>>0;if(typeof N!=="function"){throw TypeError()}var P=arguments[1],O;for(O=0;O<M;O++){if(O in Q){N.call(P,Q[O],O,Q)}}}}if(typeof Object.getOwnPropertyNames!=="function"){Object.getOwnPropertyNames=function(O){if(O!==Object(O)){throw TypeError("Object.getOwnPropertyNames called on non-object")}var M=[],N;for(N in O){if(Object.prototype.hasOwnProperty.call(O,N)){M.push(N)}}return M}}var I=this,H,K=[];I.notifier=null;I.name="observableArray";I.observing=true;I.changes=new Array();var J=J;I.observe=function(){I.observing=true;if(arguments.length==1){J=arguments[0]}};I.unobserve=function(){I.observing=false};I.toArray=function(){return K.slice(0)};I.toJSON=function(X,O){var U=K;if(O){U=O}var T=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function M(Z){return'"'+Z.replace(T,function(aa){var ab=W[aa];return typeof ab==="string"?ab:"\\u"+("0000"+aa.charCodeAt(0).toString(16)).slice(-4)})+'"'}function N(Z){return Z<10?"0"+Z:Z}function P(aa){var Z;if(isFinite(aa.valueOf())){Z=aa.getUTCFullYear()+"-"+N(aa.getUTCMonth()+1)+"-"+N(aa.getUTCDate())+"T"+N(aa.getUTCHours())+":"+N(aa.getUTCMinutes())+":"+N(aa.getUTCSeconds())+'Z"'}else{Z="null"}return Z}function Q(ac){var Z=ac.length,aa=[],ab;for(ab=0;ab<Z;ab++){aa.push(R(ab,ac)||"null")}return"["+aa.join(",")+"]"}function Y(ac){var aa=[],ab,Z;for(ab in ac){if(Object.prototype.hasOwnProperty.call(ac,ab)){if(ab!=""&&X&&X.indexOf(ab)===-1){continue}Z=R(ab,ac);if(Z){aa.push(M(ab)+":"+Z)}}}return"{"+aa.join(",")+"}"}function S(Z){switch(Object.prototype.toString.call(Z)){case"[object Date]":return P(Z);case"[object Array]":return Q(Z)}return Y(Z)}function V(aa,Z){switch(Z){case"string":return M(aa);case"number":case"float":case"integer":case"int":return isFinite(aa)?aa:"null";case"boolean":return aa}return"null"}function R(aa,Z){var ac=Z[aa],ab=typeof ac;if(ac&&typeof ac==="object"&&typeof ac.toJSON==="function"){ac=ac.toJSON(aa);ab=typeof ac}if(/(number|float|int|integer|string|boolean)/.test(ab)||(!ac&&ab==="object")){return V(ac,ab)}else{return S(ac)}}if(!X&&window.JSON&&typeof window.JSON.stringify==="function"){return window.JSON.stringify(U)}return R("",{"":U})};I.defineIndexProperty=function(O){if(!(O in I)){var M=function(V,S,U,R){var T=V[S];var Q=T;var P=function(){return Q};var W=function(ab){T=ab;if(Q!==T){var aa=Q;Q=T;if(typeof H==="function"){var Y=K.indexOf(R);var Z="";var X=function(ad,ac){Object.getOwnPropertyNames(ad).forEach(function(ae){var af=i.type(ad[ae]);if(af=="array"||af=="object"){X(ad[ae],ac+"."+ae)}else{if(S===ae){Z=ac+"."+ae}}})};X(R,Y);H({object:I,type:"update",path:Z,index:Y,name:S,newValue:T,oldValue:aa})}}Q=T;return T};if(V[S]!=undefined&&S!="length"){if(Object.defineProperty){Object.defineProperty(V,S,{get:P,set:W})}else{if(Object.prototype.__defineGetter__&&Object.prototype.__defineSetter__){Object.prototype.__defineGetter__.call(V,S,P);Object.prototype.__defineSetter__.call(V,S,W)}}}};var N=function(S,R,P){var Q=i.type(S);if(/(number|float|int|integer|string|boolean)/.test(Q)){return}if(S===undefined){return}Object.getOwnPropertyNames(S).forEach(function(T){var U=i.type(S[T]);if(U=="array"||U=="object"){M(S,T,R+"."+T,P);N(S[T],R+"."+T,P)}else{M(S,T,R+"."+T,P)}})};Object.defineProperty(I,O,{configurable:true,enumerable:true,get:function(){return K[O]},set:function(Q){var P=K[O];if(I.toJSON(null,P)!=I.toJSON(null,Q)){K[O]=Q;if(typeof H==="function"){H({object:I,type:"update",path:O.toString(),index:O,name:"index",newValue:Q,oldValue:P})}N(Q,O,Q)}}});N(I[O],O,I[O])}};I.push=function(){var M;for(var N=0,O=arguments.length;N<O;N++){M=K.length;K.push(arguments[N]);I.defineIndexProperty(M);if(typeof H==="function"){H({object:I,type:"add",name:"length",index:M,newValue:K.length,oldValue:M})}}return K.length};I.pop=function(){if(~K.length){var M=K.length-1,N=K.pop();delete I[M];if(typeof H==="function"){H({object:I,type:"delete",name:"length",index:M,newValue:K.length,oldValue:M})}return N}};I.unshift=function(){var M=K.length;for(var N=0,O=arguments.length;N<O;N++){K.splice(N,0,arguments[N]);I.defineIndexProperty(K.length-1)}if(typeof H==="function"){H({object:I,type:"add",index:0,name:"length",newValue:K.length,oldValue:M})}return K.length};I.shift=function(){var M=K.length;if(~K.length){var N=K.shift();K.length===0&&delete I[M];if(typeof H==="function"){H({object:I,type:"delete",index:M,name:"length",newValue:K.length,oldValue:M})}return N}};I.slice=function(Q,N,P){var M=K.slice(Q,N);var O=new i.jqx.observableArray(M,P);return O};I.splice=function(Q,R,M){var P=[],U,T;Q=!~Q?K.length-Q:Q;R=(R==null?K.length-Q:R)||0;while(R--){U=K.splice(Q,1)[0];P.push(U);delete I[K.length];if(typeof H==="function"){H({object:I,type:"delete",index:Q,name:"length",newValue:-1,oldValue:Q})}}for(var N=2,S=arguments.length;N<S;N++){K.splice(Q,0,arguments[N]);defineIndexProperty(K.length-1);if(typeof H==="function"){H({object:I,type:"add",index:Q,name:"length",newValue:K.length-1,oldValue:Q})}Q++}var O=new i.jqx.observableArray(P,M);return O};Object.defineProperty(I,"length",{configurable:false,enumerable:true,get:function(){return K.length},set:function(M){var N=Number(M);if(N%1===0&&N>=0){if(N<K.length){I.splice(N)}else{if(N>K.length){I.push.apply(I,new Array(N-K.length))}}}else{throw new RangeError("Invalid array length")}return M}});i.jqx.observableArray.prototype.fromArray=function(O,N){var M=new i.jqx.observableArray(O,N);return M};i.jqx.observableArray.prototype.clone=function(){var M=new i.jqx.observableArray(K,J);M.observing=I.observing;M.changes=I.changes;M.notifier=I.notifier;return M};I.remove=function(N){if(N<0||N>=I.length){throw new Error("Invalid index : "+N)}if(I.hasOwnProperty(N)){var M=I[N];I[N]=undefined;K[N]=undefined;if(typeof H==="function"){H({object:I,type:"delete",index:N,name:"index",newValue:undefined,oldValue:M})}return true}return false};I.concat=function(N,P){var M=K.concat(N);var O=new i.jqx.observableArray(M,P);return O};Object.getOwnPropertyNames(Array.prototype).forEach(function(M){if(!(M in I)){var N=function(){var Q=I.observing;I.observing=false;var P=K[M];var O=P.apply(K,arguments);I.observing=Q;return O};Object.defineProperty(I,M,{configurable:false,enumerable:true,writeable:false,value:N})}});I.set=function(N,P){if(i.type(N)=="string"&&N.split(".").length>1){var M=N.split(".");var Q=I;for(var O=0;O<M.length;O++){if(O===0){if(M[O]>=I.length){throw new Error("Invalid Index: "+N)}}if(O<M.length-1){Q=Q[M[O]]}else{Q[M[O]]=P}}return true}if(N>=I.length){I.push(P)}else{I[N]=P}return true};I.get=function(M){return I[M]};if(e instanceof Array){I.push.apply(I,e)}H=function(){if(!I.observing){return}if(arguments&&arguments[0]){I.changes.push(arguments[0])}if(J){J.apply(I,arguments)}if(I.notifier){I.notifier.apply(I,arguments)}};return I};i.jqx.formatDate=function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e};i.jqx.formatNumber=function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e};i.jqx.dataAdapter=function(J,e){if(J!=undefined){if(J.dataFields!==undefined){J.datafields=J.dataFields}if(J.dataType!==undefined){J.datatype=J.dataType}if(J.localData!==undefined){J.localdata=J.localData}if(J.sortColumn!==undefined){J.sortcolumn=J.sortColumn}if(J.sortDirection!==undefined){J.sortdirection=J.sortDirection}if(J.sortColumns!==undefined){J.sortcolumns=J.sortColumns}if(J.sortDirections!==undefined){J.sortdirections=J.sortDirections}if(J.sortOrder!==undefined){J.sortdirection=J.sortOrder}if(J.formatData!==undefined){J.formatdata=J.formatData}if(J.processData!==undefined){J.processdata=J.processData}if(J.pageSize!==undefined){J.pagesize=J.pageSize}if(J.pageNum!==undefined){J.pagenum=J.pageNum}if(J.updateRow!==undefined){J.updaterow=J.updateRow}if(J.addRow!==undefined){J.addrow=J.addRow}if(J.deleteRow!==undefined){J.deleterow=J.deleteRow}if(J.contentType!==undefined){J.contenttype=J.contentType}if(J.totalRecords!=undefined){J.totalrecords=J.totalRecords}if(J.loadError!=undefined){J.loadError=J.loadError}if(J.sortComparer!=undefined){J.sortcomparer=J.sortComparer}}this._source=J;this._options=e||{};if(J.beforeLoadComplete!=undefined){this._options.beforeLoadComplete=this._source.beforeLoadComplete}if(J.downloadComplete!=undefined){this._options.downloadComplete=this._source.downloadComplete}if(J.loadComplete!=undefined){this._options.loadComplete=this._source.loadComplete}if(J.autoBind!=undefined){this._options.downloadComplete=this._source.autoBind}if(J.formatData!=undefined){this._options.formatData=this._source.formatData}if(J.loadError!=undefined){this._options.loadError=this._source.loadError}if(J.beforeSend!=undefined){this._options.beforeSend=this._source.beforeSend}if(J.contentType!=undefined){this._options.contentType=this._source.contentType}if(J.async!=undefined){this._options.async=this._source.async}if(J.loadServerData!=undefined){this._options.loadServerData=this._source.loadServerData}if(J.uniqueDataFields!=undefined){this._options.uniqueDataFields=this._source.uniqueDataFields}this.records=new Array();this._downloadComplete=new Array();this._bindingUpdate=new Array();if(J!=undefined&&J.localdata!=null&&typeof J.localdata=="function"){var I=J.localdata();if(I!=null){J._localdata=J.localdata;var H=this;if(J._localdata.subscribe){H._oldlocaldata=[];J._localdata.subscribe(function(K){var L=function(M){if(i.isArray(M)){return i.makeArray(L(i(M)))}return i.extend(true,{},M)};if(H.suspendKO==false||H.suspendKO==undefined||H._oldlocaldata.length==0){H._oldlocaldata=L(K)}},J._localdata,"beforeChange");J._localdata.subscribe(function(L){if(H.suspendKO==false||H.suspendKO==undefined){var K="";H._oldrecords=H.records;if(H._oldlocaldata.length==0){J.localdata=J._localdata()}if(H._oldlocaldata.length==0){K="change"}else{if(L){if(H._oldlocaldata.length==L.length){K="update"}if(H._oldlocaldata.length>L.length){K="remove"}if(H._oldlocaldata.length<L.length){K="add"}}}H.dataBind(null,K)}},J._localdata,"change");H._knockoutdatasource=true}J.localdata=I}}if(this._options.autoBind==true){this.dataBind()}};i.jqx.dataAdapter.prototype={getrecords:function(){return this.records},beginUpdate:function(){this.isUpdating=true},endUpdate:function(e){this.isUpdating=false;if(e!=false){if(this._changedrecords&&this._changedrecords.length>0){this.callBindingUpdate("update");this._changedrecords=[]}else{this.dataBind(null,"")}}},formatDate:function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e},formatNumber:function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e},dataBind:function(R,aa){if(this.isUpdating==true){return}var W=this._source;if(!W){return}if(W.generatedfields){W.datafields=null;W.generatedfields=null}i.jqx.dataFormat.datescache=new Array();if(W.dataFields!=null){W.datafields=W.dataFields}if(W.recordstartindex==undefined){W.recordstartindex=0}if(W.recordendindex==undefined){W.recordendindex=0}if(W.loadallrecords==undefined){W.loadallrecords=true}if(W.root==undefined){W.root=""}if(W.record==undefined){W.record=""}if(W.sort!=undefined){this.sort=W.sort}if(W.filter!=undefined){this.filter=W.filter}else{this.filter=null}if(W.sortcolumn!=undefined){this.sortcolumn=W.sortcolumn}if(W.sortdirection!=undefined){this.sortdirection=W.sortdirection}if(W.sortcolumns!=undefined){this.sortcolumns=W.sortcolumns}if(W.sortdirections!=undefined){this.sortdirections=W.sortdirections}if(W.sortcomparer!=undefined){this.sortcomparer=W.sortcomparer}this.records=new Array();var K=this._options||{};this.virtualmode=K.virtualmode!=undefined?K.virtualmode:false;this.totalrecords=K.totalrecords!=undefined?K.totalrecords:0;this.pageable=K.pageable!=undefined?K.pageable:false;this.pagesize=K.pagesize!=undefined?K.pagesize:0;this.pagenum=K.pagenum!=undefined?K.pagenum:0;this.cachedrecords=K.cachedrecords!=undefined?K.cachedrecords:new Array();this.originaldata=new Array();this.recordids=new Array();this.updaterow=K.updaterow!=undefined?K.updaterow:null;this.addrow=K.addrow!=undefined?K.addrow:null;this.deleterow=K.deleterow!=undefined?K.deleterow:null;this.cache=K.cache!=undefined?K.cache:false;this.unboundmode=false;if(W.formatdata!=undefined){K.formatData=W.formatdata}if(W.data!=undefined){if(K.data==undefined){K.data={}}i.extend(K.data,W.data)}if(W.mapChar!=undefined){W.mapchar=W.mapChar}if(W.mapchar!=undefined){this.mapChar=W.mapchar?W.mapchar:">"}else{this.mapChar=K.mapChar?K.mapChar:">"}if(K.unboundmode||W.unboundmode){this.unboundmode=K.unboundmode||W.unboundmode}if(W.cache!=undefined){this.cache=W.cache}if(this.koSubscriptions){for(var ac=0;ac<this.koSubscriptions.length;ac++){this.koSubscriptions[ac].dispose()}}this.koSubscriptions=new Array();if(this.pagenum<0){this.pagenum=0}var ah=this;var Q=W.datatype;if(W.datatype==="csv"||W.datatype==="tab"||W.datatype==="tsv"||W.datatype=="text"){Q="text"}var N=K.async!=undefined?K.async:true;if(W.async!=undefined){N=W.async}switch(Q){case"local":case"array":case"observablearray":case"observableArray":default:if(W.localdata==undefined&&W.length){W.localdata=new Array();for(var Z=0;Z<W.length;Z++){W.localdata[W.localdata.length]=W[Z];W[Z].uid=Z}}if(W.beforeprocessing&&i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}var M=W.localdata.length;this.totalrecords=this.virtualmode?(W.totalrecords||M):M;if(this.unboundmode){this.totalrecords=this.unboundmode?(W.totalrecords||M):M;var ad=W.datafields?W.datafields.length:0;if(ad>0){for(var Z=0;Z<this.totalrecords;Z++){var I={};for(var Y=0;Y<ad;Y++){I[W.datafields[Y].name]=""}I.uid=Z;W.localdata[W.localdata.length]=I}}}if(this.totalrecords==undefined){this.totalrecords=0}var ad=W.datafields?W.datafields.length:0;var H=function(ao,aq){var ap={};for(var am=0;am<aq;am++){var al=W.datafields?W.datafields[am]:{};var ar="";if(undefined==al||al==null){continue}if(al.map){if(i.isFunction(al.map)){ar=al.map(ao)}else{var aj=al.map.split(ah.mapChar);if(aj.length>0){var an=ao;for(var ak=0;ak<aj.length;ak++){if(!an){continue}an=an[aj[ak]]}ar=an}else{ar=ao[al.map]}}if(ar!=undefined&&ar!=null){ar=ar.toString()}else{if(ar==undefined&&ar!=null){ar=""}}}var at=false;if(ar==""){at=true;ar=ao[al.name];if(ar!=undefined&&ar!=null){if(W._localdata&&ar.subscribe){ar=ar()}else{if(al.type!="array"){if(al.type==="date"){if(ar&&ar instanceof Date){ar=ar}}else{ar=ar.toString()}}}}}if(ar=="[object Object]"&&al.map&&at){ar=""}ar=ah.getvaluebytype(ar,al);if(al.displayname!=undefined){ap[al.displayname]=ar}else{ap[al.name]=ar}}return ap};if(W._localdata){this._changedrecords=[];this.records=new Array();var ag=W._localdata();i.each(ag,function(am,ap){if(typeof ap==="string"){ah.records.push(ap)}else{var ak={};var ao=0;var an=this;i.each(this,function(ay,aD){var at=null;var aE="string";var aC=ay;if(ad>0){var aG=false;var aB=false;for(var ax=0;ax<ad;ax++){var aw=W.datafields[ax];if(aw!=undefined&&(aw.name==ay)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;break}else{if(aw!=undefined&&aw.map&&(aw.map.indexOf(ay)>=0)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;aB=true;var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au<ar.length;au++){az=az[ar[au]]}aF=az}else{aF=an[at]}}if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[aC]=aF;if(ak[aC]!=undefined){ao+=ak[aC].toString().length+ak[aC].toString().substr(0,1)}}}}if(!aG){return true}if(aB){return true}}var av=i.isFunction(an[ay]);if(av){var aF=an[ay]();if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[ay]=aF;if(an[ay].subscribe){var aA=am;ah.koSubscriptions[ah.koSubscriptions.length]=an[ay].subscribe(function(aI){var aH=aA;ak[ay]=aI;var aJ={index:aH,oldrecord:ak,record:ak};ah._changedrecords.push(aJ);if(ah.isUpdating){return}ah.callBindingUpdate("update");ah._changedrecords=[];return false})}}else{var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au<ar.length;au++){az=az[ar[au]]}aF=az}else{aF=an[at]}}if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[aC]=aF;if(ak[aC]!=undefined){ao+=ak[aC].toString().length+ak[aC].toString().substr(0,1)}}});var al=ah.getid(W.id,an,am);ak.uid=al;ah.records.push(ak);ak._koindex=ao;if(ah._oldrecords){var aj=ah.records.length-1;if(aa=="update"){if(ah._oldrecords[aj]._koindex!=ao){var aq={index:aj,oldrecord:ah._oldrecords[aj],record:ak};ah._changedrecords.push(aq)}}}}});if(aa=="add"){var M=ah.records.length;for(var Z=0;Z<M;Z++){var I=ah.records[Z];var L=false;for(var U=0;U<ah._oldrecords.length;U++){if(ah._oldrecords[U]._koindex===I._koindex){L=true;break}}if(!L){ah._changedrecords.push({index:Z,oldrecord:null,record:I,position:(Z!=0?"last":"first")})}}}else{if(aa=="remove"){var M=ah._oldrecords.length;for(var Z=0;Z<M;Z++){var P=ah._oldrecords[Z];if(!ah.records[Z]){ah._changedrecords.push({index:Z,oldrecord:P,record:null})}else{if(ah.records[Z]._koindex!=P._koindex){ah._changedrecords.push({index:Z,oldrecord:P,record:null})}}}}}}else{if(!i.isArray(W.localdata)){this.records=new Array();var V=0;var T=new Array();i.each(W.localdata,function(al){var ak=ah.getid(W.id,this,al);if(ad==0){if(!(typeof this==="string"||this instanceof String)){for(var an in this){V++;var ao=i.type(this[an]);T.push({name:an,type:ao})}ad=V;W.datafields=T;W.generatedfields=T}}if(ad>0){var aj=this;var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{this.uid=ak;ah.records[ah.records.length]=this}})}else{if(ad==0){var V=0;var T=new Array();i.each(W.localdata,function(al,an){var aj=new Object(this);if(typeof an==="string"){ah.records=W.localdata;return false}else{var ak=ah.getid(W.id,aj,al);if(typeof(ak)==="object"){ak=al}aj.uid=ak;if(al==0){for(var ao in this){V++;var ap=i.type(this[ao]);T.push({name:ao,type:ap})}ad=V;W.datafields=T;W.generatedfields=T}if(ad>0){var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{ah.records[ah.records.length]=aj}}})}else{i.each(W.localdata,function(al){var aj=this;var am=H(aj,ad);var ak=ah.getid(W.id,am,al);if(typeof(ak)==="object"){ak=al}var aj=new Object(am);aj.uid=ak;ah.records[ah.records.length]=aj})}}}this.originaldata=W.localdata;this.cachedrecords=this.records;this.addForeignValues(W);if(K.uniqueDataFields){var S=this.getUniqueRecords(this.records,K.uniqueDataFields);this.records=S;this.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}if(K.autoSort&&K.autoSortField){var O=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[K.autoSortField]};ah.records.sort(function(ak,aj){if(ak===undefined){ak=null}if(aj===undefined){aj=null}if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}ak=ak.toString();aj=aj.toString();if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}if(i.jqx.dataFormat.isNumber(ak)&&i.jqx.dataFormat.isNumber(aj)){if(ak<aj){return -1}if(ak>aj){return 1}return 0}else{if(i.jqx.dataFormat.isDate(ak)&&i.jqx.dataFormat.isDate(aj)){if(ak<aj){return -1}if(ak>aj){return 1}return 0}else{if(!i.jqx.dataFormat.isNumber(ak)&&!i.jqx.dataFormat.isNumber(aj)){ak=String(ak).toLowerCase();aj=String(aj).toLowerCase()}}}try{if(ak<aj){return -1}if(ak>aj){return 1}}catch(al){var am=al}return 0});Object.prototype.toString=O}ah.loadedData=W.localdata;ah.buildHierarchy();if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"ics":if(W.localdata!=null&&!W.url){if(i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}if(W.datatype==="xml"){ah.loadxml(W.localdata,W.localdata,W)}else{if(Q==="text"){ah.loadtext(W.localdata,W)}else{if(Q==="ics"){ah.loadics(W.localdata,W)}else{ah.loadjson(W.localdata,W.localdata,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var S=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=S;ah.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}ah.loadedData=W.localdata;ah.buildHierarchy.call(ah);if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}ah.callBindingUpdate(aa);return}var af=K.data!=undefined?K.data:{};if(W.processdata){W.processdata(af)}if(i.isFunction(K.processData)){K.processData(af)}if(i.isFunction(K.formatData)){var e=K.formatData(af);if(e!=undefined){af=e}}var ab="application/x-www-form-urlencoded";if(K.contentType){ab=K.contentType}var J="GET";if(W.type){J=W.type}if(K.type){J=K.type}var X=Q;if(Q=="ics"){X="text"}if(W.url&&W.url.length>0){if(i.isFunction(K.loadServerData)){ah._requestData(af,W,K)}else{this.xhr=i.jqx.data.ajax({dataType:X,cache:this.cache,type:J,url:W.url,async:N,timeout:W.timeout,contentType:ab,data:af,success:function(am,aj,ap){if(i.isFunction(W.beforeprocessing)){var ao=W.beforeprocessing(am,aj,ap);if(ao!=undefined){am=ao}}if(i.isFunction(K.downloadComplete)){var ao=K.downloadComplete(am,aj,ap);if(ao!=undefined){am=ao}}if(am==null){ah.records=new Array();ah.cachedrecords=new Array();ah.originaldata=new Array();ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(new Array())}return}var ak=am;if(am.records){ak=am.records}if(am.totalrecords!=undefined){W.totalrecords=am.totalrecords}else{if(am.totalRecords!=undefined){W.totalrecords=am.totalRecords}}if(W.datatype==="xml"){ah.loadxml(null,ak,W)}else{if(Q==="text"){ah.loadtext(ak,W)}else{if(Q==="ics"){ah.loadics(ak,W)}else{ah.loadjson(null,ak,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var al=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=al;ah.cachedrecords=al}if(K.beforeLoadComplete){var an=K.beforeLoadComplete(ah.records,am);if(an!=undefined){ah.records=an;ah.cachedrecords=an}}ah.loadedData=am;ah.buildHierarchy.call(ah);ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(am,aj,ap,ah.records)}},error:function(al,aj,ak){if(i.isFunction(W.loaderror)){W.loaderror(al,aj,ak)}if(i.isFunction(K.loadError)){K.loadError(al,aj,ak)}al=null;ah.callDownloadComplete()},beforeSend:function(ak,aj){if(i.isFunction(K.beforeSend)){K.beforeSend(ak,aj)}if(i.isFunction(W.beforesend)){W.beforesend(ak,aj)}}})}}else{ah.buildHierarchy(new Array());ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){if(!ai){var ai={}}K.loadComplete(ai)}}break}this.callBindingUpdate(aa)},buildHierarchy:function(K){var e=this._source;var P=new Array();if(!e.datafields){return}if(e.hierarchy&&!e.hierarchy.reservedNames){e.hierarchy.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}}else{if(e.hierarchy){var O=e.hierarchy.reservedNames;if(!O.leaf){O.leaf="leaf"}if(!O.parent){O.parent="parent"}if(!O.expanded){O.expanded="expanded"}if(!O.checked){O.checked="checked"}if(!O.selected){O.selected="selected"}if(!O.level){O.level="level"}if(!O.data){O.data="data"}}}if(!e.hierarchy){return}var N=this;var O=e.hierarchy.reservedNames;if(e.hierarchy.root){if(e.dataType=="xml"){var P=this.getRecordsHierarchy("uid","parentuid","records",null,K);this.hierarchy=P;return P}else{this.hierarchy=this.records;var R=e.hierarchy.root;for(var L=0;L<this.records.length;L++){var M=this.records[L];if(!M){continue}var H=function(S){if(e.hierarchy.record){S.records=S[R][e.hierarchy.record]}else{var U=R.split(N.mapChar);var T=null;if(U.length>1){var W=S;for(var V=0;V<U.length;V++){if(W!=undefined){W=W[U[V]]}}T=W}else{T=S[R]}S.records=T}if(S.records==null||(S.records&&S.records.length==0)){S[O.leaf]=true}};H(M);M[O.level]=0;var I=this.getid(e.id,M,L);M.uid=I;M[O.parent]=null;M[O.data]=M;if(M[O.expanded]===undefined){M[O.expanded]=false}var Q=function(W,U){if(!U){W.records=new Array();return}for(var V=0;V<U.length;V++){var S=U[V];if(!S){continue}H(S);S[O.level]=W[O.level]+1;S[O.parent]=W;S[O.data]=S;var T=N.getid(e.id,S,V);if(T==V&&e.id==null){S.uid=W.uid+"_"+T}else{S.uid=T}if(S[O.expanded]===undefined){S[O.expanded]=false}Q(S,S.records)}};Q(M,M.records)}}return this.hierarchy}if(e.hierarchy.keyDataField&&e.hierarchy.parentDataField){var P=this.getRecordsHierarchy(e.hierarchy.keyDataField.name,e.hierarchy.parentDataField.name,"records",null,K);this.hierarchy=P;return P}if(e.hierarchy.groupingDataFields){var J=new Array();for(var L=0;L<e.hierarchy.groupingDataFields.length;L++){J.push(e.hierarchy.groupingDataFields[L].name)}var P=this.getGroupedRecords(J,"records","label",null,"data",null,"parent",K);this.hierarchy=P;return P}},addRecord:function(H,e,M,I){var J=this;var N=function(){return{leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}};if(H!=undefined){if(M!=undefined){if(this.hierarchy.length>0){var K=function(O){if(O){for(var P=0;P<O.length;P++){var Q=O[P];if(Q.uid==M){var R=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(R==null){R=N()}H[R.parent]=Q;H[R.level]=Q[R.level]+1;if(!Q.records){Q.records=new Array();Q[R.leaf]=false}else{Q[R.leaf]=false}if(e=="last"){Q.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){Q.records.splice(e,0,H)}else{Q.records.splice(0,0,H)}}return true}if(Q.records){K(Q.records)}}}};K(this.hierarchy)}}else{if(this.hierarchy&&this.hierarchy.length>=0&&(this._source.hierarchy||I)){var L=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(L==null){L=N()}H[L.level]=0;if(e=="last"){this.hierarchy.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.hierarchy.splice(e,0,H)}else{this.hierarchy.splice(0,0,H)}}}else{if(e=="last"){this.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.records.splice(e,0,H)}else{this.records.splice(0,0,H)}}}return true}}return false},deleteRecord:function(H){var J=this;if(this.hierarchy.length>0){var K=function(L){if(L){for(var O=0;O<L.length;O++){var P=L[O];if(P.uid==H){L.splice(O,1);if(J.recordids[H]){delete J.recordids[H]}var N=function(T){for(var Q=0;Q<T.length;Q++){var S=T[Q].uid;for(var R=0;R<J.records.length;R++){var U=J.records[R];if(U.uid==S){J.records.splice(R,1);break}}if(T[Q].records){N(T[Q].records)}}};if(P.records){N(P.records)}for(var M=0;M<J.records.length;M++){var P=J.records[M];if(P.uid==H){J.records.splice(M,1);break}}return true}if(P.records){K(P.records)}}}};K(this.hierarchy)}else{for(var e=0;e<this.records.length;e++){var I=this.records[e];if(I.uid==H){this.records.splice(e,1);return true}}}return false},addForeignValues:function(H){var Q=this;var V=H.datafields?H.datafields.length:0;for(var N=0;N<V;N++){var L=H.datafields[N];if(L!=undefined){if(L.values!=undefined){if(L.value==undefined){L.value=L.name}if(L.values.value==undefined){L.values.value=L.value}var T=new Array();var K,M;if(Q.pageable&&Q.virtualmode){K=Q.pagenum*Q.pagesize;M=K+Q.pagesize;if(M>Q.totalrecords){M=Q.totalrecords}}else{if(Q.virtualmode){K=H.recordstartindex;M=H.recordendindex;if(M>Q.totalrecords){M=Q.totalrecords}}else{K=0;M=Q.records.length}}for(var O=K;O<M;O++){var P=Q.records[O];var I=L.name;var U=P[L.value];if(T[U]!=undefined){P[I]=T[U]}else{for(var J=0;J<L.values.source.length;J++){var S=L.values.source[J];var e=S[L.values.value];if(e==undefined){e=S.uid}if(e==U){var R=S[L.values.name];P[I]=R;T[U]=R;break}}}}}else{if(L.value!=undefined){for(var O=0;O<Q.records.length;O++){var P=Q.records[O];P[L.name]=P[L.value]}}}}}},abort:function(){if(this.xhr&&this.xhr.readyState!=4){this.xhr.abort();me.callDownloadComplete()}},_requestData:function(H,J,e){var I=this;var K=function(P){if(P.totalrecords){J.totalrecords=P.totalrecords;I.totalrecords=P.totalrecords}if(P.records){I.records=P.records;I.cachedrecords=P.records}I.addForeignValues(J);if(e.uniqueDataFields){var N=I.getUniqueRecords(I.records,e.uniqueDataFields);I.records=N;I.cachedrecords=N}if(e.beforeLoadComplete){var O=e.beforeLoadComplete(I.records,P);if(O!=undefined){I.records=O;I.cachedrecords=O}}for(var M=0;M<I.records.length;M++){var L=I.records[M];if(undefined==L){continue}if(undefined==L.uid){L.uid=I.getid(J.id,L,M)}}I.buildHierarchy.call(I);if(i.isFunction(e.loadComplete)){e.loadComplete(P)}I.callDownloadComplete()};e.loadServerData(H,J,K)},getUniqueRecords:function(I,L){if(I&&L){var e=I.length;var Q=L.length;var N=new Array();var O=new Array();for(var P=0;P<e;P++){var M=I[P];var J="";if(M==undefined){continue}for(var K=0;K<Q;K++){var H=L[K];J+=M[H]+"_"}if(!O[J]){N[N.length]=M}O[J]=true}}return N},getAggregatedData:function(S,P,M,H){var L=M;if(!L){L=this.records}var Q={};var K=new Array();var J=L.length;if(J==0){return}if(J==undefined){return}for(var O=0;O<J;O++){var R=L[O];for(var N=0;N<S.length;N++){var I=S[N];var U=R[I.name];if(I.aggregates){Q[I.name]=Q[I.name]||{};K[I.name]=K[I.name]||0;K[I.name]++;var e=function(W){for(obj in W){var X=Q[I.name][obj];if(X==null){Q[I.name][obj]=0;X=0}if(i.isFunction(W[obj])){X=W[obj](X,U,I.name,R,H)}Q[I.name][obj]=X}};var T=parseFloat(U);if(isNaN(T)){T=false}else{T=true}if(T){U=parseFloat(U)}if(typeof U==="number"&&isFinite(U)){i.each(I.aggregates,function(){var W=Q[I.name][this];if(W==null){W=0;if(this=="min"){W=9999999999999}if(this=="max"){W=-9999999999999}}if(this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){W+=parseFloat(U)}else{if(this=="product"){if(O==0){W=parseFloat(U)}else{W*=parseFloat(U)}}else{if(this=="min"){W=Math.min(W,parseFloat(U))}else{if(this=="max"){W=Math.max(W,parseFloat(U))}else{if(this=="count"){W++}else{if(typeof(this)=="object"){e(this);return}}}}}}Q[I.name][this]=W})}else{i.each(I.aggregates,function(){if(this=="min"||this=="max"||this=="count"||this=="product"||this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){if(U===null){return true}var W=Q[I.name][this];if(W==null){W=0}Q[I.name][this]=W;return true}if(typeof(this)=="object"){e(this)}})}}}}for(var N=0;N<S.length;N++){var I=S[N];if(!Q[I.name]){Q[I.name]={};i.each(I.aggregates,function(W){Q[I.name][this]=0})}if(Q[I.name]["avg"]!=undefined){var U=Q[I.name]["avg"];var V=K[I.name];if(V===0||V==undefined){Q[I.name]["avg"]=0}else{Q[I.name]["avg"]=U/V}}else{if(Q[I.name]["count"]!=undefined){Q[I.name]["count"]=J}}if(Q[I.name]["stdev"]||Q[I.name]["stdevp"]||Q[I.name]["var"]||Q[I.name]["varp"]){i.each(I.aggregates,function(ac){if(this=="stdev"||this=="var"||this=="varp"||this=="stdevp"){var ad=Q[I.name][this];var ab=J;var W=(ad/J);var Y=0;for(var Z=0;Z<J;Z++){var aa=L[Z];var ae=aa[I.name];Y+=(ae-W)*(ae-W)}var X=(this=="stdevp"||this=="varp")?ab:ab-1;if(X==0){X=1}if(this=="var"||this=="varp"){Q[I.name][this]=Y/X}else{if(this=="stdevp"||this=="stdev"){Q[I.name][this]=Math.sqrt(Y/X)}}}})}if(I.formatStrings){i.each(I.aggregates,function(X){var W=I.formatStrings[X];if(W){if(this=="min"||this=="max"||this=="count"||this=="product"||this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){var Y=Q[I.name][this];Q[I.name][this]=i.jqx.dataFormat.formatnumber(Y,W,P)}else{if(typeof this=="object"){for(obj in this){var Y=Q[I.name][obj];Q[I.name][obj]=i.jqx.dataFormat.formatnumber(Y,W,P)}}}}})}}return Q},bindDownloadComplete:function(H,e){this._downloadComplete[this._downloadComplete.length]={id:H,func:e}},unbindDownloadComplete:function(H){for(var e=0;e<this._downloadComplete.length;e++){if(this._downloadComplete[e].id==H){this._downloadComplete[e].func=null;this._downloadComplete.splice(e,1);break}}},callDownloadComplete:function(){for(var e=0;e<this._downloadComplete.length;e++){var H=this._downloadComplete[e];if(H.func!=null){H.func()}}},setSource:function(e){this._source=e},generatekey:function(){var e=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e())},getGroupedRecords:function(aj,am,W,ae,ak,ab,ad,an,K){var ag=0;var aa=this;if(!K){K=0}var I=new Array();for(var N=0;N<aj.length;N++){I[N]=aa.generatekey()}if(!am){am="items"}if(!W){W="group"}if(!ak){ak="record"}if(!ad){ad="parentItem"}if(undefined===ab){ab="value"}var S=new Array();var L=0;var J=new Array();var R=aj.length;var al=new Array();if(!an){var an=this.records}var P=an.length;var af=function(ao){var ap=ao;if(ae){i.each(ae,function(){if(this.name&&this.map){ap[this.map]=ap[this.name]}})}return ap};for(var V=0;V<P;V++){var ai=af(an[V]);id=ai[aa.uniqueId];var H=new Array();var X=0;for(N=0;N<R;N++){var Q=aj[N];var ac=ai[Q];if(null==ac){continue}H[X++]={value:ac,hash:I[N]}}if(H.length!=R){break}var Y=null;var T="";var e=-1;for(var Z=0;Z<H.length;Z++){e++;var ah=H[Z].value;var M=H[Z].hash;T=T+"_"+M+"_"+ah;if(J[T]!=undefined&&J[T]!=null){Y=J[T];continue}if(Y==null){Y={level:0};Y[ad]=null;Y[W]=ah;Y[ak]=ai;if(ai.expanded!==undefined){Y.expanded=ai.expanded}else{Y.expanded=false}if(ab){Y[ab]=ai[ab]}Y[am]=new Array();var O=S.length+K;if(!this._source.id||typeof ai.uid==="number"||isFinite(ai.uid)){O="Row"+O}Y.uid=O;S[L++]=Y}else{var U={level:Y.level+1};U[ad]=Y;U[W]=ah;U[am]=new Array();U[ak]=ai;if(ai.expanded!==undefined){U.expanded=ai.expanded}else{U.expanded=false}if(ab){U[ab]=ai[ab]}U.uid=Y.uid+"_"+Y[am].length;Y[am][Y[am].length]=U;Y=U}J[T]=Y}if(ai){ai.leaf=true}if(Y!=null){if(this._source.id==null){if(undefined==ai.uid){ai.uid=Y.uid+"_"+Y[am].length}else{if(ai.uid.toString().indexOf(Y.uid)==-1){ai.uid=Y.uid+"_"+ai.uid}}}ai[ad]=Y;ai.level=Y.level+1;Y[am][Y[am].length]=ai}else{if(undefined==ai.uid){ai.uid=this.generatekey()}}}return S},getRecordsHierarchy:function(L,J,aa,U,H){var e=new Array();var I=this.records;if(H){I=H}if(this.records.length==0){return null}var Y=aa!=null?aa:"items";var R=[];var ab=I;var O=ab.length;var P=(this._source&&this._source.hierarchy)?this._source.hierarchy.reservedNames:null;var W=function(ac){var ad=ac;if(U){i.each(U,function(){if(this.name&&this.map){ad[this.map]=ad[this.name]}})}return ad};for(var X=0;X<O;X++){var Z=i.extend({},ab[X]);var T=Z[J];var S=Z[L];R[S]={parentid:T,item:Z}}for(var X=0;X<O;X++){var Z=i.extend({},ab[X]);var T=Z[J];var S=Z[L];if(R[T]!=undefined){var Z={parentid:T,item:R[S].item};var Q=R[T].item;if(!Q[Y]){Q[Y]=[]}var M=Q[Y].length;var K=Z.item;if(!P){if(K.parent==undefined){K.parent=Q}}else{if(K[P.parent]==undefined){K[P.parent]=Q}}var N=W(K);Q[Y][M]=N;R[T].item=Q;R[S]=Z}else{var K=R[S].item;if(!P){if(K.parent==undefined){K.parent=null}}else{if(K[P.parent]==undefined){K[P.parent]=null}}var N=W(K);if(!P){N.level=0}else{N[P.level]=0}e[e.length]=N}}if(e.length!=0){var V=function(af,ac){for(var ad=0;ad<ac.length;ad++){if(!P){ac[ad].level=af}else{ac[ad][P.level]=af}var ae=ac[ad][Y];if(ae){if(ae.length>0){V(af+1,ae)}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}};V(0,e)}return e},bindBindingUpdate:function(H,e){this._bindingUpdate[this._bindingUpdate.length]={id:H,func:e}},unbindBindingUpdate:function(H){for(var e=0;e<this._bindingUpdate.length;e++){if(this._bindingUpdate[e].id==H){this._bindingUpdate[e].func=null;this._bindingUpdate.splice(e,1);break}}},callBindingUpdate:function(e){for(var I=0;I<this._bindingUpdate.length;I++){var H=this._bindingUpdate[I];if(H.func!=null){H.func(e)}}},getid:function(N,H,K){if(N!=null&&N.name!=undefined){if(N.name){var e=i(H).attr(N.name);if(e!=null&&e.toString().length>0){return e}else{if(N.map){try{var e=i(H).attr(N.map);if(e!=null&&e.toString().length>0){return e}else{if(i(N.map,H).length>0){return i(N.map,H).text()}else{if(i(N.name,H).length>0){return i(N.name,H).text()}}}}catch(J){return K}}}return}}if(i(N,H).length>0){return i(N,H).text()}if(N){if(N.toString().length>0){var e=i(H).attr(N);if(e!=null&&e.toString().length>0){return i.trim(e).split(" ").join("").replace(/([ #;?%&,.+*~\':"!^$[\]()=>|\/\\@])/g,"")}else{var I=N.split(this.mapChar);if(I.length>1){var M=H;for(var L=0;L<I.length;L++){if(M!=undefined){M=M[I[L]]}}if(M!=undefined){return M}}else{if(H[N]!=undefined){return H[N]}}}}}return K},loadjson:function(ae,af,R){if(typeof(ae)=="string"){ae=i.parseJSON(ae)}if(R.root==undefined){R.root=""}if(R.record==undefined){R.record=""}var ae=ae||af;if(!ae){ae=[]}var ad=this;if(R.root!=""){var K=R.root.split(ad.mapChar);if(K.length>1){var aa=ae;for(var Q=0;Q<K.length;Q++){if(aa!=undefined){aa=aa[K[Q]]}}ae=aa}else{if(ae[R.root]!==undefined){ae=ae[R.root]}else{if(ae[0]&&ae[0][R.root]!==undefined){ae=ae[0][R.root]}else{i.each(ae,function(ah){var ag=this;if(this==R.root){ae=this;return false}else{if(this[R.root]!=undefined){ae=this[R.root]}}})}}if(!ae){var K=R.root.split(ad.mapChar);if(K.length>0){var aa=ae;for(var Q=0;Q<K.length;Q++){if(aa!=undefined){aa=aa[K[Q]]}}ae=aa}}}}else{if(!ae.length){for(obj in ae){if(i.isArray(ae[obj])){ae=ae[obj];break}}}}if(ae!=null&&ae.length==undefined){ae=i.makeArray(ae)}if(ae==null||ae==undefined||ae=="undefined"||ae.length==undefined){throw new Error("jqxDataAdapter: JSON Parse error! Invalid JSON. Please, check your JSON or your jqxDataAdapter initialization!");return}if(ae.length==0){this.totalrecords=0;return}var J=ae.length;this.totalrecords=this.virtualmode?(R.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var W=this.records;var T=!this.pageable?R.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(R.loadallrecords){T=0;J=this.totalrecords}var P=0;if(this.virtualmode){T=!this.pageable?R.recordstartindex:this.pagesize*this.pagenum;P=T;T=0;J=this.totalrecords}var Y=R.datafields?R.datafields.length:0;if(Y==0){var e=ae[0];var ab=new Array();for(obj in e){var H=obj;ab[ab.length]={name:H}}R.datafields=ab;R.generatedfields=R.datafields;Y=ab.length}var M=T;for(var V=T;V<J;V++){var I=ae[V];if(I==undefined){break}if(R.record&&R.record!=""){I=I[R.record];if(I==undefined){continue}}var ac=this.getid(R.id,I,V);if(typeof(ac)==="object"){ac=V}if(!this.recordids[ac]){this.recordids[ac]=I;var L={};for(var U=0;U<Y;U++){var N=R.datafields[U];var S="";if(undefined==N||N==null){continue}if(N.map){if(i.isFunction(N.map)){S=N.map(I)}else{var K=N.map.split(ad.mapChar);if(K.length>0){var Z=I;for(var Q=0;Q<K.length;Q++){if(Z!=undefined){Z=Z[K[Q]]}}S=Z}else{S=I[N.map]}}if(S!=undefined&&S!=null){S=this.getvaluebytype(S,N)}else{if(S==undefined&&S!=null){S=""}}}if(S==""&&!N.map){S=I[N.name];if(S==undefined&&S!=null){S=""}if(N.value!=undefined){if(S!=undefined){var X=S[N.value];if(X!=undefined){S=X}}}}S=this.getvaluebytype(S,N);if(N.displayname!=undefined){L[N.displayname]=S}else{L[N.name]=S}if(N.type==="array"){var O=function(aj){if(!aj){return}for(var ap=0;ap<aj.length;ap++){var am=aj[ap];if(!am){continue}for(var an=0;an<Y;an++){var ai=R.datafields[an];var ao="";if(undefined==ai||ai==null){continue}if(ai.map){if(i.isFunction(ai.map)){ao=ai.map(am)}else{var ag=ai.map.split(ad.mapChar);if(ag.length>0){var al=am;for(var ah=0;ah<ag.length;ah++){if(al!=undefined){al=al[ag[ah]]}}ao=al}else{ao=am[ai.map]}}if(ao!=undefined&&ao!=null){ao=this.getvaluebytype(ao,ai)}else{if(ao==undefined&&ao!=null){ao=""}}}if(ao==""&&!ai.map){ao=am[ai.name];if(ao==undefined&&ao!=null){ao=""}if(ai.value!=undefined){if(ao!=undefined){var ak=ao[ai.value];if(ak!=undefined){ao=ak}}}}ao=this.getvaluebytype(ao,ai);if(ai.displayname!=undefined){am[ai.displayname]=ao}else{am[ai.name]=ao}if(ai.type==="array"){O.call(this,ao)}}}};O.call(this,S)}}if(R.recordendindex<=0||T<R.recordendindex){W[P+M]=new Object(L);W[P+M].uid=ac;this.originaldata[P+M]=new Object(W[V]);M++}}}this.records=W;this.cachedrecords=this.records},loadxml:function(K,ai,U){if(typeof(K)=="string"){K=ai=i(i.parseXML(K));K=null}if(U.root==undefined){U.root=""}if(U.record==undefined){U.record=""}var K;if(i.jqx.browser.msie&&ai){if(ai.xml!=undefined){K=i(U.root+" "+U.record,i.parseXML(ai.xml))}else{K=K||i(U.root+" "+U.record,ai)}}else{K=K||i(U.root+" "+U.record,ai)}if(!K){K=[]}var J=K.length;if(K.length==0){return}this.totalrecords=this.virtualmode?(U.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var aa=this.records;var X=!this.pageable?U.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(U.loadallrecords){X=0;J=this.totalrecords}var S=0;if(this.virtualmode){X=!this.pageable?U.recordstartindex:this.pagesize*this.pagenum;S=X;X=0;J=this.totalrecords}var ac=U.datafields?U.datafields.length:0;if(ac==0){var e=K[0];var af=new Array();for(obj in e){var H=obj;af[af.length]={name:H}}U.datafields=af;U.generatedfields=U.datafields;ac=af.length}var T=X;var ae=false;for(var Z=X;Z<J;Z++){var I=K[Z];if(I==undefined){break}var ah=this.getid(U.id,I,Z);if(!this.recordids[ah]){this.recordids[ah]=I;var L={};var P=false;if(U.hierarchy&&U.hierarchy.root){P=true}for(var Y=0;Y<ac;Y++){var Q=U.datafields[Y];var W="";if(undefined==Q||Q==null){continue}if(Q.map){if(i.isFunction(Q.map)){W=Q.map(I)}else{var M=Q.map.indexOf("[");if(M<0){W=i(Q.map,I);if(W.length==1){W=W.text()}else{ae=true;var ag=new Array();for(var ab=0;ab<W.length;ab++){ag.push(i(W[ab]).text())}W=ag;if(P&&ag.length>0){W=ag[0]}}}else{var ad=Q.map.substring(0,M-1);var O=Q.map.indexOf("]");var R=Q.map.substring(M+1,O);W=i(ad,I).attr(R);if(W==undefined){W=i(I).attr(R)}if(W==undefined){W=""}}if(W==""){W=i(I).attr(Q.map);if(W==undefined){W=""}}}}if(W==""){W=i(Q.name,I);if(W.length==1){W=W.text()}else{var ag=new Array();for(var ab=0;ab<W.length;ab++){ag.push(i(W[ab]).text())}W=ag;if(P&&ag.length>0){W=ag[0]}}if(W==""){W=i(I).attr(Q.name);if(W==undefined){W=""}}if(W==""){if(I.nodeName&&I.nodeName==Q.name&&I.firstChild){W=i(I.firstChild).text()}}}var V=W;W=this.getvaluebytype(W,Q);if(Q.displayname!=undefined){L[Q.displayname]=W}else{L[Q.name]=W}}if(U.recordendindex<=0||X<U.recordendindex){aa[S+T]=i.extend({},L);aa[S+T].uid=ah;this.originaldata[S+T]=i.extend({},aa[Z]);T++}}}if(U.hierarchy&&U.hierarchy.root){for(var Z=X;Z<J;Z++){var I=K[Z];var N=aa[Z];if(i(I).parent().length>0){var ah=this.getid(U.id,i(I).parents(U.hierarchy.record+":first"));N.parentuid=ah}else{N.parentuid=null}}}this.records=aa;this.cachedrecords=this.records},loadics:function(N,H){if(N==null){return}var S=H.rowDelimiter||this.rowDelimiter||"\n";var R=N.split(S);var K=R.length;var Q=N.split("\r");if(K==1&&Q.length>1){R=Q;K=R.length}this.records=new Array();this.originaldata=new Array();var L=this.records;this.recordids=new Array();var I=0;var P=function(V){var T=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/;var U=T.exec(V);if(!U){throw new Error("Invalid UNTIL value: "+V)}return new Date(Date.UTC(U[1],U[2]-1,U[3],U[5]||0,U[6]||0,U[7]||0))};for(var M=0;M<K;M++){var O=R[M];if(O=="BEGIN:VEVENT"){var e={};continue}if(O.indexOf("SUMMARY")>=0){e.SUMMARY=O.substring(O.indexOf("SUMMARY")+8);continue}if(O.indexOf("LOCATION")>=0){e.LOCATION=O.substring(O.indexOf("LOCATION")+9);continue}if(O.indexOf("DESCRIPTION")>=0){e.DESCRIPTION=O.substring(O.indexOf("DESCRIPTION")+12);continue}if(O.indexOf("RRULE")>=0){e.RRULE=O.substring(O.indexOf("RRULE")+6);continue}if(O.indexOf("EXDATE")>=0){var J=O.substring(O.indexOf("EXDATE")+7);e.EXDATE=J;continue}if(O.indexOf("DTEND")>=0){e.DTEND=P(O.substring(O.indexOf("DTEND")+6));continue}if(O.indexOf("DTSTART")>=0){e.DTSTART=P(O.substring(O.indexOf("DTSTART")+8));continue}if(O.indexOf("UID")>=0){e.uid=e.UID=O.substring(O.indexOf("UID")+4);continue}if(O.indexOf("STATUS")>=0){e.STATUS=O.substring(O.indexOf("STATUS")+7);continue}if(O=="END:VEVENT"){L.push(e);continue}}this.records=L;this.cachedrecords=this.records},loadtext:function(Y,P){if(Y==null){return}var e=P.rowDelimiter||this.rowDelimiter||"\n";var L=Y.split(e);var J=L.length;var X=Y.split("\r");if(J==1&&X.length>1){L=X;J=L.length}this.totalrecords=this.virtualmode?(P.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var U=this.records;var R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(P.loadallrecords){R=0;J=this.totalrecords}var N=0;if(this.virtualmode){R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;N=R;R=0;J=this.totalrecords}var V=P.datafields.length;var O=P.columnDelimiter||this.columnDelimiter;if(!O){O=(P.datatype==="tab"||P.datatype==="tsv")?"\t":","}for(var T=R;T<J;T++){var I=L[T];var W=null;if(!this.recordids[W]){if(P.id==null){W=T;this.recordids[W]=I}var K={};var H=L[T].split(O);for(var S=0;S<V;S++){if(S>=H.length){continue}var M=P.datafields[S];var Q=H[S];if(M.map&&i.isFunction(M.map)){Q=M.map(I)}if(M.type){Q=this.getvaluebytype(Q,M)}var Z=M.map||M.name||S.toString();K[Z]=Q;if(P.id!=null){if(P.id===M.name){W=Q;this.recordids[W]=I}}}if(W==null){W=T}U[N+T]=i.extend({},K);U[N+T].uid=W;this.originaldata[N+T]=i.extend({},U[T])}}this.records=U;this.cachedrecords=this.records},getvaluebytype:function(L,H){var J=L;if(L==null){return L}if(i.isArray(L)&&H.type!="array"){for(var I=0;I<L.length;I++){L[I]=this.getvaluebytype(L[I],H)}return L}if(H.type=="date"){if(L=="NaN"){L=""}else{if(L&&L instanceof Date){return L}var K=new Date(L);if(typeof L=="string"){if(H.format){var e=i.jqx.dataFormat.parsedate(L,H.format);if(e!=null){K=e}}}if(K.toString()=="NaN"||K.toString()=="Invalid Date"){if(i.jqx.dataFormat){L=i.jqx.dataFormat.tryparsedate(L)}else{L=K}}else{L=K}if(L==null){L=J}}}else{if(H.type=="float"||H.type=="number"||H.type=="decimal"){if(L=="NaN"){L=""}else{var L=parseFloat(L);if(isNaN(L)){L=J}}}else{if(H.type=="int"||H.type=="integer"){var L=parseInt(L);if(isNaN(L)){L=J}}else{if(H.type=="bool"||H.type=="boolean"){if(L!=null){if(L.toLowerCase!=undefined){if(L.toLowerCase()=="false"){L=false}else{if(L.toLowerCase()=="true"){L=true}}}}if(L==1){L=true}else{if(L==0&&L!==""){L=false}else{L=""}}}}}}return L}};i.jqx.dataFormat={};i.extend(i.jqx.dataFormat,{regexTrim:/^\s+|\s+$/g,regexInfinity:/^[+-]?infinity$/i,regexHex:/^0x[a-f0-9]+$/i,regexParseFloat:/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,toString:Object.prototype.toString,isBoolean:function(e){return typeof e==="boolean"},isObject:function(e){return(e&&(typeof e==="object"||i.isFunction(e)))||false},isDate:function(e){return e instanceof Date},arrayIndexOf:function(J,I){if(J.indexOf){return J.indexOf(I)}for(var e=0,H=J.length;e<H;e++){if(J[e]===I){return e}}return -1},isString:function(e){return typeof e==="string"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isNull:function(e){return e===null},isUndefined:function(e){return typeof e==="undefined"},isValue:function(e){return(this.isObject(e)||this.isString(e)||this.isNumber(e)||this.isBoolean(e))},isEmpty:function(e){if(!this.isString(e)&&this.isValue(e)){return false}else{if(!this.isValue(e)){return true}}e=i.trim(e).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,"");return e===""},startsWith:function(H,e){return H.indexOf(e)===0},endsWith:function(H,e){return H.substr(H.length-e.length)===e},trim:function(e){return(e+"").replace(this.regexTrim,"")},isArray:function(e){return this.toString.call(e)==="[object Array]"},defaultcalendar:function(){var e={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","};return e},expandFormat:function(K,J){J=J||"F";var I,H=K.patterns,e=J.length;if(e===1){I=H[J];if(!I){throw"Invalid date format string '"+J+"'."}J=I}else{if(e===2&&J.charAt(0)==="%"){J=J.charAt(1)}}return J},getEra:function(I,H){if(!H){return 0}if(typeof I==="string"){return 0}var L,K=I.getTime();for(var J=0,e=H.length;J<e;J++){L=H[J].start;if(L===null||K>=L){return J}}return 0},toUpper:function(e){return e.split("\u00A0").join(" ").toUpperCase()},toUpperArray:function(e){var J=[];for(var I=0,H=e.length;I<H;I++){J[I]=this.toUpper(e[I])}return J},getEraYear:function(H,J,e,K){var I=H.getFullYear();if(!K&&J.eras){I-=J.eras[e].offset}return I},toUpper:function(e){if(e){return e.toUpperCase()}return""},getDayIndex:function(K,J,H){var e,L=K.days,I=K._upperDays;if(!I){K._upperDays=I=[this.toUpperArray(L.names),this.toUpperArray(L.namesAbbr),this.toUpperArray(L.namesShort)]}J=J.toUpperCase();if(H){e=this.arrayIndexOf(I[1],J);if(e===-1){e=this.arrayIndexOf(I[2],J)}}else{e=this.arrayIndexOf(I[0],J)}return e},getMonthIndex:function(N,M,I){var e=N.months,H=N.monthsGenitive||N.months,K=N._upperMonths,L=N._upperMonthsGen;if(!K){N._upperMonths=K=[this.toUpperArray(e.names),this.toUpperArray(e.namesAbbr)];N._upperMonthsGen=L=[this.toUpperArray(H.names),this.toUpperArray(H.namesAbbr)]}M=this.toUpper(M);var J=this.arrayIndexOf(I?K[1]:K[0],M);if(J<0){J=this.arrayIndexOf(I?L[1]:L[0],M)}return J},appendPreOrPostMatch:function(J,e){var I=0,L=false;for(var K=0,H=J.length;K<H;K++){var M=J.charAt(K);switch(M){case"'":if(L){e.push("'")}else{I++}L=false;break;case"\\":if(L){e.push("\\")}L=!L;break;default:e.push(M);L=false;break}}return I},getTokenRegExp:function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},formatlink:function(e,I){var H="";if(I&&I.target){H="target="+I.target}if(H!=""){return"<a "+H+' href="'+e+'">'+e+"</a>"}return'<a href="'+e+'">'+e+"</a>"},formatemail:function(e){return'<a href="mailto:'+e+'">'+e+"</a>"},formatNumber:function(e,I,H){return this.formatnumber(e,I,H)},formatnumber:function(T,S,O){if(O==undefined||O==null||O==""){O=this.defaultcalendar()}if(S===""||S===null){return T}if(!this.isNumber(T)){T*=1}var P;if(S.length>1){P=parseInt(S.slice(1),10)}var V={};var Q=S.charAt(0).toUpperCase();V.thousandsSeparator=O.thousandsseparator;V.decimalSeparator=O.decimalseparator;switch(Q){case"D":case"d":case"F":case"f":V.decimalPlaces=P;break;case"N":case"n":V.decimalPlaces=0;break;case"C":case"c":V.decimalPlaces=P;if(O.currencysymbolposition=="before"){V.prefix=O.currencysymbol}else{V.suffix=O.currencysymbol}break;case"P":case"p":V.suffix=O.percentsymbol;V.decimalPlaces=P;break;default:throw"Bad number format specifier: "+Q}if(this.isNumber(T)){var K=(T<0);var I=T+"";var R=(V.decimalSeparator)?V.decimalSeparator:".";var e;if(this.isNumber(V.decimalPlaces)){var L=V.decimalPlaces;var N=Math.pow(10,L);I=(T*N).toFixed(0)/N+"";e=I.lastIndexOf(".");if(L>0){if(e<0){I+=R;e=I.length-1}else{if(R!=="."){I=I.replace(".",R)}}while((I.length-1-e)<L){I+="0"}}}else{var I=T+"";e=I.lastIndexOf(".");if(e>0&&L==undefined){if(R!=="."){I=I.replace(".",R)}}}if(V.thousandsSeparator){var U=V.thousandsSeparator;e=I.lastIndexOf(R);e=(e>-1)?e:I.length;var J=I.substring(e);var H=-1;for(var M=e;M>0;M--){H++;if((H%3===0)&&(M!==e)&&(!K||(M>1))){J=U+J}J=I.charAt(M-1)+J}I=J}I=(V.prefix)?V.prefix+I:I;I=(V.suffix)?I+V.suffix:I;return I}else{return T}},tryparsedate:function(ai,aj){if(aj==undefined||aj==null){aj=this.defaultcalendar()}var O=this;if(ai==""){return null}if(ai!=null&&!ai.substring){ai=ai.toString()}if(ai!=null&&ai.substring(0,6)=="/Date("){var ar=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var ap=new Date(+ai.replace(/\/Date\((\d+)\)\//,"$1"));if(ap=="Invalid Date"){var al=ai.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var ap=null;if(al){ap=new Date(1*al[1]+3600000*al[2]+60000*al[3])}}if(ap==null||ap=="Invalid Date"||isNaN(ap)){var P=ar.exec(ai);if(P){var R=new Date(parseInt(P[1]));if(P[2]){var X=parseInt(P[3]);if(P[2]==="-"){X=-X}var T=R.getUTCMinutes();R.setUTCMinutes(T-X)}if(!isNaN(R.valueOf())){return R}}}return ap}patterns=aj.patterns;for(prop in patterns){ap=O.parsedate(ai,patterns[prop],aj);if(ap){if(prop=="ISO"){var aa=O.parsedate(ai,patterns.ISO2,aj);if(aa){return aa}}return ap}}if(ai!=null){var aa=null;var L=[":","/","-"];var an=true;for(var N=0;N<L.length;N++){if(ai.indexOf(L[N])!=-1){an=false}}if(an){var at=new Number(ai);if(!isNaN(at)){return new Date(at)}}}if(i.type(ai)==="string"){var ae=O;ai=ae.trim(ai);var ak=[":","/","-"," ",","];var M=function(ax,av,aw){return aw.replace(new RegExp(ax,"g"),av)};ai=M(", ",",",ai);var I="";var W=ai;if(ai.indexOf(":")>=0){I=ai.substring(ai.indexOf(":")-2);I=ae.trim(I);W=ai.substring(0,ai.indexOf(":")-2)}else{if(ai.toUpperCase().indexOf("AM")>=0){I=ai.substring(ai.toUpperCase().indexOf("AM")-2);I=ae.trim(I);W=ai.substring(0,ai.toUpperCase().indexOf("AM")-2)}else{if(ai.toUpperCase().indexOf("PM")>=0){I=ai.substring(ai.toUpperCase().indexOf("PM")-2);I=ae.trim(I);W=ai.substring(0,ai.toUpperCase().indexOf("PM")-2)}}}var e=new Date();var ag=false;if(W){for(var ao=0;ao<ak.length;ao++){if(W.indexOf(ak[ao])>=0){L=W.split(ak[ao]);break}}var H=new Array();var U=new Array();var ac=new Array();var Q=null;var au=null;for(var ao=0;ao<L.length;ao++){var N=L[ao];var ab=ae.parsedate(N,"d",aj)||ae.parsedate(N,"dd",aj)||ae.parsedate(N,"ddd",aj)||ae.parsedate(N,"dddd",aj);if(ab){if(N.length<=2){Q=ao;H.push(ab.getDate());break}}}for(var ao=0;ao<L.length;ao++){var N=L[ao];var S=ae.parsedate(N,"M",aj)||ae.parsedate(N,"MM",aj)||ae.parsedate(N,"MMM",aj)||ae.parsedate(N,"MMMM",aj);if(S){if(Q!=undefined&&Q==ao){continue}U.push(S.getMonth());if(N.length>2){au=ao;break}}}for(var ao=0;ao<L.length;ao++){var N=L[ao];var ad=ae.parsedate(N,"yyyy",aj);if(ad){if(Q!=undefined&&Q==ao){continue}if(au!=undefined&&au==ao){continue}ac.push(ad.getFullYear())}}var am=new Array();for(var aq=0;aq<H.length;aq++){for(var al=0;al<U.length;al++){for(var ah=0;ah<ac.length;ah++){var R=new Date(ac[ah],U[al],H[aq]);if(ac[ah]<1970){R.setFullYear(ac[ah])}if(R.getTime()!=NaN){am.push(R)}}}}if(am.length>0){e=am[0];ag=true}}if(I){var af=I.indexOf(":")>=0?I.split(":"):I;var K=ae.parsedate(I,"h:mm tt",aj)||ae.parsedate(I,"h:mm:ss tt",aj)||ae.parsedate(I,"HH:mm:ss.fff",aj)||ae.parsedate(I,"HH:mm:ss.ff",aj)||ae.parsedate(I,"HH:mm:ss.tttt",aj)||ae.parsedate(I,"HH:mm:ss",aj)||ae.parsedate(I,"HH:mm",aj)||ae.parsedate(I,"HH",aj);var V=0,J=0,Y=0,Z=0;if(K&&K.getTime()!=NaN){V=K.getHours();J=K.getMinutes();Y=K.getSeconds();Z=K.getMilliseconds()}else{if(af.length==1){V=parseInt(af[0])}if(af.length==2){V=parseInt(af[0]);J=parseInt(af[1])}if(af.length==3){V=parseInt(af[0]);J=parseInt(af[1]);if(af[2].indexOf(".")>=0){Y=parseInt(af[2].toString().split(".")[0]);Z=parseInt(af[2].toString().split(".")[1])}else{Y=parseInt(af[2])}}if(af.length==4){V=parseInt(af[0]);J=parseInt(af[1]);Y=parseInt(af[2]);Z=parseInt(af[3])}}if(e&&!isNaN(V)&&!isNaN(J)&&!isNaN(Y)&&!isNaN(Z)){e.setHours(V,J,Y,Z);ag=true}}if(ag){return e}}return null},getparseregexp:function(e,R){var T=e._parseRegExp;if(!T){e._parseRegExp=T={}}else{var K=T[R];if(K){return K}}var Q=this.expandFormat(e,R).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),O=["^"],H=[],N=0,J=0,W=this.getTokenRegExp(),L;while((L=W.exec(Q))!==null){var V=Q.slice(N,L.index);N=W.lastIndex;J+=this.appendPreOrPostMatch(V,O);if(J%2){O.push(L[0]);continue}var I=L[0],M=I.length,S;switch(I){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":S="(\\D+)";break;case"tt":case"t":S="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":S="(\\d{"+M+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":S="(\\d\\d?)";break;case"zzz":S="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":S="([+-]?\\d\\d?)";break;case"/":S="(\\"+e["/"]+")";break;default:throw"Invalid date format pattern '"+I+"'.";break}if(S){O.push(S)}H.push(L[0])}this.appendPreOrPostMatch(Q.slice(N),O);O.push("$");var U=O.join("").replace(/\s+/g,"\\s+"),P={regExp:U,groups:H};return T[R]=P},outOfRange:function(I,e,H){return I<e||I>H},expandYear:function(L,J){var H=new Date(),e=this.getEra(H);if(J<100){var I=L.twoDigitYearMax;I=typeof I==="string"?new Date().getFullYear()%100+parseInt(I,10):I;var K=this.getEraYear(H,L,e);J+=K-(K%100);if(J>I){J-=100}}return J},parsedate:function(ab,ai,W){if(W==undefined||W==null){W=this.defaultcalendar()}ab=this.trim(ab);var T=W,an=this.getparseregexp(T,ai),N=new RegExp(an.regExp).exec(ab);if(N===null){return null}var aj=an.groups,Z=null,R=null,am=null,al=null,S=null,L=0,ae,ad=0,ak=0,e=0,I=null,U=false;for(var af=0,ah=aj.length;af<ah;af++){var H=N[af+1];if(H){var aa=aj[af],K=aa.length,M=parseInt(H,10);switch(aa){case"dd":case"d":al=M;if(this.outOfRange(al,1,31)){return null}break;case"MMM":case"MMMM":am=this.getMonthIndex(T,H,K===3);if(this.outOfRange(am,0,11)){return null}break;case"M":case"MM":am=M-1;if(this.outOfRange(am,0,11)){return null}break;case"y":case"yy":case"yyyy":R=K<4?this.expandYear(T,M):M;if(this.outOfRange(R,0,9999)){return null}break;case"h":case"hh":L=M;if(L===12){L=0}if(this.outOfRange(L,0,11)){return null}break;case"H":case"HH":L=M;if(this.outOfRange(L,0,23)){return null}break;case"m":case"mm":ad=M;if(this.outOfRange(ad,0,59)){return null}break;case"s":case"ss":ak=M;if(this.outOfRange(ak,0,59)){return null}break;case"tt":case"t":U=T.PM&&(H===T.PM[0]||H===T.PM[1]||H===T.PM[2]);if(!U&&(!T.AM||(H!==T.AM[0]&&H!==T.AM[1]&&H!==T.AM[2]))){return null}break;case"f":case"ff":case"fff":e=M*Math.pow(10,3-K);if(this.outOfRange(e,0,999)){return null}break;case"ddd":case"dddd":S=this.getDayIndex(T,H,K===3);if(this.outOfRange(S,0,6)){return null}break;case"zzz":var J=H.split(/:/);if(J.length!==2){return null}ae=parseInt(J[0],10);if(this.outOfRange(ae,-12,13)){return null}var P=parseInt(J[1],10);if(this.outOfRange(P,0,59)){return null}I=(ae*60)+(this.startsWith(H,"-")?-P:P);break;case"z":case"zz":ae=M;if(this.outOfRange(ae,-12,13)){return null}I=ae*60;break;case"g":case"gg":var V=H;if(!V||!T.eras){return null}V=trim(V.toLowerCase());for(var ag=0,ac=T.eras.length;ag<ac;ag++){if(V===T.eras[ag].name.toLowerCase()){Z=ag;break}}if(Z===null){return null}break}}}var Q=new Date(),Y,O=T.convert;Y=Q.getFullYear();if(R===null){R=Y}else{if(T.eras){R+=T.eras[(Z||0)].offset}}if(am===null){am=0}if(al===null){al=1}if(O){Q=O.toGregorian(R,am,al);if(Q===null){return null}}else{Q.setFullYear(R,am,al);if(Q.getDate()!==al){return null}if(S!==null&&Q.getDay()!==S){return null}}if(U&&L<12){L+=12}Q.setHours(L,ad,ak,e);if(I!==null){var X=Q.getMinutes()-(I+Q.getTimezoneOffset());Q.setHours(Q.getHours()+parseInt(X/60,10),X%60)}return Q},cleardatescache:function(){this.datescache=new Array()},formatDate:function(e,I,H){return this.formatdate(e,I,H)},formatdate:function(Z,ad,U){if(U==undefined||U==null){U=this.defaultcalendar()}if(typeof Z==="string"){return Z}var J=Z.toString()+"_"+ad;if(this.datescache&&this.datescache[J]){if(ad.indexOf("f")==-1){return this.datescache[J]}}if(!ad||!ad.length||ad==="i"){var af;af=this.formatDate(Z,U.patterns.F,U);return af}var aa=U.eras,H=ad==="s";ad=this.expandFormat(U,ad);af=[];var M,ab=["0","00","000"],Q,R,e=/([^d]|^)(d|dd)([^d]|$)/g,ae=0,W=this.getTokenRegExp(),I;function O(ag,aj){var ai,ah=ag+"";if(aj>1&&ah.length<aj){ai=(ab[aj-2]+ah);return ai.substr(ai.length-aj,aj)}else{ai=ah}return ai}function ac(){if(Q||R){return Q}Q=e.test(ad);R=true;return Q}function K(ah,ag){if(I){return I[ag]}if(ah.getMonth!=undefined){switch(ag){case 0:return ah.getFullYear();case 1:return ah.getMonth();case 2:return ah.getDate()}}}for(;;){var N=W.lastIndex,V=W.exec(ad);var S=ad.slice(N,V?V.index:ad.length);ae+=this.appendPreOrPostMatch(S,af);if(!V){break}if(ae%2){af.push(V[0]);continue}var X=V[0],L=X.length;switch(X){case"ddd":case"dddd":var T=(L===3)?U.days.namesAbbr:U.days.names;af.push(T[Z.getDay()]);break;case"d":case"dd":Q=true;af.push(O(K(Z,2),L));break;case"MMM":case"MMMM":var Y=K(Z,1);af.push(U.months[L===3?"namesAbbr":"names"][Y]);break;case"M":case"MM":af.push(O(K(Z,1)+1,L));break;case"y":case"yy":case"yyyy":Y=this.getEraYear(Z,U,this.getEra(Z,aa),H);if(L<4){Y=Y%100}af.push(O(Y,L));break;case"h":case"hh":M=Z.getHours()%12;if(M===0){M=12}af.push(O(M,L));break;case"H":case"HH":af.push(O(Z.getHours(),L));break;case"m":case"mm":af.push(O(Z.getMinutes(),L));break;case"s":case"ss":af.push(O(Z.getSeconds(),L));break;case"t":case"tt":Y=Z.getHours()<12?(U.AM?U.AM[0]:" "):(U.PM?U.PM[0]:" ");af.push(L===1?Y.charAt(0):Y);break;case"f":case"ff":case"fff":af.push(O(Z.getMilliseconds(),3).substr(0,L));break;case"z":case"zz":M=Z.getTimezoneOffset()/60;af.push((M<=0?"+":"-")+O(Math.floor(Math.abs(M)),L));break;case"zzz":M=Z.getTimezoneOffset()/60;af.push((M<=0?"+":"-")+O(Math.floor(Math.abs(M)),2)+":"+O(Math.abs(Z.getTimezoneOffset()%60),2));break;case"g":case"gg":if(U.eras){af.push(U.eras[this.getEra(Z,aa)].name)}break;case"/":af.push(U["/"]);break;default:throw"Invalid date format pattern '"+X+"'.";break}}var P=af.join("");if(!this.datescache){this.datescache=new Array()}this.datescache[J]=P;return P}});i.jqx.data={};var l,E,p=/#.*$/,a=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,f=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,j=/^(?:GET|HEAD)$/,o=/^\/\//,k=/\?/,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=/([?&])_=[^&]*/,h=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,t=/\s+/,F=i.fn.load,G={},C={},q=["*/"]+["*"];try{E=location.href}catch(A){E=document.createElement("a");E.href="";E=E.href}l=h.exec(E.toLowerCase())||[];function r(e){return function(K,M){if(typeof K!=="string"){M=K;K="*"}var H,N,O,J=K.toLowerCase().split(t),I=0,L=J.length;if(i.isFunction(M)){for(;I<L;I++){H=J[I];O=/^\+/.test(H);if(O){H=H.substr(1)||"*"}N=e[H]=e[H]||[];N[O?"unshift":"push"](M)}}}}function v(H,Q,L,O,N,J){N=N||Q.dataTypes[0];J=J||{};J[N]=true;var P,M=H[N],I=0,e=M?M.length:0,K=(H===G);for(;I<e&&(K||!P);I++){P=M[I](Q,L,O);if(typeof P==="string"){if(!K||J[P]){P=undefined}else{Q.dataTypes.unshift(P);P=v(H,Q,L,O,P,J)}}}if((K||!P)&&!J["*"]){P=v(H,Q,L,O,"*",J)}return P}function u(I,J){var H,e,K=i.jqx.data.ajaxSettings.flatOptions||{};for(H in J){if(J[H]!==undefined){(K[H]?I:(e||(e={})))[H]=J[H]}}if(e){i.extend(true,I,e)}}i.extend(i.jqx.data,{ajaxSetup:function(H,e){if(e){u(H,i.jqx.data.ajaxSettings)}else{e=H;H=i.jqx.data.ajaxSettings}u(H,e);return H},ajaxSettings:{url:E,isLocal:f.test(l[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":q},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:r(G),ajaxTransport:r(C),ajax:function(M,J){if(typeof M==="object"){J=M;M=undefined}J=J||{};var P,ad,K,Y,R,V,I,X,Q=i.jqx.data.ajaxSetup({},J),af=Q.context||Q,T=af!==Q&&(af.nodeType||af instanceof i)?i(af):i.event,ae=i.Deferred(),aa=i.Callbacks("once memory"),N=Q.statusCode||{},U={},ab={},L=0,O="canceled",W={readyState:0,setRequestHeader:function(ag,ah){if(!L){var e=ag.toLowerCase();ag=ab[e]=ab[e]||ag;U[ag]=ah}return this},getAllResponseHeaders:function(){return L===2?ad:null},getResponseHeader:function(ag){var e;if(L===2){if(!K){K={};while((e=a.exec(ad))){K[e[1].toLowerCase()]=e[2]}}e=K[ag.toLowerCase()]}return e===undefined?null:e},overrideMimeType:function(e){if(!L){Q.mimeType=e}return this},abort:function(e){e=e||O;if(Y){Y.abort(e)}S(0,e);return this}};function S(ak,ag,al,ai){var e,ao,am,aj,an,ah=ag;if(L===2){return}L=2;if(R){clearTimeout(R)}Y=undefined;ad=ai||"";W.readyState=ak>0?4:0;if(al){aj=B(Q,W,al)}if(ak>=200&&ak<300||ak===304){if(Q.ifModified){an=W.getResponseHeader("Last-Modified");if(an){i.lastModified[P]=an}an=W.getResponseHeader("Etag");if(an){i.etag[P]=an}}if(ak===304){ah="notmodified";e=true}else{e=c(Q,aj);ah=e.state;ao=e.data;am=e.error;e=!am}}else{am=ah;if(!ah||ak){ah="error";if(ak<0){ak=0}}}W.status=ak;W.statusText=(ag||ah)+"";if(e){ae.resolveWith(af,[ao,ah,W])}else{ae.rejectWith(af,[W,ah,am])}W.statusCode(N);N=undefined;if(I){T.trigger("ajax"+(e?"Success":"Error"),[W,Q,e?ao:am])}aa.fireWith(af,[W,ah]);if(I){T.trigger("ajaxComplete",[W,Q]);if(!(--i.active)){i.event.trigger("ajaxStop")}}}ae.promise(W);W.success=W.done;W.error=W.fail;W.complete=aa.add;W.statusCode=function(ag){if(ag){var e;if(L<2){for(e in ag){N[e]=[N[e],ag[e]]}}else{e=ag[W.status];W.always(e)}}return this};Q.url=((M||Q.url)+"").replace(p,"").replace(o,l[1]+"//");Q.dataTypes=i.trim(Q.dataType||"*").toLowerCase().split(t);if(Q.crossDomain==null){V=h.exec(Q.url.toLowerCase());Q.crossDomain=!!(V&&(V[1]!==l[1]||V[2]!==l[2]||(V[3]||(V[1]==="http:"?80:443))!=(l[3]||(l[1]==="http:"?80:443))))}if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=i.param(Q.data,Q.traditional)}v(G,Q,J,W);if(L===2){return W}I=Q.global;Q.type=Q.type.toUpperCase();Q.hasContent=!j.test(Q.type);if(I&&i.active++===0){i.event.trigger("ajaxStart")}if(!Q.hasContent){if(Q.data){Q.url+=(k.test(Q.url)?"&":"?")+Q.data;delete Q.data}P=Q.url;if(Q.cache===false){var H=(new Date()).getTime(),ac=Q.url.replace(d,"$1_="+H);Q.url=ac+((ac===Q.url)?(k.test(Q.url)?"&":"?")+"_="+H:"")}}if(Q.data&&Q.hasContent&&Q.contentType!==false||J.contentType){W.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){P=P||Q.url;if(i.lastModified[P]){W.setRequestHeader("If-Modified-Since",i.lastModified[P])}if(i.etag[P]){W.setRequestHeader("If-None-Match",i.etag[P])}}W.setRequestHeader("Accept",Q.dataTypes[0]&&Q.accepts[Q.dataTypes[0]]?Q.accepts[Q.dataTypes[0]]+(Q.dataTypes[0]!=="*"?", "+q+"; q=0.01":""):Q.accepts["*"]);for(X in Q.headers){W.setRequestHeader(X,Q.headers[X])}if(Q.beforeSend&&(Q.beforeSend.call(af,W,Q)===false||L===2)){return W.abort()}O="abort";for(X in {success:1,error:1,complete:1}){W[X](Q[X])}Y=v(C,Q,J,W);if(!Y){S(-1,"No Transport")}else{W.readyState=1;if(I){T.trigger("ajaxSend",[W,Q])}if(Q.async&&Q.timeout>0){R=setTimeout(function(){W.abort("timeout")},Q.timeout)}try{L=1;Y.send(U,S)}catch(Z){if(L<2){S(-1,Z)}else{throw Z}}}return W},active:0,lastModified:{},etag:{}});function B(P,O,L){var K,M,J,e,H=P.contents,N=P.dataTypes,I=P.responseFields;for(M in I){if(M in L){O[I[M]]=L[M]}}while(N[0]==="*"){N.shift();if(K===undefined){K=P.mimeType||O.getResponseHeader("content-type")}}if(K){for(M in H){if(H[M]&&H[M].test(K)){N.unshift(M);break}}}if(N[0] in L){J=N[0]}else{for(M in L){if(!N[0]||P.converters[M+" "+N[0]]){J=M;break}if(!e){e=M}}J=J||e}if(J){if(J!==N[0]){N.unshift(J)}return L[J]}}function c(R,J){var P,H,N,L,O=R.dataTypes.slice(),I=O[0],Q={},K=0;if(R.dataFilter){J=R.dataFilter(J,R.dataType)}if(O[1]){for(P in R.converters){Q[P.toLowerCase()]=R.converters[P]}}for(;(N=O[++K]);){if(N!=="*"){if(I!=="*"&&I!==N){P=Q[I+" "+N]||Q["* "+N];if(!P){for(H in Q){L=H.split(" ");if(L[1]===N){P=Q[I+" "+L[0]]||Q["* "+L[0]];if(P){if(P===true){P=Q[H]}else{if(Q[H]!==true){N=L[0];O.splice(K--,0,N)}}break}}}}if(P!==true){if(P&&R["throws"]){J=P(J)}else{try{J=P(J)}catch(M){return{state:"parsererror",error:P?M:"No conversion from "+I+" to "+N}}}}}I=N}}return{state:"success",data:J}}var y=[],n=/\?/,D=/(=)\?(?=&|$)|\?\?/,z=(new Date()).getTime();i.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=y.pop()||(i.expando+"_"+(z++));this[e]=true;return e}});i.jqx.data.ajaxPrefilter("json jsonp",function(Q,L,P){var O,e,N,J=Q.data,H=Q.url,I=Q.jsonp!==false,M=I&&D.test(H),K=I&&!M&&typeof J==="string"&&!(Q.contentType||"").indexOf("application/x-www-form-urlencoded")&&D.test(J);if(Q.dataTypes[0]==="jsonp"||M||K){O=Q.jsonpCallback=i.isFunction(Q.jsonpCallback)?Q.jsonpCallback():Q.jsonpCallback;e=window[O];if(M){Q.url=H.replace(D,"$1"+O)}else{if(K){Q.data=J.replace(D,"$1"+O)}else{if(I){Q.url+=(n.test(H)?"&":"?")+Q.jsonp+"="+O}}}Q.converters["script json"]=function(){if(!N){i.error(O+" was not called")}return N[0]};Q.dataTypes[0]="json";window[O]=function(){N=arguments};P.always(function(){window[O]=e;if(Q[O]){Q.jsonpCallback=L.jsonpCallback;y.push(O)}if(N&&i.isFunction(e)){e(N[0])}N=e=undefined});return"script"}});i.jqx.data.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){i.globalEval(e);return e}}});i.jqx.data.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});i.jqx.data.ajaxTransport("script",function(I){if(I.crossDomain){var e,H=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(J,K){e=document.createElement("script");e.async="async";if(I.scriptCharset){e.charset=I.scriptCharset}e.src=I.url;e.onload=e.onreadystatechange=function(M,L){if(L||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(H&&e.parentNode){H.removeChild(e)}e=undefined;if(!L){K(200,"success")}}};H.insertBefore(e,H.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var w,x=window.ActiveXObject?function(){for(var e in w){w[e](0,1)}}:false,m=0;function g(){try{return new window.XMLHttpRequest()}catch(H){}}function s(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(H){}}i.jqx.data.ajaxSettings.xhr=window.ActiveXObject?function(){return !this.isLocal&&g()||s()}:g;(function(e){i.extend(i.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(i.jqx.data.ajaxSettings.xhr());if(!i.support){i.support={ajax:true}}if(i.support.ajax){i.jqx.data.ajaxTransport(function(e){if(!e.crossDomain||i.support.cors){var H;return{send:function(N,I){var L,K,M=e.xhr();if(e.username){M.open(e.type,e.url,e.async,e.username,e.password)}else{M.open(e.type,e.url,e.async)}if(e.xhrFields){for(K in e.xhrFields){M[K]=e.xhrFields[K]}}if(e.mimeType&&M.overrideMimeType){M.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!N["X-Requested-With"]){N["X-Requested-With"]="XMLHttpRequest"}try{for(K in N){M.setRequestHeader(K,N[K])}}catch(J){}M.send((e.hasContent&&e.data)||null);H=function(W,Q){var R,P,O,U,T;try{if(H&&(Q||M.readyState===4)){H=undefined;if(L){M.onreadystatechange=function(){};if(x){delete w[L]}}if(Q){if(M.readyState!==4){M.abort()}}else{R=M.status;O=M.getAllResponseHeaders();U={};T=M.responseXML;if(T&&T.documentElement){U.xml=T}try{U.text=M.responseText}catch(V){}try{P=M.statusText}catch(V){P=""}if(!R&&e.isLocal&&!e.crossDomain){R=U.text?200:404}else{if(R===1223){R=204}}}}}catch(S){if(!Q){I(-1,S)}}if(U){I(R,P,U,O)}};if(!e.async){H()}else{if(M.readyState===4){setTimeout(H,0)}else{L=++m;if(x){if(!w){w={};i(window).unload(x)}w[L]=H}M.onreadystatechange=H}}},abort:function(){if(H){H(0,1)}}}}})}i.jqx.filter=function(){this.operator="and";var M=0;var J=1;var P=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"];var R=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var S=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var L=["EQUAL","NOT_EQUAL"];var K=new Array();var Q=new Array();this.evaluate=function(X){var V=true;for(var W=0;W<K.length;W++){var U=K[W].evaluate(X);if(W==0){V=U}else{if(Q[W]==J||Q[W]=="or"){V=V||U}else{V=V&&U}}}return V};this.getfilterscount=function(){return K.length};this.setoperatorsbyfiltertype=function(U,V){switch(U){case"numericfilter":R=V;break;case"stringfilter":P=V;break;case"datefilter":S=V;break;case"booleanfilter":L=V;break}};this.getoperatorsbyfiltertype=function(U){var V=new Array();switch(U){case"numericfilter":V=R.slice(0);break;case"stringfilter":V=P.slice(0);break;case"datefilter":V=S.slice(0);break;case"booleanfilter":V=L.slice(0);break}return V};var O=function(){var U=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(U()+"-"+U()+"-"+U())};this.createfilter=function(Y,V,X,W,U,Z){if(Y==null||Y==undefined){return null}switch(Y){case"numericfilter":return new N(V,X.toUpperCase());case"stringfilter":return new T(V,X.toUpperCase());case"datefilter":return new H(V,X.toUpperCase(),U,Z);case"booleanfilter":return new I(V,X.toUpperCase());case"custom":return new e(V,X.toUpperCase(),W)}throw new Error("jqxGrid: There is no such filter type. The available filter types are: 'numericfilter', 'stringfilter', 'datefilter' and 'booleanfilter'");return null};this.getfilters=function(){var U=new Array();for(var V=0;V<K.length;V++){var W={value:K[V].filtervalue,condition:K[V].comparisonoperator,operator:Q[V],type:K[V].type};if(K[V].data){W.id=K[V].data}U[V]=W}return U};this.addfilter=function(U,V){K[K.length]=V;V.key=O();Q[Q.length]=U};this.removefilter=function(V){for(var U=0;U<K.length;U++){if(K[U].key==V.key){K.splice(U,1);Q.splice(U,1);break}}};this.getoperatorat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return Q[U]};this.setoperatorat=function(V,U){if(V==undefined||V==null){return null}if(V<0||V>K.length){return null}Q[U]=U};this.getfilterat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return K[U]};this.setfilterat=function(U,V){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}V.key=O();K[U]=V};this.clear=function(){K=new Array();Q=new Array()};var T=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="stringfilter";this.evaluate=function(af){var ae=this.filtervalue;var al=this.comparisonoperator;if(af==null||af==undefined||af==""){if(al=="NULL"){return true}if(al=="EQUAL"&&af==ae){return true}if(al=="NOT_EQUAL"&&af!=ae){return true}if(al!="EMPTY"){return false}else{if(af==""){return true}}}var an="";try{an=af.toString()}catch(ag){return true}var am=function(ap,ao){switch(al){case"EQUAL":return i.jqx.string.equalsIgnoreCase(ap,ao);case"EQUAL_CASE_SENSITIVE":return i.jqx.string.equals(ap,ao);case"NOT_EQUAL":return !i.jqx.string.equalsIgnoreCase(ap,ao);case"NOT_EQUAL_CASE_SENSITIVE":return !i.jqx.string.equals(ap,ao);case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap,ao);case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap,ao);case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap,ao);case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap,ao);case"EMPTY":return ap=="";case"NOT_EMPTY":return ap!="";case"NOT_NULL":return ap!=null;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap,ao);case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap,ao);case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap,ao);case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap,ao);default:return false}};var Z=new Array();if(ae&&ae.indexOf){if(ae.indexOf("|")>=0||ae.indexOf(" AND ")>=0||ae.indexOf(" OR ")>=0||ae.indexOf(" and ")>=0||ae.indexOf(" or ")>=0){var aa=am(an,ae);if(aa){return aa}var ab=ae.indexOf(" AND ")>=0?ae.split(" AND "):new Array();var Y=ae.indexOf(" OR ")>=0?ae.split(" OR "):new Array();var X=ae.indexOf(" and ")>=0?ae.split(" and "):new Array();var ac=ae.indexOf(" or ")>=0?ae.split(" or "):new Array();var W=ae.indexOf("|")>=0?ae.split("|"):new Array();if(W.length>0){for(var ak=0;ak<W.length;ak++){W[ak]=i.trim(W[ak])}}var aj=ae.indexOf(" ")>=0?ae.split(" "):new Array();if(aj.length>0){for(var ak=0;ak<aj.length;ak++){aj[ak]=i.trim(aj[ak])}}ab=ab.concat(aj);ab=ab.concat(X);Y=Y.concat(W);Y=Y.concat(ac);if(ab.length>0){for(var ak=0;ak<ab.length;ak++){if(!ab[ak].indexOf(" OR ")>=0){Z.push(ab[ak])}}}if(Y.length>0){for(var ak=0;ak<Y.length;ak++){if(!Y[ak].indexOf(" AND ")>=0){Z.push(Y[ak])}}}var ai=undefined;for(var ah=0;ah<Z.length;ah++){var af=Z[ah];var aa=am(an,af);var ad=ah<ab.length?"and":"or";if(ai==undefined){ai=aa}else{if(ad=="or"){ai=ai||aa}else{ai=ai&&aa}}}return ai}}return am(an,ae)}};var I=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="booleanfilter";this.evaluate=function(Y){var X=this.filtervalue;var W=this.comparisonoperator;if(Y==null||Y==undefined){if(W=="NULL"){return true}return false}var Z=Y;switch(W){case"EQUAL":return Z==X||Z.toString()==X.toString();case"NOT_EQUAL":return Z!=X&&Z.toString()!=X.toString();default:return false}}};var N=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="numericfilter";this.evaluate=function(ag){var af=this.filtervalue;var al=this.comparisonoperator;if(ag===null||ag===undefined||ag===""){if(al=="NOT_NULL"){return false}if(al=="NULL"){return true}else{switch(al){case"EQUAL":return ag==af;case"NOT_EQUAL":return ag!=af}return false}}else{if(al=="NULL"){return false}if(al=="NOT_NULL"){return true}}var an=ag;try{an=parseFloat(an)}catch(ah){if(ag.toString()!=""){return false}}var am=function(ap,ao){switch(al){case"EQUAL":return ap==ao;case"NOT_EQUAL":return ap!=ao;case"GREATER_THAN":return ap>ao;case"GREATER_THAN_OR_EQUAL":return ap>=ao;case"LESS_THAN":return ap<ao;case"LESS_THAN_OR_EQUAL":return ap<=ao;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap.toString(),ao.toString());case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap.toString(),ao.toString());case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap.toString(),ao.toString());case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap.toString(),ao.toString());case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap.toString(),ao.toString());case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap.toString(),ao.toString());case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap.toString(),ao.toString());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap.toString(),ao.toString());default:return true}};var aa=new Array();if(af&&af.indexOf){if(af.indexOf("|")>=0||af.indexOf(" AND ")>=0||af.indexOf(" OR ")>=0||af.indexOf(" and ")>=0||af.indexOf(" or ")>=0){var ab=am(an,af);if(ab){return ab}af=af.toString();var ac=af.indexOf(" AND ")>=0?af.split(" AND "):new Array();var Z=af.indexOf(" OR ")>=0?af.split(" OR "):new Array();var Y=af.indexOf(" and ")>=0?af.split(" and "):new Array();var ad=af.indexOf(" or ")>=0?af.split(" or "):new Array();ac=ac.concat(Y);Z=Z.concat(ad);var X=af.indexOf("|")>=0?af.split("|"):new Array();if(X.length>0){for(var ak=0;ak<X.length;ak++){X[ak]=i.trim(X[ak])}}Z=Z.concat(X);if(ac.length>0){for(var ak=0;ak<ac.length;ak++){if(!ac[ak].indexOf(" OR ")>=0){aa.push(ac[ak])}}}if(Z.length>0){for(var ak=0;ak<Z.length;ak++){if(!Z[ak].indexOf(" AND ")>=0){aa.push(Z[ak])}}}var aj=undefined;for(var ai=0;ai<aa.length;ai++){var ag=aa[ai];if(ag&&ag.indexOf&&ag.indexOf("..")>=0){var W=ag.toString().split("..");if(W.length==2){ab=an>=W[0]&&an<=W[1]}}else{var ab=am(an,ag)}var ae=ai<ac.length?"and":"or";if(aj==undefined){aj=ab}else{if(ae=="or"){aj=aj||ab}else{aj=aj&&ab}}}return aj}}if(af&&af.indexOf&&af.indexOf("..")>=0){aa=af.toString().split("..");if(aa.length==2){return an>=aa[0]&&an<=aa[1]}}return am(an,af)}};var H=function(X,V,W,ab){this.filtervalue=X;this.type="datefilter";var Z=this;if(W!=undefined&&ab!=undefined){var Y=i.jqx.dataFormat.parsedate(X,W,ab);if(Y!=null){this.filterdate=Y}else{var U=i.jqx.dataFormat.tryparsedate(X,ab);if(U!=null){this.filterdate=U}}}else{var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}if(!this.filterdate){var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}this.comparisonoperator=V;this.evaluate=function(ao){var an=this.filtervalue;var aw=this.comparisonoperator;if(ao==null||ao==undefined||ao==""){if(aw=="NOT_NULL"){return false}if(aw=="NULL"){return true}else{switch(aw){case"EQUAL":return ao==an;case"NOT_EQUAL":return ao!=an}return false}}else{if(aw=="NULL"){return false}if(aw=="NOT_NULL"){return true}}var ay=new Date();ay.setFullYear(1900,0,1);ay.setHours(12,0,0,0);try{var av=new Date(ao);if(av.toString()=="NaN"||av.toString()=="Invalid Date"){ao=i.jqx.dataFormat.tryparsedate(ao)}else{ao=av}ay=ao;var at=false;if(W!=undefined&&ab!=undefined){if(W.indexOf("t")>=0||W.indexOf("T")>=0||W.indexOf(":")>=0||W.indexOf("f")>=0){at=true;if(an&&an.toString().indexOf(":")==-1){var aj=i.jqx.dataFormat.tryparsedate(an.toString()+":00",ab);if(aj!=null){Z.filterdate=aj}}}}if(!at){ay.setHours(0);ay.setMinutes(0);ay.setSeconds(0)}}catch(ap){if(ao.toString()!=""){return false}}if(Z.filterdate!=null){an=Z.filterdate}else{if(an&&an.indexOf){if(an.indexOf(":")!=-1||!isNaN(parseInt(an))){var ai=new Date(ay);ai.setHours(12,0,0,0);var ah=an.split(":");for(var au=0;au<ah.length;au++){if(au==0){ai.setHours(ah[au])}if(au==1){ai.setMinutes(ah[au])}if(au==2){ai.setSeconds(ah[au])}}an=ai}}}if(at){if(an&&an.setFullYear){if(ay&&ay.getFullYear){if(W.indexOf("d")==-1&&W.indexOf("M")==-1&&W.indexOf("y")==-1){an.setFullYear(ay.getFullYear(),ay.getMonth(),ay.getDate())}}}}var ax=function(aA,az){if(aA==null){aA=""}switch(aw){case"EQUAL":return aA.toString()==az.toString();case"NOT_EQUAL":return aA.toString()!=az.toString();case"GREATER_THAN":return aA>az;case"GREATER_THAN_OR_EQUAL":return aA>=az;case"LESS_THAN":return aA<az;case"LESS_THAN_OR_EQUAL":return aA<=az;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(aA.toString(),az.toString());case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(aA.toString(),az.toString());case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(aA.toString(),az.toString());case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(aA.toString(),az.toString());case"CONTAINS":return i.jqx.string.containsIgnoreCase(aA.toString(),az.toString());case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(aA.toString(),az.toString());case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(aA.toString(),az.toString());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(aA.toString(),az.toString());default:return true}};var ag=new Array();if(an&&an.indexOf){if(an.indexOf("|")>=0||an.indexOf(" AND ")>=0||an.indexOf(" OR ")>=0||an.indexOf(" and ")>=0||an.indexOf(" or ")>=0){var aj=ax(ay,an);if(aj){return aj}var ak=an.indexOf(" AND ")>=0?an.split(" AND "):new Array();var af=an.indexOf(" OR ")>=0?an.split(" OR "):new Array();var ae=an.indexOf(" and ")>=0?an.split(" and "):new Array();var al=an.indexOf(" or ")>=0?an.split(" or "):new Array();ak=ak.concat(ae);af=af.concat(al);var ad=an.indexOf("|")>=0?an.split("|"):new Array();if(ad.length>0){for(var au=0;au<ad.length;au++){ad[au]=i.trim(ad[au])}}af=af.concat(ad);if(ak.length>0){for(var au=0;au<ak.length;au++){if(!ak[au].indexOf(" OR ")>=0){ag.push(ak[au])}}}if(af.length>0){for(var au=0;au<af.length;au++){if(!af[au].indexOf(" AND ")>=0){ag.push(af[au])}}}var ar=undefined;for(var aq=0;aq<ag.length;aq++){var ao=ag[aq];if(ao&&ao.indexOf&&ao.indexOf("..")>=0){var ac=ao.toString().split("..");if(ac.length==2){aj=ay>=ac[0]&&ay<=ac[1]}}else{var aj=ax(ay,ao)}var am=aq<ak.length?"and":"or";if(ar==undefined){ar=aj}else{if(am=="or"){ar=ar||aj}else{ar=ar&&aj}}}return ar}}if(an&&an.indexOf&&an.indexOf("..")>=0){ag=an.toString().split("..");if(ag.length==2){return ay>=ag[0]&&ay<=ag[1]}}return ax(ay,an)}};var e=function(V,U,W){this.filtervalue=V;this.comparisonoperator=U;this.evaluate=function(Y,X){return W(this.filtervalue,Y,this.comparisonoperator)}}}})(jqxBaseFramework);
+(function(i){i.jqx.observableArray=function(e,J){if(typeof(e)=="string"){e=i.parseJSON(e)}if(!Object.defineProperty||!(function(){try{Object.defineProperty({},"x",{});return true}catch(M){return false}}())){var L=Object.defineProperty;Object.defineProperty=function(O,P,N){if(L){try{return L(O,P,N)}catch(M){}}if(O!==Object(O)){throw TypeError("Object.defineProperty called on non-object")}if(Object.prototype.__defineGetter__&&("get" in N)){Object.prototype.__defineGetter__.call(O,P,N.get)}if(Object.prototype.__defineSetter__&&("set" in N)){Object.prototype.__defineSetter__.call(O,P,N.set)}if("value" in N){O[P]=N.value}else{if(!O[P]){O[P]=N}}return O}}if(!Array.prototype.forEach){Array.prototype.forEach=function(N){if(this===void 0||this===null){throw TypeError()}var Q=Object(this);var M=Q.length>>>0;if(typeof N!=="function"){throw TypeError()}var P=arguments[1],O;for(O=0;O<M;O++){if(O in Q){N.call(P,Q[O],O,Q)}}}}if(typeof Object.getOwnPropertyNames!=="function"){Object.getOwnPropertyNames=function(O){if(O!==Object(O)){throw TypeError("Object.getOwnPropertyNames called on non-object")}var M=[],N;for(N in O){if(Object.prototype.hasOwnProperty.call(O,N)){M.push(N)}}return M}}var I=this,H,K=[];I.notifier=null;I.name="observableArray";I.observing=true;I.changes=new Array();var J=J;I.observe=function(){I.observing=true;if(arguments.length==1){J=arguments[0]}};I.unobserve=function(){I.observing=false};I.toArray=function(){return K.slice(0)};I.toJSON=function(X,O){var U=K;if(O){U=O}var T=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function M(Z){return'"'+Z.replace(T,function(aa){var ab=W[aa];return typeof ab==="string"?ab:"\\u"+("0000"+aa.charCodeAt(0).toString(16)).slice(-4)})+'"'}function N(Z){return Z<10?"0"+Z:Z}function P(aa){var Z;if(isFinite(aa.valueOf())){Z=aa.getUTCFullYear()+"-"+N(aa.getUTCMonth()+1)+"-"+N(aa.getUTCDate())+"T"+N(aa.getUTCHours())+":"+N(aa.getUTCMinutes())+":"+N(aa.getUTCSeconds())+'Z"'}else{Z="null"}return Z}function Q(ac){var Z=ac.length,aa=[],ab;for(ab=0;ab<Z;ab++){aa.push(R(ab,ac)||"null")}return"["+aa.join(",")+"]"}function Y(ac){var aa=[],ab,Z;for(ab in ac){if(Object.prototype.hasOwnProperty.call(ac,ab)){if(ab!=""&&X&&X.indexOf(ab)===-1){continue}Z=R(ab,ac);if(Z){aa.push(M(ab)+":"+Z)}}}return"{"+aa.join(",")+"}"}function S(Z){switch(Object.prototype.toString.call(Z)){case"[object Date]":return P(Z);case"[object Array]":return Q(Z)}return Y(Z)}function V(aa,Z){switch(Z){case"string":return M(aa);case"number":case"float":case"integer":case"int":return isFinite(aa)?aa:"null";case"boolean":return aa}return"null"}function R(aa,Z){var ac=Z[aa],ab=typeof ac;if(ac&&typeof ac==="object"&&typeof ac.toJSON==="function"){ac=ac.toJSON(aa);ab=typeof ac}if(/(number|float|int|integer|string|boolean)/.test(ab)||(!ac&&ab==="object")){return V(ac,ab)}else{return S(ac)}}if(!X&&window.JSON&&typeof window.JSON.stringify==="function"){return window.JSON.stringify(U)}return R("",{"":U})};I.defineIndexProperty=function(O){if(!(O in I)){var M=function(V,S,U,R){var T=V[S];var Q=T;var P=function(){return Q};var W=function(ab){T=ab;if(Q!==T){var aa=Q;Q=T;if(typeof H==="function"){var Y=K.indexOf(R);var Z="";var X=function(ad,ac){Object.getOwnPropertyNames(ad).forEach(function(ae){var af=i.type(ad[ae]);if(af=="array"||af=="object"){X(ad[ae],ac+"."+ae)}else{if(S===ae){Z=ac+"."+ae}}})};X(R,Y);H({object:I,type:"update",path:Z,index:Y,name:S,newValue:T,oldValue:aa})}}Q=T;return T};if(V[S]!=undefined&&S!="length"){if(Object.defineProperty){Object.defineProperty(V,S,{get:P,set:W})}else{if(Object.prototype.__defineGetter__&&Object.prototype.__defineSetter__){Object.prototype.__defineGetter__.call(V,S,P);Object.prototype.__defineSetter__.call(V,S,W)}}}};var N=function(S,R,P){var Q=i.type(S);if(/(number|float|int|integer|string|boolean)/.test(Q)){return}if(S===undefined){return}Object.getOwnPropertyNames(S).forEach(function(T){var U=i.type(S[T]);if(U=="array"||U=="object"){M(S,T,R+"."+T,P);N(S[T],R+"."+T,P)}else{M(S,T,R+"."+T,P)}})};Object.defineProperty(I,O,{configurable:true,enumerable:true,get:function(){return K[O]},set:function(Q){var P=K[O];if(I.toJSON(null,P)!=I.toJSON(null,Q)){K[O]=Q;if(typeof H==="function"){H({object:I,type:"update",path:O.toString(),index:O,name:"index",newValue:Q,oldValue:P})}N(Q,O,Q)}}});N(I[O],O,I[O])}};I.push=function(){var M;for(var N=0,O=arguments.length;N<O;N++){M=K.length;K.push(arguments[N]);I.defineIndexProperty(M);if(typeof H==="function"){H({object:I,type:"add",name:"length",index:M,newValue:K.length,oldValue:M})}}return K.length};I.pop=function(){if(~K.length){var M=K.length-1,N=K.pop();delete I[M];if(typeof H==="function"){H({object:I,type:"delete",name:"length",index:M,newValue:K.length,oldValue:M})}return N}};I.unshift=function(){var M=K.length;for(var N=0,O=arguments.length;N<O;N++){K.splice(N,0,arguments[N]);I.defineIndexProperty(K.length-1)}if(typeof H==="function"){H({object:I,type:"add",index:0,name:"length",newValue:K.length,oldValue:M})}return K.length};I.shift=function(){var M=K.length;if(~K.length){var N=K.shift();K.length===0&&delete I[M];if(typeof H==="function"){H({object:I,type:"delete",index:M,name:"length",newValue:K.length,oldValue:M})}return N}};I.slice=function(Q,N,P){var M=K.slice(Q,N);var O=new i.jqx.observableArray(M,P);return O};I.splice=function(Q,R,M){var P=[],U,T;Q=!~Q?K.length-Q:Q;R=(R==null?K.length-Q:R)||0;while(R--){U=K.splice(Q,1)[0];P.push(U);delete I[K.length];if(typeof H==="function"){H({object:I,type:"delete",index:Q,name:"length",newValue:-1,oldValue:Q})}}for(var N=2,S=arguments.length;N<S;N++){K.splice(Q,0,arguments[N]);defineIndexProperty(K.length-1);if(typeof H==="function"){H({object:I,type:"add",index:Q,name:"length",newValue:K.length-1,oldValue:Q})}Q++}var O=new i.jqx.observableArray(P,M);return O};Object.defineProperty(I,"length",{configurable:false,enumerable:true,get:function(){return K.length},set:function(M){var N=Number(M);if(N%1===0&&N>=0){if(N<K.length){I.splice(N)}else{if(N>K.length){I.push.apply(I,new Array(N-K.length))}}}else{throw new RangeError("Invalid array length")}return M}});i.jqx.observableArray.prototype.fromArray=function(O,N){var M=new i.jqx.observableArray(O,N);return M};i.jqx.observableArray.prototype.clone=function(){var M=new i.jqx.observableArray(K,J);M.observing=I.observing;M.changes=I.changes;M.notifier=I.notifier;return M};I.remove=function(N){if(N<0||N>=I.length){throw new Error("Invalid index : "+N)}if(I.hasOwnProperty(N)){var M=I[N];I[N]=undefined;K[N]=undefined;if(typeof H==="function"){H({object:I,type:"delete",index:N,name:"index",newValue:undefined,oldValue:M})}return true}return false};I.concat=function(N,P){var M=K.concat(N);var O=new i.jqx.observableArray(M,P);return O};Object.getOwnPropertyNames(Array.prototype).forEach(function(M){if(!(M in I)){var N=function(){var Q=I.observing;I.observing=false;var P=K[M];var O=P.apply(K,arguments);I.observing=Q;return O};Object.defineProperty(I,M,{configurable:false,enumerable:true,writeable:false,value:N})}});I.set=function(N,P){if(i.type(N)=="string"&&N.split(".").length>1){var M=N.split(".");var Q=I;for(var O=0;O<M.length;O++){if(O===0){if(M[O]>=I.length){throw new Error("Invalid Index: "+N)}}if(O<M.length-1){Q=Q[M[O]]}else{Q[M[O]]=P}}return true}if(N>=I.length){I.push(P)}else{I[N]=P}return true};I.get=function(M){return I[M]};if(e instanceof Array){I.push.apply(I,e)}H=function(){if(!I.observing){return}if(arguments&&arguments[0]){I.changes.push(arguments[0])}if(J){J.apply(I,arguments)}if(I.notifier){I.notifier.apply(I,arguments)}};return I};i.jqx.formatDate=function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e};i.jqx.formatNumber=function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e};i.jqx.dataAdapter=function(J,e){if(J!=undefined){if(J.dataFields!==undefined){J.datafields=J.dataFields}if(J.dataType!==undefined){J.datatype=J.dataType}if(J.localData!==undefined){J.localdata=J.localData}if(J.sortColumn!==undefined){J.sortcolumn=J.sortColumn}if(J.sortDirection!==undefined){J.sortdirection=J.sortDirection}if(J.sortColumns!==undefined){J.sortcolumns=J.sortColumns}if(J.sortDirections!==undefined){J.sortdirections=J.sortDirections}if(J.sortOrder!==undefined){J.sortdirection=J.sortOrder}if(J.formatData!==undefined){J.formatdata=J.formatData}if(J.processData!==undefined){J.processdata=J.processData}if(J.pageSize!==undefined){J.pagesize=J.pageSize}if(J.pageNum!==undefined){J.pagenum=J.pageNum}if(J.updateRow!==undefined){J.updaterow=J.updateRow}if(J.addRow!==undefined){J.addrow=J.addRow}if(J.deleteRow!==undefined){J.deleterow=J.deleteRow}if(J.contentType!==undefined){J.contenttype=J.contentType}if(J.totalRecords!=undefined){J.totalrecords=J.totalRecords}if(J.loadError!=undefined){J.loadError=J.loadError}if(J.sortComparer!=undefined){J.sortcomparer=J.sortComparer}}this._source=J;this._options=e||{};if(J.beforeLoadComplete!=undefined){this._options.beforeLoadComplete=this._source.beforeLoadComplete}if(J.downloadComplete!=undefined){this._options.downloadComplete=this._source.downloadComplete}if(J.loadComplete!=undefined){this._options.loadComplete=this._source.loadComplete}if(J.autoBind!=undefined){this._options.downloadComplete=this._source.autoBind}if(J.formatData!=undefined){this._options.formatData=this._source.formatData}if(J.loadError!=undefined){this._options.loadError=this._source.loadError}if(J.beforeSend!=undefined){this._options.beforeSend=this._source.beforeSend}if(J.contentType!=undefined){this._options.contentType=this._source.contentType}if(J.async!=undefined){this._options.async=this._source.async}if(J.loadServerData!=undefined){this._options.loadServerData=this._source.loadServerData}if(J.uniqueDataFields!=undefined){this._options.uniqueDataFields=this._source.uniqueDataFields}this.records=new Array();this._downloadComplete=new Array();this._bindingUpdate=new Array();if(J!=undefined&&J.localdata!=null&&typeof J.localdata=="function"){var I=J.localdata();if(I!=null){J._localdata=J.localdata;var H=this;if(J._localdata.subscribe){H._oldlocaldata=[];J._localdata.subscribe(function(K){var L=function(M){if(i.isArray(M)){return i.makeArray(L(i(M)))}return i.extend(true,{},M)};if(H.suspendKO==false||H.suspendKO==undefined||H._oldlocaldata.length==0){H._oldlocaldata=L(K)}},J._localdata,"beforeChange");J._localdata.subscribe(function(L){if(H.suspendKO==false||H.suspendKO==undefined){var K="";H._oldrecords=H.records;if(H._oldlocaldata.length==0){J.localdata=J._localdata()}if(H._oldlocaldata.length==0){K="change"}else{if(L){if(H._oldlocaldata.length==L.length){K="update"}if(H._oldlocaldata.length>L.length){K="remove"}if(H._oldlocaldata.length<L.length){K="add"}}}H.dataBind(null,K)}},J._localdata,"change");H._knockoutdatasource=true}J.localdata=I}}if(this._options.autoBind==true){this.dataBind()}};i.jqx.dataAdapter.prototype={getrecords:function(){return this.records},beginUpdate:function(){this.isUpdating=true},endUpdate:function(e){this.isUpdating=false;if(e!=false){if(this._changedrecords&&this._changedrecords.length>0){this.callBindingUpdate("update");this._changedrecords=[]}else{this.dataBind(null,"")}}},formatDate:function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e},formatNumber:function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e},dataBind:function(R,aa){if(this.isUpdating==true){return}var W=this._source;if(!W){return}if(W.generatedfields){W.datafields=null;W.generatedfields=null}i.jqx.dataFormat.datescache=new Array();if(W.dataFields!=null){W.datafields=W.dataFields}if(W.recordstartindex==undefined){W.recordstartindex=0}if(W.recordendindex==undefined){W.recordendindex=0}if(W.loadallrecords==undefined){W.loadallrecords=true}if(W.root==undefined){W.root=""}if(W.record==undefined){W.record=""}if(W.sort!=undefined){this.sort=W.sort}if(W.filter!=undefined){this.filter=W.filter}else{this.filter=null}if(W.sortcolumn!=undefined){this.sortcolumn=W.sortcolumn}if(W.sortdirection!=undefined){this.sortdirection=W.sortdirection}if(W.sortcolumns!=undefined){this.sortcolumns=W.sortcolumns}if(W.sortdirections!=undefined){this.sortdirections=W.sortdirections}if(W.sortcomparer!=undefined){this.sortcomparer=W.sortcomparer}this.records=new Array();var K=this._options||{};this.virtualmode=K.virtualmode!=undefined?K.virtualmode:false;this.totalrecords=K.totalrecords!=undefined?K.totalrecords:0;this.pageable=K.pageable!=undefined?K.pageable:false;this.pagesize=K.pagesize!=undefined?K.pagesize:0;this.pagenum=K.pagenum!=undefined?K.pagenum:0;this.cachedrecords=K.cachedrecords!=undefined?K.cachedrecords:new Array();this.originaldata=new Array();this.recordids=new Array();this.updaterow=K.updaterow!=undefined?K.updaterow:null;this.addrow=K.addrow!=undefined?K.addrow:null;this.deleterow=K.deleterow!=undefined?K.deleterow:null;this.cache=K.cache!=undefined?K.cache:false;this.unboundmode=false;if(W.formatdata!=undefined){K.formatData=W.formatdata}if(W.data!=undefined){if(K.data==undefined){K.data={}}i.extend(K.data,W.data)}if(W.mapChar!=undefined){W.mapchar=W.mapChar}if(W.mapchar!=undefined){this.mapChar=W.mapchar?W.mapchar:">"}else{this.mapChar=K.mapChar?K.mapChar:">"}if(K.unboundmode||W.unboundmode){this.unboundmode=K.unboundmode||W.unboundmode}if(W.cache!=undefined){this.cache=W.cache}if(this.koSubscriptions){for(var ac=0;ac<this.koSubscriptions.length;ac++){this.koSubscriptions[ac].dispose()}}this.koSubscriptions=new Array();if(this.pagenum<0){this.pagenum=0}var ah=this;var Q=W.datatype;if(W.datatype==="csv"||W.datatype==="tab"||W.datatype==="tsv"||W.datatype=="text"){Q="text"}var N=K.async!=undefined?K.async:true;if(W.async!=undefined){N=W.async}switch(Q){case"local":case"array":case"observablearray":case"observableArray":default:if(W.localdata==undefined&&W.length){W.localdata=new Array();for(var Z=0;Z<W.length;Z++){W.localdata[W.localdata.length]=W[Z];W[Z].uid=Z}}if(W.beforeprocessing&&i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}var M=W.localdata.length;this.totalrecords=this.virtualmode?(W.totalrecords||M):M;if(this.unboundmode){this.totalrecords=this.unboundmode?(W.totalrecords||M):M;var ad=W.datafields?W.datafields.length:0;if(ad>0){for(var Z=0;Z<this.totalrecords;Z++){var I={};for(var Y=0;Y<ad;Y++){I[W.datafields[Y].name]=""}I.uid=Z;W.localdata[W.localdata.length]=I}}}if(this.totalrecords==undefined){this.totalrecords=0}var ad=W.datafields?W.datafields.length:0;var H=function(ao,aq){var ap={};for(var am=0;am<aq;am++){var al=W.datafields?W.datafields[am]:{};var ar="";if(undefined==al||al==null){continue}if(al.map){if(i.isFunction(al.map)){ar=al.map(ao)}else{var aj=al.map.split(ah.mapChar);if(aj.length>0){var an=ao;for(var ak=0;ak<aj.length;ak++){if(!an){continue}an=an[aj[ak]]}ar=an}else{ar=ao[al.map]}}if(ar!=undefined&&ar!=null){ar=ar.toString()}else{if(ar==undefined&&ar!=null){ar=""}}}var at=false;if(ar==""){at=true;ar=ao[al.name];if(ar!=undefined&&ar!=null){if(W._localdata&&ar.subscribe){ar=ar()}else{if(al.type!="array"){if(al.type==="date"){if(ar&&ar instanceof Date){ar=ar}}else{ar=ar.toString()}}}}}if(ar=="[object Object]"&&al.map&&at){ar=""}ar=ah.getvaluebytype(ar,al);if(al.displayname!=undefined){ap[al.displayname]=ar}else{ap[al.name]=ar}}return ap};if(W._localdata){this._changedrecords=[];this.records=new Array();var ag=W._localdata();i.each(ag,function(am,ap){if(typeof ap==="string"){ah.records.push(ap)}else{var ak={};var ao=0;var an=this;i.each(this,function(ay,aD){var at=null;var aE="string";var aC=ay;if(ad>0){var aG=false;var aB=false;for(var ax=0;ax<ad;ax++){var aw=W.datafields[ax];if(aw!=undefined&&(aw.name==ay)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;break}else{if(aw!=undefined&&aw.map&&(aw.map.indexOf(ay)>=0)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;aB=true;var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au<ar.length;au++){az=az[ar[au]]}aF=az}else{aF=an[at]}}if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[aC]=aF;if(ak[aC]!=undefined){ao+=ak[aC].toString().length+ak[aC].toString().substr(0,1)}}}}if(!aG){return true}if(aB){return true}}var av=i.isFunction(an[ay]);if(av){var aF=an[ay]();if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[ay]=aF;if(an[ay].subscribe){var aA=am;ah.koSubscriptions[ah.koSubscriptions.length]=an[ay].subscribe(function(aI){var aH=aA;ak[ay]=aI;var aJ={index:aH,oldrecord:ak,record:ak};ah._changedrecords.push(aJ);if(ah.isUpdating){return}ah.callBindingUpdate("update");ah._changedrecords=[];return false})}}else{var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au<ar.length;au++){az=az[ar[au]]}aF=az}else{aF=an[at]}}if(aE!="string"){aF=ah.getvaluebytype(aF,{type:aE})}ak[aC]=aF;if(ak[aC]!=undefined){ao+=ak[aC].toString().length+ak[aC].toString().substr(0,1)}}});var al=ah.getid(W.id,an,am);ak.uid=al;ah.records.push(ak);ak._koindex=ao;if(ah._oldrecords){var aj=ah.records.length-1;if(aa=="update"){if(ah._oldrecords[aj]._koindex!=ao){var aq={index:aj,oldrecord:ah._oldrecords[aj],record:ak};ah._changedrecords.push(aq)}}}}});if(aa=="add"){var M=ah.records.length;for(var Z=0;Z<M;Z++){var I=ah.records[Z];var L=false;for(var U=0;U<ah._oldrecords.length;U++){if(ah._oldrecords[U]._koindex===I._koindex){L=true;break}}if(!L){ah._changedrecords.push({index:Z,oldrecord:null,record:I,position:(Z!=0?"last":"first")})}}}else{if(aa=="remove"){var M=ah._oldrecords.length;for(var Z=0;Z<M;Z++){var P=ah._oldrecords[Z];if(!ah.records[Z]){ah._changedrecords.push({index:Z,oldrecord:P,record:null})}else{if(ah.records[Z]._koindex!=P._koindex){ah._changedrecords.push({index:Z,oldrecord:P,record:null})}}}}}}else{if(!i.isArray(W.localdata)){this.records=new Array();var V=0;var T=new Array();i.each(W.localdata,function(al){var ak=ah.getid(W.id,this,al);if(ad==0){if(!(typeof this==="string"||this instanceof String)){for(var an in this){V++;var ao=i.type(this[an]);T.push({name:an,type:ao})}ad=V;W.datafields=T;W.generatedfields=T}}if(ad>0){var aj=this;var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{this.uid=ak;ah.records[ah.records.length]=this}})}else{if(ad==0){var V=0;var T=new Array();i.each(W.localdata,function(al,an){var aj=new Object(this);if(typeof an==="string"){ah.records=W.localdata;return false}else{var ak=ah.getid(W.id,aj,al);if(typeof(ak)==="object"){ak=al}aj.uid=ak;if(al==0){for(var ao in this){V++;var ap=i.type(this[ao]);T.push({name:ao,type:ap})}ad=V;W.datafields=T;W.generatedfields=T}if(ad>0){var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{ah.records[ah.records.length]=aj}}})}else{i.each(W.localdata,function(al){var aj=this;var am=H(aj,ad);var ak=ah.getid(W.id,am,al);if(typeof(ak)==="object"){ak=al}var aj=new Object(am);aj.uid=ak;ah.records[ah.records.length]=aj})}}}this.originaldata=W.localdata;this.cachedrecords=this.records;this.addForeignValues(W);if(K.uniqueDataFields){var S=this.getUniqueRecords(this.records,K.uniqueDataFields);this.records=S;this.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}if(K.autoSort&&K.autoSortField){var O=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[K.autoSortField]};ah.records.sort(function(ak,aj){if(ak===undefined){ak=null}if(aj===undefined){aj=null}if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}ak=ak.toString();aj=aj.toString();if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}if(i.jqx.dataFormat.isNumber(ak)&&i.jqx.dataFormat.isNumber(aj)){if(ak<aj){return -1}if(ak>aj){return 1}return 0}else{if(i.jqx.dataFormat.isDate(ak)&&i.jqx.dataFormat.isDate(aj)){if(ak<aj){return -1}if(ak>aj){return 1}return 0}else{if(!i.jqx.dataFormat.isNumber(ak)&&!i.jqx.dataFormat.isNumber(aj)){ak=String(ak).toLowerCase();aj=String(aj).toLowerCase()}}}try{if(ak<aj){return -1}if(ak>aj){return 1}}catch(al){var am=al}return 0});Object.prototype.toString=O}ah.loadedData=W.localdata;ah.buildHierarchy();if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"ics":if(W.localdata!=null&&!W.url){if(i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}if(W.datatype==="xml"){ah.loadxml(W.localdata,W.localdata,W)}else{if(Q==="text"){ah.loadtext(W.localdata,W)}else{if(Q==="ics"){ah.loadics(W.localdata,W)}else{ah.loadjson(W.localdata,W.localdata,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var S=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=S;ah.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}ah.loadedData=W.localdata;ah.buildHierarchy.call(ah);if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}ah.callBindingUpdate(aa);return}var af=K.data!=undefined?K.data:{};if(W.processdata){W.processdata(af)}if(i.isFunction(K.processData)){K.processData(af)}if(i.isFunction(K.formatData)){var e=K.formatData(af);if(e!=undefined){af=e}}var ab="application/x-www-form-urlencoded";if(K.contentType){ab=K.contentType}var J="GET";if(W.type){J=W.type}if(K.type){J=K.type}var X=Q;if(Q=="ics"){X="text"}if(W.url&&W.url.length>0){if(i.isFunction(K.loadServerData)){ah._requestData(af,W,K)}else{this.xhr=i.jqx.data.ajax({dataType:X,cache:this.cache,type:J,url:W.url,async:N,timeout:W.timeout,contentType:ab,data:af,success:function(am,aj,ap){if(i.isFunction(W.beforeprocessing)){var ao=W.beforeprocessing(am,aj,ap);if(ao!=undefined){am=ao}}if(i.isFunction(K.downloadComplete)){var ao=K.downloadComplete(am,aj,ap);if(ao!=undefined){am=ao}}if(am==null){ah.records=new Array();ah.cachedrecords=new Array();ah.originaldata=new Array();ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(new Array())}return}var ak=am;if(am.records){ak=am.records}if(am.totalrecords!=undefined){W.totalrecords=am.totalrecords}else{if(am.totalRecords!=undefined){W.totalrecords=am.totalRecords}}if(W.datatype==="xml"){ah.loadxml(null,ak,W)}else{if(Q==="text"){ah.loadtext(ak,W)}else{if(Q==="ics"){ah.loadics(ak,W)}else{ah.loadjson(null,ak,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var al=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=al;ah.cachedrecords=al}if(K.beforeLoadComplete){var an=K.beforeLoadComplete(ah.records,am);if(an!=undefined){ah.records=an;ah.cachedrecords=an}}ah.loadedData=am;ah.buildHierarchy.call(ah);ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(am,aj,ap,ah.records)}},error:function(al,aj,ak){if(i.isFunction(W.loaderror)){W.loaderror(al,aj,ak)}if(i.isFunction(K.loadError)){K.loadError(al,aj,ak)}al=null;ah.callDownloadComplete()},beforeSend:function(ak,aj){if(i.isFunction(K.beforeSend)){K.beforeSend(ak,aj)}if(i.isFunction(W.beforesend)){W.beforesend(ak,aj)}}})}}else{ah.buildHierarchy(new Array());ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){if(!ai){var ai={}}K.loadComplete(ai)}}break}this.callBindingUpdate(aa)},buildHierarchy:function(K){var e=this._source;var P=new Array();if(!e.datafields){return}if(e.hierarchy&&!e.hierarchy.reservedNames){e.hierarchy.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}}else{if(e.hierarchy){var O=e.hierarchy.reservedNames;if(!O.leaf){O.leaf="leaf"}if(!O.parent){O.parent="parent"}if(!O.expanded){O.expanded="expanded"}if(!O.checked){O.checked="checked"}if(!O.selected){O.selected="selected"}if(!O.level){O.level="level"}if(!O.data){O.data="data"}}}if(!e.hierarchy){return}var N=this;var O=e.hierarchy.reservedNames;if(e.hierarchy.root){if(e.dataType=="xml"){var P=this.getRecordsHierarchy("uid","parentuid","records",null,K);this.hierarchy=P;return P}else{this.hierarchy=this.records;var R=e.hierarchy.root;for(var L=0;L<this.records.length;L++){var M=this.records[L];if(!M){continue}var H=function(S){if(e.hierarchy.record){S.records=S[R][e.hierarchy.record]}else{var U=R.split(N.mapChar);var T=null;if(U.length>1){var W=S;for(var V=0;V<U.length;V++){if(W!=undefined){W=W[U[V]]}}T=W}else{T=S[R]}S.records=T}if(S.records==null||(S.records&&S.records.length==0)){S[O.leaf]=true}};H(M);M[O.level]=0;var I=this.getid(e.id,M,L);M.uid=I;M[O.parent]=null;M[O.data]=M;if(M[O.expanded]===undefined){M[O.expanded]=false}var Q=function(W,U){if(!U){W.records=new Array();return}for(var V=0;V<U.length;V++){var S=U[V];if(!S){continue}H(S);S[O.level]=W[O.level]+1;S[O.parent]=W;S[O.data]=S;var T=N.getid(e.id,S,V);if(T==V&&e.id==null){S.uid=W.uid+"_"+T}else{S.uid=T}if(S[O.expanded]===undefined){S[O.expanded]=false}Q(S,S.records)}};Q(M,M.records)}}return this.hierarchy}if(e.hierarchy.keyDataField&&e.hierarchy.parentDataField){var P=this.getRecordsHierarchy(e.hierarchy.keyDataField.name,e.hierarchy.parentDataField.name,"records",null,K);this.hierarchy=P;return P}if(e.hierarchy.groupingDataFields){var J=new Array();for(var L=0;L<e.hierarchy.groupingDataFields.length;L++){J.push(e.hierarchy.groupingDataFields[L].name)}var P=this.getGroupedRecords(J,"records","label",null,"data",null,"parent",K);this.hierarchy=P;return P}},addRecord:function(H,e,M,I){var J=this;var N=function(){return{leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}};if(H!=undefined){if(M!=undefined){if(this.hierarchy.length>0){var K=function(O){if(O){for(var P=0;P<O.length;P++){var Q=O[P];if(Q.uid==M){var R=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(R==null){R=N()}H[R.parent]=Q;H[R.level]=Q[R.level]+1;if(!Q.records){Q.records=new Array();Q[R.leaf]=false}else{Q[R.leaf]=false}if(e=="last"){Q.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){Q.records.splice(e,0,H)}else{Q.records.splice(0,0,H)}}return true}if(Q.records){K(Q.records)}}}};K(this.hierarchy)}}else{if(this.hierarchy&&this.hierarchy.length>=0&&(this._source.hierarchy||I)){var L=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(L==null){L=N()}H[L.level]=0;if(e=="last"){this.hierarchy.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.hierarchy.splice(e,0,H)}else{this.hierarchy.splice(0,0,H)}}}else{if(e=="last"){this.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.records.splice(e,0,H)}else{this.records.splice(0,0,H)}}}return true}}return false},deleteRecord:function(H){var J=this;if(this.hierarchy.length>0){var K=function(L){if(L){for(var O=0;O<L.length;O++){var P=L[O];if(P.uid==H){L.splice(O,1);if(J.recordids[H]){delete J.recordids[H]}var N=function(T){for(var Q=0;Q<T.length;Q++){var S=T[Q].uid;for(var R=0;R<J.records.length;R++){var U=J.records[R];if(U.uid==S){J.records.splice(R,1);break}}if(T[Q].records){N(T[Q].records)}}};if(P.records){N(P.records)}for(var M=0;M<J.records.length;M++){var P=J.records[M];if(P.uid==H){J.records.splice(M,1);break}}return true}if(P.records){K(P.records)}}}};K(this.hierarchy)}else{for(var e=0;e<this.records.length;e++){var I=this.records[e];if(I.uid==H){this.records.splice(e,1);return true}}}return false},addForeignValues:function(H){var Q=this;var V=H.datafields?H.datafields.length:0;for(var N=0;N<V;N++){var L=H.datafields[N];if(L!=undefined){if(L.values!=undefined){if(L.value==undefined){L.value=L.name}if(L.values.value==undefined){L.values.value=L.value}var T=new Array();var K,M;if(Q.pageable&&Q.virtualmode){K=Q.pagenum*Q.pagesize;M=K+Q.pagesize;if(M>Q.totalrecords){M=Q.totalrecords}}else{if(Q.virtualmode){K=H.recordstartindex;M=H.recordendindex;if(M>Q.totalrecords){M=Q.totalrecords}}else{K=0;M=Q.records.length}}for(var O=K;O<M;O++){var P=Q.records[O];var I=L.name;var U=P[L.value];if(T[U]!=undefined){P[I]=T[U]}else{for(var J=0;J<L.values.source.length;J++){var S=L.values.source[J];var e=S[L.values.value];if(e==undefined){e=S.uid}if(e==U){var R=S[L.values.name];P[I]=R;T[U]=R;break}}}}}else{if(L.value!=undefined){for(var O=0;O<Q.records.length;O++){var P=Q.records[O];P[L.name]=P[L.value]}}}}}},abort:function(){if(this.xhr&&this.xhr.readyState!=4){this.xhr.abort();me.callDownloadComplete()}},_requestData:function(H,J,e){var I=this;var K=function(P){if(P.totalrecords){J.totalrecords=P.totalrecords;I.totalrecords=P.totalrecords}if(P.records){I.records=P.records;I.cachedrecords=P.records}I.addForeignValues(J);if(e.uniqueDataFields){var N=I.getUniqueRecords(I.records,e.uniqueDataFields);I.records=N;I.cachedrecords=N}if(e.beforeLoadComplete){var O=e.beforeLoadComplete(I.records,P);if(O!=undefined){I.records=O;I.cachedrecords=O}}for(var M=0;M<I.records.length;M++){var L=I.records[M];if(undefined==L){continue}if(undefined==L.uid){L.uid=I.getid(J.id,L,M)}}I.buildHierarchy.call(I);if(i.isFunction(e.loadComplete)){e.loadComplete(P)}I.callDownloadComplete()};e.loadServerData(H,J,K)},getUniqueRecords:function(I,L){if(I&&L){var e=I.length;var Q=L.length;var N=new Array();var O=new Array();for(var P=0;P<e;P++){var M=I[P];var J="";if(M==undefined){continue}for(var K=0;K<Q;K++){var H=L[K];J+=M[H]+"_"}if(!O[J]){N[N.length]=M}O[J]=true}}return N},getAggregatedData:function(S,P,M,H){var L=M;if(!L){L=this.records}var Q={};var K=new Array();var J=L.length;if(J==0){return}if(J==undefined){return}for(var O=0;O<J;O++){var R=L[O];for(var N=0;N<S.length;N++){var I=S[N];var U=R[I.name];if(I.aggregates){Q[I.name]=Q[I.name]||{};K[I.name]=K[I.name]||0;K[I.name]++;var e=function(W){for(obj in W){var X=Q[I.name][obj];if(X==null){Q[I.name][obj]=0;X=0}if(i.isFunction(W[obj])){X=W[obj](X,U,I.name,R,H)}Q[I.name][obj]=X}};var T=parseFloat(U);if(isNaN(T)){T=false}else{T=true}if(T){U=parseFloat(U)}if(typeof U==="number"&&isFinite(U)){i.each(I.aggregates,function(){var W=Q[I.name][this];if(W==null){W=0;if(this=="min"){W=9999999999999}if(this=="max"){W=-9999999999999}}if(this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){W+=parseFloat(U)}else{if(this=="product"){if(O==0){W=parseFloat(U)}else{W*=parseFloat(U)}}else{if(this=="min"){W=Math.min(W,parseFloat(U))}else{if(this=="max"){W=Math.max(W,parseFloat(U))}else{if(this=="count"){W++}else{if(typeof(this)=="object"){e(this);return}}}}}}Q[I.name][this]=W})}else{i.each(I.aggregates,function(){if(this=="min"||this=="max"||this=="count"||this=="product"||this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){if(U===null){return true}var W=Q[I.name][this];if(W==null){W=0}Q[I.name][this]=W;return true}if(typeof(this)=="object"){e(this)}})}}}}for(var N=0;N<S.length;N++){var I=S[N];if(!Q[I.name]){Q[I.name]={};i.each(I.aggregates,function(W){Q[I.name][this]=0})}if(Q[I.name]["avg"]!=undefined){var U=Q[I.name]["avg"];var V=K[I.name];if(V===0||V==undefined){Q[I.name]["avg"]=0}else{Q[I.name]["avg"]=U/V}}else{if(Q[I.name]["count"]!=undefined){Q[I.name]["count"]=J}}if(Q[I.name]["stdev"]||Q[I.name]["stdevp"]||Q[I.name]["var"]||Q[I.name]["varp"]){i.each(I.aggregates,function(ac){if(this=="stdev"||this=="var"||this=="varp"||this=="stdevp"){var ad=Q[I.name][this];var ab=J;var W=(ad/J);var Y=0;for(var Z=0;Z<J;Z++){var aa=L[Z];var ae=aa[I.name];Y+=(ae-W)*(ae-W)}var X=(this=="stdevp"||this=="varp")?ab:ab-1;if(X==0){X=1}if(this=="var"||this=="varp"){Q[I.name][this]=Y/X}else{if(this=="stdevp"||this=="stdev"){Q[I.name][this]=Math.sqrt(Y/X)}}}})}if(I.formatStrings){i.each(I.aggregates,function(X){var W=I.formatStrings[X];if(W){if(this=="min"||this=="max"||this=="count"||this=="product"||this=="sum"||this=="avg"||this=="stdev"||this=="stdevp"||this=="var"||this=="varp"){var Y=Q[I.name][this];Q[I.name][this]=i.jqx.dataFormat.formatnumber(Y,W,P)}else{if(typeof this=="object"){for(obj in this){var Y=Q[I.name][obj];Q[I.name][obj]=i.jqx.dataFormat.formatnumber(Y,W,P)}}}}})}}return Q},bindDownloadComplete:function(H,e){this._downloadComplete[this._downloadComplete.length]={id:H,func:e}},unbindDownloadComplete:function(H){for(var e=0;e<this._downloadComplete.length;e++){if(this._downloadComplete[e].id==H){this._downloadComplete[e].func=null;this._downloadComplete.splice(e,1);break}}},callDownloadComplete:function(){for(var e=0;e<this._downloadComplete.length;e++){var H=this._downloadComplete[e];if(H.func!=null){H.func()}}},setSource:function(e){this._source=e},generatekey:function(){var e=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e())},getGroupedRecords:function(aj,am,W,ae,ak,ab,ad,an,K){var ag=0;var aa=this;if(!K){K=0}var I=new Array();for(var N=0;N<aj.length;N++){I[N]=aa.generatekey()}if(!am){am="items"}if(!W){W="group"}if(!ak){ak="record"}if(!ad){ad="parentItem"}if(undefined===ab){ab="value"}var S=new Array();var L=0;var J=new Array();var R=aj.length;var al=new Array();if(!an){var an=this.records}var P=an.length;var af=function(ao){var ap=ao;if(ae){i.each(ae,function(){if(this.name&&this.map){ap[this.map]=ap[this.name]}})}return ap};for(var V=0;V<P;V++){var ai=af(an[V]);id=ai[aa.uniqueId];var H=new Array();var X=0;for(N=0;N<R;N++){var Q=aj[N];var ac=ai[Q];if(null==ac){continue}H[X++]={value:ac,hash:I[N]}}if(H.length!=R){break}var Y=null;var T="";var e=-1;for(var Z=0;Z<H.length;Z++){e++;var ah=H[Z].value;var M=H[Z].hash;T=T+"_"+M+"_"+ah;if(J[T]!=undefined&&J[T]!=null){Y=J[T];continue}if(Y==null){Y={level:0};Y[ad]=null;Y[W]=ah;Y[ak]=ai;if(ai.expanded!==undefined){Y.expanded=ai.expanded}else{Y.expanded=false}if(ab){Y[ab]=ai[ab]}Y[am]=new Array();var O=S.length+K;if(!this._source.id||typeof ai.uid==="number"||isFinite(ai.uid)){O="Row"+O}Y.uid=O;S[L++]=Y}else{var U={level:Y.level+1};U[ad]=Y;U[W]=ah;U[am]=new Array();U[ak]=ai;if(ai.expanded!==undefined){U.expanded=ai.expanded}else{U.expanded=false}if(ab){U[ab]=ai[ab]}U.uid=Y.uid+"_"+Y[am].length;Y[am][Y[am].length]=U;Y=U}J[T]=Y}if(ai){ai.leaf=true}if(Y!=null){if(this._source.id==null){if(undefined==ai.uid){ai.uid=Y.uid+"_"+Y[am].length}else{if(ai.uid.toString().indexOf(Y.uid)==-1){ai.uid=Y.uid+"_"+ai.uid}}}ai[ad]=Y;ai.level=Y.level+1;Y[am][Y[am].length]=ai}else{if(undefined==ai.uid){ai.uid=this.generatekey()}}}return S},getRecordsHierarchy:function(L,J,aa,U,H){var e=new Array();var I=this.records;if(H){I=H}if(this.records.length==0){return null}var Y=aa!=null?aa:"items";var R=[];var ab=I;var O=ab.length;var P=(this._source&&this._source.hierarchy)?this._source.hierarchy.reservedNames:null;var W=function(ac){var ad=ac;if(U){i.each(U,function(){if(this.name&&this.map){ad[this.map]=ad[this.name]}})}return ad};for(var X=0;X<O;X++){var Z=i.extend({},ab[X]);var T=Z[J];var S=Z[L];R[S]={parentid:T,item:Z}}for(var X=0;X<O;X++){var Z=i.extend({},ab[X]);var T=Z[J];var S=Z[L];if(R[T]!=undefined){var Z={parentid:T,item:R[S].item};var Q=R[T].item;if(!Q[Y]){Q[Y]=[]}var M=Q[Y].length;var K=Z.item;if(!P){if(K.parent==undefined){K.parent=Q}}else{if(K[P.parent]==undefined){K[P.parent]=Q}}var N=W(K);Q[Y][M]=N;R[T].item=Q;R[S]=Z}else{var K=R[S].item;if(!P){if(K.parent==undefined){K.parent=null}}else{if(K[P.parent]==undefined){K[P.parent]=null}}var N=W(K);if(!P){N.level=0}else{N[P.level]=0}e[e.length]=N}}if(e.length!=0){var V=function(af,ac){for(var ad=0;ad<ac.length;ad++){if(!P){ac[ad].level=af}else{ac[ad][P.level]=af}var ae=ac[ad][Y];if(ae){if(ae.length>0){V(af+1,ae)}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}};V(0,e)}return e},bindBindingUpdate:function(H,e){this._bindingUpdate[this._bindingUpdate.length]={id:H,func:e}},unbindBindingUpdate:function(H){for(var e=0;e<this._bindingUpdate.length;e++){if(this._bindingUpdate[e].id==H){this._bindingUpdate[e].func=null;this._bindingUpdate.splice(e,1);break}}},callBindingUpdate:function(e){for(var I=0;I<this._bindingUpdate.length;I++){var H=this._bindingUpdate[I];if(H.func!=null){H.func(e)}}},getid:function(N,H,K){if(N!=null&&N.name!=undefined){if(N.name){var e=i(H).attr(N.name);if(e!=null&&e.toString().length>0){return e}else{if(N.map){try{var e=i(H).attr(N.map);if(e!=null&&e.toString().length>0){return e}else{if(i(N.map,H).length>0){return i(N.map,H).text()}else{if(i(N.name,H).length>0){return i(N.name,H).text()}}}}catch(J){return K}}}return}}if(i(N,H).length>0){return i(N,H).text()}if(N){if(N.toString().length>0){var e=i(H).attr(N);if(e!=null&&e.toString().length>0){return i.trim(e).split(" ").join("").replace(/([ #;?%&,.+*~\':"!^$[\]()=>|\/\\@])/g,"")}else{var I=N.split(this.mapChar);if(I.length>1){var M=H;for(var L=0;L<I.length;L++){if(M!=undefined){M=M[I[L]]}}if(M!=undefined){return M}}else{if(H[N]!=undefined){return H[N]}}}}}return K},loadjson:function(ae,af,R){if(typeof(ae)=="string"){ae=i.parseJSON(ae)}if(R.root==undefined){R.root=""}if(R.record==undefined){R.record=""}var ae=ae||af;if(!ae){ae=[]}var ad=this;if(R.root!=""){var K=R.root.split(ad.mapChar);if(K.length>1){var aa=ae;for(var Q=0;Q<K.length;Q++){if(aa!=undefined){aa=aa[K[Q]]}}ae=aa}else{if(ae[R.root]!==undefined){ae=ae[R.root]}else{if(ae[0]&&ae[0][R.root]!==undefined){ae=ae[0][R.root]}else{i.each(ae,function(ah){var ag=this;if(this==R.root){ae=this;return false}else{if(this[R.root]!=undefined){ae=this[R.root]}}})}}if(!ae){var K=R.root.split(ad.mapChar);if(K.length>0){var aa=ae;for(var Q=0;Q<K.length;Q++){if(aa!=undefined){aa=aa[K[Q]]}}ae=aa}}}}else{if(!ae.length){for(obj in ae){if(i.isArray(ae[obj])){ae=ae[obj];break}}}}if(ae!=null&&ae.length==undefined){ae=i.makeArray(ae)}if(ae==null||ae==undefined||ae=="undefined"||ae.length==undefined){throw new Error("jqxDataAdapter: JSON Parse error! Invalid JSON. Please, check your JSON or your jqxDataAdapter initialization!");return}if(ae.length==0){this.totalrecords=0;return}var J=ae.length;this.totalrecords=this.virtualmode?(R.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var W=this.records;var T=!this.pageable?R.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(R.loadallrecords){T=0;J=this.totalrecords}var P=0;if(this.virtualmode){T=!this.pageable?R.recordstartindex:this.pagesize*this.pagenum;P=T;T=0;J=this.totalrecords}var Y=R.datafields?R.datafields.length:0;if(Y==0){var e=ae[0];var ab=new Array();for(obj in e){var H=obj;ab[ab.length]={name:H}}R.datafields=ab;R.generatedfields=R.datafields;Y=ab.length}var M=T;for(var V=T;V<J;V++){var I=ae[V];if(I==undefined){break}if(R.record&&R.record!=""){I=I[R.record];if(I==undefined){continue}}var ac=this.getid(R.id,I,V);if(typeof(ac)==="object"){ac=V}if(!this.recordids[ac]){this.recordids[ac]=I;var L={};for(var U=0;U<Y;U++){var N=R.datafields[U];var S="";if(undefined==N||N==null){continue}if(N.map){if(i.isFunction(N.map)){S=N.map(I)}else{var K=N.map.split(ad.mapChar);if(K.length>0){var Z=I;for(var Q=0;Q<K.length;Q++){if(Z!=undefined){Z=Z[K[Q]]}}S=Z}else{S=I[N.map]}}if(S!=undefined&&S!=null){S=this.getvaluebytype(S,N)}else{if(S==undefined&&S!=null){S=""}}}if(S==""&&!N.map){S=I[N.name];if(S==undefined&&S!=null){S=""}if(N.value!=undefined){if(S!=undefined){var X=S[N.value];if(X!=undefined){S=X}}}}S=this.getvaluebytype(S,N);if(N.displayname!=undefined){L[N.displayname]=S}else{L[N.name]=S}if(N.type==="array"){var O=function(aj){if(!aj){return}for(var ap=0;ap<aj.length;ap++){var am=aj[ap];if(!am){continue}for(var an=0;an<Y;an++){var ai=R.datafields[an];var ao="";if(undefined==ai||ai==null){continue}if(ai.map){if(i.isFunction(ai.map)){ao=ai.map(am)}else{var ag=ai.map.split(ad.mapChar);if(ag.length>0){var al=am;for(var ah=0;ah<ag.length;ah++){if(al!=undefined){al=al[ag[ah]]}}ao=al}else{ao=am[ai.map]}}if(ao!=undefined&&ao!=null){ao=this.getvaluebytype(ao,ai)}else{if(ao==undefined&&ao!=null){ao=""}}}if(ao==""&&!ai.map){ao=am[ai.name];if(ao==undefined&&ao!=null){ao=""}if(ai.value!=undefined){if(ao!=undefined){var ak=ao[ai.value];if(ak!=undefined){ao=ak}}}}ao=this.getvaluebytype(ao,ai);if(ai.displayname!=undefined){am[ai.displayname]=ao}else{am[ai.name]=ao}if(ai.type==="array"){O.call(this,ao)}}}};O.call(this,S)}}if(R.recordendindex<=0||T<R.recordendindex){W[P+M]=new Object(L);W[P+M].uid=ac;this.originaldata[P+M]=new Object(W[V]);M++}}}this.records=W;this.cachedrecords=this.records},loadxml:function(K,ai,U){if(typeof(K)=="string"){K=ai=i(i.parseXML(K));K=null}if(U.root==undefined){U.root=""}if(U.record==undefined){U.record=""}var K;if(i.jqx.browser.msie&&ai){if(ai.xml!=undefined){K=i(U.root+" "+U.record,i.parseXML(ai.xml))}else{K=K||i(U.root+" "+U.record,ai)}}else{K=K||i(U.root+" "+U.record,ai)}if(!K){K=[]}var J=K.length;if(K.length==0){return}this.totalrecords=this.virtualmode?(U.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var aa=this.records;var X=!this.pageable?U.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(U.loadallrecords){X=0;J=this.totalrecords}var S=0;if(this.virtualmode){X=!this.pageable?U.recordstartindex:this.pagesize*this.pagenum;S=X;X=0;J=this.totalrecords}var ac=U.datafields?U.datafields.length:0;if(ac==0){var e=K[0];var af=new Array();for(obj in e){var H=obj;af[af.length]={name:H}}U.datafields=af;U.generatedfields=U.datafields;ac=af.length}var T=X;var ae=false;for(var Z=X;Z<J;Z++){var I=K[Z];if(I==undefined){break}var ah=this.getid(U.id,I,Z);if(!this.recordids[ah]){this.recordids[ah]=I;var L={};var P=false;if(U.hierarchy&&U.hierarchy.root){P=true}for(var Y=0;Y<ac;Y++){var Q=U.datafields[Y];var W="";if(undefined==Q||Q==null){continue}if(Q.map){if(i.isFunction(Q.map)){W=Q.map(I)}else{var M=Q.map.indexOf("[");if(M<0){W=i(Q.map,I);if(W.length==1){W=W.text()}else{ae=true;var ag=new Array();for(var ab=0;ab<W.length;ab++){ag.push(i(W[ab]).text())}W=ag;if(P&&ag.length>0){W=ag[0]}}}else{var ad=Q.map.substring(0,M-1);var O=Q.map.indexOf("]");var R=Q.map.substring(M+1,O);W=i(ad,I).attr(R);if(W==undefined){W=i(I).attr(R)}if(W==undefined){W=""}}if(W==""){W=i(I).attr(Q.map);if(W==undefined){W=""}}}}if(W==""){W=i(Q.name,I);if(W.length==1){W=W.text()}else{var ag=new Array();for(var ab=0;ab<W.length;ab++){ag.push(i(W[ab]).text())}W=ag;if(P&&ag.length>0){W=ag[0]}}if(W==""){W=i(I).attr(Q.name);if(W==undefined){W=""}}if(W==""){if(I.nodeName&&I.nodeName==Q.name&&I.firstChild){W=i(I.firstChild).text()}}}var V=W;W=this.getvaluebytype(W,Q);if(Q.displayname!=undefined){L[Q.displayname]=W}else{L[Q.name]=W}}if(U.recordendindex<=0||X<U.recordendindex){aa[S+T]=i.extend({},L);aa[S+T].uid=ah;this.originaldata[S+T]=i.extend({},aa[Z]);T++}}}if(U.hierarchy&&U.hierarchy.root){for(var Z=X;Z<J;Z++){var I=K[Z];var N=aa[Z];if(i(I).parent().length>0){var ah=this.getid(U.id,i(I).parents(U.hierarchy.record+":first"));N.parentuid=ah}else{N.parentuid=null}}}this.records=aa;this.cachedrecords=this.records},loadics:function(N,H){if(N==null){return}var S=H.rowDelimiter||this.rowDelimiter||"\n";var R=N.split(S);var K=R.length;var Q=N.split("\r");if(K==1&&Q.length>1){R=Q;K=R.length}this.records=new Array();this.originaldata=new Array();var L=this.records;this.recordids=new Array();var I=0;var P=function(V){var T=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/;var U=T.exec(V);if(!U){throw new Error("Invalid UNTIL value: "+V)}return new Date(Date.UTC(U[1],U[2]-1,U[3],U[5]||0,U[6]||0,U[7]||0))};for(var M=0;M<K;M++){var O=R[M];if(O=="BEGIN:VEVENT"){var e={};continue}if(O.indexOf("SUMMARY")>=0){e.SUMMARY=O.substring(O.indexOf("SUMMARY")+8);continue}if(O.indexOf("LOCATION")>=0){e.LOCATION=O.substring(O.indexOf("LOCATION")+9);continue}if(O.indexOf("DESCRIPTION")>=0){e.DESCRIPTION=O.substring(O.indexOf("DESCRIPTION")+12);continue}if(O.indexOf("RRULE")>=0){e.RRULE=O.substring(O.indexOf("RRULE")+6);continue}if(O.indexOf("EXDATE")>=0){var J=O.substring(O.indexOf("EXDATE")+7);e.EXDATE=J;continue}if(O.indexOf("DTEND")>=0){e.DTEND=P(O.substring(O.indexOf("DTEND")+6));continue}if(O.indexOf("DTSTART")>=0){e.DTSTART=P(O.substring(O.indexOf("DTSTART")+8));continue}if(O.indexOf("UID")>=0){e.uid=e.UID=O.substring(O.indexOf("UID")+4);continue}if(O.indexOf("STATUS")>=0){e.STATUS=O.substring(O.indexOf("STATUS")+7);continue}if(O=="END:VEVENT"){L.push(e);continue}}this.records=L;this.cachedrecords=this.records},loadtext:function(Y,P){if(Y==null){return}var e=P.rowDelimiter||this.rowDelimiter||"\n";var L=Y.split(e);var J=L.length;var X=Y.split("\r");if(J==1&&X.length>1){L=X;J=L.length}this.totalrecords=this.virtualmode?(P.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var U=this.records;var R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(P.loadallrecords){R=0;J=this.totalrecords}var N=0;if(this.virtualmode){R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;N=R;R=0;J=this.totalrecords}var V=P.datafields.length;var O=P.columnDelimiter||this.columnDelimiter;if(!O){O=(P.datatype==="tab"||P.datatype==="tsv")?"\t":","}for(var T=R;T<J;T++){var I=L[T];var W=null;if(!this.recordids[W]){if(P.id==null){W=T;this.recordids[W]=I}var K={};var H=L[T].split(O);for(var S=0;S<V;S++){if(S>=H.length){continue}var M=P.datafields[S];var Q=H[S];if(M.map&&i.isFunction(M.map)){Q=M.map(I)}if(M.type){Q=this.getvaluebytype(Q,M)}var Z=M.map||M.name||S.toString();K[Z]=Q;if(P.id!=null){if(P.id===M.name){W=Q;this.recordids[W]=I}}}if(W==null){W=T}U[N+T]=i.extend({},K);U[N+T].uid=W;this.originaldata[N+T]=i.extend({},U[T])}}this.records=U;this.cachedrecords=this.records},getvaluebytype:function(L,H){var J=L;if(L==null){return L}if(i.isArray(L)&&H.type!="array"){for(var I=0;I<L.length;I++){L[I]=this.getvaluebytype(L[I],H)}return L}if(H.type=="date"){if(L=="NaN"){L=""}else{if(L&&L instanceof Date){return L}var K=new Date(L);if(typeof L=="string"){if(H.format){var e=i.jqx.dataFormat.parsedate(L,H.format);if(e!=null){K=e}}}if(K.toString()=="NaN"||K.toString()=="Invalid Date"){if(i.jqx.dataFormat){L=i.jqx.dataFormat.tryparsedate(L)}else{L=K}}else{L=K}if(L==null){L=J}}}else{if(H.type=="float"||H.type=="number"||H.type=="decimal"){if(L=="NaN"){L=""}else{var L=parseFloat(L);if(isNaN(L)){L=J}}}else{if(H.type=="int"||H.type=="integer"){var L=parseInt(L);if(isNaN(L)){L=J}}else{if(H.type=="bool"||H.type=="boolean"){if(L!=null){if(L.toLowerCase!=undefined){if(L.toLowerCase()=="false"){L=false}else{if(L.toLowerCase()=="true"){L=true}}}}if(L==1){L=true}else{if(L==0&&L!==""){L=false}else{L=""}}}}}}return L}};i.jqx.dataFormat={};i.extend(i.jqx.dataFormat,{regexTrim:/^\s+|\s+$/g,regexInfinity:/^[+-]?infinity$/i,regexHex:/^0x[a-f0-9]+$/i,regexParseFloat:/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,toString:Object.prototype.toString,isBoolean:function(e){return typeof e==="boolean"},isObject:function(e){return(e&&(typeof e==="object"||i.isFunction(e)))||false},isDate:function(e){return e instanceof Date},arrayIndexOf:function(J,I){if(J.indexOf){return J.indexOf(I)}for(var e=0,H=J.length;e<H;e++){if(J[e]===I){return e}}return -1},isString:function(e){return typeof e==="string"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isNull:function(e){return e===null},isUndefined:function(e){return typeof e==="undefined"},isValue:function(e){return(this.isObject(e)||this.isString(e)||this.isNumber(e)||this.isBoolean(e))},isEmpty:function(e){if(!this.isString(e)&&this.isValue(e)){return false}else{if(!this.isValue(e)){return true}}e=i.trim(e).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,"");return e===""},startsWith:function(H,e){return H.indexOf(e)===0},endsWith:function(H,e){return H.substr(H.length-e.length)===e},trim:function(e){return(e+"").replace(this.regexTrim,"")},isArray:function(e){return this.toString.call(e)==="[object Array]"},defaultcalendar:function(){var e={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","};return e},expandFormat:function(K,J){J=J||"F";var I,H=K.patterns,e=J.length;if(e===1){I=H[J];if(!I){throw"Invalid date format string '"+J+"'."}J=I}else{if(e===2&&J.charAt(0)==="%"){J=J.charAt(1)}}return J},getEra:function(I,H){if(!H){return 0}if(typeof I==="string"){return 0}var L,K=I.getTime();for(var J=0,e=H.length;J<e;J++){L=H[J].start;if(L===null||K>=L){return J}}return 0},toUpper:function(e){return e.split("\u00A0").join(" ").toUpperCase()},toUpperArray:function(e){var J=[];for(var I=0,H=e.length;I<H;I++){J[I]=this.toUpper(e[I])}return J},getEraYear:function(H,J,e,K){var I=H.getFullYear();if(!K&&J.eras){I-=J.eras[e].offset}return I},toUpper:function(e){if(e){return e.toUpperCase()}return""},getDayIndex:function(K,J,H){var e,L=K.days,I=K._upperDays;if(!I){K._upperDays=I=[this.toUpperArray(L.names),this.toUpperArray(L.namesAbbr),this.toUpperArray(L.namesShort)]}J=J.toUpperCase();if(H){e=this.arrayIndexOf(I[1],J);if(e===-1){e=this.arrayIndexOf(I[2],J)}}else{e=this.arrayIndexOf(I[0],J)}return e},getMonthIndex:function(N,M,I){var e=N.months,H=N.monthsGenitive||N.months,K=N._upperMonths,L=N._upperMonthsGen;if(!K){N._upperMonths=K=[this.toUpperArray(e.names),this.toUpperArray(e.namesAbbr)];N._upperMonthsGen=L=[this.toUpperArray(H.names),this.toUpperArray(H.namesAbbr)]}M=this.toUpper(M);var J=this.arrayIndexOf(I?K[1]:K[0],M);if(J<0){J=this.arrayIndexOf(I?L[1]:L[0],M)}return J},appendPreOrPostMatch:function(J,e){var I=0,L=false;for(var K=0,H=J.length;K<H;K++){var M=J.charAt(K);switch(M){case"'":if(L){e.push("'")}else{I++}L=false;break;case"\\":if(L){e.push("\\")}L=!L;break;default:e.push(M);L=false;break}}return I},getTokenRegExp:function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},formatlink:function(e,I){var H="";if(I&&I.target){H="target="+I.target}if(H!=""){return"<a "+H+' href="'+e+'">'+e+"</a>"}return'<a href="'+e+'">'+e+"</a>"},formatemail:function(e){return'<a href="mailto:'+e+'">'+e+"</a>"},formatNumber:function(e,I,H){return this.formatnumber(e,I,H)},formatnumber:function(T,S,O){if(O==undefined||O==null||O==""){O=this.defaultcalendar()}if(S===""||S===null){return T}if(!this.isNumber(T)){T*=1}var P;if(S.length>1){P=parseInt(S.slice(1),10)}var V={};var Q=S.charAt(0).toUpperCase();V.thousandsSeparator=O.thousandsseparator;V.decimalSeparator=O.decimalseparator;switch(Q){case"D":case"d":case"F":case"f":V.decimalPlaces=P;break;case"N":case"n":V.decimalPlaces=0;break;case"C":case"c":V.decimalPlaces=P;if(O.currencysymbolposition=="before"){V.prefix=O.currencysymbol}else{V.suffix=O.currencysymbol}break;case"P":case"p":V.suffix=O.percentsymbol;V.decimalPlaces=P;break;default:throw"Bad number format specifier: "+Q}if(this.isNumber(T)){var K=(T<0);var I=T+"";var R=(V.decimalSeparator)?V.decimalSeparator:".";var e;if(this.isNumber(V.decimalPlaces)){var L=V.decimalPlaces;var N=Math.pow(10,L);I=(T*N).toFixed(0)/N+"";e=I.lastIndexOf(".");if(L>0){if(e<0){I+=R;e=I.length-1}else{if(R!=="."){I=I.replace(".",R)}}while((I.length-1-e)<L){I+="0"}}}else{var I=T+"";e=I.lastIndexOf(".");if(e>0&&L==undefined){if(R!=="."){I=I.replace(".",R)}}}if(V.thousandsSeparator){var U=V.thousandsSeparator;e=I.lastIndexOf(R);e=(e>-1)?e:I.length;var J=I.substring(e);var H=-1;for(var M=e;M>0;M--){H++;if((H%3===0)&&(M!==e)&&(!K||(M>1))){J=U+J}J=I.charAt(M-1)+J}I=J}I=(V.prefix)?V.prefix+I:I;I=(V.suffix)?I+V.suffix:I;return I}else{return T}},tryparsedate:function(ai,aj){if(aj==undefined||aj==null){aj=this.defaultcalendar()}var O=this;if(ai==""){return null}if(ai!=null&&!ai.substring){ai=ai.toString()}if(ai!=null&&ai.substring(0,6)=="/Date("){var ar=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var ap=new Date(+ai.replace(/\/Date\((\d+)\)\//,"$1"));if(ap=="Invalid Date"){var al=ai.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var ap=null;if(al){ap=new Date(1*al[1]+3600000*al[2]+60000*al[3])}}if(ap==null||ap=="Invalid Date"||isNaN(ap)){var P=ar.exec(ai);if(P){var R=new Date(parseInt(P[1]));if(P[2]){var X=parseInt(P[3]);if(P[2]==="-"){X=-X}var T=R.getUTCMinutes();R.setUTCMinutes(T-X)}if(!isNaN(R.valueOf())){return R}}}return ap}patterns=aj.patterns;for(prop in patterns){ap=O.parsedate(ai,patterns[prop],aj);if(ap){if(prop=="ISO"){var aa=O.parsedate(ai,patterns.ISO2,aj);if(aa){return aa}}return ap}}if(ai!=null){var aa=null;var L=[":","/","-"];var an=true;for(var N=0;N<L.length;N++){if(ai.indexOf(L[N])!=-1){an=false}}if(an){var at=new Number(ai);if(!isNaN(at)){return new Date(at)}}}if(i.type(ai)==="string"){var ae=O;ai=ae.trim(ai);var ak=[":","/","-"," ",","];var M=function(ax,av,aw){return aw.replace(new RegExp(ax,"g"),av)};ai=M(", ",",",ai);var I="";var W=ai;if(ai.indexOf(":")>=0){I=ai.substring(ai.indexOf(":")-2);I=ae.trim(I);W=ai.substring(0,ai.indexOf(":")-2)}else{if(ai.toUpperCase().indexOf("AM")>=0){I=ai.substring(ai.toUpperCase().indexOf("AM")-2);I=ae.trim(I);W=ai.substring(0,ai.toUpperCase().indexOf("AM")-2)}else{if(ai.toUpperCase().indexOf("PM")>=0){I=ai.substring(ai.toUpperCase().indexOf("PM")-2);I=ae.trim(I);W=ai.substring(0,ai.toUpperCase().indexOf("PM")-2)}}}var e=new Date();var ag=false;if(W){for(var ao=0;ao<ak.length;ao++){if(W.indexOf(ak[ao])>=0){L=W.split(ak[ao]);break}}var H=new Array();var U=new Array();var ac=new Array();var Q=null;var au=null;for(var ao=0;ao<L.length;ao++){var N=L[ao];var ab=ae.parsedate(N,"d",aj)||ae.parsedate(N,"dd",aj)||ae.parsedate(N,"ddd",aj)||ae.parsedate(N,"dddd",aj);if(ab){if(N.length<=2){Q=ao;H.push(ab.getDate());break}}}for(var ao=0;ao<L.length;ao++){var N=L[ao];var S=ae.parsedate(N,"M",aj)||ae.parsedate(N,"MM",aj)||ae.parsedate(N,"MMM",aj)||ae.parsedate(N,"MMMM",aj);if(S){if(Q!=undefined&&Q==ao){continue}U.push(S.getMonth());if(N.length>2){au=ao;break}}}for(var ao=0;ao<L.length;ao++){var N=L[ao];var ad=ae.parsedate(N,"yyyy",aj);if(ad){if(Q!=undefined&&Q==ao){continue}if(au!=undefined&&au==ao){continue}ac.push(ad.getFullYear())}}var am=new Array();for(var aq=0;aq<H.length;aq++){for(var al=0;al<U.length;al++){for(var ah=0;ah<ac.length;ah++){var R=new Date(ac[ah],U[al],H[aq]);if(ac[ah]<1970){R.setFullYear(ac[ah])}if(R.getTime()!=NaN){am.push(R)}}}}if(am.length>0){e=am[0];ag=true}}if(I){var af=I.indexOf(":")>=0?I.split(":"):I;var K=ae.parsedate(I,"h:mm tt",aj)||ae.parsedate(I,"h:mm:ss tt",aj)||ae.parsedate(I,"HH:mm:ss.fff",aj)||ae.parsedate(I,"HH:mm:ss.ff",aj)||ae.parsedate(I,"HH:mm:ss.tttt",aj)||ae.parsedate(I,"HH:mm:ss",aj)||ae.parsedate(I,"HH:mm",aj)||ae.parsedate(I,"HH",aj);var V=0,J=0,Y=0,Z=0;if(K&&K.getTime()!=NaN){V=K.getHours();J=K.getMinutes();Y=K.getSeconds();Z=K.getMilliseconds()}else{if(af.length==1){V=parseInt(af[0])}if(af.length==2){V=parseInt(af[0]);J=parseInt(af[1])}if(af.length==3){V=parseInt(af[0]);J=parseInt(af[1]);if(af[2].indexOf(".")>=0){Y=parseInt(af[2].toString().split(".")[0]);Z=parseInt(af[2].toString().split(".")[1])}else{Y=parseInt(af[2])}}if(af.length==4){V=parseInt(af[0]);J=parseInt(af[1]);Y=parseInt(af[2]);Z=parseInt(af[3])}}if(e&&!isNaN(V)&&!isNaN(J)&&!isNaN(Y)&&!isNaN(Z)){e.setHours(V,J,Y,Z);ag=true}}if(ag){return e}}return null},getparseregexp:function(e,R){var T=e._parseRegExp;if(!T){e._parseRegExp=T={}}else{var K=T[R];if(K){return K}}var Q=this.expandFormat(e,R).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),O=["^"],H=[],N=0,J=0,W=this.getTokenRegExp(),L;while((L=W.exec(Q))!==null){var V=Q.slice(N,L.index);N=W.lastIndex;J+=this.appendPreOrPostMatch(V,O);if(J%2){O.push(L[0]);continue}var I=L[0],M=I.length,S;switch(I){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":S="(\\D+)";break;case"tt":case"t":S="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":S="(\\d{"+M+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":S="(\\d\\d?)";break;case"zzz":S="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":S="([+-]?\\d\\d?)";break;case"/":S="(\\"+e["/"]+")";break;default:throw"Invalid date format pattern '"+I+"'.";break}if(S){O.push(S)}H.push(L[0])}this.appendPreOrPostMatch(Q.slice(N),O);O.push("$");var U=O.join("").replace(/\s+/g,"\\s+"),P={regExp:U,groups:H};return T[R]=P},outOfRange:function(I,e,H){return I<e||I>H},expandYear:function(L,J){var H=new Date(),e=this.getEra(H);if(J<100){var I=L.twoDigitYearMax;I=typeof I==="string"?new Date().getFullYear()%100+parseInt(I,10):I;var K=this.getEraYear(H,L,e);J+=K-(K%100);if(J>I){J-=100}}return J},parsedate:function(ab,ai,W){if(W==undefined||W==null){W=this.defaultcalendar()}ab=this.trim(ab);var T=W,an=this.getparseregexp(T,ai),N=new RegExp(an.regExp).exec(ab);if(N===null){return null}var aj=an.groups,Z=null,R=null,am=null,al=null,S=null,L=0,ae,ad=0,ak=0,e=0,I=null,U=false;for(var af=0,ah=aj.length;af<ah;af++){var H=N[af+1];if(H){var aa=aj[af],K=aa.length,M=parseInt(H,10);switch(aa){case"dd":case"d":al=M;if(this.outOfRange(al,1,31)){return null}break;case"MMM":case"MMMM":am=this.getMonthIndex(T,H,K===3);if(this.outOfRange(am,0,11)){return null}break;case"M":case"MM":am=M-1;if(this.outOfRange(am,0,11)){return null}break;case"y":case"yy":case"yyyy":R=K<4?this.expandYear(T,M):M;if(this.outOfRange(R,0,9999)){return null}break;case"h":case"hh":L=M;if(L===12){L=0}if(this.outOfRange(L,0,11)){return null}break;case"H":case"HH":L=M;if(this.outOfRange(L,0,23)){return null}break;case"m":case"mm":ad=M;if(this.outOfRange(ad,0,59)){return null}break;case"s":case"ss":ak=M;if(this.outOfRange(ak,0,59)){return null}break;case"tt":case"t":U=T.PM&&(H===T.PM[0]||H===T.PM[1]||H===T.PM[2]);if(!U&&(!T.AM||(H!==T.AM[0]&&H!==T.AM[1]&&H!==T.AM[2]))){return null}break;case"f":case"ff":case"fff":e=M*Math.pow(10,3-K);if(this.outOfRange(e,0,999)){return null}break;case"ddd":case"dddd":S=this.getDayIndex(T,H,K===3);if(this.outOfRange(S,0,6)){return null}break;case"zzz":var J=H.split(/:/);if(J.length!==2){return null}ae=parseInt(J[0],10);if(this.outOfRange(ae,-12,13)){return null}var P=parseInt(J[1],10);if(this.outOfRange(P,0,59)){return null}I=(ae*60)+(this.startsWith(H,"-")?-P:P);break;case"z":case"zz":ae=M;if(this.outOfRange(ae,-12,13)){return null}I=ae*60;break;case"g":case"gg":var V=H;if(!V||!T.eras){return null}V=trim(V.toLowerCase());for(var ag=0,ac=T.eras.length;ag<ac;ag++){if(V===T.eras[ag].name.toLowerCase()){Z=ag;break}}if(Z===null){return null}break}}}var Q=new Date(),Y,O=T.convert;Y=Q.getFullYear();if(R===null){R=Y}else{if(T.eras){R+=T.eras[(Z||0)].offset}}if(am===null){am=0}if(al===null){al=1}if(O){Q=O.toGregorian(R,am,al);if(Q===null){return null}}else{Q.setFullYear(R,am,al);if(Q.getDate()!==al){return null}if(S!==null&&Q.getDay()!==S){return null}}if(U&&L<12){L+=12}Q.setHours(L,ad,ak,e);if(I!==null){var X=Q.getMinutes()-(I+Q.getTimezoneOffset());Q.setHours(Q.getHours()+parseInt(X/60,10),X%60)}return Q},cleardatescache:function(){this.datescache=new Array()},formatDate:function(e,I,H){return this.formatdate(e,I,H)},formatdate:function(Z,ad,U){if(U==undefined||U==null){U=this.defaultcalendar()}if(typeof Z==="string"){return Z}var J=Z.toString()+"_"+ad;if(this.datescache&&this.datescache[J]){if(ad.indexOf("f")==-1){return this.datescache[J]}}if(!ad||!ad.length||ad==="i"){var af;af=this.formatDate(Z,U.patterns.F,U);return af}var aa=U.eras,H=ad==="s";ad=this.expandFormat(U,ad);af=[];var M,ab=["0","00","000"],Q,R,e=/([^d]|^)(d|dd)([^d]|$)/g,ae=0,W=this.getTokenRegExp(),I;function O(ag,aj){var ai,ah=ag+"";if(aj>1&&ah.length<aj){ai=(ab[aj-2]+ah);return ai.substr(ai.length-aj,aj)}else{ai=ah}return ai}function ac(){if(Q||R){return Q}Q=e.test(ad);R=true;return Q}function K(ah,ag){if(I){return I[ag]}if(ah.getMonth!=undefined){switch(ag){case 0:return ah.getFullYear();case 1:return ah.getMonth();case 2:return ah.getDate()}}}for(;;){var N=W.lastIndex,V=W.exec(ad);var S=ad.slice(N,V?V.index:ad.length);ae+=this.appendPreOrPostMatch(S,af);if(!V){break}if(ae%2){af.push(V[0]);continue}var X=V[0],L=X.length;switch(X){case"ddd":case"dddd":var T=(L===3)?U.days.namesAbbr:U.days.names;af.push(T[Z.getDay()]);break;case"d":case"dd":Q=true;af.push(O(K(Z,2),L));break;case"MMM":case"MMMM":var Y=K(Z,1);af.push(U.months[L===3?"namesAbbr":"names"][Y]);break;case"M":case"MM":af.push(O(K(Z,1)+1,L));break;case"y":case"yy":case"yyyy":Y=this.getEraYear(Z,U,this.getEra(Z,aa),H);if(L<4){Y=Y%100}af.push(O(Y,L));break;case"h":case"hh":M=Z.getHours()%12;if(M===0){M=12}af.push(O(M,L));break;case"H":case"HH":af.push(O(Z.getHours(),L));break;case"m":case"mm":af.push(O(Z.getMinutes(),L));break;case"s":case"ss":af.push(O(Z.getSeconds(),L));break;case"t":case"tt":Y=Z.getHours()<12?(U.AM?U.AM[0]:" "):(U.PM?U.PM[0]:" ");af.push(L===1?Y.charAt(0):Y);break;case"f":case"ff":case"fff":af.push(O(Z.getMilliseconds(),3).substr(0,L));break;case"z":case"zz":M=Z.getTimezoneOffset()/60;af.push((M<=0?"+":"-")+O(Math.floor(Math.abs(M)),L));break;case"zzz":M=Z.getTimezoneOffset()/60;af.push((M<=0?"+":"-")+O(Math.floor(Math.abs(M)),2)+":"+O(Math.abs(Z.getTimezoneOffset()%60),2));break;case"g":case"gg":if(U.eras){af.push(U.eras[this.getEra(Z,aa)].name)}break;case"/":af.push(U["/"]);break;default:throw"Invalid date format pattern '"+X+"'.";break}}var P=af.join("");if(!this.datescache){this.datescache=new Array()}this.datescache[J]=P;return P}});i.jqx.data={};var l,E,p=/#.*$/,a=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,f=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,j=/^(?:GET|HEAD)$/,o=/^\/\//,k=/\?/,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=/([?&])_=[^&]*/,h=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,t=/\s+/,F=i.fn.load,G={},C={},q=["*/"]+["*"];try{E=location.href}catch(A){E=document.createElement("a");E.href="";E=E.href}l=h.exec(E.toLowerCase())||[];function r(e){return function(K,M){if(typeof K!=="string"){M=K;K="*"}var H,N,O,J=K.toLowerCase().split(t),I=0,L=J.length;if(i.isFunction(M)){for(;I<L;I++){H=J[I];O=/^\+/.test(H);if(O){H=H.substr(1)||"*"}N=e[H]=e[H]||[];N[O?"unshift":"push"](M)}}}}function v(H,Q,L,O,N,J){N=N||Q.dataTypes[0];J=J||{};J[N]=true;var P,M=H[N],I=0,e=M?M.length:0,K=(H===G);for(;I<e&&(K||!P);I++){P=M[I](Q,L,O);if(typeof P==="string"){if(!K||J[P]){P=undefined}else{Q.dataTypes.unshift(P);P=v(H,Q,L,O,P,J)}}}if((K||!P)&&!J["*"]){P=v(H,Q,L,O,"*",J)}return P}function u(I,J){var H,e,K=i.jqx.data.ajaxSettings.flatOptions||{};for(H in J){if(J[H]!==undefined){(K[H]?I:(e||(e={})))[H]=J[H]}}if(e){i.extend(true,I,e)}}i.extend(i.jqx.data,{ajaxSetup:function(H,e){if(e){u(H,i.jqx.data.ajaxSettings)}else{e=H;H=i.jqx.data.ajaxSettings}u(H,e);return H},ajaxSettings:{url:E,isLocal:f.test(l[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":q},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:r(G),ajaxTransport:r(C),ajax:function(M,J){if(typeof M==="object"){J=M;M=undefined}J=J||{};var P,ad,K,Y,R,V,I,X,Q=i.jqx.data.ajaxSetup({},J),af=Q.context||Q,T=af!==Q&&(af.nodeType||af instanceof i)?i(af):i.event,ae=i.Deferred(),aa=i.Callbacks("once memory"),N=Q.statusCode||{},U={},ab={},L=0,O="canceled",W={readyState:0,setRequestHeader:function(ag,ah){if(!L){var e=ag.toLowerCase();ag=ab[e]=ab[e]||ag;U[ag]=ah}return this},getAllResponseHeaders:function(){return L===2?ad:null},getResponseHeader:function(ag){var e;if(L===2){if(!K){K={};while((e=a.exec(ad))){K[e[1].toLowerCase()]=e[2]}}e=K[ag.toLowerCase()]}return e===undefined?null:e},overrideMimeType:function(e){if(!L){Q.mimeType=e}return this},abort:function(e){e=e||O;if(Y){Y.abort(e)}S(0,e);return this}};function S(ak,ag,al,ai){var e,ao,am,aj,an,ah=ag;if(L===2){return}L=2;if(R){clearTimeout(R)}Y=undefined;ad=ai||"";W.readyState=ak>0?4:0;if(al){aj=B(Q,W,al)}if(ak>=200&&ak<300||ak===304){if(Q.ifModified){an=W.getResponseHeader("Last-Modified");if(an){i.lastModified[P]=an}an=W.getResponseHeader("Etag");if(an){i.etag[P]=an}}if(ak===304){ah="notmodified";e=true}else{e=c(Q,aj);ah=e.state;ao=e.data;am=e.error;e=!am}}else{am=ah;if(!ah||ak){ah="error";if(ak<0){ak=0}}}W.status=ak;W.statusText=(ag||ah)+"";if(e){ae.resolveWith(af,[ao,ah,W])}else{ae.rejectWith(af,[W,ah,am])}W.statusCode(N);N=undefined;if(I){T.trigger("ajax"+(e?"Success":"Error"),[W,Q,e?ao:am])}aa.fireWith(af,[W,ah]);if(I){T.trigger("ajaxComplete",[W,Q]);if(!(--i.active)){i.event.trigger("ajaxStop")}}}ae.promise(W);W.success=W.done;W.error=W.fail;W.complete=aa.add;W.statusCode=function(ag){if(ag){var e;if(L<2){for(e in ag){N[e]=[N[e],ag[e]]}}else{e=ag[W.status];W.always(e)}}return this};Q.url=((M||Q.url)+"").replace(p,"").replace(o,l[1]+"//");Q.dataTypes=i.trim(Q.dataType||"*").toLowerCase().split(t);if(Q.crossDomain==null){V=h.exec(Q.url.toLowerCase());Q.crossDomain=!!(V&&(V[1]!==l[1]||V[2]!==l[2]||(V[3]||(V[1]==="http:"?80:443))!=(l[3]||(l[1]==="http:"?80:443))))}if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=i.param(Q.data,Q.traditional)}v(G,Q,J,W);if(L===2){return W}I=Q.global;Q.type=Q.type.toUpperCase();Q.hasContent=!j.test(Q.type);if(I&&i.active++===0){i.event.trigger("ajaxStart")}if(!Q.hasContent){if(Q.data){Q.url+=(k.test(Q.url)?"&":"?")+Q.data;delete Q.data}P=Q.url;if(Q.cache===false){var H=(new Date()).getTime(),ac=Q.url.replace(d,"$1_="+H);Q.url=ac+((ac===Q.url)?(k.test(Q.url)?"&":"?")+"_="+H:"")}}if(Q.data&&Q.hasContent&&Q.contentType!==false||J.contentType){W.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){P=P||Q.url;if(i.lastModified[P]){W.setRequestHeader("If-Modified-Since",i.lastModified[P])}if(i.etag[P]){W.setRequestHeader("If-None-Match",i.etag[P])}}W.setRequestHeader("Accept",Q.dataTypes[0]&&Q.accepts[Q.dataTypes[0]]?Q.accepts[Q.dataTypes[0]]+(Q.dataTypes[0]!=="*"?", "+q+"; q=0.01":""):Q.accepts["*"]);for(X in Q.headers){W.setRequestHeader(X,Q.headers[X])}if(Q.beforeSend&&(Q.beforeSend.call(af,W,Q)===false||L===2)){return W.abort()}O="abort";for(X in {success:1,error:1,complete:1}){W[X](Q[X])}Y=v(C,Q,J,W);if(!Y){S(-1,"No Transport")}else{W.readyState=1;if(I){T.trigger("ajaxSend",[W,Q])}if(Q.async&&Q.timeout>0){R=setTimeout(function(){W.abort("timeout")},Q.timeout)}try{L=1;Y.send(U,S)}catch(Z){if(L<2){S(-1,Z)}else{throw Z}}}return W},active:0,lastModified:{},etag:{}});function B(P,O,L){var K,M,J,e,H=P.contents,N=P.dataTypes,I=P.responseFields;for(M in I){if(M in L){O[I[M]]=L[M]}}while(N[0]==="*"){N.shift();if(K===undefined){K=P.mimeType||O.getResponseHeader("content-type")}}if(K){for(M in H){if(H[M]&&H[M].test(K)){N.unshift(M);break}}}if(N[0] in L){J=N[0]}else{for(M in L){if(!N[0]||P.converters[M+" "+N[0]]){J=M;break}if(!e){e=M}}J=J||e}if(J){if(J!==N[0]){N.unshift(J)}return L[J]}}function c(R,J){var P,H,N,L,O=R.dataTypes.slice(),I=O[0],Q={},K=0;if(R.dataFilter){J=R.dataFilter(J,R.dataType)}if(O[1]){for(P in R.converters){Q[P.toLowerCase()]=R.converters[P]}}for(;(N=O[++K]);){if(N!=="*"){if(I!=="*"&&I!==N){P=Q[I+" "+N]||Q["* "+N];if(!P){for(H in Q){L=H.split(" ");if(L[1]===N){P=Q[I+" "+L[0]]||Q["* "+L[0]];if(P){if(P===true){P=Q[H]}else{if(Q[H]!==true){N=L[0];O.splice(K--,0,N)}}break}}}}if(P!==true){if(P&&R["throws"]){J=P(J)}else{try{J=P(J)}catch(M){return{state:"parsererror",error:P?M:"No conversion from "+I+" to "+N}}}}}I=N}}return{state:"success",data:J}}var y=[],n=/\?/,D=/(=)\?(?=&|$)|\?\?/,z=(new Date()).getTime();i.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=y.pop()||(i.expando+"_"+(z++));this[e]=true;return e}});i.jqx.data.ajaxPrefilter("json jsonp",function(Q,L,P){var O,e,N,J=Q.data,H=Q.url,I=Q.jsonp!==false,M=I&&D.test(H),K=I&&!M&&typeof J==="string"&&!(Q.contentType||"").indexOf("application/x-www-form-urlencoded")&&D.test(J);if(Q.dataTypes[0]==="jsonp"||M||K){O=Q.jsonpCallback=i.isFunction(Q.jsonpCallback)?Q.jsonpCallback():Q.jsonpCallback;e=window[O];if(M){Q.url=H.replace(D,"$1"+O)}else{if(K){Q.data=J.replace(D,"$1"+O)}else{if(I){Q.url+=(n.test(H)?"&":"?")+Q.jsonp+"="+O}}}Q.converters["script json"]=function(){if(!N){i.error(O+" was not called")}return N[0]};Q.dataTypes[0]="json";window[O]=function(){N=arguments};P.always(function(){window[O]=e;if(Q[O]){Q.jsonpCallback=L.jsonpCallback;y.push(O)}if(N&&i.isFunction(e)){e(N[0])}N=e=undefined});return"script"}});i.jqx.data.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){i.globalEval(e);return e}}});i.jqx.data.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});i.jqx.data.ajaxTransport("script",function(I){if(I.crossDomain){var e,H=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(J,K){e=document.createElement("script");e.async="async";if(I.scriptCharset){e.charset=I.scriptCharset}e.src=I.url;e.onload=e.onreadystatechange=function(M,L){if(L||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(H&&e.parentNode){H.removeChild(e)}e=undefined;if(!L){K(200,"success")}}};H.insertBefore(e,H.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var w,x=window.ActiveXObject?function(){for(var e in w){w[e](0,1)}}:false,m=0;function g(){try{return new window.XMLHttpRequest()}catch(H){}}function s(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(H){}}i.jqx.data.ajaxSettings.xhr=window.ActiveXObject?function(){return !this.isLocal&&g()||s()}:g;(function(e){i.extend(i.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(i.jqx.data.ajaxSettings.xhr());if(!i.support){i.support={ajax:true}}if(i.support.ajax){i.jqx.data.ajaxTransport(function(e){if(!e.crossDomain||i.support.cors){var H;return{send:function(N,I){var L,K,M=e.xhr();if(e.username){M.open(e.type,e.url,e.async,e.username,e.password)}else{M.open(e.type,e.url,e.async)}if(e.xhrFields){for(K in e.xhrFields){M[K]=e.xhrFields[K]}}if(e.mimeType&&M.overrideMimeType){M.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!N["X-Requested-With"]){N["X-Requested-With"]="XMLHttpRequest"}try{for(K in N){M.setRequestHeader(K,N[K])}}catch(J){}M.send((e.hasContent&&e.data)||null);H=function(W,Q){var R,P,O,U,T;try{if(H&&(Q||M.readyState===4)){H=undefined;if(L){M.onreadystatechange=function(){};if(x){delete w[L]}}if(Q){if(M.readyState!==4){M.abort()}}else{R=M.status;O=M.getAllResponseHeaders();U={};T=M.responseXML;if(T&&T.documentElement){U.xml=T}try{U.text=M.responseText}catch(V){}try{P=M.statusText}catch(V){P=""}if(!R&&e.isLocal&&!e.crossDomain){R=U.text?200:404}else{if(R===1223){R=204}}}}}catch(S){if(!Q){I(-1,S)}}if(U){I(R,P,U,O)}};if(!e.async){H()}else{if(M.readyState===4){setTimeout(H,0)}else{L=++m;if(x){if(!w){w={};i(window).unload(x)}w[L]=H}M.onreadystatechange=H}}},abort:function(){if(H){H(0,1)}}}}})}i.jqx.filter=function(){this.operator="and";var M=0;var J=1;var P=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"];var R=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var S=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var L=["EQUAL","NOT_EQUAL"];var K=new Array();var Q=new Array();this.evaluate=function(X){var V=true;for(var W=0;W<K.length;W++){var U=K[W].evaluate(X);if(W==0){V=U}else{if(Q[W]==J||Q[W]=="or"){V=V||U}else{V=V&&U}}}return V};this.getfilterscount=function(){return K.length};this.setoperatorsbyfiltertype=function(U,V){switch(U){case"numericfilter":R=V;break;case"stringfilter":P=V;break;case"datefilter":S=V;break;case"booleanfilter":L=V;break}};this.getoperatorsbyfiltertype=function(U){var V=new Array();switch(U){case"numericfilter":V=R.slice(0);break;case"stringfilter":V=P.slice(0);break;case"datefilter":V=S.slice(0);break;case"booleanfilter":V=L.slice(0);break}return V};var O=function(){var U=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(U()+"-"+U()+"-"+U())};this.createfilter=function(Y,V,X,W,U,Z){if(Y==null||Y==undefined){return null}switch(Y){case"numericfilter":return new N(V,X.toUpperCase());case"stringfilter":return new T(V,X.toUpperCase());case"datefilter":return new H(V,X.toUpperCase(),U,Z);case"booleanfilter":return new I(V,X.toUpperCase());case"custom":return new e(V,X.toUpperCase(),W)}throw new Error("jqxGrid: There is no such filter type. The available filter types are: 'numericfilter', 'stringfilter', 'datefilter' and 'booleanfilter'");return null};this.getfilters=function(){var U=new Array();for(var V=0;V<K.length;V++){var W={value:K[V].filtervalue,condition:K[V].comparisonoperator,operator:Q[V],type:K[V].type};if(K[V].data){W.id=K[V].data}U[V]=W}return U};this.addfilter=function(U,V){K[K.length]=V;V.key=O();Q[Q.length]=U};this.removefilter=function(V){for(var U=0;U<K.length;U++){if(K[U].key==V.key){K.splice(U,1);Q.splice(U,1);break}}};this.getoperatorat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return Q[U]};this.setoperatorat=function(V,U){if(V==undefined||V==null){return null}if(V<0||V>K.length){return null}Q[U]=U};this.getfilterat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return K[U]};this.setfilterat=function(U,V){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}V.key=O();K[U]=V};this.clear=function(){K=new Array();Q=new Array()};var T=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="stringfilter";this.evaluate=function(af){var ae=this.filtervalue;var al=this.comparisonoperator;if(af==null||af==undefined||af==""){if(al=="NULL"){return true}if(al=="EQUAL"&&af==ae){return true}if(al=="NOT_EQUAL"&&af!=ae){return true}if(al!="EMPTY"){return false}else{if(af==""){return true}}}var an="";try{an=af.toString()}catch(ag){return true}var am=function(ap,ao){switch(al){case"EQUAL":return i.jqx.string.equalsIgnoreCase(ap,ao);case"EQUAL_CASE_SENSITIVE":return i.jqx.string.equals(ap,ao);case"NOT_EQUAL":return !i.jqx.string.equalsIgnoreCase(ap,ao);case"NOT_EQUAL_CASE_SENSITIVE":return !i.jqx.string.equals(ap,ao);case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap,ao);case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap,ao);case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap,ao);case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap,ao);case"EMPTY":return ap=="";case"NOT_EMPTY":return ap!="";case"NOT_NULL":return ap!=null;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap,ao);case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap,ao);case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap,ao);case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap,ao);default:return false}};var Z=new Array();if(ae&&ae.indexO&&al!=="NOT_EQUAL"){if(ae.indexOf("|")>=0||ae.indexOf(" AND ")>=0||ae.indexOf(" OR ")>=0||ae.indexOf(" and ")>=0||ae.indexOf(" or ")>=0){var aa=am(an,ae);if(aa){return aa}var ab=ae.indexOf(" AND ")>=0?ae.split(" AND "):new Array();var Y=ae.indexOf(" OR ")>=0?ae.split(" OR "):new Array();var X=ae.indexOf(" and ")>=0?ae.split(" and "):new Array();var ac=ae.indexOf(" or ")>=0?ae.split(" or "):new Array();var W=ae.indexOf("|")>=0?ae.split("|"):new Array();if(W.length>0){for(var ak=0;ak<W.length;ak++){W[ak]=i.trim(W[ak])}}var aj=ae.indexOf(" ")>=0?ae.split(" "):new Array();if(aj.length>0){for(var ak=0;ak<aj.length;ak++){aj[ak]=i.trim(aj[ak])}}ab=ab.concat(aj);ab=ab.concat(X);Y=Y.concat(W);Y=Y.concat(ac);if(ab.length>0){for(var ak=0;ak<ab.length;ak++){if(!ab[ak].indexOf(" OR ")>=0){Z.push(ab[ak])}}}if(Y.length>0){for(var ak=0;ak<Y.length;ak++){if(!Y[ak].indexOf(" AND ")>=0){Z.push(Y[ak])}}}var ai=undefined;for(var ah=0;ah<Z.length;ah++){var af=Z[ah];var aa=am(an,af);var ad=ah<ab.length?"and":"or";if(ai==undefined){ai=aa}else{if(ad=="or"){ai=ai||aa}else{ai=ai&&aa}}}return ai}}return am(an,ae)}};var I=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="booleanfilter";this.evaluate=function(Y){var X=this.filtervalue;var W=this.comparisonoperator;if(Y==null||Y==undefined){if(W=="NULL"){return true}return false}var Z=Y;switch(W){case"EQUAL":return Z==X||Z.toString()==X.toString();case"NOT_EQUAL":return Z!=X&&Z.toString()!=X.toString();default:return false}}};var N=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="numericfilter";this.evaluate=function(ag){var af=this.filtervalue;var al=this.comparisonoperator;if(ag===null||ag===undefined||ag===""){if(al=="NOT_NULL"){return false}if(al=="NULL"){return true}else{switch(al){case"EQUAL":return ag==af;case"NOT_EQUAL":return ag!=af}return false}}else{if(al=="NULL"){return false}if(al=="NOT_NULL"){return true}}var an=ag;try{an=parseFloat(an)}catch(ah){if(ag.toString()!=""){return false}}var am=function(ap,ao){switch(al){case"EQUAL":return ap==ao;case"NOT_EQUAL":return ap!=ao;case"GREATER_THAN":return ap>ao;case"GREATER_THAN_OR_EQUAL":return ap>=ao;case"LESS_THAN":return ap<ao;case"LESS_THAN_OR_EQUAL":return ap<=ao;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap.toString(),ao.toString());case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap.toString(),ao.toString());case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap.toString(),ao.toString());case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap.toString(),ao.toString());case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap.toString(),ao.toString());case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap.toString(),ao.toString());case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap.toString(),ao.toString());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap.toString(),ao.toString());default:return true}};var aa=new Array();if(af&&af.indexOf){af=af.replace("$","")}if(af.indexOf&&(af.indexOf("|")>=0||af.indexOf(" AND ")>=0||af.indexOf(" OR ")>=0||af.indexOf(" and ")>=0||af.indexOf(" or ")>=0)){var ab=am(an,af);if(ab){return ab}af=af.toString();var ac=af.indexOf(" AND ")>=0?af.split(" AND "):new Array();var Z=af.indexOf(" OR ")>=0?af.split(" OR "):new Array();var Y=af.indexOf(" and ")>=0?af.split(" and "):new Array();var ad=af.indexOf(" or ")>=0?af.split(" or "):new Array();ac=ac.concat(Y);Z=Z.concat(ad);var X=af.indexOf("|")>=0?af.split("|"):new Array();if(X.length>0){for(var ak=0;ak<X.length;ak++){X[ak]=i.trim(X[ak])}}Z=Z.concat(X);if(ac.length>0){for(var ak=0;ak<ac.length;ak++){if(!ac[ak].indexOf(" OR ")>=0){aa.push(ac[ak])}}}if(Z.length>0){for(var ak=0;ak<Z.length;ak++){if(!Z[ak].indexOf(" AND ")>=0){aa.push(Z[ak])}}}var aj=undefined;for(var ai=0;ai<aa.length;ai++){var ag=aa[ai];if(ag&&ag.indexOf&&ag.indexOf("..")>=0){var W=ag.toString().split("..");if(W.length==2){ab=an>=W[0]&&an<=W[1]}}else{var ab=am(an,ag)}var ae=ai<ac.length?"and":"or";if(aj==undefined){aj=ab}else{if(ae=="or"){aj=aj||ab}else{aj=aj&&ab}}}return aj}if(af&&af.indexOf&&af.indexOf("..")>=0){aa=af.toString().split("..");if(aa.length==2){return an>=aa[0]&&an<=aa[1]}}return am(an,af)}};var H=function(X,V,W,ab){this.filtervalue=X;this.type="datefilter";var Z=this;if(W!=undefined&&ab!=undefined){var Y=i.jqx.dataFormat.parsedate(X,W,ab);if(Y!=null){this.filterdate=Y}else{var U=i.jqx.dataFormat.tryparsedate(X,ab);if(U!=null){this.filterdate=U}}}else{var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}if(!this.filterdate){var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}this.comparisonoperator=V;this.evaluate=function(ao){var an=this.filtervalue;var aw=this.comparisonoperator;if(ao==null||ao==undefined||ao==""){if(aw=="NOT_NULL"){return false}if(aw=="NULL"){return true}else{switch(aw){case"EQUAL":return ao==an;case"NOT_EQUAL":return ao!=an}return false}}else{if(aw=="NULL"){return false}if(aw=="NOT_NULL"){return true}}var ay=new Date();ay.setFullYear(1900,0,1);ay.setHours(12,0,0,0);try{var av=new Date(ao);if(av.toString()=="NaN"||av.toString()=="Invalid Date"){ao=i.jqx.dataFormat.tryparsedate(ao)}else{ao=av}ay=ao;var at=false;if(W!=undefined&&ab!=undefined){if(W.indexOf("t")>=0||W.indexOf("T")>=0||W.indexOf(":")>=0||W.indexOf("f")>=0){at=true;if(an&&an.toString().indexOf(":")==-1){var aj=i.jqx.dataFormat.tryparsedate(an.toString()+":00",ab);if(aj!=null){Z.filterdate=aj}}}}if(W!=undefined){if(W.indexOf("hh")>=0||W.indexOf("t")>=0){at=true}}if(!at){ay.setHours(0);ay.setMinutes(0);ay.setSeconds(0)}}catch(ap){if(ao.toString()!=""){return false}}if(Z.filterdate!=null){an=Z.filterdate}else{if(an&&an.indexOf){if(an.indexOf(":")!=-1||!isNaN(parseInt(an))){var ai=new Date(ay);ai.setHours(12,0,0,0);var ah=an.split(":");for(var au=0;au<ah.length;au++){if(au==0){ai.setHours(ah[au])}if(au==1){ai.setMinutes(ah[au])}if(au==2){ai.setSeconds(ah[au])}}an=ai}}}if(at){if(an&&an.setFullYear){if(ay&&ay.getFullYear){if(W.indexOf("d")==-1&&W.indexOf("M")==-1&&W.indexOf("y")==-1){an.setFullYear(ay.getFullYear(),ay.getMonth(),ay.getDate())}}}}var ax=function(aA,az){if(aA==null){aA=""}switch(aw){case"EQUAL":return aA.toString()==az.toString();case"NOT_EQUAL":return aA.toString()!=az.toString();case"GREATER_THAN":return aA>az;case"GREATER_THAN_OR_EQUAL":return aA>=az;case"LESS_THAN":return aA<az;case"LESS_THAN_OR_EQUAL":return aA<=az;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(aA.toString(),az.toString());case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(aA.toString(),az.toString());case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(aA.toString(),az.toString());case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(aA.toString(),az.toString());case"CONTAINS":return i.jqx.string.containsIgnoreCase(aA.toString(),az.toString());case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(aA.toString(),az.toString());case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(aA.toString(),az.toString());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(aA.toString(),az.toString());default:return true}};var ag=new Array();if(an&&an.indexOf){if(an.indexOf("|")>=0||an.indexOf(" AND ")>=0||an.indexOf(" OR ")>=0||an.indexOf(" and ")>=0||an.indexOf(" or ")>=0){var aj=ax(ay,an);if(aj){return aj}var ak=an.indexOf(" AND ")>=0?an.split(" AND "):new Array();var af=an.indexOf(" OR ")>=0?an.split(" OR "):new Array();var ae=an.indexOf(" and ")>=0?an.split(" and "):new Array();var al=an.indexOf(" or ")>=0?an.split(" or "):new Array();ak=ak.concat(ae);af=af.concat(al);var ad=an.indexOf("|")>=0?an.split("|"):new Array();if(ad.length>0){for(var au=0;au<ad.length;au++){ad[au]=i.trim(ad[au])}}af=af.concat(ad);if(ak.length>0){for(var au=0;au<ak.length;au++){if(!ak[au].indexOf(" OR ")>=0){ag.push(ak[au])}}}if(af.length>0){for(var au=0;au<af.length;au++){if(!af[au].indexOf(" AND ")>=0){ag.push(af[au])}}}var ar=undefined;for(var aq=0;aq<ag.length;aq++){var ao=ag[aq];if(ao&&ao.indexOf&&ao.indexOf("..")>=0){var ac=ao.toString().split("..");if(ac.length==2){aj=ay>=ac[0]&&ay<=ac[1]}}else{var aj=ax(ay,ao)}var am=aq<ak.length?"and":"or";if(ar==undefined){ar=aj}else{if(am=="or"){ar=ar||aj}else{ar=ar&&aj}}}return ar}}if(an&&an.indexOf&&an.indexOf("..")>=0){ag=an.toString().split("..");if(ag.length==2){return ay>=ag[0]&&ay<=ag[1]}}return ax(ay,an)}};var e=function(V,U,W){this.filtervalue=V;this.comparisonoperator=U;this.evaluate=function(Y,X){return W(this.filtervalue,Y,this.comparisonoperator)}}}})(jqxBaseFramework);
 
 (function(f){f.jqx.timeSpan=function(){var q={ticksPerMillisecond:10000,millisecondsPerTick:1/10000,ticksPerSecond:1000*10000,secondsPerTick:1/(1000*10000),ticksPerMinute:1000*10000*60,minutesPerTick:1/(1000*10000*60),ticksPerHour:1000*10000*3600,hoursPerTick:1/(1000*10000*3600),ticksPerDay:1000*10000*3600*24,daysPerTick:1/(1000*10000*3600*24),millisPerSecond:1000,millisPerMinute:1000*60,millisPerHour:1000*60*60,millisPerDay:1000*60*60*24,_ticks:0};f.extend(true,this,q);var r=this;r.ticks=function(){return r._ticks};r.days=function(){return parseInt(r._ticks/r.ticksPerDay)};r.timeToMS=function(v,z,x,w){var y=v*3600+z*60+x+w/1000;return parseInt(y*r.ticksPerSecond)};r.hours=function(){return parseInt(r._ticks/r.ticksPerHour)%24};r.milliseconds=function(){return parseInt(r._ticks/r.ticksPerMillisecond)%1000};r.minutes=function(){return parseInt(r._ticks/r.ticksPerMinute)%60};r.seconds=function(){return parseInt(r._ticks/r.ticksPerSecond)%60};r.totalDays=function(){return parseInt(r._ticks*r.daysPerTick)};r.totalHours=function(){return parseInt(r._ticks*r.hoursPerTick)};r.totalMilliseconds=function(){var v=r._ticks*r.millisecondsPerTick;return parseInt(v)};r.totalMinutes=function(){return parseInt(r._ticks*r.minutesPerTick)};r.totalSeconds=function(){return parseInt(r._ticks*r.secondsPerTick)};if(arguments.length===1){r._ticks=arguments[0]}else{if(arguments.length===3){r._ticks=r.timeToMS(arguments[0],arguments[1],arguments[2])}else{if(arguments.length===4){var u=arguments[0];var n=arguments[1];var p=arguments[2];var t=arguments[3];var o=0;var s=(u*3600*24+n*3600+p*60+t)*1000+o;r._ticks=s*r.ticksPerMillisecond}else{if(arguments.length===5){var u=arguments[0];var n=arguments[1];var p=arguments[2];var t=arguments[3];var o=arguments[4];var s=(u*3600*24+n*3600+p*60+t)*1000+o;r._ticks=s*r.ticksPerMillisecond}}}}r.add=function(w){var v=r._ticks+w._ticks;var x=new f.jqx.timeSpan(v);return x};r.substract=function(w){var v=_ticks-w._ticks;return new f.jqx.timeSpan(v)};r.duration=function(){if(r._ticks>=0){return new f.jqx.timeSpan(r._ticks)}else{return new f.jqx.timeSpan(-r._ticks)}};r.equals=function(v){return r._ticks==v._ticks};r.valueOf=function(){return r._ticks};r.compare=function(w,v){if(w._ticks>v._ticks){return 1}if(w._ticks<v._ticks){return -1}return 0};r.interval=function(x,y){var w=x*y;var v=w+(x>=0?0.5:-0.5);return new f.jqx.timeSpan(v*r.ticksPerMillisecond)};r.fromDays=function(v){return r.interval(v,r.millisPerDay)};r.fromHours=function(v){return r.interval(v,r.millisPerHour)};r.fromMilliseconds=function(v){return r.interval(v,1)};r.fromMinutes=function(v){return r.interval(v,r.millisPerMinute)};r.fromSeconds=function(v){return r.interval(v,r.millisPerSecond)};r.fromTicks=function(v){return new f.jqx.timeSpan(v)};return r};var g=[{id:"Local",offset:0,offsetHours:0,displayName:"",supportsDaylightSavingTime:false},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:false},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:false},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:false},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:true},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:true},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:false},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:true},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:false},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:false},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:true},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:false},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:true},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:false},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:true},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:true},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:true},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:true},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:false},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:true},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:false},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:true},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:true},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:true},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:true},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:true},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:false},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:true},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:true},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:false},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:true},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:false},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:true},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:false},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:true},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:true},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:false},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:true},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:true},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:true},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:true},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:false},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:true},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:true},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:true},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:true},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:true},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:true},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:true},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:true},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:true},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:false},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:false},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:true},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:true},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:true},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:true},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:false},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:true},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:false},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:true},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:true},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:false},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:true},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:false},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:false},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:false},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:false},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:false},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:true},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:true},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:false},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:false},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:true},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:false},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:false},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:false},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:true},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:false},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:true},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:false},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:true},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:false},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:false},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:true},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:false},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:true},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:false},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:true},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:true},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:true},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:false},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:true},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:true},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:true},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:true},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:false},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:false},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:true}];var a=[0,31,59,90,120,151,181,212,243,273,304,334,365];var m=[0,31,60,91,121,152,182,213,244,274,305,335,366];var j=365*4+1;var c=(365*4+1)*25-1;var h=((365*4+1)*25-1)*4+1;var d=(((365*4+1)*25-1)*4+1)*4;var b=(((365*4+1)*25-1)*4+1)*4+((365*4+1)*25-1)*3-367;var l=(((365*4+1)*25-1)*4+1)*25-366;var k=0;var i=((((365*4+1)*25-1)*4+1)*25-366)*(1000*10000*3600*24)-1;var e=((((365*4+1)*25-1)*4+1)*25-366)*(1000*60*60*24);f.jqx.date=function(){var r=this;r.ticksPerMillisecond=10000;r.millisecondsPerTick=1/10000;r.ticksPerSecond=1000*10000;r.secondsPerTick=1/(1000*10000);r.ticksPerMinute=1000*10000*60;r.minutesPerTick=1/(1000*10000*60);r.ticksPerHour=1000*10000*3600;r.hoursPerTick=1/(1000*10000*3600);r.ticksPerDay=1000*10000*3600*24;r.daysPerTick=1/(1000*10000*3600*24);r.millisPerSecond=1000;r.millisPerMinute=1000*60;r.millisPerHour=1000*60*60;r.millisPerDay=1000*60*60*24;r.daysPerYear=365;r.daysPer4Years=j;r.daysPer100Years=c;r.daysPer400Years=h;r.daysTo1601=d;r.daysTo1899=b;r.daysTo10000=l;r.minTicks=0;r.maxTicks=i;r.maxMillis=e;r.datePartYear=0;r.datePartDayOfYear=1;r.datePartMonth=2;r.datePartDay=3;r.daysToMonth365=a;r.daysToMonth366=m;r.minValue=new Date(0);r.maxValue=new Date(((((365*4+1)*25-1)*4+1)*25-366)*(1000*10000*3600*24)-1);r.ticksMask=4611686018427388000;r.flagsMask=13835058055282164000;r.localMask=9223372036854776000;r.ticksCeiling=4611686018427388000;r.kindUnspecified=0;r.kindUtc=4611686018427388000;r.kindLocal=9223372036854776000;r.kindLocalAmbiguousDst=13835058055282164000;r.kindShift=62;r.regexTrim=/^\s+|\s+$/g;r.regexInfinity=/^[+-]?infinity$/i;r.regexHex=/^0x[a-f0-9]+$/i;r.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;r.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","};r.dateData=0;r.timeZone=null;r.timeZones=g;r.internalMS=function(){return r.dateData};r.getDatePart=function(y){var x=r.internalMS();var z=parseInt(x/r.millisPerDay);var G=parseInt(z/r.daysPer400Years);z-=G*r.daysPer400Years;var B=parseInt(z/r.daysPer100Years);if(B==4){B=3}z-=B*r.daysPer100Years;var D=parseInt(z/r.daysPer4Years);z-=D*r.daysPer4Years;var E=parseInt(z/r.daysPerYear);if(E==4){E=3}if(y==r.datePartYear){return parseInt(G*400+B*100+D*4+E+1)}z-=E*r.daysPerYear;if(y==r.datePartDayOfYear){return parseInt(z+1)}var C=E==3&&(D!=24||B==3);var F=C?r.daysToMonth366:r.daysToMonth365;var A=z>>5+1;while(z>=F[A]){A++}if(y==r.datePartMonth){return parseInt(A)}return parseInt(z-F[A-1]+1)};r.dayOfWeek=function(){var y=r.dateData;var x=parseInt(y/r.millisPerDay+1)%7;return x},r.dayOfYear=function(){return r.getDatePart(r.datePartDayOfYear)};r.weekOfYear=function(z){var x=r.toDate();var C=z||r.calendar.firstDay;var B=new Date(x.getFullYear(),0,1);var y=B.getDay()-C;y=(y>=0?y:y+7);var A=Math.floor((x.getTime()-B.getTime()-(x.getTimezoneOffset()-B.getTimezoneOffset())*60000)/86400000)+1;var D;if(y<4){D=Math.floor((A+y-1)/7)+1;if(D>52){nYear=new Date(x.getFullYear()+1,0,1);nday=nYear.getDay()-C;nday=nday>=0?nday:nday+7;D=nday<4?1:53}}else{D=Math.floor((A+y-1)/7)}return D};r.subtract=function(x){return new f.jqx.timeSpan(r.dateData*r.ticksPerMillisecond-x.dateData*r.ticksPerMillisecond)};r.dateToMS=function(z,A,x){if(z>=1&&z<=9999&&A>=1&&A<=12){z=parseInt(z);var D=r.isLeapYear(z)?r.daysToMonth366:r.daysToMonth365;if(x>=1&&x<=D[A]-D[A-1]){var C=z-1;var B=C*365+parseInt(C/4)-parseInt(C/100)+parseInt(C/400)+D[A-1]+x-1;return B*r.millisPerDay}}};r.isLeapYear=function(x){if(x<1||x>9999){throw new Error("Year out of Range")}return x%4==0&&(x%100!=0||x%400==0)};r.timeToMS=function(x,B,z,y){if(x>=0&&x<24&&B>=0&&B<60&&z>=0&&z<60){var A=parseInt(x*3600+B*60+z);if(y>0&&y<1000){return(A*r.millisPerSecond)+y}return A*r.millisPerSecond}};r.daysInMonth=function(x,y){if(y<1||y>12){throw new Error("Month out of Range")}var z=r.isLeapYear(x)?r.daysToMonth366:r.daysToMonth365;return z[y]-z[y-1]};r.arrayIndexOf=function(A,z){if(A.indexOf){return A.indexOf(z)}for(var x=0,y=A.length;x<y;x++){if(A[x]===z){return x}}return -1};r.startsWith=function(y,x){return y.indexOf(x)===0};r.endsWith=function(y,x){return y.substr(y.length-x.length)===x},r.trim=function(x){return(x+"").replace(r.regexTrim,"")};r.expandFormat=function(B,A){A=A||"F";var z,y=B.patterns,x=A.length;if(x===1){z=y[A];if(!z){throw"Invalid date format string '"+A+"'."}A=z}else{if(x===2&&A.charAt(0)==="%"){A=A.charAt(1)}}return A};r.getEra=function(z,y){if(!y){return 0}if(typeof z==="string"){return 0}var C,B=z.getTime();for(var A=0,x=y.length;A<x;A++){C=y[A].start;if(C===null||B>=C){return A}}return 0};r.toUpper=function(x){return x.split("\u00A0").join(" ").toUpperCase()};r.toUpperArray=function(x){var A=[];for(var z=0,y=x.length;z<y;z++){A[z]=r.toUpper(x[z])}return A};r.getEraYear=function(y,A,x,B){var z=y.getFullYear();if(!B&&A.eras){z-=A.eras[x].offset}return z};r.getDayIndex=function(B,A,y){var x,C=B.days,z=B._upperDays;if(!z){B._upperDays=z=[r.toUpperArray(C.names),r.toUpperArray(C.namesAbbr),r.toUpperArray(C.namesShort)]}A=A.toUpperCase();if(y){x=r.arrayIndexOf(z[1],A);if(x===-1){x=r.arrayIndexOf(z[2],A)}}else{x=r.arrayIndexOf(z[0],A)}return x};r.getMonthIndex=function(E,D,z){var x=E.months,y=E.monthsGenitive||E.months,B=E._upperMonths,C=E._upperMonthsGen;if(!B){E._upperMonths=B=[r.toUpperArray(x.names),r.toUpperArray(x.namesAbbr)];E._upperMonthsGen=C=[r.toUpperArray(y.names),r.toUpperArray(y.namesAbbr)]}D=r.toUpper(D);var A=r.arrayIndexOf(z?B[1]:B[0],D);if(A<0){A=r.arrayIndexOf(z?C[1]:C[0],D)}return A};r.appendPreOrPostMatch=function(A,x){var z=0,C=false;for(var B=0,y=A.length;B<y;B++){var D=A.charAt(B);switch(D){case"'":if(C){x.push("'")}else{z++}C=false;break;case"\\":if(C){x.push("\\")}C=!C;break;default:x.push(D);C=false;break}}return z};r.getTokenRegExp=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};r.tryparseDate=function(ad,ae,U){if(ae==undefined||ae==null){ae=r.calendar}else{if(ae!=null){if(ae&&f.type(ae)==="string"&&Globalize){var aj=Globalize.cultures[ae];if(aj){ae=aj.calendar}}}}if(U!=undefined){if(f.type(U)==="array"){for(var ak=0;ak<U.length;ak++){var am=r.parseDate(ad,U[ak],ae);if(am){return am}}}var am=r.parseDate(ad,U,ae);if(am){return am}}var I=this;if(ad==""){return null}if(ad!=null&&!ad.substring){ad=ad.toString()}if(ad!=null&&ad.substring(0,6)=="/Date("){var ao=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var al=new Date(+ad.replace(/\/Date\((\d+)\)\//,"$1"));if(al=="Invalid Date"){var ag=ad.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var al=null;if(ag){al=new Date(1*ag[1]+3600000*ag[2]+60000*ag[3])}}if(al==null||al=="Invalid Date"||isNaN(al)){var J=ao.exec(ad);if(J){var M=new Date(parseInt(J[1]));if(J[2]){var S=parseInt(J[3]);if(J[2]==="-"){S=-S}var O=M.getUTCMinutes();M.setUTCMinutes(O-S)}if(!isNaN(M.valueOf())){return M}}}return al}var G={jqxdate:"yyyy-MM-dd HH:mm:ss",d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",d4:"MM.dd.yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",iso:"yyyy-MM-ddTHH:mm:ssZ",iso_date1:"yyyy-MM-dd",iso_date2:"yyyy-MM-dd",iso_date3:"yyyy-ddd",iso_date4:"yyyy-MM-dd HH:mm",iso_date5:"yyyy-MM-dd HH:mm Z",iso_date6:"yyyy-MMM-dd",iso_date7:"yyyy-MM",iso_date8:"yyyy-MMM",iso_date9:"yyyy-MMMM",iso_date10:"yyyy-MMMM-dd",iso_time1:"HH:mm:ss.tttt",iso_time2:"HH:mm:ss",iso_time3:"HH:mm",iso_time4:"HH",iso_time5:"yyyyyy-MM-dd",iso_time6:"yyyyyy-MM-dd"};for(var L in G){al=r.parseDate(ad,G[L],ae);if(al){return al}}var F=ae.patterns;for(L in F){al=r.parseDate(ad,F[L],ae);if(al){if(L=="ISO"){var W=r.parseDate(ad,F.ISO2,ae);if(W){return W}}return al}}if(f.type(ad)==="string"){ad=r.trim(ad);var af=[":","/","-"," ",","];var E=function(at,y,ar){return ar.replace(new RegExp(at,"g"),y)};ad=E(", ",",",ad);var A="";var R=ad;if(ad.indexOf(":")>=0){A=ad.substring(ad.indexOf(":")-2);A=r.trim(A);R=ad.substring(0,ad.indexOf(":")-2)}else{if(ad.toUpperCase().indexOf("AM")>=0){A=ad.substring(ad.toUpperCase().indexOf("AM")-2);A=r.trim(A);R=ad.substring(0,ad.toUpperCase().indexOf("AM")-2)}else{if(ad.toUpperCase().indexOf("PM")>=0){A=ad.substring(ad.toUpperCase().indexOf("PM")-2);A=r.trim(A);R=ad.substring(0,ad.toUpperCase().indexOf("PM")-2)}}}var x=new Date();var ac=false;if(R){for(var ak=0;ak<af.length;ak++){if(R.indexOf(af[ak])>=0){D=R.split(af[ak]);break}}var z=new Array();var P=new Array();var Y=new Array();var K=null;var aq=null;for(var ak=0;ak<D.length;ak++){var H=D[ak];var X=r.parseDate(H,"d",ae)||r.parseDate(H,"dd",ae)||r.parseDate(H,"ddd",ae)||r.parseDate(H,"dddd",ae);if(X){z.push(X.getDate());if(H.length>2){K=ak;break}}}for(var ak=0;ak<D.length;ak++){var H=D[ak];var N=r.parseDate(H,"M",ae)||r.parseDate(H,"MM",ae)||r.parseDate(H,"MMM",ae)||r.parseDate(H,"MMMM",ae);if(N){if(K!=undefined&&K==ak){continue}P.push(N.getMonth());if(H.length>2){aq=ak;break}}}for(var ak=0;ak<D.length;ak++){var H=D[ak];var Z=r.parseDate(H,"yyyy",ae);if(Z){if(K!=undefined&&K==ak){continue}if(aq!=undefined&&aq==ak){continue}Y.push(Z.getFullYear())}}var ah=new Array();for(var an=0;an<z.length;an++){for(var ag=0;ag<P.length;ag++){for(var ab=0;ab<Y.length;ab++){var M=new Date(Y[ab],P[ag],z[an]);if(Y[ab]<1970){M.setFullYear(Y[ab])}if(M.getTime()!=NaN){ah.push(M)}}}}if(ah.length>0){x=ah[0];ac=true}}if(A){var aa=A.indexOf(":")>=0?A.split(":"):A;var C=r.parseDate(A,"h:mm tt",ae)||r.parseDate(A,"HH:mm:ss.fff",ae)||r.parseDate(A,"HH:mm:ss.ff",ae)||r.parseDate(A,"h:mm:ss tt",ae)||r.parseDate(A,"HH:mm:ss.tttt",ae)||r.parseDate(A,"HH:mm:ss",ae)||r.parseDate(A,"HH:mm",ae)||r.parseDate(A,"HH",ae);var Q=0,B=0,T=0,V=0;if(C&&C.getTime()!=NaN){Q=C.getHours();B=C.getMinutes();T=C.getSeconds();V=C.getMilliseconds()}else{if(aa.length==1){Q=parseInt(aa[0])}if(aa.length==2){Q=parseInt(aa[0]);B=parseInt(aa[1])}if(aa.length==3){Q=parseInt(aa[0]);B=parseInt(aa[1]);if(aa[2].indexOf(".")>=0){T=parseInt(aa[2].toString().split(".")[0]);V=parseInt(aa[2].toString().split(".")[1])}else{T=parseInt(aa[2])}}if(aa.length==4){Q=parseInt(aa[0]);B=parseInt(aa[1]);T=parseInt(aa[2]);V=parseInt(aa[3])}}if(x&&!isNaN(Q)&&!isNaN(B)&&!isNaN(T)&&!isNaN(V)){x.setHours(Q,B,T,V);ac=true}}if(ac){return x}}if(ad!=null){var W=null;var D=[":","/","-"];var ai=true;for(var H=0;H<D.length;H++){if(ad.indexOf(D[H])!=-1){ai=false}}if(ai){var ap=new Number(ad);if(!isNaN(ap)){return new Date(ap)}}}return null};r.getParseRegExp=function(x,I){var K=x._parseRegExp;if(!K){x._parseRegExp=K={}}else{var B=K[I];if(B){return B}}var H=r.expandFormat(x,I).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),F=["^"],y=[],E=0,A=0,N=r.getTokenRegExp(),C;while((C=N.exec(H))!==null){var M=H.slice(E,C.index);E=N.lastIndex;A+=r.appendPreOrPostMatch(M,F);if(A%2){F.push(C[0]);continue}var z=C[0],D=z.length,J;switch(z){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":J="(\\D+)";break;case"tt":case"t":J="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":J="(\\d{"+D+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":J="(\\d\\d?)";break;case"zzz":J="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":J="([+-]?\\d\\d?)";break;case"/":J="(\\"+x["/"]+")";break;default:throw"Invalid date format pattern '"+z+"'.";break}if(J){F.push(J)}y.push(C[0])}r.appendPreOrPostMatch(H.slice(E),F);F.push("$");var L=F.join("").replace(/\s+/g,"\\s+"),G={regExp:L,groups:y};return K[I]=G};r.outOfRange=function(z,x,y){return z<x||z>y};r.expandYear=function(C,A){var y=new Date(),x=r.getEra(y);if(A<100){var z=C.twoDigitYearMax;z=typeof z==="string"?new Date().getFullYear()%100+parseInt(z,10):z;var B=r.getEraYear(y,C,x);A+=B-(B%100);if(A>z){A-=100}}return A};r.parseDate=function(S,Z,N){if(N==undefined||N==null){N=r.calendar}S=r.trim(S);var K=N,ae=r.getParseRegExp(K,Z),E=new RegExp(ae.regExp).exec(S);if(E===null){return null}var aa=ae.groups,Q=null,I=null,ad=null,ac=null,J=null,C=0,V,U=0,ab=0,x=0,z=null,L=false;for(var W=0,Y=aa.length;W<Y;W++){var y=E[W+1];if(y){var R=aa[W],B=R.length,D=parseInt(y,10);switch(R){case"dd":case"d":ac=D;if(r.outOfRange(ac,1,31)){return null}break;case"MMM":case"MMMM":case"MMMMM":case"MMMMMM":case"MMMMMMM":case"MMMMMMMM":ad=r.getMonthIndex(K,y,B===3);if(r.outOfRange(ad,0,11)){return null}break;case"M":case"MM":ad=D-1;if(r.outOfRange(ad,0,11)){return null}break;case"y":case"yy":case"yyyy":I=B<4?r.expandYear(K,D):D;if(r.outOfRange(I,0,9999)){return null}break;case"h":case"hh":C=D;if(C===12){C=0}if(r.outOfRange(C,0,11)){return null}break;case"H":case"HH":C=D;if(r.outOfRange(C,0,23)){return null}break;case"m":case"mm":U=D;if(r.outOfRange(U,0,59)){return null}break;case"s":case"ss":ab=D;if(r.outOfRange(ab,0,59)){return null}break;case"tt":case"t":L=K.PM&&(y===K.PM[0]||y===K.PM[1]||y===K.PM[2]);if(!L&&(!K.AM||(y!==K.AM[0]&&y!==K.AM[1]&&y!==K.AM[2]))){return null}break;case"f":case"ff":case"fff":x=D*Math.pow(10,3-B);if(r.outOfRange(x,0,999)){return null}break;case"ddd":case"dddd":J=r.getDayIndex(K,y,B===3);if(r.outOfRange(J,0,6)){return null}break;case"zzz":var A=y.split(/:/);if(A.length!==2){return null}V=parseInt(A[0],10);if(r.outOfRange(V,-12,13)){return null}var G=parseInt(A[1],10);if(r.outOfRange(G,0,59)){return null}z=(V*60)+(r.startsWith(y,"-")?-G:G);break;case"z":case"zz":V=D;if(r.outOfRange(V,-12,13)){return null}z=V*60;break;case"g":case"gg":var M=y;if(!M||!K.eras){return null}M=trim(eraNathat.toLowerCase());for(var X=0,T=K.eras.length;X<T;X++){if(M===K.eras[X].nathat.toLowerCase()){Q=X;break}}if(Q===null){return null}break}}}var H=new Date(),P,F=K.convert;P=H.getFullYear();if(I===null){I=P}else{if(K.eras){I+=K.eras[(Q||0)].offset}}if(ad===null){ad=0}if(ac===null){ac=1}if(F){H=F.toGregorian(I,ad,ac);if(H===null){return null}}else{H.setFullYear(I,ad,ac);if(H.getDate()!==ac){return null}if(J!==null&&H.getDay()!==J){return null}}if(L&&C<12){C+=12}H.setHours(C,U,ab,x);if(z!==null){var O=H.getMinutes()-(z+H.getTimezoneOffset());H.setHours(H.getHours()+parseInt(O/60,10),O%60)}return H},r.toString=function(U,L){if(U===undefined){U="yyyy-MM-dd HH:mm:ss"}if(f.jqx.date.cache&&f.jqx.date.cache[r.dateData+U]){return f.jqx.date.cache[r.dateData+U]}if(L&&f.type(L)==="string"&&Globalize){var V=Globalize.cultures[L];if(V){L=V.calendar}}var Q=r.toDate();if(L==undefined||L==null){L=r.calendar}if(typeof Q==="string"){return Q}var A=Q.toString()+"_"+U;if(!U||!U.length||U==="i"){var X;X=r.formatDate(Q,L.patterns.F,L);return X}var R=L.eras,y=U==="s";U=r.expandFormat(L,U);X=[];var D,S=["0","00","000"],H,I,x=/([^d]|^)(d|dd)([^d]|$)/g,W=0,N=r.getTokenRegExp(),z;function F(Y,ab){var aa,Z=Y+"";if(ab>1&&Z.length<ab){aa=(S[ab-2]+Z);return aa.substr(aa.length-ab,ab)}else{aa=Z}return aa}function T(){if(H||I){return H}H=x.test(U);I=true;return H}function B(Z,Y){if(z){return z[Y]}if(Z.getMonth!=undefined){switch(Y){case 0:return Z.getFullYear();case 1:return Z.getMonth();case 2:return Z.getDate()}}}for(;;){var E=N.lastIndex,M=N.exec(U);var J=U.slice(E,M?M.index:U.length);W+=r.appendPreOrPostMatch(J,X);if(!M){break}if(W%2){X.push(M[0]);continue}var O=M[0],C=O.length;switch(O){case"ddd":case"dddd":var K=(C===3)?L.days.namesAbbr:L.days.names;X.push(K[Q.getDay()]);break;case"d":case"dd":H=true;X.push(F(B(Q,2),C));break;case"MMM":case"MMMM":var P=B(Q,1);X.push(L.months[C===3?"namesAbbr":"names"][P]);break;case"M":case"MM":X.push(F(B(Q,1)+1,C));break;case"y":case"yy":case"yyyy":P=r.getEraYear(Q,L,r.getEra(Q,R),y);if(C<4){P=P%100}X.push(F(P,C));break;case"h":case"hh":D=Q.getHours()%12;if(D===0){D=12}X.push(F(D,C));break;case"H":case"HH":X.push(F(Q.getHours(),C));break;case"m":case"mm":X.push(F(Q.getMinutes(),C));break;case"s":case"ss":X.push(F(Q.getSeconds(),C));break;case"t":case"tt":P=Q.getHours()<12?(L.AM?L.AM[0]:" "):(L.PM?L.PM[0]:" ");X.push(C===1?P.charAt(0):P);break;case"f":case"ff":case"fff":X.push(F(Q.getMilliseconds(),3).substr(0,C));break;case"z":case"zz":D=Q.getTimezoneOffset()/60;X.push((D<=0?"+":"-")+F(Math.floor(Math.abs(D)),C));break;case"zzz":D=Q.getTimezoneOffset()/60;X.push((D<=0?"+":"-")+F(Math.floor(Math.abs(D)),2)+":"+F(Math.abs(Q.getTimezoneOffset()%60),2));break;case"g":case"gg":if(L.eras){X.push(L.eras[r.getEra(Q,R)].name)}break;case"/":X.push(L["/"]);break;default:throw"Invalid date format pattern '"+O+"'.";break}}var G=X.join("");if(!f.jqx.date.cache){f.jqx.date.cache=new Array()}f.jqx.date.cache[r.dateData+U]=G;return G};r.add=function(B,C,y){var z=r.internalMS();if(C===undefined){if(y===false){r.dateData=(z+parseInt(B._ticks/r.ticksPerMillisecond));return r}var x=new f.jqx.date((z+parseInt(B._ticks/r.ticksPerMillisecond)));x.timeZone=r.timeZone;return x}var A=(B*C);if(A<=-r.maxMillis||A>=r.maxMillis){throw new Error("Out of Range")}if(y===false){r.dateData=(z+A);return r}var x=new f.jqx.date(z+A);x.timeZone=r.timeZone;return x};r.addDays=function(y,x){return r.add(y,r.millisPerDay,x)};r.clone=function(){var x=new f.jqx.date(r.dateData);x.timeZone=r.timeZone;return x};r.clearTime=function(){var A=r.month();var z=r.year();var y=r.day();var x=new f.jqx.date(z,A,y,0,0,0,0);x.timeZone=r.timeZone;return x};r.addHours=function(y,x){return r.add(y,r.millisPerHour,x)};r.addMilliseconds=function(y,x){return r.add(y,1,x)};r.addMinutes=function(y,x){return r.add(y,r.millisPerMinute,x)};r.addMonths=function(z,B){if(z<-120000||z>120000){throw new Error("Invalid Months Value")}var F=parseInt(r.getDatePart(r.datePartYear));var x=parseInt(r.getDatePart(r.datePartMonth));var D=parseInt(r.getDatePart(r.datePartDay));var C=x-1+z;if(C>=0){x=C%12+1;F=F+C/12}else{x=12+(C+1)%12;F=F+(C-11)/12}F=parseInt(F);if(F<1||F>9999){throw new Error("Year out of range")}var E=r.daysInMonth(F,x);if(D>E){D=E}if(B===false){r.dateData=(r.dateToMS(F,x,D)+r.internalMS()%r.millisPerDay);return r}var A=new f.jqx.date((r.dateToMS(F,x,D)+r.internalMS()%r.millisPerDay));A.timeZone=r.timeZone;return A};r.addSeconds=function(y,x){return r.add(y,r.millisPerSecond,x)};r.addYears=function(y,x){return r.addMonths(y*12,x)};r.getTimeZoneOffset=function(){var y=new Date();var x=new Date(y.getFullYear(),0,1);var z=new Date(y.getFullYear(),6,1);var A=y.getTimezoneOffset()<Math.max(x.getTimezoneOffset(),z.getTimezoneOffset());return{offset:-(y.getTimezoneOffset()/60),dst:+A}};r.isInDaylightSavingTime=function(){var y=new Date();var z=new Date(y.getFullYear(),0,1);var x=new Date(y.getFullYear(),6,1);return r.date().getTimezoneOffset()<Math.max(z.getTimezoneOffset(),x.getTimezoneOffset())};r.supportsDaylightSavingTime=function(){var y=new Date();var z=new Date(y.getFullYear(),0,1);var x=new Date(y.getFullYear(),6,1);return z.getTimezoneOffset()!=x.getTimezoneOffset()};r.date=function(){var A=r.month();var z=r.year();var y=r.day();var x=new f.jqx.date(z,A,y);x.timeZone=r.timeZone;return x};r.isWeekend=function(){return r.dayOfWeek()==0||r.dayOfWeek()==6};r.toDate=function(J){var E=r.month();var F=r.year();var G=r.day();var A=r.hour();var z=r.minute();var x=r.second();var L=r.millisecond();var K=new Date(F,E-1,G);if(F<1970){K.setFullYear(F)}K.setHours(A,z,x,L);if(J){var D=r.timeZones.filter(function(M){return M.id==J});if(D.length){var B=D[0].offset;if(J=="Local"){B=-K.getTimezoneOffset()}var C=K.getTime();var I=K.getTimezoneOffset()*60*1000;if(r.timeZone){var y=r.timeZones.filter(function(M){return M.id==r.timeZone});if(y.length){var I=-y[0].offset*60*1000}}var H=C+I;K=new Date(H+(60*1000*B))}}return K};r.toTimeZone=function(y){var A=y;if(A==null){A="Local"}var x=r.toDate(A);var z=new f.jqx.date(x);z.timeZone=y;return z};r.day=function(){return r.getDatePart(r.datePartDay)};r.month=function(){return r.getDatePart(r.datePartMonth)};r.year=function(){return r.getDatePart(r.datePartYear)};r.millisecond=function(){return parseInt((r.internalMS())%1000)};r.hour=function(){return parseInt((r.internalMS()/r.millisPerHour)%24)};r.minute=function(){return parseInt((r.internalMS()/r.millisPerMinute)%60)};r.second=function(){return parseInt((r.internalMS()/r.millisPerSecond)%60)};r.valueOf=function(){return r.dateData};r.equals=function(x){return r.dateData===x.dateData};if(arguments.length===0){var o=new Date();r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{if(arguments.length===1){if(arguments[0]==undefined){arguments[0]="todayDate"}var v=typeof arguments[0]==="number"&&isFinite(arguments[0]);if(!v&&f.type(arguments[0])==="string"){if(arguments[0]==="today"){var o=new Date();r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{if(arguments[0]==="todayDate"){var o=new Date();o.setHours(0,0,0,0);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{var o=r.tryparseDate(arguments[0]);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}}}else{if(typeof(arguments[0])==="number"){r.dateData=arguments[0]}else{if(f.type(arguments[0])=="date"){var o=arguments[0];r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{if(arguments[0].dateData!==undefined){r.dateData=arguments[0].dateData}else{r.dateData=arguments[0]}}}}}else{if(arguments.length===2){if(arguments[0]==undefined){arguments[0]="todayDate"}var v=typeof arguments[0]==="number"&&isFinite(arguments[0]);if(!v&&f.type(arguments[0])==="string"){if(arguments[0]==="today"){var o=new Date();r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{if(arguments[0]==="todayDate"){var o=new Date();o.setHours(0,0,0,0);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{var o=r.tryparseDate(arguments[0]);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}}}else{if(typeof(arguments[0])==="number"){r.dateData=arguments[0]}else{if(f.type(arguments[0])=="date"){var o=arguments[0];r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{if(arguments[0].dateData!==undefined){r.dateData=arguments[0].dateData}else{r.dateData=arguments[0]}}}}r.timeZone=arguments[1]}else{if(arguments.length>2){if(f.type(arguments[0])==="string"){var o=r.tryparseDate(arguments[0],arguments[2],arguments[1]);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{var t=arguments[0];var s=arguments[1];var u=arguments[2];var q=arguments[3];var p=arguments[4];var n=arguments[5];var w=arguments[6];if(q===undefined){q=0}if(p===undefined){p=0}if(n===undefined){n=0}if(w===undefined){w=0}s--;var o=new Date(t,s,u,q,p,n,w);if(t<1970){o.setFullYear(t)}r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}}}}}return r}})(jqxBaseFramework);if(!Array.prototype.filter){Array.prototype.filter=function(b){if(this===void 0||this===null){throw new TypeError()}var f=Object(this);var a=f.length>>>0;if(typeof b!=="function"){throw new TypeError()}var e=[];var d=arguments[1];for(var c=0;c<a;c++){if(c in f){var g=f[c];if(b.call(d,g,c,f)){e.push(g)}}}return e}};
 
@@ -30,11 +30,11 @@
 
 (function(a){a.jqx.jqxWidget("jqxButtonGroup","",{});a.extend(a.jqx._jqxButtonGroup.prototype,{defineInstance:function(){var b={mode:"default",roundedCorners:true,disabled:false,enableHover:false,orientation:"horizontal",width:null,height:null,_eventsMap:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend")},_events:["selected","unselected","buttonclick"],_buttonId:{},_selected:null,_pressed:null,rtl:false,template:"",_baseId:"group_button",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButtonGroup.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;c._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(c);c._baseId=c._baseId+c.element.id;c.addHandler(c.host,"selectstart",function(d){if(!c.disabled){d.preventDefault()}})},refresh:function(){var b=this;if(b.width){if(b.width.toString()&&b.width.toString().indexOf("%")>=0){b.element.style.width=b.width}else{b.host.width(b.width)}}if(b.height){b.host.height(b.height)}b._refreshButtons()},render:function(){this.refresh()},resize:function(){this.refresh()},_getEvent:function(c){var b=this;if(b._isTouchDevice){var d=b._eventsMap[c]||c;d+="."+b.element.id;return d}c+="."+b.element.id;return c},_refreshButtons:function(){var f=this;if(f.lastElement){f.lastElement.remove()}f.lastElement=a("<div style='clear: both;'></div>");var c=f.host.children(),e=c.length,g;switch(f.mode){case"radio":f.host.attr("role","radiogroup");break;case"checkbox":case"default":f.host.attr("role","group");break}var d=new Number(100/e).toFixed(2);for(var b=0;b<e;b+=1){g=a(c[b]);if(f.width){if(f.orientation==="horizontal"){g.css("width",d+"%");g.css("box-sizing","border-box");g.css("-moz-box-sizing","border-box");g.css("white-space","nowrap");g.css("text-overflow","ellipsis");g.css("overflow","hidden")}else{g.css("box-sizing","border-box");g.css("-moz-box-sizing","border-box");g.css("width","100%")}}f._refreshButton(g,b,e)}f.lastElement.appendTo(f.host)},_refreshButton:function(c,b,d){(function(e){var f=this;e=f._render(e);f._removeStyles(e);f._addStyles(e,b,d);f._performLayout(e);f._removeButtonListeners(e);f._addButtonListeners(e);f._handleButtonId(e,b);if(f.mode==="radio"){e.attr("role","radio")}else{e.attr("role","button")}e.attr("disabled",f.disabled);if(f.disabled){e.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{e.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}}).apply(this,[c])},destroy:function(b){var f=this;var d=f.host.children(),e=d.length,g;for(var c=0;c<e;c+=1){g=a(d[c]);f._removeStyles(g);f._removeButtonListeners(g)}if(b!==false){f.host.remove()}},_render:function(b){var c=this;if(b[0].tagName.toLowerCase()==="button"){return c._renderFromButton(b)}else{return c._renderButton(b)}},_renderButton:function(b){var c;b.wrapInner("<div/>");return b},_removeStyles:function(b){var c=this;var d=c.toThemeProperty;c.host.removeClass("jqx-widget");c.host.removeClass("jqx-rc-all");b.removeClass(d.call(this,"jqx-fill-state-normal"));b.removeClass(d.call(this,"jqx-group-button-normal"));b.removeClass(d.call(this,"jqx-rc-tl"));b.removeClass(d.call(this,"jqx-rc-bl"));b.removeClass(d.call(this,"jqx-rc-tr"));b.removeClass(d.call(this,"jqx-rc-br"));b.css("margin-left",0)},_addStyles:function(c,b,e){var d=this;var f=this.toThemeProperty;d.host.addClass(f.call(this,"jqx-widget"));d.host.addClass(f.call(this,"jqx-rc-all"));d.host.addClass(f.call(this,"jqx-buttongroup"));c.addClass(f.call(this,"jqx-button"));c.addClass(f.call(this,"jqx-group-button-normal"));c.addClass(f.call(this,"jqx-fill-state-normal"));if(d.template){c.addClass(f.call(this,"jqx-"+d.template))}if(d.roundedCorners){if(b===0){d._addRoundedCorners(c,true)}else{if(b===e-1){d._addRoundedCorners(c,false)}}}if(d.orientation==="horizontal"){c.css("margin-left",-parseInt(c.css("border-left-width"),10))}else{c.css("margin-top",-parseInt(c.css("border-left-width"),10))}},_addRoundedCorners:function(b,d){var c=this;var e=c.toThemeProperty;if(c.orientation==="horizontal"){if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-bl"))}else{b.addClass(e.call(this,"jqx-rc-tr"));b.addClass(e.call(this,"jqx-rc-br"))}}else{if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-tr"))}else{b.addClass(e.call(this,"jqx-rc-bl"));b.addClass(e.call(this,"jqx-rc-br"))}}},_centerContent:function(c,b){c.css({"margin-top":(b.height()-c.height())/2,"margin-left":(b.width()-c.width())/2});return c},_renderFromButton:function(b){var c=b.val();if(c===""){c=b.html()}var e;var d=b[0].id;b.wrap("<div/>");e=b.parent();e.attr("style",b.attr("style"));b.remove();a.jqx.utilities.html(e,c);e[0].id=d;return e},_performLayout:function(b){if(this.orientation==="horizontal"){if(this.rtl){b.css("float","right")}else{b.css("float","left")}}else{b.css("float","none")}this._centerContent(a(b.children()),b)},_mouseEnterHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-hover"));c.addClass(f.call(b,"jqx-fill-state-hover"))},_mouseLeaveHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.removeClass(f.call(b,"jqx-group-button-hover"));c.removeClass(f.call(b,"jqx-fill-state-hover"))},_mouseDownHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._pressed=c;var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-pressed"));c.addClass(f.call(b,"jqx-fill-state-pressed"))},_mouseUpHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._handleSelection(c);b._pressed=null;c=b._buttonId[c[0].id];b._raiseEvent(2,{index:c.num,button:c.btn})},_isDisabled:function(b){if(!b||!b[0]){return false}return this._buttonId[b[0].id].disabled},_documentUpHandler:function(d){var b=d.data.self,c=b._pressed;if(c&&!b._buttonId[c[0].id].selected){c.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._pressed=null}},_addButtonListeners:function(c){var e=this;var b=e.addHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler,{self:e});b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler,{self:e});b(c,d.call(e,"mousedown"),e._mouseDownHandler,{self:e});b(c,d.call(e,"mouseup"),e._mouseUpHandler,{self:e});b(a(document),d.call(e,"mouseup"),e._documentUpHandler,{self:e})},_removeButtonListeners:function(c){var e=this;var b=e.removeHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler);b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler);b(c,d.call(e,"mousedown"),e._mouseDownHandler);b(c,d.call(e,"mouseup"),e._mouseUpHandler);b(a(document),d.call(e,"mouseup"),e._documentUpHandler)},_handleSelection:function(b){var c=this;if(c.mode==="radio"){c._handleRadio(b)}else{if(c.mode==="checkbox"){c._handleCheckbox(b)}else{c._handleDefault(b)}}},_handleRadio:function(b){var d=this;var c=d._getSelectedButton();if(c&&c.btn[0].id!==b[0].id){d._unselectButton(c.btn,true)}for(var e in d._buttonId){d._buttonId[e].selected=true;d._unselectButton(d._buttonId[e].btn,false)}d._selectButton(b,true)},_handleCheckbox:function(c){var d=this;var b=d._buttonId[c[0].id];if(b.selected){d._unselectButton(b.btn,true)}else{d._selectButton(c,true)}},_handleDefault:function(b){var c=this;c._selectButton(b,false);for(var d in c._buttonId){c._buttonId[d].selected=true;c._unselectButton(c._buttonId[d].btn,false)}},_getSelectedButton:function(){var b=this;for(var c in b._buttonId){if(b._buttonId[c].selected){return b._buttonId[c]}}return null},_getSelectedButtons:function(){var c=this;var b=[];for(var d in c._buttonId){if(c._buttonId[d].selected){b.push(c._buttonId[d].num)}}return b},_getButtonByIndex:function(b){var c=this;var e;for(var d in c._buttonId){if(c._buttonId[d].num===b){return c._buttonId[d]}}return null},_selectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(b.selected){return}var f=d.toThemeProperty;b.btn.addClass(f.call(this,"jqx-group-button-pressed"));b.btn.addClass(f.call(this,"jqx-fill-state-pressed"));b.selected=true;if(e){d._raiseEvent(0,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",true)},_unselectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(!b.selected){return}var f=d.toThemeProperty;b.btn.removeClass(f.call(this,"jqx-group-button-pressed"));b.btn.removeClass(f.call(this,"jqx-fill-state-pressed"));b.selected=false;if(e){d._raiseEvent(1,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",false)},setSelection:function(b){var d=this;if(b===-1){d.clearSelection();return}if(d.mode==="checkbox"){if(typeof b==="number"){d._setSelection(b)}else{for(var c=0;c<b.length;c+=1){d._setSelection(b[c])}}}else{if(typeof b==="number"&&d.mode==="radio"){d._setSelection(b)}}},_setSelection:function(b){var d=this;var c=d._getButtonByIndex(b);if(c){d._handleSelection(c.btn)}},getSelection:function(){var b=this;if(b.mode==="radio"){if(b._getSelectedButton()){return b._getSelectedButton().num}}else{if(b.mode==="checkbox"){return b._getSelectedButtons()}}return undefined},disable:function(){var c=this;c.disabled=true;var d;for(var b in c._buttonId){d=c._buttonId[b];c.disableAt(d.num)}a.jqx.aria(c,"aria-disabled",true)},enable:function(){var c=this;c.disabled=false;var d;for(var b in c._buttonId){d=c._buttonId[b];c.enableAt(d.num)}a.jqx.aria(c,"aria-disabled",false)},disableAt:function(b){var d=this;var c=d._getButtonByIndex(b);if(!c.disabled){c.disabled=true;c.btn.addClass(d.toThemeProperty("jqx-fill-state-disabled"))}},enableAt:function(b){var d=this;var c=d._getButtonByIndex(b);if(c.disabled){c.disabled=false;c.btn.removeClass(d.toThemeProperty("jqx-fill-state-disabled"))}},_handleButtonId:function(b,d){var f=b[0].id,e={btn:b,num:d,selected:false},c;if(!f){f=this._baseId+b.index()}b[0].id=f;this._buttonId[f]=e;return f},_raiseEvent:function(d,c){var b=a.Event(this._events[d]);b.args=c;return this.host.trigger(b)},_unselectAll:function(){for(var b in this._buttonId){this._unselectButton(this._buttonId[b].btn,false)}},clearSelection:function(){this._unselectAll()},propertyChangedHandler:function(b,c,e,d){if(c==="theme"&&d!==null){a.jqx.utilities.setTheme(e,d,b.host)}if(c==="template"){b.refresh()}if(c==="mode"){b._unselectAll();b.refresh();return}else{if(c==="disabled"){if(d){b.disable()}else{b.enable()}}else{b.refresh()}}}})})(jqxBaseFramework);
 
-(function(a){a.jqx.cssroundedcorners=function(b){var c={all:"jqx-rc-all",top:"jqx-rc-t",bottom:"jqx-rc-b",left:"jqx-rc-l",right:"jqx-rc-r","top-right":"jqx-rc-tr","top-left":"jqx-rc-tl","bottom-right":"jqx-rc-br","bottom-left":"jqx-rc-bl"};for(prop in c){if(!c.hasOwnProperty(prop)){continue}if(b==prop){return c[prop]}}};a.jqx.jqxWidget("jqxButton","",{});a.extend(a.jqx._jqxButton.prototype,{defineInstance:function(){var b={type:"",cursor:"arrow",roundedCorners:"all",disabled:false,height:null,width:null,overrideTheme:false,enableHover:true,enableDefault:true,enablePressed:true,imgPosition:"center",imgSrc:"",imgWidth:16,imgHeight:16,value:null,textPosition:"",textImageRelation:"overlay",rtl:false,_ariaDisabled:false,_scrollAreaButton:false,template:"default",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButton.prototype){return b}a.extend(true,this,b);return b},_addImage:function(c){var g=this;if(g.element.nodeName.toLowerCase()=="input"||g.element.nodeName.toLowerCase()=="button"||g.element.nodeName.toLowerCase()=="div"){if(!g._img){g.field=g.element;if(g.field.className){g._className=g.field.className}var i={title:g.field.title};var j=null;if(g.field.getAttribute("value")){var j=g.field.getAttribute("value")}else{if(g.element.nodeName.toLowerCase()!="input"){var j=g.element.innerHTML}}if(g.value){j=g.value}if(g.field.id.length){i.id=g.field.id.replace(/[^\w]/g,"_")+"_"+c}else{i.id=a.jqx.utilities.createId()+"_"+c}var b=document.createElement("div");b.id=i.id;b.title=i.title;b.style.cssText=g.field.style.cssText;b.style.boxSizing="border-box";var f=document.createElement("img");f.setAttribute("src",g.imgSrc);f.setAttribute("width",g.imgWidth);f.setAttribute("height",g.imgHeight);b.appendChild(f);g._img=f;var l=document.createElement("span");if(j){l.innerHTML=j;g.value=j}b.appendChild(l);g._text=l;g.field.style.display="none";if(g.field.parentNode){g.field.parentNode.insertBefore(b,g.field.nextSibling)}var e=g.host.data();g.host=a(b);g.host.data(e);g.element=b;g.element.id=g.field.id;g.field.id=i.id;var k=new a(g.element);var h=new a(g.field);if(g._className){k.addClass(g._className);h.removeClass(g._className)}if(g.field.tabIndex){var d=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=d}}else{g._img.setAttribute("src",g.imgSrc);g._img.setAttribute("width",g.imgWidth);g._img.setAttribute("height",g.imgHeight);g._text.innerHTML=g.value}if(!g.imgSrc){g._img.style.display="none"}else{g._img.style.display="inline"}if(!g.value){g._text.style.display="none"}else{g._text.style.display="inline"}g._positionTextAndImage()}},_positionTextAndImage:function(){var k=this;var r=k.element.offsetWidth;var q=k.element.offsetHeight;var m=k.imgWidth;var v=k.imgHeight;if(k.imgSrc==""){m=0;v=0}var f=k._text.offsetWidth;var b=k._text.offsetHeight;var i=4;var c=4;var l=4;var n=0;var u=0;switch(k.textImageRelation){case"imageBeforeText":case"textBeforeImage":n=m+f+2*l+i+2*c;u=Math.max(v,b)+2*l+i+2*c;break;case"imageAboveText":case"textAboveImage":n=Math.max(m,f)+2*l;u=v+b+i+2*l+2*c;break;case"overlay":n=Math.max(m,f)+2*l;u=Math.max(v,b)+2*l;break}if(!k.width){k.element.style.width=n+"px";r=n}if(!k.height){k.element.style.height=u+"px";q=u}k._img.style.position="absolute";k._text.style.position="absolute";k.element.style.position="relative";k.element.style.overflow="hidden";var e={};var z={};var s=function(E,D,G,C,F){if(D.width<C){D.width=C}if(D.height<F){D.height=F}switch(G){case"left":E.style.left=D.left+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"topLeft":E.style.left=D.left+"px";E.style.top=D.top+"px";break;case"bottomLeft":E.style.left=D.left+"px";E.style.top=D.top+D.height-F+"px";break;default:case"center":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"top":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+"px";break;case"bottom":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+D.height-F+"px";break;case"right":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"topRight":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+"px";break;case"bottomRight":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+D.height-F+"px";break}};var g=0;var p=0;var x=r;var j=q;var A=(x-g)/2;var y=(j-p)/2;var B=k._img;var o=k._text;var t=j-p;var d=x-g;g+=c;p+=c;x=x-c-2;d=d-2*c-2;t=t-2*c-2;switch(k.textImageRelation){case"imageBeforeText":switch(k.imgPosition){case"left":case"topLeft":case"bottomLeft":z={left:g,top:p,width:g+m,height:t};e={left:g+m+i,top:p,width:d-m-i,height:t};break;case"center":case"top":case"bottom":z={left:A-f/2-m/2-i/2,top:p,width:m,height:t};e={left:z.left+m+i,top:p,width:x-z.left-m-i,height:t};break;case"right":case"topRight":case"bottomRight":z={left:x-f-m-i,top:p,width:m,height:t};e={left:z.left+m+i,top:p,width:x-z.left-m-i,height:t};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"textBeforeImage":switch(k.textPosition){case"left":case"topLeft":case"bottomLeft":e={left:g,top:p,width:g+f,height:t};z={left:g+f+i,top:p,width:d-f-i,height:t};break;case"center":case"top":case"bottom":e={left:A-f/2-m/2-i/2,top:p,width:f,height:t};z={left:e.left+f+i,top:p,width:x-e.left-f-i,height:t};break;case"right":case"topRight":case"bottomRight":e={left:x-f-m-i,top:p,width:f,height:t};z={left:e.left+f+i,top:p,width:x-e.left-f-i,height:t};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"imageAboveText":switch(k.imgPosition){case"topRight":case"top":case"topLeft":z={left:g,top:p,width:d,height:v};e={left:g,top:p+v+i,width:d,height:t-v-i};break;case"left":case"center":case"right":z={left:g,top:y-v/2-b/2-i/2,width:d,height:v};e={left:g,top:z.top+i+v,width:d,height:t-z.top-i-v};break;case"bottomLeft":case"bottom":case"bottomRight":z={left:g,top:j-v-b-i,width:d,height:v};e={left:g,top:z.top+i+v,width:d,height:b};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"textAboveImage":switch(k.textPosition){case"topRight":case"top":case"topLeft":e={left:g,top:p,width:d,height:b};z={left:g,top:p+b+i,width:d,height:t-b-i};break;case"left":case"center":case"right":e={left:g,top:y-v/2-b/2-i/2,width:d,height:b};z={left:g,top:e.top+i+b,width:d,height:t-e.top-i-b};break;case"bottomLeft":case"bottom":case"bottomRight":e={left:g,top:j-v-b-i,width:d,height:b};z={left:g,top:e.top+i+b,width:d,height:v};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"overlay":default:e={left:g,top:p,width:d,height:t};z={left:g,top:p,width:d,height:t};s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break}},createInstance:function(d){var f=this;f._setSize();var b=f.isMaterialized();f.buttonObj=new a(f.element);if(f.imgSrc!=""||f.textPosition!=""||(f.element.value&&f.element.value.indexOf("<")>=0)||f.value!=null){f.refresh();f._addImage("jqxButton");f.buttonObj=new a(f.element)}if(!f._ariaDisabled){f.element.setAttribute("role","button")}if(f.type!==""){f.element.setAttribute("type",f.type)}if(!f.overrideTheme){f.buttonObj.addClass(f.toThemeProperty(a.jqx.cssroundedcorners(f.roundedCorners)));if(f.enableDefault){f.buttonObj.addClass(f.toThemeProperty("jqx-button"))}f.buttonObj.addClass(f.toThemeProperty("jqx-widget"))}f.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!f._ariaDisabled){a.jqx.aria(this)}if(f.cursor!="arrow"){if(!f.disabled){f.element.style.cursor=f.cursor}else{f.element.style.cursor="arrow"}}var h="mouseenter mouseleave mousedown focus blur";if(f._scrollAreaButton){var h="mousedown"}if(f.isTouchDevice){f.addHandler(f.host,a.jqx.mobile.getTouchEventName("touchstart"),function(i){f.isPressed=true;f.refresh()});f.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+f.element.id,function(i){f.isPressed=false;f.refresh()})}f.addHandler(f.host,h,function(i){switch(i.type){case"mouseenter":if(!f.isTouchDevice){if(!f.disabled&&f.enableHover){f.isMouseOver=true;f.refresh()}}break;case"mouseleave":if(!f.isTouchDevice){if(!f.disabled&&f.enableHover){f.isMouseOver=false;f.refresh()}}break;case"mousedown":if(!f.disabled){f.isPressed=true;f.refresh()}break;case"focus":if(!f.disabled){f.isFocused=true;f.refresh()}break;case"blur":if(!f.disabled){f.isFocused=false;f.refresh()}break}});f.mouseupfunc=function(i){if(!f.disabled){if(f.isPressed||f.isMouseOver){f.isPressed=false;f.refresh()}}};f.addHandler(document,"mouseup.button"+f.element.id,f.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.that){var g="";if(window.parent&&document.referrer){g=document.referrer}if(g.indexOf(document.location.host)!=-1){var e=function(i){f.isPressed=false;f.refresh()};if(window.top.document){f.addHandler(a(window.top.document),"mouseup",e)}}}}}catch(c){}f.propertyChangeMap.roundedCorners=function(i,k,j,l){i.buttonObj.removeClass(i.toThemeProperty(a.jqx.cssroundedcorners(j)));i.buttonObj.addClass(i.toThemeProperty(a.jqx.cssroundedcorners(l)))};f.propertyChangeMap.disabled=function(i,k,j,l){if(j!=l){i.refresh();i.element.setAttribute("disabled",l);i.element.disabled=l;if(!l){i.element.style.cursor=i.cursor}else{i.element.style.cursor="default"}a.jqx.aria(i,"aria-disabled",i.disabled)}};f.propertyChangeMap.rtl=function(i,k,j,l){if(j!=l){i.refresh()}};f.propertyChangeMap.template=function(i,k,j,l){if(j!=l){i.buttonObj.removeClass(i.toThemeProperty("jqx-"+j));i.refresh()}};f.propertyChangeMap.theme=function(i,k,j,l){i.buttonObj.removeClass(i.element);if(i.enableDefault){i.buttonObj.addClass(i.toThemeProperty("jqx-button"))}i.buttonObj.addClass(i.toThemeProperty("jqx-widget"));if(!i.overrideTheme){i.buttonObj.addClass(i.toThemeProperty(a.jqx.cssroundedcorners(i.roundedCorners)))}i._oldCSSCurrent=null;i.refresh()};if(f.disabled){f.element.disabled=true;f.element.setAttribute("disabled","true")}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(){var c=this;var b=c.host.find("input");if(b.length>0){if(arguments.length==0||typeof(value)=="object"){return b.val()}b.val(value);c.refresh();return b.val()}if(arguments.length==0||typeof(value)=="object"){if(c.element.nodeName.toLowerCase()=="button"){return a(c.element).text()}return c.element.value}if(arguments.length>0&&c._text){c._text.innerHTML=arguments[0];c.refresh();return}else{if(arguments.length>0&&c.element.nodeName==="DIV"){c.element.innerHTML=arguments[0];c.refresh()}}c.element.value=arguments[0];if(c.element.nodeName.toLowerCase()=="button"){a(c.element).html(arguments[0])}c.refresh()},_setSize:function(){var d=this;var b=d.height;var c=d.width;if(b){if(!isNaN(b)){b=b+"px"}d.element.style.height=b}if(c){if(!isNaN(c)){c=c+"px"}d.element.style.width=c}},_removeHandlers:function(){var b=this;b.removeHandler(b.host,"selectstart");b.removeHandler(b.host,"click");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(b.host,"mouseenter");b.removeHandler(b.host,"mouseleave");b.removeHandler(b.host,"mousedown");b.removeHandler(a(document),"mouseup.button"+b.element.id,b.mouseupfunc);if(b.isTouchDevice){b.removeHandler(b.host,a.jqx.mobile.getTouchEventName("touchstart"));b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+b.element.id)}b.mouseupfunc=null;delete b.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){var b=this;b._removeHandlers();var c=a.data(b.element,"jqxButton");if(c){delete c.instance}b.host.removeClass();b.host.removeData();b.host.remove();delete b.set;delete b.get;delete b.call;delete b.element;delete b.host},render:function(){this.refresh()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._setSize();d.refresh()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d==e){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c==="type"){b.element.setAttribute("type",d)}if(c=="textImageRelation"||c=="textPosition"||c=="imgPosition"){if(b._img){b._positionTextAndImage()}else{b._addImage("jqxButton")}}if(c=="imgSrc"||c=="imgWidth"||c=="imgHeight"){b._addImage("jqxButton")}if(c==="value"){b.val(d)}if(c=="width"||c=="height"){b._setSize();b.refresh()}},refresh:function(){var c=this;if(c.overrideTheme){return}var e=c.toThemeProperty("jqx-fill-state-focus");var i=c.toThemeProperty("jqx-fill-state-disabled");var b=c.toThemeProperty("jqx-fill-state-normal");if(!c.enableDefault){b=""}var h=c.toThemeProperty("jqx-fill-state-hover");var f=c.toThemeProperty("jqx-fill-state-pressed");var g=c.toThemeProperty("jqx-fill-state-pressed");if(!c.enablePressed){f=""}var d="";if(!c.host){return}c.element.disabled=c.disabled;if(c.disabled){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}d=b+" "+i;if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}c.buttonObj.addClass(d);c._oldCSSCurrent=d;return}else{if(c.isMouseOver&&!c.isTouchDevice){if(c.isPressed){d=g}else{d=h}}else{if(c.isPressed){d=f}else{d=b}}}if(c.isFocused){d+=" "+e}if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}if(d!=c._oldCSSCurrent){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}c.buttonObj.addClass(d);c._oldCSSCurrent=d}if(c.rtl){c.buttonObj.addClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="rtl"}if(c.isMaterialized()){c.host.addClass("buttonRipple")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(c){var f=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.element.offsetHeight;var d=this.width||this.element.offsetWidth;this.href=this.element.getAttribute("href");this.target=this.element.getAttribute("target");this.content=this.host.text();this.element.innerHTML="";var g=document.createElement("input");g.type="button";g.className="jqx-wrapper "+this.toThemeProperty("jqx-reset");this._setSize(g,d,b);g.value=this.content;var e=new a(this.element);e.addClass(this.toThemeProperty("jqx-link"));this.element.style.color="inherit";this.element.appendChild(g);this._setSize(g,d,b);var h=c==undefined?{}:c[0]||{};a(g).jqxButton(h);this.wrapElement=g;if(this.disabled){this.element.disabled=true}this.propertyChangeMap.disabled=function(i,k,j,l){i.element.disabled=l;i.wrapElement.jqxButton({disabled:l})};this.addHandler(a(g),"click",function(i){if(!this.disabled){f.onclick(i)}return false})},_setSize:function(c,d,b){var e=this;if(b){if(!isNaN(b)){b=b+"px"}c.style.height=b}if(d){if(!isNaN(d)){d=d+"px"}c.style.width=d}},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var e=this;var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(e.timeout!=null){clearTimeout(e.timeout);e.timeout=null;e.refresh()}if(e.timer!=undefined){clearInterval(e.timer);e.timer=null;e.refresh()}});this.addHandler(this.base.host,f,function(g){if(e.timer!=null){clearInterval(e.timer)}e.timeout=setTimeout(function(){clearInterval(e.timer);e.timer=setInterval(function(h){e.ontimer(h)},e.delay)},150)});this.mousemovefunc=function(g){if(!c){if(g.which==0){if(e.timer!=null){clearInterval(e.timer);e.timer=null}}}};this.addHandler(this.base.host,"mousemove",this.mousemovefunc)},destroy:function(){var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var e=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.removeHandler(this.base.host,"mousemove",this.mousemovefunc);this.removeHandler(this.base.host,e);this.removeHandler(a(document),b);this.timer=null;delete this.mousemovefunc;delete this.timer;var d=a.data(this.base.element,"jqxRepeatButton");if(d){delete d.instance}a(this.base.element).removeData();this.base.destroy();delete this.base},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new a.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false;this.uiToggle=true;this.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(b){var c=this;c.base.overrideTheme=true;c.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);c.propertyChangeMap.roundedCorners=function(d,f,e,g){d.base.buttonObj.removeClass(d.toThemeProperty(a.jqx.cssroundedcorners(e)));d.base.buttonObj.addClass(d.toThemeProperty(a.jqx.cssroundedcorners(g)))};c.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};c.propertyChangeMap.disabled=function(d,f,e,g){d.base.disabled=g;d.refresh()};c.addHandler(c.base.host,"click",function(d){if(!c.base.disabled&&c.uiToggle){c.toggle()}});if(!c.isTouchDevice){c.addHandler(c.base.host,"mouseenter",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(c.base.host,"mouseleave",function(d){if(!c.base.disabled){c.refresh()}})}c.addHandler(c.base.host,"mousedown",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(a(document),"mouseup.togglebutton"+c.base.element.id,function(d){if(!c.base.disabled){c.refresh()}})},destroy:function(){this._removeHandlers();this.base.destroy()},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup.togglebutton"+this.base.element.id)},toggle:function(){this.toggled=!this.toggled;this.refresh();a.jqx.aria(this,"aria-checked",this.toggled)},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var c=this;var h=c.base.toThemeProperty("jqx-fill-state-disabled");var b=c.base.toThemeProperty("jqx-fill-state-normal");if(!c.base.enableDefault){b=""}var g=c.base.toThemeProperty("jqx-fill-state-hover");var e=c.base.toThemeProperty("jqx-fill-state-pressed");var f=c.base.toThemeProperty("jqx-fill-state-pressed");var d="";c.base.element.disabled=c.base.disabled;if(c.base.disabled){d=b+" "+h;c.base.buttonObj.addClass(d);return}else{if(c.base.isMouseOver&&!c.isTouchDevice){if(c.base.isPressed||c.toggled){d=f}else{d=g}}else{if(c.base.isPressed||c.toggled){d=e}else{d=b}}}if(c.base.template!=="default"&&c.base.template!==""){d+=" jqx-"+c.base.template;if(c.base.theme!=""){d+=" jqx-"+c.template+"-"+c.base.theme}}if(c.base.buttonObj.hasClass(h)&&h!=d){c.base.buttonObj.removeClass(h)}if(c.base.buttonObj.hasClass(b)&&b!=d){c.base.buttonObj.removeClass(b)}if(c.base.buttonObj.hasClass(g)&&g!=d){c.base.buttonObj.removeClass(g)}if(c.base.buttonObj.hasClass(e)&&e!=d){c.base.buttonObj.removeClass(e)}if(c.base.buttonObj.hasClass(f)&&f!=d){c.base.buttonObj.removeClass(f)}if(!c.base.buttonObj.hasClass(d)){c.base.buttonObj.addClass(d)}}})})(jqxBaseFramework);
+(function(a){a.jqx.cssroundedcorners=function(b){var c={all:"jqx-rc-all",top:"jqx-rc-t",bottom:"jqx-rc-b",left:"jqx-rc-l",right:"jqx-rc-r","top-right":"jqx-rc-tr","top-left":"jqx-rc-tl","bottom-right":"jqx-rc-br","bottom-left":"jqx-rc-bl"};for(prop in c){if(!c.hasOwnProperty(prop)){continue}if(b==prop){return c[prop]}}};a.jqx.jqxWidget("jqxButton","",{});a.extend(a.jqx._jqxButton.prototype,{defineInstance:function(){var b={type:"",cursor:"arrow",roundedCorners:"all",disabled:false,height:null,width:null,overrideTheme:false,enableHover:true,enableDefault:true,enablePressed:true,imgPosition:"center",imgSrc:"",imgWidth:16,imgHeight:16,value:null,textPosition:"",textImageRelation:"overlay",rtl:false,_ariaDisabled:false,_scrollAreaButton:false,template:"default",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButton.prototype){return b}a.extend(true,this,b);return b},_addImage:function(c){var g=this;if(g.element.nodeName.toLowerCase()=="input"||g.element.nodeName.toLowerCase()=="button"||g.element.nodeName.toLowerCase()=="div"){if(!g._img){g.field=g.element;if(g.field.className){g._className=g.field.className}var i={title:g.field.title};var j=null;if(g.field.getAttribute("value")){var j=g.field.getAttribute("value")}else{if(g.element.nodeName.toLowerCase()!="input"){var j=g.element.innerHTML}}if(g.value){j=g.value}if(g.field.id.length){i.id=g.field.id.replace(/[^\w]/g,"_")+"_"+c}else{i.id=a.jqx.utilities.createId()+"_"+c}var b=document.createElement("div");b.id=i.id;b.title=i.title;b.style.cssText=g.field.style.cssText;b.style.boxSizing="border-box";var f=document.createElement("img");f.setAttribute("src",g.imgSrc);f.setAttribute("width",g.imgWidth);f.setAttribute("height",g.imgHeight);b.appendChild(f);g._img=f;var l=document.createElement("span");if(j){l.innerHTML=j;g.value=j}b.appendChild(l);g._text=l;g.field.style.display="none";if(g.field.parentNode){g.field.parentNode.insertBefore(b,g.field.nextSibling)}var e=g.host.data();g.host=a(b);g.host.data(e);g.element=b;g.element.id=g.field.id;g.field.id=i.id;var k=new a(g.element);var h=new a(g.field);if(g._className){k.addClass(g._className);h.removeClass(g._className)}if(g.field.tabIndex){var d=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=d}}else{g._img.setAttribute("src",g.imgSrc);g._img.setAttribute("width",g.imgWidth);g._img.setAttribute("height",g.imgHeight);g._text.innerHTML=g.value}if(!g.imgSrc){g._img.style.display="none"}else{g._img.style.display="inline"}if(!g.value){g._text.style.display="none"}else{g._text.style.display="inline"}g._positionTextAndImage()}},_positionTextAndImage:function(){var k=this;var r=k.element.offsetWidth;var q=k.element.offsetHeight;var m=k.imgWidth;var v=k.imgHeight;if(k.imgSrc==""){m=0;v=0}var f=k._text.offsetWidth;var b=k._text.offsetHeight;var i=4;var c=4;var l=4;var n=0;var u=0;switch(k.textImageRelation){case"imageBeforeText":case"textBeforeImage":n=m+f+2*l+i+2*c;u=Math.max(v,b)+2*l+i+2*c;break;case"imageAboveText":case"textAboveImage":n=Math.max(m,f)+2*l;u=v+b+i+2*l+2*c;break;case"overlay":n=Math.max(m,f)+2*l;u=Math.max(v,b)+2*l;break}if(!k.width){k.element.style.width=n+"px";r=n}if(!k.height){k.element.style.height=u+"px";q=u}k._img.style.position="absolute";k._text.style.position="absolute";k.element.style.position="relative";k.element.style.overflow="hidden";var e={};var z={};var s=function(E,D,G,C,F){if(D.width<C){D.width=C}if(D.height<F){D.height=F}switch(G){case"left":E.style.left=D.left+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"topLeft":E.style.left=D.left+"px";E.style.top=D.top+"px";break;case"bottomLeft":E.style.left=D.left+"px";E.style.top=D.top+D.height-F+"px";break;default:case"center":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"top":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+"px";break;case"bottom":E.style.left=D.left+D.width/2-C/2+"px";E.style.top=D.top+D.height-F+"px";break;case"right":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+D.height/2-F/2+"px";break;case"topRight":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+"px";break;case"bottomRight":E.style.left=D.left+D.width-C+"px";E.style.top=D.top+D.height-F+"px";break}};var g=0;var p=0;var x=r;var j=q;var A=(x-g)/2;var y=(j-p)/2;var B=k._img;var o=k._text;var t=j-p;var d=x-g;g+=c;p+=c;x=x-c-2;d=d-2*c-2;t=t-2*c-2;switch(k.textImageRelation){case"imageBeforeText":switch(k.imgPosition){case"left":case"topLeft":case"bottomLeft":z={left:g,top:p,width:g+m,height:t};e={left:g+m+i,top:p,width:d-m-i,height:t};break;case"center":case"top":case"bottom":z={left:A-f/2-m/2-i/2,top:p,width:m,height:t};e={left:z.left+m+i,top:p,width:x-z.left-m-i,height:t};break;case"right":case"topRight":case"bottomRight":z={left:x-f-m-i,top:p,width:m,height:t};e={left:z.left+m+i,top:p,width:x-z.left-m-i,height:t};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"textBeforeImage":switch(k.textPosition){case"left":case"topLeft":case"bottomLeft":e={left:g,top:p,width:g+f,height:t};z={left:g+f+i,top:p,width:d-f-i,height:t};break;case"center":case"top":case"bottom":e={left:A-f/2-m/2-i/2,top:p,width:f,height:t};z={left:e.left+f+i,top:p,width:x-e.left-f-i,height:t};break;case"right":case"topRight":case"bottomRight":e={left:x-f-m-i,top:p,width:f,height:t};z={left:e.left+f+i,top:p,width:x-e.left-f-i,height:t};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"imageAboveText":switch(k.imgPosition){case"topRight":case"top":case"topLeft":z={left:g,top:p,width:d,height:v};e={left:g,top:p+v+i,width:d,height:t-v-i};break;case"left":case"center":case"right":z={left:g,top:y-v/2-b/2-i/2,width:d,height:v};e={left:g,top:z.top+i+v,width:d,height:t-z.top-i-v};break;case"bottomLeft":case"bottom":case"bottomRight":z={left:g,top:j-v-b-i,width:d,height:v};e={left:g,top:z.top+i+v,width:d,height:b};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"textAboveImage":switch(k.textPosition){case"topRight":case"top":case"topLeft":e={left:g,top:p,width:d,height:b};z={left:g,top:p+b+i,width:d,height:t-b-i};break;case"left":case"center":case"right":e={left:g,top:y-v/2-b/2-i/2,width:d,height:b};z={left:g,top:e.top+i+b,width:d,height:t-e.top-i-b};break;case"bottomLeft":case"bottom":case"bottomRight":e={left:g,top:j-v-b-i,width:d,height:b};z={left:g,top:e.top+i+b,width:d,height:v};break}s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break;case"overlay":default:e={left:g,top:p,width:d,height:t};z={left:g,top:p,width:d,height:t};s(B,z,k.imgPosition,m,v);s(o,e,k.textPosition,f,b);break}},createInstance:function(d){var e=this;e._setSize();var b=e.isMaterialized();e.buttonObj=new a(e.element);if(e.imgSrc!=""||e.textPosition!=""||(e.element.value&&e.element.value.indexOf("<")>=0)||e.value!=null){e.refresh();e._addImage("jqxButton");e.buttonObj=new a(e.element)}if(!e._ariaDisabled){e.element.setAttribute("role","button")}if(e.type!==""){e.element.setAttribute("type",e.type)}if(!e.overrideTheme){e.buttonObj.addClass(e.toThemeProperty(a.jqx.cssroundedcorners(e.roundedCorners)));if(e.enableDefault){e.buttonObj.addClass(e.toThemeProperty("jqx-button"))}e.buttonObj.addClass(e.toThemeProperty("jqx-widget"))}e.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!e._ariaDisabled){a.jqx.aria(this)}if(e.cursor!="arrow"){if(!e.disabled){e.element.style.cursor=e.cursor}else{e.element.style.cursor="arrow"}}var g="mouseenter mouseleave mousedown focus blur";if(e._scrollAreaButton){var g="mousedown"}if(e.isTouchDevice){e.addHandler(e.host,a.jqx.mobile.getTouchEventName("touchstart"),function(h){e.isPressed=true;e.refresh()});e.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+e.element.id,function(h){e.isPressed=false;e.refresh()})}e.addHandler(e.host,g,function(h){switch(h.type){case"mouseenter":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=true;e.refresh()}}break;case"mouseleave":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=false;e.refresh()}}break;case"mousedown":if(!e.disabled){e.isPressed=true;e.refresh()}break;case"focus":if(!e.disabled){e.isFocused=true;e.refresh()}break;case"blur":if(!e.disabled){e.isFocused=false;e.refresh()}break}});e.mouseupfunc=function(h){if(!e.disabled){if(e.isPressed||e.isMouseOver){e.isPressed=false;e.refresh()}}};e.addHandler(document,"mouseup.button"+e.element.id,e.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.that){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){if(window.top.document){window.top.document.addEventListener("mouseup",e._topDocumentMouseupHandler)}}}}}catch(c){}e.propertyChangeMap.roundedCorners=function(h,j,i,k){h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(i)));h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(k)))};e.propertyChangeMap.disabled=function(h,j,i,k){if(i!=k){h.refresh();h.element.setAttribute("disabled",k);h.element.disabled=k;if(!k){h.element.style.cursor=h.cursor}else{h.element.style.cursor="default"}a.jqx.aria(h,"aria-disabled",h.disabled)}};e.propertyChangeMap.rtl=function(h,j,i,k){if(i!=k){h.refresh()}};e.propertyChangeMap.template=function(h,j,i,k){if(i!=k){h.buttonObj.removeClass(h.toThemeProperty("jqx-"+i));h.refresh()}};e.propertyChangeMap.theme=function(h,j,i,k){h.buttonObj.removeClass(h.element);if(i){h.buttonObj.removeClass("jqx-button-"+i);h.buttonObj.removeClass("jqx-widget-"+i);h.buttonObj.removeClass("jqx-fill-state-normal-"+i);h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners))+"-"+i)}if(h.enableDefault){h.buttonObj.addClass(h.toThemeProperty("jqx-button"))}h.buttonObj.addClass(h.toThemeProperty("jqx-widget"));if(!h.overrideTheme){h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners)))}h._oldCSSCurrent=null;h.refresh()};if(e.disabled){e.element.disabled=true;e.element.setAttribute("disabled","true")}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(d){var c=this;var b=c.host.find("input");if(b.length>0){if(arguments.length==0||typeof(d)=="object"){return b.val()}b.val(d);c.refresh();return b.val()}if(arguments.length==0||typeof(d)=="object"){if(c.element.nodeName.toLowerCase()=="button"){return a(c.element).text()}return c.element.value}if(arguments.length>0&&c._text){c._text.innerHTML=arguments[0];c.refresh();return}else{if(arguments.length>0&&c.element.nodeName==="DIV"){c.element.innerHTML=arguments[0];c.refresh()}}c.element.value=arguments[0];if(c.element.nodeName.toLowerCase()=="button"){a(c.element).html(arguments[0])}c.refresh()},_setSize:function(){var d=this;var b=d.height;var c=d.width;if(b){if(!isNaN(b)){b=b+"px"}d.element.style.height=b}if(c){if(!isNaN(c)){c=c+"px"}d.element.style.width=c}},_removeHandlers:function(){var b=this;b.removeHandler(b.host,"selectstart");b.removeHandler(b.host,"click");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(b.host,"mouseenter");b.removeHandler(b.host,"mouseleave");b.removeHandler(b.host,"mousedown");b.removeHandler(a(document),"mouseup.button"+b.element.id,b.mouseupfunc);window.top.document.removeEventListener("mouseup",b._topDocumentMouseupHandler);if(b.isTouchDevice){b.removeHandler(b.host,a.jqx.mobile.getTouchEventName("touchstart"));b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+b.element.id)}b.mouseupfunc=null;delete b.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){var b=this;b._removeHandlers();var c=a.data(b.element,"jqxButton");if(c){delete c.instance}b.host.removeClass();b.host.removeData();b.host.remove();delete b.set;delete b.get;delete b.call;delete b.element;delete b.host},render:function(){this.refresh()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._setSize();d.refresh()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d==e){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c==="type"){b.element.setAttribute("type",d)}if(c=="textImageRelation"||c=="textPosition"||c=="imgPosition"){if(b._img){b._positionTextAndImage()}else{b._addImage("jqxButton")}}if(c=="imgSrc"||c=="imgWidth"||c=="imgHeight"){b._addImage("jqxButton")}if(c==="value"){b.val(d)}if(c=="width"||c=="height"){b._setSize();b.refresh()}},refresh:function(){var c=this;if(c.overrideTheme){return}var e=c.toThemeProperty("jqx-fill-state-focus");var i=c.toThemeProperty("jqx-fill-state-disabled");var b=c.toThemeProperty("jqx-fill-state-normal");if(!c.enableDefault){b=""}var h=c.toThemeProperty("jqx-fill-state-hover");var f=c.toThemeProperty("jqx-fill-state-pressed");var g=c.toThemeProperty("jqx-fill-state-pressed");if(!c.enablePressed){f=""}var d="";if(!c.host){return}c.element.disabled=c.disabled;if(c.disabled){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}d=b+" "+i;if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}c.buttonObj.addClass(d);c._oldCSSCurrent=d;return}else{if(c.isMouseOver&&!c.isTouchDevice){if(c.isPressed){d=g}else{d=h}}else{if(c.isPressed){d=f}else{d=b}}}if(c.isFocused){d+=" "+e}if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}if(d!=c._oldCSSCurrent){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}c.buttonObj.addClass(d);c._oldCSSCurrent=d}if(c.rtl){c.buttonObj.addClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="rtl"}if(c.isMaterialized()){c.host.addClass("buttonRipple")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(c){var f=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.element.offsetHeight;var d=this.width||this.element.offsetWidth;this.href=this.element.getAttribute("href");this.target=this.element.getAttribute("target");this.content=this.host.text();this.element.innerHTML="";var g=document.createElement("input");g.type="button";g.className="jqx-wrapper "+this.toThemeProperty("jqx-reset");this._setSize(g,d,b);g.value=this.content;var e=new a(this.element);e.addClass(this.toThemeProperty("jqx-link"));this.element.style.color="inherit";this.element.appendChild(g);this._setSize(g,d,b);var h=c==undefined?{}:c[0]||{};a(g).jqxButton(h);this.wrapElement=g;if(this.disabled){this.element.disabled=true}this.propertyChangeMap.disabled=function(i,k,j,l){i.element.disabled=l;i.wrapElement.jqxButton({disabled:l})};this.addHandler(a(g),"click",function(i){if(!this.disabled){f.onclick(i)}return false})},_setSize:function(c,d,b){var e=this;if(b){if(!isNaN(b)){b=b+"px"}c.style.height=b}if(d){if(!isNaN(d)){d=d+"px"}c.style.width=d}},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var e=this;var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(e.timeout!=null){clearTimeout(e.timeout);e.timeout=null;e.refresh()}if(e.timer!=undefined){clearInterval(e.timer);e.timer=null;e.refresh()}});this.addHandler(this.base.host,f,function(g){if(e.timer!=null){clearInterval(e.timer)}e.timeout=setTimeout(function(){clearInterval(e.timer);e.timer=setInterval(function(h){e.ontimer(h)},e.delay)},150)});this.mousemovefunc=function(g){if(!c){if(g.which==0){if(e.timer!=null){clearInterval(e.timer);e.timer=null}}}};this.addHandler(this.base.host,"mousemove",this.mousemovefunc)},destroy:function(){var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var e=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.removeHandler(this.base.host,"mousemove",this.mousemovefunc);this.removeHandler(this.base.host,e);this.removeHandler(a(document),b);this.timer=null;delete this.mousemovefunc;delete this.timer;var d=a.data(this.base.element,"jqxRepeatButton");if(d){delete d.instance}a(this.base.element).removeData();this.base.destroy();delete this.base},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new a.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false;this.uiToggle=true;this.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(b){var c=this;c.base.overrideTheme=true;c.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);c.propertyChangeMap.roundedCorners=function(d,f,e,g){d.base.buttonObj.removeClass(d.toThemeProperty(a.jqx.cssroundedcorners(e)));d.base.buttonObj.addClass(d.toThemeProperty(a.jqx.cssroundedcorners(g)))};c.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};c.propertyChangeMap.disabled=function(d,f,e,g){d.base.disabled=g;d.refresh()};c.addHandler(c.base.host,"click",function(d){if(!c.base.disabled&&c.uiToggle){c.toggle()}});if(!c.isTouchDevice){c.addHandler(c.base.host,"mouseenter",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(c.base.host,"mouseleave",function(d){if(!c.base.disabled){c.refresh()}})}c.addHandler(c.base.host,"mousedown",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(a(document),"mouseup.togglebutton"+c.base.element.id,function(d){if(!c.base.disabled){c.refresh()}})},destroy:function(){this._removeHandlers();this.base.destroy()},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup.togglebutton"+this.base.element.id)},toggle:function(){this.toggled=!this.toggled;this.refresh();a.jqx.aria(this,"aria-checked",this.toggled)},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var c=this;var h=c.base.toThemeProperty("jqx-fill-state-disabled");var b=c.base.toThemeProperty("jqx-fill-state-normal");if(!c.base.enableDefault){b=""}var g=c.base.toThemeProperty("jqx-fill-state-hover");var e=c.base.toThemeProperty("jqx-fill-state-pressed");var f=c.base.toThemeProperty("jqx-fill-state-pressed");var d="";c.base.element.disabled=c.base.disabled;if(c.base.disabled){d=b+" "+h;c.base.buttonObj.addClass(d);return}else{if(c.base.isMouseOver&&!c.isTouchDevice){if(c.base.isPressed||c.toggled){d=f}else{d=g}}else{if(c.base.isPressed||c.toggled){d=e}else{d=b}}}if(c.base.template!=="default"&&c.base.template!==""){d+=" jqx-"+c.base.template;if(c.base.theme!=""){d+=" jqx-"+c.template+"-"+c.base.theme}}if(c.base.buttonObj.hasClass(h)&&h!=d){c.base.buttonObj.removeClass(h)}if(c.base.buttonObj.hasClass(b)&&b!=d){c.base.buttonObj.removeClass(b)}if(c.base.buttonObj.hasClass(g)&&g!=d){c.base.buttonObj.removeClass(g)}if(c.base.buttonObj.hasClass(e)&&e!=d){c.base.buttonObj.removeClass(e)}if(c.base.buttonObj.hasClass(f)&&f!=d){c.base.buttonObj.removeClass(f)}if(!c.base.buttonObj.hasClass(d)){c.base.buttonObj.addClass(d)}},_topDocumentMouseupHandler:function(b){that.isPressed=false;that.refresh()}})})(jqxBaseFramework);
 
 (function(a){a.jqx.jqxWidget("jqxCalendar","",{});a.extend(a.jqx._jqxCalendar.prototype,{defineInstance:function(){var b={disabled:false,restrictedDates:new Array(),multipleMonthRows:1,multipleMonthColumns:1,minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),navigationDelay:400,stepMonths:1,width:null,height:null,value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),firstDayOfWeek:0,showWeekNumbers:false,showDayNames:true,enableWeekend:false,enableOtherMonthDays:true,showOtherMonthDays:true,rowHeaderWidth:25,columnHeaderHeight:25,titleHeight:30,dayNameFormat:"firstTwoLetters",monthNameFormat:"default",titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],enableViews:true,readOnly:false,culture:"default",enableFastNavigation:true,enableHover:true,enableAutoNavigation:true,enableTooltips:false,backText:"Back",forwardText:"Forward",specialDates:new Array(),keyboardNavigation:true,selectionMode:"default",selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],todayString:"Today",clearString:"Clear",showFooter:false,selection:{from:null,to:null},canRender:true,_checkForHiddenParent:true,height:null,rtl:false,view:"month",views:["month","year","decade"],changing:null,change:null,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["backButtonClick","nextButtonClick","valuechanged","cellMouseDown","cellMouseUp","cellSelected","cellUnselected","change","viewChange"]};if(this===a.jqx._jqxCalendar.prototype){return b}a.extend(true,this,b);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(0);this.minDate._setMinutes(0);this.minDate._setSeconds(0);this.minDate._setMilliseconds(0);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(0);this.maxDate._setMinutes(0);this.maxDate._setSeconds(0);this.maxDate._setMilliseconds(0);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);return b},_createFromInput:function(d){var g=this;if(g.element.nodeName.toLowerCase()=="input"){g.field=g.element;if(g.field.className){g._className=g.field.className}var f={title:g.field.title};if(g.field.value){f.value=g.field.value}if(g.field.checked){f.checked=true}if(g.field.id.length){f.id=g.field.id.replace(/[^\w]/g,"_")+"_"+d}else{f.id=a.jqx.utilities.createId()+"_"+d}if(g.field.getAttribute("min")){var e=new Date(g.field.getAttribute("min"));if(e!="Invalid Date"){g.min=e}}if(g.field.getAttribute("max")){var c=new Date(g.field.getAttribute("max"));if(c!="Invalid Date"){g.max=c}}var i=a("<div></div>",f);i[0].style.cssText=g.field.style.cssText;if(!g.width){g.width=a(g.field).width()}if(!g.height){g.height=a(g.field).outerHeight()}a(g.field).hide().after(i);var h=g.host.data();g.host=i;g.host.data(h);g.element=i[0];g.element.id=g.field.id;g.field.id=f.id;if(g._className){g.host.addClass(g._className);a(g.field).removeClass(g._className)}if(g.field.tabIndex){var b=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=b}}},createInstance:function(i){var h=this;h._createFromInput("jqxCalendar");this.setCalendarSize();if(this.element.id===""){this.element.id=a.jqx.utilities.createId()}if(a.type(this.value)=="date"){this.value=a.jqx._jqxDateTimeInput.getDateTime(this.value)}this.element.innerHTML="";this.host.attr("data-role","calendar");var b=this.element.id;var j=this;this.propertyChangeMap.width=function(k,m,l,n){j.setCalendarSize()};this.propertyChangeMap.height=function(k,m,l,n){j.setCalendarSize()};if(a.global){a.global.preferCulture(this.culture)}if(this.culture!="default"){if(a.global){a.global.preferCulture(this.culture);this.localization.calendar=a.global.culture.calendar}else{if(Globalize){var d=Globalize.culture(this.culture);this.localization.calendar=d.calendar}}this.firstDayOfWeek=this.localization.calendar.firstDay}if(this.localization.backString!="Back"){this.backText=this.localization.backString}if(this.localization.forwardString!="Forward"){this.forwardText=this.localization.forwardString}if(this.localization.todayString!="Today"&&this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString!="Clear"&&this.localization.clearString){this.clearString=this.localization.clearString}if(this.localization.calendar&&this.localization.calendar.firstDay!=undefined&&this.culture!="default"){this.firstDayOfWeek=this.localization.calendar.firstDay}this.setMaxDate(this.max,false);this.setMinDate(this.min,false);if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.css("outline","none");this.host.addClass(this.toThemeProperty("jqx-calendar"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this._addInput();if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1&&this.views.indexOf("month")==-1){this.view="decade"}this.addHandler(this.host,"keydown",function(l){var k=true;if(j.keyboardNavigation){if(j._handleKey!=undefined){k=j._handleKey(l);if(!k){if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}}}}return k});var e=false;var g=this;var f=false;if(j.width!=null&&j.width.toString().indexOf("%")!=-1){f=true}if(j.height!=null&&j.height.toString().indexOf("%")!=-1){f=true}a.jqx.utilities.resize(this.host,function(){var k=g.host.find("#View"+j.element.id);if(!e){e=true;g.render()}else{g.refreshTitle(k)}if(f){if(j.refreshTimer){clearTimeout(j.refreshTimer)}j.refreshTimer=setTimeout(function(){j.refreshControl()},1)}},false,this._checkForHiddenParent);var c="View";this.propertyChangeMap.disabled=function(k,m,l,n){if(n){k.host.addClass(j.toThemeProperty("jqx-fill-state-disabled"))}else{k.host.removeClass(j.toThemeProperty("jqx-fill-state-disabled"))}j.refreshControl()}},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.getDate().toString())},setCalendarSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.css("width",this.width)}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.css("height",this.height)}},_getYearAndMonthPart:function(c){if(!c){return new Date(1900,0,1)}var b=new Date(c.getFullYear(),c.getMonth(),1);return b},_handleKey:function(p){if(this.readOnly){return true}var A=p.keyCode;var y=this;var b=this._getSelectedDate();if(b==undefined){if(this.view=="month"&&(A==37||A==38||A==39||A==40)){this.selectedDate=new Date(this.value.year,this.value.month-1,1);this._selectDate(this.selectedDate,"key");b=this.selectedDate}else{return true}}if(p.altKey){return true}if(this._animating){return false}if(this.view!="month"&&A==13){var d=this._getSelectedCell();this._setDateAndSwitchViews(d,p,"keyboard")}if(this.view=="year"){var w=b.getMonth();var j=this._getYearAndMonthPart(this.getMinDate());var m=this._getYearAndMonthPart(this.getMaxDate());switch(A){case 37:if(w==0){var h=new Date(b.getFullYear()-1,11,1);if(h>=j){this.selectedDate=h;this.navigateBackward()}else{if(this.selectedDate!=j){this.selectedDate=j;this.navigateBackward()}}}else{var h=new Date(b.getFullYear(),w-1,1);if(h>=j){this._selectDate(h,"key")}}return false;case 38:var h=new Date(b.getFullYear(),w-4,1);if(h<j){h=j}if(w-4<0){this.selectedDate=h;this.navigateBackward()}else{this._selectDate(h,"key")}return false;case 40:var h=new Date(b.getFullYear(),w+4,1);if(h>m){h=m}if(w+4>11){this.selectedDate=h;this.navigateForward()}else{this._selectDate(h,"key")}return false;case 39:if(w==11){var h=new Date(b.getFullYear()+1,0,1);if(h<=m){this.selectedDate=h;this.navigateForward()}else{if(this.selectedDate!=m){this.selectedDate=m;this.navigateForward()}}}else{var h=new Date(b.getFullYear(),w+1,1);if(h<=m){this._selectDate(h,"key")}}return false}return true}if(this.view=="decade"){var o=this._renderStartDate.getFullYear();var k=this._renderEndDate.getFullYear();var n=b.getFullYear();var v=this.getMinDate().getFullYear();var c=this.getMaxDate().getFullYear();switch(A){case 37:if(n-1>=v){if(n<=o){this.selectedDate=new Date(n-1,b.getMonth(),1);this.navigateBackward()}else{this._selectDate(new Date(n-1,b.getMonth(),1),"key")}}return false;case 38:var x=n-4;if(n-4<v){x=v}if(x<o){this.selectedDate=new Date(x,b.getMonth(),1);this.navigateBackward()}else{this._selectDate(new Date(x,b.getMonth(),1),"key")}return false;case 40:var x=n+4;if(x>c){x=c}if(x>k){this.selectedDate=new Date(x,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(x,b.getMonth(),1),"key")}return false;case 39:if(n+1<=c){if(n==k){this.selectedDate=new Date(n+1,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(n+1,b.getMonth(),1),"key")}}return false}return true}var u=new a.jqx._jqxDateTimeInput.getDateTime(b);var f=this.getViewStart();var e=this.getViewEnd();var t=u;var s=a.data(this.element,"View"+this.element.id);if(s==undefined||s==null){return true}if(A==36){u._setDay(1);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}if(A==35){var r=this.value._daysInMonth(this.value.year,this.value.month);u._setDay(r);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}var g=1;if(p.ctrlKey){g=12}if(A==34){var z=this.navigateForward(g);if(z){u._addMonths(g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==33){var z=this.navigateBackward(g);if(z){u._addMonths(-g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==38){u._addDays(-7);if(u.dateTime<this.getMinDate()){return false}if(u.dateTime<f){var z=this.navigateBackward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q<s.cells.length;q++){var d=s.cells[q];var l=d.getDate();if(d.isOtherMonth&&d.isSelected&&l<=u.dateTime){this.value.day=l.getDate();this.navigateBackward();this._selectDate(u.dateTime,"key");break}}return false}else{if(A==40){u._addDays(7);if(u.dateTime>this.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q<s.cells.length;q++){var d=s.cells[q];var l=d.getDate();if(d.isOtherMonth&&d.isSelected&&l>=u.dateTime){this.value.day=l.getDate();this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}if(A==37){u._addDays(-1);if(u.dateTime<this.getMinDate()){return false}if(u.dateTime<f){var z=this.navigateBackward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q<s.cells.length;q++){var d=s.cells[q];var l=d.getDate();if(d.isOtherMonth&&d.isSelected&&l<=u.dateTime){if(u.dateTime<this.getMinDate()||u.dateTime>this.getMaxDate()){return false}if(this._isDisabled(u.dateTime)){return false}this.navigateBackward();this._selectDate(u.dateTime,"key");break}}return false}else{if(A==39){u._addDays(1);if(u.dateTime>this.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q<s.cells.length;q++){var d=s.cells[q];var l=d.getDate();if(d.isOtherMonth&&d.isSelected&&l>=u.dateTime){if(u.dateTime<this.getMinDate()||u.dateTime>this.getMaxDate()){return false}this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}return true},render:function(){if(!this.canRender){return}this.host.children().remove();var c=this._renderSingleCalendar("View"+this.element.id);var b=this;this.host.append(c)},addSpecialDate:function(b,c,d){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){var e=this.specialDates.length;this.specialDates[e]={Date:b,Class:c,Tooltip:d};this.refreshControl()}},refresh:function(c){var b=this;this.render();setTimeout(function(){b.refreshControl()})},invalidate:function(){this.refreshControl()},refreshControl:function(){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){this.refreshSingleCalendar("View"+this.element.id,null)}},getViewStart:function(){var c=this.getVisibleDate();var b=this.getFirstDayOfWeek(c);return b.dateTime},getViewEnd:function(){var c=this.getViewStart();var b=new a.jqx._jqxDateTimeInput.getDateTime(c);b._addDays(41);return b.dateTime},refreshSingleCalendar:function(e,l){if(!this.canRender){return}var j=this.host.find("#"+e);var f=this.getVisibleDate();var c=this.getFirstDayOfWeek(f);this.refreshCalendarCells(j,c,e);this.refreshTitle(j);this.refreshRowHeader(j,e);if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var b=parseInt(this.month.css("padding-top"));var g=this.host.height()-2*b;var k=g-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){k=this.month.height()-this.titleHeight}if(this.showFooter){k-=20}var d=j.find("#cellsTable"+e);var i=j.find("#calendarRowHeader"+e);d.height(k);i.height(k)},refreshRowHeader:function(s,m){if(!this.showWeekNumbers){return}var c=this.getVisibleDate();var h=this.getFirstDayOfWeek(c);var n=h.dayOfWeek;var t=this.getWeekOfYear(h);var f=new a.jqx._jqxDateTimeInput.getDateTime(new Date(h.dateTime));f._addDays(5);f.dayOfWeek=f.dateTime.getDay();var k=this.getWeekOfYear(f);var e=this.rowHeader.find("table");e.width(this.rowHeaderWidth);var g=h;var q=new Array();for(var p=0;p<6;p++){var o=t.toString();var b=new a.jqx._jqxCalendar.cell(g.dateTime);var l=p+1+this.element.id;var j=a(e[0].rows[p].cells[0]);b.element=j;b.row=p;b.column=0;var d=j.find("#headerCellContent"+l);d.addClass(this.toThemeProperty("jqx-calendar-row-cell"));d[0].innerHTML=t;q[p]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addWeeks(1)));t=this.getWeekOfYear(g)}var r=a.data(this.element,s[0].id);r.rowCells=q;this._refreshOtherMonthRows(r,m)},_refreshOtherMonthRows:function(f,e){if(this.showOtherMonthDays){return}this._displayLastRow(true,e);this._displayFirstRow(true,e);var d=false;var g=false;for(var c=0;c<f.cells.length;c++){var b=f.cells[c];if(b.isVisible&&c<7){d=true}else{if(b.isVisible&&c>=f.cells.length-7){g=true}}}if(!d){this._displayFirstRow(false,e)}if(!g){this._displayLastRow(false,e)}},_displayLastRow:function(b,c){var g=this.host.find("#"+c);var f=g.find("#calendarRowHeader"+g[0].id).find("table");var d=null;if(this.showWeekNumbers){if(f[0].cells){var d=a(f[0].rows[5])}}var e=a(g.find("#cellTable"+g[0].id)[0].rows[5]);if(b){if(this.showWeekNumbers&&d){d.css("display","table-row")}e.css("display","table-row")}else{if(this.showWeekNumbers&&d){d.css("display","none")}e.css("display","none")}},_displayFirstRow:function(b,c){var e=this.host.find("#"+c);var d=e.find("#calendarRowHeader"+e[0].id).find("table");var f=null;if(this.showWeekNumbers){if(d[0].cells){var f=a(d[0].rows[0])}}var g=a(e.find("#cellTable"+e[0].id)[0].rows[0]);if(b){if(this.showWeekNumbers&&f){f.css("display","table-row")}g.css("display","table-row")}else{if(this.showWeekNumbers&&f){f.css("display","none")}g.css("display","none")}},_renderSingleCalendar:function(q,l){if(!this.canRender){return}var n=this.host.find("#"+q.toString());if(n!=null){n.remove()}var v=a("<div id='"+q.toString()+"'></div>");var b=this.getVisibleDate();var m=this.getFirstDayOfWeek(b);var e=new a.jqx._jqxDateTimeInput.getDateTime(m.dateTime);e._addMonths(1);var u=a.jqx._jqxCalendar.monthView(m,e,null,null,null,v);if(l==undefined||l==null){this.host.append(v);v[0].style.width="100%";v[0].style.height="100%"}else{l.append(v)}a.data(this.element,q,u);var t=parseInt(v.css("padding-top"));var s=this.host.height()-2*t;var r=s-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){r=s-this.titleHeight}if(this.showFooter){r-=20}if(this.rowHeaderWidth<0){this.rowHeaderWidth=0}if(this.columnHeaderHeight<0){this.columnHeaderHeight=0}if(this.titleHeight<0){this.titleHeight=0}var g=this.rowHeaderWidth;var k=this.columnHeaderHeight;if(!this.showWeekNumbers){g=0}if(!this.showDayNames){k=0}var x="<div style='height:"+this.titleHeight+"px;'><table role='grid' style='margin: 0px; width: 100%; height: 100%; border-spacing: 0px;' cellspacing='0' cellpadding='0'><tr role='row' id='calendarTitle' width='100%'><td role='gridcell' NOWRAP id='leftNavigationArrow'></td><td aria-live='assertive' aria-atomic='true' role='gridcell' align='center' NOWRAP id='calendarTitleHeader'></td><td role='gridcell' NOWRAP id='rightNavigationArrow'></td></tr></table></div>";var c="<table role='grid' class='"+this.toThemeProperty("jqx-calendar-month")+"' style='margin: 0px; border-spacing: 0px;' cellspacing='0' cellpadding='0'><tr role='row' id='calendarHeader' height='"+k+"'><td role='gridcell' id='selectCell' width='"+g+"'></td><td role='gridcell' colspan='2' style='border: none; padding-left: 2px; padding-right: 2px' id='calendarColumnHeader'></td></tr><tr role='row' id='calendarContent'><td role='gridcell' id='calendarRowHeader' valign='top' height='"+r+"' width='"+g+"'></td><td role='gridcell' valign='top' colspan='2' style='padding-left: 2px; padding-right: 2px' id='cellsTable' height='"+r+"'></td></tr></table>";var p="<div id='footer' style='margin: 0px; display: none; height:"+d+"px;'><table style='width: 100%; height: 100%; border-spacing: 0px;' cellspacing='0' cellpadding='0'><tr id='calendarFooter'><td align='right' id='todayButton'></td><td align='left' colspan='2' id=doneButton></td></tr></table></div>";v[0].innerHTML=x+c+p;this.header=v.find("#calendarHeader");this.header[0].id="calendarHeader"+q;this.header.addClass(this.toThemeProperty("calendar-header"));this.columnHeader=v.find("#calendarColumnHeader");this.columnHeader[0].id="calendarColumnHeader"+q;this.table=v.find("#cellsTable");this.table[0].id="cellsTable"+q;this.rowHeader=v.find("#calendarRowHeader");this.rowHeader[0].id="calendarRowHeader"+q;this.selectCell=v.find("#selectCell");this.selectCell[0].id="selectCell"+q;this.title=v.find("#calendarTitle");this.title[0].id="calendarTitle"+q;this.leftButton=v.find("#leftNavigationArrow");this.leftButton[0].id="leftNavigationArrow"+q;this.titleHeader=v.find("#calendarTitleHeader");this.titleHeader[0].id="calendarTitleHeader"+q;this.rightButton=v.find("#rightNavigationArrow");this.rightButton[0].id="rightNavigationArrow"+q;this.footer=v.find("#calendarFooter");this._footer=v.find("#footer");this._footer[0].id="footer"+q;this.footer[0].id="calendarFooter"+q;this.todayButton=v.find("#todayButton");this.todayButton[0].id="todayButton"+q;this.doneButton=v.find("#doneButton");this.doneButton[0].id="doneButton"+q;this.title.addClass(this.toThemeProperty("jqx-calendar-title-container"));var d=20;if(this.showFooter){this._footer.css("display","block")}v.find("tr").addClass(this.toThemeProperty("jqx-reset"));v.addClass(this.toThemeProperty("jqx-widget-content"));v.addClass(this.toThemeProperty("jqx-calendar-month-container"));this.month=v;this.selectCell.addClass(this.toThemeProperty("jqx-reset"));this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header"));if(this.showWeekNumbers){this._renderRowHeader(v)}else{this.table[0].colSpan=3;this.columnHeader[0].colSpan=3;this.rowHeader.css("display","none");this.selectCell.css("display","none")}if(this.showFooter){this.footer.height(20);var j=a("<a href='javascript:;'>"+this.todayString+"</a>");j.appendTo(this.todayButton);var i=a("<a href='javascript:;'>"+this.clearString+"</a>");i.appendTo(this.doneButton);i.addClass(this.toThemeProperty("jqx-calendar-footer"));j.addClass(this.toThemeProperty("jqx-calendar-footer"));var o=this;var f="mousedown";if(a.jqx.mobile.isTouchDevice()){f=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(j,f,function(){if(o.today){o.today()}else{o.setDate(new Date(),"mouse")}return false});this.addHandler(i,f,function(){if(o.clear){o.clear()}else{o.setDate(null,"mouse")}return false})}if(this.view!="month"){this.header.hide()}if(this.showDayNames&&this.view=="month"){this.renderColumnHeader(v)}this.oldView=this.view;this.renderCalendarCells(v,m,q);if(l==undefined||l==null){this.renderTitle(v)}this._refreshOtherMonthRows(u,q);v.find("tbody").css({border:"none",background:"transparent"});if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var w=this;this.addHandler(this.host,"focus",function(){w.focus()});return v},_getTitleFormat:function(){switch(this.view){case"month":return this.titleFormat[0];case"year":return this.titleFormat[1];case"decade":return this.titleFormat[2];case"centuries":return this.titleFormat[3]}},renderTitle:function(t){var k=a("<div role='button' style='float: left;'></div>");var l=a("<div role='button' style='float: right;'></div>");var o=this.title;o.addClass(this.toThemeProperty("jqx-reset"));o.addClass(this.toThemeProperty("jqx-widget-header"));o.addClass(this.toThemeProperty("jqx-calendar-title-header"));var e=o.find("td");if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(e.css("background-color")!="transparent"){var g=o.css("background-color");e.css("background-color",g)}if(e.css("background-image")!="transparent"){var d=o.css("background-image");var p=o.css("background-repeat");var c=o.css("background-position");e.css("background-image",d);e.css("background-repeat",p);e.css("background-position","left center scroll")}}else{e.css("background-color","transparent")}if(this.disabled){o.addClass(this.toThemeProperty("jqx-calendar-title-header-disabled"))}k.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));k.addClass(this.toThemeProperty("jqx-icon-arrow-left"));k.appendTo(this.leftButton);var m=this.leftButton;l.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));l.addClass(this.toThemeProperty("jqx-icon-arrow-right"));l.appendTo(this.rightButton);var b=this.rightButton;if(this.enableTooltips){if(a(m).jqxTooltip){a(m).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.backText});a(b).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.forwardText})}}var n=this.titleHeader;var v=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var q=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}else{if(this.view=="centuries"){var q=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}}var f=a("<div style='background: transparent; margin: 0; padding: 0; border: none;'>"+v+"</div>");n.append(f);f.addClass(this.toThemeProperty("jqx-calendar-title-content"));var s=parseInt(k.width());var i=t.width()-2*s;var r=n.find(".jqx-calendar-title-content").width(i);a.data(k,"navigateLeft",this);a.data(l,"navigateRight",this);var h=a.jqx.mobile.isTouchDevice();if(!this.disabled){var u=this;this.addHandler(n,"mousedown",function(A){if(u.enableViews){if(!u._viewAnimating&&!u._animating){var x=u.view;u.oldView=x;switch(u.view){case"month":u.view="year";break;case"year":u.view="decade";break}if(u.views.indexOf("year")==-1&&u.view=="year"){u.view="decade"}if(u.views.indexOf("decade")==-1&&u.view=="decade"){u.view=x}if(x!=u.view){var z="View"+u.element.id;var B=u.host.find("#"+z);var y=u.getVisibleDate();var w=u.getFirstDayOfWeek(y);u.renderCalendarCells(B,w,z,true);u.refreshTitle(B);u._raiseEvent("8")}}return false}});this.addHandler(k,"mousedown",function(x){if(!u._animating){a.data(k,"navigateLeftRepeat",true);var w=a.data(k,"navigateLeft");if(w.enableFastNavigation&&!h){w.startRepeat(w,k,true,u.navigationDelay+200)}w.navigateBackward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(0,x)}else{return false}});this.addHandler(k,"mouseup",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(k,"mouseleave",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(l,"mousedown",function(x){if(!u._animating){a.data(l,"navigateRightRepeat",true);var w=a.data(l,"navigateRight");if(w.enableFastNavigation&&!h){w.startRepeat(w,l,false,u.navigationDelay+200)}w.navigateForward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(1,x)}else{return false}});this.addHandler(l,"mouseup",function(w){a.data(l,"navigateRightRepeat",false)});this.addHandler(l,"mouseleave",function(w){a.data(l,"navigateRightRepeat",false)})}},refreshTitle:function(f){var g=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var d=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}else{if(this.view=="centuries"){var d=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}}var e=this.titleHeader;if(this.titleHeader){var c=e.find(".jqx-calendar-title-content");var h=a("<div style='background: transparent; margin: 0; padding: 0; border: none;'>"+g+"</div>");e.append(h);h.addClass(this.toThemeProperty("jqx-calendar-title-content"));if(c!=null){c.remove()}}},startRepeat:function(d,b,f,e){var c=window.setTimeout(function(){var g=a.data(b,"navigateLeftRepeat");if(!f){g=a.data(b,"navigateRightRepeat")}if(g){if(e<25){e=25}if(f){d.navigateBackward(1,"arrow");d.startRepeat(d,b,true,e)}else{d.navigateForward(1,"arrow");c=d.startRepeat(d,b,false,e)}}else{window.clearTimeout(c);return}},e)},navigateForward:function(h,g){if(h==undefined||h==null){h=this.stepMonths}var f=this.value.year;if(this.view=="decade"){f=this._renderStartDate.getFullYear()+12;if(this._renderEndDate.getFullYear()>=this.getMaxDate().getFullYear()){return}}else{if(this.view=="year"){f=this.value.year+1}else{if(this.view=="centuries"){f=this.value.year+100}}}if(this.view!="month"){var b=this.getMaxDate().getFullYear();if(b<f||f>b){f=b}if(this.value.year==f){if(this.view==="decade"){if(this.value.year>this._renderEndDate.getFullYear()){this.value.year=f;this.value.month=1;this.value.day=1}else{return}}else{return}}this.value.year=f;this.value.month=1;this.value.day=1}var c=this.value.day;var i=this.value.month;if(i+h<=12){var e=this.value._daysInMonth(this.value.year,this.value.month+h);if(c>e){c=e}}if(this.view=="month"){var d=new Date(this.value.year,this.value.month-1+h,c);if(g=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1+h,1)}}else{var d=new Date(this.value.year,this.value.month-1,c)}return this.navigateTo(d)},navigateBackward:function(g,f){if(g==undefined||g==null){g=this.stepMonths}var e=this.value.year;if(this.view=="decade"){e=this._renderStartDate.getFullYear()-12}else{if(this.view=="year"){e=this.value.year-1}else{if(this.view=="centuries"){e=this.value.year-100}}}if(this.view!="month"){var i=this.getMinDate().getFullYear();if(e<i){e=i}if(this.view=="decade"){if(this._renderStartDate){if(this._renderStartDate.getFullYear()==e){return}}}this.value.year=e;this.value.month=1;this.value.day=1}var b=this.value.day;var h=this.value.month;if(h-g>=1){var d=this.value._daysInMonth(this.value.year,this.value.month-g);if(b>d){b=d}}if(this.view=="month"){var c=new Date(this.value.year,this.value.month-1-g,b);if(f=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1-g,1)}}else{var c=new Date(this.value.year,this.value.month-1,b)}return this.navigateTo(c)},_isRestrictedRange:function(d,c){if(d>c){return true}var b=d;while(b.valueOf()<=c.valueOf()){if(this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_hasUnrestrictedRanges:function(d,c){if(d>c){return false}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_getNextUnrestrictedDay:function(d,c){if(d>c){return null}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return b}b.setDate(b.getDate()+1)}return null},_isRestrictedDate:function(d){var c=this;if(!a.isArray(c.restrictedDates)){return false}for(var g=0;g<c.restrictedDates.length;g++){var b=c.restrictedDates[g];if(typeof(b)=="object"&&b.from!=undefined&&b.to!=undefined){var f=b.from;var e=b.to;if(d.valueOf()>=f.valueOf()&&d.valueOf()<=e.valueOf()){return true}}else{if(b.getMonth()==d.getMonth()&&b.getDate()==d.getDate()&&b.getFullYear()==d.getFullYear()){return true}}}return false},_isDisabled:function(d){var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var b=d.getDay();var c=e[b];if(this.selectableDays.indexOf(c)==-1){return true}if(this._isRestrictedDate(d)){return true}return false},refreshCalendarCells:function(x,f,m){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.refreshViews(x,f,m);return}var s=this.table;var q=s.find("#cellTable"+m.toString());var e=f;var c=new Array();var n=0;var u=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var p=0;p<6;p++){for(var o=0;o<7;o++){var d=p+1;var h=o;if(this.rtl){h=6-h}var t=h+1;var l="#cell"+d+t+this.element.id;var w=new Date(e.dateTime.getFullYear(),e.dateTime.getMonth(),e.dateTime.getDate());var b=new a.jqx._jqxCalendar.cell(w);var g=a(q[0].rows[p].cells[t-1]);g[0].id=l.substring(1);b.element=g;b.row=p;b.column=o;b.isVisible=true;b.isOtherMonth=false;b.isToday=false;b.isWeekend=false;b.isHighlighted=false;b.isSelected=false;if(e.month!=this.value.month){b.isOtherMonth=true;b.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(w)){b.isRestricted=true;b.isDisabled=true}if(!b.isDisabled){if(w<this.getMinDate()||w>this.getMaxDate()||this._isDisabled(w)){b.isDisabled=true}}if(e.month==u.month&&e.day==u.day&&e.year==u.year){b.isToday=true}if(e.isWeekend()){b.isWeekend=true}a.data(this.element,"cellContent"+l.substring(1),b);a.data(this.element,l.substring(1),b);c[n]=b;n++;a.jqx.utilities.html(g,e.day);this._applyCellStyle(b,g,g);e=new a.jqx._jqxDateTimeInput.getDateTime(new Date(e._addDays(1)))}}var v=a.data(this.element,x[0].id);if(v!=undefined&&v!=null){v.cells=c}this.renderedCells=c;this._refreshOtherMonthRows(v,m)},_getDecadeAndCenturiesData:function(){var k=new Array();var p=new Array();var c=this.getMaxDate().getFullYear()-this.getMinDate().getFullYear();if(c<12){c=12}var f=this.getMinDate();var b=this.getMaxDate();var l=this.value.dateTime.getFullYear();if(this.view=="decade"){if(l+12>b.getFullYear()){l=b.getFullYear()-11}if(l<f.getFullYear()){l=f.getFullYear()}for(var h=0;h<c;h++){var d=new Date(f.getFullYear()+h,0,1);if(f.getFullYear()<=l&&l<=d.getFullYear()){var g=new Date(d.getFullYear(),d.getMonth(),1);for(var e=0;e<12;e++){var o=new Date(g.getFullYear()+e,this.value.dateTime.getMonth(),this.value.dateTime.getDate());var m=o.getFullYear();if(f.getFullYear()<=m&&m<=b.getFullYear()){k.push(m);p.push(o);if(e==0){this._renderStartDate=o}this._renderEndDate=o}else{k.push(m);p.push(o)}}break}}}else{if(this.view=="centuries"){for(var h=0;h<c;h+=120){var d=new Date(f.getFullYear()+h+120,0,1);if(f.getFullYear()<=l&&l<=d.getFullYear()){var g=new Date(d.getFullYear()-130,d.getMonth(),1);if(g<f){g=f}for(var e=0;e<12;e++){var n=new Date(g.getFullYear()+e*10,g.getMonth(),1);if(g.getFullYear()>=f.getFullYear()&&n.getFullYear()<=b.getFullYear()){k.push("<span style='visibility: hidden;'>-</span>"+n.getFullYear()+"-"+(n.getFullYear()+9));p.push(n);if(e==0){this._renderCenturyStartDate=n}this._renderCenturyEndDate=new Date(n.getFullYear()+9,0,1)}}break}}}}return{years:k,dates:p}},refreshViews:function(A,m,s){var B=this;var c=new Array();var w=A.find("#cellTable"+s.toString());var D=this._getDecadeAndCenturiesData();var l=D.years;var C=D.dates;var t=0;var f=this.getMinDate();var n=this.getMaxDate();for(var v=0;v<3;v++){for(var u=0;u<4;u++){var d=v+1;var q=u;if(this.rtl){q=3-q}var x=q+1;var z=new Date(this.value.dateTime);z.setDate(1);z.setMonth(v*4+q);var b=new a.jqx._jqxCalendar.cell(z);var e=w[0].rows["row"+(1+v)+this.element.id];var o=a(e.cells[u]);b.isSelected=false;b.isVisible=true;b.element=o;b.row=v;b.column=u;b.index=c.length;var p="";if(this.view=="year"){var h=this.localization.calendar.months.names;var g=h[v*4+q];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[v*4+q];break;case"shortest":g=this.localization.calendar.months.namesShort[v*4+q];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}p=g}else{if(this.view=="decade"||this.view=="centuries"){p=l[v*4+q];if(undefined==p){p="<span style='cursor: default; visibility: hidden;'>2013</span>"}b.setDate(C[v*4+q])}}var z=b.getDate();if(this.view=="year"){if(z.getMonth()==this.getDate().getMonth()&&z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}else{if(z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}if(this.view=="year"){if(this._getYearAndMonthPart(z)<this._getYearAndMonthPart(f)){b.isDisabled=true}if(this._getYearAndMonthPart(z)>this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(z.getFullYear()<f.getFullYear()){b.isDisabled=true}if(z.getFullYear()>n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,p);c[t]=b;t++}}var y=a.data(this.element,A[0].id);if(y!=undefined&&y!=null){y.cells=c}this.renderedCells=c;this._applyCellStyles()},_createViewClone:function(){var b=this.host.find(".jqx-calendar-month");var c=b.clone();c.css("position","absolute");c.css("top",b.position().top);c.width(this.month.width());return c},_addCellsTable:function(h,g){var e=this;var c=this.showFooter?20:0;if(this.view!="month"){g.height(this.month.height()-this.titleHeight)}else{g.height(this.month.height()-this.titleHeight-this.columnHeaderHeight-c)}this._viewAnimating=true;var b=this.host.find(".jqx-calendar-month-container");b.css("position","relative");var d=this.host.find(".jqx-calendar-month");var f=this._createViewClone();b.append(f);if(this.view!="month"){this.header.fadeOut(0);if(this.showWeekNumbers){this.rowHeader.fadeOut(0)}if(this.showFooter){this._footer.fadeOut(0)}}else{this.header.fadeIn(this.navigationDelay+200);if(this.showWeekNumbers){this.rowHeader.fadeIn(this.navigationDelay+200)}if(this.showFooter){this._footer.fadeIn(this.navigationDelay+200)}}h.children().remove();h.append(g);this._animateViews(f,g,function(){if(!e.selectedDate&&e.selectionMode!="range"){e.selectedDate=e.renderedCells[0].getDate()}try{e.renderedCells[0].element.focus();setTimeout(function(){e.renderedCells[0].element.focus()},10)}catch(i){}e._viewAnimating=false});g.addClass(this.toThemeProperty("jqx-calendar-view"))},_animateViews:function(c,b,e){var d=this;d._viewAnimating=true;if(d.oldView==d.view){c.remove();b.fadeOut(0);b.fadeIn(0);e();return}c.fadeOut(this.navigationDelay+100,function(){c.remove()});b.fadeOut(0);b.fadeIn(this.navigationDelay+200,function(){e()})},focus:function(){if(this.disabled){return}try{if(this.renderedCells&&this.renderedCells.length>0){var d=this;var c=false;if(!d.selectedDate&&d.selectionMode!="range"){this.setDate(new Date(),"mouse")}this.element.focus()}}catch(b){}},renderViews:function(E,n,v){var F=this;var e=new Array();var z=a("<table role='grid' style='border-color: transparent; width: 100%; height: 100%;' cellspacing='2' cellpadding='0' id=cellTable"+v.toString()+"><tr role='row' id='row1"+this.element.id+"'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row' id='row2"+this.element.id+"'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row' id='row3"+this.element.id+"'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr></table>");var q=this.host.find(".jqx-calendar-month-container");q.css("position","relative");var A=E.find("#cellsTable"+E[0].id);A[0].style.borderColor="transparent";var I=this._getDecadeAndCenturiesData();var m=I.years;var H=I.dates;var w=0;var g=this.getMinDate();var o=this.getMaxDate();var t=new Date(this.value.dateTime);t.setDate(1);for(var y=0;y<3;y++){for(var x=0;x<4;x++){var d=y+1;var u=x;if(this.rtl){u=3-u}var B=u+1;var f=z[0].rows["row"+(1+y)+this.element.id];var D=new Date(t);D.setMonth(y*4+u);var c=new a.jqx._jqxCalendar.cell(D);var p=a(f.cells[x]);c.isVisible=true;c.element=p;c.row=y;c.column=x;c.index=e.length;c.isSelected=false;var s="";if(this.view=="year"){if(D.getMonth()==this.getDate().getMonth()&&D.getFullYear()==this.getDate().getFullYear()){c.isSelected=true}var l=this.localization.calendar.months.names;var h=l[y*4+u];switch(this.monthNameFormat){case"default":h=this.localization.calendar.months.namesAbbr[y*4+u];break;case"shortest":h=this.localization.calendar.months.namesShort[y*4+u];break;case"firstTwoLetters":h=h.substring(0,2);break;case"firstLetter":h=h.substring(0,1);break}s=h}else{if(this.view=="decade"||this.view=="centuries"){s=m[y*4+u];c.setDate(H[y*4+u]);if(c.getDate().getFullYear()==this.getDate().getFullYear()){c.isSelected=true}if(undefined==s){s="<span style='cursor: default; visibility: hidden;'>2013</span>"}}}var D=c.getDate();if(this.view=="year"){var b=new Date(D);b.setDate(1);b.setHours(0,0,0,0);b.setMonth(D.getMonth()+1);b=new Date(b.valueOf()-1);if(this._getYearAndMonthPart(D)<this._getYearAndMonthPart(g)||this._getYearAndMonthPart(D)>this._getYearAndMonthPart(o)||!this._hasUnrestrictedRanges(D,b)){c.isDisabled=true}}else{var G=new Date(D);G.setMonth(0);G.setDate(1);G.setHours(0,0,0,0);G.setFullYear(D.getFullYear()+1);G=new Date(G.valueOf()-1);if(D.getFullYear()<g.getFullYear()||D.getFullYear()>o.getFullYear()||!this._hasUnrestrictedRanges(D,G)){c.isDisabled=true}}a.jqx.utilities.html(p,s);e[w]=c;w++}}a.each(e,function(){var j=this.element;var i=this;if(!F.disabled){F.addHandler(j,"mousedown",function(k){F._setDateAndSwitchViews(i,k,"mouse")});F.addHandler(j,"mouseover",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=true;F._applyCellStyle(k,k.element,k.element)});F.addHandler(j,"mouseout",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=false;F._applyCellStyle(k,k.element,k.element)})}});var C=a.data(this.element,E[0].id);if(C!=undefined&&C!=null){C.cells=e}this.renderedCells=e;this._addCellsTable(A,z);this._applyCellStyles()},_setDateAndSwitchViews:function(m,d,j){if(!this._viewAnimating&&!this._animating){var g=this.getDate();var e=this.renderedCells[m.index].getDate();var k=this.value.dateTime.getDate();var l=new Date(e);if(this.views.indexOf("month")!=-1){l.setDate(k)}else{l.setDate(1);e.setDate(1)}if(l.getMonth()==e.getMonth()){e=l}var i=this.getMinDate();var c=this.getMaxDate();if(this.view=="year"){if(this._getYearAndMonthPart(e)<this._getYearAndMonthPart(i)){return}if(this._getYearAndMonthPart(e)>this._getYearAndMonthPart(c)){return}}else{if(e.getFullYear()<i.getFullYear()){return}if(e.getFullYear()>c.getFullYear()){return}}if(this.selectionMode!="range"){this._selectDate(e,j)}this.oldView=this.view;switch(this.view){case"year":this.view="month";break;case"decade":this.view="year";break}if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1){this.view="decade"}if(this.view=="year"){if(this._getYearAndMonthPart(e)<this._getYearAndMonthPart(i)){e=i}if(this._getYearAndMonthPart(e)>this._getYearAndMonthPart(c)){e=c}}else{if(e.getFullYear()<i.getFullYear()){e=i}if(e.getFullYear()>c.getFullYear()){e=c}}if(this.changing&&(this.selectedDate&&(this.selectedDate.getFullYear()!=e.getFullYear()||this.selectedDate.getMonth()!=e.getMonth()||this.selectedDate.getDate()!=e.getDate()))){e=this.selectedDate}this.value._setYear(e.getFullYear());this.value._setDay(e.getDate());this.value._setMonth(e.getMonth()+1);this.value._setDay(e.getDate());var h=this.getVisibleDate();var b=this.getFirstDayOfWeek(h);var f="View"+this.element.id;this.renderCalendarCells(this.month,b,f,true);this.refreshTitle(this.month);if(this.showWeekNumbers){this.refreshRowHeader(this.month,f)}if(this.views.length==3){if(this.view=="month"){if(this.selectionMode!="range"){this._selectDate(this.selectedDate,"view")}else{var n=this;a.each(this.renderedCells,function(r){var o=this;var t=o.getDate();var p=a(o.element);var q=p;if(p.length==0){return false}var s=function(v){if(v==null){return new Date()}var u=new Date();u.setHours(0,0,0,0);u.setFullYear(v.getFullYear(),v.getMonth(),v.getDate());return u};if(!o.isOtherMonth&&s(t).toString()==s(e).toString()){n.value._setMonth(e.getMonth()+1);n.value._setDay(e.getDate());n.value._setYear(e.getFullYear())}o.isSelected=false;o.isDisabled=false;if(s(t)<s(n.selection.from)&&n._clicks==1){o.isDisabled=true}if(n.getMaxDate()<t){o.isDisabled=true}if(n.getMinDate()>t){o.isDisabled=true}if(n._isDisabled(t)){o.isDisabled=true}if(!o.isDisabled){if(s(t)>=s(n.selection.from)&&s(t)<=s(n.selection.to)){o.isSelected=true}}});this._applyCellStyles()}}}if(this.view!="month"){if(this.oldView=="year"||(this.views.indexOf("year")==-1&&this.view=="decade")){if(j!="keyboard"){this._raiseEvent("3")}this._raiseEvent("5",{selectionType:"mouse"})}}this._raiseEvent("8")}},renderCalendarCells:function(D,m,s,q){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.renderViews(D,m,s);return}var x=a("<table role='grid' style='width: 100%; height: 100%; border-color: transparent;' cellspacing='2' cellpadding='1' id=cellTable"+s.toString()+"><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr></table>");var y=this.table;y[0].style.borderColor="transparent";if(q==undefined){var g=y.find("#cellTable"+s.toString());if(g!=null){g.remove()}y.append(x)}var l=m;var b=this.showDayNames?1:0;var f=this.showWeekNumbers?1:0;var d=new Array();var t=0;var v=(D.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){v=(D.width()-2)/7}v=parseInt(v);var A=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var w=0;w<6;w++){for(var u=0;u<7;u++){var e=w+1;var o=u;if(this.rtl){o=6-o}var z=o+1;var p="#cell"+e+z+this.element.id;var C=new Date(l.dateTime.getFullYear(),l.dateTime.getMonth(),l.dateTime.getDate());var c=new a.jqx._jqxCalendar.cell(C);var n=a(x[0].rows[w].cells[z-1]);n[0].id=p.substring(1);c.isVisible=true;c.isDisabled=false;if(l.month!=this.value.month){c.isOtherMonth=true;c.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(C)){c.isRestricted=true;c.isDisabled=true}if(!c.isDisabled){if(C<this.getMinDate()||C>this.getMaxDate()||this._isDisabled(C)){c.isDisabled=true}}if(l.month==A.month&&l.day==A.day&&l.year==A.year){c.isToday=true}if(l.isWeekend()){c.isWeekend=true}c.element=n;c.row=b;c.column=f;a.jqx.utilities.html(n,l.day);l=new a.jqx._jqxDateTimeInput.getDateTime(new Date(l._addDays(1)));a.data(this.element,"cellContent"+p.substring(1),c);a.data(this.element,""+p.substring(1),c);var E=this;if(E.isMaterialized()){a(n).addClass("ripple");a.jqx.ripple(a(n))}this.addHandler(n,"mousedown",function(I){if(!E.readOnly&&!E.disabled){var H=a(I.target);var j=a.data(E.element,H[0].id);var i=E._raiseEvent(3,I);if(j!=null&&j!=undefined){var r=j.getDate();if(E.getMinDate()<=r&&r<=E.getMaxDate()){if(!j.isDisabled){if(j.isOtherMonth&&E.enableAutoNavigation){if(j.row<2){E.navigateBackward()}else{E.navigateForward()}E._selectDate(j.getDate(),"mouse",I.shiftKey)}else{var F=new Date(E.getDate());E._selectDate(j.getDate(),"mouse",I.shiftKey);E.value._setYear(r.getFullYear());E.value._setDay(1);E.value._setMonth(r.getMonth()+1);E.value._setDay(r.getDate());var G=E.host.find(".jqx-calendar-month");G.stop();G.css("margin-left","0px");var k=E.getDate();E._raiseEvent("2");if(j.isOtherMonth){E._raiseEvent("5",{selectionType:"mouse"})}}}}}return false}});if(!E.disabled){var h=function(F,j){if(!E.readOnly){var r=a(F.target);var i=a.data(E.element,r[0].id);if(i!=null&&i!=undefined){var k=i.getDate();if(E.getMinDate()<=k&&k<=E.getMaxDate()){i.isHighlighted=j;E._applyCellStyle(i,i.element,r)}}}};this.addHandler(n,"mouseenter",function(i){h(i,true);return false});this.addHandler(n,"mouseleave",function(i){h(i,false);return false})}f++;d[t]=c;t++}f=0;b++}var B=a.data(this.element,D[0].id);if(B!=undefined&&B!=null){B.cells=d}this.renderedCells=d;if(q!=undefined){this._addCellsTable(y,x)}this._applyCellStyles();this._refreshOtherMonthRows(B,s)},setMaxDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMinDate:function(){if(this.minDate!=null&&this.minDate!=undefined){return this.minDate.dateTime}return null},navigateTo:function(g,i){if(this.view=="month"){var h=this.getMinDate();var d=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if((g<this._getYearAndMonthPart(h))||(g>this._getYearAndMonthPart(d))){return false}}else{if(g&&(g.getFullYear()<this.getMinDate().getFullYear()||g.getFullYear()>this.getMaxDate().getFullYear())){return false}}if(g==null){return false}if(i==undefined){var j=this;if(this._animating){return}this._animating=true;var e=this.host.find(".jqx-calendar-month-container");var k=a("<div></div>");k[0].style.width="100%";k[0].style.height="100%";k[0].style.overflow="hidden";k[0].style.position="relative";k[0].style.left="0px";k[0].style.top="-100%";e.append(k);if(this._viewClone){this._viewClone.stop();this._viewClone.remove()}if(this._newViewClone){this._newViewClone.stop();this._newViewClone.remove()}var m=this.host.find(".jqx-calendar-month");m.stop();m.css("margin-left","0px");var b=m.clone();this._viewClone=b;var l=new Date(this.value.dateTime);this.value._setYear(g.getFullYear());this.value._setDay(g.getDate());this.value._setMonth(g.getMonth()+1);var c=parseInt(this.month.css("padding-top"));j.refreshControl();k.css("overflow","hidden");e.css("position","relative");e.css("overflow","hidden");b.css("position","absolute");b.css("top",m.position().top-c);k.append(b);if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.month.css("position","relative");this.month.css("overflow","hidden");this.table.css("position","relative");this.table.css("overflow","hidden")}var f=-this.month.width();if(g<l){if(this.view=="month"&&g.getMonth()!=l.getMonth()){f=this.month.width()}else{if(g.getFullYear()!=l.getFullYear()){f=this.month.width()}}}b.animate({marginLeft:parseInt(f)+"px"},this.navigationDelay,function(){b.remove()});var n=m.clone();this._newViewClone=n;n.css("position","absolute");n.css("top",m.position().top-c);k.append(n);n.css("margin-left",-f);m.css("visibility","hidden");n.animate({marginLeft:"0px"},this.navigationDelay,function(){n.remove();m.css("visibility","inherit");k.remove();j._animating=false})}else{this.value._setYear(g.getFullYear());this.value._setDay(g.getDate());this.value._setMonth(g.getMonth()+1);var m=this.host.find(".jqx-calendar-month");m.stop();m.css("margin-left","0px");this.refreshControl()}this._raiseEvent("2");this._raiseEvent("8");return true},setDate:function(b){if(b!=null&&typeof(b)=="string"){b=new Date(b)}if(this.canRender==false){this.canRender=true;this.render()}this.navigateTo(b,"api");this._selectDate(b);if(this.selectionMode=="range"){this._selectDate(b,"mouse")}return true},val:function(b){if(arguments.length!=0){if(b==null){this.setDate(null)}if(b instanceof Date){this.setDate(b)}if(typeof(b)=="string"){this.setDate(b)}}return this.getDate()},getDate:function(){if(this.selectedDate==undefined){return new Date()}return this.selectedDate},getValue:function(){if(this.value==undefined){return new Date()}return this.value.dateTime},setRange:function(c,b){if(this.canRender==false){this.canRender=true;this.render()}this.navigateTo(c,"api");this._selectDate(c,"mouse");this._selectDate(b,"mouse")},getRange:function(){return this.selection},_selectDate:function(d,g,c){if(this.selectionMode=="none"){return}if(g==null||g==undefined){g="none"}if(c==null||c==undefined){c=false}var i=a.data(this.element,"View"+this.element.id);if(i==undefined||i==null){return}if(this.changing){if(d&&this.selectedDate){if(this.selectedDate.getFullYear()!=d.getFullYear()||this.selectedDate.getDate()!=d.getDate()||this.selectedDate.getMonth()!=d.getMonth()){var j=this.changing(this.selectedDate,d)}if(j){d=j}}}var k=this;if(this.input){if(d!=null){this.input.val(d.toString())}else{this.input.val("")}}var e=this.selectedDate;this.selectedDate=d;if(this.view!="month"){if(e!=d){this._raiseEvent(7,{selectionType:g})}a.each(this.renderedCells,function(p){var l=this;var q=l.getDate();var m=a(l.element);var o=m.find("#cellContent"+m[0].id);if(d==null){l.isSelected=false;l.isDisabled=false}else{l.isSelected=false;if(q){if((q.getMonth()==d.getMonth()&&k.view=="year"&&q.getFullYear()==d.getFullYear())||(k.view=="decade"&&q.getFullYear()==d.getFullYear())){l.isSelected=true;try{if(g!="none"){l.element.focus()}}catch(n){}}}}k._applyCellStyle(l,m,m)});if(this.change){this.change(d)}return}if(this.view=="month"){if(this.selectionMode=="range"&&g=="key"){var f=this.getVisibleDate();var b=this.getFirstDayOfWeek(f);this.refreshCalendarCells(this.month,b,"View"+this.element.id)}}var h=false;a.each(this.renderedCells,function(r){var w=this;var o=w.getDate();var v=a(w.element);var l=v;if(v.length==0){return false}if(d==null){w.isSelected=false;w.isDisabled=false;if(r==0){k.selection={from:null,to:null};k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}}else{if(k.selectionMode!="range"||g=="key"){if(o.getDate()==d.getDate()&&o.getMonth()==d.getMonth()&&o.getFullYear()==d.getFullYear()&&w.isSelected){k._applyCellStyle(w,v,l);k._raiseEvent("5",{selectionType:g});return}if(w.isSelected){k._raiseEvent("6",{selectionType:g})}w.isSelected=false;if(o.getDate()==d.getDate()&&o.getMonth()==d.getMonth()&&o.getFullYear()==d.getFullYear()){w.isSelected=true;if(r==0){k.selection={date:d}}try{if(g!="none"){w.element.focus();k.host.focus()}}catch(s){}if(!w.isOtherMonth){k.value._setMonth(d.getMonth()+1);k.value._setDay(d.getDate());k.value._setYear(d.getFullYear());k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}}if(k.selectionMode=="range"){k._clicks=0;k.selection={from:d,to:d}}}else{if(k.selectionMode=="range"){if(g=="view"){w.isSelected=false;w.isDisabled=false;if(k.getMaxDate()<o){w.isDisabled=true}if(k.getMinDate()>o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isDisabled=true;w.isRestricted=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}k._applyCellStyle(w,v,l);return true}if(r==0){if(g!="none"){if(k._clicks==undefined){k._clicks=0}k._clicks++;if(c){k._clicks++}if(k._clicks==1){k.selection={from:d,to:d}}else{var u=k.selection.from;var q=u<=d?u:d;var t=u<=d?d:u;if(q){var m=new Date(q.getFullYear(),q.getMonth(),q.getDate())}if(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)}k.selection={from:m,to:n};k._clicks=0}}else{if(k.selection==null||k.selection.from==null){k.selection={from:d,to:d};if(k._clicks==undefined){k._clicks=0}k._clicks++;if(k._clicks==2){k._clicks=0}}}}var p=function(y){if(y==null){return new Date()}var x=new Date();x.setHours(0,0,0,0);x.setFullYear(y.getFullYear(),y.getMonth(),y.getDate());return x};if(!w.isOtherMonth&&p(o).toString()==p(d).toString()){k.value._setMonth(d.getMonth()+1);k.value._setDay(d.getDate());k.value._setYear(d.getFullYear());k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}w.isSelected=false;w.isDisabled=h;if(p(o)<p(k.selection.from)&&k._clicks==1){w.isDisabled=true}if(k.getMaxDate()<o){w.isDisabled=true}if(k.getMinDate()>o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isRestricted=true;w.isDisabled=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}if(!w.isDisabled){if(p(o)>=p(k.selection.from)&&p(o)<=p(k.selection.to)){w.isSelected=true}}else{if(!k.allowRestrictedDaysInRange&&p(o)>=p(k.selection.from)&&k.selection.to==k.selection.from){h=true}}}}}k._applyCellStyle(w,v,l)});if(k.selectionMode=="range"&&k._clicks==0){k._raiseEvent(7,{selectionType:g});return}else{if(k.selectionMode=="range"){return}}if(e!=d){k._raiseEvent(7,{selectionType:g});if(this.change){this.change(d)}}},_getSelectedDate:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}if(this.view!="month"){return this.selectedDate}for(var c=0;c<d.cells.length;c++){var b=d.cells[c];var e=b.getDate();if(b.isSelected){return e}}if(this.selectedDate){return this.selectedDate}},_getSelectedCell:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}for(var c=0;c<d.cells.length;c++){var b=d.cells[c];var e=b.getDate();if(b.isSelected){return b}}},_applyCellStyle:function(c,d,g){var e=this;if(g==null||(g!=null&&g.length==0)){g=d}var b="";b=this.toThemeProperty("jqx-rc-all");b+=" "+this.toThemeProperty("jqx-item");if(this.disabled||(c.isDisabled&&!c.isRestricted)){b+=" "+this.toThemeProperty("jqx-calendar-cell-disabled");b+=" "+this.toThemeProperty("jqx-fill-state-disabled")}if(!this.disabled&&c.isRestricted){b+=" "+this.toThemeProperty("jqx-calendar-cell-restrictedDate")}if(c.isOtherMonth&&this.enableOtherMonthDays&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-othermonth")}if(c.isWeekend&&this.enableWeekend&&c.isVisible&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-weekend")}if(this.isMaterialized()){b+=" ripple"}if(!c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-hidden")}else{b+=" "+this.toThemeProperty("jqx-calendar-cell");if(this.view!="month"){if(g.length>0&&g.html().toLowerCase().indexOf("span")!=-1){g.css("cursor","default")}}}g.removeAttr("aria-selected");if(c.isSelected&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected");b+=" "+this.toThemeProperty("jqx-fill-state-pressed");g.attr("aria-selected",true);this.host.removeAttr("aria-activedescendant").attr("aria-activedescendant",g[0].id);var f=c.getDate();if(this._isDisabled(f)){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected-invalid")}}if(c.isHighlighted&&c.isVisible&&this.enableHover){if(!c.isDisabled){b+=" "+this.toThemeProperty("jqx-calendar-cell-hover");b+=" "+this.toThemeProperty("jqx-fill-state-hover")}}b+=" "+this.toThemeProperty("jqx-calendar-cell-"+this.view);if(c.isToday&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-today")}g[0].className=b;if(this.specialDates.length>0){var h=this;a.each(this.specialDates,function(){if(this.Class!=undefined&&this.Class!=null&&this.Class!=""){g.removeClass(this.Class)}else{g.removeClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))}var i=c.getDate();if(i.getFullYear()==this.Date.getFullYear()&&i.getMonth()==this.Date.getMonth()&&i.getDate()==this.Date.getDate()){if(c.tooltip==null&&this.Tooltip!=null){c.tooltip=this.Tooltip;if(a(g).jqxTooltip){var j=this.Class;a(g).jqxTooltip({value:{cell:c,specialDate:this.Date},name:h.element.id,content:this.Tooltip,position:"mouse",theme:h.theme,opening:function(k){if(g.hasClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))){return true}if(g.hasClass(j)){return true}return false}})}}g.removeClass(e.toThemeProperty("jqx-calendar-cell-othermonth"));g.removeClass(e.toThemeProperty("jqx-calendar-cell-weekend"));if(this.Class==undefined||this.Class==""){g.addClass(e.toThemeProperty("jqx-calendar-cell-specialDate"));return false}else{g.addClass(this.Class);return false}}})}},_applyCellStyles:function(){var f=a.data(this.element,"View"+this.element.id);if(f==undefined||f==null){return}for(var e=0;e<f.cells.length;e++){var b=f.cells[e];var c=a(b.element);var d=c.find("#cellContent"+c[0].id);if(d.length==0){d=c}this._applyCellStyle(b,c,d)}},getWeekOfYear:function(f){var b=new Date(f.dateTime);dowOffset=this.firstDayOfWeek;var e=new Date(b.getFullYear(),0,1);var c=e.getDay()-dowOffset;c=(c>=0?c:c+7);var d=Math.floor((b.getTime()-e.getTime()-(b.getTimezoneOffset()-e.getTimezoneOffset())*60000)/86400000)+1;var g;if(c<4){g=Math.floor((d+c-1)/7)+1;if(g>52){nYear=new Date(b.getFullYear()+1,0,1);nday=nYear.getDay()-dowOffset;nday=nday>=0?nday:nday+7;g=nday<4?1:53}}else{g=Math.floor((d+c-1)/7)}return g},renderColumnHeader:function(w){if(!this.showDayNames){return}var t=a("<table role='grid' style='border-spacing: 0px; border-collapse: collapse; width: 100%; height: 100%;' cellspacing='0' cellpadding='1'><tr role='row'><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td><td role='gridcell'></td></tr></table>");t.find("table").addClass(this.toThemeProperty("jqx-reset"));t.find("tr").addClass(this.toThemeProperty("jqx-reset"));t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"});t.addClass(this.toThemeProperty("jqx-reset"));t.addClass(this.toThemeProperty("jqx-widget-content"));t.addClass(this.toThemeProperty("jqx-calendar-column-header"));this.columnHeader.append(t);var d=this.getVisibleDate();var h=this.getFirstDayOfWeek(d);var m=h.dayOfWeek;var x=this.getWeekOfYear(h);var q=this.firstDayOfWeek;var v=this.localization.calendar.days.names;var n=new Array();var g=h;var o=(w.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){o=(w.width()-2)/7}for(var s=0;s<7;s++){var f=v[q];if(this.rtl){f=v[6-q]}switch(this.dayNameFormat){case"default":f=this.localization.calendar.days.namesAbbr[q];if(this.rtl){f=this.localization.calendar.days.namesAbbr[6-q]}break;case"shortest":f=this.localization.calendar.days.namesShort[q];if(this.rtl){f=this.localization.calendar.days.namesShort[6-q]}break;case"firstTwoLetters":f=f.substring(0,2);break;case"firstLetter":f=f.substring(0,1);break}var b=new a.jqx._jqxCalendar.cell(g.dateTime);var k=s+1;var l=k+this.element.id;var j=a(t[0].rows[0].cells[s]);var p=s;if(this.enableTooltips){if(a(j).jqxTooltip){a(j).jqxTooltip({name:this.element.id,content:v[q],theme:this.theme,position:"mouse"})}}if(q>=6){q=0}else{q++}s=p;b.element=j;b.row=0;b.column=s+1;var e=this._textwidth(f);var c="<div style='padding: 0; margin: 0; border: none; background: transparent;' id='columnCell"+l+"'>"+f+"</div>";j.append(c);j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell"));j.width(o);if(this.disabled){j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled"))}if(e>0&&o>0){while(e>j.width()){if(f.length==0){break}f=f.substring(0,f.length-1);a.jqx.utilities.html(j.find("#columnCell"+l),f);e=this._textwidth(f)}}n[s]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addDays(1)))}if(parseInt(this.columnHeader.width())>parseInt(this.month.width())){this.columnHeader.width(this.month.width())}var u=a.data(this.element,w[0].id);u.columnCells=n},_format:function(d,e,b){var f=false;try{if(Globalize!=undefined){f=true}else{if(document.Globalize){Globalize=document.Globalize;f=true}}}catch(c){if(document.Globalize){Globalize=document.Globalize;f=true}}if(document.Globalize){Globalize=document.Globalize;f=true}if(a.global){a.global.culture.calendar=this.localization.calendar;return a.global.format(d,e,this.culture)}else{if(f){try{if(Globalize.cultures[this.culture]){Globalize.cultures[this.culture].calendar=this.localization.calendar;return Globalize.format(d,e,this.culture)}else{return Globalize.format(d,e,this.culture)}}catch(c){return Globalize.format(d,e)}}else{if(a.jqx.dataFormat){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}},_textwidth:function(d){var c=a("<span>"+d+"</span>");c.addClass(this.toThemeProperty("jqx-calendar-column-cell"));a(this.host).append(c);var b=c.width();c.remove();return b},_textheight:function(d){var c=a("<span>"+d+"</span>");a(this.host).append(c);var b=c.height();c.remove();return b},_renderRowHeader:function(k){var g=this.getVisibleDate();var c=this.getFirstDayOfWeek(g);var f=c.dayOfWeek;var s=this.getWeekOfYear(c);var o=new a.jqx._jqxDateTimeInput.getDateTime(new Date(c.dateTime));o._addDays(5);o.dayOfWeek=o.dateTime.getDay();var m=this.getWeekOfYear(o);if(53==s&&o.dateTime.getMonth()==0){s=1}var l=a("<table style='overflow: hidden; width: 100%; height: 100%;' cellspacing='0' cellpadding='1'><tr><td></td></tr><tr><td/></tr><tr><td/></tr><tr><td/></tr><tr><td/></tr><tr><td/></tr></table>");l.find("table").addClass(this.toThemeProperty("jqx-reset"));l.find("td").addClass(this.toThemeProperty("jqx-reset"));l.find("tr").addClass(this.toThemeProperty("jqx-reset"));l.addClass(this.toThemeProperty("jqx-calendar-row-header"));l.width(this.rowHeaderWidth);this.rowHeader.append(l);var d=c;var r=new Array();for(var h=0;h<6;h++){var e=s.toString();var q=new a.jqx._jqxCalendar.cell(d.dateTime);var j=h+1+this.element.id;var p=a(l[0].rows[h].cells[0]);q.element=p;q.row=h;q.column=0;var b="<div style='background: transparent; border: none; padding: 0; margin: 0;' id ='headerCellContent"+j+"'>"+e+"</div>";p.append(b);p.find("#headerCellContent"+j).addClass(this.toThemeProperty("jqx-calendar-row-cell"));r[h]=q;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));s=this.getWeekOfYear(d)}var n=a.data(this.element,k[0].id);n.rowCells=r},getFirstDayOfWeek:function(e){var d=e;if(this.firstDayOfWeek<0||this.firstDayOfWeek>6){this.firstDayOfWeek=6}var c=d.dayOfWeek-this.firstDayOfWeek;if(c<=0){c+=7}var b=a.jqx._jqxDateTimeInput.getDateTime(d._addDays(-c));return b},getVisibleDate:function(){var c=new a.jqx._jqxDateTimeInput.getDateTime(new Date(this.value.dateTime));if(c<this.minDate){c=this.minDate}if(c>this.maxDate){this.visibleDate=this.maxDate}c.dateTime.setHours(0);var d=c.day;var b=a.jqx._jqxDateTimeInput.getDateTime(c._addDays(-d+1));c=b;return c},destroy:function(b){a.jqx.utilities.resize(this.host,null,true);this.host.removeClass();if(b!=false){this.host.remove()}},_raiseEvent:function(d,i){if(i==undefined){i={owner:null}}var h=this.events[d];var g=i?i:{};g.owner=this;var c=new a.Event(h);c.owner=this;c.args=g;if(d==0||d==1||d==2||d==3||d==4||d==5||d==6||d==7||d==8){c.args.date=c.args.selectedDate=this.getDate();c.args.range=this.getRange();var e=this.getViewStart();var f=this.getViewEnd();c.args.view={from:e,to:f}}if(d==7){var b=g.selectionType;if(!b){b=null}if(b=="key"){b="keyboard"}if(b=="none"){b=null}g.type=b}var j=this.host.trigger(c);if(d==0||d==1){j=false}return j},propertyMap:function(b){if(b=="value"){if(this.selectionMode!="range"){return this.getDate()}else{return this.getRange()}}return null},_setSize:function(){var d=this.host.find("#View"+this.element.id);if(d.length>0){this.setCalendarSize();d[0].style.height="100%";d[0].style.width="100%";var c=this.month.height()-this.titleHeight-this.columnHeaderHeight;var b="View"+this.element.id;d.find("#cellsTable"+b).height(c);d.find("#calendarRowHeader"+b).height(c);this.refreshControl()}},resize:function(){this._setSize()},clear:function(){if(this.selectionMode=="range"){this._clicks=1;this.setRange(null,null);this._raiseEvent(7)}else{this.setDate(null,"mouse")}this._clicks=0;this.selection={from:null,to:null}},today:function(){if(this.selectionMode=="range"){this.setRange(new Date(),new Date())}else{this.setDate(new Date(),"mouse")}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(d,e,g,f){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d.batchUpdate&&d.batchUpdate.width&&d.batchUpdate.height&&Object.keys(d.batchUpdate).length==2){return}if(e=="enableHover"){return}if(e=="keyboardNavigation"){return}if(e=="localization"){if(this.localization){if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}this.firstDayOfWeek=this.localization.calendar.firstDay}}if(e=="culture"){try{if(a.global){a.global.preferCulture(d.culture);d.localization.calendar=a.global.culture.calendar}else{if(Globalize){var b=Globalize.culture(d.culture);d.localization.calendar=b.calendar}}if(d.localization.calendar&&d.localization.calendar.firstDay!=undefined&&d.culture!="default"){d.firstDayOfWeek=d.localization.calendar.firstDay}}catch(c){}}if(e=="views"){if(d.views.indexOf("month")==-1){d.view="year"}if(d.views.indexOf("year")==-1&&d.views.indexOf("month")==-1){d.view="decade"}d.render();return}if(e=="showFooter"){d.render()}if(e=="width"||e=="height"){d._setSize();return}else{if(e=="theme"){a.jqx.utilities.setTheme(g,f,d.host)}else{if(e=="rowHeaderWidth"||e=="showWeekNumbers"){d.render()}else{d.view="month";d.render();d.refreshControl()}}}if(e==="firstDayOfWeek"){d.refreshControl()}}})})(jqxBaseFramework);(function(a){a.jqx._jqxCalendar.cell=function(c){var b={dateTime:new a.jqx._jqxDateTimeInput.getDateTime(c),_date:c,getDate:function(){return this._date},setDate:function(d){this.dateTime=new a.jqx._jqxDateTimeInput.getDateTime(d);this._date=d},isToday:false,isWeekend:false,isOtherMonth:false,isVisible:true,isSelected:false,isHighlighted:false,element:null,row:-1,column:-1,tooltip:null};return b};a.jqx._jqxCalendar.monthView=function(c,h,d,b,f,e){var g={start:c,end:h,cells:d,rowCells:b,columnCells:f,element:e};return g}})(jqxBaseFramework);
 
-(function(a){a.jqx.jqxWidget("jqxChart","",{});a.extend(a.jqx._jqxChart.prototype,{defineInstance:function(){a.extend(true,this,this._defaultSettings);this._createColorsCache();return this._defaultSettings},_defaultSettings:{title:"Title",description:"Description",source:[],seriesGroups:[],categoryAxis:null,xAxis:{},valueAxis:null,renderEngine:"",enableAnimations:true,enableAxisTextAnimation:false,backgroundImage:"",background:"#FFFFFF",padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#FFFFFF",showBorderLine:true,borderLineWidth:1,borderLineColor:null,borderColor:null,titlePadding:{left:5,top:5,right:5,bottom:10},showLegend:true,legendLayout:null,enabled:true,colorScheme:"scheme01",animationDuration:500,showToolTips:true,showToolTipsOnAllSeries:false,toolTipShowDelay:300,toolTipDelay:500,toolTipHideDelay:4000,toolTipMoveDuration:300,toolTipFormatFunction:null,toolTipAlignment:"dataPoint",localization:null,columnSeriesOverlap:false,rtl:false,legendPosition:null,greyScale:false,axisPadding:5,enableCrosshairs:false,crosshairsColor:"#BCBCBC",crosshairsDashStyle:"2,2",crosshairsLineWidth:1,enableEvents:true,_itemsToggleState:[],_isToggleRefresh:false,_isSelectorRefresh:false,_sliders:[],_selectorRange:[],_rangeSelectorInstances:{},_resizeState:{},renderer:null,_isRangeSelectorInstance:false,drawBefore:null,draw:null,_renderData:{},enableSampling:true},_defaultLineColor:"#BCBCBC",_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},destroy:function(){this.host.remove()},_jqxPlot:null,createInstance:function(d){if(!a.jqx.dataAdapter){throw"jqxdata.js is not loaded"}var c=this;c._refreshOnDownloadComlete();c._isTouchDevice=a.jqx.mobile.isTouchDevice();if(!c._jqxPlot){c._jqxPlot=new jqxPlot()}c.addHandler(c.host,c._getEvent("mousemove"),function(g){if(c.enabled==false){return}if(!c._isRangeSelectorInstance){c.host.css("cursor","default")}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c.onmousemove(f,j)});c.addHandler(c.host,c._getEvent("mouseleave"),function(h){if(c.enabled==false){return}var f=c._mouseX;var i=c._mouseY;var g=c._plotRect;if(g&&f>=g.x&&f<=g.x+g.width&&i>=g.y&&i<=g.y+g.height){return}c._cancelTooltipTimer();c._hideToolTip(0);c._unselect()});c.addHandler(c.host,"click",function(g){if(c.enabled==false){return}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c._mouseX=f;c._mouseY=j;if(!isNaN(c._lastClickTs)){if((new Date()).valueOf()-c._lastClickTs<100){return}}this._hostClickTimer=setTimeout(function(){if(!c._isTouchDevice){c._cancelTooltipTimer();c._hideToolTip();c._unselect()}if(c._pointMarker&&c._pointMarker.element){var l=c.seriesGroups[c._pointMarker.gidx];var k=l.series[c._pointMarker.sidx];g.stopImmediatePropagation();c._raiseItemEvent("click",l,k,c._pointMarker.iidx)}},100)});var e=c.element.style;if(e){var b=false;if(e.width!=null){b|=e.width.toString().indexOf("%")!=-1}if(e.height!=null){b|=e.height.toString().indexOf("%")!=-1}if(b){a.jqx.utilities.resize(this.host,function(){if(c.timer){clearTimeout(c.timer)}var f=1;c.timer=setTimeout(function(){var g=c.enableAnimations;c.enableAnimations=false;c.refresh();c.enableAnimations=g},f)},false,true)}}},_refreshOnDownloadComlete:function(){var d=this;var e=this.source;if(e instanceof a.jqx.dataAdapter){var f=e._options;if(f==undefined||(f!=undefined&&!f.autoBind)){e.autoSync=false;e.dataBind()}var c=this.element.id;if(e.records.length==0){var b=function(){if(d.ready){d.ready()}d.refresh()};e.unbindDownloadComplete(c);e.bindDownloadComplete(c,b)}else{if(d.ready){d.ready()}}e.unbindBindingUpdate(c);e.bindBindingUpdate(c,function(){if(d._supressBindingRefresh){return}d.refresh()})}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c=="source"){this._refreshOnDownloadComlete()}this.refresh()},_initRenderer:function(b){if(!a.jqx.createRenderer){throw"Please include jqxdraw.js"}return a.jqx.createRenderer(this,b)},_internalRefresh:function(){var b=this;if(a.jqx.isHidden(b.host)){return}b._stopAnimations();if(!b.renderer||(!b._isToggleRefresh&&!b._isUpdate)){b._hideToolTip(0);b._isVML=false;b.host.empty();b._measureDiv=undefined;b._initRenderer(b.host)}var d=b.renderer;if(!d){return}var c=d.getRect();b._render({x:1,y:1,width:c.width,height:c.height});this._raiseEvent("refreshBegin",{instance:this});if(d instanceof a.jqx.HTML5Renderer){d.refresh()}b._isUpdate=false;this._raiseEvent("refreshEnd",{instance:this})},saveAsPNG:function(d,b,c){return this._saveAsImage("png",d,b,c)},saveAsJPEG:function(d,b,c){return this._saveAsImage("jpeg",d,b,c)},saveAsPDF:function(d,b,c){return this._saveAsImage("pdf",d,b,c)},_saveAsImage:function(e,h,b,c){var g=false;for(var d=0;d<this.seriesGroups.length&&!g;d++){var f=this._getXAxis(d);if(f&&f.rangeSelector){g=true}}return a.jqx._widgetToImage(this,e,h,b,c,g?this._selectorSaveAsImageCallback:undefined)},_selectorSaveAsImageCallback:function(D,h){var r=D;for(var B=0;B<r.seriesGroups.length;B++){var o=r._getXAxis(B);if(!o||!o.rangeSelector||o.rangeSelector.renderTo){continue}var m=r._rangeSelectorInstances[B];if(!m){continue}var s=m.jqxChart("getInstance");var e=s.renderEngine;var d=s.renderer.getRect();var f=s.renderer.getContainer().find("canvas")[0];var p=f.getContext("2d");var w=r._sliders[B];var b=r.seriesGroups[B].orientation=="horizontal";var c=!b?"width":"height";var v=b?"width":"height";var A=!b?"x":"y";var g=b?"x":"y";var k={};k[A]=w.startOffset+w.rect[A];k[g]=w.rect[g];k[c]=w.endOffset-w.startOffset;k[v]=w.rect[v];var n=o.rangeSelector.colorSelectedRange||"blue";var u=o.rangeSelector.colorUnselectedRange||"white";var l=o.rangeSelector.colorRangeLine||"grey";var q=[];q.push(s.renderer.rect(k.x,k.y,k.width,k.height,{fill:n,opacity:0.1}));if(!b){q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}))}else{q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y+k.height),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(k.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(k.y+k.height),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y+k.height),{stroke:l,opacity:0.5}))}s.renderer.refresh();var t=p.getImageData(d.x,d.y,d.width,d.height);var C=h.getContext("2d");C.putImageData(t,parseInt(m.css("left")),parseInt(m.css("top")),1,1,d.width,d.height);for(var z=0;z<q.length;z++){s.renderer.removeElement(q[z])}s.renderer.refresh()}return true},refresh:function(){this._internalRefresh()},update:function(){this._isUpdate=true;this._internalRefresh()},_seriesTypes:["line","stackedline","stackedline100","spline","stackedspline","stackedspline100","stepline","stackedstepline","stackedstepline100","area","stackedarea","stackedarea100","splinearea","stackedsplinearea","stackedsplinearea100","steparea","stackedsteparea","stackedsteparea100","rangearea","splinerangearea","steprangearea","column","stackedcolumn","stackedcolumn100","rangecolumn","scatter","stackedscatter","stackedscatter100","bubble","stackedbubble","stackedbubble100","pie","donut","candlestick","ohlc","waterfall","stackedwaterfall"],clear:function(){var b=this;for(var c in b._defaultSettings){b[c]=b._defaultSettings[c]}b.title="";b.description="";b.refresh()},_validateSeriesGroups:function(){if(!a.isArray(this.seriesGroups)){throw"Invalid property: 'seriesGroups' property is required and must be a valid array."}for(var b=0;b<this.seriesGroups.length;b++){var c=this.seriesGroups[b];if(!c.type){throw"Invalid property: Each series group must have a valid 'type' property."}if(!a.isArray(c.series)){throw"Invalid property: Each series group must have a 'series' property which must be a valid array."}}},_render:function(C){var m=this;var I=m.renderer;m._validateSeriesGroups();m._colorsCache.clear();if(!m._isToggleRefresh&&m._isUpdate&&m._renderData){m._renderDataClone()}m._renderData=[];I.clear();m._unselect();m._hideToolTip(0);var n=m.backgroundImage;if(n==undefined||n==""){m.host.css({"background-image":""})}else{m.host.css({"background-image":(n.indexOf("(")!=-1?n:"url('"+n+"')")})}m._rect=C;var Y=m.padding||{left:5,top:5,right:5,bottom:5};var q=I.createClipRect(C);var L=I.beginGroup();I.setClip(L,q);var ai=I.rect(C.x,C.y,C.width-2,C.height-2);if(n==undefined||n==""){I.attr(ai,{fill:m.backgroundColor||m.background||"white"})}else{I.attr(ai,{fill:"transparent"})}if(m.showBorderLine!=false){var F=m.borderLineColor==undefined?m.borderColor:m.borderLineColor;if(F==undefined){F=m._defaultLineColor}var o=this.borderLineWidth;if(isNaN(o)||o<0||o>10){o=1}I.attr(ai,{"stroke-width":o,stroke:F})}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){I.attr(ai,{"stroke-width":1,stroke:m.backgroundColor||"white"})}}if(a.isFunction(m.drawBefore)){m.drawBefore(I,C)}var V={x:Y.left,y:Y.top,width:C.width-Y.left-Y.right,height:C.height-Y.top-Y.bottom};m._paddedRect=V;var e=m.titlePadding||{left:2,top:2,right:2,bottom:2};var l;if(m.title&&m.title.length>0){var S=m.toThemeProperty("jqx-chart-title-text",null);l=I.measureText(m.title,0,{"class":S});I.text(m.title,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":S},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.description&&m.description.length>0){var T=m.toThemeProperty("jqx-chart-title-description",null);l=I.measureText(m.description,0,{"class":T});I.text(m.description,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":T},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.title||m.description){V.y+=(e.bottom+e.top);V.height-=(e.bottom+e.top)}var b={x:V.x,y:V.y,width:V.width,height:V.height};m._plotRect=b;m._buildStats(b);var H=m._isPieOnlySeries();var s=m.seriesGroups;var E;var D={xAxis:{},valueAxis:{}};for(var Z=0;Z<s.length&&!H;Z++){if(s[Z].type=="pie"||s[Z].type=="donut"){continue}var z=m._getXAxis(Z);if(!z){throw"seriesGroup["+Z+"] is missing xAxis definition"}var ae=z==m._getXAxis()?-1:Z;D.xAxis[ae]=0}var U=m.axisPadding;if(isNaN(U)){U=5}var r={left:0,right:0,leftCount:0,rightCount:0};var p=[];for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.type=="pie"||ad.type=="donut"||ad.spider==true||ad.polar==true){p.push({width:0,position:0,xRel:0});continue}E=ad.orientation=="horizontal";var z=m._getXAxis(Z);var ae=z==m._getXAxis()?-1:Z;var k=m._getValueAxis(Z);var O=k==m._getValueAxis()?-1:Z;var R=!E?k.axisSize:z.axisSize;var f={x:0,y:b.y,width:b.width,height:b.height};var Q=E?m._getXAxis(Z).position:k.position;if(!R||R=="auto"){if(E){R=this._renderXAxis(Z,f,true,b).width;if((D.xAxis[ae]&1)==1){R=0}else{if(R>0){D.xAxis[ae]|=1}}}else{R=m._renderValueAxis(Z,f,true,b).width;if((D.valueAxis[O]&1)==1){R=0}else{if(R>0){D.valueAxis[O]|=1}}}}if(Q!="left"&&m.rtl==true){Q="right"}if(Q!="right"){Q="left"}if(r[Q+"Count"]>0&&r[Q]>0&&R>0){r[Q]+=U}p.push({width:R,position:Q,xRel:r[Q]});r[Q]+=R;r[Q+"Count"]++}var u=Math.max(1,Math.max(C.width,C.height));var ac={top:0,bottom:0,topCount:0,bottomCount:0};var W=[];for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.type=="pie"||ad.type=="donut"||ad.spider==true||ad.polar==true){W.push({height:0,position:0,yRel:0});continue}E=ad.orientation=="horizontal";var k=this._getValueAxis(Z);var O=k==m._getValueAxis()?-1:Z;var z=m._getXAxis(Z);var ae=z==m._getXAxis()?-1:Z;var ab=!E?z.axisSize:k.axisSize;var Q=E?k.position:z.position;if(!ab||ab=="auto"){if(E){ab=m._renderValueAxis(Z,{x:0,y:0,width:u,height:0},true,b).height;if((D.valueAxis[O]&2)==2){ab=0}else{if(ab>0){D.valueAxis[O]|=2}}}else{ab=m._renderXAxis(Z,{x:0,y:0,width:u,height:0},true).height;if((D.xAxis[ae]&2)==2){ab=0}else{if(ab>0){D.xAxis[ae]|=2}}}}if(Q!="top"){Q="bottom"}if(ac[Q+"Count"]>0&&ac[Q]>0&&ab>0){ac[Q]+=U}W.push({height:ab,position:Q,yRel:ac[Q]});ac[Q]+=ab;ac[Q+"Count"]++}m._createAnimationGroup("series");var t=(m.showLegend!=false);var B=!t?{width:0,height:0}:m._renderLegend(m.legendLayout?m._rect:V,true);if(this.legendLayout&&(!isNaN(this.legendLayout.left)||!isNaN(this.legendLayout.top))){B={width:0,height:0}}if(V.height<ac.top+ac.bottom+B.height||V.width<r.left+r.right){I.endGroup();return}b.height-=ac.top+ac.bottom+B.height;b.x+=r.left;b.width-=r.left+r.right;b.y+=ac.top;var G=[];if(!H){var af=m._getXAxis().tickMarksColor||m._defaultLineColor;for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.polar==true||ad.spider==true||ad.type=="pie"||ad.type=="donut"){continue}E=ad.orientation=="horizontal";var ae=m._getXAxis(Z)==m._getXAxis()?-1:Z;var O=m._getValueAxis(Z)==m._getValueAxis()?-1:Z;var f={x:b.x,y:0,width:b.width,height:W[Z].height};if(W[Z].position!="top"){f.y=b.y+b.height+W[Z].yRel}else{f.y=b.y-W[Z].yRel-W[Z].height}if(E){if((D.valueAxis[O]&4)==4){continue}if(!m._isGroupVisible(Z)){continue}m._renderValueAxis(Z,f,false,b);D.valueAxis[O]|=4}else{G.push(f);if((D.xAxis[ae]&4)==4){continue}if(!m._isGroupVisible(Z)){continue}m._renderXAxis(Z,f,false,b);D.xAxis[ae]|=4}}}if(t){var A=m.legendLayout?m._rect:V;var P=V.x+a.jqx._ptrnd((V.width-B.width)/2);var N=b.y+b.height+ac.bottom;var R=V.width;var ab=B.height;if(m.legendLayout){if(!isNaN(m.legendLayout.left)){P=m.legendLayout.left}if(!isNaN(m.legendLayout.top)){N=m.legendLayout.top}if(!isNaN(m.legendLayout.width)){R=m.legendLayout.width}if(!isNaN(m.legendLayout.height)){ab=m.legendLayout.height}}if(P+R>A.x+A.width){R=A.x+A.width-P}if(N+ab>A.y+A.height){ab=A.y+A.height-N}m._renderLegend({x:P,y:N,width:R,height:ab})}m._hasHorizontalLines=false;if(!H){for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.polar==true||ad.spider==true||ad.type=="pie"||ad.type=="donut"){continue}E=s[Z].orientation=="horizontal";var f={x:b.x-p[Z].xRel-p[Z].width,y:b.y,width:p[Z].width,height:b.height};if(p[Z].position!="left"){f.x=b.x+b.width+p[Z].xRel}var ae=m._getXAxis(Z)==m._getXAxis()?-1:Z;var O=m._getValueAxis(Z)==m._getValueAxis()?-1:Z;if(E){G.push(f);if((D.xAxis[ae]&8)==8){continue}if(!m._isGroupVisible(Z)){continue}m._renderXAxis(Z,f,false,b);D.xAxis[ae]|=8}else{if((D.valueAxis[O]&8)==8){continue}if(!m._isGroupVisible(Z)){continue}m._renderValueAxis(Z,f,false,b);D.valueAxis[O]|=8}}}if(b.width<=0||b.height<=0){return}m._plotRect={x:b.x,y:b.y,width:b.width,height:b.height};for(Z=0;Z<s.length;Z++){this._drawPlotAreaLines(Z,true,{gridLines:false,tickMarks:false,alternatingBackground:true});this._drawPlotAreaLines(Z,false,{gridLines:false,tickMarks:false,alternatingBackground:true})}for(Z=0;Z<s.length;Z++){this._drawPlotAreaLines(Z,true,{gridLines:true,tickMarks:true,alternatingBackground:false});this._drawPlotAreaLines(Z,false,{gridLines:true,tickMarks:true,alternatingBackground:false})}var K=false;for(Z=0;Z<s.length&&!K;Z++){var ad=s[Z];if(ad.annotations!==undefined||a.isFunction(ad.draw)||a.isFunction(ad.drawBefore)){K=true;break}}var M=I.beginGroup();if(!K){var J=I.createClipRect({x:b.x-2,y:b.y,width:b.width+4,height:b.height});I.setClip(M,J)}for(Z=0;Z<s.length;Z++){var ad=s[Z];var c=false;for(var ag in m._seriesTypes){if(m._seriesTypes[ag]==ad.type){c=true;break}}if(!c){throw'Invalid serie type "'+ad.type+'"'}if(a.isFunction(ad.drawBefore)){ad.drawBefore(I,C,Z,this)}if(ad.polar==true||ad.spider==true){if(ad.type.indexOf("pie")==-1&&ad.type.indexOf("donut")==-1){m._renderSpiderAxis(Z,b)}}m._renderAxisBands(Z,b,true);m._renderAxisBands(Z,b,false)}for(Z=0;Z<s.length;Z++){var ad=s[Z];if(m._isColumnType(ad.type)){m._renderColumnSeries(Z,b)}else{if(ad.type.indexOf("pie")!=-1||ad.type.indexOf("donut")!=-1){m._renderPieSeries(Z,b)}else{if(ad.type.indexOf("line")!=-1||ad.type.indexOf("area")!=-1){m._renderLineSeries(Z,b)}else{if(ad.type.indexOf("scatter")!=-1||ad.type.indexOf("bubble")!=-1){m._renderScatterSeries(Z,b)}else{if(ad.type.indexOf("candlestick")!=-1||ad.type.indexOf("ohlc")!=-1){m._renderCandleStickSeries(Z,b,ad.type.indexOf("ohlc")!=-1)}}}}}if(ad.annotations){if(!this._moduleAnnotations){throw"Please include 'jqxchart.annotations.js'"}for(var X=0;X<ad.annotations.length;X++){m._renderAnnotation(Z,ad.annotations[X],b)}}if(a.isFunction(ad.draw)){m.draw(I,C,Z,this)}}I.endGroup();if(m.enabled==false){var aa=I.rect(C.x,C.y,C.width,C.height);I.attr(aa,{fill:"#777777",opacity:0.5,stroke:"#00FFFFFF"})}if(a.isFunction(m.draw)){m.draw(I,C)}I.endGroup();m._startAnimation("series");if(m._credits){m._credits()}var ah=false;for(var Z=0;Z<m.seriesGroups.length&&!ah;Z++){var z=m._getXAxis(Z);if(z&&z.rangeSelector){ah=true}}if(ah){if(!this._moduleRangeSelector){throw"Please include 'jqxchart.rangeselector.js'"}var d=[];if(!this._isSelectorRefresh){m.removeHandler(a(document),m._getEvent("mousemove"),m._onSliderMouseMove);m.removeHandler(a(document),m._getEvent("mousedown"),m._onSliderMouseDown);m.removeHandler(a(document),m._getEvent("mouseup"),m._onSliderMouseUp)}if(!m._isSelectorRefresh){m._rangeSelectorInstances={}}for(Z=0;Z<m.seriesGroups.length;Z++){var v=this._getXAxis(Z);if(d.indexOf(v)==-1){if(this._renderXAxisRangeSelector(Z,G[Z])){d.push(v)}}}}},_credits:function(){if(a.jqx.credits!=="12F129D4-0E1B-44B8-9BBB-BB4CF78CC6BA"){var c=this;var d=String.fromCharCode(119,119,119,46,106,113,119,105,100,103,101,116,115,46,99,111,109);if(!c._isRangeSelectorInstance&&location.hostname.indexOf(d.substring(4))==-1){var g=c.renderer;var f=c._rect;var h={"class":c.toThemeProperty("jqx-chart-legend-text",null),opacity:0.5};var e=g.measureText(d,0,h);var b=g.text(d,f.x+f.width-e.width-5,f.y+f.height-e.height-5,e.width,e.height,0,h);a(b).on("click",function(){location.href="http://"+d+"/?ref="+c.widgetName})}}},_isPieOnlySeries:function(){var c=this.seriesGroups;if(c.length==0){return false}for(var b=0;b<c.length;b++){if(c[b].type!="pie"&&c[b].type!="donut"){return false}}return true},_renderChartLegend:function(V,C,S,v){var l=this;var D=l.renderer;var I={x:C.x,y:C.y,width:C.width,height:C.height};var N=3;if(I.width>=2*N){I.x+=N;I.width-=2*N}if(I.height>=2*N){I.y+=N;I.height-=2*N}var E={width:I.width,height:0};var G=0,F=0;var p=20;var m=0;var f=10;var Q=10;var w=0;for(var P=0;P<V.length;P++){var J=V[P].css;if(!J){J=l.toThemeProperty("jqx-chart-legend-text",null)}p=20;var A=V[P].text;var j=D.measureText(A,0,{"class":J});if(j.height>p){p=j.height}if(j.width>w){w=j.width}if(v){if(P!=0){F+=p}if(F>I.height){F=0;G+=w+2*Q+f;w=j.width;E.width=G+w}}else{if(G!=0){G+=Q}if(G+2*f+j.width>I.width&&j.width<I.width){G=0;F+=p;p=20;m=I.width;E.height=F+p}}var K=false;if(j.width>I.width){K=true;var s=I.width;var T=A;var X=T.split(/\s+/);var o=[];var q="";for(var M=0;M<X.length;M++){var k=q+((q.length>0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q});q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q})}}j.width=0;var c=0;for(var H=0;H<o.length;H++){var W=o[H].text;var B=l.renderer.measureText(W,0,{"class":J});j.width=Math.max(j.width,B.width);c+=j.height}j.height=c}var z=(G+j.width<I.width)&&(F+j.height<C.height);if(l.legendLayout){var z=I.x+G+j.width<l._rect.x+l._rect.width&&I.y+F+j.height<l._rect.y+l._rect.height}if(!S&&z){var h=V[P].seriesIndex;var n=V[P].groupIndex;var b=V[P].itemIndex;var Y=V[P].fillColor;var U=V[P].lineColor;var e=l._isSerieVisible(n,h,b);var R=D.beginGroup();var O=e?V[P].opacity:0.1;if(K){var T=A;var s=I.width;var X=T.split(/\s+/);var u="";var d=0;var o=[];var q="";for(var M=0;M<X.length;M++){var k=q+((q.length>0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q,dy:d});d+=B.height;q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q,dy:d})}}for(var H=0;H<o.length;H++){var W=o[H].text;d=o[H].dy;var B=l.renderer.measureText(W,0,{"class":J});if(v){l.renderer.text(W,I.x+G+1.5*f,I.y+F+d,j.width,p,0,{"class":J},false,"left","center")}else{l.renderer.text(W,I.x+G+1.5*f,I.y+F+d,j.width,p,0,{"class":J},false,"center","center")}}var L=D.rect(I.x+G,I.y+F+f/2+d/2,f,f);if(v){F+=d}l.renderer.attr(L,{fill:Y,"fill-opacity":O,stroke:U,"stroke-width":1,"stroke-opacity":V[P].opacity})}else{var L=D.rect(I.x+G,I.y+F+f/2,f,f);l.renderer.attr(L,{fill:Y,"fill-opacity":O,stroke:U,"stroke-width":1,"stroke-opacity":V[P].opacity});if(v){l.renderer.text(A,I.x+G+1.5*f,I.y+F,j.width,j.height+f/2,0,{"class":J},false,"left","center")}else{l.renderer.text(A,I.x+G+1.5*f,I.y+F,j.width,p,0,{"class":J},false,"center","center")}}l.renderer.endGroup();l._setLegendToggleHandler(n,h,b,R)}if(v){}else{G+=j.width+2*f;if(m<G){m=G}}}if(S){E.height=a.jqx._ptrnd(F+p+5);E.width=a.jqx._ptrnd(m);return E}},isSerieVisible:function(d,b,c){return this._isSerieVisible(d,b,c)},_isSerieVisible:function(f,b,d){while(this._itemsToggleState.length<f+1){this._itemsToggleState.push([])}var e=this._itemsToggleState[f];while(e.length<b+1){e.push(isNaN(d)?true:[])}var c=e[b];if(isNaN(d)){return c}if(!a.isArray(c)){e[b]=c=[]}while(c.length<d+1){c.push(true)}return c[d]},isGroupVisible:function(b){return this._isGroupVisible(b)},_isGroupVisible:function(e){var d=false;var c=this.seriesGroups[e].series;if(!c){return d}for(var b=0;b<c.length;b++){if(this._isSerieVisible(e,b)){d=true;break}}return d},_toggleSerie:function(h,b,e,c){var g=!this._isSerieVisible(h,b,e);if(c!=undefined){g=c}var i=this.seriesGroups[h];var f=i.series[b];this._raiseEvent("toggle",{state:g,seriesGroup:i,serie:f,elementIndex:e});if(isNaN(e)){this._itemsToggleState[h][b]=g}else{var d=this._itemsToggleState[h][b];if(!a.isArray(d)){d=[]}while(d.length<e){d.push(true)}d[e]=g}this._isToggleRefresh=true;this.update();this._isToggleRefresh=false},showSerie:function(d,b,c){this._toggleSerie(d,b,c,true)},hideSerie:function(d,b,c){this._toggleSerie(d,b,c,false)},_setLegendToggleHandler:function(j,c,h,e){var i=this.seriesGroups[j];var f=i.series[c];var b=f.enableSeriesToggle;if(b==undefined){b=i.enableSeriesToggle!=false}if(b){var d=this;this.renderer.addHandler(e,"click",function(g){d._toggleSerie(j,c,h)})}},_renderLegend:function(c,e){var o=this;var d=[];for(var v=0;v<o.seriesGroups.length;v++){var t=o.seriesGroups[v];if(t.showLegend==false){continue}for(var q=0;q<t.series.length;q++){var m=t.series[q];if(m.showLegend==false){continue}var u=o._getSerieSettings(v,q);var p;if(t.type=="pie"||t.type=="donut"){var k=o._getXAxis(v);var h=m.legendFormatSettings||t.legendFormatSettings||k.formatSettings||m.formatSettings||t.formatSettings;var n=m.legendFormatFunction||t.legendFormatFunction||k.formatFunction||m.formatFunction||t.formatFunction;var j=o._getDataLen(v);for(var r=0;r<j;r++){p=o._getDataValue(r,m.displayText,v);p=o._formatValue(p,h,n,v,q,r);var l=o._getColors(v,q,r);d.push({groupIndex:v,seriesIndex:q,itemIndex:r,text:p,css:m.displayTextClass,fillColor:l.fillColor,lineColor:l.lineColor,opacity:u.opacity})}continue}var h=m.legendFormatSettings||t.legendFormatSettings;var n=m.legendFormatFunction||t.legendFormatFunction;p=o._formatValue(m.displayText||m.dataField||"",h,n,v,q,NaN);var l=o._getSeriesColors(v,q);var f=this._get([m.legendFillColor,m.legendColor,l.fillColor]);var b=this._get([m.legendLineColor,m.legendColor,l.lineColor]);d.push({groupIndex:v,seriesIndex:q,text:p,css:m.displayTextClass,fillColor:f,lineColor:b,opacity:u.opacity})}}return o._renderChartLegend(d,c,e,(o.legendLayout&&o.legendLayout.flow=="vertical"))},_getInterval:function(d,c){if(!d){return c}var b=this._get([d.unitInterval,c]);if(!isNaN(d.step)){b=d.step*c}return b},_getOffsets:function(u,d,n,t,r,l,g,e,k){var s=this._getInterval(r[u],e);var m=[];if(u==""||(r[u].visible&&r[u].visible!="custom")){m=this._generateIntervalValues(t,s,e,g,k)}var f;if(u!="labels"){var j=g?l.left:0;if(!g&&e>1){j=l.left*(e+1)}if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,false,j);if(!g){var o=(l.left+l.right)*s/e;if(d.flip){f.unshift(f[0]+o)}else{f.push(f[f.length-1]+o)}}}else{var j=l.left;if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,g,j)}var q=this._arraysToObjectsArray([m,f],["value","offset"]);if(d[u]&&d[u].custom){var h=this._objectsArraysToArray(d[u].custom,"value");var c=this._objectsArraysToArray(d[u].custom,"offset");var b=this._valuesToOffsets(h,d,t,n,l,g,l.left);for(var p=0;p<d[u].custom.length;p++){q.push({value:h[p],offset:isNaN(c[p])?b[p]:c[p]})}}return q},_renderXAxis:function(d,z,R,c){var f=this;var r=f._getXAxis(d);var Q=f.seriesGroups[d];var X=Q.orientation=="horizontal";var H={width:0,height:0};var P=f._getAxisSettings(r);if(!r||!P.visible||Q.type=="spider"){return H}if(!f._isGroupVisible(d)||this._isPieGroup(d)){return H}var W=f._alignValuesWithTicks(d);while(f._renderData.length<d+1){f._renderData.push({})}if(f.rtl){r.flip=true}var B=X?z.height:z.width;var w=r.text;var t=f._calculateXOffsets(d,B);var T=t.axisStats;var j=r.rangeSelector;var F=0;if(j){if(!this._moduleRangeSelector){throw"Please include 'jqxchart.rangeselector.js'"}F=this._selectorGetSize(r)}var E=(X&&r.position=="right")||(!X&&r.position=="top");if(!R&&j){if(X){z.width-=F;if(r.position!="right"){z.x+=F}}else{z.height-=F;if(r.position=="top"){z.y+=F}}}var k={rangeLength:t.rangeLength,itemWidth:t.itemWidth,intervalWidth:t.intervalWidth,data:t,settings:P,isMirror:E,rect:z};f._renderData[d].xAxis=k;var G=T.interval;if(isNaN(G)){return H}if(X){P.title.angle-=90;P.labels.angle-=90}var m=this._getInterval(P.gridLines,G);var K=this._getInterval(P.tickMarks,G);var C=this._getInterval(P.labels,G);var L;var V=T.min;var s=T.max;var N=t.padding;var S=r.flip==true||f.rtl;var h={min:V,max:s};if(T.logAxis.enabled){h.min=T.logAxis.minPow;h.max=T.logAxis.maxPow}if(r.type=="date"){P.gridLines.offsets=this._generateDTOffsets(V,s,B,N,m,G,T.dateTimeUnit,W,NaN,false,S);P.tickMarks.offsets=this._generateDTOffsets(V,s,B,N,K,G,T.dateTimeUnit,W,NaN,false,S);L=this._generateDTOffsets(V,s,B,N,C,G,T.dateTimeUnit,W,NaN,true,S)}else{P.gridLines.offsets=this._getOffsets("gridLines",r,B,T,P,N,W,G);P.tickMarks.offsets=this._getOffsets("tickMarks",r,B,T,P,N,W,G);L=this._getOffsets("labels",r,B,T,P,N,W,G)}var n=f.renderer.getRect();var l=n.width-z.x-z.width;var p=f._getDataLen(d);var o;if(f._elementRenderInfo&&f._elementRenderInfo.length>d){o=f._elementRenderInfo[d].xAxis}var q=[];var J;if(P.labels.formatFunction){J=P.labels.formatFunction}var v;if(P.labels.formatSettings){v=a.extend({},P.labels.formatSettings)}if(r.type=="date"){if(r.dateFormat&&!J){if(v){v.dateFormat=v.dateFormat||r.dateFormat}else{v={dateFormat:r.dateFormat}}}else{if(!J&&(!v||(v&&!v.dateFormat))){J=this._getDefaultDTFormatFn(r.baseUnit||"day")}}}for(var O=0;O<L.length;O++){var M=L[O].value;var I=L[O].offset;if(isNaN(I)){continue}var U=undefined;if(r.type!="date"&&T.useIndeces&&r.dataField){U=Math.round(M);M=f._getDataValue(U,r.dataField);if(M==undefined){M=""}}var w=f._formatValue(M,v,J,d,undefined,U);if(w==undefined||w.toString()==""){if(isNaN(U)){U=O}if(U>=T.filterRange.min&&U<=T.filterRange.max){w=T.useIndeces?(T.min+U).toString():(M==undefined?"":M.toString())}}var b={key:M,text:w,targetX:I,x:I};if(o&&o.itemOffsets[M]){b.x=o.itemOffsets[M].x;b.y=o.itemOffsets[M].y}q.push(b)}var D=f._getAnimProps(d);var u=D.enabled&&q.length<500?D.duration:0;if(f.enableAxisTextAnimation==false){u=0}var A={items:q,renderData:k};var e=f._renderAxis(X,E,P,{x:z.x,y:z.y,width:z.width,height:z.height},c,G,false,true,A,R,u);if(X){e.width+=F}else{e.height+=F}return e},_animateAxisText:function(f,h){var c=f.items;var d=f.textSettings;for(var e=0;e<c.length;e++){var g=c[e];if(!g){continue}if(!g.visible){continue}var b=g.targetX;var j=g.targetY;if(!isNaN(g.x)&&!isNaN(g.y)){b=g.x+(b-g.x)*h;j=g.y+(j-g.y)*h}if(g.element){this.renderer.removeElement(g.element);g.element=undefined}g.element=this.renderer.text(g.text,b,j,g.width,g.height,d.angle,{"class":d.style},false,d.halign,d.valign,d.textRotationPoint)}},_getPolarAxisCoords:function(e,b){var i=this.seriesGroups[e];var p=b.x+a.jqx.getNum([i.offsetX,b.width/2]);var o=b.y+a.jqx.getNum([i.offsetY,b.height/2]);var k=Math.min(b.width,b.height);var f=i.radius;if(this._isPercent(f)){f=parseFloat(f)/100*k/2}if(isNaN(f)){f=k/2*0.6}var h=this._alignValuesWithTicks(e);var n=this._get([i.startAngle,i.minAngle,0])-90;if(isNaN(n)){n=0}else{n=2*Math.PI*n/360}var m=this._get([i.endAngle,i.maxAngle,360])-90;if(isNaN(m)){m=2*Math.PI}else{m=2*Math.PI*m/360}if(n>m){var l=n;n=m;m=l}var t=a.jqx._rnd(Math.abs(n-m)/(Math.PI*2),0.001,true);var q=Math.PI*2*f*t;var g=this._calcGroupOffsets(e,b).xoffsets;if(!g){return}var j=!(Math.abs(Math.abs(m-n)-Math.PI*2)>0.00001);if(i.spider){axisStats=this._getXAxisStats(e,this._getXAxis(e),q);var r=axisStats.interval;if(isNaN(r)||r==0){r=1}var d=(axisStats.max-axisStats.min)/r+(j?1:0);d=Math.round(d);if(d>2){var c=Math.cos(Math.abs(m-n)/2/d);c=a.jqx._rnd(c,0.01);if(c==0){c=1}var s=f/c;if(s>f&&h){f=s}}}f=a.jqx._ptrnd(f);return{x:p,y:o,r:f,adjR:this._get([s,f]),itemWidth:g.itemWidth,rangeLength:g.rangeLength,valuesOnTicks:h,startAngle:n,endAngle:m,isClosedCircle:j,axisSize:q}},_toPolarCoord:function(j,f,h,e){var c=Math.abs(j.startAngle-j.endAngle)/(Math.PI*2);var b=(h-f.x)*2*Math.PI*c/Math.max(1,f.width)+j.startAngle;var d=((f.height+f.y)-e)*j.r/Math.max(1,f.height);var i=j.x+d*Math.cos(b);var g=j.y+d*Math.sin(b);return{x:a.jqx._ptrnd(i),y:a.jqx._ptrnd(g)}},_renderSpiderAxis:function(A,k){var ap=this;var g=ap._getXAxis(A);var aB=this._getAxisSettings(g);if(!g||!aB.visible){return}var X=ap.seriesGroups[A];var S=ap._getPolarAxisCoords(A,k);if(!S){return}var M=a.jqx._ptrnd(S.x);var L=a.jqx._ptrnd(S.y);var t=S.adjR;var Y=S.startAngle;var W=S.endAngle;if(t<1){return}var aw=a.jqx._rnd(Math.abs(Y-W)/(Math.PI*2),0.001,true);var h=Math.PI*2*t*aw;var c=S.isClosedCircle;var w=this._renderData[A].xoffsets;if(!w.rangeLength){return}var T=w.axisStats.interval;if(isNaN(T)||T<1){T=1}var at=X.orientation=="horizontal";var aa=(at&&g.position=="right")||(!at&&g.position=="top");while(ap._renderData.length<A+1){ap._renderData.push({})}var au={rangeLength:w.rangeLength,itemWidth:w.itemWidth,data:w,rect:k,settings:aB};ap._renderData[A].xAxis=au;ap._renderData[A].polarCoords=S;var az=true;for(var R=0;R<A;R++){var B=ap._renderData[R].xAxis;var b=ap._renderData[R].polarCoords;var E=ap._getXAxis(R);var V=false;for(var P in S){if(S[P]!=b[P]){V=true;break}}if(!V||E!=g){az=false}}var e=aB.gridLines;var U=aB.tickMarks;var z=aB.labels;var ad=this._getInterval(e,T);var aE=this._getInterval(U,T);var an=this._getInterval(z,T);var H=ap._alignValuesWithTicks(A);var ae=ap.renderer;var ai;var af=w.axisStats;var aD=af.min;var r=af.max;var u=this._getPaddingSize(w.axisStats,g,H,h,true,c,false);var aj=g.flip==true||ap.rtl;if(g.type=="date"){e.offsets=this._generateDTOffsets(aD,r,h,u,ad,T,g.baseUnit,true,0,false,aj);U.offsets=this._generateDTOffsets(aD,r,h,u,aE,T,g.baseUnit,true,0,false,aj);ai=this._generateDTOffsets(aD,r,h,u,an,T,g.baseUnit,true,0,true,aj)}else{aB.gridLines.offsets=this._getOffsets("gridLines",g,h,af,aB,u,true,T);aB.tickMarks.offsets=this._getOffsets("tickMarks",g,h,af,aB,u,true,T);ai=this._getOffsets("labels",g,h,af,aB,u,true,T)}var ak=ap.renderer.getRect();var ax=ak.width-k.x-k.width;var ah=ap._getDataLen(A);var s;if(ap._elementRenderInfo&&ap._elementRenderInfo.length>A){s=ap._elementRenderInfo[A].xAxis}var ar=[];var ag=this._getDataLen(A);for(var R=0;R<ai.length;R++){var G=ai[R].offset;var I=ai[R].value;if(g.type!="date"&&af.useIndeces&&g.dataField){var ay=Math.round(I);if(ay>=ag){continue}I=ap._getDataValue(ay,g.dataField);if(I==undefined){I=""}}var aq=ap._formatValue(I,z.formatSettings,z.formatFunction,A,undefined,ay);if(aq==undefined||aq.toString()==""){aq=af.useIndeces?(af.min+R).toString():(I==undefined?"":I.toString())}var d={key:I,text:aq,targetX:G,x:G};if(s&&s.itemOffsets[I]){d.x=s.itemOffsets[I].x;d.y=s.itemOffsets[I].y}ar.push(d)}var aA={items:ar,renderData:au};var l={stroke:e.color,fill:"none","stroke-width":e.width,"stroke-dasharray":e.dashStyle||""};if(!X.spider){if(aw==1){ae.circle(M,L,t,l)}else{var F=-Y/Math.PI*180;var aF=-W/Math.PI*180;this.renderer.pieslice(M,L,0,t,Math.min(F,aF),Math.max(F,aF),undefined,l)}}var N=ar.length;var m=2*Math.PI/(N);var am=Y;var f,D;if(e.visible&&az){if(!H&&!c){e.offsets.unshift({offset:-u.right})}for(var R=0;R<e.offsets.length;R++){var n=e.offsets[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}var q=a.jqx._ptrnd(M+t*Math.cos(C));var p=a.jqx._ptrnd(L+t*Math.sin(C));ae.line(M,L,q,p,l)}}if(U.visible&&az){var Q=5;var o={stroke:U.color,fill:"none","stroke-width":U.width,"stroke-dasharray":U.dashStyle||""};if(!H&&!c){U.offsets.unshift({offset:-u.right})}for(var R=0;R<U.offsets.length;R++){var n=U.offsets[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}var ac={x:M+t*Math.cos(C),y:L+t*Math.sin(C)};var ab={x:M+(t+Q)*Math.cos(C),y:L+(t+Q)*Math.sin(C)};ae.line(a.jqx._ptrnd(ac.x),a.jqx._ptrnd(ac.y),a.jqx._ptrnd(ab.x),a.jqx._ptrnd(ab.y),o)}}var ao=[];if(X.spider){var v=[];if(g.type=="date"){v=this._generateDTOffsets(aD,r,h,u,T,T,g.baseUnit,true,0,false,aj)}else{v=this._getOffsets("",g,h,af,aB,u,true,T)}if(!H&&!c){v.unshift({offset:-u.right})}for(var R=0;R<v.length;R++){var n=v[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}ao.push(C)}au.offsetAngles=ao}var Z=ap._renderSpiderValueAxis(A,k,(H?S.adjR:S.r),ao);if(!Z){Z=[]}if(X.spider){if(!H){for(var R=0;R<Z.length;R++){Z[R]=Z[R]*S.adjR/S.r}}Z.push(t);this._renderSpiderLines(M,L,Z,S,ao,l)}if(az&&z.visible){au.polarLabels=[];for(var R=0;R<ar.length;R++){var n=ar[R].x;var C=am+n*2*Math.PI*aw/Math.max(1,h);C=(360-C/(2*Math.PI)*360)%360;if(C<0){C=360+C}var al=ae.measureText(ar[R].text,0,{"class":aB.labels.style});var O=(H?S.adjR:S.r)+(U.visible?7:2);var av=aB.labels;var aC;if(av.autoRotate){var K=a.jqx._ptRotate(M-al.width/2,L-O-al.height,M,L,-C/180*Math.PI);var J=a.jqx._ptRotate(M+al.width/2,L-O,M,L,-C/180*Math.PI);al.width=Math.abs(K.x-J.x);al.height=Math.abs(K.y-J.y);aC={x:Math.min(K.x,J.x),y:Math.min(K.y,J.y)}}else{aC=this._adjustTextBoxPosition(M,L,al,O,C,false,false,false)}au.polarLabels.push({x:aC.x,y:aC.y,value:ar[R].text});ae.text(ar[R].text,aC.x,aC.y,al.width,al.height,av.autoRotate?90-C:av.angle,{"class":av.style},false,av.halign,av.valign)}}},_renderSpiderLines:function(h,f,u,m,e,b){var p=this.renderer;var q=m.startAngle;var o=m.endAngle;var g=m.isClosedCircle;for(var r=0;r<u.length;r++){var d=u[r];var c=undefined,n=undefined;for(var s=0;s<e.length;s++){var t=e[s];var l=a.jqx._ptrnd(h+d*Math.cos(t));var k=a.jqx._ptrnd(f+d*Math.sin(t));if(c){p.line(c.x,c.y,l,k,b)}c={x:l,y:k};if(!n){n={x:l,y:k}}}if(n&&g){p.line(c.x,c.y,n.x,n.y,b)}}},_renderSpiderValueAxis:function(e,D,T,S){var k=this;var u=this.seriesGroups[e];var E=this._getPolarAxisCoords(e,D);if(!E){return}var P=a.jqx._ptrnd(E.x);var O=a.jqx._ptrnd(E.y);T=T||E.r;var g=E.startAngle;var Z=E.endAngle;var X=a.jqx._rnd(Math.abs(g-Z)/(Math.PI*2),0.001,true);if(T<1){return}T=a.jqx._ptrnd(T);var f=this._getValueAxis(e);settings=this._getAxisSettings(f);if(!f||false==settings.visible){return}var L=this._stats.seriesGroups[e].mu;var A=settings.labels;var z=A.formatSettings;var c=u.type.indexOf("stacked")!=-1&&u.type.indexOf("100")!=-1;if(c&&!z){z={sufix:"%"}}var v=this._get([A.step,A.unitInterval/L]);if(isNaN(v)){v=1}v=Math.max(1,Math.round(v));this._calcValueAxisItems(e,T,v);var d=settings.gridLines;var B=settings.tickMarks;var r=this._getInterval(d,L);var Q=this._getInterval(B,L);var m=settings.labels;var l={stroke:d.color,fill:"none","stroke-width":1,"stroke-dasharray":d.dashStyle||""};var p=this._renderData[e].valueAxis;var w=p.items;var t=g;if(w.length&&settings.line.visible){if(!isNaN(settings.line.angle)){t=2*Math.PI*settings.line.angle/360}var o=P+Math.cos(t)*T;var ac=O+Math.sin(t)*T;if(S.indexOf(t)==-1){var V=a.extend({},l);V["stroke-width"]=settings.line.lineWidth;V.stroke=settings.line.color;V["stroke-dasharray"]=settings.line.dashStyle;this.renderer.line(P,O,o,ac,V)}}w=w.reverse();var I=this.renderer;p.polarLabels=[];for(var Y=0;Y<w.length-1;Y++){var R=w[Y];if(isNaN(R)){continue}var C=(m.formatFunction)?m.formatFunction(R):this._formatNumber(R,z);var h=I.measureText(C,0,{"class":m.style});var N=P+(f.showTickMarks!=false?3:2);var M=O-p.itemWidth*Y-h.height/2;var H=a.jqx._ptRotate(N,M,P,O,t);var G=a.jqx._ptRotate(N+h.width,M+h.height,P,O,t);N=Math.min(H.x,G.x);M=Math.min(H.y,G.y);h.width=Math.abs(H.x-G.x);h.height=Math.abs(H.y-G.y);N+=settings.labels.textOffset.x;M+=settings.labels.textOffset.y;p.polarLabels.push({x:N,y:M,value:C});I.text(C,N,M,h.width,h.height,m.autoRotate?(90+g*180/Math.PI):m.angle,{"class":m.style},false,m.halign,m.valign)}var q=f.logarithmicScale==true;var s=q?w.length:p.rangeLength;aIncrement=2*Math.PI/s;var ab=f.valuesOnTicks!=false;var K=this._stats.seriesGroups[e];var j=K.mu;var J=f.logarithmicScale==true;var F=f.logarithmicScaleBase||10;if(J){j=1}var aa={min:K.min,max:K.max,logAxis:{enabled:J==true,base:f.logarithmicScaleBase,minPow:K.minPow,maxPow:K.maxPow}};if(d.visible||u.spider||f.alternatingBackgroundColor||f.alternatingBackgroundColor2){d.offsets=this._getOffsets("gridLines",f,T,aa,settings,{left:0,right:0},ab,j)}var U=[];if(d.visible||u.spider){var l={stroke:d.color,fill:"none","stroke-width":1,"stroke-dasharray":d.dashStyle||""};for(var Y=0;Y<d.offsets.length;Y++){var M=a.jqx._ptrnd(d.offsets[Y].offset);if(M==T){continue}if(u.spider){U.push(M);continue}if(X!=1){var n=-g/Math.PI*180;var W=-Z/Math.PI*180;this.renderer.pieslice(P,O,0,M,Math.min(n,W),Math.max(n,W),undefined,l)}else{I.circle(P,O,M,l)}}}if(!f.tickMarks||(!f.tickMarks.visible&&!f.showTickMarks)){B.visible=false}if(B.visible){B.offsets=this._getOffsets("tickMarks",f,T,aa,settings,{left:0,right:0},ab,j);tickMarkSize=B.size*2;var l={stroke:B.color,fill:"none","stroke-width":1,"stroke-dasharray":B.dashStyle||""};for(var Y=0;Y<B.offsets.length;Y++){var b=B.offsets[Y].offset;var H={x:P+b*Math.cos(t)-tickMarkSize/2*Math.sin(t+Math.PI/2),y:O+b*Math.sin(t)-tickMarkSize/2*Math.cos(t+Math.PI/2)};var G={x:P+b*Math.cos(t)+tickMarkSize/2*Math.sin(t+Math.PI/2),y:O+b*Math.sin(t)+tickMarkSize/2*Math.cos(t+Math.PI/2)};I.line(a.jqx._ptrnd(H.x),a.jqx._ptrnd(H.y),a.jqx._ptrnd(G.x),a.jqx._ptrnd(G.y),l)}}return U},_renderAxis:function(H,D,Q,z,c,F,m,V,C,U,d){if(Q.customDraw&&!U){return{width:NaN,height:NaN}}var t=Q.title,n=Q.labels,e=Q.gridLines,A=Q.tickMarks,P=Q.padding;var o=A.visible?A.size:0;var R=2;var G={width:0,height:0};var q={width:0,height:0};if(H){G.height=q.height=z.height}else{G.width=q.width=z.width}if(!U&&D){if(H){z.x-=z.width}}var l=C.renderData;var b=l.itemWidth;if(t.visible&&t.text!=undefined&&t!=""){var p=t.angle;var f=this.renderer.measureText(t.text,p,{"class":t.style});q.width=f.width;q.height=f.height;if(!U){this.renderer.text(t.text,z.x+t.offset.x+(H?(!D?R+P.left:-P.right-R+2*z.width-q.width):0),z.y+t.offset.y+(!H?(!D?z.height-R-q.height-P.bottom:P.top+R):0),H?q.width:z.width,!H?q.height:z.height,p,{"class":t.style},true,t.halign,t.valign,t.rotationPoint)}}var L=0;var u=V?-b/2:0;if(V&&!H){n.halign="center"}var N=z.x;var M=z.y;var E=n.textOffset;if(E){if(!isNaN(E.x)){N+=E.x}if(!isNaN(E.y)){M+=E.y}}if(!H){N+=u;if(D){M+=q.height>0?q.height+3*R:2*R;M+=o-(V?o:o/4)}else{M+=V?o:o/4}M+=P.top}else{N+=P.left+R+(q.width>0?q.width+R:0)+(D?z.width-q.width:0);M+=u}var T=0;var K=0;var r=C.items;l.itemOffsets={};if(this._isToggleRefresh||!this._isUpdate){d=0}var k=false;var j=0;for(var S=0;S<r.length&&n.visible;S++,L+=b){if(!r[S]||isNaN(b)){continue}var v=r[S].text;if(!isNaN(r[S].targetX)){L=r[S].targetX}var f=this.renderer.measureText(v,n.angle,{"class":n.style});if(f.width>K){K=f.width}if(f.height>T){T=f.height}j+=H?T:K;if(!U){if((H&&L>z.height+2)||(!H&&L>z.width+2)){continue}var J=H?N+(D?(q.width==0?o:o-R):0):N+L;var I=H?M+L:M;l.itemOffsets[r[S].key]={x:J,y:I};if(!k){if(!isNaN(r[S].x)||!isNaN(r[S].y)&&d){k=true}}r[S].targetX=J;r[S].targetY=I;r[S].width=!H?b:z.width-P.left-P.right-2*R-o-((q.width>0)?q.width+R:0);r[S].height=H?b:z.height-P.top-P.bottom-2*R-o-((q.height>0)?q.height+R:0);r[S].visible=true}}l.avgWidth=r.length==0?0:j/r.length;if(!U){var s={items:r,textSettings:n};if(isNaN(d)||!k){d=0}this._animateAxisText(s,d==0?1:0);if(d!=0){var g=this;this._enqueueAnimation("series",undefined,undefined,d,function(i,h,w){g._animateAxisText(h,w)},s)}}G.width+=2*R+o+q.width+K+(H&&q.width>0?R:0);G.height+=2*R+o+q.height+T+(!H&&q.height>0?R:0);if(!H){G.height+=P.top+P.bottom}else{G.width+=P.left+P.right}var B={};if(!U&&Q.line.visible){var O={stroke:Q.line.color,"stroke-width":Q.line.width,"stroke-dasharray":Q.line.dashStyle||""};if(H){var J=z.x+z.width+(D?P.left:-P.right);J=a.jqx._ptrnd(J);this.renderer.line(J,z.y,J,z.y+z.height,O)}else{var I=a.jqx._ptrnd(z.y+(D?z.height-P.bottom:P.top));this.renderer.line(a.jqx._ptrnd(z.x),I,a.jqx._ptrnd(z.x+z.width+1),I,O)}}G.width=a.jqx._rup(G.width);G.height=a.jqx._rup(G.height);return G},_drawPlotAreaLines:function(j,z,f){var E=this.seriesGroups[j];var c=E.orientation!="horizontal";if(!this._renderData||this._renderData.length<=j){return}var I=z?"valueAxis":"xAxis";var v=this._renderData[j][I];if(!v){return}var n=this._renderData.axisDrawState;if(!n){n=this._renderData.axisDrawState={}}var A="",h;if(z){A="valueAxis_"+((E.valueAxis)?j:"")+(c?"swap":"");h=this._getValueAxis(j)}else{A="xAxis_"+((E.xAxis||E.categoryAxis)?j:"")+(c?"swap":"");h=this._getXAxis(j)}if(n[A]){n=n[A]}else{n=n[A]={}}if(!z){c=!c}var G=v.settings;if(!G){return}if(G.customDraw){return}var F=G.gridLines,q=G.tickMarks,u=G.padding;var e=v.rect;var l=this._plotRect;if(!F||!q){return}var p=0.5;var d={};var b={stroke:F.color,"stroke-width":F.width,"stroke-dasharray":F.dashStyle||""};var D=z?e.y+e.height:e.x;var o=F.offsets;if(z&&!h.flip){o=a.extend([],o);o=o.reverse()}if(o&&o.length>0){var k=NaN;var C=o.length;for(var B=0;B<o.length;B++){if(c){lineOffset=a.jqx._ptrnd(e.y+o[B].offset);if(lineOffset<e.y-p){lineOffset=a.jqx._ptrnd(e.y)}if(lineOffset>e.y+e.height){lineOffset=e.y+e.height}}else{lineOffset=a.jqx._ptrnd(e.x+o[B].offset);if(lineOffset>e.x+e.width+p){lineOffset=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(lineOffset)){continue}if(!isNaN(k)&&Math.abs(lineOffset-k)<2){continue}k=lineOffset;if(f.gridLines&&F.visible!=false&&n.gridLines!=true){if(c){this.renderer.line(a.jqx._ptrnd(l.x),lineOffset,a.jqx._ptrnd(l.x+l.width),lineOffset,b)}else{this.renderer.line(lineOffset,a.jqx._ptrnd(l.y),lineOffset,a.jqx._ptrnd(l.y+l.height),b)}}d[lineOffset]=true;if(f.alternatingBackground&&(F.alternatingBackgroundColor||F.alternatingBackgroundColor2)&&n.alternatingBackground!=true){var m=((B%2)==0)?F.alternatingBackgroundColor2:F.alternatingBackgroundColor;if(B>0&&m){var H;if(c){H=this.renderer.rect(a.jqx._ptrnd(l.x),D,a.jqx._ptrnd(l.width-1),lineOffset-D,b)}else{H=this.renderer.rect(D,a.jqx._ptrnd(l.y),lineOffset-D,a.jqx._ptrnd(l.height),b)}this.renderer.attr(H,{"stroke-width":0,fill:m,opacity:F.alternatingBackgroundOpacity||1})}}D=lineOffset}}var b={stroke:q.color,"stroke-width":q.width,"stroke-dasharray":q.dashStyle||""};if(f.tickMarks&&q.visible&&n.tickMarks!=true){var t=q.size;var o=q.offsets;var k=NaN;for(var B=0;B<o.length;B++){if(c){lineOffset=a.jqx._ptrnd(e.y+o[B].offset);if(lineOffset<e.y-p){lineOffset=a.jqx._ptrnd(e.y)}if(lineOffset>e.y+e.height){lineOffset=e.y+e.height}}else{lineOffset=a.jqx._ptrnd(e.x+o[B].offset);if(lineOffset>e.x+e.width+p){lineOffset=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(lineOffset)){continue}if(!isNaN(k)&&Math.abs(lineOffset-k)<2){continue}if(d[lineOffset-1]){lineOffset--}else{if(d[lineOffset+1]){lineOffset++}}if(c){if(lineOffset>e.y+e.height+p){break}}else{if(lineOffset>e.x+e.width+p){break}}k=lineOffset;var w=!v.isMirror?-t:t;if(c){var s=e.x+e.width+(h.position=="right"?u.left:-u.right);if(!z){s=e.x+(v.isMirror?u.left:-u.right+e.width)}this.renderer.line(s,lineOffset,s+w,lineOffset,b)}else{var r=e.y+(v.isMirror?e.height:0);r+=v.isMirror?-u.bottom:u.top;r=a.jqx._ptrnd(r);this.renderer.line(lineOffset,r,lineOffset,r-w,b)}}}n.tickMarks=n.tickMarks||f.tickMarks;n.gridLines=n.gridLines||f.gridLines;n.alternatingBackground=n.alternatingBackground||f.alternatingBackground},_calcValueAxisItems:function(j,d,l){var n=this._stats.seriesGroups[j];if(!n||!n.isValid){return false}var w=this.seriesGroups[j];var b=w.orientation=="horizontal";var f=this._getValueAxis(j);var m=f.valuesOnTicks!=false;var e=f.dataField;var o=n.intervals;var s=d/o;var u=n.min;var r=n.mu;var c=f.logarithmicScale==true;var k=f.logarithmicScaleBase||10;var h=w.type.indexOf("stacked")!=-1&&w.type.indexOf("100")!=-1;if(c){r=!isNaN(f.unitInterval)?f.unitInterval:1}if(!m){o=Math.max(o-1,1)}while(this._renderData.length<j+1){this._renderData.push({})}this._renderData[j].valueAxis={};var q=this._renderData[j].valueAxis;q.itemWidth=q.intervalWidth=s;q.items=[];var p=q.items;for(var v=0;v<=o;v++){var t=0;if(c){if(h){t=n.max/Math.pow(k,o-v)}else{t=u*Math.pow(k,v)}}else{t=m?u+v*r:u+(v+0.5)*r}if(v%l!=0){p.push(NaN);continue}p.push(t)}q.rangeLength=c&&!h?n.intervals:(n.intervals)*r;if(f.flip!=true){p=p.reverse()}return true},_getDecimalPlaces:function(b,g,c){var h=0;if(isNaN(c)){c=10}for(var f=0;f<b.length;f++){var k=g===undefined?b[f]:b[f][g];if(isNaN(k)){continue}var d=k.toString();for(var e=0;e<d.length;e++){if(d[e]<"0"||d[e]>"9"){h=d.length-(e+1);if(h>=0){return Math.min(h,c)}}}if(h>0){k*=Math.pow(10,h)}while(Math.round(k)!=k&&h<c){h++;k*=10}}return h},_renderValueAxis:function(f,z,M,e){var L=this.seriesGroups[f];var Q=L.orientation=="horizontal";var r=this._getValueAxis(f);if(!r){throw"SeriesGroup "+f+" is missing valueAxis definition"}var G={width:0,height:0};if(!this._isGroupVisible(f)||this._isPieOnlySeries()||L.type=="spider"){return G}var P=r.valuesOnTicks!=false;var H=this._stats.seriesGroups[f];var j=H.mu;var F=r.logarithmicScale==true;var C=r.logarithmicScaleBase||10;if(F){j=!isNaN(r.unitInterval)?r.unitInterval:1}if(j==0){j=1}if(isNaN(j)){return G}var J=this._getAxisSettings(r);var q=J.title,t=J.labels;var k=r.labels||{};var v=this._get([r.horizontalTextAlignment,k.horizontalAlignment]);if(!v&&t.angle==0){t.halign=Q?"center":(r.position=="right"?"left":"right")}var o=this._get([t.step,t.unitInterval/j]);if(isNaN(o)){o=1}o=Math.max(1,Math.round(o));if(!this._calcValueAxisItems(f,(Q?z.width:z.height),o)||!J.visible){return G}if(!Q){q.angle=(!this.rtl?-90:90);if(q.rotationPoint=="centercenter"){if(q.valign=="top"){q.rotationPoint="rightcenter"}else{if(q.valign=="bottom"){q.rotationPoint="leftcenter"}}}}var l=this._renderData[f].valueAxis;var h=t.formatSettings;var c=L.type.indexOf("stacked")!=-1&&L.type.indexOf("100")!=-1;if(c&&!h){h={sufix:"%"}}if(!t.formatFunction&&(!h||!h.decimalPlaces)){h=h||{};h.decimalPlaces=this._getDecimalPlaces([H.min,H.max,j],undefined,3)}var d=J.gridLines;var m=F?j:this._getInterval(d,j);var B=Q?z.width:z.height;var N=(r.flip==true);r.flip=!N;var O={min:H.min,max:H.max,logAxis:{enabled:F==true,base:C,minPow:H.minPow,maxPow:H.maxPow}};if(d.visible||r.alternatingBackgroundColor||r.alternatingBackgroundColor2){d.offsets=this._getOffsets("gridLines",r,B,O,J,{left:0,right:0},P,j)}var u=J.tickMarks;if(u.visible){u.offsets=this._getOffsets("tickMarks",r,B,O,J,{left:0,right:0},P,j)}labelOffsets=this._getOffsets("labels",r,B,O,J,{left:0,right:0},P,j,!P);r.flip=N;var p=[];var n;if(this._elementRenderInfo&&this._elementRenderInfo.length>f){n=this._elementRenderInfo[f].valueAxis}for(var K=0;K<labelOffsets.length;K++){var I=labelOffsets[K].value;if(isNaN(labelOffsets[K].offset)){p.push(undefined);continue}var w=(t.formatFunction)?t.formatFunction(I):(!isNaN(I))?this._formatNumber(I,h):I;var b={key:I,text:w};if(n&&n.itemOffsets[I]){b.x=n.itemOffsets[I].x;b.y=n.itemOffsets[I].y}b.targetX=labelOffsets[K].offset;if(!isNaN(b.targetX)){p.push(b)}}var E=(Q&&r.position=="top")||(!Q&&r.position=="right")||(!Q&&this.rtl&&r.position!="left");var A={items:p,renderData:l};var D=this._getAnimProps(f);var s=D.enabled&&p.length<500?D.duration:0;if(this.enableAxisTextAnimation==false){s=0}l.settings=J;l.isMirror=E;l.rect=z;return this._renderAxis(!Q,E,J,z,e,j,F,true,A,M,s)},_objectsArraysToArray:function(e,d){var b=[];if(!a.isArray(e)){return b}for(var c=0;c<e.length;c++){b.push(e[c][d])}return b},_arraysToObjectsArray:function(f,e){var c=[];if(f.length!=e.length){return c}for(var d=0;d<f.length;d++){for(var b=0;b<f[d].length;b++){if(c.length<=b){c.push({})}c[b][e[d]]=f[d][b]}}return c},_valuesToOffsets:function(p,e,l,q,o,f,c){var h=[];if(!e||!a.isArray(p)){return h}var d=l.logAxis.base;var m=l.logAxis.enabled?"logarithmic":"linear";var k=e.flip;var n=q;var b=0,g=0;if(o&&!isNaN(o.left)){b=o.left}if(o&&!isNaN(o.right)){g=o.right}n=q-b-g;q=n;for(var j=0;j<p.length;j++){x=this._jqxPlot.scale(p[j],{min:l.min.valueOf(),max:l.max.valueOf(),type:m,base:d},{min:0,max:f?q:n,flip:k},{});if(!isNaN(x)){if(!isNaN(c)){x+=c}if(x<=q+b+g+1){h.push(a.jqx._ptrnd(x))}else{h.push(NaN)}}else{h.push(NaN)}}return h},_generateIntervalValues:function(n,c,b,d,e){var j=[];var g=n.min;var m=n.max;if(n.logAxis&&n.logAxis.enabled){g=n.logAxis.minPow;m=n.logAxis.maxPow}if(g==undefined||m==undefined){return j}if(g==m){if(n.logAxis&&n.logAxis.enabled){return[Math.pow(n.logAxis.base,g)]}else{return[g]}}var l=1;if(b<1){l=1000000;g*=l;m*=l;b*=l}for(var h=g;h<=m;h+=b){j.push(h/l+(e?b/2:0))}if(c>b){var f=[];var k=Math.round(c/b);for(var h=0;h<j.length;h++){if((h%k)==0){f.push(j[h])}}j=f}if(n.logAxis&&n.logAxis.enabled){for(var h=0;h<j.length;h++){j[h]=Math.pow(n.logAxis.base,j[h])}}return j},_generateDTOffsets:function(p,s,z,n,A,c,o,b,u,v,g){if(!o){o="day"}var f=[];if(p>s){return f}if(p==s){if(v){f.push({offset:b?z/2:n.left,value:p})}else{if(b){f.push({offset:z/2,value:p})}}return f}var j=z-n.left-n.right;var w=p;var k=n.left;var e=k;c=Math.max(c,1);var m=c;var d=Math.min(1,c);if(c>1&&o!="millisecond"){c=1}while(a.jqx._ptrnd(e)<=a.jqx._ptrnd(n.left+j+(b?0:n.right))){f.push({offset:e,value:w});var B=new Date(w.valueOf());if(o=="millisecond"){B.setMilliseconds(w.getMilliseconds()+c)}else{if(o=="second"){B.setSeconds(w.getSeconds()+c)}else{if(o=="minute"){B.setMinutes(w.getMinutes()+c)}else{if(o=="hour"){var l=B.valueOf();B.setHours(w.getHours()+c);if(l==B.valueOf()){B.setHours(w.getHours()+c+1)}}else{if(o=="day"){B.setDate(w.getDate()+c)}else{if(o=="month"){B.setMonth(w.getMonth()+c)}else{if(o=="year"){B.setFullYear(w.getFullYear()+c)}}}}}}}w=B;e=k+(w.valueOf()-p.valueOf())*d/(s.valueOf()-p.valueOf())*j}if(g){for(var r=0;r<f.length;r++){f[r].offset=z-f[r].offset}}if(m>1&&o!="millisecond"){var q=[];for(var r=0;r<f.length;r+=m){q.push({offset:f[r].offset,value:f[r].value})}f=q}if(!b&&!v&&f.length>1){var q=[];q.push({offset:0,value:undefined});for(var r=1;r<f.length;r++){q.push({offset:f[r-1].offset+(f[r].offset-f[r-1].offset)/2,value:undefined})}var t=q.length;if(t>1){q.push({offset:q[t-1].offset+(q[t-1].offset-q[t-2].offset)})}else{q.push({offset:z,value:undefined})}f=q}if(A>c){var q=[];var h=Math.round(A/m);for(var r=0;r<f.length;r++){if((r%h)==0){q.push({offset:f[r].offset,value:f[r].value})}}f=q}return f},_hasStackValueReversal:function(e,s){var g=this.seriesGroups[e];var h=-1!=g.type.indexOf("stacked");if(!h){return false}var b=-1!=g.type.indexOf("waterfall");var q=this._getDataLen(e);var t=0;var l=false;var u=[];for(var o=0;o<g.series.length;o++){u[o]=this._isSerieVisible(e,o)}for(var p=0;p<q;p++){var m=(b&&p!=0)?t:s;var d=0,r=0;var c=undefined;if(!b){l=false}for(var n=0;n<g.series.length;n++){if(!u[n]){continue}val=this._getDataValueAsNumber(p,g.series[n].dataField,e);if(isNaN(val)){continue}if(g.series[n].summary){var f=this._getDataValue(p,g.series[n].summary,e);if(undefined!==f){continue}}var k=!l?val<s:val<0;l=true;if(c==undefined){c=k}if(k!=c){return true}c=k;t+=val}}return false},_getValueAxis:function(b){var c=b==undefined?this.valueAxis:this.seriesGroups[b].valueAxis||this.valueAxis;if(!c){c=this.valueAxis={}}return c},_buildStats:function(J){var W={seriesGroups:[]};this._stats=W;for(var s=0;s<this.seriesGroups.length;s++){var C=this.seriesGroups[s];W.seriesGroups[s]={};var F=this._getXAxis(s);var n=this._getValueAxis(s);var q=this._getXAxisStats(s,F,(C.orientation!="horizontal")?J.width:J.height);var z=W.seriesGroups[s];z.isValid=true;var K=(C.orientation=="horizontal")?J.width:J.height;var M=n.logarithmicScale==true;var L=n.logarithmicScaleBase;if(isNaN(L)){L=10}var G=-1!=C.type.indexOf("stacked");var e=G&&-1!=C.type.indexOf("100");var I=-1!=C.type.indexOf("range");var S=C.type.indexOf("waterfall")!=-1;if(S&&!this._moduleWaterfall){throw"Please include 'jqxchart.waterfall.js'"}if(e){z.psums=[];z.nsums=[]}var t=NaN,O=NaN;var d=NaN,f=NaN;var r=n?n.baselineValue:NaN;if(isNaN(r)){r=M&&!e?1:0}var g=false;if(r!=0&&G){g=this._hasStackValueReversal(s,r);if(g){r=0}}if(G&&S){g=this._hasStackValueReversal(s,r)}var B=this._getDataLen(s);var c=0;var X=NaN;var m=[];if(S){for(var k=0;k<C.series.length;k++){m.push(NaN)}}var v=NaN;for(var V=0;V<B&&z.isValid;V++){if(F.rangeSelector){var h=F.dataField?this._getDataValue(V,F.dataField,s):V;if(h&&q.isDateTime){h=this._castAsDate(h,F.dateFormat)}if(q.useIndeces){h=V}if(h&&(h.valueOf()<q.min.valueOf()||h.valueOf()>q.max.valueOf())){continue}}var Y=n.minValue;var E=n.maxValue;if(n.baselineValue){if(isNaN(Y)){Y=r}else{Y=Math.min(r,Y)}if(isNaN(E)){E=r}else{E=Math.max(r,E)}}var u=0,w=0;for(var k=0;C.series&&k<C.series.length;k++){if(!this._isSerieVisible(s,k)){continue}var H=NaN,R=NaN,A=NaN;if(C.type.indexOf("candle")!=-1||C.type.indexOf("ohlc")!=-1){var b=["Open","Low","Close","High"];for(var T in b){var l=this._getDataValueAsNumber(V,C.series[k]["dataField"+b[T]],s);if(isNaN(l)){continue}A=isNaN(R)?l:Math.min(A,l);R=isNaN(R)?l:Math.max(R,l)}}else{if(I){var Z=this._getDataValueAsNumber(V,C.series[k].dataFieldFrom,s);var D=this._getDataValueAsNumber(V,C.series[k].dataFieldTo,s);R=Math.max(Z,D);A=Math.min(Z,D)}else{H=this._getDataValueAsNumber(V,C.series[k].dataField,s);if(S){if(this._isSummary(s,V)){var U=this._getDataValue(V,C.series[k].summary,s);if(U!==undefined){continue}}if(!G){if(isNaN(m[k])){m[k]=H}else{H+=m[k]}m[k]=H}else{if(!isNaN(v)){H+=v}v=H}}if(isNaN(H)||(M&&H<=0)){continue}A=R=H}}if((isNaN(E)||R>E)&&((isNaN(n.maxValue))?true:R<=n.maxValue)){E=R}if((isNaN(Y)||A<Y)&&((isNaN(n.minValue))?true:A>=n.minValue)){Y=A}if(!isNaN(H)&&G&&!S){if(H>r){u+=H}else{if(H<r){w+=H}}}}if(!e){if(!isNaN(n.maxValue)){u=Math.min(n.maxValue,u)}if(!isNaN(n.minValue)){w=Math.max(n.minValue,w)}}if(M&&e){for(var k=0;k<C.series.length;k++){if(!this._isSerieVisible(s,k)){X=0.01;continue}var H=this._getDataValueAsNumber(V,C.series[k].dataField,s);if(isNaN(H)||H<=0){X=0.01;continue}var P=u==0?0:H/u;if(isNaN(X)||P<X){X=P}}}var o=u-w;if(c<o){c=o}if(e){z.psums[V]=u;z.nsums[V]=w}if(E>O||isNaN(O)){O=E}if(Y<t||isNaN(t)){t=Y}if(u>d||isNaN(d)){d=u}if(w<f||isNaN(f)){f=w}}if(e){d=d==0?0:Math.max(d,-f);f=f==0?0:Math.min(f,-d)}if(t==O){if(!isNaN(n.minValue)&&isNaN(n.maxValue)){t=n.minValue;O=M?t*L:t+1}else{if(isNaN(n.minValue)&&!isNaN(n.maxValue)){O=n.maxValue;t=M?O/L:O-1}}}if(t==O){if(t==0){t=-1;O=1}else{if(t<0){O=0}else{if(!M){t=0}else{if(t==1){t=t/L;O=O*L}}}}}var Q={gmin:t,gmax:O,gsumP:d,gsumN:f,gbase:r,isLogAxis:M,logBase:L,minPercent:X,gMaxRange:c,isStacked:G,isStacked100:e,isWaterfall:S,hasStackValueReversal:g,valueAxis:n,valueAxisSize:K};if(Q.isStacked){if(Q.gsumN<0){Q.gmin=Math.min(Q.gmin,Q.gbase+Q.gsumN)}if(Q.gsumP>0){Q.gmax=Math.max(Q.gmax,Q.gbase+Q.gsumP)}}z.context=Q}this._mergeCommonValueAxisStats();for(var V=0;V<W.seriesGroups.length;V++){var z=W.seriesGroups[V];if(!z.isValid){continue}var N=this._calcOutputGroupStats(z.context);for(var T in N){z[T]=N[T]}delete z.context}},_mergeCommonValueAxisStats:function(){var f={};for(var e=0;e<this.seriesGroups.length;e++){if(!this._isGroupVisible(e)){continue}if(this.seriesGroups[e].valueAxis){continue}var d=this._stats.seriesGroups[e].context;f.gbase=d.gbase;if(isNaN(f.gmin)||d.gmin<f.gmin){f.gmin=d.gmin}if(isNaN(f.gmax)||d.gmax>f.gmax){f.gmax=d.gmax}if(isNaN(f.gsumP)||d.gsumP>f.gsumP){f.gsumP=d.gsumP}if(isNaN(f.gsumN)||d.gsumN<f.gsumN){f.gsumN=d.gsumN}if(isNaN(f.logBase)||d.logBase<f.logBase){f.logBase=d.logBase}if(isNaN(f.minPercent)||d.minPercent<f.minPercent){f.minPercent=d.minPercent}if(f.gsumN>0){f.gmin=Math.min(f.gmin,f.gbase+f.gsumN)}if(f.gsumP>0){f.gmax=Math.max(f.gmax,f.gbase+f.gsumP)}}for(var e=0;e<this.seriesGroups.length;e++){if(this.seriesGroups[e].valueAxis){continue}var b=this._stats.seriesGroups[e].context;for(var c in f){b[c]=f[c]}}},_calcOutputGroupStats:function(g){var c=g.gmin,f=g.gmax,A=g.gsumP,B=g.gsumN,z=g.gbase,d=g.isLogAxis,j=g.logBase,t=g.minPercent,k=g.gMaxRange,l=g.isStacked,h=g.isStacked100,e=g.isWaterfall,n=g.hasStackValueReversal,w=g.valueAxis,u=g.valueAxisSize;var s=g.valueAxis.unitInterval;if(!s){s=this._calcInterval(c,f,Math.max(u/80,2))}if(c==f){c=z;f=2*f}var i=NaN;var b=0;var q=0;if(d){if(h){i=0;var r=1;b=q=a.jqx.log(100,j);while(r>t){r/=j;b--;i++}c=Math.pow(j,b)}else{if(l&&!e){f=Math.max(f,A)}q=a.jqx._rnd(a.jqx.log(f,j),1,true);f=Math.pow(j,q);b=a.jqx._rnd(a.jqx.log(c,j),1,false);c=Math.pow(j,b)}s=j}if(c<B){B=c}if(f>A){A=f}var v=c;var o=f;if(!d){if(0!=Math.abs(o-v)%s){v=a.jqx._rnd(c,s,false);o=a.jqx._rnd(f,s,true)}}if(h&&o>100){o=100}if(h&&!d){o=(o>0)?100:0;v=(v<0)?-100:0;s=w.unitInterval;if(isNaN(s)||s<=0||s>=100){s=10}if((100%s)!=0){for(;s>=1;s--){if((100%s)==0){break}}}}if(isNaN(o)||isNaN(v)||isNaN(s)){return{}}if(isNaN(i)){i=parseInt(((o-v)/(s==0?1:s)).toFixed())}if(d&&!h){i=q-b;k=Math.pow(j,i)}if(i<1){return{}}var m={min:v,max:o,logarithmic:d,logBase:j,base:d?v:z,minPow:b,maxPow:q,sumP:A,sumN:B,mu:s,maxRange:k,intervals:i,hasStackValueReversal:n};return m},_getDataLen:function(c){var b=this.source;if(c!=undefined&&c!=-1&&this.seriesGroups[c].source){b=this.seriesGroups[c].source}if(b instanceof a.jqx.dataAdapter){b=b.records}if(b){return b.length}return 0},_getDataValue:function(b,e,d){var c=this.source;if(d!=undefined&&d!=-1){c=this.seriesGroups[d].source||c}if(c instanceof a.jqx.dataAdapter){c=c.records}if(!c||b<0||b>c.length-1){return undefined}if(a.isFunction(e)){return e(b,c)}return(e&&e!="")?c[b][e]:c[b]},_getDataValueAsNumber:function(b,e,c){var d=this._getDataValue(b,e,c);if(this._isDate(d)){return d.valueOf()}if(typeof(d)!="number"){d=parseFloat(d)}if(typeof(d)!="number"){d=undefined}return d},_isPieGroup:function(b){var c=this.seriesGroups[b];if(!c||!c.type){return false}return c.type.indexOf("pie")!=-1||c.type.indexOf("donut")!=-1},_renderPieSeries:function(e,c){var f=this._getDataLen(e);var g=this.seriesGroups[e];var m=this._calcGroupOffsets(e,c).offsets;for(var p=0;p<g.series.length;p++){var k=g.series[p];if(k.customDraw){continue}var v=this._getSerieSettings(e,p);var h=k.colorScheme||g.colorScheme||this.colorScheme;var r=this._getAnimProps(e,p);var b=r.enabled&&f<5000&&!this._isToggleRefresh&&this._isVML!=true?r.duration:0;if(a.jqx.mobile.isMobileBrowser()&&(this.renderer instanceof a.jqx.HTML5Renderer)){b=0}var t=this._get([k.minAngle,k.startAngle]);if(isNaN(t)||t<0||t>360){t=0}var z=this._get([k.maxAngle,k.endAngle]);if(isNaN(z)||z<0||z>360){z=360}var o={rect:c,minAngle:t,maxAngle:z,groupIndex:e,serieIndex:p,settings:v,items:[]};for(var u=0;u<f;u++){var n=m[p][u];if(!n.visible){continue}var q=n.fromAngle;var d=n.toAngle;var w=this.renderer.pieslice(n.x,n.y,n.innerRadius,n.outerRadius,q,b==0?d:q,n.centerOffset);this._setRenderInfo(e,p,u,{element:w});var j={displayValue:n.displayValue,itemIndex:u,visible:n.visible,x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:n.outerRadius,fromAngle:q,toAngle:d,centerOffset:n.centerOffset};o.items.push(j)}this._animatePieSlices(o,0);var l=this;this._enqueueAnimation("series",undefined,undefined,b,function(s,i,A){l._animatePieSlices(i,A)},o)}},_sliceSortFunction:function(d,c){return d.fromAngle-c.fromAngle},_animatePieSlices:function(o,c){var j;if(this._elementRenderInfo&&this._elementRenderInfo.length>o.groupIndex&&this._elementRenderInfo[o.groupIndex].series&&this._elementRenderInfo[o.groupIndex].series.length>o.serieIndex){j=this._elementRenderInfo[o.groupIndex].series[o.serieIndex]}var f=360*c;var u=this.seriesGroups[o.groupIndex];var n=this._getLabelsSettings(o.groupIndex,o.serieIndex,NaN);var m=n.visible;var b=[];for(var t=0;t<o.items.length;t++){var w=o.items[t];if(!w.visible){continue}var p=w.fromAngle;var e=w.fromAngle+c*(w.toAngle-w.fromAngle);if(j&&j[w.displayValue]){var l=j[w.displayValue].fromAngle;var d=j[w.displayValue].toAngle;p=l+(p-l)*c;e=d+(e-d)*c}b.push({index:t,from:p,to:e})}if(j){b.sort(this._sliceSortFunction)}var z=NaN;for(var t=0;t<b.length;t++){var w=o.items[b[t].index];var q=this._getRenderInfo(o.groupIndex,o.serieIndex,w.itemIndex);var p=b[t].from;var e=b[t].to;if(j){if(!isNaN(z)&&p>z){p=z}z=e;if(t==b.length-1&&e!=b[0].from){e=o.maxAngle+b[0].from}}var r=this.renderer.pieSlicePath(w.x,w.y,w.innerRadius,w.outerRadius,p,e,w.centerOffset);this.renderer.attr(q.element,{d:r});var h=this._getColors(o.groupIndex,o.serieIndex,w.itemIndex,"radialGradient",w.outerRadius);var v=o.settings;q.colors=h;q.settings=v;this.renderer.attr(q.element,{fill:h.fillColor,stroke:h.lineColor,"stroke-width":v.stroke,"fill-opacity":v.opacity,"stroke-opacity":v.opacity,"stroke-dasharray":"none"||v.dashStyle});var k=u.series[o.serieIndex];if(m){this._showPieLabel(o.groupIndex,o.serieIndex,w.itemIndex,n)}if(c==1){this._installHandlers(q.element,"pieslice",o.groupIndex,o.serieIndex,w.itemIndex)}}},_showPieLabel:function(e,f,C,p,h){var k=this._renderData[e].offsets[f][C];if(k.elementInfo.labelElement){this.renderer.removeElement(k.elementInfo.labelElement)}if(!p){p=this._getLabelsSettings(e,f,NaN)}if(!p.visible){return}var D=k.fromAngle,F=k.toAngle;var l=Math.abs(D-F);var q=l>180?1:0;if(l>360){D=0;F=360}var r=D*Math.PI*2/360;var i=F*Math.PI*2/360;var j=l/2+D;j=j%360;var E=j*Math.PI*2/360;var v;if(p.autoRotate==true){v=j<90||j>270?360-j:180-j}var u=p.linesEnabled;var o=this._showLabel(e,f,C,{x:0,y:0,width:0,height:0},"center","center",true,false,false,v);var d=p.radius||k.outerRadius+Math.max(o.width,o.height);if(this._isPercent(d)){d=parseFloat(d)/100*Math.min(this._plotRect.width,this._plotRect.height)/2}d+=k.centerOffset;if(isNaN(h)){h=0}d+=h;var z=this.seriesGroups[e];var n=z.series[f];var B=a.jqx.getNum([n.offsetX,z.offsetX,this._plotRect.width/2]);var A=a.jqx.getNum([n.offsetY,z.offsetY,this._plotRect.height/2]);var c=this._plotRect.x+B;var b=this._plotRect.y+A;var w=this._adjustTextBoxPosition(c,b,o,d,j,k.outerRadius>d,p.linesAngles!=false,p.autoRotate==true);var m={};k.elementInfo.labelElement=this._showLabel(e,f,C,{x:w.x,y:w.y,width:o.width,height:o.height},"left","top",false,false,false,v,m);if(d>k.outerRadius+5&&u!=false){var t={lineColor:k.elementInfo.colors.lineColor,stroke:k.elementInfo.settings.stroke,opacity:k.elementInfo.settings.opacity,dashStyle:k.elementInfo.settings.dashStyle};k.elementInfo.labelArrowPath=this._updateLebelArrowPath(k.elementInfo.labelArrowPath,c,b,d,k.outerRadius+h,E,p.linesAngles!=false,t,m)}},_updateLebelArrowPath:function(d,j,f,h,l,g,o,e,r){var c=a.jqx._ptrnd(j+(h-0)*Math.cos(g));var n=a.jqx._ptrnd(f-(h-0)*Math.sin(g));var b=a.jqx._ptrnd(j+(l+2)*Math.cos(g));var m=a.jqx._ptrnd(f-(l+2)*Math.sin(g));var p=[];p.push({x:r.x+r.width/2,y:r.y});p.push({x:r.x+r.width/2,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height/2});p.push({x:r.x+r.width,y:r.y+r.height/2});if(!o){p.push({x:r.x,y:r.y});p.push({x:r.x+r.width,y:r.y});p.push({x:r.x+r.width,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height})}p=p.sort(function(s,i){return a.jqx._ptdist(s.x,s.y,j,f)-a.jqx._ptdist(i.x,i.y,j,f)});p=p.sort(function(s,i){return(Math.abs(s.x-j)+Math.abs(s.y-f))-(Math.abs(i.x-j)+Math.abs(i.y-f))});for(var k=0;k<p.length;k++){p[k].x=a.jqx._ptrnd(p[k].x);p[k].y=a.jqx._ptrnd(p[k].y)}c=p[0].x;n=p[0].y;var q="M "+c+","+n+" L"+b+","+m;if(o){q="M "+c+","+n+" L"+b+","+n+" L"+b+","+m}if(d){this.renderer.attr(d,{d:q})}else{d=this.renderer.path(q,{})}this.renderer.attr(d,{fill:"none",stroke:e.lineColor,"stroke-width":e.stroke,"stroke-opacity":e.opacity,"stroke-dasharray":"none"||e.dashStyle});return d},_adjustTextBoxPosition:function(f,e,n,g,s,c,i,o){var d=s*Math.PI*2/360;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));if(o){var l=n.width;var p=n.height;var t=Math.atan(p/l)%(Math.PI*2);var u=d%(Math.PI*2);var r=0,q=0;var m=0;if(u<=t){m=l/2*Math.cos(d)}else{if(u>=t&&u<Math.PI-t){m=(p/2)*Math.sin(d)}else{if(u>=Math.PI-t&&u<Math.PI+t){m=l/2*Math.cos(d)}else{if(u>=Math.PI+t&&u<2*Math.PI-t){m=p/2*Math.sin(d)}else{if(u>=2*Math.PI-t&&u<2*Math.PI){m=l/2*Math.cos(d)}}}}}g+=Math.abs(m)+3;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));k-=n.width/2;j-=n.height/2;return{x:k,y:j}}if(!c){if(!i){if(s>=0&&s<45||s>=315&&s<360){j-=n.height/2}else{if(s>=45&&s<135){j-=n.height;k-=n.width/2}else{if(s>=135&&s<225){j-=n.height/2;k-=n.width}else{if(s>=225&&s<315){k-=n.width/2}}}}}else{if(s>=90&&s<270){j-=n.height/2;k-=n.width}else{j-=n.height/2}}}else{k-=n.width/2;j-=n.height/2}return{x:k,y:j}},_isColumnType:function(b){return(b.indexOf("column")!=-1||b.indexOf("waterfall")!=-1)},_getColumnGroupsCount:function(c){var e=0;c=c||"vertical";var f=this.seriesGroups;for(var d=0;d<f.length;d++){var b=f[d].orientation||"vertical";if(this._isColumnType(f[d].type)&&b==c){e++}}if(this.columnSeriesOverlap){e=1}return e},_getColumnGroupIndex:function(g){var b=0;var c=this.seriesGroups[g].orientation||"vertical";for(var e=0;e<g;e++){var f=this.seriesGroups[e];var d=f.orientation||"vertical";if(this._isColumnType(f.type)&&d==c){b++}}return b},_renderAxisBands:function(e,C,K){var z=K?this._getXAxis(e):this._getValueAxis(e);var t=this.seriesGroups[e];var v=K?undefined:t.bands;if(!v){for(var P=0;P<e;P++){var n=K?this._getXAxis(P):this._getValueAxis(P);if(n==z){return}}v=z.bands}if(!a.isArray(v)){return}var o=C;var V=t.orientation=="horizontal";if(V){o={x:C.y,y:C.x,width:C.height,height:C.width}}this._calcGroupOffsets(e,o);for(var P=0;P<v.length;P++){var c=v[P];var T=this._get([c.minValue,c.from]);var w=this._get([c.maxValue,c.to]);var s=K?this.getXAxisDataPointOffset(T,e):this.getValueAxisDataPointOffset(T,e);var U=K?this.getXAxisDataPointOffset(w,e):this.getValueAxisDataPointOffset(w,e);if(isNaN(s)||isNaN(U)){continue}var A=Math.abs(s-U);var J;if(t.polar||t.spider){var r=this._renderData[e];var d=r.polarCoords;if(!K){var F=this._toPolarCoord(d,C,C.x,r.baseOffset);var E=this._toPolarCoord(d,C,C.x,s);var D=this._toPolarCoord(d,C,C.x,U);var q=a.jqx._ptdist(F.x,F.y,E.x,E.y);var p=a.jqx._ptdist(F.x,F.y,D.x,D.y);var h=Math.round(-d.startAngle*360/(2*Math.PI));var Q=Math.round(-d.endAngle*360/(2*Math.PI));if(h>Q){var I=h;h=Q;Q=I}if(t.spider){var G=r.xAxis.offsetAngles;var H="";var M=[p,q];var B=G;if(d.isClosedCircle){B=a.extend([],G);B.push(B[0])}for(var L in M){for(var N=0;N<B.length;N++){var S=L==0?N:G.length-N-1;var l=d.x+M[L]*Math.cos(B[S]);var g=d.y+M[L]*Math.sin(B[S]);if(H==""){H+="M "}else{H+=" L"}H+=a.jqx._ptrnd(l)+","+a.jqx._ptrnd(g)}if(L==0){var l=d.x+M[1]*Math.cos(B[S]);var g=d.y+M[1]*Math.sin(B[S]);H+=" L"+a.jqx._ptrnd(l)+","+a.jqx._ptrnd(g)}}H+=" Z";J=this.renderer.path(H)}else{J=this.renderer.pieslice(d.x,d.y,q,p,h,Q)}}else{if(t.spider){p1=this.getPolarDataPointOffset(T,this._stats.seriesGroups[e].max,e);p2=this.getPolarDataPointOffset(w,this._stats.seriesGroups[e].max,e);var H="M "+d.x+","+d.y;H+=" L "+p1.x+","+p1.y;H+=" L "+p2.x+","+p2.y;J=this.renderer.path(H)}else{var f={};var m={x:Math.min(s,U),y:C.y,width:A,height:C.height};this._columnAsPieSlice(f,C,d,m);J=f.element}}}else{var b={x:Math.min(s,U),y:o.y,width:A,height:o.height};if(!K){b={x:o.x,y:Math.min(s,U),width:o.width,height:A}}if(V){var I=b.x;b.x=b.y;b.y=I;I=b.width;b.width=b.height;b.height=I}if(A==0||A==1){J=this.renderer.line(a.jqx._ptrnd(b.x),a.jqx._ptrnd(b.y),a.jqx._ptrnd(b.x+(V?0:b.width)),a.jqx._ptrnd(b.y+(V?b.height:0)))}else{J=this.renderer.rect(b.x,b.y,b.width,b.height)}}var W=c.fillColor||c.color||"#AAAAAA";var R=c.lineColor||W;var u=c.lineWidth;if(isNaN(u)){u=1}var O=c.opacity;if(isNaN(O)||O<0||O>1){O=1}this.renderer.attr(J,{fill:W,"fill-opacity":O,stroke:R,"stroke-opacity":O,"stroke-width":u,"stroke-dasharray":c.dashStyle})}},_getColumnGroupWidth:function(m,h,o){var e=this.seriesGroups[m];var l=e.type.indexOf("stacked")!=-1;var d=l?1:e.series.length;var k=this._getColumnGroupsCount(e.orientation);if(isNaN(k)||0==k){k=1}var n=h.rangeLength>=1?h.itemWidth:o*0.9;var c=e.columnsMinWidth;if(isNaN(c)){c=1}if(!isNaN(e.columnsMaxWidth)){c=Math.min(e.columnsMaxWidth,c)}if(c>n&&h.length>0){n=Math.max(n,o*0.9/h.length)}var i=c;if(!l){var f=e.seriesGapPercent;if(isNaN(f)||f<0){f=10}f/=100;var b=c;b*=(1+f);i+=e.series.length*b}var j=Math.max(n/k,i);return{requiredWidth:i,availableWidth:n,targetWidth:j}},_getColumnSerieWidthAndOffset:function(d,e){var m=this.seriesGroups[d];var u=m.series[e];var c=m.orientation=="horizontal";var b=this._plotRect;if(c){b={x:b.y,y:b.x,width:b.height,height:b.width}}var v=this._calcGroupOffsets(d,b);if(!v||v.xoffsets.length==0){return}var l=true;var w=this._getColumnGroupsCount(m.orientation);if(m.type=="candlestick"||m.type=="ohlc"){w=1}var q=this._getColumnGroupIndex(d);var r=this._getColumnGroupWidth(d,v.xoffsets,c?b.height:b.width);var h=0;var f=r.targetWidth;if(this.columnSeriesOverlap==true||(Math.round(f)>Math.round(r.availableWidth/w))){w=1;q=0}if(l){h-=(f*w)/2}h+=f*q;var D=m.columnsGapPercent;if(D<=0){D=0}if(isNaN(D)||D>=100){D=25}D/=100;var k=f*D;if(k+r.requiredWidth>r.targetWidth){k=Math.max(0,r.targetWidth-r.requiredWidth)}if(Math.round(f)>Math.round(r.availableWidth)){k=0}f-=k;h+=k/2;var z=m.seriesGapPercent;if(isNaN(z)||z<0){z=10}var n=m.type.indexOf("stacked")!=-1;var t=f;if(!n){t/=m.series.length}var A=this._get([m.seriesGap,(f*z/100)/(m.series.length-1)]);if(m.polar==true||m.spider==true||n||m.series.length<=1){A=0}var o=A*(m.series.length-1);if(m.series.length>1&&o>f-m.series.length*1){o=f-m.series.length*1;A=o/Math.max(1,(m.series.length-1))}var g=t-(o/m.series.length);var C=0;var i=m.columnsMaxWidth;if(!isNaN(i)){if(g>i){C=g-i;g=i}}var B=C/2;var j=0;if(!n){var E=(f-(g*m.series.length)-o)/2;var p=Math.max(0,e);j=E+g*e+p*A}else{j=C/2}return{width:g,offset:h+j}},_renderColumnSeries:function(f,c){var j=this.seriesGroups[f];if(!j.series||j.series.length==0){return}var h=this._getDataLen(f);var e=j.orientation=="horizontal";var A=c;if(e){A={x:c.y,y:c.x,width:c.height,height:c.width}}var p=this._calcGroupOffsets(f,A);if(!p||p.xoffsets.length==0){return}var m;if(j.polar==true||j.spider==true){m=this._getPolarAxisCoords(f,A)}var r={groupIndex:f,rect:c,vertical:!e,seriesCtx:[],renderData:p,polarAxisCoords:m};r.columnGroupWidth=this._getColumnGroupWidth(f,p.xoffsets,e?A.height:A.width);var g=this._getGroupGradientType(f);for(var t=0;t<j.series.length;t++){var n=j.series[t];if(n.customDraw){continue}var w=n.dataField;var u=this._getAnimProps(f,t);var b=u.enabled&&!this._isToggleRefresh&&p.xoffsets.length<100?u.duration:0;var k=this._getColumnSerieWidthAndOffset(f,t);var q=this._isSerieVisible(f,t);var l=this._getSerieSettings(f,t);var B=this._getColors(f,t,NaN,this._getGroupGradientType(f),4);var d=[];if(a.isFunction(n.colorFunction)&&!m){for(var z=p.xoffsets.first;z<=p.xoffsets.last;z++){d.push(this._getColors(f,t,z,g,4))}}var v={seriesIndex:t,serieColors:B,itemsColors:d,settings:l,columnWidth:k.width,xAdjust:k.offset,isVisible:q};r.seriesCtx.push(v)}this._animColumns(r,b==0?1:0);var o=this;this._enqueueAnimation("series",undefined,undefined,b,function(s,i,C){o._animColumns(i,C)},r)},_getPercent:function(d,c,b,e){if(isNaN(d)){d=c}if(!isNaN(b)&&!isNaN(d)&&d<b){d=b}if(!isNaN(e)&&!isNaN(d)&&d>e){d=e}if(isNaN(d)){return NaN}return d},_getColumnVOffsets:function(n,j,e,D,u,c){var p=this.seriesGroups[j];var H=this._getPercent(p.columnsTopWidthPercent,100,0,100);var v=this._getPercent(p.columnsBottomWidthPercent,100,0,100);if(H==0&&v==0){v=100}var J=this._getPercent(p.columnsNeckHeightPercent,NaN,0,100)/100;var E=this._getPercent(p.columnsNeckWidthPercent,100,0,100)/100;var r=[];var I=NaN;for(var q=0;q<e.length;q++){var N=e[q];var k=N.seriesIndex;var G=p.series[k];var o=n.offsets[k][D].from;var P=n.offsets[k][D].to;var z=n.xoffsets.data[D];var g;var h=N.isVisible;if(!h){P=o}var b=this._elementRenderInfo;if(h&&b&&b.length>j&&b[j].series.length>k){var F=n.xoffsets.xvalues[D];g=b[j].series[k][F];if(g&&!isNaN(g.from)&&!isNaN(g.to)){o=g.from+(o-g.from)*c;P=g.to+(P-g.to)*c;z=g.xoffset+(z-g.xoffset)*c}}if(!g){P=o+(P-o)*(u?1:c)}if(isNaN(o)){o=isNaN(I)?n.baseOffset:I}if(!isNaN(P)&&u){I=P}else{I=o}if(isNaN(P)){P=o}var C={from:o,to:P,xOffset:z};if(H!=100||v!=100){C.funnel=true;C.toWidthPercent=H;C.fromWidthPercent=v}r.push(C)}if(u&&r.length>1&&!(this._elementRenderInfo&&this._elementRenderInfo.length>j)){var l=0,m=0,K=-Infinity,w=Infinity,L=Infinity,B=-Infinity;for(var M=0;M<r.length;M++){var N=e[M];if(N.isVisible){if(r[M].to>=r[M].from){m+=r[M].to-r[M].from;L=Math.min(L,r[M].from);B=Math.max(B,r[M].to)}else{l+=r[M].from-r[M].to;K=Math.max(K,r[M].from);w=Math.min(w,r[M].to)}}}var O=l;var t=m;l*=c;m*=c;var d=0,f=0;for(var M=0;M<r.length;M++){if(r[M].to>=r[M].from){var A=r[M].to-r[M].from;if(A+f>m){A=Math.max(0,m-f);r[M].to=r[M].from+A}if(H!=100||v!=100){r[M].funnel=true;if(!isNaN(J)&&t*J>=f){r[M].fromWidthPercent=E*100}else{r[M].fromWidthPercent=(Math.abs(r[M].from-L)/t)*(H-v)+v}if(!isNaN(J)&&t*J>=(0+(f+A))){r[M].toWidthPercent=E*100}else{r[M].toWidthPercent=(Math.abs(r[M].to-L)/t)*(H-v)+v}}f+=A}else{var A=r[M].from-r[M].to;if(A+d>l){A=Math.max(0,l-d);r[M].to=r[M].from-A}if(H!=100||v!=100){r[M].funnel=true;if(!isNaN(J)&&O*J>=d){r[M].fromWidthPercent=E*100}else{r[M].fromWidthPercent=(Math.abs(r[M].from-K)/O)*(H-v)+v}if(!isNaN(J)&&O*J>=(0+(d+A))){r[M].toWidthPercent=E*100}else{r[M].toWidthPercent=(Math.abs(r[M].to-K)/O)*(H-v)+v}}d+=A}}}return r},_columnAsPieSlice:function(d,k,m,o){var e=this._toPolarCoord(m,k,o.x,o.y);var f=this._toPolarCoord(m,k,o.x,o.y+o.height);var l=a.jqx._ptdist(m.x,m.y,f.x,f.y);var i=a.jqx._ptdist(m.x,m.y,e.x,e.y);var c=k.width;var n=Math.abs(m.startAngle-m.endAngle)*180/Math.PI;var b=-((o.x-k.x)*n)/c;var h=-((o.x+o.width-k.x)*n)/c;var j=m.startAngle;j=360*j/(Math.PI*2);b-=j;h-=j;if(d){if(d.element!=undefined){var g=this.renderer.pieSlicePath(m.x,m.y,l,i,h,b,0);g+=" Z";this.renderer.attr(d.element,{d:g})}else{d.element=this.renderer.pieslice(m.x,m.y,l,i,h,b,0)}}return{fromAngle:h,toAngle:b,innerRadius:l,outerRadius:i}},_setRenderInfo:function(e,b,d,c){this._renderData[e].offsets[b][d].elementInfo=c},_getRenderInfo:function(d,b,c){return this._renderData[d].offsets[b][c].elementInfo||{}},_animColumns:function(ai,d){var p=this;var q=ai.groupIndex;var B=this.seriesGroups[q];var v=ai.renderData;var aa=B.type.indexOf("waterfall")!=-1;var G=this._getXAxis(q);var I=B.type.indexOf("stacked")!=-1;var e=ai.polarAxisCoords;var A=this._getGroupGradientType(q);var s=ai.columnGroupWidth.targetWidth;var z=-1;for(var ab=0;ab<B.series.length;ab++){if(this._isSerieVisible(q,ab)){z=ab;break}}var aj=NaN,t=NaN;for(var ab=0;ab<ai.seriesCtx.length;ab++){var ah=ai.seriesCtx[ab];if(isNaN(aj)||aj>ah.xAdjust){aj=ah.xAdjust}if(isNaN(t)||t<ah.xAdjust+ah.columnWidth){t=ah.xAdjust+ah.columnWidth}}var r=Math.abs(t-aj);var D=this._get([B.columnsGapPercent,25])/100;if(isNaN(D)<0||D>=1){D=0.25}var f=D*r;var Z=ai.renderData.xoffsets;var S=-1;var O={};var R=B.skipOverlappingPoints==true;for(var ad=Z.first;ad<=Z.last;ad++){var V=Z.data[ad];if(isNaN(V)){continue}if(S!=-1&&Math.abs(V-S)<(r-1+f)&&R){continue}else{S=V}var F=this._getColumnVOffsets(v,q,ai.seriesCtx,ad,I,d);var L=false;if(aa){for(var C=0;C<B.series.length;C++){if(B.series[C].summary&&Z.xvalues[ad][B.series[C].summary]){L=true}}}for(var C=0;C<ai.seriesCtx.length;C++){var ah=ai.seriesCtx[C];var m=ah.seriesIndex;var E=B.series[m];var w=F[C].from;var ak=F[C].to;var K=F[C].xOffset;var g=(ai.vertical?ai.rect.x:ai.rect.y)+ah.xAdjust;var ae=ah.settings;var W=ah.itemsColors.length!=0?ah.itemsColors[ad-v.xoffsets.first]:ah.serieColors;var h=this._isSerieVisible(q,m);if(!h){continue}var V=a.jqx._ptrnd(g+K);var Q={x:V,width:ah.columnWidth};if(F[C].funnel){Q.fromWidthPercent=F[C].fromWidthPercent;Q.toWidthPercent=F[C].toWidthPercent}var k=true;if(ai.vertical){Q.y=w;Q.height=ak-w;if(Q.height<0){Q.y+=Q.height;Q.height=-Q.height;k=false}}else{Q.x=w<ak?w:ak;Q.width=Math.abs(w-ak);k=w-ak<0;Q.y=V;Q.height=ah.columnWidth}var n=w-ak;if(isNaN(n)){continue}n=Math.abs(n);var H=undefined;var c=p._getRenderInfo(q,m,ad);var u=c.element;var P=c.labelElement;var N=u==undefined;if(P){p.renderer.removeElement(P);P=undefined}if(!e){if(F[C].funnel){var Y=this._getTrapezoidPath(a.extend({},Q),ai.vertical,k);if(N){u=this.renderer.path(Y,{})}else{this.renderer.attr(u,{d:Y})}}else{if(N){u=this.renderer.rect(Q.x,Q.y,ai.vertical?Q.width:0,ai.vertical?0:Q.height)}else{if(ai.vertical==true){this.renderer.attr(u,{x:Q.x,y:Q.y,height:n})}else{this.renderer.attr(u,{x:Q.x,y:Q.y,width:n})}}}}else{var l={element:u};H=this._columnAsPieSlice(l,ai.rect,e,Q);u=l.element;var W=this._getColors(q,m,undefined,"radialGradient",H.outerRadius)}if(n<1&&(d!=1||e)){this.renderer.attr(u,{display:"none"})}else{this.renderer.attr(u,{display:"block"})}if(N){this.renderer.attr(u,{fill:W.fillColor,"fill-opacity":ae.opacity,"stroke-opacity":ae.opacity,stroke:W.lineColor,"stroke-width":ae.stroke,"stroke-dasharray":ae.dashStyle})}if(P){this.renderer.removeElement(P)}if(!h||(n==0&&d<1)){c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);continue}if(aa&&this._get([E.showWaterfallLines,B.showWaterfallLines])!=false){if(!I||(I&&C==z)){var ac=I?-1:C;if(d==1&&!isNaN(v.offsets[C][ad].from)&&!isNaN(v.offsets[C][ad].to)){var M=O[ac];if(M!=undefined){var ag={x:M.x,y:a.jqx._ptrnd(M.y)};var af={x:V,y:ag.y};var T=B.columnsTopWidthPercent/100;if(isNaN(T)){T=1}else{if(T>1||T<0){T=1}}var X=B.columnsBottomWidthPercent/100;if(isNaN(X)){X=1}else{if(X>1||X<0){X=1}}var o=ai.vertical?Q.width:Q.height;ag.x=ag.x-o/2+o/2*T;if(L){var b=o*T/2;af.x=af.x+o/2-(G.flip?-b:b)}else{var b=o*X/2;af.x=af.x+o/2-(G.flip?-b:b)}if(!ai.vertical){this._swapXY([ag]);this._swapXY([af])}this.renderer.line(ag.x,ag.y,af.x,af.y,{stroke:M.color,"stroke-width":ae.stroke,"stroke-opacity":ae.opacity,"fill-opacity":ae.opacity,"stroke-dasharray":ae.dashStyle})}}}if(d==1&&n!=0){O[I?-1:C]={y:ak,x:(ai.vertical?Q.x+Q.width:Q.y+Q.height),color:W.lineColor}}}if(e){var U=this._toPolarCoord(e,ai.rect,Q.x+Q.width/2,Q.y);var o=this._showLabel(q,m,ad,Q,undefined,undefined,true);var J=H.outerRadius+10;labelOffset=this._adjustTextBoxPosition(e.x,e.y,o,J,(H.fromAngle+H.toAngle)/2,true,false,false);P=this._showLabel(q,m,ad,{x:labelOffset.x,y:labelOffset.y},undefined,undefined,false,false,false)}else{P=this._showLabel(q,m,ad,Q,undefined,undefined,false,false,k)}c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);if(d==1){this._installHandlers(u,"column",q,m,ad)}}}},_getTrapezoidPath:function(g,h,f){var l="";var b=g.fromWidthPercent/100;var c=g.toWidthPercent/100;if(!h){var e=g.width;g.width=g.height;g.height=e;e=g.x;g.x=g.y;g.y=e}var j=g.x+g.width/2;var k=[{x:j-g.width*(!f?b:c)/2,y:g.y+g.height},{x:j-g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?b:c)/2,y:g.y+g.height}];if(!h){this._swapXY(k)}l+="M "+a.jqx._ptrnd(k[0].x)+","+a.jqx._ptrnd(k[0].y);for(var d=1;d<k.length;d++){l+=" L "+a.jqx._ptrnd(k[d].x)+","+a.jqx._ptrnd(k[d].y)}l+=" Z";return l},_swapXY:function(d){for(var c=0;c<d.length;c++){var b=d[c].x;d[c].x=d[c].y;d[c].y=b}},_renderCandleStickSeries:function(e,c,t){var m=this;var h=m.seriesGroups[e];if(!h.series||h.series.length==0){return}var d=h.orientation=="horizontal";var v=c;if(d){v={x:c.y,y:c.x,width:c.height,height:c.width}}var n=m._calcGroupOffsets(e,v);if(!n||n.xoffsets.length==0){return}var w=v.width;var k;if(h.polar||h.spider){k=m._getPolarAxisCoords(e,v);w=2*k.r}var g=m._alignValuesWithTicks(e);var f=m._getGroupGradientType(e);var i=[];for(var p=0;p<h.series.length;p++){i[p]=m._getColumnSerieWidthAndOffset(e,p)}for(var p=0;p<h.series.length;p++){if(!this._isSerieVisible(e,p)){continue}var u=m._getSerieSettings(e,p);var l=h.series[p];if(l.customDraw){continue}var j=a.isFunction(l.colorFunction)?undefined:m._getColors(e,p,NaN,f);var o={rect:c,inverse:d,groupIndex:e,seriesIndex:p,symbolType:l.symbolType,symbolSize:l.symbolSize,"fill-opacity":u.opacity,"stroke-opacity":u.opacity,"stroke-width":u.stroke,"stroke-dasharray":u.dashStyle,gradientType:f,colors:j,renderData:n,polarAxisCoords:k,columnsInfo:i,isOHLC:t,items:[],self:m};var q=m._getAnimProps(e,p);var b=q.enabled&&!m._isToggleRefresh&&n.xoffsets.length<5000?q.duration:0;m._animCandleStick(o,0);var r;m._enqueueAnimation("series",undefined,undefined,b,function(A,s,z){m._animCandleStick(s,z)},o)}},_animCandleStick:function(t,b){var q=["Open","Low","Close","High"];var e=t.columnsInfo[t.seriesIndex].width;var g=t.self.seriesGroups[t.groupIndex];var v=t.renderData.xoffsets;var E=-1;var n=Math.abs(v.data[v.last]-v.data[v.first]);n*=b;var c=NaN,r=NaN;for(var z=0;z<t.columnsInfo.length;z++){var w=t.columnsInfo[z];if(isNaN(c)||c>w.offset){c=w.offset}if(isNaN(r)||r<w.offset+w.width){r=w.offset+w.width}}var m=Math.abs(r-c);var B=g.skipOverlappingPoints!=false;for(var A=v.first;A<=v.last;A++){var l=v.data[A];if(isNaN(l)){continue}if(E!=-1&&Math.abs(l-E)<m&&B){continue}var C=Math.abs(v.data[A]-v.data[v.first]);if(C>n){break}E=l;var D=t.items[A]=t.items[A]||{};for(var z in q){var F=t.self._getDataValueAsNumber(A,g.series[t.seriesIndex]["dataField"+q[z]],t.groupIndex);if(isNaN(F)){break}var k=t.renderData.offsets[t.seriesIndex][A][q[z]];if(isNaN(k)){break}D[q[z]]=k}l+=t.inverse?t.rect.y:t.rect.x;if(t.polarAxisCoords){var s=this._toPolarCoord(t.polarAxisCoords,this._plotRect,l,k);l=s.x;k=s.y}l=a.jqx._ptrnd(l);for(var f in q){D[f]=a.jqx._ptrnd(D[f])}var h=t.colors;if(!h){h=t.self._getColors(t.groupIndex,t.seriesIndex,A,t.gradientType)}if(!t.isOHLC){var u=D.lineElement;if(!u){u=t.inverse?this.renderer.line(D.Low,l,D.High,l):this.renderer.line(l,D.Low,l,D.High);this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}var p=D.stickElement;l-=e/2;if(!p){var d=h.fillColor;if(D.Close<=D.Open&&h.fillColorAlt){d=h.fillColorAlt}p=t.inverse?this.renderer.rect(Math.min(D.Open,D.Close),l,Math.abs(D.Close-D.Open),e):this.renderer.rect(l,Math.min(D.Open,D.Close),e,Math.abs(D.Close-D.Open));this.renderer.attr(p,{fill:d,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.stickElement=p}if(b==1){this._installHandlers(p,"column",t.groupIndex,t.seriesIndex,A)}}else{var o="M"+l+","+D.Low+" L"+l+","+D.High+" M"+(l-e/2)+","+D.Open+" L"+l+","+D.Open+" M"+(l+e/2)+","+D.Close+" L"+l+","+D.Close;if(t.inverse){o="M"+D.Low+","+l+" L"+D.High+","+l+" M"+D.Open+","+(l-e/2)+" L"+D.Open+","+l+" M"+D.Close+","+l+" L"+D.Close+","+(l+e/2)}var u=D.lineElement;if(!u){u=this.renderer.path(o,{});this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}if(b==1){this._installHandlers(u,"column",t.groupIndex,t.seriesIndex,A)}}}},_renderScatterSeries:function(e,D,F){var u=this.seriesGroups[e];if(!u.series||u.series.length==0){return}var f=u.type.indexOf("bubble")!=-1;var v=u.orientation=="horizontal";var m=D;if(v){m={x:D.y,y:D.x,width:D.height,height:D.width}}var n=this._calcGroupOffsets(e,m);if(!n||n.xoffsets.length==0){return}var N=m.width;var c;if(u.polar||u.spider){c=this._getPolarAxisCoords(e,m);N=2*c.r}var V=this._alignValuesWithTicks(e);var t=this._getGroupGradientType(e);if(!F){F="to"}for(var g=0;g<u.series.length;g++){var T=this._getSerieSettings(e,g);var K=u.series[g];if(K.customDraw){continue}var A=K.dataField;var l=a.isFunction(K.colorFunction);var L=this._getColors(e,g,NaN,t);var U=NaN,z=NaN;if(f){for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(C)!="number"){throw"Invalid radiusDataField value at ["+S+"]"}if(!isNaN(C)){if(isNaN(U)||C<U){U=C}if(isNaN(z)||C>z){z=C}}}}var j=K.minRadius||K.minSymbolSize;if(isNaN(j)){j=N/50}var E=K.maxRadius||K.maxSymbolSize;if(isNaN(E)){E=N/25}if(j>E){E=j}var M=K.radius;if(isNaN(M)&&!isNaN(K.symbolSize)){M=(K.symbolType=="circle")?K.symbolSize/2:K.symbolSize}else{M=5}var G=this._getAnimProps(e,g);var B=G.enabled&&!this._isToggleRefresh&&n.xoffsets.length<5000?G.duration:0;var w={groupIndex:e,seriesIndex:g,symbolType:K.symbolType,symbolSize:K.symbolSize,"fill-opacity":T.opacity,"stroke-opacity":T.opacity,"stroke-width":T.stroke,"stroke-width-symbol":T.strokeSymbol,"stroke-dasharray":T.dashStyle,items:[],polarAxisCoords:c};var o=undefined;for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,A,e);if(typeof(C)!="number"){continue}var J=n.xoffsets.data[S];var H=n.xoffsets.xvalues[S];var I=n.offsets[g][S][F];if(I<m.y||I>m.y+m.height){continue}if(isNaN(J)||isNaN(I)){continue}if(v){var Q=J;J=I;I=Q+D.y}else{J+=D.x}if(!l&&o&&this.enableSampling&&a.jqx._ptdist(o.x,o.y,J,I)<1){continue}o={x:J,y:I};var O=M;if(f){var p=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(p)!="number"){continue}O=j+(E-j)*(p-U)/Math.max(1,z-U);if(isNaN(O)){O=j}}n.offsets[g][S].radius=O;var k=NaN,P=NaN;var q=0;var b=this._elementRenderInfo;if(H!=undefined&&b&&b.length>e&&b[e].series.length>g){var d=b[e].series[g][H];if(d&&!isNaN(d.to)){k=d.to;P=d.xoffset;q=M;if(v){var Q=P;P=k;k=Q+D.y}else{P+=D.x}if(f){q=j+(E-j)*(d.valueRadius-U)/Math.max(1,z-U);if(isNaN(q)){q=j}}}}if(l){L=this._getColors(e,g,S,t)}w.items.push({from:q,to:O,itemIndex:S,fill:L.fillColor,stroke:L.lineColor,x:J,y:I,xFrom:P,yFrom:k})}this._animR(w,0);var h=this;var R;this._enqueueAnimation("series",undefined,undefined,B,function(s,i,r){h._animR(i,r)},w)}},_animR:function(o,g){var j=o.items;var p=o.symbolType||"circle";var c=o.symbolSize;for(var e=0;e<j.length;e++){var n=j[e];var l=n.x;var k=n.y;var b=Math.round((n.to-n.from)*g+n.from);if(!isNaN(n.yFrom)){k=n.yFrom+(k-n.yFrom)*g}if(!isNaN(n.xFrom)){l=n.xFrom+(l-n.xFrom)*g}if(o.polarAxisCoords){var m=this._toPolarCoord(o.polarAxisCoords,this._plotRect,l,k);l=m.x;k=m.y}l=a.jqx._ptrnd(l);k=a.jqx._ptrnd(k);b=a.jqx._ptrnd(b);var f=this._getRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex);var d=f.element;var h=f.labelElement;if(p=="circle"){if(!d){d=this.renderer.circle(l,k,b);this.renderer.attr(d,{fill:n.fill,"fill-opacity":o["fill-opacity"],"stroke-opacity":o["fill-opacity"],stroke:n.stroke,"stroke-width":o["stroke-width"],"stroke-dasharray":o["stroke-dasharray"]})}if(this._isVML){this.renderer.updateCircle(d,undefined,undefined,b)}else{this.renderer.attr(d,{r:b,cy:k,cx:l})}}else{if(d){this.renderer.removeElement(d)}d=this._drawSymbol(p,l,k,n.fill,o["fill-opacity"],n.stroke,o["stroke-opacity"]||o["fill-opacity"],o["stroke-width-symbol"],o["stroke-dasharray"],c||b)}if(h){this.renderer.removeElement(h)}h=this._showLabel(o.groupIndex,o.seriesIndex,n.itemIndex,{x:l-b,y:k-b,width:2*b,height:2*b});if(g>=1){this._installHandlers(d,"circle",o.groupIndex,o.seriesIndex,n.itemIndex)}this._setRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex,{element:d,labelElement:h})}},_showMultiSeriesToolTip:function(n,l,e){var s=this;var w='<div style="text-align:left">';var h="";for(var B=0;B<s.seriesGroups.length;B++){if(s._isPieGroup(B)){continue}var j=s._getXAxis(B);var c=s._getValueAxis(B);var i=s.seriesGroups[B];var f=this._getAxisSettings(j);var A=f.toolTipFormatSettings;var d=f.toolTipFormatFunction;var q=s._getDataValue(e,j.dataField,B);if(j.dataField==undefined||j.dataField==""){q=e}if(j.type=="date"){q=s._castAsDate(q,(A?A.dateFormat:undefined)||j.dateFormat)}if(!d&&!A&&j.type=="date"){d=this._getDefaultDTFormatFn(j.baseUnit||"day")}var r=(j.displayText||j.dataField||"");if(r!=""){r+=": "}var b=r+s._formatValue(q,A,d,B,v,e);if(h!=b){if(h!=""){w+="<br />"}w+=b+"<br /><br />";h=b}for(var v=0;v<i.series.length;v++){var t=i.series[v];if(i.showToolTips==false||t.showToolTips==false){continue}if(!s._isSerieVisible(B,v)){continue}var g=s._get([t.toolTipFormatSettings,i.toolTipFormatSettings,c.toolTipFormatSettings,s.toolTipFormatSettings]);var p=s._get([t.toolTipFormatFunction,i.toolTipFormatFunction,c.toolTipFormatFunction,s.toolTipFormatFunction]);var o=s._getFormattedValue(B,v,e,g,p);var k=s._getColors(B,v,e);w+="<span style='color:"+k.lineColor+";'>"+o+"</span><br />\n"}}var z=this._get([s.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var C=this._get([s.toolTipBackground,"#FFFFFF"]);var D=this._get([s.toolTipLineColor,s._defaultLineColor]);var m=this._get([s.toolTipOpacity,1]);w+="</div>";var u=this.getItemCoord(s._ttEl.gidx,s._ttEl.sidx,s._ttEl.iidx);s._createTooltip(u,s.seriesGroups[s._ttEl.gidx],w,{css:z,fill:C,stroke:D,fillOpacity:m,symbolSize:3})},_showToolTip:function(J,H,n,e,b){var h=this;var w=h._getXAxis(n);var l=h._getValueAxis(n);if(h._ttEl&&n==h._ttEl.gidx&&e==h._ttEl.sidx&&b==h._ttEl.iidx){return}var s=h.seriesGroups[n];var g=s.series[e];var F=h.enableCrosshairs;if(h._pointMarker){J=parseInt(h._pointMarker.x+5);H=parseInt(h._pointMarker.y-5)}else{F=false}var W=F&&h.showToolTips==false;J=a.jqx._ptrnd(J);H=a.jqx._ptrnd(H);var m=h._ttEl==undefined;if(s.showToolTips==false||g.showToolTips==false){return}if(!h._ttEl){h._ttEl={}}h._ttEl.sidx=e;h._ttEl.gidx=n;h._ttEl.iidx=b;var f=0;for(var S=0;S<h.seriesGroups.length;S++){for(var R=0;R<h.seriesGroups[S].series.length;R++){f++}}if(h.showToolTipsOnAllSeries&&!h._isPieGroup(n)&&f>1){h._showMultiSeriesToolTip(J,H,b);return}var z=h._get([g.toolTipFormatSettings,s.toolTipFormatSettings,l.toolTipFormatSettings,h.toolTipFormatSettings]);var E=h._get([g.toolTipFormatFunction,s.toolTipFormatFunction,l.toolTipFormatFunction,h.toolTipFormatFunction]);var N=h._getColors(n,e,b);var d=h._getDataValue(b,w.dataField,n);if(w.dataField==undefined||w.dataField==""){d=b}if(w.type=="date"){d=h._castAsDate(d,(z?z.dateFormat:undefined)||w.dateFormat)}var C="";if(a.isFunction(E)){var L={};var v=0;for(var k in g){if(k.indexOf("dataField")==0){L[k.substring(9,k.length).toLowerCase()]=h._getDataValue(b,g[k],n);v++}}if(v==0){L=h._getDataValue(b,undefined,n)}else{if(v==1){L=L[""]}}C=E(L,b,g,s,d,w)}else{C=h._getFormattedValue(n,e,b,z,E);var K=this._getAxisSettings(w);var O=K.toolTipFormatSettings;var T=K.toolTipFormatFunction;if(!T&&!O&&w.type=="date"){T=this._getDefaultDTFormatFn(w.baseUnit||"day")}var o=h._formatValue(d,O,T,n,e,b);if(!h._isPieGroup(n)){var M=(w.displayText||w.dataField||"");if(M.length>0){C=M+": "+o+"<br>"+C}else{C=o+"<br>"+C}}else{d=h._getDataValue(b,g.displayText||g.dataField,n);o=h._formatValue(d,O,T,n,e,b);C=o+": "+C}}rect=h.renderer.getRect();if(F){var I=a.jqx._ptrnd(h._pointMarker.x);var G=a.jqx._ptrnd(h._pointMarker.y);var B=h.crosshairsColor||h._defaultLineColor;if(s.polar||s.spider){var D=this._getPolarAxisCoords(n,this._plotRect);var c=a.jqx._ptdist(I,G,D.x,D.y);if(c>D.r){return}var A=Math.atan2(G-D.y,I-D.x);var p=Math.cos(A)*D.r+D.x;var V=Math.sin(A)*D.r+D.y;if(h._ttEl.vLine){h.renderer.attr(h._ttEl.vLine,{x1:D.x,y1:D.y,x2:p,y2:V})}else{h._ttEl.vLine=h.renderer.line(D.x,D.y,p,V,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}else{if(h._ttEl.vLine&&h._ttEl.hLine){h.renderer.attr(h._ttEl.vLine,{x1:I,x2:I});h.renderer.attr(h._ttEl.hLine,{y1:G,y2:G})}else{h._ttEl.vLine=h.renderer.line(I,h._plotRect.y,I,h._plotRect.y+h._plotRect.height,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""});h._ttEl.hLine=h.renderer.line(h._plotRect.x,G,h._plotRect.x+h._plotRect.width,G,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}}if(!W&&h.showToolTips!=false){var P=this._get([g.toolTipClass,s.toolTipClass,h.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var u=this._get([g.toolTipBackground,s.toolTipBackground,h.toolTipBackground,"#FFFFFF"]);var r=this._get([g.toolTipLineColor,s.toolTipLineColor,h.toolTipLineColor,N.lineColor]);var Q=this._get([g.toolTipOpacity,s.toolTipOpacity,h.toolTipOpacity,1]);var q=this.getItemCoord(n,e,b);var U=0;if(h._pointMarker&&h._pointMarker.element){U=g.symbolSizeSelected;if(isNaN(U)){U=g.symbolSize}if(isNaN(U)||U>50||U<0){U=s.symbolSize}if(isNaN(U)||U>50||U<0){U=8}}h._createTooltip(q,s,C,{css:P,fill:u,stroke:r,fillOpacity:Q,symbolSize:U})}},_fitTooltip:function(c,h,j,k,e){var d={};var b=2+e/2;var f=7;if(h.x-j.width-f-b>c.x&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2<c.y+c.height){d.left={arrowLocation:"right",x:h.x-j.width-f-b,y:h.y+h.height/2-j.height/2,width:j.width+f,height:j.height}}if(h.x+h.width+j.width+f+b<c.x+c.width&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2<c.y+c.height){d.right={arrowLocation:"left",x:h.x+h.width+b,y:h.y+h.height/2-j.height/2,width:j.width+f,height:j.height}}if(h.y-j.height-b-f>c.y&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2<c.x+c.width){d.top={arrowLocation:"bottom",x:h.x+h.width/2-j.width/2,y:h.y-j.height-b-f,width:j.width,height:j.height+f}}if(h.y+h.height+j.height+f+b<c.y+c.height&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2<c.x+c.width){d.bottom={arrowLocation:"top",x:h.x+h.width/2-j.width/2,y:h.y+h.height+b,width:j.width,height:j.height+f}}if(h.width>h.height||((k.type.indexOf("stackedcolumn")!=-1||k.type.indexOf("stackedwaterfall")!=-1)&&k.orientation!="horizontal")){if(d.left){return d.left}if(d.right){return d.right}}else{if(d.top){return d.top}if(d.bottom){return d.bottom}}for(var g in d){if(d[g]){return d[g]}}return{arrowLocation:""}},_createTooltip:function(C,j,u,v){var p=this;var t=j.type;var A=false;var B=p._ttEl.box;if(!B){A=true;B=p._ttEl.box=document.createElement("div");var e=10000000;B.style.position="absolute";B.style.cursor="default";a(b).css({"z-index":e,"box-sizing":"content-box"});a(B).css({"z-index":e});a(document.body).append(B);var b=document.createElement("div");b.id="arrowOuterDiv";b.style.width="0px";b.style.height="0px";b.style.position="absolute";a(b).css({"z-index":e+1,"box-sizing":"content-box"});var g=document.createElement("div");g.id="arrowInnerDiv";g.style.width="0px";g.style.height="0px";g.style.position="absolute";var s=document.createElement("div");s.id="contentDiv";s.style.position="absolute";a(s).css({"box-sizing":"content-box",outline:"none",border:"1px solid transparent",padding:"3px","text-align":"center","vertical-align":"middle",margin:"0 0 0 0",cursor:"default"});a(s).addClass("jqx-rc-all");a(s).appendTo(a(B));a(b).appendTo(a(B));a(g).appendTo(a(B));a(g).css({"z-index":e+2,"box-sizing":"content-box"})}if(!u||u.length==0){a(B).fadeTo(0,0);return}s=a(B).find("#contentDiv")[0];b=a(B).find("#arrowOuterDiv")[0];g=a(B).find("#arrowInnerDiv")[0];g.style.opacity=b.style.opacity=v.fillOpacity;s.style.backgroundColor=v.fill;s.style.borderColor=v.stroke;s.style.opacity=v.fillOpacity;var l="<span class='"+v.css+"'>"+u+"</span>";a(s).html(l);var o=this._measureHtml(l,"jqx-rc-all jqx-button");rect=p._plotRect;if(o.width>rect.width||o.height>rect.height){return}var n={width:o.width,height:o.height};arrowLocation="";var z=5;var q=7;var r=p._isColumnType(t);x=Math.max(C.x,rect.x);y=Math.max(C.y,rect.y);if(p.toolTipAlignment=="dataPoint"){if(t.indexOf("pie")!=-1||t.indexOf("donut")!=-1){var k=(C.fromAngle+C.toAngle)/2;k=k*(Math.PI/180);var f=(!isNaN(C.innerRadius)&&C.innerRadius>0)?(C.innerRadius+C.outerRadius)/2:C.outerRadius*0.75;x=C.x=C.center.x+Math.cos(k)*f;y=C.y=C.center.y-Math.sin(k)*f;C.width=C.height=1}else{if(r&&(j.polar||j.spider)){C.width=C.height=1}}var w=this._fitTooltip(this._plotRect,C,n,j,v.symbolSize);if(w.arrowLocation!=""){arrowLocation=w.arrowLocation;x=w.x;y=w.y;n.width=w.width;n.height=w.height}}else{arrowLocation=""}if(arrowLocation=="top"||arrowLocation=="bottom"){n.height+=q;x-=q/2;if(arrowLocation=="bottom"){y-=q}}else{if(arrowLocation=="left"||arrowLocation=="right"){n.width+=q;y-=q/2;if(arrowLocation=="right"){x-=q}}}if(x+n.width>rect.x+rect.width){arrowLocation="";x=rect.x+rect.width-n.width}if(y+n.height>rect.y+rect.height){arrowLocation="";y=rect.y+rect.height-n.height}var h={x:0,y:0},d={x:0,y:0};a(s).css({width:o.width,height:o.height,left:0,top:0});b.style["margin-top"]=b.style["margin-left"]=0;g.style["margin-top"]=g.style["margin-left"]=0;s.style["margin-top"]=s.style["margin-left"]=0;var i=q+"px solid";var c=q+"px solid transparent";switch(arrowLocation){case"left":h={x:0,y:(o.height-q)/2};contentPostion={x:q,y:0};s.style["margin-left"]=q+"px";b.style["margin-left"]=0+"px";b.style["margin-top"]=h.y+"px";b.style["border-left"]="";b.style["border-right"]=i+" "+v.stroke;b.style["border-top"]=c;b.style["border-bottom"]=c;g.style["margin-left"]=1+"px";g.style["margin-top"]=h.y+"px";g.style["border-left"]="";g.style["border-right"]=i+" "+v.fill;g.style["border-top"]=c;g.style["border-bottom"]=c;break;case"right":h={x:n.width-q,y:(o.height-q)/2};contentPostion={x:0,y:0};b.style["margin-left"]=h.x+"px";b.style["margin-top"]=h.y+"px";b.style["border-left"]=i+" "+v.stroke;b.style["border-right"]="";b.style["border-top"]=c;b.style["border-bottom"]=c;g.style["margin-left"]=h.x-1+"px";g.style["margin-top"]=h.y+"px";g.style["border-left"]=i+" "+v.fill;g.style["border-right"]="";g.style["border-top"]=c;g.style["border-bottom"]=c;break;case"top":h={x:n.width/2-q/2,y:0};contentPostion={x:0,y:q};s.style["margin-top"]=contentPostion.y+"px";b.style["margin-left"]=h.x+"px";b.style["border-top"]="";b.style["border-bottom"]=i+" "+v.stroke;b.style["border-left"]=c;b.style["border-right"]=c;g.style["margin-left"]=h.x+"px";g.style["margin-top"]=1+"px";g.style["border-top"]="";g.style["border-bottom"]=i+" "+v.fill;g.style["border-left"]=c;g.style["border-right"]=c;break;case"bottom":h={x:n.width/2-q/2,y:n.height-q};contentPostion={x:0,y:0};b.style["margin-left"]=h.x+"px";b.style["margin-top"]=h.y+"px";b.style["border-top"]=i+" "+v.stroke;b.style["border-bottom"]="";b.style["border-left"]=c;b.style["border-right"]=c;g.style["margin-left"]=h.x+"px";g.style["margin-top"]=h.y-1+"px";g.style["border-top"]=i+" "+v.fill;g.style["border-bottom"]="";g.style["border-left"]=c;g.style["border-right"]=c;break}if(arrowLocation==""){a(b).hide();a(g).hide()}else{a(b).show();a(g).show()}a(B).css({width:n.width+"px",height:n.height+"px"});var m=p.host.coord();if(A){a(B).fadeOut(0,0);B.style.left=x+m.left+"px";B.style.top=y+m.top+"px"}a(B).clearQueue();a(B).animate({left:x+m.left,top:y+m.top,opacity:1},p.toolTipMoveDuration,"easeInOutCirc");a(B).fadeTo(400,1)},_measureHtml:function(c,b){var e=this._measureDiv;if(!e){this._measureDiv=e=document.createElement("div");e.style.position="absolute";e.style.cursor="default";e.style.overflow="hidden";e.style.display="none";a(e).addClass(b);this.host.append(e)}a(e).html(c);var d={width:a(e).width()+2,height:a(e).height()+2};if(a.jqx.browser&&a.jqx.browser.mozilla){d.height+=3}return d},_hideToolTip:function(b){if(!this._ttEl){return}if(this._ttEl.box){if(b==0){a(this._ttEl.box).hide()}else{a(this._ttEl.box).fadeOut()}}this._hideCrosshairs();this._ttEl.gidx=undefined},_hideCrosshairs:function(){if(!this._ttEl){return}if(this._ttEl.vLine){this.renderer.removeElement(this._ttEl.vLine);this._ttEl.vLine=undefined}if(this._ttEl.hLine){this.renderer.removeElement(this._ttEl.hLine);this._ttEl.hLine=undefined}},_get:function(b){return a.jqx.getByPriority(b)},_getAxisSettings:function(f){if(!f){return{}}var l=this;var k=f.gridLines||{};var n={visible:this._get([k.visible,f.showGridLines,true]),color:l._get([k.color,f.gridLinesColor,l._defaultLineColor]),unitInterval:l._get([k.unitInterval,k.interval,f.gridLinesInterval]),step:l._get([k.step,f.gridLinesStep]),dashStyle:l._get([k.dashStyle,f.gridLinesDashStyle]),width:l._get([k.lineWidth,1]),offsets:[],alternatingBackgroundColor:f.alternatingBackgroundColor,alternatingBackgroundColor2:f.alternatingBackgroundColor2,alternatingBackgroundOpacity:f.alternatingBackgroundOpacity};var d=f.tickMarks||{};var h={visible:this._get([d.visible,f.showTickMarks,true]),color:l._get([d.color,f.tickMarksColor,l._defaultLineColor]),unitInterval:l._get([d.unitInterval,d.interval,f.tickMarksInterval]),step:l._get([d.step,f.tickMarksStep]),dashStyle:l._get([d.dashStyle,f.tickMarksDashStyle]),width:l._get([d.lineWidth,1]),size:l._get([d.size,4]),offsets:[]};var e=f.title||{};var c={visible:l._get([e.visible,true]),text:l._get([f.description,e.text]),style:l._get([f.descriptionClass,e["class"],l.toThemeProperty("jqx-chart-axis-description",null)]),halign:l._get([f.horizontalDescriptionAlignment,e.horizontalAlignment,"center"]),valign:l._get([f.verticalDescriptionAlignment,e.verticalAlignment,"center"]),angle:0,rotationPoint:l._get([e.rotationPoint,"centercenter"]),offset:l._get([e.offset,{x:0,y:0}])};var i=f.line||{};var b={visible:l._get([i.visible,true]),color:l._get([i.color,n.color,l._defaultLineColor]),dashStyle:l._get([i.dashStyle,n.dashStyle,""]),width:l._get([i.lineWidth,1]),angle:l._get([i.angle,NaN])};var j=f.padding||{};j={left:j.left||0,right:j.right||0,top:j.top||0,bottom:j.bottom||0};var g=this._getAxisLabelsSettings(f);var m={visible:this._get([f.visible,f.showValueAxis,f.showXAxis,f.showCategoryAxis,true]),customDraw:this._get([f.customDraw,false]),gridLines:n,tickMarks:h,line:b,title:c,labels:g,padding:j,toolTipFormatFunction:this._get([f.toolTipFormatFunction,f.formatFunction,g.formatFunction]),toolTipFormatSettings:this._get([f.toolTipFormatSettings,f.formatSettings,g.formatSettings])};return m},_getAxisLabelsSettings:function(d){var b=this;var e=d.labels||{};var c={visible:b._get([d.showLabels,e.visible,true]),unitInterval:b._get([e.unitInterval,e.interval,d.labelsInterval]),step:b._get([e.step,d.labelsStep]),angle:b._get([d.textRotationAngle,e.angle,0]),style:b._get([d["class"],e["class"],b.toThemeProperty("jqx-chart-axis-text",null)]),halign:b._get([d.horizontalTextAlignment,e.horizontalAlignment,"center"]),valign:b._get([d.verticalTextAlignment,e.verticalAlignment,"center"]),textRotationPoint:b._get([d.textRotationPoint,e.rotationPoint,"auto"]),textOffset:b._get([d.textOffset,e.offset,{x:0,y:0}]),autoRotate:b._get([d.labelsAutoRotate,e.autoRotate,false]),formatSettings:b._get([d.formatSettings,e.formatSettings,undefined]),formatFunction:b._get([d.formatFunction,e.formatFunction,undefined])};return c},_getLabelsSettings:function(p,l,h,t){var j=this.seriesGroups[p];var r=j.series[l];var m=isNaN(h)?undefined:this._getDataValue(h,r.dataField,p);var k=t||["Visible","Offset","Angle","HorizontalAlignment","VerticalAlignment","Class","BackgroundColor","BorderColor","BorderOpacity","Padding","Opacity","BackgroundOpacity","LinesAngles","LinesEnabled","AutoRotate","Radius"];var q={};for(var f=0;f<k.length;f++){var n=k[f];var c="labels"+n;var b="label"+n;var o=n.substring(0,1).toLowerCase()+n.substring(1);var d=undefined;if(j.labels&&typeof(j.labels)=="object"){d=j.labels[o]}if(r.labels&&typeof(r.labels)=="object"&&undefined!=r.labels[o]){d=r.labels[o]}d=this._get([r[c],r[b],d,j[c],j[b]]);if(a.isFunction(d)){q[o]=d(m,h,r,j)}else{q[o]=d}}q["class"]=q["class"]||this.toThemeProperty("jqx-chart-label-text",null);q.visible=this._get([q.visible,r.showLabels,j.showLabels,r.labels!=undefined?true:undefined,j.labels!=undefined?true:undefined]);var e=q.padding||1;q.padding={left:this._get([e.left,isNaN(e)?1:e]),right:this._get([e.right,isNaN(e)?1:e]),top:this._get([e.top,isNaN(e)?1:e]),bottom:this._get([e.bottom,isNaN(e)?1:e])};return q},_showLabel:function(J,E,f,b,t,i,e,k,c,F,B){var m=this.seriesGroups[J];var r=m.series[E];var C={width:0,height:0},q;if(isNaN(f)){return}var I=this._getLabelsSettings(J,E,f);if(!I.visible){return e?C:undefined}if(b.width<0||b.height<0){return e?C:undefined}var g=I.angle;if(!isNaN(F)){g=F}var j=I.offset||{};var G={x:j.x,y:j.y};if(isNaN(G.x)){G.x=0}if(isNaN(G.y)){G.y=0}t=t||I.horizontalAlignment||"center";i=i||I.verticalAlignment||"center";var v=this._getFormattedValue(J,E,f,undefined,undefined,true);var s=b.width;var H=b.height;if(k==true&&t!="center"){t=t=="right"?"left":"right"}if(c==true&&i!="center"&&i!="middle"){i=i=="top"?"bottom":"top";G.y*=-1}C=this.renderer.measureText(v,g,{"class":I["class"]});if(e){return C}var p=0,n=0;if(s>0){if(t==""||t=="center"){p+=(s-C.width)/2}else{if(t=="right"){p+=(s-C.width)}}}if(H>0){if(i==""||i=="center"){n+=(H-C.height)/2}else{if(i=="bottom"){n+=(H-C.height)}}}p+=b.x+G.x;n+=b.y+G.y;var o=this._plotRect;if(p<=o.x){p=o.x+2}if(n<=o.y){n=o.y+2}var l={width:Math.max(C.width,1),height:Math.max(C.height,1)};if(n+l.height>=o.y+o.height){n=o.y+o.height-(q?(l.height+q.height)/2:l.height)-2}if(p+l.width>=o.x+o.width){p=o.x+o.width-l.width-2}var d;var A=I.backgroundColor;var D=I.borderColor;var z=I.padding;if(A||D){d=this.renderer.beginGroup();var b=this.renderer.rect(p-z.left,n-z.top,C.width+z.left+z.right,C.height+z.bottom+z.bottom,{fill:A||"transparent","fill-opacity":I.backgroundOpacity||1,stroke:D||"transparent","stroke-opacity":I.borderOpacity,"stroke-width":1})}var u=this.renderer.text(v,p,n,C.width,C.height,g,{"class":I["class"],opacity:I.opacity||1},false,"center","center");if(B){B.x=p-z.left;B.y=n-z.top;B.width=C.width+z.left+z.right;B.height=C.height+z.bottom+z.bottom}if(this._isVML){this.renderer.removeElement(u);this.renderer.getContainer()[0].appendChild(u)}if(d){this.renderer.endGroup()}return d||u},_getAnimProps:function(j,f){var e=this.seriesGroups[j];var c=!isNaN(f)?e.series[f]:undefined;var b=this.enableAnimations==true;if(e.enableAnimations){b=e.enableAnimations==true}if(c&&c.enableAnimations){b=c.enableAnimations==true}var i=this.animationDuration;if(isNaN(i)){i=1000}var d=e.animationDuration;if(!isNaN(d)){i=d}if(c){var h=c.animationDuration;if(!isNaN(h)){i=h}}if(i>5000){i=1000}return{enabled:b,duration:i}},_isColorTransition:function(f,d,e,g){if(g-1<e.xoffsets.first){return false}var b=this._getColors(f,d,g,this._getGroupGradientType(f));var c=this._getColors(f,d,g-1,this._getGroupGradientType(f));return(b.fillColor!=c.fillColor)},_renderLineSeries:function(k,R){var I=this.seriesGroups[k];if(!I.series||I.series.length==0){return}var s=I.type.indexOf("area")!=-1;var L=I.type.indexOf("stacked")!=-1;var e=L&&I.type.indexOf("100")!=-1;var af=I.type.indexOf("spline")!=-1;var t=I.type.indexOf("step")!=-1;var P=I.type.indexOf("range")!=-1;var ag=I.polar==true||I.spider==true;if(ag){t=false}if(t&&af){return}var A=this._getDataLen(k);var ad=R.width/A;var ak=I.orientation=="horizontal";var C=this._getXAxis(k).flip==true;var z=R;if(ak){z={x:R.y,y:R.x,width:R.height,height:R.width}}var D=this._calcGroupOffsets(k,z);if(!D||D.xoffsets.length==0){return}if(!this._linesRenderInfo){this._linesRenderInfo={}}this._linesRenderInfo[k]={};for(var n=I.series.length-1;n>=0;n--){var g=this._getSerieSettings(k,n);var ai={groupIndex:k,rect:z,serieIndex:n,swapXY:ak,isArea:s,isSpline:af,isRange:P,isPolar:ag,settings:g,segments:[],pointsLength:0};var j=this._isSerieVisible(k,n);if(!j){this._linesRenderInfo[k][n]=ai;continue}var K=I.series[n];if(K.customDraw){continue}var w=a.isFunction(K.colorFunction);var V=D.xoffsets.first;var H=V;var O=this._getColors(k,n,NaN,this._getGroupGradientType(k));var ac=false;var u;do{var X=[];var U=[];var r=[];var Q=-1;var p=0,o=0;var S=NaN;var F=NaN;var aj=NaN;if(D.xoffsets.length<1){continue}var T=this._getAnimProps(k,n);var M=T.enabled&&!this._isToggleRefresh&&D.xoffsets.length<10000&&this._isVML!=true?T.duration:0;var v=V;u=false;var d=this._getColors(k,n,V,this._getGroupGradientType(k));var E=undefined;for(var ae=V;ae<=D.xoffsets.last;ae++){V=ae;var Y=D.xoffsets.data[ae];var W=D.xoffsets.xvalues[ae];if(isNaN(Y)){continue}Y=Math.max(Y,1);p=Y;o=D.offsets[n][ae].to;if(!w&&E&&this.enableSampling&&a.jqx._ptdist(E.x,E.y,p,o)<1){continue}E={x:p,y:o};var ab=D.offsets[n][ae].from;if(isNaN(o)||isNaN(ab)){if(K.emptyPointsDisplay=="connect"){continue}else{if(K.emptyPointsDisplay=="zero"){if(isNaN(o)){o=D.baseOffset}if(isNaN(ab)){ab=D.baseOffset}}else{u=true;break}}}if(w&&this._isColorTransition(k,n,D,V)){if(X.length>1){V--;break}}var c=this._elementRenderInfo;if(c&&c.length>k&&c[k].series.length>n){var f=c[k].series[n][W];var aj=a.jqx._ptrnd(f?f.to:undefined);var J=a.jqx._ptrnd(z.x+(f?f.xoffset:undefined));r.push(ak?{y:J,x:aj,index:ae}:{x:J,y:aj,index:ae})}H=ae;if(g.stroke<2){if(o-z.y<=1){o=z.y+1}if(ab-z.y<=1){ab=z.y+1}if(z.y+z.height-o<=1){o=z.y+z.height-1}if(z.y+z.height-ab<=1){ab=z.y+z.height-1}}if(!s&&e){if(o<=z.y){o=z.y+1}if(o>=z.y+z.height){o=z.y+z.height-1}if(ab<=z.y){ab=z.y+1}if(ab>=z.y+z.height){ab=z.y+z.height-1}}Y=Math.max(Y,1);p=Y+z.x;if(I.skipOverlappingPoints==true&&!isNaN(S)&&Math.abs(S-p)<=1){continue}if(t&&!isNaN(S)&&!isNaN(F)){if(F!=o){X.push(ak?{y:p,x:a.jqx._ptrnd(F)}:{x:p,y:a.jqx._ptrnd(F)})}}X.push(ak?{y:p,x:a.jqx._ptrnd(o),index:ae}:{x:p,y:a.jqx._ptrnd(o),index:ae});U.push(ak?{y:p,x:a.jqx._ptrnd(ab),index:ae}:{x:p,y:a.jqx._ptrnd(ab),index:ae});S=p;F=o;if(isNaN(aj)){aj=o}}if(X.length==0){V++;continue}var G=X[X.length-1].index;if(w){O=this._getColors(k,n,G,this._getGroupGradientType(k))}var l=z.x+D.xoffsets.data[v];var aa=z.x+D.xoffsets.data[H];if(s&&I.alignEndPointsWithIntervals==true){var B=C?-1:1;if(l>z.x){l=z.x}if(aa<z.x+z.width){aa=z.x+z.width}if(C){var Z=l;l=aa;aa=Z}}aa=a.jqx._ptrnd(aa);l=a.jqx._ptrnd(l);var m=D.baseOffset;aj=a.jqx._ptrnd(aj);var h=a.jqx._ptrnd(o)||m;if(P){X=X.concat(U.reverse())}ai.pointsLength+=X.length;var b={lastItemIndex:G,colorSettings:O,pointsArray:X,pointsStart:r,left:l,right:aa,pyStart:aj,pyEnd:h,yBase:m,labelElements:[],symbolElements:[]};ai.segments.push(b)}while(V<D.xoffsets.first+D.xoffsets.length-1||u);this._linesRenderInfo[k][n]=ai}var N=this._linesRenderInfo[k];var ah=[];for(var ae in N){ah.push(N[ae])}ah=ah.sort(function(al,i){return al.serieIndex-i.serieIndex});if(s&&L){ah.reverse()}for(var ae=0;ae<ah.length;ae++){var ai=ah[ae];this._animateLine(ai,M==0?1:0);var q=this;this._enqueueAnimation("series",undefined,undefined,M,function(al,i,am){q._animateLine(i,am)},ai)}},_animateLine:function(w,b){var C=w.settings;var f=w.groupIndex;var g=w.serieIndex;var j=this.seriesGroups[f];var s=j.series[g];var v=this._getSymbol(f,g);var p=this._getLabelsSettings(f,g,NaN,["Visible"]).visible;var o=true;if(w.isPolar){if(!isNaN(j.endAngle)&&Math.round(Math.abs((isNaN(j.startAngle)?0:j.startAngle)-j.endAngle))!=360){o=false}}if(s.endPointsConnect==false){o=false}var q=0;for(var d=0;d<w.segments.length;d++){var u=w.segments[d];var z=this._calculateLine(f,w.pointsLength,q,u.pointsArray,u.pointsStart,u.yBase,b,w.isArea,w.swapXY);q+=u.pointsArray.length;if(z==""){continue}var r=z.split(" ");var A=r.length;var h=z;if(h!=""){h=this._buildLineCmd(z,w.isRange,u.left,u.right,u.pyStart,u.pyEnd,u.yBase,w.isArea,w.isPolar,o,w.isSpline,w.swapXY)}else{h="M 0 0"}var l=u.colorSettings;if(!u.pathElement){u.pathElement=this.renderer.path(h,{"stroke-width":C.stroke,stroke:l.lineColor,"stroke-opacity":C.opacity,"fill-opacity":C.opacity,"stroke-dasharray":C.dashStyle,fill:w.isArea?l.fillColor:"none"});this._installHandlers(u.pathElement,"path",f,g,u.lastItemIndex)}else{this.renderer.attr(u.pathElement,{d:h})}if(u.labelElements){for(var B=0;B<u.labelElements.length;B++){this.renderer.removeElement(u.labelElements[B])}u.labelElements=[]}if(u.symbolElements){for(var B=0;B<u.symbolElements.length;B++){this.renderer.removeElement(u.symbolElements[B])}u.symbolElements=[]}if(u.pointsArray.length==r.length){if(v!="none"||p){var E=s.symbolSize;var D=this._plotRect;for(var B=0;B<r.length;B++){var t=r[B].split(",");t={x:parseFloat(t[0]),y:parseFloat(t[1])};if(t.x<D.x||t.x>D.x+D.width||t.y<D.y||t.y>D.y+D.height){continue}if(v!="none"){var n=this._getColors(f,g,u.pointsArray[B].index,this._getGroupGradientType(f));var e=this._drawSymbol(v,t.x,t.y,n.fillColorSymbol,C.opacity,n.lineColorSymbol,C.opacity,C.strokeSymbol,undefined,E);u.symbolElements.push(e)}if(p){var k=(B>0?r[B-1]:r[B]).split(",");k={x:parseFloat(k[0]),y:parseFloat(k[1])};var m=(B<r.length-1?r[B+1]:r[B]).split(",");m={x:parseFloat(m[0]),y:parseFloat(m[1])};t=this._adjustLineLabelPosition(f,g,u.pointsArray[B].index,t,k,m);if(t){var c=this._showLabel(f,g,u.pointsArray[B].index,{x:t.x,y:t.y,width:0,height:0});u.labelElements.push(c)}}}}}if(b==1&&v!="none"){for(var B=0;B<u.symbolElements.length;B++){if(isNaN(u.pointsArray[B].index)){continue}this._installHandlers(u.symbolElements[B],"symbol",f,g,u.pointsArray[B].index)}}}},_adjustLineLabelPosition:function(i,g,d,h,f,e){var b=this._showLabel(i,g,d,{width:0,height:0},"","",true);if(!b){return}var c={x:h.x-b.width/2,y:0};c.y=h.y-1.5*b.height;return c},_calculateLine:function(h,v,p,o,n,f,e,z,c){var w=this.seriesGroups[h];var m;if(w.polar==true||w.spider==true){m=this._getPolarAxisCoords(h,this._plotRect)}var s="";var t=o.length;if(!z&&n.length==0){var r=v*e;t=r-p}var j=NaN;for(var u=0;u<t+1&&u<o.length;u++){if(u>0){s+=" "}var k=o[u].y;var l=o[u].x;var b=!z?k:f;var d=l;if(n&&n.length>u){b=n[u].y;d=n[u].x;if(isNaN(b)||isNaN(d)){b=k;d=l}}j=d;if(t<=o.length&&u>0&&u==t){d=o[u-1].x;b=o[u-1].y}if(c){l=a.jqx._ptrnd((l-b)*(z?e:1)+b);k=a.jqx._ptrnd(k)}else{l=a.jqx._ptrnd((l-d)*e+d);k=a.jqx._ptrnd((k-b)*e+b)}if(m){var q=this._toPolarCoord(m,this._plotRect,l,k);l=q.x;k=q.y}s+=l+","+k}return s},_buildLineCmd:function(k,o,g,s,e,m,d,r,c,j,f,b){var p=k;var l=b?d+","+g:g+","+d;var h=b?d+","+s:s+","+d;if(r&&!c&&!o){p=l+" "+k+" "+h}if(f){p=this._getBezierPoints(p)}var n=p.split(" ");if(n.length==0){return""}if(n.length==1){var q=n[0].split(",");return"M "+n[0]+" L"+(parseFloat(q[0])+1)+","+(parseFloat(q[1])+1)}var i=n[0].replace("M","");if(r&&!c){if(!o){p="M "+l+" L "+i+" "+p}else{p="M "+i+" L "+i+(f?"":(" L "+i+" "))+p}}else{if(!f){p="M "+i+" L "+i+" "+p}}if((c&&j)||o){p+=" Z"}return p},_getSerieSettings:function(i,c){var h=this.seriesGroups[i];var g=h.type.indexOf("area")!=-1;var f=h.type.indexOf("line")!=-1;var d=h.series[c];var k=d.dashStyle||h.dashStyle||"";var e=d.opacity||h.opacity;if(isNaN(e)||e<0||e>1){e=1}var j=d.lineWidth;if(isNaN(j)&&j!="auto"){j=h.lineWidth}if(j=="auto"||isNaN(j)||j<0||j>15){if(g){j=2}else{if(f){j=3}else{j=1}}}var b=d.lineWidthSymbol;if(isNaN(b)){b=1}return{stroke:j,strokeSymbol:b,opacity:e,dashStyle:k}},_getColors:function(u,p,d,e,b){var k=this.seriesGroups[u];var o=k.series[p];var c=this._get([o.useGradientColors,k.useGradientColors,k.useGradient,true]);var l=this._getSeriesColors(u,p,d);if(!l.fillColor){l.fillColor=r;l.fillColorSelected=a.jqx.adjustColor(r,1.1);l.fillColorAlt=a.jqx.adjustColor(r,4);l.fillColorAltSelected=a.jqx.adjustColor(r,3);l.lineColor=l.symbolColor=a.jqx.adjustColor(r,0.9);l.lineColorSelected=l.symbolColorSelected=a.jqx.adjustColor(r,0.9)}var h=[[0,1.4],[100,1]];var f=[[0,1],[25,1.1],[50,1.4],[100,1]];var n=[[0,1.3],[90,1.2],[100,1]];var j=NaN;if(!isNaN(b)){j=b==2?h:f}if(c){var q={};for(var s in l){q[s]=l[s]}l=q;if(e=="verticalLinearGradient"||e=="horizontalLinearGradient"){var g=e=="verticalLinearGradient"?j||h:j||f;var m=["fillColor","fillColorSelected","fillColorAlt","fillColorAltSelected"];for(var v in m){var r=l[m[v]];if(r){l[m[v]]=this.renderer._toLinearGradient(r,e=="verticalLinearGradient",g)}}}else{if(e=="radialGradient"){var t;var j=h;if((k.type=="pie"||k.type=="donut"||k.polar)&&d!=undefined&&this._renderData[u]&&this._renderData[u].offsets[p]){t=this._renderData[u].offsets[p][d];j=n}l.fillColor=this.renderer._toRadialGradient(l.fillColor,j,t);l.fillColorSelected=this.renderer._toRadialGradient(l.fillColorSelected,j,t)}}}return l},_installHandlers:function(c,f,i,h,d){if(!this.enableEvents){return false}var j=this;var e=this.seriesGroups[i];var k=this.seriesGroups[i].series[h];var b=e.type.indexOf("line")!=-1||e.type.indexOf("area")!=-1;if(!b&&!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mousemove",function(m){var l=j._selected;if(l&&l.isLineType&&l.linesUnselectMode=="click"&&!(l.group==i&&l.series==h)){return}var g=m.pageX||m.clientX||m.screenX;var o=m.pageY||m.clientY||m.screenY;var n=j.host.offset();g-=n.left;o-=n.top;if(j._mouseX==g&&j._mouseY==o){return}if(j._ttEl){if(j._ttEl.gidx==i&&j._ttEl.sidx==h&&j._ttEl.iidx==d){return}}j._startTooltipTimer(i,h,d)})}if(!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mouseover",function(l){var g=j._selected;if(g&&g.isLineType&&g.linesUnselectMode=="click"&&!(g.group==i&&g.series==h)){return}j._select(c,f,i,h,d,d)})}this.renderer.addHandler(c,"click",function(g){clearTimeout(j._hostClickTimer);j._lastClickTs=(new Date()).valueOf();if(b&&(f!="symbol"&&f!="pointMarker")){return}if(j._isColumnType(e.type)){j._unselect()}if(isNaN(d)){return}g.stopImmediatePropagation();j._raiseItemEvent("click",e,k,d)})},_getHorizontalOffset:function(A,s,k,j){var c=this._plotRect;var h=this._getDataLen(A);if(h==0){return{index:undefined,value:k}}var p=this._calcGroupOffsets(A,this._plotRect);if(p.xoffsets.length==0){return{index:undefined,value:undefined}}var n=k;var m=j;var w=this.seriesGroups[A];var l;if(w.polar||w.spider){l=this._getPolarAxisCoords(A,c)}var e=this._getXAxis(A).flip==true;var b,o,v,f;for(var t=p.xoffsets.first;t<=p.xoffsets.last;t++){var u=p.xoffsets.data[t];var d=p.offsets[s][t].to;var q=0;if(l){var r=this._toPolarCoord(l,c,u+c.x,d);u=r.x;d=r.y;q=a.jqx._ptdist(n,m,u,d)}else{if(w.orientation=="horizontal"){u+=c.y;var z=d;d=u;u=z;q=a.jqx._ptdist(n,m,u,d)}else{u+=c.x;q=Math.abs(n-u)}}if(isNaN(b)||b>q){b=q;o=t;v=u;f=d}}return{index:o,value:p.xoffsets.data[o],polarAxisCoords:l,x:v,y:f}},onmousemove:function(k,j){if(this._mouseX==k&&this._mouseY==j){return}this._mouseX=k;this._mouseY=j;if(!this._selected){return}var B=this._selected.group;var q=this._selected.series;var v=this.seriesGroups[B];var n=v.series[q];var b=this._plotRect;if(this.renderer){b=this.renderer.getRect();b.x+=5;b.y+=5;b.width-=10;b.height-=10}if(k<b.x||k>b.x+b.width||j<b.y||j>b.y+b.height){this._hideToolTip();this._unselect();return}var e=v.orientation=="horizontal";var b=this._plotRect;if(v.type.indexOf("line")!=-1||v.type.indexOf("area")!=-1){var f=this._getHorizontalOffset(B,this._selected.series,k,j);var u=f.index;if(u==undefined){return}if(this._selected.item!=u){var p=this._linesRenderInfo[B][q].segments;var r=0;while(u>p[r].lastItemIndex){r++;if(r>=p.length){return}}var c=p[r].pathElement;var C=p[r].lastItemIndex;this._unselect(false);this._select(c,"path",B,q,u,C)}var m=this._getSymbol(this._selected.group,this._selected.series);if(m=="none"){m="circle"}var o=this._calcGroupOffsets(B,b);var d=o.offsets[this._selected.series][u].to;var t=d;if(v.type.indexOf("range")!=-1){t=o.offsets[this._selected.series][u].from}var l=e?k:j;if(!isNaN(t)&&Math.abs(l-t)<Math.abs(l-d)){j=t}else{j=d}if(isNaN(j)){return}k=f.value;if(e){var z=k;k=j;j=z+b.y}else{k+=b.x}if(f.polarAxisCoords){k=f.x;j=f.y}j=a.jqx._ptrnd(j);k=a.jqx._ptrnd(k);if(this._pointMarker&&this._pointMarker.element){this.renderer.removeElement(this._pointMarker.element);this._pointMarker.element=undefined}if(isNaN(k)||isNaN(j)){return}var h=this._getSeriesColors(B,q,u);var w=this._getSerieSettings(B,q);var A=n.symbolSizeSelected;if(isNaN(A)){A=n.symbolSize}if(isNaN(A)||A>50||A<0){A=v.symbolSize}if(isNaN(A)||A>50||A<0){A=8}if(this.showToolTips||this.enableCrosshairs){this._pointMarker={type:m,x:k,y:j,gidx:B,sidx:q,iidx:u};this._pointMarker.element=this._drawSymbol(m,k,j,h.fillColorSymbolSelected,w.opacity,h.lineColorSymbolSelected,w.opacity,w.strokeSymbol,w.dashStyle,A);this._installHandlers(this._pointMarker.element,"pointMarker",B,q,u)}this._startTooltipTimer(B,this._selected.series,u)}},_drawSymbol:function(i,l,j,c,m,k,f,g,b,o){var e;var h=o||6;var d=h/2;switch(i){case"none":return undefined;case"circle":e=this.renderer.circle(l,j,h/2);break;case"square":h=h-1;d=h/2;e=this.renderer.rect(l-d,j-d,h,h);break;case"diamond":var n="M "+(l-d)+","+(j)+" L"+(l)+","+(j-d)+" L"+(l+d)+","+(j)+" L"+(l)+","+(j+d)+" Z";e=this.renderer.path(n);break;case"triangle_up":case"triangle":var n="M "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j+d)+" L "+(l)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_down":var n="M "+(l-d)+","+(j-d)+" L "+(l)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_left":var n="M "+(l-d)+","+(j)+" L "+(l+d)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_right":var n="M "+(l-d)+","+(j-d)+" L "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j)+" Z";e=this.renderer.path(n);break;default:e=this.renderer.circle(l,j,h)}this.renderer.attr(e,{fill:c,"fill-opacity":m,stroke:k,"stroke-width":g,"stroke-opacity":f,"stroke-dasharray":b||""});if(i!="circle"){this.renderer.attr(e,{r:h/2});if(i!="square"){this.renderer.attr(e,{x:l,y:j})}}return e},_getSymbol:function(f,b){var c=["circle","square","diamond","triangle_up","triangle_down","triangle_left","triangle_right"];var e=this.seriesGroups[f];var d=e.series[b];var h;if(d.symbolType!=undefined){h=d.symbolType}if(h==undefined){h=e.symbolType}if(h=="default"){return c[b%c.length]}else{if(h!=undefined){return h}}return"none"},_startTooltipTimer:function(k,j,d,i,h,b,f){this._cancelTooltipTimer();var l=this;var e=l.seriesGroups[k];var c=this.toolTipShowDelay||this.toolTipDelay;if(isNaN(c)||c>10000||c<0){c=500}if(this._ttEl||(true==this.enableCrosshairs&&false==this.showToolTips)){c=0}if(!isNaN(b)){c=b}clearTimeout(this._tttimerHide);if(isNaN(i)){i=l._mouseX}if(isNaN(h)){h=l._mouseY-3}if(c==0){l._showToolTip(i,h,k,j,d)}this._tttimer=setTimeout(function(){if(c!=0){l._showToolTip(i,h,k,j,d)}var g=l.toolTipHideDelay;if(!isNaN(f)){g=f}if(isNaN(g)){g=4000}l._tttimerHide=setTimeout(function(){l._hideToolTip();l._unselect()},g)},c)},_cancelTooltipTimer:function(){clearTimeout(this._tttimer)},_getGroupGradientType:function(c){var b=this.seriesGroups[c];if(b.type.indexOf("area")!=-1){return b.orientation=="horizontal"?"horizontalLinearGradient":"verticalLinearGradient"}else{if(this._isColumnType(b.type)||b.type.indexOf("candle")!=-1){if(b.polar){return"radialGradient"}return b.orientation=="horizontal"?"verticalLinearGradient":"horizontalLinearGradient"}else{if(b.type.indexOf("scatter")!=-1||b.type.indexOf("bubble")!=-1||this._isPieGroup(c)){return"radialGradient"}}}return undefined},_select:function(h,l,o,n,i,m){if(this._selected){if((this._selected.item!=i||this._selected.series!=n||this._selected.group!=o)){this._unselect()}else{return}}var k=this.seriesGroups[o];var p=k.series[n];if(k.enableSelection==false||p.enableSelection==false){return}var f=k.type.indexOf("line")!=-1&&k.type.indexOf("area")==-1;this._selected={element:h,type:l,group:o,series:n,item:i,iidxBase:m,isLineType:f,linesUnselectMode:p.linesUnselectMode||k.linesUnselectMode};var b=this._getColors(o,n,m||i,this._getGroupGradientType(o));var c=b.fillColorSelected;if(f){c="none"}var e=this._getSerieSettings(o,n);var d=(l=="symbol")?b.lineColorSymbolSelected:b.lineColorSelected;c=(l=="symbol")?b.fillColorSymbolSelected:c;var j=(l=="symbol")?1:e.stroke;if(this.renderer.getAttr(h,"fill")==b.fillColorAlt){c=b.fillColorAltSelected}this.renderer.attr(h,{stroke:d,fill:c,"stroke-width":j});if(k.type.indexOf("pie")!=-1||k.type.indexOf("donut")!=-1){this._applyPieSelect()}this._raiseItemEvent("mouseover",k,p,i)},_applyPieSelect:function(){var c=this;c._createAnimationGroup("animPieSlice");var e=this._selected;if(!e){return}var f=this.getItemCoord(e.group,e.series,e.item);if(!f){return}var d=this._getRenderInfo(e.group,e.series,e.item);var b={element:d,coord:f};this._enqueueAnimation("animPieSlice",undefined,undefined,300,function(i,g,j){var l=g.coord;var h=l.selectedRadiusChange*j;var k=c.renderer.pieSlicePath(l.center.x,l.center.y,l.innerRadius==0?0:(l.innerRadius+h),l.outerRadius+h,l.fromAngle,l.toAngle,l.centerOffset);c.renderer.attr(g.element.element,{d:k});c._showPieLabel(e.group,e.series,e.item,undefined,h)},b);c._startAnimation("animPieSlice")},_applyPieUnselect:function(){this._stopAnimations();var b=this._selected;if(!b){return}var d=this.getItemCoord(b.group,b.series,b.item);if(!d||!d.center){return}var c=this.renderer.pieSlicePath(d.center.x,d.center.y,d.innerRadius,d.outerRadius,d.fromAngle,d.toAngle,d.centerOffset);this.renderer.attr(b.element,{d:c});this._showPieLabel(b.group,b.series,b.item,undefined,0)},_unselect:function(){var o=this;if(o._selected){var n=o._selected.group;var m=o._selected.series;var f=o._selected.item;var k=o._selected.iidxBase;var j=o._selected.type;var i=o.seriesGroups[n];var p=i.series[m];var e=i.type.indexOf("line")!=-1&&i.type.indexOf("area")==-1;var b=o._getColors(n,m,k||f,o._getGroupGradientType(n));var c=b.fillColor;if(e){c="none"}var d=o._getSerieSettings(n,m);var l=(j=="symbol")?b.lineColorSymbol:b.lineColor;c=(j=="symbol")?b.fillColorSymbol:c;if(this.renderer.getAttr(o._selected.element,"fill")==b.fillColorAltSelected){c=b.fillColorAlt}var h=(j=="symbol")?1:d.stroke;o.renderer.attr(o._selected.element,{stroke:l,fill:c,"stroke-width":h});if(i.type.indexOf("pie")!=-1||i.type.indexOf("donut")!=-1){this._applyPieUnselect()}o._selected=undefined;if(!isNaN(f)){o._raiseItemEvent("mouseout",i,p,f)}}if(o._pointMarker){if(o._pointMarker.element){o.renderer.removeElement(o._pointMarker.element);o._pointMarker.element=undefined}o._pointMarker=undefined;o._hideCrosshairs()}},_raiseItemEvent:function(f,g,e,c){var d=e[f]||g[f];var h=0;for(;h<this.seriesGroups.length;h++){if(this.seriesGroups[h]==g){break}}if(h==this.seriesGroups.length){return}var b={event:f,seriesGroup:g,serie:e,elementIndex:c,elementValue:this._getDataValue(c,e.dataField,h)};if(d&&a.isFunction(d)){d(b)}this._raiseEvent(f,b)},_raiseEvent:function(d,c){var e=new a.Event(d);e.owner=this;c.event=d;e.args=c;var b=this.host.trigger(e);return b},_calcInterval:function(d,j,h){var m=Math.abs(j-d);var k=m/h;var f=[1,2,3,4,5,10,15,20,25,50,100];var b=[0.5,0.25,0.125,0.1];var c=0.1;var g=f;if(k<1){g=b;c=10}var l=0;do{l=0;if(k>=1){c*=10}else{c/=10}for(var e=1;e<g.length;e++){if(Math.abs(g[l]*c-k)>Math.abs(g[e]*c-k)){l=e}else{break}}}while(l==g.length-1);return g[l]*c},_renderDataClone:function(){if(!this._renderData||this._isToggleRefresh){return}var d=this._elementRenderInfo=[];if(this._isSelectorRefresh){return}for(var h=0;h<this._renderData.length;h++){var c=this._getXAxis(h).dataField;while(d.length<=h){d.push({})}var b=d[h];var f=this._renderData[h];if(!f.offsets){continue}if(f.valueAxis){b.valueAxis={itemOffsets:{}};for(var j in f.valueAxis.itemOffsets){b.valueAxis.itemOffsets[j]=f.valueAxis.itemOffsets[j]}}if(f.xAxis){b.xAxis={itemOffsets:{}};for(var j in f.xAxis.itemOffsets){b.xAxis.itemOffsets[j]=f.xAxis.itemOffsets[j]}}b.series=[];var g=b.series;var l=this._isPieGroup(h);for(var m=0;m<f.offsets.length;m++){g.push({});for(var e=0;e<f.offsets[m].length;e++){if(!l){g[m][f.xoffsets.xvalues[e]]={value:f.offsets[m][e].value,valueRadius:f.offsets[m][e].valueRadius,xoffset:f.xoffsets.data[e],from:f.offsets[m][e].from,to:f.offsets[m][e].to}}else{var k=f.offsets[m][e];g[m][k.displayValue]={value:k.value,x:k.x,y:k.y,fromAngle:k.fromAngle,toAngle:k.toAngle}}}}}},getPolarDataPointOffset:function(d,c,f){var e=this._renderData[f];if(!e){return{x:NaN,y:NaN}}var h=this.getValueAxisDataPointOffset(c,f);var b=this.getXAxisDataPointOffset(d,f);var g=this._toPolarCoord(e.polarCoords,e.xAxis.rect,b,h);return{x:g.x,y:g.y}},_getDataPointOffsetDiff:function(j,i,b,f,g,d,h){var e=this._getDataPointOffset(j,b,f,g,d,h);var c=this._getDataPointOffset(i,b,f,g,d,h);return Math.abs(e-c)},_getXAxisRenderData:function(d){if(d>=this._renderData.length){return}var e=this.seriesGroups[d];var c=this._renderData[d].xAxis;if(!c){return}if(e.xAxis==undefined){for(var b=0;b<=d;b++){if(this.seriesGroups[b].xAxis==undefined){break}}c=this._renderData[b].xAxis}return c},getXAxisDataPointOffset:function(j,l){var k=this.seriesGroups[l];if(isNaN(j)){return NaN}renderData=this._getXAxisRenderData(l);if(!renderData){return NaN}var f=renderData.data.axisStats;var i=f.min.valueOf();var b=f.max.valueOf();var g=b-i;if(g==0){g=1}if(j.valueOf()>b||j.valueOf()<i){return NaN}var c=this._getXAxis(l);var d=k.orientation=="horizontal"?"height":"width";var n=k.orientation=="horizontal"?"y":"x";var h=(j.valueOf()-i)/g;var m=renderData.rect[d]-renderData.data.padding.left-renderData.data.padding.right;if(k.polar||k.spider){var e=this._renderData[l].polarCoords;if(e.isClosedCircle){m=renderData.data.axisSize}}return this._plotRect[n]+renderData.data.padding.left+m*(c.flip?(1-h):h)},getValueAxisDataPointOffset:function(g,h){var j=this._getValueAxis(h);if(!j){return NaN}var i=this._renderData[h];if(!i){return NaN}var f=j.flip==true;var d=i.logBase;var e=i.scale;var b=i.gbase;var c=i.baseOffset;return this._getDataPointOffset(g,b,d,e,c,f)},_getDataPointOffset:function(f,c,d,h,e,b){var g;if(isNaN(f)){f=c}if(!isNaN(d)){g=(a.jqx.log(f,d)-a.jqx.log(c,d))*h}else{g=(f-c)*h}if(this._isVML){g=Math.round(g)}if(b){g=e+g}else{g=e-g}return g},_calcGroupOffsets:function(l,L){var z=this.seriesGroups[l];while(this._renderData.length<l+1){this._renderData.push({})}if(this._renderData[l]!=null&&this._renderData[l].offsets!=undefined){return this._renderData[l]}if(this._isPieGroup(l)){return this._calcPieSeriesGroupOffsets(l,L)}var o=this._getValueAxis(l);if(!o||!z.series||z.series.length==0){return this._renderData[l]}var A=o.flip==true;var O=o.logarithmicScale==true;var N=o.logarithmicScaleBase||10;var T=[];var F=z.type.indexOf("stacked")!=-1;var d=F&&z.type.indexOf("100")!=-1;var K=z.type.indexOf("range")!=-1;var U=this._isColumnType(z.type);var Z=z.type.indexOf("waterfall")!=-1;var s=this._getDataLen(l);var r=z.baselineValue||o.baselineValue||0;if(d){r=0}var ag=this._stats.seriesGroups[l];if(!ag||!ag.isValid){return}var aj=ag.hasStackValueReversal;if(aj){r=0}if(Z&&F){if(aj){return}else{r=ag.base}}if(r>ag.max){r=ag.max}if(r<ag.min){r=ag.min}var q=(d||O)?ag.maxRange:ag.max-ag.min;var an=ag.min;var C=ag.max;var M=L.height/(O?ag.intervals:q);var ai=0;if(d){if(an*C<0){q/=2;ai=-(q+r)*M}else{ai=-r*M}}else{ai=-(r-an)*M}if(A){ai=L.y-ai}else{ai+=L.y+L.height}var ah=[];var ad=[];var S=[];var al,H;if(O){al=a.jqx.log(C,N)-a.jqx.log(r,N);if(F){al=ag.intervals;r=d?0:an}H=ag.intervals-al;if(!A){ai=L.y+al/ag.intervals*L.height}}ai=a.jqx._ptrnd(ai);var c=(an*C<0)?L.height/2:L.height;var m=[];var W=[];var ao=F&&(U||O);var am=[];T=new Array(z.series.length);for(var ab=0;ab<z.series.length;ab++){T[ab]=new Array(s)}for(var ac=0;ac<s;ac++){if(!Z&&F){W=[]}for(var ab=0;ab<z.series.length;ab++){if(!F&&O){m=[]}var D=z.series[ab];var E=D.dataField;var aq=D.dataFieldFrom;var P=D.dataFieldTo;var Y=D.radiusDataField||D.sizeDataField;T[ab][ac]={};var g=this._isSerieVisible(l,ab);if(z.type.indexOf("candle")!=-1||z.type.indexOf("ohlc")!=-1){var b=["Open","Close","High","Low"];for(var ak in b){var p="dataField"+b[ak];if(D[p]){T[ab][ac][b[ak]]=this._getDataPointOffset(this._getDataValueAsNumber(ac,D[p],l),r,O?N:NaN,M,ai,A)}}continue}if(F){while(W.length<=ac){W.push(0)}}var ap=NaN;if(K){ap=this._getDataValueAsNumber(ac,aq,l);if(isNaN(ap)){ap=r}}var J=NaN;if(K){J=this._getDataValueAsNumber(ac,P,l)}else{J=this._getDataValueAsNumber(ac,E,l)}var e=this._getDataValueAsNumber(ac,Y,l);if(F){W[ac]+=g?J:0}if(!g){J=NaN}if(isNaN(J)||(O&&J<=0)){T[ab][ac]={from:undefined,to:undefined};continue}var I;if(F){if(ao){I=(J>=r)?ah:ad}else{J=W[ac]}}var af=M*(J-r);if(K){af=M*(J-ap)}if(F&&ao){if(!am[ac]){am[ac]=true;af=M*(J-r)}else{af=M*J}}if(O){while(m.length<=ac){m.push({p:{value:0,height:0},n:{value:0,height:0}})}var B=(K||K)?ap:r;var aa=J>B?m[ac].p:m[ac].n;aa.value+=J;if(d){J=aa.value/(ag.psums[ac]+ag.nsums[ac])*100;af=(a.jqx.log(J,N)-ag.minPow)*M}else{af=a.jqx.log(aa.value,N)-a.jqx.log(B,N);af*=M}af-=aa.height;aa.height+=af}var R=ai;if(K){var t=0;if(O){t=(a.jqx.log(ap,N)-a.jqx.log(r,N))*M}else{t=(ap-r)*M}R+=A?t:-t}if(F){if(d&&!O){var w=(ag.psums[ac]-ag.nsums[ac]);if(J>r){af=(ag.psums[ac]/w)*c;if(ag.psums[ac]!=0){af*=J/ag.psums[ac]}}else{af=(ag.nsums[ac]/w)*c;if(ag.nsums[ac]!=0){af*=J/ag.nsums[ac]}}}if(ao){if(isNaN(I[ac])){I[ac]=R}R=I[ac]}}if(isNaN(S[ac])){S[ac]=0}var ae=S[ac];af=Math.abs(af);var V=af;if(af>=1){h_new=this._isVML?Math.round(af):a.jqx._ptrnd(af)-1;if(Math.abs(af-h_new)>0.5){af=Math.round(af)}else{af=h_new}}ae+=af-V;if(!F){ae=0}if(Math.abs(ae)>0.5){if(ae>0){af-=1;ae-=1}else{af+=1;ae+=1}}S[ac]=ae;if(ab==z.series.length-1&&d){var v=0;for(var X=0;X<ab;X++){v+=Math.abs(T[X][ac].to-T[X][ac].from)}v+=af;if(v<c){if(af>0.5){af=a.jqx._ptrnd(af+c-v)}else{var X=ab-1;while(X>=0){var G=Math.abs(T[X][ac].to-T[X][ac].from);if(G>1){if(T[X][ac].from>T[X][ac].to){T[X][ac].from+=c-v}break}X--}}}}if(A){af*=-1}var Q=J<r;if(K){Q=ap>J}var n=isNaN(ap)?J:{from:ap,to:J};if(Q){if(ao){I[ac]+=af}T[ab][ac]={from:R,to:R+af,value:n,valueRadius:e}}else{if(ao){I[ac]-=af}T[ab][ac]={from:R,to:R-af,value:n,valueRadius:e}}}}var u=this._renderData[l];u.baseOffset=ai;u.gbase=r;u.logBase=O?N:NaN;u.scale=M;u.offsets=!Z?T:this._applyWaterfall(T,s,l,ai,r,O?N:NaN,M,A,F);u.xoffsets=this._calculateXOffsets(l,L.width);return this._renderData[l]},_isPercent:function(b){return(typeof(b)==="string"&&b.length>0&&b.indexOf("%")==b.length-1)},_calcPieSeriesGroupOffsets:function(e,b){var z=this;var m=this._getDataLen(e);var n=this.seriesGroups[e];var A=this._renderData[e]={};var G=A.offsets=[];for(var C=0;C<n.series.length;C++){var t=n.series[C];var E=this._get([t.minAngle,t.startAngle]);if(isNaN(E)||E<0||E>360){E=0}var M=this._get([t.maxAngle,t.endAngle]);if(isNaN(M)||M<0||M>360){M=360}var f=M-E;var o=t.initialAngle||0;if(o<E){o=E}if(o>M){o=M}var c=t.centerOffset||0;var K=a.jqx.getNum([t.offsetX,n.offsetX,b.width/2]);var J=a.jqx.getNum([t.offsetY,n.offsetY,b.height/2]);var w=Math.min(b.width,b.height)/2;var v=o;var g=t.radius;if(z._isPercent(g)){g=parseFloat(g)/100*w}if(isNaN(g)){g=w*0.4}var l=t.innerRadius;if(z._isPercent(l)){l=parseFloat(l)/100*w}if(isNaN(l)||l>=g){l=0}var d=t.selectedRadiusChange;if(z._isPercent(d)){d=parseFloat(d)/100*(g-l)}if(isNaN(d)){d=0.1*(g-l)}G.push([]);var h=0;var j=0;for(var F=0;F<m;F++){var L=this._getDataValueAsNumber(F,t.dataField,e);if(isNaN(L)){continue}if(!this._isSerieVisible(e,C,F)&&t.hiddenPointsDisplay!=true){continue}if(L>0){h+=L}else{j+=L}}var r=h-j;if(r==0){r=1}for(var F=0;F<m;F++){var L=this._getDataValueAsNumber(F,t.dataField,e);if(isNaN(L)){G[C].push({});continue}var D=t.displayText||t.displayField;var k=this._getDataValue(F,D,e);if(k==undefined){k=F}var I=0;var B=this._isSerieVisible(e,C,F);if(B||t.hiddenPointsDisplay==true){I=Math.abs(L)/r*f}var q=b.x+K;var p=b.y+J;var H=c;if(a.isFunction(c)){H=c({seriesIndex:C,seriesGroupIndex:e,itemIndex:F})}if(isNaN(H)){H=0}var u={key:e+"_"+C+"_"+F,value:L,displayValue:k,x:q,y:p,fromAngle:v,toAngle:v+I,centerOffset:H,innerRadius:l,outerRadius:g,selectedRadiusChange:d,visible:B};G[C].push(u);v+=I}}return A},_isPointSeriesOnly:function(){for(var b=0;b<this.seriesGroups.length;b++){var c=this.seriesGroups[b];if(c.type.indexOf("line")==-1&&c.type.indexOf("area")==-1&&c.type.indexOf("scatter")==-1&&c.type.indexOf("bubble")==-1){return false}}return true},_hasColumnSeries:function(){var d=["column","ohlc","candlestick","waterfall"];for(var c=0;c<this.seriesGroups.length;c++){var e=this.seriesGroups[c];for(var b in d){if(e.type.indexOf(d[b])!=-1){return true}}}return false},_alignValuesWithTicks:function(f){var b=this._isPointSeriesOnly();var c=this.seriesGroups[f];var e=this._getXAxis(f);var d=e.valuesOnTicks==undefined?b:e.valuesOnTicks!=false;if(e.logarithmicScale){d=true}if(f==undefined){return d}if(c.valuesOnTicks==undefined){return d}return c.valuesOnTicks},_getYearsDiff:function(c,b){return b.getFullYear()-c.getFullYear()},_getMonthsDiff:function(c,b){return 12*(b.getFullYear()-c.getFullYear())+b.getMonth()-c.getMonth()},_getDateDiff:function(f,e,d,b){var c=0;if(d!="year"&&d!="month"){c=e.valueOf()-f.valueOf()}switch(d){case"year":c=this._getYearsDiff(f,e);break;case"month":c=this._getMonthsDiff(f,e);break;case"day":c/=(24*3600*1000);break;case"hour":c/=(3600*1000);break;case"minute":c/=(60*1000);break;case"second":c/=(1000);break;case"millisecond":break}if(d!="year"&&d!="month"&&b!=false){c=a.jqx._rnd(c,1,true)}return c},_getBestDTUnit:function(k,p,q,d,g){var f="day";var m=p.valueOf()-k.valueOf();if(m<1000){f="second"}else{if(m<3600000){f="minute"}else{if(m<86400000){f="hour"}else{if(m<2592000000){f="day"}else{if(m<31104000000){f="month"}else{f="year"}}}}}var o=[{key:"year",cnt:m/(1000*60*60*24*365)},{key:"month",cnt:m/(1000*60*60*24*30)},{key:"day",cnt:m/(1000*60*60*24)},{key:"hour",cnt:m/(1000*60*60)},{key:"minute",cnt:m/(1000*60)},{key:"second",cnt:m/1000},{key:"millisecond",cnt:m}];var l=-1;for(var h=0;h<o.length;h++){if(o[h].key==f){l=h;break}}var b=-1,n=-1;for(;l<o.length;l++){if(o[l].cnt/100>d){break}var c=this._estAxisInterval(k,p,q,d,o[l].key,g);var e=this._getDTIntCnt(k,p,c,o[l].key);if(b==-1||b<e){b=e;n=l}}f=o[n].key;return f},_getXAxisStats:function(h,o,H){var m=this._getDataLen(h);var c=o.type=="date"||o.type=="time";if(c&&!this._autoDateFormats){if(!this._autoDateFormats){this._autoDateFormats=[]}var q=this._testXAxisDateFormat();if(q){this._autoDateFormats.push(q)}}var p=c?this._castAsDate(o.minValue,o.dateFormat):this._castAsNumber(o.minValue);var s=c?this._castAsDate(o.maxValue,o.dateFormat):this._castAsNumber(o.maxValue);if(this._selectorRange&&this._selectorRange[h]){var j=this._selectorRange[h].min;if(!isNaN(j)){p=c?this._castAsDate(j,o.dateFormat):this._castAsNumber(j)}var k=this._selectorRange[h].max;if(!isNaN(k)){s=c?this._castAsDate(k,o.dateFormat):this._castAsNumber(k)}}var C=p,G=s;var f,r;var d=o.type==undefined||o.type=="auto";var l=(d||o.type=="basic");var D=0,e=0;for(var F=0;F<m&&o.dataField;F++){var B=this._getDataValue(F,o.dataField,h);B=c?this._castAsDate(B,o.dateFormat):this._castAsNumber(B);if(isNaN(B)){continue}if(c){D++}else{e++}if(isNaN(f)||B<f){f=B}if(isNaN(r)||B>=r){r=B}}if(d&&((!c&&e==m)||(c&&D==m))){l=false}if(l){f=0;r=Math.max(0,m-1)}if(isNaN(C)){C=f}if(isNaN(G)){G=r}if(c){if(!this._isDate(C)){C=this._isDate(G)?G:new Date()}if(!this._isDate(G)){G=this._isDate(C)?C:new Date()}}else{if(isNaN(C)){C=0}if(isNaN(G)){G=l?Math.max(0,m-1):C}}if(f==undefined){f=C}if(r==undefined){r=G}var t=o.rangeSelector;if(t){var u=t.minValue||C;if(u&&c){u=this._castAsDate(u,t.dateFormat||o.dateFormat)}var A=t.maxValue||G;if(A&&c){A=this._castAsDate(A,t.dateFormat||o.rangeSelector)}if(C<u){C=u}if(G<u){G=A}if(C>A){C=u}if(G>A){G=A}}var I=o.unitInterval;var z,J;if(c){z=o.baseUnit;if(!z){z=this._getBestDTUnit(C,G,h,H)}J=z=="hour"||z=="minute"||z=="second"||z=="millisecond"}var v=o.logarithmicScale==true;var g=o.logarithmicScaleBase;if(isNaN(g)||g<=1){g=10}var I=o.unitInterval;if(v){I=1}else{if(isNaN(I)||I<=0){I=this._estAxisInterval(C,G,h,H,z)}}var E={min:C,max:G};var n=this.seriesGroups[h];if(v){if(!C){C=1;if(G&&C>G){C=G}}if(!G){G=C}E={min:C,max:G};var b=a.jqx._rnd(a.jqx.log(C,g),1,false);var w=a.jqx._rnd(a.jqx.log(G,g),1,true);G=Math.pow(g,w);C=Math.pow(g,b)}else{if(!c&&(n.polar||n.spider)){C=a.jqx._rnd(C,I,false);G=a.jqx._rnd(G,I,true)}}return{min:C,max:G,logAxis:{enabled:v,base:g,minPow:b,maxPow:w},dsRange:{min:f,max:r},filterRange:E,useIndeces:l,isDateTime:c,isTimeUnit:J,dateTimeUnit:z,interval:I}},_getDefaultDTFormatFn:function(d){var b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var c;if(d=="year"||d=="month"||d=="day"){c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()}}else{c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()+"<br>"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()}}return c},_getDTIntCnt:function(e,b,c,h){var d=0;var f=new Date(e);var g=new Date(b);g=g.valueOf();if(c<=0){return 1}while(f.valueOf()<g){if(h=="millisecond"){f=new Date(f.valueOf()+c)}else{if(h=="second"){f=new Date(f.valueOf()+c*1000)}else{if(h=="minute"){f=new Date(f.valueOf()+c*60000)}else{if(h=="hour"){f=new Date(f.valueOf()+c*60000*24)}else{if(h=="day"){f.setDate(f.getDate()+c)}else{if(h=="month"){f.setMonth(f.getMonth()+c)}else{if(h=="year"){f.setFullYear(f.getFullYear()+c)}}}}}}}d++}return d},_estAxisInterval:function(e,h,m,b,j,c){if(isNaN(e)||isNaN(h)){return NaN}var d=[1,2,5,10,15,20,50,100,200,500];var g=0;var f=b/((!isNaN(c)&&c>0)?c:50);if(this._renderData&&this._renderData.length>m&&this._renderData[m].xAxis&&!isNaN(this._renderData[m].xAxis.avgWidth)){var o=Math.max(1,this._renderData[m].xAxis.avgWidth);if(o!=0&&isNaN(c)){f=0.9*b/o}}if(f<=1){return Math.abs(h-e)}var n=0;while(true){var l=g>=d.length?Math.pow(10,3+g-d.length):d[g];if(this._isDate(e)&&this._isDate(h)){n=this._getDTIntCnt(e,h,l,j)}else{n=(h-e)/l}if(n<=f){break}g++}var k=this.seriesGroups[m];if(k.spider||k.polar){if(2*l>h-e){l=h-e}}return l},_getPaddingSize:function(l,e,f,c,n,g,o){var h=l.min;var j=l.max;if(l.logAxis.enabled){h=l.logAxis.minPow;j=l.logAxis.maxPow}var b=l.interval;var d=l.dateTimeUnit;if(n){var k=(c/Math.max(1,j-h+b))*b;if(g){return{left:0,right:k}}else{if(f){return{left:0,right:0}}return{left:k/2,right:k/2}}}if(f&&!o){return{left:0,right:0}}if(this._isDate(h)&&this._isDate(j)){var m=this._getDTIntCnt(h,j,Math.min(b,j-h),d);var i=c/Math.max(2,m);return{left:i/2,right:i/2}}var m=Math.max(1,j-h);if(m==1){sz=c/4;return{left:sz,right:sz}}var i=c/(m+1);return{left:i/2,right:i/2}},_calculateXOffsets:function(f,F){var E=this.seriesGroups[f];var o=this._getXAxis(f);var w=[];var m=[];var n=this._getDataLen(f);var d=this._getXAxisStats(f,o,F);var v=d.min;var C=d.max;var b=d.isDateTime;var G=d.isTimeUnit;var D=this._hasColumnSeries();var c=E.polar||E.spider;var z=this._get([E.startAngle,E.minAngle,0]);var t=this._get([E.endAngle,E.maxAngle,360]);var q=c&&!(Math.abs(Math.abs(t-z)-360)>0.0001);var l=this._alignValuesWithTicks(f);var s=this._getPaddingSize(d,o,l,F,c,q,D);var I=C-v;var B=d.filterRange;if(I==0){I=1}var H=F-s.left-s.right;if(c&&l&&!q){s.left=s.right=0}var j=-1,p=-1;for(var A=0;A<n;A++){var u=(o.dataField===undefined)?A:this._getDataValue(A,o.dataField,f);if(d.useIndeces){if(A<B.min||A>B.max){w.push(NaN);m.push(undefined);continue}r=s.left+(A-v)/I*H;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:C.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}w.push(a.jqx._ptrnd(r));m.push(u);if(j==-1){j=A}if(p==-1||p<A){p=A}continue}u=b?this._castAsDate(u,o.dateFormat):this._castAsNumber(u);if(isNaN(u)||u<B.min||u>B.max){w.push(NaN);m.push(undefined);continue}var r=0;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:C.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}else{if(!b||(b&&G)){diffFromMin=u-v;r=(u-v)*H/I}else{r=(u.valueOf()-v.valueOf())/(C.valueOf()-v.valueOf())*H}}r=a.jqx._ptrnd(s.left+r);w.push(r);m.push(u);if(j==-1){j=A}if(p==-1||p<A){p=A}}if(o.flip==true){for(var A=0;A<w.length;A++){if(!isNaN(w[A])){w[A]=F-w[A]}}}if(G||b){I=this._getDateDiff(v,C,o.baseUnit);I=a.jqx._rnd(I,1,false)}var k=Math.max(1,I);var h=H/k;if(j==p&&k==1){w[j]=s.left+H/2}return{axisStats:d,data:w,xvalues:m,first:j,last:p,length:p==-1?0:p-j+1,itemWidth:h,intervalWidth:h*d.interval,rangeLength:I,useIndeces:d.useIndeces,padding:s,axisSize:H}},_getXAxis:function(b){if(b==undefined||this.seriesGroups.length<=b){return this.categoryAxis||this.xAxis}return this.seriesGroups[b].categoryAxis||this.seriesGroups[b].xAxis||this.categoryAxis||this.xAxis},_isGreyScale:function(e,b){var d=this.seriesGroups[e];var c=d.series[b];if(c.greyScale==true){return true}else{if(c.greyScale==false){return false}}if(d.greyScale==true){return true}else{if(d.greyScale==false){return false}}return this.greyScale==true},_getSeriesColors:function(f,c,e){var b=this._getSeriesColorsInternal(f,c,e);if(this._isGreyScale(f,c)){for(var d in b){b[d]=a.jqx.toGreyScale(b[d])}}return b},_getColorFromScheme:function(o,l,b){var d="#000000";var n=this.seriesGroups[o];var g=n.series[l];if(this._isPieGroup(o)){var c=this._getDataLen(o);d=this._getItemColorFromScheme(g.colorScheme||n.colorScheme||this.colorScheme,l*c+b,o,l)}else{var m=0;for(var f=0;f<=o;f++){for(var e in this.seriesGroups[f].series){if(f==o&&e==l){break}else{m++}}}var k=this.colorScheme;if(n.colorScheme){k=n.colorScheme;sidex=seriesIndex}if(k==undefined||k==""){k=this.colorSchemes[0].name}if(!k){return d}for(var f=0;f<this.colorSchemes.length;f++){var h=this.colorSchemes[f];if(h.name==k){while(m>h.colors.length){m-=h.colors.length;if(++f>=this.colorSchemes.length){f=0}h=this.colorSchemes[f]}d=h.colors[m%h.colors.length]}}}return d},_createColorsCache:function(){this._colorsCache={get:function(b){if(this._store[b]){return this._store[b]}},set:function(c,b){if(this._size<10000){this._store[c]=b;this._size++}},clear:function(){this._store={};this._size=0},_size:0,_store:{}}},_getSeriesColorsInternal:function(m,d,b){var f=this.seriesGroups[m];var o=f.series[d];if(!a.isFunction(o.colorFunction)&&f.type!="pie"&&f.type!="donut"){b=NaN}var h=m+"_"+d+"_"+(isNaN(b)?"NaN":b);if(this._colorsCache.get(h)){return this._colorsCache.get(h)}var c={lineColor:"#222222",lineColorSelected:"#151515",lineColorSymbol:"#222222",lineColorSymbolSelected:"#151515",fillColor:"#222222",fillColorSelected:"#333333",fillColorSymbol:"#222222",fillColorSymbolSelected:"#333333",fillColorAlt:"#222222",fillColorAltSelected:"#333333"};var i;if(a.isFunction(o.colorFunction)){var j=!isNaN(b)?this._getDataValue(b,o.dataField,m):NaN;if(f.type.indexOf("range")!=-1&&!isNaN(b)){var e=this._getDataValue(b,o.dataFieldFrom,m);var l=this._getDataValue(b,o.dataFieldTo,m);j={from:e,to:l}}i=o.colorFunction(j,b,o,f);if(typeof(i)=="object"){for(var k in i){c[k]=i[k]}}else{c.fillColor=i}}else{for(var k in c){if(o[k]){c[k]=o[k]}}if(!o.fillColor&&!o.color){c.fillColor=this._getColorFromScheme(m,d,b)}else{o.fillColor=o.fillColor||o.color}}var n={fillColor:{baseColor:"fillColor",adjust:1},fillColorSelected:{baseColor:"fillColor",adjust:1.1},fillColorSymbol:{baseColor:"fillColor",adjust:1},fillColorSymbolSelected:{baseColor:"fillColorSymbol",adjust:2},fillColorAlt:{baseColor:"fillColor",adjust:4},fillColorAltSelected:{baseColor:"fillColor",adjust:3},lineColor:{baseColor:"fillColor",adjust:0.95},lineColorSelected:{baseColor:"lineColor",adjust:0.95},lineColorSymbol:{baseColor:"lineColor",adjust:1},lineColorSymbolSelected:{baseColor:"lineColorSelected",adjust:1}};for(var k in c){if(typeof(i)!="object"||!i[k]){if(o[k]){c[k]=o[k]}}}for(var k in c){if(typeof(i)!="object"||!i[k]){if(!o[k]){c[k]=a.jqx.adjustColor(c[n[k].baseColor],n[k].adjust)}}}this._colorsCache.set(h,c);return c},_getItemColorFromScheme:function(d,f,k,h){if(d==undefined||d==""){d=this.colorSchemes[0].name}for(var g=0;g<this.colorSchemes.length;g++){if(d==this.colorSchemes[g].name){break}}var e=0;while(e<=f){if(g==this.colorSchemes.length){g=0}var b=this.colorSchemes[g].colors.length;if(e+b<=f){e+=b;g++}else{var c=this.colorSchemes[g].colors[f-e];if(this._isGreyScale(k,h)&&c.indexOf("#")==0){c=a.jqx.toGreyScale(c)}return c}}},getColorScheme:function(b){for(var c=0;c<this.colorSchemes.length;c++){if(this.colorSchemes[c].name==b){return this.colorSchemes[c].colors}}return undefined},addColorScheme:function(c,b){for(var d=0;d<this.colorSchemes.length;d++){if(this.colorSchemes[d].name==c){this.colorSchemes[d].colors=b;return}}this.colorSchemes.push({name:c,colors:b})},removeColorScheme:function(b){for(var c=0;c<this.colorSchemes.length;c++){if(this.colorSchemes[c].name==b){this.colorSchemes.splice(c,1);break}}},colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_formatValue:function(g,i,c,f,b,d){if(g==undefined){return""}if(this._isObject(g)&&!this._isDate(g)&&!c){return""}if(c){if(!a.isFunction(c)){return g.toString()}try{return c(g,d,b,f)}catch(h){return h.message}}if(this._isNumber(g)){return this._formatNumber(g,i)}if(this._isDate(g)){return this._formatDate(g,i)}if(i){return(i.prefix||"")+g.toString()+(i.sufix||"")}return g.toString()},_getFormattedValue:function(f,h,A,p,d,l){var w=this.seriesGroups[f];var n=w.series[h];var m="";var j=p,k=d;if(!k){k=n.formatFunction||w.formatFunction}if(!j){j=n.formatSettings||w.formatSettings}if(!n.formatFunction&&n.formatSettings){k=undefined}var o={},t=0;for(var b in n){if(b.indexOf("dataField")==0){o[b.substring(9).toLowerCase()]=this._getDataValue(A,n[b],f);t++}}if(t==0){o=this._getDataValue(A,undefined,f)}if(w.type.indexOf("waterfall")!=-1&&this._isSummary(f,A)){o=this._renderData[f].offsets[h][A].value;t=0}if(k&&a.isFunction(k)){try{return k(t==1?o[""]:o,A,n,w)}catch(z){return z.message}}if(t==1&&this._isPieGroup(f)){return this._formatValue(o[""],j,k,f,h,A)}if(t>0){var u=0;for(var b in o){if(u>0&&m!=""){m+="<br>"}var r="dataField"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var q="displayText"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var v=n[q]||n[r];var c=o[b];if(undefined!=c){c=this._formatValue(c,j,k,f,h,A)}else{continue}if(l===true){m+=c}else{m+=v+": "+c}u++}}else{if(undefined!=o){m=this._formatValue(o,j,k,f,h,A)}}return m||""},_isNumberAsString:function(d){if(typeof(d)!="string"){return false}d=a.trim(d);for(var b=0;b<d.length;b++){var c=d.charAt(b);if((c>="0"&&c<="9")||c==","||c=="."){continue}if(c=="-"&&b==0){continue}if((c=="("&&b==0)||(c==")"&&b==d.length-1)){continue}return false}return true},_castAsDate:function(f,c){if(f instanceof Date&&!isNaN(f)){return f}if(typeof(f)=="string"){var b;if(c){b=a.jqx.dataFormat.parsedate(f,c);if(this._isDate(b)){return b}}if(this._autoDateFormats){for(var e=0;e<this._autoDateFormats.length;e++){b=a.jqx.dataFormat.parsedate(f,this._autoDateFormats[e]);if(this._isDate(b)){return b}}}var d=this._detectDateFormat(f);if(d){b=a.jqx.dataFormat.parsedate(f,d);if(this._isDate(b)){this._autoDateFormats.push(d);return b}}b=new Date(f);if(this._isDate(b)){if(f.indexOf(":")==-1){b.setHours(0,0,0,0)}}return b}return undefined},_castAsNumber:function(c){if(c instanceof Date&&!isNaN(c)){return c.valueOf()}if(typeof(c)=="string"){if(this._isNumber(c)){c=parseFloat(c)}else{if(!/[a-zA-Z]/.test(c)){var b=new Date(c);if(b!=undefined){c=b.valueOf()}}}}return c},_isNumber:function(b){if(typeof(b)=="string"){if(this._isNumberAsString(b)){b=parseFloat(b)}}return typeof b==="number"&&isFinite(b)},_isDate:function(b){return b instanceof Date&&!isNaN(b.getDate())},_isBoolean:function(b){return typeof b==="boolean"},_isObject:function(b){return(b&&(typeof b==="object"||a.isFunction(b)))||false},_formatDate:function(d,c){var b=d.toString();if(c){if(c.dateFormat){b=a.jqx.dataFormat.formatDate(d,c.dateFormat)}b=(c.prefix||"")+b+(c.sufix||"")}return b},_formatNumber:function(n,e){if(!this._isNumber(n)){return n}e=e||{};var q=".";var o="";var r=this;if(r.localization){q=r.localization.decimalSeparator||r.localization.decimalseparator||q;o=r.localization.thousandsSeparator||r.localization.thousandsseparator||o}if(e.decimalSeparator){q=e.decimalSeparator}if(e.thousandsSeparator){o=e.thousandsSeparator}var m=e.prefix||"";var p=e.sufix||"";var h=e.decimalPlaces;if(isNaN(h)){h=this._getDecimalPlaces([n],undefined,3)}var l=e.negativeWithBrackets||false;var g=(n<0);if(g&&l){n*=-1}var d=n.toString();var b;var k=Math.pow(10,h);d=(Math.round(n*k)/k).toString();if(isNaN(d)){d=""}b=d.lastIndexOf(".");if(h>0){if(b<0){d+=q;b=d.length-1}else{if(q!=="."){d=d.replace(".",q)}}while((d.length-1-b)<h){d+="0"}}b=d.lastIndexOf(q);b=(b>-1)?b:d.length;var f=d.substring(b);var c=0;for(var j=b;j>0;j--,c++){if((c%3===0)&&(j!==b)&&(!g||(j>1)||(g&&l))){f=o+f}f=d.charAt(j-1)+f}d=f;if(g&&l){d="("+d+")"}return m+d+p},_defaultNumberFormat:{prefix:"",sufix:"",decimalSeparator:".",thousandsSeparator:",",decimalPlaces:2,negativeWithBrackets:false},_calculateControlPoints:function(g,f){var e=g[f],m=g[f+1],d=g[f+2],j=g[f+3],c=g[f+4],i=g[f+5];var l=0.4;var o=Math.sqrt(Math.pow(d-e,2)+Math.pow(j-m,2));var b=Math.sqrt(Math.pow(c-d,2)+Math.pow(i-j,2));var h=(o+b);if(h==0){h=1}var n=l*o/h;var k=l-n;return[d+n*(e-c),j+n*(m-i),d-k*(e-c),j-k*(m-i)]},_getBezierPoints:function(d){var c="";var h=[],e=[];var g=d.split(" ");for(var f=0;f<g.length;f++){var j=g[f].split(",");h.push(parseFloat(j[0]));h.push(parseFloat(j[1]));if(isNaN(h[h.length-1])||isNaN(h[h.length-2])){continue}}var b=h.length;if(b<=1){return""}else{if(b==2){c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" L"+a.jqx._ptrnd(h[0]+1)+","+a.jqx._ptrnd(h[1]+1)+" ";return c}}for(var f=0;f<b-4;f+=2){e=e.concat(this._calculateControlPoints(h,f))}for(var f=2;f<b-5;f+=2){c+=" C"+a.jqx._ptrnd(e[2*f-2])+","+a.jqx._ptrnd(e[2*f-1])+" "+a.jqx._ptrnd(e[2*f])+","+a.jqx._ptrnd(e[2*f+1])+" "+a.jqx._ptrnd(h[f+2])+","+a.jqx._ptrnd(h[f+3])+" "}if(b<=4||(Math.abs(h[0]-h[2])<3||Math.abs(h[1]-h[3])<3)||this._isVML){c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" L"+a.jqx._ptrnd(h[2])+","+a.jqx._ptrnd(h[3])+" "+c}else{c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" Q"+a.jqx._ptrnd(e[0])+","+a.jqx._ptrnd(e[1])+" "+a.jqx._ptrnd(h[2])+","+a.jqx._ptrnd(h[3])+" "+c}if(b>=4&&(Math.abs(h[b-2]-h[b-4])<3||Math.abs(h[b-1]-h[b-3])<3||this._isVML)){c+=" L"+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}else{if(b>=5){c+=" Q"+a.jqx._ptrnd(e[b*2-10])+","+a.jqx._ptrnd(e[b*2-9])+" "+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}}return c},_animTickInt:50,_createAnimationGroup:function(b){if(!this._animGroups){this._animGroups={}}this._animGroups[b]={animations:[],startTick:NaN}},_startAnimation:function(c){var e=new Date();var b=e.getTime();this._animGroups[c].startTick=b;this._runAnimation();this._enableAnimTimer()},_enqueueAnimation:function(e,d,c,g,f,b,h){if(g<0){g=0}if(h==undefined){h="easeInOutSine"}this._animGroups[e].animations.push({key:d,properties:c,duration:g,fn:f,context:b,easing:h})},_stopAnimations:function(){clearTimeout(this._animtimer);this._animtimer=undefined;this._animGroups=undefined},_enableAnimTimer:function(){if(!this._animtimer){var b=this;this._animtimer=setTimeout(function(){b._runAnimation()},this._animTickInt)}},_runAnimation:function(q){if(this._animGroups){var t=new Date();var h=t.getTime();var o={};for(var l in this._animGroups){var s=this._animGroups[l].animations;var m=this._animGroups[l].startTick;var g=0;for(var n=0;n<s.length;n++){var u=s[n];var b=(h-m);if(u.duration>g){g=u.duration}var r=u.duration>0?b/u.duration:1;var k=r;if(u.easing&&u.duration!=0){k=a.easing[u.easing](r,b,0,1,u.duration)}if(r>1){r=1;k=1}if(u.fn){u.fn(u.key,u.context,k);continue}var f={};for(var l=0;l<u.properties.length;l++){var c=u.properties[l];var e=0;if(r==1){e=c.to}else{e=easeParecent*(c.to-c.from)+c.from}f[c.key]=e}this.renderer.attr(u.key,f)}if(m+g>h){o[l]=({startTick:m,animations:s})}}this._animGroups=o;if(this.renderer instanceof a.jqx.HTML5Renderer){this.renderer.refresh()}}this._animtimer=null;for(var l in this._animGroups){this._enableAnimTimer();break}},_fixCoords:function(d,e){var b=this.seriesGroups[e].orientation=="horizontal";if(!b){return d}var c=d.x;d.x=d.y;d.y=c+this._plotRect.y-this._plotRect.x;var c=d.width;d.width=d.height;d.height=c;return d},getItemCoord:function(b,d,u){var k=this;if(k._isPieGroup(b)&&(!k._isSerieVisible(b,d,u)||!k._renderData||k._renderData.length<=b)){return{x:NaN,y:NaN}}if(!k._isSerieVisible(b,d)||!k._renderData||k._renderData.length<=b){return{x:NaN,y:NaN}}var q=k.seriesGroups[b];var j=q.series[d];var o=k._getItemCoord(b,d,u);if(k._isPieGroup(b)){if(isNaN(o.x)||isNaN(o.y)||isNaN(o.fromAngle)||isNaN(o.toAngle)){return{x:NaN,y:NaN}}var i=this._plotRect;var p=o.fromAngle*(Math.PI/180);var e=o.toAngle*(Math.PI/180);x1=i.x+o.center.x+Math.cos(p)*o.outerRadius;x2=i.x+o.center.x+Math.cos(e)*o.outerRadius;y1=i.y+o.center.y-Math.sin(p)*o.outerRadius;y2=i.y+o.center.y-Math.sin(e)*o.outerRadius;var h=Math.min(x1,x2);var m=Math.abs(x2-x1);var f=Math.min(y1,y2);var l=Math.abs(y2-y1);o={x:h,y:f,width:m,height:l,center:o.center,centerOffset:o.centerOffset,innerRadius:o.innerRadius,outerRadius:o.outerRadius,selectedRadiusChange:o.selectedRadiusChange,fromAngle:o.fromAngle,toAngle:o.toAngle};return o}if(q.type.indexOf("column")!=-1||q.type.indexOf("waterfall")!=-1){var v=this._getColumnSerieWidthAndOffset(b,d);o.height=Math.abs(o.y.to-o.y.from);o.y=Math.min(o.y.to,o.y.from);o.x+=v.offset;o.width=v.width}else{if(q.type.indexOf("ohlc")!=-1||q.type.indexOf("candlestick")!=-1){var v=this._getColumnSerieWidthAndOffset(b,d);var f=o.y;var t=Math.min(f.Open,f.Close,f.Low,f.High);var r=Math.max(f.Open,f.Close,f.Low,f.High);o.height=Math.abs(r-t);o.y=t;o.x+=v.offset;o.width=v.width}else{if(q.type.indexOf("line")!=-1||q.type.indexOf("area")!=-1){o.width=o.height=0;o.y=o.y.to}else{if(q.type.indexOf("bubble")!=-1||q.type.indexOf("scatter")!=-1){o.center={x:o.x,y:o.y.to};var c=o.y.radius;if(j.symbolType!="circle"&&j.symbolType!=undefined){c/=2}o.y=o.y.to;o.radius=c;o.width=2*c;o.height=2*c}}}}o=this._fixCoords(o,b);if(q.polar||q.spider){var n=this._toPolarCoord(this._renderData[b].polarCoords,this._plotRect,o.x,o.y);o.x=n.x;o.y=n.y;if(o.center){o.center=this._toPolarCoord(this._renderData[b].polarCoords,this._plotRect,o.center.x,o.center.y)}}if(q.type.indexOf("bubble")!=-1||q.type.indexOf("scatter")!=-1){o.x-=c;o.y-=c}return o},_getItemCoord:function(o,j,b){var e=this.seriesGroups[o],l,k;if(!e||!this._renderData){return{x:NaN,y:NaN}}var f=e.series[j];if(!f){return{x:NaN,y:NaN}}var h=this._plotRect;if(this._isPieGroup(o)){var m=this._renderData[o].offsets[j][b];if(!m){return{x:NaN,y:NaN}}var c=(m.fromAngle+m.toAngle)/2*(Math.PI/180);l=h.x+m.x+Math.cos(c)*m.outerRadius;k=h.y+m.y-Math.sin(c)*m.outerRadius;return{x:l,y:k,center:{x:m.x,y:m.y},centerOffset:m.centerOffset,innerRadius:m.innerRadius,outerRadius:m.outerRadius,selectedRadiusChange:m.selectedRadiusChange,fromAngle:m.fromAngle,toAngle:m.toAngle}}else{l=h.x+this._renderData[o].xoffsets.data[b];k=this._renderData[o].offsets[j][b];if(isNaN(l)||!k){return{x:NaN,y:NaN}}}var n={};for(var d in k){n[d]=k[d]}return{x:l,y:n}},getXAxisValue:function(g,r){var q=this.seriesGroups[r];if(!q){return undefined}var c=this._getXAxis(r);var n=this._plotRect;var b=0;var m=NaN;var e=this._renderData[0].xoffsets.axisStats;var f=0,l=0;if(q.polar||q.spider){if(isNaN(g.x)||isNaN(g.y)){return NaN}var h=this._getPolarAxisCoords(r,n);var k=a.jqx._ptdist(g.x,g.y,h.x,h.y);if(k>h.r){return NaN}var i=Math.atan2(h.y-g.y,g.x-h.x);i=Math.PI/2-i;if(i<0){i=2*Math.PI+i}m=i*h.r;var j=h.startAngle+Math.PI/2;var d=h.endAngle+Math.PI/2;f=j*h.r;l=d*h.r;b=(d-j)*h.r;var o=this._getPaddingSize(e,c,c.valuesOnTicks,b,true,h.isClosedCircle,this._hasColumnSeries());if(h.isClosedCircle){b-=(o.left+o.right);l-=(o.left+o.right)}else{if(!c.valuesOnTicks){f+=o.left;l-=o.right}}}else{if(q.orientation!="horizontal"){if(g<n.x||g>n.x+n.width){return NaN}m=g-n.x;b=n.width}else{if(g<n.y||g>n.y+n.height){return NaN}m=g-n.y;b=n.height}if(this._renderData[r]&&this._renderData[r].xoffsets){var o=this._renderData[r].xoffsets.padding;b-=(o.left+o.right);m-=o.left}l=b}var p=this._jqxPlot.scale(m,{min:f,max:l},{min:e.min.valueOf(),max:e.max.valueOf(),type:e.logAxis.enabled?"logarithmic":"linear",base:e.logAxis.base,flip:c.flip});return p},getValueAxisValue:function(c,j){var i=this.seriesGroups[j];if(!i){return undefined}var k=this._getValueAxis(j);var g=this._plotRect;var b=0;var f=NaN;if(i.polar||i.spider){if(isNaN(c.x)||isNaN(c.y)){return NaN}var e=this._getPolarAxisCoords(j,g);f=a.jqx._ptdist(c.x,c.y,e.x,e.y);b=e.r;f=b-f}else{if(i.orientation=="horizontal"){if(c<g.x||c>g.x+g.width){return NaN}f=c-g.x;b=g.width}else{if(c<g.y||c>g.y+g.height){return NaN}f=c-g.y;b=g.height}}var d=this._stats.seriesGroups[j];var h=this._jqxPlot.scale(f,{min:0,max:b},{min:d.min.valueOf(),max:d.max.valueOf(),type:d.logarithmic?"logarithmic":"linear",base:d.logBase,flip:!k.flip});return h},_detectDateFormat:function(g,e){var d={en_US_d:"M/d/yyyy",en_US_D:"dddd, MMMM dd, yyyy",en_US_t:"h:mm tt",en_US_T:"h:mm:ss tt",en_US_f:"dddd, MMMM dd, yyyy h:mm tt",en_US_F:"dddd, MMMM dd, yyyy h:mm:ss tt",en_US_M:"MMMM dd",en_US_Y:"yyyy MMMM",en_US_S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",en_CA_d:"dd/MM/yyyy",en_CA_D:"MMMM-dd-yy",en_CA_f:"MMMM-dd-yy h:mm tt",en_CA_F:"MMMM-dd-yy h:mm:ss tt",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",de_DE_d:"dd.MM.yyyy",de_DE_D:"dddd, d. MMMM yyyy",de_DE_t:"HH:mm",de_DE_T:"HH:mm:ss",de_DE_f:"dddd, d. MMMM yyyy HH:mm",de_DE_F:"dddd, d. MMMM yyyy HH:mm:ss",de_DE_M:"dd MMMM",de_DE_Y:"MMMM yyyy",fr_FR_d:"dd/MM/yyyy",fr_FR_D:"dddd d MMMM yyyy",fr_FR_t:"HH:mm",fr_FR_T:"HH:mm:ss",fr_FR_f:"dddd d MMMM yyyy HH:mm",fr_FR_F:"dddd d MMMM yyyy HH:mm:ss",fr_FR_M:"d MMMM",fr_FR_Y:"MMMM yyyy",it_IT_d:"dd/MM/yyyy",it_IT_D:"dddd d MMMM yyyy",it_IT_t:"HH:mm",it_IT_T:"HH:mm:ss",it_IT_f:"dddd d MMMM yyyy HH:mm",it_IT_F:"dddd d MMMM yyyy HH:mm:ss",it_IT_M:"dd MMMM",it_IT_Y:"MMMM yyyy",ru_RU_d:"dd.MM.yyyy",ru_RU_D:"d MMMM yyyy '?.'",ru_RU_t:"H:mm",ru_RU_T:"H:mm:ss",ru_RU_f:"d MMMM yyyy '?.' H:mm",ru_RU_F:"d MMMM yyyy '?.' H:mm:ss",ru_RU_Y:"MMMM yyyy",cs_CZ_d:"d.M.yyyy",cs_CZ_D:"d. MMMM yyyy",cs_CZ_t:"H:mm",cs_CZ_T:"H:mm:ss",cs_CZ_f:"d. MMMM yyyy H:mm",cs_CZ_F:"d. MMMM yyyy H:mm:ss",cs_CZ_M:"dd MMMM",cs_CZ_Y:"MMMM yyyy",he_IL_d:"dd MMMM yyyy",he_IL_D:"dddd dd MMMM yyyy",he_IL_t:"HH:mm",he_IL_T:"HH:mm:ss",he_IL_f:"dddd dd MMMM yyyy HH:mm",he_IL_F:"dddd dd MMMM yyyy HH:mm:ss",he_IL_M:"dd MMMM",he_IL_Y:"MMMM yyyy",hr_HR_d:"d.M.yyyy.",hr_HR_D:"d. MMMM yyyy.",hr_HR_t:"H:mm",hr_HR_T:"H:mm:ss",hr_HR_f:"d. MMMM yyyy. H:mm",hr_HR_F:"d. MMMM yyyy. H:mm:ss",hr_HR_M:"d. MMMM",hu_HU_d:"yyyy.MM.dd.",hu_HU_D:"yyyy. MMMM d.",hu_HU_t:"H:mm",hu_HU_T:"H:mm:ss",hu_HU_f:"yyyy. MMMM d. H:mm",hu_HU_F:"yyyy. MMMM d. H:mm:ss",hu_HU_M:"MMMM d.",hu_HU_Y:"yyyy. MMMM",jp_JP_d:"gg y/M/d",jp_JP_D:"gg y'?'M'?'d'?'",jp_JP_t:"H:mm",jp_JP_T:"H:mm:ss",jp_JP_f:"gg y'?'M'?'d'?' H:mm",jp_JP_F:"gg y'?'M'?'d'?' H:mm:ss",jp_JP_M:"M'?'d'?'",jp_JP_Y:"gg y'?'M'?'",lt_LT_d:"yyyy.MM.dd",lt_LT_D:"yyyy 'm.' MMMM d 'd.'",lt_LT_t:"HH:mm",lt_LT_T:"HH:mm:ss",lt_LT_f:"yyyy 'm.' MMMM d 'd.' HH:mm",lt_LT_F:"yyyy 'm.' MMMM d 'd.' HH:mm:ss",lt_LT_M:"MMMM d 'd.'",lt_LT_Y:"yyyy 'm.' MMMM",sa_IN_d:"dd-MM-yyyy",sa_IN_D:"dd MMMM yyyy dddd",sa_IN_t:"HH:mm",sa_IN_T:"HH:mm:ss",sa_IN_f:"dd MMMM yyyy dddd HH:mm",sa_IN_F:"dd MMMM yyyy dddd HH:mm:ss",sa_IN_M:"dd MMMM",basic_y:"yyyy",basic_ym:"yyyy-MM",basic_d:"yyyy-MM-dd",basic_dhm:"yyyy-MM-dd hh:mm",basic_bhms:"yyyy-MM-dd hh:mm:ss",basic2_ym:"MM-yyyy",basic2_d:"MM-dd-yyyy",basic2_dhm:"MM-dd-yyyy hh:mm",basic2_dhms:"MM-dd-yyyy hh:mm:ss",basic3_ym:"yyyy/MM",basic3_d:"yyyy/MM/dd",basic3_dhm:"yyyy/MM/dd hh:mm",basic3_bhms:"yyyy/MM/dd hh:mm:ss",basic4_ym:"MM/yyyy",basic4_d:"MM/dd/yyyy",basic4_dhm:"MM/dd/yyyy hh:mm",basic4_dhms:"MM/dd/yyyy hh:mm:ss"};if(e){d=a.extend({},d,e)}var c=[];if(!a.isArray(g)){c.push(g)}else{c=g}for(var f in d){d[f]={format:d[f],count:0}}for(var h=0;h<c.length;h++){value=c[h];if(value==null||value==undefined){continue}for(var f in d){var b=a.jqx.dataFormat.parsedate(value,d[f].format);if(b!=null){d[f].count++}}}var k={key:undefined,count:0};for(var f in d){if(d[f].count>k.count){k.key=f;k.count=d[f].count}}return k.key?d[k.key].format:""},_testXAxisDateFormat:function(h){var k=this;var d=k._getXAxis(h);var c=k._getDataLen(h);var e={};if(k.localization&&k.localization.patterns){for(var j in k.localization.patterns){e["local_"+j]=k.localization.patterns[j]}}var g=[];for(var f=0;f<c&&f<10;f++){value=k._getDataValue(f,d.dataField,h);if(value==null||value==undefined){continue}g.push(value)}var b=k._detectDateFormat(g,e);return b}})})(jqxBaseFramework);
+(function(a){a.jqx.jqxWidget("jqxChart","",{});a.extend(a.jqx._jqxChart.prototype,{defineInstance:function(){a.extend(true,this,this._defaultSettings);this._createColorsCache();return this._defaultSettings},_defaultSettings:{title:"Title",description:"Description",source:[],seriesGroups:[],categoryAxis:null,xAxis:{},valueAxis:null,renderEngine:"",enableAnimations:true,enableAxisTextAnimation:false,backgroundImage:"",background:"#FFFFFF",padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#FFFFFF",showBorderLine:true,borderLineWidth:1,borderLineColor:null,borderColor:null,titlePadding:{left:5,top:5,right:5,bottom:10},showLegend:true,legendLayout:null,enabled:true,colorScheme:"scheme01",animationDuration:500,showToolTips:true,showToolTipsOnAllSeries:false,toolTipShowDelay:300,toolTipDelay:500,toolTipHideDelay:4000,toolTipMoveDuration:300,toolTipFormatFunction:null,toolTipAlignment:"dataPoint",localization:null,columnSeriesOverlap:false,rtl:false,legendPosition:null,greyScale:false,axisPadding:5,enableCrosshairs:false,crosshairsColor:"#BCBCBC",crosshairsDashStyle:"2,2",crosshairsLineWidth:1,enableEvents:true,_itemsToggleState:[],_isToggleRefresh:false,_isSelectorRefresh:false,_sliders:[],_selectorRange:[],_rangeSelectorInstances:{},_resizeState:{},renderer:null,_isRangeSelectorInstance:false,drawBefore:null,draw:null,_renderData:{},enableSampling:true},_defaultLineColor:"#BCBCBC",_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},destroy:function(){this.host.remove()},_jqxPlot:null,createInstance:function(d){if(!a.jqx.dataAdapter){throw"jqxdata.js is not loaded"}var c=this;c._refreshOnDownloadComlete();c._isTouchDevice=a.jqx.mobile.isTouchDevice();if(!c._jqxPlot){c._jqxPlot=new jqxPlot()}c.addHandler(c.host,c._getEvent("mousemove"),function(g){if(c.enabled==false){return}if(!c._isRangeSelectorInstance){c.host.css("cursor","default")}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c.onmousemove(f,j)});c.addHandler(c.host,c._getEvent("mouseleave"),function(h){if(c.enabled==false){return}var f=c._mouseX;var i=c._mouseY;var g=c._plotRect;if(g&&f>=g.x&&f<=g.x+g.width&&i>=g.y&&i<=g.y+g.height){return}c._cancelTooltipTimer();c._hideToolTip(0);c._unselect()});c.addHandler(c.host,"click",function(g){if(c.enabled==false){return}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c._mouseX=f;c._mouseY=j;if(!isNaN(c._lastClickTs)){if((new Date()).valueOf()-c._lastClickTs<100){return}}this._hostClickTimer=setTimeout(function(){if(!c._isTouchDevice){c._cancelTooltipTimer();c._hideToolTip();c._unselect()}if(c._pointMarker&&c._pointMarker.element){var l=c.seriesGroups[c._pointMarker.gidx];var k=l.series[c._pointMarker.sidx];g.stopImmediatePropagation();c._raiseItemEvent("click",l,k,c._pointMarker.iidx)}},100)});var e=c.element.style;if(e){var b=false;if(e.width!=null){b|=e.width.toString().indexOf("%")!=-1}if(e.height!=null){b|=e.height.toString().indexOf("%")!=-1}if(b){a.jqx.utilities.resize(this.host,function(){if(c.timer){clearTimeout(c.timer)}var f=1;c.timer=setTimeout(function(){var g=c.enableAnimations;c.enableAnimations=false;c.refresh();c.enableAnimations=g},f)},false,true)}}},_refreshOnDownloadComlete:function(){var d=this;var e=this.source;if(e instanceof a.jqx.dataAdapter){var f=e._options;if(f==undefined||(f!=undefined&&!f.autoBind)){e.autoSync=false;e.dataBind()}var c=this.element.id;if(e.records.length==0){var b=function(){if(d.ready){d.ready()}d.refresh()};e.unbindDownloadComplete(c);e.bindDownloadComplete(c,b)}else{if(d.ready){d.ready()}}e.unbindBindingUpdate(c);e.bindBindingUpdate(c,function(){if(d._supressBindingRefresh){return}d.refresh()})}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c=="source"){this._refreshOnDownloadComlete()}this.refresh()},_initRenderer:function(b){if(!a.jqx.createRenderer){throw"Please include jqxdraw.js"}return a.jqx.createRenderer(this,b)},_internalRefresh:function(){var b=this;if(a.jqx.isHidden(b.host)){return}b._stopAnimations();if(!b.renderer||(!b._isToggleRefresh&&!b._isUpdate)){b._hideToolTip(0);b._isVML=false;b.host.empty();b._measureDiv=undefined;b._initRenderer(b.host)}var d=b.renderer;if(!d){return}var c=d.getRect();b._render({x:1,y:1,width:c.width,height:c.height});this._raiseEvent("refreshBegin",{instance:this});if(d instanceof a.jqx.HTML5Renderer){d.refresh()}b._isUpdate=false;this._raiseEvent("refreshEnd",{instance:this})},saveAsPNG:function(d,b,c){return this._saveAsImage("png",d,b,c)},saveAsJPEG:function(d,b,c){return this._saveAsImage("jpeg",d,b,c)},saveAsPDF:function(d,b,c){return this._saveAsImage("pdf",d,b,c)},_saveAsImage:function(e,h,b,c){var g=false;for(var d=0;d<this.seriesGroups.length&&!g;d++){var f=this._getXAxis(d);if(f&&f.rangeSelector){g=true}}return a.jqx._widgetToImage(this,e,h,b,c,g?this._selectorSaveAsImageCallback:undefined)},_selectorSaveAsImageCallback:function(D,h){var r=D;for(var B=0;B<r.seriesGroups.length;B++){var o=r._getXAxis(B);if(!o||!o.rangeSelector||o.rangeSelector.renderTo){continue}var m=r._rangeSelectorInstances[B];if(!m){continue}var s=m.jqxChart("getInstance");var e=s.renderEngine;var d=s.renderer.getRect();var f=s.renderer.getContainer().find("canvas")[0];var p=f.getContext("2d");var w=r._sliders[B];var b=r.seriesGroups[B].orientation=="horizontal";var c=!b?"width":"height";var v=b?"width":"height";var A=!b?"x":"y";var g=b?"x":"y";var k={};k[A]=w.startOffset+w.rect[A];k[g]=w.rect[g];k[c]=w.endOffset-w.startOffset;k[v]=w.rect[v];var n=o.rangeSelector.colorSelectedRange||"blue";var u=o.rangeSelector.colorUnselectedRange||"white";var l=o.rangeSelector.colorRangeLine||"grey";var q=[];q.push(s.renderer.rect(k.x,k.y,k.width,k.height,{fill:n,opacity:0.1}));if(!b){q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(k.x+k.width),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}))}else{q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y+k.height),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(w.rect.y+w.rect.height),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(k.y),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y),{stroke:l,opacity:0.5}));q.push(s.renderer.line(a.jqx._ptrnd(w.rect.x),a.jqx._ptrnd(k.y+k.height),a.jqx._ptrnd(w.rect.x+w.rect.width),a.jqx._ptrnd(k.y+k.height),{stroke:l,opacity:0.5}))}s.renderer.refresh();var t=p.getImageData(d.x,d.y,d.width,d.height);var C=h.getContext("2d");C.putImageData(t,parseInt(m.css("left")),parseInt(m.css("top")),1,1,d.width,d.height);for(var z=0;z<q.length;z++){s.renderer.removeElement(q[z])}s.renderer.refresh()}return true},refresh:function(){this._internalRefresh()},update:function(){this._isUpdate=true;this._internalRefresh()},_seriesTypes:["line","stackedline","stackedline100","spline","stackedspline","stackedspline100","stepline","stackedstepline","stackedstepline100","area","stackedarea","stackedarea100","splinearea","stackedsplinearea","stackedsplinearea100","steparea","stackedsteparea","stackedsteparea100","rangearea","splinerangearea","steprangearea","column","stackedcolumn","stackedcolumn100","rangecolumn","scatter","stackedscatter","stackedscatter100","bubble","stackedbubble","stackedbubble100","pie","donut","candlestick","ohlc","waterfall","stackedwaterfall"],clear:function(){var b=this;for(var c in b._defaultSettings){b[c]=b._defaultSettings[c]}b.title="";b.description="";b.refresh()},_validateSeriesGroups:function(){if(!a.isArray(this.seriesGroups)){throw"Invalid property: 'seriesGroups' property is required and must be a valid array."}for(var b=0;b<this.seriesGroups.length;b++){var c=this.seriesGroups[b];if(!c.type){throw"Invalid property: Each series group must have a valid 'type' property."}if(!a.isArray(c.series)){throw"Invalid property: Each series group must have a 'series' property which must be a valid array."}}},_render:function(C){var m=this;var I=m.renderer;m._validateSeriesGroups();m._colorsCache.clear();if(!m._isToggleRefresh&&m._isUpdate&&m._renderData){m._renderDataClone()}m._renderData=[];I.clear();m._unselect();m._hideToolTip(0);var n=m.backgroundImage;if(n==undefined||n==""){m.host.css({"background-image":""})}else{m.host.css({"background-image":(n.indexOf("(")!=-1?n:"url('"+n+"')")})}m._rect=C;var Y=m.padding||{left:5,top:5,right:5,bottom:5};var q=I.createClipRect(C);var L=I.beginGroup();I.setClip(L,q);var ai=I.rect(C.x,C.y,C.width-2,C.height-2);if(n==undefined||n==""){I.attr(ai,{fill:m.backgroundColor||m.background||"white"})}else{I.attr(ai,{fill:"transparent"})}if(m.showBorderLine!=false){var F=m.borderLineColor==undefined?m.borderColor:m.borderLineColor;if(F==undefined){F=m._defaultLineColor}var o=this.borderLineWidth;if(isNaN(o)||o<0||o>10){o=1}I.attr(ai,{"stroke-width":o,stroke:F})}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){I.attr(ai,{"stroke-width":1,stroke:m.backgroundColor||"white"})}}if(a.isFunction(m.drawBefore)){m.drawBefore(I,C)}var V={x:Y.left,y:Y.top,width:C.width-Y.left-Y.right,height:C.height-Y.top-Y.bottom};m._paddedRect=V;var e=m.titlePadding||{left:2,top:2,right:2,bottom:2};var l;if(m.title&&m.title.length>0){var S=m.toThemeProperty("jqx-chart-title-text",null);l=I.measureText(m.title,0,{"class":S});I.text(m.title,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":S},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.description&&m.description.length>0){var T=m.toThemeProperty("jqx-chart-title-description",null);l=I.measureText(m.description,0,{"class":T});I.text(m.description,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":T},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.title||m.description){V.y+=(e.bottom+e.top);V.height-=(e.bottom+e.top)}var b={x:V.x,y:V.y,width:V.width,height:V.height};m._plotRect=b;m._buildStats(b);var H=m._isPieOnlySeries();var s=m.seriesGroups;var E;var D={xAxis:{},valueAxis:{}};for(var Z=0;Z<s.length&&!H;Z++){if(s[Z].type=="pie"||s[Z].type=="donut"){continue}var z=m._getXAxis(Z);if(!z){throw"seriesGroup["+Z+"] is missing xAxis definition"}var ae=z==m._getXAxis()?-1:Z;D.xAxis[ae]=0}var U=m.axisPadding;if(isNaN(U)){U=5}var r={left:0,right:0,leftCount:0,rightCount:0};var p=[];for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.type=="pie"||ad.type=="donut"||ad.spider==true||ad.polar==true){p.push({width:0,position:0,xRel:0});continue}E=ad.orientation=="horizontal";var z=m._getXAxis(Z);var ae=z==m._getXAxis()?-1:Z;var k=m._getValueAxis(Z);var O=k==m._getValueAxis()?-1:Z;var R=!E?k.axisSize:z.axisSize;var f={x:0,y:b.y,width:b.width,height:b.height};var Q=E?m._getXAxis(Z).position:k.position;if(!R||R=="auto"){if(E){R=this._renderXAxis(Z,f,true,b).width;if((D.xAxis[ae]&1)==1){R=0}else{if(R>0){D.xAxis[ae]|=1}}}else{R=m._renderValueAxis(Z,f,true,b).width;if((D.valueAxis[O]&1)==1){R=0}else{if(R>0){D.valueAxis[O]|=1}}}}if(Q!="left"&&m.rtl==true){Q="right"}if(Q!="right"){Q="left"}if(r[Q+"Count"]>0&&r[Q]>0&&R>0){r[Q]+=U}p.push({width:R,position:Q,xRel:r[Q]});r[Q]+=R;r[Q+"Count"]++}var u=Math.max(1,Math.max(C.width,C.height));var ac={top:0,bottom:0,topCount:0,bottomCount:0};var W=[];for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.type=="pie"||ad.type=="donut"||ad.spider==true||ad.polar==true){W.push({height:0,position:0,yRel:0});continue}E=ad.orientation=="horizontal";var k=this._getValueAxis(Z);var O=k==m._getValueAxis()?-1:Z;var z=m._getXAxis(Z);var ae=z==m._getXAxis()?-1:Z;var ab=!E?z.axisSize:k.axisSize;var Q=E?k.position:z.position;if(!ab||ab=="auto"){if(E){ab=m._renderValueAxis(Z,{x:0,y:0,width:u,height:0},true,b).height;if((D.valueAxis[O]&2)==2){ab=0}else{if(ab>0){D.valueAxis[O]|=2}}}else{ab=m._renderXAxis(Z,{x:0,y:0,width:u,height:0},true).height;if((D.xAxis[ae]&2)==2){ab=0}else{if(ab>0){D.xAxis[ae]|=2}}}}if(Q!="top"){Q="bottom"}if(ac[Q+"Count"]>0&&ac[Q]>0&&ab>0){ac[Q]+=U}W.push({height:ab,position:Q,yRel:ac[Q]});ac[Q]+=ab;ac[Q+"Count"]++}m._createAnimationGroup("series");var t=(m.showLegend!=false);var B=!t?{width:0,height:0}:m._renderLegend(m.legendLayout?m._rect:V,true);if(this.legendLayout&&(!isNaN(this.legendLayout.left)||!isNaN(this.legendLayout.top))){B={width:0,height:0}}if(V.height<ac.top+ac.bottom+B.height||V.width<r.left+r.right){I.endGroup();return}b.height-=ac.top+ac.bottom+B.height;b.x+=r.left;b.width-=r.left+r.right;b.y+=ac.top;var G=[];if(!H){var af=m._getXAxis().tickMarksColor||m._defaultLineColor;for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.polar==true||ad.spider==true||ad.type=="pie"||ad.type=="donut"){continue}E=ad.orientation=="horizontal";var ae=m._getXAxis(Z)==m._getXAxis()?-1:Z;var O=m._getValueAxis(Z)==m._getValueAxis()?-1:Z;var f={x:b.x,y:0,width:b.width,height:W[Z].height};if(W[Z].position!="top"){f.y=b.y+b.height+W[Z].yRel}else{f.y=b.y-W[Z].yRel-W[Z].height}if(E){if((D.valueAxis[O]&4)==4){continue}if(!m._isGroupVisible(Z)){continue}m._renderValueAxis(Z,f,false,b);D.valueAxis[O]|=4}else{G.push(f);if((D.xAxis[ae]&4)==4){continue}if(!m._isGroupVisible(Z)){continue}m._renderXAxis(Z,f,false,b);D.xAxis[ae]|=4}}}if(t){var A=m.legendLayout?m._rect:V;var P=V.x+a.jqx._ptrnd((V.width-B.width)/2);var N=b.y+b.height+ac.bottom;var R=V.width;var ab=B.height;if(m.legendLayout){if(!isNaN(m.legendLayout.left)){P=m.legendLayout.left}if(!isNaN(m.legendLayout.top)){N=m.legendLayout.top}if(!isNaN(m.legendLayout.width)){R=m.legendLayout.width}if(!isNaN(m.legendLayout.height)){ab=m.legendLayout.height}}if(P+R>A.x+A.width){R=A.x+A.width-P}if(N+ab>A.y+A.height){ab=A.y+A.height-N}m._renderLegend({x:P,y:N,width:R,height:ab})}m._hasHorizontalLines=false;if(!H){for(Z=0;Z<s.length;Z++){var ad=s[Z];if(ad.polar==true||ad.spider==true||ad.type=="pie"||ad.type=="donut"){continue}E=s[Z].orientation=="horizontal";var f={x:b.x-p[Z].xRel-p[Z].width,y:b.y,width:p[Z].width,height:b.height};if(p[Z].position!="left"){f.x=b.x+b.width+p[Z].xRel}var ae=m._getXAxis(Z)==m._getXAxis()?-1:Z;var O=m._getValueAxis(Z)==m._getValueAxis()?-1:Z;if(E){G.push(f);if((D.xAxis[ae]&8)==8){continue}if(!m._isGroupVisible(Z)){continue}m._renderXAxis(Z,f,false,b);D.xAxis[ae]|=8}else{if((D.valueAxis[O]&8)==8){continue}if(!m._isGroupVisible(Z)){continue}m._renderValueAxis(Z,f,false,b);D.valueAxis[O]|=8}}}if(b.width<=0||b.height<=0){return}m._plotRect={x:b.x,y:b.y,width:b.width,height:b.height};for(Z=0;Z<s.length;Z++){this._drawPlotAreaLines(Z,true,{gridLines:false,tickMarks:false,alternatingBackground:true});this._drawPlotAreaLines(Z,false,{gridLines:false,tickMarks:false,alternatingBackground:true})}for(Z=0;Z<s.length;Z++){this._drawPlotAreaLines(Z,true,{gridLines:true,tickMarks:true,alternatingBackground:false});this._drawPlotAreaLines(Z,false,{gridLines:true,tickMarks:true,alternatingBackground:false})}var K=false;for(Z=0;Z<s.length&&!K;Z++){var ad=s[Z];if(ad.annotations!==undefined||a.isFunction(ad.draw)||a.isFunction(ad.drawBefore)){K=true;break}}var M=I.beginGroup();if(!K){var J=I.createClipRect({x:b.x-2,y:b.y,width:b.width+4,height:b.height});I.setClip(M,J)}for(Z=0;Z<s.length;Z++){var ad=s[Z];var c=false;for(var ag in m._seriesTypes){if(m._seriesTypes[ag]==ad.type){c=true;break}}if(!c){throw'Invalid serie type "'+ad.type+'"'}if(a.isFunction(ad.drawBefore)){ad.drawBefore(I,C,Z,this)}if(ad.polar==true||ad.spider==true){if(ad.type.indexOf("pie")==-1&&ad.type.indexOf("donut")==-1){m._renderSpiderAxis(Z,b)}}m._renderAxisBands(Z,b,true);m._renderAxisBands(Z,b,false)}for(Z=0;Z<s.length;Z++){var ad=s[Z];if(m._isColumnType(ad.type)){m._renderColumnSeries(Z,b)}else{if(ad.type.indexOf("pie")!=-1||ad.type.indexOf("donut")!=-1){m._renderPieSeries(Z,b)}else{if(ad.type.indexOf("line")!=-1||ad.type.indexOf("area")!=-1){m._renderLineSeries(Z,b)}else{if(ad.type.indexOf("scatter")!=-1||ad.type.indexOf("bubble")!=-1){m._renderScatterSeries(Z,b)}else{if(ad.type.indexOf("candlestick")!=-1||ad.type.indexOf("ohlc")!=-1){m._renderCandleStickSeries(Z,b,ad.type.indexOf("ohlc")!=-1)}}}}}if(ad.annotations){if(!this._moduleAnnotations){throw"Please include 'jqxchart.annotations.js'"}for(var X=0;X<ad.annotations.length;X++){m._renderAnnotation(Z,ad.annotations[X],b)}}if(a.isFunction(ad.draw)){m.draw(I,C,Z,this)}}I.endGroup();if(m.enabled==false){var aa=I.rect(C.x,C.y,C.width,C.height);I.attr(aa,{fill:"#777777",opacity:0.5,stroke:"#00FFFFFF"})}if(a.isFunction(m.draw)){m.draw(I,C)}I.endGroup();m._startAnimation("series");if(m._credits){m._credits()}var ah=false;for(var Z=0;Z<m.seriesGroups.length&&!ah;Z++){var z=m._getXAxis(Z);if(z&&z.rangeSelector){ah=true}}if(ah){if(!this._moduleRangeSelector){throw"Please include 'jqxchart.rangeselector.js'"}var d=[];if(!this._isSelectorRefresh){m.removeHandler(a(document),m._getEvent("mousemove"),m._onSliderMouseMove);m.removeHandler(a(document),m._getEvent("mousedown"),m._onSliderMouseDown);m.removeHandler(a(document),m._getEvent("mouseup"),m._onSliderMouseUp)}if(!m._isSelectorRefresh){m._rangeSelectorInstances={}}for(Z=0;Z<m.seriesGroups.length;Z++){var v=this._getXAxis(Z);if(d.indexOf(v)==-1){if(this._renderXAxisRangeSelector(Z,G[Z])){d.push(v)}}}}},_credits:function(){if(a.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var c=this;var d=String.fromCharCode(119,119,119,46,106,113,119,105,100,103,101,116,115,46,99,111,109);if(!c._isRangeSelectorInstance&&location.hostname.indexOf(d.substring(4))==-1){var g=c.renderer;var f=c._rect;var h={"class":c.toThemeProperty("jqx-chart-legend-text",null),opacity:0.5};var e=g.measureText(d,0,h);var b=g.text(d,f.x+f.width-e.width-5,f.y+f.height-e.height-5,e.width,e.height,0,h);a(b).on("click",function(){location.href="http://"+d+"/?ref="+c.widgetName})}}},_isPieOnlySeries:function(){var c=this.seriesGroups;if(c.length==0){return false}for(var b=0;b<c.length;b++){if(c[b].type!="pie"&&c[b].type!="donut"){return false}}return true},_renderChartLegend:function(V,C,S,v){var l=this;var D=l.renderer;var I={x:C.x,y:C.y,width:C.width,height:C.height};var N=3;if(I.width>=2*N){I.x+=N;I.width-=2*N}if(I.height>=2*N){I.y+=N;I.height-=2*N}var E={width:I.width,height:0};var G=0,F=0;var p=20;var m=0;var f=10;var Q=10;var w=0;for(var P=0;P<V.length;P++){var J=V[P].css;if(!J){J=l.toThemeProperty("jqx-chart-legend-text",null)}p=20;var A=V[P].text;var j=D.measureText(A,0,{"class":J});if(j.height>p){p=j.height}if(j.width>w){w=j.width}if(v){if(P!=0){F+=p}if(F>I.height){F=0;G+=w+2*Q+f;w=j.width;E.width=G+w}}else{if(G!=0){G+=Q}if(G+2*f+j.width>I.width&&j.width<I.width){G=0;F+=p;p=20;m=I.width;E.height=F+p}}var K=false;if(j.width>I.width){K=true;var s=I.width;var T=A;var X=T.split(/\s+/);var o=[];var q="";for(var M=0;M<X.length;M++){var k=q+((q.length>0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q});q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q})}}j.width=0;var c=0;for(var H=0;H<o.length;H++){var W=o[H].text;var B=l.renderer.measureText(W,0,{"class":J});j.width=Math.max(j.width,B.width);c+=j.height}j.height=c}var z=(G+j.width<I.width)&&(F+j.height<C.height);if(l.legendLayout){var z=I.x+G+j.width<l._rect.x+l._rect.width&&I.y+F+j.height<l._rect.y+l._rect.height}if(!S&&z){var h=V[P].seriesIndex;var n=V[P].groupIndex;var b=V[P].itemIndex;var Y=V[P].fillColor;var U=V[P].lineColor;var e=l._isSerieVisible(n,h,b);var R=D.beginGroup();var O=e?V[P].opacity:0.1;if(K){var T=A;var s=I.width;var X=T.split(/\s+/);var u="";var d=0;var o=[];var q="";for(var M=0;M<X.length;M++){var k=q+((q.length>0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q,dy:d});d+=B.height;q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q,dy:d})}}for(var H=0;H<o.length;H++){var W=o[H].text;d=o[H].dy;var B=l.renderer.measureText(W,0,{"class":J});if(v){l.renderer.text(W,I.x+G+1.5*f,I.y+F+d,j.width,p,0,{"class":J},false,"left","center")}else{l.renderer.text(W,I.x+G+1.5*f,I.y+F+d,j.width,p,0,{"class":J},false,"center","center")}}var L=D.rect(I.x+G,I.y+F+f/2+d/2,f,f);if(v){F+=d}l.renderer.attr(L,{fill:Y,"fill-opacity":O,stroke:U,"stroke-width":1,"stroke-opacity":V[P].opacity})}else{var L=D.rect(I.x+G,I.y+F+f/2,f,f);l.renderer.attr(L,{fill:Y,"fill-opacity":O,stroke:U,"stroke-width":1,"stroke-opacity":V[P].opacity});if(v){l.renderer.text(A,I.x+G+1.5*f,I.y+F,j.width,j.height+f/2,0,{"class":J},false,"left","center")}else{l.renderer.text(A,I.x+G+1.5*f,I.y+F,j.width,p,0,{"class":J},false,"center","center")}}l.renderer.endGroup();l._setLegendToggleHandler(n,h,b,R)}if(v){}else{G+=j.width+2*f;if(m<G){m=G}}}if(S){E.height=a.jqx._ptrnd(F+p+5);E.width=a.jqx._ptrnd(m);return E}},isSerieVisible:function(d,b,c){return this._isSerieVisible(d,b,c)},_isSerieVisible:function(f,b,d){while(this._itemsToggleState.length<f+1){this._itemsToggleState.push([])}var e=this._itemsToggleState[f];while(e.length<b+1){e.push(isNaN(d)?true:[])}var c=e[b];if(isNaN(d)){return c}if(!a.isArray(c)){e[b]=c=[]}while(c.length<d+1){c.push(true)}return c[d]},isGroupVisible:function(b){return this._isGroupVisible(b)},_isGroupVisible:function(e){var d=false;var c=this.seriesGroups[e].series;if(!c){return d}for(var b=0;b<c.length;b++){if(this._isSerieVisible(e,b)){d=true;break}}return d},_toggleSerie:function(h,b,e,c){var g=!this._isSerieVisible(h,b,e);if(c!=undefined){g=c}var i=this.seriesGroups[h];var f=i.series[b];this._raiseEvent("toggle",{state:g,seriesGroup:i,serie:f,elementIndex:e});if(isNaN(e)){this._itemsToggleState[h][b]=g}else{var d=this._itemsToggleState[h][b];if(!a.isArray(d)){d=[]}while(d.length<e){d.push(true)}d[e]=g}this._isToggleRefresh=true;this.update();this._isToggleRefresh=false},showSerie:function(d,b,c){this._toggleSerie(d,b,c,true)},hideSerie:function(d,b,c){this._toggleSerie(d,b,c,false)},_setLegendToggleHandler:function(j,c,h,e){var i=this.seriesGroups[j];var f=i.series[c];var b=f.enableSeriesToggle;if(b==undefined){b=i.enableSeriesToggle!=false}if(b){var d=this;this.renderer.addHandler(e,"click",function(g){d._toggleSerie(j,c,h)})}},_renderLegend:function(c,e){var o=this;var d=[];for(var v=0;v<o.seriesGroups.length;v++){var t=o.seriesGroups[v];if(t.showLegend==false){continue}for(var q=0;q<t.series.length;q++){var m=t.series[q];if(m.showLegend==false){continue}var u=o._getSerieSettings(v,q);var p;if(t.type=="pie"||t.type=="donut"){var k=o._getXAxis(v);var h=m.legendFormatSettings||t.legendFormatSettings||k.formatSettings||m.formatSettings||t.formatSettings;var n=m.legendFormatFunction||t.legendFormatFunction||k.formatFunction||m.formatFunction||t.formatFunction;var j=o._getDataLen(v);for(var r=0;r<j;r++){p=o._getDataValue(r,m.displayText,v);p=o._formatValue(p,h,n,v,q,r);var l=o._getColors(v,q,r);d.push({groupIndex:v,seriesIndex:q,itemIndex:r,text:p,css:m.displayTextClass,fillColor:l.fillColor,lineColor:l.lineColor,opacity:u.opacity})}continue}var h=m.legendFormatSettings||t.legendFormatSettings;var n=m.legendFormatFunction||t.legendFormatFunction;p=o._formatValue(m.displayText||m.dataField||"",h,n,v,q,NaN);var l=o._getSeriesColors(v,q);var f=this._get([m.legendFillColor,m.legendColor,l.fillColor]);var b=this._get([m.legendLineColor,m.legendColor,l.lineColor]);d.push({groupIndex:v,seriesIndex:q,text:p,css:m.displayTextClass,fillColor:f,lineColor:b,opacity:u.opacity})}}return o._renderChartLegend(d,c,e,(o.legendLayout&&o.legendLayout.flow=="vertical"))},_getInterval:function(d,c){if(!d){return c}var b=this._get([d.unitInterval,c]);if(!isNaN(d.step)){b=d.step*c}return b},_getOffsets:function(u,d,n,t,r,l,g,e,k){var s=this._getInterval(r[u],e);var m=[];if(u==""||(r[u].visible&&r[u].visible!="custom")){m=this._generateIntervalValues(t,s,e,g,k)}var f;if(u!="labels"){var j=g?l.left:0;if(!g&&e>1){j=l.left*(e+1)}if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,false,j);if(!g){var o=(l.left+l.right)*s/e;if(d.flip){f.unshift(f[0]+o)}else{f.push(f[f.length-1]+o)}}}else{var j=l.left;if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,g,j)}var q=this._arraysToObjectsArray([m,f],["value","offset"]);if(d[u]&&d[u].custom){var h=this._objectsArraysToArray(d[u].custom,"value");var c=this._objectsArraysToArray(d[u].custom,"offset");var b=this._valuesToOffsets(h,d,t,n,l,g,l.left);for(var p=0;p<d[u].custom.length;p++){q.push({value:h[p],offset:isNaN(c[p])?b[p]:c[p]})}}return q},_renderXAxis:function(d,z,R,c){var f=this;var r=f._getXAxis(d);var Q=f.seriesGroups[d];var X=Q.orientation=="horizontal";var H={width:0,height:0};var P=f._getAxisSettings(r);if(!r||!P.visible||Q.type=="spider"){return H}if(!f._isGroupVisible(d)||this._isPieGroup(d)){return H}var W=f._alignValuesWithTicks(d);while(f._renderData.length<d+1){f._renderData.push({})}if(f.rtl){r.flip=true}var B=X?z.height:z.width;var w=r.text;var t=f._calculateXOffsets(d,B);var T=t.axisStats;var j=r.rangeSelector;var F=0;if(j){if(!this._moduleRangeSelector){throw"Please include 'jqxchart.rangeselector.js'"}F=this._selectorGetSize(r)}var E=(X&&r.position=="right")||(!X&&r.position=="top");if(!R&&j){if(X){z.width-=F;if(r.position!="right"){z.x+=F}}else{z.height-=F;if(r.position=="top"){z.y+=F}}}var k={rangeLength:t.rangeLength,itemWidth:t.itemWidth,intervalWidth:t.intervalWidth,data:t,settings:P,isMirror:E,rect:z};f._renderData[d].xAxis=k;var G=T.interval;if(isNaN(G)){return H}if(X){P.title.angle-=90;P.labels.angle-=90}var m=this._getInterval(P.gridLines,G);var K=this._getInterval(P.tickMarks,G);var C=this._getInterval(P.labels,G);var L;var V=T.min;var s=T.max;var N=t.padding;var S=r.flip==true||f.rtl;var h={min:V,max:s};if(T.logAxis.enabled){h.min=T.logAxis.minPow;h.max=T.logAxis.maxPow}if(r.type=="date"){P.gridLines.offsets=this._generateDTOffsets(V,s,B,N,m,G,T.dateTimeUnit,W,NaN,false,S);P.tickMarks.offsets=this._generateDTOffsets(V,s,B,N,K,G,T.dateTimeUnit,W,NaN,false,S);L=this._generateDTOffsets(V,s,B,N,C,G,T.dateTimeUnit,W,NaN,true,S)}else{P.gridLines.offsets=this._getOffsets("gridLines",r,B,T,P,N,W,G);P.tickMarks.offsets=this._getOffsets("tickMarks",r,B,T,P,N,W,G);L=this._getOffsets("labels",r,B,T,P,N,W,G)}var n=f.renderer.getRect();var l=n.width-z.x-z.width;var p=f._getDataLen(d);var o;if(f._elementRenderInfo&&f._elementRenderInfo.length>d){o=f._elementRenderInfo[d].xAxis}var q=[];var J;if(P.labels.formatFunction){J=P.labels.formatFunction}var v;if(P.labels.formatSettings){v=a.extend({},P.labels.formatSettings)}if(r.type=="date"){if(r.dateFormat&&!J){if(v){v.dateFormat=v.dateFormat||r.dateFormat}else{v={dateFormat:r.dateFormat}}}else{if(!J&&(!v||(v&&!v.dateFormat))){J=this._getDefaultDTFormatFn(r.baseUnit||"day")}}}for(var O=0;O<L.length;O++){var M=L[O].value;var I=L[O].offset;if(isNaN(I)){continue}var U=undefined;if(r.type!="date"&&T.useIndeces&&r.dataField){U=Math.round(M);M=f._getDataValue(U,r.dataField);if(M==undefined){M=""}}var w=f._formatValue(M,v,J,d,undefined,U);if(w==undefined||w.toString()==""){if(isNaN(U)){U=O}if(U>=T.filterRange.min&&U<=T.filterRange.max){w=T.useIndeces?(T.min+U).toString():(M==undefined?"":M.toString())}}var b={key:M,text:w,targetX:I,x:I};if(o&&o.itemOffsets[M]){b.x=o.itemOffsets[M].x;b.y=o.itemOffsets[M].y}q.push(b)}var D=f._getAnimProps(d);var u=D.enabled&&q.length<500?D.duration:0;if(f.enableAxisTextAnimation==false){u=0}var A={items:q,renderData:k};var e=f._renderAxis(X,E,P,{x:z.x,y:z.y,width:z.width,height:z.height},c,G,false,true,A,R,u);if(X){e.width+=F}else{e.height+=F}return e},_animateAxisText:function(f,h){var c=f.items;var d=f.textSettings;for(var e=0;e<c.length;e++){var g=c[e];if(!g){continue}if(!g.visible){continue}var b=g.targetX;var j=g.targetY;if(!isNaN(g.x)&&!isNaN(g.y)){b=g.x+(b-g.x)*h;j=g.y+(j-g.y)*h}if(g.element){this.renderer.removeElement(g.element);g.element=undefined}g.element=this.renderer.text(g.text,b,j,g.width,g.height,d.angle,{"class":d.style},false,d.halign,d.valign,d.textRotationPoint)}},_getPolarAxisCoords:function(e,b){var i=this.seriesGroups[e];var p=b.x+a.jqx.getNum([i.offsetX,b.width/2]);var o=b.y+a.jqx.getNum([i.offsetY,b.height/2]);var k=Math.min(b.width,b.height);var f=i.radius;if(this._isPercent(f)){f=parseFloat(f)/100*k/2}if(isNaN(f)){f=k/2*0.6}var h=this._alignValuesWithTicks(e);var n=this._get([i.startAngle,i.minAngle,0])-90;if(isNaN(n)){n=0}else{n=2*Math.PI*n/360}var m=this._get([i.endAngle,i.maxAngle,360])-90;if(isNaN(m)){m=2*Math.PI}else{m=2*Math.PI*m/360}if(n>m){var l=n;n=m;m=l}var t=a.jqx._rnd(Math.abs(n-m)/(Math.PI*2),0.001,true);var q=Math.PI*2*f*t;var g=this._calcGroupOffsets(e,b).xoffsets;if(!g){return}var j=!(Math.abs(Math.abs(m-n)-Math.PI*2)>0.00001);if(i.spider){axisStats=this._getXAxisStats(e,this._getXAxis(e),q);var r=axisStats.interval;if(isNaN(r)||r==0){r=1}var d=(axisStats.max-axisStats.min)/r+(j?1:0);d=Math.round(d);if(d>2){var c=Math.cos(Math.abs(m-n)/2/d);c=a.jqx._rnd(c,0.01);if(c==0){c=1}var s=f/c;if(s>f&&h){f=s}}}f=a.jqx._ptrnd(f);return{x:p,y:o,r:f,adjR:this._get([s,f]),itemWidth:g.itemWidth,rangeLength:g.rangeLength,valuesOnTicks:h,startAngle:n,endAngle:m,isClosedCircle:j,axisSize:q}},_toPolarCoord:function(j,f,h,e){var c=Math.abs(j.startAngle-j.endAngle)/(Math.PI*2);var b=(h-f.x)*2*Math.PI*c/Math.max(1,f.width)+j.startAngle;var d=((f.height+f.y)-e)*j.r/Math.max(1,f.height);var i=j.x+d*Math.cos(b);var g=j.y+d*Math.sin(b);return{x:a.jqx._ptrnd(i),y:a.jqx._ptrnd(g)}},_renderSpiderAxis:function(A,k){var ap=this;var g=ap._getXAxis(A);var aB=this._getAxisSettings(g);if(!g||!aB.visible){return}var X=ap.seriesGroups[A];var S=ap._getPolarAxisCoords(A,k);if(!S){return}var M=a.jqx._ptrnd(S.x);var L=a.jqx._ptrnd(S.y);var t=S.adjR;var Y=S.startAngle;var W=S.endAngle;if(t<1){return}var aw=a.jqx._rnd(Math.abs(Y-W)/(Math.PI*2),0.001,true);var h=Math.PI*2*t*aw;var c=S.isClosedCircle;var w=this._renderData[A].xoffsets;if(!w.rangeLength){return}var T=w.axisStats.interval;if(isNaN(T)||T<1){T=1}var at=X.orientation=="horizontal";var aa=(at&&g.position=="right")||(!at&&g.position=="top");while(ap._renderData.length<A+1){ap._renderData.push({})}var au={rangeLength:w.rangeLength,itemWidth:w.itemWidth,data:w,rect:k,settings:aB};ap._renderData[A].xAxis=au;ap._renderData[A].polarCoords=S;var az=true;for(var R=0;R<A;R++){var B=ap._renderData[R].xAxis;var b=ap._renderData[R].polarCoords;var E=ap._getXAxis(R);var V=false;for(var P in S){if(S[P]!=b[P]){V=true;break}}if(!V||E!=g){az=false}}var e=aB.gridLines;var U=aB.tickMarks;var z=aB.labels;var ad=this._getInterval(e,T);var aE=this._getInterval(U,T);var an=this._getInterval(z,T);var H=ap._alignValuesWithTicks(A);var ae=ap.renderer;var ai;var af=w.axisStats;var aD=af.min;var r=af.max;var u=this._getPaddingSize(w.axisStats,g,H,h,true,c,false);var aj=g.flip==true||ap.rtl;if(g.type=="date"){e.offsets=this._generateDTOffsets(aD,r,h,u,ad,T,g.baseUnit,true,0,false,aj);U.offsets=this._generateDTOffsets(aD,r,h,u,aE,T,g.baseUnit,true,0,false,aj);ai=this._generateDTOffsets(aD,r,h,u,an,T,g.baseUnit,true,0,true,aj)}else{aB.gridLines.offsets=this._getOffsets("gridLines",g,h,af,aB,u,true,T);aB.tickMarks.offsets=this._getOffsets("tickMarks",g,h,af,aB,u,true,T);ai=this._getOffsets("labels",g,h,af,aB,u,true,T)}var ak=ap.renderer.getRect();var ax=ak.width-k.x-k.width;var ah=ap._getDataLen(A);var s;if(ap._elementRenderInfo&&ap._elementRenderInfo.length>A){s=ap._elementRenderInfo[A].xAxis}var ar=[];var ag=this._getDataLen(A);for(var R=0;R<ai.length;R++){var G=ai[R].offset;var I=ai[R].value;if(g.type!="date"&&af.useIndeces&&g.dataField){var ay=Math.round(I);if(ay>=ag){continue}I=ap._getDataValue(ay,g.dataField);if(I==undefined){I=""}}var aq=ap._formatValue(I,z.formatSettings,z.formatFunction,A,undefined,ay);if(aq==undefined||aq.toString()==""){aq=af.useIndeces?(af.min+R).toString():(I==undefined?"":I.toString())}var d={key:I,text:aq,targetX:G,x:G};if(s&&s.itemOffsets[I]){d.x=s.itemOffsets[I].x;d.y=s.itemOffsets[I].y}ar.push(d)}var aA={items:ar,renderData:au};var l={stroke:e.color,fill:"none","stroke-width":e.width,"stroke-dasharray":e.dashStyle||""};if(!X.spider){if(aw==1){ae.circle(M,L,t,l)}else{var F=-Y/Math.PI*180;var aF=-W/Math.PI*180;this.renderer.pieslice(M,L,0,t,Math.min(F,aF),Math.max(F,aF),undefined,l)}}var N=ar.length;var m=2*Math.PI/(N);var am=Y;var f,D;if(e.visible&&az){if(!H&&!c){e.offsets.unshift({offset:-u.right})}for(var R=0;R<e.offsets.length;R++){var n=e.offsets[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}var q=a.jqx._ptrnd(M+t*Math.cos(C));var p=a.jqx._ptrnd(L+t*Math.sin(C));ae.line(M,L,q,p,l)}}if(U.visible&&az){var Q=5;var o={stroke:U.color,fill:"none","stroke-width":U.width,"stroke-dasharray":U.dashStyle||""};if(!H&&!c){U.offsets.unshift({offset:-u.right})}for(var R=0;R<U.offsets.length;R++){var n=U.offsets[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}var ac={x:M+t*Math.cos(C),y:L+t*Math.sin(C)};var ab={x:M+(t+Q)*Math.cos(C),y:L+(t+Q)*Math.sin(C)};ae.line(a.jqx._ptrnd(ac.x),a.jqx._ptrnd(ac.y),a.jqx._ptrnd(ab.x),a.jqx._ptrnd(ab.y),o)}}var ao=[];if(X.spider){var v=[];if(g.type=="date"){v=this._generateDTOffsets(aD,r,h,u,T,T,g.baseUnit,true,0,false,aj)}else{v=this._getOffsets("",g,h,af,aB,u,true,T)}if(!H&&!c){v.unshift({offset:-u.right})}for(var R=0;R<v.length;R++){var n=v[R].offset;if(!H){if(c){n+=u.right/2}else{n+=u.right}}var C=am+n*2*Math.PI*aw/Math.max(1,h);if(C-W>0.01){continue}ao.push(C)}au.offsetAngles=ao}var Z=ap._renderSpiderValueAxis(A,k,(H?S.adjR:S.r),ao);if(!Z){Z=[]}if(X.spider){if(!H){for(var R=0;R<Z.length;R++){Z[R]=Z[R]*S.adjR/S.r}}Z.push(t);this._renderSpiderLines(M,L,Z,S,ao,l)}if(az&&z.visible){au.polarLabels=[];for(var R=0;R<ar.length;R++){var n=ar[R].x;var C=am+n*2*Math.PI*aw/Math.max(1,h);C=(360-C/(2*Math.PI)*360)%360;if(C<0){C=360+C}var al=ae.measureText(ar[R].text,0,{"class":aB.labels.style});var O=(H?S.adjR:S.r)+(U.visible?7:2);var av=aB.labels;var aC;if(av.autoRotate){var K=a.jqx._ptRotate(M-al.width/2,L-O-al.height,M,L,-C/180*Math.PI);var J=a.jqx._ptRotate(M+al.width/2,L-O,M,L,-C/180*Math.PI);al.width=Math.abs(K.x-J.x);al.height=Math.abs(K.y-J.y);aC={x:Math.min(K.x,J.x),y:Math.min(K.y,J.y)}}else{aC=this._adjustTextBoxPosition(M,L,al,O,C,false,false,false)}au.polarLabels.push({x:aC.x,y:aC.y,value:ar[R].text});ae.text(ar[R].text,aC.x,aC.y,al.width,al.height,av.autoRotate?90-C:av.angle,{"class":av.style},false,av.halign,av.valign)}}},_renderSpiderLines:function(h,f,u,m,e,b){var p=this.renderer;var q=m.startAngle;var o=m.endAngle;var g=m.isClosedCircle;for(var r=0;r<u.length;r++){var d=u[r];var c=undefined,n=undefined;for(var s=0;s<e.length;s++){var t=e[s];var l=a.jqx._ptrnd(h+d*Math.cos(t));var k=a.jqx._ptrnd(f+d*Math.sin(t));if(c){p.line(c.x,c.y,l,k,b)}c={x:l,y:k};if(!n){n={x:l,y:k}}}if(n&&g){p.line(c.x,c.y,n.x,n.y,b)}}},_renderSpiderValueAxis:function(e,D,T,S){var k=this;var u=this.seriesGroups[e];var E=this._getPolarAxisCoords(e,D);if(!E){return}var P=a.jqx._ptrnd(E.x);var O=a.jqx._ptrnd(E.y);T=T||E.r;var g=E.startAngle;var Z=E.endAngle;var X=a.jqx._rnd(Math.abs(g-Z)/(Math.PI*2),0.001,true);if(T<1){return}T=a.jqx._ptrnd(T);var f=this._getValueAxis(e);settings=this._getAxisSettings(f);if(!f||false==settings.visible){return}var L=this._stats.seriesGroups[e].mu;var A=settings.labels;var z=A.formatSettings;var c=u.type.indexOf("stacked")!=-1&&u.type.indexOf("100")!=-1;if(c&&!z){z={sufix:"%"}}var v=this._get([A.step,A.unitInterval/L]);if(isNaN(v)){v=1}v=Math.max(1,Math.round(v));this._calcValueAxisItems(e,T,v);var d=settings.gridLines;var B=settings.tickMarks;var r=this._getInterval(d,L);var Q=this._getInterval(B,L);var m=settings.labels;var l={stroke:d.color,fill:"none","stroke-width":1,"stroke-dasharray":d.dashStyle||""};var p=this._renderData[e].valueAxis;var w=p.items;var t=g;if(w.length&&settings.line.visible){if(!isNaN(settings.line.angle)){t=2*Math.PI*settings.line.angle/360}var o=P+Math.cos(t)*T;var ac=O+Math.sin(t)*T;if(S.indexOf(t)==-1){var V=a.extend({},l);V["stroke-width"]=settings.line.lineWidth;V.stroke=settings.line.color;V["stroke-dasharray"]=settings.line.dashStyle;this.renderer.line(P,O,o,ac,V)}}w=w.reverse();var I=this.renderer;p.polarLabels=[];for(var Y=0;Y<w.length-1;Y++){var R=w[Y];if(isNaN(R)){continue}var C=(m.formatFunction)?m.formatFunction(R):this._formatNumber(R,z);var h=I.measureText(C,0,{"class":m.style});var N=P+(f.showTickMarks!=false?3:2);var M=O-p.itemWidth*Y-h.height/2;var H=a.jqx._ptRotate(N,M,P,O,t);var G=a.jqx._ptRotate(N+h.width,M+h.height,P,O,t);N=Math.min(H.x,G.x);M=Math.min(H.y,G.y);h.width=Math.abs(H.x-G.x);h.height=Math.abs(H.y-G.y);N+=settings.labels.textOffset.x;M+=settings.labels.textOffset.y;p.polarLabels.push({x:N,y:M,value:C});I.text(C,N,M,h.width,h.height,m.autoRotate?(90+g*180/Math.PI):m.angle,{"class":m.style},false,m.halign,m.valign)}var q=f.logarithmicScale==true;var s=q?w.length:p.rangeLength;aIncrement=2*Math.PI/s;var ab=f.valuesOnTicks!=false;var K=this._stats.seriesGroups[e];var j=K.mu;var J=f.logarithmicScale==true;var F=f.logarithmicScaleBase||10;if(J){j=1}var aa={min:K.min,max:K.max,logAxis:{enabled:J==true,base:f.logarithmicScaleBase,minPow:K.minPow,maxPow:K.maxPow}};if(d.visible||u.spider||f.alternatingBackgroundColor||f.alternatingBackgroundColor2){d.offsets=this._getOffsets("gridLines",f,T,aa,settings,{left:0,right:0},ab,j)}var U=[];if(d.visible||u.spider){var l={stroke:d.color,fill:"none","stroke-width":1,"stroke-dasharray":d.dashStyle||""};for(var Y=0;Y<d.offsets.length;Y++){var M=a.jqx._ptrnd(d.offsets[Y].offset);if(M==T){continue}if(u.spider){U.push(M);continue}if(X!=1){var n=-g/Math.PI*180;var W=-Z/Math.PI*180;this.renderer.pieslice(P,O,0,M,Math.min(n,W),Math.max(n,W),undefined,l)}else{I.circle(P,O,M,l)}}}if(!f.tickMarks||(!f.tickMarks.visible&&!f.showTickMarks)){B.visible=false}if(B.visible){B.offsets=this._getOffsets("tickMarks",f,T,aa,settings,{left:0,right:0},ab,j);tickMarkSize=B.size*2;var l={stroke:B.color,fill:"none","stroke-width":1,"stroke-dasharray":B.dashStyle||""};for(var Y=0;Y<B.offsets.length;Y++){var b=B.offsets[Y].offset;var H={x:P+b*Math.cos(t)-tickMarkSize/2*Math.sin(t+Math.PI/2),y:O+b*Math.sin(t)-tickMarkSize/2*Math.cos(t+Math.PI/2)};var G={x:P+b*Math.cos(t)+tickMarkSize/2*Math.sin(t+Math.PI/2),y:O+b*Math.sin(t)+tickMarkSize/2*Math.cos(t+Math.PI/2)};I.line(a.jqx._ptrnd(H.x),a.jqx._ptrnd(H.y),a.jqx._ptrnd(G.x),a.jqx._ptrnd(G.y),l)}}return U},_renderAxis:function(H,D,Q,z,c,F,m,V,C,U,d){if(Q.customDraw&&!U){return{width:NaN,height:NaN}}var t=Q.title,n=Q.labels,e=Q.gridLines,A=Q.tickMarks,P=Q.padding;var o=A.visible?A.size:0;var R=2;var G={width:0,height:0};var q={width:0,height:0};if(H){G.height=q.height=z.height}else{G.width=q.width=z.width}if(!U&&D){if(H){z.x-=z.width}}var l=C.renderData;var b=l.itemWidth;if(t.visible&&t.text!=undefined&&t!=""){var p=t.angle;var f=this.renderer.measureText(t.text,p,{"class":t.style});q.width=f.width;q.height=f.height;if(!U){this.renderer.text(t.text,z.x+t.offset.x+(H?(!D?R+P.left:-P.right-R+2*z.width-q.width):0),z.y+t.offset.y+(!H?(!D?z.height-R-q.height-P.bottom:P.top+R):0),H?q.width:z.width,!H?q.height:z.height,p,{"class":t.style},true,t.halign,t.valign,t.rotationPoint)}}var L=0;var u=V?-b/2:0;if(V&&!H){n.halign="center"}var N=z.x;var M=z.y;var E=n.textOffset;if(E){if(!isNaN(E.x)){N+=E.x}if(!isNaN(E.y)){M+=E.y}}if(!H){N+=u;if(D){M+=q.height>0?q.height+3*R:2*R;M+=o-(V?o:o/4)}else{M+=V?o:o/4}M+=P.top}else{N+=P.left+R+(q.width>0?q.width+R:0)+(D?z.width-q.width:0);M+=u}var T=0;var K=0;var r=C.items;l.itemOffsets={};if(this._isToggleRefresh||!this._isUpdate){d=0}var k=false;var j=0;for(var S=0;S<r.length&&n.visible;S++,L+=b){if(!r[S]||isNaN(b)){continue}var v=r[S].text;if(!isNaN(r[S].targetX)){L=r[S].targetX}var f=this.renderer.measureText(v,n.angle,{"class":n.style});if(f.width>K){K=f.width}if(f.height>T){T=f.height}j+=H?T:K;if(!U){if((H&&L>z.height+2)||(!H&&L>z.width+2)){continue}var J=H?N+(D?(q.width==0?o:o-R):0):N+L;var I=H?M+L:M;l.itemOffsets[r[S].key]={x:J,y:I};if(!k){if(!isNaN(r[S].x)||!isNaN(r[S].y)&&d){k=true}}r[S].targetX=J;r[S].targetY=I;r[S].width=!H?b:z.width-P.left-P.right-2*R-o-((q.width>0)?q.width+R:0);r[S].height=H?b:z.height-P.top-P.bottom-2*R-o-((q.height>0)?q.height+R:0);r[S].visible=true}}l.avgWidth=r.length==0?0:j/r.length;if(!U){var s={items:r,textSettings:n};if(isNaN(d)||!k){d=0}this._animateAxisText(s,d==0?1:0);if(d!=0){var g=this;this._enqueueAnimation("series",undefined,undefined,d,function(i,h,w){g._animateAxisText(h,w)},s)}}G.width+=2*R+o+q.width+K+(H&&q.width>0?R:0);G.height+=2*R+o+q.height+T+(!H&&q.height>0?R:0);if(!H){G.height+=P.top+P.bottom}else{G.width+=P.left+P.right}var B={};if(!U&&Q.line.visible){var O={stroke:Q.line.color,"stroke-width":Q.line.width,"stroke-dasharray":Q.line.dashStyle||""};if(H){var J=z.x+z.width+(D?P.left:-P.right);J=a.jqx._ptrnd(J);this.renderer.line(J,z.y,J,z.y+z.height,O)}else{var I=a.jqx._ptrnd(z.y+(D?z.height-P.bottom:P.top));this.renderer.line(a.jqx._ptrnd(z.x),I,a.jqx._ptrnd(z.x+z.width+1),I,O)}}G.width=a.jqx._rup(G.width);G.height=a.jqx._rup(G.height);return G},_drawPlotAreaLines:function(j,z,f){var E=this.seriesGroups[j];var c=E.orientation!="horizontal";if(!this._renderData||this._renderData.length<=j){return}var I=z?"valueAxis":"xAxis";var v=this._renderData[j][I];if(!v){return}var n=this._renderData.axisDrawState;if(!n){n=this._renderData.axisDrawState={}}var A="",h;if(z){A="valueAxis_"+((E.valueAxis)?j:"")+(c?"swap":"");h=this._getValueAxis(j)}else{A="xAxis_"+((E.xAxis||E.categoryAxis)?j:"")+(c?"swap":"");h=this._getXAxis(j)}if(n[A]){n=n[A]}else{n=n[A]={}}if(!z){c=!c}var G=v.settings;if(!G){return}if(G.customDraw){return}var F=G.gridLines,q=G.tickMarks,u=G.padding;var e=v.rect;var l=this._plotRect;if(!F||!q){return}var p=0.5;var d={};var b={stroke:F.color,"stroke-width":F.width,"stroke-dasharray":F.dashStyle||""};var D=z?e.y+e.height:e.x;var o=F.offsets;if(z&&!h.flip){o=a.extend([],o);o=o.reverse()}if(o&&o.length>0){var k=NaN;var C=o.length;for(var B=0;B<o.length;B++){if(c){lineOffset=a.jqx._ptrnd(e.y+o[B].offset);if(lineOffset<e.y-p){lineOffset=a.jqx._ptrnd(e.y)}if(lineOffset>e.y+e.height){lineOffset=e.y+e.height}}else{lineOffset=a.jqx._ptrnd(e.x+o[B].offset);if(lineOffset>e.x+e.width+p){lineOffset=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(lineOffset)){continue}if(!isNaN(k)&&Math.abs(lineOffset-k)<2){continue}k=lineOffset;if(f.gridLines&&F.visible!=false&&n.gridLines!=true){if(c){this.renderer.line(a.jqx._ptrnd(l.x),lineOffset,a.jqx._ptrnd(l.x+l.width),lineOffset,b)}else{this.renderer.line(lineOffset,a.jqx._ptrnd(l.y),lineOffset,a.jqx._ptrnd(l.y+l.height),b)}}d[lineOffset]=true;if(f.alternatingBackground&&(F.alternatingBackgroundColor||F.alternatingBackgroundColor2)&&n.alternatingBackground!=true){var m=((B%2)==0)?F.alternatingBackgroundColor2:F.alternatingBackgroundColor;if(B>0&&m){var H;if(c){H=this.renderer.rect(a.jqx._ptrnd(l.x),D,a.jqx._ptrnd(l.width-1),lineOffset-D,b)}else{H=this.renderer.rect(D,a.jqx._ptrnd(l.y),lineOffset-D,a.jqx._ptrnd(l.height),b)}this.renderer.attr(H,{"stroke-width":0,fill:m,opacity:F.alternatingBackgroundOpacity||1})}}D=lineOffset}}var b={stroke:q.color,"stroke-width":q.width,"stroke-dasharray":q.dashStyle||""};if(f.tickMarks&&q.visible&&n.tickMarks!=true){var t=q.size;var o=q.offsets;var k=NaN;for(var B=0;B<o.length;B++){if(c){lineOffset=a.jqx._ptrnd(e.y+o[B].offset);if(lineOffset<e.y-p){lineOffset=a.jqx._ptrnd(e.y)}if(lineOffset>e.y+e.height){lineOffset=e.y+e.height}}else{lineOffset=a.jqx._ptrnd(e.x+o[B].offset);if(lineOffset>e.x+e.width+p){lineOffset=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(lineOffset)){continue}if(!isNaN(k)&&Math.abs(lineOffset-k)<2){continue}if(d[lineOffset-1]){lineOffset--}else{if(d[lineOffset+1]){lineOffset++}}if(c){if(lineOffset>e.y+e.height+p){break}}else{if(lineOffset>e.x+e.width+p){break}}k=lineOffset;var w=!v.isMirror?-t:t;if(c){var s=e.x+e.width+(h.position=="right"?u.left:-u.right);if(!z){s=e.x+(v.isMirror?u.left:-u.right+e.width)}this.renderer.line(s,lineOffset,s+w,lineOffset,b)}else{var r=e.y+(v.isMirror?e.height:0);r+=v.isMirror?-u.bottom:u.top;r=a.jqx._ptrnd(r);this.renderer.line(lineOffset,r,lineOffset,r-w,b)}}}n.tickMarks=n.tickMarks||f.tickMarks;n.gridLines=n.gridLines||f.gridLines;n.alternatingBackground=n.alternatingBackground||f.alternatingBackground},_calcValueAxisItems:function(j,d,l){var n=this._stats.seriesGroups[j];if(!n||!n.isValid){return false}var w=this.seriesGroups[j];var b=w.orientation=="horizontal";var f=this._getValueAxis(j);var m=f.valuesOnTicks!=false;var e=f.dataField;var o=n.intervals;var s=d/o;var u=n.min;var r=n.mu;var c=f.logarithmicScale==true;var k=f.logarithmicScaleBase||10;var h=w.type.indexOf("stacked")!=-1&&w.type.indexOf("100")!=-1;if(c){r=!isNaN(f.unitInterval)?f.unitInterval:1}if(!m){o=Math.max(o-1,1)}while(this._renderData.length<j+1){this._renderData.push({})}this._renderData[j].valueAxis={};var q=this._renderData[j].valueAxis;q.itemWidth=q.intervalWidth=s;q.items=[];var p=q.items;for(var v=0;v<=o;v++){var t=0;if(c){if(h){t=n.max/Math.pow(k,o-v)}else{t=u*Math.pow(k,v)}}else{t=m?u+v*r:u+(v+0.5)*r}if(v%l!=0){p.push(NaN);continue}p.push(t)}q.rangeLength=c&&!h?n.intervals:(n.intervals)*r;if(f.flip!=true){p=p.reverse()}return true},_getDecimalPlaces:function(b,g,c){var h=0;if(isNaN(c)){c=10}for(var f=0;f<b.length;f++){var k=g===undefined?b[f]:b[f][g];if(isNaN(k)){continue}var d=k.toString();for(var e=0;e<d.length;e++){if(d[e]<"0"||d[e]>"9"){h=d.length-(e+1);if(h>=0){return Math.min(h,c)}}}if(h>0){k*=Math.pow(10,h)}while(Math.round(k)!=k&&h<c){h++;k*=10}}return h},_renderValueAxis:function(f,z,M,e){var L=this.seriesGroups[f];var Q=L.orientation=="horizontal";var r=this._getValueAxis(f);if(!r){throw"SeriesGroup "+f+" is missing valueAxis definition"}var G={width:0,height:0};if(!this._isGroupVisible(f)||this._isPieOnlySeries()||L.type=="spider"){return G}var P=r.valuesOnTicks!=false;var H=this._stats.seriesGroups[f];var j=H.mu;var F=r.logarithmicScale==true;var C=r.logarithmicScaleBase||10;if(F){j=!isNaN(r.unitInterval)?r.unitInterval:1}if(j==0){j=1}if(isNaN(j)){return G}var J=this._getAxisSettings(r);var q=J.title,t=J.labels;var k=r.labels||{};var v=this._get([r.horizontalTextAlignment,k.horizontalAlignment]);if(!v&&t.angle==0){t.halign=Q?"center":(r.position=="right"?"left":"right")}var o=this._get([t.step,t.unitInterval/j]);if(isNaN(o)){o=1}o=Math.max(1,Math.round(o));if(!this._calcValueAxisItems(f,(Q?z.width:z.height),o)||!J.visible){return G}if(!Q){q.angle=(!this.rtl?-90:90);if(q.rotationPoint=="centercenter"){if(q.valign=="top"){q.rotationPoint="rightcenter"}else{if(q.valign=="bottom"){q.rotationPoint="leftcenter"}}}}var l=this._renderData[f].valueAxis;var h=t.formatSettings;var c=L.type.indexOf("stacked")!=-1&&L.type.indexOf("100")!=-1;if(c&&!h){h={sufix:"%"}}if(!t.formatFunction&&(!h||!h.decimalPlaces)){h=h||{};h.decimalPlaces=this._getDecimalPlaces([H.min,H.max,j],undefined,3)}var d=J.gridLines;var m=F?j:this._getInterval(d,j);var B=Q?z.width:z.height;var N=(r.flip==true);r.flip=!N;var O={min:H.min,max:H.max,logAxis:{enabled:F==true,base:C,minPow:H.minPow,maxPow:H.maxPow}};if(d.visible||r.alternatingBackgroundColor||r.alternatingBackgroundColor2){d.offsets=this._getOffsets("gridLines",r,B,O,J,{left:0,right:0},P,j)}var u=J.tickMarks;if(u.visible){u.offsets=this._getOffsets("tickMarks",r,B,O,J,{left:0,right:0},P,j)}labelOffsets=this._getOffsets("labels",r,B,O,J,{left:0,right:0},P,j,!P);r.flip=N;var p=[];var n;if(this._elementRenderInfo&&this._elementRenderInfo.length>f){n=this._elementRenderInfo[f].valueAxis}for(var K=0;K<labelOffsets.length;K++){var I=labelOffsets[K].value;if(isNaN(labelOffsets[K].offset)){p.push(undefined);continue}var w=(t.formatFunction)?t.formatFunction(I):(!isNaN(I))?this._formatNumber(I,h):I;var b={key:I,text:w};if(n&&n.itemOffsets[I]){b.x=n.itemOffsets[I].x;b.y=n.itemOffsets[I].y}b.targetX=labelOffsets[K].offset;if(!isNaN(b.targetX)){p.push(b)}}var E=(Q&&r.position=="top")||(!Q&&r.position=="right")||(!Q&&this.rtl&&r.position!="left");var A={items:p,renderData:l};var D=this._getAnimProps(f);var s=D.enabled&&p.length<500?D.duration:0;if(this.enableAxisTextAnimation==false){s=0}l.settings=J;l.isMirror=E;l.rect=z;return this._renderAxis(!Q,E,J,z,e,j,F,true,A,M,s)},_objectsArraysToArray:function(e,d){var b=[];if(!a.isArray(e)){return b}for(var c=0;c<e.length;c++){b.push(e[c][d])}return b},_arraysToObjectsArray:function(f,e){var c=[];if(f.length!=e.length){return c}for(var d=0;d<f.length;d++){for(var b=0;b<f[d].length;b++){if(c.length<=b){c.push({})}c[b][e[d]]=f[d][b]}}return c},_valuesToOffsets:function(p,e,l,q,o,f,c){var h=[];if(!e||!a.isArray(p)){return h}var d=l.logAxis.base;var m=l.logAxis.enabled?"logarithmic":"linear";var k=e.flip;var n=q;var b=0,g=0;if(o&&!isNaN(o.left)){b=o.left}if(o&&!isNaN(o.right)){g=o.right}n=q-b-g;q=n;for(var j=0;j<p.length;j++){x=this._jqxPlot.scale(p[j],{min:l.min.valueOf(),max:l.max.valueOf(),type:m,base:d},{min:0,max:f?q:n,flip:k},{});if(!isNaN(x)){if(!isNaN(c)){x+=c}if(x<=q+b+g+1){h.push(a.jqx._ptrnd(x))}else{h.push(NaN)}}else{h.push(NaN)}}return h},_generateIntervalValues:function(n,c,b,d,e){var j=[];var g=n.min;var m=n.max;if(n.logAxis&&n.logAxis.enabled){g=n.logAxis.minPow;m=n.logAxis.maxPow}if(g==undefined||m==undefined){return j}if(g==m){if(n.logAxis&&n.logAxis.enabled){return[Math.pow(n.logAxis.base,g)]}else{return[g]}}var l=1;if(b<1){l=1000000;g*=l;m*=l;b*=l}for(var h=g;h<=m;h+=b){j.push(h/l+(e?b/2:0))}if(c>b){var f=[];var k=Math.round(c/b);for(var h=0;h<j.length;h++){if((h%k)==0){f.push(j[h])}}j=f}if(n.logAxis&&n.logAxis.enabled){for(var h=0;h<j.length;h++){j[h]=Math.pow(n.logAxis.base,j[h])}}return j},_generateDTOffsets:function(p,s,z,n,A,c,o,b,u,v,g){if(!o){o="day"}var f=[];if(p>s){return f}if(p==s){if(v){f.push({offset:b?z/2:n.left,value:p})}else{if(b){f.push({offset:z/2,value:p})}}return f}var j=z-n.left-n.right;var w=p;var k=n.left;var e=k;c=Math.max(c,1);var m=c;var d=Math.min(1,c);if(c>1&&o!="millisecond"){c=1}while(a.jqx._ptrnd(e)<=a.jqx._ptrnd(n.left+j+(b?0:n.right))){f.push({offset:e,value:w});var B=new Date(w.valueOf());if(o=="millisecond"){B.setMilliseconds(w.getMilliseconds()+c)}else{if(o=="second"){B.setSeconds(w.getSeconds()+c)}else{if(o=="minute"){B.setMinutes(w.getMinutes()+c)}else{if(o=="hour"){var l=B.valueOf();B.setHours(w.getHours()+c);if(l==B.valueOf()){B.setHours(w.getHours()+c+1)}}else{if(o=="day"){B.setDate(w.getDate()+c)}else{if(o=="month"){B.setMonth(w.getMonth()+c)}else{if(o=="year"){B.setFullYear(w.getFullYear()+c)}}}}}}}w=B;e=k+(w.valueOf()-p.valueOf())*d/(s.valueOf()-p.valueOf())*j}if(g){for(var r=0;r<f.length;r++){f[r].offset=z-f[r].offset}}if(m>1&&o!="millisecond"){var q=[];for(var r=0;r<f.length;r+=m){q.push({offset:f[r].offset,value:f[r].value})}f=q}if(!b&&!v&&f.length>1){var q=[];q.push({offset:0,value:undefined});for(var r=1;r<f.length;r++){q.push({offset:f[r-1].offset+(f[r].offset-f[r-1].offset)/2,value:undefined})}var t=q.length;if(t>1){q.push({offset:q[t-1].offset+(q[t-1].offset-q[t-2].offset)})}else{q.push({offset:z,value:undefined})}f=q}if(A>c){var q=[];var h=Math.round(A/m);for(var r=0;r<f.length;r++){if((r%h)==0){q.push({offset:f[r].offset,value:f[r].value})}}f=q}return f},_hasStackValueReversal:function(e,s){var g=this.seriesGroups[e];var h=-1!=g.type.indexOf("stacked");if(!h){return false}var b=-1!=g.type.indexOf("waterfall");var q=this._getDataLen(e);var t=0;var l=false;var u=[];for(var o=0;o<g.series.length;o++){u[o]=this._isSerieVisible(e,o)}for(var p=0;p<q;p++){var m=(b&&p!=0)?t:s;var d=0,r=0;var c=undefined;if(!b){l=false}for(var n=0;n<g.series.length;n++){if(!u[n]){continue}val=this._getDataValueAsNumber(p,g.series[n].dataField,e);if(isNaN(val)){continue}if(g.series[n].summary){var f=this._getDataValue(p,g.series[n].summary,e);if(undefined!==f){continue}}var k=!l?val<s:val<0;l=true;if(c==undefined){c=k}if(k!=c){return true}c=k;t+=val}}return false},_getValueAxis:function(b){var c=b==undefined?this.valueAxis:this.seriesGroups[b].valueAxis||this.valueAxis;if(!c){c=this.valueAxis={}}return c},_buildStats:function(J){var W={seriesGroups:[]};this._stats=W;for(var s=0;s<this.seriesGroups.length;s++){var C=this.seriesGroups[s];W.seriesGroups[s]={};var F=this._getXAxis(s);var n=this._getValueAxis(s);var q=this._getXAxisStats(s,F,(C.orientation!="horizontal")?J.width:J.height);var z=W.seriesGroups[s];z.isValid=true;var K=(C.orientation=="horizontal")?J.width:J.height;var M=n.logarithmicScale==true;var L=n.logarithmicScaleBase;if(isNaN(L)){L=10}var G=-1!=C.type.indexOf("stacked");var e=G&&-1!=C.type.indexOf("100");var I=-1!=C.type.indexOf("range");var S=C.type.indexOf("waterfall")!=-1;if(S&&!this._moduleWaterfall){throw"Please include 'jqxchart.waterfall.js'"}if(e){z.psums=[];z.nsums=[]}var t=NaN,O=NaN;var d=NaN,f=NaN;var r=n?n.baselineValue:NaN;if(isNaN(r)){r=M&&!e?1:0}var g=false;if(r!=0&&G){g=this._hasStackValueReversal(s,r);if(g){r=0}}if(G&&S){g=this._hasStackValueReversal(s,r)}var B=this._getDataLen(s);var c=0;var X=NaN;var m=[];if(S){for(var k=0;k<C.series.length;k++){m.push(NaN)}}var v=NaN;for(var V=0;V<B&&z.isValid;V++){if(F.rangeSelector){var h=F.dataField?this._getDataValue(V,F.dataField,s):V;if(h&&q.isDateTime){h=this._castAsDate(h,F.dateFormat)}if(q.useIndeces){h=V}if(h&&(h.valueOf()<q.min.valueOf()||h.valueOf()>q.max.valueOf())){continue}}var Y=n.minValue;var E=n.maxValue;if(n.baselineValue){if(isNaN(Y)){Y=r}else{Y=Math.min(r,Y)}if(isNaN(E)){E=r}else{E=Math.max(r,E)}}var u=0,w=0;for(var k=0;C.series&&k<C.series.length;k++){if(!this._isSerieVisible(s,k)){continue}var H=NaN,R=NaN,A=NaN;if(C.type.indexOf("candle")!=-1||C.type.indexOf("ohlc")!=-1){var b=["Open","Low","Close","High"];for(var T in b){var l=this._getDataValueAsNumber(V,C.series[k]["dataField"+b[T]],s);if(isNaN(l)){continue}A=isNaN(R)?l:Math.min(A,l);R=isNaN(R)?l:Math.max(R,l)}}else{if(I){var Z=this._getDataValueAsNumber(V,C.series[k].dataFieldFrom,s);var D=this._getDataValueAsNumber(V,C.series[k].dataFieldTo,s);R=Math.max(Z,D);A=Math.min(Z,D)}else{H=this._getDataValueAsNumber(V,C.series[k].dataField,s);if(S){if(this._isSummary(s,V)){var U=this._getDataValue(V,C.series[k].summary,s);if(U!==undefined){continue}}if(!G){if(isNaN(m[k])){m[k]=H}else{H+=m[k]}m[k]=H}else{if(!isNaN(v)){H+=v}v=H}}if(isNaN(H)||(M&&H<=0)){continue}A=R=H}}if((isNaN(E)||R>E)&&((isNaN(n.maxValue))?true:R<=n.maxValue)){E=R}if((isNaN(Y)||A<Y)&&((isNaN(n.minValue))?true:A>=n.minValue)){Y=A}if(!isNaN(H)&&G&&!S){if(H>r){u+=H}else{if(H<r){w+=H}}}}if(!e){if(!isNaN(n.maxValue)){u=Math.min(n.maxValue,u)}if(!isNaN(n.minValue)){w=Math.max(n.minValue,w)}}if(M&&e){for(var k=0;k<C.series.length;k++){if(!this._isSerieVisible(s,k)){X=0.01;continue}var H=this._getDataValueAsNumber(V,C.series[k].dataField,s);if(isNaN(H)||H<=0){X=0.01;continue}var P=u==0?0:H/u;if(isNaN(X)||P<X){X=P}}}var o=u-w;if(c<o){c=o}if(e){z.psums[V]=u;z.nsums[V]=w}if(E>O||isNaN(O)){O=E}if(Y<t||isNaN(t)){t=Y}if(u>d||isNaN(d)){d=u}if(w<f||isNaN(f)){f=w}}if(e){d=d==0?0:Math.max(d,-f);f=f==0?0:Math.min(f,-d)}if(t==O){if(!isNaN(n.minValue)&&isNaN(n.maxValue)){t=n.minValue;O=M?t*L:t+1}else{if(isNaN(n.minValue)&&!isNaN(n.maxValue)){O=n.maxValue;t=M?O/L:O-1}}}if(t==O){if(t==0){t=-1;O=1}else{if(t<0){O=0}else{if(!M){t=0}else{if(t==1){t=t/L;O=O*L}}}}}var Q={gmin:t,gmax:O,gsumP:d,gsumN:f,gbase:r,isLogAxis:M,logBase:L,minPercent:X,gMaxRange:c,isStacked:G,isStacked100:e,isWaterfall:S,hasStackValueReversal:g,valueAxis:n,valueAxisSize:K};if(Q.isStacked){if(Q.gsumN<0){Q.gmin=Math.min(Q.gmin,Q.gbase+Q.gsumN)}if(Q.gsumP>0){Q.gmax=Math.max(Q.gmax,Q.gbase+Q.gsumP)}}z.context=Q}this._mergeCommonValueAxisStats();for(var V=0;V<W.seriesGroups.length;V++){var z=W.seriesGroups[V];if(!z.isValid){continue}var N=this._calcOutputGroupStats(z.context);for(var T in N){z[T]=N[T]}delete z.context}},_mergeCommonValueAxisStats:function(){var f={};for(var e=0;e<this.seriesGroups.length;e++){if(!this._isGroupVisible(e)){continue}if(this.seriesGroups[e].valueAxis){continue}var d=this._stats.seriesGroups[e].context;f.gbase=d.gbase;if(isNaN(f.gmin)||d.gmin<f.gmin){f.gmin=d.gmin}if(isNaN(f.gmax)||d.gmax>f.gmax){f.gmax=d.gmax}if(isNaN(f.gsumP)||d.gsumP>f.gsumP){f.gsumP=d.gsumP}if(isNaN(f.gsumN)||d.gsumN<f.gsumN){f.gsumN=d.gsumN}if(isNaN(f.logBase)||d.logBase<f.logBase){f.logBase=d.logBase}if(isNaN(f.minPercent)||d.minPercent<f.minPercent){f.minPercent=d.minPercent}if(f.gsumN>0){f.gmin=Math.min(f.gmin,f.gbase+f.gsumN)}if(f.gsumP>0){f.gmax=Math.max(f.gmax,f.gbase+f.gsumP)}}for(var e=0;e<this.seriesGroups.length;e++){if(this.seriesGroups[e].valueAxis){continue}var b=this._stats.seriesGroups[e].context;for(var c in f){b[c]=f[c]}}},_calcOutputGroupStats:function(g){var c=g.gmin,f=g.gmax,A=g.gsumP,B=g.gsumN,z=g.gbase,d=g.isLogAxis,j=g.logBase,t=g.minPercent,k=g.gMaxRange,l=g.isStacked,h=g.isStacked100,e=g.isWaterfall,n=g.hasStackValueReversal,w=g.valueAxis,u=g.valueAxisSize;var s=g.valueAxis.unitInterval;if(!s){s=this._calcInterval(c,f,Math.max(u/80,2))}if(c==f){c=z;f=2*f}var i=NaN;var b=0;var q=0;if(d){if(h){i=0;var r=1;b=q=a.jqx.log(100,j);while(r>t){r/=j;b--;i++}c=Math.pow(j,b)}else{if(l&&!e){f=Math.max(f,A)}q=a.jqx._rnd(a.jqx.log(f,j),1,true);f=Math.pow(j,q);b=a.jqx._rnd(a.jqx.log(c,j),1,false);c=Math.pow(j,b)}s=j}if(c<B){B=c}if(f>A){A=f}var v=c;var o=f;if(!d){if(0!=Math.abs(o-v)%s){v=a.jqx._rnd(c,s,false);o=a.jqx._rnd(f,s,true)}}if(h&&o>100){o=100}if(h&&!d){o=(o>0)?100:0;v=(v<0)?-100:0;s=w.unitInterval;if(isNaN(s)||s<=0||s>=100){s=10}if((100%s)!=0){for(;s>=1;s--){if((100%s)==0){break}}}}if(isNaN(o)||isNaN(v)||isNaN(s)){return{}}if(isNaN(i)){i=parseInt(((o-v)/(s==0?1:s)).toFixed())}if(d&&!h){i=q-b;k=Math.pow(j,i)}if(i<1){return{}}var m={min:v,max:o,logarithmic:d,logBase:j,base:d?v:z,minPow:b,maxPow:q,sumP:A,sumN:B,mu:s,maxRange:k,intervals:i,hasStackValueReversal:n};return m},_getDataLen:function(c){var b=this.source;if(c!=undefined&&c!=-1&&this.seriesGroups[c].source){b=this.seriesGroups[c].source}if(b instanceof a.jqx.dataAdapter){b=b.records}if(b){return b.length}return 0},_getDataValue:function(b,e,d){var c=this.source;if(d!=undefined&&d!=-1){c=this.seriesGroups[d].source||c}if(c instanceof a.jqx.dataAdapter){c=c.records}if(!c||b<0||b>c.length-1){return undefined}if(a.isFunction(e)){return e(b,c)}return(e&&e!="")?c[b][e]:c[b]},_getDataValueAsNumber:function(b,e,c){var d=this._getDataValue(b,e,c);if(this._isDate(d)){return d.valueOf()}if(typeof(d)!="number"){d=parseFloat(d)}if(typeof(d)!="number"){d=undefined}return d},_isPieGroup:function(b){var c=this.seriesGroups[b];if(!c||!c.type){return false}return c.type.indexOf("pie")!=-1||c.type.indexOf("donut")!=-1},_renderPieSeries:function(e,c){var f=this._getDataLen(e);var g=this.seriesGroups[e];var m=this._calcGroupOffsets(e,c).offsets;for(var p=0;p<g.series.length;p++){var k=g.series[p];if(k.customDraw){continue}var v=this._getSerieSettings(e,p);var h=k.colorScheme||g.colorScheme||this.colorScheme;var r=this._getAnimProps(e,p);var b=r.enabled&&f<5000&&!this._isToggleRefresh&&this._isVML!=true?r.duration:0;if(a.jqx.mobile.isMobileBrowser()&&(this.renderer instanceof a.jqx.HTML5Renderer)){b=0}var t=this._get([k.minAngle,k.startAngle]);if(isNaN(t)||t<0||t>360){t=0}var z=this._get([k.maxAngle,k.endAngle]);if(isNaN(z)||z<0||z>360){z=360}var o={rect:c,minAngle:t,maxAngle:z,groupIndex:e,serieIndex:p,settings:v,items:[]};for(var u=0;u<f;u++){var n=m[p][u];if(!n.visible){continue}var q=n.fromAngle;var d=n.toAngle;var w=this.renderer.pieslice(n.x,n.y,n.innerRadius,n.outerRadius,q,b==0?d:q,n.centerOffset);this._setRenderInfo(e,p,u,{element:w});var j={displayValue:n.displayValue,itemIndex:u,visible:n.visible,x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:n.outerRadius,fromAngle:q,toAngle:d,centerOffset:n.centerOffset};o.items.push(j)}this._animatePieSlices(o,0);var l=this;this._enqueueAnimation("series",undefined,undefined,b,function(s,i,A){l._animatePieSlices(i,A)},o)}},_sliceSortFunction:function(d,c){return d.fromAngle-c.fromAngle},_animatePieSlices:function(o,c){var j;if(this._elementRenderInfo&&this._elementRenderInfo.length>o.groupIndex&&this._elementRenderInfo[o.groupIndex].series&&this._elementRenderInfo[o.groupIndex].series.length>o.serieIndex){j=this._elementRenderInfo[o.groupIndex].series[o.serieIndex]}var f=360*c;var u=this.seriesGroups[o.groupIndex];var n=this._getLabelsSettings(o.groupIndex,o.serieIndex,NaN);var m=n.visible;var b=[];for(var t=0;t<o.items.length;t++){var w=o.items[t];if(!w.visible){continue}var p=w.fromAngle;var e=w.fromAngle+c*(w.toAngle-w.fromAngle);if(j&&j[w.displayValue]){var l=j[w.displayValue].fromAngle;var d=j[w.displayValue].toAngle;p=l+(p-l)*c;e=d+(e-d)*c}b.push({index:t,from:p,to:e})}if(j){b.sort(this._sliceSortFunction)}var z=NaN;for(var t=0;t<b.length;t++){var w=o.items[b[t].index];var q=this._getRenderInfo(o.groupIndex,o.serieIndex,w.itemIndex);var p=b[t].from;var e=b[t].to;if(j){if(!isNaN(z)&&p>z){p=z}z=e;if(t==b.length-1&&e!=b[0].from){e=o.maxAngle+b[0].from}}var r=this.renderer.pieSlicePath(w.x,w.y,w.innerRadius,w.outerRadius,p,e,w.centerOffset);this.renderer.attr(q.element,{d:r});var h=this._getColors(o.groupIndex,o.serieIndex,w.itemIndex,"radialGradient",w.outerRadius);var v=o.settings;q.colors=h;q.settings=v;this.renderer.attr(q.element,{fill:h.fillColor,stroke:h.lineColor,"stroke-width":v.stroke,"fill-opacity":v.opacity,"stroke-opacity":v.opacity,"stroke-dasharray":"none"||v.dashStyle});var k=u.series[o.serieIndex];if(m){this._showPieLabel(o.groupIndex,o.serieIndex,w.itemIndex,n)}if(c==1){this._installHandlers(q.element,"pieslice",o.groupIndex,o.serieIndex,w.itemIndex)}}},_showPieLabel:function(e,f,C,p,h){var k=this._renderData[e].offsets[f][C];if(k.elementInfo.labelElement){this.renderer.removeElement(k.elementInfo.labelElement)}if(!p){p=this._getLabelsSettings(e,f,NaN)}if(!p.visible){return}var D=k.fromAngle,F=k.toAngle;var l=Math.abs(D-F);var q=l>180?1:0;if(l>360){D=0;F=360}var r=D*Math.PI*2/360;var i=F*Math.PI*2/360;var j=l/2+D;j=j%360;var E=j*Math.PI*2/360;var v;if(p.autoRotate==true){v=j<90||j>270?360-j:180-j}var u=p.linesEnabled;var o=this._showLabel(e,f,C,{x:0,y:0,width:0,height:0},"center","center",true,false,false,v);var d=p.radius||k.outerRadius+Math.max(o.width,o.height);if(this._isPercent(d)){d=parseFloat(d)/100*Math.min(this._plotRect.width,this._plotRect.height)/2}d+=k.centerOffset;if(isNaN(h)){h=0}d+=h;var z=this.seriesGroups[e];var n=z.series[f];var B=a.jqx.getNum([n.offsetX,z.offsetX,this._plotRect.width/2]);var A=a.jqx.getNum([n.offsetY,z.offsetY,this._plotRect.height/2]);var c=this._plotRect.x+B;var b=this._plotRect.y+A;var w=this._adjustTextBoxPosition(c,b,o,d,j,k.outerRadius>d,p.linesAngles!=false,p.autoRotate==true);var m={};k.elementInfo.labelElement=this._showLabel(e,f,C,{x:w.x,y:w.y,width:o.width,height:o.height},"left","top",false,false,false,v,m);if(d>k.outerRadius+5&&u!=false){var t={lineColor:k.elementInfo.colors.lineColor,stroke:k.elementInfo.settings.stroke,opacity:k.elementInfo.settings.opacity,dashStyle:k.elementInfo.settings.dashStyle};k.elementInfo.labelArrowPath=this._updateLebelArrowPath(k.elementInfo.labelArrowPath,c,b,d,k.outerRadius+h,E,p.linesAngles!=false,t,m)}},_updateLebelArrowPath:function(d,j,f,h,l,g,o,e,r){var c=a.jqx._ptrnd(j+(h-0)*Math.cos(g));var n=a.jqx._ptrnd(f-(h-0)*Math.sin(g));var b=a.jqx._ptrnd(j+(l+2)*Math.cos(g));var m=a.jqx._ptrnd(f-(l+2)*Math.sin(g));var p=[];p.push({x:r.x+r.width/2,y:r.y});p.push({x:r.x+r.width/2,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height/2});p.push({x:r.x+r.width,y:r.y+r.height/2});if(!o){p.push({x:r.x,y:r.y});p.push({x:r.x+r.width,y:r.y});p.push({x:r.x+r.width,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height})}p=p.sort(function(s,i){return a.jqx._ptdist(s.x,s.y,j,f)-a.jqx._ptdist(i.x,i.y,j,f)});p=p.sort(function(s,i){return(Math.abs(s.x-j)+Math.abs(s.y-f))-(Math.abs(i.x-j)+Math.abs(i.y-f))});for(var k=0;k<p.length;k++){p[k].x=a.jqx._ptrnd(p[k].x);p[k].y=a.jqx._ptrnd(p[k].y)}c=p[0].x;n=p[0].y;var q="M "+c+","+n+" L"+b+","+m;if(o){q="M "+c+","+n+" L"+b+","+n+" L"+b+","+m}if(d){this.renderer.attr(d,{d:q})}else{d=this.renderer.path(q,{})}this.renderer.attr(d,{fill:"none",stroke:e.lineColor,"stroke-width":e.stroke,"stroke-opacity":e.opacity,"stroke-dasharray":"none"||e.dashStyle});return d},_adjustTextBoxPosition:function(f,e,n,g,s,c,i,o){var d=s*Math.PI*2/360;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));if(o){var l=n.width;var p=n.height;var t=Math.atan(p/l)%(Math.PI*2);var u=d%(Math.PI*2);var r=0,q=0;var m=0;if(u<=t){m=l/2*Math.cos(d)}else{if(u>=t&&u<Math.PI-t){m=(p/2)*Math.sin(d)}else{if(u>=Math.PI-t&&u<Math.PI+t){m=l/2*Math.cos(d)}else{if(u>=Math.PI+t&&u<2*Math.PI-t){m=p/2*Math.sin(d)}else{if(u>=2*Math.PI-t&&u<2*Math.PI){m=l/2*Math.cos(d)}}}}}g+=Math.abs(m)+3;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));k-=n.width/2;j-=n.height/2;return{x:k,y:j}}if(!c){if(!i){if(s>=0&&s<45||s>=315&&s<360){j-=n.height/2}else{if(s>=45&&s<135){j-=n.height;k-=n.width/2}else{if(s>=135&&s<225){j-=n.height/2;k-=n.width}else{if(s>=225&&s<315){k-=n.width/2}}}}}else{if(s>=90&&s<270){j-=n.height/2;k-=n.width}else{j-=n.height/2}}}else{k-=n.width/2;j-=n.height/2}return{x:k,y:j}},_isColumnType:function(b){return(b.indexOf("column")!=-1||b.indexOf("waterfall")!=-1)},_getColumnGroupsCount:function(c){var e=0;c=c||"vertical";var f=this.seriesGroups;for(var d=0;d<f.length;d++){var b=f[d].orientation||"vertical";if(this._isColumnType(f[d].type)&&b==c){e++}}if(this.columnSeriesOverlap){e=1}return e},_getColumnGroupIndex:function(g){var b=0;var c=this.seriesGroups[g].orientation||"vertical";for(var e=0;e<g;e++){var f=this.seriesGroups[e];var d=f.orientation||"vertical";if(this._isColumnType(f.type)&&d==c){b++}}return b},_renderAxisBands:function(e,C,K){var z=K?this._getXAxis(e):this._getValueAxis(e);var t=this.seriesGroups[e];var v=K?undefined:t.bands;if(!v){for(var P=0;P<e;P++){var n=K?this._getXAxis(P):this._getValueAxis(P);if(n==z){return}}v=z.bands}if(!a.isArray(v)){return}var o=C;var V=t.orientation=="horizontal";if(V){o={x:C.y,y:C.x,width:C.height,height:C.width}}this._calcGroupOffsets(e,o);for(var P=0;P<v.length;P++){var c=v[P];var T=this._get([c.minValue,c.from]);var w=this._get([c.maxValue,c.to]);var s=K?this.getXAxisDataPointOffset(T,e):this.getValueAxisDataPointOffset(T,e);var U=K?this.getXAxisDataPointOffset(w,e):this.getValueAxisDataPointOffset(w,e);if(isNaN(s)||isNaN(U)){continue}var A=Math.abs(s-U);var J;if(t.polar||t.spider){var r=this._renderData[e];var d=r.polarCoords;if(!K){var F=this._toPolarCoord(d,C,C.x,r.baseOffset);var E=this._toPolarCoord(d,C,C.x,s);var D=this._toPolarCoord(d,C,C.x,U);var q=a.jqx._ptdist(F.x,F.y,E.x,E.y);var p=a.jqx._ptdist(F.x,F.y,D.x,D.y);var h=Math.round(-d.startAngle*360/(2*Math.PI));var Q=Math.round(-d.endAngle*360/(2*Math.PI));if(h>Q){var I=h;h=Q;Q=I}if(t.spider){var G=r.xAxis.offsetAngles;var H="";var M=[p,q];var B=G;if(d.isClosedCircle){B=a.extend([],G);B.push(B[0])}for(var L in M){for(var N=0;N<B.length;N++){var S=L==0?N:G.length-N-1;var l=d.x+M[L]*Math.cos(B[S]);var g=d.y+M[L]*Math.sin(B[S]);if(H==""){H+="M "}else{H+=" L"}H+=a.jqx._ptrnd(l)+","+a.jqx._ptrnd(g)}if(L==0){var l=d.x+M[1]*Math.cos(B[S]);var g=d.y+M[1]*Math.sin(B[S]);H+=" L"+a.jqx._ptrnd(l)+","+a.jqx._ptrnd(g)}}H+=" Z";J=this.renderer.path(H)}else{J=this.renderer.pieslice(d.x,d.y,q,p,h,Q)}}else{if(t.spider){p1=this.getPolarDataPointOffset(T,this._stats.seriesGroups[e].max,e);p2=this.getPolarDataPointOffset(w,this._stats.seriesGroups[e].max,e);var H="M "+d.x+","+d.y;H+=" L "+p1.x+","+p1.y;H+=" L "+p2.x+","+p2.y;J=this.renderer.path(H)}else{var f={};var m={x:Math.min(s,U),y:C.y,width:A,height:C.height};this._columnAsPieSlice(f,C,d,m);J=f.element}}}else{var b={x:Math.min(s,U),y:o.y,width:A,height:o.height};if(!K){b={x:o.x,y:Math.min(s,U),width:o.width,height:A}}if(V){var I=b.x;b.x=b.y;b.y=I;I=b.width;b.width=b.height;b.height=I}if(A==0||A==1){J=this.renderer.line(a.jqx._ptrnd(b.x),a.jqx._ptrnd(b.y),a.jqx._ptrnd(b.x+(V?0:b.width)),a.jqx._ptrnd(b.y+(V?b.height:0)))}else{J=this.renderer.rect(b.x,b.y,b.width,b.height)}}var W=c.fillColor||c.color||"#AAAAAA";var R=c.lineColor||W;var u=c.lineWidth;if(isNaN(u)){u=1}var O=c.opacity;if(isNaN(O)||O<0||O>1){O=1}this.renderer.attr(J,{fill:W,"fill-opacity":O,stroke:R,"stroke-opacity":O,"stroke-width":u,"stroke-dasharray":c.dashStyle})}},_getColumnGroupWidth:function(m,h,o){var e=this.seriesGroups[m];var l=e.type.indexOf("stacked")!=-1;var d=l?1:e.series.length;var k=this._getColumnGroupsCount(e.orientation);if(isNaN(k)||0==k){k=1}var n=h.rangeLength>=1?h.itemWidth:o*0.9;var c=e.columnsMinWidth;if(isNaN(c)){c=1}if(!isNaN(e.columnsMaxWidth)){c=Math.min(e.columnsMaxWidth,c)}if(c>n&&h.length>0){n=Math.max(n,o*0.9/h.length)}var i=c;if(!l){var f=e.seriesGapPercent;if(isNaN(f)||f<0){f=10}f/=100;var b=c;b*=(1+f);i+=e.series.length*b}var j=Math.max(n/k,i);return{requiredWidth:i,availableWidth:n,targetWidth:j}},_getColumnSerieWidthAndOffset:function(d,e){var m=this.seriesGroups[d];var u=m.series[e];var c=m.orientation=="horizontal";var b=this._plotRect;if(c){b={x:b.y,y:b.x,width:b.height,height:b.width}}var v=this._calcGroupOffsets(d,b);if(!v||v.xoffsets.length==0){return}var l=true;var w=this._getColumnGroupsCount(m.orientation);if(m.type=="candlestick"||m.type=="ohlc"){w=1}var q=this._getColumnGroupIndex(d);var r=this._getColumnGroupWidth(d,v.xoffsets,c?b.height:b.width);var h=0;var f=r.targetWidth;if(this.columnSeriesOverlap==true||(Math.round(f)>Math.round(r.availableWidth/w))){w=1;q=0}if(l){h-=(f*w)/2}h+=f*q;var D=m.columnsGapPercent;if(D<=0){D=0}if(isNaN(D)||D>=100){D=25}D/=100;var k=f*D;if(k+r.requiredWidth>r.targetWidth){k=Math.max(0,r.targetWidth-r.requiredWidth)}if(Math.round(f)>Math.round(r.availableWidth)){k=0}f-=k;h+=k/2;var z=m.seriesGapPercent;if(isNaN(z)||z<0){z=10}var n=m.type.indexOf("stacked")!=-1;var t=f;if(!n){t/=m.series.length}var A=this._get([m.seriesGap,(f*z/100)/(m.series.length-1)]);if(m.polar==true||m.spider==true||n||m.series.length<=1){A=0}var o=A*(m.series.length-1);if(m.series.length>1&&o>f-m.series.length*1){o=f-m.series.length*1;A=o/Math.max(1,(m.series.length-1))}var g=t-(o/m.series.length);var C=0;var i=m.columnsMaxWidth;if(!isNaN(i)){if(g>i){C=g-i;g=i}}var B=C/2;var j=0;if(!n){var E=(f-(g*m.series.length)-o)/2;var p=Math.max(0,e);j=E+g*e+p*A}else{j=C/2}return{width:g,offset:h+j}},_renderColumnSeries:function(f,c){var j=this.seriesGroups[f];if(!j.series||j.series.length==0){return}var h=this._getDataLen(f);var e=j.orientation=="horizontal";var A=c;if(e){A={x:c.y,y:c.x,width:c.height,height:c.width}}var p=this._calcGroupOffsets(f,A);if(!p||p.xoffsets.length==0){return}var m;if(j.polar==true||j.spider==true){m=this._getPolarAxisCoords(f,A)}var r={groupIndex:f,rect:c,vertical:!e,seriesCtx:[],renderData:p,polarAxisCoords:m};r.columnGroupWidth=this._getColumnGroupWidth(f,p.xoffsets,e?A.height:A.width);var g=this._getGroupGradientType(f);for(var t=0;t<j.series.length;t++){var n=j.series[t];if(n.customDraw){continue}var w=n.dataField;var u=this._getAnimProps(f,t);var b=u.enabled&&!this._isToggleRefresh&&p.xoffsets.length<100?u.duration:0;var k=this._getColumnSerieWidthAndOffset(f,t);var q=this._isSerieVisible(f,t);var l=this._getSerieSettings(f,t);var B=this._getColors(f,t,NaN,this._getGroupGradientType(f),4);var d=[];if(a.isFunction(n.colorFunction)&&!m){for(var z=p.xoffsets.first;z<=p.xoffsets.last;z++){d.push(this._getColors(f,t,z,g,4))}}var v={seriesIndex:t,serieColors:B,itemsColors:d,settings:l,columnWidth:k.width,xAdjust:k.offset,isVisible:q};r.seriesCtx.push(v)}this._animColumns(r,b==0?1:0);var o=this;this._enqueueAnimation("series",undefined,undefined,b,function(s,i,C){o._animColumns(i,C)},r)},_getPercent:function(d,c,b,e){if(isNaN(d)){d=c}if(!isNaN(b)&&!isNaN(d)&&d<b){d=b}if(!isNaN(e)&&!isNaN(d)&&d>e){d=e}if(isNaN(d)){return NaN}return d},_getColumnVOffsets:function(n,j,e,D,u,c){var p=this.seriesGroups[j];var H=this._getPercent(p.columnsTopWidthPercent,100,0,100);var v=this._getPercent(p.columnsBottomWidthPercent,100,0,100);if(H==0&&v==0){v=100}var J=this._getPercent(p.columnsNeckHeightPercent,NaN,0,100)/100;var E=this._getPercent(p.columnsNeckWidthPercent,100,0,100)/100;var r=[];var I=NaN;for(var q=0;q<e.length;q++){var N=e[q];var k=N.seriesIndex;var G=p.series[k];var o=n.offsets[k][D].from;var P=n.offsets[k][D].to;var z=n.xoffsets.data[D];var g;var h=N.isVisible;if(!h){P=o}var b=this._elementRenderInfo;if(h&&b&&b.length>j&&b[j].series.length>k){var F=n.xoffsets.xvalues[D];g=b[j].series[k][F];if(g&&!isNaN(g.from)&&!isNaN(g.to)){o=g.from+(o-g.from)*c;P=g.to+(P-g.to)*c;z=g.xoffset+(z-g.xoffset)*c}}if(!g){P=o+(P-o)*(u?1:c)}if(isNaN(o)){o=isNaN(I)?n.baseOffset:I}if(!isNaN(P)&&u){I=P}else{I=o}if(isNaN(P)){P=o}var C={from:o,to:P,xOffset:z};if(H!=100||v!=100){C.funnel=true;C.toWidthPercent=H;C.fromWidthPercent=v}r.push(C)}if(u&&r.length>1&&!(this._elementRenderInfo&&this._elementRenderInfo.length>j)){var l=0,m=0,K=-Infinity,w=Infinity,L=Infinity,B=-Infinity;for(var M=0;M<r.length;M++){var N=e[M];if(N.isVisible){if(r[M].to>=r[M].from){m+=r[M].to-r[M].from;L=Math.min(L,r[M].from);B=Math.max(B,r[M].to)}else{l+=r[M].from-r[M].to;K=Math.max(K,r[M].from);w=Math.min(w,r[M].to)}}}var O=l;var t=m;l*=c;m*=c;var d=0,f=0;for(var M=0;M<r.length;M++){if(r[M].to>=r[M].from){var A=r[M].to-r[M].from;if(A+f>m){A=Math.max(0,m-f);r[M].to=r[M].from+A}if(H!=100||v!=100){r[M].funnel=true;if(!isNaN(J)&&t*J>=f){r[M].fromWidthPercent=E*100}else{r[M].fromWidthPercent=(Math.abs(r[M].from-L)/t)*(H-v)+v}if(!isNaN(J)&&t*J>=(0+(f+A))){r[M].toWidthPercent=E*100}else{r[M].toWidthPercent=(Math.abs(r[M].to-L)/t)*(H-v)+v}}f+=A}else{var A=r[M].from-r[M].to;if(A+d>l){A=Math.max(0,l-d);r[M].to=r[M].from-A}if(H!=100||v!=100){r[M].funnel=true;if(!isNaN(J)&&O*J>=d){r[M].fromWidthPercent=E*100}else{r[M].fromWidthPercent=(Math.abs(r[M].from-K)/O)*(H-v)+v}if(!isNaN(J)&&O*J>=(0+(d+A))){r[M].toWidthPercent=E*100}else{r[M].toWidthPercent=(Math.abs(r[M].to-K)/O)*(H-v)+v}}d+=A}}}return r},_columnAsPieSlice:function(d,k,m,o){var e=this._toPolarCoord(m,k,o.x,o.y);var f=this._toPolarCoord(m,k,o.x,o.y+o.height);var l=a.jqx._ptdist(m.x,m.y,f.x,f.y);var i=a.jqx._ptdist(m.x,m.y,e.x,e.y);var c=k.width;var n=Math.abs(m.startAngle-m.endAngle)*180/Math.PI;var b=-((o.x-k.x)*n)/c;var h=-((o.x+o.width-k.x)*n)/c;var j=m.startAngle;j=360*j/(Math.PI*2);b-=j;h-=j;if(d){if(d.element!=undefined){var g=this.renderer.pieSlicePath(m.x,m.y,l,i,h,b,0);g+=" Z";this.renderer.attr(d.element,{d:g})}else{d.element=this.renderer.pieslice(m.x,m.y,l,i,h,b,0)}}return{fromAngle:h,toAngle:b,innerRadius:l,outerRadius:i}},_setRenderInfo:function(e,b,d,c){this._renderData[e].offsets[b][d].elementInfo=c},_getRenderInfo:function(d,b,c){return this._renderData[d].offsets[b][c].elementInfo||{}},_animColumns:function(ai,d){var p=this;var q=ai.groupIndex;var B=this.seriesGroups[q];var v=ai.renderData;var aa=B.type.indexOf("waterfall")!=-1;var G=this._getXAxis(q);var I=B.type.indexOf("stacked")!=-1;var e=ai.polarAxisCoords;var A=this._getGroupGradientType(q);var s=ai.columnGroupWidth.targetWidth;var z=-1;for(var ab=0;ab<B.series.length;ab++){if(this._isSerieVisible(q,ab)){z=ab;break}}var aj=NaN,t=NaN;for(var ab=0;ab<ai.seriesCtx.length;ab++){var ah=ai.seriesCtx[ab];if(isNaN(aj)||aj>ah.xAdjust){aj=ah.xAdjust}if(isNaN(t)||t<ah.xAdjust+ah.columnWidth){t=ah.xAdjust+ah.columnWidth}}var r=Math.abs(t-aj);var D=this._get([B.columnsGapPercent,25])/100;if(isNaN(D)<0||D>=1){D=0.25}var f=D*r;var Z=ai.renderData.xoffsets;var S=-1;var O={};var R=B.skipOverlappingPoints==true;for(var ad=Z.first;ad<=Z.last;ad++){var V=Z.data[ad];if(isNaN(V)){continue}if(S!=-1&&Math.abs(V-S)<(r-1+f)&&R){continue}else{S=V}var F=this._getColumnVOffsets(v,q,ai.seriesCtx,ad,I,d);var L=false;if(aa){for(var C=0;C<B.series.length;C++){if(B.series[C].summary&&Z.xvalues[ad][B.series[C].summary]){L=true}}}for(var C=0;C<ai.seriesCtx.length;C++){var ah=ai.seriesCtx[C];var m=ah.seriesIndex;var E=B.series[m];var w=F[C].from;var ak=F[C].to;var K=F[C].xOffset;var g=(ai.vertical?ai.rect.x:ai.rect.y)+ah.xAdjust;var ae=ah.settings;var W=ah.itemsColors.length!=0?ah.itemsColors[ad-v.xoffsets.first]:ah.serieColors;var h=this._isSerieVisible(q,m);if(!h){continue}var V=a.jqx._ptrnd(g+K);var Q={x:V,width:ah.columnWidth};if(F[C].funnel){Q.fromWidthPercent=F[C].fromWidthPercent;Q.toWidthPercent=F[C].toWidthPercent}var k=true;if(ai.vertical){Q.y=w;Q.height=ak-w;if(Q.height<0){Q.y+=Q.height;Q.height=-Q.height;k=false}}else{Q.x=w<ak?w:ak;Q.width=Math.abs(w-ak);k=w-ak<0;Q.y=V;Q.height=ah.columnWidth}var n=w-ak;if(isNaN(n)){continue}n=Math.abs(n);var H=undefined;var c=p._getRenderInfo(q,m,ad);var u=c.element;var P=c.labelElement;var N=u==undefined;if(P){p.renderer.removeElement(P);P=undefined}if(!e){if(F[C].funnel){var Y=this._getTrapezoidPath(a.extend({},Q),ai.vertical,k);if(N){u=this.renderer.path(Y,{})}else{this.renderer.attr(u,{d:Y})}}else{if(N){u=this.renderer.rect(Q.x,Q.y,ai.vertical?Q.width:0,ai.vertical?0:Q.height)}else{if(ai.vertical==true){this.renderer.attr(u,{x:Q.x,y:Q.y,height:n})}else{this.renderer.attr(u,{x:Q.x,y:Q.y,width:n})}}}}else{var l={element:u};H=this._columnAsPieSlice(l,ai.rect,e,Q);u=l.element;var W=this._getColors(q,m,undefined,"radialGradient",H.outerRadius)}if(n<1&&(d!=1||e)){this.renderer.attr(u,{display:"none"})}else{this.renderer.attr(u,{display:"block"})}if(N){this.renderer.attr(u,{fill:W.fillColor,"fill-opacity":ae.opacity,"stroke-opacity":ae.opacity,stroke:W.lineColor,"stroke-width":ae.stroke,"stroke-dasharray":ae.dashStyle})}if(P){this.renderer.removeElement(P)}if(!h||(n==0&&d<1)){c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);continue}if(aa&&this._get([E.showWaterfallLines,B.showWaterfallLines])!=false){if(!I||(I&&C==z)){var ac=I?-1:C;if(d==1&&!isNaN(v.offsets[C][ad].from)&&!isNaN(v.offsets[C][ad].to)){var M=O[ac];if(M!=undefined){var ag={x:M.x,y:a.jqx._ptrnd(M.y)};var af={x:V,y:ag.y};var T=B.columnsTopWidthPercent/100;if(isNaN(T)){T=1}else{if(T>1||T<0){T=1}}var X=B.columnsBottomWidthPercent/100;if(isNaN(X)){X=1}else{if(X>1||X<0){X=1}}var o=ai.vertical?Q.width:Q.height;ag.x=ag.x-o/2+o/2*T;if(L){var b=o*T/2;af.x=af.x+o/2-(G.flip?-b:b)}else{var b=o*X/2;af.x=af.x+o/2-(G.flip?-b:b)}if(!ai.vertical){this._swapXY([ag]);this._swapXY([af])}this.renderer.line(ag.x,ag.y,af.x,af.y,{stroke:M.color,"stroke-width":ae.stroke,"stroke-opacity":ae.opacity,"fill-opacity":ae.opacity,"stroke-dasharray":ae.dashStyle})}}}if(d==1&&n!=0){O[I?-1:C]={y:ak,x:(ai.vertical?Q.x+Q.width:Q.y+Q.height),color:W.lineColor}}}if(e){var U=this._toPolarCoord(e,ai.rect,Q.x+Q.width/2,Q.y);var o=this._showLabel(q,m,ad,Q,undefined,undefined,true);var J=H.outerRadius+10;labelOffset=this._adjustTextBoxPosition(e.x,e.y,o,J,(H.fromAngle+H.toAngle)/2,true,false,false);P=this._showLabel(q,m,ad,{x:labelOffset.x,y:labelOffset.y},undefined,undefined,false,false,false)}else{P=this._showLabel(q,m,ad,Q,undefined,undefined,false,false,k)}c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);if(d==1){this._installHandlers(u,"column",q,m,ad)}}}},_getTrapezoidPath:function(g,h,f){var l="";var b=g.fromWidthPercent/100;var c=g.toWidthPercent/100;if(!h){var e=g.width;g.width=g.height;g.height=e;e=g.x;g.x=g.y;g.y=e}var j=g.x+g.width/2;var k=[{x:j-g.width*(!f?b:c)/2,y:g.y+g.height},{x:j-g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?b:c)/2,y:g.y+g.height}];if(!h){this._swapXY(k)}l+="M "+a.jqx._ptrnd(k[0].x)+","+a.jqx._ptrnd(k[0].y);for(var d=1;d<k.length;d++){l+=" L "+a.jqx._ptrnd(k[d].x)+","+a.jqx._ptrnd(k[d].y)}l+=" Z";return l},_swapXY:function(d){for(var c=0;c<d.length;c++){var b=d[c].x;d[c].x=d[c].y;d[c].y=b}},_renderCandleStickSeries:function(e,c,t){var m=this;var h=m.seriesGroups[e];if(!h.series||h.series.length==0){return}var d=h.orientation=="horizontal";var v=c;if(d){v={x:c.y,y:c.x,width:c.height,height:c.width}}var n=m._calcGroupOffsets(e,v);if(!n||n.xoffsets.length==0){return}var w=v.width;var k;if(h.polar||h.spider){k=m._getPolarAxisCoords(e,v);w=2*k.r}var g=m._alignValuesWithTicks(e);var f=m._getGroupGradientType(e);var i=[];for(var p=0;p<h.series.length;p++){i[p]=m._getColumnSerieWidthAndOffset(e,p)}for(var p=0;p<h.series.length;p++){if(!this._isSerieVisible(e,p)){continue}var u=m._getSerieSettings(e,p);var l=h.series[p];if(l.customDraw){continue}var j=a.isFunction(l.colorFunction)?undefined:m._getColors(e,p,NaN,f);var o={rect:c,inverse:d,groupIndex:e,seriesIndex:p,symbolType:l.symbolType,symbolSize:l.symbolSize,"fill-opacity":u.opacity,"stroke-opacity":u.opacity,"stroke-width":u.stroke,"stroke-dasharray":u.dashStyle,gradientType:f,colors:j,renderData:n,polarAxisCoords:k,columnsInfo:i,isOHLC:t,items:[],self:m};var q=m._getAnimProps(e,p);var b=q.enabled&&!m._isToggleRefresh&&n.xoffsets.length<5000?q.duration:0;m._animCandleStick(o,0);var r;m._enqueueAnimation("series",undefined,undefined,b,function(A,s,z){m._animCandleStick(s,z)},o)}},_animCandleStick:function(t,b){var q=["Open","Low","Close","High"];var e=t.columnsInfo[t.seriesIndex].width;var g=t.self.seriesGroups[t.groupIndex];var v=t.renderData.xoffsets;var E=-1;var n=Math.abs(v.data[v.last]-v.data[v.first]);n*=b;var c=NaN,r=NaN;for(var z=0;z<t.columnsInfo.length;z++){var w=t.columnsInfo[z];if(isNaN(c)||c>w.offset){c=w.offset}if(isNaN(r)||r<w.offset+w.width){r=w.offset+w.width}}var m=Math.abs(r-c);var B=g.skipOverlappingPoints!=false;for(var A=v.first;A<=v.last;A++){var l=v.data[A];if(isNaN(l)){continue}if(E!=-1&&Math.abs(l-E)<m&&B){continue}var C=Math.abs(v.data[A]-v.data[v.first]);if(C>n){break}E=l;var D=t.items[A]=t.items[A]||{};for(var z in q){var F=t.self._getDataValueAsNumber(A,g.series[t.seriesIndex]["dataField"+q[z]],t.groupIndex);if(isNaN(F)){break}var k=t.renderData.offsets[t.seriesIndex][A][q[z]];if(isNaN(k)){break}D[q[z]]=k}l+=t.inverse?t.rect.y:t.rect.x;if(t.polarAxisCoords){var s=this._toPolarCoord(t.polarAxisCoords,this._plotRect,l,k);l=s.x;k=s.y}l=a.jqx._ptrnd(l);for(var f in q){D[f]=a.jqx._ptrnd(D[f])}var h=t.colors;if(!h){h=t.self._getColors(t.groupIndex,t.seriesIndex,A,t.gradientType)}if(!t.isOHLC){var u=D.lineElement;if(!u){u=t.inverse?this.renderer.line(D.Low,l,D.High,l):this.renderer.line(l,D.Low,l,D.High);this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}var p=D.stickElement;l-=e/2;if(!p){var d=h.fillColor;if(D.Close<=D.Open&&h.fillColorAlt){d=h.fillColorAlt}p=t.inverse?this.renderer.rect(Math.min(D.Open,D.Close),l,Math.abs(D.Close-D.Open),e):this.renderer.rect(l,Math.min(D.Open,D.Close),e,Math.abs(D.Close-D.Open));this.renderer.attr(p,{fill:d,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.stickElement=p}if(b==1){this._installHandlers(p,"column",t.groupIndex,t.seriesIndex,A)}}else{var o="M"+l+","+D.Low+" L"+l+","+D.High+" M"+(l-e/2)+","+D.Open+" L"+l+","+D.Open+" M"+(l+e/2)+","+D.Close+" L"+l+","+D.Close;if(t.inverse){o="M"+D.Low+","+l+" L"+D.High+","+l+" M"+D.Open+","+(l-e/2)+" L"+D.Open+","+l+" M"+D.Close+","+l+" L"+D.Close+","+(l+e/2)}var u=D.lineElement;if(!u){u=this.renderer.path(o,{});this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}if(b==1){this._installHandlers(u,"column",t.groupIndex,t.seriesIndex,A)}}}},_renderScatterSeries:function(e,D,F){var u=this.seriesGroups[e];if(!u.series||u.series.length==0){return}var f=u.type.indexOf("bubble")!=-1;var v=u.orientation=="horizontal";var m=D;if(v){m={x:D.y,y:D.x,width:D.height,height:D.width}}var n=this._calcGroupOffsets(e,m);if(!n||n.xoffsets.length==0){return}var N=m.width;var c;if(u.polar||u.spider){c=this._getPolarAxisCoords(e,m);N=2*c.r}var V=this._alignValuesWithTicks(e);var t=this._getGroupGradientType(e);if(!F){F="to"}for(var g=0;g<u.series.length;g++){var T=this._getSerieSettings(e,g);var K=u.series[g];if(K.customDraw){continue}var A=K.dataField;var l=a.isFunction(K.colorFunction);var L=this._getColors(e,g,NaN,t);var U=NaN,z=NaN;if(f){for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(C)!="number"){throw"Invalid radiusDataField value at ["+S+"]"}if(!isNaN(C)){if(isNaN(U)||C<U){U=C}if(isNaN(z)||C>z){z=C}}}}var j=K.minRadius||K.minSymbolSize;if(isNaN(j)){j=N/50}var E=K.maxRadius||K.maxSymbolSize;if(isNaN(E)){E=N/25}if(j>E){E=j}var M=K.radius;if(isNaN(M)&&!isNaN(K.symbolSize)){M=(K.symbolType=="circle")?K.symbolSize/2:K.symbolSize}else{M=5}var G=this._getAnimProps(e,g);var B=G.enabled&&!this._isToggleRefresh&&n.xoffsets.length<5000?G.duration:0;var w={groupIndex:e,seriesIndex:g,symbolType:K.symbolType,symbolSize:K.symbolSize,"fill-opacity":T.opacity,"stroke-opacity":T.opacity,"stroke-width":T.stroke,"stroke-width-symbol":T.strokeSymbol,"stroke-dasharray":T.dashStyle,items:[],polarAxisCoords:c};var o=undefined;for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,A,e);if(typeof(C)!="number"){continue}var J=n.xoffsets.data[S];var H=n.xoffsets.xvalues[S];var I=n.offsets[g][S][F];if(I<m.y||I>m.y+m.height){continue}if(isNaN(J)||isNaN(I)){continue}if(v){var Q=J;J=I;I=Q+D.y}else{J+=D.x}if(!l&&o&&this.enableSampling&&a.jqx._ptdist(o.x,o.y,J,I)<1){continue}o={x:J,y:I};var O=M;if(f){var p=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(p)!="number"){continue}O=j+(E-j)*(p-U)/Math.max(1,z-U);if(isNaN(O)){O=j}}n.offsets[g][S].radius=O;var k=NaN,P=NaN;var q=0;var b=this._elementRenderInfo;if(H!=undefined&&b&&b.length>e&&b[e].series.length>g){var d=b[e].series[g][H];if(d&&!isNaN(d.to)){k=d.to;P=d.xoffset;q=M;if(v){var Q=P;P=k;k=Q+D.y}else{P+=D.x}if(f){q=j+(E-j)*(d.valueRadius-U)/Math.max(1,z-U);if(isNaN(q)){q=j}}}}if(l){L=this._getColors(e,g,S,t)}w.items.push({from:q,to:O,itemIndex:S,fill:L.fillColor,stroke:L.lineColor,x:J,y:I,xFrom:P,yFrom:k})}this._animR(w,0);var h=this;var R;this._enqueueAnimation("series",undefined,undefined,B,function(s,i,r){h._animR(i,r)},w)}},_animR:function(o,g){var j=o.items;var p=o.symbolType||"circle";var c=o.symbolSize;for(var e=0;e<j.length;e++){var n=j[e];var l=n.x;var k=n.y;var b=Math.round((n.to-n.from)*g+n.from);if(!isNaN(n.yFrom)){k=n.yFrom+(k-n.yFrom)*g}if(!isNaN(n.xFrom)){l=n.xFrom+(l-n.xFrom)*g}if(o.polarAxisCoords){var m=this._toPolarCoord(o.polarAxisCoords,this._plotRect,l,k);l=m.x;k=m.y}l=a.jqx._ptrnd(l);k=a.jqx._ptrnd(k);b=a.jqx._ptrnd(b);var f=this._getRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex);var d=f.element;var h=f.labelElement;if(p=="circle"){if(!d){d=this.renderer.circle(l,k,b);this.renderer.attr(d,{fill:n.fill,"fill-opacity":o["fill-opacity"],"stroke-opacity":o["fill-opacity"],stroke:n.stroke,"stroke-width":o["stroke-width"],"stroke-dasharray":o["stroke-dasharray"]})}if(this._isVML){this.renderer.updateCircle(d,undefined,undefined,b)}else{this.renderer.attr(d,{r:b,cy:k,cx:l})}}else{if(d){this.renderer.removeElement(d)}d=this._drawSymbol(p,l,k,n.fill,o["fill-opacity"],n.stroke,o["stroke-opacity"]||o["fill-opacity"],o["stroke-width-symbol"],o["stroke-dasharray"],c||b)}if(h){this.renderer.removeElement(h)}h=this._showLabel(o.groupIndex,o.seriesIndex,n.itemIndex,{x:l-b,y:k-b,width:2*b,height:2*b});if(g>=1){this._installHandlers(d,"circle",o.groupIndex,o.seriesIndex,n.itemIndex)}this._setRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex,{element:d,labelElement:h})}},_showMultiSeriesToolTip:function(n,l,e){var s=this;var w='<div style="text-align:left">';var h="";for(var B=0;B<s.seriesGroups.length;B++){if(s._isPieGroup(B)){continue}var j=s._getXAxis(B);var c=s._getValueAxis(B);var i=s.seriesGroups[B];var f=this._getAxisSettings(j);var A=f.toolTipFormatSettings;var d=f.toolTipFormatFunction;var q=s._getDataValue(e,j.dataField,B);if(j.dataField==undefined||j.dataField==""){q=e}if(j.type=="date"){q=s._castAsDate(q,(A?A.dateFormat:undefined)||j.dateFormat)}if(!d&&!A&&j.type=="date"){d=this._getDefaultDTFormatFn(j.baseUnit||"day")}var r=(j.displayText||j.dataField||"");if(r!=""){r+=": "}var b=r+s._formatValue(q,A,d,B,v,e);if(h!=b){if(h!=""){w+="<br />"}w+=b+"<br /><br />";h=b}for(var v=0;v<i.series.length;v++){var t=i.series[v];if(i.showToolTips==false||t.showToolTips==false){continue}if(!s._isSerieVisible(B,v)){continue}var g=s._get([t.toolTipFormatSettings,i.toolTipFormatSettings,c.toolTipFormatSettings,s.toolTipFormatSettings]);var p=s._get([t.toolTipFormatFunction,i.toolTipFormatFunction,c.toolTipFormatFunction,s.toolTipFormatFunction]);var o=s._getFormattedValue(B,v,e,g,p);var k=s._getColors(B,v,e);w+="<span style='color:"+k.lineColor+";'>"+o+"</span><br />\n"}}var z=this._get([s.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var C=this._get([s.toolTipBackground,"#FFFFFF"]);var D=this._get([s.toolTipLineColor,s._defaultLineColor]);var m=this._get([s.toolTipOpacity,1]);w+="</div>";var u=this.getItemCoord(s._ttEl.gidx,s._ttEl.sidx,s._ttEl.iidx);s._createTooltip(u,s.seriesGroups[s._ttEl.gidx],w,{css:z,fill:C,stroke:D,fillOpacity:m,symbolSize:3})},_showToolTip:function(J,H,n,e,b){var h=this;var w=h._getXAxis(n);var l=h._getValueAxis(n);if(h._ttEl&&n==h._ttEl.gidx&&e==h._ttEl.sidx&&b==h._ttEl.iidx){return}var s=h.seriesGroups[n];var g=s.series[e];var F=h.enableCrosshairs;if(h._pointMarker){J=parseInt(h._pointMarker.x+5);H=parseInt(h._pointMarker.y-5)}else{F=false}var W=F&&h.showToolTips==false;J=a.jqx._ptrnd(J);H=a.jqx._ptrnd(H);var m=h._ttEl==undefined;if(s.showToolTips==false||g.showToolTips==false){return}if(!h._ttEl){h._ttEl={}}h._ttEl.sidx=e;h._ttEl.gidx=n;h._ttEl.iidx=b;var f=0;for(var S=0;S<h.seriesGroups.length;S++){for(var R=0;R<h.seriesGroups[S].series.length;R++){f++}}if(h.showToolTipsOnAllSeries&&!h._isPieGroup(n)&&f>1){h._showMultiSeriesToolTip(J,H,b);return}var z=h._get([g.toolTipFormatSettings,s.toolTipFormatSettings,l.toolTipFormatSettings,h.toolTipFormatSettings]);var E=h._get([g.toolTipFormatFunction,s.toolTipFormatFunction,l.toolTipFormatFunction,h.toolTipFormatFunction]);var N=h._getColors(n,e,b);var d=h._getDataValue(b,w.dataField,n);if(w.dataField==undefined||w.dataField==""){d=b}if(w.type=="date"){d=h._castAsDate(d,(z?z.dateFormat:undefined)||w.dateFormat)}var C="";if(a.isFunction(E)){var L={};var v=0;for(var k in g){if(k.indexOf("dataField")==0){L[k.substring(9,k.length).toLowerCase()]=h._getDataValue(b,g[k],n);v++}}if(v==0){L=h._getDataValue(b,undefined,n)}else{if(v==1){L=L[""]}}C=E(L,b,g,s,d,w)}else{C=h._getFormattedValue(n,e,b,z,E);var K=this._getAxisSettings(w);var O=K.toolTipFormatSettings;var T=K.toolTipFormatFunction;if(!T&&!O&&w.type=="date"){T=this._getDefaultDTFormatFn(w.baseUnit||"day")}var o=h._formatValue(d,O,T,n,e,b);if(!h._isPieGroup(n)){var M=(w.displayText||w.dataField||"");if(M.length>0){C=M+": "+o+"<br>"+C}else{C=o+"<br>"+C}}else{d=h._getDataValue(b,g.displayText||g.dataField,n);o=h._formatValue(d,O,T,n,e,b);C=o+": "+C}}rect=h.renderer.getRect();if(F){var I=a.jqx._ptrnd(h._pointMarker.x);var G=a.jqx._ptrnd(h._pointMarker.y);var B=h.crosshairsColor||h._defaultLineColor;if(s.polar||s.spider){var D=this._getPolarAxisCoords(n,this._plotRect);var c=a.jqx._ptdist(I,G,D.x,D.y);if(c>D.r){return}var A=Math.atan2(G-D.y,I-D.x);var p=Math.cos(A)*D.r+D.x;var V=Math.sin(A)*D.r+D.y;if(h._ttEl.vLine){h.renderer.attr(h._ttEl.vLine,{x1:D.x,y1:D.y,x2:p,y2:V})}else{h._ttEl.vLine=h.renderer.line(D.x,D.y,p,V,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}else{if(h._ttEl.vLine&&h._ttEl.hLine){h.renderer.attr(h._ttEl.vLine,{x1:I,x2:I});h.renderer.attr(h._ttEl.hLine,{y1:G,y2:G})}else{h._ttEl.vLine=h.renderer.line(I,h._plotRect.y,I,h._plotRect.y+h._plotRect.height,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""});h._ttEl.hLine=h.renderer.line(h._plotRect.x,G,h._plotRect.x+h._plotRect.width,G,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}}if(!W&&h.showToolTips!=false){var P=this._get([g.toolTipClass,s.toolTipClass,h.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var u=this._get([g.toolTipBackground,s.toolTipBackground,h.toolTipBackground,"#FFFFFF"]);var r=this._get([g.toolTipLineColor,s.toolTipLineColor,h.toolTipLineColor,N.lineColor]);var Q=this._get([g.toolTipOpacity,s.toolTipOpacity,h.toolTipOpacity,1]);var q=this.getItemCoord(n,e,b);var U=0;if(h._pointMarker&&h._pointMarker.element){U=g.symbolSizeSelected;if(isNaN(U)){U=g.symbolSize}if(isNaN(U)||U>50||U<0){U=s.symbolSize}if(isNaN(U)||U>50||U<0){U=8}}h._createTooltip(q,s,C,{css:P,fill:u,stroke:r,fillOpacity:Q,symbolSize:U})}},_fitTooltip:function(c,h,j,k,e){var d={};var b=2+e/2;var f=7;if(h.x-j.width-f-b>c.x&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2<c.y+c.height){d.left={arrowLocation:"right",x:h.x-j.width-f-b,y:h.y+h.height/2-j.height/2,width:j.width+f,height:j.height}}if(h.x+h.width+j.width+f+b<c.x+c.width&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2<c.y+c.height){d.right={arrowLocation:"left",x:h.x+h.width+b,y:h.y+h.height/2-j.height/2,width:j.width+f,height:j.height}}if(h.y-j.height-b-f>c.y&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2<c.x+c.width){d.top={arrowLocation:"bottom",x:h.x+h.width/2-j.width/2,y:h.y-j.height-b-f,width:j.width,height:j.height+f}}if(h.y+h.height+j.height+f+b<c.y+c.height&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2<c.x+c.width){d.bottom={arrowLocation:"top",x:h.x+h.width/2-j.width/2,y:h.y+h.height+b,width:j.width,height:j.height+f}}if(h.width>h.height||((k.type.indexOf("stackedcolumn")!=-1||k.type.indexOf("stackedwaterfall")!=-1)&&k.orientation!="horizontal")){if(d.left){return d.left}if(d.right){return d.right}}else{if(d.top){return d.top}if(d.bottom){return d.bottom}}for(var g in d){if(d[g]){return d[g]}}return{arrowLocation:""}},_createTooltip:function(C,j,u,v){var p=this;var t=j.type;var A=false;var B=p._ttEl.box;if(!B){A=true;B=p._ttEl.box=document.createElement("div");var e=10000000;B.style.position="absolute";B.style.cursor="default";a(b).css({"z-index":e,"box-sizing":"content-box"});a(B).css({"z-index":e});a(document.body).append(B);var b=document.createElement("div");b.id="arrowOuterDiv";b.style.width="0px";b.style.height="0px";b.style.position="absolute";a(b).css({"z-index":e+1,"box-sizing":"content-box"});var g=document.createElement("div");g.id="arrowInnerDiv";g.style.width="0px";g.style.height="0px";g.style.position="absolute";var s=document.createElement("div");s.id="contentDiv";s.style.position="absolute";a(s).css({"box-sizing":"content-box",outline:"none",border:"1px solid transparent",padding:"3px","text-align":"center","vertical-align":"middle",margin:"0 0 0 0",cursor:"default"});a(s).addClass("jqx-rc-all");a(s).appendTo(a(B));a(b).appendTo(a(B));a(g).appendTo(a(B));a(g).css({"z-index":e+2,"box-sizing":"content-box"})}if(!u||u.length==0){a(B).fadeTo(0,0);return}s=a(B).find("#contentDiv")[0];b=a(B).find("#arrowOuterDiv")[0];g=a(B).find("#arrowInnerDiv")[0];g.style.opacity=b.style.opacity=v.fillOpacity;s.style.backgroundColor=v.fill;s.style.borderColor=v.stroke;s.style.opacity=v.fillOpacity;var l="<span class='"+v.css+"'>"+u+"</span>";a(s).html(l);var o=this._measureHtml(l,"jqx-rc-all jqx-button");rect=p._plotRect;if(o.width>rect.width||o.height>rect.height){return}var n={width:o.width,height:o.height};arrowLocation="";var z=5;var q=7;var r=p._isColumnType(t);x=Math.max(C.x,rect.x);y=Math.max(C.y,rect.y);if(p.toolTipAlignment=="dataPoint"){if(t.indexOf("pie")!=-1||t.indexOf("donut")!=-1){var k=(C.fromAngle+C.toAngle)/2;k=k*(Math.PI/180);var f=(!isNaN(C.innerRadius)&&C.innerRadius>0)?(C.innerRadius+C.outerRadius)/2:C.outerRadius*0.75;x=C.x=C.center.x+Math.cos(k)*f;y=C.y=C.center.y-Math.sin(k)*f;C.width=C.height=1}else{if(r&&(j.polar||j.spider)){C.width=C.height=1}}var w=this._fitTooltip(this._plotRect,C,n,j,v.symbolSize);if(w.arrowLocation!=""){arrowLocation=w.arrowLocation;x=w.x;y=w.y;n.width=w.width;n.height=w.height}}else{arrowLocation=""}if(arrowLocation=="top"||arrowLocation=="bottom"){n.height+=q;x-=q/2;if(arrowLocation=="bottom"){y-=q}}else{if(arrowLocation=="left"||arrowLocation=="right"){n.width+=q;y-=q/2;if(arrowLocation=="right"){x-=q}}}if(x+n.width>rect.x+rect.width){arrowLocation="";x=rect.x+rect.width-n.width}if(y+n.height>rect.y+rect.height){arrowLocation="";y=rect.y+rect.height-n.height}var h={x:0,y:0},d={x:0,y:0};a(s).css({width:o.width,height:o.height,left:0,top:0});b.style["margin-top"]=b.style["margin-left"]=0;g.style["margin-top"]=g.style["margin-left"]=0;s.style["margin-top"]=s.style["margin-left"]=0;var i=q+"px solid";var c=q+"px solid transparent";switch(arrowLocation){case"left":h={x:0,y:(o.height-q)/2};contentPostion={x:q,y:0};s.style["margin-left"]=q+"px";b.style["margin-left"]=0+"px";b.style["margin-top"]=h.y+"px";b.style["border-left"]="";b.style["border-right"]=i+" "+v.stroke;b.style["border-top"]=c;b.style["border-bottom"]=c;g.style["margin-left"]=1+"px";g.style["margin-top"]=h.y+"px";g.style["border-left"]="";g.style["border-right"]=i+" "+v.fill;g.style["border-top"]=c;g.style["border-bottom"]=c;break;case"right":h={x:n.width-q,y:(o.height-q)/2};contentPostion={x:0,y:0};b.style["margin-left"]=h.x+"px";b.style["margin-top"]=h.y+"px";b.style["border-left"]=i+" "+v.stroke;b.style["border-right"]="";b.style["border-top"]=c;b.style["border-bottom"]=c;g.style["margin-left"]=h.x-1+"px";g.style["margin-top"]=h.y+"px";g.style["border-left"]=i+" "+v.fill;g.style["border-right"]="";g.style["border-top"]=c;g.style["border-bottom"]=c;break;case"top":h={x:n.width/2-q/2,y:0};contentPostion={x:0,y:q};s.style["margin-top"]=contentPostion.y+"px";b.style["margin-left"]=h.x+"px";b.style["border-top"]="";b.style["border-bottom"]=i+" "+v.stroke;b.style["border-left"]=c;b.style["border-right"]=c;g.style["margin-left"]=h.x+"px";g.style["margin-top"]=1+"px";g.style["border-top"]="";g.style["border-bottom"]=i+" "+v.fill;g.style["border-left"]=c;g.style["border-right"]=c;break;case"bottom":h={x:n.width/2-q/2,y:n.height-q};contentPostion={x:0,y:0};b.style["margin-left"]=h.x+"px";b.style["margin-top"]=h.y+"px";b.style["border-top"]=i+" "+v.stroke;b.style["border-bottom"]="";b.style["border-left"]=c;b.style["border-right"]=c;g.style["margin-left"]=h.x+"px";g.style["margin-top"]=h.y-1+"px";g.style["border-top"]=i+" "+v.fill;g.style["border-bottom"]="";g.style["border-left"]=c;g.style["border-right"]=c;break}if(arrowLocation==""){a(b).hide();a(g).hide()}else{a(b).show();a(g).show()}a(B).css({width:n.width+"px",height:n.height+"px"});var m=p.host.coord();if(A){a(B).fadeOut(0,0);B.style.left=x+m.left+"px";B.style.top=y+m.top+"px"}a(B).clearQueue();a(B).animate({left:x+m.left,top:y+m.top,opacity:1},p.toolTipMoveDuration,"easeInOutCirc");a(B).fadeTo(400,1)},_measureHtml:function(c,b){var e=this._measureDiv;if(!e){this._measureDiv=e=document.createElement("div");e.style.position="absolute";e.style.cursor="default";e.style.overflow="hidden";e.style.display="none";a(e).addClass(b);this.host.append(e)}a(e).html(c);var d={width:a(e).width()+2,height:a(e).height()+2};if(a.jqx.browser&&a.jqx.browser.mozilla){d.height+=3}return d},_hideToolTip:function(b){if(!this._ttEl){return}if(this._ttEl.box){if(b==0){a(this._ttEl.box).hide()}else{a(this._ttEl.box).fadeOut()}}this._hideCrosshairs();this._ttEl.gidx=undefined},_hideCrosshairs:function(){if(!this._ttEl){return}if(this._ttEl.vLine){this.renderer.removeElement(this._ttEl.vLine);this._ttEl.vLine=undefined}if(this._ttEl.hLine){this.renderer.removeElement(this._ttEl.hLine);this._ttEl.hLine=undefined}},_get:function(b){return a.jqx.getByPriority(b)},_getAxisSettings:function(f){if(!f){return{}}var l=this;var k=f.gridLines||{};var n={visible:this._get([k.visible,f.showGridLines,true]),color:l._get([k.color,f.gridLinesColor,l._defaultLineColor]),unitInterval:l._get([k.unitInterval,k.interval,f.gridLinesInterval]),step:l._get([k.step,f.gridLinesStep]),dashStyle:l._get([k.dashStyle,f.gridLinesDashStyle]),width:l._get([k.lineWidth,1]),offsets:[],alternatingBackgroundColor:f.alternatingBackgroundColor,alternatingBackgroundColor2:f.alternatingBackgroundColor2,alternatingBackgroundOpacity:f.alternatingBackgroundOpacity};var d=f.tickMarks||{};var h={visible:this._get([d.visible,f.showTickMarks,true]),color:l._get([d.color,f.tickMarksColor,l._defaultLineColor]),unitInterval:l._get([d.unitInterval,d.interval,f.tickMarksInterval]),step:l._get([d.step,f.tickMarksStep]),dashStyle:l._get([d.dashStyle,f.tickMarksDashStyle]),width:l._get([d.lineWidth,1]),size:l._get([d.size,4]),offsets:[]};var e=f.title||{};var c={visible:l._get([e.visible,true]),text:l._get([f.description,e.text]),style:l._get([f.descriptionClass,e["class"],l.toThemeProperty("jqx-chart-axis-description",null)]),halign:l._get([f.horizontalDescriptionAlignment,e.horizontalAlignment,"center"]),valign:l._get([f.verticalDescriptionAlignment,e.verticalAlignment,"center"]),angle:0,rotationPoint:l._get([e.rotationPoint,"centercenter"]),offset:l._get([e.offset,{x:0,y:0}])};var i=f.line||{};var b={visible:l._get([i.visible,true]),color:l._get([i.color,n.color,l._defaultLineColor]),dashStyle:l._get([i.dashStyle,n.dashStyle,""]),width:l._get([i.lineWidth,1]),angle:l._get([i.angle,NaN])};var j=f.padding||{};j={left:j.left||0,right:j.right||0,top:j.top||0,bottom:j.bottom||0};var g=this._getAxisLabelsSettings(f);var m={visible:this._get([f.visible,f.showValueAxis,f.showXAxis,f.showCategoryAxis,true]),customDraw:this._get([f.customDraw,false]),gridLines:n,tickMarks:h,line:b,title:c,labels:g,padding:j,toolTipFormatFunction:this._get([f.toolTipFormatFunction,f.formatFunction,g.formatFunction]),toolTipFormatSettings:this._get([f.toolTipFormatSettings,f.formatSettings,g.formatSettings])};return m},_getAxisLabelsSettings:function(d){var b=this;var e=d.labels||{};var c={visible:b._get([d.showLabels,e.visible,true]),unitInterval:b._get([e.unitInterval,e.interval,d.labelsInterval]),step:b._get([e.step,d.labelsStep]),angle:b._get([d.textRotationAngle,e.angle,0]),style:b._get([d["class"],e["class"],b.toThemeProperty("jqx-chart-axis-text",null)]),halign:b._get([d.horizontalTextAlignment,e.horizontalAlignment,"center"]),valign:b._get([d.verticalTextAlignment,e.verticalAlignment,"center"]),textRotationPoint:b._get([d.textRotationPoint,e.rotationPoint,"auto"]),textOffset:b._get([d.textOffset,e.offset,{x:0,y:0}]),autoRotate:b._get([d.labelsAutoRotate,e.autoRotate,false]),formatSettings:b._get([d.formatSettings,e.formatSettings,undefined]),formatFunction:b._get([d.formatFunction,e.formatFunction,undefined])};return c},_getLabelsSettings:function(p,l,h,t){var j=this.seriesGroups[p];var r=j.series[l];var m=isNaN(h)?undefined:this._getDataValue(h,r.dataField,p);var k=t||["Visible","Offset","Angle","HorizontalAlignment","VerticalAlignment","Class","BackgroundColor","BorderColor","BorderOpacity","Padding","Opacity","BackgroundOpacity","LinesAngles","LinesEnabled","AutoRotate","Radius"];var q={};for(var f=0;f<k.length;f++){var n=k[f];var c="labels"+n;var b="label"+n;var o=n.substring(0,1).toLowerCase()+n.substring(1);var d=undefined;if(j.labels&&typeof(j.labels)=="object"){d=j.labels[o]}if(r.labels&&typeof(r.labels)=="object"&&undefined!=r.labels[o]){d=r.labels[o]}d=this._get([r[c],r[b],d,j[c],j[b]]);if(a.isFunction(d)){q[o]=d(m,h,r,j)}else{q[o]=d}}q["class"]=q["class"]||this.toThemeProperty("jqx-chart-label-text",null);q.visible=this._get([q.visible,r.showLabels,j.showLabels,r.labels!=undefined?true:undefined,j.labels!=undefined?true:undefined]);var e=q.padding||1;q.padding={left:this._get([e.left,isNaN(e)?1:e]),right:this._get([e.right,isNaN(e)?1:e]),top:this._get([e.top,isNaN(e)?1:e]),bottom:this._get([e.bottom,isNaN(e)?1:e])};return q},_showLabel:function(J,E,f,b,t,i,e,k,c,F,B){var m=this.seriesGroups[J];var r=m.series[E];var C={width:0,height:0},q;if(isNaN(f)){return}var I=this._getLabelsSettings(J,E,f);if(!I.visible){return e?C:undefined}if(b.width<0||b.height<0){return e?C:undefined}var g=I.angle;if(!isNaN(F)){g=F}var j=I.offset||{};var G={x:j.x,y:j.y};if(isNaN(G.x)){G.x=0}if(isNaN(G.y)){G.y=0}t=t||I.horizontalAlignment||"center";i=i||I.verticalAlignment||"center";var v=this._getFormattedValue(J,E,f,undefined,undefined,true);var s=b.width;var H=b.height;if(k==true&&t!="center"){t=t=="right"?"left":"right"}if(c==true&&i!="center"&&i!="middle"){i=i=="top"?"bottom":"top";G.y*=-1}C=this.renderer.measureText(v,g,{"class":I["class"]});if(e){return C}var p=0,n=0;if(s>0){if(t==""||t=="center"){p+=(s-C.width)/2}else{if(t=="right"){p+=(s-C.width)}}}if(H>0){if(i==""||i=="center"){n+=(H-C.height)/2}else{if(i=="bottom"){n+=(H-C.height)}}}p+=b.x+G.x;n+=b.y+G.y;var o=this._plotRect;if(p<=o.x){p=o.x+2}if(n<=o.y){n=o.y+2}var l={width:Math.max(C.width,1),height:Math.max(C.height,1)};if(n+l.height>=o.y+o.height){n=o.y+o.height-(q?(l.height+q.height)/2:l.height)-2}if(p+l.width>=o.x+o.width){p=o.x+o.width-l.width-2}var d;var A=I.backgroundColor;var D=I.borderColor;var z=I.padding;if(A||D){d=this.renderer.beginGroup();var b=this.renderer.rect(p-z.left,n-z.top,C.width+z.left+z.right,C.height+z.bottom+z.bottom,{fill:A||"transparent","fill-opacity":I.backgroundOpacity||1,stroke:D||"transparent","stroke-opacity":I.borderOpacity,"stroke-width":1})}var u=this.renderer.text(v,p,n,C.width,C.height,g,{"class":I["class"],opacity:I.opacity||1},false,"center","center");if(B){B.x=p-z.left;B.y=n-z.top;B.width=C.width+z.left+z.right;B.height=C.height+z.bottom+z.bottom}if(this._isVML){this.renderer.removeElement(u);this.renderer.getContainer()[0].appendChild(u)}if(d){this.renderer.endGroup()}return d||u},_getAnimProps:function(j,f){var e=this.seriesGroups[j];var c=!isNaN(f)?e.series[f]:undefined;var b=this.enableAnimations==true;if(e.enableAnimations){b=e.enableAnimations==true}if(c&&c.enableAnimations){b=c.enableAnimations==true}var i=this.animationDuration;if(isNaN(i)){i=1000}var d=e.animationDuration;if(!isNaN(d)){i=d}if(c){var h=c.animationDuration;if(!isNaN(h)){i=h}}if(i>5000){i=1000}return{enabled:b,duration:i}},_isColorTransition:function(f,d,e,g){if(g-1<e.xoffsets.first){return false}var b=this._getColors(f,d,g,this._getGroupGradientType(f));var c=this._getColors(f,d,g-1,this._getGroupGradientType(f));return(b.fillColor!=c.fillColor)},_renderLineSeries:function(k,R){var I=this.seriesGroups[k];if(!I.series||I.series.length==0){return}var s=I.type.indexOf("area")!=-1;var L=I.type.indexOf("stacked")!=-1;var e=L&&I.type.indexOf("100")!=-1;var af=I.type.indexOf("spline")!=-1;var t=I.type.indexOf("step")!=-1;var P=I.type.indexOf("range")!=-1;var ag=I.polar==true||I.spider==true;if(ag){t=false}if(t&&af){return}var A=this._getDataLen(k);var ad=R.width/A;var ak=I.orientation=="horizontal";var C=this._getXAxis(k).flip==true;var z=R;if(ak){z={x:R.y,y:R.x,width:R.height,height:R.width}}var D=this._calcGroupOffsets(k,z);if(!D||D.xoffsets.length==0){return}if(!this._linesRenderInfo){this._linesRenderInfo={}}this._linesRenderInfo[k]={};for(var n=I.series.length-1;n>=0;n--){var g=this._getSerieSettings(k,n);var ai={groupIndex:k,rect:z,serieIndex:n,swapXY:ak,isArea:s,isSpline:af,isRange:P,isPolar:ag,settings:g,segments:[],pointsLength:0};var j=this._isSerieVisible(k,n);if(!j){this._linesRenderInfo[k][n]=ai;continue}var K=I.series[n];if(K.customDraw){continue}var w=a.isFunction(K.colorFunction);var V=D.xoffsets.first;var H=V;var O=this._getColors(k,n,NaN,this._getGroupGradientType(k));var ac=false;var u;do{var X=[];var U=[];var r=[];var Q=-1;var p=0,o=0;var S=NaN;var F=NaN;var aj=NaN;if(D.xoffsets.length<1){continue}var T=this._getAnimProps(k,n);var M=T.enabled&&!this._isToggleRefresh&&D.xoffsets.length<10000&&this._isVML!=true?T.duration:0;var v=V;u=false;var d=this._getColors(k,n,V,this._getGroupGradientType(k));var E=undefined;for(var ae=V;ae<=D.xoffsets.last;ae++){V=ae;var Y=D.xoffsets.data[ae];var W=D.xoffsets.xvalues[ae];if(isNaN(Y)){continue}Y=Math.max(Y,1);p=Y;o=D.offsets[n][ae].to;if(!w&&E&&this.enableSampling&&a.jqx._ptdist(E.x,E.y,p,o)<1){continue}E={x:p,y:o};var ab=D.offsets[n][ae].from;if(isNaN(o)||isNaN(ab)){if(K.emptyPointsDisplay=="connect"){continue}else{if(K.emptyPointsDisplay=="zero"){if(isNaN(o)){o=D.baseOffset}if(isNaN(ab)){ab=D.baseOffset}}else{u=true;break}}}if(w&&this._isColorTransition(k,n,D,V)){if(X.length>1){V--;break}}var c=this._elementRenderInfo;if(c&&c.length>k&&c[k].series.length>n){var f=c[k].series[n][W];var aj=a.jqx._ptrnd(f?f.to:undefined);var J=a.jqx._ptrnd(z.x+(f?f.xoffset:undefined));r.push(ak?{y:J,x:aj,index:ae}:{x:J,y:aj,index:ae})}H=ae;if(g.stroke<2){if(o-z.y<=1){o=z.y+1}if(ab-z.y<=1){ab=z.y+1}if(z.y+z.height-o<=1){o=z.y+z.height-1}if(z.y+z.height-ab<=1){ab=z.y+z.height-1}}if(!s&&e){if(o<=z.y){o=z.y+1}if(o>=z.y+z.height){o=z.y+z.height-1}if(ab<=z.y){ab=z.y+1}if(ab>=z.y+z.height){ab=z.y+z.height-1}}Y=Math.max(Y,1);p=Y+z.x;if(I.skipOverlappingPoints==true&&!isNaN(S)&&Math.abs(S-p)<=1){continue}if(t&&!isNaN(S)&&!isNaN(F)){if(F!=o){X.push(ak?{y:p,x:a.jqx._ptrnd(F)}:{x:p,y:a.jqx._ptrnd(F)})}}X.push(ak?{y:p,x:a.jqx._ptrnd(o),index:ae}:{x:p,y:a.jqx._ptrnd(o),index:ae});U.push(ak?{y:p,x:a.jqx._ptrnd(ab),index:ae}:{x:p,y:a.jqx._ptrnd(ab),index:ae});S=p;F=o;if(isNaN(aj)){aj=o}}if(X.length==0){V++;continue}var G=X[X.length-1].index;if(w){O=this._getColors(k,n,G,this._getGroupGradientType(k))}var l=z.x+D.xoffsets.data[v];var aa=z.x+D.xoffsets.data[H];if(s&&I.alignEndPointsWithIntervals==true){var B=C?-1:1;if(l>z.x){l=z.x}if(aa<z.x+z.width){aa=z.x+z.width}if(C){var Z=l;l=aa;aa=Z}}aa=a.jqx._ptrnd(aa);l=a.jqx._ptrnd(l);var m=D.baseOffset;aj=a.jqx._ptrnd(aj);var h=a.jqx._ptrnd(o)||m;if(P){X=X.concat(U.reverse())}ai.pointsLength+=X.length;var b={lastItemIndex:G,colorSettings:O,pointsArray:X,pointsStart:r,left:l,right:aa,pyStart:aj,pyEnd:h,yBase:m,labelElements:[],symbolElements:[]};ai.segments.push(b)}while(V<D.xoffsets.first+D.xoffsets.length-1||u);this._linesRenderInfo[k][n]=ai}var N=this._linesRenderInfo[k];var ah=[];for(var ae in N){ah.push(N[ae])}ah=ah.sort(function(al,i){return al.serieIndex-i.serieIndex});if(s&&L){ah.reverse()}for(var ae=0;ae<ah.length;ae++){var ai=ah[ae];this._animateLine(ai,M==0?1:0);var q=this;this._enqueueAnimation("series",undefined,undefined,M,function(al,i,am){q._animateLine(i,am)},ai)}},_animateLine:function(w,b){var C=w.settings;var f=w.groupIndex;var g=w.serieIndex;var j=this.seriesGroups[f];var s=j.series[g];var v=this._getSymbol(f,g);var p=this._getLabelsSettings(f,g,NaN,["Visible"]).visible;var o=true;if(w.isPolar){if(!isNaN(j.endAngle)&&Math.round(Math.abs((isNaN(j.startAngle)?0:j.startAngle)-j.endAngle))!=360){o=false}}if(s.endPointsConnect==false){o=false}var q=0;for(var d=0;d<w.segments.length;d++){var u=w.segments[d];var z=this._calculateLine(f,w.pointsLength,q,u.pointsArray,u.pointsStart,u.yBase,b,w.isArea,w.swapXY);q+=u.pointsArray.length;if(z==""){continue}var r=z.split(" ");var A=r.length;var h=z;if(h!=""){h=this._buildLineCmd(z,w.isRange,u.left,u.right,u.pyStart,u.pyEnd,u.yBase,w.isArea,w.isPolar,o,w.isSpline,w.swapXY)}else{h="M 0 0"}var l=u.colorSettings;if(!u.pathElement){u.pathElement=this.renderer.path(h,{"stroke-width":C.stroke,stroke:l.lineColor,"stroke-opacity":C.opacity,"fill-opacity":C.opacity,"stroke-dasharray":C.dashStyle,fill:w.isArea?l.fillColor:"none"});this._installHandlers(u.pathElement,"path",f,g,u.lastItemIndex)}else{this.renderer.attr(u.pathElement,{d:h})}if(u.labelElements){for(var B=0;B<u.labelElements.length;B++){this.renderer.removeElement(u.labelElements[B])}u.labelElements=[]}if(u.symbolElements){for(var B=0;B<u.symbolElements.length;B++){this.renderer.removeElement(u.symbolElements[B])}u.symbolElements=[]}if(u.pointsArray.length==r.length){if(v!="none"||p){var E=s.symbolSize;var D=this._plotRect;for(var B=0;B<r.length;B++){var t=r[B].split(",");t={x:parseFloat(t[0]),y:parseFloat(t[1])};if(t.x<D.x||t.x>D.x+D.width||t.y<D.y||t.y>D.y+D.height){continue}if(v!="none"){var n=this._getColors(f,g,u.pointsArray[B].index,this._getGroupGradientType(f));var e=this._drawSymbol(v,t.x,t.y,n.fillColorSymbol,C.opacity,n.lineColorSymbol,C.opacity,C.strokeSymbol,undefined,E);u.symbolElements.push(e)}if(p){var k=(B>0?r[B-1]:r[B]).split(",");k={x:parseFloat(k[0]),y:parseFloat(k[1])};var m=(B<r.length-1?r[B+1]:r[B]).split(",");m={x:parseFloat(m[0]),y:parseFloat(m[1])};t=this._adjustLineLabelPosition(f,g,u.pointsArray[B].index,t,k,m);if(t){var c=this._showLabel(f,g,u.pointsArray[B].index,{x:t.x,y:t.y,width:0,height:0});u.labelElements.push(c)}}}}}if(b==1&&v!="none"){for(var B=0;B<u.symbolElements.length;B++){if(isNaN(u.pointsArray[B].index)){continue}this._installHandlers(u.symbolElements[B],"symbol",f,g,u.pointsArray[B].index)}}}},_adjustLineLabelPosition:function(i,g,d,h,f,e){var b=this._showLabel(i,g,d,{width:0,height:0},"","",true);if(!b){return}var c={x:h.x-b.width/2,y:0};c.y=h.y-1.5*b.height;return c},_calculateLine:function(h,v,p,o,n,f,e,z,c){var w=this.seriesGroups[h];var m;if(w.polar==true||w.spider==true){m=this._getPolarAxisCoords(h,this._plotRect)}var s="";var t=o.length;if(!z&&n.length==0){var r=v*e;t=r-p}var j=NaN;for(var u=0;u<t+1&&u<o.length;u++){if(u>0){s+=" "}var k=o[u].y;var l=o[u].x;var b=!z?k:f;var d=l;if(n&&n.length>u){b=n[u].y;d=n[u].x;if(isNaN(b)||isNaN(d)){b=k;d=l}}j=d;if(t<=o.length&&u>0&&u==t){d=o[u-1].x;b=o[u-1].y}if(c){l=a.jqx._ptrnd((l-b)*(z?e:1)+b);k=a.jqx._ptrnd(k)}else{l=a.jqx._ptrnd((l-d)*e+d);k=a.jqx._ptrnd((k-b)*e+b)}if(m){var q=this._toPolarCoord(m,this._plotRect,l,k);l=q.x;k=q.y}s+=l+","+k}return s},_buildLineCmd:function(k,o,g,s,e,m,d,r,c,j,f,b){var p=k;var l=b?d+","+g:g+","+d;var h=b?d+","+s:s+","+d;if(r&&!c&&!o){p=l+" "+k+" "+h}if(f){p=this._getBezierPoints(p)}var n=p.split(" ");if(n.length==0){return""}if(n.length==1){var q=n[0].split(",");return"M "+n[0]+" L"+(parseFloat(q[0])+1)+","+(parseFloat(q[1])+1)}var i=n[0].replace("M","");if(r&&!c){if(!o){p="M "+l+" L "+i+" "+p}else{p="M "+i+" L "+i+(f?"":(" L "+i+" "))+p}}else{if(!f){p="M "+i+" L "+i+" "+p}}if((c&&j)||o){p+=" Z"}return p},_getSerieSettings:function(i,c){var h=this.seriesGroups[i];var g=h.type.indexOf("area")!=-1;var f=h.type.indexOf("line")!=-1;var d=h.series[c];var k=d.dashStyle||h.dashStyle||"";var e=d.opacity||h.opacity;if(isNaN(e)||e<0||e>1){e=1}var j=d.lineWidth;if(isNaN(j)&&j!="auto"){j=h.lineWidth}if(j=="auto"||isNaN(j)||j<0||j>15){if(g){j=2}else{if(f){j=3}else{j=1}}}var b=d.lineWidthSymbol;if(isNaN(b)){b=1}return{stroke:j,strokeSymbol:b,opacity:e,dashStyle:k}},_getColors:function(u,p,d,e,b){var k=this.seriesGroups[u];var o=k.series[p];var c=this._get([o.useGradientColors,k.useGradientColors,k.useGradient,true]);var l=this._getSeriesColors(u,p,d);if(!l.fillColor){l.fillColor=r;l.fillColorSelected=a.jqx.adjustColor(r,1.1);l.fillColorAlt=a.jqx.adjustColor(r,4);l.fillColorAltSelected=a.jqx.adjustColor(r,3);l.lineColor=l.symbolColor=a.jqx.adjustColor(r,0.9);l.lineColorSelected=l.symbolColorSelected=a.jqx.adjustColor(r,0.9)}var h=[[0,1.4],[100,1]];var f=[[0,1],[25,1.1],[50,1.4],[100,1]];var n=[[0,1.3],[90,1.2],[100,1]];var j=NaN;if(!isNaN(b)){j=b==2?h:f}if(c){var q={};for(var s in l){q[s]=l[s]}l=q;if(e=="verticalLinearGradient"||e=="horizontalLinearGradient"){var g=e=="verticalLinearGradient"?j||h:j||f;var m=["fillColor","fillColorSelected","fillColorAlt","fillColorAltSelected"];for(var v in m){var r=l[m[v]];if(r){l[m[v]]=this.renderer._toLinearGradient(r,e=="verticalLinearGradient",g)}}}else{if(e=="radialGradient"){var t;var j=h;if((k.type=="pie"||k.type=="donut"||k.polar)&&d!=undefined&&this._renderData[u]&&this._renderData[u].offsets[p]){t=this._renderData[u].offsets[p][d];j=n}l.fillColor=this.renderer._toRadialGradient(l.fillColor,j,t);l.fillColorSelected=this.renderer._toRadialGradient(l.fillColorSelected,j,t)}}}return l},_installHandlers:function(c,f,i,h,d){if(!this.enableEvents){return false}var j=this;var e=this.seriesGroups[i];var k=this.seriesGroups[i].series[h];var b=e.type.indexOf("line")!=-1||e.type.indexOf("area")!=-1;if(!b&&!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mousemove",function(m){var l=j._selected;if(l&&l.isLineType&&l.linesUnselectMode=="click"&&!(l.group==i&&l.series==h)){return}var g=m.pageX||m.clientX||m.screenX;var o=m.pageY||m.clientY||m.screenY;var n=j.host.offset();g-=n.left;o-=n.top;if(j._mouseX==g&&j._mouseY==o){return}if(j._ttEl){if(j._ttEl.gidx==i&&j._ttEl.sidx==h&&j._ttEl.iidx==d){return}}j._startTooltipTimer(i,h,d)})}if(!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mouseover",function(l){var g=j._selected;if(g&&g.isLineType&&g.linesUnselectMode=="click"&&!(g.group==i&&g.series==h)){return}j._select(c,f,i,h,d,d)})}this.renderer.addHandler(c,"click",function(g){clearTimeout(j._hostClickTimer);j._lastClickTs=(new Date()).valueOf();if(b&&(f!="symbol"&&f!="pointMarker")){return}if(j._isColumnType(e.type)){j._unselect()}if(isNaN(d)){return}g.stopImmediatePropagation();j._raiseItemEvent("click",e,k,d)})},_getHorizontalOffset:function(A,s,k,j){var c=this._plotRect;var h=this._getDataLen(A);if(h==0){return{index:undefined,value:k}}var p=this._calcGroupOffsets(A,this._plotRect);if(p.xoffsets.length==0){return{index:undefined,value:undefined}}var n=k;var m=j;var w=this.seriesGroups[A];var l;if(w.polar||w.spider){l=this._getPolarAxisCoords(A,c)}var e=this._getXAxis(A).flip==true;var b,o,v,f;for(var t=p.xoffsets.first;t<=p.xoffsets.last;t++){var u=p.xoffsets.data[t];var d=p.offsets[s][t].to;var q=0;if(l){var r=this._toPolarCoord(l,c,u+c.x,d);u=r.x;d=r.y;q=a.jqx._ptdist(n,m,u,d)}else{if(w.orientation=="horizontal"){u+=c.y;var z=d;d=u;u=z;q=a.jqx._ptdist(n,m,u,d)}else{u+=c.x;q=Math.abs(n-u)}}if(isNaN(b)||b>q){b=q;o=t;v=u;f=d}}return{index:o,value:p.xoffsets.data[o],polarAxisCoords:l,x:v,y:f}},onmousemove:function(k,j){if(this._mouseX==k&&this._mouseY==j){return}this._mouseX=k;this._mouseY=j;if(!this._selected){return}var B=this._selected.group;var q=this._selected.series;var v=this.seriesGroups[B];var n=v.series[q];var b=this._plotRect;if(this.renderer){b=this.renderer.getRect();b.x+=5;b.y+=5;b.width-=10;b.height-=10}if(k<b.x||k>b.x+b.width||j<b.y||j>b.y+b.height){this._hideToolTip();this._unselect();return}var e=v.orientation=="horizontal";var b=this._plotRect;if(v.type.indexOf("line")!=-1||v.type.indexOf("area")!=-1){var f=this._getHorizontalOffset(B,this._selected.series,k,j);var u=f.index;if(u==undefined){return}if(this._selected.item!=u){var p=this._linesRenderInfo[B][q].segments;var r=0;while(u>p[r].lastItemIndex){r++;if(r>=p.length){return}}var c=p[r].pathElement;var C=p[r].lastItemIndex;this._unselect(false);this._select(c,"path",B,q,u,C)}var m=this._getSymbol(this._selected.group,this._selected.series);if(m=="none"){m="circle"}var o=this._calcGroupOffsets(B,b);var d=o.offsets[this._selected.series][u].to;var t=d;if(v.type.indexOf("range")!=-1){t=o.offsets[this._selected.series][u].from}var l=e?k:j;if(!isNaN(t)&&Math.abs(l-t)<Math.abs(l-d)){j=t}else{j=d}if(isNaN(j)){return}k=f.value;if(e){var z=k;k=j;j=z+b.y}else{k+=b.x}if(f.polarAxisCoords){k=f.x;j=f.y}j=a.jqx._ptrnd(j);k=a.jqx._ptrnd(k);if(this._pointMarker&&this._pointMarker.element){this.renderer.removeElement(this._pointMarker.element);this._pointMarker.element=undefined}if(isNaN(k)||isNaN(j)){return}var h=this._getSeriesColors(B,q,u);var w=this._getSerieSettings(B,q);var A=n.symbolSizeSelected;if(isNaN(A)){A=n.symbolSize}if(isNaN(A)||A>50||A<0){A=v.symbolSize}if(isNaN(A)||A>50||A<0){A=8}if(this.showToolTips||this.enableCrosshairs){this._pointMarker={type:m,x:k,y:j,gidx:B,sidx:q,iidx:u};this._pointMarker.element=this._drawSymbol(m,k,j,h.fillColorSymbolSelected,w.opacity,h.lineColorSymbolSelected,w.opacity,w.strokeSymbol,w.dashStyle,A);this._installHandlers(this._pointMarker.element,"pointMarker",B,q,u)}this._startTooltipTimer(B,this._selected.series,u)}},_drawSymbol:function(i,l,j,c,m,k,f,g,b,o){var e;var h=o||6;var d=h/2;switch(i){case"none":return undefined;case"circle":e=this.renderer.circle(l,j,h/2);break;case"square":h=h-1;d=h/2;e=this.renderer.rect(l-d,j-d,h,h);break;case"diamond":var n="M "+(l-d)+","+(j)+" L"+(l)+","+(j-d)+" L"+(l+d)+","+(j)+" L"+(l)+","+(j+d)+" Z";e=this.renderer.path(n);break;case"triangle_up":case"triangle":var n="M "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j+d)+" L "+(l)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_down":var n="M "+(l-d)+","+(j-d)+" L "+(l)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_left":var n="M "+(l-d)+","+(j)+" L "+(l+d)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_right":var n="M "+(l-d)+","+(j-d)+" L "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j)+" Z";e=this.renderer.path(n);break;default:e=this.renderer.circle(l,j,h)}this.renderer.attr(e,{fill:c,"fill-opacity":m,stroke:k,"stroke-width":g,"stroke-opacity":f,"stroke-dasharray":b||""});if(i!="circle"){this.renderer.attr(e,{r:h/2});if(i!="square"){this.renderer.attr(e,{x:l,y:j})}}return e},_getSymbol:function(f,b){var c=["circle","square","diamond","triangle_up","triangle_down","triangle_left","triangle_right"];var e=this.seriesGroups[f];var d=e.series[b];var h;if(d.symbolType!=undefined){h=d.symbolType}if(h==undefined){h=e.symbolType}if(h=="default"){return c[b%c.length]}else{if(h!=undefined){return h}}return"none"},_startTooltipTimer:function(k,j,d,i,h,b,f){this._cancelTooltipTimer();var l=this;var e=l.seriesGroups[k];var c=this.toolTipShowDelay||this.toolTipDelay;if(isNaN(c)||c>10000||c<0){c=500}if(this._ttEl||(true==this.enableCrosshairs&&false==this.showToolTips)){c=0}if(!isNaN(b)){c=b}clearTimeout(this._tttimerHide);if(isNaN(i)){i=l._mouseX}if(isNaN(h)){h=l._mouseY-3}if(c==0){l._showToolTip(i,h,k,j,d)}this._tttimer=setTimeout(function(){if(c!=0){l._showToolTip(i,h,k,j,d)}var g=l.toolTipHideDelay;if(!isNaN(f)){g=f}if(isNaN(g)){g=4000}l._tttimerHide=setTimeout(function(){l._hideToolTip();l._unselect()},g)},c)},_cancelTooltipTimer:function(){clearTimeout(this._tttimer)},_getGroupGradientType:function(c){var b=this.seriesGroups[c];if(b.type.indexOf("area")!=-1){return b.orientation=="horizontal"?"horizontalLinearGradient":"verticalLinearGradient"}else{if(this._isColumnType(b.type)||b.type.indexOf("candle")!=-1){if(b.polar){return"radialGradient"}return b.orientation=="horizontal"?"verticalLinearGradient":"horizontalLinearGradient"}else{if(b.type.indexOf("scatter")!=-1||b.type.indexOf("bubble")!=-1||this._isPieGroup(c)){return"radialGradient"}}}return undefined},_select:function(h,l,o,n,i,m){if(this._selected){if((this._selected.item!=i||this._selected.series!=n||this._selected.group!=o)){this._unselect()}else{return}}var k=this.seriesGroups[o];var p=k.series[n];if(k.enableSelection==false||p.enableSelection==false){return}var f=k.type.indexOf("line")!=-1&&k.type.indexOf("area")==-1;this._selected={element:h,type:l,group:o,series:n,item:i,iidxBase:m,isLineType:f,linesUnselectMode:p.linesUnselectMode||k.linesUnselectMode};var b=this._getColors(o,n,m||i,this._getGroupGradientType(o));var c=b.fillColorSelected;if(f){c="none"}var e=this._getSerieSettings(o,n);var d=(l=="symbol")?b.lineColorSymbolSelected:b.lineColorSelected;c=(l=="symbol")?b.fillColorSymbolSelected:c;var j=(l=="symbol")?1:e.stroke;if(this.renderer.getAttr(h,"fill")==b.fillColorAlt){c=b.fillColorAltSelected}this.renderer.attr(h,{stroke:d,fill:c,"stroke-width":j});if(k.type.indexOf("pie")!=-1||k.type.indexOf("donut")!=-1){this._applyPieSelect()}this._raiseItemEvent("mouseover",k,p,i)},_applyPieSelect:function(){var c=this;c._createAnimationGroup("animPieSlice");var e=this._selected;if(!e){return}var f=this.getItemCoord(e.group,e.series,e.item);if(!f){return}var d=this._getRenderInfo(e.group,e.series,e.item);var b={element:d,coord:f};this._enqueueAnimation("animPieSlice",undefined,undefined,300,function(i,g,j){var l=g.coord;var h=l.selectedRadiusChange*j;var k=c.renderer.pieSlicePath(l.center.x,l.center.y,l.innerRadius==0?0:(l.innerRadius+h),l.outerRadius+h,l.fromAngle,l.toAngle,l.centerOffset);c.renderer.attr(g.element.element,{d:k});c._showPieLabel(e.group,e.series,e.item,undefined,h)},b);c._startAnimation("animPieSlice")},_applyPieUnselect:function(){this._stopAnimations();var b=this._selected;if(!b){return}var d=this.getItemCoord(b.group,b.series,b.item);if(!d||!d.center){return}var c=this.renderer.pieSlicePath(d.center.x,d.center.y,d.innerRadius,d.outerRadius,d.fromAngle,d.toAngle,d.centerOffset);this.renderer.attr(b.element,{d:c});this._showPieLabel(b.group,b.series,b.item,undefined,0)},_unselect:function(){var o=this;if(o._selected){var n=o._selected.group;var m=o._selected.series;var f=o._selected.item;var k=o._selected.iidxBase;var j=o._selected.type;var i=o.seriesGroups[n];var p=i.series[m];var e=i.type.indexOf("line")!=-1&&i.type.indexOf("area")==-1;var b=o._getColors(n,m,k||f,o._getGroupGradientType(n));var c=b.fillColor;if(e){c="none"}var d=o._getSerieSettings(n,m);var l=(j=="symbol")?b.lineColorSymbol:b.lineColor;c=(j=="symbol")?b.fillColorSymbol:c;if(this.renderer.getAttr(o._selected.element,"fill")==b.fillColorAltSelected){c=b.fillColorAlt}var h=(j=="symbol")?1:d.stroke;o.renderer.attr(o._selected.element,{stroke:l,fill:c,"stroke-width":h});if(i.type.indexOf("pie")!=-1||i.type.indexOf("donut")!=-1){this._applyPieUnselect()}o._selected=undefined;if(!isNaN(f)){o._raiseItemEvent("mouseout",i,p,f)}}if(o._pointMarker){if(o._pointMarker.element){o.renderer.removeElement(o._pointMarker.element);o._pointMarker.element=undefined}o._pointMarker=undefined;o._hideCrosshairs()}},_raiseItemEvent:function(f,g,e,c){var d=e[f]||g[f];var h=0;for(;h<this.seriesGroups.length;h++){if(this.seriesGroups[h]==g){break}}if(h==this.seriesGroups.length){return}var b={event:f,seriesGroup:g,serie:e,elementIndex:c,elementValue:this._getDataValue(c,e.dataField,h)};if(d&&a.isFunction(d)){d(b)}this._raiseEvent(f,b)},_raiseEvent:function(d,c){var e=new a.Event(d);e.owner=this;c.event=d;e.args=c;var b=this.host.trigger(e);return b},_calcInterval:function(d,j,h){var m=Math.abs(j-d);var k=m/h;var f=[1,2,3,4,5,10,15,20,25,50,100];var b=[0.5,0.25,0.125,0.1];var c=0.1;var g=f;if(k<1){g=b;c=10}var l=0;do{l=0;if(k>=1){c*=10}else{c/=10}for(var e=1;e<g.length;e++){if(Math.abs(g[l]*c-k)>Math.abs(g[e]*c-k)){l=e}else{break}}}while(l==g.length-1);return g[l]*c},_renderDataClone:function(){if(!this._renderData||this._isToggleRefresh){return}var d=this._elementRenderInfo=[];if(this._isSelectorRefresh){return}for(var h=0;h<this._renderData.length;h++){var c=this._getXAxis(h).dataField;while(d.length<=h){d.push({})}var b=d[h];var f=this._renderData[h];if(!f.offsets){continue}if(f.valueAxis){b.valueAxis={itemOffsets:{}};for(var j in f.valueAxis.itemOffsets){b.valueAxis.itemOffsets[j]=f.valueAxis.itemOffsets[j]}}if(f.xAxis){b.xAxis={itemOffsets:{}};for(var j in f.xAxis.itemOffsets){b.xAxis.itemOffsets[j]=f.xAxis.itemOffsets[j]}}b.series=[];var g=b.series;var l=this._isPieGroup(h);for(var m=0;m<f.offsets.length;m++){g.push({});for(var e=0;e<f.offsets[m].length;e++){if(!l){g[m][f.xoffsets.xvalues[e]]={value:f.offsets[m][e].value,valueRadius:f.offsets[m][e].valueRadius,xoffset:f.xoffsets.data[e],from:f.offsets[m][e].from,to:f.offsets[m][e].to}}else{var k=f.offsets[m][e];g[m][k.displayValue]={value:k.value,x:k.x,y:k.y,fromAngle:k.fromAngle,toAngle:k.toAngle}}}}}},getPolarDataPointOffset:function(d,c,f){var e=this._renderData[f];if(!e){return{x:NaN,y:NaN}}var h=this.getValueAxisDataPointOffset(c,f);var b=this.getXAxisDataPointOffset(d,f);var g=this._toPolarCoord(e.polarCoords,e.xAxis.rect,b,h);return{x:g.x,y:g.y}},_getDataPointOffsetDiff:function(j,i,b,f,g,d,h){var e=this._getDataPointOffset(j,b,f,g,d,h);var c=this._getDataPointOffset(i,b,f,g,d,h);return Math.abs(e-c)},_getXAxisRenderData:function(d){if(d>=this._renderData.length){return}var e=this.seriesGroups[d];var c=this._renderData[d].xAxis;if(!c){return}if(e.xAxis==undefined){for(var b=0;b<=d;b++){if(this.seriesGroups[b].xAxis==undefined){break}}c=this._renderData[b].xAxis}return c},getXAxisDataPointOffset:function(j,l){var k=this.seriesGroups[l];if(isNaN(j)){return NaN}renderData=this._getXAxisRenderData(l);if(!renderData){return NaN}var f=renderData.data.axisStats;var i=f.min.valueOf();var b=f.max.valueOf();var g=b-i;if(g==0){g=1}if(j.valueOf()>b||j.valueOf()<i){return NaN}var c=this._getXAxis(l);var d=k.orientation=="horizontal"?"height":"width";var n=k.orientation=="horizontal"?"y":"x";var h=(j.valueOf()-i)/g;var m=renderData.rect[d]-renderData.data.padding.left-renderData.data.padding.right;if(k.polar||k.spider){var e=this._renderData[l].polarCoords;if(e.isClosedCircle){m=renderData.data.axisSize}}return this._plotRect[n]+renderData.data.padding.left+m*(c.flip?(1-h):h)},getValueAxisDataPointOffset:function(g,h){var j=this._getValueAxis(h);if(!j){return NaN}var i=this._renderData[h];if(!i){return NaN}var f=j.flip==true;var d=i.logBase;var e=i.scale;var b=i.gbase;var c=i.baseOffset;return this._getDataPointOffset(g,b,d,e,c,f)},_getDataPointOffset:function(f,c,d,h,e,b){var g;if(isNaN(f)){f=c}if(!isNaN(d)){g=(a.jqx.log(f,d)-a.jqx.log(c,d))*h}else{g=(f-c)*h}if(this._isVML){g=Math.round(g)}if(b){g=e+g}else{g=e-g}return g},_calcGroupOffsets:function(l,L){var z=this.seriesGroups[l];while(this._renderData.length<l+1){this._renderData.push({})}if(this._renderData[l]!=null&&this._renderData[l].offsets!=undefined){return this._renderData[l]}if(this._isPieGroup(l)){return this._calcPieSeriesGroupOffsets(l,L)}var o=this._getValueAxis(l);if(!o||!z.series||z.series.length==0){return this._renderData[l]}var A=o.flip==true;var O=o.logarithmicScale==true;var N=o.logarithmicScaleBase||10;var T=[];var F=z.type.indexOf("stacked")!=-1;var d=F&&z.type.indexOf("100")!=-1;var K=z.type.indexOf("range")!=-1;var U=this._isColumnType(z.type);var Z=z.type.indexOf("waterfall")!=-1;var s=this._getDataLen(l);var r=z.baselineValue||o.baselineValue||0;if(d){r=0}var ag=this._stats.seriesGroups[l];if(!ag||!ag.isValid){return}var aj=ag.hasStackValueReversal;if(aj){r=0}if(Z&&F){if(aj){return}else{r=ag.base}}if(r>ag.max){r=ag.max}if(r<ag.min){r=ag.min}var q=(d||O)?ag.maxRange:ag.max-ag.min;var an=ag.min;var C=ag.max;var M=L.height/(O?ag.intervals:q);var ai=0;if(d){if(an*C<0){q/=2;ai=-(q+r)*M}else{ai=-r*M}}else{ai=-(r-an)*M}if(A){ai=L.y-ai}else{ai+=L.y+L.height}var ah=[];var ad=[];var S=[];var al,H;if(O){al=a.jqx.log(C,N)-a.jqx.log(r,N);if(F){al=ag.intervals;r=d?0:an}H=ag.intervals-al;if(!A){ai=L.y+al/ag.intervals*L.height}}ai=a.jqx._ptrnd(ai);var c=(an*C<0)?L.height/2:L.height;var m=[];var W=[];var ao=F&&(U||O);var am=[];T=new Array(z.series.length);for(var ab=0;ab<z.series.length;ab++){T[ab]=new Array(s)}for(var ac=0;ac<s;ac++){if(!Z&&F){W=[]}for(var ab=0;ab<z.series.length;ab++){if(!F&&O){m=[]}var D=z.series[ab];var E=D.dataField;var aq=D.dataFieldFrom;var P=D.dataFieldTo;var Y=D.radiusDataField||D.sizeDataField;T[ab][ac]={};var g=this._isSerieVisible(l,ab);if(z.type.indexOf("candle")!=-1||z.type.indexOf("ohlc")!=-1){var b=["Open","Close","High","Low"];for(var ak in b){var p="dataField"+b[ak];if(D[p]){T[ab][ac][b[ak]]=this._getDataPointOffset(this._getDataValueAsNumber(ac,D[p],l),r,O?N:NaN,M,ai,A)}}continue}if(F){while(W.length<=ac){W.push(0)}}var ap=NaN;if(K){ap=this._getDataValueAsNumber(ac,aq,l);if(isNaN(ap)){ap=r}}var J=NaN;if(K){J=this._getDataValueAsNumber(ac,P,l)}else{J=this._getDataValueAsNumber(ac,E,l)}var e=this._getDataValueAsNumber(ac,Y,l);if(F){W[ac]+=g?J:0}if(!g){J=NaN}if(isNaN(J)||(O&&J<=0)){T[ab][ac]={from:undefined,to:undefined};continue}var I;if(F){if(ao){I=(J>=r)?ah:ad}else{J=W[ac]}}var af=M*(J-r);if(K){af=M*(J-ap)}if(F&&ao){if(!am[ac]){am[ac]=true;af=M*(J-r)}else{af=M*J}}if(O){while(m.length<=ac){m.push({p:{value:0,height:0},n:{value:0,height:0}})}var B=(K||K)?ap:r;var aa=J>B?m[ac].p:m[ac].n;aa.value+=J;if(d){J=aa.value/(ag.psums[ac]+ag.nsums[ac])*100;af=(a.jqx.log(J,N)-ag.minPow)*M}else{af=a.jqx.log(aa.value,N)-a.jqx.log(B,N);af*=M}af-=aa.height;aa.height+=af}var R=ai;if(K){var t=0;if(O){t=(a.jqx.log(ap,N)-a.jqx.log(r,N))*M}else{t=(ap-r)*M}R+=A?t:-t}if(F){if(d&&!O){var w=(ag.psums[ac]-ag.nsums[ac]);if(J>r){af=(ag.psums[ac]/w)*c;if(ag.psums[ac]!=0){af*=J/ag.psums[ac]}}else{af=(ag.nsums[ac]/w)*c;if(ag.nsums[ac]!=0){af*=J/ag.nsums[ac]}}}if(ao){if(isNaN(I[ac])){I[ac]=R}R=I[ac]}}if(isNaN(S[ac])){S[ac]=0}var ae=S[ac];af=Math.abs(af);var V=af;if(af>=1){h_new=this._isVML?Math.round(af):a.jqx._ptrnd(af)-1;if(Math.abs(af-h_new)>0.5){af=Math.round(af)}else{af=h_new}}ae+=af-V;if(!F){ae=0}if(Math.abs(ae)>0.5){if(ae>0){af-=1;ae-=1}else{af+=1;ae+=1}}S[ac]=ae;if(ab==z.series.length-1&&d){var v=0;for(var X=0;X<ab;X++){v+=Math.abs(T[X][ac].to-T[X][ac].from)}v+=af;if(v<c){if(af>0.5){af=a.jqx._ptrnd(af+c-v)}else{var X=ab-1;while(X>=0){var G=Math.abs(T[X][ac].to-T[X][ac].from);if(G>1){if(T[X][ac].from>T[X][ac].to){T[X][ac].from+=c-v}break}X--}}}}if(A){af*=-1}var Q=J<r;if(K){Q=ap>J}var n=isNaN(ap)?J:{from:ap,to:J};if(Q){if(ao){I[ac]+=af}T[ab][ac]={from:R,to:R+af,value:n,valueRadius:e}}else{if(ao){I[ac]-=af}T[ab][ac]={from:R,to:R-af,value:n,valueRadius:e}}}}var u=this._renderData[l];u.baseOffset=ai;u.gbase=r;u.logBase=O?N:NaN;u.scale=M;u.offsets=!Z?T:this._applyWaterfall(T,s,l,ai,r,O?N:NaN,M,A,F);u.xoffsets=this._calculateXOffsets(l,L.width);return this._renderData[l]},_isPercent:function(b){return(typeof(b)==="string"&&b.length>0&&b.indexOf("%")==b.length-1)},_calcPieSeriesGroupOffsets:function(e,b){var z=this;var m=this._getDataLen(e);var n=this.seriesGroups[e];var A=this._renderData[e]={};var G=A.offsets=[];for(var C=0;C<n.series.length;C++){var t=n.series[C];var E=this._get([t.minAngle,t.startAngle]);if(isNaN(E)||E<0||E>360){E=0}var M=this._get([t.maxAngle,t.endAngle]);if(isNaN(M)||M<0||M>360){M=360}var f=M-E;var o=t.initialAngle||0;if(o<E){o=E}if(o>M){o=M}var c=t.centerOffset||0;var K=a.jqx.getNum([t.offsetX,n.offsetX,b.width/2]);var J=a.jqx.getNum([t.offsetY,n.offsetY,b.height/2]);var w=Math.min(b.width,b.height)/2;var v=o;var g=t.radius;if(z._isPercent(g)){g=parseFloat(g)/100*w}if(isNaN(g)){g=w*0.4}var l=t.innerRadius;if(z._isPercent(l)){l=parseFloat(l)/100*w}if(isNaN(l)||l>=g){l=0}var d=t.selectedRadiusChange;if(z._isPercent(d)){d=parseFloat(d)/100*(g-l)}if(isNaN(d)){d=0.1*(g-l)}G.push([]);var h=0;var j=0;for(var F=0;F<m;F++){var L=this._getDataValueAsNumber(F,t.dataField,e);if(isNaN(L)){continue}if(!this._isSerieVisible(e,C,F)&&t.hiddenPointsDisplay!=true){continue}if(L>0){h+=L}else{j+=L}}var r=h-j;if(r==0){r=1}for(var F=0;F<m;F++){var L=this._getDataValueAsNumber(F,t.dataField,e);if(isNaN(L)){G[C].push({});continue}var D=t.displayText||t.displayField;var k=this._getDataValue(F,D,e);if(k==undefined){k=F}var I=0;var B=this._isSerieVisible(e,C,F);if(B||t.hiddenPointsDisplay==true){I=Math.abs(L)/r*f}var q=b.x+K;var p=b.y+J;var H=c;if(a.isFunction(c)){H=c({seriesIndex:C,seriesGroupIndex:e,itemIndex:F})}if(isNaN(H)){H=0}var u={key:e+"_"+C+"_"+F,value:L,displayValue:k,x:q,y:p,fromAngle:v,toAngle:v+I,centerOffset:H,innerRadius:l,outerRadius:g,selectedRadiusChange:d,visible:B};G[C].push(u);v+=I}}return A},_isPointSeriesOnly:function(){for(var b=0;b<this.seriesGroups.length;b++){var c=this.seriesGroups[b];if(c.type.indexOf("line")==-1&&c.type.indexOf("area")==-1&&c.type.indexOf("scatter")==-1&&c.type.indexOf("bubble")==-1){return false}}return true},_hasColumnSeries:function(){var d=["column","ohlc","candlestick","waterfall"];for(var c=0;c<this.seriesGroups.length;c++){var e=this.seriesGroups[c];for(var b in d){if(e.type.indexOf(d[b])!=-1){return true}}}return false},_alignValuesWithTicks:function(f){var b=this._isPointSeriesOnly();var c=this.seriesGroups[f];var e=this._getXAxis(f);var d=e.valuesOnTicks==undefined?b:e.valuesOnTicks!=false;if(e.logarithmicScale){d=true}if(f==undefined){return d}if(c.valuesOnTicks==undefined){return d}return c.valuesOnTicks},_getYearsDiff:function(c,b){return b.getFullYear()-c.getFullYear()},_getMonthsDiff:function(c,b){return 12*(b.getFullYear()-c.getFullYear())+b.getMonth()-c.getMonth()},_getDateDiff:function(f,e,d,b){var c=0;if(d!="year"&&d!="month"){c=e.valueOf()-f.valueOf()}switch(d){case"year":c=this._getYearsDiff(f,e);break;case"month":c=this._getMonthsDiff(f,e);break;case"day":c/=(24*3600*1000);break;case"hour":c/=(3600*1000);break;case"minute":c/=(60*1000);break;case"second":c/=(1000);break;case"millisecond":break}if(d!="year"&&d!="month"&&b!=false){c=a.jqx._rnd(c,1,true)}return c},_getBestDTUnit:function(k,p,q,d,g){var f="day";var m=p.valueOf()-k.valueOf();if(m<1000){f="second"}else{if(m<3600000){f="minute"}else{if(m<86400000){f="hour"}else{if(m<2592000000){f="day"}else{if(m<31104000000){f="month"}else{f="year"}}}}}var o=[{key:"year",cnt:m/(1000*60*60*24*365)},{key:"month",cnt:m/(1000*60*60*24*30)},{key:"day",cnt:m/(1000*60*60*24)},{key:"hour",cnt:m/(1000*60*60)},{key:"minute",cnt:m/(1000*60)},{key:"second",cnt:m/1000},{key:"millisecond",cnt:m}];var l=-1;for(var h=0;h<o.length;h++){if(o[h].key==f){l=h;break}}var b=-1,n=-1;for(;l<o.length;l++){if(o[l].cnt/100>d){break}var c=this._estAxisInterval(k,p,q,d,o[l].key,g);var e=this._getDTIntCnt(k,p,c,o[l].key);if(b==-1||b<e){b=e;n=l}}f=o[n].key;return f},_getXAxisStats:function(h,o,H){var m=this._getDataLen(h);var c=o.type=="date"||o.type=="time";if(c&&!this._autoDateFormats){if(!this._autoDateFormats){this._autoDateFormats=[]}var q=this._testXAxisDateFormat();if(q){this._autoDateFormats.push(q)}}var p=c?this._castAsDate(o.minValue,o.dateFormat):this._castAsNumber(o.minValue);var s=c?this._castAsDate(o.maxValue,o.dateFormat):this._castAsNumber(o.maxValue);if(this._selectorRange&&this._selectorRange[h]){var j=this._selectorRange[h].min;if(!isNaN(j)){p=c?this._castAsDate(j,o.dateFormat):this._castAsNumber(j)}var k=this._selectorRange[h].max;if(!isNaN(k)){s=c?this._castAsDate(k,o.dateFormat):this._castAsNumber(k)}}var C=p,G=s;var f,r;var d=o.type==undefined||o.type=="auto";var l=(d||o.type=="basic");var D=0,e=0;for(var F=0;F<m&&o.dataField;F++){var B=this._getDataValue(F,o.dataField,h);B=c?this._castAsDate(B,o.dateFormat):this._castAsNumber(B);if(isNaN(B)){continue}if(c){D++}else{e++}if(isNaN(f)||B<f){f=B}if(isNaN(r)||B>=r){r=B}}if(d&&((!c&&e==m)||(c&&D==m))){l=false}if(l){f=0;r=Math.max(0,m-1)}if(isNaN(C)){C=f}if(isNaN(G)){G=r}if(c){if(!this._isDate(C)){C=this._isDate(G)?G:new Date()}if(!this._isDate(G)){G=this._isDate(C)?C:new Date()}}else{if(isNaN(C)){C=0}if(isNaN(G)){G=l?Math.max(0,m-1):C}}if(f==undefined){f=C}if(r==undefined){r=G}var t=o.rangeSelector;if(t){var u=t.minValue||C;if(u&&c){u=this._castAsDate(u,t.dateFormat||o.dateFormat)}var A=t.maxValue||G;if(A&&c){A=this._castAsDate(A,t.dateFormat||o.rangeSelector)}if(C<u){C=u}if(G<u){G=A}if(C>A){C=u}if(G>A){G=A}}var I=o.unitInterval;var z,J;if(c){z=o.baseUnit;if(!z){z=this._getBestDTUnit(C,G,h,H)}J=z=="hour"||z=="minute"||z=="second"||z=="millisecond"}var v=o.logarithmicScale==true;var g=o.logarithmicScaleBase;if(isNaN(g)||g<=1){g=10}var I=o.unitInterval;if(v){I=1}else{if(isNaN(I)||I<=0){I=this._estAxisInterval(C,G,h,H,z)}}var E={min:C,max:G};var n=this.seriesGroups[h];if(v){if(!C){C=1;if(G&&C>G){C=G}}if(!G){G=C}E={min:C,max:G};var b=a.jqx._rnd(a.jqx.log(C,g),1,false);var w=a.jqx._rnd(a.jqx.log(G,g),1,true);G=Math.pow(g,w);C=Math.pow(g,b)}else{if(!c&&(n.polar||n.spider)){C=a.jqx._rnd(C,I,false);G=a.jqx._rnd(G,I,true)}}return{min:C,max:G,logAxis:{enabled:v,base:g,minPow:b,maxPow:w},dsRange:{min:f,max:r},filterRange:E,useIndeces:l,isDateTime:c,isTimeUnit:J,dateTimeUnit:z,interval:I}},_getDefaultDTFormatFn:function(d){var b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var c;if(d=="year"||d=="month"||d=="day"){c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()}}else{c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()+"<br>"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()}}return c},_getDTIntCnt:function(e,b,c,h){var d=0;var f=new Date(e);var g=new Date(b);g=g.valueOf();if(c<=0){return 1}while(f.valueOf()<g){if(h=="millisecond"){f=new Date(f.valueOf()+c)}else{if(h=="second"){f=new Date(f.valueOf()+c*1000)}else{if(h=="minute"){f=new Date(f.valueOf()+c*60000)}else{if(h=="hour"){f=new Date(f.valueOf()+c*60000*24)}else{if(h=="day"){f.setDate(f.getDate()+c)}else{if(h=="month"){f.setMonth(f.getMonth()+c)}else{if(h=="year"){f.setFullYear(f.getFullYear()+c)}}}}}}}d++}return d},_estAxisInterval:function(e,h,m,b,j,c){if(isNaN(e)||isNaN(h)){return NaN}var d=[1,2,5,10,15,20,50,100,200,500];var g=0;var f=b/((!isNaN(c)&&c>0)?c:50);if(this._renderData&&this._renderData.length>m&&this._renderData[m].xAxis&&!isNaN(this._renderData[m].xAxis.avgWidth)){var o=Math.max(1,this._renderData[m].xAxis.avgWidth);if(o!=0&&isNaN(c)){f=0.9*b/o}}if(f<=1){return Math.abs(h-e)}var n=0;while(true){var l=g>=d.length?Math.pow(10,3+g-d.length):d[g];if(this._isDate(e)&&this._isDate(h)){n=this._getDTIntCnt(e,h,l,j)}else{n=(h-e)/l}if(n<=f){break}g++}var k=this.seriesGroups[m];if(k.spider||k.polar){if(2*l>h-e){l=h-e}}return l},_getPaddingSize:function(l,e,f,c,n,g,o){var h=l.min;var j=l.max;if(l.logAxis.enabled){h=l.logAxis.minPow;j=l.logAxis.maxPow}var b=l.interval;var d=l.dateTimeUnit;if(n){var k=(c/Math.max(1,j-h+b))*b;if(g){return{left:0,right:k}}else{if(f){return{left:0,right:0}}return{left:k/2,right:k/2}}}if(f&&!o){return{left:0,right:0}}if(this._isDate(h)&&this._isDate(j)){var m=this._getDTIntCnt(h,j,Math.min(b,j-h),d);var i=c/Math.max(2,m);return{left:i/2,right:i/2}}var m=Math.max(1,j-h);if(m==1){sz=c/4;return{left:sz,right:sz}}var i=c/(m+1);return{left:i/2,right:i/2}},_calculateXOffsets:function(f,F){var E=this.seriesGroups[f];var o=this._getXAxis(f);var w=[];var m=[];var n=this._getDataLen(f);var d=this._getXAxisStats(f,o,F);var v=d.min;var C=d.max;var b=d.isDateTime;var G=d.isTimeUnit;var D=this._hasColumnSeries();var c=E.polar||E.spider;var z=this._get([E.startAngle,E.minAngle,0]);var t=this._get([E.endAngle,E.maxAngle,360]);var q=c&&!(Math.abs(Math.abs(t-z)-360)>0.0001);var l=this._alignValuesWithTicks(f);var s=this._getPaddingSize(d,o,l,F,c,q,D);var I=C-v;var B=d.filterRange;if(I==0){I=1}var H=F-s.left-s.right;if(c&&l&&!q){s.left=s.right=0}var j=-1,p=-1;for(var A=0;A<n;A++){var u=(o.dataField===undefined)?A:this._getDataValue(A,o.dataField,f);if(d.useIndeces){if(A<B.min||A>B.max){w.push(NaN);m.push(undefined);continue}r=s.left+(A-v)/I*H;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:C.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}w.push(a.jqx._ptrnd(r));m.push(u);if(j==-1){j=A}if(p==-1||p<A){p=A}continue}u=b?this._castAsDate(u,o.dateFormat):this._castAsNumber(u);if(isNaN(u)||u<B.min||u>B.max){w.push(NaN);m.push(undefined);continue}var r=0;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:C.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}else{if(!b||(b&&G)){diffFromMin=u-v;r=(u-v)*H/I}else{r=(u.valueOf()-v.valueOf())/(C.valueOf()-v.valueOf())*H}}r=a.jqx._ptrnd(s.left+r);w.push(r);m.push(u);if(j==-1){j=A}if(p==-1||p<A){p=A}}if(o.flip==true){for(var A=0;A<w.length;A++){if(!isNaN(w[A])){w[A]=F-w[A]}}}if(G||b){I=this._getDateDiff(v,C,o.baseUnit);I=a.jqx._rnd(I,1,false)}var k=Math.max(1,I);var h=H/k;if(j==p&&k==1){w[j]=s.left+H/2}return{axisStats:d,data:w,xvalues:m,first:j,last:p,length:p==-1?0:p-j+1,itemWidth:h,intervalWidth:h*d.interval,rangeLength:I,useIndeces:d.useIndeces,padding:s,axisSize:H}},_getXAxis:function(b){if(b==undefined||this.seriesGroups.length<=b){return this.categoryAxis||this.xAxis}return this.seriesGroups[b].categoryAxis||this.seriesGroups[b].xAxis||this.categoryAxis||this.xAxis},_isGreyScale:function(e,b){var d=this.seriesGroups[e];var c=d.series[b];if(c.greyScale==true){return true}else{if(c.greyScale==false){return false}}if(d.greyScale==true){return true}else{if(d.greyScale==false){return false}}return this.greyScale==true},_getSeriesColors:function(f,c,e){var b=this._getSeriesColorsInternal(f,c,e);if(this._isGreyScale(f,c)){for(var d in b){b[d]=a.jqx.toGreyScale(b[d])}}return b},_getColorFromScheme:function(o,l,b){var d="#000000";var n=this.seriesGroups[o];var g=n.series[l];if(this._isPieGroup(o)){var c=this._getDataLen(o);d=this._getItemColorFromScheme(g.colorScheme||n.colorScheme||this.colorScheme,l*c+b,o,l)}else{var m=0;for(var f=0;f<=o;f++){for(var e in this.seriesGroups[f].series){if(f==o&&e==l){break}else{m++}}}var k=this.colorScheme;if(n.colorScheme){k=n.colorScheme;sidex=seriesIndex}if(k==undefined||k==""){k=this.colorSchemes[0].name}if(!k){return d}for(var f=0;f<this.colorSchemes.length;f++){var h=this.colorSchemes[f];if(h.name==k){while(m>h.colors.length){m-=h.colors.length;if(++f>=this.colorSchemes.length){f=0}h=this.colorSchemes[f]}d=h.colors[m%h.colors.length]}}}return d},_createColorsCache:function(){this._colorsCache={get:function(b){if(this._store[b]){return this._store[b]}},set:function(c,b){if(this._size<10000){this._store[c]=b;this._size++}},clear:function(){this._store={};this._size=0},_size:0,_store:{}}},_getSeriesColorsInternal:function(m,d,b){var f=this.seriesGroups[m];var o=f.series[d];if(!a.isFunction(o.colorFunction)&&f.type!="pie"&&f.type!="donut"){b=NaN}var h=m+"_"+d+"_"+(isNaN(b)?"NaN":b);if(this._colorsCache.get(h)){return this._colorsCache.get(h)}var c={lineColor:"#222222",lineColorSelected:"#151515",lineColorSymbol:"#222222",lineColorSymbolSelected:"#151515",fillColor:"#222222",fillColorSelected:"#333333",fillColorSymbol:"#222222",fillColorSymbolSelected:"#333333",fillColorAlt:"#222222",fillColorAltSelected:"#333333"};var i;if(a.isFunction(o.colorFunction)){var j=!isNaN(b)?this._getDataValue(b,o.dataField,m):NaN;if(f.type.indexOf("range")!=-1&&!isNaN(b)){var e=this._getDataValue(b,o.dataFieldFrom,m);var l=this._getDataValue(b,o.dataFieldTo,m);j={from:e,to:l}}i=o.colorFunction(j,b,o,f);if(typeof(i)=="object"){for(var k in i){c[k]=i[k]}}else{c.fillColor=i}}else{for(var k in c){if(o[k]){c[k]=o[k]}}if(!o.fillColor&&!o.color){c.fillColor=this._getColorFromScheme(m,d,b)}else{o.fillColor=o.fillColor||o.color}}var n={fillColor:{baseColor:"fillColor",adjust:1},fillColorSelected:{baseColor:"fillColor",adjust:1.1},fillColorSymbol:{baseColor:"fillColor",adjust:1},fillColorSymbolSelected:{baseColor:"fillColorSymbol",adjust:2},fillColorAlt:{baseColor:"fillColor",adjust:4},fillColorAltSelected:{baseColor:"fillColor",adjust:3},lineColor:{baseColor:"fillColor",adjust:0.95},lineColorSelected:{baseColor:"lineColor",adjust:0.95},lineColorSymbol:{baseColor:"lineColor",adjust:1},lineColorSymbolSelected:{baseColor:"lineColorSelected",adjust:1}};for(var k in c){if(typeof(i)!="object"||!i[k]){if(o[k]){c[k]=o[k]}}}for(var k in c){if(typeof(i)!="object"||!i[k]){if(!o[k]){c[k]=a.jqx.adjustColor(c[n[k].baseColor],n[k].adjust)}}}this._colorsCache.set(h,c);return c},_getItemColorFromScheme:function(d,f,k,h){if(d==undefined||d==""){d=this.colorSchemes[0].name}for(var g=0;g<this.colorSchemes.length;g++){if(d==this.colorSchemes[g].name){break}}var e=0;while(e<=f){if(g==this.colorSchemes.length){g=0}var b=this.colorSchemes[g].colors.length;if(e+b<=f){e+=b;g++}else{var c=this.colorSchemes[g].colors[f-e];if(this._isGreyScale(k,h)&&c.indexOf("#")==0){c=a.jqx.toGreyScale(c)}return c}}},getColorScheme:function(b){for(var c=0;c<this.colorSchemes.length;c++){if(this.colorSchemes[c].name==b){return this.colorSchemes[c].colors}}return undefined},addColorScheme:function(c,b){for(var d=0;d<this.colorSchemes.length;d++){if(this.colorSchemes[d].name==c){this.colorSchemes[d].colors=b;return}}this.colorSchemes.push({name:c,colors:b})},removeColorScheme:function(b){for(var c=0;c<this.colorSchemes.length;c++){if(this.colorSchemes[c].name==b){this.colorSchemes.splice(c,1);break}}},colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_formatValue:function(g,i,c,f,b,d){if(g==undefined){return""}if(this._isObject(g)&&!this._isDate(g)&&!c){return""}if(c){if(!a.isFunction(c)){return g.toString()}try{return c(g,d,b,f)}catch(h){return h.message}}if(this._isNumber(g)){return this._formatNumber(g,i)}if(this._isDate(g)){return this._formatDate(g,i)}if(i){return(i.prefix||"")+g.toString()+(i.sufix||"")}return g.toString()},_getFormattedValue:function(f,h,A,p,d,l){var w=this.seriesGroups[f];var n=w.series[h];var m="";var j=p,k=d;if(!k){k=n.formatFunction||w.formatFunction}if(!j){j=n.formatSettings||w.formatSettings}if(!n.formatFunction&&n.formatSettings){k=undefined}var o={},t=0;for(var b in n){if(b.indexOf("dataField")==0){o[b.substring(9).toLowerCase()]=this._getDataValue(A,n[b],f);t++}}if(t==0){o=this._getDataValue(A,undefined,f)}if(w.type.indexOf("waterfall")!=-1&&this._isSummary(f,A)){o=this._renderData[f].offsets[h][A].value;t=0}if(k&&a.isFunction(k)){try{return k(t==1?o[""]:o,A,n,w)}catch(z){return z.message}}if(t==1&&this._isPieGroup(f)){return this._formatValue(o[""],j,k,f,h,A)}if(t>0){var u=0;for(var b in o){if(u>0&&m!=""){m+="<br>"}var r="dataField"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var q="displayText"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var v=n[q]||n[r];var c=o[b];if(undefined!=c){c=this._formatValue(c,j,k,f,h,A)}else{continue}if(l===true){m+=c}else{m+=v+": "+c}u++}}else{if(undefined!=o){m=this._formatValue(o,j,k,f,h,A)}}return m||""},_isNumberAsString:function(d){if(typeof(d)!="string"){return false}d=a.trim(d);for(var b=0;b<d.length;b++){var c=d.charAt(b);if((c>="0"&&c<="9")||c==","||c=="."){continue}if(c=="-"&&b==0){continue}if((c=="("&&b==0)||(c==")"&&b==d.length-1)){continue}return false}return true},_castAsDate:function(f,c){if(f instanceof Date&&!isNaN(f)){return f}if(typeof(f)=="string"){var b;if(c){b=a.jqx.dataFormat.parsedate(f,c);if(this._isDate(b)){return b}}if(this._autoDateFormats){for(var e=0;e<this._autoDateFormats.length;e++){b=a.jqx.dataFormat.parsedate(f,this._autoDateFormats[e]);if(this._isDate(b)){return b}}}var d=this._detectDateFormat(f);if(d){b=a.jqx.dataFormat.parsedate(f,d);if(this._isDate(b)){this._autoDateFormats.push(d);return b}}b=new Date(f);if(this._isDate(b)){if(f.indexOf(":")==-1){b.setHours(0,0,0,0)}}return b}return undefined},_castAsNumber:function(c){if(c instanceof Date&&!isNaN(c)){return c.valueOf()}if(typeof(c)=="string"){if(this._isNumber(c)){c=parseFloat(c)}else{if(!/[a-zA-Z]/.test(c)){var b=new Date(c);if(b!=undefined){c=b.valueOf()}}}}return c},_isNumber:function(b){if(typeof(b)=="string"){if(this._isNumberAsString(b)){b=parseFloat(b)}}return typeof b==="number"&&isFinite(b)},_isDate:function(b){return b instanceof Date&&!isNaN(b.getDate())},_isBoolean:function(b){return typeof b==="boolean"},_isObject:function(b){return(b&&(typeof b==="object"||a.isFunction(b)))||false},_formatDate:function(d,c){var b=d.toString();if(c){if(c.dateFormat){b=a.jqx.dataFormat.formatDate(d,c.dateFormat)}b=(c.prefix||"")+b+(c.sufix||"")}return b},_formatNumber:function(n,e){if(!this._isNumber(n)){return n}e=e||{};var q=".";var o="";var r=this;if(r.localization){q=r.localization.decimalSeparator||r.localization.decimalseparator||q;o=r.localization.thousandsSeparator||r.localization.thousandsseparator||o}if(e.decimalSeparator){q=e.decimalSeparator}if(e.thousandsSeparator){o=e.thousandsSeparator}var m=e.prefix||"";var p=e.sufix||"";var h=e.decimalPlaces;if(isNaN(h)){h=this._getDecimalPlaces([n],undefined,3)}var l=e.negativeWithBrackets||false;var g=(n<0);if(g&&l){n*=-1}var d=n.toString();var b;var k=Math.pow(10,h);d=(Math.round(n*k)/k).toString();if(isNaN(d)){d=""}b=d.lastIndexOf(".");if(h>0){if(b<0){d+=q;b=d.length-1}else{if(q!=="."){d=d.replace(".",q)}}while((d.length-1-b)<h){d+="0"}}b=d.lastIndexOf(q);b=(b>-1)?b:d.length;var f=d.substring(b);var c=0;for(var j=b;j>0;j--,c++){if((c%3===0)&&(j!==b)&&(!g||(j>1)||(g&&l))){f=o+f}f=d.charAt(j-1)+f}d=f;if(g&&l){d="("+d+")"}return m+d+p},_defaultNumberFormat:{prefix:"",sufix:"",decimalSeparator:".",thousandsSeparator:",",decimalPlaces:2,negativeWithBrackets:false},_calculateControlPoints:function(g,f){var e=g[f],m=g[f+1],d=g[f+2],j=g[f+3],c=g[f+4],i=g[f+5];var l=0.4;var o=Math.sqrt(Math.pow(d-e,2)+Math.pow(j-m,2));var b=Math.sqrt(Math.pow(c-d,2)+Math.pow(i-j,2));var h=(o+b);if(h==0){h=1}var n=l*o/h;var k=l-n;return[d+n*(e-c),j+n*(m-i),d-k*(e-c),j-k*(m-i)]},_getBezierPoints:function(d){var c="";var h=[],e=[];var g=d.split(" ");for(var f=0;f<g.length;f++){var j=g[f].split(",");h.push(parseFloat(j[0]));h.push(parseFloat(j[1]));if(isNaN(h[h.length-1])||isNaN(h[h.length-2])){continue}}var b=h.length;if(b<=1){return""}else{if(b==2){c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" L"+a.jqx._ptrnd(h[0]+1)+","+a.jqx._ptrnd(h[1]+1)+" ";return c}}for(var f=0;f<b-4;f+=2){e=e.concat(this._calculateControlPoints(h,f))}for(var f=2;f<b-5;f+=2){c+=" C"+a.jqx._ptrnd(e[2*f-2])+","+a.jqx._ptrnd(e[2*f-1])+" "+a.jqx._ptrnd(e[2*f])+","+a.jqx._ptrnd(e[2*f+1])+" "+a.jqx._ptrnd(h[f+2])+","+a.jqx._ptrnd(h[f+3])+" "}if(b<=4||(Math.abs(h[0]-h[2])<3||Math.abs(h[1]-h[3])<3)||this._isVML){c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" L"+a.jqx._ptrnd(h[2])+","+a.jqx._ptrnd(h[3])+" "+c}else{c="M"+a.jqx._ptrnd(h[0])+","+a.jqx._ptrnd(h[1])+" Q"+a.jqx._ptrnd(e[0])+","+a.jqx._ptrnd(e[1])+" "+a.jqx._ptrnd(h[2])+","+a.jqx._ptrnd(h[3])+" "+c}if(b>=4&&(Math.abs(h[b-2]-h[b-4])<3||Math.abs(h[b-1]-h[b-3])<3||this._isVML)){c+=" L"+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}else{if(b>=5){c+=" Q"+a.jqx._ptrnd(e[b*2-10])+","+a.jqx._ptrnd(e[b*2-9])+" "+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}}return c},_animTickInt:50,_createAnimationGroup:function(b){if(!this._animGroups){this._animGroups={}}this._animGroups[b]={animations:[],startTick:NaN}},_startAnimation:function(c){var e=new Date();var b=e.getTime();this._animGroups[c].startTick=b;this._runAnimation();this._enableAnimTimer()},_enqueueAnimation:function(e,d,c,g,f,b,h){if(g<0){g=0}if(h==undefined){h="easeInOutSine"}this._animGroups[e].animations.push({key:d,properties:c,duration:g,fn:f,context:b,easing:h})},_stopAnimations:function(){clearTimeout(this._animtimer);this._animtimer=undefined;this._animGroups=undefined},_enableAnimTimer:function(){if(!this._animtimer){var b=this;this._animtimer=setTimeout(function(){b._runAnimation()},this._animTickInt)}},_runAnimation:function(q){if(this._animGroups){var t=new Date();var h=t.getTime();var o={};for(var l in this._animGroups){var s=this._animGroups[l].animations;var m=this._animGroups[l].startTick;var g=0;for(var n=0;n<s.length;n++){var u=s[n];var b=(h-m);if(u.duration>g){g=u.duration}var r=u.duration>0?b/u.duration:1;var k=r;if(u.easing&&u.duration!=0){k=a.easing[u.easing](r,b,0,1,u.duration)}if(r>1){r=1;k=1}if(u.fn){u.fn(u.key,u.context,k);continue}var f={};for(var l=0;l<u.properties.length;l++){var c=u.properties[l];var e=0;if(r==1){e=c.to}else{e=easeParecent*(c.to-c.from)+c.from}f[c.key]=e}this.renderer.attr(u.key,f)}if(m+g>h){o[l]=({startTick:m,animations:s})}}this._animGroups=o;if(this.renderer instanceof a.jqx.HTML5Renderer){this.renderer.refresh()}}this._animtimer=null;for(var l in this._animGroups){this._enableAnimTimer();break}},_fixCoords:function(d,e){var b=this.seriesGroups[e].orientation=="horizontal";if(!b){return d}var c=d.x;d.x=d.y;d.y=c+this._plotRect.y-this._plotRect.x;var c=d.width;d.width=d.height;d.height=c;return d},getItemCoord:function(b,d,u){var k=this;if(k._isPieGroup(b)&&(!k._isSerieVisible(b,d,u)||!k._renderData||k._renderData.length<=b)){return{x:NaN,y:NaN}}if(!k._isSerieVisible(b,d)||!k._renderData||k._renderData.length<=b){return{x:NaN,y:NaN}}var q=k.seriesGroups[b];var j=q.series[d];var o=k._getItemCoord(b,d,u);if(k._isPieGroup(b)){if(isNaN(o.x)||isNaN(o.y)||isNaN(o.fromAngle)||isNaN(o.toAngle)){return{x:NaN,y:NaN}}var i=this._plotRect;var p=o.fromAngle*(Math.PI/180);var e=o.toAngle*(Math.PI/180);x1=i.x+o.center.x+Math.cos(p)*o.outerRadius;x2=i.x+o.center.x+Math.cos(e)*o.outerRadius;y1=i.y+o.center.y-Math.sin(p)*o.outerRadius;y2=i.y+o.center.y-Math.sin(e)*o.outerRadius;var h=Math.min(x1,x2);var m=Math.abs(x2-x1);var f=Math.min(y1,y2);var l=Math.abs(y2-y1);o={x:h,y:f,width:m,height:l,center:o.center,centerOffset:o.centerOffset,innerRadius:o.innerRadius,outerRadius:o.outerRadius,selectedRadiusChange:o.selectedRadiusChange,fromAngle:o.fromAngle,toAngle:o.toAngle};return o}if(q.type.indexOf("column")!=-1||q.type.indexOf("waterfall")!=-1){var v=this._getColumnSerieWidthAndOffset(b,d);o.height=Math.abs(o.y.to-o.y.from);o.y=Math.min(o.y.to,o.y.from);o.x+=v.offset;o.width=v.width}else{if(q.type.indexOf("ohlc")!=-1||q.type.indexOf("candlestick")!=-1){var v=this._getColumnSerieWidthAndOffset(b,d);var f=o.y;var t=Math.min(f.Open,f.Close,f.Low,f.High);var r=Math.max(f.Open,f.Close,f.Low,f.High);o.height=Math.abs(r-t);o.y=t;o.x+=v.offset;o.width=v.width}else{if(q.type.indexOf("line")!=-1||q.type.indexOf("area")!=-1){o.width=o.height=0;o.y=o.y.to}else{if(q.type.indexOf("bubble")!=-1||q.type.indexOf("scatter")!=-1){o.center={x:o.x,y:o.y.to};var c=o.y.radius;if(j.symbolType!="circle"&&j.symbolType!=undefined){c/=2}o.y=o.y.to;o.radius=c;o.width=2*c;o.height=2*c}}}}o=this._fixCoords(o,b);if(q.polar||q.spider){var n=this._toPolarCoord(this._renderData[b].polarCoords,this._plotRect,o.x,o.y);o.x=n.x;o.y=n.y;if(o.center){o.center=this._toPolarCoord(this._renderData[b].polarCoords,this._plotRect,o.center.x,o.center.y)}}if(q.type.indexOf("bubble")!=-1||q.type.indexOf("scatter")!=-1){o.x-=c;o.y-=c}return o},_getItemCoord:function(o,j,b){var e=this.seriesGroups[o],l,k;if(!e||!this._renderData){return{x:NaN,y:NaN}}var f=e.series[j];if(!f){return{x:NaN,y:NaN}}var h=this._plotRect;if(this._isPieGroup(o)){var m=this._renderData[o].offsets[j][b];if(!m){return{x:NaN,y:NaN}}var c=(m.fromAngle+m.toAngle)/2*(Math.PI/180);l=h.x+m.x+Math.cos(c)*m.outerRadius;k=h.y+m.y-Math.sin(c)*m.outerRadius;return{x:l,y:k,center:{x:m.x,y:m.y},centerOffset:m.centerOffset,innerRadius:m.innerRadius,outerRadius:m.outerRadius,selectedRadiusChange:m.selectedRadiusChange,fromAngle:m.fromAngle,toAngle:m.toAngle}}else{l=h.x+this._renderData[o].xoffsets.data[b];k=this._renderData[o].offsets[j][b];if(isNaN(l)||!k){return{x:NaN,y:NaN}}}var n={};for(var d in k){n[d]=k[d]}return{x:l,y:n}},getXAxisValue:function(g,r){var q=this.seriesGroups[r];if(!q){return undefined}var c=this._getXAxis(r);var n=this._plotRect;var b=0;var m=NaN;var e=this._renderData[0].xoffsets.axisStats;var f=0,l=0;if(q.polar||q.spider){if(isNaN(g.x)||isNaN(g.y)){return NaN}var h=this._getPolarAxisCoords(r,n);var k=a.jqx._ptdist(g.x,g.y,h.x,h.y);if(k>h.r){return NaN}var i=Math.atan2(h.y-g.y,g.x-h.x);i=Math.PI/2-i;if(i<0){i=2*Math.PI+i}m=i*h.r;var j=h.startAngle+Math.PI/2;var d=h.endAngle+Math.PI/2;f=j*h.r;l=d*h.r;b=(d-j)*h.r;var o=this._getPaddingSize(e,c,c.valuesOnTicks,b,true,h.isClosedCircle,this._hasColumnSeries());if(h.isClosedCircle){b-=(o.left+o.right);l-=(o.left+o.right)}else{if(!c.valuesOnTicks){f+=o.left;l-=o.right}}}else{if(q.orientation!="horizontal"){if(g<n.x||g>n.x+n.width){return NaN}m=g-n.x;b=n.width}else{if(g<n.y||g>n.y+n.height){return NaN}m=g-n.y;b=n.height}if(this._renderData[r]&&this._renderData[r].xoffsets){var o=this._renderData[r].xoffsets.padding;b-=(o.left+o.right);m-=o.left}l=b}var p=this._jqxPlot.scale(m,{min:f,max:l},{min:e.min.valueOf(),max:e.max.valueOf(),type:e.logAxis.enabled?"logarithmic":"linear",base:e.logAxis.base,flip:c.flip});return p},getValueAxisValue:function(c,j){var i=this.seriesGroups[j];if(!i){return undefined}var k=this._getValueAxis(j);var g=this._plotRect;var b=0;var f=NaN;if(i.polar||i.spider){if(isNaN(c.x)||isNaN(c.y)){return NaN}var e=this._getPolarAxisCoords(j,g);f=a.jqx._ptdist(c.x,c.y,e.x,e.y);b=e.r;f=b-f}else{if(i.orientation=="horizontal"){if(c<g.x||c>g.x+g.width){return NaN}f=c-g.x;b=g.width}else{if(c<g.y||c>g.y+g.height){return NaN}f=c-g.y;b=g.height}}var d=this._stats.seriesGroups[j];var h=this._jqxPlot.scale(f,{min:0,max:b},{min:d.min.valueOf(),max:d.max.valueOf(),type:d.logarithmic?"logarithmic":"linear",base:d.logBase,flip:!k.flip});return h},_detectDateFormat:function(g,e){var d={en_US_d:"M/d/yyyy",en_US_D:"dddd, MMMM dd, yyyy",en_US_t:"h:mm tt",en_US_T:"h:mm:ss tt",en_US_f:"dddd, MMMM dd, yyyy h:mm tt",en_US_F:"dddd, MMMM dd, yyyy h:mm:ss tt",en_US_M:"MMMM dd",en_US_Y:"yyyy MMMM",en_US_S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",en_CA_d:"dd/MM/yyyy",en_CA_D:"MMMM-dd-yy",en_CA_f:"MMMM-dd-yy h:mm tt",en_CA_F:"MMMM-dd-yy h:mm:ss tt",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",de_DE_d:"dd.MM.yyyy",de_DE_D:"dddd, d. MMMM yyyy",de_DE_t:"HH:mm",de_DE_T:"HH:mm:ss",de_DE_f:"dddd, d. MMMM yyyy HH:mm",de_DE_F:"dddd, d. MMMM yyyy HH:mm:ss",de_DE_M:"dd MMMM",de_DE_Y:"MMMM yyyy",fr_FR_d:"dd/MM/yyyy",fr_FR_D:"dddd d MMMM yyyy",fr_FR_t:"HH:mm",fr_FR_T:"HH:mm:ss",fr_FR_f:"dddd d MMMM yyyy HH:mm",fr_FR_F:"dddd d MMMM yyyy HH:mm:ss",fr_FR_M:"d MMMM",fr_FR_Y:"MMMM yyyy",it_IT_d:"dd/MM/yyyy",it_IT_D:"dddd d MMMM yyyy",it_IT_t:"HH:mm",it_IT_T:"HH:mm:ss",it_IT_f:"dddd d MMMM yyyy HH:mm",it_IT_F:"dddd d MMMM yyyy HH:mm:ss",it_IT_M:"dd MMMM",it_IT_Y:"MMMM yyyy",ru_RU_d:"dd.MM.yyyy",ru_RU_D:"d MMMM yyyy '?.'",ru_RU_t:"H:mm",ru_RU_T:"H:mm:ss",ru_RU_f:"d MMMM yyyy '?.' H:mm",ru_RU_F:"d MMMM yyyy '?.' H:mm:ss",ru_RU_Y:"MMMM yyyy",cs_CZ_d:"d.M.yyyy",cs_CZ_D:"d. MMMM yyyy",cs_CZ_t:"H:mm",cs_CZ_T:"H:mm:ss",cs_CZ_f:"d. MMMM yyyy H:mm",cs_CZ_F:"d. MMMM yyyy H:mm:ss",cs_CZ_M:"dd MMMM",cs_CZ_Y:"MMMM yyyy",he_IL_d:"dd MMMM yyyy",he_IL_D:"dddd dd MMMM yyyy",he_IL_t:"HH:mm",he_IL_T:"HH:mm:ss",he_IL_f:"dddd dd MMMM yyyy HH:mm",he_IL_F:"dddd dd MMMM yyyy HH:mm:ss",he_IL_M:"dd MMMM",he_IL_Y:"MMMM yyyy",hr_HR_d:"d.M.yyyy.",hr_HR_D:"d. MMMM yyyy.",hr_HR_t:"H:mm",hr_HR_T:"H:mm:ss",hr_HR_f:"d. MMMM yyyy. H:mm",hr_HR_F:"d. MMMM yyyy. H:mm:ss",hr_HR_M:"d. MMMM",hu_HU_d:"yyyy.MM.dd.",hu_HU_D:"yyyy. MMMM d.",hu_HU_t:"H:mm",hu_HU_T:"H:mm:ss",hu_HU_f:"yyyy. MMMM d. H:mm",hu_HU_F:"yyyy. MMMM d. H:mm:ss",hu_HU_M:"MMMM d.",hu_HU_Y:"yyyy. MMMM",jp_JP_d:"gg y/M/d",jp_JP_D:"gg y'?'M'?'d'?'",jp_JP_t:"H:mm",jp_JP_T:"H:mm:ss",jp_JP_f:"gg y'?'M'?'d'?' H:mm",jp_JP_F:"gg y'?'M'?'d'?' H:mm:ss",jp_JP_M:"M'?'d'?'",jp_JP_Y:"gg y'?'M'?'",lt_LT_d:"yyyy.MM.dd",lt_LT_D:"yyyy 'm.' MMMM d 'd.'",lt_LT_t:"HH:mm",lt_LT_T:"HH:mm:ss",lt_LT_f:"yyyy 'm.' MMMM d 'd.' HH:mm",lt_LT_F:"yyyy 'm.' MMMM d 'd.' HH:mm:ss",lt_LT_M:"MMMM d 'd.'",lt_LT_Y:"yyyy 'm.' MMMM",sa_IN_d:"dd-MM-yyyy",sa_IN_D:"dd MMMM yyyy dddd",sa_IN_t:"HH:mm",sa_IN_T:"HH:mm:ss",sa_IN_f:"dd MMMM yyyy dddd HH:mm",sa_IN_F:"dd MMMM yyyy dddd HH:mm:ss",sa_IN_M:"dd MMMM",basic_y:"yyyy",basic_ym:"yyyy-MM",basic_d:"yyyy-MM-dd",basic_dhm:"yyyy-MM-dd hh:mm",basic_bhms:"yyyy-MM-dd hh:mm:ss",basic2_ym:"MM-yyyy",basic2_d:"MM-dd-yyyy",basic2_dhm:"MM-dd-yyyy hh:mm",basic2_dhms:"MM-dd-yyyy hh:mm:ss",basic3_ym:"yyyy/MM",basic3_d:"yyyy/MM/dd",basic3_dhm:"yyyy/MM/dd hh:mm",basic3_bhms:"yyyy/MM/dd hh:mm:ss",basic4_ym:"MM/yyyy",basic4_d:"MM/dd/yyyy",basic4_dhm:"MM/dd/yyyy hh:mm",basic4_dhms:"MM/dd/yyyy hh:mm:ss"};if(e){d=a.extend({},d,e)}var c=[];if(!a.isArray(g)){c.push(g)}else{c=g}for(var f in d){d[f]={format:d[f],count:0}}for(var h=0;h<c.length;h++){value=c[h];if(value==null||value==undefined){continue}for(var f in d){var b=a.jqx.dataFormat.parsedate(value,d[f].format);if(b!=null){d[f].count++}}}var k={key:undefined,count:0};for(var f in d){if(d[f].count>k.count){k.key=f;k.count=d[f].count}}return k.key?d[k.key].format:""},_testXAxisDateFormat:function(h){var k=this;var d=k._getXAxis(h);var c=k._getDataLen(h);var e={};if(k.localization&&k.localization.patterns){for(var j in k.localization.patterns){e["local_"+j]=k.localization.patterns[j]}}var g=[];for(var f=0;f<c&&f<10;f++){value=k._getDataValue(f,d.dataField,h);if(value==null||value==undefined){continue}g.push(value)}var b=k._detectDateFormat(g,e);return b}})})(jqxBaseFramework);
 
 (function(a){a.extend(a.jqx._jqxChart.prototype,{_moduleApi:true,getItemsCount:function(f,b){var d=this.seriesGroups[f];if(!this._isSerieVisible(f,b)){return 0}var e=this._renderData;if(!d||!e||e.length<=f){return 0}var c=d.series[b];if(!c){return 0}return e[f].offsets[b].length},getXAxisRect:function(c){var b=this._renderData;if(!b||b.length<=c){return undefined}if(!b[c].xAxis){return undefined}return b[c].xAxis.rect},getXAxisLabels:function(k){var d=[];var l=this._renderData;if(!l||l.length<=k){return d}l=l[k].xAxis;if(!l){return d}var j=this.seriesGroups[k];if(j.polar||j.spider){for(var e=0;e<l.polarLabels.length;e++){var h=l.polarLabels[e];d.push({offset:{x:h.x,y:h.y},value:h.value})}return d}var c=this._getXAxis(k);var g=this.getXAxisRect(k);var b=c.position=="top"||c.position=="right";var f=j.orientation=="horizontal";for(var e=0;e<l.data.length;e++){if(f){d.push({offset:{x:g.x+(b?0:g.width),y:g.y+l.data.data[e]},value:l.data.xvalues[e]})}else{d.push({offset:{x:g.x+l.data.data[e],y:g.y+(b?g.height:0)},value:l.data.xvalues[e]})}}return d},getValueAxisRect:function(c){var b=this._renderData;if(!b||b.length<=c){return undefined}if(!b[c].valueAxis){return undefined}return b[c].valueAxis.rect},getValueAxisLabels:function(h){var c=[];var j=this._renderData;if(!j||j.length<=h){return c}j=j[h].valueAxis;if(!j){return c}var k=this._getValueAxis(h);var b=k.position=="top"||k.position=="right";var g=this.seriesGroups[h];var e=g.orientation=="horizontal";if(g.polar||g.spider){for(var d=0;d<j.polarLabels.length;d++){var f=j.polarLabels[d];c.push({offset:{x:f.x,y:f.y},value:f.value})}return c}for(var d=0;d<j.items.length;d++){if(e){c.push({offset:{x:j.itemOffsets[j.items[d]].x+j.itemWidth/2,y:j.rect.y+(b?j.rect.height:0)},value:j.items[d]})}else{c.push({offset:{x:j.rect.x+j.rect.width,y:j.itemOffsets[j.items[d]].y+j.itemWidth/2},value:j.items[d]})}}return c},getPlotAreaRect:function(){return this._plotRect},getRect:function(){return this._rect},showToolTip:function(f,c,e,b,d){var g=this.getItemCoord(f,c,e);if(isNaN(g.x)||isNaN(g.y)){return}this._startTooltipTimer(f,c,e,g.x,g.y,b,d)},hideToolTip:function(c){if(isNaN(c)){c=0}var b=this;b._cancelTooltipTimer();setTimeout(function(){b._hideToolTip(0)},c)},})})(jqxBaseFramework);
 
@@ -48,13 +48,13 @@
 
 (function(a){a.jqx.jqxWidget("jqxColorPicker","",{});a.extend(a.jqx._jqxColorPicker.prototype,{defineInstance:function(){var b={disabled:false,height:null,width:null,color:new a.jqx.color({hex:"ff0000"}),redString:"R:",greenString:"G:",blueString:"B:",showTransparent:false,colorMode:"saturation",_delayLoading:false,events:["colorchange"]};if(this===a.jqx._jqxColorPicker.prototype){return b}a.extend(true,this,b);return b},_createFromInput:function(c){var e=this;if(e.element.nodeName.toLowerCase()=="input"){e.field=e.element;if(e.field.className){e._className=e.field.className}var d={title:e.field.title};if(e.field.getAttribute("value")){var g=e.field.getAttribute("value");e.color=new a.jqx.color({hex:g})}if(e.field.id.length){d.id=e.field.id.replace(/[^\w]/g,"_")+"_"+c}else{d.id=a.jqx.utilities.createId()+"_"+c}var h=a("<div></div>",d);h[0].style.cssText=e.field.style.cssText;if(!e.width){e.width=a(e.field).width()}if(!e.height){e.height=a(e.field).outerHeight()}a(e.field).hide().after(h);var f=e.host.data();e.host=h;e.host.data(f);e.element=h[0];e.element.id=e.field.id;e.field.id=d.id;if(e._className){e.host.addClass(e._className);a(e.field).removeClass(e._className)}if(e.field.tabIndex){var b=e.field.tabIndex;e.field.tabIndex=-1;e.element.tabIndex=b}}},createInstance:function(c){this._createFromInput("jqxColorPicker");this.render();var b=this;a.jqx.utilities.resize(this.host,function(){b._setSize();b.refresh()},false,!this._delayLoading)},render:function(){this.element.innerHTML="";var b=this;this._isTouchDevice=a.jqx.mobile.isTouchDevice();if(typeof this.color=="string"){this.color=new a.jqx.color({hex:this.color})}this._setSize();this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-reset"));this.host.addClass(this.toThemeProperty("jqx-color-picker"));this.container=a("<div style='width: 100%; height: 100%; position: relative;'></div>");this.container.appendTo(this.host);this.colorMap=a("<div style='left: 0; top: 0; position: absolute;'></div>");this.colorMap.appendTo(this.container);this.colorBar=a("<div style='left: 0; top: 0; position: absolute;'></div>");this.colorBar.appendTo(this.container);this.colorPanel=a("<div style='left: 0; top: 0; position: absolute;'></div>");this.colorPanel.appendTo(this.container);this.hexPanel=a("<div style='float: left;'></div>");this.hexPanel.appendTo(this.colorPanel);this.hexPanel.append('<span style="text-align: left;" >#</span>');this.hex=a("<input maxlength='6' style='height: 18px;'/>");this.hex.addClass(this.toThemeProperty("jqx-input"));this.hex.addClass(this.toThemeProperty("jqx-widget-content"));this.hex.appendTo(this.hexPanel);this.colorPanel.append('<div style="font-size: 1px; clear: both;"></div>');this.rgb=a("<div style='margin-top: 2px;'></div>");this.rgb.appendTo(this.colorPanel);this.red=a("<input style='width: 25px; height: 18px;' maxlength='3'/>");this.red.addClass(this.toThemeProperty("jqx-input"));this.red.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append('<span style="text-align: left;">'+this.redString+"</span>");this.red.appendTo(this.rgb);this.green=a("<input style='margin-right: 2px; height: 18px; width: 25px;' maxlength='3'/>");this.green.addClass(this.toThemeProperty("jqx-input"));this.green.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append('<span style="text-align: left;">'+this.greenString+"</span>");this.green.appendTo(this.rgb);this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this._mapImageOverlayURL=this._getImageUrl(this.colorPanel);this.colorPanel.removeClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this.blue=a("<input style='height: 18px; width: 25px;' maxlength='3'/>");this.blue.addClass(this.toThemeProperty("jqx-input"));this.blue.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append('<span style="text-align: left;">'+this.blueString+"</span>");this.blue.appendTo(this.rgb);this.preview=a("<div style='background: red; position: absolute;'></div>");this.preview.addClass(this.toThemeProperty("jqx-widget-content"));this.preview.appendTo(this.colorPanel);this.colorBarPointer=a("<div style='top: 0; left: 0; position: absolute; width: 100%;'></div>");this.colorBarPointer.addClass(this.toThemeProperty("jqx-color-picker-bar-pointer"));this.colorMapPointer=a("<div style='top: 0; left: 0; position: absolute; width: 100%;'></div>");this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"));this.transparent=a("<div style='text-align: center; clear: both;'><a style='text-align: center;' href='#'>transparent</a></div>");if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.element.disabled=true}this._addHandlers()},val:function(b){if(arguments.length==0){return"#"+this.color.hex}this.setColor(b);return this.color.hex},_setPositionFromValue:function(){var d=this;var c=d.color.h;var i=100-d.color.v;var b=d.colorMap.height();var e=d.colorMap.width();var h=c*e/360;var g=i*b/100;if(this.colorMode=="saturation"){var f=100-d.color.s;f=f*b/100;d._saturation=100-d.color.s;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8);d.colorMapImageOverlay.css("opacity",(100-d.color.s)/100)}else{var c=d.color.s;var h=c*e/100;var g=i*b/100;var f=360-d.color.h;f=f*b/360;d._hue=d.color.h;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8)}},updateRGB:function(){var b=this;b.color.setRgb(b.red.val(),b.green.val(),b.blue.val());b._updateUI();b._raiseEvent("0",{color:b.color});b.color.transparent=false},_setPosition:function(f,c,h){var e=parseInt(f.pageX);var g=parseInt(c.offset().left);var b=parseInt(f.pageY);var d=parseInt(c.offset().top);if(this._isTouchDevice){var i=a.jqx.position(f);e=i.left;b=i.top}if(h[0].className.indexOf("jqx-color-picker-bar")==-1){h.css("margin-left",e-8-g)}if(b>=d&&b<=d+c.height()){h.css("margin-top",b-8-d)}},_handleKeyInput:function(c,d,b){if(c.disabled){return}if(!c._validateKey(d)){return d}b.val(c._setValueInRange(b.val(),0,255));this.updateRGB();this._setPositionFromValue()},_addHandlers:function(){var d=this;this.addHandler(this.colorMapPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.colorBarPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.transparent,"click",function(j){d._raiseEvent("0",{color:"transparent"});j.preventDefault();d.color.transparent=true});this.addHandler(this.host,"selectionstart",function(j){j.preventDefault();return false});this.addHandler(this.blue,"keyup blur",function(j){d._handleKeyInput(d,j,d.blue)});this.addHandler(this.green,"keyup blur",function(j){d._handleKeyInput(d,j,d.green)});this.addHandler(this.red,"keyup blur",function(j){d._handleKeyInput(d,j,d.red)});this.addHandler(this.hex,"keyup blur",function(j){if(d.disabled){return}if(!d._validateKey(j)){return j}if(d.hex.val().toString().length==6){d.hex.val(d.color.validateHex(d.hex.val()));d.color.setHex(d.hex.val());d._updateUI();d._setPositionFromValue();d._raiseEvent("0",{color:d.color})}});this.addHandler(this.colorMap,"dragstart",function(j){j.preventDefault();return false});var f=function(k){d._setPosition(k,d.colorMap,d.colorMapPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorMap,360,100);if(j.x>360){j.x=360}d.color.setHsv(j.x,d._saturation!=null?100-d._saturation:100,100-j.y)}else{var j=d._valuesFromMouse(k,d.colorMap,100,100);if(j.x>100){j.x=100}d.color.setHsv(d._hue!=null?d._hue:360,j.x,100-j.y)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var c="mousedown.picker"+this.element.id;if(this._isTouchDevice){c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+this.element.id}this.addHandler(this.colorMap,c,function(j){if(d.disabled){return}d.beginDrag=true;f(j)});var b="mousemove.picker"+this.element.id;if(this._isTouchDevice){b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+this.element.id}this.addHandler(a(document),b,function(j){if(d.disabled){return}if(d.beginDrag==true){f(j);if(d._isTouchDevice){j.preventDefault()}}});if(!this._isTouchDevice){this.addHandler(this.colorBar,"dragstart",function(j){j.preventDefault();return false})}var e=function(k){d._setPosition(k,d.colorBar,d.colorBarPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorBar,100,100);d.color.s=j.y;d._saturation=j.y;d.colorMapImageOverlay.css("opacity",(d.color.s)/100);d.color.setHsv(d.color.h,100-d.color.s,d.color.v)}else{var j=d._valuesFromMouse(k,d.colorBar,100,360);d.color.h=360-j.y;d._hue=d.color.h;d.color.setHsv(d.color.h,d.color.s,d.color.v)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var h="mousemove.colorBar"+this.element.id;var g="mousedown.colorBar"+this.element.id;var i="mouseup.colorBar"+this.element.id;if(this._isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+this.element.id;g=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+this.element.id;i=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+this.element.id}this.addHandler(this.colorBar,g,function(j){if(d.disabled){return}d.beginDragBar=true;e(j)});this.addHandler(a(document),h,function(j){if(d.disabled){return}if(d.beginDragBar==true){e(j);if(d._isTouchDevice){j.preventDefault()}}});this.addHandler(a(document),i,function(j){if(d.disabled){return}d.beginDrag=false;d.beginDragBar=false})},_removeHandlers:function(){this.removeHandler(this.transparent,"click");this.removeHandler(this.host,"selectionstart");this.removeHandler(this.blue,"keyup blur");this.removeHandler(this.green,"keyup blur");this.removeHandler(this.red,"keyup blur");this.removeHandler(this.hex,"keyup blur");this.removeHandler(this.colorMap,"dragstart");this.removeHandler(this.colorBar,"dragstart");this.removeHandler(this.colorMapPointer,"dragStart");this.removeHandler(this.colorBarPointer,"dragStart");var g=this.element.id;var e="mousemove.colorBar"+g;var d="mousedown.colorBar"+g;var f="mouseup.colorBar"+g;var c="mousedown.picker"+g;var b="mousemove.picker"+g;if(this._isTouchDevice){e=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+g;d=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+g;f=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+g;c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+g;b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+g}this.removeHandler(this.colorMap,c);this.removeHandler(this.colorMap,b);this.removeHandler(this.colorBar,d);this.removeHandler(this.colorBar,e);this.removeHandler(a(document),b);this.removeHandler(a(document),e);this.removeHandler(a(document),f)},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c?c:{};e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);return b},setColor:function(b){if(!b){return}if(b=="transparent"){this.color.transparent=true;this.color.hex="000";this.color.r=0;this.color.g=0;this.color.b=0}else{if(b.r){this.color=new a.jqx.color({rgb:b})}else{if(b.substring(0,1)=="#"){this.color=new a.jqx.color({hex:b.substring(1)})}else{this.color=new a.jqx.color({hex:b})}}}this._updateUI();this._setPositionFromValue();this._raiseEvent("0",{color:this.color})},getColor:function(){return this.color},resize:function(c,b){this.width=c;this.height=b;this._setSize();this.refresh()},propertyChangedHandler:function(b,c,e,d){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="colorMode"){b.refresh()}if(c=="color"){b._updateUI();b._setPositionFromValue();b._raiseEvent("0",{color:d})}if(c=="width"||c=="height"){b._setSize();b.refresh()}if(c=="showTransparent"){b.refresh()}if(c=="disabled"){this.element.disabled=d;if(d){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}}},_valuesFromMouse:function(j,g,c,b){var k=0;var i=0;var f=g.offset();var p=g.height();var d=g.width();var n=j.pageX;var m=j.pageY;if(this._isTouchDevice){var l=a.jqx.position(j);n=l.left;m=l.top}if(n<f.left){k=0}else{if(n>f.left+d){k=d}else{k=n-f.left+1}}if(m<f.top){i=0}else{if(m>f.top+p){i=p}else{i=m-f.top+1}}var h=parseInt(k/d*c);var o=parseInt(i/p*b);return{x:h,y:o}},_validateKey:function(b){if(b.keyCode==9||b.keyCode==16||b.keyCode==38||b.keyCode==29||b.keyCode==40||b.keyCode==17||b.keyCode==37||(b.ctrlKey&&(b.keyCode=="c".charCodeAt()||b.keyCode=="v".charCodeAt()))||(b.ctrlKey&&(b.keyCode=="C".charCodeAt()||b.keyCode=="V".charCodeAt()))){return false}if(b.ctrlKey||b.shiftKey){return false}return true},_setValueInRange:function(d,c,b){if(d==""||isNaN(d)){return c}d=parseInt(d);if(d>b){return b}if(d<c){return c}return d},destroy:function(){a.jqx.utilities.resize(this.host,null,true);this.host.removeClass();this._removeHandlers();this.host.remove()},setPointerStyle:function(c){this.colorMapPointer.removeClass();if(c=="transparent"||c.hex==""){this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"))}var b=105;var d=(c.r*0.299)+(c.g*0.587)+(c.b*0.114);var e=(255-d<b)?"Black":"White";if(e=="Black"){this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"))}else{this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer-alt"))}},_updateUI:function(){var c=this;c.red.val(c.color.r);c.green.val(c.color.g);c.blue.val(c.color.b);c.hex.val(c.color.hex);var b=new a.jqx.color({hex:"fff"});if(this.colorMode=="saturation"){b.setHsv(this.color.h,100,this.color.v);c.colorBar.css("background","#"+b.hex)}else{b.setHsv(this.color.h,100,100);c.colorMap.css("background-color","#"+b.hex)}c.preview.css("background","#"+this.color.hex);c.setPointerStyle(this.color)},_setSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}if(this.host.width()<130){this.host.width(150)}if(this.host.height()<70){this.host.height(70)}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height)}},_arrange:function(){var d=this.host.height();var g=this.host.width();var b=d-44;if(this.showTransparent){b=d-64}if(b<=0){return}this.colorMap.width(85*g/100);this.colorMap.height(b);this.colorBar.height(b);this.colorBar.css("left",this.colorMap.width()+4);this.colorBar.width(8*g/100);this.colorBarPointer.width(this.colorBar.width());this.colorPanel.width(g);this.colorPanel.height(40);if(this.showTransparent){this.colorPanel.height(60)}this.colorPanel.css("top",b+4);this.colorPanel.css("text-align","left");this.hex.width(this.colorMap.width()-this.colorBar.width()-4);var c=this.red.prev().outerWidth()-this.hex.prev().outerWidth();if(c<4){c=4}this.hex.css("margin-left",c+"px");this.preview.width(this.colorBar.width()+7);this.preview.height(25);this.preview.addClass(this.toThemeProperty("jqx-rc-all"));this.preview.addClass(this.toThemeProperty("jqx-color-picker-preview"));this.preview.css("left",this.colorMap.width()-2);this.preview.css("top","5px");var e=this.hex.width();var f=e-this.blue.prev().outerWidth()-this.green.prev().outerWidth()-6;if(f>0){this.blue.width(f/3);this.green.width(f/3);this.red.width(f/3);return}},_getColorPointer:function(){var b=a("<div></div>");b.addClass(this.toThemeProperty("jqx-color-picker-pointer"));return b},_getImageUrl:function(c){var b=c.css("backgroundImage");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},refresh:function(){if(this._delayLoading){return}this._saturation=null;this._hue=null;this.colorMap.removeClass();this.colorBar.removeClass();this.colorMap.addClass(this.toThemeProperty("jqx-disableselect"));this.colorBar.addClass(this.toThemeProperty("jqx-disableselect"));this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-panel"));this.colorBar.css("background-image","");this.colorMap.css("background-image","");if(this.colorMode=="saturation"){this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar"))}else{this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map-hue"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar-hue"))}this._barImageURL=this._getImageUrl(this.colorBar);this._mapImageURL=this._getImageUrl(this.colorMap);this._arrange();this.colorBar.children().remove();this.colorBarImageContainer=a("<div style='overflow: hidden;'></div>");this.colorBarImageContainer.width(this.colorBar.width());this.colorBarImageContainer.height(this.colorBar.height());this.colorBarImageContainer.appendTo(this.colorBar);this.colorBarImage=a("<img/>");this.colorBarImage.appendTo(this.colorBarImageContainer);this.colorBarImage.attr("src",this._barImageURL);this.colorBar.css("background-image","none");this.colorBarImage.attr("width",this.colorBar.width());this.colorBarImage.attr("height",this.colorBar.height());this.colorBarPointer.appendTo(this.colorBar);this.colorMap.children().remove();this.colorMapImage=a("<img/>");this.colorMapImage.appendTo(this.colorMap);this.colorMapImage.attr("src",this._mapImageURL);this.colorMap.css("background-image","none");this.colorMapImage.attr("width",this.colorMap.width());this.colorMapImage.attr("height",this.colorMap.height());this.colorMapImageOverlay=a("<img style='position: absolute; left: 0; top: 0;'/>");this.colorMapImageOverlay.prependTo(this.colorMap);this.colorMapImageOverlay.attr("src",this._mapImageOverlayURL);this.colorMapImageOverlay.attr("width",this.colorMap.width());this.colorMapImageOverlay.attr("height",this.colorMap.height());this.colorMapImageOverlay.css("opacity",0);this.colorMapPointer.appendTo(this.colorMap);if(this.showTransparent){this.transparent.appendTo(this.colorPanel)}this._updateUI();this._setPositionFromValue()}});a.jqx.color=function(d){var b={r:0,g:0,b:0,h:0,s:0,v:0,hex:"",hexToRgb:function(i){i=this.validateHex(i);var h="00",f="00",e="00";if(i.length==6){h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}else{if(i.length>4){h=i.substring(4,i.length);i=i.substring(0,4)}if(i.length>2){f=i.substring(2,i.length);i=i.substring(0,2)}if(i.length>0){e=i.substring(0,i.length)}}return{r:this.hexToInt(h),g:this.hexToInt(f),b:this.hexToInt(e)}},validateHex:function(e){e=new String(e).toUpperCase();e=e.replace(/[^A-F0-9]/g,"0");if(e.length>6){e=e.substring(0,6)}return e},webSafeDec:function(e){e=Math.round(e/51);e*=51;return e},hexToWebSafe:function(i){var h,f,e;if(i.length==3){h=i.substring(0,1);f=i.substring(1,1);e=i.substring(2,1)}else{h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}return intToHex(this.webSafeDec(this.hexToInt(h)))+this.intToHex(this.webSafeDec(this.hexToInt(f)))+this.intToHex(this.webSafeDec(this.hexToInt(e)))},rgbToWebSafe:function(e){return{r:this.webSafeDec(e.r),g:this.webSafeDec(e.g),b:this.webSafeDec(e.b)}},rgbToHex:function(e){return this.intToHex(e.r)+this.intToHex(e.g)+this.intToHex(e.b)},intToHex:function(f){var e=(parseInt(f).toString(16));if(e.length==1){e=("0"+e)}return e.toUpperCase()},hexToInt:function(e){return(parseInt(e,16))},hslToRgb:function(v){var n=parseInt(v.h)/360;var w=parseInt(v.s)/100;var k=parseInt(v.l)/100;if(k<=0.5){var f=k*(1+w)}else{var f=k+w-(k*w)}var i=2*k-f;var t=n+(1/3);var j=n;var m=n-(1/3);var e=Math.round(this.hueToRgb(i,f,t)*255);var o=Math.round(this.hueToRgb(i,f,j)*255);var u=Math.round(this.hueToRgb(i,f,m)*255);return{r:e,g:o,b:u}},hueToRgb:function(g,f,e){if(e<0){e+=1}else{if(e>1){e-=1}}if((e*6)<1){return g+(f-g)*e*6}else{if((e*2)<1){return f}else{if((e*3)<2){return g+(f-g)*((2/3)-e)*6}else{return g}}}},rgbToHsv:function(h){var k=h.r/255;var j=h.g/255;var f=h.b/255;hsv={h:0,s:0,v:0};var i=0;var e=0;if(k>=j&&k>=f){e=k;i=(j>f)?f:j}else{if(j>=f&&j>=k){e=j;i=(k>f)?f:k}else{e=f;i=(j>k)?k:j}}hsv.v=e;hsv.s=(e)?((e-i)/e):0;if(!hsv.s){hsv.h=0}else{delta=e-i;if(k==e){hsv.h=(j-f)/delta}else{if(j==e){hsv.h=2+(f-k)/delta}else{hsv.h=4+(k-j)/delta}}hsv.h=parseInt(hsv.h*60);if(hsv.h<0){hsv.h+=360}}hsv.s=parseInt(hsv.s*100);hsv.v=parseInt(hsv.v*100);return hsv},hsvToRgb:function(l){rgb={r:0,g:0,b:0};var k=l.h;var r=l.s;var n=l.v;if(r==0){if(n==0){rgb.r=rgb.g=rgb.b=0}else{rgb.r=rgb.g=rgb.b=parseInt(n*255/100)}}else{if(k==360){k=0}k/=60;r=r/100;n=n/100;var j=parseInt(k);var m=k-j;var g=n*(1-r);var e=n*(1-(r*m));var o=n*(1-(r*(1-m)));switch(j){case 0:rgb.r=n;rgb.g=o;rgb.b=g;break;case 1:rgb.r=e;rgb.g=n;rgb.b=g;break;case 2:rgb.r=g;rgb.g=n;rgb.b=o;break;case 3:rgb.r=g;rgb.g=e;rgb.b=n;break;case 4:rgb.r=o;rgb.g=g;rgb.b=n;break;case 5:rgb.r=n;rgb.g=g;rgb.b=e;break}rgb.r=parseInt(rgb.r*255);rgb.g=parseInt(rgb.g*255);rgb.b=parseInt(rgb.b*255)}return rgb},setRgb:function(h,f,e){var j=function(g){if(g<0||g>255){return 0}if(isNaN(parseInt(g))){return 0}return g};this.r=j(h);this.g=j(f);this.b=j(e);var i=this.rgbToHsv(this);this.h=i.h;this.s=i.s;this.v=i.v;this.hex=this.rgbToHex(this)},setHsl:function(g,f,e){this.h=g;this.s=f;this.l=e;var i=this.hslToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHsv:function(g,f,e){this.h=g;this.s=f;this.v=e;var i=this.hsvToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHex:function(e){this.hex=e;var g=this.hexToRgb(this.hex);this.r=g.r;this.g=g.g;this.b=g.b;var f=this.rgbToHsv(g);this.h=f.h;this.s=f.s;this.v=f.v}};if(d){if(d.hex){var c=b.validateHex(d.hex);b.setHex(c)}else{if(d.r){b.setRgb(d.r,d.g,d.b)}else{if(d.h){b.setHsv(d.h,d.s,d.v)}else{if(d.rgb){b.setRgb(d.rgb.r,d.rgb.g,d.rgb.b)}}}}}return b}})(jqxBaseFramework);
 
-(function(a){a.jqx.jqxWidget("jqxComboBox","",{});a.extend(a.jqx._jqxComboBox.prototype,{defineInstance:function(){var b={disabled:false,width:200,height:25,items:new Array(),selectedIndex:-1,selectedItems:new Array(),_selectedItems:new Array(),source:null,autoItemsHeight:false,scrollBarSize:a.jqx.utilities.scrollBarSize,arrowSize:17,enableHover:true,enableSelection:true,visualItems:new Array(),groups:new Array(),equalItemsWidth:true,itemHeight:-1,visibleItems:new Array(),hint:true,emptyGroupText:"Group",emptyString:"",ready:null,openDelay:250,closeDelay:300,animationType:"default",dropDownWidth:"auto",dropDownHeight:"200px",autoDropDownHeight:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",dropDownContainer:"default",searchMode:"startswithignorecase",autoComplete:false,remoteAutoComplete:false,remoteAutoCompleteDelay:500,selectionMode:"default",minLength:2,displayMember:"",valueMember:"",groupMember:"",searchMember:"",keyboardSelection:true,renderer:null,autoOpen:false,template:"",checkboxes:false,promptText:"",placeHolder:"",rtl:false,listBox:null,validateSelection:null,showCloseButtons:true,renderSelectedItem:null,search:null,popupZIndex:2000,searchString:null,multiSelect:false,showArrow:true,_disabledItems:new Array(),touchMode:"auto",autoBind:true,aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["open","close","select","unselect","change","checkChange","bindingComplete","itemAdd","itemRemove","itemUpdate"]};if(this===a.jqx._jqxComboBox.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;this.host.attr("role","combobox");a.jqx.aria(this,"aria-autocomplete","both");if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw new Error("jqxComboBox: Missing reference to jqxlistbox.js.")}a.jqx.aria(this);if(this.promptText!=""){this.placeHolder=this.promptText}this.render()},render:function(){var i=this;var b=i.element.nodeName.toLowerCase();if(b=="select"||b=="ul"||b=="ol"){i.field=i.element;if(i.field.className){i._className=i.field.className}var h={title:i.field.title};if(i.field.id.length){h.id=i.field.id.replace(/[^\w]/g,"_")+"_jqxComboBox"}else{h.id=a.jqx.utilities.createId()+"_jqxComboBox"}var d=a("<div></div>",h);if(!i.width){i.width=a(i.field).width()}if(!i.height){i.height=a(i.field).outerHeight()}i.element.style.cssText=i.field.style.cssText;a(i.field).hide().after(d);var t=i.host.data();i.host=d;i.host.data(t);i.element=d[0];i.element.id=i.field.id;i.field.id=h.id;if(i._className){i.host.addClass(i._className);a(i.field).removeClass(i._className)}if(i.field.tabIndex){var c=i.field.tabIndex;i.field.tabIndex=-1;i.element.tabIndex=c}if(i.field.innerHTML!=""){var k=a.jqx.parseSourceTag(i.field);i.source=k.items;if(i.selectedIndex==-1){i.selectedIndex=k.index}}}else{if(i.host.find("li").length>0||i.host.find("option").length>0){var k=a.jqx.parseSourceTag(i.element);i.source=k.items}}i.removeHandlers();i.isanimating=false;i.id=a.jqx.utilities.createId();i.element.innerHTML="";var m=a("<div style='background-color: transparent; -webkit-appearance: none; outline: none; width:100%; height: 100%; padding: 0px; margin: 0px; border: 0px; position: relative;'><div id='dropdownlistWrapper' style='padding: 0; margin: 0; border: none; background-color: transparent; float: left; width:100%; height: 100%; position: relative;'><div id='dropdownlistContent' style='padding: 0; margin: 0; border-top: none; border-bottom: none; float: left; position: absolute;'/><div id='dropdownlistArrow' role='button' style='padding: 0; margin: 0; border-left-width: 1px; border-bottom-width: 0px; border-top-width: 0px; border-right-width: 0px; float: right; position: absolute;'/></div></div>");i.comboStructure=m;if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw"jqxComboBox: Missing reference to jqxlistbox.js."}i.touch=a.jqx.mobile.isTouchDevice();if(i.touchMode===true){i.touch=true}i.host.append(m);i.dropdownlistWrapper=i.host.find("#dropdownlistWrapper");i.dropdownlistArrow=i.host.find("#dropdownlistArrow");i.dropdownlistContent=i.host.find("#dropdownlistContent");i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content"));i.dropdownlistContent.addClass(i.toThemeProperty("jqx-widget-content"));i.dropdownlistWrapper[0].id="dropdownlistWrapper"+i.element.id;i.dropdownlistArrow[0].id="dropdownlistArrow"+i.element.id;i.dropdownlistContent[0].id="dropdownlistContent"+i.element.id;if(i.template){i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-"+i.template+""))}i.dropdownlistContent.append(a('<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="box-sizing: border-box; margin: 0; padding: 0; padding-left: 3px; padding-right: 3px; border: 0;" type="textarea"/>'));i.input=i.dropdownlistContent.find("input");i.input.addClass(i.toThemeProperty("jqx-combobox-input"));i.input.addClass(i.toThemeProperty("jqx-widget-content"));if(i.host.attr("tabindex")){i.input.attr("tabindex",i.host.attr("tabindex"));i.host.removeAttr("tabindex")}var j=a("<label></label");if(this.hint){j[0].innerHTML=this.placeHolder}j.addClass(i.toThemeProperty("jqx-input-label"));i.dropdownlistWrapper.append(j);i.label=j;var r=a("<span></span>");i.dropdownlistWrapper.append(r);r.addClass(i.toThemeProperty("jqx-input-bar"));i.bar=r;var i=this;if(i.template){i.bar.addClass(i.toThemeProperty("jqx-"+i.template));i.label.addClass(i.toThemeProperty("jqx-"+i.template))}i._addInput();if(i.rtl){i.input.css({direction:"rtl"});i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-rtl"))}try{var q="listBox"+i.id;var g=a(a.find("#"+q));if(g.length>0){g.remove()}a.jqx.aria(this,"aria-owns",q);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-multiline",false);if(i.listBoxContainer){i.listBoxContainer.jqxListBox("destroy")}if(i.container){i.container.remove()}var l=a("<div style='overflow: hidden; border: none; background-color: transparent; position: absolute;' id='listBox"+i.id+"'><div id='innerListBox"+i.id+"'></div></div>");l.hide();if(i.dropDownContainer=="element"){l.appendTo(i.host)}else{l.appendTo(document.body)}i.container=l;i.listBoxContainer=a(a.find("#innerListBox"+i.id));var p=i.width;if(i.dropDownWidth!="auto"){p=i.dropDownWidth}if(i.dropDownHeight==null){i.dropDownHeight=200}i.container.width(parseInt(p)+25);i.container.height(parseInt(i.dropDownHeight)+25);i._ready=false;i.addHandler(i.listBoxContainer,"bindingComplete",function(e){if(!i.listBox){i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance}if(!i._ready){if(i.ready){i.ready()}i._ready=true}i._raiseEvent("6")});i.addHandler(i.listBoxContainer,"itemAdd",function(e){i._raiseEvent("7",e.args)});i.addHandler(i.listBoxContainer,"itemRemove",function(e){i._raiseEvent("8",e.args)});i.addHandler(i.listBoxContainer,"itemUpdate",function(e){i._raiseEvent("9",e.args)});var o=true;i.listBoxContainer.jqxListBox({autoItemsHeight:i.autoItemsHeight,_checkForHiddenParent:false,allowDrop:false,allowDrag:false,checkboxes:i.checkboxes,emptyString:i.emptyString,autoBind:!i.remoteAutoComplete&&i.autoBind,renderer:i.renderer,rtl:i.rtl,itemHeight:i.itemHeight,selectedIndex:i.selectedIndex,incrementalSearch:false,width:p,scrollBarSize:i.scrollBarSize,autoHeight:i.autoDropDownHeight,height:i.dropDownHeight,groupMember:i.groupMember,searchMember:i.searchMember,displayMember:i.displayMember,valueMember:i.valueMember,source:i.source,theme:i.theme,rendered:function(){i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance;if(i.remoteAutoComplete){if(i.autoDropDownHeight){i.container.height(i.listBox.virtualSize.height+25);i.listBoxContainer.height(i.listBox.virtualSize.height);i.listBox._arrange()}else{i.listBox._arrange();i.listBox.ensureVisible(0);i.listBox._renderItems();i.container.height(i.listBoxContainer.height()+25)}if(i.searchString!=undefined&&i.searchString.length>=i.minLength){var e=i.listBoxContainer.jqxListBox("items");if(e){if(e.length>0){if(!i.isOpened()){i.open()}}else{i.close()}}else{i.close()}}else{i.close()}}else{i.renderSelection("mouse");if(i.multiSelect){i.doMultiSelect(false)}}if(i.rendered){i.rendered()}}});if(i.dropDownContainer=="element"){i.listBoxContainer.css({position:"absolute",top:0,left:0})}else{i.listBoxContainer.css({position:"absolute",zIndex:i.popupZIndex,top:0,left:0})}i.listBoxContainer.css("border-top-width","1px");i.listBoxContainer.addClass(i.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){i.listBoxContainer.addClass(i.toThemeProperty("jqx-noshadow"))}if(i.template){i.listBoxContainer.addClass(i.toThemeProperty("jqx-"+i.template+"-item"))}i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance;i.listBox.enableSelection=i.enableSelection;i.listBox.enableHover=i.enableHover;i.listBox.equalItemsWidth=i.equalItemsWidth;i.listBox._arrange();i.addHandler(i.listBoxContainer,"unselect",function(e){if(!i.multiSelect){i._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})}});i.addHandler(i.listBoxContainer,"change",function(e){if(!i.multiSelect){i.selectedIndex=i.listBox.selectedIndex;i._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}});if(i.animationType=="none"){i.container.css("display","none")}else{i.container.hide()}o=false}catch(s){throw s}var i=this;i.input.attr("disabled",i.disabled);var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(!f){if(i.isMaterialized()&&i.hint){i.label[0].innerHTML=i.placeHolder}else{i.input.attr("placeholder",i.placeHolder)}}i.propertyChangeMap.disabled=function(e,v,u,w){if(w){e.host.addClass(i.toThemeProperty("jqx-combobox-state-disabled"));e.host.addClass(i.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-disabled"))}else{e.host.removeClass(i.toThemeProperty("jqx-combobox-state-disabled"));e.host.removeClass(i.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(i.toThemeProperty("jqx-combobox-content-disabled"))}e.input.attr("disabled",e.disabled);a.jqx.aria(e,"aria-disabled",e.disabled);e.input.attr("disabled",e.disabled)};if(i.disabled){i.host.addClass(i.toThemeProperty("jqx-combobox-state-disabled"));i.host.addClass(i.toThemeProperty("jqx-fill-state-disabled"));i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-disabled"))}i.host.addClass(i.toThemeProperty("jqx-combobox-state-normal"));i.host.addClass(i.toThemeProperty("jqx-combobox"));i.host.addClass(i.toThemeProperty("jqx-rc-all"));i.host.addClass(i.toThemeProperty("jqx-widget"));i.host.addClass(i.toThemeProperty("jqx-widget-content"));i.dropdownlistArrowIcon=a("<div></div>");if(i.dropDownVerticalAlignment=="top"){i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon-arrow-up"))}else{i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon-arrow-down"))}i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon"));i.dropdownlistArrow.append(i.dropdownlistArrowIcon);i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-combobox-arrow-normal"));i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-fill-state-normal"));if(!i.rtl){i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-rc-r"))}else{i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-rc-l"))}i._setSize();i._updateHandlers();i.addHandler(i.input,"keyup.textchange",function(e){if(i._writeTimer){clearTimeout(i._writeTimer)}i._writeTimer=setTimeout(function(){var u=i._search(e);if(i.cinput&&i.input){if(!i.displayMember){i.cinput[0].value=i.input[0].value}else{i._updateInputSelection()}}},50)});if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(i.host.parents(".jqx-window").length>0){var n=i.host.parents(".jqx-window").css("z-index");l.css("z-index",n+10);i.listBoxContainer.css("z-index",n+10)}}if(i.checkboxes){i.input.attr("readonly",true);a.jqx.aria(this,"aria-readonly",true)}else{a.jqx.aria(this,"aria-readonly",false)}if(!i.remoteAutoComplete){i.searchString=""}this.bar.css("top",this.host.height())},_addInput:function(){var b=this.host.attr("name");this.cinput=a("<input type='hidden'/>");this.host.append(this.cinput);if(b){this.cinput.attr("name",b)}},_updateInputSelection:function(){if(this.cinput){var c=new Array();if(this.selectedIndex==-1){this.cinput.val("")}else{var e=this.getSelectedItem();if(e!=null){this.cinput.val(e.value);c.push(e.value)}else{this.cinput.val(this.dropdownlistContent.text())}}if(this.checkboxes||this.multiSelect){if(!this.multiSelect){var b=this.getCheckedItems()}else{var b=this.getSelectedItems()}var f="";if(b!=null){for(var d=0;d<b.length;d++){if(d==b.length-1){f+=b[d].value}else{f+=b[d].value+","}c.push(b[d].value)}}this.cinput.val(f)}if(this.field&&this.cinput){if(this.field.nodeName.toLowerCase()=="select"){a.each(this.field,function(g,h){a(this).removeAttr("selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(g,h){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}}},_search:function(d){var i=this;if(d.keyCode==9){return}if(i.searchMode=="none"||i.searchMode==null||i.searchMode=="undefined"){return}if(d.keyCode==16||d.keyCode==17||d.keyCode==20){return}if(i.checkboxes){return}if(i.multiSelect){var l=a("<span style='visibility: hidden; white-space: nowrap;'>"+document.createTextNode(i.input.val())+"</span>");l.addClass(i.toThemeProperty("jqx-widget"));a(document.body).append(l);var e=l.width()+15;l.remove();if(e>i.host.width()){e=i.host.width()}if(e<25){e=25}i.input.css("width",e+"px");if(i.selectedItems.length==0){i.input.css("width","100%");if(!i.isMaterialized()){i.input.attr("placeholder",i.placeHolder)}}else{if(!i.isMaterialized()){i.input.attr("placeholder","")}}var j=parseInt(this._findPos(i.host[0])[1])+parseInt(i.host.outerHeight())-1+"px";var r=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();if((r!=null&&r)){j=a.jqx.mobile.getTopPos(this.element)+parseInt(i.host.outerHeight());if(a("body").css("border-top-width")!="0px"){j=parseInt(j)-this._getBodyOffset().top+"px"}}i.container.css("top",j);var o=parseInt(i.host.height());i.dropdownlistArrow.height(o)}if(!i.isanimating){if(d.altKey&&d.keyCode==38){i.hideListBox("altKey");return false}if(d.altKey&&d.keyCode==40){if(!i.isOpened()){i.showListBox("altKey")}return false}}if(d.keyCode==37||d.keyCode==39){return false}if(d.altKey||d.keyCode==18){return}if(d.keyCode>=33&&d.keyCode<=40){return}if(d.ctrlKey||i.ctrlKey){if(d.keyCode!=88&&d.keyCode!=86){return}}var k=i.input.val();if(k.length==0&&!i.autoComplete){i.listBox.searchString=i.input.val();i.listBox.clearSelection();i.hideListBox("search");i.searchString=i.input.val();return}if(i.remoteAutoComplete){var i=this;var q=function(){i.listBox.vScrollInstance.value=0};if(k.length>=i.minLength){if(!d.ctrlKey&&!d.altKey){if(i.searchString!=k){var c=i.listBoxContainer.jqxListBox("source");if(c==null){i.listBoxContainer.jqxListBox({source:i.source})}if(i._searchTimer){clearTimeout(i._searchTimer)}if(d.keyCode!=13&&d.keyCode!=27){i._searchTimer=setTimeout(function(){q();if(i.autoDropDownHeight){i.listBox.autoHeight=true}i.searchString=i.input.val();if(i.search!=null){i.search(i.input.val())}else{throw"'search' function is not defined"}},i.remoteAutoCompleteDelay)}}i.searchString=k}}else{if(i._searchTimer){clearTimeout(i._searchTimer)}q();i.searchString="";i.search("");i.listBoxContainer.jqxListBox({source:null})}return}var i=this;if(k===i.searchString){return}if(!(d.keyCode=="27"||d.keyCode=="13")){var n=i.input[0].value;var g=i._updateItemsVisibility(k);var m=g.matchItems;if(i.autoComplete&&i.autoItemsHeight){i.input[0].value=n}var h=g.index;if(!i.autoComplete&&!i.remoteAutoComplete){if(!i.multiSelect||(i.multiSelect&&h>=0)){i.listBox.selectIndex(h);var f=i.listBox.isIndexInView(h);if(!f){i.listBox.ensureVisible(h)}else{i.listBox._renderItems()}}}if(i.autoComplete&&m.length===0){i.hideListBox("search")}}if(d.keyCode=="13"){var b=i.container.css("display")=="block";if(b&&!i.isanimating){i.hideListBox("keyboard");i._oldvalue=i.listBox.selectedValue;return}}else{if(d.keyCode=="27"){var b=i.container.css("display")=="block";if(b&&!i.isanimating){if(!i.multiSelect){var p=i.listBox.getVisibleItem(i._oldvalue);if(p){var i=this;setTimeout(function(){if(i.autoComplete){i._updateItemsVisibility("")}i.listBox.selectIndex(p.index);i.renderSelection("api")},i.closeDelay)}else{i.clearSelection()}}else{i.input.val("");i.listBox.selectedValue=null}i.hideListBox("keyboard");i.renderSelection("api");d.preventDefault();return false}}else{if(!i.isOpened()&&!i.opening&&!d.ctrlKey){if(i.listBox.visibleItems&&i.listBox.visibleItems.length>0){if(i.input.val()!=i.searchString&&i.searchString!=undefined&&h!=-1){i.showListBox("search")}}}i.searchString=i.input.val();if(i.searchString==""){if(!i.listBox.itemsByValue[""]){h=-1;if(!i.multiSelect){i.clearSelection()}}}var p=i.listBox.getVisibleItem(h);if(p!=undefined){i._updateInputSelection()}}}},val:function(c){if(!this.input){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(d(c)||arguments.length==0){var b=this.getSelectedItem();if(b){return b.value}return this.input.val()}else{var b=this.getItemByValue(c);if(b!=null){this.selectItem(b)}else{this.input.val(c)}return this.input.val()}},focus:function(){var c=this;var b=function(){c.input.focus();var d=c.input.val();c._setSelection(0,d.length)};b();setTimeout(function(){b()},10)},_setSelection:function(e,b){try{if("selectionStart" in this.input[0]){this.input[0].focus();this.input[0].setSelectionRange(e,b)}else{var c=this.input[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",e);c.select()}}catch(d){}},setContent:function(b){this.input.val(b)},_updateItemsVisibility:function(k){var i=this.getItems();if(i==undefined){return{index:-1,matchItem:new Array()}}var f=this;var g=-1;var l=new Array();var j=0;a.each(i,function(o){var q="";if(!this.isGroup){if(this.searchLabel){q=this.searchLabel}else{if(this.label){q=this.label}else{if(this.value){q=this.value}else{if(this.title){q=this.title}else{q="jqxItem"}}}}q=q.toString();var p=false;switch(f.searchMode){case"containsignorecase":p=a.jqx.string.containsIgnoreCase(q,k);break;case"contains":p=a.jqx.string.contains(q,k);break;case"equals":p=a.jqx.string.equals(q,k);break;case"equalsignorecase":p=a.jqx.string.equalsIgnoreCase(q,k);break;case"startswith":p=a.jqx.string.startsWith(q,k);break;case"startswithignorecase":p=a.jqx.string.startsWithIgnoreCase(q,k);break;case"endswith":p=a.jqx.string.endsWith(q,k);break;case"endswithignorecase":p=a.jqx.string.endsWithIgnoreCase(q,k);break}if(f.autoComplete&&!p){this.visible=false}if(p&&f.autoComplete){l[j++]=this;this.visible=true;g=this.visibleIndex}if(k==""&&f.autoComplete){this.visible=true;p=false}if(f.multiSelect){this.disabled=false;if(f.selectedItems.indexOf(this.value)>=0||f._disabledItems.indexOf(this.value)>=0){this.disabled=true;p=false}}if(!f.multiSelect){if(p&&!f.autoComplete){g=this.visibleIndex;return false}}else{if(p&&!f.autoComplete){if(g===-1){g=this.visibleIndex}return true}}}});this.listBox.searchString=k;var f=this;var h=function(){if(!f.multiSelect){return}var o=0;var r=false;var q=null;for(var p=0;p<f.listBox.items.length;p++){f.listBox.selectedIndexes[p]=-1;if(!f.listBox.items[p].disabled){if(r==false){q=f.listBox.items[p];o=q.visibleIndex;r=true}}}f.listBox.selectedIndex=-1;f.listBox.selectedIndex=o;f.listBox.selectedIndexes[o]=o;if(f.listBox.visibleItems.length>0){if(q){f.listBox.selectedValue=q.value}else{f.listBox.selectedValue=null}}else{f.listBox.selectedValue=null}f.listBox.ensureVisible(0)};if(!this.autoComplete){h();return{index:g,matchItems:l}}this.listBox.renderedVisibleItems=new Array();var b=this.listBox.vScrollInstance.value;this.listBox.vScrollInstance.value=0;this.listBox.visibleItems=new Array();this.listBox._renderItems();var e=this.listBox.selectedValue;var n=this.listBox.getItemByValue(e);if(!this.multiSelect){if(n){if(n.visible){this.listBox.selectedIndex=n.visibleIndex;for(var d=0;d<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndexes[n.visibleIndex]=n.visibleIndex}else{for(var d=0;d<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndex=-1}}}else{h()}this.listBox._renderItems();var m=this.listBox._calculateVirtualSize().height;if(m<b){b=0;this.listBox.vScrollInstance.refresh()}if(this.autoDropDownHeight){this._disableSelection=true;if(this.listBox.autoHeight!=this.autoDropDownHeight){this.listBoxContainer.jqxListBox({autoHeight:this.autoDropDownHeight})}this.container.height(m+25);this.listBox.invalidate();this._disableSelection=false}else{if(m<parseInt(this.dropDownHeight)){var c=this.listBox.hScrollBar[0].style.visibility=="hidden"?0:20;this.listBox.height=c+m;this.container.height(m+25+c);this.listBox.invalidate()}else{this.listBox.height=parseInt(this.dropDownHeight);this.container.height(parseInt(this.dropDownHeight)+25);this.listBox.invalidate()}}this.listBox.vScrollInstance.setPosition(b);return{index:g,matchItems:l}},findItems:function(e){var b=this.getItems();var d=this;var c=0;var f=new Array();a.each(b,function(g){var j="";if(!this.isGroup){if(this.label){j=this.label}else{if(this.value){j=this.value}else{if(this.title){j=this.title}else{j="jqxItem"}}}var h=false;switch(d.searchMode){case"containsignorecase":h=a.jqx.string.containsIgnoreCase(j,e);break;case"contains":h=a.jqx.string.contains(j,e);break;case"equals":h=a.jqx.string.equals(j,e);break;case"equalsignorecase":h=a.jqx.string.equalsIgnoreCase(j,e);break;case"startswith":h=a.jqx.string.startsWith(j,e);break;case"startswithignorecase":h=a.jqx.string.startsWithIgnoreCase(j,e);break;case"endswith":h=a.jqx.string.endsWith(j,e);break;case"endswithignorecase":h=a.jqx.string.endsWithIgnoreCase(j,e);break}if(h){f[c++]=this}}});return f},_resetautocomplete:function(){a.each(this.listBox.items,function(b){this.visible=true});this.listBox.vScrollInstance.value=0;this.listBox._addItems();this.listBox.autoHeight=false;this.listBox.height=this.dropDownHeight;this.container.height(parseInt(this.dropDownHeight)+25);this.listBoxContainer.height(parseInt(this.dropDownHeight));this.listBox._arrange();this.listBox._addItems();this.listBox._renderItems()},getItems:function(){var b=this.listBox.items;return b},getVisibleItems:function(){return this.listBox.getVisibleItems()},_setSize:function(){var b=window.getComputedStyle(this.element);var c=parseInt(b.borderLeftWidth)*2;var h=b.boxSizing;if(h==="border-box"||isNaN(c)){c=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-c+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-c+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-c+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-c+"px"}}var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){g=true;this.element.style.width=this.width;if(c>0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.element.style.height=this.height}if(g){var e=this;var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:d});this.container.width(parseInt(d)+25);this._arrange()}var e=this;var f=function(){if(e.multiSelect){e.host.height(e.height)}e._arrange();if(e.multiSelect){e.host.height("auto")}};e.oldWidth=e.host.width();e.oldHeight=e.host.height();a.jqx.utilities.resize(this.host,function(){var i=e.host.width();var j=e.host.height();if(i!=e.oldWidth||j!=e.oldHeight){f();e.hideListBox("api")}e.oldWidth=i;e.oldHeight=j})},isOpened:function(){var c=this;var b=a.data(document.body,"openedCombojqxListBox"+this.element.id);if(this.container.css("display")!="block"){return false}if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var e=this;var d=false;this.removeHandlers();if(this.multiSelect){this.addHandler(this.dropdownlistContent,"click",function(f){if(f.target.href){return false}e.input.focus();setTimeout(function(){e.input.focus()},10)});this.addHandler(this.dropdownlistContent,"focus",function(f){if(f.target.href){return false}e.input.focus();setTimeout(function(){e.input.focus()},10)})}if(!this.touch){if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.combobox"+this.element.id,function(f){var g=e.isOpened();if(g){e.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!e.disabled&&e.enableHover){d=true;e.host.addClass(e.toThemeProperty("jqx-combobox-state-hover"));if(e.dropDownVerticalAlignment=="top"){e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-up"))}else{e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-down-hover"))}e.dropdownlistArrow.addClass(e.toThemeProperty("jqx-combobox-arrow-hover"));e.dropdownlistArrow.addClass(e.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!e.disabled&&e.enableHover){e.host.removeClass(e.toThemeProperty("jqx-combobox-state-hover"));e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-down-hover"));e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-up-hover"));e.dropdownlistArrow.removeClass(e.toThemeProperty("jqx-combobox-arrow-hover"));e.dropdownlistArrow.removeClass(e.toThemeProperty("jqx-fill-state-hover"));d=false}})}if(e.autoOpen){this.addHandler(this.host,"mouseenter",function(){var f=e.isOpened();if(!f&&e.autoOpen){e.open();e.host.focus()}});this.addHandler(a(document),"mousemove."+e.id,function(i){var h=e.isOpened();if(h&&e.autoOpen){var m=e.host.coord();var l=m.top;var k=m.left;var j=e.container.coord();var f=j.left;var g=j.top;canClose=true;if(i.pageY>=l&&i.pageY<=l+e.host.height()+2){if(i.pageX>=k&&i.pageX<k+e.host.width()){canClose=false}}if(i.pageY>=g&&i.pageY<=g+e.container.height()-20){if(i.pageX>=f&&i.pageX<f+e.container.width()){canClose=false}}if(canClose){e.close()}}})}var c="mousedown";if(this.touch){c=a.jqx.mobile.getTouchEventName("touchstart")}var b=function(h){if(!e.disabled){var f=e.container.css("display")=="block";if(!e.isanimating){if(f){e.hideListBox("api");if(!a.jqx.mobile.isTouchDevice()){e.input.focus();setTimeout(function(){e.input.focus()},10)}return true}else{if(e.autoDropDownHeight){e.container.height(e.listBoxContainer.height()+25);var g=e.listBoxContainer.jqxListBox("autoHeight");if(!g){e.listBoxContainer.jqxListBox({autoHeight:e.autoDropDownHeight});e.listBox._arrange();e.listBox.ensureVisible(0);e.listBox._renderItems();e.container.height(e.listBoxContainer.height()+25)}}e.showListBox("api");if(!a.jqx.mobile.isTouchDevice()){setTimeout(function(){e.input.focus()},10)}else{return true}}}}};this.addHandler(this.dropdownlistArrow,c,function(f){b(f)});this.addHandler(this.dropdownlistArrowIcon,c,function(f){});this.addHandler(this.host,"focus",function(){e.focus()});this.addHandler(this.input,"focus",function(f){e.focused=true;e.host.addClass(e.toThemeProperty("jqx-combobox-state-focus"));e.host.addClass(e.toThemeProperty("jqx-fill-state-focus"));e.bar.addClass("focused");e.label.addClass("focused");e.dropdownlistContent.addClass(e.toThemeProperty("jqx-combobox-content-focus"));if(f.stopPropagation){f.stopPropagation()}});this.addHandler(this.input,"blur",function(){e.focused=false;e.bar.removeClass("focused");e.label.removeClass("focused");if(!e.isOpened()&&!e.opening){if(e.selectionMode=="dropDownList"){e._selectOldValue()}e.host.removeClass(e.toThemeProperty("jqx-combobox-state-focus"));e.host.removeClass(e.toThemeProperty("jqx-fill-state-focus"));e.dropdownlistContent.removeClass(e.toThemeProperty("jqx-combobox-content-focus"))}if(e._searchTimer){clearTimeout(e._searchTimer)}});this.addHandler(a(document),"mousedown."+this.id,e.closeOpenedListBox,{that:this,listbox:this.listBox,id:this.id});if(this.touch){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,e.closeOpenedListBox,{that:this,listbox:this.listBox,id:this.id})}this.addHandler(this.host,"keydown",function(k){var h=e.container.css("display")=="block";e.ctrlKey=k.ctrlKey;if(e.host.css("display")=="none"){return true}if(k.keyCode=="13"||k.keyCode=="9"){if(h&&!e.isanimating){if(e.listBox.selectedIndex!=-1){e.renderSelection("mouse");var f=e.listBox.selectedIndex;var j=e.listBox.getVisibleItem(f);if(j){e.listBox.selectedValue=j.value}e._setSelection(e.input.val().length,e.input.val().length);e.hideListBox("keyboard")}if(k.keyCode=="13"){e._oldvalue=e.listBox.selectedValue}if(!e.keyboardSelection){e._raiseEvent("2",{index:e.selectedIndex,type:"keyboard",item:e.getItem(e.selectedIndex)})}if(k.keyCode=="9"){return true}return false}}if(k.keyCode==115){if(!e.isanimating){if(!e.isOpened()){e.showListBox("keyboard")}else{if(e.isOpened()){e.hideListBox("keyboard")}}}return false}if(k.altKey){if(e.host.css("display")=="block"){if(!e.isanimating){if(k.keyCode==38){if(e.isOpened()){e.hideListBox("altKey")}}else{if(k.keyCode==40){if(!e.isOpened()){e.showListBox("altKey")}}}}}}if(k.keyCode=="27"||k.keyCode=="9"){if(e.isOpened()&&!e.isanimating){if(k.keyCode=="27"){if(!e.multiSelect){var j=e.listBox.getItemByValue(e._oldvalue);if(j){setTimeout(function(){if(e.autoComplete){e._updateItemsVisibility("")}e.listBox.selectIndex(j.index);e.renderSelection("api")},e.closeDelay)}else{e.clearSelection()}}else{e.listBox.selectedValue=null;e.input.val("")}}e.hideListBox("keyboard");if(k.keyCode=="9"){return true}e.renderSelection("api");k.preventDefault();return false}}var g=k.keyCode;if(h&&!e.disabled&&g!=8){return e.listBox._handleKeyDown(k)}else{if(!e.disabled&&!h){var g=k.keyCode;if(g==33||g==34||g==35||g==36||g==38|